/*! For license information please see bundle.js.LICENSE.txt */ (()=>{var e,t,r,n,i={10914:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var n=r(89945),i=function(){function e(){this.state=Int32Array.from(n.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,r=e.byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>n.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,this.bufferLength===n.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(t.setUint8(this.bufferLength++,128),r%n.BLOCK_SIZE>=n.BLOCK_SIZE-8){for(var i=this.bufferLength;i>>24&255,o[4*i+1]=this.state[i]>>>16&255,o[4*i+2]=this.state[i]>>>8&255,o[4*i+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=0;d>>17|f<<15)^(f>>>19|f<<13)^f>>>10,p=((f=this.temp[d-15])>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(p+this.temp[d-16]|0)}var m=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(l+(n.KEY[d]+this.temp[d]|0)|0)|0,y=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&o^i&o)|0;l=c,c=u,u=s,s=a+m|0,a=o,o=i,i=r,r=m+y|0}t[0]+=r,t[1]+=i,t[2]+=o,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=l},e}();t.RawSha256=i},89945:(e,t)=>{"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},41938:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,r(70655).__exportStar)(r(65430),t)},65430:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(70655),i=r(89945),o=r(10914),a=r(17658),s=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>i.BLOCK_SIZE){var r=new o.RawSha256;r.update(t),t=r.digest()}var n=new Uint8Array(i.BLOCK_SIZE);return n.set(t),n}(e),r=new Uint8Array(i.BLOCK_SIZE);r.set(t);for(var n=0;n{"use strict";var n=r(23085).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var i=r(62084),o=void 0!==n&&n.from?function(e){return n.from(e,"utf8")}:i.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)}},17658:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var n=r(51106);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return n.convertToBuffer}});var i=r(84304);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return i.isEmptyData}});var o=r(22174);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return o.numToUint8}});var a=r(81558);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},84304:(e,t)=>{"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}},22174:(e,t)=>{"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])}},81558:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0{"use strict";r.r(t),r.d(t,{fromUtf8:()=>n,toUtf8:()=>i});const n=e=>"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):(e=>{const t=[];for(let r=0,n=e.length;r>6|192,63&n|128);else if(r+1>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(n>>12|224,n>>6&63|128,63&n|128)}return Uint8Array.from(t)})(e),i=e=>"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):(e=>{let t="";for(let r=0,n=e.length;re.toString(16))).join("%");t+=decodeURIComponent(i)}else t+=String.fromCharCode((15&n)<<12|(63&e[++r])<<6|63&e[++r])}return t})(e)},27111:(e,t)=>{"use strict";t.$V=t.Z3=void 0,t.Z3="live";var r=new RegExp("^(?:(?:/([a-z]+-[a-z]+-\\d+))?/(".concat(t.Z3,"|\\d+-[\\da-f]{6}-\\d+))?(/deploy(?:/(.+))?)$"));t.$V=function(e){var t,n=null!==(t=r.exec(e))&&void 0!==t?t:[];return{region:n[1],buildId:n[2],apiPath:n[3],relativePath:n[4]}}},55212:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Country=void 0,function(e){e.US="US",e.Canada="Canada"}(r||(t.Country=r={}))},68073:(e,t)=>{"use strict";var r,n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.ProcessType=t.PRICING_ORDER_TYPE_SEQUENCE=t.OrderType=t.TpsOrderServiceType=void 0,function(e){e.stDelivery="stDelivery",e.stPickUp="stPickUp",e.stToGo="stToGo",e.stBar="stBar",e.stDineIn="stDineIn",e.stEatIn="stEatIn",e.stDriveThru="stDriveThru",e.stRoomService="stRoomService",e.stMerchandise="stMerchandise"}(r||(t.TpsOrderServiceType=r={})),function(e){e.Pickup="Pickup",e.Delivery="Delivery"}(n||(t.OrderType=n={})),t.PRICING_ORDER_TYPE_SEQUENCE=[n.Pickup,n.Delivery],function(e){e.TerminalSingleDeliveryStoreSelection="TerminalSingleDeliveryStoreSelection",e.OpenStoreSelection="OpenStoreSelection"}(i||(t.ProcessType=i={}))},535:(e,t,r)=>{"use strict";var n;t.Z9=t.VY=t.OZ=t.eD=t.e7=t.Gn=t.kH=void 0;var i,o,a=r(68073);t.kH="{tenantId}",t.Gn="{usi}",t.e7="{lat}",t.eD="{lng}","stores?tenantId=".concat(t.kH,"&usi=").concat(t.Gn),"stores?tenantId=".concat(t.kH,"&lat=").concat(t.e7,"&lng=").concat(t.eD),function(e){e.Yes="Yes",e.No="No"}(i||(t.OZ=i={})),t.VY=((n={})[a.OrderType.Delivery]="deliveryTypes",n[a.OrderType.Pickup]="pickupTypes",n),function(e){e.Informational="informational",e.Warning="warning"}(o||(t.Z9=o={}))},85491:(e,t,r)=>{"use strict";t.OZ=t._w=void 0;var n,i;r(55212);(function(e){e.SpeedDine="SpeedDine",e.Punchh="Punchh",e.Valutec="SpeedLine Loyalty"})(n||(t._w=n={})),function(e){e.Maybe="Maybe",e.Yes="Yes",e.No="No"}(i||(t.OZ=i={}))},96996:function(e,t){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.objectFromEntries=t.objectMap=t.objectEntries=t.objectKeys=t.objectForEach=void 0,t.objectForEach=function(e,r){(0,t.objectKeys)(e).forEach((function(t){r(e[t],t)}))},t.objectKeys=Object.keys,t.objectEntries=Object.entries,t.objectMap=function(e,r){var n=[];return(0,t.objectKeys)(e).forEach((function(t,i){n[i]=r(e[t],t)})),n},t.objectFromEntries=function(e){var t,i,o={};try{for(var a=r(e),s=a.next();!s.done;s=a.next()){var u=n(s.value,2),c=u[0],l=u[1];o[c]=l}}catch(e){t={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(t)throw t.error}}return o}},55797:(e,t)=>{"use strict";t.w=void 0,t.w=function(e){return e?JSON.parse(JSON.stringify(e)):e}},68530:(e,t,r)=>{"use strict";var n=r(25108);t.Wk=t.vE=void 0,t.vE=function(e,t){throw new Error(t)},t.Wk=function(e,t){n.warn(t)}},28599:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},4102:(e,t,r)=>{"use strict";r.d(t,{sD:()=>i,ws:()=>Z,KC:()=>j,AM:()=>ee});var n,i=function(){function e(e){var t=e||{},r=t.ValidationData,n=t.Username,i=t.Password,o=t.AuthParameters,a=t.ClientMetadata;this.validationData=r||{},this.authParameters=o||{},this.clientMetadata=a||{},this.username=n,this.password=i}var t=e.prototype;return t.getUsername=function(){return this.username},t.getPassword=function(){return this.password},t.getValidationData=function(){return this.validationData},t.getAuthParameters=function(){return this.authParameters},t.getClientMetadata=function(){return this.clientMetadata},e}(),o=r(48764);function a(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")}"undefined"!=typeof window&&window.crypto&&(n=window.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto);var s=function(){function e(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length}var t=e.prototype;return t.random=function(t){for(var r=[],n=0;n>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")}(this)},e}(),u=r(41938);const c=l;function l(e,t){null!=e&&this.fromString(e,t)}function d(){return new l(null)}var f,h="undefined"!=typeof navigator;h&&"Microsoft Internet Explorer"==navigator.appName?(l.prototype.am=function(e,t,r,n,i,o){for(var a=32767&t,s=t>>15;--o>=0;){var u=32767&this[e],c=this[e++]>>15,l=s*u+c*a;i=((u=a*u+((32767&l)<<15)+r[n]+(1073741823&i))>>>30)+(l>>>15)+s*c+(i>>>30),r[n++]=1073741823&u}return i},f=30):h&&"Netscape"!=navigator.appName?(l.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var a=t*this[e++]+r[n]+i;i=Math.floor(a/67108864),r[n++]=67108863&a}return i},f=26):(l.prototype.am=function(e,t,r,n,i,o){for(var a=16383&t,s=t>>14;--o>=0;){var u=16383&this[e],c=this[e++]>>14,l=s*u+c*a;i=((u=a*u+((16383&l)<<14)+r[n]+i)>>28)+(l>>14)+s*c,r[n++]=268435455&u}return i},f=28),l.prototype.DB=f,l.prototype.DM=(1<>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function S(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(t,t),t},S.prototype.revert=function(e){var t=d();return e.copyTo(t),this.reduce(t),t},S.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},S.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},S.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},l.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},l.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},l.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");r=2}this.t=0,this.s=0;for(var n=e.length,i=!1,o=0;--n>=0;){var a=g(e,n);a<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==o?this[this.t++]=a:o+r>this.DB?(this[this.t-1]|=(a&(1<>this.DB-o):this[this.t-1]|=a<=this.DB&&(o-=this.DB))}this.clamp(),i&&l.ZERO.subTo(this,this)},l.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},l.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},l.prototype.drShiftTo=function(e,t){for(var r=e;r=0;--r)t[r+a+1]=this[r]>>i|s,s=(this[r]&o)<=0;--r)t[r]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},l.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<>n;for(var a=r+1;a>n;n>0&&(t[this.t-r-1]|=(this.s&o)<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},l.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t[i]=0;for(i=0;i=0;)e[r]=0;for(r=0;r=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},l.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(u,o),i.lShiftTo(u,r)):(n.copyTo(o),i.copyTo(r));var c=o.t,f=o[c-1];if(0!=f){var h=f*(1<1?o[c-2]>>this.F2:0),p=this.FV/h,m=(1<=0&&(r[r.t++]=1,r.subTo(b,r)),l.ONE.dlShiftTo(c,b),b.subTo(o,o);o.t=0;){var S=r[--v]==f?this.DM:Math.floor(r[v]*p+(r[v-1]+y)*m);if((r[v]+=o.am(0,S,r,g,0,c))0&&r.rShiftTo(u,r),a<0&&l.ZERO.subTo(r,r)}}},l.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},l.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},l.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");t=2}var r,n=(1<0)for(s>s)>0&&(i=!0,o=v(r));a>=0;)s>(s+=this.DB-t)):(r=this[a]>>(s-=t)&n,s<=0&&(s+=this.DB,--a)),r>0&&(i=!0),i&&(o+=v(r));return i?o:"0"},l.prototype.negate=function(){var e=d();return l.ZERO.subTo(this,e),e},l.prototype.abs=function(){return this.s<0?this.negate():this},l.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},l.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+w(this[this.t-1]^this.s&this.DM)},l.prototype.mod=function(e){var t=d();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(l.ZERO)>0&&e.subTo(t,t),t},l.prototype.equals=function(e){return 0==this.compareTo(e)},l.prototype.add=function(e){var t=d();return this.addTo(e,t),t},l.prototype.subtract=function(e){var t=d();return this.subTo(e,t),t},l.prototype.multiply=function(e){var t=d();return this.multiplyTo(e,t),t},l.prototype.divide=function(e){var t=d();return this.divRemTo(e,t,null),t},l.prototype.modPow=function(e,t,r){var n,i=e.bitLength(),o=b(1),a=new S(t);if(i<=0)return o;n=i<18?1:i<48?3:i<144?4:i<768?5:6;var s=new Array,u=3,c=n-1,l=(1<1){var f=d();for(a.sqrTo(s[1],f);u<=l;)s[u]=d(),a.mulTo(f,s[u-2],s[u]),u+=2}var h,p,m=e.t-1,y=!0,v=d();for(i=w(e[m])-1;m>=0;){for(i>=c?h=e[m]>>i-c&l:(h=(e[m]&(1<0&&(h|=e[m-1]>>this.DB+i-c)),u=n;0==(1&h);)h>>=1,--u;if((i-=u)<0&&(i+=this.DB,--m),y)s[h].copyTo(o),y=!1;else{for(;u>1;)a.sqrTo(o,v),a.sqrTo(v,o),u-=2;u>0?a.sqrTo(o,v):(p=o,o=v,v=p),a.mulTo(v,s[h],o)}for(;m>=0&&0==(e[m]&1<e)&&r}}(i))).then((function(e){return r(null,e)})).catch((function(e){return r(e)}))},t.request=function(e,t,r){var n,i,o,a={"Content-Type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityProviderService."+e,"X-Amz-User-Agent":(n=z.category?" "+z.category:"",i=z.framework?" framework/"+z.framework:"",""+z.prototype.userAgent+n+i),"Cache-Control":"no-store"},s=Object.assign({},this.fetchOptions,{headers:a,method:"POST",mode:"cors",body:JSON.stringify(t)});fetch(this.endpoint,s).then((function(e){return o=e,e}),(function(e){if(e instanceof TypeError)throw new Error("Network error");throw e})).then((function(e){return e.json().catch((function(){return{}}))})).then((function(e){if(o.ok)return r(null,e);var t=(e.__type||e.code).split("#").pop(),n=new Error(e.message||e.Message||null);return n.name=t,n.code=t,r(n)})).catch((function(e){if(o&&o.headers&&o.headers.get("x-amzn-errortype"))try{var t=o.headers.get("x-amzn-errortype").split(":")[0],n=new Error(o.status?o.status.toString():null);return n.code=t,n.name=t,n.statusCode=o.status,r(n)}catch(t){return r(e)}else e instanceof Error&&"Network error"===e.message&&(e.code="NetworkError");return r(e)}))},e}(),X={debug:function(){}},Y=function(e){return e&&e.nonRetryable};function J(e,t,r,n){if(void 0===n&&(n=1),"function"!=typeof e)throw Error("functionToRetry must be a function");return X.debug(e.name+" attempt #"+n+" with args: "+JSON.stringify(t)),e.apply(void 0,t).catch((function(i){if(X.debug("error on "+e.name,i),Y(i))throw X.debug(e.name+" non retryable error",i),i;var o=r(n,t,i);if(X.debug(e.name+" retrying in "+o+" ms"),!1!==o)return new Promise((function(e){return setTimeout(e,o)})).then((function(){return J(e,t,r,n+1)}));throw i}))}var Q=3e5,ee=function(){function e(e,t){var r=e||{},n=r.UserPoolId,i=r.ClientId,o=r.endpoint,a=r.fetchOptions,s=r.AdvancedSecurityDataCollectionFlag;if(!n||!i)throw new Error("Both UserPoolId and ClientId are required.");if(n.length>55||!/^[\w-]+_[0-9a-zA-Z]+$/.test(n))throw new Error("Invalid UserPoolId format.");var u=n.split("_")[0];this.userPoolId=n,this.clientId=i,this.client=new K(u,o,a),this.advancedSecurityDataCollectionFlag=!1!==s,this.storage=e.Storage||(new q).getStorage(),t&&(this.wrapRefreshSessionCallback=t)}var t=e.prototype;return t.getUserPoolId=function(){return this.userPoolId},t.getUserPoolName=function(){return this.getUserPoolId().split("_")[1]},t.getClientId=function(){return this.clientId},t.signUp=function(e,t,r,n,i,o){var a=this,s={ClientId:this.clientId,Username:e,Password:t,UserAttributes:r,ValidationData:n,ClientMetadata:o};this.getUserContextData(e)&&(s.UserContextData=this.getUserContextData(e)),this.client.request("SignUp",s,(function(t,r){if(t)return i(t,null);var n={Username:e,Pool:a,Storage:a.storage},o={user:new Z(n),userConfirmed:r.UserConfirmed,userSub:r.UserSub,codeDeliveryDetails:r.CodeDeliveryDetails};return i(null,o)}))},t.getCurrentUser=function(){var e="CognitoIdentityServiceProvider."+this.clientId+".LastAuthUser",t=this.storage.getItem(e);if(t){var r={Username:t,Pool:this,Storage:this.storage};return new Z(r)}return null},t.getUserContextData=function(e){if("undefined"!=typeof AmazonCognitoAdvancedSecurityData){var t=AmazonCognitoAdvancedSecurityData;if(this.advancedSecurityDataCollectionFlag){var r=t.getData(e,this.userPoolId,this.clientId);if(r)return{EncodedData:r}}return{}}},e}();r(36808)},39809:(e,t,r)=>{"use strict";const n=t;n.bignum=r(4590),n.define=r(22500).define,n.base=r(71979),n.constants=r(36826),n.decoders=r(78307),n.encoders=r(56579)},22500:(e,t,r)=>{"use strict";const n=r(56579),i=r(78307),o=r(35717);function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(e){const t=this.name;function r(e){this._initNamed(e,t)}return o(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},36625:(e,t,r)=>{"use strict";const n=r(35717),i=r(98465).b,o=r(2399).Buffer;function a(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return s.isEncoderBuffer(e)||(e=new s(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(a,i),t.C=a,a.isDecoderBuffer=function(e){return e instanceof a||"object"==typeof e&&o.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){const t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=s,s.isEncoderBuffer=function(e){return e instanceof s||"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},s.prototype.join=function(e,t){return e||(e=o.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},71979:(e,t,r)=>{"use strict";const n=t;n.Reporter=r(98465).b,n.DecoderBuffer=r(36625).C,n.EncoderBuffer=r(36625).R,n.Node=r(41949)},41949:(e,t,r)=>{"use strict";const n=r(98465).b,i=r(36625).R,o=r(36625).C,a=r(79746),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function c(e,t,r){const n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=c;const l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const e=this._baseState,t={};l.forEach((function(r){t[r]=e[r]}));const r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){const e=this._baseState;u.forEach((function(t){this[t]=function(){const r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},c.prototype._init=function(e){const t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),a.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){const t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(a(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);const n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),s.forEach((function(e){c.prototype[e]=function(){const t=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(r),this}})),c.prototype.use=function(e){a(e);const t=this._baseState;return a(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){const t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){const t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){const t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){const t=this._baseState;return a(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){const t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){const t=this._baseState;return a(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){const r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));let n,i=r.default,a=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(a=this._peekTag(e,n,r.any),e.isError(a))return a}else{const n=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(n)}}if(r.obj&&a&&(n=e.enterObject()),a){if(null!==r.explicit){const t=this._decodeTag(e,r.explicit);if(e.isError(t))return t;e=t}const n=e.offset;if(null===r.use&&null===r.choice){let t;r.any&&(t=e.save());const n=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(n))return n;r.any?i=e.raw(t):e=n}if(t&&t.track&&null!==r.tag&&t.track(e.path(),n,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const n=new o(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(n,t)}}return r.obj&&a&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},c.prototype._decodeGeneric=function(e,t,r){const n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){const r=this._baseState;return r.useDecoder=this._use(e,t),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(e,t){const r=this._baseState;let n=null,i=!1;return Object.keys(r.choice).some((function(o){const a=e.save(),s=r.choice[o];try{const r=s._decode(e,t);if(e.isError(r))return!1;n={type:o,value:r},i=!0}catch(t){return e.restore(a),!1}return!0}),this),i?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},c.prototype._encode=function(e,t,r){const n=this._baseState;if(null!==n.default&&n.default===e)return;const i=this._encodeValue(e,t,r);return void 0===i||this._skipDefault(i,t,r)?void 0:i},c.prototype._encodeValue=function(e,t,r){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);let o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}let a=null,s=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)a=this._getUse(i.contains,r)._encode(e,t),s=!0;else if(i.children)a=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");const n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i}),this).filter((function(e){return e})),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,a=this._createEncoderBuffer(e.map((function(r){const n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),r))}else null!==i.use?o=this._getUse(i.use,r)._encode(e,t):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){const e=null!==i.implicit?i.implicit:i.tag,r=null===i.implicit?"universal":"context";null===e?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(e,s,r,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){const r=this._baseState,n=r.choice[e.type];return n||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){const r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},98465:(e,t,r)=>{"use strict";const n=r(35717);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.b=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){const n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){const t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){let t;const r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},70160:(e,t)=>{"use strict";function r(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r(t.tag)},36826:(e,t,r)=>{"use strict";const n=t;n._reverse=function(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t},n.der=r(70160)},41671:(e,t,r)=>{"use strict";const n=r(35717),i=r(4590),o=r(36625).C,a=r(41949),s=r(70160);function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){a.call(this,"der",e)}function l(e,t){let r=e.readUInt8(t);if(e.isError(r))return r;const n=s.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=e.readUInt8(t),e.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function d(e,t,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(let t=0;t{"use strict";const n=t;n.der=r(41671),n.pem=r(59631)},59631:(e,t,r)=>{"use strict";const n=r(35717),i=r(2399).Buffer,o=r(41671);function a(e){o.call(this,e),this.enc="pem"}n(a,o),e.exports=a,a.prototype.decode=function(e,t){const r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/;let s=-1,u=-1;for(let e=0;e{"use strict";const n=r(35717),i=r(2399).Buffer,o=r(41949),a=r(70160);function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){o.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=s,s.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(u,o),u.prototype._encodeComposite=function(e,t,r,n){const o=function(e,t,r,n){let i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))i=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}return i>=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=a.tagClassByName[r||"universal"]<<6,i)}(e,t,r,this.reporter);if(n.length<128){const e=i.alloc(2);return e[0]=o,e[1]=n.length,this._createEncoderBuffer([e,n])}let s=1;for(let e=n.length;e>=256;e>>=8)s++;const u=i.alloc(2+s);u[0]=o,u[1]=128|s;for(let e=1+s,t=n.length;t>0;e--,t>>=8)u[e]=255&t;return this._createEncoderBuffer([u,n])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=i.alloc(2*e.length);for(let r=0;r=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let n=0;for(let t=0;t=128;r>>=7)n++}const o=i.alloc(n);let a=o.length-1;for(let t=e.length-1;t>=0;t--){let r=e[t];for(o[a--]=127&r;(r>>=7)>0;)o[a--]=128|127&r}return this._createEncoderBuffer(o)},u.prototype._encodeTime=function(e,t){let r;const n=new Date(e);return"gentime"===t?r=[c(n.getUTCFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[c(n.getUTCFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=i.from(t)}if(i.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=i.alloc(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let t=e;t>=256;t>>=8)r++;const n=new Array(r);for(let t=n.length-1;t>=0;t--)n[t]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(i.from(n))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i{"use strict";const n=t;n.der=r(66984),n.pem=r(2883)},2883:(e,t,r)=>{"use strict";const n=r(35717),i=r(66984);function o(e){i.call(this,e),this.enc="pem"}n(o,i),e.exports=o,o.prototype.encode=function(e,t){const r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"];for(let e=0;e=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=u(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,d=67108863&u,f=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=f;h++){var p=c-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[c]=0|d,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],h=f[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:l[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),l=this.clone();if(u){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,m=h>>>13,y=0|a[2],v=8191&y,g=y>>>13,b=0|a[3],w=8191&b,S=b>>>13,E=0|a[4],_=8191&E,M=E>>>13,C=0|a[5],k=8191&C,x=C>>>13,T=0|a[6],O=8191&T,A=T>>>13,R=0|a[7],P=8191&R,I=R>>>13,N=0|a[8],L=8191&N,D=N>>>13,j=0|a[9],U=8191&j,B=j>>>13,q=0|s[0],F=8191&q,Z=q>>>13,z=0|s[1],$=8191&z,H=z>>>13,V=0|s[2],W=8191&V,G=V>>>13,K=0|s[3],X=8191&K,Y=K>>>13,J=0|s[4],Q=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],de=8191&le,fe=le>>>13,he=0|s[9],pe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(d,F))|0)+((8191&(i=(i=Math.imul(d,Z))+Math.imul(f,F)|0))<<13)|0;c=((o=Math.imul(f,Z))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,F),i=(i=Math.imul(p,Z))+Math.imul(m,F)|0,o=Math.imul(m,Z);var ve=(c+(n=n+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,H)|0)+Math.imul(f,$)|0))<<13)|0;c=((o=o+Math.imul(f,H)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,F),i=(i=Math.imul(v,Z))+Math.imul(g,F)|0,o=Math.imul(g,Z),n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,H)|0;var ge=(c+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,W)|0))<<13)|0;c=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,F),i=(i=Math.imul(w,Z))+Math.imul(S,F)|0,o=Math.imul(S,Z),n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,H)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,G)|0;var be=(c+(n=n+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(f,X)|0))<<13)|0;c=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(_,F),i=(i=Math.imul(_,Z))+Math.imul(M,F)|0,o=Math.imul(M,Z),n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,H)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,G)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Y)|0;var we=(c+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(k,F),i=(i=Math.imul(k,Z))+Math.imul(x,F)|0,o=Math.imul(x,Z),n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,H)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,H)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var Se=(c+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;c=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(O,F),i=(i=Math.imul(O,Z))+Math.imul(A,F)|0,o=Math.imul(A,Z),n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,H)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,H)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,G)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var Ee=(c+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;c=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(P,F),i=(i=Math.imul(P,Z))+Math.imul(I,F)|0,o=Math.imul(I,Z),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Y)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var _e=(c+(n=n+Math.imul(d,ue)|0)|0)+((8191&(i=(i=i+Math.imul(d,ce)|0)+Math.imul(f,ue)|0))<<13)|0;c=((o=o+Math.imul(f,ce)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(L,F),i=(i=Math.imul(L,Z))+Math.imul(D,F)|0,o=Math.imul(D,Z),n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,H)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Y)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0;var Me=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;c=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,F),i=(i=Math.imul(U,Z))+Math.imul(B,F)|0,o=Math.imul(B,Z),n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,H)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,H)|0,n=n+Math.imul(P,W)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(O,X)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Ce=(c+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;c=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,H))+Math.imul(B,$)|0,o=Math.imul(B,H),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,G)|0,n=n+Math.imul(P,X)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,ce)|0,n=n+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,fe)|0;var ke=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,W),i=(i=Math.imul(U,G))+Math.imul(B,W)|0,o=Math.imul(B,G),n=n+Math.imul(L,X)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Y)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(M,ue)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(S,de)|0,o=o+Math.imul(S,fe)|0;var xe=(c+(n=n+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,X),i=(i=Math.imul(U,Y))+Math.imul(B,X)|0,o=Math.imul(B,Y),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(_,de)|0,i=(i=i+Math.imul(_,fe)|0)+Math.imul(M,de)|0,o=o+Math.imul(M,fe)|0;var Te=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,ee))+Math.imul(B,Q)|0,o=Math.imul(B,ee),n=n+Math.imul(L,re)|0,i=(i=i+Math.imul(L,ne)|0)+Math.imul(D,re)|0,o=o+Math.imul(D,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(k,de)|0,i=(i=i+Math.imul(k,fe)|0)+Math.imul(x,de)|0,o=o+Math.imul(x,fe)|0;var Oe=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,me)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul(B,re)|0,o=Math.imul(B,ne),n=n+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,ae)|0,n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,ce)|0,n=n+Math.imul(O,de)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(A,de)|0,o=o+Math.imul(A,fe)|0;var Ae=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,ae))+Math.imul(B,oe)|0,o=Math.imul(B,ae),n=n+Math.imul(L,ue)|0,i=(i=i+Math.imul(L,ce)|0)+Math.imul(D,ue)|0,o=o+Math.imul(D,ce)|0,n=n+Math.imul(P,de)|0,i=(i=i+Math.imul(P,fe)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,fe)|0;var Re=(c+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(U,ue),i=(i=Math.imul(U,ce))+Math.imul(B,ue)|0,o=Math.imul(B,ce),n=n+Math.imul(L,de)|0,i=(i=i+Math.imul(L,fe)|0)+Math.imul(D,de)|0,o=o+Math.imul(D,fe)|0;var Pe=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,de),i=(i=Math.imul(U,fe))+Math.imul(B,de)|0,o=Math.imul(B,fe);var Ie=(c+(n=n+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,me)|0)+Math.imul(D,pe)|0))<<13)|0;c=((o=o+Math.imul(D,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Ne=(c+(n=Math.imul(U,pe))|0)+((8191&(i=(i=Math.imul(U,me))+Math.imul(B,pe)|0))<<13)|0;return c=((o=Math.imul(B,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=ye,u[1]=ve,u[2]=ge,u[3]=be,u[4]=we,u[5]=Se,u[6]=Ee,u[7]=_e,u[8]=Me,u[9]=Ce,u[10]=ke,u[11]=xe,u[12]=Te,u[13]=Oe,u[14]=Ae,u[15]=Re,u[16]=Pe,u[17]=Ie,u[18]=Ne,0!==c&&(u[19]=c,r.length++),r};function m(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):m(this,e,t),r},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},y.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var d=0|this.words[c];this.words[c]=l<<26-o|d>>>o,l=d&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;d--){var f=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(i,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(d)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0==(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var d=0,f=1;0==(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new _(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},i(b,g),b.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return v[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var d=this.pow(l,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,y=0;0!==m.cmp(s);y++)m=m.redSqr();n(y=0;n--){for(var c=t.words[n],l=u-1;l>=0;l--){var d=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4==++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new M(e)},i(M,_),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},69282:(e,t,r)=>{"use strict";var n=r(34155),i=r(25108);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){for(var r=0;r1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i{"use strict";var n=r(34155);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}var b="",w="",S="",E="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function M(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function C(e){return y(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var k=function(e,t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(k,e);var r,i,s,l,d=(r=k,i=f(),function(){var e,t=p(r);if(i){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function k(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),"object"!==m(e)||null===e)throw new v("options","Object",e);var r=e.message,i=e.operator,o=e.stackStartFn,a=e.actual,s=e.expected,l=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)t=d.call(this,String(r));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(b="",w="",E="",S=""):(b="",w="",E="",S="")),"object"===m(a)&&null!==a&&"object"===m(s)&&null!==s&&"stack"in a&&a instanceof Error&&"stack"in s&&s instanceof Error&&(a=M(a),s=M(s)),"deepStrictEqual"===i||"strictEqual"===i)t=d.call(this,function(e,t,r){var i="",o="",a=0,s="",u=!1,c=C(e),l=c.split("\n"),d=C(t).split("\n"),f=0,h="";if("strictEqual"===r&&"object"===m(e)&&"object"===m(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===l.length&&1===d.length&&l[0]!==d[0]){var p=l[0].length+d[0].length;if(p<=10){if(!("object"===m(e)&&null!==e||"object"===m(t)&&null!==t||0===e&&0===t))return"".concat(_[r],"\n\n")+"".concat(l[0]," !== ").concat(d[0],"\n")}else if("strictEqualObject"!==r&&p<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;l[0][f]===d[0][f];)f++;f>2&&(h="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",f),"^"),f=0)}}for(var y=l[l.length-1],v=d[d.length-1];y===v&&(f++<2?s="\n ".concat(y).concat(s):i=y,l.pop(),d.pop(),0!==l.length&&0!==d.length);)y=l[l.length-1],v=d[d.length-1];var M=Math.max(l.length,d.length);if(0===M){var k=c.split("\n");if(k.length>30)for(k[26]="".concat(b,"...").concat(E);k.length>27;)k.pop();return"".concat(_.notIdentical,"\n\n").concat(k.join("\n"),"\n")}f>3&&(s="\n".concat(b,"...").concat(E).concat(s),u=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var x=0,T=_[r]+"\n".concat(w,"+ actual").concat(E," ").concat(S,"- expected").concat(E),O=" ".concat(b,"...").concat(E," Lines skipped");for(f=0;f1&&f>2&&(A>4?(o+="\n".concat(b,"...").concat(E),u=!0):A>3&&(o+="\n ".concat(d[f-2]),x++),o+="\n ".concat(d[f-1]),x++),a=f,i+="\n".concat(S,"-").concat(E," ").concat(d[f]),x++;else if(d.length1&&f>2&&(A>4?(o+="\n".concat(b,"...").concat(E),u=!0):A>3&&(o+="\n ".concat(l[f-2]),x++),o+="\n ".concat(l[f-1]),x++),a=f,o+="\n".concat(w,"+").concat(E," ").concat(l[f]),x++;else{var R=d[f],P=l[f],I=P!==R&&(!g(P,",")||P.slice(0,-1)!==R);I&&g(R,",")&&R.slice(0,-1)===P&&(I=!1,P+=","),I?(A>1&&f>2&&(A>4?(o+="\n".concat(b,"...").concat(E),u=!0):A>3&&(o+="\n ".concat(l[f-2]),x++),o+="\n ".concat(l[f-1]),x++),a=f,o+="\n".concat(w,"+").concat(E," ").concat(P),i+="\n".concat(S,"-").concat(E," ").concat(R),x+=2):(o+=i,i="",1!==A&&0!==f||(o+="\n ".concat(P),x++))}if(x>20&&f30)for(h[26]="".concat(b,"...").concat(E);h.length>27;)h.pop();t=1===h.length?d.call(this,"".concat(f," ").concat(h[0])):d.call(this,"".concat(f,"\n\n").concat(h.join("\n"),"\n"))}else{var p=C(a),y="",x=_[i];"notDeepEqual"===i||"notEqual"===i?(p="".concat(_[i],"\n\n").concat(p)).length>1024&&(p="".concat(p.slice(0,1021),"...")):(y="".concat(C(s)),p.length>512&&(p="".concat(p.slice(0,509),"...")),y.length>512&&(y="".concat(y.slice(0,509),"...")),"deepEqual"===i||"equal"===i?p="".concat(x,"\n\n").concat(p,"\n\nshould equal\n\n"):y=" ".concat(i," ").concat(y)),t=d.call(this,"".concat(p).concat(y))}return Error.stackTraceLimit=l,t.generatedMessage=!r,Object.defineProperty(c(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=a,t.expected=s,t.operator=i,Error.captureStackTrace&&Error.captureStackTrace(c(t),o),t.stack,t.name="AssertionError",u(t)}return s=k,(l=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return y(this,o(o({},t),{},{customInspect:!1,depth:0}))}}])&&a(s.prototype,l),Object.defineProperty(s,"prototype",{writable:!1}),k}(l(Error),y.custom);e.exports=k},62136:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var a,s,u={};function c(e,t,r){r||(r=Error);var a=function(r){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)}(l,r);var a,s,u,c=(s=l,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=o(s);if(u){var r=o(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(r,n,i){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),o=c.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i)),o.code=e,o}return a=l,Object.defineProperty(a,"prototype",{writable:!1}),a}(r);u[e]=a}function l(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",(function(e,t,i){var o,s,u,c,d;if(void 0===a&&(a=r(69282)),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(s="not ",t.substr(0,4)===s)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))u="The ".concat(e," ").concat(o," ").concat(l(t,"type"));else{var f=("number"!=typeof d&&(d=0),d+1>(c=e).length||-1===c.indexOf(".",d)?"argument":"property");u='The "'.concat(e,'" ').concat(f," ").concat(o," ").concat(l(t,"type"))}return u+". Received type ".concat(n(i))}),TypeError),c("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(89539));var i=s.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),c("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),c("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n0,"At least one arg needs to be specified");var i="The ",o=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),o){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,o-1).join(", "),i+=", and ".concat(t[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),e.exports.codes=u},19158:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function I(e){return Object.keys(e).filter(P).concat(l(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function N(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i{r(17321);var n=r(79614);"undefined"!=typeof window&&(window.AWS=n),e.exports=n,"undefined"!=typeof self&&(self.AWS=n)},96105:(e,t,r)=>{r(17321);var n=r(79614),i=n.Service,o=n.apiLoader;o.services.cognitoidentity={},n.CognitoIdentity=i.defineService("cognitoidentity",["2014-06-30"]),Object.defineProperty(o.services.cognitoidentity,"2014-06-30",{get:function(){var e=r(57377);return e.paginators=r(85010).o,e},enumerable:!0,configurable:!0}),e.exports=n.CognitoIdentity},93568:(e,t,r)=>{r(17321);var n=r(79614),i=n.Service,o=n.apiLoader;o.services.sts={},n.STS=i.defineService("sts",["2011-06-15"]),r(44456),Object.defineProperty(o.services.sts,"2011-06-15",{get:function(){var e=r(80753);return e.paginators=r(93639).o,e},enumerable:!0,configurable:!0}),e.exports=n.STS},16862:e=>{function t(e,r){if(!t.services.hasOwnProperty(e))throw new Error("InvalidService: Failed to load api for "+e);return t.services[e][r]}t.services={},e.exports=t},47821:(e,t,r)=>{var n=r(9790),i=r(15610),o=r(14314),a=r(11365);e.exports={createHash:function(e){if("md5"===(e=e.toLowerCase()))return new i;if("sha256"===e)return new a;if("sha1"===e)return new o;throw new Error("Hash algorithm "+e+" is not supported in the browser SDK")},createHmac:function(e,t){if("md5"===(e=e.toLowerCase()))return new n(i,t);if("sha256"===e)return new n(a,t);if("sha1"===e)return new n(o,t);throw new Error("HMAC algorithm "+e+" is not supported in the browser SDK")},createSign:function(){throw new Error("createSign is not implemented in the browser")}}},66323:(e,t,r)=>{var n=r(48764).Buffer;"undefined"!=typeof ArrayBuffer&&void 0===ArrayBuffer.isView&&(ArrayBuffer.isView=function(e){return i.indexOf(Object.prototype.toString.call(e))>-1});var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"];e.exports={isEmptyData:function(e){return"string"==typeof e?0===e.length:0===e.byteLength},convertToBuffer:function(e){return"string"==typeof e&&(e=new n(e,"utf8")),ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}},9790:(e,t,r)=>{var n=r(66323);function i(e,t){this.hash=new e,this.outer=new e;var r=function(e,t){var r=n.convertToBuffer(t);if(r.byteLength>e.BLOCK_SIZE){var i=new e;i.update(r),r=i.digest()}var o=new Uint8Array(e.BLOCK_SIZE);return o.set(r),o}(e,t),i=new Uint8Array(e.BLOCK_SIZE);i.set(r);for(var o=0;o{var n=r(66323),i=r(48764).Buffer;function o(){this.state=[1732584193,4023233417,2562383102,271733878],this.buffer=new DataView(new ArrayBuffer(64)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}function a(e,t,r,n,i,o){return((t=(t+e&4294967295)+(n+o&4294967295)&4294967295)<>>32-i)+r&4294967295}function s(e,t,r,n,i,o,s){return a(t&r|~t&n,e,t,i,o,s)}function u(e,t,r,n,i,o,s){return a(t&n|r&~n,e,t,i,o,s)}function c(e,t,r,n,i,o,s){return a(t^r^n,e,t,i,o,s)}function l(e,t,r,n,i,o,s){return a(r^(t|~n),e,t,i,o,s)}e.exports=o,o.BLOCK_SIZE=64,o.prototype.update=function(e){if(n.isEmptyData(e))return this;if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=n.convertToBuffer(e),r=0,i=t.byteLength;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,t[r++]),i--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0);return this},o.prototype.digest=function(e){if(!this.finished){var t=this,r=t.buffer,n=t.bufferLength,o=8*t.bytesHashed;if(r.setUint8(this.bufferLength++,128),n%64>=56){for(var a=this.bufferLength;a<64;a++)r.setUint8(a,0);this.hashBuffer(),this.bufferLength=0}for(a=this.bufferLength;a<56;a++)r.setUint8(a,0);r.setUint32(56,o>>>0,!0),r.setUint32(60,Math.floor(o/4294967296),!0),this.hashBuffer(),this.finished=!0}var s=new DataView(new ArrayBuffer(16));for(a=0;a<4;a++)s.setUint32(4*a,this.state[a],!0);var u=new i(s.buffer,s.byteOffset,s.byteLength);return e?u.toString(e):u},o.prototype.hashBuffer=function(){var e=this.buffer,t=this.state,r=t[0],n=t[1],i=t[2],o=t[3];r=s(r,n,i,o,e.getUint32(0,!0),7,3614090360),o=s(o,r,n,i,e.getUint32(4,!0),12,3905402710),i=s(i,o,r,n,e.getUint32(8,!0),17,606105819),n=s(n,i,o,r,e.getUint32(12,!0),22,3250441966),r=s(r,n,i,o,e.getUint32(16,!0),7,4118548399),o=s(o,r,n,i,e.getUint32(20,!0),12,1200080426),i=s(i,o,r,n,e.getUint32(24,!0),17,2821735955),n=s(n,i,o,r,e.getUint32(28,!0),22,4249261313),r=s(r,n,i,o,e.getUint32(32,!0),7,1770035416),o=s(o,r,n,i,e.getUint32(36,!0),12,2336552879),i=s(i,o,r,n,e.getUint32(40,!0),17,4294925233),n=s(n,i,o,r,e.getUint32(44,!0),22,2304563134),r=s(r,n,i,o,e.getUint32(48,!0),7,1804603682),o=s(o,r,n,i,e.getUint32(52,!0),12,4254626195),i=s(i,o,r,n,e.getUint32(56,!0),17,2792965006),r=u(r,n=s(n,i,o,r,e.getUint32(60,!0),22,1236535329),i,o,e.getUint32(4,!0),5,4129170786),o=u(o,r,n,i,e.getUint32(24,!0),9,3225465664),i=u(i,o,r,n,e.getUint32(44,!0),14,643717713),n=u(n,i,o,r,e.getUint32(0,!0),20,3921069994),r=u(r,n,i,o,e.getUint32(20,!0),5,3593408605),o=u(o,r,n,i,e.getUint32(40,!0),9,38016083),i=u(i,o,r,n,e.getUint32(60,!0),14,3634488961),n=u(n,i,o,r,e.getUint32(16,!0),20,3889429448),r=u(r,n,i,o,e.getUint32(36,!0),5,568446438),o=u(o,r,n,i,e.getUint32(56,!0),9,3275163606),i=u(i,o,r,n,e.getUint32(12,!0),14,4107603335),n=u(n,i,o,r,e.getUint32(32,!0),20,1163531501),r=u(r,n,i,o,e.getUint32(52,!0),5,2850285829),o=u(o,r,n,i,e.getUint32(8,!0),9,4243563512),i=u(i,o,r,n,e.getUint32(28,!0),14,1735328473),r=c(r,n=u(n,i,o,r,e.getUint32(48,!0),20,2368359562),i,o,e.getUint32(20,!0),4,4294588738),o=c(o,r,n,i,e.getUint32(32,!0),11,2272392833),i=c(i,o,r,n,e.getUint32(44,!0),16,1839030562),n=c(n,i,o,r,e.getUint32(56,!0),23,4259657740),r=c(r,n,i,o,e.getUint32(4,!0),4,2763975236),o=c(o,r,n,i,e.getUint32(16,!0),11,1272893353),i=c(i,o,r,n,e.getUint32(28,!0),16,4139469664),n=c(n,i,o,r,e.getUint32(40,!0),23,3200236656),r=c(r,n,i,o,e.getUint32(52,!0),4,681279174),o=c(o,r,n,i,e.getUint32(0,!0),11,3936430074),i=c(i,o,r,n,e.getUint32(12,!0),16,3572445317),n=c(n,i,o,r,e.getUint32(24,!0),23,76029189),r=c(r,n,i,o,e.getUint32(36,!0),4,3654602809),o=c(o,r,n,i,e.getUint32(48,!0),11,3873151461),i=c(i,o,r,n,e.getUint32(60,!0),16,530742520),r=l(r,n=c(n,i,o,r,e.getUint32(8,!0),23,3299628645),i,o,e.getUint32(0,!0),6,4096336452),o=l(o,r,n,i,e.getUint32(28,!0),10,1126891415),i=l(i,o,r,n,e.getUint32(56,!0),15,2878612391),n=l(n,i,o,r,e.getUint32(20,!0),21,4237533241),r=l(r,n,i,o,e.getUint32(48,!0),6,1700485571),o=l(o,r,n,i,e.getUint32(12,!0),10,2399980690),i=l(i,o,r,n,e.getUint32(40,!0),15,4293915773),n=l(n,i,o,r,e.getUint32(4,!0),21,2240044497),r=l(r,n,i,o,e.getUint32(32,!0),6,1873313359),o=l(o,r,n,i,e.getUint32(60,!0),10,4264355552),i=l(i,o,r,n,e.getUint32(24,!0),15,2734768916),n=l(n,i,o,r,e.getUint32(52,!0),21,1309151649),r=l(r,n,i,o,e.getUint32(16,!0),6,4149444226),o=l(o,r,n,i,e.getUint32(44,!0),10,3174756917),i=l(i,o,r,n,e.getUint32(8,!0),15,718787259),n=l(n,i,o,r,e.getUint32(36,!0),21,3951481745),t[0]=r+t[0]&4294967295,t[1]=n+t[1]&4294967295,t[2]=i+t[2]&4294967295,t[3]=o+t[3]&4294967295}},14314:(e,t,r)=>{var n=r(48764).Buffer,i=r(66323);function o(){this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=new Uint32Array(80),this.offset=0,this.shift=24,this.totalLength=0}new Uint32Array([1518500249,1859775393,-1894007588,-899497514]),Math.pow(2,53),e.exports=o,o.BLOCK_SIZE=64,o.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(i.isEmptyData(e))return this;var t=(e=i.convertToBuffer(e)).length;this.totalLength+=8*t;for(var r=0;r14||14===this.offset&&this.shift<24)&&this.processBlock(),this.offset=14,this.shift=24,this.write(0),this.write(0),this.write(this.totalLength>0xffffffffff?this.totalLength/1099511627776:0),this.write(this.totalLength>4294967295?this.totalLength/4294967296:0);for(var t=24;t>=0;t-=8)this.write(this.totalLength>>t);var r=new n(20),i=new DataView(r.buffer);return i.setUint32(0,this.h0,!1),i.setUint32(4,this.h1,!1),i.setUint32(8,this.h2,!1),i.setUint32(12,this.h3,!1),i.setUint32(16,this.h4,!1),e?r.toString(e):r},o.prototype.processBlock=function(){for(var e=16;e<80;e++){var t=this.block[e-3]^this.block[e-8]^this.block[e-14]^this.block[e-16];this.block[e]=t<<1|t>>>31}var r,n,i=this.h0,o=this.h1,a=this.h2,s=this.h3,u=this.h4;for(e=0;e<80;e++){e<20?(r=s^o&(a^s),n=1518500249):e<40?(r=o^a^s,n=1859775393):e<60?(r=o&a|s&(o|a),n=2400959708):(r=o^a^s,n=3395469782);var c=(i<<5|i>>>27)+r+u+n+(0|this.block[e]);u=s,s=a,a=o<<30|o>>>2,o=i,i=c}for(this.h0=this.h0+i|0,this.h1=this.h1+o|0,this.h2=this.h2+a|0,this.h3=this.h3+s|0,this.h4=this.h4+u|0,this.offset=0,e=0;e<16;e++)this.block[e]=0}},11365:(e,t,r)=>{var n=r(48764).Buffer,i=r(66323),o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=Math.pow(2,53)-1;function s(){this.state=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}e.exports=s,s.BLOCK_SIZE=64,s.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(i.isEmptyData(e))return this;var t=0,r=(e=i.convertToBuffer(e)).byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>a)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0);return this},s.prototype.digest=function(e){if(!this.finished){var t=8*this.bytesHashed,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),i=this.bufferLength;if(r.setUint8(this.bufferLength++,128),i%64>=56){for(var o=this.bufferLength;o<64;o++)r.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<56;o++)r.setUint8(o,0);r.setUint32(56,Math.floor(t/4294967296),!0),r.setUint32(60,t),this.hashBuffer(),this.finished=!0}var a=new n(32);for(o=0;o<8;o++)a[4*o]=this.state[o]>>>24&255,a[4*o+1]=this.state[o]>>>16&255,a[4*o+2]=this.state[o]>>>8&255,a[4*o+3]=this.state[o]>>>0&255;return e?a.toString(e):a},s.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,r=t[0],n=t[1],i=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=0;d<64;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var f=this.temp[d-2],h=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10,p=((f=this.temp[d-15])>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(p+this.temp[d-16]|0)}var m=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(l+(o[d]+this.temp[d]|0)|0)|0,y=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&n^r&i^n&i)|0;l=c,c=u,u=s,s=a+m|0,a=i,i=n,n=r,r=m+y|0}t[0]+=r,t[1]+=n,t[2]+=i,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=l}},17321:(e,t,r)=>{var n=r(62662);n.crypto.lib=r(47821),n.Buffer=r(48764).Buffer,n.url=r(56647),n.querystring=r(17673),n.realClock=r(31414),n.environment="js",n.createEventStream=r(2403).createEventStream,n.isBrowser=function(){return!0},n.isNode=function(){return!1};var i=r(79614);if(e.exports=i,r(84465),r(83227),r(46662),r(91),r(97719),r(67372),r(16986),i.XML.Parser=r(35106),r(2631),void 0===o)var o={browser:!0}},22709:(e,t,r)=>{var n,i=r(79614);r(84465),r(83227),i.Config=i.util.inherit({constructor:function(e){void 0===e&&(e={}),e=this.extractCredentials(e),i.util.each.call(this,this.keys,(function(t,r){this.set(t,e[t],r)}))},getCredentials:function(e){var t,r=this;function n(t){e(t,t?null:r.credentials)}function o(e,t){return new i.util.error(t||new Error,{code:"CredentialsError",message:e,name:"CredentialsError"})}r.credentials?"function"==typeof r.credentials.get?r.credentials.get((function(e){e&&(e=o("Could not load credentials from "+r.credentials.constructor.name,e)),n(e)})):(t=null,r.credentials.accessKeyId&&r.credentials.secretAccessKey||(t=o("Missing credentials")),n(t)):r.credentialProvider?r.credentialProvider.resolve((function(e,t){e&&(e=o("Could not load credentials from any providers",e)),r.credentials=t,n(e)})):n(o("No credentials to load"))},getToken:function(e){var t,r=this;function n(t){e(t,t?null:r.token)}function o(e,t){return new i.util.error(t||new Error,{code:"TokenError",message:e,name:"TokenError"})}r.token?"function"==typeof r.token.get?r.token.get((function(e){e&&(e=o("Could not load token from "+r.token.constructor.name,e)),n(e)})):(t=null,r.token.token||(t=o("Missing token")),n(t)):r.tokenProvider?r.tokenProvider.resolve((function(e,t){e&&(e=o("Could not load token from any providers",e)),r.token=t,n(e)})):n(o("No token to load"))},update:function(e,t){t=t||!1,e=this.extractCredentials(e),i.util.each.call(this,e,(function(e,r){(t||Object.prototype.hasOwnProperty.call(this.keys,e)||i.Service.hasService(e))&&this.set(e,r)}))},loadFromPath:function(e){this.clear();var t=JSON.parse(i.util.readFileSync(e)),r=new i.FileSystemCredentials(e),n=new i.CredentialProviderChain;return n.providers.unshift(r),n.resolve((function(e,r){if(e)throw e;t.credentials=r})),this.constructor(t),this},clear:function(){i.util.each.call(this,this.keys,(function(e){delete this[e]})),this.set("credentials",void 0),this.set("credentialProvider",void 0)},set:function(e,t,r){void 0===t?(void 0===r&&(r=this.keys[e]),this[e]="function"==typeof r?r.call(this):r):"httpOptions"===e&&this[e]?this[e]=i.util.merge(this[e],t):this[e]=t},keys:{credentials:null,credentialProvider:null,region:null,logger:null,apiVersions:{},apiVersion:null,endpoint:void 0,httpOptions:{timeout:12e4},maxRetries:void 0,maxRedirects:10,paramValidation:!0,sslEnabled:!0,s3ForcePathStyle:!1,s3BucketEndpoint:!1,s3DisableBodySigning:!0,s3UsEast1RegionalEndpoint:"legacy",s3UseArnRegion:void 0,computeChecksums:!0,convertResponseTypes:!0,correctClockSkew:!1,customUserAgent:null,dynamoDbCrc32:!0,systemClockOffset:0,signatureVersion:null,signatureCache:!0,retryDelayOptions:{},useAccelerateEndpoint:!1,clientSideMonitoring:!1,endpointDiscoveryEnabled:void 0,endpointCacheSize:1e3,hostPrefixEnabled:!0,stsRegionalEndpoints:"legacy",useFipsEndpoint:!1,useDualstackEndpoint:!1,token:null},extractCredentials:function(e){return e.accessKeyId&&e.secretAccessKey&&((e=i.util.copy(e)).credentials=new i.Credentials(e)),e},setPromisesDependency:function(e){n=e,null===e&&"function"==typeof Promise&&(n=Promise);var t=[i.Request,i.Credentials,i.CredentialProviderChain];i.S3&&(t.push(i.S3),i.S3.ManagedUpload&&t.push(i.S3.ManagedUpload)),i.util.addPromises(t,n)},getPromisesDependency:function(){return n}}),i.config=new i.Config},65456:(e,t,r)=>{var n=r(79614);function i(e,t){if("string"==typeof e){if(["legacy","regional"].indexOf(e.toLowerCase())>=0)return e.toLowerCase();throw n.util.error(new Error,t)}}e.exports=function(e,t){var r;if((e=e||{})[t.clientConfig]&&(r=i(e[t.clientConfig],{code:"InvalidConfiguration",message:'invalid "'+t.clientConfig+'" configuration. Expect "legacy" or "regional". Got "'+e[t.clientConfig]+'".'})))return r;if(!n.util.isNode())return r;if(Object.prototype.hasOwnProperty.call({LOCAL_CONFIGURATION:void 0,NODE_ENV:"production"},t.env)&&(r=i({LOCAL_CONFIGURATION:void 0,NODE_ENV:"production"}[t.env],{code:"InvalidEnvironmentalVariable",message:"invalid "+t.env+' environmental variable. Expect "legacy" or "regional". Got "'+{LOCAL_CONFIGURATION:void 0,NODE_ENV:"production"}[t.env]+'".'})))return r;var o={};try{o=n.util.getProfilesFromSharedConfig(n.util.iniLoader)[{LOCAL_CONFIGURATION:void 0,NODE_ENV:"production"}.AWS_PROFILE||n.util.defaultProfile]}catch(e){}return o&&Object.prototype.hasOwnProperty.call(o,t.sharedConfig)&&(r=i(o[t.sharedConfig],{code:"InvalidConfiguration",message:"invalid "+t.sharedConfig+' profile config. Expect "legacy" or "regional". Got "'+o[t.sharedConfig]+'".'})),r}},79614:(e,t,r)=>{var n={util:r(62662)};({}).toString(),e.exports=n,n.util.update(n,{VERSION:"2.1481.0",Signers:{},Protocol:{Json:r(76933),Query:r(70293),Rest:r(96225),RestJson:r(53699),RestXml:r(11674)},XML:{Builder:r(52369),Parser:null},JSON:{Builder:r(43658),Parser:r(62622)},Model:{Api:r(85863),Operation:r(66797),Shape:r(68136),Paginator:r(47937),ResourceWaiter:r(90306)},apiLoader:r(16862),EndpointCache:r(85101).$}),r(96380),r(20173),r(22709),r(26344),r(72274),r(73682),r(93975),r(82413),r(92604),r(25479),r(3580),n.events=new n.SequentialExecutor,n.util.memoizedProperty(n,"endpointCache",(function(){return new n.EndpointCache(n.config.endpointCacheSize)}),!0)},84465:(e,t,r)=>{var n=r(79614);n.Credentials=n.util.inherit({constructor:function(){if(n.util.hideProperties(this,["secretAccessKey"]),this.expired=!1,this.expireTime=null,this.refreshCallbacks=[],1===arguments.length&&"object"==typeof arguments[0]){var e=arguments[0].credentials||arguments[0];this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,this.sessionToken=e.sessionToken}else this.accessKeyId=arguments[0],this.secretAccessKey=arguments[1],this.sessionToken=arguments[2]},expiryWindow:15,needsRefresh:function(){var e=n.util.date.getDate().getTime(),t=new Date(e+1e3*this.expiryWindow);return!!(this.expireTime&&t>this.expireTime)||this.expired||!this.accessKeyId||!this.secretAccessKey},get:function(e){var t=this;this.needsRefresh()?this.refresh((function(r){r||(t.expired=!1),e&&e(r)})):e&&e()},refresh:function(e){this.expired=!1,e()},coalesceRefresh:function(e,t){var r=this;1===r.refreshCallbacks.push(e)&&r.load((function(e){n.util.arrayEach(r.refreshCallbacks,(function(r){t?r(e):n.util.defer((function(){r(e)}))})),r.refreshCallbacks.length=0}))},load:function(e){e()}}),n.Credentials.addPromisesToClass=function(e){this.prototype.getPromise=n.util.promisifyMethod("get",e),this.prototype.refreshPromise=n.util.promisifyMethod("refresh",e)},n.Credentials.deletePromisesFromClass=function(){delete this.prototype.getPromise,delete this.prototype.refreshPromise},n.util.addPromises(n.Credentials)},91:(e,t,r)=>{var n=r(79614),i=r(93568);n.ChainableTemporaryCredentials=n.util.inherit(n.Credentials,{constructor:function(e){n.Credentials.call(this),e=e||{},this.errorCode="ChainableTemporaryCredentialsProviderFailure",this.expired=!0,this.tokenCodeFn=null;var t=n.util.copy(e.params)||{};if(t.RoleArn&&(t.RoleSessionName=t.RoleSessionName||"temporary-credentials"),t.SerialNumber){if(!e.tokenCodeFn||"function"!=typeof e.tokenCodeFn)throw new n.util.error(new Error("tokenCodeFn must be a function when params.SerialNumber is given"),{code:this.errorCode});this.tokenCodeFn=e.tokenCodeFn}var r=n.util.merge({params:t,credentials:e.masterCredentials||n.config.credentials},e.stsConfig||{});this.service=new i(r)},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this,r=t.service.config.params.RoleArn?"assumeRole":"getSessionToken";this.getTokenCode((function(n,i){var o={};n?e(n):(i&&(o.TokenCode=i),t.service[r](o,(function(r,n){r||t.service.credentialsFrom(n,t),e(r)})))}))},getTokenCode:function(e){var t=this;this.tokenCodeFn?this.tokenCodeFn(this.service.config.params.SerialNumber,(function(r,i){if(r){var o=r;return r instanceof Error&&(o=r.message),void e(n.util.error(new Error("Error fetching MFA token: "+o),{code:t.errorCode}))}e(null,i)})):e(null)}})},67372:(e,t,r)=>{var n=r(79614),i=r(96105),o=r(93568);n.CognitoIdentityCredentials=n.util.inherit(n.Credentials,{localStorageKey:{id:"aws.cognito.identity-id.",providers:"aws.cognito.identity-providers."},constructor:function(e,t){n.Credentials.call(this),this.expired=!0,this.params=e,this.data=null,this._identityId=null,this._clientConfig=n.util.copy(t||{}),this.loadCachedId();var r=this;Object.defineProperty(this,"identityId",{get:function(){return r.loadCachedId(),r._identityId||r.params.IdentityId},set:function(e){r._identityId=e}})},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.data=null,t._identityId=null,t.getId((function(r){r?(t.clearIdOnNotAuthorized(r),e(r)):t.params.RoleArn?t.getCredentialsFromSTS(e):t.getCredentialsForIdentity(e)}))},clearCachedId:function(){this._identityId=null,delete this.params.IdentityId;var e=this.params.IdentityPoolId,t=this.params.LoginId||"";delete this.storage[this.localStorageKey.id+e+t],delete this.storage[this.localStorageKey.providers+e+t]},clearIdOnNotAuthorized:function(e){"NotAuthorizedException"==e.code&&this.clearCachedId()},getId:function(e){var t=this;if("string"==typeof t.params.IdentityId)return e(null,t.params.IdentityId);t.cognito.getId((function(r,n){!r&&n.IdentityId?(t.params.IdentityId=n.IdentityId,e(null,n.IdentityId)):e(r)}))},loadCredentials:function(e,t){e&&t&&(t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration)},getCredentialsForIdentity:function(e){var t=this;t.cognito.getCredentialsForIdentity((function(r,n){r?t.clearIdOnNotAuthorized(r):(t.cacheId(n),t.data=n,t.loadCredentials(t.data,t)),e(r)}))},getCredentialsFromSTS:function(e){var t=this;t.cognito.getOpenIdToken((function(r,n){r?(t.clearIdOnNotAuthorized(r),e(r)):(t.cacheId(n),t.params.WebIdentityToken=n.Token,t.webIdentityCredentials.refresh((function(r){r||(t.data=t.webIdentityCredentials.data,t.sts.credentialsFrom(t.data,t)),e(r)})))}))},loadCachedId:function(){var e=this;if(n.util.isBrowser()&&!e.params.IdentityId){var t=e.getStorage("id");if(t&&e.params.Logins){var r=Object.keys(e.params.Logins);0!==(e.getStorage("providers")||"").split(",").filter((function(e){return-1!==r.indexOf(e)})).length&&(e.params.IdentityId=t)}else t&&(e.params.IdentityId=t)}},createClients:function(){var e=this._clientConfig;if(this.webIdentityCredentials=this.webIdentityCredentials||new n.WebIdentityCredentials(this.params,e),!this.cognito){var t=n.util.merge({},e);t.params=this.params,this.cognito=new i(t)}this.sts=this.sts||new o(e)},cacheId:function(e){this._identityId=e.IdentityId,this.params.IdentityId=this._identityId,n.util.isBrowser()&&(this.setStorage("id",e.IdentityId),this.params.Logins&&this.setStorage("providers",Object.keys(this.params.Logins).join(",")))},getStorage:function(e){return this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]},setStorage:function(e,t){try{this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]=t}catch(e){}},storage:function(){try{var e=n.util.isBrowser()&&null!==window.localStorage&&"object"==typeof window.localStorage?window.localStorage:{};return e["aws.test-storage"]="foobar",delete e["aws.test-storage"],e}catch(e){return{}}}()})},83227:(e,t,r)=>{var n=r(79614);n.CredentialProviderChain=n.util.inherit(n.Credentials,{constructor:function(e){this.providers=e||n.CredentialProviderChain.defaultProviders.slice(0),this.resolveCallbacks=[]},resolve:function(e){var t=this;if(0===t.providers.length)return e(new Error("No providers")),t;if(1===t.resolveCallbacks.push(e)){var r=0,i=t.providers.slice(0);!function e(o,a){if(!o&&a||r===i.length)return n.util.arrayEach(t.resolveCallbacks,(function(e){e(o,a)})),void(t.resolveCallbacks.length=0);var s=i[r++];(a="function"==typeof s?s.call():s).get?a.get((function(t){e(t,t?null:a)})):e(null,a)}()}return t}}),n.CredentialProviderChain.defaultProviders=[],n.CredentialProviderChain.addPromisesToClass=function(e){this.prototype.resolvePromise=n.util.promisifyMethod("resolve",e)},n.CredentialProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise},n.util.addPromises(n.CredentialProviderChain)},16986:(e,t,r)=>{var n=r(79614),i=r(93568);n.SAMLCredentials=n.util.inherit(n.Credentials,{constructor:function(e){n.Credentials.call(this),this.expired=!0,this.params=e},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.service.assumeRoleWithSAML((function(r,n){r||t.service.credentialsFrom(n,t),e(r)}))},createClients:function(){this.service=this.service||new i({params:this.params})}})},46662:(e,t,r)=>{var n=r(79614),i=r(93568);n.TemporaryCredentials=n.util.inherit(n.Credentials,{constructor:function(e,t){n.Credentials.call(this),this.loadMasterCredentials(t),this.expired=!0,this.params=e||{},this.params.RoleArn&&(this.params.RoleSessionName=this.params.RoleSessionName||"temporary-credentials")},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.masterCredentials.get((function(){t.service.config.credentials=t.masterCredentials,(t.params.RoleArn?t.service.assumeRole:t.service.getSessionToken).call(t.service,(function(r,n){r||t.service.credentialsFrom(n,t),e(r)}))}))},loadMasterCredentials:function(e){for(this.masterCredentials=e||n.config.credentials;this.masterCredentials.masterCredentials;)this.masterCredentials=this.masterCredentials.masterCredentials;"function"!=typeof this.masterCredentials.get&&(this.masterCredentials=new n.Credentials(this.masterCredentials))},createClients:function(){this.service=this.service||new i({params:this.params})}})},97719:(e,t,r)=>{var n=r(79614),i=r(93568);n.WebIdentityCredentials=n.util.inherit(n.Credentials,{constructor:function(e,t){n.Credentials.call(this),this.expired=!0,this.params=e,this.params.RoleSessionName=this.params.RoleSessionName||"web-identity",this.data=null,this._clientConfig=n.util.copy(t||{})},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.service.assumeRoleWithWebIdentity((function(r,n){t.data=null,r||(t.data=n,t.service.credentialsFrom(n,t)),e(r)}))},createClients:function(){if(!this.service){var e=n.util.merge({},this._clientConfig);e.params=this.params,this.service=new i(e)}}})},33320:(e,t,r)=>{var n=r(79614),i=r(62662),o=["AWS_ENABLE_ENDPOINT_DISCOVERY","AWS_ENDPOINT_DISCOVERY_ENABLED"];function a(e){var t=e.service,r=t.api||{},n=(r.operations,{});return t.config.region&&(n.region=t.config.region),r.serviceId&&(n.serviceId=r.serviceId),t.config.credentials.accessKeyId&&(n.accessKeyId=t.config.credentials.accessKeyId),n}function s(e,t,r){r&&null!=t&&"structure"===r.type&&r.required&&r.required.length>0&&i.arrayEach(r.required,(function(n){var i=r.members[n];if(!0===i.endpointDiscoveryId){var o=i.isLocationName?i.name:n;e[o]=String(t[n])}else s(e,t[n],i)}))}function u(e,t){var r={};return s(r,e.params,t),r}function c(e){var t=e.service,r=t.api,o=r.operations?r.operations[e.operation]:void 0,s=u(e,o?o.input:void 0),c=a(e);Object.keys(s).length>0&&(c=i.update(c,s),o&&(c.operation=o.name));var l=n.endpointCache.get(c);if(!l||1!==l.length||""!==l[0].Address)if(l&&l.length>0)e.httpRequest.updateEndpoint(l[0].Address);else{var d=t.makeRequest(r.endpointOperation,{Operation:o.name,Identifiers:s});f(d),d.removeListener("validate",n.EventListeners.Core.VALIDATE_PARAMETERS),d.removeListener("retry",n.EventListeners.Core.RETRY_CHECK),n.endpointCache.put(c,[{Address:"",CachePeriodInMinutes:1}]),d.send((function(e,t){t&&t.Endpoints?n.endpointCache.put(c,t.Endpoints):e&&n.endpointCache.put(c,[{Address:"",CachePeriodInMinutes:1}])}))}}var l={};function d(e,t){var r=e.service,o=r.api,s=o.operations?o.operations[e.operation]:void 0,c=s?s.input:void 0,d=u(e,c),h=a(e);Object.keys(d).length>0&&(h=i.update(h,d),s&&(h.operation=s.name));var p=n.EndpointCache.getKeyString(h),m=n.endpointCache.get(p);if(m&&1===m.length&&""===m[0].Address)return l[p]||(l[p]=[]),void l[p].push({request:e,callback:t});if(m&&m.length>0)e.httpRequest.updateEndpoint(m[0].Address),t();else{var y=r.makeRequest(o.endpointOperation,{Operation:s.name,Identifiers:d});y.removeListener("validate",n.EventListeners.Core.VALIDATE_PARAMETERS),f(y),n.endpointCache.put(p,[{Address:"",CachePeriodInMinutes:60}]),y.send((function(r,o){if(r){if(e.response.error=i.error(r,{retryable:!1}),n.endpointCache.remove(h),l[p]){var a=l[p];i.arrayEach(a,(function(e){e.request.response.error=i.error(r,{retryable:!1}),e.callback()})),delete l[p]}}else o&&(n.endpointCache.put(p,o.Endpoints),e.httpRequest.updateEndpoint(o.Endpoints[0].Address),l[p])&&(a=l[p],i.arrayEach(a,(function(e){e.request.httpRequest.updateEndpoint(o.Endpoints[0].Address),e.callback()})),delete l[p]);t()}))}}function f(e){var t=e.service.api.apiVersion;t&&!e.httpRequest.headers["x-amz-api-version"]&&(e.httpRequest.headers["x-amz-api-version"]=t)}function h(e){var t=e.error,r=e.httpResponse;if(t&&("InvalidEndpointException"===t.code||421===r.statusCode)){var o=e.request,s=o.service.api.operations||{},c=u(o,s[o.operation]?s[o.operation].input:void 0),l=a(o);Object.keys(c).length>0&&(l=i.update(l,c),s[o.operation]&&(l.operation=s[o.operation].name)),n.endpointCache.remove(l)}}function p(e){return["false","0"].indexOf(e)>=0}e.exports={discoverEndpoint:function(e,t){var r=e.service||{};if(function(e){if(e._originalConfig&&e._originalConfig.endpoint&&!0===e._originalConfig.endpointDiscoveryEnabled)throw i.error(new Error,{code:"ConfigurationException",message:"Custom endpoint is supplied; endpointDiscoveryEnabled must not be true."});var t=n.config[e.serviceIdentifier]||{};return Boolean(n.config.endpoint||t.endpoint||e._originalConfig&&e._originalConfig.endpoint)}(r)||e.isPresigned())return t();var a=(r.api.operations||{})[e.operation],s=a?a.endpointDiscoveryRequired:"NULL",u=function(e){var t=e.service||{};if(void 0!==t.config.endpointDiscoveryEnabled)return t.config.endpointDiscoveryEnabled;if(!i.isBrowser()){for(var r=0;r{var n=r(97550).eventMessageChunker,i=r(83851).parseEvent;e.exports={createEventStream:function(e,t,r){for(var o=n(e),a=[],s=0;s{e.exports={eventMessageChunker:function(e){for(var t=[],r=0;r{var n=r(79614).util,i=n.buffer.toBuffer;function o(e){if(8!==e.length)throw new Error("Int64 buffers must be exactly 8 bytes");n.Buffer.isBuffer(e)||(e=i(e)),this.bytes=e}function a(e){for(var t=0;t<8;t++)e[t]^=255;for(t=7;t>-1&&(e[t]++,0===e[t]);t--);}o.fromNumber=function(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(e+" is too large (or, if negative, too small) to represent as an Int64");for(var t=new Uint8Array(8),r=7,n=Math.abs(Math.round(e));r>-1&&n>0;r--,n/=256)t[r]=n;return e<0&&a(t),new o(t)},o.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&a(e),parseInt(e.toString("hex"),16)*(t?-1:1)},o.prototype.toString=function(){return String(this.valueOf())},e.exports={Int64:o}},83851:(e,t,r)=>{var n=r(89524).parseMessage;e.exports={parseEvent:function(e,t,r){var i=n(t),o=i.headers[":message-type"];if(o){if("error"===o.value)throw function(e){var t=e.headers[":error-code"],r=e.headers[":error-message"],n=new Error(r.value||r);return n.code=n.name=t.value||t,n}(i);if("event"!==o.value)return}var a=i.headers[":event-type"],s=r.members[a.value];if(s){var u={},c=s.eventPayloadMemberName;if(c){var l=s.members[c];"binary"===l.type?u[c]=i.body:u[c]=e.parse(i.body.toString(),l)}for(var d=s.eventHeaderMemberNames,f=0;f{var n=r(31231).Int64,i=r(4441).splitMessage,o="boolean";function a(e){for(var t={},r=0;r{var n=r(79614).util,i=n.buffer.toBuffer;e.exports={splitMessage:function(e){if(n.Buffer.isBuffer(e)||(e=i(e)),e.length<16)throw new Error("Provided message too short to accommodate event stream message overhead");if(e.length!==e.readUInt32BE(0))throw new Error("Reported message length does not match received message length");var t=e.readUInt32BE(8);if(t!==n.crypto.crc32(e.slice(0,8)))throw new Error("The prelude checksum specified in the message ("+t+") does not match the calculated CRC32 checksum.");var r=e.readUInt32BE(e.length-4);if(r!==n.crypto.crc32(e.slice(0,e.length-4)))throw new Error("The message checksum did not match the expected value of "+r);var o=12+e.readUInt32BE(4);return{headers:e.slice(12,o),body:e.slice(o,e.length-4)}}}},72274:(e,t,r)=>{var n=r(79614),i=r(96380),o=r(33320).discoverEndpoint;function a(e){if(!e.service.api.operations)return"";var t=e.service.api.operations[e.operation];return t?t.authtype:""}function s(e){var t=e.service;return t.config.signatureVersion?t.config.signatureVersion:t.api.signatureVersion?t.api.signatureVersion:a(e)}n.EventListeners={Core:{}},n.EventListeners={Core:(new i).addNamedListeners((function(e,t){t("VALIDATE_CREDENTIALS","validate",(function(e,t){if(!e.service.api.signatureVersion&&!e.service.config.signatureVersion)return t();"bearer"!==s(e)?e.service.config.getCredentials((function(r){r&&(e.response.error=n.util.error(r,{code:"CredentialsError",message:"Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1"})),t()})):e.service.config.getToken((function(r){r&&(e.response.error=n.util.error(r,{code:"TokenError"})),t()}))})),e("VALIDATE_REGION","validate",(function(e){if(!e.service.isGlobalEndpoint){var t=new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);e.service.config.region?t.test(e.service.config.region)||(e.response.error=n.util.error(new Error,{code:"ConfigError",message:"Invalid region in config"})):e.response.error=n.util.error(new Error,{code:"ConfigError",message:"Missing region in config"})}})),e("BUILD_IDEMPOTENCY_TOKENS","validate",(function(e){if(e.service.api.operations){var t=e.service.api.operations[e.operation];if(t){var r=t.idempotentMembers;if(r.length){for(var i=n.util.copy(e.params),o=0,a=r.length;o=0)return e.httpRequest.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",t();n.util.computeSha256(o,(function(r,n){r?t(r):(e.httpRequest.headers["X-Amz-Content-Sha256"]=n,t())}))}else t()}})),e("SET_CONTENT_LENGTH","afterBuild",(function(e){var t=a(e),r=n.util.getRequestPayloadShape(e);if(void 0===e.httpRequest.headers["Content-Length"])try{var i=n.util.string.byteLength(e.httpRequest.body);e.httpRequest.headers["Content-Length"]=i}catch(n){if(r&&r.isStreaming){if(r.requiresLength)throw n;if(t.indexOf("unsigned-body")>=0)return void(e.httpRequest.headers["Transfer-Encoding"]="chunked");throw n}throw n}})),e("SET_HTTP_HOST","afterBuild",(function(e){e.httpRequest.headers.Host=e.httpRequest.endpoint.host})),e("SET_TRACE_ID","afterBuild",(function(e){var t="X-Amzn-Trace-Id";if(n.util.isNode()&&!Object.hasOwnProperty.call(e.httpRequest.headers,t)){var r={LOCAL_CONFIGURATION:void 0,NODE_ENV:"production"}.AWS_LAMBDA_FUNCTION_NAME,i={LOCAL_CONFIGURATION:void 0,NODE_ENV:"production"}._X_AMZN_TRACE_ID;"string"==typeof r&&r.length>0&&"string"==typeof i&&i.length>0&&(e.httpRequest.headers[t]=i)}})),e("RESTART","restart",(function(){var e=this.response.error;e&&e.retryable&&(this.httpRequest=new n.HttpRequest(this.service.endpoint,this.service.region),this.response.retryCount=600?this.emit("sign",[this],(function(e){e?t(e):o()})):o()})),e("HTTP_HEADERS","httpHeaders",(function(e,t,r,i){r.httpResponse.statusCode=e,r.httpResponse.statusMessage=i,r.httpResponse.headers=t,r.httpResponse.body=n.util.buffer.toBuffer(""),r.httpResponse.buffers=[],r.httpResponse.numBytes=0;var o=t.date||t.Date,a=r.request.service;if(o){var s=Date.parse(o);a.config.correctClockSkew&&a.isClockSkewed(s)&&a.applyClockOffset(s)}})),e("HTTP_DATA","httpData",(function(e,t){if(e){if(n.util.isNode()){t.httpResponse.numBytes+=e.length;var r=t.httpResponse.headers["content-length"],i={loaded:t.httpResponse.numBytes,total:r};t.request.emit("httpDownloadProgress",[i,t])}t.httpResponse.buffers.push(n.util.buffer.toBuffer(e))}})),e("HTTP_DONE","httpDone",(function(e){if(e.httpResponse.buffers&&e.httpResponse.buffers.length>0){var t=n.util.buffer.concat(e.httpResponse.buffers);e.httpResponse.body=t}delete e.httpResponse.numBytes,delete e.httpResponse.buffers})),e("FINALIZE_ERROR","retry",(function(e){e.httpResponse.statusCode&&(e.error.statusCode=e.httpResponse.statusCode,void 0===e.error.retryable&&(e.error.retryable=this.service.retryableError(e.error,this)))})),e("INVALIDATE_CREDENTIALS","retry",(function(e){if(e.error)switch(e.error.code){case"RequestExpired":case"ExpiredTokenException":case"ExpiredToken":e.error.retryable=!0,e.request.service.config.credentials.expired=!0}})),e("EXPIRED_SIGNATURE","retry",(function(e){var t=e.error;t&&"string"==typeof t.code&&"string"==typeof t.message&&t.code.match(/Signature/)&&t.message.match(/expired/)&&(e.error.retryable=!0)})),e("CLOCK_SKEWED","retry",(function(e){e.error&&this.service.clockSkewError(e.error)&&this.service.config.correctClockSkew&&(e.error.retryable=!0)})),e("REDIRECT","retry",(function(e){e.error&&e.error.statusCode>=300&&e.error.statusCode<400&&e.httpResponse.headers.location&&(this.httpRequest.endpoint=new n.Endpoint(e.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,e.error.redirect=!0,e.error.retryable=!0)})),e("RETRY_CHECK","retry",(function(e){e.error&&(e.error.redirect&&e.redirectCount=0?(e.error=null,setTimeout(t,r)):t()}))})),CorePost:(new i).addNamedListeners((function(e){e("EXTRACT_REQUEST_ID","extractData",n.util.extractRequestId),e("EXTRACT_REQUEST_ID","extractError",n.util.extractRequestId),e("ENOTFOUND_ERROR","httpError",(function(e){if("NetworkingError"===e.code&&function(e){return"ENOTFOUND"===e.errno||"number"==typeof e.errno&&"function"==typeof n.util.getSystemErrorName&&["EAI_NONAME","EAI_NODATA"].indexOf(n.util.getSystemErrorName(e.errno)>=0)}(e)){var t="Inaccessible host: `"+e.hostname+"' at port `"+e.port+"'. This service may not be available in the `"+e.region+"' region.";this.response.error=n.util.error(new Error(t),{code:"UnknownEndpoint",region:e.region,hostname:e.hostname,retryable:!0,originalError:e})}}))})),Logger:(new i).addNamedListeners((function(e){e("LOG_REQUEST","complete",(function(e){var t=e.request,i=t.service.config.logger;if(i){var o=function(){var o=(e.request.service.getSkewCorrectedDate().getTime()-t.startTime.getTime())/1e3,s=!!i.isTTY,u=e.httpResponse.statusCode,c=t.params;t.service.api.operations&&t.service.api.operations[t.operation]&&t.service.api.operations[t.operation].input&&(c=a(t.service.api.operations[t.operation].input,t.params));var l=r(89539).inspect(c,!0,null),d="";return s&&(d+=""),d+="[AWS "+t.service.serviceIdentifier+" "+u,d+=" "+o.toString()+"s "+e.retryCount+" retries]",s&&(d+=""),d+=" "+n.util.string.lowerFirst(t.operation),d+="("+l+")",s&&(d+=""),d}();"function"==typeof i.log?i.log(o):"function"==typeof i.write&&i.write(o+"\n")}function a(e,t){if(!t)return t;if(e.isSensitive)return"***SensitiveInformation***";switch(e.type){case"structure":var r={};return n.util.each(t,(function(t,n){Object.prototype.hasOwnProperty.call(e.members,t)?r[t]=a(e.members[t],n):r[t]=n})),r;case"list":var i=[];return n.util.arrayEach(t,(function(t,r){i.push(a(e.member,t))})),i;case"map":var o={};return n.util.each(t,(function(t,r){o[t]=a(e.value,r)})),o;default:return t}}}))})),Json:(new i).addNamedListeners((function(e){var t=r(76933);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)})),Rest:(new i).addNamedListeners((function(e){var t=r(96225);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)})),RestJson:(new i).addNamedListeners((function(e){var t=r(53699);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError),e("UNSET_CONTENT_LENGTH","afterBuild",t.unsetContentLength)})),RestXml:(new i).addNamedListeners((function(e){var t=r(11674);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)})),Query:(new i).addNamedListeners((function(e){var t=r(70293);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}))}},26344:(e,t,r)=>{var n=r(79614),i=n.util.inherit;n.Endpoint=i({constructor:function(e,t){if(n.util.hideProperties(this,["slashes","auth","hash","search","query"]),null==e)throw new Error("Invalid endpoint: "+e);if("string"!=typeof e)return n.util.copy(e);e.match(/^http/)||(e=((t&&void 0!==t.sslEnabled?t.sslEnabled:n.config.sslEnabled)?"https":"http")+"://"+e),n.util.update(this,n.util.urlParse(e)),this.port?this.port=parseInt(this.port,10):this.port="https:"===this.protocol?443:80}}),n.HttpRequest=i({constructor:function(e,t){e=new n.Endpoint(e),this.method="POST",this.path=e.path||"/",this.headers={},this.body="",this.endpoint=e,this.region=t,this._userAgent="",this.setUserAgent()},setUserAgent:function(){this._userAgent=this.headers[this.getUserAgentHeaderName()]=n.util.userAgent()},getUserAgentHeaderName:function(){return(n.util.isBrowser()?"X-Amz-":"")+"User-Agent"},appendToUserAgent:function(e){"string"==typeof e&&e&&(this._userAgent+=" "+e),this.headers[this.getUserAgentHeaderName()]=this._userAgent},getUserAgent:function(){return this._userAgent},pathname:function(){return this.path.split("?",1)[0]},search:function(){var e=this.path.split("?",2)[1];return e?(e=n.util.queryStringParse(e),n.util.queryParamsToString(e)):""},updateEndpoint:function(e){var t=new n.Endpoint(e);this.endpoint=t,this.path=t.path||"/",this.headers.Host&&(this.headers.Host=t.host)}}),n.HttpResponse=i({constructor:function(){this.statusCode=void 0,this.headers={},this.body=void 0,this.streaming=!1,this.stream=null},createUnbufferedStream:function(){return this.streaming=!0,this.stream}}),n.HttpClient=i({}),n.HttpClient.getInstance=function(){return void 0===this.singleton&&(this.singleton=new this),this.singleton}},2631:(e,t,r)=>{var n=r(79614),i=r(17187).EventEmitter;r(26344),n.XHRClient=n.util.inherit({handleRequest:function(e,t,r,o){var a=this,s=e.endpoint,u=new i,c=s.protocol+"//"+s.hostname;80!==s.port&&443!==s.port&&(c+=":"+s.port),c+=e.path;var l=new XMLHttpRequest,d=!1;e.stream=l,l.addEventListener("readystatechange",(function(){try{if(0===l.status)return}catch(e){return}this.readyState>=this.HEADERS_RECEIVED&&!d&&(u.statusCode=l.status,u.headers=a.parseHeaders(l.getAllResponseHeaders()),u.emit("headers",u.statusCode,u.headers,l.statusText),d=!0),this.readyState===this.DONE&&a.finishRequest(l,u)}),!1),l.upload.addEventListener("progress",(function(e){u.emit("sendProgress",e)})),l.addEventListener("progress",(function(e){u.emit("receiveProgress",e)}),!1),l.addEventListener("timeout",(function(){o(n.util.error(new Error("Timeout"),{code:"TimeoutError"}))}),!1),l.addEventListener("error",(function(){o(n.util.error(new Error("Network Failure"),{code:"NetworkingError"}))}),!1),l.addEventListener("abort",(function(){o(n.util.error(new Error("Request aborted"),{code:"RequestAbortedError"}))}),!1),r(u),l.open(e.method,c,!1!==t.xhrAsync),n.util.each(e.headers,(function(e,t){"Content-Length"!==e&&"User-Agent"!==e&&"Host"!==e&&l.setRequestHeader(e,t)})),t.timeout&&!1!==t.xhrAsync&&(l.timeout=t.timeout),t.xhrWithCredentials&&(l.withCredentials=!0);try{l.responseType="arraybuffer"}catch(e){}try{e.body?l.send(e.body):l.send()}catch(t){if(!e.body||"object"!=typeof e.body.buffer)throw t;l.send(e.body.buffer)}return u},parseHeaders:function(e){var t={};return n.util.arrayEach(e.split(/\r?\n/),(function(e){var r=e.split(":",1)[0],n=e.substring(r.length+2);r.length>0&&(t[r.toLowerCase()]=n)})),t},finishRequest:function(e,t){var r;if("arraybuffer"===e.responseType&&e.response){var i=e.response;r=new n.util.Buffer(i.byteLength);for(var o=new Uint8Array(i),a=0;a{var n=r(62662);function i(){}function o(e,t){if(t&&null!=e)switch(t.type){case"structure":return function(e,t){if(t.isDocument)return e;var r={};return n.each(e,(function(e,n){var i=t.members[e];if(i){if("body"!==i.location)return;var a=i.isLocationName?i.name:e,s=o(n,i);void 0!==s&&(r[a]=s)}})),r}(e,t);case"map":return function(e,t){var r={};return n.each(e,(function(e,n){var i=o(n,t.value);void 0!==i&&(r[e]=i)})),r}(e,t);case"list":return function(e,t){var r=[];return n.arrayEach(e,(function(e){var n=o(e,t.member);void 0!==n&&r.push(n)})),r}(e,t);default:return function(e,t){return t.toWireFormat(e)}(e,t)}}i.prototype.build=function(e,t){return JSON.stringify(o(e,t))},e.exports=i},62622:(e,t,r)=>{var n=r(62662);function i(){}function o(e,t){if(t&&void 0!==e)switch(t.type){case"structure":return function(e,t){if(null!=e){if(t.isDocument)return e;var r={},i=t.members;return n.each(i,(function(t,n){var i=n.isLocationName?n.name:t;if(Object.prototype.hasOwnProperty.call(e,i)){var a=o(e[i],n);void 0!==a&&(r[t]=a)}})),r}}(e,t);case"map":return function(e,t){if(null!=e){var r={};return n.each(e,(function(e,n){var i=o(n,t.value);r[e]=void 0===i?null:i})),r}}(e,t);case"list":return function(e,t){if(null!=e){var r=[];return n.arrayEach(e,(function(e){var n=o(e,t.member);void 0===n?r.push(null):r.push(n)})),r}}(e,t);default:return function(e,t){return t.toType(e)}(e,t)}}i.prototype.parse=function(e,t){return o(JSON.parse(e),t)},e.exports=i},3580:(e,t,r)=>{var n=r(34155),i=["We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.\n","Please migrate your code to use AWS SDK for JavaScript (v3).","For more information, check the migration guide at https://a.co/7PzMCcy"].join("\n");e.exports={suppress:!1},setTimeout((function(){e.exports.suppress||void 0!==n&&(void 0!=={LOCAL_CONFIGURATION:void 0,NODE_ENV:"production"}.AWS_EXECUTION_ENV&&0==={LOCAL_CONFIGURATION:void 0,NODE_ENV:"production"}.AWS_EXECUTION_ENV.indexOf("AWS_Lambda_")||void 0==={LOCAL_CONFIGURATION:void 0,NODE_ENV:"production"}.AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE&&"function"==typeof n.emitWarning&&n.emitWarning(i,{type:"NOTE"}))}),0)},85863:(e,t,r)=>{var n=r(84351),i=r(66797),o=r(68136),a=r(47937),s=r(90306),u=r(17752),c=r(62662),l=c.property,d=c.memoizedProperty;e.exports=function(e,t){var r=this;e=e||{},(t=t||{}).api=this,e.metadata=e.metadata||{};var f=t.serviceIdentifier;delete t.serviceIdentifier,l(this,"isApi",!0,!1),l(this,"apiVersion",e.metadata.apiVersion),l(this,"endpointPrefix",e.metadata.endpointPrefix),l(this,"signingName",e.metadata.signingName),l(this,"globalEndpoint",e.metadata.globalEndpoint),l(this,"signatureVersion",e.metadata.signatureVersion),l(this,"jsonVersion",e.metadata.jsonVersion),l(this,"targetPrefix",e.metadata.targetPrefix),l(this,"protocol",e.metadata.protocol),l(this,"timestampFormat",e.metadata.timestampFormat),l(this,"xmlNamespaceUri",e.metadata.xmlNamespace),l(this,"abbreviation",e.metadata.serviceAbbreviation),l(this,"fullName",e.metadata.serviceFullName),l(this,"serviceId",e.metadata.serviceId),f&&u[f]&&l(this,"xmlNoDefaultLists",u[f].xmlNoDefaultLists,!1),d(this,"className",(function(){var t=e.metadata.serviceAbbreviation||e.metadata.serviceFullName;return t?("ElasticLoadBalancing"===(t=t.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g,""))&&(t="ELB"),t):null})),l(this,"operations",new n(e.operations,t,(function(e,r){return new i(e,r,t)}),c.string.lowerFirst,(function(e,t){!0===t.endpointoperation&&l(r,"endpointOperation",c.string.lowerFirst(e)),t.endpointdiscovery&&!r.hasRequiredEndpointDiscovery&&l(r,"hasRequiredEndpointDiscovery",!0===t.endpointdiscovery.required)}))),l(this,"shapes",new n(e.shapes,t,(function(e,r){return o.create(r,t)}))),l(this,"paginators",new n(e.paginators,t,(function(e,r){return new a(e,r,t)}))),l(this,"waiters",new n(e.waiters,t,(function(e,r){return new s(e,r,t)}),c.string.lowerFirst)),t.documentation&&(l(this,"documentation",e.documentation),l(this,"documentationUrl",e.documentationUrl)),l(this,"awsQueryCompatible",e.metadata.awsQueryCompatible)}},84351:(e,t,r)=>{var n=r(62662).memoizedProperty;function i(e,t,r,i){n(this,i(e),(function(){return r(e,t)}))}e.exports=function(e,t,r,n,o){for(var a in n=n||String,e)Object.prototype.hasOwnProperty.call(e,a)&&(i.call(this,a,e[a],r,n),o&&o(a,e[a]))}},66797:(e,t,r)=>{var n=r(68136),i=r(62662),o=i.property,a=i.memoizedProperty;e.exports=function(e,t,r){var i=this;r=r||{},o(this,"name",t.name||e),o(this,"api",r.api,!1),t.http=t.http||{},o(this,"endpoint",t.endpoint),o(this,"httpMethod",t.http.method||"POST"),o(this,"httpPath",t.http.requestUri||"/"),o(this,"authtype",t.authtype||""),o(this,"endpointDiscoveryRequired",t.endpointdiscovery?t.endpointdiscovery.required?"REQUIRED":"OPTIONAL":"NULL");var s=t.httpChecksumRequired||t.httpChecksum&&t.httpChecksum.requestChecksumRequired;o(this,"httpChecksumRequired",s,!1),a(this,"input",(function(){return t.input?n.create(t.input,r):new n.create({type:"structure"},r)})),a(this,"output",(function(){return t.output?n.create(t.output,r):new n.create({type:"structure"},r)})),a(this,"errors",(function(){var e=[];if(!t.errors)return null;for(var i=0;i{var n=r(62662).property;e.exports=function(e,t){n(this,"inputToken",t.input_token),n(this,"limitKey",t.limit_key),n(this,"moreResults",t.more_results),n(this,"outputToken",t.output_token),n(this,"resultKey",t.result_key)}},90306:(e,t,r)=>{var n=r(62662),i=n.property;e.exports=function(e,t,r){r=r||{},i(this,"name",e),i(this,"api",r.api,!1),t.operation&&i(this,"operation",n.string.lowerFirst(t.operation));var o=this;["type","description","delay","maxAttempts","acceptors"].forEach((function(e){var r=t[e];r&&i(o,e,r)}))}},68136:(e,t,r)=>{var n=r(84351),i=r(62662);function o(e,t,r){null!=r&&i.property.apply(this,arguments)}function a(e,t){e.constructor.prototype[t]||i.memoizedProperty.apply(this,arguments)}function s(e,t,r){t=t||{},o(this,"shape",e.shape),o(this,"api",t.api,!1),o(this,"type",e.type),o(this,"enum",e.enum),o(this,"min",e.min),o(this,"max",e.max),o(this,"pattern",e.pattern),o(this,"location",e.location||this.location||"body"),o(this,"name",this.name||e.xmlName||e.queryName||e.locationName||r),o(this,"isStreaming",e.streaming||this.isStreaming||!1),o(this,"requiresLength",e.requiresLength,!1),o(this,"isComposite",e.isComposite||!1),o(this,"isShape",!0,!1),o(this,"isQueryName",Boolean(e.queryName),!1),o(this,"isLocationName",Boolean(e.locationName),!1),o(this,"isIdempotent",!0===e.idempotencyToken),o(this,"isJsonValue",!0===e.jsonvalue),o(this,"isSensitive",!0===e.sensitive||e.prototype&&!0===e.prototype.sensitive),o(this,"isEventStream",Boolean(e.eventstream),!1),o(this,"isEvent",Boolean(e.event),!1),o(this,"isEventPayload",Boolean(e.eventpayload),!1),o(this,"isEventHeader",Boolean(e.eventheader),!1),o(this,"isTimestampFormatSet",Boolean(e.timestampFormat)||e.prototype&&!0===e.prototype.isTimestampFormatSet,!1),o(this,"endpointDiscoveryId",Boolean(e.endpointdiscoveryid),!1),o(this,"hostLabel",Boolean(e.hostLabel),!1),t.documentation&&(o(this,"documentation",e.documentation),o(this,"documentationUrl",e.documentationUrl)),e.xmlAttribute&&o(this,"isXmlAttribute",e.xmlAttribute||!1),o(this,"defaultValue",null),this.toWireFormat=function(e){return null==e?"":e},this.toType=function(e){return e}}function u(e){s.apply(this,arguments),o(this,"isComposite",!0),e.flattened&&o(this,"flattened",e.flattened||!1)}function c(e,t){var r=this,i=null,c=!this.isShape;u.apply(this,arguments),c&&(o(this,"defaultValue",(function(){return{}})),o(this,"members",{}),o(this,"memberNames",[]),o(this,"required",[]),o(this,"isRequired",(function(){return!1})),o(this,"isDocument",Boolean(e.document))),e.members&&(o(this,"members",new n(e.members,t,(function(e,r){return s.create(r,t,e)}))),a(this,"memberNames",(function(){return e.xmlOrder||Object.keys(e.members)})),e.event&&(a(this,"eventPayloadMemberName",(function(){for(var e=r.members,t=r.memberNames,n=0,i=t.length;n-1?t||"":t,this.isJsonValue?JSON.parse(t):t&&"function"==typeof t.toString?t.toString():t},this.toWireFormat=function(e){return this.isJsonValue?JSON.stringify(e):e}}function h(){s.apply(this,arguments),this.toType=function(e){var t=i.base64.decode(e);if(this.isSensitive&&i.isNode()&&"function"==typeof i.Buffer.alloc){var r=i.Buffer.alloc(t.length,t);t.fill(0),t=r}return t},this.toWireFormat=i.base64.encode}function p(){h.apply(this,arguments)}function m(){s.apply(this,arguments),this.toType=function(e){return"boolean"==typeof e?e:null==e?null:"true"===e}}s.normalizedTypes={character:"string",double:"float",long:"integer",short:"integer",biginteger:"integer",bigdecimal:"float",blob:"binary"},s.types={structure:c,list:l,map:d,boolean:m,timestamp:function(e){var t=this;if(s.apply(this,arguments),e.timestampFormat)o(this,"timestampFormat",e.timestampFormat);else if(t.isTimestampFormatSet&&this.timestampFormat)o(this,"timestampFormat",this.timestampFormat);else if("header"===this.location)o(this,"timestampFormat","rfc822");else if("querystring"===this.location)o(this,"timestampFormat","iso8601");else if(this.api)switch(this.api.protocol){case"json":case"rest-json":o(this,"timestampFormat","unixTimestamp");break;case"rest-xml":case"query":case"ec2":o(this,"timestampFormat","iso8601")}this.toType=function(e){return null==e?null:"function"==typeof e.toUTCString?e:"string"==typeof e||"number"==typeof e?i.date.parseTimestamp(e):null},this.toWireFormat=function(e){return i.date.format(e,t.timestampFormat)}},float:function(){s.apply(this,arguments),this.toType=function(e){return null==e?null:parseFloat(e)},this.toWireFormat=this.toType},integer:function(){s.apply(this,arguments),this.toType=function(e){return null==e?null:parseInt(e,10)},this.toWireFormat=this.toType},string:f,base64:p,binary:h},s.resolve=function(e,t){if(e.shape){var r=t.api.shapes[e.shape];if(!r)throw new Error("Cannot find shape reference: "+e.shape);return r}return null},s.create=function(e,t,r){if(e.isShape)return e;var n=s.resolve(e,t);if(n){var i=Object.keys(e);t.documentation||(i=i.filter((function(e){return!e.match(/documentation/)})));var o=function(){n.constructor.call(this,e,t,r)};return o.prototype=n,new o}e.type||(e.members?e.type="structure":e.member?e.type="list":e.key?e.type="map":e.type="string");var a=e.type;if(s.normalizedTypes[e.type]&&(e.type=s.normalizedTypes[e.type]),s.types[e.type])return new s.types[e.type](e,t,r);throw new Error("Unrecognized shape type: "+a)},s.shapes={StructureShape:c,ListShape:l,MapShape:d,StringShape:f,BooleanShape:m,Base64Shape:p},e.exports=s},25479:(e,t,r)=>{var n=r(79614);n.ParamValidator=n.util.inherit({constructor:function(e){!0!==e&&void 0!==e||(e={min:!0}),this.validation=e},validate:function(e,t,r){if(this.errors=[],this.validateMember(e,t||{},r||"params"),this.errors.length>1){var i=this.errors.join("\n* ");throw i="There were "+this.errors.length+" validation errors:\n* "+i,n.util.error(new Error(i),{code:"MultipleValidationErrors",errors:this.errors})}if(1===this.errors.length)throw this.errors[0];return!0},fail:function(e,t){this.errors.push(n.util.error(new Error(t),{code:e}))},validateStructure:function(e,t,r){if(e.isDocument)return!0;var n;this.validateType(t,r,["object"],"structure");for(var i=0;e.required&&i= 1, but found "'+t+'" for '+r)},validatePattern:function(e,t,r){this.validation.pattern&&void 0!==e.pattern&&(new RegExp(e.pattern).test(t)||this.fail("PatternMatchError",'Provided value "'+t+'" does not match regex pattern /'+e.pattern+"/ for "+r))},validateRange:function(e,t,r,n){this.validation.min&&void 0!==e.min&&t= "+e.min+", but found "+t+" for "+r),this.validation.max&&void 0!==e.max&&t>e.max&&this.fail("MaxRangeError","Expected "+n+" <= "+e.max+", but found "+t+" for "+r)},validateEnum:function(e,t,r){this.validation.enum&&void 0!==e.enum&&-1===e.enum.indexOf(t)&&this.fail("EnumError","Found string value of "+t+", but expected "+e.enum.join("|")+" for "+r)},validateType:function(e,t,r,i){if(null==e)return!1;for(var o=!1,a=0;a{var n=r(62662),i=r(79614);e.exports={populateHostPrefix:function(e){if(!e.service.config.hostPrefixEnabled)return e;var t,r,o,a,s,u,c,l=e.service.api.operations[e.operation];if(function(e){var t=e.service.api,r=t.operations[e.operation],i=t.endpointOperation&&t.endpointOperation===n.string.lowerFirst(r.name);return"NULL"!==r.endpointDiscoveryRequired||!0===i}(e))return e;if(l.endpoint&&l.endpoint.hostPrefix){var d=(s=l.endpoint.hostPrefix,u=e.params,c=l.input,n.each(c.members,(function(e,t){if(!0===t.hostLabel){if("string"!=typeof u[e]||""===u[e])throw n.error(new Error,{message:"Parameter "+e+" should be a non-empty string.",code:"InvalidParameter"});var r=new RegExp("\\{"+e+"\\}","g");s=s.replace(r,u[e])}})),s);o=e.httpRequest.endpoint,a=d,o.host&&(o.host=a+o.host),o.hostname&&(o.hostname=a+o.hostname),t=e.httpRequest.endpoint.hostname.split("."),r=/^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/,n.arrayEach(t,(function(e){if(!e.length||e.length<1||e.length>63)throw n.error(new Error,{code:"ValidationError",message:"Hostname label length should be between 1 to 63 characters, inclusive."});if(!r.test(e))throw i.util.error(new Error,{code:"ValidationError",message:e+" is not hostname compatible."})}))}return e}}},76933:(e,t,r)=>{var n=r(62662),i=r(43658),o=r(62622),a=r(80987).populateHostPrefix;e.exports={buildRequest:function(e){var t=e.httpRequest,r=e.service.api,n=r.targetPrefix+"."+r.operations[e.operation].name,o=r.jsonVersion||"1.0",s=r.operations[e.operation].input,u=new i;1===o&&(o="1.0"),r.awsQueryCompatible&&(t.params||(t.params={}),Object.assign(t.params,e.params)),t.body=u.build(e.params||{},s),t.headers["Content-Type"]="application/x-amz-json-"+o,t.headers["X-Amz-Target"]=n,a(e)},extractError:function(e){var t={},r=e.httpResponse;if(t.code=r.headers["x-amzn-errortype"]||"UnknownError","string"==typeof t.code&&(t.code=t.code.split(":")[0]),r.body.length>0)try{var i=JSON.parse(r.body.toString()),o=i.__type||i.code||i.Code;for(var a in o&&(t.code=o.split("#").pop()),"RequestEntityTooLarge"===t.code?t.message="Request body must be less than 1 MB":t.message=i.message||i.Message||null,i||{})"code"!==a&&"message"!==a&&(t["["+a+"]"]="See error."+a+" for details.",Object.defineProperty(t,a,{value:i[a],enumerable:!1,writable:!0}))}catch(i){t.statusCode=r.statusCode,t.message=r.statusMessage}else t.statusCode=r.statusCode,t.message=r.statusCode.toString();e.error=n.error(new Error,t)},extractData:function(e){var t=e.httpResponse.body.toString()||"{}";if(!1===e.request.service.config.convertResponseTypes)e.data=JSON.parse(t);else{var r=e.request.service.api.operations[e.request.operation].output||{},n=new o;e.data=n.parse(t,r)}}}},70293:(e,t,r)=>{var n=r(79614),i=r(62662),o=r(30864),a=r(68136),s=r(80987).populateHostPrefix;e.exports={buildRequest:function(e){var t=e.service.api.operations[e.operation],r=e.httpRequest;r.headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8",r.params={Version:e.service.api.apiVersion,Action:t.name},(new o).serialize(e.params,t.input,(function(e,t){r.params[e]=t})),r.body=i.queryParamsToString(r.params),s(e)},extractError:function(e){var t,r=e.httpResponse.body.toString();if(r.match("{var n=r(62662),i=r(80987).populateHostPrefix;function o(e,t,r,i){var o=[e,t].join("/");o=o.replace(/\/+/g,"/");var a={},s=!1;if(n.each(r.members,(function(e,t){var r=i[e];if(null!=r)if("uri"===t.location){var u=new RegExp("\\{"+t.name+"(\\+)?\\}");o=o.replace(u,(function(e,t){return(t?n.uriEscapePath:n.uriEscape)(String(r))}))}else"querystring"===t.location&&(s=!0,"list"===t.type?a[t.name]=r.map((function(e){return n.uriEscape(t.member.toWireFormat(e).toString())})):"map"===t.type?n.each(r,(function(e,t){Array.isArray(t)?a[e]=t.map((function(e){return n.uriEscape(String(e))})):a[e]=n.uriEscape(String(t))})):a[t.name]=n.uriEscape(t.toWireFormat(r).toString()))})),s){o+=o.indexOf("?")>=0?"&":"?";var u=[];n.arrayEach(Object.keys(a).sort(),(function(e){Array.isArray(a[e])||(a[e]=[a[e]]);for(var t=0;t{var n=r(62662),i=r(96225),o=r(76933),a=r(43658),s=r(62622),u=["GET","HEAD","DELETE"];function c(e,t){if(!e.httpRequest.headers["Content-Type"]){var r=t?"binary/octet-stream":"application/json";e.httpRequest.headers["Content-Type"]=r}}e.exports={buildRequest:function(e){i.buildRequest(e),u.indexOf(e.httpRequest.method)<0&&function(e){var t=new a,r=e.service.api.operations[e.operation].input;if(r.payload){var n,i=r.members[r.payload];n=e.params[r.payload],"structure"===i.type?(e.httpRequest.body=t.build(n||{},i),c(e)):void 0!==n&&(e.httpRequest.body=n,("binary"===i.type||i.isStreaming)&&c(e,!0))}else e.httpRequest.body=t.build(e.params,r),c(e)}(e)},extractError:function(e){o.extractError(e)},extractData:function(e){i.extractData(e);var t=e.request,r=t.service.api.operations[t.operation],a=t.service.api.operations[t.operation].output||{};if(r.hasEventOutput,a.payload){var u=a.members[a.payload],c=e.httpResponse.body;if(u.isEventStream)l=new s,e.data[payload]=n.createEventStream(2===AWS.HttpClient.streamsApiVersion?e.httpResponse.stream:c,l,u);else if("structure"===u.type||"list"===u.type){var l=new s;e.data[a.payload]=l.parse(c,u)}else"binary"===u.type||u.isStreaming?e.data[a.payload]=c:e.data[a.payload]=u.toType(c)}else{var d=e.data;o.extractData(e),e.data=n.merge(d,e.data)}},unsetContentLength:function(e){void 0===n.getRequestPayloadShape(e)&&u.indexOf(e.httpRequest.method)>=0&&delete e.httpRequest.headers["Content-Length"]}}},11674:(e,t,r)=>{var n=r(79614),i=r(62662),o=r(96225);e.exports={buildRequest:function(e){o.buildRequest(e),["GET","HEAD"].indexOf(e.httpRequest.method)<0&&function(e){var t=e.service.api.operations[e.operation].input,r=new n.XML.Builder,o=e.params,a=t.payload;if(a){var s=t.members[a];if(void 0===(o=o[a]))return;if("structure"===s.type){var u=s.name;e.httpRequest.body=r.toXML(o,s,u,!0)}else e.httpRequest.body=o}else e.httpRequest.body=r.toXML(o,t,t.name||t.shape||i.string.upperFirst(e.operation)+"Request")}(e)},extractError:function(e){var t;o.extractError(e);try{t=(new n.XML.Parser).parse(e.httpResponse.body.toString())}catch(r){t={Code:e.httpResponse.statusCode,Message:e.httpResponse.statusMessage}}t.Errors&&(t=t.Errors),t.Error&&(t=t.Error),t.Code?e.error=i.error(new Error,{code:t.Code,message:t.Message}):e.error=i.error(new Error,{code:e.httpResponse.statusCode,message:null})},extractData:function(e){var t;o.extractData(e);var r=e.request,a=e.httpResponse.body,s=r.service.api.operations[r.operation],u=s.output,c=(s.hasEventOutput,u.payload);if(c){var l=u.members[c];l.isEventStream?(t=new n.XML.Parser,e.data[c]=i.createEventStream(2===n.HttpClient.streamsApiVersion?e.httpResponse.stream:e.httpResponse.body,t,l)):"structure"===l.type?(t=new n.XML.Parser,e.data[c]=t.parse(a.toString(),l)):"binary"===l.type||l.isStreaming?e.data[c]=a:e.data[c]=l.toType(a)}else if(a.length>0){var d=(t=new n.XML.Parser).parse(a.toString(),u);i.update(e.data,d)}}}},30864:(e,t,r)=>{var n=r(62662);function i(){}function o(e){return e.isQueryName||"ec2"!==e.api.protocol?e.name:e.name[0].toUpperCase()+e.name.substr(1)}function a(e,t,r,i){n.each(r.members,(function(r,n){var a=t[r];if(null!=a){var u=o(n);s(u=e?e+"."+u:u,a,n,i)}}))}function s(e,t,r,i){null!=t&&("structure"===r.type?a(e,t,r,i):"list"===r.type?function(e,t,r,i){var a=r.member||{};0!==t.length?n.arrayEach(t,(function(t,n){var u="."+(n+1);if("ec2"===r.api.protocol)u+="";else if(r.flattened){if(a.name){var c=e.split(".");c.pop(),c.push(o(a)),e=c.join(".")}}else u="."+(a.name?a.name:"member")+u;s(e+u,t,a,i)})):i.call(this,e,null)}(e,t,r,i):"map"===r.type?function(e,t,r,i){var o=1;n.each(t,(function(t,n){var a=(r.flattened?".":".entry.")+o+++".",u=a+(r.key.name||"key"),c=a+(r.value.name||"value");s(e+u,t,r.key,i),s(e+c,n,r.value,i)}))}(e,t,r,i):i(e,r.toWireFormat(t).toString()))}i.prototype.serialize=function(e,t,r){a("",e,t,r)},e.exports=i},31414:e=>{e.exports={now:function(){return"undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():Date.now()}}},44040:e=>{e.exports={isFipsRegion:function(e){return"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips"))},isGlobalRegion:function(e){return"string"==typeof e&&["aws-global","aws-us-gov-global"].includes(e)},getRealRegion:function(e){return["fips-aws-global","aws-fips","aws-global"].includes(e)?"us-east-1":["fips-aws-us-gov-global","aws-us-gov-global"].includes(e)?"us-gov-west-1":e.replace(/fips-(dkr-|prod-)?|-fips/,"")}}},41404:(e,t,r)=>{var n=r(62662),i=r(80738);function o(e,t){n.each(t,(function(t,r){"globalEndpoint"!==t&&(void 0!==e.config[t]&&null!==e.config[t]||(e.config[t]=r))}))}e.exports={configureEndpoint:function(e){for(var t=function(e){var t=e.config.region,r=function(e){if(!e)return null;var t=e.split("-");return t.length<3?null:t.slice(0,t.length-2).join("-")+"-*"}(t),n=e.api.endpointPrefix;return[[t,n],[r,n],[t,"*"],[r,"*"],["*",n],[t,"internal-*"],["*","*"]].map((function(e){return e[0]&&e[1]?e.join("/"):null}))}(e),r=e.config.useFipsEndpoint,n=e.config.useDualstackEndpoint,a=0;a{var n=r(34155),i=r(79614),o=r(15091),a=i.util.inherit,s=i.util.domain,u=r(44509),c={success:1,error:1,complete:1},l=new o;l.setupStates=function(){var e=function(e,t){var r=this;r._haltHandlersOnError=!1,r.emit(r._asm.currentState,(function(e){if(e)if(n=r,Object.prototype.hasOwnProperty.call(c,n._asm.currentState)){if(!(s&&r.domain instanceof s.Domain))throw e;e.domainEmitter=r,e.domain=r.domain,e.domainThrown=!1,r.domain.emit("error",e)}else r.response.error=e,t(e);else t(r.response.error);var n}))};this.addState("validate","build","error",e),this.addState("build","afterBuild","restart",e),this.addState("afterBuild","sign","restart",e),this.addState("sign","send","retry",e),this.addState("retry","afterRetry","afterRetry",e),this.addState("afterRetry","sign","error",e),this.addState("send","validateResponse","retry",e),this.addState("validateResponse","extractData","extractError",e),this.addState("extractError","extractData","retry",e),this.addState("extractData","success","retry",e),this.addState("restart","build","error",e),this.addState("success","complete","complete",e),this.addState("error","complete","complete",e),this.addState("complete",null,null,e)},l.setupStates(),i.Request=a({constructor:function(e,t,r){var n=e.endpoint,a=e.config.region,u=e.config.customUserAgent;e.signingRegion?a=e.signingRegion:e.isGlobalEndpoint&&(a="us-east-1"),this.domain=s&&s.active,this.service=e,this.operation=t,this.params=r||{},this.httpRequest=new i.HttpRequest(n,a),this.httpRequest.appendToUserAgent(u),this.startTime=e.getSkewCorrectedDate(),this.response=new i.Response(this),this._asm=new o(l.states,"validate"),this._haltHandlersOnError=!1,i.SequentialExecutor.call(this),this.emit=this.emitEvent},send:function(e){return e&&(this.httpRequest.appendToUserAgent("callback"),this.on("complete",(function(t){e.call(t,t.error,t.data)}))),this.runTo(),this.response},build:function(e){return this.runTo("send",e)},runTo:function(e,t){return this._asm.runTo(e,t,this),this},abort:function(){return this.removeAllListeners("validateResponse"),this.removeAllListeners("extractError"),this.on("validateResponse",(function(e){e.error=i.util.error(new Error("Request aborted by user"),{code:"RequestAbortedError",retryable:!1})})),this.httpRequest.stream&&!this.httpRequest.stream.didCallback&&(this.httpRequest.stream.abort(),this.httpRequest._abortCallback?this.httpRequest._abortCallback():this.removeAllListeners("send")),this},eachPage:function(e){e=i.util.fn.makeAsync(e,3),this.on("complete",(function t(r){e.call(r,r.error,r.data,(function(n){!1!==n&&(r.hasNextPage()?r.nextPage().on("complete",t).send():e.call(r,null,null,i.util.fn.noop))}))})).send()},eachItem:function(e){var t=this;this.eachPage((function(r,n){if(r)return e(r,null);if(null===n)return e(null,null);var o=t.service.paginationConfig(t.operation).resultKey;Array.isArray(o)&&(o=o[0]);var a=u.search(n,o),s=!0;return i.util.arrayEach(a,(function(t){if(!1===(s=e(null,t)))return i.util.abort})),s}))},isPageable:function(){return!!this.service.paginationConfig(this.operation)},createReadStream:function(){var e=i.util.stream,t=this,r=null;return 2===i.HttpClient.streamsApiVersion?(r=new e.PassThrough,n.nextTick((function(){t.send()}))):((r=new e.Stream).readable=!0,r.sent=!1,r.on("newListener",(function(e){r.sent||"data"!==e||(r.sent=!0,n.nextTick((function(){t.send()})))}))),this.on("error",(function(e){r.emit("error",e)})),this.on("httpHeaders",(function(n,o,a){if(n<300){t.removeListener("httpData",i.EventListeners.Core.HTTP_DATA),t.removeListener("httpError",i.EventListeners.Core.HTTP_ERROR),t.on("httpError",(function(e){a.error=e,a.error.retryable=!1}));var s,u=!1;if("HEAD"!==t.httpRequest.method&&(s=parseInt(o["content-length"],10)),void 0!==s&&!isNaN(s)&&s>=0){u=!0;var c=0}var l=function(){u&&c!==s?r.emit("error",i.util.error(new Error("Stream content length mismatch. Received "+c+" of "+s+" bytes."),{code:"StreamContentLengthMismatch"})):2===i.HttpClient.streamsApiVersion?r.end():r.emit("end")},d=a.httpResponse.createUnbufferedStream();if(2===i.HttpClient.streamsApiVersion)if(u){var f=new e.PassThrough;f._write=function(t){return t&&t.length&&(c+=t.length),e.PassThrough.prototype._write.apply(this,arguments)},f.on("end",l),r.on("error",(function(e){u=!1,d.unpipe(f),f.emit("end"),f.end()})),d.pipe(f).pipe(r,{end:!1})}else d.pipe(r);else u&&d.on("data",(function(e){e&&e.length&&(c+=e.length)})),d.on("data",(function(e){r.emit("data",e)})),d.on("end",l);d.on("error",(function(e){u=!1,r.emit("error",e)}))}})),r},emitEvent:function(e,t,r){"function"==typeof t&&(r=t,t=null),r||(r=function(){}),t||(t=this.eventParameters(e,this.response)),i.SequentialExecutor.prototype.emit.call(this,e,t,(function(e){e&&(this.response.error=e),r.call(this,e)}))},eventParameters:function(e){switch(e){case"restart":case"validate":case"sign":case"build":case"afterValidate":case"afterBuild":return[this];case"error":return[this.response.error,this.response];default:return[this.response]}},presign:function(e,t){return t||"function"!=typeof e||(t=e,e=null),(new i.Signers.Presign).sign(this.toGet(),e,t)},isPresigned:function(){return Object.prototype.hasOwnProperty.call(this.httpRequest.headers,"presigned-expires")},toUnauthenticated:function(){return this._unAuthenticated=!0,this.removeListener("validate",i.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",i.EventListeners.Core.SIGN),this},toGet:function(){return"query"!==this.service.api.protocol&&"ec2"!==this.service.api.protocol||(this.removeListener("build",this.buildAsGet),this.addListener("build",this.buildAsGet)),this},buildAsGet:function(e){e.httpRequest.method="GET",e.httpRequest.path=e.service.endpoint.path+"?"+e.httpRequest.body,e.httpRequest.body="",delete e.httpRequest.headers["Content-Length"],delete e.httpRequest.headers["Content-Type"]},haltHandlersOnError:function(){this._haltHandlersOnError=!0}}),i.Request.addPromisesToClass=function(e){this.prototype.promise=function(){var t=this;return this.httpRequest.appendToUserAgent("promise"),new e((function(e,r){t.on("complete",(function(t){t.error?r(t.error):e(Object.defineProperty(t.data||{},"$response",{value:t}))})),t.runTo()}))}},i.Request.deletePromisesFromClass=function(){delete this.prototype.promise},i.util.addPromises(i.Request),i.util.mixin(i.Request,i.SequentialExecutor)},82413:(e,t,r)=>{var n=r(79614),i=n.util.inherit,o=r(44509);function a(e){var t=e.request._waiter,r=t.config.acceptors,n=!1,i="retry";r.forEach((function(r){if(!n){var o=t.matchers[r.matcher];o&&o(e,r.expected,r.argument)&&(n=!0,i=r.state)}})),!n&&e.error&&(i="failure"),"success"===i?t.setSuccess(e):t.setError(e,"retry"===i)}n.ResourceWaiter=i({constructor:function(e,t){this.service=e,this.state=t,this.loadWaiterConfig(this.state)},service:null,state:null,config:null,matchers:{path:function(e,t,r){try{var n=o.search(e.data,r)}catch(e){return!1}return o.strictDeepEqual(n,t)},pathAll:function(e,t,r){try{var n=o.search(e.data,r)}catch(e){return!1}Array.isArray(n)||(n=[n]);var i=n.length;if(!i)return!1;for(var a=0;a{var n=r(79614),i=n.util.inherit,o=r(44509);n.Response=i({constructor:function(e){this.request=e,this.data=null,this.error=null,this.retryCount=0,this.redirectCount=0,this.httpResponse=new n.HttpResponse,e&&(this.maxRetries=e.service.numRetries(),this.maxRedirects=e.service.config.maxRedirects)},nextPage:function(e){var t,r=this.request.service,i=this.request.operation;try{t=r.paginationConfig(i,!0)}catch(e){this.error=e}if(!this.hasNextPage()){if(e)e(this.error,null);else if(this.error)throw this.error;return null}var o=n.util.copy(this.request.params);if(this.nextPageTokens){var a=t.inputToken;"string"==typeof a&&(a=[a]);for(var s=0;s{var n=r(79614);n.SequentialExecutor=n.util.inherit({constructor:function(){this._events={}},listeners:function(e){return this._events[e]?this._events[e].slice(0):[]},on:function(e,t,r){return this._events[e]?r?this._events[e].unshift(t):this._events[e].push(t):this._events[e]=[t],this},onAsync:function(e,t,r){return t._isAsync=!0,this.on(e,t,r)},removeListener:function(e,t){var r=this._events[e];if(r){for(var n=r.length,i=-1,o=0;o-1&&r.splice(i,1)}return this},removeAllListeners:function(e){return e?delete this._events[e]:this._events={},this},emit:function(e,t,r){r||(r=function(){});var n=this.listeners(e),i=n.length;return this.callListeners(n,t,r),i>0},callListeners:function(e,t,r,i){var o=this,a=i||null;function s(i){if(i&&(a=n.util.error(a||new Error,i),o._haltHandlersOnError))return r.call(o,a);o.callListeners(e,t,r,a)}for(;e.length>0;){var u=e.shift();if(u._isAsync)return void u.apply(o,t.concat([s]));try{u.apply(o,t)}catch(e){a=n.util.error(a||new Error,e)}if(a&&o._haltHandlersOnError)return void r.call(o,a)}r.call(o,a)},addListeners:function(e){var t=this;return e._events&&(e=e._events),n.util.each(e,(function(e,r){"function"==typeof r&&(r=[r]),n.util.arrayEach(r,(function(r){t.on(e,r)}))})),t},addNamedListener:function(e,t,r,n){return this[e]=r,this.addListener(t,r,n),this},addNamedAsyncListener:function(e,t,r,n){return r._isAsync=!0,this.addNamedListener(e,t,r,n)},addNamedListeners:function(e){var t=this;return e((function(){t.addNamedListener.apply(t,arguments)}),(function(){t.addNamedAsyncListener.apply(t,arguments)})),this}}),n.SequentialExecutor.prototype.addListener=n.SequentialExecutor.prototype.on,e.exports=n.SequentialExecutor},20173:(e,t,r)=>{var n=r(34155),i=r(79614),o=r(85863),a=r(41404),s=i.util.inherit,u=0,c=r(44040);i.Service=s({constructor:function(e){if(!this.loadServiceClass)throw i.util.error(new Error,"Service must be constructed with `new' operator");if(e){if(e.region){var t=e.region;c.isFipsRegion(t)&&(e.region=c.getRealRegion(t),e.useFipsEndpoint=!0),c.isGlobalRegion(t)&&(e.region=c.getRealRegion(t))}"boolean"==typeof e.useDualstack&&"boolean"!=typeof e.useDualstackEndpoint&&(e.useDualstackEndpoint=e.useDualstack)}var r=this.loadServiceClass(e||{});if(r){var n=i.util.copy(e),o=new r(e);return Object.defineProperty(o,"_originalConfig",{get:function(){return n},enumerable:!1,configurable:!0}),o._clientId=++u,o}this.initialize(e)},initialize:function(e){var t=i.config[this.serviceIdentifier];if(this.config=new i.Config(i.config),t&&this.config.update(t,!0),e&&this.config.update(e,!0),this.validateService(),this.config.endpoint||a.configureEndpoint(this),this.config.endpoint=this.endpointFromTemplate(this.config.endpoint),this.setEndpoint(this.config.endpoint),i.SequentialExecutor.call(this),i.Service.addDefaultMonitoringListeners(this),(this.config.clientSideMonitoring||i.Service._clientSideMonitoring)&&this.publisher){var r=this.publisher;this.addNamedListener("PUBLISH_API_CALL","apiCall",(function(e){n.nextTick((function(){r.eventHandler(e)}))})),this.addNamedListener("PUBLISH_API_ATTEMPT","apiCallAttempt",(function(e){n.nextTick((function(){r.eventHandler(e)}))}))}},validateService:function(){},loadServiceClass:function(e){var t=e;if(i.util.isEmpty(this.api)){if(t.apiConfig)return i.Service.defineServiceApi(this.constructor,t.apiConfig);if(this.constructor.services){(t=new i.Config(i.config)).update(e,!0);var r=t.apiVersions[this.constructor.serviceIdentifier];return r=r||t.apiVersion,this.getLatestServiceClass(r)}return null}return null},getLatestServiceClass:function(e){return e=this.getLatestServiceVersion(e),null===this.constructor.services[e]&&i.Service.defineServiceApi(this.constructor,e),this.constructor.services[e]},getLatestServiceVersion:function(e){if(!this.constructor.services||0===this.constructor.services.length)throw new Error("No services defined on "+this.constructor.serviceIdentifier);if(e?i.util.isType(e,Date)&&(e=i.util.date.iso8601(e).split("T")[0]):e="latest",Object.hasOwnProperty(this.constructor.services,e))return e;for(var t=Object.keys(this.constructor.services).sort(),r=null,n=t.length-1;n>=0;n--)if("*"!==t[n][t[n].length-1]&&(r=t[n]),t[n].substr(0,10)<=e)return r;throw new Error("Could not find "+this.constructor.serviceIdentifier+" API to satisfy version constraint `"+e+"'")},api:{},defaultRetryCount:3,customizeRequests:function(e){if(e){if("function"!=typeof e)throw new Error("Invalid callback type '"+typeof e+"' provided in customizeRequests");this.customRequestHandler=e}else this.customRequestHandler=null},makeRequest:function(e,t,r){if("function"==typeof t&&(r=t,t=null),t=t||{},this.config.params){var n=this.api.operations[e];n&&(t=i.util.copy(t),i.util.each(this.config.params,(function(e,r){n.input.members[e]&&(void 0!==t[e]&&null!==t[e]||(t[e]=r))})))}var o=new i.Request(this,e,t);return this.addAllRequestListeners(o),this.attachMonitoringEmitter(o),r&&o.send(r),o},makeUnauthenticatedRequest:function(e,t,r){"function"==typeof t&&(r=t,t={});var n=this.makeRequest(e,t).toUnauthenticated();return r?n.send(r):n},waitFor:function(e,t,r){return new i.ResourceWaiter(this,e).wait(t,r)},addAllRequestListeners:function(e){for(var t=[i.events,i.EventListeners.Core,this.serviceInterface(),i.EventListeners.CorePost],r=0;r299?(i.code&&(r.FinalAwsException=i.code),i.message&&(r.FinalAwsExceptionMessage=i.message)):((i.code||i.name)&&(r.FinalSdkException=i.code||i.name),i.message&&(r.FinalSdkExceptionMessage=i.message))}return r},apiAttemptEvent:function(e){var t=e.service.api.operations[e.operation],r={Type:"ApiCallAttempt",Api:t?t.name:e.operation,Version:1,Service:e.service.api.serviceId||e.service.api.endpointPrefix,Fqdn:e.httpRequest.endpoint.hostname,UserAgent:e.httpRequest.getUserAgent()},n=e.response;return n.httpResponse.statusCode&&(r.HttpStatusCode=n.httpResponse.statusCode),!e._unAuthenticated&&e.service.config.credentials&&e.service.config.credentials.accessKeyId&&(r.AccessKey=e.service.config.credentials.accessKeyId),n.httpResponse.headers?(e.httpRequest.headers["x-amz-security-token"]&&(r.SessionToken=e.httpRequest.headers["x-amz-security-token"]),n.httpResponse.headers["x-amzn-requestid"]&&(r.XAmznRequestId=n.httpResponse.headers["x-amzn-requestid"]),n.httpResponse.headers["x-amz-request-id"]&&(r.XAmzRequestId=n.httpResponse.headers["x-amz-request-id"]),n.httpResponse.headers["x-amz-id-2"]&&(r.XAmzId2=n.httpResponse.headers["x-amz-id-2"]),r):r},attemptFailEvent:function(e){var t=this.apiAttemptEvent(e),r=e.response,n=r.error;return r.httpResponse.statusCode>299?(n.code&&(t.AwsException=n.code),n.message&&(t.AwsExceptionMessage=n.message)):((n.code||n.name)&&(t.SdkException=n.code||n.name),n.message&&(t.SdkExceptionMessage=n.message)),t},attachMonitoringEmitter:function(e){var t,r,n,o,a,s,u=0,c=this;e.on("validate",(function(){o=i.util.realClock.now(),s=Date.now()}),!0),e.on("sign",(function(){r=i.util.realClock.now(),t=Date.now(),a=e.httpRequest.region,u++}),!0),e.on("validateResponse",(function(){n=Math.round(i.util.realClock.now()-r)})),e.addNamedListener("API_CALL_ATTEMPT","success",(function(){var r=c.apiAttemptEvent(e);r.Timestamp=t,r.AttemptLatency=n>=0?n:0,r.Region=a,c.emit("apiCallAttempt",[r])})),e.addNamedListener("API_CALL_ATTEMPT_RETRY","retry",(function(){var o=c.attemptFailEvent(e);o.Timestamp=t,n=n||Math.round(i.util.realClock.now()-r),o.AttemptLatency=n>=0?n:0,o.Region=a,c.emit("apiCallAttempt",[o])})),e.addNamedListener("API_CALL","complete",(function(){var t=c.apiCallEvent(e);if(t.AttemptCount=u,!(t.AttemptCount<=0)){t.Timestamp=s;var r=Math.round(i.util.realClock.now()-o);t.Latency=r>=0?r:0;var n=e.response;n.error&&n.error.retryable&&"number"==typeof n.retryCount&&"number"==typeof n.maxRetries&&n.retryCount>=n.maxRetries&&(t.MaxRetriesExceeded=1),c.emit("apiCall",[t])}}))},setupRequestListeners:function(e){},getSigningName:function(){return this.api.signingName||this.api.endpointPrefix},getSignerClass:function(e){var t,r=null,n="";return e&&(n=(r=(e.service.api.operations||{})[e.operation]||null)?r.authtype:""),t=this.config.signatureVersion?this.config.signatureVersion:"v4"===n||"v4-unsigned-body"===n?"v4":"bearer"===n?"bearer":this.api.signatureVersion,i.Signers.RequestSigner.getVersion(t)},serviceInterface:function(){switch(this.api.protocol){case"ec2":case"query":return i.EventListeners.Query;case"json":return i.EventListeners.Json;case"rest-json":return i.EventListeners.RestJson;case"rest-xml":return i.EventListeners.RestXml}if(this.api.protocol)throw new Error("Invalid service `protocol' "+this.api.protocol+" in API config")},successfulResponse:function(e){return e.httpResponse.statusCode<300},numRetries:function(){return void 0!==this.config.maxRetries?this.config.maxRetries:this.defaultRetryCount},retryDelays:function(e,t){return i.util.calculateRetryDelay(e,this.config.retryDelayOptions,t)},retryableError:function(e){return!!this.timeoutError(e)||!!this.networkingError(e)||!!this.expiredCredentialsError(e)||!!this.throttledError(e)||e.statusCode>=500},networkingError:function(e){return"NetworkingError"===e.code},timeoutError:function(e){return"TimeoutError"===e.code},expiredCredentialsError:function(e){return"ExpiredTokenException"===e.code},clockSkewError:function(e){switch(e.code){case"RequestTimeTooSkewed":case"RequestExpired":case"InvalidSignatureException":case"SignatureDoesNotMatch":case"AuthFailure":case"RequestInTheFuture":return!0;default:return!1}},getSkewCorrectedDate:function(){return new Date(Date.now()+this.config.systemClockOffset)},applyClockOffset:function(e){e&&(this.config.systemClockOffset=e-Date.now())},isClockSkewed:function(e){if(e)return Math.abs(this.getSkewCorrectedDate().getTime()-e)>=3e5},throttledError:function(e){if(429===e.statusCode)return!0;switch(e.code){case"ProvisionedThroughputExceededException":case"Throttling":case"ThrottlingException":case"RequestLimitExceeded":case"RequestThrottled":case"RequestThrottledException":case"TooManyRequestsException":case"TransactionInProgressException":case"EC2ThrottledException":return!0;default:return!1}},endpointFromTemplate:function(e){if("string"!=typeof e)return e;var t=e;return(t=(t=t.replace(/\{service\}/g,this.api.endpointPrefix)).replace(/\{region\}/g,this.config.region)).replace(/\{scheme\}/g,this.config.sslEnabled?"https":"http")},setEndpoint:function(e){this.endpoint=new i.Endpoint(e,this.config)},paginationConfig:function(e,t){var r=this.api.operations[e].paginator;if(!r){if(t){var n=new Error;throw i.util.error(n,"No pagination configuration for "+e)}return null}return r}}),i.util.update(i.Service,{defineMethods:function(e){i.util.each(e.prototype.api.operations,(function(t){e.prototype[t]||("none"===e.prototype.api.operations[t].authtype?e.prototype[t]=function(e,r){return this.makeUnauthenticatedRequest(t,e,r)}:e.prototype[t]=function(e,r){return this.makeRequest(t,e,r)})}))},defineService:function(e,t,r){i.Service._serviceMap[e]=!0,Array.isArray(t)||(r=t,t=[]);var n=s(i.Service,r||{});if("string"==typeof e){i.Service.addVersions(n,t);var o=n.serviceIdentifier||e;n.serviceIdentifier=o}else n.prototype.api=e,i.Service.defineMethods(n);if(i.SequentialExecutor.call(this.prototype),!this.prototype.publisher&&i.util.clientSideMonitoring){var a=i.util.clientSideMonitoring.Publisher,u=(0,i.util.clientSideMonitoring.configProvider)();this.prototype.publisher=new a(u),u.enabled&&(i.Service._clientSideMonitoring=!0)}return i.SequentialExecutor.call(n.prototype),i.Service.addDefaultMonitoringListeners(n.prototype),n},addVersions:function(e,t){Array.isArray(t)||(t=[t]),e.services=e.services||{};for(var r=0;r{var n=r(79614),i=r(65456);n.util.update(n.STS.prototype,{credentialsFrom:function(e,t){return e?(t||(t=new n.TemporaryCredentials),t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretAccessKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration,t):null},assumeRoleWithWebIdentity:function(e,t){return this.makeUnauthenticatedRequest("assumeRoleWithWebIdentity",e,t)},assumeRoleWithSAML:function(e,t){return this.makeUnauthenticatedRequest("assumeRoleWithSAML",e,t)},setupRequestListeners:function(e){e.addListener("validate",this.optInRegionalEndpoint,!0)},optInRegionalEndpoint:function(e){var t=e.service,r=t.config;if(r.stsRegionalEndpoints=i(t._originalConfig,{env:"AWS_STS_REGIONAL_ENDPOINTS",sharedConfig:"sts_regional_endpoints",clientConfig:"stsRegionalEndpoints"}),"regional"===r.stsRegionalEndpoints&&t.isGlobalEndpoint){if(!r.region)throw n.util.error(new Error,{code:"ConfigError",message:"Missing region in config"});var o=r.endpoint.indexOf(".amazonaws.com"),a=r.endpoint.substring(0,o)+"."+r.region+r.endpoint.substring(o);e.httpRequest.updateEndpoint(a),e.httpRequest.region=r.region}}})},64114:(e,t,r)=>{var n=r(79614);n.Signers.Bearer=n.util.inherit(n.Signers.RequestSigner,{constructor:function(e){n.Signers.RequestSigner.call(this,e)},addAuthorization:function(e){this.request.headers.Authorization="Bearer "+e.token}})},79688:(e,t,r)=>{var n=r(79614),i=n.util.inherit,o="presigned-expires";function a(e){var t=e.httpRequest.headers[o],r=e.service.getSignerClass(e);if(delete e.httpRequest.headers["User-Agent"],delete e.httpRequest.headers["X-Amz-User-Agent"],r===n.Signers.V4){if(t>604800)throw n.util.error(new Error,{code:"InvalidExpiryTime",message:"Presigning does not support expiry time greater than a week with SigV4 signing.",retryable:!1});e.httpRequest.headers[o]=t}else{if(r!==n.Signers.S3)throw n.util.error(new Error,{message:"Presigning only supports S3 or SigV4 signing.",code:"UnsupportedSigner",retryable:!1});var i=e.service?e.service.getSkewCorrectedDate():n.util.date.getDate();e.httpRequest.headers[o]=parseInt(n.util.date.unixTimestamp(i)+t,10).toString()}}function s(e){var t=e.httpRequest.endpoint,r=n.util.urlParse(e.httpRequest.path),i={};r.search&&(i=n.util.queryStringParse(r.search.substr(1)));var a=e.httpRequest.headers.Authorization.split(" ");if("AWS"===a[0])a=a[1].split(":"),i.Signature=a.pop(),i.AWSAccessKeyId=a.join(":"),n.util.each(e.httpRequest.headers,(function(e,t){e===o&&(e="Expires"),0===e.indexOf("x-amz-meta-")&&(delete i[e],e=e.toLowerCase()),i[e]=t})),delete e.httpRequest.headers[o],delete i.Authorization,delete i.Host;else if("AWS4-HMAC-SHA256"===a[0]){a.shift();var s=a.join(" ").match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];i["X-Amz-Signature"]=s,delete i.Expires}t.pathname=r.pathname,t.search=n.util.queryParamsToString(i)}n.Signers.Presign=i({sign:function(e,t,r){if(e.httpRequest.headers[o]=t||3600,e.on("build",a),e.on("sign",s),e.removeListener("afterBuild",n.EventListeners.Core.SET_CONTENT_LENGTH),e.removeListener("afterBuild",n.EventListeners.Core.COMPUTE_SHA256),e.emit("beforePresign",[e]),!r){if(e.build(),e.response.error)throw e.response.error;return n.util.urlFormat(e.httpRequest.endpoint)}e.build((function(){this.response.error?r(this.response.error):r(null,n.util.urlFormat(e.httpRequest.endpoint))}))}}),e.exports=n.Signers.Presign},92604:(e,t,r)=>{var n=r(79614),i=n.util.inherit;n.Signers.RequestSigner=i({constructor:function(e){this.request=e},setServiceClientId:function(e){this.serviceClientId=e},getServiceClientId:function(){return this.serviceClientId}}),n.Signers.RequestSigner.getVersion=function(e){switch(e){case"v2":return n.Signers.V2;case"v3":return n.Signers.V3;case"s3v4":case"v4":return n.Signers.V4;case"s3":return n.Signers.S3;case"v3https":return n.Signers.V3Https;case"bearer":return n.Signers.Bearer}throw new Error("Unknown signing version "+e)},r(97194),r(56342),r(50416),r(77203),r(51190),r(79688),r(64114)},51190:(e,t,r)=>{var n=r(79614),i=n.util.inherit;n.Signers.S3=i(n.Signers.RequestSigner,{subResources:{acl:1,accelerate:1,analytics:1,cors:1,lifecycle:1,delete:1,inventory:1,location:1,logging:1,metrics:1,notification:1,partNumber:1,policy:1,requestPayment:1,replication:1,restore:1,tagging:1,torrent:1,uploadId:1,uploads:1,versionId:1,versioning:1,versions:1,website:1},responseHeaders:{"response-content-type":1,"response-content-language":1,"response-expires":1,"response-cache-control":1,"response-content-disposition":1,"response-content-encoding":1},addAuthorization:function(e,t){this.request.headers["presigned-expires"]||(this.request.headers["X-Amz-Date"]=n.util.date.rfc822(t)),e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken);var r=this.sign(e.secretAccessKey,this.stringToSign()),i="AWS "+e.accessKeyId+":"+r;this.request.headers.Authorization=i},stringToSign:function(){var e=this.request,t=[];t.push(e.method),t.push(e.headers["Content-MD5"]||""),t.push(e.headers["Content-Type"]||""),t.push(e.headers["presigned-expires"]||"");var r=this.canonicalizedAmzHeaders();return r&&t.push(r),t.push(this.canonicalizedResource()),t.join("\n")},canonicalizedAmzHeaders:function(){var e=[];n.util.each(this.request.headers,(function(t){t.match(/^x-amz-/i)&&e.push(t)})),e.sort((function(e,t){return e.toLowerCase(){var n=r(79614),i=n.util.inherit;n.Signers.V2=i(n.Signers.RequestSigner,{addAuthorization:function(e,t){t||(t=n.util.date.getDate());var r=this.request;r.params.Timestamp=n.util.date.iso8601(t),r.params.SignatureVersion="2",r.params.SignatureMethod="HmacSHA256",r.params.AWSAccessKeyId=e.accessKeyId,e.sessionToken&&(r.params.SecurityToken=e.sessionToken),delete r.params.Signature,r.params.Signature=this.signature(e),r.body=n.util.queryParamsToString(r.params),r.headers["Content-Length"]=r.body.length},signature:function(e){return n.util.crypto.hmac(e.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var e=[];return e.push(this.request.method),e.push(this.request.endpoint.host.toLowerCase()),e.push(this.request.pathname()),e.push(n.util.queryParamsToString(this.request.params)),e.join("\n")}}),e.exports=n.Signers.V2},56342:(e,t,r)=>{var n=r(79614),i=n.util.inherit;n.Signers.V3=i(n.Signers.RequestSigner,{addAuthorization:function(e,t){var r=n.util.date.rfc822(t);this.request.headers["X-Amz-Date"]=r,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken),this.request.headers["X-Amzn-Authorization"]=this.authorization(e,r)},authorization:function(e){return"AWS3 AWSAccessKeyId="+e.accessKeyId+",Algorithm=HmacSHA256,SignedHeaders="+this.signedHeaders()+",Signature="+this.signature(e)},signedHeaders:function(){var e=[];return n.util.arrayEach(this.headersToSign(),(function(t){e.push(t.toLowerCase())})),e.sort().join(";")},canonicalHeaders:function(){var e=this.request.headers,t=[];return n.util.arrayEach(this.headersToSign(),(function(r){t.push(r.toLowerCase().trim()+":"+String(e[r]).trim())})),t.sort().join("\n")+"\n"},headersToSign:function(){var e=[];return n.util.each(this.request.headers,(function(t){("Host"===t||"Content-Encoding"===t||t.match(/^X-Amz/i))&&e.push(t)})),e},signature:function(e){return n.util.crypto.hmac(e.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var e=[];return e.push(this.request.method),e.push("/"),e.push(""),e.push(this.canonicalHeaders()),e.push(this.request.body),n.util.crypto.sha256(e.join("\n"))}}),e.exports=n.Signers.V3},50416:(e,t,r)=>{var n=r(79614),i=n.util.inherit;r(56342),n.Signers.V3Https=i(n.Signers.V3,{authorization:function(e){return"AWS3-HTTPS AWSAccessKeyId="+e.accessKeyId+",Algorithm=HmacSHA256,Signature="+this.signature(e)},stringToSign:function(){return this.request.headers["X-Amz-Date"]}}),e.exports=n.Signers.V3Https},77203:(e,t,r)=>{var n=r(79614),i=r(16914),o=n.util.inherit,a="presigned-expires";n.Signers.V4=o(n.Signers.RequestSigner,{constructor:function(e,t,r){n.Signers.RequestSigner.call(this,e),this.serviceName=t,r=r||{},this.signatureCache="boolean"!=typeof r.signatureCache||r.signatureCache,this.operation=r.operation,this.signatureVersion=r.signatureVersion},algorithm:"AWS4-HMAC-SHA256",addAuthorization:function(e,t){var r=n.util.date.iso8601(t).replace(/[:\-]|\.\d{3}/g,"");this.isPresigned()?this.updateForPresigned(e,r):this.addHeaders(e,r),this.request.headers.Authorization=this.authorization(e,r)},addHeaders:function(e,t){this.request.headers["X-Amz-Date"]=t,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken)},updateForPresigned:function(e,t){var r=this.credentialString(t),i={"X-Amz-Date":t,"X-Amz-Algorithm":this.algorithm,"X-Amz-Credential":e.accessKeyId+"/"+r,"X-Amz-Expires":this.request.headers[a],"X-Amz-SignedHeaders":this.signedHeaders()};e.sessionToken&&(i["X-Amz-Security-Token"]=e.sessionToken),this.request.headers["Content-Type"]&&(i["Content-Type"]=this.request.headers["Content-Type"]),this.request.headers["Content-MD5"]&&(i["Content-MD5"]=this.request.headers["Content-MD5"]),this.request.headers["Cache-Control"]&&(i["Cache-Control"]=this.request.headers["Cache-Control"]),n.util.each.call(this,this.request.headers,(function(e,t){if(e!==a&&this.isSignableHeader(e)){var r=e.toLowerCase();0===r.indexOf("x-amz-meta-")?i[r]=t:0===r.indexOf("x-amz-")&&(i[e]=t)}}));var o=this.request.path.indexOf("?")>=0?"&":"?";this.request.path+=o+n.util.queryParamsToString(i)},authorization:function(e,t){var r=[],n=this.credentialString(t);return r.push(this.algorithm+" Credential="+e.accessKeyId+"/"+n),r.push("SignedHeaders="+this.signedHeaders()),r.push("Signature="+this.signature(e,t)),r.join(", ")},signature:function(e,t){var r=i.getSigningKey(e,t.substr(0,8),this.request.region,this.serviceName,this.signatureCache);return n.util.crypto.hmac(r,this.stringToSign(t),"hex")},stringToSign:function(e){var t=[];return t.push("AWS4-HMAC-SHA256"),t.push(e),t.push(this.credentialString(e)),t.push(this.hexEncodedHash(this.canonicalString())),t.join("\n")},canonicalString:function(){var e=[],t=this.request.pathname();return"s3"!==this.serviceName&&"s3v4"!==this.signatureVersion&&(t=n.util.uriEscapePath(t)),e.push(this.request.method),e.push(t),e.push(this.request.search()),e.push(this.canonicalHeaders()+"\n"),e.push(this.signedHeaders()),e.push(this.hexEncodedBodyHash()),e.join("\n")},canonicalHeaders:function(){var e=[];n.util.each.call(this,this.request.headers,(function(t,r){e.push([t,r])})),e.sort((function(e,t){return e[0].toLowerCase()-1&&!e.body?"UNSIGNED-PAYLOAD":e.headers["X-Amz-Content-Sha256"]?e.headers["X-Amz-Content-Sha256"]:this.hexEncodedHash(this.request.body||"")},unsignableHeaders:["authorization","content-type","content-length","user-agent",a,"expect","x-amzn-trace-id"],isSignableHeader:function(e){return 0===e.toLowerCase().indexOf("x-amz-")||this.unsignableHeaders.indexOf(e)<0},isPresigned:function(){return!!this.request.headers[a]}}),e.exports=n.Signers.V4},16914:(e,t,r)=>{var n=r(79614),i={},o=[],a="aws4_request";e.exports={createScope:function(e,t,r){return[e.substr(0,8),t,r,a].join("/")},getSigningKey:function(e,t,r,s,u){var c=[n.util.crypto.hmac(e.secretAccessKey,e.accessKeyId,"base64"),t,r,s].join("_");if((u=!1!==u)&&c in i)return i[c];var l=n.util.crypto.hmac("AWS4"+e.secretAccessKey,t,"buffer"),d=n.util.crypto.hmac(l,r,"buffer"),f=n.util.crypto.hmac(d,s,"buffer"),h=n.util.crypto.hmac(f,a,"buffer");return u&&(i[c]=h,o.push(c),o.length>50&&delete i[o.shift()]),h},emptyCache:function(){i={},o=[]}}},15091:e=>{function t(e,t){this.currentState=t||null,this.states=e||{}}t.prototype.runTo=function(e,t,r,n){"function"==typeof e&&(n=r,r=t,t=e,e=null);var i=this,o=i.states[i.currentState];o.fn.call(r||i,n,(function(n){if(n){if(!o.fail)return t?t.call(r,n):null;i.currentState=o.fail}else{if(!o.accept)return t?t.call(r):null;i.currentState=o.accept}if(i.currentState===e)return t?t.call(r,n):null;i.runTo(e,t,r,n)}))},t.prototype.addState=function(e,t,r,n){return"function"==typeof t?(n=t,t=null,r=null):"function"==typeof r&&(n=r,r=null),this.currentState||(this.currentState=e),this.states[e]={accept:t,fail:r,fn:n},this},e.exports=t},62662:(e,t,r)=>{var n,i=r(34155),o={environment:"nodejs",engine:function(){if(o.isBrowser()&&"undefined"!=typeof navigator)return navigator.userAgent;var e=i.platform+"/"+i.version;return{LOCAL_CONFIGURATION:void 0,NODE_ENV:"production"}.AWS_EXECUTION_ENV&&(e+=" exec-env/"+{LOCAL_CONFIGURATION:void 0,NODE_ENV:"production"}.AWS_EXECUTION_ENV),e},userAgent:function(){var e=o.environment,t="aws-sdk-"+e+"/"+r(79614).VERSION;return"nodejs"===e&&(t+=" "+o.engine()),t},uriEscape:function(e){var t=encodeURIComponent(e);return(t=t.replace(/[^A-Za-z0-9_.~\-%]+/g,escape)).replace(/[*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))},uriEscapePath:function(e){var t=[];return o.arrayEach(e.split("/"),(function(e){t.push(o.uriEscape(e))})),t.join("/")},urlParse:function(e){return o.url.parse(e)},urlFormat:function(e){return o.url.format(e)},queryStringParse:function(e){return o.querystring.parse(e)},queryParamsToString:function(e){var t=[],r=o.uriEscape,n=Object.keys(e).sort();return o.arrayEach(n,(function(n){var i=e[n],a=r(n),s=a+"=";if(Array.isArray(i)){var u=[];o.arrayEach(i,(function(e){u.push(r(e))})),s=a+"="+u.sort().join("&"+a+"=")}else null!=i&&(s=a+"="+r(i));t.push(s)})),t.join("&")},readFileSync:function(e){return o.isBrowser()?null:r(28022).readFileSync(e,"utf-8")},base64:{encode:function(e){if("number"==typeof e)throw o.error(new Error("Cannot base64 encode number "+e));return null==e?e:o.buffer.toBuffer(e).toString("base64")},decode:function(e){if("number"==typeof e)throw o.error(new Error("Cannot base64 decode number "+e));return null==e?e:o.buffer.toBuffer(e,"base64")}},buffer:{toBuffer:function(e,t){return"function"==typeof o.Buffer.from&&o.Buffer.from!==Uint8Array.from?o.Buffer.from(e,t):new o.Buffer(e,t)},alloc:function(e,t,r){if("number"!=typeof e)throw new Error("size passed to alloc must be a number.");if("function"==typeof o.Buffer.alloc)return o.Buffer.alloc(e,t,r);var n=new o.Buffer(e);return void 0!==t&&"function"==typeof n.fill&&n.fill(t,void 0,void 0,r),n},toStream:function(e){o.Buffer.isBuffer(e)||(e=o.buffer.toBuffer(e));var t=new o.stream.Readable,r=0;return t._read=function(n){if(r>=e.length)return t.push(null);var i=r+n;i>e.length&&(i=e.length),t.push(e.slice(r,i)),r=i},t},concat:function(e){var t,r,n=0,i=0;for(r=0;r>>8^t[255&(r^e.readUInt8(n))];return(-1^r)>>>0},hmac:function(e,t,r,n){return r||(r="binary"),"buffer"===r&&(r=void 0),n||(n="sha256"),"string"==typeof t&&(t=o.buffer.toBuffer(t)),o.crypto.lib.createHmac(n,e).update(t).digest(r)},md5:function(e,t,r){return o.crypto.hash("md5",e,t,r)},sha256:function(e,t,r){return o.crypto.hash("sha256",e,t,r)},hash:function(e,t,r,n){var i=o.crypto.createHash(e);r||(r="binary"),"buffer"===r&&(r=void 0),"string"==typeof t&&(t=o.buffer.toBuffer(t));var a=o.arraySliceFn(t),s=o.Buffer.isBuffer(t);if(o.isBrowser()&&"undefined"!=typeof ArrayBuffer&&t&&t.buffer instanceof ArrayBuffer&&(s=!0),n&&"object"==typeof t&&"function"==typeof t.on&&!s)t.on("data",(function(e){i.update(e)})),t.on("error",(function(e){n(e)})),t.on("end",(function(){n(null,i.digest(r))}));else{if(!n||!a||s||"undefined"==typeof FileReader){o.isBrowser()&&"object"==typeof t&&!s&&(t=new o.Buffer(new Uint8Array(t)));var u=i.update(t).digest(r);return n&&n(null,u),u}var c=0,l=new FileReader;l.onerror=function(){n(new Error("Failed to read data."))},l.onload=function(){var e=new o.Buffer(new Uint8Array(l.result));i.update(e),c+=e.length,l._continueReading()},l._continueReading=function(){if(c>=t.size)n(null,i.digest(r));else{var e=c+524288;e>t.size&&(e=t.size),l.readAsArrayBuffer(a.call(t,c,e))}},l._continueReading()}},toHex:function(e){for(var t=[],r=0;r=3e5,!1),n.config.isClockSkewed},applyClockOffset:function(e){e&&(n.config.systemClockOffset=e-(new Date).getTime())},extractRequestId:function(e){var t=e.httpResponse.headers["x-amz-request-id"]||e.httpResponse.headers["x-amzn-requestid"];!t&&e.data&&e.data.ResponseMetadata&&(t=e.data.ResponseMetadata.RequestId),t&&(e.requestId=t),e.error&&(e.error.requestId=t)},addPromises:function(e,t){var r=!1;void 0===t&&n&&n.config&&(t=n.config.getPromisesDependency()),void 0===t&&"undefined"!=typeof Promise&&(t=Promise),"function"!=typeof t&&(r=!0),Array.isArray(e)||(e=[e]);for(var i=0;i=0)return s++,void setTimeout(c,i+(e.retryAfter||0))}r(e)},c=function(){var t="";i.handleRequest(e,a,(function(e){e.on("data",(function(e){t+=e.toString()})),e.on("end",(function(){var n=e.statusCode;if(n<300)r(null,t);else{var i=1e3*parseInt(e.headers["retry-after"],10)||0,a=o.error(new Error,{statusCode:n,retryable:n>=500||429===n});i&&a.retryable&&(a.retryAfter=i),u(a)}}))}),u)};n.util.defer(c)},uuid:{v4:function(){return r(72489).v4()}},convertPayloadToString:function(e){var t=e.request,r=t.operation,n=t.service.api.operations[r].output||{};n.payload&&e.data[n.payload]&&(e.data[n.payload]=e.data[n.payload].toString())},defer:function(e){"object"==typeof i&&"function"==typeof i.nextTick?i.nextTick(e):"function"==typeof setImmediate?setImmediate(e):setTimeout(e,0)},getRequestPayloadShape:function(e){var t=e.service.api.operations;if(t){var r=(t||{})[e.operation];if(r&&r.input&&r.input.payload)return r.input.members[r.input.payload]}},getProfilesFromSharedConfig:function(e,t){var r={},n={};({LOCAL_CONFIGURATION:void 0,NODE_ENV:"production"})[o.configOptInEnv]&&(n=e.loadFrom({isConfig:!0,filename:{LOCAL_CONFIGURATION:void 0,NODE_ENV:"production"}[o.sharedConfigFileEnv]}));var i={};try{i=e.loadFrom({filename:t||{LOCAL_CONFIGURATION:void 0,NODE_ENV:"production"}[o.configOptInEnv]&&{LOCAL_CONFIGURATION:void 0,NODE_ENV:"production"}[o.sharedCredentialsFileEnv]})}catch(e){if(!{LOCAL_CONFIGURATION:void 0,NODE_ENV:"production"}[o.configOptInEnv])throw e}for(var a=0,s=Object.keys(n);a=6},parse:function(e){var t=e.split(":");return{partition:t[1],service:t[2],region:t[3],accountId:t[4],resource:t.slice(5).join(":")}},build:function(e){if(void 0===e.service||void 0===e.region||void 0===e.accountId||void 0===e.resource)throw o.error(new Error("Input ARN object is invalid"));return"arn:"+(e.partition||"aws")+":"+e.service+":"+e.region+":"+e.accountId+":"+e.resource}},defaultProfile:"default",configOptInEnv:"AWS_SDK_LOAD_CONFIG",sharedCredentialsFileEnv:"AWS_SHARED_CREDENTIALS_FILE",sharedConfigFileEnv:"AWS_CONFIG_FILE",imdsDisabledEnv:"AWS_EC2_METADATA_DISABLED"};e.exports=o},35106:(e,t,r)=>{var n=r(62662),i=r(68136);function o(){}function a(e,t){for(var r=e.getElementsByTagName(t),n=0,i=r.length;n{var n=r(62662),i=r(8700).XmlNode,o=r(25009).XmlText;function a(){}function s(e,t,r){switch(r.type){case"structure":return function(e,t,r){n.arrayEach(r.memberNames,(function(n){var o=r.members[n];if("body"===o.location){var a=t[n],c=o.name;if(null!=a)if(o.isXmlAttribute)e.addAttribute(c,a);else if(o.flattened)s(e,a,o);else{var l=new i(c);e.addChildNode(l),u(l,o),s(l,a,o)}}}))}(e,t,r);case"map":return function(e,t,r){var o=r.key.name||"key",a=r.value.name||"value";n.each(t,(function(t,n){var u=new i(r.flattened?r.name:"entry");e.addChildNode(u);var c=new i(o),l=new i(a);u.addChildNode(c),u.addChildNode(l),s(c,t,r.key),s(l,n,r.value)}))}(e,t,r);case"list":return function(e,t,r){r.flattened?n.arrayEach(t,(function(t){var n=r.member.name||r.name,o=new i(n);e.addChildNode(o),s(o,t,r.member)})):n.arrayEach(t,(function(t){var n=r.member.name||"member",o=new i(n);e.addChildNode(o),s(o,t,r.member)}))}(e,t,r);default:return function(e,t,r){e.addChildNode(new o(r.toWireFormat(t)))}(e,t,r)}}function u(e,t,r){var n,i="xmlns";t.xmlNamespaceUri?(n=t.xmlNamespaceUri,t.xmlNamespacePrefix&&(i+=":"+t.xmlNamespacePrefix)):r&&t.api.xmlNamespaceUri&&(n=t.api.xmlNamespaceUri),n&&e.addAttribute(i,n)}a.prototype.toXML=function(e,t,r,n){var o=new i(r);return u(o,t,!0),s(o,e,t),o.children.length>0||n?o.toString():""},e.exports=a},95373:e=>{e.exports={escapeAttribute:function(e){return e.replace(/&/g,"&").replace(/'/g,"'").replace(//g,">").replace(/"/g,""")}}},55077:e=>{e.exports={escapeElement:function(e){return e.replace(/&/g,"&").replace(//g,">").replace(/\r/g," ").replace(/\n/g," ").replace(/\u0085/g,"…").replace(/\u2028/,"
")}}},8700:(e,t,r)=>{var n=r(95373).escapeAttribute;function i(e,t){void 0===t&&(t=[]),this.name=e,this.children=t,this.attributes={}}i.prototype.addAttribute=function(e,t){return this.attributes[e]=t,this},i.prototype.addChildNode=function(e){return this.children.push(e),this},i.prototype.removeAttribute=function(e){return delete this.attributes[e],this},i.prototype.toString=function(){for(var e=Boolean(this.children.length),t="<"+this.name,r=this.attributes,i=0,o=Object.keys(r);i"+this.children.map((function(e){return e.toString()})).join("")+"":"/>")},e.exports={XmlNode:i}},25009:(e,t,r)=>{var n=r(55077).escapeElement;function i(e){this.value=e}i.prototype.toString=function(){return n(""+this.value)},e.exports={XmlText:i}},58661:function(e,t,r){var n;e=r.nmd(e),function(i){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var a,s=2147483647,u=36,c=26,l=38,d=700,f=/^xn--/,h=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=u-1,v=Math.floor,g=String.fromCharCode;function b(e){throw RangeError(m[e])}function w(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function S(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+w((e=e.replace(p,".")).split("."),t).join(".")}function E(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+g(e)})).join("")}function M(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function C(e,t,r){var n=0;for(e=r?v(e/d):e>>1,e+=v(e/t);e>y*c>>1;n+=u)e=v(e/y);return v(n+(y+1)*e/(e+l))}function k(e){var t,r,n,i,o,a,l,d,f,h,p,m=[],y=e.length,g=0,w=128,S=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&b("not-basic"),m.push(e.charCodeAt(n));for(i=r>0?r+1:0;i=y&&b("invalid-input"),((d=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:u)>=u||d>v((s-g)/a))&&b("overflow"),g+=d*a,!(d<(f=l<=S?1:l>=S+c?c:l-S));l+=u)a>v(s/(h=u-f))&&b("overflow"),a*=h;S=C(g-o,t=m.length+1,0==o),v(g/t)>s-w&&b("overflow"),w+=v(g/t),g%=t,m.splice(g++,0,w)}return _(m)}function x(e){var t,r,n,i,o,a,l,d,f,h,p,m,y,w,S,_=[];for(m=(e=E(e)).length,t=128,r=0,o=72,a=0;a=t&&pv((s-r)/(y=n+1))&&b("overflow"),r+=(l-t)*y,t=l,a=0;as&&b("overflow"),p==t){for(d=r,f=u;!(d<(h=f<=o?1:f>=o+c?c:f-o));f+=u)S=d-h,w=u-h,_.push(g(M(h+S%w,0))),d=v(S/w);_.push(g(M(d,0))),o=C(r,y,n==i),r=0,++n}++r,++t}return _.join("")}a={version:"1.3.2",ucs2:{decode:E,encode:_},decode:k,encode:x,toASCII:function(e){return S(e,(function(e){return h.test(e)?"xn--"+x(e):e}))},toUnicode:function(e){return S(e,(function(e){return f.test(e)?k(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},56647:(e,t,r)=>{var n=r(58661);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){return g(e)&&(e=v(e)),e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var o=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(s),c=["%","/","?",";","#"].concat(u),l=["/","?","#"],d=/^[a-z0-9A-Z_-]{0,63}$/,f=/^([a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},p={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=r(17673);function v(e,t,r){if(e&&b(e)&&e instanceof i)return e;var n=new i;return n.parse(e,t,r),n}function g(e){return"string"==typeof e}function b(e){return"object"==typeof e&&null!==e}function w(e){return null===e}i.prototype.parse=function(e,t,r){if(!g(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e;i=i.trim();var a=o.exec(i);if(a){var s=(a=a[0]).toLowerCase();this.protocol=s,i=i.substr(a.length)}if(r||a||i.match(/^\/\/[^@\/]+@[^@\/]+/)){var v="//"===i.substr(0,2);!v||a&&p[a]||(i=i.substr(2),this.slashes=!0)}if(!p[a]&&(v||a&&!m[a])){for(var b,w,S=-1,E=0;E127?T+="x":T+=x[O];if(!T.match(d)){var R=C.slice(0,E),P=C.slice(E+1),I=x.match(f);I&&(R.push(I[1]),P.unshift(I[2])),P.length&&(i="/"+P.join(".")+i),this.hostname=R.join(".");break}}}if(this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),!M){var N=this.hostname.split("."),L=[];for(E=0;E0)&&r.host.split("@"))&&(r.auth=S.shift(),r.host=r.hostname=S.shift())),r.search=e.search,r.query=e.query,w(r.pathname)&&w(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!d.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var h=d.slice(-1)[0],y=(r.host||e.host)&&("."===h||".."===h)||""===h,v=0,b=d.length;b>=0;b--)"."==(h=d[b])?d.splice(b,1):".."===h?(d.splice(b,1),v++):v&&(d.splice(b,1),v--);if(!c&&!l)for(;v--;v)d.unshift("..");!c||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),y&&"/"!==d.join("/").substr(-1)&&d.push("");var S,E=""===d[0]||d[0]&&"/"===d[0].charAt(0);return f&&(r.hostname=r.host=E?"":d.length?d.shift():"",(S=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=S.shift(),r.host=r.hostname=S.shift())),(c=c||r.host&&d.length)&&!E&&d.unshift(""),d.length?r.pathname=d.join("/"):(r.pathname=null,r.path=null),w(r.pathname)&&w(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},69547:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);t.default=function(e,t){var n=t||0,i=r;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}},72489:(e,t,r)=>{"use strict";Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return n.default}});i(r(29641)),i(r(4442));var n=i(r(71492));i(r(64032));function i(e){return e&&e.__esModule?e:{default:e}}},31488:(e,t)=>{"use strict";function r(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function n(e,t,n,i,o,a){return r((s=r(r(t,e),r(i,a)))<<(u=o)|s>>>32-u,n);var s,u}function i(e,t,r,i,o,a,s){return n(t&r|~t&i,e,t,o,a,s)}function o(e,t,r,i,o,a,s){return n(t&i|r&~i,e,t,o,a,s)}function a(e,t,r,i,o,a,s){return n(t^r^i,e,t,o,a,s)}function s(e,t,r,i,o,a,s){return n(r^(t|~i),e,t,o,a,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Array(t.length);for(var n=0;n>5]>>>t%32&255,n=parseInt(a.charAt(r>>>4&15)+a.charAt(15&r),16),i.push(n);return i}(function(e,t){var n,u,c,l,d;e[t>>5]|=128<>>9<<4)]=t;var f=1732584193,h=-271733879,p=-1732584194,m=271733878;for(n=0;n>2)-1]=void 0,t=0;t>5]|=(255&e[t/8])<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)};var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),n=new Uint8Array(16)},97234:(e,t)=>{"use strict";function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){var t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var o=unescape(encodeURIComponent(e));e=new Array(o.length);for(var a=0;a>>0;v=y,y=m,m=n(p,30)>>>0,p=h,h=b}i[0]=i[0]+h>>>0,i[1]=i[1]+p>>>0,i[2]=i[2]+m>>>0,i[3]=i[3]+y>>>0,i[4]=i[4]+v>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}},29641:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,o=s(r(25532)),a=s(r(69547));function s(e){return e&&e.__esModule?e:{default:e}}var u=0,c=0;t.default=function(e,t,r){var s=t&&r||0,l=t||[],d=(e=e||{}).node||n,f=void 0!==e.clockseq?e.clockseq:i;if(null==d||null==f){var h=e.random||(e.rng||o.default)();null==d&&(d=n=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==f&&(f=i=16383&(h[6]<<8|h[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:c+1,y=p-u+(m-c)/1e4;if(y<0&&void 0===e.clockseq&&(f=f+1&16383),(y<0||p>u)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=p,c=m,i=f;var v=(1e4*(268435455&(p+=122192928e5))+m)%4294967296;l[s++]=v>>>24&255,l[s++]=v>>>16&255,l[s++]=v>>>8&255,l[s++]=255&v;var g=p/4294967296*1e4&268435455;l[s++]=g>>>8&255,l[s++]=255&g,l[s++]=g>>>24&15|16,l[s++]=g>>>16&255,l[s++]=f>>>8|128,l[s++]=255&f;for(var b=0;b<6;++b)l[s+b]=d[b];return t||(0,a.default)(l)}},4442:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(92352)),i=o(r(31488));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,n.default)("v3",48,i.default);t.default=a},92352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){var n=function(e,n,o,a){var s=o&&a||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=new Array(e.length),r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(25532)),i=o(r(69547));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t,r){var o=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n.default)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||(0,i.default)(a)}},64032:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(92352)),i=o(r(97234));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,n.default)("v5",80,i.default);t.default=a},85101:(e,t,r)=>{"use strict";var n=r(29697),i=function(){function e(e){void 0===e&&(e=1e3),this.maxSize=e,this.cache=new n.LRUCache(e)}return Object.defineProperty(e.prototype,"size",{get:function(){return this.cache.length},enumerable:!0,configurable:!0}),e.prototype.put=function(t,r){var n="string"!=typeof t?e.getKeyString(t):t,i=this.populateValue(r);this.cache.put(n,i)},e.prototype.get=function(t){var r="string"!=typeof t?e.getKeyString(t):t,n=Date.now(),i=this.cache.get(r);if(i){for(var o=i.length-1;o>=0;o--)i[o].Expire{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){this.key=e,this.value=t},n=function(){function e(e){if(this.nodeMap={},this.size=0,"number"!=typeof e||e<1)throw new Error("Cache size can only be positive number");this.sizeLimit=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this.size},enumerable:!0,configurable:!0}),e.prototype.prependToList=function(e){this.headerNode?(this.headerNode.prev=e,e.next=this.headerNode):this.tailNode=e,this.headerNode=e,this.size++},e.prototype.removeFromTail=function(){if(this.tailNode){var e=this.tailNode,t=e.prev;return t&&(t.next=void 0),e.prev=void 0,this.tailNode=t,this.size--,e}},e.prototype.detachFromList=function(e){this.headerNode===e&&(this.headerNode=e.next),this.tailNode===e&&(this.tailNode=e.prev),e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.next=void 0,e.prev=void 0,this.size--},e.prototype.get=function(e){if(this.nodeMap[e]){var t=this.nodeMap[e];return this.detachFromList(t),this.prependToList(t),t.value}},e.prototype.remove=function(e){if(this.nodeMap[e]){var t=this.nodeMap[e];this.detachFromList(t),delete this.nodeMap[e]}},e.prototype.put=function(e,t){if(this.nodeMap[e])this.remove(e);else if(this.size===this.sizeLimit){var n=this.removeFromTail().key;delete this.nodeMap[n]}var i=new r(e,t);this.nodeMap[e]=i,this.prependToList(i)},e.prototype.empty=function(){for(var e=Object.keys(this.nodeMap),t=0;t{var n=r(23085).lW,i=t,o=r(8575),a=r(17673),s=r(55835),u=r(77480)(1e3);function c(e,t,r){return s.createHmac("sha256",e).update(t,"utf8").digest(r)}function l(e,t){return s.createHash("sha256").update(e,"utf8").digest(t)}function d(e){return e.replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function f(e){return d(encodeURIComponent(e))}var h={authorization:!0,connection:!0,"x-amzn-trace-id":!0,"user-agent":!0,expect:!0,"presigned-expires":!0,range:!0};function p(e,t){"string"==typeof e&&(e=o.parse(e));var r=e.headers=e.headers||{},n=(!this.service||!this.region)&&this.matchHost(e.hostname||e.host||r.Host||r.host);this.request=e,this.credentials=t||this.defaultCredentials(),this.service=e.service||n[0]||"",this.region=e.region||n[1]||"us-east-1","email"===this.service&&(this.service="ses"),!e.method&&e.body&&(e.method="POST"),r.Host||r.host||(r.Host=e.hostname||e.host||this.createHost(),e.port&&(r.Host+=":"+e.port)),e.hostname||e.host||(e.hostname=r.Host||r.host),this.isCodeCommitGit="codecommit"===this.service&&"GIT"===e.method,this.extraHeadersToIgnore=e.extraHeadersToIgnore||Object.create(null),this.extraHeadersToInclude=e.extraHeadersToInclude||Object.create(null)}p.prototype.matchHost=function(e){var t=((e||"").match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com(\.cn)?$/)||[]).slice(1,3);if("es"!==t[1]&&"aoss"!==t[1]||(t=t.reverse()),"s3"==t[1])t[0]="s3",t[1]="us-east-1";else for(var r=0;r<2;r++)if(/^s3-/.test(t[r])){t[1]=t[r].slice(3),t[0]="s3";break}return t},p.prototype.isSingleRegion=function(){return["s3","sdb"].indexOf(this.service)>=0&&"us-east-1"===this.region||["cloudfront","ls","route53","iam","importexport","sts"].indexOf(this.service)>=0},p.prototype.createHost=function(){var e=this.isSingleRegion()?"":"."+this.region;return("ses"===this.service?"email":this.service)+e+".amazonaws.com"},p.prototype.prepareRequest=function(){this.parsePath();var e,t=this.request,r=t.headers;t.signQuery?(this.parsedPath.query=e=this.parsedPath.query||{},this.credentials.sessionToken&&(e["X-Amz-Security-Token"]=this.credentials.sessionToken),"s3"!==this.service||e["X-Amz-Expires"]||(e["X-Amz-Expires"]=86400),e["X-Amz-Date"]?this.datetime=e["X-Amz-Date"]:e["X-Amz-Date"]=this.getDateTime(),e["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",e["X-Amz-Credential"]=this.credentials.accessKeyId+"/"+this.credentialString(),e["X-Amz-SignedHeaders"]=this.signedHeaders()):(t.doNotModifyHeaders||this.isCodeCommitGit||(!t.body||r["Content-Type"]||r["content-type"]||(r["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8"),!t.body||r["Content-Length"]||r["content-length"]||(r["Content-Length"]=n.byteLength(t.body)),!this.credentials.sessionToken||r["X-Amz-Security-Token"]||r["x-amz-security-token"]||(r["X-Amz-Security-Token"]=this.credentials.sessionToken),"s3"!==this.service||r["X-Amz-Content-Sha256"]||r["x-amz-content-sha256"]||(r["X-Amz-Content-Sha256"]=l(this.request.body||"","hex")),r["X-Amz-Date"]||r["x-amz-date"]?this.datetime=r["X-Amz-Date"]||r["x-amz-date"]:r["X-Amz-Date"]=this.getDateTime()),delete r.Authorization,delete r.authorization)},p.prototype.sign=function(){return this.parsedPath||this.prepareRequest(),this.request.signQuery?this.parsedPath.query["X-Amz-Signature"]=this.signature():this.request.headers.Authorization=this.authHeader(),this.request.path=this.formatPath(),this.request},p.prototype.getDateTime=function(){if(!this.datetime){var e=this.request.headers,t=new Date(e.Date||e.date||new Date);this.datetime=t.toISOString().replace(/[:\-]|\.\d{3}/g,""),this.isCodeCommitGit&&(this.datetime=this.datetime.slice(0,-1))}return this.datetime},p.prototype.getDate=function(){return this.getDateTime().substr(0,8)},p.prototype.authHeader=function(){return["AWS4-HMAC-SHA256 Credential="+this.credentials.accessKeyId+"/"+this.credentialString(),"SignedHeaders="+this.signedHeaders(),"Signature="+this.signature()].join(", ")},p.prototype.signature=function(){var e,t,r,n=this.getDate(),i=[this.credentials.secretAccessKey,n,this.region,this.service].join(),o=u.get(i);return o||(e=c("AWS4"+this.credentials.secretAccessKey,n),t=c(e,this.region),r=c(t,this.service),o=c(r,"aws4_request"),u.set(i,o)),c(o,this.stringToSign(),"hex")},p.prototype.stringToSign=function(){return["AWS4-HMAC-SHA256",this.getDateTime(),this.credentialString(),l(this.canonicalString(),"hex")].join("\n")},p.prototype.canonicalString=function(){this.parsedPath||this.prepareRequest();var e,t=this.parsedPath.path,r=this.parsedPath.query,n=this.request.headers,i="",o="s3"!==this.service,a="s3"===this.service||this.request.doNotEncodePath,s="s3"===this.service,u="s3"===this.service;if(e="s3"===this.service&&this.request.signQuery?"UNSIGNED-PAYLOAD":this.isCodeCommitGit?"":n["X-Amz-Content-Sha256"]||n["x-amz-content-sha256"]||l(this.request.body||"","hex"),r){var c=Object.keys(r).reduce((function(e,t){return t?(e[f(t)]=Array.isArray(r[t])&&u?r[t][0]:r[t],e):e}),{}),d=[];Object.keys(c).sort().forEach((function(e){Array.isArray(c[e])?c[e].map(f).sort().forEach((function(t){d.push(e+"="+t)})):d.push(e+"="+f(c[e]))})),i=d.join("&")}return"/"!==t&&(o&&(t=t.replace(/\/{2,}/g,"/")),"/"!==(t=t.split("/").reduce((function(e,t){return o&&".."===t?e.pop():o&&"."===t||(a&&(t=decodeURIComponent(t.replace(/\+/g," "))),e.push(f(t))),e}),[]).join("/"))[0]&&(t="/"+t),s&&(t=t.replace(/%2F/g,"/"))),[this.request.method||"GET",t,i,this.canonicalHeaders()+"\n",this.signedHeaders(),e].join("\n")},p.prototype.canonicalHeaders=function(){var e=this.request.headers;return Object.keys(e).filter((function(e){return null==h[e.toLowerCase()]})).sort((function(e,t){return e.toLowerCase()=0&&(r=a.parse(e.slice(t+1)),e=e.slice(0,t)),this.parsedPath={path:e,query:r}},p.prototype.formatPath=function(){var e=this.parsedPath.path,t=this.parsedPath.query;return t?(null!=t[""]&&delete t[""],e+"?"+d(a.stringify(t))):e},i.RequestSigner=p,i.sign=function(e,t){return new p(e,t).sign()}},77480:e=>{function t(e){this.capacity=0|e,this.map=Object.create(null),this.list=new r}function r(){this.firstNode=null,this.lastNode=null}function n(e,t){this.key=e,this.val=t,this.prev=null,this.next=null}e.exports=function(e){return new t(e)},t.prototype.get=function(e){var t=this.map[e];if(null!=t)return this.used(t),t.val},t.prototype.set=function(e,t){var r=this.map[e];if(null!=r)r.val=t;else{if(this.capacity||this.prune(),!this.capacity)return!1;r=new n(e,t),this.map[e]=r,this.capacity--}return this.used(r),!0},t.prototype.used=function(e){this.list.moveToFront(e)},t.prototype.prune=function(){var e=this.list.pop();null!=e&&(delete this.map[e.key],this.capacity++)},r.prototype.moveToFront=function(e){this.firstNode!=e&&(this.remove(e),null==this.firstNode?(this.firstNode=e,this.lastNode=e,e.prev=null,e.next=null):(e.prev=null,e.next=this.firstNode,e.next.prev=e,this.firstNode=e))},r.prototype.pop=function(){var e=this.lastNode;return null!=e&&this.remove(e),e},r.prototype.remove=function(e){this.firstNode==e?this.firstNode=e.next:null!=e.prev&&(e.prev.next=e.next),this.lastNode==e?this.lastNode=e.prev:null!=e.next&&(e.next.prev=e.prev)}},9669:(e,t,r)=>{e.exports=r(51609)},55448:(e,t,r)=>{"use strict";var n=r(64867),i=r(36026),o=r(15327),a=r(84109),s=r(67985),u=r(85061);e.exports=function(e){return new Promise((function(t,c){var l=e.data,d=e.headers;n.isFormData(l)&&delete d["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",p=e.auth.password||"";d.Authorization="Basic "+btoa(h+":"+p)}if(f.open(e.method.toUpperCase(),o(e.url,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in f?a(f.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f};i(t,c,n),f=null}},f.onerror=function(){c(u("Network Error",e,null,f)),f=null},f.ontimeout=function(){c(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",f)),f=null},n.isStandardBrowserEnv()){var m=r(4372),y=(e.withCredentials||s(e.url))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}if("setRequestHeader"in f&&n.forEach(d,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete d[t]:f.setRequestHeader(t,e)})),e.withCredentials&&(f.withCredentials=!0),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),c(e),f=null)})),void 0===l&&(l=null),f.send(l)}))}},51609:(e,t,r)=>{"use strict";var n=r(64867),i=r(91849),o=r(30321),a=r(45655);function s(e){var t=new o(e),r=i(o.prototype.request,t);return n.extend(r,o.prototype,t),n.extend(r,t),r}var u=s(a);u.Axios=o,u.create=function(e){return s(n.merge(a,e))},u.Cancel=r(65263),u.CancelToken=r(14972),u.isCancel=r(26502),u.all=function(e){return Promise.all(e)},u.spread=r(8713),e.exports=u,e.exports.default=u},65263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},14972:(e,t,r)=>{"use strict";var n=r(65263);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},26502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},30321:(e,t,r)=>{"use strict";var n=r(45655),i=r(64867),o=r(80782),a=r(13572);function s(e){this.defaults=e,this.interceptors={request:new o,response:new o}}s.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),(e=i.merge(n,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[a,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},i.forEach(["delete","get","head","options"],(function(e){s.prototype[e]=function(t,r){return this.request(i.merge(r||{},{method:e,url:t}))}})),i.forEach(["post","put","patch"],(function(e){s.prototype[e]=function(t,r,n){return this.request(i.merge(n||{},{method:e,url:t,data:r}))}})),e.exports=s},80782:(e,t,r)=>{"use strict";var n=r(64867);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},85061:(e,t,r)=>{"use strict";var n=r(80481);e.exports=function(e,t,r,i,o){var a=new Error(e);return n(a,t,r,i,o)}},13572:(e,t,r)=>{"use strict";var n=r(64867),i=r(18527),o=r(26502),a=r(45655),s=r(91793),u=r(7303);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return c(e),e.baseURL&&!s(e.url)&&(e.url=u(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return c(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(c(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},80481:e=>{"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e}},36026:(e,t,r)=>{"use strict";var n=r(85061);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},18527:(e,t,r)=>{"use strict";var n=r(64867);e.exports=function(e,t,r){return n.forEach(r,(function(r){e=r(e,t)})),e}},45655:(e,t,r)=>{"use strict";var n=r(34155),i=r(64867),o=r(16016),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,c={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==n)&&(u=r(55448)),u),transformRequest:[function(e,t){return o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){c.headers[e]=i.merge(a)})),e.exports=c},91849:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n{"use strict";var n=r(64867);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}return o&&(e+=(-1===e.indexOf("?")?"?":"&")+o),e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,r)=>{"use strict";var n=r(64867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},91793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},67985:(e,t,r)=>{"use strict";var n=r(64867);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},16016:(e,t,r)=>{"use strict";var n=r(64867);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},84109:(e,t,r)=>{"use strict";var n=r(64867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,a={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},64867:(e,t,r)=>{"use strict";var n=r(91849),i=r(48738),o=Object.prototype.toString;function a(e){return"[object Array]"===o.call(e)}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===o.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var r=0,n=e.length;r{e.exports={default:r(48983),__esModule:!0}},52945:(e,t,r)=>{e.exports={default:r(88077),__esModule:!0}},85861:(e,t,r)=>{e.exports={default:r(98339),__esModule:!0}},74664:(e,t,r)=>{e.exports={default:r(45300),__esModule:!0}},85345:(e,t,r)=>{e.exports={default:r(92912),__esModule:!0}},47518:(e,t,r)=>{e.exports={default:r(29874),__esModule:!0}},93516:(e,t,r)=>{e.exports={default:r(99583),__esModule:!0}},64275:(e,t,r)=>{e.exports={default:r(3276),__esModule:!0}},99663:(e,t)=>{"use strict";t.Z=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},88239:(e,t,r)=>{"use strict";var n,i=(n=r(52945))&&n.__esModule?n:{default:n};t.Z=i.default||function(e){for(var t=1;t{"use strict";var n=a(r(85345)),i=a(r(85861)),o=a(r(72444));function a(e){return e&&e.__esModule?e:{default:e}}t.Z=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,o.default)(t)));e.prototype=(0,i.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(n.default?(0,n.default)(e,t):e.__proto__=t)}},42723:(e,t)=>{"use strict";t.Z=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},49135:(e,t,r)=>{"use strict";var n,i=(n=r(72444))&&n.__esModule?n:{default:n};t.Z=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},72444:(e,t,r)=>{"use strict";t.__esModule=!0;var n=a(r(64275)),i=a(r(93516)),o="function"==typeof i.default&&"symbol"==typeof n.default?function(e){return typeof e}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};function a(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof i.default&&"symbol"===o(n.default)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":o(e)}},48983:(e,t,r)=>{r(83036),r(48385),e.exports=r(94731).Array.from},88077:(e,t,r)=>{r(80529),e.exports=r(94731).Object.assign},98339:(e,t,r)=>{r(96924);var n=r(94731).Object;e.exports=function(e,t){return n.create(e,t)}},45300:(e,t,r)=>{r(16928),e.exports=r(94731).Object.entries},92912:(e,t,r)=>{r(70845),e.exports=r(94731).Object.setPrototypeOf},29874:(e,t,r)=>{r(28813),e.exports=r(94731).Object.values},99583:(e,t,r)=>{r(83835),r(6519),r(54427),r(19089),e.exports=r(94731).Symbol},3276:(e,t,r)=>{r(83036),r(46740),e.exports=r(27613).f("iterator")},71449:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},65345:e=>{e.exports=function(){}},26504:(e,t,r)=>{var n=r(89151);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},44389:(e,t,r)=>{var n=r(64874),i=r(68317),o=r(9838);e.exports=function(e){return function(t,r,a){var s,u=n(t),c=i(u.length),l=o(a,c);if(e&&r!=r){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===r)return e||l||0;return!e&&-1}}},93965:(e,t,r)=>{var n=r(84499),i=r(25346)("toStringTag"),o="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,r,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:o?n(t):"Object"==(a=n(t))&&"function"==typeof t.callee?"Arguments":a}},84499:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},94731:e=>{var t=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=t)},46184:(e,t,r)=>{"use strict";var n=r(21738),i=r(38051);e.exports=function(e,t,r){t in e?n.f(e,t,i(0,r)):e[t]=r}},11821:(e,t,r)=>{var n=r(71449);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},11605:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},95810:(e,t,r)=>{e.exports=!r(93777)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},72571:(e,t,r)=>{var n=r(89151),i=r(99362).document,o=n(i)&&n(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},35568:e=>{e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},52052:(e,t,r)=>{var n=r(99656),i=r(32614),o=r(43416);e.exports=function(e){var t=n(e),r=i.f;if(r)for(var a,s=r(e),u=o.f,c=0;s.length>c;)u.call(e,a=s[c++])&&t.push(a);return t}},49901:(e,t,r)=>{var n=r(99362),i=r(94731),o=r(11821),a=r(96519),s=r(3571),u="prototype",c=function(e,t,r){var l,d,f,h=e&c.F,p=e&c.G,m=e&c.S,y=e&c.P,v=e&c.B,g=e&c.W,b=p?i:i[t]||(i[t]={}),w=b[u],S=p?n:m?n[t]:(n[t]||{})[u];for(l in p&&(r=t),r)(d=!h&&S&&void 0!==S[l])&&s(b,l)||(f=d?S[l]:r[l],b[l]=p&&"function"!=typeof S[l]?r[l]:v&&d?o(f,n):g&&S[l]==f?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t[u]=e[u],t}(f):y&&"function"==typeof f?o(Function.call,f):f,y&&((b.virtual||(b.virtual={}))[l]=f,e&c.R&&w&&!w[l]&&a(w,l,f)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},93777:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},99362:e=>{var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},3571:e=>{var t={}.hasOwnProperty;e.exports=function(e,r){return t.call(e,r)}},96519:(e,t,r)=>{var n=r(21738),i=r(38051);e.exports=r(95810)?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},10203:(e,t,r)=>{var n=r(99362).document;e.exports=n&&n.documentElement},93254:(e,t,r)=>{e.exports=!r(95810)&&!r(93777)((function(){return 7!=Object.defineProperty(r(72571)("div"),"a",{get:function(){return 7}}).a}))},72312:(e,t,r)=>{var n=r(84499);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},4034:(e,t,r)=>{var n=r(33135),i=r(25346)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||o[i]===e)}},57539:(e,t,r)=>{var n=r(84499);e.exports=Array.isArray||function(e){return"Array"==n(e)}},89151:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},13749:(e,t,r)=>{var n=r(26504);e.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var o=e.return;throw void 0!==o&&n(o.call(e)),t}}},69163:(e,t,r)=>{"use strict";var n=r(34055),i=r(38051),o=r(10420),a={};r(96519)(a,r(25346)("iterator"),(function(){return this})),e.exports=function(e,t,r){e.prototype=n(a,{next:i(1,r)}),o(e,t+" Iterator")}},54346:(e,t,r)=>{"use strict";var n=r(57346),i=r(49901),o=r(11865),a=r(96519),s=r(33135),u=r(69163),c=r(10420),l=r(91146),d=r(25346)("iterator"),f=!([].keys&&"next"in[].keys()),h="keys",p="values",m=function(){return this};e.exports=function(e,t,r,y,v,g,b){u(r,t,y);var w,S,E,_=function(e){if(!f&&e in x)return x[e];switch(e){case h:case p:return function(){return new r(this,e)}}return function(){return new r(this,e)}},M=t+" Iterator",C=v==p,k=!1,x=e.prototype,T=x[d]||x["@@iterator"]||v&&x[v],O=T||_(v),A=v?C?_("entries"):O:void 0,R="Array"==t&&x.entries||T;if(R&&(E=l(R.call(new e)))!==Object.prototype&&E.next&&(c(E,M,!0),n||"function"==typeof E[d]||a(E,d,m)),C&&T&&T.name!==p&&(k=!0,O=function(){return T.call(this)}),n&&!b||!f&&!k&&x[d]||a(x,d,O),s[t]=O,s[M]=m,v)if(w={values:C?O:_(p),keys:g?O:_(h),entries:A},b)for(S in w)S in x||o(x,S,w[S]);else i(i.P+i.F*(f||k),t,w);return w}},18606:(e,t,r)=>{var n=r(25346)("iterator"),i=!1;try{var o=[7][n]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var o=[7],a=o[n]();a.next=function(){return{done:r=!0}},o[n]=function(){return a},e(o)}catch(e){}return r}},54098:e=>{e.exports=function(e,t){return{value:t,done:!!e}}},33135:e=>{e.exports={}},57346:e=>{e.exports=!0},55965:(e,t,r)=>{var n=r(3535)("meta"),i=r(89151),o=r(3571),a=r(21738).f,s=0,u=Object.isExtensible||function(){return!0},c=!r(93777)((function(){return u(Object.preventExtensions({}))})),l=function(e){a(e,n,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:n,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,n)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[n].i},getWeak:function(e,t){if(!o(e,n)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[n].w},onFreeze:function(e){return c&&d.NEED&&u(e)&&!o(e,n)&&l(e),e}}},50266:(e,t,r)=>{"use strict";var n=r(95810),i=r(99656),o=r(32614),a=r(43416),s=r(19411),u=r(72312),c=Object.assign;e.exports=!c||r(93777)((function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=c({},e)[r]||Object.keys(c({},t)).join("")!=n}))?function(e,t){for(var r=s(e),c=arguments.length,l=1,d=o.f,f=a.f;c>l;)for(var h,p=u(arguments[l++]),m=d?i(p).concat(d(p)):i(p),y=m.length,v=0;y>v;)h=m[v++],n&&!f.call(p,h)||(r[h]=p[h]);return r}:c},34055:(e,t,r)=>{var n=r(26504),i=r(20121),o=r(35568),a=r(46210)("IE_PROTO"),s=function(){},u="prototype",c=function(){var e,t=r(72571)("iframe"),n=o.length;for(t.style.display="none",r(10203).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("