{"size": 226889, "ext": "js", "max_stars_repo_path": "node_modules/@aws-amplify/storage/dist/aws-amplify-storage.min.js", "max_stars_repo_name": "rubixcubereubs/applianceEfficiencyCalculator", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "node_modules/@aws-amplify/storage/dist/aws-amplify-storage.min.js", "max_issues_repo_name": "rubixcubereubs/applianceEfficiencyCalculator", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "node_modules/@aws-amplify/storage/dist/aws-amplify-storage.min.js", "max_forks_repo_name": "rubixcubereubs/applianceEfficiencyCalculator", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 9453.7083333333, "max_line_length": 114945, "alphanum_fraction": 0.7036039649}
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@aws-amplify/core")):"function"==typeof define&&define.amd?define("aws_amplify_storage",["@aws-amplify/core"],t):"object"==typeof exports?exports.aws_amplify_storage=t(require("@aws-amplify/core")):e.aws_amplify_storage=t(e["@aws-amplify/core"])}(this,(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=181)}([function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",(function(){return o})),r.d(t,"__assign",(function(){return i})),r.d(t,"__rest",(function(){return a})),r.d(t,"__decorate",(function(){return s})),r.d(t,"__param",(function(){return u})),r.d(t,"__metadata",(function(){return c})),r.d(t,"__awaiter",(function(){return d})),r.d(t,"__generator",(function(){return l})),r.d(t,"__createBinding",(function(){return f})),r.d(t,"__exportStar",(function(){return h})),r.d(t,"__values",(function(){return p})),r.d(t,"__read",(function(){return v})),r.d(t,"__spread",(function(){return g})),r.d(t,"__spreadArrays",(function(){return y})),r.d(t,"__await",(function(){return m})),r.d(t,"__asyncGenerator",(function(){return b})),r.d(t,"__asyncDelegator",(function(){return _})),r.d(t,"__asyncValues",(function(){return w})),r.d(t,"__makeTemplateObject",(function(){return S})),r.d(t,"__importStar",(function(){return O})),r.d(t,"__importDefault",(function(){return E})),r.d(t,"__classPrivateFieldGet",(function(){return x})),r.d(t,"__classPrivateFieldSet",(function(){return C}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function o(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function s(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function d(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function l(e,t){var r,n,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(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=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],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function f(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function h(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function y(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function b(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{(r=o[e](t)).value instanceof m?Promise.resolve(r.value.v).then(u,c):d(i[0][2],r)}catch(e){d(i[0][3],e)}var r}function u(e){s("next",e)}function c(e){s("throw",e)}function d(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function _(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:m(e[n](t)),done:"return"===n}:o?o(t):t}:o}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function E(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function C(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(103),t),n.__exportStar(r(105),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(88),t),n.__exportStar(r(90),t),n.__exportStar(r(91),t),n.__exportStar(r(92),t),n.__exportStar(r(93),t),n.__exportStar(r(94),t),n.__exportStar(r(95),t),n.__exportStar(r(96),t),n.__exportStar(r(97),t),n.__exportStar(r(98),t),n.__exportStar(r(99),t),n.__exportStar(r(100),t),n.__exportStar(r(101),t),n.__exportStar(r(102),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(82),t),n.__exportStar(r(83),t),n.__exportStar(r(84),t),n.__exportStar(r(85),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(81),t),n.__exportStar(r(28),t),n.__exportStar(r(86),t)},function(t,r){t.exports=e},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(29),t),n.__exportStar(r(30),t),n.__exportStar(r(87),t)},function(e,t,r){"use strict";var n=r(33),o=r(125),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:u,isStream:function(e){return s(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:c,merge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]=r}for(var n=0,o=arguments.length;n<o;n++)c(arguments[n],r);return t},deepMerge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]="object"==typeof r?e({},r):r}for(var n=0,o=arguments.length;n<o;n++)c(arguments[n],r);return t},extend:function(e,t,r){return c(t,(function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,r){"use strict";const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",o="["+n+"][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+o+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,r){if(t){const n=Object.keys(t),o=n.length;for(let i=0;i<o;i++)e[n[i]]="strict"===r?[t[n[i]]]:t[n[i]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.buildOptions=function(e,t,r){var n={};if(!e)return t;for(let o=0;o<r.length;o++)void 0!==e[r[o]]?n[r[o]]=e[r[o]]:n[r[o]]=t[r[o]];return n},t.isName=function(e){const t=i.exec(e);return!(null==t)},t.getAllMatches=function(e,t){const r=[];let n=t.exec(e);for(;n;){const o=[],i=n.length;for(let e=0;e<i;e++)o.push(n[e]);r.push(o),n=t.exec(e)}return r},t.nameRegexp=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toHex=t.fromHex=void 0;for(var n={},o={},i=0;i<256;i++){var a=i.toString(16).toLowerCase();1===a.length&&(a="0"+a),n[i]=a,o[a]=i}t.fromHex=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),r=0;r<e.length;r+=2){var n=e.substr(r,2).toLowerCase();if(!(n in o))throw new Error("Cannot decode unrecognized sequence "+n+" as hexadecimal");t[r/2]=o[n]}return t},t.toHex=function(e){for(var t="",r=0;r<e.byteLength;r++)t+=n[e[r]];return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSsecPlugin=t.ssecMiddlewareOptions=t.ssecMiddleware=void 0;var n=r(0);function o(e){var t=this;return function(r){return function(o){return n.__awaiter(t,void 0,void 0,(function(){var t,i,a,s,u,c,d,l,f,h,p,v,g,y,m,b,_;return n.__generator(this,(function(w){switch(w.label){case 0:t=n.__assign({},o.input),i=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}],w.label=1;case 1:w.trys.push([1,6,7,8]),a=n.__values(i),s=a.next(),w.label=2;case 2:return s.done?[3,5]:(u=s.value,(c=t[u.target])?(d=ArrayBuffer.isView(c)?new Uint8Array(c.buffer,c.byteOffset,c.byteLength):"string"==typeof c?e.utf8Decoder(c):new Uint8Array(c),l=e.base64Encoder(d),(f=new e.md5).update(d),h=[n.__assign({},t)],(_={})[u.target]=l,p=u.hash,g=(v=e).base64Encoder,[4,f.digest()]):[3,4]);case 3:t=n.__assign.apply(void 0,h.concat([(_[p]=g.apply(v,[w.sent()]),_)])),w.label=4;case 4:return s=a.next(),[3,2];case 5:return[3,8];case 6:return y=w.sent(),m={error:y},[3,8];case 7:try{s&&!s.done&&(b=a.return)&&b.call(a)}finally{if(m)throw m.error}return[7];case 8:return[2,r(n.__assign(n.__assign({},o),{input:t}))]}}))}))}}}t.ssecMiddleware=o,t.ssecMiddlewareOptions={name:"ssecMiddleware",step:"initialize",tags:["SSE"]},t.getSsecPlugin=function(e){return{applyToStack:function(r){r.add(o(e),t.ssecMiddlewareOptions)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(27),t),n.__exportStar(r(79),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(121),t),n.__exportStar(r(123),t)},function(e,t,r){"use strict";const n=r(8),o=r(8).buildOptions,i=r(108);"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,n.nameRegexp);!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const a={attributeNamePrefix:"@_",attrNodeName:!1,textNodeName:"#text",ignoreAttributes:!0,ignoreNameSpace:!1,allowBooleanAttributes:!1,parseNodeValue:!0,parseAttributeValue:!1,arrayMode:!1,trimValues:!0,cdataTagName:!1,cdataPositionChar:"\\c",tagValueProcessor:function(e,t){return e},attrValueProcessor:function(e,t){return e},stopNodes:[]};t.defaultOptions=a;const s=["attributeNamePrefix","attrNodeName","textNodeName","ignoreAttributes","ignoreNameSpace","allowBooleanAttributes","parseNodeValue","parseAttributeValue","arrayMode","trimValues","cdataTagName","cdataPositionChar","tagValueProcessor","attrValueProcessor","parseTrueNumberOnly","stopNodes"];function u(e,t,r){return t&&(r.trimValues&&(t=t.trim()),t=d(t=r.tagValueProcessor(t,e),r.parseNodeValue,r.parseTrueNumberOnly)),t}function c(e,t){if(t.ignoreNameSpace){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}function d(e,t,r){if(t&&"string"==typeof e){let t;return""===e.trim()||isNaN(e)?t="true"===e||"false"!==e&&e:(-1!==e.indexOf("0x")?t=Number.parseInt(e,16):-1!==e.indexOf(".")?(t=Number.parseFloat(e),e=e.replace(/\.?0+$/,"")):t=Number.parseInt(e,10),r&&(t=String(t)===e?t:e)),t}return n.isExist(e)?e:""}t.props=s;const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])(.*?)\\3)?","g");function f(e,t){if(!t.ignoreAttributes&&"string"==typeof e){e=e.replace(/\r?\n/g," ");const r=n.getAllMatches(e,l),o=r.length,i={};for(let e=0;e<o;e++){const n=c(r[e][1],t);n.length&&(void 0!==r[e][4]?(t.trimValues&&(r[e][4]=r[e][4].trim()),r[e][4]=t.attrValueProcessor(r[e][4],n),i[t.attributeNamePrefix+n]=d(r[e][4],t.parseAttributeValue,t.parseTrueNumberOnly)):t.allowBooleanAttributes&&(i[t.attributeNamePrefix+n]=!0))}if(!Object.keys(i).length)return;if(t.attrNodeName){const e={};return e[t.attrNodeName]=i,e}return i}}function h(e,t){let r,n="";for(let o=t;o<e.length;o++){let t=e[o];if(r)t===r&&(r="");else if('"'===t||"'"===t)r=t;else{if(">"===t)return{data:n,index:o};"\t"===t&&(t=" ")}n+=t}}function p(e,t,r,n){const o=e.indexOf(t,r);if(-1===o)throw new Error(n);return o+t.length-1}t.getTraversalObj=function(e,t){e=e.replace(/(\r\n)|\n/," "),t=o(t,a,s);const r=new i("!xml");let c=r,d="";for(let r=0;r<e.length;r++){if("<"===e[r])if("/"===e[r+1]){const o=p(e,">",r,"Closing Tag is not closed.");let i=e.substring(r+2,o).trim();if(t.ignoreNameSpace){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}c&&(c.val?c.val=n.getValue(c.val)+""+u(i,d,t):c.val=u(i,d,t)),t.stopNodes.length&&t.stopNodes.includes(c.tagname)&&(c.child=[],null==c.attrsMap&&(c.attrsMap={}),c.val=e.substr(c.startIndex+1,r-c.startIndex-1)),c=c.parent,d="",r=o}else if("?"===e[r+1])r=p(e,"?>",r,"Pi Tag is not closed.");else if("!--"===e.substr(r+1,3))r=p(e,"--\x3e",r,"Comment is not closed.");else if("!D"===e.substr(r+1,2)){const t=p(e,">",r,"DOCTYPE is not closed.");r=e.substring(r,t).indexOf("[")>=0?e.indexOf("]>",r)+1:t}else if("!["===e.substr(r+1,2)){const o=p(e,"]]>",r,"CDATA is not closed.")-2,a=e.substring(r+9,o);if(d&&(c.val=n.getValue(c.val)+""+u(c.tagname,d,t),d=""),t.cdataTagName){const e=new i(t.cdataTagName,c,a);c.addChild(e),c.val=n.getValue(c.val)+t.cdataPositionChar,a&&(e.val=a)}else c.val=(c.val||"")+(a||"");r=o+2}else{const o=h(e,r+1);let a=o.data;const s=o.index,l=a.indexOf(" ");let p=a;if(-1!==l&&(p=a.substr(0,l).trimRight(),a=a.substr(l+1)),t.ignoreNameSpace){const e=p.indexOf(":");-1!==e&&(p=p.substr(e+1))}if(c&&d&&"!xml"!==c.tagname&&(c.val=n.getValue(c.val)+""+u(c.tagname,d,t)),a.length>0&&a.lastIndexOf("/")===a.length-1){"/"===p[p.length-1]?(p=p.substr(0,p.length-1),a=p):a=a.substr(0,a.length-1);const e=new i(p,c,"");p!==a&&(e.attrsMap=f(a,t)),c.addChild(e)}else{const e=new i(p,c);t.stopNodes.length&&t.stopNodes.includes(e.tagname)&&(e.startIndex=s),p!==a&&(e.attrsMap=f(a,t)),c.addChild(e),c=e}d="",r=s}else d+=e[r]}return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildQueryString=void 0;var n=r(0),o=r(11);t.buildQueryString=function(e){var t,r,i=[];try{for(var a=n.__values(Object.keys(e).sort()),s=a.next();!s.done;s=a.next()){var u=s.value,c=e[u];if(u=o.escapeUri(u),Array.isArray(c))for(var d=0,l=c.length;d<l;d++)i.push(u+"="+o.escapeUri(c[d]));else{var f=u;(c||"string"==typeof c)&&(f+="="+o.escapeUri(c)),i.push(f)}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return i.join("&")}},function(e,t,r){"use strict";var n,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(r,n){function o(){void 0!==i&&e.removeListener("error",i),r([].slice.call(arguments))}var i;"error"!==t&&(i=function(r){e.removeListener(t,o),n(r)},e.once("error",i)),e.once(t,o)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function d(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var o,i,a,s;if(c(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),a=i[t]),void 0===a)a=i[t]=r,++e._eventsCount;else if("function"==typeof a?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(o=d(e))>0&&a.length>o&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=f.bind(n);return o.listener=r,n.wrapFn=o,o}function p(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):g(o,o.length)}function v(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function g(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return d(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)i(u,this,t);else{var c=u.length,d=g(u,c);for(r=0;r<c;++r)i(d[r],this,t)}return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,h(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,h(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,o,i,a;if(c(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){a=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},s.prototype.listenerCount=v,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toBase64=t.fromBase64=void 0;for(var n={},o=new Array(64),i=0,a="A".charCodeAt(0),s="Z".charCodeAt(0);i+a<=s;i++){var u=String.fromCharCode(i+a);n[u]=i,o[i]=u}for(i=0,a="a".charCodeAt(0),s="z".charCodeAt(0);i+a<=s;i++){u=String.fromCharCode(i+a);var c=i+26;n[u]=c,o[c]=u}for(i=0;i<10;i++){n[i.toString(10)]=i+52;u=i.toString(10),c=i+52;n[u]=c,o[c]=u}n["+"]=62,o[62]="+",n["/"]=63,o[63]="/";t.fromBase64=function(e){var t=e.length/4*3;"=="===e.substr(-2)?t-=2:"="===e.substr(-1)&&t--;for(var r=new ArrayBuffer(t),o=new DataView(r),i=0;i<e.length;i+=4){for(var a=0,s=0,u=i,c=i+3;u<=c;u++)"="!==e[u]?(a|=n[e[u]]<<6*(c-u),s+=6):a>>=6;var d=i/4*3;a>>=s%8;for(var l=Math.floor(s/8),f=0;f<l;f++){var h=8*(l-f-1);o.setUint8(d+f,(a&255<<h)>>h)}}return new Uint8Array(r)},t.toBase64=function(e){for(var t="",r=0;r<e.length;r+=3){for(var n=0,i=0,a=r,s=Math.min(r+3,e.length);a<s;a++)n|=e[a]<<8*(s-a-1),i+=8;var u=Math.ceil(i/6);n<<=6*u-i;for(var c=1;c<=u;c++){var d=6*(u-c);t+=o[(n&63<<d)>>d]}t+="==".slice(0,4-u)}return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8=t.fromUtf8=void 0;var n=r(178),o=r(179);t.fromUtf8=function(e){return"function"==typeof TextEncoder?o.fromUtf8(e):n.fromUtf8(e)},t.toUtf8=function(e){return"function"==typeof TextDecoder?o.toUtf8(e):n.toUtf8(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NO_RETRY_INCREMENT=t.TIMEOUT_RETRY_COST=t.RETRY_COST=t.INITIAL_RETRY_TOKENS=t.THROTTLING_RETRY_DELAY_BASE=t.MAXIMUM_RETRY_DELAY=t.DEFAULT_RETRY_DELAY_BASE=void 0,t.DEFAULT_RETRY_DELAY_BASE=100,t.MAXIMUM_RETRY_DELAY=2e4,t.THROTTLING_RETRY_DELAY_BASE=500,t.INITIAL_RETRY_TOKENS=500,t.RETRY_COST=5,t.TIMEOUT_RETRY_COST=10,t.NO_RETRY_INCREMENT=1},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.locateWindow=void 0;var r={};t.locateWindow=function(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(141),t),n.__exportStar(r(142),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHostHeaderPlugin=t.hostHeaderMiddlewareOptions=t.hostHeaderMiddleware=t.resolveHostHeaderConfig=void 0;var n=r(0),o=r(3);t.resolveHostHeaderConfig=function(e){return e},t.hostHeaderMiddleware=function(e){return function(t){return function(r){return n.__awaiter(void 0,void 0,void 0,(function(){var i,a;return n.__generator(this,(function(n){return o.HttpRequest.isInstance(r.request)?(i=r.request,a=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===a?"":a).indexOf("h2")>=0&&!i.headers[":authority"]?(delete i.headers.host,i.headers[":authority"]=""):i.headers.host||(i.headers.host=i.hostname),[2,t(r)]):[2,t(r)]}))}))}}},t.hostHeaderMiddlewareOptions={name:"hostHeaderMiddleware",step:"build",tags:["HOST"]},t.getHostHeaderPlugin=function(e){return{applyToStack:function(r){r.add(t.hostHeaderMiddleware(e),t.hostHeaderMiddlewareOptions)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(143),t),n.__exportStar(r(41),t),n.__exportStar(r(149),t),n.__exportStar(r(45),t),n.__exportStar(r(46),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(151),t),n.__exportStar(r(152),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(153),t),n.__exportStar(r(154),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.invalidFunction=void 0,t.invalidFunction=function(e){return function(){throw new Error(e)}}},function(e){e.exports=JSON.parse('{"a":"@aws-sdk/client-s3","b":"1.0.0-gamma.4"}')},function(e,t,r){"use strict";function n(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}Object.defineProperty(t,"__esModule",{value:!0}),t.escapeUri=void 0,t.escapeUri=function(e){var t=encodeURIComponent(e);return t=t.replace(/[!'()*]/g,n)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bucketHostname=void 0;var n=r(0),o=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,i=/(\d+\.){3}\d+/,a=/\.\./,s=/\./,u=/^(.+\.)?s3[.-]([a-z0-9-]+)\./,c=/^s3(-external-1)?\.amazonaws\.com$/;t.bucketHostname=function(e){var t=e.accelerateEndpoint,r=void 0!==t&&t,d=e.baseHostname,l=e.bucketName,f=e.dualstackEndpoint,h=void 0!==f&&f,p=e.pathStyleEndpoint,v=void 0!==p&&p,g=e.tlsCompatible,y=void 0===g||g;if(!u.test(d))return{bucketEndpoint:!1,hostname:d};var m,b,_=n.__read(c.test(d)?["us-east-1","amazonaws.com"]:[(b=(m=d).match(u))[2],m.replace(new RegExp("^"+b[0]),"")],2),w=_[0],S=_[1];return v||!function(e){return o.test(e)&&!i.test(e)&&!a.test(e)}(l)||y&&s.test(l)?{bucketEndpoint:!1,hostname:h?"s3.dualstack."+w+"."+S:d}:(r?d="s3-accelerate"+(h?".dualstack":"")+"."+S:h&&(d="s3.dualstack."+w+"."+S),{bucketEndpoint:!0,hostname:l+"."+d})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deserializerMiddleware=void 0;var n=r(0);t.deserializerMiddleware=function(e,t){var r=this;return function(o){return function(i){return n.__awaiter(r,void 0,void 0,(function(){var r,a;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,o(i)];case 1:return r=n.sent().response,[4,t(r,e)];case 2:return a=n.sent(),[2,{response:r,output:a}]}}))}))}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializerMiddleware=void 0;var n=r(0);t.serializerMiddleware=function(e,t){var r=this;return function(o){return function(i){return n.__awaiter(r,void 0,void 0,(function(){var r;return n.__generator(this,(function(a){switch(a.label){case 0:return[4,t(i.input,e)];case 1:return r=a.sent(),[2,o(n.__assign(n.__assign({},i),{request:r}))]}}))}))}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(0).__exportStar(r(89),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseQueryString=void 0;var n=r(0);t.parseQueryString=function(e){var t,r,o={};if(e=e.replace(/^\?/,""))try{for(var i=n.__values(e.split("&")),a=i.next();!a.done;a=i.next()){var s=a.value,u=n.__read(s.split("="),2),c=u[0],d=u[1],l=void 0===d?null:d;c=decodeURIComponent(c),l&&(l=decodeURIComponent(l)),c in o?Array.isArray(o[c])?o[c].push(l):o[c]=[o[c],l]:o[c]=l}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return o}},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t,r){"use strict";var n=r(7);function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";(function(t){var n=r(7),o=r(131),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,u={adapter:((void 0!==t&&"[object process]"===Object.prototype.toString.call(t)||"undefined"!=typeof XMLHttpRequest)&&(s=r(37)),s),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(i)})),e.exports=u}).call(this,r(130))},function(e,t,r){"use strict";var n=r(7),o=r(132),i=r(34),a=r(134),s=r(135),u=r(38);e.exports=function(e){return new Promise((function(t,c){var d=e.data,l=e.headers;n.isFormData(d)&&delete l["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",p=e.auth.password||"";l.Authorization="Basic "+btoa(h+":"+p)}if(f.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in f?a(f.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f};o(t,c,n),f=null}},f.onabort=function(){f&&(c(u("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(u("Network Error",e,null,f)),f=null},f.ontimeout=function(){c(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",f)),f=null},n.isStandardBrowserEnv()){var v=r(136),g=(e.withCredentials||s(e.url))&&e.xsrfCookieName?v.read(e.xsrfCookieName):void 0;g&&(l[e.xsrfHeaderName]=g)}if("setRequestHeader"in f&&n.forEach(l,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete l[t]:f.setRequestHeader(t,e)})),e.withCredentials&&(f.withCredentials=!0),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),c(e),f=null)})),void 0===d&&(d=null),f.send(d)}))}},function(e,t,r){"use strict";var n=r(133);e.exports=function(e,t,r,o,i){var a=new Error(e);return n(a,t,r,o,i)}},function(e,t,r){"use strict";var n=r(7);e.exports=function(e,t){t=t||{};var r={};return n.forEach(["url","method","params","data"],(function(e){void 0!==t[e]&&(r[e]=t[e])})),n.forEach(["headers","auth","proxy"],(function(o){n.isObject(t[o])?r[o]=n.deepMerge(e[o],t[o]):void 0!==t[o]?r[o]=t[o]:n.isObject(e[o])?r[o]=n.deepMerge(e[o]):void 0!==e[o]&&(r[o]=e[o])})),n.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])})),r}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StandardRetryStrategy=t.DEFAULT_RETRY_MODE=t.DEFAULT_MAX_ATTEMPTS=void 0;var n=r(0),o=r(3),i=r(42),a=r(145),s=r(18),u=r(148),c=r(45),d=r(46);t.DEFAULT_MAX_ATTEMPTS="3",t.DEFAULT_RETRY_MODE="standard";var l=function(){function e(e,t){var r,n,o;this.maxAttemptsProvider=e,this.retryDecider=null!==(r=null==t?void 0:t.retryDecider)&&void 0!==r?r:d.defaultRetryDecider,this.delayDecider=null!==(n=null==t?void 0:t.delayDecider)&&void 0!==n?n:c.defaultDelayDecider,this.retryQuota=null!==(o=null==t?void 0:t.retryQuota)&&void 0!==o?o:u.getDefaultRetryQuota(s.INITIAL_RETRY_TOKENS)}return e.prototype.shouldRetry=function(e,t,r){return t<r&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return n.__awaiter(this,void 0,void 0,(function(){var e,r;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=n.sent(),[3,3];case 2:return n.sent(),e=t.DEFAULT_MAX_ATTEMPTS,[3,3];case 3:return r=parseInt(e),[2,Number.isNaN(r)?parseInt(t.DEFAULT_MAX_ATTEMPTS):r]}}))}))},e.prototype.retry=function(e,t){return n.__awaiter(this,void 0,void 0,(function(){var r,u,c,d,l,f,h,p;return n.__generator(this,(function(v){switch(v.label){case 0:return u=0,c=0,[4,this.getMaxAttempts()];case 1:d=v.sent(),l=t.request,o.HttpRequest.isInstance(l)&&(l.headers["amz-sdk-invocation-id"]=a.v4()),f=function(){var a,f,p,v,g;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,5]),o.HttpRequest.isInstance(l)&&(l.headers["amz-sdk-request"]="attempt="+(u+1)+"; max="+d),[4,e(t)];case 1:return a=n.sent(),f=a.response,p=a.output,h.retryQuota.releaseRetryTokens(r),p.$metadata.attempts=u+1,p.$metadata.totalRetryDelay=c,[2,{value:{response:f,output:p}}];case 2:return v=n.sent(),u++,h.shouldRetry(v,u,d)?(r=h.retryQuota.retrieveRetryTokens(v),g=h.delayDecider(i.isThrottlingError(v)?s.THROTTLING_RETRY_DELAY_BASE:s.DEFAULT_RETRY_DELAY_BASE,u),c+=g,[4,new Promise((function(e){return setTimeout(e,g)}))]):[3,4];case 3:return n.sent(),[2,"continue"];case 4:throw v.$metadata||(v.$metadata={}),v.$metadata.attempts=u,v.$metadata.totalRetryDelay=c,v;case 5:return[2]}}))},h=this,v.label=2;case 2:return[5,f()];case 3:return"object"==typeof(p=v.sent())?[2,p.value]:[3,2];case 4:return[2]}}))}))},e}();t.StandardRetryStrategy=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTransientError=t.isThrottlingError=t.isClockSkewError=t.isRetryableByTrait=void 0;var n=r(144);t.isRetryableByTrait=function(e){return void 0!==e.$retryable},t.isClockSkewError=function(e){return n.CLOCK_SKEW_ERROR_CODES.includes(e.name)},t.isThrottlingError=function(e){var t;return n.THROTTLING_ERROR_CODES.includes(e.name)||1==(null===(t=e.$retryable)||void 0===t?void 0:t.throttling)},t.isTransientError=function(e){var t;return n.TRANSIENT_ERROR_CODES.includes(e.name)||n.TRANSIENT_ERROR_STATUS_CODES.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}},function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}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 r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,o=r;return[o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]]].join("")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultDelayDecider=void 0;var n=r(18);t.defaultDelayDecider=function(e,t){return Math.floor(Math.min(n.MAXIMUM_RETRY_DELAY,Math.random()*Math.pow(2,t)*e))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultRetryDecider=void 0;var n=r(42);t.defaultRetryDecider=function(e){return!!e&&(n.isRetryableByTrait(e)||n.isClockSkewError(e)||n.isThrottlingError(e)||n.isTransientError(e))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(48),o=r(49),i=r(50),a=r(19),s=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,r){var n=a.locateWindow().msCrypto.subtle.importKey("raw",u(e),o.SHA_256_HMAC_ALGO,!1,["sign"]);n.oncomplete=function(){n.result&&t(n.result),r("ImportKey completed without importing key.")},n.onerror=function(){r("ImportKey failed to import key.")}}))}(e).then((function(e){return a.locateWindow().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve(a.locateWindow().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;n.isEmptyData(e)||(this.operation=this.operation.then((function(r){return r.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},r.process(u(e)),r})),this.operation.catch((function(){})))},e.prototype.digest=function(){return this.operation.then((function(e){return new Promise((function(t,r){e.onerror=function(){r("Error encountered finalizing hash")},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),r("Error encountered finalizing hash")},e.finish()}))}))},e}();function u(e){return"string"==typeof e?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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8=t.fromUtf8=void 0;var n=r(156),o=r(157);t.fromUtf8=function(e){return"function"==typeof TextEncoder?o.fromUtf8(e):n.fromUtf8(e)},t.toUtf8=function(e){return"function"==typeof TextDecoder?o.toUtf8(e):n.toUtf8(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(50),o=r(48),i=r(49),a=r(19),s=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,r){a.locateWindow().crypto.subtle.importKey("raw",u(e),i.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,r)})),this.key.catch((function(){})))}return e.prototype.update=function(e){if(!o.isEmptyData(e)){var t=u(e),r=new Uint8Array(this.toHash.byteLength+t.byteLength);r.set(this.toHash,0),r.set(t,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return a.locateWindow().crypto.subtle.sign(i.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):o.isEmptyData(this.toHash)?Promise.resolve(i.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return a.locateWindow().crypto.subtle.digest(i.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();function u(e){return"string"==typeof e?n.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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventStreamMarshaller=void 0;var n=r(54),o=r(173),i=r(58),a=function(){function e(e){var t=e.utf8Encoder,r=e.utf8Decoder;this.eventMarshaller=new n.EventStreamMarshaller(t,r),this.universalMarshaller=new o.EventStreamMarshaller({utf8Decoder:r,utf8Encoder:t})}return e.prototype.deserialize=function(e,t){var r=s(e)?i.readableStreamtoIterable(e):e;return this.universalMarshaller.deserialize(r,t)},e.prototype.serialize=function(e,t){var r=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?i.iterableToReadableStream(r):r},e}();t.EventStreamMarshaller=a;var s=function(e){return"function"==typeof ReadableStream&&e instanceof ReadableStream}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(169),t),n.__exportStar(r(56),t),n.__exportStar(r(172),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.crc32=function(e){return(new o).update(e).digest()};var o=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,r;try{for(var o=n.__values(e),a=o.next();!a.done;a=o.next()){var s=a.value;this.checksum=this.checksum>>>8^i[255&(this.checksum^s)]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}();t.Crc32=o;var i=Uint32Array.from([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])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Int64=void 0;var n=r(9),o=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(t+" is too large (or, if negative, too small) to represent as an Int64");for(var r=new Uint8Array(8),n=7,o=Math.abs(Math.round(t));n>-1&&o>0;n--,o/=256)r[n]=o;return t<0&&i(r),new e(r)},e.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&i(e),parseInt(n.toHex(e),16)*(t?-1:1)},e.prototype.toString=function(){return String(this.valueOf())},e}();function i(e){for(var t=0;t<8;t++)e[t]^=255;for(t=7;t>-1&&(e[t]++,0===e[t]);t--);}t.Int64=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventStreamMarshaller=void 0;var n=r(0),o=r(54),i=r(175),a=r(176),s=function(){function e(e){var t=e.utf8Encoder,r=e.utf8Decoder;this.eventMarshaller=new o.EventStreamMarshaller(t,r),this.utfEncoder=t}return e.prototype.deserialize=function(e,t){var r=i.getChunkedStream(e);return a.getUnmarshalledStream(r,{eventMarshaller:this.eventMarshaller,deserializer:t,toUtf8:this.utfEncoder})},e.prototype.serialize=function(e,t){var r,o=this;return(r={})[Symbol.asyncIterator]=function(){return n.__asyncGenerator(this,arguments,(function(){var r,i,a,s,u,c,d;return n.__generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,7,8,13]),r=n.__asyncValues(e),l.label=1;case 1:return[4,n.__await(r.next())];case 2:return(i=l.sent()).done?[3,6]:(a=i.value,s=o.eventMarshaller.marshall(t(a)),[4,n.__await(s)]);case 3:return[4,l.sent()];case 4:l.sent(),l.label=5;case 5:return[3,1];case 6:return[3,13];case 7:return u=l.sent(),c={error:u},[3,13];case 8:return l.trys.push([8,,11,12]),i&&!i.done&&(d=r.return)?[4,n.__await(d.call(r))]:[3,10];case 9:l.sent(),l.label=10;case 10:return[3,12];case 11:if(c)throw c.error;return[7];case 12:return[7];case 13:return[4,n.__await(new Uint8Array(0))];case 14:return[4,l.sent()];case 15:return l.sent(),[2]}}))}))},r},e}();t.EventStreamMarshaller=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iterableToReadableStream=t.readableStreamtoIterable=void 0;var n=r(0);t.readableStreamtoIterable=function(e){var t;return(t={})[Symbol.asyncIterator]=function(){return n.__asyncGenerator(this,arguments,(function(){var t,r,o,i;return n.__generator(this,(function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,n.__await(t.read())];case 3:return r=a.sent(),o=r.done,i=r.value,o?[4,n.__await(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,n.__await(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t},t.iterableToReadableStream=function(e){var t=e[Symbol.asyncIterator]();return new ReadableStream({pull:function(e){return n.__awaiter(this,void 0,void 0,(function(){var r,o,i;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,t.next()];case 1:return r=n.sent(),o=r.done,i=r.value,o?[2,e.close()]:(e.enqueue(i),[2])}}))}))}})}},function(e,t,r){"use strict";r.r(t),r.d(t,"createScope",(function(){return p})),r.d(t,"getSigningKey",(function(){return v})),r.d(t,"clearCredentialCache",(function(){return g})),r.d(t,"SignatureV4",(function(){return C}));var n=r(0),o="X-Amz-Date".toLowerCase(),i=["authorization",o,"date"],a="X-Amz-Signature".toLowerCase(),s="X-Amz-Security-Token".toLowerCase(),u={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},c=/^proxy-/,d=/^sec-/,l="AWS4-HMAC-SHA256-PAYLOAD",f={},h=[];function p(e,t,r){return e+"/"+t+"/"+r+"/aws4_request"}function v(e,t,r,o,i){var a=r+":"+o+":"+i+":"+t.accessKeyId+":"+t.sessionToken;if(a in f)return f[a];for(h.push(a);h.length>50;)delete f[h.shift()];return f[a]=new Promise((function(s,u){var c,d,l=Promise.resolve("AWS4"+t.secretAccessKey),h=function(t){(l=l.then((function(r){return n=t,(o=new e(r)).update(n),o.digest();var n,o}))).catch((function(){}))};try{for(var p=Object(n.__values)([r,o,i,"aws4_request"]),v=p.next();!v.done;v=p.next()){h(v.value)}}catch(e){c={error:e}}finally{try{v&&!v.done&&(d=p.return)&&d.call(p)}finally{if(c)throw c.error}}l.then(s,(function(e){delete f[a],u(e)}))}))}function g(){h.length=0,Object.keys(f).forEach((function(e){delete f[e]}))}var y=r(9);function m(e,t,r){var o,i,a=e.headers,s={};try{for(var l=Object(n.__values)(Object.keys(a).sort()),f=l.next();!f.done;f=l.next()){var h=f.value,p=h.toLowerCase();(p in u||(null==t?void 0:t.has(p))||c.test(p)||d.test(p))&&(!r||r&&!r.has(p))||(s[p]=a[h].trim().replace(/\s+/g," "))}}catch(e){o={error:e}}finally{try{f&&!f.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}return s}var b=r(11);var _=r(63);function w(e,t){var r=e.headers,o=e.body;return Object(n.__awaiter)(this,void 0,void 0,(function(){var e,i,a,s,u,c,d;return Object(n.__generator)(this,(function(l){switch(l.label){case 0:try{for(e=Object(n.__values)(Object.keys(r)),i=e.next();!i.done;i=e.next())if("x-amz-content-sha256"===(a=i.value).toLowerCase())return[2,r[a]]}catch(e){c={error:e}}finally{try{i&&!i.done&&(d=e.return)&&d.call(e)}finally{if(c)throw c.error}}return null!=o?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof o||ArrayBuffer.isView(o)||Object(_.isArrayBuffer)(o)?((s=new t).update(o),u=y.toHex,[4,s.digest()]):[3,3];case 2:return[2,u.apply(void 0,[l.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}}))}))}function S(e){var t=e.headers,r=e.query,o=Object(n.__rest)(e,["headers","query"]);return Object(n.__assign)(Object(n.__assign)({},o),{headers:Object(n.__assign)({},t),query:r?O(r):void 0})}function O(e){return Object.keys(e).reduce((function(t,r){var o,i=e[r];return Object(n.__assign)(Object(n.__assign)({},t),((o={})[r]=Array.isArray(i)?Object(n.__spread)(i):i,o))}),{})}function E(e){var t,r;e="function"==typeof e.clone?e.clone():S(e);try{for(var o=Object(n.__values)(Object.keys(e.headers)),a=o.next();!a.done;a=o.next()){var s=a.value;i.indexOf(s.toLowerCase())>-1&&delete e.headers[s]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return e}function x(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 C=function(){function e(e){var t=e.applyChecksum,r=e.credentials,n=e.region,o=e.service,i=e.sha256,a=e.uriEscapePath,s=void 0===a||a;if(this.service=o,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof t||t,"string"==typeof n){var u=Promise.resolve(n);this.regionProvider=function(){return u}}else this.regionProvider=n;if("object"==typeof r){var c=Promise.resolve(r);this.credentialProvider=function(){return c}}else this.credentialProvider=r}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),Object(n.__awaiter)(this,void 0,void 0,(function(){var r,o,i,a,s,u,c,d,l,f,h,v,g,y,b,_,O,x,C,A,M;return Object(n.__generator)(this,(function(T){switch(T.label){case 0:return[4,Promise.all([this.regionProvider(),this.credentialProvider()])];case 1:return r=n.__read.apply(void 0,[T.sent(),2]),o=r[0],i=r[1],a=t.signingDate,s=void 0===a?new Date:a,u=t.expiresIn,c=void 0===u?3600:u,d=t.unsignableHeaders,l=t.signableHeaders,f=j(s),h=f.longDate,v=f.shortDate,c>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(g=p(v,o,this.service),y=function(e){var t,r,o="function"==typeof e.clone?e.clone():S(e),i=o.headers,a=o.query,s=void 0===a?{}:a;try{for(var u=Object(n.__values)(Object.keys(i)),c=u.next();!c.done;c=u.next()){var d=c.value;"x-amz-"===d.toLowerCase().substr(0,6)&&(s[d]=i[d],delete i[d])}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return Object(n.__assign)(Object(n.__assign)({},e),{headers:i,query:s})}(E(e)),i.sessionToken&&(y.query["X-Amz-Security-Token"]=i.sessionToken),y.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",y.query["X-Amz-Credential"]=i.accessKeyId+"/"+g,y.query["X-Amz-Date"]=h,y.query["X-Amz-Expires"]=c.toString(10),b=m(y,d,l),y.query["X-Amz-SignedHeaders"]=P(b),_=y.query,O="X-Amz-Signature",x=this.getSignature,C=[h,g,this.getSigningKey(i,o,v)],A=this.createCanonicalRequest,M=[y,b],[4,w(e,this.sha256)]);case 2:return[4,x.apply(this,C.concat([A.apply(this,M.concat([T.sent()]))]))];case 3:return _[O]=T.sent(),[2,y]}}))}))},e.prototype.sign=function(e,t){return Object(n.__awaiter)(this,void 0,void 0,(function(){return Object(n.__generator)(this,(function(r){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 r=e.headers,o=e.payload,i=t.signingDate,a=void 0===i?new Date:i,s=t.priorSignature;return Object(n.__awaiter)(this,void 0,void 0,(function(){var e,t,i,u,c,d,f,h,v,g,m;return Object(n.__generator)(this,(function(b){switch(b.label){case 0:return[4,Promise.all([this.regionProvider(),this.credentialProvider()])];case 1:return e=n.__read.apply(void 0,[b.sent(),1]),t=e[0],i=j(a),u=i.shortDate,c=i.longDate,d=p(u,t,this.service),[4,w({headers:{},body:o},this.sha256)];case 2:return f=b.sent(),(h=new this.sha256).update(r),g=y.toHex,[4,h.digest()];case 3:return v=g.apply(void 0,[b.sent()]),m=[l,c,d,s,v,f].join("\n"),[2,this.signString(m,{signingDate:a})]}}))}))},e.prototype.signString=function(e,t){var r=(void 0===t?{}:t).signingDate,o=void 0===r?new Date:r;return Object(n.__awaiter)(this,void 0,void 0,(function(){var t,r,i,a,s,u,c,d;return Object(n.__generator)(this,(function(l){switch(l.label){case 0:return[4,Promise.all([this.regionProvider(),this.credentialProvider()])];case 1:return t=n.__read.apply(void 0,[l.sent(),2]),r=t[0],i=t[1],a=j(o).shortDate,c=(u=this.sha256).bind,[4,this.getSigningKey(i,r,a)];case 2:return(s=new(c.apply(u,[void 0,l.sent()]))).update(e),d=y.toHex,[4,s.digest()];case 3:return[2,d.apply(void 0,[l.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var r=void 0===t?{}:t,i=r.signingDate,a=void 0===i?new Date:i,u=r.signableHeaders,c=r.unsignableHeaders;return Object(n.__awaiter)(this,void 0,void 0,(function(){var t,r,i,d,l,f,h,v,g,y,b;return Object(n.__generator)(this,(function(_){switch(_.label){case 0:return[4,Promise.all([this.regionProvider(),this.credentialProvider()])];case 1:return t=n.__read.apply(void 0,[_.sent(),2]),r=t[0],i=t[1],d=E(e),l=j(a),f=l.longDate,h=l.shortDate,v=p(h,r,this.service),d.headers[o]=f,i.sessionToken&&(d.headers[s]=i.sessionToken),[4,w(d,this.sha256)];case 2:return g=_.sent(),!function(e,t){var r,o;e=e.toLowerCase();try{for(var i=Object(n.__values)(Object.keys(t)),a=i.next();!a.done;a=i.next()){if(e===a.value.toLowerCase())return!0}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return!1}("x-amz-content-sha256",d.headers)&&this.applyChecksum&&(d.headers["x-amz-content-sha256"]=g),y=m(d,c,u),[4,this.getSignature(f,v,this.getSigningKey(i,r,h),this.createCanonicalRequest(d,y,g))];case 3:return b=_.sent(),d.headers.authorization="AWS4-HMAC-SHA256 Credential="+i.accessKeyId+"/"+v+", SignedHeaders="+P(y)+", Signature="+b,[2,d]}}))}))},e.prototype.createCanonicalRequest=function(e,t,r){var o=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,r,o=e.query,i=void 0===o?{}:o,s=[],u={},c=function(e){if(e.toLowerCase()===a)return"continue";s.push(e);var t=i[e];"string"==typeof t?u[e]=Object(b.escapeUri)(e)+"="+Object(b.escapeUri)(t):Array.isArray(t)&&(u[e]=t.slice(0).sort().reduce((function(t,r){return t.concat([Object(b.escapeUri)(e)+"="+Object(b.escapeUri)(r)])}),[]).join("&"))};try{for(var d=Object(n.__values)(Object.keys(i).sort()),l=d.next();!l.done;l=d.next()){c(l.value)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}return s.map((function(e){return u[e]})).filter((function(e){return e})).join("&")}(e)+"\n"+o.map((function(e){return e+":"+t[e]})).join("\n")+"\n\n"+o.join(";")+"\n"+r},e.prototype.createStringToSign=function(e,t,r){return Object(n.__awaiter)(this,void 0,void 0,(function(){var o,i;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:return(o=new this.sha256).update(r),[4,o.digest()];case 1:return i=n.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+Object(y.toHex)(i)]}}))}))},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,r,o){return Object(n.__awaiter)(this,void 0,void 0,(function(){var i,a,s,u,c;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:return[4,this.createStringToSign(e,t,o)];case 1:return i=n.sent(),u=(s=this.sha256).bind,[4,r];case 2:return(a=new(u.apply(s,[void 0,n.sent()]))).update(i),c=y.toHex,[4,a.digest()];case 3:return[2,c.apply(void 0,[n.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,r){return v(this.sha256,e,r,t,this.service)},e}();function j(e){var t=x(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}}function P(e){return Object.keys(e).sort().join(";")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatUrl=void 0;var n=r(14);t.formatUrl=function(e){var t=e.port,r=e.query,o=e.protocol,i=e.path,a=e.hostname;o&&":"!==o.substr(-1)&&(o+=":"),t&&(a+=":"+t),i&&"/"!==i.charAt(0)&&(i="/"+i);var s=r?n.buildQueryString(r):"";return s&&"?"!==s[0]&&(s="?"+s),o+"//"+a+i+s}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createRequest=void 0;var n=r(0);t.createRequest=function(e,t){return n.__awaiter(this,void 0,void 0,(function(){var r,o,i=this;return n.__generator(this,(function(a){switch(a.label){case 0:return r=function(e){return function(e){return n.__awaiter(i,void 0,void 0,(function(){return n.__generator(this,(function(t){return[2,{output:{request:e.request},response:void 0}]}))}))}},(o=e.middlewareStack.clone()).add(r,{step:"build",priority:"low"}),[4,t.resolveMiddleware(o,e.config,void 0)(t).then((function(e){return e.output.request}))];case 1:return[2,a.sent()]}}))}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.S3RequestPresigner=void 0;var n=r(0),o=r(59),i=r(80),a=function(){function e(e){var t=n.__assign({service:e.signingName||e.service||"s3",uriEscapePath:e.uriEscapePath||!1},e);this.signer=new o.SignatureV4(t)}return e.prototype.presign=function(e,t){void 0===t&&(t={});var r=t.unsignableHeaders,o=void 0===r?new Set:r,a=n.__rest(t,["unsignableHeaders"]);return n.__awaiter(this,void 0,void 0,(function(){return n.__generator(this,(function(t){return o.add("content-type"),e.headers[i.SHA256_HEADER]=i.UNSIGNED_PAYLOAD,[2,this.signer.presign(e,n.__assign({expiresIn:900,unsignableHeaders:o},a))]}))}))},e}();t.S3RequestPresigner=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayBuffer=void 0,t.isArrayBuffer=function(e){return"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e)}},function(e,t,r){"use strict";const n=r(107),o=r(13),i=r(13),a=r(8).buildOptions,s=r(109);t.parse=function(e,t,r){if(r){!0===r&&(r={});const t=s.validate(e,r);if(!0!==t)throw Error(t.err.msg)}t=a(t,i.defaultOptions,i.props);const u=o.getTraversalObj(e,t);return n.convertToJson(u,t)},t.convertTonimn=r(110).convert2nimn,t.getTraversalObj=o.getTraversalObj,t.convertToJson=n.convertToJson,t.convertToJsonString=r(111).convertToJsonString,t.validate=s.validate,t.j2xParser=r(112),t.parseToNimn=function(e,r,n){return t.convertTonimn(t.getTraversalObj(e,n),r,n)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseUrl=void 0;var n=r(32),o=r(113);t.parseUrl=function(e){var t,r=o.parse(e),i=r.hostname,a=void 0===i?"localhost":i,s=r.pathname,u=void 0===s?"/":s,c=r.port,d=r.protocol,l=void 0===d?"https:":d,f=r.search;return f&&(t=n.parseQueryString(f)),{hostname:a,port:c?parseInt(c):void 0,protocol:l,path:u,query:t}}},function(e,t,r){e.exports=r(124)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveEventStreamSerdeConfig=void 0;var n=r(0);t.resolveEventStreamSerdeConfig=function(e){return n.__assign(n.__assign({},e),{eventStreamMarshaller:e.eventStreamSerdeProvider(n.__assign({},e))})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContentLengthPlugin=t.contentLengthMiddlewareOptions=t.contentLengthMiddleware=void 0;var n=r(0),o=r(3);function i(e){var t=this;return function(r){return function(i){return n.__awaiter(t,void 0,void 0,(function(){var t,a,s,u,c;return n.__generator(this,(function(d){return t=i.request,o.HttpRequest.isInstance(t)&&(a=t.body,s=t.headers,a&&-1===Object.keys(s).map((function(e){return e.toLowerCase()})).indexOf("content-length")&&void 0!==(u=e(a))&&(t.headers=n.__assign(n.__assign({},t.headers),((c={})["content-length"]=String(u),c)))),[2,r(n.__assign(n.__assign({},i),{request:t}))]}))}))}}}t.contentLengthMiddleware=i,t.contentLengthMiddlewareOptions={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware"},t.getContentLengthPlugin=function(e){return{applyToStack:function(r){r.add(i(e.bodyLengthChecker),t.contentLengthMiddlewareOptions)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAddExpectContinuePlugin=t.addExpectContinueMiddlewareOptions=t.addExpectContinueMiddleware=void 0;var n=r(0),o=r(3);function i(e){var t=this;return function(r){return function(i){return n.__awaiter(t,void 0,void 0,(function(){var t;return n.__generator(this,(function(a){return t=i.request,o.HttpRequest.isInstance(t)&&t.body&&"node"===e.runtime&&(t.headers=n.__assign(n.__assign({},t.headers),{Expect:"100-continue"})),[2,r(n.__assign(n.__assign({},i),{request:t}))]}))}))}}}t.addExpectContinueMiddleware=i,t.addExpectContinueMiddlewareOptions={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware"},t.getAddExpectContinuePlugin=function(e){return{applyToStack:function(r){r.add(i(e),t.addExpectContinueMiddlewareOptions)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(0).__exportStar(r(150),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(0).__exportStar(r(155),t);var n=r(47);t.Ie11Sha256=n.Sha256;var o=r(51);t.WebCryptoSha256=o.Sha256},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(168),t),n.__exportStar(r(53),t),n.__exportStar(r(58),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.blobHasher=void 0;var n=r(0),o=r(177);t.blobHasher=function(e,t){return n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(n){switch(n.label){case 0:return r=new e,[4,o.blobReader(t,(function(e){r.update(e)}))];case 1:return n.sent(),[2,r.digest()]}}))}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Md5=void 0;var n=r(0),o=r(17),i=r(180),a=function(){function e(){this.state=Uint32Array.from(i.INIT),this.buffer=new DataView(new ArrayBuffer(i.BLOCK_SIZE)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(!function(e){if("string"==typeof e)return 0===e.length;return 0===e.byteLength}(e)){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=function(e){if("string"==typeof e)return o.fromUtf8(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)}(e),r=0,n=t.byteLength;for(this.bytesHashed+=n;n>0;)this.buffer.setUint8(this.bufferLength++,t[r++]),n--,this.bufferLength===i.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)}},e.prototype.digest=function(){return n.__awaiter(this,void 0,void 0,(function(){var e,t,r,o,a,s,u;return n.__generator(this,(function(n){if(!this.finished){if(t=(e=this).buffer,r=e.bufferLength,o=e.bytesHashed,a=8*o,t.setUint8(this.bufferLength++,128),r%i.BLOCK_SIZE>=i.BLOCK_SIZE-8){for(u=this.bufferLength;u<i.BLOCK_SIZE;u++)t.setUint8(u,0);this.hashBuffer(),this.bufferLength=0}for(u=this.bufferLength;u<i.BLOCK_SIZE-8;u++)t.setUint8(u,0);t.setUint32(i.BLOCK_SIZE-8,a>>>0,!0),t.setUint32(i.BLOCK_SIZE-4,Math.floor(a/4294967296),!0),this.hashBuffer(),this.finished=!0}for(s=new DataView(new ArrayBuffer(i.DIGEST_LENGTH)),u=0;u<4;u++)s.setUint32(4*u,this.state[u],!0);return[2,new Uint8Array(s.buffer,s.byteOffset,s.byteLength)]}))}))},e.prototype.hashBuffer=function(){var e=this.buffer,t=this.state,r=t[0],n=t[1],o=t[2],i=t[3];r=u(r,n,o,i,e.getUint32(0,!0),7,3614090360),i=u(i,r,n,o,e.getUint32(4,!0),12,3905402710),o=u(o,i,r,n,e.getUint32(8,!0),17,606105819),n=u(n,o,i,r,e.getUint32(12,!0),22,3250441966),r=u(r,n,o,i,e.getUint32(16,!0),7,4118548399),i=u(i,r,n,o,e.getUint32(20,!0),12,1200080426),o=u(o,i,r,n,e.getUint32(24,!0),17,2821735955),n=u(n,o,i,r,e.getUint32(28,!0),22,4249261313),r=u(r,n,o,i,e.getUint32(32,!0),7,1770035416),i=u(i,r,n,o,e.getUint32(36,!0),12,2336552879),o=u(o,i,r,n,e.getUint32(40,!0),17,4294925233),n=u(n,o,i,r,e.getUint32(44,!0),22,2304563134),r=u(r,n,o,i,e.getUint32(48,!0),7,1804603682),i=u(i,r,n,o,e.getUint32(52,!0),12,4254626195),o=u(o,i,r,n,e.getUint32(56,!0),17,2792965006),r=c(r,n=u(n,o,i,r,e.getUint32(60,!0),22,1236535329),o,i,e.getUint32(4,!0),5,4129170786),i=c(i,r,n,o,e.getUint32(24,!0),9,3225465664),o=c(o,i,r,n,e.getUint32(44,!0),14,643717713),n=c(n,o,i,r,e.getUint32(0,!0),20,3921069994),r=c(r,n,o,i,e.getUint32(20,!0),5,3593408605),i=c(i,r,n,o,e.getUint32(40,!0),9,38016083),o=c(o,i,r,n,e.getUint32(60,!0),14,3634488961),n=c(n,o,i,r,e.getUint32(16,!0),20,3889429448),r=c(r,n,o,i,e.getUint32(36,!0),5,568446438),i=c(i,r,n,o,e.getUint32(56,!0),9,3275163606),o=c(o,i,r,n,e.getUint32(12,!0),14,4107603335),n=c(n,o,i,r,e.getUint32(32,!0),20,1163531501),r=c(r,n,o,i,e.getUint32(52,!0),5,2850285829),i=c(i,r,n,o,e.getUint32(8,!0),9,4243563512),o=c(o,i,r,n,e.getUint32(28,!0),14,1735328473),r=d(r,n=c(n,o,i,r,e.getUint32(48,!0),20,2368359562),o,i,e.getUint32(20,!0),4,4294588738),i=d(i,r,n,o,e.getUint32(32,!0),11,2272392833),o=d(o,i,r,n,e.getUint32(44,!0),16,1839030562),n=d(n,o,i,r,e.getUint32(56,!0),23,4259657740),r=d(r,n,o,i,e.getUint32(4,!0),4,2763975236),i=d(i,r,n,o,e.getUint32(16,!0),11,1272893353),o=d(o,i,r,n,e.getUint32(28,!0),16,4139469664),n=d(n,o,i,r,e.getUint32(40,!0),23,3200236656),r=d(r,n,o,i,e.getUint32(52,!0),4,681279174),i=d(i,r,n,o,e.getUint32(0,!0),11,3936430074),o=d(o,i,r,n,e.getUint32(12,!0),16,3572445317),n=d(n,o,i,r,e.getUint32(24,!0),23,76029189),r=d(r,n,o,i,e.getUint32(36,!0),4,3654602809),i=d(i,r,n,o,e.getUint32(48,!0),11,3873151461),o=d(o,i,r,n,e.getUint32(60,!0),16,530742520),r=l(r,n=d(n,o,i,r,e.getUint32(8,!0),23,3299628645),o,i,e.getUint32(0,!0),6,4096336452),i=l(i,r,n,o,e.getUint32(28,!0),10,1126891415),o=l(o,i,r,n,e.getUint32(56,!0),15,2878612391),n=l(n,o,i,r,e.getUint32(20,!0),21,4237533241),r=l(r,n,o,i,e.getUint32(48,!0),6,1700485571),i=l(i,r,n,o,e.getUint32(12,!0),10,2399980690),o=l(o,i,r,n,e.getUint32(40,!0),15,4293915773),n=l(n,o,i,r,e.getUint32(4,!0),21,2240044497),r=l(r,n,o,i,e.getUint32(32,!0),6,1873313359),i=l(i,r,n,o,e.getUint32(60,!0),10,4264355552),o=l(o,i,r,n,e.getUint32(24,!0),15,2734768916),n=l(n,o,i,r,e.getUint32(52,!0),21,1309151649),r=l(r,n,o,i,e.getUint32(16,!0),6,4149444226),i=l(i,r,n,o,e.getUint32(44,!0),10,3174756917),o=l(o,i,r,n,e.getUint32(8,!0),15,718787259),n=l(n,o,i,r,e.getUint32(36,!0),21,3951481745),t[0]=r+t[0]&4294967295,t[1]=n+t[1]&4294967295,t[2]=o+t[2]&4294967295,t[3]=i+t[3]&4294967295},e}();function s(e,t,r,n,o,i){return((t=(t+e&4294967295)+(n+i&4294967295)&4294967295)<<o|t>>>32-o)+r&4294967295}function u(e,t,r,n,o,i,a){return s(t&r|~t&n,e,t,o,i,a)}function c(e,t,r,n,o,i,a){return s(t&n|r&~n,e,t,o,i,a)}function d(e,t,r,n,o,i,a){return s(t^r^n,e,t,o,i,a)}function l(e,t,r,n,o,i,a){return s(r^(t|~n),e,t,o,i,a)}t.Md5=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseUrl=void 0;var n=r(32);t.parseUrl=function(e){var t,r=new URL(e),o=r.hostname,i=r.pathname,a=r.port,s=r.protocol,u=r.search;return u&&(t=n.parseQueryString(u)),{hostname:o,port:a?parseInt(a):void 0,protocol:s,path:i,query:t}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateBodyLength=void 0,t.calculateBodyLength=function(e){return"string"==typeof e?new Blob([e]).size:"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.size?e.size:void 0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultUserAgent=void 0,t.defaultUserAgent=function(e,t){return"aws-sdk-js-v3-"+e+"/"+t+" "+("undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"")}},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeUriPath=void 0;var n=r(0),o=r(27);t.escapeUriPath=function(e){var t,r,i=[];try{for(var a=n.__values(e.split("/")),s=a.next();!s.done;s=a.next()){var u=s.value;i.push(o.escapeUri(u))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return i.join("/")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ALGORITHM_IDENTIFIER=t.HOST_HEADER=t.EXPIRES_QUERY_PARAM=t.SIGNED_HEADERS_QUERY_PARAM=t.AMZ_DATE_QUERY_PARAM=t.CREDENTIAL_QUERY_PARAM=t.ALGORITHM_QUERY_PARAM=t.SHA256_HEADER=t.UNSIGNED_PAYLOAD=void 0,t.UNSIGNED_PAYLOAD="UNSIGNED-PAYLOAD",t.SHA256_HEADER="X-Amz-Content-Sha256",t.ALGORITHM_QUERY_PARAM="X-Amz-Algorithm",t.CREDENTIAL_QUERY_PARAM="X-Amz-Credential",t.AMZ_DATE_QUERY_PARAM="X-Amz-Date",t.SIGNED_HEADERS_QUERY_PARAM="X-Amz-SignedHeaders",t.EXPIRES_QUERY_PARAM="X-Amz-Expires",t.HOST_HEADER="host",t.ALGORITHM_IDENTIFIER="AWS4-HMAC-SHA256"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBucketEndpointPlugin=t.bucketEndpointMiddlewareOptions=t.bucketEndpointMiddleware=void 0;var n=r(0),o=r(3),i=r(28);function a(e){var t=this;return function(r){return function(a){return n.__awaiter(t,void 0,void 0,(function(){var t,s,u,c,d,l;return n.__generator(this,(function(f){return t=a.input.Bucket,s=e.bucketEndpoint,u=a.request,o.HttpRequest.isInstance(u)&&(e.bucketEndpoint?u.hostname=t:(c=i.bucketHostname({bucketName:t,baseHostname:u.hostname,accelerateEndpoint:e.useAccelerateEndpoint,dualstackEndpoint:e.useDualstackEndpoint,pathStyleEndpoint:e.forcePathStyle,tlsCompatible:"https:"===u.protocol}),d=c.hostname,l=c.bucketEndpoint,u.hostname=d,s=l),s&&(u.path=u.path.replace(/^(\/)?[^\/]+/,""),""===u.path&&(u.path="/"))),[2,r(n.__assign(n.__assign({},a),{request:u}))]}))}))}}}t.bucketEndpointMiddleware=a,t.bucketEndpointMiddlewareOptions={step:"build",tags:["BUCKET_ENDPOINT"],name:"bucketEndpointMiddleware",relation:"before",toMiddleware:"hostHeaderMiddleware"},t.getBucketEndpointPlugin=function(e){return{applyToStack:function(r){r.addRelativeTo(a(e),t.bucketEndpointMiddlewareOptions)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpResponse=void 0;var n=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}();t.HttpResponse=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequest=void 0;var n=r(0),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.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,r=new e(n.__assign(n.__assign({},this),{headers:n.__assign({},this.headers)}));return r.query&&(r.query=(t=r.query,Object.keys(t).reduce((function(e,r){var o,i=t[r];return n.__assign(n.__assign({},e),((o={})[r]=Array.isArray(i)?n.__spread(i):i,o))}),{}))),r},e}();t.HttpRequest=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidHostname=void 0,t.isValidHostname=function(e){return/^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/.test(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveBucketEndpointConfig=void 0;var n=r(0);t.resolveBucketEndpointConfig=function(e){var t=e.bucketEndpoint,r=void 0!==t&&t,o=e.forcePathStyle,i=void 0!==o&&o,a=e.useAccelerateEndpoint,s=void 0!==a&&a,u=e.useDualstackEndpoint,c=void 0!==u&&u;return n.__assign(n.__assign({},e),{bucketEndpoint:r,forcePathStyle:i,useAccelerateEndpoint:s,useDualstackEndpoint:c})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSerdePlugin=t.serializerMiddlewareOption=t.deserializerMiddlewareOption=void 0;var n=r(29),o=r(30);t.deserializerMiddlewareOption={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"]},t.serializerMiddlewareOption={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"]},t.getSerdePlugin=function(e,r,i){return{applyToStack:function(a){a.add(n.deserializerMiddleware(e,i),t.deserializerMiddlewareOption),a.add(o.serializerMiddleware(e,r),t.serializerMiddlewareOption)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Client=void 0;var n=r(31),o=function(){function e(e){this.middlewareStack=new n.MiddlewareStack,this.config=e}return e.prototype.send=function(e,t,r){var n="function"!=typeof t?t:void 0,o="function"==typeof t?t:r,i=e.resolveMiddleware(this.middlewareStack,this.config,n);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}();t.Client=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MiddlewareStack=void 0;var n=r(0),o=function(){function e(){this.absoluteEntries=[],this.relativeEntries=[],this.entriesNameMap={}}return e.prototype.add=function(e,t){void 0===t&&(t={});var r=t.name,n=t.step,o=void 0===n?"initialize":n,i=t.tags,a=t.priority,s={name:r,step:o,tags:i,priority:void 0===a?"normal":a,middleware:e};if(r){if(Object.prototype.hasOwnProperty.call(this.entriesNameMap,r))throw new Error("Duplicated middleware name '"+r+"'");this.entriesNameMap[r]=s}this.absoluteEntries.push(s)},e.prototype.addRelativeTo=function(e,t){var r=t.step,n=void 0===r?"initialize":r,o=t.name,i=t.tags,a=t.relation,s=t.toMiddleware,u={middleware:e,step:n,name:o,tags:i,next:"before"===a?s:void 0,prev:"after"===a?s:void 0};if(o){if(Object.prototype.hasOwnProperty.call(this.entriesNameMap,o))throw new Error("Duplicated middleware name '"+o+"'");this.entriesNameMap[o]=u}this.relativeEntries.push(u)},e.prototype.sort=function(e){return e.sort((function(e,t){return i[t.step]-i[e.step]||a[t.priority||"normal"]-a[e.priority||"normal"]}))},e.prototype.clone=function(){var t,r,o=new e;return(t=o.absoluteEntries).push.apply(t,n.__spread(this.absoluteEntries)),(r=o.relativeEntries).push.apply(r,n.__spread(this.relativeEntries)),o.entriesNameMap=n.__assign({},this.entriesNameMap),o},e.prototype.concat=function(t){var r,o,i=new e;i.entriesNameMap=n.__assign({},this.entriesNameMap);var a=t;for(var s in a.entriesNameMap){if(i.entriesNameMap[s])throw new Error("Duplicated middleware name '"+s+"'");i.entriesNameMap[s]=a.entriesNameMap[s]}return(r=i.absoluteEntries).push.apply(r,n.__spread(this.absoluteEntries,a.absoluteEntries)),(o=i.relativeEntries).push.apply(o,n.__spread(this.relativeEntries,a.relativeEntries)),i},e.prototype.remove=function(e){return"string"==typeof e?this.removeByName(e):this.removeByReference(e)},e.prototype.removeByName=function(e){for(var t=this.absoluteEntries.length-1;t>=0;t--)if(this.absoluteEntries[t].name&&this.absoluteEntries[t].name===e)return this.absoluteEntries.splice(t,1),delete this.entriesNameMap[e],!0;for(t=this.relativeEntries.length-1;t>=0;t--)if(this.relativeEntries[t].name&&this.relativeEntries[t].name===e)return this.relativeEntries.splice(t,1),delete this.entriesNameMap[e],!0;return!1},e.prototype.removeByReference=function(e){for(var t=this.absoluteEntries.length-1;t>=0;t--){if(this.absoluteEntries[t].middleware===e)return(r=this.absoluteEntries[t].name)&&delete this.entriesNameMap[r],this.absoluteEntries.splice(t,1),!0}for(t=this.relativeEntries.length-1;t>=0;t--){var r;if(this.relativeEntries[t].middleware===e)return(r=this.relativeEntries[t].name)&&delete this.entriesNameMap[r],this.relativeEntries.splice(t,1),!0}return!1},e.prototype.removeByTag=function(e){for(var t=!1,r=this.absoluteEntries.length-1;r>=0;r--){var n=this.absoluteEntries[r],o=n.tags,i=n.name;o&&o.indexOf(e)>-1&&(this.absoluteEntries.splice(r,1),i&&delete this.entriesNameMap[i],t=!0)}for(r=this.relativeEntries.length-1;r>=0;r--){var a=this.relativeEntries[r];o=a.tags,i=a.name;o&&o.indexOf(e)>-1&&(this.relativeEntries.splice(r,1),i&&delete this.entriesNameMap[i],t=!0)}return t},e.prototype.use=function(e){e.applyToStack(this)},e.prototype.normalizeRelativeEntries=function(){for(var e,t,r=this.absoluteEntries.filter((function(e){return e.name})).reduce((function(e,t){return e[t.name]=t,e}),{}),o=this.relativeEntries.map((function(e){return n.__assign(n.__assign({},e),{priority:null,next:void 0,prev:void 0})})),i=o.filter((function(e){return e.name})).reduce((function(e,t){return e[t.name]=t,e}),{}),a={},s=0;s<this.relativeEntries.length;s++){var u=this.relativeEntries[s],c=u.prev,d=u.next,l=o[s];if(c){if(r[c]&&r[c].step===l.step)a[c]||(a[c]={}),l.next=a[c].next,a[c].next&&(a[c].next.prev=l),a[c].next=l;else if(i[c]&&i[c].step===l.step){var f=i[c];if(f.next===l)continue;l.next=f.next,f.next=l,l.next&&(l.next.prev=l),l.prev=f}}else if(d)if(r[d]&&r[d].step===l.step)a[d]||(a[d]={}),l.prev=a[d].prev,a[d].prev&&(a[d].prev.next=l),a[d].prev=l;else if(i[d]&&i[d].step===l.step){var h=i[d];if(h.prev===l)continue;l.prev=h.prev,h.prev=l,l.prev&&(l.prev.next=l),l.next=h}}var p=[],v=new WeakSet;try{for(var g=n.__values(Object.keys(a)),y=g.next();!y.done;y=g.next()){var m=a[y.value];for(c=m.prev,d=m.next;c;)v.add(c),c=c.prev;for(;d;)v.add(d),d=d.next}}catch(t){e={error:t}}finally{try{y&&!y.done&&(t=g.return)&&t.call(g)}finally{if(e)throw e.error}}for(s=0;s<o.length;s++){var b=o[s];if(!v.has(b))for(b.prev||p.push(b);b&&!v.has(b);)v.add(b),b=b.next}return[p,a]},e.prototype.getMiddlewareList=function(){var e,t,r=[],o=n.__read(this.normalizeRelativeEntries(),2),i=o[0],a=o[1],s=n.__spread(this.absoluteEntries,i);s=this.sort(s);try{for(var u=n.__values(s),c=u.next();!c.done;c=u.next()){for(var d=c.value,l={prev:void 0,next:void 0},f=d.name&&a[d.name]||l,h=f.prev,p=f.next,v=h;null==v?void 0:v.prev;)v=v.prev;for(;v;)r.push(v.middleware),v=v.next;r.push(d.middleware);for(var g=d;g.next;)r.push(g.next.middleware),g=g.next;for(v=p;v;)r.push(v.middleware),v=v.next}}catch(t){e={error:t}}finally{try{c&&!c.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}return r.reverse()},e.prototype.resolve=function(e,t){var r,o;try{for(var i=n.__values(this.getMiddlewareList()),a=i.next();!a.done;a=i.next()){e=(0,a.value)(e,t)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return e},e}();t.MiddlewareStack=o;var i={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},a={high:3,normal:2,low:1}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Command=void 0;var n=r(31),o=function(){this.middlewareStack=new n.MiddlewareStack};t.Command=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendedEncodeURIComponent=void 0,t.extendedEncodeURIComponent=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getArrayIfSingleItem=void 0,t.getArrayIfSingleItem=function(e){return Array.isArray(e)?e:[e]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getValueFromTextNode=void 0,t.getValueFromTextNode=function(e){for(var r in e)e.hasOwnProperty(r)&&void 0!==e[r]["#text"]?e[r]=e[r]["#text"]:"object"==typeof e[r]&&null!==e[r]&&(e[r]=t.getValueFromTextNode(e[r]));return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isa=void 0,t.isa=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return"object"==typeof e&&("__type"in e&&t.indexOf(e.__type)>-1||"name"in e&&t.indexOf(e.name)>-1)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LazyJsonString=t.StringWrapper=void 0;var n=r(0);t.StringWrapper=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,n.__spread([null],arguments)),r=new t;return Object.setPrototypeOf(r,e.prototype),r},t.StringWrapper.prototype=Object.create(String.prototype,{constructor:{value:t.StringWrapper,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(t.StringWrapper,String);var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__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}(t.StringWrapper);t.LazyJsonString=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateToUtcString=void 0;var n=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],o=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];t.dateToUtcString=function(e){var t=e.getUTCFullYear(),r=e.getUTCMonth(),i=e.getUTCDay(),a=e.getUTCDate(),s=e.getUTCHours(),u=e.getUTCMinutes(),c=e.getUTCSeconds();return n[i]+", "+(a<10?"0"+a:""+a)+" "+o[r]+" "+t+" "+(s<10?"0"+s:""+s)+":"+(u<10?"0"+u:""+u)+":"+(c<10?"0"+c:""+c)+" GMT"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitEvery=void 0,t.splitEvery=function(e,t,r){if(r<=0||!Number.isInteger(r))throw new Error("Invalid number of delimiters ("+r+") for splitEvery.");var n=e.split(t);if(1===r)return n;for(var o=[],i="",a=0;a<n.length;a++)""===i?i=n[a]:i+=t+n[a],(a+1)%r==0&&(o.push(i),i="");return""!==i&&o.push(i),o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SENSITIVE_STRING=void 0,t.SENSITIVE_STRING="***SensitiveInformation***"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XmlNode=void 0;var n=r(0),o=r(104),i=function(){function e(e,t){void 0===t&&(t=[]),this.name=e,this.children=t,this.attributes={}}return e.prototype.withName=function(e){return this.name=e,this},e.prototype.addAttribute=function(e,t){return this.attributes[e]=t,this},e.prototype.addChildNode=function(e){return this.children.push(e),this},e.prototype.removeAttribute=function(e){return delete this.attributes[e],this},e.prototype.toString=function(){var e,t,r=Boolean(this.children.length),i="<"+this.name,a=this.attributes;try{for(var s=n.__values(Object.keys(a)),u=s.next();!u.done;u=s.next()){var c=u.value,d=a[c];null!=d&&(i+=" "+c+'="'+o.escapeAttribute(""+d)+'"')}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return i+(r?">"+this.children.map((function(e){return e.toString()})).join("")+"</"+this.name+">":"/>")},e}();t.XmlNode=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeAttribute=void 0,t.escapeAttribute=function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XmlText=void 0;var n=r(106),o=function(){function e(e){this.value=e}return e.prototype.toString=function(){return n.escapeElement(""+this.value)},e}();t.XmlText=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeElement=void 0,t.escapeElement=function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}},function(e,t,r){"use strict";const n=r(8),o=function(e,t){const r={};if(!(e.child&&!n.isEmptyObject(e.child)||e.attrsMap&&!n.isEmptyObject(e.attrsMap)))return n.isExist(e.val)?e.val:"";n.isExist(e.val)&&("string"!=typeof e.val||""!==e.val&&e.val!==t.cdataPositionChar)&&("strict"===t.arrayMode?r[t.textNodeName]=[e.val]:r[t.textNodeName]=e.val),n.merge(r,e.attrsMap,t.arrayMode);const i=Object.keys(e.child);for(let n=0;n<i.length;n++){var a=i[n];if(e.child[a]&&e.child[a].length>1)for(var s in r[a]=[],e.child[a])r[a].push(o(e.child[a][s],t));else if(!0===t.arrayMode){const n=o(e.child[a][0],t);r[a]="object"==typeof n?[n]:n}else"strict"===t.arrayMode?r[a]=[o(e.child[a][0],t)]:r[a]=o(e.child[a][0],t)}return r};t.convertToJson=o},function(e,t,r){"use strict";e.exports=function(e,t,r){this.tagname=e,this.parent=t,this.child={},this.attrsMap={},this.val=r,this.addChild=function(e){Array.isArray(this.child[e.tagname])?this.child[e.tagname].push(e):this.child[e.tagname]=[e]}}},function(e,t,r){"use strict";const n=r(8),o={allowBooleanAttributes:!1},i=["allowBooleanAttributes"];function a(e,t){for(var r=t;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{var n=e.substr(r,t-r);if(t>5&&"xml"===n)return f("InvalidXml","XML declaration allowed only at the start of the document.",p(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function s(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=n.buildOptions(t,o,i);const r=[];let c=!1,h=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let o=0;o<e.length;o++){if("<"!==e[o]){if(" "===e[o]||"\t"===e[o]||"\n"===e[o]||"\r"===e[o])continue;return f("InvalidChar","char '"+e[o]+"' is not expected.",p(e,o))}if(o++,"?"===e[o]){if(o=a(e,++o),o.err)return o}else{if("!"===e[o]){o=s(e,o);continue}{let i=!1;"/"===e[o]&&(i=!0,o++);let a="";for(;o<e.length&&">"!==e[o]&&" "!==e[o]&&"\t"!==e[o]&&"\n"!==e[o]&&"\r"!==e[o];o++)a+=e[o];if(a=a.trim(),"/"===a[a.length-1]&&(a=a.substring(0,a.length-1),o--),v=a,!n.isName(v)){let t;return t=0===a.trim().length?"There is an unnecessary space between tag name and backward slash '</ ..'.":"Tag '"+a+"' is an invalid name.",f("InvalidTag",t,p(e,o))}const g=u(e,o);if(!1===g)return f("InvalidAttr","Attributes for '"+a+"' have open quote.",p(e,o));let y=g.value;if(o=g.index,"/"===y[y.length-1]){y=y.substring(0,y.length-1);const r=d(y,t);if(!0!==r)return f(r.err.code,r.err.msg,p(e,o-y.length+r.err.line));c=!0}else if(i){if(!g.tagClosed)return f("InvalidTag","Closing tag '"+a+"' doesn't have proper closing.",p(e,o));if(y.trim().length>0)return f("InvalidTag","Closing tag '"+a+"' can't have attributes or invalid starting.",p(e,o));{const t=r.pop();if(a!==t)return f("InvalidTag","Closing tag '"+t+"' is expected inplace of '"+a+"'.",p(e,o));0==r.length&&(h=!0)}}else{const n=d(y,t);if(!0!==n)return f(n.err.code,n.err.msg,p(e,o-y.length+n.err.line));if(!0===h)return f("InvalidXml","Multiple possible root nodes found.",p(e,o));r.push(a),c=!0}for(o++;o<e.length;o++){if("<"===e[o]){if("!"===e[o+1]){o++,o=s(e,o);continue}break}if("&"===e[o]){const t=l(e,o);if(-1==t)return f("InvalidChar","char '&' is not expected.",p(e,o));o=t}}"<"===e[o]&&o--}}}var v;return c?!(r.length>0)||f("InvalidXml","Invalid '"+JSON.stringify(r,null,4).replace(/\r?\n/g,"")+"' found.",1):f("InvalidXml","Start tag expected.",1)};function u(e,t){let r="",n="",o=!1;for(;t<e.length;t++){if('"'===e[t]||"'"===e[t])if(""===n)n=e[t];else{if(n!==e[t])continue;n=""}else if(">"===e[t]&&""===n){o=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:o}}const c=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function d(e,t){const r=n.getAllMatches(e,c),o={};for(let n=0;n<r.length;n++){if(0===r[n][1].length)return f("InvalidAttr","Attribute '"+r[n][2]+"' has no space in starting.",v(e,r[n][0]));if(void 0===r[n][3]&&!t.allowBooleanAttributes)return f("InvalidAttr","boolean attribute '"+r[n][2]+"' is not allowed.",v(e,r[n][0]));const i=r[n][2];if(!h(i))return f("InvalidAttr","Attribute '"+i+"' is an invalid name.",v(e,r[n][0]));if(o.hasOwnProperty(i))return f("InvalidAttr","Attribute '"+i+"' is repeated.",v(e,r[n][0]));o[i]=1}return!0}function l(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function f(e,t,r){return{err:{code:e,msg:t,line:r}}}function h(e){return n.isName(e)}function p(e,t){return e.substring(0,t).split(/\r?\n/).length}function v(e,t){return e.indexOf(t)+t.length}},function(e,t,r){"use strict";const n=function(e){return String.fromCharCode(e)},o={nilChar:n(176),missingChar:n(201),nilPremitive:n(175),missingPremitive:n(200),emptyChar:n(178),emptyValue:n(177),boundryChar:n(179),objStart:n(198),arrStart:n(204),arrayEnd:n(185)},i=[o.nilChar,o.nilPremitive,o.missingChar,o.missingPremitive,o.boundryChar,o.emptyChar,o.emptyValue,o.arrayEnd,o.objStart,o.arrStart],a=function(e,t,r){if("string"==typeof t)return e&&e[0]&&void 0!==e[0].val?s(e[0].val,t):s(e,t);{const i=void 0===(n=e)?o.missingChar:null===n?o.nilChar:!(n.child&&0===Object.keys(n.child).length&&(!n.attrsMap||0===Object.keys(n.attrsMap).length))||o.emptyChar;if(!0===i){let n="";if(Array.isArray(t)){n+=o.arrStart;const i=t[0],c=e.length;if("string"==typeof i)for(let t=0;t<c;t++){const r=s(e[t].val,i);n=u(n,r)}else for(let t=0;t<c;t++){const o=a(e[t],i,r);n=u(n,o)}n+=o.arrayEnd}else{n+=o.objStart;const i=Object.keys(t);Array.isArray(e)&&(e=e[0]);for(let o in i){const s=i[o];let c;c=!r.ignoreAttributes&&e.attrsMap&&e.attrsMap[s]?a(e.attrsMap[s],t[s],r):s===r.textNodeName?a(e.val,t[s],r):a(e.child[s],t[s],r),n=u(n,c)}}return n}return i}var n},s=function(e){switch(e){case void 0:return o.missingPremitive;case null:return o.nilPremitive;case"":return o.emptyValue;default:return e}},u=function(e,t){return c(t[0])||c(e[e.length-1])||(e+=o.boundryChar),e+t},c=function(e){return-1!==i.indexOf(e)};const d=r(13),l=r(8).buildOptions;t.convert2nimn=function(e,t,r){return r=l(r,d.defaultOptions,d.props),a(e,t,r)}},function(e,t,r){"use strict";const n=r(8),o=r(8).buildOptions,i=r(13),a=function(e,t,r){let o="{";const i=Object.keys(e.child);for(let r=0;r<i.length;r++){var s=i[r];if(e.child[s]&&e.child[s].length>1){for(var u in o+='"'+s+'" : [ ',e.child[s])o+=a(e.child[s][u],t)+" , ";o=o.substr(0,o.length-1)+" ] "}else o+='"'+s+'" : '+a(e.child[s][0],t)+" ,"}return n.merge(o,e.attrsMap),n.isEmptyObject(o)?n.isExist(e.val)?e.val:"":(n.isExist(e.val)&&("string"!=typeof e.val||""!==e.val&&e.val!==t.cdataPositionChar)&&(o+='"'+t.textNodeName+'" : '+(!0!==(c=e.val)&&!1!==c&&isNaN(c)?'"'+c+'"':c)),","===o[o.length-1]&&(o=o.substr(0,o.length-2)),o+"}");var c};t.convertToJsonString=function(e,t){return(t=o(t,i.defaultOptions,i.props)).indentBy=t.indentBy||"",a(e,t,0)}},function(e,t,r){"use strict";const n=r(8).buildOptions,o={attributeNamePrefix:"@_",attrNodeName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataTagName:!1,cdataPositionChar:"\\c",format:!1,indentBy:"  ",supressEmptyNode:!1,tagValueProcessor:function(e){return e},attrValueProcessor:function(e){return e}},i=["attributeNamePrefix","attrNodeName","textNodeName","ignoreAttributes","cdataTagName","cdataPositionChar","format","indentBy","supressEmptyNode","tagValueProcessor","attrValueProcessor"];function a(e){this.options=n(e,o,i),this.options.ignoreAttributes||this.options.attrNodeName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=p),this.options.cdataTagName?this.isCDATA=v:this.isCDATA=function(){return!1},this.replaceCDATAstr=s,this.replaceCDATAarr=u,this.options.format?(this.indentate=h,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""),this.options.supressEmptyNode?(this.buildTextNode=f,this.buildObjNode=d):(this.buildTextNode=l,this.buildObjNode=c),this.buildTextValNode=l,this.buildObjectNode=c}function s(e,t){return e=this.options.tagValueProcessor(""+e),""===this.options.cdataPositionChar||""===e?e+"<![CDATA["+t+"]]"+this.tagEndChar:e.replace(this.options.cdataPositionChar,"<![CDATA["+t+"]]"+this.tagEndChar)}function u(e,t){if(e=this.options.tagValueProcessor(""+e),""===this.options.cdataPositionChar||""===e)return e+"<![CDATA["+t.join("]]><![CDATA[")+"]]"+this.tagEndChar;for(let r in t)e=e.replace(this.options.cdataPositionChar,"<![CDATA["+t[r]+"]]>");return e+this.newLine}function c(e,t,r,n){return r&&!e.includes("<")?this.indentate(n)+"<"+t+r+">"+e+"</"+t+this.tagEndChar:this.indentate(n)+"<"+t+r+this.tagEndChar+e+this.indentate(n)+"</"+t+this.tagEndChar}function d(e,t,r,n){return""!==e?this.buildObjectNode(e,t,r,n):this.indentate(n)+"<"+t+r+"/"+this.tagEndChar}function l(e,t,r,n){return this.indentate(n)+"<"+t+r+">"+this.options.tagValueProcessor(e)+"</"+t+this.tagEndChar}function f(e,t,r,n){return""!==e?this.buildTextValNode(e,t,r,n):this.indentate(n)+"<"+t+r+"/"+this.tagEndChar}function h(e){return this.options.indentBy.repeat(e)}function p(e){return!!e.startsWith(this.options.attributeNamePrefix)&&e.substr(this.attrPrefixLen)}function v(e){return e===this.options.cdataTagName}a.prototype.parse=function(e){return this.j2x(e,0).val},a.prototype.j2x=function(e,t){let r="",n="";const o=Object.keys(e),i=o.length;for(let a=0;a<i;a++){const i=o[a];if(void 0===e[i]);else if(null===e[i])n+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(e[i]instanceof Date)n+=this.buildTextNode(e[i],i,"",t);else if("object"!=typeof e[i]){const o=this.isAttribute(i);o?r+=" "+o+'="'+this.options.attrValueProcessor(""+e[i])+'"':this.isCDATA(i)?e[this.options.textNodeName]?n+=this.replaceCDATAstr(e[this.options.textNodeName],e[i]):n+=this.replaceCDATAstr("",e[i]):i===this.options.textNodeName?e[this.options.cdataTagName]||(n+=this.options.tagValueProcessor(""+e[i])):n+=this.buildTextNode(e[i],i,"",t)}else if(Array.isArray(e[i]))if(this.isCDATA(i))n+=this.indentate(t),e[this.options.textNodeName]?n+=this.replaceCDATAarr(e[this.options.textNodeName],e[i]):n+=this.replaceCDATAarr("",e[i]);else{const r=e[i].length;for(let o=0;o<r;o++){const r=e[i][o];if(void 0===r);else if(null===r)n+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if("object"==typeof r){const e=this.j2x(r,t+1);n+=this.buildObjNode(e.val,i,e.attrStr,t)}else n+=this.buildTextNode(r,i,"",t)}}else if(this.options.attrNodeName&&i===this.options.attrNodeName){const t=Object.keys(e[i]),n=t.length;for(let o=0;o<n;o++)r+=" "+t[o]+'="'+this.options.attrValueProcessor(""+e[i][t[o]])+'"'}else{const r=this.j2x(e[i],t+1);n+=this.buildObjNode(r.val,i,r.attrStr,t)}}return{attrStr:r,val:n}},e.exports=a},function(e,t,r){"use strict";var n=r(114),o=r(117);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=b(e));return e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),d=["'"].concat(c),l=["%","/","?",";","#"].concat(d),f=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(118);function b(e,t,r){if(e&&o.isObject(e)&&e instanceof i)return e;var n=new i;return n.parse(e,t,r),n}i.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),s=-1!==i&&i<e.indexOf("#")?"?":"#",c=e.split(s);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(s);if(b=b.trim(),!r&&1===e.split("#").length){var _=u.exec(b);if(_)return this.path=b,this.href=b,this.pathname=_[1],_[2]?(this.search=_[2],this.query=t?m.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=a.exec(b);if(w){var S=(w=w[0]).toLowerCase();this.protocol=S,b=b.substr(w.length)}if(r||w||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var O="//"===b.substr(0,2);!O||w&&g[w]||(b=b.substr(2),this.slashes=!0)}if(!g[w]&&(O||w&&!y[w])){for(var E,x,C=-1,j=0;j<f.length;j++){-1!==(P=b.indexOf(f[j]))&&(-1===C||P<C)&&(C=P)}-1!==(x=-1===C?b.lastIndexOf("@"):b.lastIndexOf("@",C))&&(E=b.slice(0,x),b=b.slice(x+1),this.auth=decodeURIComponent(E)),C=-1;for(j=0;j<l.length;j++){var P;-1!==(P=b.indexOf(l[j]))&&(-1===C||P<C)&&(C=P)}-1===C&&(C=b.length),this.host=b.slice(0,C),b=b.slice(C),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var M=this.hostname.split(/\./),T=(j=0,M.length);j<T;j++){var k=M[j];if(k&&!k.match(h)){for(var U="",R=0,N=k.length;R<N;R++)k.charCodeAt(R)>127?U+="x":U+=k[R];if(!U.match(h)){var I=M.slice(0,j),z=M.slice(j+1),L=k.match(p);L&&(I.push(L[1]),z.unshift(L[2])),z.length&&(b="/"+z.join(".")+b),this.hostname=I.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=n.toASCII(this.hostname));var D=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+D,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!v[S])for(j=0,T=d.length;j<T;j++){var H=d[j];if(-1!==b.indexOf(H)){var q=encodeURIComponent(H);q===H&&(q=escape(H)),b=b.split(H).join(q)}}var K=b.indexOf("#");-1!==K&&(this.hash=b.substr(K),b=b.slice(0,K));var F=b.indexOf("?");if(-1!==F?(this.search=b.substr(F),this.query=b.substr(F+1),t&&(this.query=m.parse(this.query)),b=b.slice(0,F)):t&&(this.search="",this.query={}),b&&(this.pathname=b),y[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var V=this.search||"";this.path=D+V}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,a="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(a=m.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+n},i.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(o.isString(e)){var t=new i;t.parse(e,!1,!0),e=t}for(var r=new i,n=Object.keys(this),a=0;a<n.length;a++){var s=n[a];r[s]=this[s]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var d=u[c];"protocol"!==d&&(r[d]=e[d])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!y[e.protocol]){for(var l=Object.keys(e),f=0;f<l.length;f++){var h=l[f];r[h]=e[h]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var v=r.pathname||"",m=r.search||"";r.path=v+m}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),_=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=_||b||r.host&&e.pathname,S=w,O=r.pathname&&r.pathname.split("/")||[],E=(p=e.pathname&&e.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(E&&(r.hostname="",r.port=null,r.host&&(""===O[0]?O[0]=r.host:O.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),w=w&&(""===p[0]||""===O[0])),_)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,O=p;else if(p.length)O||(O=[]),O.pop(),O=O.concat(p),r.search=e.search,r.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(E)r.hostname=r.host=O.shift(),(A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=A.shift(),r.host=r.hostname=A.shift());return r.search=e.search,r.query=e.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!O.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var x=O.slice(-1)[0],C=(r.host||e.host||O.length>1)&&("."===x||".."===x)||""===x,j=0,P=O.length;P>=0;P--)"."===(x=O[P])?O.splice(P,1):".."===x?(O.splice(P,1),j++):j&&(O.splice(P,1),j--);if(!w&&!S)for(;j--;j)O.unshift("..");!w||""===O[0]||O[0]&&"/"===O[0].charAt(0)||O.unshift(""),C&&"/"!==O.join("/").substr(-1)&&O.push("");var A,M=""===O[0]||O[0]&&"/"===O[0].charAt(0);E&&(r.hostname=r.host=M?"":O.length?O.shift():"",(A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=A.shift(),r.host=r.hostname=A.shift()));return(w=w||r.host&&O.length)&&!M&&O.unshift(""),O.length?r.pathname=O.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){(function(e,n){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof n&&n;a.global!==a&&a.window!==a&&a.self;var s,u=2147483647,c=/^xn--/,d=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,p=String.fromCharCode;function v(e){throw new RangeError(f[e])}function g(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function y(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+g((e=e.replace(l,".")).split("."),t).join(".")}function m(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function b(e){return g(e,(function(e){var t="";return e>65535&&(t+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=p(e)})).join("")}function _(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function w(e,t,r){var n=0;for(e=r?h(e/700):e>>1,e+=h(e/t);e>455;n+=36)e=h(e/35);return h(n+36*e/(e+38))}function S(e){var t,r,n,o,i,a,s,c,d,l,f,p=[],g=e.length,y=0,m=128,_=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&v("not-basic"),p.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<g;){for(i=y,a=1,s=36;o>=g&&v("invalid-input"),((c=(f=e.charCodeAt(o++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||c>h((u-y)/a))&&v("overflow"),y+=c*a,!(c<(d=s<=_?1:s>=_+26?26:s-_));s+=36)a>h(u/(l=36-d))&&v("overflow"),a*=l;_=w(y-i,t=p.length+1,0==i),h(y/t)>u-m&&v("overflow"),m+=h(y/t),y%=t,p.splice(y++,0,m)}return b(p)}function O(e){var t,r,n,o,i,a,s,c,d,l,f,g,y,b,S,O=[];for(g=(e=m(e)).length,t=128,r=0,i=72,a=0;a<g;++a)(f=e[a])<128&&O.push(p(f));for(n=o=O.length,o&&O.push("-");n<g;){for(s=u,a=0;a<g;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>h((u-r)/(y=n+1))&&v("overflow"),r+=(s-t)*y,t=s,a=0;a<g;++a)if((f=e[a])<t&&++r>u&&v("overflow"),f==t){for(c=r,d=36;!(c<(l=d<=i?1:d>=i+26?26:d-i));d+=36)S=c-l,b=36-l,O.push(p(_(l+S%b,0))),c=h(S/b);O.push(p(_(c,0))),i=w(r,y,n==o),r=0,++n}++r,++t}return O.join("")}s={version:"1.4.1",ucs2:{decode:m,encode:b},decode:S,encode:O,toASCII:function(e){return y(e,(function(e){return d.test(e)?"xn--"+O(e):e}))},toUnicode:function(e){return y(e,(function(e){return c.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(o=function(){return s}.call(t,r,t,e))||(e.exports=o)}()}).call(this,r(115)(e),r(116))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,r){"use strict";t.decode=t.parse=r(119),t.encode=t.stringify=r(120)},function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var d=0;d<c;++d){var l,f,h,p,v=e[d].replace(s,"%20"),g=v.indexOf(r);g>=0?(l=v.substr(0,g),f=v.substr(g+1)):(l=v,f=""),h=decodeURIComponent(l),p=decodeURIComponent(f),n(a,h)?o(a[h])?a[h].push(p):a[h]=[a[h],p]:a[h]=p}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?i(a(e),(function(a){var s=encodeURIComponent(n(a))+r;return o(e[a])?i(e[a],(function(e){return s+encodeURIComponent(n(e))})).join(t):s+encodeURIComponent(n(e[a]))})).join(t):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var a=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchHttpHandler=void 0;var n=r(0),o=r(3),i=r(14),a=r(122),s=function(){function e(e){void 0===e&&(e={}),this.httpOptions=e}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var r=null==t?void 0:t.abortSignal,s=this.httpOptions.requestTimeout;if(null==r?void 0:r.aborted){var u=new Error("Request aborted");return u.name="AbortError",Promise.reject(u)}var c=e.path;if(e.query){var d=i.buildQueryString(e.query);d&&(c+="?"+d)}var l=e.port,f=e.protocol+"//"+e.hostname+(l?":"+l:"")+c,h={body:e.body,headers:new Headers(e.headers),method:e.method};"undefined"!=typeof AbortController&&(h.signal=r);var p=new Request(f,h),v=[fetch(p).then((function(e){var t,r,i=e.headers,a={};try{for(var s=n.__values(i.entries()),u=s.next();!u.done;u=s.next()){var c=u.value;a[c[0]]=c[1]}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new o.HttpResponse({headers:a,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new o.HttpResponse({headers:a,statusCode:e.status,body:t})}}))})),a.requestTimeout(s)];return r&&v.push(new Promise((function(e,t){r.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),Promise.race(v)},e}();t.FetchHttpHandler=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requestTimeout=void 0,t.requestTimeout=function(e){return void 0===e&&(e=0),new Promise((function(t,r){e&&setTimeout((function(){var t=new Error("Request did not complete within "+e+" ms");t.name="TimeoutError",r(t)}),e)}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.streamCollector=void 0;var n=r(0),o=r(16);function i(e){return new Promise((function(t,r){var n=new FileReader;n.onloadend=function(){var e;if(2!==n.readyState)return r(new Error("Reader aborted too early"));var o=null!==(e=n.result)&&void 0!==e?e:"",i=o.indexOf(","),a=i>-1?i+1:o.length;t(o.substring(a))},n.onabort=function(){return r(new Error("Read aborted"))},n.onerror=function(){return r(n.error)},n.readAsDataURL(e)}))}t.streamCollector=function(e){return e instanceof Blob?function(e){return n.__awaiter(this,void 0,void 0,(function(){var t,r;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,i(e)];case 1:return t=n.sent(),r=o.fromBase64(t),[2,new Uint8Array(r)]}}))}))}(e):function(e){return n.__awaiter(this,void 0,void 0,(function(){var t,r,o,i,a,s,u;return n.__generator(this,(function(n){switch(n.label){case 0:t=new Uint8Array(0),r=e.getReader(),o=!1,n.label=1;case 1:return o?[3,3]:[4,r.read()];case 2:return i=n.sent(),a=i.done,(s=i.value)&&(u=t,(t=new Uint8Array(u.length+s.length)).set(u),t.set(s,u.length)),o=a,[3,1];case 3:return[2,t]}}))}))}(e)}},function(e,t,r){"use strict";var n=r(7),o=r(33),i=r(126),a=r(39);function s(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var u=s(r(36));u.Axios=i,u.create=function(e){return s(a(u.defaults,e))},u.Cancel=r(40),u.CancelToken=r(139),u.isCancel=r(35),u.all=function(e){return Promise.all(e)},u.spread=r(140),e.exports=u,e.exports.default=u},function(e,t){
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,r){"use strict";var n=r(7),o=r(34),i=r(127),a=r(128),s=r(39);function u(e){this.defaults=e,this.interceptors={request:new i,response:new i}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method=e.method?e.method.toLowerCase():"get";var t=[a,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},u.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,r){return this.request(n.merge(r||{},{method:e,url:t}))}})),n.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,r,o){return this.request(n.merge(o||{},{method:e,url:t,data:r}))}})),e.exports=u},function(e,t,r){"use strict";var n=r(7);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,r){"use strict";var n=r(7),o=r(129),i=r(35),a=r(36),s=r(137),u=r(138);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return c(e),e.baseURL&&!s(e.url)&&(e.url=u(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return c(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){"use strict";var n=r(7);e.exports=function(e,t,r){return n.forEach(r,(function(r){e=r(e,t)})),e}},function(e,t){var r,n,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(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,c=[],d=!1,l=-1;function f(){d&&u&&(d=!1,u.length?c=u.concat(c):l=-1,c.length&&h())}function h(){if(!d){var e=s(f);d=!0;for(var t=c.length;t;){for(u=c,c=[];++l<t;)u&&u[l].run();l=-1,t=c.length}u=null,d=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(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 r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new p(e,t)),1!==c.length||d||s(h)},p.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,r){"use strict";var n=r(7);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},function(e,t,r){"use strict";var n=r(38);e.exports=function(e,t,r){var o=r.config.validateStatus;!o||o(r.status)?e(r):t(n("Request failed with status code "+r.status,r.config,null,r.request,r))}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,r){"use strict";var n=r(7),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,a={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},function(e,t,r){"use strict";var n=r(7);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(7);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(40);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveEndpointsConfig=t.normalizeEndpoint=void 0;var n=r(0);function o(e,t){if("string"==typeof e){var r=Promise.resolve(t(e));return function(){return r}}if("object"==typeof e){var n=Promise.resolve(e);return function(){return n}}return e}t.normalizeEndpoint=o,t.resolveEndpointsConfig=function(e){var t=this,r=void 0===e.tls||e.tls,i=e.endpoint?o(e.endpoint,e.urlParser):function(){return e.region().then((function(o){return n.__awaiter(t,void 0,void 0,(function(){var t;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,e.regionInfoProvider(o)];case 1:if(!(t=(n.sent()||{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((r?"https:":"http:")+"//"+t)]}}))}))}))};return n.__assign(n.__assign({},e),{endpoint:i,tls:r})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveRegionConfig=void 0;var n=r(0);function o(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}t.resolveRegionConfig=function(e){var t=e.region||e.regionDefaultProvider(e);return n.__assign(n.__assign({},e),{region:o(t)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRetryPlugin=t.retryMiddlewareOptions=t.retryMiddleware=void 0;var n=r(0);t.retryMiddleware=function(e){return function(t){return function(r){return n.__awaiter(void 0,void 0,void 0,(function(){return n.__generator(this,(function(n){return[2,e.retryStrategy.retry(t,r)]}))}))}}},t.retryMiddlewareOptions={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high"},t.getRetryPlugin=function(e){return{applyToStack:function(r){r.add(t.retryMiddleware(e),t.retryMiddlewareOptions)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TRANSIENT_ERROR_STATUS_CODES=t.TRANSIENT_ERROR_CODES=t.THROTTLING_ERROR_CODES=t.CLOCK_SKEW_ERROR_CODES=void 0,t.CLOCK_SKEW_ERROR_CODES=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],t.THROTTLING_ERROR_CODES=["Throttling","ThrottlingException","ThrottledException","RequestThrottledException","TooManyRequestsException","ProvisionedThroughputExceededException","TransactionInProgressException","RequestLimitExceeded","BandwidthLimitExceeded","LimitExceededException","RequestThrottled","SlowDown","PriorRequestNotComplete","EC2ThrottledException"],t.TRANSIENT_ERROR_CODES=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],t.TRANSIENT_ERROR_STATUS_CODES=[500,502,503,504]},function(e,t,r){var n=r(146),o=r(147),i=o;i.v1=n,i.v4=o,e.exports=i},function(e,t,r){var n,o,i=r(43),a=r(44),s=0,u=0;e.exports=function(e,t,r){var c=t&&r||0,d=t||[],l=(e=e||{}).node||n,f=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==f){var h=i();null==l&&(l=n=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==f&&(f=o=16383&(h[6]<<8|h[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,g=p-s+(v-u)/1e4;if(g<0&&void 0===e.clockseq&&(f=f+1&16383),(g<0||p>s)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,u=v,o=f;var y=(1e4*(268435455&(p+=122192928e5))+v)%4294967296;d[c++]=y>>>24&255,d[c++]=y>>>16&255,d[c++]=y>>>8&255,d[c++]=255&y;var m=p/4294967296*1e4&268435455;d[c++]=m>>>8&255,d[c++]=255&m,d[c++]=m>>>24&15|16,d[c++]=m>>>16&255,d[c++]=f>>>8|128,d[c++]=255&f;for(var b=0;b<6;++b)d[c+b]=l[b];return t||a(d)}},function(e,t,r){var n=r(43),o=r(44);e.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultRetryQuota=void 0;var n=r(18);t.getDefaultRetryQuota=function(e){var t=e,r=e,o=function(e){return"TimeoutError"===e.name?n.TIMEOUT_RETRY_COST:n.RETRY_COST},i=function(e){return o(e)<=r};return Object.freeze({hasRetryTokens:i,retrieveRetryTokens:function(e){if(!i(e))throw new Error("No retry token available");var t=o(e);return r-=t,t},releaseRetryTokens:function(e){r+=null!=e?e:n.NO_RETRY_INCREMENT,r=Math.min(r,t)}})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveRetryConfig=void 0;var n=r(0),o=r(41);t.resolveRetryConfig=function(e){var t,r=null!==(t=i(e.maxAttempts))&&void 0!==t?t:e.maxAttemptsDefaultProvider(e);return n.__assign(n.__assign({},e),{maxAttempts:r,retryStrategy:e.retryStrategy||new o.StandardRetryStrategy(r)})};var i=function(e){if(e){var t=Promise.resolve(e.toString());return function(){return t}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getValidateBucketNamePlugin=t.validateBucketNameMiddlewareOptions=t.validateBucketNameMiddleware=void 0;var n=r(0);function o(){var e=this;return function(t){return function(r){return n.__awaiter(e,void 0,void 0,(function(){var e,o;return n.__generator(this,(function(i){if("string"==typeof(e=r.input).Bucket&&e.Bucket.indexOf("/")>=0)throw(o=new Error("Bucket name shouldn't contain '/', received '"+e.Bucket+"'")).name="InvalidBucketName",o;return[2,t(n.__assign({},r))]}))}))}}}t.validateBucketNameMiddleware=o,t.validateBucketNameMiddlewareOptions={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware"},t.getValidateBucketNamePlugin=function(e){return{applyToStack:function(e){e.add(o(),t.validateBucketNameMiddlewareOptions)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAwsAuthConfig=void 0;var n=r(0),o=r(59);function i(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}t.resolveAwsAuthConfig=function(e){var t,r=this,a=i(e.credentials||e.credentialDefaultProvider(e)),s=e.signingEscapePath,u=void 0===s||s,c=e.systemClockOffset,d=void 0===c?e.systemClockOffset||0:c,l=e.sha256;return t=e.signer?i(e.signer):function(){return i(e.region)().then((function(t){return n.__awaiter(r,void 0,void 0,(function(){return n.__generator(this,(function(r){switch(r.label){case 0:return[4,e.regionInfoProvider(t)];case 1:return[2,[r.sent()||{},t]]}}))}))})).then((function(t){var r=n.__read(t,2),i=r[0],s=r[1],c=i.signingRegion,d=void 0===c?e.signingRegion:c,f=i.signingService,h=void 0===f?e.signingName:f;return e.signingRegion=e.signingRegion||d||s,e.signingName=e.signingName||h,new o.SignatureV4({credentials:a,region:e.signingRegion,service:e.signingName,sha256:l,uriEscapePath:u})}))},n.__assign(n.__assign({},e),{systemClockOffset:d,signingEscapePath:u,credentials:a,signer:t})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAwsAuthPlugin=t.awsAuthMiddlewareOptions=t.awsAuthMiddleware=void 0;var n=r(0),o=r(3),i=function(e){return new Date(Date.now()+e)};function a(e){return function(t){return function(r){return n.__awaiter(this,void 0,void 0,(function(){var a,s,u,c,d,l,f,h,p;return n.__generator(this,(function(v){switch(v.label){case 0:return o.HttpRequest.isInstance(r.request)?"function"!=typeof e.signer?[3,2]:[4,e.signer()]:[2,t(r)];case 1:return s=v.sent(),[3,3];case 2:s=e.signer,v.label=3;case 3:return a=s,c=t,d=[n.__assign({},r)],l={},[4,a.sign(r.request,{signingDate:new Date(Date.now()+e.systemClockOffset)})];case 4:return[4,c.apply(void 0,[n.__assign.apply(void 0,d.concat([(l.request=v.sent(),l)]))])];case 5:return u=v.sent(),f=u.response.headers,(h=f&&(f.date||f.Date))&&(p=Date.parse(h),g=p,y=e.systemClockOffset,Math.abs(i(y).getTime()-g)>=3e5&&(e.systemClockOffset=p-Date.now())),[2,u]}var g,y}))}))}}}t.awsAuthMiddleware=a,t.awsAuthMiddlewareOptions={name:"awsAuthMiddleware",step:"finalizeRequest",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware"},t.getAwsAuthPlugin=function(e){return{applyToStack:function(r){r.addRelativeTo(a(e),t.awsAuthMiddlewareOptions)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveUserAgentConfig=void 0,t.resolveUserAgentConfig=function(e){return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUserAgentPlugin=t.getUserAgentMiddlewareOptions=t.userAgentMiddleware=void 0;var n=r(0),o=r(3);function i(e){return function(t){return function(r){var i=r.request;if(!o.HttpRequest.isInstance(i))return t(r);var a=i.headers,s="node"===e.runtime?"user-agent":"x-amz-user-agent";return a[s]?a[s]+=" "+e.defaultUserAgent:a[s]=""+e.defaultUserAgent,e.customUserAgent&&(a[s]+=" "+e.customUserAgent),t(n.__assign(n.__assign({},r),{request:i}))}}}t.userAgentMiddleware=i,t.getUserAgentMiddlewareOptions={name:"getUserAgentMiddleware",step:"build",tags:["SET_USER_AGENT","USER_AGENT"]},t.getUserAgentPlugin=function(e){return{applyToStack:function(r){r.add(i(e),t.getUserAgentMiddlewareOptions)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(47),o=r(51),i=r(158),a=r(164),s=r(166),u=r(19),c=function(){function e(e){a.supportsWebCrypto(u.locateWindow())?this.hash=new o.Sha256(e):s.isMsWindow(u.locateWindow())?this.hash=new n.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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8=t.fromUtf8=void 0,t.fromUtf8=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var o=e.charCodeAt(r);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(r+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(r+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++r));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)},t.toUtf8=function(e){for(var t="",r=0,n=e.length;r<n;r++){var o=e[r];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++r];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++r],e[++r],e[++r]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++r])<<6|63&e[++r])}return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8=t.fromUtf8=void 0,t.fromUtf8=function(e){return(new TextEncoder).encode(e)},t.toUtf8=function(e){return new TextDecoder("utf-8").decode(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(0).__exportStar(r(159),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(52),i=r(160),a=r(161),s=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=u(e);if(t.byteLength>o.BLOCK_SIZE){var r=new i.RawSha256;r.update(t),t=r.digest()}var n=new Uint8Array(o.BLOCK_SIZE);return n.set(t),n}(e),r=new Uint8Array(o.BLOCK_SIZE);r.set(t);for(var n=0;n<o.BLOCK_SIZE;n++)t[n]^=54,r[n]^=92;this.hash.update(t),this.outer.update(r);for(n=0;n<t.byteLength;n++)t[n]=0}}return e.prototype.update=function(e){if(!function(e){if("string"==typeof e)return 0===e.length;return 0===e.byteLength}(e)&&!this.error)try{this.hash.update(u(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 n.__awaiter(this,void 0,void 0,(function(){return n.__generator(this,(function(e){return[2,this.digestSync()]}))}))},e}();function u(e){return"string"==typeof e?a.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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52),o=function(){function e(){this.state=Int32Array.from(n.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,r=e.byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>n.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,this.bufferLength===n.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),r=this.bufferLength;if(t.setUint8(this.bufferLength++,128),r%n.BLOCK_SIZE>=n.BLOCK_SIZE-8){for(var o=this.bufferLength;o<n.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<n.BLOCK_SIZE-8;o++)t.setUint8(o,0);t.setUint32(n.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(n.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(n.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,r=t[0],o=t[1],i=t[2],a=t[3],s=t[4],u=t[5],c=t[6],d=t[7],l=0;l<n.BLOCK_SIZE;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var f=this.temp[l-2],h=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10,p=((f=this.temp[l-15])>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;this.temp[l]=(h+this.temp[l-7]|0)+(p+this.temp[l-16]|0)}var v=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(d+(n.KEY[l]+this.temp[l]|0)|0)|0,g=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&o^r&i^o&i)|0;d=c,c=u,u=s,s=a+v|0,a=i,i=o,o=r,r=v+g|0}t[0]+=r,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=d},e}();t.RawSha256=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8=t.fromUtf8=void 0;var n=r(162),o=r(163);t.fromUtf8=function(e){return"function"==typeof TextEncoder?o.fromUtf8(e):n.fromUtf8(e)},t.toUtf8=function(e){return"function"==typeof TextDecoder?o.toUtf8(e):n.toUtf8(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8=t.fromUtf8=void 0,t.fromUtf8=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var o=e.charCodeAt(r);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(r+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(r+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++r));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)},t.toUtf8=function(e){for(var t="",r=0,n=e.length;r<n;r++){var o=e[r];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++r];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++r],e[++r],e[++r]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++r])<<6|63&e[++r])}return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8=t.fromUtf8=void 0,t.fromUtf8=function(e){return(new TextEncoder).encode(e)},t.toUtf8=function(e){return new TextDecoder("utf-8").decode(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(0).__exportStar(r(165),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),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 n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(r){switch(r.label){case 0:if(!a(e))return[2,!1];r.label=1;case 1:return r.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=r.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===r.sent().byteLength];case 4:return r.sent(),[2,!1];case 5:return[2]}}))}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(0).__exportStar(r(167),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=["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,r=t.getRandomValues,o=t.subtle;return n.map((function(e){return o[e]})).concat(r).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.eventStreamSerdeProvider=void 0;var n=r(53);t.eventStreamSerdeProvider=function(e){return new n.EventStreamMarshaller(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventStreamMarshaller=void 0;var n=r(55),o=r(170),i=r(171),a=function(){function e(e,t){this.headerMarshaller=new o.HeaderMarshaller(e,t)}return e.prototype.marshall=function(e){var t=e.headers,r=e.body,o=this.headerMarshaller.format(t),i=o.byteLength+r.byteLength+16,a=new Uint8Array(i),s=new DataView(a.buffer,a.byteOffset,a.byteLength),u=new n.Crc32;return s.setUint32(0,i,!1),s.setUint32(4,o.byteLength,!1),s.setUint32(8,u.update(a.subarray(0,8)).digest(),!1),a.set(o,12),a.set(r,o.byteLength+12),s.setUint32(i-4,u.update(a.subarray(8,i-4)).digest(),!1),a},e.prototype.unmarshall=function(e){var t=i.splitMessage(e),r=t.headers,n=t.body;return{headers:this.headerMarshaller.parse(r),body:n}},e.prototype.formatHeaders=function(e){return this.headerMarshaller.format(e)},e}();t.EventStreamMarshaller=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderMarshaller=void 0;var n,o=r(0),i=r(9),a=r(56),s=function(){function e(e,t){this.toUtf8=e,this.fromUtf8=t}return e.prototype.format=function(e){var t,r,n,i,a=[];try{for(var s=o.__values(Object.keys(e)),u=s.next();!u.done;u=s.next()){var c=u.value,d=this.fromUtf8(c);a.push(Uint8Array.from([d.byteLength]),d,this.formatHeaderValue(e[c]))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}var l=new Uint8Array(a.reduce((function(e,t){return e+t.byteLength}),0)),f=0;try{for(var h=o.__values(a),p=h.next();!p.done;p=h.next()){var v=p.value;l.set(v,f),f+=v.byteLength}}catch(e){n={error:e}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.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 r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":var n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":var o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,6),o.setUint16(1,e.value.byteLength,!1);var s=new Uint8Array(o.buffer);return s.set(e.value,3),s;case"string":var u=this.fromUtf8(e.value),c=new DataView(new ArrayBuffer(3+u.byteLength));c.setUint8(0,7),c.setUint16(1,u.byteLength,!1);var d=new Uint8Array(c.buffer);return d.set(u,3),d;case"timestamp":var l=new Uint8Array(9);return l[0]=8,l.set(a.Int64.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!y.test(e.value))throw new Error("Invalid UUID received: "+e.value);var f=new Uint8Array(17);return f[0]=9,f.set(i.fromHex(e.value.replace(/\-/g,"")),1),f}},e.prototype.parse=function(e){for(var t={},r=0;r<e.byteLength;){var n=e.getUint8(r++),o=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,n));switch(r+=n,e.getUint8(r++)){case 0:t[o]={type:u,value:!0};break;case 1:t[o]={type:u,value:!1};break;case 2:t[o]={type:c,value:e.getInt8(r++)};break;case 3:t[o]={type:d,value:e.getInt16(r,!1)},r+=2;break;case 4:t[o]={type:l,value:e.getInt32(r,!1)},r+=4;break;case 5:t[o]={type:f,value:new a.Int64(new Uint8Array(e.buffer,e.byteOffset+r,8))},r+=8;break;case 6:var s=e.getUint16(r,!1);r+=2,t[o]={type:h,value:new Uint8Array(e.buffer,e.byteOffset+r,s)},r+=s;break;case 7:var y=e.getUint16(r,!1);r+=2,t[o]={type:p,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,y))},r+=y;break;case 8:t[o]={type:v,value:new Date(new a.Int64(new Uint8Array(e.buffer,e.byteOffset+r,8)).valueOf())},r+=8;break;case 9:var m=new Uint8Array(e.buffer,e.byteOffset+r,16);r+=16,t[o]={type:g,value:i.toHex(m.subarray(0,4))+"-"+i.toHex(m.subarray(4,6))+"-"+i.toHex(m.subarray(6,8))+"-"+i.toHex(m.subarray(8,10))+"-"+i.toHex(m.subarray(10))};break;default:throw new Error("Unrecognized header type tag")}}return t},e}();t.HeaderMarshaller=s,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"}(n||(n={}));var u="boolean",c="byte",d="short",l="integer",f="long",h="binary",p="string",v="timestamp",g="uuid",y=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitMessage=void 0;var n=r(55);t.splitMessage=function(e){var t=e.byteLength,r=e.byteOffset,o=e.buffer;if(t<16)throw new Error("Provided message too short to accommodate event stream message overhead");var i=new DataView(o,r,t),a=i.getUint32(0,!1);if(t!==a)throw new Error("Reported message length does not match received message length");var s=i.getUint32(4,!1),u=i.getUint32(8,!1),c=i.getUint32(t-4,!1),d=(new n.Crc32).update(new Uint8Array(o,r,8));if(u!==d.digest())throw new Error("The prelude checksum specified in the message ("+u+") does not match the calculated CRC32 checksum ("+d.digest()+")");if(d.update(new Uint8Array(o,r+8,t-12)),c!==d.digest())throw new Error("The message checksum ("+d.digest()+") did not match the expected value of "+c);return{headers:new DataView(o,r+8+4,s),body:new Uint8Array(o,r+8+4+s,a-s-16)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(174),t),n.__exportStar(r(57),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.eventStreamSerdeProvider=void 0;var n=r(57);t.eventStreamSerdeProvider=function(e){return new n.EventStreamMarshaller(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChunkedStream=void 0;var n=r(0);t.getChunkedStream=function(e){var t,r=0,o=0,i=null,a=null,s=function(e){if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);r=e,o=4,i=new Uint8Array(e),new DataView(i.buffer).setUint32(0,e,!1)};return(t={})[Symbol.asyncIterator]=function(){return n.__asyncGenerator(this,arguments,(function(){var t,u,c,d,l,f,h,p;return n.__generator(this,(function(v){switch(v.label){case 0:t=e[Symbol.asyncIterator](),v.label=1;case 1:return[4,n.__await(t.next())];case 2:return u=v.sent(),c=u.value,u.done?r?[3,4]:[4,n.__await(void 0)]:[3,10];case 3:return[2,v.sent()];case 4:return r!==o?[3,7]:[4,n.__await(i)];case 5:return[4,v.sent()];case 6:return v.sent(),[3,8];case 7:throw new Error("Truncated event message received.");case 8:return[4,n.__await(void 0)];case 9:return[2,v.sent()];case 10:d=c.length,l=0,v.label=11;case 11:if(!(l<d))return[3,15];if(!i){if(f=d-l,a||(a=new Uint8Array(4)),h=Math.min(4-o,f),a.set(c.slice(l,l+h),o),l+=h,(o+=h)<4)return[3,15];s(new DataView(a.buffer).getUint32(0,!1)),a=null}return p=Math.min(r-o,d-l),i.set(c.slice(l,l+p),o),o+=p,l+=p,r&&r===o?[4,n.__await(i)]:[3,14];case 12:return[4,v.sent()];case 13:v.sent(),i=null,r=0,o=0,v.label=14;case 14:return[3,11];case 15:return[3,1];case 16:return[2]}}))}))},t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUnmarshalledStream=void 0;var n=r(0);t.getUnmarshalledStream=function(e,t){var r;return(r={})[Symbol.asyncIterator]=function(){return n.__asyncGenerator(this,arguments,(function(){var r,o,i,a,s,u,c,d,l,f,h,p,v,g,y,m,b;return n.__generator(this,(function(_){switch(_.label){case 0:_.trys.push([0,12,13,18]),r=n.__asyncValues(e),_.label=1;case 1:return[4,n.__await(r.next())];case 2:if((o=_.sent()).done)return[3,11];if(i=o.value,a=t.eventMarshaller.unmarshall(i),"error"!==(s=a.headers[":message-type"].value))return[3,3];throw(u=new Error(a.headers[":error-message"].value||"UnknownError")).name=a.headers[":error-code"].value,u;case 3:return"exception"!==s?[3,5]:(c=a.headers[":exception-type"].value,(g={})[c]=a,d=g,[4,n.__await(t.deserializer(d))]);case 4:if((l=_.sent()).$unknown)throw(f=new Error(t.toUtf8(a.body))).name=c,f;throw l[c];case 5:return"event"!==s?[3,9]:((y={})[a.headers[":event-type"].value]=a,h=y,[4,n.__await(t.deserializer(h))]);case 6:return(p=_.sent()).$unknown?[3,10]:[4,n.__await(p)];case 7:return[4,_.sent()];case 8:return _.sent(),[3,10];case 9:throw Error("Unrecognizable event type: "+a.headers[":event-type"].value);case 10:return[3,1];case 11:return[3,18];case 12:return v=_.sent(),m={error:v},[3,18];case 13:return _.trys.push([13,,16,17]),o&&!o.done&&(b=r.return)?[4,n.__await(b.call(r))]:[3,15];case 14:_.sent(),_.label=15;case 15:return[3,17];case 16:if(m)throw m.error;return[7];case 17:return[7];case 18:return[2]}}))}))},r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.blobReader=void 0,t.blobReader=function(e,t,r){return void 0===r&&(r=1048576),new Promise((function(n,o){var i=new FileReader;i.addEventListener("error",o),i.addEventListener("abort",o);var a=e.size,s=0;function u(){s>=a?n():i.readAsArrayBuffer(e.slice(s,Math.min(a,s+r)))}i.addEventListener("load",(function(e){var r=e.target.result;t(new Uint8Array(r)),s+=r.byteLength,u()})),u()}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8=t.fromUtf8=void 0,t.fromUtf8=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var o=e.charCodeAt(r);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(r+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(r+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++r));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)},t.toUtf8=function(e){for(var t="",r=0,n=e.length;r<n;r++){var o=e[r];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++r];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++r],e[++r],e[++r]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++r])<<6|63&e[++r])}return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8=t.fromUtf8=void 0,t.fromUtf8=function(e){return(new TextEncoder).encode(e)},t.toUtf8=function(e){return new TextDecoder("utf-8").decode(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.INIT=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=16,t.INIT=[1732584193,4023233417,2562383102,271733878]},function(e,t,r){"use strict";r.r(t),r.d(t,"Storage",(function(){return tt})),r.d(t,"StorageClass",(function(){return Ze})),r.d(t,"AWSS3Provider",(function(){return Ve}));var n=r(5),o=r(0),i=r(3),a=r(2),s=r(1),u=r(64),c=function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,i,a,s,u,c,d;return Object(o.__generator)(this,(function(l){switch(l.label){case 0:return n=[Object(o.__assign)({},e)],i={},[4,T(e.body,t)];case 1:switch(r=o.__assign.apply(void 0,n.concat([(i.body=l.sent(),i)])),s="UnknownError",s=k(e,r.body),s){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":return[3,2]}return[3,4];case 2:return u=[{}],[4,_(r,t)];case 3:return a=o.__assign.apply(void 0,[o.__assign.apply(void 0,u.concat([l.sent()])),{name:s,$metadata:P(e)}]),[3,5];case 4:c=r.body,s=c.code||c.Code||s,a=Object(o.__assign)(Object(o.__assign)({},c),{name:""+s,message:c.message||c.Message||s,$fault:"client",$metadata:P(e)}),l.label=5;case 5:return d=a.message||a.Message||s,a.message=d,delete a.Message,[2,Promise.reject(Object.assign(new Error(d),a))]}}))}))},d=function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,i,a,s,u,c;return Object(o.__generator)(this,(function(d){switch(d.label){case 0:return n=[Object(o.__assign)({},e)],i={},[4,T(e.body,t)];case 1:return r=o.__assign.apply(void 0,n.concat([(i.body=d.sent(),i)])),s="UnknownError",s=k(e,r.body),u=r.body,s=u.code||u.Code||s,a=Object(o.__assign)(Object(o.__assign)({},u),{name:""+s,message:u.message||u.Message||s,$fault:"client",$metadata:P(e)}),c=a.message||a.Message||s,a.message=c,delete a.Message,[2,Promise.reject(Object.assign(new Error(c),a))]}}))}))},l=function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,i,a,s,u,c;return Object(o.__generator)(this,(function(d){switch(d.label){case 0:return n=[Object(o.__assign)({},e)],i={},[4,T(e.body,t)];case 1:return r=o.__assign.apply(void 0,n.concat([(i.body=d.sent(),i)])),s="UnknownError",s=k(e,r.body),u=r.body,s=u.code||u.Code||s,a=Object(o.__assign)(Object(o.__assign)({},u),{name:""+s,message:u.message||u.Message||s,$fault:"client",$metadata:P(e)}),c=a.message||a.Message||s,a.message=c,delete a.Message,[2,Promise.reject(Object.assign(new Error(c),a))]}}))}))},f=function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,i,a,s,u,c;return Object(o.__generator)(this,(function(d){switch(d.label){case 0:return n=[Object(o.__assign)({},e)],i={},[4,T(e.body,t)];case 1:return r=o.__assign.apply(void 0,n.concat([(i.body=d.sent(),i)])),s="UnknownError",s=k(e,r.body),u=r.body,s=u.code||u.Code||s,a=Object(o.__assign)(Object(o.__assign)({},u),{name:""+s,message:u.message||u.Message||s,$fault:"client",$metadata:P(e)}),c=a.message||a.Message||s,a.message=c,delete a.Message,[2,Promise.reject(Object.assign(new Error(c),a))]}}))}))},h=function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,i,a,s,u,c,d;return Object(o.__generator)(this,(function(l){switch(l.label){case 0:return n=[Object(o.__assign)({},e)],i={},[4,T(e.body,t)];case 1:switch(r=o.__assign.apply(void 0,n.concat([(i.body=l.sent(),i)])),s="UnknownError",s=k(e,r.body),s){case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":return[3,2]}return[3,4];case 2:return u=[{}],[4,b(r,t)];case 3:return a=o.__assign.apply(void 0,[o.__assign.apply(void 0,u.concat([l.sent()])),{name:s,$metadata:P(e)}]),[3,5];case 4:c=r.body,s=c.code||c.Code||s,a=Object(o.__assign)(Object(o.__assign)({},c),{name:""+s,message:c.message||c.Message||s,$fault:"client",$metadata:P(e)}),l.label=5;case 5:return d=a.message||a.Message||s,a.message=d,delete a.Message,[2,Promise.reject(Object.assign(new Error(d),a))]}}))}))},p=function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,i,a,s,u,c,d;return Object(o.__generator)(this,(function(l){switch(l.label){case 0:return n=[Object(o.__assign)({},e)],i={},[4,T(e.body,t)];case 1:switch(r=o.__assign.apply(void 0,n.concat([(i.body=l.sent(),i)])),s="UnknownError",s=k(e,r.body),s){case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":return[3,2]}return[3,4];case 2:return u=[{}],[4,m(r,t)];case 3:return a=o.__assign.apply(void 0,[o.__assign.apply(void 0,u.concat([l.sent()])),{name:s,$metadata:P(e)}]),[3,5];case 4:c=r.body,s=c.code||c.Code||s,a=Object(o.__assign)(Object(o.__assign)({},c),{name:""+s,message:c.message||c.Message||s,$fault:"client",$metadata:P(e)}),l.label=5;case 5:return d=a.message||a.Message||s,a.message=d,delete a.Message,[2,Promise.reject(Object.assign(new Error(d),a))]}}))}))},v=function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,i,a,s,u,c;return Object(o.__generator)(this,(function(d){switch(d.label){case 0:return n=[Object(o.__assign)({},e)],i={},[4,T(e.body,t)];case 1:return r=o.__assign.apply(void 0,n.concat([(i.body=d.sent(),i)])),s="UnknownError",s=k(e,r.body),u=r.body,s=u.code||u.Code||s,a=Object(o.__assign)(Object(o.__assign)({},u),{name:""+s,message:u.message||u.Message||s,$fault:"client",$metadata:P(e)}),c=a.message||a.Message||s,a.message=c,delete a.Message,[2,Promise.reject(Object.assign(new Error(c),a))]}}))}))},g=function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,i,a,s,u,c;return Object(o.__generator)(this,(function(d){switch(d.label){case 0:return n=[Object(o.__assign)({},e)],i={},[4,T(e.body,t)];case 1:return r=o.__assign.apply(void 0,n.concat([(i.body=d.sent(),i)])),s="UnknownError",s=k(e,r.body),u=r.body,s=u.code||u.Code||s,a=Object(o.__assign)(Object(o.__assign)({},u),{name:""+s,message:u.message||u.Message||s,$fault:"client",$metadata:P(e)}),c=a.message||a.Message||s,a.message=c,delete a.Message,[2,Promise.reject(Object.assign(new Error(c),a))]}}))}))},y=function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,i,a,s,u,c;return Object(o.__generator)(this,(function(d){switch(d.label){case 0:return n=[Object(o.__assign)({},e)],i={},[4,T(e.body,t)];case 1:return r=o.__assign.apply(void 0,n.concat([(i.body=d.sent(),i)])),s="UnknownError",s=k(e,r.body),u=r.body,s=u.code||u.Code||s,a=Object(o.__assign)(Object(o.__assign)({},u),{name:""+s,message:u.message||u.Message||s,$fault:"client",$metadata:P(e)}),c=a.message||a.Message||s,a.message=c,delete a.Message,[2,Promise.reject(Object.assign(new Error(c),a))]}}))}))},m=function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var t;return Object(o.__generator)(this,(function(r){return t={name:"NoSuchBucket",$fault:"client",$metadata:P(e)},e.body,[2,t]}))}))},b=function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var t;return Object(o.__generator)(this,(function(r){return t={name:"NoSuchKey",$fault:"client",$metadata:P(e)},e.body,[2,t]}))}))},_=function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var t;return Object(o.__generator)(this,(function(r){return t={name:"NoSuchUpload",$fault:"client",$metadata:P(e)},e.body,[2,t]}))}))},w=function(e,t){var r=new s.XmlNode("CompletedMultipartUpload");void 0!==e.Parts&&S(e.Parts,t).map((function(e){e=e.withName("Part"),r.addChildNode(e)}));return r},S=function(e,t){return e.map((function(e){return function(e,t){var r=new s.XmlNode("CompletedPart");if(void 0!==e.ETag){var n=new s.XmlNode("ETag").addChildNode(new s.XmlText(e.ETag)).withName("ETag");r.addChildNode(n)}if(void 0!==e.PartNumber){n=new s.XmlNode("PartNumber").addChildNode(new s.XmlText(String(e.PartNumber))).withName("PartNumber");r.addChildNode(n)}return r}(e).withName("member")}))},O=function(e,t){return(e||[]).map((function(e){return function(e,t){var r={__type:"CommonPrefix",Prefix:void 0};return void 0!==e.Prefix&&(r.Prefix=e.Prefix),r}(e)}))},E=function(e,t){var r={__type:"Initiator",DisplayName:void 0,ID:void 0};return void 0!==e.DisplayName&&(r.DisplayName=e.DisplayName),void 0!==e.ID&&(r.ID=e.ID),r},x=function(e,t){return(e||[]).map((function(e){return function(e,t){var r={__type:"Object",ETag:void 0,Key:void 0,LastModified:void 0,Owner:void 0,Size:void 0,StorageClass:void 0};return void 0!==e.ETag&&(r.ETag=e.ETag),void 0!==e.Key&&(r.Key=e.Key),void 0!==e.LastModified&&(r.LastModified=new Date(e.LastModified)),void 0!==e.Owner&&(r.Owner=C(e.Owner,t)),void 0!==e.Size&&(r.Size=parseInt(e.Size)),void 0!==e.StorageClass&&(r.StorageClass=e.StorageClass),r}(e,t)}))},C=function(e,t){var r={__type:"Owner",DisplayName:void 0,ID:void 0};return void 0!==e.DisplayName&&(r.DisplayName=e.DisplayName),void 0!==e.ID&&(r.ID=e.ID),r},j=function(e,t){return(e||[]).map((function(e){return function(e,t){var r={__type:"Part",ETag:void 0,LastModified:void 0,PartNumber:void 0,Size:void 0};return void 0!==e.ETag&&(r.ETag=e.ETag),void 0!==e.LastModified&&(r.LastModified=new Date(e.LastModified)),void 0!==e.PartNumber&&(r.PartNumber=parseInt(e.PartNumber)),void 0!==e.Size&&(r.Size=parseInt(e.Size)),r}(e)}))},P=function(e){return{httpStatusCode:e.statusCode,httpHeaders:e.headers,requestId:e.headers["x-amzn-requestid"]}},A=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},M=function(e){return!(void 0===e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size)},T=function(e,t){return function(e,t){return A(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){if(e.length){var t=Object(u.parse)(e,{attributeNamePrefix:"",ignoreAttributes:!1,parseNodeValue:!1,tagValueProcessor:function(e,t){return e.replace(/&amp;/g,"&").replace(/&apos;/g,"'").replace(/&quot;/g,'"').replace(/&gt;/g,">").replace(/&lt;/g,"<")}}),r=Object.keys(t)[0],n=t[r];return n["#text"]&&(n[r]=n["#text"],delete n["#text"]),Object(a.getValueFromTextNode)(n)}return{}}))},k=function(e,t){return void 0!==t.Code?t.Code:404==e.statusCode?"NotFound":""},U=r(4),R=r(6),N=r(10),I=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return Object(o.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Object(R.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use(Object(N.getSsecPlugin)(t)),this.middlewareStack.use(Object(U.getBucketEndpointPlugin)(t));var n=e.concat(this.middlewareStack),o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),{logger:{}})},t.prototype.serialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,s,u,c,d,l,f,h;return Object(o.__generator)(this,(function(p){switch(p.label){case 0:if(r=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({"Content-Type":""},M(e.IfMatch)&&{"If-Match":e.IfMatch}),M(e.IfModifiedSince)&&{"If-Modified-Since":Object(a.dateToUtcString)(e.IfModifiedSince).toString()}),M(e.IfNoneMatch)&&{"If-None-Match":e.IfNoneMatch}),M(e.IfUnmodifiedSince)&&{"If-Unmodified-Since":Object(a.dateToUtcString)(e.IfUnmodifiedSince).toString()}),M(e.Range)&&{Range:e.Range}),M(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),M(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),M(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),M(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-MD5":e.SSECustomerKeyMD5}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((s=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",Object(a.extendedEncodeURIComponent)(s)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((s=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",s.split("/").map((function(e){return Object(a.extendedEncodeURIComponent)(e)})).join("/")),u=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({"x-id":"GetObject"},void 0!==e.PartNumber&&{partNumber:e.PartNumber.toString()}),void 0!==e.ResponseCacheControl&&{"response-cache-control":e.ResponseCacheControl}),void 0!==e.ResponseContentDisposition&&{"response-content-disposition":e.ResponseContentDisposition}),void 0!==e.ResponseContentEncoding&&{"response-content-encoding":e.ResponseContentEncoding}),void 0!==e.ResponseContentLanguage&&{"response-content-language":e.ResponseContentLanguage}),void 0!==e.ResponseContentType&&{"response-content-type":e.ResponseContentType}),void 0!==e.ResponseExpires&&{"response-expires":(e.ResponseExpires.toISOString().split(".")[0]+"Z").toString()}),void 0!==e.VersionId&&{versionId:e.VersionId}),[4,t.endpoint()];case 1:return c=p.sent(),d=c.hostname,l=c.protocol,f=void 0===l?"https":l,h=c.port,[2,new i.HttpRequest({protocol:f,hostname:d,port:h,method:"GET",headers:r,path:n,query:u,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n;return Object(o.__generator)(this,(function(o){return 200!==e.statusCode&&e.statusCode>=400?[2,h(e,t)]:(r={$metadata:P(e),__type:"GetObjectOutput",AcceptRanges:void 0,Body:void 0,CacheControl:void 0,ContentDisposition:void 0,ContentEncoding:void 0,ContentLanguage:void 0,ContentLength:void 0,ContentRange:void 0,ContentType:void 0,DeleteMarker:void 0,ETag:void 0,Expiration:void 0,Expires:void 0,LastModified:void 0,Metadata:void 0,MissingMeta:void 0,ObjectLockLegalHoldStatus:void 0,ObjectLockMode:void 0,ObjectLockRetainUntilDate:void 0,PartsCount:void 0,ReplicationStatus:void 0,RequestCharged:void 0,Restore:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,StorageClass:void 0,TagCount:void 0,VersionId:void 0,WebsiteRedirectLocation:void 0},void 0!==e.headers["accept-ranges"]&&(r.AcceptRanges=e.headers["accept-ranges"]),void 0!==e.headers["cache-control"]&&(r.CacheControl=e.headers["cache-control"]),void 0!==e.headers["content-disposition"]&&(r.ContentDisposition=e.headers["content-disposition"]),void 0!==e.headers["content-encoding"]&&(r.ContentEncoding=e.headers["content-encoding"]),void 0!==e.headers["content-language"]&&(r.ContentLanguage=e.headers["content-language"]),void 0!==e.headers["content-length"]&&(r.ContentLength=parseInt(e.headers["content-length"],10)),void 0!==e.headers["content-range"]&&(r.ContentRange=e.headers["content-range"]),void 0!==e.headers["content-type"]&&(r.ContentType=e.headers["content-type"]),void 0!==e.headers["x-amz-delete-marker"]&&(r.DeleteMarker="true"===e.headers["x-amz-delete-marker"]),void 0!==e.headers.etag&&(r.ETag=e.headers.etag),void 0!==e.headers["x-amz-expiration"]&&(r.Expiration=e.headers["x-amz-expiration"]),void 0!==e.headers.expires&&(r.Expires=new Date(e.headers.expires)),void 0!==e.headers["last-modified"]&&(r.LastModified=new Date(e.headers["last-modified"])),void 0!==e.headers["x-amz-missing-meta"]&&(r.MissingMeta=parseInt(e.headers["x-amz-missing-meta"],10)),void 0!==e.headers["x-amz-object-lock-legal-hold"]&&(r.ObjectLockLegalHoldStatus=e.headers["x-amz-object-lock-legal-hold"]),void 0!==e.headers["x-amz-object-lock-mode"]&&(r.ObjectLockMode=e.headers["x-amz-object-lock-mode"]),void 0!==e.headers["x-amz-object-lock-retain-until-date"]&&(r.ObjectLockRetainUntilDate=new Date(e.headers["x-amz-object-lock-retain-until-date"])),void 0!==e.headers["x-amz-mp-parts-count"]&&(r.PartsCount=parseInt(e.headers["x-amz-mp-parts-count"],10)),void 0!==e.headers["x-amz-replication-status"]&&(r.ReplicationStatus=e.headers["x-amz-replication-status"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),void 0!==e.headers["x-amz-restore"]&&(r.Restore=e.headers["x-amz-restore"]),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-storage-class"]&&(r.StorageClass=e.headers["x-amz-storage-class"]),void 0!==e.headers["x-amz-tagging-count"]&&(r.TagCount=parseInt(e.headers["x-amz-tagging-count"],10)),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),void 0!==e.headers["x-amz-website-redirect-location"]&&(r.WebsiteRedirectLocation=e.headers["x-amz-website-redirect-location"]),Object.keys(e.headers).forEach((function(t){void 0===r.Metadata&&(r.Metadata={}),t.startsWith("x-amz-meta-")&&(r.Metadata[t.substring(11)]=e.headers[t])})),n=e.body,r.Body=n,[2,Promise.resolve(r)])}))}))}(e,t)},t}(a.Command),z=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return Object(o.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Object(R.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use(Object(U.getBucketEndpointPlugin)(t));var n=e.concat(this.middlewareStack),o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),{logger:{}})},t.prototype.serialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,s,u,c,d,l,f,h;return Object(o.__generator)(this,(function(p){switch(p.label){case 0:if(r=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({"Content-Type":""},M(e.BypassGovernanceRetention)&&{"x-amz-bypass-governance-retention":e.BypassGovernanceRetention.toString()}),M(e.MFA)&&{"x-amz-mfa":e.MFA}),M(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((s=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",Object(a.extendedEncodeURIComponent)(s)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((s=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",s.split("/").map((function(e){return Object(a.extendedEncodeURIComponent)(e)})).join("/")),u=Object(o.__assign)({"x-id":"DeleteObject"},void 0!==e.VersionId&&{versionId:e.VersionId}),[4,t.endpoint()];case 1:return c=p.sent(),d=c.hostname,l=c.protocol,f=void 0===l?"https":l,h=c.port,[2,new i.HttpRequest({protocol:f,hostname:d,port:h,method:"DELETE",headers:r,path:n,query:u,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r;return Object(o.__generator)(this,(function(n){switch(n.label){case 0:return 204!==e.statusCode&&e.statusCode>=400?[2,f(e,t)]:(r={$metadata:P(e),__type:"DeleteObjectOutput",DeleteMarker:void 0,RequestCharged:void 0,VersionId:void 0},void 0!==e.headers["x-amz-delete-marker"]&&(r.DeleteMarker="true"===e.headers["x-amz-delete-marker"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),[4,A(e.body,t)]);case 1:return n.sent(),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(a.Command),L=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return Object(o.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Object(R.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use(Object(U.getBucketEndpointPlugin)(t));var n=e.concat(this.middlewareStack),o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),{logger:{}})},t.prototype.serialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,s,u,c,d,l,f,h;return Object(o.__generator)(this,(function(p){switch(p.label){case 0:if(r=Object(o.__assign)({"Content-Type":""},M(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),n="/{Bucket}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((s=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");return n=n.replace("{Bucket}",Object(a.extendedEncodeURIComponent)(s)),u=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},void 0!==e.Delimiter&&{delimiter:e.Delimiter}),void 0!==e.EncodingType&&{"encoding-type":e.EncodingType}),void 0!==e.Marker&&{marker:e.Marker}),void 0!==e.MaxKeys&&{"max-keys":e.MaxKeys.toString()}),void 0!==e.Prefix&&{prefix:e.Prefix}),[4,t.endpoint()];case 1:return c=p.sent(),d=c.hostname,l=c.protocol,f=void 0===l?"https":l,h=c.port,[2,new i.HttpRequest({protocol:f,hostname:d,port:h,method:"GET",headers:r,path:n,query:u,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n;return Object(o.__generator)(this,(function(o){switch(o.label){case 0:return 200!==e.statusCode&&e.statusCode>=400?[2,p(e,t)]:(r={$metadata:P(e),__type:"ListObjectsOutput",CommonPrefixes:void 0,Contents:void 0,Delimiter:void 0,EncodingType:void 0,IsTruncated:void 0,Marker:void 0,MaxKeys:void 0,Name:void 0,NextMarker:void 0,Prefix:void 0},[4,T(e.body,t)]);case 1:return""===(n=o.sent()).CommonPrefixes&&(r.CommonPrefixes=[]),void 0!==n.CommonPrefixes&&(r.CommonPrefixes=O(Object(a.getArrayIfSingleItem)(n.CommonPrefixes),t)),""===n.Contents&&(r.Contents=[]),void 0!==n.Contents&&(r.Contents=x(Object(a.getArrayIfSingleItem)(n.Contents),t)),void 0!==n.Delimiter&&(r.Delimiter=n.Delimiter),void 0!==n.EncodingType&&(r.EncodingType=n.EncodingType),void 0!==n.IsTruncated&&(r.IsTruncated="true"==n.IsTruncated),void 0!==n.Marker&&(r.Marker=n.Marker),void 0!==n.MaxKeys&&(r.MaxKeys=parseInt(n.MaxKeys)),void 0!==n.Name&&(r.Name=n.Name),void 0!==n.NextMarker&&(r.NextMarker=n.NextMarker),void 0!==n.Prefix&&(r.Prefix=n.Prefix),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(a.Command),D=r(26),B=r(71),H=r(72),q=r(12),K=r(73),F=r(25),V=r(74),G=r(75),$=r(16),Y=r(76),W=r(77),X=r(17),Z=new Set(["ap-south-1","eu-north-1","eu-west-3","eu-west-2","eu-west-1","ap-northeast-2","ap-northeast-1","me-south-1","ca-central-1","sa-east-1","ap-east-1","ap-southeast-1","ap-southeast-2","eu-central-1","us-east-1","us-east-2","us-west-1","us-west-2"]),Q=new Set(["cn-north-1","cn-northwest-1"]),J=new Set(["us-iso-east-1"]),ee=new Set(["us-isob-east-1"]),te=new Set(["us-gov-west-1","us-gov-east-1"]),re={apiVersion:"2006-03-01",disableHostPrefix:!1,regionInfoProvider:function(e,t){var r=void 0;switch(e){case"ap-east-1":r={hostname:"s3.ap-east-1.amazonaws.com"};break;case"ap-northeast-1":r={hostname:"s3.ap-northeast-1.amazonaws.com"};break;case"ap-northeast-2":r={hostname:"s3.ap-northeast-2.amazonaws.com"};break;case"ap-south-1":r={hostname:"s3.ap-south-1.amazonaws.com"};break;case"ap-southeast-1":r={hostname:"s3.ap-southeast-1.amazonaws.com"};break;case"ap-southeast-2":r={hostname:"s3.ap-southeast-2.amazonaws.com"};break;case"ca-central-1":r={hostname:"s3.ca-central-1.amazonaws.com"};break;case"cn-north-1":r={hostname:"s3.cn-north-1.amazonaws.com.cn"};break;case"cn-northwest-1":r={hostname:"s3.cn-northwest-1.amazonaws.com.cn"};break;case"eu-central-1":r={hostname:"s3.eu-central-1.amazonaws.com"};break;case"eu-north-1":r={hostname:"s3.eu-north-1.amazonaws.com"};break;case"eu-west-1":r={hostname:"s3.eu-west-1.amazonaws.com"};break;case"eu-west-2":r={hostname:"s3.eu-west-2.amazonaws.com"};break;case"eu-west-3":r={hostname:"s3.eu-west-3.amazonaws.com"};break;case"fips-us-gov-west-1":r={hostname:"s3-fips-us-gov-west-1.amazonaws.com",signingRegion:"us-gov-west-1"};break;case"me-south-1":r={hostname:"s3.me-south-1.amazonaws.com"};break;case"s3-external-1":r={hostname:"s3-external-1.amazonaws.com",signingRegion:"us-east-1"};break;case"sa-east-1":r={hostname:"s3.sa-east-1.amazonaws.com"};break;case"us-east-1":r={hostname:"s3.amazonaws.com"};break;case"us-east-2":r={hostname:"s3.us-east-2.amazonaws.com"};break;case"us-gov-east-1":r={hostname:"s3.us-gov-east-1.amazonaws.com"};break;case"us-gov-west-1":r={hostname:"s3.us-gov-west-1.amazonaws.com"};break;case"us-iso-east-1":r={hostname:"s3.us-iso-east-1.c2s.ic.gov"};break;case"us-isob-east-1":r={hostname:"s3.us-isob-east-1.sc2s.sgov.gov"};break;case"us-west-1":r={hostname:"s3.us-west-1.amazonaws.com"};break;case"us-west-2":r={hostname:"s3.us-west-2.amazonaws.com"};break;default:Z.has(e)&&(r={hostname:"s3.{region}.amazonaws.com".replace("{region}",e)}),Q.has(e)&&(r={hostname:"s3.{region}.amazonaws.com.cn".replace("{region}",e)}),J.has(e)&&(r={hostname:"s3.{region}.c2s.ic.gov".replace("{region}",e)}),ee.has(e)&&(r={hostname:"s3.{region}.sc2s.sgov.gov".replace("{region}",e)}),te.has(e)&&(r={hostname:"s3.{region}.amazonaws.com".replace("{region}",e)}),void 0===r&&(r={hostname:"s3.{region}.amazonaws.com".replace("{region}",e)})}return Promise.resolve(r)},signingEscapePath:!1,signingName:"s3"},ne=Object(o.__assign)(Object(o.__assign)({},re),{runtime:"browser",base64Decoder:$.fromBase64,base64Encoder:$.toBase64,bodyLengthChecker:Y.calculateBodyLength,credentialDefaultProvider:Object(F.invalidFunction)("Credential is missing"),defaultUserAgent:Object(W.defaultUserAgent)(D.a,D.b),eventStreamSerdeProvider:H.eventStreamSerdeProvider,maxAttemptsDefaultProvider:function(){return"3"},md5:V.Md5,regionDefaultProvider:Object(F.invalidFunction)("Region is missing"),requestHandler:new q.FetchHttpHandler,sha256:B.Sha256,streamCollector:q.streamCollector,streamHasher:K.blobHasher,urlParser:G.parseUrl,utf8Decoder:X.fromUtf8,utf8Encoder:X.toUtf8}),oe=r(20),ie=r(67),ae=r(68),se=r(69),ue=r(21),ce=r(22),de=r(70),le=r(23),fe=r(24),he=function(e){function t(t){var r=this,n=Object(o.__assign)(Object(o.__assign)({},ne),t),i=Object(oe.resolveRegionConfig)(n),a=Object(oe.resolveEndpointsConfig)(i),s=Object(le.resolveAwsAuthConfig)(a),u=Object(ce.resolveRetryConfig)(s),c=Object(fe.resolveUserAgentConfig)(u),d=Object(U.resolveBucketEndpointConfig)(c),l=Object(ue.resolveHostHeaderConfig)(d),f=Object(ie.resolveEventStreamSerdeConfig)(l);return(r=e.call(this,f)||this).config=f,r.middlewareStack.use(Object(le.getAwsAuthPlugin)(r.config)),r.middlewareStack.use(Object(ce.getRetryPlugin)(r.config)),r.middlewareStack.use(Object(fe.getUserAgentPlugin)(r.config)),r.middlewareStack.use(Object(ae.getContentLengthPlugin)(r.config)),r.middlewareStack.use(Object(de.getValidateBucketNamePlugin)(r.config)),r.middlewareStack.use(Object(se.getAddExpectContinuePlugin)(r.config)),r.middlewareStack.use(Object(ue.getHostHeaderPlugin)(r.config)),r}return Object(o.__extends)(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(a.Client),pe=r(60),ve=r(61),ge=r(62),ye=r(14),me=r(66),be=r.n(me),_e=new n.ConsoleLogger("axios-http-handler"),we=function(){function e(e,t){void 0===e&&(e={}),this.httpOptions=e,this.emitter=t}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var r=this.httpOptions.requestTimeout,n=this.emitter,o=e.path;if(e.query){var a=Object(ye.buildQueryString)(e.query);a&&(o+="?"+a)}var s=e.port,u=e.protocol+"//"+e.hostname+(s?":"+s:"")+o,c={};c.url=u,c.method=e.method,c.headers=e.headers,delete c.headers.host,e.body?c.data=e.body:c.headers["Content-Type"]&&(c.data=null),n&&(c.onUploadProgress=function(e){n.emit("sendProgress",e),_e.debug(e)}),c.responseType="blob";var d=[be.a.request(c).then((function(e){return{response:new i.HttpResponse({headers:e.headers,statusCode:e.status,body:e.data})}})).catch((function(e){throw _e.error(e),e})),Se(r)];return Promise.race(d)},e}();function Se(e){return void 0===e&&(e=0),new Promise((function(t,r){e&&setTimeout((function(){var t=new Error("Request did not complete within "+e+" ms");t.name="TimeoutError",r(t)}),e)}))}var Oe=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return Object(o.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Object(R.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use(Object(N.getSsecPlugin)(t)),this.middlewareStack.use(Object(U.getBucketEndpointPlugin)(t));var n=e.concat(this.middlewareStack),o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),{logger:{}})},t.prototype.serialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,s,u,c,d,l,f,h,p,v;return Object(o.__generator)(this,(function(g){switch(g.label){case 0:if(r=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({"Content-Type":"application/octet-stream"},M(e.ACL)&&{"x-amz-acl":e.ACL}),M(e.CacheControl)&&{"Cache-Control":e.CacheControl}),M(e.ContentDisposition)&&{"Content-Disposition":e.ContentDisposition}),M(e.ContentEncoding)&&{"Content-Encoding":e.ContentEncoding}),M(e.ContentLanguage)&&{"Content-Language":e.ContentLanguage}),M(e.ContentLength)&&{"Content-Length":e.ContentLength.toString()}),M(e.ContentMD5)&&{"Content-MD5":e.ContentMD5}),M(e.ContentType)&&{"Content-Type":e.ContentType}),M(e.Expires)&&{Expires:Object(a.dateToUtcString)(e.Expires).toString()}),M(e.GrantFullControl)&&{"x-amz-grant-full-control":e.GrantFullControl}),M(e.GrantRead)&&{"x-amz-grant-read":e.GrantRead}),M(e.GrantReadACP)&&{"x-amz-grant-read-acp":e.GrantReadACP}),M(e.GrantWriteACP)&&{"x-amz-grant-write-acp":e.GrantWriteACP}),M(e.ObjectLockLegalHoldStatus)&&{"x-amz-object-lock-legal-hold":e.ObjectLockLegalHoldStatus}),M(e.ObjectLockMode)&&{"x-amz-object-lock-mode":e.ObjectLockMode}),M(e.ObjectLockRetainUntilDate)&&{"x-amz-object-lock-retain-until-date":(e.ObjectLockRetainUntilDate.toISOString().split(".")[0]+"Z").toString()}),M(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),M(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),M(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),M(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-MD5":e.SSECustomerKeyMD5}),M(e.SSEKMSEncryptionContext)&&{"x-amz-server-side-encryption-context":e.SSEKMSEncryptionContext}),M(e.SSEKMSKeyId)&&{"x-amz-server-side-encryption-aws-kms-key-id":e.SSEKMSKeyId}),M(e.ServerSideEncryption)&&{"x-amz-server-side-encryption":e.ServerSideEncryption}),M(e.StorageClass)&&{"x-amz-storage-class":e.StorageClass}),M(e.Tagging)&&{"x-amz-tagging":e.Tagging}),M(e.WebsiteRedirectLocation)&&{"x-amz-website-redirect-location":e.WebsiteRedirectLocation}),void 0!==e.Metadata&&Object.keys(e.Metadata).reduce((function(t,r){return t["x-amz-meta-"+r]=e.Metadata[r],t}),{})),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((s=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",Object(a.extendedEncodeURIComponent)(s)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((s=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",s.split("/").map((function(e){return Object(a.extendedEncodeURIComponent)(e)})).join("/")),u={"x-id":"PutObject"},void 0!==e.Body&&(d=e.Body,c=d),[4,t.endpoint()];case 1:return l=g.sent(),f=l.hostname,h=l.protocol,p=void 0===h?"https":h,v=l.port,[2,new i.HttpRequest({protocol:p,hostname:f,port:v,method:"PUT",headers:r,path:n,query:u,body:c})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r;return Object(o.__generator)(this,(function(n){switch(n.label){case 0:return 200!==e.statusCode&&e.statusCode>=400?[2,g(e,t)]:(r={$metadata:P(e),__type:"PutObjectOutput",ETag:void 0,Expiration:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSEncryptionContext:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,VersionId:void 0},void 0!==e.headers.etag&&(r.ETag=e.headers.etag),void 0!==e.headers["x-amz-expiration"]&&(r.Expiration=e.headers["x-amz-expiration"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers["x-amz-server-side-encryption-context"]&&(r.SSEKMSEncryptionContext=e.headers["x-amz-server-side-encryption-context"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),[4,A(e.body,t)]);case 1:return n.sent(),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(a.Command),Ee=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return Object(o.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Object(R.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use(Object(N.getSsecPlugin)(t)),this.middlewareStack.use(Object(U.getBucketEndpointPlugin)(t));var n=e.concat(this.middlewareStack),o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),{logger:{}})},t.prototype.serialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,s,u,c,d,l,f,h;return Object(o.__generator)(this,(function(p){switch(p.label){case 0:if(r=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({"Content-Type":""},M(e.ACL)&&{"x-amz-acl":e.ACL}),M(e.CacheControl)&&{"Cache-Control":e.CacheControl}),M(e.ContentDisposition)&&{"Content-Disposition":e.ContentDisposition}),M(e.ContentEncoding)&&{"Content-Encoding":e.ContentEncoding}),M(e.ContentLanguage)&&{"Content-Language":e.ContentLanguage}),M(e.ContentType)&&{"Content-Type":e.ContentType}),M(e.Expires)&&{Expires:Object(a.dateToUtcString)(e.Expires).toString()}),M(e.GrantFullControl)&&{"x-amz-grant-full-control":e.GrantFullControl}),M(e.GrantRead)&&{"x-amz-grant-read":e.GrantRead}),M(e.GrantReadACP)&&{"x-amz-grant-read-acp":e.GrantReadACP}),M(e.GrantWriteACP)&&{"x-amz-grant-write-acp":e.GrantWriteACP}),M(e.ObjectLockLegalHoldStatus)&&{"x-amz-object-lock-legal-hold":e.ObjectLockLegalHoldStatus}),M(e.ObjectLockMode)&&{"x-amz-object-lock-mode":e.ObjectLockMode}),M(e.ObjectLockRetainUntilDate)&&{"x-amz-object-lock-retain-until-date":(e.ObjectLockRetainUntilDate.toISOString().split(".")[0]+"Z").toString()}),M(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),M(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),M(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),M(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-MD5":e.SSECustomerKeyMD5}),M(e.SSEKMSEncryptionContext)&&{"x-amz-server-side-encryption-context":e.SSEKMSEncryptionContext}),M(e.SSEKMSKeyId)&&{"x-amz-server-side-encryption-aws-kms-key-id":e.SSEKMSKeyId}),M(e.ServerSideEncryption)&&{"x-amz-server-side-encryption":e.ServerSideEncryption}),M(e.StorageClass)&&{"x-amz-storage-class":e.StorageClass}),M(e.Tagging)&&{"x-amz-tagging":e.Tagging}),M(e.WebsiteRedirectLocation)&&{"x-amz-website-redirect-location":e.WebsiteRedirectLocation}),void 0!==e.Metadata&&Object.keys(e.Metadata).reduce((function(t,r){return t["x-amz-meta-"+r]=e.Metadata[r],t}),{})),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((s=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",Object(a.extendedEncodeURIComponent)(s)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((s=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",s.split("/").map((function(e){return Object(a.extendedEncodeURIComponent)(e)})).join("/")),u={uploads:""},[4,t.endpoint()];case 1:return c=p.sent(),d=c.hostname,l=c.protocol,f=void 0===l?"https":l,h=c.port,[2,new i.HttpRequest({protocol:f,hostname:d,port:h,method:"POST",headers:r,path:n,query:u,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n;return Object(o.__generator)(this,(function(o){switch(o.label){case 0:return 200!==e.statusCode&&e.statusCode>=400?[2,l(e,t)]:(r={$metadata:P(e),__type:"CreateMultipartUploadOutput",AbortDate:void 0,AbortRuleId:void 0,Bucket:void 0,Key:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSEncryptionContext:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,UploadId:void 0},void 0!==e.headers["x-amz-abort-date"]&&(r.AbortDate=new Date(e.headers["x-amz-abort-date"])),void 0!==e.headers["x-amz-abort-rule-id"]&&(r.AbortRuleId=e.headers["x-amz-abort-rule-id"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers["x-amz-server-side-encryption-context"]&&(r.SSEKMSEncryptionContext=e.headers["x-amz-server-side-encryption-context"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),[4,T(e.body,t)]);case 1:return void 0!==(n=o.sent()).Bucket&&(r.Bucket=n.Bucket),void 0!==n.Key&&(r.Key=n.Key),void 0!==n.UploadId&&(r.UploadId=n.UploadId),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(a.Command),xe=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return Object(o.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Object(R.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use(Object(N.getSsecPlugin)(t)),this.middlewareStack.use(Object(U.getBucketEndpointPlugin)(t));var n=e.concat(this.middlewareStack),o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),{logger:{}})},t.prototype.serialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,s,u,c,d,l,f,h,p,v;return Object(o.__generator)(this,(function(g){switch(g.label){case 0:if(r=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({"Content-Type":"application/octet-stream"},M(e.ContentLength)&&{"Content-Length":e.ContentLength.toString()}),M(e.ContentMD5)&&{"Content-MD5":e.ContentMD5}),M(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),M(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),M(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),M(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-MD5":e.SSECustomerKeyMD5}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((s=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",Object(a.extendedEncodeURIComponent)(s)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((s=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",s.split("/").map((function(e){return Object(a.extendedEncodeURIComponent)(e)})).join("/")),u=Object(o.__assign)(Object(o.__assign)({"x-id":"UploadPart"},void 0!==e.PartNumber&&{partNumber:e.PartNumber.toString()}),void 0!==e.UploadId&&{uploadId:e.UploadId}),void 0!==e.Body&&(d=e.Body,c=d),[4,t.endpoint()];case 1:return l=g.sent(),f=l.hostname,h=l.protocol,p=void 0===h?"https":h,v=l.port,[2,new i.HttpRequest({protocol:p,hostname:f,port:v,method:"PUT",headers:r,path:n,query:u,body:c})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r;return Object(o.__generator)(this,(function(n){switch(n.label){case 0:return 200!==e.statusCode&&e.statusCode>=400?[2,y(e,t)]:(r={$metadata:P(e),__type:"UploadPartOutput",ETag:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0},void 0!==e.headers.etag&&(r.ETag=e.headers.etag),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),[4,A(e.body,t)]);case 1:return n.sent(),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(a.Command),Ce=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return Object(o.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Object(R.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use(Object(U.getBucketEndpointPlugin)(t));var n=e.concat(this.middlewareStack),o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),{logger:{}})},t.prototype.serialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,s,u,c,d,l,f,h,p,v;return Object(o.__generator)(this,(function(g){switch(g.label){case 0:if(r=Object(o.__assign)({"Content-Type":"application/xml"},M(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((s=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",Object(a.extendedEncodeURIComponent)(s)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((s=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",s.split("/").map((function(e){return Object(a.extendedEncodeURIComponent)(e)})).join("/")),u=Object(o.__assign)({},void 0!==e.UploadId&&{uploadId:e.UploadId}),void 0!==e.MultipartUpload&&(d=w(e.MultipartUpload,t),c='<?xml version="1.0" encoding="UTF-8"?>',d.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),c+=d.toString()),[4,t.endpoint()];case 1:return l=g.sent(),f=l.hostname,h=l.protocol,p=void 0===h?"https":h,v=l.port,[2,new i.HttpRequest({protocol:p,hostname:f,port:v,method:"POST",headers:r,path:n,query:u,body:c})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n;return Object(o.__generator)(this,(function(o){switch(o.label){case 0:return 200!==e.statusCode&&e.statusCode>=400?[2,d(e,t)]:(r={$metadata:P(e),__type:"CompleteMultipartUploadOutput",Bucket:void 0,ETag:void 0,Expiration:void 0,Key:void 0,Location:void 0,RequestCharged:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,VersionId:void 0},void 0!==e.headers["x-amz-expiration"]&&(r.Expiration=e.headers["x-amz-expiration"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),[4,T(e.body,t)]);case 1:return void 0!==(n=o.sent()).Bucket&&(r.Bucket=n.Bucket),void 0!==n.ETag&&(r.ETag=n.ETag),void 0!==n.Key&&(r.Key=n.Key),void 0!==n.Location&&(r.Location=n.Location),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(a.Command),je=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return Object(o.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Object(R.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use(Object(U.getBucketEndpointPlugin)(t));var n=e.concat(this.middlewareStack),o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),{logger:{}})},t.prototype.serialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,s,u,c,d,l,f,h;return Object(o.__generator)(this,(function(p){switch(p.label){case 0:if(r=Object(o.__assign)({"Content-Type":""},M(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((s=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",Object(a.extendedEncodeURIComponent)(s)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((s=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",s.split("/").map((function(e){return Object(a.extendedEncodeURIComponent)(e)})).join("/")),u=Object(o.__assign)({"x-id":"AbortMultipartUpload"},void 0!==e.UploadId&&{uploadId:e.UploadId}),[4,t.endpoint()];case 1:return c=p.sent(),d=c.hostname,l=c.protocol,f=void 0===l?"https":l,h=c.port,[2,new i.HttpRequest({protocol:f,hostname:d,port:h,method:"DELETE",headers:r,path:n,query:u,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r;return Object(o.__generator)(this,(function(n){switch(n.label){case 0:return 204!==e.statusCode&&e.statusCode>=400?[2,c(e,t)]:(r={$metadata:P(e),__type:"AbortMultipartUploadOutput",RequestCharged:void 0},void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,A(e.body,t)]);case 1:return n.sent(),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(a.Command),Pe=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return Object(o.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Object(R.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use(Object(U.getBucketEndpointPlugin)(t));var n=e.concat(this.middlewareStack),o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),{logger:{}})},t.prototype.serialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n,s,u,c,d,l,f,h;return Object(o.__generator)(this,(function(p){switch(p.label){case 0:if(r=Object(o.__assign)({"Content-Type":""},M(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((s=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",Object(a.extendedEncodeURIComponent)(s)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((s=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",s.split("/").map((function(e){return Object(a.extendedEncodeURIComponent)(e)})).join("/")),u=Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({"x-id":"ListParts"},void 0!==e.MaxParts&&{"max-parts":e.MaxParts.toString()}),void 0!==e.PartNumberMarker&&{"part-number-marker":e.PartNumberMarker.toString()}),void 0!==e.UploadId&&{uploadId:e.UploadId}),[4,t.endpoint()];case 1:return c=p.sent(),d=c.hostname,l=c.protocol,f=void 0===l?"https":l,h=c.port,[2,new i.HttpRequest({protocol:f,hostname:d,port:h,method:"GET",headers:r,path:n,query:u,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Object(o.__awaiter)(void 0,void 0,void 0,(function(){var r,n;return Object(o.__generator)(this,(function(o){switch(o.label){case 0:return 200!==e.statusCode&&e.statusCode>=400?[2,v(e,t)]:(r={$metadata:P(e),__type:"ListPartsOutput",AbortDate:void 0,AbortRuleId:void 0,Bucket:void 0,Initiator:void 0,IsTruncated:void 0,Key:void 0,MaxParts:void 0,NextPartNumberMarker:void 0,Owner:void 0,PartNumberMarker:void 0,Parts:void 0,RequestCharged:void 0,StorageClass:void 0,UploadId:void 0},void 0!==e.headers["x-amz-abort-date"]&&(r.AbortDate=new Date(e.headers["x-amz-abort-date"])),void 0!==e.headers["x-amz-abort-rule-id"]&&(r.AbortRuleId=e.headers["x-amz-abort-rule-id"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,T(e.body,t)]);case 1:return void 0!==(n=o.sent()).Bucket&&(r.Bucket=n.Bucket),void 0!==n.Initiator&&(r.Initiator=E(n.Initiator,t)),void 0!==n.IsTruncated&&(r.IsTruncated="true"==n.IsTruncated),void 0!==n.Key&&(r.Key=n.Key),void 0!==n.MaxParts&&(r.MaxParts=parseInt(n.MaxParts)),void 0!==n.NextPartNumberMarker&&(r.NextPartNumberMarker=parseInt(n.NextPartNumberMarker)),void 0!==n.Owner&&(r.Owner=C(n.Owner,t)),void 0!==n.PartNumberMarker&&(r.PartNumberMarker=parseInt(n.PartNumberMarker)),""===n.Part&&(r.Parts=[]),void 0!==n.Part&&(r.Parts=j(Object(a.getArrayIfSingleItem)(n.Part),t)),void 0!==n.StorageClass&&(r.StorageClass=n.StorageClass),void 0!==n.UploadId&&(r.UploadId=n.UploadId),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(a.Command),Ae=r(15),Me=r(65);function Te(e){return(Te="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 ke=function(){return(ke=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ue=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Re=function(e,t){var r,n,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(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=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],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Ne=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ie=new n.ConsoleLogger("AWSS3ProviderManagedUpload"),ze=function(){function e(e,t,r){this.minPartSize=5242880,this.queueSize=4,this.body=null,this.params=null,this.opts=null,this.multiPartMap=[],this.cancel=!1,this.bytesUploaded=0,this.totalBytesToUpload=0,this.emitter=null,this.params=e,this.opts=t,this.emitter=r}return e.prototype.upload=function(){return Ue(this,void 0,void 0,(function(){var e,t,r,n,o,i;return Re(this,(function(a){switch(a.label){case 0:return e=this,[4,this.validateAndSanitizeBody(this.params.Body)];case 1:return e.body=a.sent(),this.totalBytesToUpload=this.byteLength(this.body),this.totalBytesToUpload<=this.minPartSize?(this.params.Body=this.body,t=new Oe(this.params),[2,this._createNewS3Client(this.opts,this.emitter).send(t)]):[3,2];case 2:return[4,this.createMultiPartUpload()];case 3:r=a.sent(),n=Math.ceil(this.totalBytesToUpload/this.minPartSize),o=0,a.label=4;case 4:return o<n?[4,this.checkIfUploadCancelled(r)]:[3,9];case 5:return a.sent(),i=this.createParts(o),[4,this.uploadParts(r,i)];case 6:return a.sent(),[4,this.checkIfUploadCancelled(r)];case 7:a.sent(),a.label=8;case 8:return o+=this.queueSize,[3,4];case 9:return[4,this.finishMultiPartUpload(r)];case 10:return[2,a.sent()]}}))}))},e.prototype.createParts=function(e){for(var t=[],r=e,n=e*this.minPartSize;n<this.totalBytesToUpload&&t.length<this.queueSize;){var o=Math.min(n+this.minPartSize,this.totalBytesToUpload);t.push({bodyPart:this.body.slice(n,o),partNumber:++r,emitter:new Ae.EventEmitter,_lastUploadedBytes:0}),n+=this.minPartSize}return t},e.prototype.createMultiPartUpload=function(){return Ue(this,void 0,void 0,(function(){var e,t;return Re(this,(function(r){switch(r.label){case 0:return e=new Ee(this.params),[4,this._createNewS3Client(this.opts).send(e)];case 1:return t=r.sent(),Ie.debug(t.UploadId),[2,t.UploadId]}}))}))},e.prototype.uploadParts=function(e,t){return Ue(this,void 0,void 0,(function(){var r,n,o,i,a,s,u,c,d,l,f,h;return Re(this,(function(p){switch(p.label){case 0:r=[];try{for(n=Ne(t),o=n.next();!o.done;o=n.next())i=o.value,this.setupEventListener(i),a={PartNumber:i.partNumber,Body:i.bodyPart,UploadId:e,Key:this.params.Key,Bucket:this.params.Bucket},s=new xe(a),u=this._createNewS3Client(this.opts,i.emitter),r.push(u.send(s))}catch(e){f={error:e}}finally{try{o&&!o.done&&(h=n.return)&&h.call(n)}finally{if(f)throw f.error}}p.label=1;case 1:return p.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:for(c=p.sent(),d=0;d<c.length;d++)this.multiPartMap.push({PartNumber:t[d].partNumber,ETag:c[d].ETag});return[3,4];case 3:return l=p.sent(),Ie.error("error happened while uploading a part. Cancelling the multipart upload",l),this.cancelUpload(),[2];case 4:return[2]}}))}))},e.prototype.finishMultiPartUpload=function(e){return Ue(this,void 0,void 0,(function(){var t,r,n,o;return Re(this,(function(i){switch(i.label){case 0:t={Bucket:this.params.Bucket,Key:this.params.Key,UploadId:e,MultipartUpload:{Parts:this.multiPartMap}},r=new Ce(t),n=this._createNewS3Client(this.opts),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n.send(r)];case 2:return[2,i.sent().Key];case 3:return o=i.sent(),Ie.error("error happened while finishing the upload. Cancelling the multipart upload",o),this.cancelUpload(),[2];case 4:return[2]}}))}))},e.prototype.checkIfUploadCancelled=function(e){return Ue(this,void 0,void 0,(function(){var t,r;return Re(this,(function(n){switch(n.label){case 0:if(!this.cancel)return[3,5];t="Upload was cancelled.",n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.cleanup(e)];case 2:return n.sent(),[3,4];case 3:return r=n.sent(),t+=r.errorMessage,[3,4];case 4:throw new Error(t);case 5:return[2]}}))}))},e.prototype.cancelUpload=function(){this.cancel=!0},e.prototype.cleanup=function(e){return Ue(this,void 0,void 0,(function(){var t,r,n;return Re(this,(function(o){switch(o.label){case 0:return this.body=null,this.multiPartMap=[],this.bytesUploaded=0,this.totalBytesToUpload=0,t={Bucket:this.params.Bucket,Key:this.params.Key,UploadId:e},[4,(r=this._createNewS3Client(this.opts)).send(new je(t))];case 1:return o.sent(),[4,r.send(new Pe(t))];case 2:if((n=o.sent())&&n.Parts&&n.Parts.length>0)throw new Error("Multi Part upload clean up failed");return[2]}}))}))},e.prototype.setupEventListener=function(e){var t=this;e.emitter.on("sendProgress",(function(r){t.progressChanged(e.partNumber,r.loaded-e._lastUploadedBytes),e._lastUploadedBytes=r.loaded}))},e.prototype.progressChanged=function(e,t){this.bytesUploaded+=t,this.emitter.emit("sendProgress",{loaded:this.bytesUploaded,total:this.totalBytesToUpload,part:e,key:this.params.Key})},e.prototype.byteLength=function(e){if(null==e)return 0;if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.length)return e.length;if("number"==typeof e.size)return e.size;if("string"!=typeof e.path)throw new Error("Cannot determine length of "+e)},e.prototype.validateAndSanitizeBody=function(e){return Ue(this,void 0,void 0,(function(){return Re(this,(function(t){switch(t.label){case 0:return this.isGenericObject(e)?[2,JSON.stringify(e)]:[3,1];case 1:return this.isBlob(e)?n.Platform.isReactNative?[4,Object(q.streamCollector)(e)]:[3,3]:[3,4];case 2:return[2,t.sent()];case 3:case 4:return[2,e]}}))}))},e.prototype.isBlob=function(e){return"undefined"!=typeof Blob&&e instanceof Blob},e.prototype.isGenericObject=function(e){if(null!==e&&"object"===Te(e))try{return!(this.byteLength(e)>=0)}catch(e){return!0}return!1},e.prototype._createNewS3Client=function(e,t){var r=e.region,o=e.credentials,i={};e.dangerouslyConnectToHttpEndpointForTesting&&(i={endpoint:"http://localhost:20005",tls:!1,bucketEndpoint:!1,forcePathStyle:!0});var a=new he(ke(ke({region:r,credentials:o},i),{requestHandler:new we({},t),customUserAgent:Object(n.getAmplifyUserAgent)(),urlParser:Me.parseUrl}));return a.middlewareStack.remove("contentLengthMiddleware"),a},e}();function Le(e){return(Le="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 De=function(){return(De=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Be=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},He=function(e,t){var r,n,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(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=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],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},qe=new n.ConsoleLogger("AWSS3Provider"),Ke="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",Fe=function(e,t,r,o,i){if(e){var a={attrs:r};o&&(a.metrics=o),n.Hub.dispatch("storage",{event:t,data:a,message:i},"Storage",Ke)}},Ve=function(){function e(e){this._config=e||{},qe.debug("Storage Options",this._config)}return e.prototype.getCategory=function(){return e.CATEGORY},e.prototype.getProviderName=function(){return e.PROVIDER_NAME},e.prototype.configure=function(e){if(qe.debug("configure Storage",e),!e)return this._config;var t=n.Parser.parseMobilehubConfig(e);return this._config=Object.assign({},this._config,t.Storage),this._config.bucket||qe.debug("Do not have bucket yet"),this._config},e.prototype.get=function(e,t){return Be(this,void 0,void 0,(function(){var r,n,o,i,a,s,u,c,d,l,f,h,p,v,g,y,m,b,_,w,S,O;return He(this,(function(E){switch(E.label){case 0:return[4,this._ensureCredentials()];case 1:if(!E.sent())return[2,Promise.reject("No credentials")];if(r=Object.assign({},this._config,t),n=r.bucket,o=r.download,i=r.cacheControl,a=r.contentDisposition,s=r.contentEncoding,u=r.contentLanguage,c=r.contentType,d=r.expires,l=r.track,f=this._prefix(r),h=f+e,p=this._createNewS3Client(r),qe.debug("get "+e+" from "+h),v={Bucket:n,Key:h},i&&(v.ResponseCacheControl=i),a&&(v.ResponseContentDisposition=a),s&&(v.ResponseContentEncoding=s),u&&(v.ResponseContentLanguage=u),c&&(v.ResponseContentType=c),!0!==o)return[3,5];g=new I(v),E.label=2;case 2:return E.trys.push([2,4,,5]),[4,p.send(g)];case 3:return y=E.sent(),Fe(l,"download",{method:"get",result:"success"},{fileSize:Number(y.Body.size||y.Body.length)},"Download success for "+e),[2,y];case 4:throw m=E.sent(),Fe(l,"download",{method:"get",result:"failed"},null,"Download failed with "+m.message),m;case 5:v.Expires=d||900,E.label=6;case 6:return E.trys.push([6,9,,10]),b=new ge.S3RequestPresigner(De({},p.config)),[4,Object(ve.createRequest)(p,new I(v))];case 7:return _=E.sent(),S=pe.formatUrl,[4,b.presign(_,{expiresIn:v.Expires})];case 8:return w=S.apply(void 0,[E.sent()]),Fe(l,"getSignedUrl",{method:"get",result:"success"},null,"Signed URL: "+w),[2,w];case 9:throw O=E.sent(),qe.warn("get signed url error",O),Fe(l,"getSignedUrl",{method:"get",result:"failed"},null,"Could not get a signed URL for "+e),O;case 10:return[2]}}))}))},e.prototype.put=function(e,t,r){return Be(this,void 0,void 0,(function(){var n,o,i,a,s,u,c,d,l,f,h,p,v,g,y,m,b,_,w,S,O,E,x,C;return He(this,(function(j){switch(j.label){case 0:return[4,this._ensureCredentials()];case 1:if(!j.sent())return[2,Promise.reject("No credentials")];n=Object.assign({},this._config,r),o=n.bucket,i=n.track,a=n.progressCallback,s=n.contentType,u=n.contentDisposition,c=n.cacheControl,d=n.expires,l=n.metadata,f=n.tagging,h=n.acl,p=n.serverSideEncryption,v=n.SSECustomerAlgorithm,g=n.SSECustomerKey,y=n.SSECustomerKeyMD5,m=n.SSEKMSKeyId,b=s||"binary/octet-stream",_=this._prefix(n),w=_+e,qe.debug("put "+e+" to "+w),S={Bucket:o,Key:w,Body:t,ContentType:b},c&&(S.CacheControl=c),u&&(S.ContentDisposition=u),d&&(S.Expires=d),l&&(S.Metadata=l),f&&(S.Tagging=f),p&&(S.ServerSideEncryption=p,v&&(S.SSECustomerAlgorithm=v),g&&(S.SSECustomerKey=g),y&&(S.SSECustomerKeyMD5=y),m&&(S.SSEKMSKeyId=m)),O=new Ae.EventEmitter,E=new ze(S,n,O),h&&(S.ACL=h),j.label=2;case 2:return j.trys.push([2,4,,5]),O.on("sendProgress",(function(e){a&&("function"==typeof a?a(e):qe.warn("progressCallback should be a function, not a "+Le(a)))})),[4,E.upload()];case 3:return x=j.sent(),qe.debug("upload result",x),Fe(i,"upload",{method:"put",result:"success"},null,"Upload success for "+e),[2,{key:e}];case 4:throw C=j.sent(),qe.warn("error uploading",C),Fe(i,"upload",{method:"put",result:"failed"},null,"Error uploading "+e),C;case 5:return[2]}}))}))},e.prototype.remove=function(e,t){return Be(this,void 0,void 0,(function(){var r,n,o,i,a,s,u,c,d;return He(this,(function(l){switch(l.label){case 0:return[4,this._ensureCredentials()];case 1:if(!l.sent())return[2,Promise.reject("No credentials")];r=Object.assign({},this._config,t),n=r.bucket,o=r.track,i=this._prefix(r),a=i+e,s=this._createNewS3Client(r),qe.debug("remove "+e+" from "+a),u=new z({Bucket:n,Key:a}),l.label=2;case 2:return l.trys.push([2,4,,5]),[4,s.send(u)];case 3:return c=l.sent(),Fe(o,"delete",{method:"remove",result:"success"},null,"Deleted "+e+" successfully"),[2,c];case 4:throw d=l.sent(),Fe(o,"delete",{method:"remove",result:"failed"},null,"Deletion of "+e+" failed with "+d),d;case 5:return[2]}}))}))},e.prototype.list=function(e,t){return Be(this,void 0,void 0,(function(){var r,n,o,i,a,s,u,c,d,l,f;return He(this,(function(h){switch(h.label){case 0:return[4,this._ensureCredentials()];case 1:if(!h.sent())return[2,Promise.reject("No credentials")];r=Object.assign({},this._config,t),n=r.bucket,o=r.track,i=r.maxKeys,a=this._prefix(r),s=a+e,u=this._createNewS3Client(r),qe.debug("list "+e+" from "+s),c=new L({Bucket:n,Prefix:s,MaxKeys:i}),h.label=2;case 2:return h.trys.push([2,4,,5]),[4,u.send(c)];case 3:return d=h.sent(),l=[],d&&d.Contents&&(l=d.Contents.map((function(e){return{key:e.Key.substr(a.length),eTag:e.ETag,lastModified:e.LastModified,size:e.Size}}))),Fe(o,"list",{method:"list",result:"success"},null,l.length+" items returned from list operation"),qe.debug("list",l),[2,l];case 4:throw f=h.sent(),qe.warn("list error",f),Fe(o,"list",{method:"list",result:"failed"},null,"Listing items failed: "+f.message),f;case 5:return[2]}}))}))},e.prototype._ensureCredentials=function(){var e=this;return n.Credentials.get().then((function(t){if(!t)return!1;var r=n.Credentials.shear(t);return qe.debug("set credentials for storage",r),e._config.credentials=r,!0})).catch((function(e){return qe.warn("ensure credentials error",e),!1}))},e.prototype._prefix=function(e){var t=e.credentials,r=e.level,n=e.customPrefix||{},o=e.identityId||t.identityId,i=(void 0!==n.private?n.private:"private/")+o+"/",a=(void 0!==n.protected?n.protected:"protected/")+o+"/",s=void 0!==n.public?n.public:"public/";switch(r){case"private":return i;case"protected":return a;default:return s}},e.prototype._createNewS3Client=function(e,t){var r=e.region,o=e.credentials,i={};return e.dangerouslyConnectToHttpEndpointForTesting&&(i={endpoint:"http://localhost:20005",tls:!1,bucketEndpoint:!1,forcePathStyle:!0}),new he(De(De({region:r,credentials:o,customUserAgent:Object(n.getAmplifyUserAgent)()},i),{requestHandler:new we({},t)}))},e.CATEGORY="Storage",e.PROVIDER_NAME="AWSS3",e}(),Ge=function(){return(Ge=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},$e=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Ye=function(e,t){var r,n,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(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=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],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},We=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},Xe=new n.ConsoleLogger("StorageClass"),Ze=function(){function e(){this._config={},this._pluggables=[],Xe.debug("Storage Options",this._config),this.get=this.get.bind(this),this.put=this.put.bind(this),this.remove=this.remove.bind(this),this.list=this.list.bind(this),n.Amplify.register(this)}return e.prototype.getModuleName=function(){return"Storage"},e.prototype.addPluggable=function(e){if(e&&"Storage"===e.getCategory()){this._pluggables.push(e);return e.configure(this._config[e.getProviderName()])}},e.prototype.getPluggable=function(e){var t=this._pluggables.find((function(t){return t.getProviderName()===e}));return void 0===t?(Xe.debug("No plugin found with providerName",e),null):t},e.prototype.removePluggable=function(e){this._pluggables=this._pluggables.filter((function(t){return t.getProviderName()!==e}))},e.prototype.configure=function(e){var t=this;if(Xe.debug("configure Storage"),!e)return this._config;var r=n.Parser.parseMobilehubConfig(e),o=Object.keys(r.Storage),i=["bucket","region","level","track","customPrefix","serverSideEncryption","SSECustomerAlgorithm","SSECustomerKey","SSECustomerKeyMD5","SSEKMSKeyId"],a=function(e){return i.some((function(t){return t===e}))};return o&&o.find((function(e){return a(e)}))&&!r.Storage.AWSS3&&(r.Storage.AWSS3={}),Object.entries(r.Storage).map((function(e){var t=We(e,2),n=t[0],o=t[1];n&&a(n)&&void 0!==o&&(r.Storage.AWSS3[n]=o,delete r.Storage[n])})),Object.keys(r.Storage).forEach((function(e){"string"!=typeof r.Storage[e]&&(t._config[e]=Ge(Ge({},t._config[e]),r.Storage[e]))})),this._pluggables.forEach((function(e){e.configure(t._config[e.getProviderName()])})),0===this._pluggables.length&&this.addPluggable(new Ve),this._config},e.prototype.get=function(e,t){return $e(this,void 0,void 0,(function(){var r,n,o;return Ye(this,(function(i){return r=(t||{}).provider,n=void 0===r?"AWSS3":r,void 0===(o=this._pluggables.find((function(e){return e.getProviderName()===n})))&&(Xe.debug("No plugin found with providerName",n),Promise.reject("No plugin found in Storage for the provider")),[2,o.get(e,t)]}))}))},e.prototype.put=function(e,t,r){return $e(this,void 0,void 0,(function(){var n,o,i;return Ye(this,(function(a){return n=(r||{}).provider,o=void 0===n?"AWSS3":n,void 0===(i=this._pluggables.find((function(e){return e.getProviderName()===o})))&&(Xe.debug("No plugin found with providerName",o),Promise.reject("No plugin found in Storage for the provider")),[2,i.put(e,t,r)]}))}))},e.prototype.remove=function(e,t){return $e(this,void 0,void 0,(function(){var r,n,o;return Ye(this,(function(i){return r=(t||{}).provider,n=void 0===r?"AWSS3":r,void 0===(o=this._pluggables.find((function(e){return e.getProviderName()===n})))&&(Xe.debug("No plugin found with providerName",n),Promise.reject("No plugin found in Storage for the provider")),[2,o.remove(e,t)]}))}))},e.prototype.list=function(e,t){return $e(this,void 0,void 0,(function(){var r,n,o;return Ye(this,(function(i){return r=(t||{}).provider,n=void 0===r?"AWSS3":r,void 0===(o=this._pluggables.find((function(e){return e.getProviderName()===n})))&&(Xe.debug("No plugin found with providerName",n),Promise.reject("No plugin found in Storage for the provider")),[2,o.list(e,t)]}))}))},e}(),Qe=function(){return(Qe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Je=new n.ConsoleLogger("Storage"),et=null,tt=function(){if(et)return et;Je.debug("Create Storage Instance, debug"),(et=new Ze).vault=new Ze;var e=et.configure;return et.configure=function(t){Je.debug("storage configure called");var r=Qe({},e.call(et,t));Object.keys(r).forEach((function(e){"string"!=typeof r[e]&&(r[e]=Qe(Qe({},r[e]),{level:"private"}))})),Je.debug("storage vault configure called"),et.vault.configure(r)},et}();t.default=tt}])}));
//# sourceMappingURL=aws-amplify-storage.min.js.map