@aws-amplify/geo 1.3.25-unstable.2 → 1.3.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/build.js +5 -0
- package/dist/aws-amplify-geo.js +29284 -0
- package/dist/aws-amplify-geo.js.map +1 -0
- package/dist/aws-amplify-geo.min.js +56 -0
- package/dist/aws-amplify-geo.min.js.map +1 -0
- package/index.js +7 -0
- package/lib/Geo.js +82 -21
- package/lib/Geo.js.map +1 -1
- package/lib/Providers/AmazonLocationServiceProvider.js +112 -33
- package/lib/Providers/AmazonLocationServiceProvider.js.map +1 -1
- package/lib/util.js +47 -8
- package/lib/util.js.map +1 -1
- package/lib-esm/Geo.js +66 -5
- package/lib-esm/Geo.js.map +1 -1
- package/lib-esm/Providers/AmazonLocationServiceProvider.js +79 -3
- package/lib-esm/Providers/AmazonLocationServiceProvider.js.map +1 -1
- package/lib-esm/util.js +39 -3
- package/lib-esm/util.js.map +1 -1
- package/package.json +9 -13
- package/src/Geo.ts +14 -4
- package/src/Providers/AmazonLocationServiceProvider.ts +12 -2
- package/src/types/Geo.ts +12 -2
- package/src/types/Provider.ts +12 -2
- package/src/util.ts +12 -2
- package/webpack.config.dev.js +6 -0
- package/lib/Geo.d.ts +0 -110
- package/lib/Providers/AmazonLocationServiceProvider.d.ts +0 -105
- package/lib/index.d.ts +0 -2
- package/lib/types/AmazonLocationServiceProvider.d.ts +0 -24
- package/lib/types/Geo.d.ts +0 -114
- package/lib/types/Provider.d.ts +0 -16
- package/lib/types/index.d.ts +0 -3
- package/lib/util.d.ts +0 -7
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("aws_amplify_core")):"function"==typeof define&&define.amd?define("aws_amplify_geo",["aws_amplify_core"],t):"object"==typeof exports?exports.aws_amplify_geo=t(require("aws_amplify_core")):e.aws_amplify_geo=t(e.aws_amplify_core)}(window,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=44)}([function(t,n){t.exports=e},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return a}));var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function a(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),o=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var o=e.getVersionPrecision(t),i=e.getVersionPrecision(n),u=Math.max(o,i),a=0,s=e.map([t,n],(function(t){var n=u-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(a=u-Math.min(o,i)),u-=1;u>=a;){if(s[0][u]>s[1][u])return 1;if(s[0][u]===s[1][u]){if(u===a)return 0;u-=1}else if(s[0][u]<s[1][u])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var o=e[n];if(t(o,n))return o}},e.assign=function(e){for(var t,n,r=e,o=arguments.length,i=new Array(o>1?o-1:0),u=1;u<o;u++)i[u-1]=arguments[u];if(Object.assign)return Object.assign.apply(Object,[e].concat(i));var a=function(){var e=i[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=i.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=o,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(91))&&r.__esModule?r:{default:r},i=n(18);function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new o.default(e,t)},e.parse=function(e){return new o.default(e).getResult()},t=e,(n=[{key:"BROWSER_MAP",get:function(){return i.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return i.ENGINE_MAP}},{key:"OS_MAP",get:function(){return i.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return i.PLATFORMS_MAP}}])&&u(t,n),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(92)),o=s(n(93)),i=s(n(94)),u=s(n(95)),a=s(n(17));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(u.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,o={},i=0;if(Object.keys(e).forEach((function(t){var u=e[t];"string"==typeof u?(o[t]=u,i+=1):"object"==typeof u&&(n[t]=u,r+=1)})),r>0){var u=Object.keys(n),s=a.default.find(u,(function(e){return t.isOS(e)}));if(s){var c=this.satisfies(n[s]);if(void 0!==c)return c}var l=a.default.find(u,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(n[l]);if(void 0!==f)return f}}if(i>0){var d=Object.keys(o),h=a.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(o[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),o=a.default.getBrowserTypeByAlias(r);return t&&o&&(r=o.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,o=this.getBrowserVersion();if("string"==typeof o)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(o,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=/version\/(\d+(\.?_?\d+)+)/i,u=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=o.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=o.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=o.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=o.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=o.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=o.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=o.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=o.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=o.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=o.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=o.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=o.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=o.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=o.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=o.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=o.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=o.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=o.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=o.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=o.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=o.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=o.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=o.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=o.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=o.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=o.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=o.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:o.default.getFirstMatch(t,e),version:o.default.getSecondMatch(t,e)}}}];t.default=u,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),u=[{test:[/Roku\/DVP/],describe:function(e){var t=o.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:i.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=o.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=o.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=o.default.getWindowsVersionName(t);return{name:i.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:i.OS_MAP.iOS},n=o.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=o.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=o.default.getMacOSVersionName(t),r={name:i.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=o.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:i.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=o.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=o.default.getAndroidVersionName(t),r={name:i.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=o.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:i.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=o.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||o.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||o.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:i.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=o.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=o.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:i.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:i.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=o.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.PlayStation4,version:t}}}];t.default=u,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),u=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=o.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:i.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=o.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:i.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}}];t.default=u,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),u=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:i.ENGINE_MAP.Blink};var t=o.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:i.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:i.ENGINE_MAP.Trident},n=o.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:i.ENGINE_MAP.Presto},n=o.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:i.ENGINE_MAP.Gecko},n=o.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:i.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:i.ENGINE_MAP.WebKit},n=o.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=u,e.exports=t.default}})},function(e,t,n){"use strict";const r=n(18),o=n(19),i=n(20),u=new i({maxSize:1e5}),a=e=>!("object"!=typeof e||null===e||e instanceof RegExp||e instanceof Error||e instanceof Date),s=(e,t)=>{if(!a(e))return e;t={deep:!1,pascalCase:!1,...t};const{exclude:n,pascalCase:i,stopPaths:s,deep:c}=t,l=new Set(s),f=e=>(t,s)=>{if(c&&a(s)){const n=void 0===e?t:`${e}.${t}`;l.has(n)||(s=r(s,f(n)))}if(!n||!((e,t)=>e.some(e=>"string"==typeof e?e===t:(e.lastIndex=0,e.test(t))))(n,t)){const e=i?`${t}_`:t;if(u.has(e))t=u.get(e);else{const n=o(t,{pascalCase:i});t.length<100&&u.set(e,n),t=n}}return[t,s]};return r(e,f(void 0))};e.exports=(e,t)=>Array.isArray(e)?Object.keys(e).map(n=>s(e[n],t)):s(e,t)},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return u})),n.d(t,"__decorate",(function(){return a})),n.d(t,"__param",(function(){return s})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return g})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return w})),n.d(t,"__asyncDelegator",(function(){return b})),n.d(t,"__asyncValues",(function(){return D})),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return A})),n.d(t,"__importDefault",(function(){return C})),n.d(t,"__classPrivateFieldGet",(function(){return F})),n.d(t,"__classPrivateFieldSet",(function(){return _}));
|
|
2
|
+
/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */
|
|
16
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function u(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function a(e,t,n,r){var o,i=arguments.length,u=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(u=(i<3?o(u):i>3?o(t,n,u):o(t,n))||u);return i>3&&u&&Object.defineProperty(t,n,u),u}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function w(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},u("next"),u("throw"),u("return"),r[Symbol.asyncIterator]=function(){return this},r;function u(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function D(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function C(e){return e&&e.__esModule?e:{default:e}}function F(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function _(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"locateWindow",(function(){return o}));const r={};function o(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:r}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var s,c=[],l=!1,f=-1;function d(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&h())}function h(){if(!l){var e=a(d);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f<t;)s&&s[f].run();f=-1,t=c.length}s=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function 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 n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||l||a(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,n){"use strict";(function(e){}).call(this,n(6))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(22),o=n(9),i=n(45),u=n(5),a=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,u.locateWindow)().msCrypto.subtle.importKey("raw",s(e),o.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&t(r.result),n(new Error("ImportKey completed without importing key."))},r.onerror=function(){n(new Error("ImportKey failed to import key."))}}))}(e).then((function(e){return(0,u.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,u.locateWindow)().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;(0,r.isEmptyData)(e)||(this.operation=this.operation.then((function(n){return n.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},n.process(s(e)),n})),this.operation.catch((function(){})))},e.prototype.digest=function(){return this.operation.then((function(e){return new Promise((function(t,n){e.onerror=function(){n(new Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(new Error("Error encountered finalizing hash"))},e.finish()}))}))},e}();function s(e){return"string"==typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(11),o=n(9),i=n(5),u=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return(0,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(23);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(29);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(30);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var u=n(31);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return u.uint32ArrayFrom}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return u})),n.d(t,"__decorate",(function(){return a})),n.d(t,"__param",(function(){return s})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return g})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return w})),n.d(t,"__asyncDelegator",(function(){return b})),n.d(t,"__asyncValues",(function(){return D})),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return A})),n.d(t,"__importDefault",(function(){return C})),n.d(t,"__classPrivateFieldGet",(function(){return F})),n.d(t,"__classPrivateFieldSet",(function(){return _}));
|
|
17
|
+
/*! *****************************************************************************
|
|
18
|
+
Copyright (c) Microsoft Corporation.
|
|
19
|
+
|
|
20
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
21
|
+
purpose with or without fee is hereby granted.
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
24
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
25
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
26
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
27
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
28
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
29
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
30
|
+
***************************************************************************** */
|
|
31
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function u(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function a(e,t,n,r){var o,i=arguments.length,u=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(u=(i<3?o(u):i>3?o(t,n,u):o(t,n))||u);return i>3&&u&&Object.defineProperty(t,n,u),u}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function w(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},u("next"),u("throw"),u("return"),r[Symbol.asyncIterator]=function(){return this},r;function u(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function D(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function C(e){return e&&e.__esModule?e:{default:e}}function F(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function _(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u}));var r=n(1),o=n(17),i={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},u=function(t){return{applyToStack:function(n){n.add(function(t){return function(n){return function(i){return Object(r.b)(void 0,void 0,void 0,(function(){var u,a,s,c;return Object(r.c)(this,(function(l){return u=i.request,!o.a.isInstance(u)||"node"!==t.runtime||u.headers.hasOwnProperty("X-Amzn-Trace-Id")?[2,n(i)]:(a=e.env.AWS_LAMBDA_FUNCTION_NAME,s=e.env._X_AMZN_TRACE_ID,(c=function(e){return"string"==typeof e&&e.length>0})(a)&&c(s)&&(u.headers["X-Amzn-Trace-Id"]=s),[2,n(Object(r.a)(Object(r.a)({},i),{request:u}))])}))}))}}}(t),i)}}}}).call(this,n(6))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(4).__exportStar)(n(21),t);var r=n(8);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(10);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},function(e){e.exports=JSON.parse('{"name":"@aws-sdk/client-location","description":"AWS SDK for JavaScript Location Client for Node.js, Browser and React Native","version":"3.186.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"tsc -p tsconfig.cjs.json","build:docs":"typedoc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"2.0.0","@aws-crypto/sha256-js":"2.0.0","@aws-sdk/client-sts":"3.186.0","@aws-sdk/config-resolver":"3.186.0","@aws-sdk/credential-provider-node":"3.186.0","@aws-sdk/fetch-http-handler":"3.186.0","@aws-sdk/hash-node":"3.186.0","@aws-sdk/invalid-dependency":"3.186.0","@aws-sdk/middleware-content-length":"3.186.0","@aws-sdk/middleware-host-header":"3.186.0","@aws-sdk/middleware-logger":"3.186.0","@aws-sdk/middleware-recursion-detection":"3.186.0","@aws-sdk/middleware-retry":"3.186.0","@aws-sdk/middleware-serde":"3.186.0","@aws-sdk/middleware-signing":"3.186.0","@aws-sdk/middleware-stack":"3.186.0","@aws-sdk/middleware-user-agent":"3.186.0","@aws-sdk/node-config-provider":"3.186.0","@aws-sdk/node-http-handler":"3.186.0","@aws-sdk/protocol-http":"3.186.0","@aws-sdk/smithy-client":"3.186.0","@aws-sdk/types":"3.186.0","@aws-sdk/url-parser":"3.186.0","@aws-sdk/util-base64-browser":"3.186.0","@aws-sdk/util-base64-node":"3.186.0","@aws-sdk/util-body-length-browser":"3.186.0","@aws-sdk/util-body-length-node":"3.186.0","@aws-sdk/util-defaults-mode-browser":"3.186.0","@aws-sdk/util-defaults-mode-node":"3.186.0","@aws-sdk/util-user-agent-browser":"3.186.0","@aws-sdk/util-user-agent-node":"3.186.0","@aws-sdk/util-utf8-browser":"3.186.0","@aws-sdk/util-utf8-node":"3.186.0","tslib":"^2.3.1"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.186.0","@tsconfig/recommended":"1.0.1","@types/node":"^12.7.5","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typedoc":"0.19.2","typescript":"~4.6.2"},"overrides":{"typedoc":{"typescript":"~4.6.2"}},"engines":{"node":">=12.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-location","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-location"}}')},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1),o=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?"".concat(e.protocol,":"):e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/".concat(e.path):e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(Object(r.a)(Object(r.a)({},this),{headers:Object(r.a)({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var o,i=t[n];return Object(r.a)(Object(r.a)({},e),((o={})[n]=Array.isArray(i)?Object(r.e)([],Object(r.d)(i),!1):i,o))}),{}))),n},e}();!function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}()},function(e,t,n){"use strict";const r=e=>"object"==typeof e&&null!==e,o=Symbol("skip"),i=e=>r(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date),u=(e,t,n,r=new WeakMap)=>{if(n={deep:!1,target:{},...n},r.has(e))return r.get(e);r.set(e,n.target);const{target:a}=n;delete n.target;const s=e=>e.map(e=>i(e)?u(e,t,n,r):e);if(Array.isArray(e))return s(e);for(const[c,l]of Object.entries(e)){const f=t(c,l,e);if(f===o)continue;let[d,h,{shouldRecurse:p=!0}={}]=f;"__proto__"!==d&&(n.deep&&p&&i(h)&&(h=Array.isArray(h)?s(h):u(h,t,n,r)),a[d]=h)}return a};e.exports=(e,t,n)=>{if(!r(e))throw new TypeError(`Expected an object, got \`${e}\` (${typeof e})`);return u(e,t,n)},e.exports.mapObjectSkip=o},function(e,t,n){"use strict";const r=(e,t)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");t=Object.assign({pascalCase:!1},t);return 0===(e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join("-"):e.trim()).length?"":1===e.length?t.pascalCase?e.toUpperCase():e.toLowerCase():(e!==e.toLowerCase()&&(e=(e=>{let t=!1,n=!1,r=!1;for(let o=0;o<e.length;o++){const i=e[o];t&&/[a-zA-Z]/.test(i)&&i.toUpperCase()===i?(e=e.slice(0,o)+"-"+e.slice(o),t=!1,r=n,n=!0,o++):n&&r&&/[a-zA-Z]/.test(i)&&i.toLowerCase()===i?(e=e.slice(0,o-1)+"-"+e.slice(o-1),r=n,n=!1,t=!0):(t=i.toLowerCase()===i&&i.toUpperCase()!==i,r=n,n=i.toUpperCase()===i&&i.toLowerCase()!==i)}return e})(e)),e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(e,t)=>t.toUpperCase()).replace(/\d+(\w|$)/g,e=>e.toUpperCase()),n=e,t.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n);var n};e.exports=r,e.exports.default=r},function(e,t,n){"use strict";e.exports=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){return this.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return this._size+e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(8),o=n(10),i=n(32),u=n(35),a=n(37),s=n(5),c=function(){function e(e){(0,u.supportsWebCrypto)((0,s.locateWindow)())?this.hash=new o.Sha256(e):(0,a.isMsWindow)((0,s.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(46),o=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:r.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?o(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,n(24).Buffer)},function(e,t,n){"use strict";(function(e){
|
|
32
|
+
/*!
|
|
33
|
+
* The buffer module from node.js, for the browser.
|
|
34
|
+
*
|
|
35
|
+
* @author Feross Aboukhadijeh <http://feross.org>
|
|
36
|
+
* @license MIT
|
|
37
|
+
*/
|
|
38
|
+
var r=n(26),o=n(27),i=n(28);function u(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(u()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=s.prototype:(null===e&&(e=new s(t)),e.length=t),e}function s(e,t,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);s.TYPED_ARRAY_SUPPORT?(e=t).__proto__=s.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),o=(e=a(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(s.isBuffer(t)){var n=0|h(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):d(e,t);if("Buffer"===t.type&&i(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=a(e,t<0?0:0|h(t)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|h(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function h(e){if(e>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(r)return z(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return S(this,t,n);case"latin1":case"binary":return x(this,t,n);case"base64":return F(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,o);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,o){var i,u=1,a=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;u=2,a/=2,s/=2,n/=2}function c(e,t){return 1===u?e[t]:e.readUInt16BE(t*u)}if(o){var l=-1;for(i=n;i<a;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===s)return l*u}else-1!==l&&(i-=i-l),l=-1}else for(n+s>a&&(n=a-s),i=n;i>=0;i--){for(var f=!0,d=0;d<s;d++)if(c(e,i+d)!==c(t,d)){f=!1;break}if(f)return i}return-1}function w(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var u=0;u<r;++u){var a=parseInt(t.substr(2*u,2),16);if(isNaN(a))return u;e[n+u]=a}return u}function b(e,t,n,r){return G(z(t,e.length-n),e,n,r)}function D(e,t,n,r){return G(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return D(e,t,n,r)}function A(e,t,n,r){return G(U(t),e,n,r)}function C(e,t,n,r){return G(function(e,t){for(var n,r,o,i=[],u=0;u<e.length&&!((t-=2)<0);++u)n=e.charCodeAt(u),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function F(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,u,a,s,c=e[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(s=(31&c)<<6|63&i)>127&&(l=s);break;case 3:i=e[o+1],u=e[o+2],128==(192&i)&&128==(192&u)&&(s=(15&c)<<12|(63&i)<<6|63&u)>2047&&(s<55296||s>57343)&&(l=s);break;case 4:i=e[o+1],u=e[o+2],a=e[o+3],128==(192&i)&&128==(192&u)&&128==(192&a)&&(s=(15&c)<<18|(63&i)<<12|(63&u)<<6|63&a)>65535&&s<1114112&&(l=s)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=s,t.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},t.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=u(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,n){return c(null,e,t,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},s.allocUnsafe=function(e){return f(null,e)},s.allocUnsafeSlow=function(e){return f(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=s.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var u=e[n];if(!s.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(r,o),o+=u.length}return r},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?_(this,0,e):v.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},s.prototype.compare=function(e,t,n,r,o){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),u=(n>>>=0)-(t>>>=0),a=Math.min(i,u),c=this.slice(r,o),l=e.slice(t,n),f=0;f<a;++f)if(c[f]!==l[f]){i=c[f],u=l[f];break}return i<u?-1:u<i?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},s.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return D(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function x(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function P(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=L(e[i]);return o}function B(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function T(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,o,i){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function O(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function R(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function I(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function k(e,t,n,r,i){return i||I(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,i){return i||I(e,0,n,8),o.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),s.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=s.prototype;else{var o=t-e;n=new s(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},s.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||T(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},s.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||T(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},s.prototype.readUInt8=function(e,t){return t||T(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||T(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||T(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||T(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||T(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||T(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||T(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||T(e,4,this.length),o.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||T(e,4,this.length),o.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||T(e,8,this.length),o.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||T(e,8,this.length),o.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||M(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||M(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);M(this,e,t,n,o-1,-o)}var i=0,u=1,a=0;for(this[t]=255&e;++i<n&&(u*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/u>>0)-a&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);M(this,e,t,n,o-1,-o)}var i=n-1,u=1,a=0;for(this[t+i]=255&e;--i>=0&&(u*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/u>>0)-a&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return k(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return k(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},s.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var u=s.isBuffer(e)?e:z(new s(e,r).toString()),a=u.length;for(i=0;i<n-t;++i)this[i+t]=u[i%a]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function L(e){return e<16?"0"+e.toString(16):e.toString(16)}function z(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],u=0;u<r;++u){if((n=e.charCodeAt(u))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(u+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function U(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(25))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),u=r[0],a=r[1],s=new i(function(e,t,n){return 3*(t+n)/4-n}(0,u,a)),l=0,f=a>0?u-4:u;for(n=0;n<f;n+=4)t=o[e.charCodeAt(n)]<<18|o[e.charCodeAt(n+1)]<<12|o[e.charCodeAt(n+2)]<<6|o[e.charCodeAt(n+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;2===a&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,s[l++]=255&t);1===a&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],u=0,a=n-o;u<a;u+=16383)i.push(l(e,u,u+16383>a?a:u+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=u.length;a<s;++a)r[a]=u[a],o[u.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,u=[],a=t;a<n;a+=3)o=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),u.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return u.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){
|
|
39
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
40
|
+
t.read=function(e,t,n,r,o){var i,u,a=8*o-r-1,s=(1<<a)-1,c=s>>1,l=-7,f=n?o-1:0,d=n?-1:1,h=e[t+f];for(f+=d,i=h&(1<<-l)-1,h>>=-l,l+=a;l>0;i=256*i+e[t+f],f+=d,l-=8);for(u=i&(1<<-l)-1,i>>=-l,l+=r;l>0;u=256*u+e[t+f],f+=d,l-=8);if(0===i)i=1-c;else{if(i===s)return u?NaN:1/0*(h?-1:1);u+=Math.pow(2,r),i-=c}return(h?-1:1)*u*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var u,a,s,c=8*i-o-1,l=(1<<c)-1,f=l>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=l):(u=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-u))<1&&(u--,s*=2),(t+=u+f>=1?d/s:d*Math.pow(2,1-f))*s>=2&&(u++,s/=2),u+f>=l?(a=0,u=l):u+f>=1?(a=(t*s-1)*Math.pow(2,o),u+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),u=0));o>=8;e[n+h]=255&a,h+=p,a/=256,o-=8);for(u=u<<o|a,c+=o;c>0;e[n+h]=255&u,h+=p,u/=256,c-=8);e[n+h-p]|=128*v}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(4).__exportStar(n(33),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(4),o=n(12),i=n(34),u=n(11),a=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=(0,u.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r<o.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(r=0;r<t.byteLength;r++)t[r]=0}}return e.prototype.update=function(e){if(!(0,u.isEmptyData)(e)&&!this.error)try{this.hash.update((0,u.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.digestSync()]}))}))},e}();t.Sha256=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(12),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o<r.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<r.BLOCK_SIZE-8;o++)t.setUint8(o,0);t.setUint32(r.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(r.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(r.DIGEST_LENGTH);for(o=0;o<8;o++)i[4*o]=this.state[o]>>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],u=t[3],a=t[4],s=t[5],c=t[6],l=t[7],f=0;f<r.BLOCK_SIZE;f++){if(f<16)this.temp[f]=(255&e[4*f])<<24|(255&e[4*f+1])<<16|(255&e[4*f+2])<<8|255&e[4*f+3];else{var d=this.temp[f-2],h=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,p=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(h+this.temp[f-7]|0)+(p+this.temp[f-16]|0)}var v=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&s^~a&c)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,y=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;l=c,c=s,s=a,a=u+v|0,u=i,i=o,o=n,n=v+y|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=u,t[4]+=a,t[5]+=s,t[6]+=c,t[7]+=l},e}();t.RawSha256=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(13).__exportStar(n(36),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var r=n(13),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 u(e){return e&&o.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!i(e)||"object"!=typeof e.crypto.subtle)&&u(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=u,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:if(!u(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(38);r.__exportStar(n(39),t),r.__exportStar(n(40),t),r.__exportStar(n(41),t),r.__exportStar(n(42),t),r.__exportStar(n(43),t)},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return u})),n.d(t,"__decorate",(function(){return a})),n.d(t,"__param",(function(){return s})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return g})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return w})),n.d(t,"__asyncDelegator",(function(){return b})),n.d(t,"__asyncValues",(function(){return D})),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return A})),n.d(t,"__importDefault",(function(){return C})),n.d(t,"__classPrivateFieldGet",(function(){return F})),n.d(t,"__classPrivateFieldSet",(function(){return _}));
|
|
41
|
+
/*! *****************************************************************************
|
|
42
|
+
Copyright (c) Microsoft Corporation.
|
|
43
|
+
|
|
44
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
45
|
+
purpose with or without fee is hereby granted.
|
|
46
|
+
|
|
47
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
48
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
49
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
50
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
51
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
52
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
53
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
54
|
+
***************************************************************************** */
|
|
55
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function u(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function a(e,t,n,r){var o,i=arguments.length,u=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(u=(i<3?o(u):i>3?o(t,n,u):o(t,n))||u);return i>3&&u&&Object.defineProperty(t,n,u),u}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function w(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},u("next"),u("throw"),u("return"),r[Symbol.asyncIterator]=function(){return this},r;function u(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function D(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function C(e){return e&&e.__esModule?e:{default:e}}function F(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function _(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var r=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,n=t.getRandomValues,o=t.subtle;return r.map((function(e){return o[e]})).concat(n).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,n){"use strict";n.r(t),n.d(t,"Geo",(function(){return mo}));var r=n(0),o=n(3),i=n.n(o),u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function c(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function d(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function p(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var v;Object.create;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(v||(v={}));var y=function(e){if("function"==typeof e)return e;var t=Promise.resolve(e);return function(){return t}},g=function(e){var t,n=y(e.useDualstackEndpoint),r=e.endpoint,o=e.useFipsEndpoint,i=e.urlParser;return s(s({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:r?y("string"==typeof r?i(r):r):function(){return function(e){return l(void 0,void 0,void 0,(function(){var t,n,r,o,i,u,a;return f(this,(function(s){switch(s.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(r=s.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(r))throw new Error("Invalid region in client config");return[4,e.useDualstackEndpoint()];case 2:return o=s.sent(),[4,e.useFipsEndpoint()];case 3:return i=s.sent(),[4,e.regionInfoProvider(r,{useDualstackEndpoint:o,useFipsEndpoint:i})];case 4:if(!(u=(null!==(a=s.sent())&&void 0!==a?a:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser("".concat(n?"https:":"http:","//").concat(u))]}}))}))}(s(s({},e),{useDualstackEndpoint:n,useFipsEndpoint:o}))},isCustomEndpoint:!!r,useDualstackEndpoint:n})},m=function(e){return"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips"))},w=function(e){return m(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e},b=function(e,t){var n;void 0===e&&(e=[]);var r=t.useFipsEndpoint,o=t.useDualstackEndpoint;return null===(n=e.find((function(e){var t=e.tags;return r===t.includes("fips")&&o===t.includes("dualstack")})))||void 0===n?void 0:n.hostname},D=function(e,t){var n,r,o,i,u,a,c=t.useFipsEndpoint,l=void 0!==c&&c,f=t.useDualstackEndpoint,d=void 0!==f&&f,h=t.signingService,p=t.regionHash,v=t.partitionHash,y=function(e,t){var n,r=t.partitionHash;return null!==(n=Object.keys(r||{}).find((function(t){return r[t].regions.includes(e)})))&&void 0!==n?n:"aws"}(e,{partitionHash:v}),g=e in p?e:null!==(r=null===(n=v[y])||void 0===n?void 0:n.endpoint)&&void 0!==r?r:e,m={useFipsEndpoint:l,useDualstackEndpoint:d},w=function(e,t){var n=t.regionHostname,r=t.partitionHostname;return n||(r?r.replace("{region}",e):void 0)}(g,{regionHostname:b(null===(o=p[g])||void 0===o?void 0:o.variants,m),partitionHostname:b(null===(i=v[y])||void 0===i?void 0:i.variants,m)});if(void 0===w)throw new Error("Endpoint resolution failed for: ".concat({resolvedRegion:g,useFipsEndpoint:l,useDualstackEndpoint:d}));var D=function(e,t){var n=t.signingRegion,r=t.regionRegex,o=t.useFipsEndpoint;if(n)return n;if(o){var i=r.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),u=e.match(i);if(u)return u[0].slice(1,-1)}}(w,{signingRegion:null===(u=p[g])||void 0===u?void 0:u.signingRegion,regionRegex:v[y].regionRegex,useFipsEndpoint:l});return s(s({partition:y,signingService:h,hostname:w},D&&{signingRegion:D}),(null===(a=p[g])||void 0===a?void 0:a.signingService)&&{signingService:p[g].signingService})},E=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?"".concat(e.protocol,":"):e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/".concat(e.path):e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(s(s({},this),{headers:s({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,o=t[n];return s(s({},e),((r={})[n]=Array.isArray(o)?p([],h(o),!1):o,r))}),{}))),n},e}();var A=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}();function C(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}var F={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},_=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(r){return l(t,void 0,void 0,(function(){var t,o,i,u,a;return f(this,(function(c){if(t=r.request,E.isInstance(t)&&(o=t.body,i=t.headers,o&&-1===Object.keys(i).map((function(e){return e.toLowerCase()})).indexOf("content-length")))try{u=e(o),t.headers=s(s({},t.headers),((a={})["content-length"]=String(u),a))}catch(e){}return[2,n(s(s({},r),{request:t}))]}))}))}}}(e.bodyLengthChecker),F)}}};var S,x={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},P=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return l(void 0,void 0,void 0,(function(){var r,o;return f(this,(function(i){return E.isInstance(n.request)?(r=n.request,o=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===o?"":o).indexOf("h2")>=0&&!r.headers[":authority"]?(delete r.headers.host,r.headers[":authority"]=""):r.headers.host||(r.headers.host=r.hostname),[2,t(n)]):[2,t(n)]}))}))}}}(e),x)}}},B={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},T=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(n){return l(void 0,void 0,void 0,(function(){var r,o,i,u,a,s,l,d,h;return f(this,(function(f){switch(f.label){case 0:return r=t.clientName,o=t.commandName,i=t.inputFilterSensitiveLog,u=t.logger,a=t.outputFilterSensitiveLog,[4,e(n)];case 1:return s=f.sent(),u?("function"==typeof u.info&&(l=s.output,d=l.$metadata,h=c(l,["$metadata"]),u.info({clientName:r,commandName:o,input:i(n.input),output:a(h),metadata:d})),[2,s]):[2,s]}}))}))}}),B)}}},M=n(14);!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(S||(S={}));var O,R=S.STANDARD,I=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],k=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],N=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],j=[500,502,503,504],L=["ECONNRESET","EPIPE","ETIMEDOUT"],z=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||k.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},U=function(){function e(e){var t,n,r,o,i;this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=null!==(t=null==e?void 0:e.beta)&&void 0!==t?t:.7,this.minCapacity=null!==(n=null==e?void 0:e.minCapacity)&&void 0!==n?n:1,this.minFillRate=null!==(r=null==e?void 0:e.minFillRate)&&void 0!==r?r:.5,this.scaleConstant=null!==(o=null==e?void 0:e.scaleConstant)&&void 0!==o?o:.4,this.smooth=null!==(i=null==e?void 0:e.smooth)&&void 0!==i?i:.8;var u=this.getCurrentTimeInSeconds();this.lastThrottleTime=u,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}return e.prototype.getCurrentTimeInSeconds=function(){return Date.now()/1e3},e.prototype.getSendToken=function(){return l(this,void 0,void 0,(function(){return f(this,(function(e){return[2,this.acquireTokenBucket(1)]}))}))},e.prototype.acquireTokenBucket=function(e){return l(this,void 0,void 0,(function(){var t;return f(this,(function(n){switch(n.label){case 0:return this.enabled?(this.refillTokenBucket(),e>this.currentCapacity?(t=(e-this.currentCapacity)/this.fillRate*1e3,[4,new Promise((function(e){return setTimeout(e,t)}))]):[3,2]):[2];case 1:n.sent(),n.label=2;case 2:return this.currentCapacity=this.currentCapacity-e,[2]}}))}))},e.prototype.refillTokenBucket=function(){var e=this.getCurrentTimeInSeconds();if(this.lastTimestamp){var t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}else this.lastTimestamp=e},e.prototype.updateClientSendingRate=function(e){var t;if(this.updateMeasuredRate(),z(e)){var n=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=n,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(n),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());var r=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(r)},e.prototype.calculateTimeWindow=function(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))},e.prototype.cubicThrottle=function(e){return this.getPrecise(e*this.beta)},e.prototype.cubicSuccess=function(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)},e.prototype.enableTokenBucket=function(){this.enabled=!0},e.prototype.updateTokenBucketRate=function(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)},e.prototype.updateMeasuredRate=function(){var e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){var n=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}},e.prototype.getPrecise=function(e){return parseFloat(e.toFixed(8))},e}(),G=new Uint8Array(16);function q(){if(!O&&!(O="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return O(G)}var H=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var W=function(e){return"string"==typeof e&&H.test(e)},V=[],$=0;$<256;++$)V.push(($+256).toString(16).substr(1));var Y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(V[e[t+0]]+V[e[t+1]]+V[e[t+2]]+V[e[t+3]]+"-"+V[e[t+4]]+V[e[t+5]]+"-"+V[e[t+6]]+V[e[t+7]]+"-"+V[e[t+8]]+V[e[t+9]]+"-"+V[e[t+10]]+V[e[t+11]]+V[e[t+12]]+V[e[t+13]]+V[e[t+14]]+V[e[t+15]]).toLowerCase();if(!W(n))throw TypeError("Stringified UUID is invalid");return n};var K=function(e,t,n){var r=(e=e||{}).random||(e.rng||q)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return Y(r)},Z=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},J=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return I.includes(e.name)}(e)||z(e)||function(e){var t;return N.includes(e.name)||L.includes((null==e?void 0:e.code)||"")||j.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},Q=function(){function e(e,t){var n,r,o;this.maxAttemptsProvider=e,this.mode=S.STANDARD,this.retryDecider=null!==(n=null==t?void 0:t.retryDecider)&&void 0!==n?n:J,this.delayDecider=null!==(r=null==t?void 0:t.delayDecider)&&void 0!==r?r:Z,this.retryQuota=null!==(o=null==t?void 0:t.retryQuota)&&void 0!==o?o:function(e,t){var n,r,o,i=e,u=null!==(n=null==t?void 0:t.noRetryIncrement)&&void 0!==n?n:1,a=null!==(r=null==t?void 0:t.retryCost)&&void 0!==r?r:5,s=null!==(o=null==t?void 0:t.timeoutRetryCost)&&void 0!==o?o:10,c=e,l=function(e){return"TimeoutError"===e.name?s:a},f=function(e){return l(e)<=c};return Object.freeze({hasRetryTokens:f,retrieveRetryTokens:function(e){if(!f(e))throw new Error("No retry token available");var t=l(e);return c-=t,t},releaseRetryTokens:function(e){c+=null!=e?e:u,c=Math.min(c,i)}})}(500)}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return l(this,void 0,void 0,(function(){var e;return f(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=3,[3,3];case 3:return[2,e]}}))}))},e.prototype.retry=function(e,t,n){return l(this,void 0,void 0,(function(){var r,o,i,u,a,s,c,l;return f(this,(function(d){switch(d.label){case 0:return o=0,i=0,[4,this.getMaxAttempts()];case 1:u=d.sent(),a=t.request,E.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=K()),s=function(){var s,l,d,h,p,v,y,g;return f(this,(function(f){switch(f.label){case 0:return f.trys.push([0,4,,7]),E.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt=".concat(o+1,"; max=").concat(u)),(null==n?void 0:n.beforeRequest)?[4,n.beforeRequest()]:[3,2];case 1:f.sent(),f.label=2;case 2:return[4,e(t)];case 3:return s=f.sent(),l=s.response,d=s.output,(null==n?void 0:n.afterRequest)&&n.afterRequest(l),c.retryQuota.releaseRetryTokens(r),d.$metadata.attempts=o+1,d.$metadata.totalRetryDelay=i,[2,{value:{response:l,output:d}}];case 4:return h=f.sent(),p=ee(h),o++,c.shouldRetry(p,o,u)?(r=c.retryQuota.retrieveRetryTokens(p),v=c.delayDecider(z(p)?500:100,o),y=X(p.$response),g=Math.max(y||0,v),i+=g,[4,new Promise((function(e){return setTimeout(e,g)}))]):[3,6];case 5:return f.sent(),[2,"continue"];case 6:throw p.$metadata||(p.$metadata={}),p.$metadata.attempts=o,p.$metadata.totalRetryDelay=i,p;case 7:return[2]}}))},c=this,d.label=2;case 2:return[5,s()];case 3:return"object"==typeof(l=d.sent())?[2,l.value]:[3,2];case 4:return[2]}}))}))},e}(),X=function(e){if(A.isInstance(e)){var t=Object.keys(e.headers).find((function(e){return"retry-after"===e.toLowerCase()}));if(t){var n=e.headers[t],r=Number(n);return Number.isNaN(r)?new Date(n).getTime()-Date.now():1e3*r}}},ee=function(e){return e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error("AWS SDK error wrapper for ".concat(e))},te=function(e){function t(t,n){var r=this,o=null!=n?n:{},i=o.rateLimiter,u=c(o,["rateLimiter"]);return(r=e.call(this,t,u)||this).rateLimiter=null!=i?i:new U,r.mode=S.ADAPTIVE,r}return a(t,e),t.prototype.retry=function(t,n){return l(this,void 0,void 0,(function(){var r=this;return f(this,(function(o){return[2,e.prototype.retry.call(this,t,n,{beforeRequest:function(){return l(r,void 0,void 0,(function(){return f(this,(function(e){return[2,this.rateLimiter.getSendToken()]}))}))},afterRequest:function(e){r.rateLimiter.updateClientSendingRate(e)}})]}))}))},t}(Q),ne={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},re=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,n){return function(r){return l(void 0,void 0,void 0,(function(){var o;return f(this,(function(i){switch(i.label){case 0:return[4,e.retryStrategy()];case 1:return(null==(o=i.sent())?void 0:o.mode)&&(n.userAgent=p(p([],h(n.userAgent||[]),!1),[["cfg/retry-mode",o.mode]],!1)),[2,o.retry(t,r)]}}))}))}}}(e),ne)}}},oe=function(e,t){return(oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function ie(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}oe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function ue(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function ae(e,t){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;Object.create;var se=function(e){function t(n,r){void 0===r&&(r=!0);var o=e.call(this,n)||this;return o.tryNextLink=r,o.name="ProviderError",Object.setPrototypeOf(o,t.prototype),o}return ie(t,e),t.from=function(e,t){return void 0===t&&(t=!0),Object.assign(new this(e.message,t),e)},t}(Error);(function(e){function t(n,r){void 0===r&&(r=!0);var o=e.call(this,n,r)||this;return o.tryNextLink=r,o.name="CredentialsProviderError",Object.setPrototypeOf(o,t.prototype),o}ie(t,e)})(se),function(e){function t(n,r){void 0===r&&(r=!0);var o=e.call(this,n,r)||this;return o.tryNextLink=r,o.name="TokenProviderError",Object.setPrototypeOf(o,t.prototype),o}ie(t,e)}(se);for(var ce=function(e,t,n){var r,o,i,u=!1,a=function(){return ue(void 0,void 0,void 0,(function(){return ae(this,(function(t){switch(t.label){case 0:o||(o=e()),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,o];case 2:return r=t.sent(),i=!0,u=!1,[3,4];case 3:return o=void 0,[7];case 4:return[2,r]}}))}))};return void 0===t?function(e){return ue(void 0,void 0,void 0,(function(){return ae(this,(function(t){switch(t.label){case 0:return i&&!(null==e?void 0:e.forceRefresh)?[3,2]:[4,a()];case 1:r=t.sent(),t.label=2;case 2:return[2,r]}}))}))}:function(e){return ue(void 0,void 0,void 0,(function(){return ae(this,(function(o){switch(o.label){case 0:return i&&!(null==e?void 0:e.forceRefresh)?[3,2]:[4,a()];case 1:r=o.sent(),o.label=2;case 2:return u?[2,r]:n&&!n(r)?(u=!0,[2,r]):t(r)?[4,a()]:[3,4];case 3:return o.sent(),[2,r];case 4:return[2,r]}}))}))}},le={},fe={},de=0;de<256;de++){var he=de.toString(16).toLowerCase();1===he.length&&(he="0".concat(he)),le[de]=he,fe[he]=de}function pe(e){for(var t="",n=0;n<e.byteLength;n++)t+=le[e[n]];return t}var ve="X-Amz-Date".toLowerCase(),ye=["authorization",ve,"date"],ge="X-Amz-Signature".toLowerCase(),me="X-Amz-Security-Token".toLowerCase(),we={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},be=/^proxy-/,De=/^sec-/,Ee="AWS4-HMAC-SHA256-PAYLOAD",Ae={},Ce=[],Fe=function(e,t,n){return"".concat(e,"/").concat(t,"/").concat(n,"/").concat("aws4_request")},_e=function(e,t,n){var r=new e(t);return r.update(n),r.digest()},Se=function(e,t,n){var r,o,i=e.headers,u={};try{for(var a=d(Object.keys(i).sort()),s=a.next();!s.done;s=a.next()){var c=s.value;if(null!=i[c]){var l=c.toLowerCase();(l in we||(null==t?void 0:t.has(l))||be.test(l)||De.test(l))&&(!n||n&&!n.has(l))||(u[l]=i[c].trim().replace(/\s+/g," "))}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return u},xe=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,Pe)},Pe=function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())},Be=function(e,t){var n=e.headers,r=e.body;return l(void 0,void 0,void 0,(function(){var e,o,i,u,a,s,c;return f(this,(function(l){switch(l.label){case 0:try{for(e=d(Object.keys(n)),o=e.next();!o.done;o=e.next())if("x-amz-content-sha256"===(i=o.value).toLowerCase())return[2,n[i]]}catch(e){s={error:e}}finally{try{o&&!o.done&&(c=e.return)&&c.call(e)}finally{if(s)throw s.error}}return null!=r?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof r||ArrayBuffer.isView(r)||(f=r,"function"==typeof ArrayBuffer&&f instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(f))?((u=new t).update(r),a=pe,[4,u.digest()]):[3,3];case 2:return[2,a.apply(void 0,[l.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var f}))}))},Te=function(e){var t=e.headers,n=e.query,r=c(e,["headers","query"]);return s(s({},r),{headers:s({},t),query:n?Me(n):void 0})},Me=function(e){return Object.keys(e).reduce((function(t,n){var r,o=e[n];return s(s({},t),((r={})[n]=Array.isArray(o)?p([],h(o),!1):o,r))}),{})},Oe=function(e){var t,n;e="function"==typeof e.clone?e.clone():Te(e);try{for(var r=d(Object.keys(e.headers)),o=r.next();!o.done;o=r.next()){var i=o.value;ye.indexOf(i.toLowerCase())>-1&&delete e.headers[i]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e},Re=function(e){return"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e},Ie=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,o=e.service,i=e.sha256,u=e.uriEscapePath,a=void 0===u||u;this.service=o,this.sha256=i,this.uriEscapePath=a,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=y(r),this.credentialProvider=y(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),l(this,void 0,void 0,(function(){var n,r,o,i,u,a,c,l,h,p,v,y,g,m,w,b,D,E,A,C,F,_,S,x;return f(this,(function(f){switch(f.label){case 0:return n=t.signingDate,r=void 0===n?new Date:n,o=t.expiresIn,i=void 0===o?3600:o,u=t.unsignableHeaders,a=t.unhoistableHeaders,c=t.signableHeaders,l=t.signingRegion,h=t.signingService,[4,this.credentialProvider()];case 1:return p=f.sent(),this.validateResolvedCredentials(p),null==l?[3,2]:(y=l,[3,4]);case 2:return[4,this.regionProvider()];case 3:y=f.sent(),f.label=4;case 4:return v=y,g=ke(r),m=g.longDate,w=g.shortDate,i>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(b=Fe(w,v,null!=h?h:this.service),D=function(e,t){var n,r,o;void 0===t&&(t={});var i="function"==typeof e.clone?e.clone():Te(e),u=i.headers,a=i.query,c=void 0===a?{}:a;try{for(var l=d(Object.keys(u)),f=l.next();!f.done;f=l.next()){var h=f.value,p=h.toLowerCase();"x-amz-"!==p.slice(0,6)||(null===(o=t.unhoistableHeaders)||void 0===o?void 0:o.has(p))||(c[h]=u[h],delete u[h])}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return s(s({},e),{headers:u,query:c})}(Oe(e),{unhoistableHeaders:a}),p.sessionToken&&(D.query["X-Amz-Security-Token"]=p.sessionToken),D.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",D.query["X-Amz-Credential"]="".concat(p.accessKeyId,"/").concat(b),D.query["X-Amz-Date"]=m,D.query["X-Amz-Expires"]=i.toString(10),E=Se(D,u,c),D.query["X-Amz-SignedHeaders"]=Ne(E),A=D.query,C="X-Amz-Signature",F=this.getSignature,_=[m,b,this.getSigningKey(p,v,w,h)],S=this.createCanonicalRequest,x=[D,E],[4,Be(e,this.sha256)]);case 5:return[4,F.apply(this,_.concat([S.apply(this,x.concat([f.sent()]))]))];case 6:return A[C]=f.sent(),[2,D]}}))}))},e.prototype.sign=function(e,t){return l(this,void 0,void 0,(function(){return f(this,(function(n){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var n=e.headers,r=e.payload,o=t.signingDate,i=void 0===o?new Date:o,u=t.priorSignature,a=t.signingRegion,s=t.signingService;return l(this,void 0,void 0,(function(){var e,t,o,c,l,d,h,p,v,y,g;return f(this,(function(f){switch(f.label){case 0:return null==a?[3,1]:(t=a,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=f.sent(),f.label=3;case 3:return e=t,o=ke(i),c=o.shortDate,l=o.longDate,d=Fe(c,e,null!=s?s:this.service),[4,Be({headers:{},body:r},this.sha256)];case 4:return h=f.sent(),(p=new this.sha256).update(n),y=pe,[4,p.digest()];case 5:return v=y.apply(void 0,[f.sent()]),g=[Ee,l,d,u,v,h].join("\n"),[2,this.signString(g,{signingDate:i,signingRegion:e,signingService:s})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signingRegion,u=n.signingService;return l(this,void 0,void 0,(function(){var t,n,r,a,s,c,l,d;return f(this,(function(f){switch(f.label){case 0:return[4,this.credentialProvider()];case 1:return t=f.sent(),this.validateResolvedCredentials(t),null==i?[3,2]:(r=i,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=f.sent(),f.label=4;case 4:return n=r,a=ke(o).shortDate,l=(c=this.sha256).bind,[4,this.getSigningKey(t,n,a,u)];case 5:return(s=new(l.apply(c,[void 0,f.sent()]))).update(e),d=pe,[4,s.digest()];case 6:return[2,d.apply(void 0,[f.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signableHeaders,u=n.unsignableHeaders,a=n.signingRegion,s=n.signingService;return l(this,void 0,void 0,(function(){var t,n,r,c,l,h,p,v,y,g,m;return f(this,(function(f){switch(f.label){case 0:return[4,this.credentialProvider()];case 1:return t=f.sent(),this.validateResolvedCredentials(t),null==a?[3,2]:(r=a,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=f.sent(),f.label=4;case 4:return n=r,c=Oe(e),l=ke(o),h=l.longDate,p=l.shortDate,v=Fe(p,n,null!=s?s:this.service),c.headers[ve]=h,t.sessionToken&&(c.headers[me]=t.sessionToken),[4,Be(c,this.sha256)];case 5:return y=f.sent(),!function(e,t){var n,r;e=e.toLowerCase();try{for(var o=d(Object.keys(t)),i=o.next();!i.done;i=o.next()){if(e===i.value.toLowerCase())return!0}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}("x-amz-content-sha256",c.headers)&&this.applyChecksum&&(c.headers["x-amz-content-sha256"]=y),g=Se(c,u,i),[4,this.getSignature(h,v,this.getSigningKey(t,n,p,s),this.createCanonicalRequest(c,g,y))];case 6:return m=f.sent(),c.headers.authorization="".concat("AWS4-HMAC-SHA256"," ")+"Credential=".concat(t.accessKeyId,"/").concat(v,", ")+"SignedHeaders=".concat(Ne(g),", ")+"Signature=".concat(m),[2,c]}}))}))},e.prototype.createCanonicalRequest=function(e,t,n){var r=Object.keys(t).sort();return"".concat(e.method,"\n").concat(this.getCanonicalPath(e),"\n").concat(function(e){var t,n,r=e.query,o=void 0===r?{}:r,i=[],u={},a=function(e){if(e.toLowerCase()===ge)return"continue";i.push(e);var t=o[e];"string"==typeof t?u[e]="".concat(xe(e),"=").concat(xe(t)):Array.isArray(t)&&(u[e]=t.slice(0).sort().reduce((function(t,n){return t.concat(["".concat(xe(e),"=").concat(xe(n))])}),[]).join("&"))};try{for(var s=d(Object.keys(o).sort()),c=s.next();!c.done;c=s.next()){a(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return i.map((function(e){return u[e]})).filter((function(e){return e})).join("&")}(e),"\n").concat(r.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),"\n\n").concat(r.join(";"),"\n").concat(n)},e.prototype.createStringToSign=function(e,t,n){return l(this,void 0,void 0,(function(){var r,o;return f(this,(function(i){switch(i.label){case 0:return(r=new this.sha256).update(n),[4,r.digest()];case 1:return o=i.sent(),[2,"".concat("AWS4-HMAC-SHA256","\n").concat(e,"\n").concat(t,"\n").concat(pe(o))]}}))}))},e.prototype.getCanonicalPath=function(e){var t,n,r=e.path;if(this.uriEscapePath){var o=[];try{for(var i=d(r.split("/")),u=i.next();!u.done;u=i.next()){var a=u.value;0!==(null==a?void 0:a.length)&&("."!==a&&(".."===a?o.pop():o.push(a)))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}var s="".concat((null==r?void 0:r.startsWith("/"))?"/":"").concat(o.join("/")).concat(o.length>0&&(null==r?void 0:r.endsWith("/"))?"/":"");return encodeURIComponent(s).replace(/%2F/g,"/")}return r},e.prototype.getSignature=function(e,t,n,r){return l(this,void 0,void 0,(function(){var o,i,u,a,s;return f(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return o=c.sent(),a=(u=this.sha256).bind,[4,n];case 2:return(i=new(a.apply(u,[void 0,c.sent()]))).update(o),s=pe,[4,i.digest()];case 3:return[2,s.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,r){return function(e,t,n,r,o){return l(void 0,void 0,void 0,(function(){var i,u,a,s,c,l,h,p,v;return f(this,(function(f){switch(f.label){case 0:return[4,_e(e,t.secretAccessKey,t.accessKeyId)];case 1:if(i=f.sent(),(u="".concat(n,":").concat(r,":").concat(o,":").concat(pe(i),":").concat(t.sessionToken))in Ae)return[2,Ae[u]];for(Ce.push(u);Ce.length>50;)delete Ae[Ce.shift()];a="AWS4".concat(t.secretAccessKey),f.label=2;case 2:f.trys.push([2,7,8,9]),s=d([n,r,o,"aws4_request"]),c=s.next(),f.label=3;case 3:return c.done?[3,6]:(l=c.value,[4,_e(e,a,l)]);case 4:a=f.sent(),f.label=5;case 5:return c=s.next(),[3,3];case 6:return[3,9];case 7:return h=f.sent(),p={error:h},[3,9];case 8:try{c&&!c.done&&(v=s.return)&&v.call(s)}finally{if(p)throw p.error}return[7];case 9:return[2,Ae[u]=a]}}))}))}(this.sha256,e,n,t,r||this.service)},e.prototype.validateResolvedCredentials=function(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")},e}(),ke=function(e){var t,n=(t=e,Re(t).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}},Ne=function(e){return Object.keys(e).sort().join(";")},je=function(e){return"function"==typeof e?ce(e,(function(e){return void 0!==e.expiration&&e.expiration.getTime()-Date.now()<3e5}),(function(e){return void 0!==e.expiration})):y(e)},Le=function(e){return new Date(Date.now()+e)},ze=function(e,t){var n=Date.parse(e);return function(e,t){return Math.abs(Le(t).getTime()-e)>=3e5}(n,t)?n-Date.now():t},Ue=function(e){var t,n,r;return A.isInstance(e)?null!==(n=null===(t=e.headers)||void 0===t?void 0:t.date)&&void 0!==n?n:null===(r=e.headers)||void 0===r?void 0:r.Date:void 0},Ge={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0},qe=function(e){return{applyToStack:function(t){t.addRelativeTo(function(e){return function(t,n){return function(r){var o,i,u;return l(this,void 0,void 0,(function(){var a,c,l,d,h,p,v;return f(this,(function(f){switch(f.label){case 0:return E.isInstance(r.request)?(a=null===(u=null===(i=null===(o=n.endpointV2)||void 0===o?void 0:o.properties)||void 0===i?void 0:i.authSchemes)||void 0===u?void 0:u[0],[4,e.signer(a)]):[2,t(r)];case 1:return c=f.sent(),d=t,h=[s({},r)],v={},[4,c.sign(r.request,{signingDate:Le(e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 2:return[4,d.apply(void 0,[s.apply(void 0,h.concat([(v.request=f.sent(),v)]))]).catch((function(t){var n,r=null!==(n=t.ServerTime)&&void 0!==n?n:Ue(t.$response);throw r&&(e.systemClockOffset=ze(r,e.systemClockOffset)),t}))];case 3:return l=f.sent(),(p=Ue(l.response))&&(e.systemClockOffset=ze(p,e.systemClockOffset)),[2,l]}}))}))}}}(e),Ge)}}};var He=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,We=function(e){var t=h(e,2),n=t[0],r=t[1],o=n.indexOf("/"),i=n.substring(0,o),u=n.substring(o+1);return"api"===i&&(u=u.toLowerCase()),[i,u,r].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(He,"_")})).join("/")},Ve={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},$e=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(r){return l(void 0,void 0,void 0,(function(){var o,i,u,a,c,l,d,v,y;return f(this,(function(f){switch(f.label){case 0:return o=r.request,E.isInstance(o)?(i=o.headers,u=(null===(v=null==t?void 0:t.userAgent)||void 0===v?void 0:v.map(We))||[],[4,n.defaultUserAgentProvider()]):[2,e(r)];case 1:return a=f.sent().map(We),c=(null===(y=null==n?void 0:n.customUserAgent)||void 0===y?void 0:y.map(We))||[],l=p(p(p([],h(a),!1),h(u),!1),h(c),!1).join(" "),d=p(p([],h(a.filter((function(e){return e.startsWith("aws-sdk-")}))),!1),h(c),!1).join(" "),"browser"!==n.runtime?(d&&(i["x-amz-user-agent"]=i["x-amz-user-agent"]?"".concat(i["user-agent"]," ").concat(d):d),i["user-agent"]=l):i["x-amz-user-agent"]=l,[2,e(s(s({},r),{request:o}))]}}))}))}}),Ve)}}},Ye=function(){var e=[],t=[],n=new Set,r=function(n){return e.forEach((function(e){n.add(e.middleware,s({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,s({},e))})),n},o=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,p([],h(o(e)),!1))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,p([],h(o(e)),!1))})),t},i=function(n){void 0===n&&(n=!1);var r,i=[],u=[],a={};return e.forEach((function(e){var t=s(s({},e),{before:[],after:[]});t.name&&(a[t.name]=t),i.push(t)})),t.forEach((function(e){var t=s(s({},e),{before:[],after:[]});t.name&&(a[t.name]=t),u.push(t)})),u.forEach((function(e){if(e.toMiddleware){var t=a[e.toMiddleware];if(void 0===t){if(n)return;throw new Error("".concat(e.toMiddleware," is not found when adding ").concat(e.name||"anonymous"," middleware ").concat(e.relation," ").concat(e.toMiddleware))}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(r=i,r.sort((function(e,t){return Ke[t.step]-Ke[e.step]||Ze[t.priority||"normal"]-Ze[e.priority||"normal"]}))).map(o).reduce((function(e,t){return e.push.apply(e,p([],h(t),!1)),e}),[])},u={add:function(t,r){void 0===r&&(r={});var o=r.name,i=r.override,u=s({step:"initialize",priority:"normal",middleware:t},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '".concat(o,"'"));var a=e.findIndex((function(e){return e.name===o})),c=e[a];if(c.step!==u.step||c.priority!==u.priority)throw new Error('"'.concat(o,'" middleware with ').concat(c.priority," priority in ").concat(c.step," step cannot be ")+"overridden by same-name middleware with ".concat(u.priority," priority in ").concat(u.step," step."));e.splice(a,1)}n.add(o)}e.push(u)},addRelativeTo:function(e,r){var o=r.name,i=r.override,u=s({middleware:e},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '".concat(o,"'"));var a=t.findIndex((function(e){return e.name===o})),c=t[a];if(c.toMiddleware!==u.toMiddleware||c.relation!==u.relation)throw new Error('"'.concat(o,'" middleware ').concat(c.relation,' "').concat(c.toMiddleware,'" middleware cannot be overridden ')+"by same-name middleware ".concat(u.relation,' "').concat(u.toMiddleware,'" middleware.'));t.splice(a,1)}n.add(o)}t.push(u)},clone:function(){return r(Ye())},use:function(e){e.applyToStack(u)},remove:function(r){return"string"==typeof r?function(r){var o=!1,i=function(e){return!e.name||e.name!==r||(o=!0,n.delete(r),!1)};return e=e.filter(i),t=t.filter(i),o}(r):function(r){var o=!1,i=function(e){return e.middleware!==r||(o=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(i),t=t.filter(i),o}(r)},removeByTag:function(r){var o=!1,i=function(e){var t=e.tags,i=e.name;return!t||!t.includes(r)||(i&&n.delete(i),o=!0,!1)};return e=e.filter(i),t=t.filter(i),o},concat:function(e){var t=r(Ye());return t.use(e),t},applyToStack:r,identify:function(){return i(!0).map((function(e){return e.name+": "+(e.tags||[]).join(",")}))},resolve:function(e,t){var n,r;try{for(var o=d(i().map((function(e){return e.middleware})).reverse()),u=o.next();!u.done;u=o.next()){e=(0,u.value)(e,t)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return e}};return u},Ke={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Ze={high:3,normal:2,low:1},Je=function(){function e(e){this.middlewareStack=Ye(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!=typeof t?t:void 0,o="function"==typeof t?t:n,i=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!o)return i(e).then((function(e){return e.output}));i(e).then((function(e){return o(null,e.output)}),(function(e){return o(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),Qe=function(){this.middlewareStack=Ye()},Xe="***SensitiveInformation***",et=function(e){if(null!=e){if("number"==typeof e){if(0!==e&&1!==e||wt.warn(mt("Expected boolean, got ".concat(typeof e,": ").concat(e))),0===e)return!1;if(1===e)return!0}if("string"==typeof e){var t=e.toLowerCase();if("false"!==t&&"true"!==t||wt.warn(mt("Expected boolean, got ".concat(typeof e,": ").concat(e))),"false"===t)return!1;if("true"===t)return!0}if("boolean"==typeof e)return e;throw new TypeError("Expected boolean, got ".concat(typeof e,": ").concat(e))}},tt=function(e){if(null!=e){if("string"==typeof e){var t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&wt.warn(mt("Expected number but observed string: ".concat(e))),t}if("number"==typeof e)return e;throw new TypeError("Expected number, got ".concat(typeof e,": ").concat(e))}},nt=Math.ceil(Math.pow(2,127)*(2-Math.pow(2,-23))),rt=function(e){var t=tt(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>nt)throw new TypeError("Expected 32-bit float, got ".concat(e));return t},ot=function(e){if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError("Expected integer, got ".concat(typeof e,": ").concat(e))}},it=function(e){return st(e,32)},ut=function(e){return st(e,16)},at=function(e){return st(e,8)},st=function(e,t){var n=ot(e);if(void 0!==n&&ct(n,t)!==n)throw new TypeError("Expected ".concat(t,"-bit integer, got ").concat(e));return n},ct=function(e,t){switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},lt=function(e,t){if(null==e){if(t)throw new TypeError("Expected a non-null value for ".concat(t));throw new TypeError("Expected a non-null value")}return e},ft=function(e){if(null!=e){if("object"==typeof e&&!Array.isArray(e))return e;var t=Array.isArray(e)?"array":typeof e;throw new TypeError("Expected object, got ".concat(t,": ").concat(e))}},dt=function(e){if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return wt.warn(mt("Expected string, got ".concat(typeof e,": ").concat(e))),String(e);throw new TypeError("Expected string, got ".concat(typeof e,": ").concat(e))}},ht=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,pt=function(e){var t=e.match(ht);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},vt=function(e){return"string"==typeof e?yt(e):tt(e)},yt=function(e){switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error("Unable to parse float value: ".concat(e))}},gt=function(e){return ut("string"==typeof e?pt(e):e)},mt=function(e){return String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((function(e){return!e.includes("stackTraceWarning")})).join("\n")},wt={warn:console.warn},bt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var Dt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Et=function(e){if(null!=e){if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");var t=Dt.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");var n=h(t,8),r=(n[0],n[1]),o=n[2],i=n[3],u=n[4],a=n[5],s=n[6],c=n[7],l=gt(Pt(r)),f=St(o,"month",1,12),d=St(i,"day",1,31);return At(l,f,d,{hours:u,minutes:a,seconds:s,fractionalMilliseconds:c})}},At=(new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),function(e,t,n,r){var o=t-1;return Ft(e,o,n),new Date(Date.UTC(e,o,n,St(r.hours,"hour",0,23),St(r.minutes,"minute",0,59),St(r.seconds,"seconds",0,60),xt(r.fractionalMilliseconds)))}),Ct=[31,28,31,30,31,30,31,31,30,31,30,31],Ft=function(e,t,n){var r=Ct[t];if(1===t&&_t(e)&&(r=29),n>r)throw new TypeError("Invalid day for ".concat(bt[t]," in ").concat(e,": ").concat(n))},_t=function(e){return e%4==0&&(e%100!=0||e%400==0)},St=function(e,t,n,r){var o=function(e){return at("string"==typeof e?pt(e):e)}(Pt(e));if(o<n||o>r)throw new TypeError("".concat(t," must be between ").concat(n," and ").concat(r,", inclusive"));return o},xt=function(e){return null==e?0:1e3*function(e){return rt("string"==typeof e?pt(e):e)}("0."+e)},Pt=function(e){for(var t=0;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)},Bt=function(e){function t(n){var r=e.call(this,n.message)||this;return Object.setPrototypeOf(r,t.prototype),r.name=n.name,r.$fault=n.$fault,r.$metadata=n.$metadata,r}return a(t,e),t}(Error),Tt=function(e,t){void 0===t&&(t={}),Object.entries(t).filter((function(e){return void 0!==h(e,2)[1]})).forEach((function(t){var n=h(t,2),r=n[0],o=n[1];null!=e[r]&&""!==e[r]||(e[r]=o)}));var n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},Mt=function(e){var t=e.output,n=e.parsedBody,r=e.exceptionCtor,o=e.errorCode,i=Ot(t),u=i.httpStatusCode?i.httpStatusCode+"":void 0,a=new r({name:n.code||n.Code||o||u||"UnknowError",$fault:"client",$metadata:i});throw Tt(a,n)},Ot=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},Rt=function(e){switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}};n(7);function It(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}var kt=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,p([null],h(arguments),!1)),n=new t;return Object.setPrototypeOf(n,e.prototype),n};kt.prototype=Object.create(String.prototype,{constructor:{value:kt,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(kt,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}a(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))}}(kt);function Nt(e,t,n){var r,o,i,u;if(void 0===t&&void 0===n)i={},u=e;else{if(i=e,"function"==typeof t)return jt(i,t,u=n);u=t}try{for(var a=d(Object.keys(u)),s=a.next();!s.done;s=a.next()){var c=s.value;if(Array.isArray(u[c])){var l=h(u[c],2),f=l[0],p=l[1];if("function"==typeof p){var v=void 0,y=void 0===f&&null!=(v=p()),g="function"==typeof f&&!!f(void 0)||"function"!=typeof f&&!!f;y?i[c]=v:g&&(i[c]=p())}else{y=void 0===f&&null!=p,g="function"==typeof f&&!!f(p)||"function"!=typeof f&&!!f;(y||g)&&(i[c]=p)}}else i[c]=u[c]}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}var jt=function(e,t,n){return Nt(e,Object.entries(n).reduce((function(e,n){var r=h(n,2),o=r[0],i=r[1];return Array.isArray(i)?e[o]=i:e[o]="function"==typeof i?[t,i()]:[t,i],e}),{}))},Lt=function(e,t,n,r,o,i){if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");var u=r();if(u.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");return e=e.replace(o,i?u.split("/").map((function(e){return It(e)})).join("/"):It(u))},zt=function(e){if(e!=e)return"NaN";switch(e){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return e}};var Ut=n(16),Gt=n(15);for(var qt=function(){function e(e){"function"==typeof e?this.configProvider=e().then((function(e){return e||{}})):(this.config=null!=e?e:{},this.configProvider=Promise.resolve(this.config))}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var n=(void 0===t?{}:t).abortSignal;return l(this,void 0,void 0,(function(){var t,r,o,i,u,a,s,c,l,h,p,v;return f(this,(function(f){switch(f.label){case 0:return this.config?[3,2]:(t=this,[4,this.configProvider]);case 1:t.config=f.sent(),f.label=2;case 2:return r=this.config.requestTimeout,(null==n?void 0:n.aborted)?((o=new Error("Request aborted")).name="AbortError",[2,Promise.reject(o)]):(i=e.path,e.query&&(u=function(e){var t,n,r=[];try{for(var o=d(Object.keys(e).sort()),i=o.next();!i.done;i=o.next()){var u=i.value,a=e[u];if(u=xe(u),Array.isArray(a))for(var s=0,c=a.length;s<c;s++)r.push("".concat(u,"=").concat(xe(a[s])));else{var l=u;(a||"string"==typeof a)&&(l+="=".concat(xe(a))),r.push(l)}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r.join("&")}(e.query))&&(i+="?".concat(u)),a=e.port,s=e.method,c="".concat(e.protocol,"//").concat(e.hostname).concat(a?":".concat(a):"").concat(i),l="GET"===s||"HEAD"===s?void 0:e.body,h={body:l,headers:new Headers(e.headers),method:s},"undefined"!=typeof AbortController&&(h.signal=n),p=new Request(c,h),v=[fetch(p).then((function(e){var t,n,r=e.headers,o={};try{for(var i=d(r.entries()),u=i.next();!u.done;u=i.next()){var a=u.value;o[a[0]]=a[1]}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new A({headers:o,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new A({headers:o,statusCode:e.status,body:t})}}))})),(y=r,void 0===y&&(y=0),new Promise((function(e,t){y&&setTimeout((function(){var e=new Error("Request did not complete within ".concat(y," ms"));e.name="TimeoutError",t(e)}),y)})))],n&&v.push(new Promise((function(e,t){n.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),[2,Promise.race(v)])}var y}))}))},e}(),Ht={},Wt=new Array(64),Vt=0,$t="A".charCodeAt(0),Yt="Z".charCodeAt(0);Vt+$t<=Yt;Vt++){var Kt=String.fromCharCode(Vt+$t);Ht[Kt]=Vt,Wt[Vt]=Kt}for(Vt=0,$t="a".charCodeAt(0),Yt="z".charCodeAt(0);Vt+$t<=Yt;Vt++){Kt=String.fromCharCode(Vt+$t);var Zt=Vt+26;Ht[Kt]=Zt,Wt[Zt]=Kt}for(Vt=0;Vt<10;Vt++){Ht[Vt.toString(10)]=Vt+52;Kt=Vt.toString(10),Zt=Vt+52;Ht[Kt]=Zt,Wt[Zt]=Kt}Ht["+"]=62,Wt[62]="+",Ht["/"]=63,Wt[63]="/";function Jt(e){var t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;for(var n=new ArrayBuffer(t),r=new DataView(n),o=0;o<e.length;o+=4){for(var i=0,u=0,a=o,s=o+3;a<=s;a++)if("="!==e[a]){if(!(e[a]in Ht))throw new TypeError("Invalid character ".concat(e[a]," in base64 string."));i|=Ht[e[a]]<<6*(s-a),u+=6}else i>>=6;var c=o/4*3;i>>=u%8;for(var l=Math.floor(u/8),f=0;f<l;f++){var d=8*(l-f-1);r.setUint8(c+f,(i&255<<d)>>d)}}return new Uint8Array(n)}function Qt(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,o=0,i=n,u=Math.min(n+3,e.length);i<u;i++)r|=e[i]<<8*(u-i-1),o+=8;var a=Math.ceil(o/6);r<<=6*a-o;for(var s=1;s<=a;s++){var c=6*(a-s);t+=Wt[(r&63<<c)>>c]}t+="==".slice(0,4-a)}return t}var Xt=function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return l(this,void 0,void 0,(function(){var t,n;return f(this,(function(r){switch(r.label){case 0:return[4,en(e)];case 1:return t=r.sent(),n=Jt(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return l(this,void 0,void 0,(function(){var t,n,r,o,i,u,a;return f(this,(function(s){switch(s.label){case 0:t=new Uint8Array(0),n=e.getReader(),r=!1,s.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return o=s.sent(),i=o.done,(u=o.value)&&(a=t,(t=new Uint8Array(a.length+u.length)).set(a),t.set(u,a.length)),r=i,[3,1];case 3:return[2,t]}}))}))}(e)};function en(e){return new Promise((function(t,n){var r=new FileReader;r.onloadend=function(){var e;if(2!==r.readyState)return n(new Error("Reader aborted too early"));var o=null!==(e=r.result)&&void 0!==e?e:"",i=o.indexOf(","),u=i>-1?i+1:o.length;t(o.substring(u))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}var tn=function(e){if("string"==typeof e){for(var t=e.length,n=t-1;n>=0;n--){var r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error("Body Length computation failed for ".concat(e))},nn=n(2),rn=n.n(nn),on=function(e){var t=e.serviceId,n=e.clientVersion;return function(){return l(void 0,void 0,void 0,(function(){var e,r,o,i,u,a,s,c,l;return f(this,(function(f){return e="undefined"!=typeof window&&(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)?rn.a.parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",n],["os/".concat((null===(i=null==e?void 0:e.os)||void 0===i?void 0:i.name)||"other"),null===(u=null==e?void 0:e.os)||void 0===u?void 0:u.version],["lang/js"],["md/browser","".concat(null!==(s=null===(a=null==e?void 0:e.browser)||void 0===a?void 0:a.name)&&void 0!==s?s:"unknown","_").concat(null!==(l=null===(c=null==e?void 0:e.browser)||void 0===c?void 0:c.version)&&void 0!==l?l:"unknown")]],t&&r.push(["api/".concat(t),n]),[2,r]}))}))}};var un=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},an=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var u="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(u)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)};var sn=function(e){if("string"==typeof e)return sn(new URL(e));var t,n=e,r=n.hostname,o=n.pathname,i=n.port,u=n.protocol,a=n.search;return a&&(t=function(e){var t,n,r={};if(e=e.replace(/^\?/,""))try{for(var o=d(e.split("&")),i=o.next();!i.done;i=o.next()){var u=h(i.value.split("="),2),a=u[0],s=u[1],c=void 0===s?null:s;a=decodeURIComponent(a),c&&(c=decodeURIComponent(c)),a in r?Array.isArray(r[a])?r[a].push(c):r[a]=[r[a],c]:r[a]=c}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(a)),{hostname:r,port:i?parseInt(i):void 0,protocol:u,path:o,query:t}},cn={},ln={aws:{regions:["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-northeast-3","ap-south-1","ap-southeast-1","ap-southeast-2","ap-southeast-3","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-central-1","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"],regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",variants:[{hostname:"geo.{region}.amazonaws.com",tags:[]},{hostname:"geo-fips.{region}.amazonaws.com",tags:["fips"]},{hostname:"geo-fips.{region}.api.aws",tags:["dualstack","fips"]},{hostname:"geo.{region}.api.aws",tags:["dualstack"]}]},"aws-cn":{regions:["cn-north-1","cn-northwest-1"],regionRegex:"^cn\\-\\w+\\-\\d+$",variants:[{hostname:"geo.{region}.amazonaws.com.cn",tags:[]},{hostname:"geo-fips.{region}.amazonaws.com.cn",tags:["fips"]},{hostname:"geo-fips.{region}.api.amazonwebservices.com.cn",tags:["dualstack","fips"]},{hostname:"geo.{region}.api.amazonwebservices.com.cn",tags:["dualstack"]}]},"aws-iso":{regions:["us-iso-east-1","us-iso-west-1"],regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",variants:[{hostname:"geo.{region}.c2s.ic.gov",tags:[]},{hostname:"geo-fips.{region}.c2s.ic.gov",tags:["fips"]}]},"aws-iso-b":{regions:["us-isob-east-1"],regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",variants:[{hostname:"geo.{region}.sc2s.sgov.gov",tags:[]},{hostname:"geo-fips.{region}.sc2s.sgov.gov",tags:["fips"]}]},"aws-us-gov":{regions:["us-gov-east-1","us-gov-west-1"],regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",variants:[{hostname:"geo.{region}.amazonaws.com",tags:[]},{hostname:"geo-fips.{region}.amazonaws.com",tags:["fips"]},{hostname:"geo-fips.{region}.api.aws",tags:["dualstack","fips"]},{hostname:"geo.{region}.api.aws",tags:["dualstack"]}]}},fn=function(e,t){return l(void 0,void 0,void 0,(function(){return f(this,(function(n){return[2,D(e,s(s({},t),{signingService:"geo",regionHash:cn,partitionHash:ln}))]}))}))};function dn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function hn(e,t){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;Object.create;var pn=["in-region","cross-region","mobile","standard","legacy"],vn=function(){var e,t,n="undefined"!=typeof window&&(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.userAgent)?rn.a.parse(window.navigator.userAgent):void 0,r=null===(t=null==n?void 0:n.platform)||void 0===t?void 0:t.type;return"tablet"===r||"mobile"===r},yn=function(e){var t,n,r,o,i,u,a,c,d,h,p,v,y,g,m,w,b=function(e){var t=(void 0===e?{}:e).defaultsMode;return ce((function(){return dn(void 0,void 0,void 0,(function(){var e,n;return hn(this,(function(r){switch(r.label){case 0:return"function"!=typeof t?[3,2]:[4,t()];case 1:return n=r.sent(),[3,3];case 2:n=t,r.label=3;case 3:switch(null==(e=n)?void 0:e.toLowerCase()){case"auto":return[2,Promise.resolve(vn()?"mobile":"standard")];case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return[2,Promise.resolve(null==e?void 0:e.toLocaleLowerCase())];case void 0:return[2,Promise.resolve("legacy")];default:throw new Error('Invalid parameter for "defaultsMode", expect '.concat(pn.join(", "),", got ").concat(e))}return[2]}}))}))}))}(e),D=function(){return b().then(Rt)},E=function(e){var t,n,r,o,i;return{apiVersion:"2020-11-19",disableHostPrefix:null!==(t=null==e?void 0:e.disableHostPrefix)&&void 0!==t&&t,logger:null!==(n=null==e?void 0:e.logger)&&void 0!==n?n:{},regionInfoProvider:null!==(r=null==e?void 0:e.regionInfoProvider)&&void 0!==r?r:fn,serviceId:null!==(o=null==e?void 0:e.serviceId)&&void 0!==o?o:"Location",urlParser:null!==(i=null==e?void 0:e.urlParser)&&void 0!==i?i:sn}}(e);return s(s(s({},E),e),{runtime:"browser",defaultsMode:b,base64Decoder:null!==(t=null==e?void 0:e.base64Decoder)&&void 0!==t?t:Jt,base64Encoder:null!==(n=null==e?void 0:e.base64Encoder)&&void 0!==n?n:Qt,bodyLengthChecker:null!==(r=null==e?void 0:e.bodyLengthChecker)&&void 0!==r?r:tn,credentialDefaultProvider:null!==(o=null==e?void 0:e.credentialDefaultProvider)&&void 0!==o?o:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:null!==(i=null==e?void 0:e.defaultUserAgentProvider)&&void 0!==i?i:on({serviceId:E.serviceId,clientVersion:Ut.version}),maxAttempts:null!==(u=null==e?void 0:e.maxAttempts)&&void 0!==u?u:3,region:null!==(a=null==e?void 0:e.region)&&void 0!==a?a:(w="Region is missing",function(){return Promise.reject(w)}),requestHandler:null!==(c=null==e?void 0:e.requestHandler)&&void 0!==c?c:new qt(D),retryMode:null!==(d=null==e?void 0:e.retryMode)&&void 0!==d?d:function(){return l(void 0,void 0,void 0,(function(){return f(this,(function(e){switch(e.label){case 0:return[4,D()];case 1:return[2,e.sent().retryMode||R]}}))}))},sha256:null!==(h=null==e?void 0:e.sha256)&&void 0!==h?h:Gt.Sha256,streamCollector:null!==(p=null==e?void 0:e.streamCollector)&&void 0!==p?p:Xt,useDualstackEndpoint:null!==(v=null==e?void 0:e.useDualstackEndpoint)&&void 0!==v?v:function(){return Promise.resolve(!1)},useFipsEndpoint:null!==(y=null==e?void 0:e.useFipsEndpoint)&&void 0!==y?y:function(){return Promise.resolve(!1)},utf8Decoder:null!==(g=null==e?void 0:e.utf8Decoder)&&void 0!==g?g:un,utf8Encoder:null!==(m=null==e?void 0:e.utf8Encoder)&&void 0!==m?m:an})},gn=function(e){function t(t){var n,r,o,i=this,u=function(e){var t=e.region,n=e.useFipsEndpoint;if(!t)throw new Error("Region is missing");return s(s({},e),{region:function(){return l(void 0,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return"string"==typeof t?[2,w(t)]:[4,t()];case 1:return e=n.sent(),[2,w(e)]}}))}))},useFipsEndpoint:function(){return l(void 0,void 0,void 0,(function(){var e;return f(this,(function(r){switch(r.label){case 0:return"string"!=typeof t?[3,1]:(e=t,[3,3]);case 1:return[4,t()];case 2:e=r.sent(),r.label=3;case 3:return m(e)?[2,!0]:[2,"boolean"==typeof n?Promise.resolve(n):n()]}}))}))}})}(yn(t)),a=g(u),c=function(e){return s(s({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}(function(e){var t,n=e.credentials?je(e.credentials):e.credentialDefaultProvider(e),r=e.signingEscapePath,o=void 0===r||r,i=e.systemClockOffset,u=void 0===i?e.systemClockOffset||0:i,a=e.sha256;return t=e.signer?y(e.signer):e.regionInfoProvider?function(){return y(e.region)().then((function(t){return l(void 0,void 0,void 0,(function(){var n,r,o,i;return f(this,(function(u){switch(u.label){case 0:return r=(n=e).regionInfoProvider,o=[t],i={},[4,e.useFipsEndpoint()];case 1:return i.useFipsEndpoint=u.sent(),[4,e.useDualstackEndpoint()];case 2:return[4,r.apply(n,o.concat([(i.useDualstackEndpoint=u.sent(),i)]))];case 3:return[2,[u.sent()||{},t]]}}))}))})).then((function(t){var r=h(t,2),i=r[0],u=r[1],c=i.signingRegion,l=i.signingService;e.signingRegion=e.signingRegion||c||u,e.signingName=e.signingName||l||e.serviceId;var f=s(s({},e),{credentials:n,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:o});return new(e.signerConstructor||Ie)(f)}))}:function(t){return l(void 0,void 0,void 0,(function(){var r,i,u;return f(this,(function(c){if(!t)throw new Error("Unexpected empty auth scheme config");return r=t.signingScope,i=t.signingName,e.signingRegion=e.signingRegion||r,e.signingName=e.signingName||i||e.serviceId,u=s(s({},e),{credentials:n,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:o}),[2,new(e.signerConstructor||Ie)(u)]}))}))},s(s({},e),{systemClockOffset:u,signingEscapePath:o,credentials:n,signer:t})}((o=y(null!==(r=(n=a).maxAttempts)&&void 0!==r?r:3),s(s({},n),{maxAttempts:o,retryStrategy:function(){return l(void 0,void 0,void 0,(function(){return f(this,(function(e){switch(e.label){case 0:return n.retryStrategy?[2,n.retryStrategy]:[4,y(n.retryMode)()];case 1:return e.sent()===S.ADAPTIVE?[2,new te(o)]:[2,new Q(o)]}}))}))}}))));return(i=e.call(this,c)||this).config=c,i.middlewareStack.use(re(i.config)),i.middlewareStack.use(_(i.config)),i.middlewareStack.use(P(i.config)),i.middlewareStack.use(T(i.config)),i.middlewareStack.use(Object(M.a)(i.config)),i.middlewareStack.use(qe(i.config)),i.middlewareStack.use($e(i.config)),i}return a(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(Je),mn={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},wn={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function bn(e,t,n){return{applyToStack:function(r){r.add(function(e,t){return function(n,r){return function(r){return l(void 0,void 0,void 0,(function(){var o,i,u;return f(this,(function(a){switch(a.label){case 0:return[4,n(r)];case 1:o=a.sent().response,a.label=2;case 2:return a.trys.push([2,4,,5]),[4,t(o,e)];case 3:return i=a.sent(),[2,{response:o,output:i}];case 4:throw u=a.sent(),Object.defineProperty(u,"$response",{value:o}),u;case 5:return[2]}}))}))}}}(e,n),mn),r.add(function(e,t){return function(n,r){return function(o){return l(void 0,void 0,void 0,(function(){var i,u,a;return f(this,(function(c){switch(c.label){case 0:if(!(i=(null===(a=r.endpointV2)||void 0===a?void 0:a.url)&&e.urlParser?function(){return l(void 0,void 0,void 0,(function(){return f(this,(function(t){return[2,e.urlParser(r.endpointV2.url)]}))}))}:e.endpoint))throw new Error("No valid endpoint provider available.");return[4,t(o.input,s(s({},e),{endpoint:i}))];case 1:return u=c.sent(),[2,n(s(s({},o),{request:u}))]}}))}))}}}(e,t),wn)}}}var Dn=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return a(t,e),t}(Bt),En=function(e){function t(n){var r=e.call(this,s({name:"AccessDeniedException",$fault:"client"},n))||this;return r.name="AccessDeniedException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r.Message=n.Message,r}return a(t,e),t}(Dn),An=(function(e){function t(n){var r=e.call(this,s({name:"ConflictException",$fault:"client"},n))||this;return r.name="ConflictException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r.Message=n.Message,r}a(t,e)}(Dn),function(e){function t(n){var r=e.call(this,s({name:"InternalServerException",$fault:"server"},n))||this;return r.name="InternalServerException",r.$fault="server",r.$retryable={},Object.setPrototypeOf(r,t.prototype),r.Message=n.Message,r}return a(t,e),t}(Dn)),Cn=function(e){function t(n){var r=e.call(this,s({name:"ResourceNotFoundException",$fault:"client"},n))||this;return r.name="ResourceNotFoundException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r.Message=n.Message,r}return a(t,e),t}(Dn),Fn=(function(e){function t(n){var r=e.call(this,s({name:"ServiceQuotaExceededException",$fault:"client"},n))||this;return r.name="ServiceQuotaExceededException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r.Message=n.Message,r}a(t,e)}(Dn),function(e){function t(n){var r=e.call(this,s({name:"ThrottlingException",$fault:"client"},n))||this;return r.name="ThrottlingException",r.$fault="client",r.$retryable={},Object.setPrototypeOf(r,t.prototype),r.Message=n.Message,r}return a(t,e),t}(Dn)),_n=function(e){function t(n){var r=e.call(this,s({name:"ValidationException",$fault:"client"},n))||this;return r.name="ValidationException",r.$fault="client",Object.setPrototypeOf(r,t.prototype),r.Message=n.Message,r.Reason=n.Reason,r.FieldList=n.FieldList,r}return a(t,e),t}(Dn),Sn=function(e){return s({},e)},xn=function(e){return s({},e)},Pn=function(e){return s(s(s({},e),e.Polygon&&{Polygon:e.Polygon.map((function(e){return Xe}))}),e.Circle&&{Circle:Xe})},Bn=function(e){return s(s({},e),e.Entries&&{Entries:e.Entries.map((function(e){return function(e){return s(s({},e),e.Geometry&&{Geometry:Pn(e.Geometry)})}(e)}))})},Tn=function(e){return s({},e)},Mn=function(e){return s({},e)},On=function(e){return s(s({},e),e.Geometry&&{Geometry:Pn(e.Geometry)})},Rn=function(e){return s({},e)},In=function(e){return s(s({},e),e.Entries&&{Entries:e.Entries.map((function(e){return function(e){return s(s({},e),e.Geometry&&{Geometry:Pn(e.Geometry)})}(e)}))})},kn=function(e){return s({},e)},Nn=function(e){return s(s({},e),e.Point&&{Point:Xe})},jn=function(e){return s(s({},e),e.Geometry&&{Geometry:Nn(e.Geometry)})},Ln=function(e){return s(s({},e),e.Place&&{Place:jn(e.Place)})},zn=function(e){return s(s({},e),e.Position&&{Position:Xe})},Un=function(e){return s(s({},e),e.Position&&{Position:Xe})},Gn=function(e){return s(s(s({},e),e.Summary&&{Summary:Un(e.Summary)}),e.Results&&{Results:e.Results.map((function(e){return function(e){return s(s({},e),e.Place&&{Place:jn(e.Place)})}(e)}))})},qn=function(e){return s(s(s(s({},e),e.Text&&{Text:Xe}),e.BiasPosition&&{BiasPosition:Xe}),e.FilterBBox&&{FilterBBox:Xe})},Hn=function(e){return s(s(s(s({},e),e.Text&&{Text:Xe}),e.BiasPosition&&{BiasPosition:Xe}),e.FilterBBox&&{FilterBBox:Xe})},Wn=function(e){return s(s({},e),e.Summary&&{Summary:Hn(e.Summary)})},Vn=function(e){return s(s(s(s({},e),e.Text&&{Text:Xe}),e.BiasPosition&&{BiasPosition:Xe}),e.FilterBBox&&{FilterBBox:Xe})},$n=function(e){return s(s(s(s(s({},e),e.Text&&{Text:Xe}),e.BiasPosition&&{BiasPosition:Xe}),e.FilterBBox&&{FilterBBox:Xe}),e.ResultBBox&&{ResultBBox:Xe})},Yn=function(e){return s(s(s({},e),e.Summary&&{Summary:$n(e.Summary)}),e.Results&&{Results:e.Results.map((function(e){return function(e){return s(s({},e),e.Place&&{Place:jn(e.Place)})}(e)}))})},Kn=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i,u;return f(this,(function(a){switch(a.label){case 0:return r=[s({},e)],u={},[4,Ur(e.body,t)];case 1:switch(n=s.apply(void 0,r.concat([(u.body=a.sent(),u)])),o=Gr(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return[4,or(n,t)];case 3:throw a.sent();case 4:return[4,ir(n,t)];case 5:throw a.sent();case 6:return[4,ur(n,t)];case 7:throw a.sent();case 8:return[4,ar(n,t)];case 9:throw a.sent();case 10:return[4,sr(n,t)];case 11:throw a.sent();case 12:i=n.body,Mt({output:e,parsedBody:i,exceptionCtor:Dn,errorCode:o}),a.label=13;case 13:return[2]}}))}))},Zn=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i,u;return f(this,(function(a){switch(a.label){case 0:return r=[s({},e)],u={},[4,Ur(e.body,t)];case 1:switch(n=s.apply(void 0,r.concat([(u.body=a.sent(),u)])),o=Gr(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return[4,or(n,t)];case 3:throw a.sent();case 4:return[4,ir(n,t)];case 5:throw a.sent();case 6:return[4,ur(n,t)];case 7:throw a.sent();case 8:return[4,ar(n,t)];case 9:throw a.sent();case 10:return[4,sr(n,t)];case 11:throw a.sent();case 12:i=n.body,Mt({output:e,parsedBody:i,exceptionCtor:Dn,errorCode:o}),a.label=13;case 13:return[2]}}))}))},Jn=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i,u;return f(this,(function(a){switch(a.label){case 0:return r=[s({},e)],u={},[4,Ur(e.body,t)];case 1:switch(n=s.apply(void 0,r.concat([(u.body=a.sent(),u)])),o=Gr(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return[4,or(n,t)];case 3:throw a.sent();case 4:return[4,ir(n,t)];case 5:throw a.sent();case 6:return[4,ur(n,t)];case 7:throw a.sent();case 8:return[4,ar(n,t)];case 9:throw a.sent();case 10:return[4,sr(n,t)];case 11:throw a.sent();case 12:i=n.body,Mt({output:e,parsedBody:i,exceptionCtor:Dn,errorCode:o}),a.label=13;case 13:return[2]}}))}))},Qn=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i,u;return f(this,(function(a){switch(a.label){case 0:return r=[s({},e)],u={},[4,Ur(e.body,t)];case 1:switch(n=s.apply(void 0,r.concat([(u.body=a.sent(),u)])),o=Gr(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return[4,or(n,t)];case 3:throw a.sent();case 4:return[4,ir(n,t)];case 5:throw a.sent();case 6:return[4,ur(n,t)];case 7:throw a.sent();case 8:return[4,ar(n,t)];case 9:throw a.sent();case 10:return[4,sr(n,t)];case 11:throw a.sent();case 12:i=n.body,Mt({output:e,parsedBody:i,exceptionCtor:Dn,errorCode:o}),a.label=13;case 13:return[2]}}))}))},Xn=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i,u;return f(this,(function(a){switch(a.label){case 0:return r=[s({},e)],u={},[4,Ur(e.body,t)];case 1:switch(n=s.apply(void 0,r.concat([(u.body=a.sent(),u)])),o=Gr(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return[4,or(n,t)];case 3:throw a.sent();case 4:return[4,ir(n,t)];case 5:throw a.sent();case 6:return[4,ur(n,t)];case 7:throw a.sent();case 8:return[4,ar(n,t)];case 9:throw a.sent();case 10:return[4,sr(n,t)];case 11:throw a.sent();case 12:i=n.body,Mt({output:e,parsedBody:i,exceptionCtor:Dn,errorCode:o}),a.label=13;case 13:return[2]}}))}))},er=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i,u;return f(this,(function(a){switch(a.label){case 0:return r=[s({},e)],u={},[4,Ur(e.body,t)];case 1:switch(n=s.apply(void 0,r.concat([(u.body=a.sent(),u)])),o=Gr(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return[4,or(n,t)];case 3:throw a.sent();case 4:return[4,ir(n,t)];case 5:throw a.sent();case 6:return[4,ur(n,t)];case 7:throw a.sent();case 8:return[4,ar(n,t)];case 9:throw a.sent();case 10:return[4,sr(n,t)];case 11:throw a.sent();case 12:i=n.body,Mt({output:e,parsedBody:i,exceptionCtor:Dn,errorCode:o}),a.label=13;case 13:return[2]}}))}))},tr=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i,u;return f(this,(function(a){switch(a.label){case 0:return r=[s({},e)],u={},[4,Ur(e.body,t)];case 1:switch(n=s.apply(void 0,r.concat([(u.body=a.sent(),u)])),o=Gr(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return[4,or(n,t)];case 3:throw a.sent();case 4:return[4,ir(n,t)];case 5:throw a.sent();case 6:return[4,ur(n,t)];case 7:throw a.sent();case 8:return[4,ar(n,t)];case 9:throw a.sent();case 10:return[4,sr(n,t)];case 11:throw a.sent();case 12:i=n.body,Mt({output:e,parsedBody:i,exceptionCtor:Dn,errorCode:o}),a.label=13;case 13:return[2]}}))}))},nr=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i,u;return f(this,(function(a){switch(a.label){case 0:return r=[s({},e)],u={},[4,Ur(e.body,t)];case 1:switch(n=s.apply(void 0,r.concat([(u.body=a.sent(),u)])),o=Gr(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return[4,or(n,t)];case 3:throw a.sent();case 4:return[4,ir(n,t)];case 5:throw a.sent();case 6:return[4,ur(n,t)];case 7:throw a.sent();case 8:return[4,ar(n,t)];case 9:throw a.sent();case 10:return[4,sr(n,t)];case 11:throw a.sent();case 12:i=n.body,Mt({output:e,parsedBody:i,exceptionCtor:Dn,errorCode:o}),a.label=13;case 13:return[2]}}))}))},rr=Nt,or=function(e,t){return l(void 0,void 0,void 0,(function(){var t,n,r;return f(this,(function(o){return t=rr({}),null!=(n=e.body).message&&(t.Message=dt(n.message)),r=new En(s({$metadata:jr(e)},t)),[2,Tt(r,e.body)]}))}))},ir=function(e,t){return l(void 0,void 0,void 0,(function(){var t,n,r;return f(this,(function(o){return t=rr({}),null!=(n=e.body).message&&(t.Message=dt(n.message)),r=new An(s({$metadata:jr(e)},t)),[2,Tt(r,e.body)]}))}))},ur=function(e,t){return l(void 0,void 0,void 0,(function(){var t,n,r;return f(this,(function(o){return t=rr({}),null!=(n=e.body).message&&(t.Message=dt(n.message)),r=new Cn(s({$metadata:jr(e)},t)),[2,Tt(r,e.body)]}))}))},ar=function(e,t){return l(void 0,void 0,void 0,(function(){var t,n,r;return f(this,(function(o){return t=rr({}),null!=(n=e.body).message&&(t.Message=dt(n.message)),r=new Fn(s({$metadata:jr(e)},t)),[2,Tt(r,e.body)]}))}))},sr=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o;return f(this,(function(i){return n=rr({}),null!=(r=e.body).fieldList&&(n.FieldList=Nr(r.fieldList,t)),null!=r.message&&(n.Message=dt(r.message)),null!=r.reason&&(n.Reason=dt(r.reason)),o=new _n(s({$metadata:jr(e)},n)),[2,Tt(o,e.body)]}))}))},cr=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return function(e,t){return s(s({},null!=e.GeofenceId&&{GeofenceId:e.GeofenceId}),null!=e.Geometry&&{Geometry:hr(e.Geometry,t)})}(e,t)}))},lr=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return zt(e)}))},fr=function(e,t){return s(s({},null!=e.Center&&{Center:yr(e.Center,t)}),null!=e.Radius&&{Radius:zt(e.Radius)})},dr=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return e}))},hr=function(e,t){return s(s({},null!=e.Circle&&{Circle:fr(e.Circle,t)}),null!=e.Polygon&&{Polygon:vr(e.Polygon,t)})},pr=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return e}))},vr=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return yr(e,t)}))}(e,t)}))},yr=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return zt(e)}))},gr=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Error:null!=e.Error?mr(e.Error,t):void 0,GeofenceId:dt(e.GeofenceId)}}(e,t)}))},mr=function(e,t){return{Code:dt(e.Code),Message:dt(e.Message)}},wr=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Error:null!=e.Error?mr(e.Error,t):void 0,GeofenceId:dt(e.GeofenceId)}}(e,t)}))},br=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{CreateTime:null!=e.CreateTime?lt(Et(e.CreateTime)):void 0,GeofenceId:dt(e.GeofenceId),UpdateTime:null!=e.UpdateTime?lt(Et(e.UpdateTime)):void 0}}(e)}))},Dr=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:vt(e)}))},Er=function(e,t){return{Center:null!=e.Center?Pr(e.Center,t):void 0,Radius:vt(e.Radius)}},Ar=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:dt(e)}))},Cr=function(e,t){return{Circle:null!=e.Circle?Er(e.Circle,t):void 0,Polygon:null!=e.Polygon?Fr(e.Polygon,t):void 0}},Fr=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:Pr(e,t)}))}(e,t)}))},_r=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{CreateTime:null!=e.CreateTime?lt(Et(e.CreateTime)):void 0,GeofenceId:dt(e.GeofenceId),Geometry:null!=e.Geometry?Cr(e.Geometry,t):void 0,Status:dt(e.Status),UpdateTime:null!=e.UpdateTime?lt(Et(e.UpdateTime)):void 0}}(e,t)}))},Sr=function(e,t){return{AddressNumber:dt(e.AddressNumber),Country:dt(e.Country),Geometry:null!=e.Geometry?xr(e.Geometry,t):void 0,Interpolated:et(e.Interpolated),Label:dt(e.Label),Municipality:dt(e.Municipality),Neighborhood:dt(e.Neighborhood),PostalCode:dt(e.PostalCode),Region:dt(e.Region),Street:dt(e.Street),SubRegion:dt(e.SubRegion),TimeZone:null!=e.TimeZone?kr(e.TimeZone,t):void 0,UnitNumber:dt(e.UnitNumber),UnitType:dt(e.UnitType)}},xr=function(e,t){return{Point:null!=e.Point?Pr(e.Point,t):void 0}},Pr=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:vt(e)}))},Br=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Distance:vt(e.Distance),Place:null!=e.Place?Sr(e.Place,t):void 0,PlaceId:dt(e.PlaceId)}}(e,t)}))},Tr=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{PlaceId:dt(e.PlaceId),Text:dt(e.Text)}}(e)}))},Mr=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Distance:vt(e.Distance),Place:null!=e.Place?Sr(e.Place,t):void 0,PlaceId:dt(e.PlaceId),Relevance:vt(e.Relevance)}}(e,t)}))},Or=function(e,t){return{DataSource:dt(e.DataSource),Language:dt(e.Language),MaxResults:it(e.MaxResults),Position:null!=e.Position?Pr(e.Position,t):void 0}},Rr=function(e,t){return{BiasPosition:null!=e.BiasPosition?Pr(e.BiasPosition,t):void 0,DataSource:dt(e.DataSource),FilterBBox:null!=e.FilterBBox?Dr(e.FilterBBox):void 0,FilterCountries:null!=e.FilterCountries?Ar(e.FilterCountries):void 0,Language:dt(e.Language),MaxResults:it(e.MaxResults),Text:dt(e.Text)}},Ir=function(e,t){return{BiasPosition:null!=e.BiasPosition?Pr(e.BiasPosition,t):void 0,DataSource:dt(e.DataSource),FilterBBox:null!=e.FilterBBox?Dr(e.FilterBBox):void 0,FilterCountries:null!=e.FilterCountries?Ar(e.FilterCountries):void 0,Language:dt(e.Language),MaxResults:it(e.MaxResults),ResultBBox:null!=e.ResultBBox?Dr(e.ResultBBox):void 0,Text:dt(e.Text)}},kr=function(e,t){return{Name:dt(e.Name),Offset:it(e.Offset)}},Nr=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Message:dt(e.message),Name:dt(e.name)}}(e)}))},jr=function(e){var t,n;return{httpStatusCode:e.statusCode,requestId:null!==(n=null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"])&&void 0!==n?n:e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},Lr=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},zr=function(e,t){return function(e,t){return Lr(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},Ur=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r;return f(this,(function(o){switch(o.label){case 0:return[4,zr(e,t)];case 1:return(n=o.sent()).message=null!==(r=n.message)&&void 0!==r?r:n.Message,[2,n]}}))}))},Gr=function(e,t){var n,r,o=function(e){var t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==i?o(e.headers[i]):void 0!==t.code?o(t.code):void 0!==t.__type?o(t.__type):void 0},qr=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return a(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(bn(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LocationClient",commandName:"SearchPlaceIndexForTextCommand",inputFilterSensitiveLog:Vn,outputFilterSensitiveLog:Yn},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i,u,a,c,l,d;return f(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:return n=f.sent(),n.hostname,r=n.protocol,o=void 0===r?"https":r,i=n.port,u=n.path,a={"content-type":"application/json"},c="".concat((null==u?void 0:u.endsWith("/"))?u.slice(0,-1):u||"")+"/places/v0/indexes/{IndexName}/search/text",c=Lt(c,e,"IndexName",(function(){return e.IndexName}),"{IndexName}",!1),l=JSON.stringify(s(s(s(s(s(s({},null!=e.BiasPosition&&{BiasPosition:yr(e.BiasPosition,t)}),null!=e.FilterBBox&&{FilterBBox:lr(e.FilterBBox,t)}),null!=e.FilterCountries&&{FilterCountries:dr(e.FilterCountries,t)}),null!=e.Language&&{Language:e.Language}),null!=e.MaxResults&&{MaxResults:e.MaxResults}),null!=e.Text&&{Text:e.Text})),[4,t.endpoint()];case 2:if(d=f.sent().hostname,!0!==t.disableHostPrefix&&!C(d="places."+d))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new E({protocol:o,hostname:d,port:i,method:"POST",headers:a,path:c,body:l})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i;return f(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,nr(e,t)]:(n=rr({$metadata:jr(e)}),o=lt,i=ft,[4,zr(e.body,t)]);case 1:return null!=(r=o.apply(void 0,[i.apply(void 0,[u.sent()]),"body"])).Results&&(n.Results=Mr(r.Results,t)),null!=r.Summary&&(n.Summary=Ir(r.Summary,t)),[2,n]}}))}))}(e,t)},t}(Qe),Hr=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return a(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(bn(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LocationClient",commandName:"SearchPlaceIndexForSuggestionsCommand",inputFilterSensitiveLog:qn,outputFilterSensitiveLog:Wn},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i,u,a,c,l,d;return f(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:return n=f.sent(),n.hostname,r=n.protocol,o=void 0===r?"https":r,i=n.port,u=n.path,a={"content-type":"application/json"},c="".concat((null==u?void 0:u.endsWith("/"))?u.slice(0,-1):u||"")+"/places/v0/indexes/{IndexName}/search/suggestions",c=Lt(c,e,"IndexName",(function(){return e.IndexName}),"{IndexName}",!1),l=JSON.stringify(s(s(s(s(s(s({},null!=e.BiasPosition&&{BiasPosition:yr(e.BiasPosition,t)}),null!=e.FilterBBox&&{FilterBBox:lr(e.FilterBBox,t)}),null!=e.FilterCountries&&{FilterCountries:dr(e.FilterCountries,t)}),null!=e.Language&&{Language:e.Language}),null!=e.MaxResults&&{MaxResults:e.MaxResults}),null!=e.Text&&{Text:e.Text})),[4,t.endpoint()];case 2:if(d=f.sent().hostname,!0!==t.disableHostPrefix&&!C(d="places."+d))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new E({protocol:o,hostname:d,port:i,method:"POST",headers:a,path:c,body:l})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i;return f(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,tr(e,t)]:(n=rr({$metadata:jr(e)}),o=lt,i=ft,[4,zr(e.body,t)]);case 1:return null!=(r=o.apply(void 0,[i.apply(void 0,[u.sent()]),"body"])).Results&&(n.Results=Tr(r.Results,t)),null!=r.Summary&&(n.Summary=Rr(r.Summary,t)),[2,n]}}))}))}(e,t)},t}(Qe),Wr=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return a(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(bn(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LocationClient",commandName:"GetPlaceCommand",inputFilterSensitiveLog:kn,outputFilterSensitiveLog:Ln},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i,u,a,s,c,l;return f(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:return n=f.sent(),n.hostname,r=n.protocol,o=void 0===r?"https":r,i=n.port,u=n.path,a={},s="".concat((null==u?void 0:u.endsWith("/"))?u.slice(0,-1):u||"")+"/places/v0/indexes/{IndexName}/places/{PlaceId}",s=Lt(s,e,"IndexName",(function(){return e.IndexName}),"{IndexName}",!1),s=Lt(s,e,"PlaceId",(function(){return e.PlaceId}),"{PlaceId}",!1),c=rr({language:[,e.Language]}),[4,t.endpoint()];case 2:if(l=f.sent().hostname,!0!==t.disableHostPrefix&&!C(l="places."+l))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new E({protocol:o,hostname:l,port:i,method:"GET",headers:a,path:s,query:c,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i;return f(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Qn(e,t)]:(n=rr({$metadata:jr(e)}),o=lt,i=ft,[4,zr(e.body,t)]);case 1:return null!=(r=o.apply(void 0,[i.apply(void 0,[u.sent()]),"body"])).Place&&(n.Place=Sr(r.Place,t)),[2,n]}}))}))}(e,t)},t}(Qe),Vr=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return a(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(bn(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LocationClient",commandName:"SearchPlaceIndexForPositionCommand",inputFilterSensitiveLog:zn,outputFilterSensitiveLog:Gn},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i,u,a,c,l,d;return f(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:return n=f.sent(),n.hostname,r=n.protocol,o=void 0===r?"https":r,i=n.port,u=n.path,a={"content-type":"application/json"},c="".concat((null==u?void 0:u.endsWith("/"))?u.slice(0,-1):u||"")+"/places/v0/indexes/{IndexName}/search/position",c=Lt(c,e,"IndexName",(function(){return e.IndexName}),"{IndexName}",!1),l=JSON.stringify(s(s(s({},null!=e.Language&&{Language:e.Language}),null!=e.MaxResults&&{MaxResults:e.MaxResults}),null!=e.Position&&{Position:yr(e.Position,t)})),[4,t.endpoint()];case 2:if(d=f.sent().hostname,!0!==t.disableHostPrefix&&!C(d="places."+d))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new E({protocol:o,hostname:d,port:i,method:"POST",headers:a,path:c,body:l})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i;return f(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,er(e,t)]:(n=rr({$metadata:jr(e)}),o=lt,i=ft,[4,zr(e.body,t)]);case 1:return null!=(r=o.apply(void 0,[i.apply(void 0,[u.sent()]),"body"])).Results&&(n.Results=Br(r.Results,t)),null!=r.Summary&&(n.Summary=Or(r.Summary,t)),[2,n]}}))}))}(e,t)},t}(Qe),$r=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return a(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(bn(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LocationClient",commandName:"GetGeofenceCommand",inputFilterSensitiveLog:Mn,outputFilterSensitiveLog:On},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i,u,a,s,c;return f(this,(function(l){switch(l.label){case 0:return[4,t.endpoint()];case 1:return n=l.sent(),n.hostname,r=n.protocol,o=void 0===r?"https":r,i=n.port,u=n.path,a={},s="".concat((null==u?void 0:u.endsWith("/"))?u.slice(0,-1):u||"")+"/geofencing/v0/collections/{CollectionName}/geofences/{GeofenceId}",s=Lt(s,e,"CollectionName",(function(){return e.CollectionName}),"{CollectionName}",!1),s=Lt(s,e,"GeofenceId",(function(){return e.GeofenceId}),"{GeofenceId}",!1),[4,t.endpoint()];case 2:if(c=l.sent().hostname,!0!==t.disableHostPrefix&&!C(c="geofencing."+c))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new E({protocol:o,hostname:c,port:i,method:"GET",headers:a,path:s,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i;return f(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Jn(e,t)]:(n=rr({$metadata:jr(e)}),o=lt,i=ft,[4,zr(e.body,t)]);case 1:return null!=(r=o.apply(void 0,[i.apply(void 0,[u.sent()]),"body"])).CreateTime&&(n.CreateTime=lt(Et(r.CreateTime))),null!=r.GeofenceId&&(n.GeofenceId=dt(r.GeofenceId)),null!=r.Geometry&&(n.Geometry=Cr(r.Geometry,t)),null!=r.Status&&(n.Status=dt(r.Status)),null!=r.UpdateTime&&(n.UpdateTime=lt(Et(r.UpdateTime))),[2,n]}}))}))}(e,t)},t}(Qe),Yr=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return a(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(bn(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LocationClient",commandName:"ListGeofencesCommand",inputFilterSensitiveLog:Rn,outputFilterSensitiveLog:In},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i,u,a,c,l,d;return f(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:return n=f.sent(),n.hostname,r=n.protocol,o=void 0===r?"https":r,i=n.port,u=n.path,a={"content-type":"application/json"},c="".concat((null==u?void 0:u.endsWith("/"))?u.slice(0,-1):u||"")+"/geofencing/v0/collections/{CollectionName}/list-geofences",c=Lt(c,e,"CollectionName",(function(){return e.CollectionName}),"{CollectionName}",!1),l=JSON.stringify(s(s({},null!=e.MaxResults&&{MaxResults:e.MaxResults}),null!=e.NextToken&&{NextToken:e.NextToken})),[4,t.endpoint()];case 2:if(d=f.sent().hostname,!0!==t.disableHostPrefix&&!C(d="geofencing."+d))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new E({protocol:o,hostname:d,port:i,method:"POST",headers:a,path:c,body:l})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i;return f(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Xn(e,t)]:(n=rr({$metadata:jr(e)}),o=lt,i=ft,[4,zr(e.body,t)]);case 1:return null!=(r=o.apply(void 0,[i.apply(void 0,[u.sent()]),"body"])).Entries&&(n.Entries=_r(r.Entries,t)),null!=r.NextToken&&(n.NextToken=dt(r.NextToken)),[2,n]}}))}))}(e,t)},t}(Qe),Kr=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return a(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(bn(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LocationClient",commandName:"BatchPutGeofenceCommand",inputFilterSensitiveLog:Bn,outputFilterSensitiveLog:Tn},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i,u,a,c,l,d;return f(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:return n=f.sent(),n.hostname,r=n.protocol,o=void 0===r?"https":r,i=n.port,u=n.path,a={"content-type":"application/json"},c="".concat((null==u?void 0:u.endsWith("/"))?u.slice(0,-1):u||"")+"/geofencing/v0/collections/{CollectionName}/put-geofences",c=Lt(c,e,"CollectionName",(function(){return e.CollectionName}),"{CollectionName}",!1),l=JSON.stringify(s({},null!=e.Entries&&{Entries:cr(e.Entries,t)})),[4,t.endpoint()];case 2:if(d=f.sent().hostname,!0!==t.disableHostPrefix&&!C(d="geofencing."+d))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new E({protocol:o,hostname:d,port:i,method:"POST",headers:a,path:c,body:l})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i;return f(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Zn(e,t)]:(n=rr({$metadata:jr(e)}),o=lt,i=ft,[4,zr(e.body,t)]);case 1:return null!=(r=o.apply(void 0,[i.apply(void 0,[u.sent()]),"body"])).Errors&&(n.Errors=wr(r.Errors,t)),null!=r.Successes&&(n.Successes=br(r.Successes,t)),[2,n]}}))}))}(e,t)},t}(Qe),Zr=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return a(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(bn(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LocationClient",commandName:"BatchDeleteGeofenceCommand",inputFilterSensitiveLog:Sn,outputFilterSensitiveLog:xn},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i,u,a,c,l,d;return f(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:return n=f.sent(),n.hostname,r=n.protocol,o=void 0===r?"https":r,i=n.port,u=n.path,a={"content-type":"application/json"},c="".concat((null==u?void 0:u.endsWith("/"))?u.slice(0,-1):u||"")+"/geofencing/v0/collections/{CollectionName}/delete-geofences",c=Lt(c,e,"CollectionName",(function(){return e.CollectionName}),"{CollectionName}",!1),l=JSON.stringify(s({},null!=e.GeofenceIds&&{GeofenceIds:pr(e.GeofenceIds,t)})),[4,t.endpoint()];case 2:if(d=f.sent().hostname,!0!==t.disableHostPrefix&&!C(d="geofencing."+d))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new E({protocol:o,hostname:d,port:i,method:"POST",headers:a,path:c,body:l})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,o,i;return f(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Kn(e,t)]:(n=rr({$metadata:jr(e)}),o=lt,i=ft,[4,zr(e.body,t)]);case 1:return null!=(r=o.apply(void 0,[i.apply(void 0,[u.sent()]),"body"])).Errors&&(n.Errors=gr(r.Errors,t)),[2,n]}}))}))}(e,t)},t}(Qe);function Jr(e){for(var t,n,r=function(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(e),o=0,i=1;i<r.length;)t=n||r[0],o+=((n=r[i])[0]-t[0])*(n[1]+t[1]),i++;return o>0}var Qr=function(){return(Qr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Xr=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u};function eo(e,t){if(!Number.isFinite(e)||!Number.isFinite(t))throw new Error("Invalid coordinates: ["+e+","+t+"]");if(t<-90||90<t)throw new Error("Latitude must be between -90 and 90 degrees inclusive.");if(e<-180||180<e)throw new Error("Longitude must be between -180 and 180 degrees inclusive.")}function to(e){if(!/^(?:[\x2D\.0-9A-Z_a-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])+$/i.test(e))throw new Error("Invalid geofenceId: '"+e+"' - IDs can only contain alphanumeric characters, hyphens, underscores and periods.")}function no(e,t){var n=t?t+": ":"";if(e.length<4)throw new Error(n+"LinearRing must contain 4 or more coordinates.");var r=[];if(e.forEach((function(e){try{eo(e[0],e[1])}catch(t){r.push({coordinates:e,error:t.message})}})),r.length>0)throw new Error(n+"One or more of the coordinates in the Polygon LinearRing are not valid: "+JSON.stringify(r));var o=Xr(e[0],2),i=o[0],u=o[1],a=Xr(e[e.length-1],2),s=a[0],c=a[1];if(i!==s||u!==c)throw new Error(n+"LinearRing's first and last coordinates are not the same");if(Jr(e))throw new Error(n+"LinearRing coordinates must be wound counterclockwise")}function ro(e){var t={};e.forEach((function(e){if(!e.geofenceId)throw new Error("Geofence '"+e+"' is missing geofenceId");var n=e.geofenceId;if(to(n),t[n])throw new Error("Duplicate geofenceId: "+n);if(t[n]=!0,!e.geometry)throw new Error("Geofence '"+n+"' is missing geometry");var r=e.geometry;if(!r.polygon)throw new Error("Geofence '"+n+"' is missing geometry.polygon");var o=r.polygon;try{!function(e,t){var n=t?t+": ":"";if(!Array.isArray(e))throw new Error(n+"Polygon is of incorrect structure. It should be an array of LinearRings");if(e.length<1)throw new Error(n+"Polygon must have a single LinearRing array.");if(e.length>1)throw new Error(n+"Polygon must have a single LinearRing array. Note: We do not currently support polygons with holes, multipolygons, polygons that are wound clockwise, or that cross the antimeridian.");if(e.reduce((function(e,t){return e+t.length}),0)>1e3)throw new Error(n+"Polygon has more than the maximum 1000 vertices.");e.forEach((function(e){no(e,t)}))}(o,n)}catch(e){if(e.message.includes("Polygon has more than the maximum 1000 vertices."))throw new Error("Geofence '"+n+"' has more than the maximum of 1000 vertices")}no(Xr(o,1)[0],n)}))}function oo(e,t){var n=Qr({},t);if(n.FilterCountries=e.countries,n.MaxResults=e.maxResults,e.searchIndexName&&(n.IndexName=e.searchIndexName),e.biasPosition&&e.searchAreaConstraints)throw new Error("BiasPosition and SearchAreaConstraints are mutually exclusive, please remove one or the other from the options object");return e.biasPosition&&(n.BiasPosition=e.biasPosition),e.searchAreaConstraints&&(n.FilterBBox=e.searchAreaConstraints),n}var io=function(){return(io=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},uo=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))},ao=function(e,t){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},so=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u},co=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(so(arguments[t]));return e},lo=new r.ConsoleLogger("AmazonLocationServiceProvider"),fo=function(){function e(e){this._config=e||{},lo.debug("Geo Options",this._config)}return e.prototype.getCategory=function(){return e.CATEGORY},e.prototype.getProviderName=function(){return e.PROVIDER_NAME},e.prototype.configure=function(e){return lo.debug("configure Amazon Location Service Provider",e),e?(this._config=Object.assign({},this._config,e),this._config):this._config},e.prototype.getAvailableMaps=function(){this._verifyMapResources();var e=[],t=this._config.maps.items,n=this._config.region;for(var r in t){var o=t[r].style;e.push({mapName:r,style:o,region:n})}return e},e.prototype.getDefaultMap=function(){this._verifyMapResources();var e=this._config.maps.default;return{mapName:e,style:this._config.maps.items[e].style,region:this._config.region}},e.prototype.searchByText=function(e,t){return uo(this,void 0,void 0,(function(){var n,o,u,a,s,c;return ao(this,(function(l){switch(l.label){case 0:return[4,this._ensureCredentials()];case 1:if(!l.sent())throw new Error("No credentials");this._verifySearchIndex(null==t?void 0:t.searchIndexName),n={Text:e,IndexName:this._config.search_indices.default},t&&(n=io(io({},n),oo(t,n))),o=new gn({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(r.getAmplifyUserAgent)()}),u=new qr(n),l.label=2;case 2:return l.trys.push([2,4,,5]),[4,o.send(u)];case 3:return a=l.sent(),[3,5];case 4:throw s=l.sent(),lo.debug(s),s;case 5:return c=a.Results.map((function(e){return e.Place})),[2,i()(c,{deep:!0})]}}))}))},e.prototype.searchForSuggestions=function(e,t){return uo(this,void 0,void 0,(function(){var n,o,i,u,a;return ao(this,(function(s){switch(s.label){case 0:return[4,this._ensureCredentials()];case 1:if(!s.sent())throw new Error("No credentials");this._verifySearchIndex(null==t?void 0:t.searchIndexName),n={Text:e,IndexName:this._config.search_indices.default},t&&(n=io(io({},n),oo(t,n))),o=new gn({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(r.getAmplifyUserAgent)()}),i=new Hr(n),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,o.send(i)];case 3:return u=s.sent(),[3,5];case 4:throw a=s.sent(),lo.debug(a),a;case 5:return[2,u.Results.map((function(e){return{text:e.Text,placeId:e.PlaceId}}))]}}))}))},e.prototype._verifyPlaceId=function(e){if(0===e.length){var t="PlaceId cannot be an empty string.";throw lo.debug(t),new Error(t)}},e.prototype.searchByPlaceId=function(e,t){return uo(this,void 0,void 0,(function(){var n,o,u,a,s,c;return ao(this,(function(l){switch(l.label){case 0:return[4,this._ensureCredentials()];case 1:if(!l.sent())throw new Error("No credentials");this._verifySearchIndex(null==t?void 0:t.searchIndexName),this._verifyPlaceId(e),n=new gn({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(r.getAmplifyUserAgent)()}),o={PlaceId:e,IndexName:(null==t?void 0:t.searchIndexName)||this._config.search_indices.default},u=new Wr(o),l.label=2;case 2:return l.trys.push([2,4,,5]),[4,n.send(u)];case 3:return a=l.sent(),[3,5];case 4:throw s=l.sent(),lo.debug(s),s;case 5:return(c=a.Place)?[2,i()(c,{deep:!0})]:[2]}}))}))},e.prototype.searchByCoordinates=function(e,t){return uo(this,void 0,void 0,(function(){var n,o,u,a,s,c;return ao(this,(function(l){switch(l.label){case 0:return[4,this._ensureCredentials()];case 1:if(!l.sent())throw new Error("No credentials");this._verifySearchIndex(null==t?void 0:t.searchIndexName),n={Position:e,IndexName:this._config.search_indices.default},t&&(t.searchIndexName&&(n.IndexName=t.searchIndexName),n.MaxResults=t.maxResults),o=new gn({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(r.getAmplifyUserAgent)()}),u=new Vr(n),l.label=2;case 2:return l.trys.push([2,4,,5]),[4,o.send(u)];case 3:return a=l.sent(),[3,5];case 4:throw s=l.sent(),lo.debug(s),s;case 5:return c=a.Results.map((function(e){return e.Place})),[2,i()(c[0],{deep:!0})]}}))}))},e.prototype.saveGeofences=function(e,t){return uo(this,void 0,void 0,(function(){var n,r,o,i=this;return ao(this,(function(u){switch(u.label){case 0:if(e.length<1)throw new Error("Geofence input array is empty");return[4,this._ensureCredentials()];case 1:if(!u.sent())throw new Error("No credentials");try{this._verifyGeofenceCollections(null==t?void 0:t.collectionName)}catch(e){throw lo.debug(e),e}for(ro(e),n=e.map((function(e){return{GeofenceId:e.geofenceId,Geometry:{Polygon:e.geometry.polygon}}})),r={successes:[],errors:[]},o=[];n.length>0;)10,o.push(n.splice(0,10));return[4,Promise.all(o.map((function(e){return uo(i,void 0,void 0,(function(){var n,o;return ao(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this._AmazonLocationServiceBatchPutGeofenceCall(e,(null==t?void 0:t.collectionName)||this._config.geofenceCollections.default)];case 1:return n=i.sent(),[3,3];case 2:return o=i.sent(),e.forEach((function(e){r.errors.push({geofenceId:e.GeofenceId,error:{code:"APIConnectionError",message:o.message}})})),[2];case 3:return n.Successes.forEach((function(e){var t=e.GeofenceId,n=e.CreateTime,o=e.UpdateTime;r.successes.push({geofenceId:t,createTime:n,updateTime:o})})),n.Errors.forEach((function(e){var t=e.Error,n=t.Code,o=t.Message,i=e.GeofenceId;r.errors.push({error:{code:n,message:o},geofenceId:i})})),[2]}}))}))})))];case 2:return u.sent(),[2,r]}}))}))},e.prototype.getGeofence=function(e,t){return uo(this,void 0,void 0,(function(){var n,o,i,u,a,s,c,l,f,d;return ao(this,(function(h){switch(h.label){case 0:return[4,this._ensureCredentials()];case 1:if(!h.sent())throw new Error("No credentials");try{this._verifyGeofenceCollections(null==t?void 0:t.collectionName)}catch(e){throw lo.debug(e),e}to(e),n=new gn({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(r.getAmplifyUserAgent)()}),o={GeofenceId:e,CollectionName:(null==t?void 0:t.collectionName)||this._config.geofenceCollections.default},i=new $r(o),h.label=2;case 2:return h.trys.push([2,4,,5]),[4,n.send(i)];case 3:return u=h.sent(),[3,5];case 4:throw a=h.sent(),lo.debug(a),a;case 5:return s=u.GeofenceId,c=u.CreateTime,l=u.UpdateTime,f=u.Status,d=u.Geometry,[2,{createTime:c,geofenceId:s,geometry:{polygon:d.Polygon},status:f,updateTime:l}]}}))}))},e.prototype.listGeofences=function(e){return uo(this,void 0,void 0,(function(){var t,n,o,i,u,a,s;return ao(this,(function(c){switch(c.label){case 0:return[4,this._ensureCredentials()];case 1:if(!c.sent())throw new Error("No credentials");try{this._verifyGeofenceCollections(null==e?void 0:e.collectionName)}catch(e){throw lo.debug(e),e}t=new gn({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(r.getAmplifyUserAgent)()}),n={NextToken:null==e?void 0:e.nextToken,CollectionName:(null==e?void 0:e.collectionName)||this._config.geofenceCollections.default},o=new Yr(n),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,t.send(o)];case 3:return i=c.sent(),[3,5];case 4:throw u=c.sent(),lo.debug(u),u;case 5:return a=i.NextToken,s=i.Entries,[2,{entries:s.map((function(e){return{geofenceId:e.GeofenceId,createTime:e.CreateTime,updateTime:e.UpdateTime,status:e.Status,geometry:{polygon:e.Geometry.Polygon}}})),nextToken:a}]}}))}))},e.prototype.deleteGeofences=function(e,t){return uo(this,void 0,void 0,(function(){var n,r,o,i,u=this;return ao(this,(function(a){switch(a.label){case 0:if(e.length<1)throw new Error("GeofenceId input array is empty");return[4,this._ensureCredentials()];case 1:if(!a.sent())throw new Error("No credentials");if(this._verifyGeofenceCollections(null==t?void 0:t.collectionName),(n=e.filter((function(e){try{to(e)}catch(e){return!0}}))).length>0)throw new Error("Invalid geofence ids: "+n.join(", "));for(r={successes:[],errors:[]},o=[],i=0;i<e.length;)o.push(e.slice(i,i+=10));return[4,Promise.all(o.map((function(e){return uo(u,void 0,void 0,(function(){var n,o,i,u;return ao(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this._AmazonLocationServiceBatchDeleteGeofenceCall(e,(null==t?void 0:t.collectionName)||this._config.geofenceCollections.default)];case 1:return n=a.sent(),[3,3];case 2:return o=a.sent(),e.forEach((function(e){var t={geofenceId:e,error:{code:o.message,message:o.message}};r.errors.push(t)})),[2];case 3:return i=n.Errors.map((function(e){return e.geofenceId})),(u=r.successes).push.apply(u,co(e.filter((function(e){return!i.includes(e)})))),[2]}}))}))})))];case 2:return a.sent(),[2,r]}}))}))},e.prototype._ensureCredentials=function(){return uo(this,void 0,void 0,(function(){var e,t,n;return ao(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,r.Credentials.get()];case 1:return(e=o.sent())?(t=r.Credentials.shear(e),lo.debug("Set credentials for storage. Credentials are:",t),this._config.credentials=t,[2,!0]):[2,!1];case 2:return n=o.sent(),lo.debug("Ensure credentials error. Credentials are:",n),[2,!1];case 3:return[2]}}))}))},e.prototype._verifyMapResources=function(){if(!this._config.maps){var e="No map resources found in amplify config, run 'amplify add geo' to create one and run `amplify push` after";throw lo.debug(e),new Error(e)}if(!this._config.maps.default){e="No default map resource found in amplify config, run 'amplify add geo' to create one and run `amplify push` after";throw lo.debug(e),new Error(e)}},e.prototype._verifySearchIndex=function(e){if(!(this._config.search_indices&&this._config.search_indices.default||e)){var t="No Search Index found in amplify config, please run `amplify add geo` to create one and run `amplify push` after.";throw lo.debug(t),new Error(t)}},e.prototype._verifyGeofenceCollections=function(e){if(!(this._config.geofenceCollections&&this._config.geofenceCollections.default||e)){var t="No Geofence Collections found, please run `amplify add geo` to create one and run `amplify push` after.";throw lo.debug(t),new Error(t)}},e.prototype._AmazonLocationServiceBatchPutGeofenceCall=function(e,t){return uo(this,void 0,void 0,(function(){var n,o,i,u;return ao(this,(function(a){switch(a.label){case 0:n={Entries:e,CollectionName:t||this._config.geofenceCollections.default},o=new gn({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(r.getAmplifyUserAgent)()}),i=new Kr(n),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,o.send(i)];case 2:return u=a.sent(),[3,4];case 3:throw a.sent();case 4:return[2,u]}}))}))},e.prototype._AmazonLocationServiceBatchDeleteGeofenceCall=function(e,t){return uo(this,void 0,void 0,(function(){var n,o,i,u;return ao(this,(function(a){switch(a.label){case 0:n={GeofenceIds:e,CollectionName:t||this._config.geofenceCollections.default},o=new gn({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(r.getAmplifyUserAgent)()}),i=new Zr(n),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,o.send(i)];case 2:return u=a.sent(),[3,4];case 3:throw a.sent();case 4:return[2,u]}}))}))},e.CATEGORY="Geo",e.PROVIDER_NAME="AmazonLocationService",e}(),ho=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))},po=function(e,t){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},vo=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u},yo=new r.ConsoleLogger("Geo"),go="AmazonLocationService",mo=new(function(){function e(){this._config={},this._pluggables=[],yo.debug("Geo Options",this._config)}return e.prototype.getModuleName=function(){return e.MODULE},e.prototype.addPluggable=function(e){if(e&&"Geo"===e.getCategory())return this._pluggables.push(e),e.configure(this._config[e.getProviderName()])},e.prototype.getPluggable=function(e){var t=this._pluggables.find((function(t){return t.getProviderName()===e}));if(void 0===t)throw yo.debug("No plugin found with providerName",e),new Error("No plugin found in Geo for the provider");return 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(yo.debug("configure Geo"),!e)return this._config;var n=Object(r.parseMobileHubConfig)(e);return this._config=Object.assign({},this._config,n.Geo,e),this._pluggables.forEach((function(e){e.configure(t._config[e.getProviderName()])})),0===this._pluggables.length&&this.addPluggable(new fo),this._config},e.prototype.getAvailableMaps=function(e){return void 0===e&&(e=go),this.getPluggable(e).getAvailableMaps()},e.prototype.getDefaultMap=function(e){return void 0===e&&(e=go),this.getPluggable(e).getDefaultMap()},e.prototype.searchByText=function(e,t){return ho(this,void 0,void 0,(function(){var n,r,o,i;return po(this,(function(u){switch(u.label){case 0:n=(t||{}).providerName,r=void 0===n?go:n,o=this.getPluggable(r),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,o.searchByText(e,t)];case 2:return[2,u.sent()];case 3:throw i=u.sent(),yo.debug(i),i;case 4:return[2]}}))}))},e.prototype.searchForSuggestions=function(e,t){return ho(this,void 0,void 0,(function(){var n,r,o,i;return po(this,(function(u){switch(u.label){case 0:n=(t||{}).providerName,r=void 0===n?go:n,o=this.getPluggable(r),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,o.searchForSuggestions(e,t)];case 2:return[2,u.sent()];case 3:throw i=u.sent(),yo.debug(i),i;case 4:return[2]}}))}))},e.prototype.searchByPlaceId=function(e,t){return ho(this,void 0,void 0,(function(){var n,r;return po(this,(function(o){switch(o.label){case 0:go,n=this.getPluggable("AmazonLocationService"),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,n.searchByPlaceId(e,t)];case 2:return[2,o.sent()];case 3:throw r=o.sent(),yo.debug(r),r;case 4:return[2]}}))}))},e.prototype.searchByCoordinates=function(e,t){return ho(this,void 0,void 0,(function(){var n,r,o,i,u,a,s;return po(this,(function(c){switch(c.label){case 0:n=(t||{}).providerName,r=void 0===n?go:n,o=this.getPluggable(r),i=vo(e,2),u=i[0],a=i[1],c.label=1;case 1:return c.trys.push([1,3,,4]),eo(u,a),[4,o.searchByCoordinates(e,t)];case 2:return[2,c.sent()];case 3:throw s=c.sent(),yo.debug(s),s;case 4:return[2]}}))}))},e.prototype.saveGeofences=function(e,t){return ho(this,void 0,void 0,(function(){var n,r,o,i,u;return po(this,(function(a){switch(a.label){case 0:n=(t||{}).providerName,r=void 0===n?go:n,o=this.getPluggable(r),i=Array.isArray(e)?e:[e],a.label=1;case 1:return a.trys.push([1,3,,4]),[4,o.saveGeofences(i,t)];case 2:return[2,a.sent()];case 3:throw u=a.sent(),yo.debug(u),u;case 4:return[2]}}))}))},e.prototype.getGeofence=function(e,t){return ho(this,void 0,void 0,(function(){var n,r,o,i;return po(this,(function(u){switch(u.label){case 0:n=(t||{}).providerName,r=void 0===n?go:n,o=this.getPluggable(r),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,o.getGeofence(e,t)];case 2:return[2,u.sent()];case 3:throw i=u.sent(),yo.debug(i),i;case 4:return[2]}}))}))},e.prototype.listGeofences=function(e){return ho(this,void 0,void 0,(function(){var t,n,r,o;return po(this,(function(i){switch(i.label){case 0:t=(e||{}).providerName,n=void 0===t?go:t,r=this.getPluggable(n),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r.listGeofences(e)];case 2:return[2,i.sent()];case 3:throw o=i.sent(),yo.debug(o),o;case 4:return[2]}}))}))},e.prototype.deleteGeofences=function(e,t){return ho(this,void 0,void 0,(function(){var n,r,o,i,u;return po(this,(function(a){switch(a.label){case 0:n=(t||{}).providerName,r=void 0===n?go:n,o=this.getPluggable(r),i=Array.isArray(e)?e:[e],a.label=1;case 1:return a.trys.push([1,3,,4]),[4,o.deleteGeofences(i,t)];case 2:return[2,a.sent()];case 3:throw u=a.sent(),yo.debug(u),u;case 4:return[2]}}))}))},e.MODULE="Geo",e}());r.Amplify.register(mo)},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));const r=e=>"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):(e=>{const t=[];for(let n=0,r=e.length;n<r;n++){const r=e.charCodeAt(n);if(r<128)t.push(r);else if(r<2048)t.push(r>>6|192,63&r|128);else if(n+1<e.length&&55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))){const o=65536+((1023&r)<<10)+(1023&e.charCodeAt(++n));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(r>>12|224,r>>6&63|128,63&r|128)}return Uint8Array.from(t)})(e),o=e=>"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):(e=>{let t="";for(let n=0,r=e.length;n<r;n++){const r=e[n];if(r<128)t+=String.fromCharCode(r);else if(192<=r&&r<224){const o=e[++n];t+=String.fromCharCode((31&r)<<6|63&o)}else if(240<=r&&r<365){const o="%"+[r,e[++n],e[++n],e[++n]].map(e=>e.toString(16)).join("%");t+=decodeURIComponent(o)}else t+=String.fromCharCode((15&r)<<12|(63&e[++n])<<6|63&e[++n])}return t})(e)},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));const r=e=>"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):(e=>{const t=[];for(let n=0,r=e.length;n<r;n++){const r=e.charCodeAt(n);if(r<128)t.push(r);else if(r<2048)t.push(r>>6|192,63&r|128);else if(n+1<e.length&&55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))){const o=65536+((1023&r)<<10)+(1023&e.charCodeAt(++n));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(r>>12|224,r>>6&63|128,63&r|128)}return Uint8Array.from(t)})(e),o=e=>"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):(e=>{let t="";for(let n=0,r=e.length;n<r;n++){const r=e[n];if(r<128)t+=String.fromCharCode(r);else if(192<=r&&r<224){const o=e[++n];t+=String.fromCharCode((31&r)<<6|63&o)}else if(240<=r&&r<365){const o="%"+[r,e[++n],e[++n],e[++n]].map(e=>e.toString(16)).join("%");t+=decodeURIComponent(o)}else t+=String.fromCharCode((15&r)<<12|(63&e[++n])<<6|63&e[++n])}return t})(e)}])}));
|
|
56
|
+
//# sourceMappingURL=aws-amplify-geo.min.js.map
|