gemi 0.4.103 → 0.4.104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/{chunk-7bf700c2348ef918.js → chunk-1dcc74f569d82336.js} +2 -2
  2. package/dist/{chunk-7bf700c2348ef918.js.map → chunk-1dcc74f569d82336.js.map} +1 -1
  3. package/dist/{chunk-9037f8f927d4caff.js → chunk-213873f56884b132.js} +2 -2
  4. package/dist/{chunk-9037f8f927d4caff.js.map → chunk-213873f56884b132.js.map} +1 -1
  5. package/dist/chunk-3548ae4b3ab96c21.js +4 -0
  6. package/dist/{chunk-4b2790e55056a146.js.map → chunk-3548ae4b3ab96c21.js.map} +2 -2
  7. package/dist/chunk-3ab549e1278958db.js +4 -0
  8. package/dist/{chunk-ce40ec049b04e1d1.js.map → chunk-3ab549e1278958db.js.map} +2 -2
  9. package/dist/chunk-3bcacf5cc1e6cc17.js +3 -0
  10. package/dist/{chunk-79168b7162a45077.js.map → chunk-3bcacf5cc1e6cc17.js.map} +4 -4
  11. package/dist/chunk-402c227b95ad9a77.js +4 -0
  12. package/dist/{chunk-0a78bb530df845c9.js.map → chunk-402c227b95ad9a77.js.map} +5 -5
  13. package/dist/{chunk-0bc8cb0a7994c85d.js → chunk-4880adc4cf447a91.js} +2 -2
  14. package/dist/{chunk-0bc8cb0a7994c85d.js.map → chunk-4880adc4cf447a91.js.map} +1 -1
  15. package/dist/chunk-5376e4fd33eba40f.js +20 -0
  16. package/dist/{chunk-d8d25380b8f0c36e.js.map → chunk-5376e4fd33eba40f.js.map} +26 -18
  17. package/dist/chunk-611e511a95c844a7.js +4 -0
  18. package/dist/{chunk-4bda8e5e6ea82011.js.map → chunk-611e511a95c844a7.js.map} +2 -2
  19. package/dist/{chunk-f53ed6a7a3dad8ec.js → chunk-63ecca203d5f57d9.js} +2 -2
  20. package/dist/{chunk-f53ed6a7a3dad8ec.js.map → chunk-63ecca203d5f57d9.js.map} +1 -1
  21. package/dist/{chunk-643d1c40e2a0f67f.js → chunk-7d69aa73d7fc1f66.js} +2 -2
  22. package/dist/{chunk-643d1c40e2a0f67f.js.map → chunk-7d69aa73d7fc1f66.js.map} +1 -1
  23. package/dist/chunk-7f9e205bb6fc61db.js +4 -0
  24. package/dist/chunk-7f9e205bb6fc61db.js.map +10 -0
  25. package/dist/{chunk-087e1dd06f85d588.js → chunk-9ef7636cea963dff.js} +2 -2
  26. package/dist/{chunk-087e1dd06f85d588.js.map → chunk-9ef7636cea963dff.js.map} +1 -1
  27. package/dist/chunk-a433eaaec29698ba.js +5 -0
  28. package/dist/chunk-a433eaaec29698ba.js.map +72 -0
  29. package/dist/{chunk-e3363367fe4893a2.js → chunk-c7894ed595fd0b08.js} +3 -3
  30. package/dist/{chunk-e3363367fe4893a2.js.map → chunk-c7894ed595fd0b08.js.map} +1 -1
  31. package/dist/chunk-e3ee32f7c3f7bca2.js +4 -0
  32. package/dist/{chunk-28edd25587946042.js.map → chunk-e3ee32f7c3f7bca2.js.map} +4 -4
  33. package/dist/chunk-fbf888655f08faa6.js +8 -0
  34. package/dist/{chunk-c4a5b4177603f458.js.map → chunk-fbf888655f08faa6.js.map} +2 -2
  35. package/dist/client/index.js +1 -1
  36. package/dist/client/index.js.map +1 -1
  37. package/dist/kernel/index.js +1 -1
  38. package/dist/services/index.js +2 -2
  39. package/dist/services/index.js.map +2 -2
  40. package/package.json +1 -1
  41. package/dist/chunk-0a78bb530df845c9.js +0 -3
  42. package/dist/chunk-17c3f49735b660d5.js +0 -3
  43. package/dist/chunk-17c3f49735b660d5.js.map +0 -17
  44. package/dist/chunk-28edd25587946042.js +0 -4
  45. package/dist/chunk-4b2790e55056a146.js +0 -4
  46. package/dist/chunk-4bda8e5e6ea82011.js +0 -4
  47. package/dist/chunk-79168b7162a45077.js +0 -3
  48. package/dist/chunk-c4a5b4177603f458.js +0 -8
  49. package/dist/chunk-ce40ec049b04e1d1.js +0 -4
  50. package/dist/chunk-d8d25380b8f0c36e.js +0 -18
  51. package/dist/chunk-ebc6b30a0275d2f7.js +0 -7
  52. package/dist/chunk-ebc6b30a0275d2f7.js.map +0 -65
@@ -0,0 +1,20 @@
1
+ import{I as Z0,J as M} from"./chunk-c83dcc500d5fefe3.js";import{U as ez} from"./chunk-9e77cade8671df8d.js";import{$a as f0,Ha as c,Ia as IU,Ka as jU,La as T6,Na as O6,Pa as t4,Ua as BQ,Xa as Q0,Ya as P2,Za as VQ,_a as X9,ab as AW,bb as t2,cb as qW} from"./chunk-a433eaaec29698ba.js";import{Ib as IL,Jb as J0,Kb as XU} from"./chunk-402c227b95ad9a77.js";import{Lb as D0} from"./chunk-7f9e205bb6fc61db.js";import{Rb as WU} from"./chunk-3bcacf5cc1e6cc17.js";import{_b as P6} from"./chunk-213873f56884b132.js";var t1=M((bU)=>{var k6=function($){return $&&$.__esModule?$:{default:$}},b6=function(){if($1>U1.length-16)S6.default.randomFillSync(U1),$1=0;return U1.slice($1,$1+=16)};Object.defineProperty(bU,"__esModule",{value:!0});bU.default=b6;var S6=k6(import.meta.require("crypto")),U1=new Uint8Array(256),$1=U1.length});var xU=M((DU)=>{Object.defineProperty(DU,"__esModule",{value:!0});DU.default=void 0;var h6=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;DU.default=h6});var k0=M((vU)=>{var v6=function($){return $&&$.__esModule?$:{default:$}},c6=function($){return typeof $==="string"&&x6.default.test($)};Object.defineProperty(vU,"__esModule",{value:!0});vU.default=void 0;var x6=v6(xU()),y6=c6;vU.default=y6});var b0=M((uU)=>{var _6=function($){return $&&$.__esModule?$:{default:$}},yU=function($,U=0){return k[$[U+0]]+k[$[U+1]]+k[$[U+2]]+k[$[U+3]]+"-"+k[$[U+4]]+k[$[U+5]]+"-"+k[$[U+6]]+k[$[U+7]]+"-"+k[$[U+8]]+k[$[U+9]]+"-"+k[$[U+10]]+k[$[U+11]]+k[$[U+12]]+k[$[U+13]]+k[$[U+14]]+k[$[U+15]]},p6=function($,U=0){const G=yU($,U);if(!u6.default(G))throw TypeError("Stringified UUID is invalid");return G};Object.defineProperty(uU,"__esModule",{value:!0});uU.default=void 0;uU.unsafeStringify=yU;var u6=_6(k0()),k=[];for(let $=0;$<256;++$)k.push(($+256).toString(16).slice(1));var d6=p6;uU.default=d6});var sU=M((dU)=>{var m6=function($){return $&&$.__esModule?$:{default:$}},n6=function($,U,G){let W=U&&G||0;const X=U||new Array(16);$=$||{};let Z=$.node||pU,w=$.clockseq!==void 0?$.clockseq:e1;if(Z==null||w==null){const J=$.random||($.rng||s6.default)();if(Z==null)Z=pU=[J[0]|1,J[1],J[2],J[3],J[4],J[5]];if(w==null)w=e1=(J[6]<<8|J[7])&16383}let L=$.msecs!==void 0?$.msecs:Date.now(),Y=$.nsecs!==void 0?$.nsecs:U$+1;const Q=L-$$+(Y-U$)/1e4;if(Q<0&&$.clockseq===void 0)w=w+1&16383;if((Q<0||L>$$)&&$.nsecs===void 0)Y=0;if(Y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");$$=L,U$=Y,e1=w,L+=12219292800000;const F=((L&268435455)*1e4+Y)%4294967296;X[W++]=F>>>24&255,X[W++]=F>>>16&255,X[W++]=F>>>8&255,X[W++]=F&255;const z=L/4294967296*1e4&268435455;X[W++]=z>>>8&255,X[W++]=z&255,X[W++]=z>>>24&15|16,X[W++]=z>>>16&255,X[W++]=w>>>8|128,X[W++]=w&255;for(let J=0;J<6;++J)X[W+J]=Z[J];return U||l6.unsafeStringify(X)};Object.defineProperty(dU,"__esModule",{value:!0});dU.default=void 0;var s6=m6(t1()),l6=b0(),pU,e1,$$=0,U$=0,i6=n6;dU.default=i6});var G$=M((lU)=>{var o6=function($){return $&&$.__esModule?$:{default:$}},a6=function($){if(!r6.default($))throw TypeError("Invalid UUID");let U;const G=new Uint8Array(16);return G[0]=(U=parseInt($.slice(0,8),16))>>>24,G[1]=U>>>16&255,G[2]=U>>>8&255,G[3]=U&255,G[4]=(U=parseInt($.slice(9,13),16))>>>8,G[5]=U&255,G[6]=(U=parseInt($.slice(14,18),16))>>>8,G[7]=U&255,G[8]=(U=parseInt($.slice(19,23),16))>>>8,G[9]=U&255,G[10]=(U=parseInt($.slice(24,36),16))/1099511627776&255,G[11]=U/4294967296&255,G[12]=U>>>24&255,G[13]=U>>>16&255,G[14]=U>>>8&255,G[15]=U&255,G};Object.defineProperty(lU,"__esModule",{value:!0});lU.default=void 0;var r6=o6(k0()),t6=a6;lU.default=t6});var W$=M((rU)=>{var U5=function($){return $&&$.__esModule?$:{default:$}},G5=function($){$=unescape(encodeURIComponent($));const U=[];for(let G=0;G<$.length;++G)U.push($.charCodeAt(G));return U},W5=function($,U,G){function W(X,Z,w,L){var Y;if(typeof X==="string")X=G5(X);if(typeof Z==="string")Z=$5.default(Z);if(((Y=Z)===null||Y===void 0?void 0:Y.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let Q=new Uint8Array(16+X.length);if(Q.set(Z),Q.set(X,Z.length),Q=G(Q),Q[6]=Q[6]&15|U,Q[8]=Q[8]&63|128,w){L=L||0;for(let F=0;F<16;++F)w[L+F]=Q[F];return w}return e6.unsafeStringify(Q)}try{W.name=$}catch(X){}return W.DNS=nU,W.URL=iU,W};Object.defineProperty(rU,"__esModule",{value:!0});rU.URL=rU.DNS=void 0;rU.default=W5;var e6=b0(),$5=U5(G$()),nU="6ba7b810-9dad-11d1-80b4-00c04fd430c8";rU.DNS=nU;var iU="6ba7b811-9dad-11d1-80b4-00c04fd430c8";rU.URL=iU});var eU=M((aU)=>{var L5=function($){return $&&$.__esModule?$:{default:$}},Y5=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return w5.default.createHash("md5").update($).digest()};Object.defineProperty(aU,"__esModule",{value:!0});aU.default=void 0;var w5=L5(import.meta.require("crypto")),Q5=Y5;aU.default=Q5});var WG=M((UG)=>{var $G=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(UG,"__esModule",{value:!0});UG.default=void 0;var F5=$G(W$()),z5=$G(eU()),J5=F5.default("v3",48,z5.default),I5=J5;UG.default=I5});var wG=M((XG)=>{var K5=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(XG,"__esModule",{value:!0});XG.default=void 0;var R5=K5(import.meta.require("crypto")),M5={randomUUID:R5.default.randomUUID};XG.default=M5});var zG=M((QG)=>{var YG=function($){return $&&$.__esModule?$:{default:$}},V5=function($,U,G){if(LG.default.randomUUID&&!U&&!$)return LG.default.randomUUID();$=$||{};const W=$.random||($.rng||E5.default)();if(W[6]=W[6]&15|64,W[8]=W[8]&63|128,U){G=G||0;for(let X=0;X<16;++X)U[G+X]=W[X];return U}return B5.unsafeStringify(W)};Object.defineProperty(QG,"__esModule",{value:!0});QG.default=void 0;var LG=YG(wG()),E5=YG(t1()),B5=b0(),f5=V5;QG.default=f5});var RG=M((JG)=>{var O5=function($){return $&&$.__esModule?$:{default:$}},H5=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return T5.default.createHash("sha1").update($).digest()};Object.defineProperty(JG,"__esModule",{value:!0});JG.default=void 0;var T5=O5(import.meta.require("crypto")),A5=H5;JG.default=A5});var BG=M((MG)=>{var KG=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(MG,"__esModule",{value:!0});MG.default=void 0;var q5=KG(W$()),C5=KG(RG()),N5=q5.default("v5",80,C5.default),P5=N5;MG.default=P5});var TG=M((VG)=>{Object.defineProperty(VG,"__esModule",{value:!0});VG.default=void 0;var j5="00000000-0000-0000-0000-000000000000";VG.default=j5});var AG=M((OG)=>{var k5=function($){return $&&$.__esModule?$:{default:$}},b5=function($){if(!S5.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)};Object.defineProperty(OG,"__esModule",{value:!0});OG.default=void 0;var S5=k5(k0()),D5=b5;OG.default=D5});var X$=M((d)=>{var r=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(d,"__esModule",{value:!0});Object.defineProperty(d,"NIL",{enumerable:!0,get:function(){return y5.default}});Object.defineProperty(d,"parse",{enumerable:!0,get:function(){return d5.default}});Object.defineProperty(d,"stringify",{enumerable:!0,get:function(){return p5.default}});Object.defineProperty(d,"v1",{enumerable:!0,get:function(){return h5.default}});Object.defineProperty(d,"v3",{enumerable:!0,get:function(){return x5.default}});Object.defineProperty(d,"v4",{enumerable:!0,get:function(){return v5.default}});Object.defineProperty(d,"v5",{enumerable:!0,get:function(){return c5.default}});Object.defineProperty(d,"validate",{enumerable:!0,get:function(){return _5.default}});Object.defineProperty(d,"version",{enumerable:!0,get:function(){return u5.default}});var h5=r(sU()),x5=r(WG()),v5=r(zG()),c5=r(BG()),y5=r(TG()),u5=r(AG()),_5=r(k0()),p5=r(b0()),d5=r(G$())});var n=M((aJ,SG)=>{var{defineProperty:G1,getOwnPropertyDescriptor:a5,getOwnPropertyNames:t5}=Object,e5=Object.prototype.hasOwnProperty,PG=($,U)=>G1($,"name",{value:U,configurable:!0}),$w=($,U)=>{for(var G in U)G1($,G,{get:U[G],enumerable:!0})},Uw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of t5(U))if(!e5.call($,X)&&X!==G)G1($,X,{get:()=>U[X],enumerable:!(W=a5(U,X))||W.enumerable})}return $},Gw=($)=>Uw(G1({},"__esModule",{value:!0}),$),jG={};$w(jG,{getSmithyContext:()=>Ww,normalizeProvider:()=>Xw});SG.exports=Gw(jG);var NG=D0(),Ww=PG(($)=>$[NG.SMITHY_CONTEXT_KEY]||($[NG.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),Xw=PG(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var Z$=M((tJ,xG)=>{var{defineProperty:W1,getOwnPropertyDescriptor:Zw,getOwnPropertyNames:ww}=Object,Lw=Object.prototype.hasOwnProperty,w0=($,U)=>W1($,"name",{value:U,configurable:!0}),Yw=($,U)=>{for(var G in U)W1($,G,{get:U[G],enumerable:!0})},Qw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of ww(U))if(!Lw.call($,X)&&X!==G)W1($,X,{get:()=>U[X],enumerable:!(W=Zw(U,X))||W.enumerable})}return $},Fw=($)=>Qw(W1({},"__esModule",{value:!0}),$),kG={};Yw(kG,{CredentialsProviderError:()=>zw,ProviderError:()=>X1,TokenProviderError:()=>Jw,chain:()=>Iw,fromStatic:()=>Rw,memoize:()=>Kw});xG.exports=Fw(kG);var bG=class $ extends Error{constructor(U,G=!0){var W;let X,Z=!0;if(typeof G==="boolean")X=void 0,Z=G;else if(G!=null&&typeof G==="object")X=G.logger,Z=G.tryNextLink??!0;super(U);this.name="ProviderError",this.tryNextLink=Z,Object.setPrototypeOf(this,$.prototype),(W=X==null?void 0:X.debug)==null||W.call(X,`@smithy/property-provider ${Z?"->":"(!)"} ${U}`)}static from(U,G=!0){return Object.assign(new this(U.message,G),U)}};w0(bG,"ProviderError");var X1=bG,DG=class $ extends X1{constructor(U,G=!0){super(U,G);this.name="CredentialsProviderError",Object.setPrototypeOf(this,$.prototype)}};w0(DG,"CredentialsProviderError");var zw=DG,hG=class $ extends X1{constructor(U,G=!0){super(U,G);this.name="TokenProviderError",Object.setPrototypeOf(this,$.prototype)}};w0(hG,"TokenProviderError");var Jw=hG,Iw=w0((...$)=>async()=>{if($.length===0)throw new X1("No providers in chain");let U;for(let G of $)try{return await G()}catch(W){if(U=W,W==null?void 0:W.tryNextLink)continue;throw W}throw U},"chain"),Rw=w0(($)=>()=>Promise.resolve($),"fromStatic"),Kw=w0(($,U,G)=>{let W,X,Z,w=!1;const L=w0(async()=>{if(!X)X=$();try{W=await X,Z=!0,w=!1}finally{X=void 0}return W},"coalesceProvider");if(U===void 0)return async(Y)=>{if(!Z||(Y==null?void 0:Y.forceRefresh))W=await L();return W};return async(Y)=>{if(!Z||(Y==null?void 0:Y.forceRefresh))W=await L();if(w)return W;if(G&&!G(W))return w=!0,W;if(U(W))return await L(),W;return W}},"memoize")});var E0=M((vG)=>{Object.defineProperty(vG,"__esModule",{value:!0});vG.getHomeDir=void 0;var Mw=import.meta.require("os"),Ew=import.meta.require("path"),w$={},Bw=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},Vw=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:G,HOMEDRIVE:W=`C:${Ew.sep}`}=process.env;if($)return $;if(U)return U;if(G)return`${W}${G}`;const X=Bw();if(!w$[X])w$[X]=Mw.homedir();return w$[X]};vG.getHomeDir=Vw});var L$=M((yG)=>{Object.defineProperty(yG,"__esModule",{value:!0});yG.getSSOTokenFilepath=void 0;var fw=import.meta.require("crypto"),Tw=import.meta.require("path"),Ow=E0(),Hw=($)=>{const G=fw.createHash("sha1").update($).digest("hex");return Tw.join(Ow.getHomeDir(),".aws","sso","cache",`${G}.json`)};yG.getSSOTokenFilepath=Hw});var dG=M((_G)=>{Object.defineProperty(_G,"__esModule",{value:!0});_G.getSSOTokenFromFile=void 0;var Aw=import.meta.require("fs"),qw=L$(),{readFile:Cw}=Aw.promises,Nw=async($)=>{const U=qw.getSSOTokenFilepath($),G=await Cw(U,"utf8");return JSON.parse(G)};_G.getSSOTokenFromFile=Nw});var Q$=M((gG)=>{Object.defineProperty(gG,"__esModule",{value:!0});gG.slurpFile=void 0;var Pw=import.meta.require("fs"),{readFile:jw}=Pw.promises,Y$={},Sw=($,U)=>{if(!Y$[$]||(U===null||U===void 0?void 0:U.ignoreCache))Y$[$]=jw($,"utf8");return Y$[$]};gG.slurpFile=Sw});var I$=M((WI,x0)=>{var{defineProperty:L1,getOwnPropertyDescriptor:kw,getOwnPropertyNames:bw}=Object,Dw=Object.prototype.hasOwnProperty,y=($,U)=>L1($,"name",{value:U,configurable:!0}),hw=($,U)=>{for(var G in U)L1($,G,{get:U[G],enumerable:!0})},F$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of bw(U))if(!Dw.call($,X)&&X!==G)L1($,X,{get:()=>U[X],enumerable:!(W=kw(U,X))||W.enumerable})}return $},J$=($,U,G)=>(F$($,U,"default"),G&&F$(G,U,"default")),xw=($)=>F$(L1({},"__esModule",{value:!0}),$),h0={};hw(h0,{CONFIG_PREFIX_SEPARATOR:()=>L0,DEFAULT_PROFILE:()=>iG,ENV_PROFILE:()=>nG,getProfileName:()=>vw,loadSharedConfigFiles:()=>oG,loadSsoSessionData:()=>rw,parseKnownFiles:()=>aw});x0.exports=xw(h0);J$(h0,E0(),x0.exports);var nG="AWS_PROFILE",iG="default",vw=y(($)=>$.profile||process.env[nG]||iG,"getProfileName");J$(h0,L$(),x0.exports);J$(h0,dG(),x0.exports);var Z1=D0(),cw=y(($)=>Object.entries($).filter(([U])=>{const G=U.indexOf(L0);if(G===-1)return!1;return Object.values(Z1.IniSectionType).includes(U.substring(0,G))}).reduce((U,[G,W])=>{const X=G.indexOf(L0),Z=G.substring(0,X)===Z1.IniSectionType.PROFILE?G.substring(X+1):G;return U[Z]=W,U},{...$.default&&{default:$.default}}),"getConfigData"),w1=import.meta.require("path"),yw=E0(),uw="AWS_CONFIG_FILE",rG=y(()=>process.env[uw]||w1.join(yw.getHomeDir(),".aws","config"),"getConfigFilepath"),_w=E0(),pw="AWS_SHARED_CREDENTIALS_FILE",dw=y(()=>process.env[pw]||w1.join(_w.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),gw=E0(),sw=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,lw=["__proto__","profile __proto__"],z$=y(($)=>{const U={};let G,W;for(let X of $.split(/\r?\n/)){const Z=X.split(/(^|\s)[;#]/)[0].trim();if(Z[0]==="["&&Z[Z.length-1]==="]"){G=void 0,W=void 0;const L=Z.substring(1,Z.length-1),Y=sw.exec(L);if(Y){const[,Q,,F]=Y;if(Object.values(Z1.IniSectionType).includes(Q))G=[Q,F].join(L0)}else G=L;if(lw.includes(L))throw new Error(`Found invalid profile name "${L}"`)}else if(G){const L=Z.indexOf("=");if(![0,-1].includes(L)){const[Y,Q]=[Z.substring(0,L).trim(),Z.substring(L+1).trim()];if(Q==="")W=Y;else{if(W&&X.trimStart()===X)W=void 0;U[G]=U[G]||{};const F=W?[W,Y].join(L0):Y;U[G][F]=Q}}}}return U},"parseIni"),lG=Q$(),mG=y(()=>({}),"swallowError"),L0=".",oG=y(async($={})=>{const{filepath:U=dw(),configFilepath:G=rG()}=$,W=gw.getHomeDir();let Z=U;if(U.startsWith("~/"))Z=w1.join(W,U.slice(2));let w=G;if(G.startsWith("~/"))w=w1.join(W,G.slice(2));const L=await Promise.all([lG.slurpFile(w,{ignoreCache:$.ignoreCache}).then(z$).then(cw).catch(mG),lG.slurpFile(Z,{ignoreCache:$.ignoreCache}).then(z$).catch(mG)]);return{configFile:L[0],credentialsFile:L[1]}},"loadSharedConfigFiles"),mw=y(($)=>Object.entries($).filter(([U])=>U.startsWith(Z1.IniSectionType.SSO_SESSION+L0)).reduce((U,[G,W])=>({...U,[G.substring(G.indexOf(L0)+1)]:W}),{}),"getSsoSessionData"),nw=Q$(),iw=y(()=>({}),"swallowError"),rw=y(async($={})=>nw.slurpFile($.configFilepath??rG()).then(z$).then(mw).catch(iw),"loadSsoSessionData"),ow=y((...$)=>{const U={};for(let G of $)for(let[W,X]of Object.entries(G))if(U[W]!==void 0)Object.assign(U[W],X);else U[W]=X;return U},"mergeConfigFiles"),aw=y(async($)=>{const U=await oG($);return ow(U.configFile,U.credentialsFile)},"parseKnownFiles")});var $8=M((XI,eG)=>{var R$=function($){try{const U=new Set(Array.from($.match(/([A-Z_]){3,}/g)??[]));return U.delete("CONFIG"),U.delete("CONFIG_PREFIX_SEPARATOR"),U.delete("ENV"),[...U].join(", ")}catch(U){return $}},Y1=Object.defineProperty,tw=Object.getOwnPropertyDescriptor,ew=Object.getOwnPropertyNames,$L=Object.prototype.hasOwnProperty,B0=($,U)=>Y1($,"name",{value:U,configurable:!0}),UL=($,U)=>{for(var G in U)Y1($,G,{get:U[G],enumerable:!0})},GL=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of ew(U))if(!$L.call($,X)&&X!==G)Y1($,X,{get:()=>U[X],enumerable:!(W=tw(U,X))||W.enumerable})}return $},WL=($)=>GL(Y1({},"__esModule",{value:!0}),$),tG={};UL(tG,{loadConfig:()=>YL});eG.exports=WL(tG);var v0=Z$();B0(R$,"getSelectorName");var XL=B0(($,U)=>async()=>{try{const G=$(process.env);if(G===void 0)throw new Error;return G}catch(G){throw new v0.CredentialsProviderError(G.message||`Not found in ENV: ${R$($.toString())}`,{logger:U})}},"fromEnv"),aG=I$(),ZL=B0(($,{preferredFile:U="config",...G}={})=>async()=>{const W=aG.getProfileName(G),{configFile:X,credentialsFile:Z}=await aG.loadSharedConfigFiles(G),w=Z[W]||{},L=X[W]||{},Y=U==="config"?{...w,...L}:{...L,...w};try{const F=$(Y,U==="config"?X:Z);if(F===void 0)throw new Error;return F}catch(Q){throw new v0.CredentialsProviderError(Q.message||`Not found in config files w/ profile [${W}]: ${R$($.toString())}`,{logger:G.logger})}},"fromSharedConfigFiles"),wL=B0(($)=>typeof $==="function","isFunction"),LL=B0(($)=>wL($)?async()=>await $():v0.fromStatic($),"fromStatic"),YL=B0(({environmentVariableSelector:$,configFileSelector:U,default:G},W={})=>v0.memoize(v0.chain(XL($),ZL(U,W),LL(G))),"loadConfig")});var w8=M((X8)=>{Object.defineProperty(X8,"__esModule",{value:!0});X8.getEndpointUrlConfig=void 0;var U8=I$(),G8="AWS_ENDPOINT_URL",W8="endpoint_url",QL=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((Z)=>Z.toUpperCase()),W=U[[G8,...G].join("_")];if(W)return W;const X=U[G8];if(X)return X;return},configFileSelector:(U,G)=>{if(G&&U.services){const X=G[["services",U.services].join(U8.CONFIG_PREFIX_SEPARATOR)];if(X){const Z=$.split(" ").map((L)=>L.toLowerCase()),w=X[[Z.join("_"),W8].join(U8.CONFIG_PREFIX_SEPARATOR)];if(w)return w}}const W=U[W8];if(W)return W;return},default:void 0});X8.getEndpointUrlConfig=QL});var K$=M((L8)=>{Object.defineProperty(L8,"__esModule",{value:!0});L8.getEndpointFromConfig=void 0;var FL=$8(),zL=w8(),JL=async($)=>FL.loadConfig(zL.getEndpointUrlConfig($!==null&&$!==void 0?$:""))();L8.getEndpointFromConfig=JL});var J8=M((LI,z8)=>{var{defineProperty:Q1,getOwnPropertyDescriptor:RL,getOwnPropertyNames:KL}=Object,ML=Object.prototype.hasOwnProperty,EL=($,U)=>Q1($,"name",{value:U,configurable:!0}),BL=($,U)=>{for(var G in U)Q1($,G,{get:U[G],enumerable:!0})},VL=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of KL(U))if(!ML.call($,X)&&X!==G)Q1($,X,{get:()=>U[X],enumerable:!(W=RL(U,X))||W.enumerable})}return $},fL=($)=>VL(Q1({},"__esModule",{value:!0}),$),Q8={};BL(Q8,{parseUrl:()=>F8});z8.exports=fL(Q8);var TL=IL(),F8=EL(($)=>{if(typeof $==="string")return F8(new URL($));const{hostname:U,pathname:G,port:W,protocol:X,search:Z}=$;let w;if(Z)w=TL.parseQueryString(Z);return{hostname:U,port:W?parseInt(W):void 0,protocol:X,path:G,query:w}},"parseUrl")});var E$=M((YI,V8)=>{var B8=function($,U,G){return{applyToStack:(W)=>{W.add(R8($,G),M8),W.add(K8($,U),E8)}}},F1=Object.defineProperty,OL=Object.getOwnPropertyDescriptor,HL=Object.getOwnPropertyNames,AL=Object.prototype.hasOwnProperty,M$=($,U)=>F1($,"name",{value:U,configurable:!0}),qL=($,U)=>{for(var G in U)F1($,G,{get:U[G],enumerable:!0})},CL=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of HL(U))if(!AL.call($,X)&&X!==G)F1($,X,{get:()=>U[X],enumerable:!(W=OL(U,X))||W.enumerable})}return $},NL=($)=>CL(F1({},"__esModule",{value:!0}),$),I8={};qL(I8,{deserializerMiddleware:()=>R8,deserializerMiddlewareOption:()=>M8,getSerdePlugin:()=>B8,serializerMiddleware:()=>K8,serializerMiddlewareOption:()=>E8});V8.exports=NL(I8);var R8=M$(($,U)=>(G)=>async(W)=>{const{response:X}=await G(W);try{const Z=await U(X,$);return{response:X,output:Z}}catch(Z){if(Object.defineProperty(Z,"$response",{value:X}),!("$metadata"in Z)){if(Z.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof Z.$responseBodyText!=="undefined"){if(Z.$response)Z.$response.body=Z.$responseBodyText}}throw Z}},"deserializerMiddleware"),K8=M$(($,U)=>(G,W)=>async(X)=>{var Z;const w=((Z=W.endpointV2)==null?void 0:Z.url)&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!w)throw new Error("No valid endpoint provider available.");const L=await U(X.input,{...$,endpoint:w});return G({...X,request:L})},"serializerMiddleware"),M8={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},E8={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};M$(B8,"getSerdePlugin")});var N8=M((QI,C8)=>{var{defineProperty:J1,getOwnPropertyDescriptor:PL,getOwnPropertyNames:jL}=Object,SL=Object.prototype.hasOwnProperty,g=($,U)=>J1($,"name",{value:U,configurable:!0}),kL=($,U)=>{for(var G in U)J1($,G,{get:U[G],enumerable:!0})},bL=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of jL(U))if(!SL.call($,X)&&X!==G)J1($,X,{get:()=>U[X],enumerable:!(W=PL(U,X))||W.enumerable})}return $},DL=($)=>bL(J1({},"__esModule",{value:!0}),$),T8={};kL(T8,{endpointMiddleware:()=>A8,endpointMiddlewareOptions:()=>q8,getEndpointFromInstructions:()=>O8,getEndpointPlugin:()=>gL,resolveEndpointConfig:()=>lL,resolveParams:()=>H8,toEndpointV1:()=>B$});C8.exports=DL(T8);var hL=g(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(uL(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!yL(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),xL=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,vL=/(\d+\.){3}\d+/,cL=/\.\./,yL=g(($)=>xL.test($)&&!vL.test($)&&!cL.test($),"isDnsCompatibleBucketName"),uL=g(($)=>{const[U,G,W,,,X]=$.split(":"),Z=U==="arn"&&$.split(":").length>=6,w=Boolean(Z&&G&&W&&X);if(Z&&!w)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return w},"isArnBucketName"),_L=g(($,U,G)=>{const W=g(async()=>{const X=G[$]??G[U];if(typeof X==="function")return X();return X},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return(X==null?void 0:X.credentialScope)??(X==null?void 0:X.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return(X==null?void 0:X.accountId)??(X==null?void 0:X.AccountId)};if($==="endpoint"||U==="endpoint")return async()=>{const X=await W();if(X&&typeof X==="object"){if("url"in X)return X.url.href;if("hostname"in X){const{protocol:Z,hostname:w,port:L,path:Y}=X;return`${Z}//${w}${L?":"+L:""}${Y}`}}return X};return W},"createConfigValueProvider"),pL=K$(),f8=J8(),B$=g(($)=>{if(typeof $==="object"){if("url"in $)return f8.parseUrl($.url);return $}return f8.parseUrl($)},"toEndpointV1"),O8=g(async($,U,G,W)=>{if(!G.endpoint){let w;if(G.serviceConfiguredEndpoint)w=await G.serviceConfiguredEndpoint();else w=await pL.getEndpointFromConfig(G.serviceId);if(w)G.endpoint=()=>Promise.resolve(B$(w))}const X=await H8($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(X,W)},"getEndpointFromInstructions"),H8=g(async($,U,G)=>{var W;const X={},Z=((W=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:W.call(U))||{};for(let[w,L]of Object.entries(Z))switch(L.type){case"staticContextParams":X[w]=L.value;break;case"contextParams":X[w]=$[L.name];break;case"clientContextParams":case"builtInParams":X[w]=await _L(L.name,w,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}if(Object.keys(Z).length===0)Object.assign(X,G);if(String(G.serviceId).toLowerCase()==="s3")await hL(X);return X},"resolveParams"),z1=n(),A8=g(({config:$,instructions:U})=>{return(G,W)=>async(X)=>{var Z,w,L;const Y=await O8(X.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=Y,W.authSchemes=(Z=Y.properties)==null?void 0:Z.authSchemes;const Q=(w=W.authSchemes)==null?void 0:w[0];if(Q){W.signing_region=Q.signingRegion,W.signing_service=Q.signingName;const F=z1.getSmithyContext(W),z=(L=F==null?void 0:F.selectedHttpAuthScheme)==null?void 0:L.httpAuthOption;if(z)z.signingProperties=Object.assign(z.signingProperties||{},{signing_region:Q.signingRegion,signingRegion:Q.signingRegion,signing_service:Q.signingName,signingName:Q.signingName,signingRegionSet:Q.signingRegionSet},Q.properties)}return G({...X})}},"endpointMiddleware"),dL=E$(),q8={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:dL.serializerMiddlewareOption.name},gL=g(($,U)=>({applyToStack:(G)=>{G.addRelativeTo(A8({config:$,instructions:U}),q8)}}),"getEndpointPlugin"),sL=K$(),lL=g(($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>B$(await z1.normalizeProvider(G)()):void 0,Z={...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:z1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:z1.normalizeProvider($.useFipsEndpoint??!1)};let w=void 0;return Z.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!w)w=sL.getEndpointFromConfig($.serviceId);return w},Z},"resolveEndpointConfig")});var V$=M((FI,k8)=>{var{defineProperty:I1,getOwnPropertyDescriptor:mL,getOwnPropertyNames:nL}=Object,iL=Object.prototype.hasOwnProperty,V0=($,U)=>I1($,"name",{value:U,configurable:!0}),rL=($,U)=>{for(var G in U)I1($,G,{get:U[G],enumerable:!0})},oL=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of nL(U))if(!iL.call($,X)&&X!==G)I1($,X,{get:()=>U[X],enumerable:!(W=mL(U,X))||W.enumerable})}return $},aL=($)=>oL(I1({},"__esModule",{value:!0}),$),P8={};rL(P8,{isClockSkewCorrectedError:()=>j8,isClockSkewError:()=>X2,isRetryableByTrait:()=>W2,isServerError:()=>w2,isThrottlingError:()=>Z2,isTransientError:()=>S8});k8.exports=aL(P8);var tL=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],eL=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],$2=["TimeoutError","RequestTimeout","RequestTimeoutException"],U2=[500,502,503,504],G2=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],W2=V0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),X2=V0(($)=>tL.includes($.name),"isClockSkewError"),j8=V0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),Z2=V0(($)=>{var U,G;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||eL.includes($.name)||((G=$.$retryable)==null?void 0:G.throttling)==!0},"isThrottlingError"),S8=V0(($)=>{var U;return j8($)||$2.includes($.name)||G2.includes(($==null?void 0:$.code)||"")||U2.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),w2=V0(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const G=$.$metadata.httpStatusCode;if(500<=G&&G<=599&&!S8($))return!0;return!1}return!1},"isServerError")});var l8=M((zI,s8)=>{var{defineProperty:R1,getOwnPropertyDescriptor:L2,getOwnPropertyNames:Y2}=Object,Q2=Object.prototype.hasOwnProperty,s=($,U)=>R1($,"name",{value:U,configurable:!0}),F2=($,U)=>{for(var G in U)R1($,G,{get:U[G],enumerable:!0})},z2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Y2(U))if(!Q2.call($,X)&&X!==G)R1($,X,{get:()=>U[X],enumerable:!(W=L2(U,X))||W.enumerable})}return $},J2=($)=>z2(R1({},"__esModule",{value:!0}),$),D8={};F2(D8,{AdaptiveRetryStrategy:()=>B2,ConfiguredRetryStrategy:()=>V2,DEFAULT_MAX_ATTEMPTS:()=>f$,DEFAULT_RETRY_DELAY_BASE:()=>c0,DEFAULT_RETRY_MODE:()=>I2,DefaultRateLimiter:()=>v8,INITIAL_RETRY_TOKENS:()=>T$,INVOCATION_ID_HEADER:()=>K2,MAXIMUM_RETRY_DELAY:()=>O$,NO_RETRY_INCREMENT:()=>_8,REQUEST_HEADER:()=>M2,RETRY_COST:()=>y8,RETRY_MODES:()=>h8,StandardRetryStrategy:()=>H$,THROTTLING_RETRY_DELAY_BASE:()=>c8,TIMEOUT_RETRY_COST:()=>u8});s8.exports=J2(D8);var h8=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(h8||{}),f$=3,I2="standard",R2=V$(),x8=class ${constructor(U){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(U==null?void 0:U.beta)??0.7,this.minCapacity=(U==null?void 0:U.minCapacity)??1,this.minFillRate=(U==null?void 0:U.minFillRate)??0.5,this.scaleConstant=(U==null?void 0:U.scaleConstant)??0.4,this.smooth=(U==null?void 0:U.smooth)??0.8;const G=this.getCurrentTimeInSeconds();this.lastThrottleTime=G,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(U){if(!this.enabled)return;if(this.refillTokenBucket(),U>this.currentCapacity){const G=(U-this.currentCapacity)/this.fillRate*1000;await new Promise((W)=>setTimeout(W,G))}this.currentCapacity=this.currentCapacity-U}refillTokenBucket(){const U=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=U;return}const G=(U-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+G),this.lastTimestamp=U}updateClientSendingRate(U){let G;if(this.updateMeasuredRate(),R2.isThrottlingError(U)){const X=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=X,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),G=this.cubicThrottle(X),this.enableTokenBucket()}else this.calculateTimeWindow(),G=this.cubicSuccess(this.getCurrentTimeInSeconds());const W=Math.min(G,2*this.measuredTxRate);this.updateTokenBucketRate(W)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(U){return this.getPrecise(U*this.beta)}cubicSuccess(U){return this.getPrecise(this.scaleConstant*Math.pow(U-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(U){this.refillTokenBucket(),this.fillRate=Math.max(U,this.minFillRate),this.maxCapacity=Math.max(U,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const U=this.getCurrentTimeInSeconds(),G=Math.floor(U*2)/2;if(this.requestCount++,G>this.lastTxRateBucket){const W=this.requestCount/(G-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(W*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=G}}getPrecise(U){return parseFloat(U.toFixed(8))}};s(x8,"DefaultRateLimiter");var v8=x8,c0=100,O$=20000,c8=500,T$=500,y8=5,u8=10,_8=1,K2="amz-sdk-invocation-id",M2="amz-sdk-request",E2=s(()=>{let $=c0;return{computeNextBackoffDelay:s((W)=>{return Math.floor(Math.min(O$,Math.random()*2**W*$))},"computeNextBackoffDelay"),setDelayBase:s((W)=>{$=W},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),b8=s(({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:s(()=>U,"getRetryCount"),getRetryDelay:s(()=>Math.min(O$,$),"getRetryDelay"),getRetryCost:s(()=>G,"getRetryCost")}},"createDefaultRetryToken"),p8=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=T$,this.retryBackoffStrategy=E2(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return b8({retryDelay:c0,retryCount:0})}async refreshRetryTokenForRetry(U,G){const W=await this.getMaxAttempts();if(this.shouldRetry(U,G,W)){const X=G.errorType;this.retryBackoffStrategy.setDelayBase(X==="THROTTLING"?c8:c0);const Z=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),w=G.retryAfterHint?Math.max(G.retryAfterHint.getTime()-Date.now()||0,Z):Z,L=this.getCapacityCost(X);return this.capacity-=L,b8({retryDelay:w,retryCount:U.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(T$,this.capacity+(U.getRetryCost()??_8))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(U){return console.warn(`Max attempts provider could not resolve. Using default of ${f$}`),f$}}shouldRetry(U,G,W){return U.getRetryCount()+1<W&&this.capacity>=this.getCapacityCost(G.errorType)&&this.isRetryableError(G.errorType)}getCapacityCost(U){return U==="TRANSIENT"?u8:y8}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};s(p8,"StandardRetryStrategy");var H$=p8,d8=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:W}=G??{};this.rateLimiter=W??new v8,this.standardRetryStrategy=new H$(U)}async acquireInitialRetryToken(U){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(U)}async refreshRetryTokenForRetry(U,G){return this.rateLimiter.updateClientSendingRate(G),this.standardRetryStrategy.refreshRetryTokenForRetry(U,G)}recordSuccess(U){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(U)}};s(d8,"AdaptiveRetryStrategy");var B2=d8,g8=class $ extends H${constructor(U,G=c0){super(typeof U==="function"?U:async()=>U);if(typeof G==="number")this.computeNextBackoffDelay=()=>G;else this.computeNextBackoffDelay=G}async refreshRetryTokenForRetry(U,G){const W=await super.refreshRetryTokenForRetry(U,G);return W.getRetryDelay=()=>this.computeNextBackoffDelay(W.getRetryCount()),W}};s(g8,"ConfiguredRetryStrategy");var V2=g8});var o8=M((JI,r8)=>{var{defineProperty:K1,getOwnPropertyDescriptor:f2,getOwnPropertyNames:T2}=Object,O2=Object.prototype.hasOwnProperty,u=($,U)=>K1($,"name",{value:U,configurable:!0}),H2=($,U)=>{for(var G in U)K1($,G,{get:U[G],enumerable:!0})},A2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of T2(U))if(!O2.call($,X)&&X!==G)K1($,X,{get:()=>U[X],enumerable:!(W=f2(U,X))||W.enumerable})}return $},q2=($)=>A2(K1({},"__esModule",{value:!0}),$),i8={};H2(i8,{constructStack:()=>A$});r8.exports=q2(i8);var Y0=u(($,U)=>{const G=[];if($)G.push($);if(U)for(let W of U)G.push(W);return G},"getAllAliases"),t=u(($,U)=>{return`${$||"anonymous"}${U&&U.length>0?` (a.k.a. ${U.join(",")})`:""}`},"getMiddlewareNameWithAliases"),A$=u(()=>{let $=[],U=[],G=!1;const W=new Set,X=u((z)=>z.sort((J,I)=>m8[I.step]-m8[J.step]||n8[I.priority||"normal"]-n8[J.priority||"normal"]),"sort"),Z=u((z)=>{let J=!1;const I=u((K)=>{const B=Y0(K.name,K.aliases);if(B.includes(z)){J=!0;for(let E of B)W.delete(E);return!1}return!0},"filterCb");return $=$.filter(I),U=U.filter(I),J},"removeByName"),w=u((z)=>{let J=!1;const I=u((K)=>{if(K.middleware===z){J=!0;for(let B of Y0(K.name,K.aliases))W.delete(B);return!1}return!0},"filterCb");return $=$.filter(I),U=U.filter(I),J},"removeByReference"),L=u((z)=>{var J;return $.forEach((I)=>{z.add(I.middleware,{...I})}),U.forEach((I)=>{z.addRelativeTo(I.middleware,{...I})}),(J=z.identifyOnResolve)==null||J.call(z,F.identifyOnResolve()),z},"cloneTo"),Y=u((z)=>{const J=[];return z.before.forEach((I)=>{if(I.before.length===0&&I.after.length===0)J.push(I);else J.push(...Y(I))}),J.push(z),z.after.reverse().forEach((I)=>{if(I.before.length===0&&I.after.length===0)J.push(I);else J.push(...Y(I))}),J},"expandRelativeMiddlewareList"),Q=u((z=!1)=>{const J=[],I=[],K={};return $.forEach((E)=>{const V={...E,before:[],after:[]};for(let O of Y0(V.name,V.aliases))K[O]=V;J.push(V)}),U.forEach((E)=>{const V={...E,before:[],after:[]};for(let O of Y0(V.name,V.aliases))K[O]=V;I.push(V)}),I.forEach((E)=>{if(E.toMiddleware){const V=K[E.toMiddleware];if(V===void 0){if(z)return;throw new Error(`${E.toMiddleware} is not found when adding ${t(E.name,E.aliases)} middleware ${E.relation} ${E.toMiddleware}`)}if(E.relation==="after")V.after.push(E);if(E.relation==="before")V.before.push(E)}}),X(J).map(Y).reduce((E,V)=>{return E.push(...V),E},[])},"getMiddlewareList"),F={add:(z,J={})=>{const{name:I,override:K,aliases:B}=J,E={step:"initialize",priority:"normal",middleware:z,...J},V=Y0(I,B);if(V.length>0){if(V.some((O)=>W.has(O))){if(!K)throw new Error(`Duplicate middleware name '${t(I,B)}'`);for(let O of V){const f=$.findIndex((x)=>{var a;return x.name===O||((a=x.aliases)==null?void 0:a.some((X0)=>X0===O))});if(f===-1)continue;const T=$[f];if(T.step!==E.step||E.priority!==T.priority)throw new Error(`"${t(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.step} step cannot be overridden by "${t(I,B)}" middleware with ${E.priority} priority in ${E.step} step.`);$.splice(f,1)}}for(let O of V)W.add(O)}$.push(E)},addRelativeTo:(z,J)=>{const{name:I,override:K,aliases:B}=J,E={middleware:z,...J},V=Y0(I,B);if(V.length>0){if(V.some((O)=>W.has(O))){if(!K)throw new Error(`Duplicate middleware name '${t(I,B)}'`);for(let O of V){const f=U.findIndex((x)=>{var a;return x.name===O||((a=x.aliases)==null?void 0:a.some((X0)=>X0===O))});if(f===-1)continue;const T=U[f];if(T.toMiddleware!==E.toMiddleware||T.relation!==E.relation)throw new Error(`"${t(T.name,T.aliases)}" middleware ${T.relation} "${T.toMiddleware}" middleware cannot be overridden by "${t(I,B)}" middleware ${E.relation} "${E.toMiddleware}" middleware.`);U.splice(f,1)}}for(let O of V)W.add(O)}U.push(E)},clone:()=>L(A$()),use:(z)=>{z.applyToStack(F)},remove:(z)=>{if(typeof z==="string")return Z(z);else return w(z)},removeByTag:(z)=>{let J=!1;const I=u((K)=>{const{tags:B,name:E,aliases:V}=K;if(B&&B.includes(z)){const O=Y0(E,V);for(let f of O)W.delete(f);return J=!0,!1}return!0},"filterCb");return $=$.filter(I),U=U.filter(I),J},concat:(z)=>{var J;const I=L(A$());return I.use(z),I.identifyOnResolve(G||I.identifyOnResolve()||(((J=z.identifyOnResolve)==null?void 0:J.call(z))??!1)),I},applyToStack:L,identify:()=>{return Q(!0).map((z)=>{const J=z.step??z.relation+" "+z.toMiddleware;return t(z.name,z.aliases)+" - "+J})},identifyOnResolve(z){if(typeof z==="boolean")G=z;return G},resolve:(z,J)=>{for(let I of Q().map((K)=>K.middleware).reverse())z=I(z,J);if(G)console.log(F.identify());return z}};return F},"constructStack"),m8={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},n8={high:3,normal:2,low:1}});var e8=M((a8)=>{Object.defineProperty(a8,"__esModule",{value:!0});a8.getAwsChunkedEncodingStream=void 0;var C2=import.meta.require("stream"),N2=($,U)=>{const{base64Encoder:G,bodyLengthChecker:W,checksumAlgorithmFn:X,checksumLocationName:Z,streamHasher:w}=U,L=G!==void 0&&X!==void 0&&Z!==void 0&&w!==void 0,Y=L?w(X,$):void 0,Q=new C2.Readable({read:()=>{}});return $.on("data",(F)=>{const z=W(F)||0;Q.push(`${z.toString(16)}\r\n`),Q.push(F),Q.push("\r\n")}),$.on("end",async()=>{if(Q.push("0\r\n"),L){const F=G(await Y);Q.push(`${Z}:${F}\r\n`),Q.push("\r\n")}Q.push(null)}),Q};a8.getAwsChunkedEncodingStream=N2});var BW=M((RI,EW)=>{async function N$($,U,G=GW){const W=U.headers??{},X=W.Expect||W.expect;let Z=-1,w=!1;if(X==="100-continue")await Promise.race([new Promise((L)=>{Z=Number(setTimeout(L,Math.max(GW,G)))}),new Promise((L)=>{$.on("continue",()=>{clearTimeout(Z),L()}),$.on("error",()=>{w=!0,clearTimeout(Z),L()})})]);if(!w)FW($,U.body)}var FW=function($,U){if(U instanceof QW.Readable){U.pipe($);return}if(U){if(Buffer.isBuffer(U)||typeof U==="string"){$.end(U);return}const G=U;if(typeof G==="object"&&G.buffer&&typeof G.byteOffset==="number"&&typeof G.byteLength==="number"){$.end(Buffer.from(G.buffer,G.byteOffset,G.byteLength));return}$.end(Buffer.from(U));return}$.end()};async function MW($){const U=[],G=$.getReader();let W=!1,X=0;while(!W){const{done:L,value:Y}=await G.read();if(Y)U.push(Y),X+=Y.length;W=L}const Z=new Uint8Array(X);let w=0;for(let L of U)Z.set(L,w),w+=L.length;return Z}var{create:j2,defineProperty:y0,getOwnPropertyDescriptor:S2,getOwnPropertyNames:k2,getPrototypeOf:b2}=Object,D2=Object.prototype.hasOwnProperty,H=($,U)=>y0($,"name",{value:U,configurable:!0}),h2=($,U)=>{for(var G in U)y0($,G,{get:U[G],enumerable:!0})},XW=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of k2(U))if(!D2.call($,X)&&X!==G)y0($,X,{get:()=>U[X],enumerable:!(W=S2(U,X))||W.enumerable})}return $},x2=($,U,G)=>(G=$!=null?j2(b2($)):{},XW(U||!$||!$.__esModule?y0(G,"default",{value:$,enumerable:!0}):G,$)),v2=($)=>XW(y0({},"__esModule",{value:!0}),$),ZW={};h2(ZW,{DEFAULT_REQUEST_TIMEOUT:()=>d2,NodeHttp2Handler:()=>n2,NodeHttpHandler:()=>g2,streamCollector:()=>r2});EW.exports=v2(ZW);var wW=Q0(),LW=P2(),q$=import.meta.require("http"),C$=import.meta.require("https"),c2=["ECONNRESET","EPIPE","ETIMEDOUT"],YW=H(($)=>{const U={};for(let G of Object.keys($)){const W=$[G];U[G]=Array.isArray(W)?W.join(","):W}return U},"getTransformedHeaders"),$W=1000,y2=H(($,U,G=0)=>{if(!G)return-1;const W=H((X)=>{const Z=setTimeout(()=>{$.destroy(),U(Object.assign(new Error(`Socket timed out without establishing a connection within ${G} ms`),{name:"TimeoutError"}))},G-X),w=H((L)=>{if(L==null?void 0:L.connecting)L.on("connect",()=>{clearTimeout(Z)});else clearTimeout(Z)},"doWithSocket");if($.socket)w($.socket);else $.on("socket",w)},"registerTimeout");if(G<2000)return W(0),0;return setTimeout(W.bind(null,$W),$W)},"setConnectionTimeout"),u2=3000,_2=H(($,{keepAlive:U,keepAliveMsecs:G},W=u2)=>{if(U!==!0)return-1;const X=H(()=>{if($.socket)$.socket.setKeepAlive(U,G||0);else $.on("socket",(Z)=>{Z.setKeepAlive(U,G||0)})},"registerListener");if(W===0)return X(),0;return setTimeout(X,W)},"setSocketKeepAlive"),UW=3000,p2=H(($,U,G=0)=>{const W=H((X)=>{$.setTimeout(G-X,()=>{$.destroy(),U(Object.assign(new Error(`Connection timed out after ${G} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<G&&G<6000)return W(0),0;return setTimeout(W.bind(null,G===0?0:UW),UW)},"setSocketTimeout"),QW=import.meta.require("stream"),GW=1000;H(N$,"writeRequestBody");H(FW,"writeBody");var d2=0,zW=class ${constructor(U){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((X)=>{G(this.resolveDefaultConfig(X))}).catch(W);else G(this.resolveDefaultConfig(U))})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}static checkSocketUsage(U,G,W=console){var X,Z,w;const{sockets:L,requests:Y,maxSockets:Q}=U;if(typeof Q!=="number"||Q===Infinity)return G;const F=15000;if(Date.now()-F<G)return G;if(L&&Y)for(let z in L){const J=((X=L[z])==null?void 0:X.length)??0,I=((Z=Y[z])==null?void 0:Z.length)??0;if(J>=Q&&I>=2*Q)return(w=W==null?void 0:W.warn)==null||w.call(W,`@smithy/node-http-handler:WARN - socket usage at capacity=${J} and ${I} additional requests are enqueued.
2
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return G}resolveDefaultConfig(U){const{requestTimeout:G,connectionTimeout:W,socketTimeout:X,httpAgent:Z,httpsAgent:w}=U||{};return{connectionTimeout:W,requestTimeout:G??X,httpAgent:(()=>{if(Z instanceof q$.Agent||typeof(Z==null?void 0:Z.destroy)==="function")return Z;return new q$.Agent({keepAlive:!0,maxSockets:50,...Z})})(),httpsAgent:(()=>{if(w instanceof C$.Agent||typeof(w==null?void 0:w.destroy)==="function")return w;return new C$.Agent({keepAlive:!0,maxSockets:50,...w})})(),logger:console}}destroy(){var U,G,W,X;(G=(U=this.config)==null?void 0:U.httpAgent)==null||G.destroy(),(X=(W=this.config)==null?void 0:W.httpsAgent)==null||X.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;return new Promise((W,X)=>{let Z=void 0;const w=[],L=H(async(f)=>{await Z,w.forEach(clearTimeout),W(f)},"resolve"),Y=H(async(f)=>{await Z,w.forEach(clearTimeout),X(f)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(G==null?void 0:G.aborted){const f=new Error("Request aborted");f.name="AbortError",Y(f);return}const Q=U.protocol==="https:",F=Q?this.config.httpsAgent:this.config.httpAgent;w.push(setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(F,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const z=LW.buildQueryString(U.query||{});let J=void 0;if(U.username!=null||U.password!=null){const f=U.username??"",T=U.password??"";J=`${f}:${T}`}let I=U.path;if(z)I+=`?${z}`;if(U.fragment)I+=`#${U.fragment}`;let K=U.hostname??"";if(K[0]==="["&&K.endsWith("]"))K=U.hostname.slice(1,-1);else K=U.hostname;const B={headers:U.headers,host:K,method:U.method,path:I,port:U.port,agent:F,auth:J},V=(Q?C$.request:q$.request)(B,(f)=>{const T=new wW.HttpResponse({statusCode:f.statusCode||-1,reason:f.statusMessage,headers:YW(f.headers),body:f});L({response:T})});if(V.on("error",(f)=>{if(c2.includes(f.code))Y(Object.assign(f,{name:"TimeoutError"}));else Y(f)}),G){const f=H(()=>{V.destroy();const T=new Error("Request aborted");T.name="AbortError",Y(T)},"onAbort");if(typeof G.addEventListener==="function"){const T=G;T.addEventListener("abort",f,{once:!0}),V.once("close",()=>T.removeEventListener("abort",f))}else G.onabort=f}w.push(y2(V,Y,this.config.connectionTimeout)),w.push(p2(V,Y,this.config.requestTimeout));const O=B.agent;if(typeof O==="object"&&"keepAlive"in O)w.push(_2(V,{keepAlive:O.keepAlive,keepAliveMsecs:O.keepAliveMsecs}));Z=N$(V,U,this.config.requestTimeout).catch((f)=>{return w.forEach(clearTimeout),X(f)})})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}};H(zW,"NodeHttpHandler");var g2=zW,WW=import.meta.require("http2"),s2=x2(import.meta.require("http2")),JW=class ${constructor(U){this.sessions=[],this.sessions=U??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(U){this.sessions.push(U)}contains(U){return this.sessions.includes(U)}remove(U){this.sessions=this.sessions.filter((G)=>G!==U)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(U){for(let G of this.sessions)if(G===U){if(!G.destroyed)G.destroy()}}};H(JW,"NodeHttp2ConnectionPool");var l2=JW,IW=class ${constructor(U){if(this.sessionCache=new Map,this.config=U,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(U,G){const W=this.getUrlString(U),X=this.sessionCache.get(W);if(X){const Y=X.poll();if(Y&&!this.config.disableConcurrency)return Y}const Z=s2.default.connect(W);if(this.config.maxConcurrency)Z.settings({maxConcurrentStreams:this.config.maxConcurrency},(Y)=>{if(Y)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});Z.unref();const w=H(()=>{Z.destroy(),this.deleteSession(W,Z)},"destroySessionCb");if(Z.on("goaway",w),Z.on("error",w),Z.on("frameError",w),Z.on("close",()=>this.deleteSession(W,Z)),G.requestTimeout)Z.setTimeout(G.requestTimeout,w);const L=this.sessionCache.get(W)||new l2;return L.offerLast(Z),this.sessionCache.set(W,L),Z}deleteSession(U,G){const W=this.sessionCache.get(U);if(!W)return;if(!W.contains(G))return;W.remove(G),this.sessionCache.set(U,W)}release(U,G){var W;const X=this.getUrlString(U);(W=this.sessionCache.get(X))==null||W.offerLast(G)}destroy(){for(let[U,G]of this.sessionCache){for(let W of G){if(!W.destroyed)W.destroy();G.remove(W)}this.sessionCache.delete(U)}}setMaxConcurrentStreams(U){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=U}setDisableConcurrentStreams(U){this.config.disableConcurrency=U}getUrlString(U){return U.destination.toString()}};H(IW,"NodeHttp2ConnectionManager");var m2=IW,RW=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new m2({}),this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((X)=>{G(X||{})}).catch(W);else G(U||{})})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}destroy(){this.connectionManager.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:W,disableConcurrentStreams:X}=this.config;return new Promise((Z,w)=>{var L;let Y=!1,Q=void 0;const F=H(async(N)=>{await Q,Z(N)},"resolve"),z=H(async(N)=>{await Q,w(N)},"reject");if(G==null?void 0:G.aborted){Y=!0;const N=new Error("Request aborted");N.name="AbortError",z(N);return}const{hostname:J,method:I,port:K,protocol:B,query:E}=U;let V="";if(U.username!=null||U.password!=null){const N=U.username??"",p=U.password??"";V=`${N}:${p}@`}const O=`${B}//${V}${J}${K?`:${K}`:""}`,f={destination:new URL(O)},T=this.connectionManager.lease(f,{requestTimeout:(L=this.config)==null?void 0:L.sessionTimeout,disableConcurrentStreams:X||!1}),x=H((N)=>{if(X)this.destroySession(T);Y=!0,z(N)},"rejectWithDestroy"),a=LW.buildQueryString(E||{});let X0=U.path;if(a)X0+=`?${a}`;if(U.fragment)X0+=`#${U.fragment}`;const v=T.request({...U.headers,[WW.constants.HTTP2_HEADER_PATH]:X0,[WW.constants.HTTP2_HEADER_METHOD]:I});if(T.ref(),v.on("response",(N)=>{const p=new wW.HttpResponse({statusCode:N[":status"]||-1,headers:YW(N),body:v});if(Y=!0,F({response:p}),X)T.close(),this.connectionManager.deleteSession(O,T)}),W)v.setTimeout(W,()=>{v.close();const N=new Error(`Stream timed out because of no activity for ${W} ms`);N.name="TimeoutError",x(N)});if(G){const N=H(()=>{v.close();const p=new Error("Request aborted");p.name="AbortError",x(p)},"onAbort");if(typeof G.addEventListener==="function"){const p=G;p.addEventListener("abort",N,{once:!0}),v.once("close",()=>p.removeEventListener("abort",N))}else G.onabort=N}v.on("frameError",(N,p,j6)=>{x(new Error(`Frame type id ${N} in stream id ${j6} has failed with code ${p}.`))}),v.on("error",x),v.on("aborted",()=>{x(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${v.rstCode}.`))}),v.on("close",()=>{if(T.unref(),X)T.destroy();if(!Y)x(new Error("Unexpected error: http2 request did not get a response"))}),Q=N$(v,U,W)})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}destroySession(U){if(!U.destroyed)U.destroy()}};H(RW,"NodeHttp2Handler");var n2=RW,KW=class $ extends QW.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,G,W){this.bufferedBytes.push(U),W()}};H(KW,"Collector");var i2=KW,r2=H(($)=>{if(o2($))return MW($);return new Promise((U,G)=>{const W=new i2;$.pipe(W),$.on("error",(X)=>{W.end(),G(X)}),W.on("error",G),W.on("finish",function(){const X=new Uint8Array(Buffer.concat(this.bufferedBytes));U(X)})})},"streamCollector"),o2=H(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");H(MW,"collectReadableStream")});var u0=M((VW)=>{Object.defineProperty(VW,"__esModule",{value:!0});VW.isReadableStream=void 0;var a2=($)=>{var U;return typeof ReadableStream==="function"&&(((U=$===null||$===void 0?void 0:$.constructor)===null||U===void 0?void 0:U.name)===ReadableStream.name||$ instanceof ReadableStream)};VW.isReadableStream=a2});var PW=M((CW)=>{Object.defineProperty(CW,"__esModule",{value:!0});CW.sdkStreamMixin=void 0;var e2=t2(),$9=AW(),U9=qW(),G9=f0(),TW=u0(),OW="The stream has already been transformed.",W9=($)=>{var U,G;if(!HW($)&&!TW.isReadableStream($)){const w=((G=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||G===void 0?void 0:G.name)||$;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${w}`)}let W=!1;const X=async()=>{if(W)throw new Error(OW);return W=!0,await e2.streamCollector($)},Z=(w)=>{if(typeof w.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return w.stream()};return Object.assign($,{transformToByteArray:X,transformToString:async(w)=>{const L=await X();if(w==="base64")return $9.toBase64(L);else if(w==="hex")return U9.toHex(L);else if(w===void 0||w==="utf8"||w==="utf-8")return G9.toUtf8(L);else if(typeof TextDecoder==="function")return new TextDecoder(w).decode(L);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(W)throw new Error(OW);if(W=!0,HW($))return Z($);else if(TW.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};CW.sdkStreamMixin=W9;var HW=($)=>typeof Blob==="function"&&$ instanceof Blob});var bW=M((SW)=>{Object.defineProperty(SW,"__esModule",{value:!0});SW.sdkStreamMixin=void 0;var Z9=BW(),w9=X9(),P$=import.meta.require("stream"),L9=import.meta.require("util"),Y9=PW(),jW="The stream has already been transformed.",Q9=($)=>{var U,G;if(!($ instanceof P$.Readable))try{return Y9.sdkStreamMixin($)}catch(Z){const w=((G=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||G===void 0?void 0:G.name)||$;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${w}`)}let W=!1;const X=async()=>{if(W)throw new Error(jW);return W=!0,await Z9.streamCollector($)};return Object.assign($,{transformToByteArray:X,transformToString:async(Z)=>{const w=await X();if(Z===void 0||Buffer.isEncoding(Z))return w9.fromArrayBuffer(w.buffer,w.byteOffset,w.byteLength).toString(Z);else return new L9.TextDecoder(Z).decode(w)},transformToWebStream:()=>{if(W)throw new Error(jW);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof P$.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return W=!0,P$.Readable.toWeb($)}})};SW.sdkStreamMixin=Q9});var xW=M((DW)=>{async function F9($){if(typeof $.stream==="function")$=$.stream();return $.tee()}Object.defineProperty(DW,"__esModule",{value:!0});DW.splitStream=void 0;DW.splitStream=F9});var uW=M((cW)=>{async function I9($){if(J9.isReadableStream($))return z9.splitStream($);const U=new vW.PassThrough,G=new vW.PassThrough;return $.pipe(U),$.pipe(G),[U,G]}Object.defineProperty(cW,"__esModule",{value:!0});cW.splitStream=void 0;var vW=import.meta.require("stream"),z9=xW(),J9=u0();cW.splitStream=I9});var dW=M((_W)=>{async function R9($,U){var G;let W=0;const X=[],Z=$.getReader();let w=!1;while(!w){const{done:Q,value:F}=await Z.read();if(F)X.push(F),W+=(G=F===null||F===void 0?void 0:F.byteLength)!==null&&G!==void 0?G:0;if(W>=U)break;w=Q}Z.releaseLock();const L=new Uint8Array(Math.min(U,W));let Y=0;for(let Q of X){if(Q.byteLength>L.byteLength-Y){L.set(Q.subarray(0,L.byteLength-Y),Y);break}else L.set(Q,Y);Y+=Q.length}return L}Object.defineProperty(_W,"__esModule",{value:!0});_W.headStream=void 0;_W.headStream=R9});var mW=M((sW)=>{Object.defineProperty(sW,"__esModule",{value:!0});sW.headStream=void 0;var K9=import.meta.require("stream"),M9=dW(),E9=u0(),B9=($,U)=>{if(E9.isReadableStream($))return M9.headStream($,U);return new Promise((G,W)=>{const X=new gW;X.limit=U,$.pipe(X),$.on("error",(Z)=>{X.end(),W(Z)}),X.on("error",W),X.on("finish",function(){const Z=new Uint8Array(Buffer.concat(this.buffers));G(Z)})})};sW.headStream=B9;class gW extends K9.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write($,U,G){var W;if(this.buffers.push($),this.bytesBuffered+=(W=$.byteLength)!==null&&W!==void 0?W:0,this.bytesBuffered>=this.limit){const X=this.bytesBuffered-this.limit,Z=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=Z.subarray(0,Z.byteLength-X),this.emit("finish")}G()}}});var tW=M((OI,z0)=>{var rW=function($,U="utf-8"){if(U==="base64")return nW.toBase64($);return iW.toUtf8($)},oW=function($,U){if(U==="base64")return S$.mutate(nW.fromBase64($));return S$.mutate(iW.fromUtf8($))},M1=Object.defineProperty,V9=Object.getOwnPropertyDescriptor,f9=Object.getOwnPropertyNames,T9=Object.prototype.hasOwnProperty,k$=($,U)=>M1($,"name",{value:U,configurable:!0}),O9=($,U)=>{for(var G in U)M1($,G,{get:U[G],enumerable:!0})},j$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of f9(U))if(!T9.call($,X)&&X!==G)M1($,X,{get:()=>U[X],enumerable:!(W=V9(U,X))||W.enumerable})}return $},_0=($,U,G)=>(j$($,U,"default"),G&&j$(G,U,"default")),H9=($)=>j$(M1({},"__esModule",{value:!0}),$),F0={};O9(F0,{Uint8ArrayBlobAdapter:()=>S$});z0.exports=H9(F0);var nW=AW(),iW=f0();k$(rW,"transformToString");k$(oW,"transformFromString");var aW=class $ extends Uint8Array{static fromString(U,G="utf-8"){switch(typeof U){case"string":return oW(U,G);default:throw new Error(`Unsupported conversion from ${typeof U} to Uint8ArrayBlobAdapter.`)}}static mutate(U){return Object.setPrototypeOf(U,$.prototype),U}transformToString(U="utf-8"){return rW(this,U)}};k$(aW,"Uint8ArrayBlobAdapter");var S$=aW;_0(F0,e8(),z0.exports);_0(F0,bW(),z0.exports);_0(F0,uW(),z0.exports);_0(F0,mW(),z0.exports);_0(F0,u0(),z0.exports)});var A0=M((HI,TX)=>{var JX=function($){const U=$.getUTCFullYear(),G=$.getUTCMonth(),W=$.getUTCDay(),X=$.getUTCDate(),Z=$.getUTCHours(),w=$.getUTCMinutes(),L=$.getUTCSeconds(),Y=X<10?`0${X}`:`${X}`,Q=Z<10?`0${Z}`:`${Z}`,F=w<10?`0${w}`:`${w}`,z=L<10?`0${L}`:`${L}`;return`${a9[W]}, ${Y} ${d$[G]} ${U} ${Q}:${F}:${z} GMT`},V1=function($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})},g$=function($,U,G){let W,X,Z;if(typeof U==="undefined"&&typeof G==="undefined")W={},Z=$;else if(W=$,typeof U==="function")return X=U,Z=G,SY(W,X,Z);else Z=U;for(let w of Object.keys(Z)){if(!Array.isArray(Z[w])){W[w]=Z[w];continue}VX(W,null,Z,w)}return W},fX=function($,U,G){if(G<=0||!Number.isInteger(G))throw new Error("Invalid number of delimiters ("+G+") for splitEvery.");const W=$.split(U);if(G===1)return W;const X=[];let Z="";for(let w=0;w<W.length;w++){if(Z==="")Z=W[w];else Z+=U+W[w];if((w+1)%G===0)X.push(Z),Z=""}if(Z!=="")X.push(Z);return X},f1=Object.defineProperty,A9=Object.getOwnPropertyDescriptor,q9=Object.getOwnPropertyNames,C9=Object.prototype.hasOwnProperty,R=($,U)=>f1($,"name",{value:U,configurable:!0}),N9=($,U)=>{for(var G in U)f1($,G,{get:U[G],enumerable:!0})},P9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of q9(U))if(!C9.call($,X)&&X!==G)f1($,X,{get:()=>U[X],enumerable:!(W=A9(U,X))||W.enumerable})}return $},j9=($)=>P9(f1({},"__esModule",{value:!0}),$),$X={};N9($X,{Client:()=>k9,Command:()=>ZX,LazyJsonString:()=>NY,NoOpLogger:()=>S9,SENSITIVE_STRING:()=>h9,ServiceException:()=>KY,StringWrapper:()=>l0,_json:()=>y$,collectBody:()=>b9,convertMap:()=>PY,createAggregatedClient:()=>x9,dateToUtcString:()=>JX,decorateServiceException:()=>RX,emitWarningIfUnsupportedVersion:()=>VY,expectBoolean:()=>c9,expectByte:()=>c$,expectFloat32:()=>E1,expectInt:()=>u9,expectInt32:()=>x$,expectLong:()=>g0,expectNonNull:()=>p9,expectNumber:()=>d0,expectObject:()=>LX,expectShort:()=>v$,expectString:()=>d9,expectUnion:()=>g9,extendedEncodeURIComponent:()=>V1,getArrayIfSingleItem:()=>CY,getDefaultClientConfiguration:()=>AY,getDefaultExtensionConfiguration:()=>MX,getValueFromTextNode:()=>EX,handleFloat:()=>m9,limitedParseDouble:()=>p$,limitedParseFloat:()=>n9,limitedParseFloat32:()=>i9,loadConfigsForDefaultMode:()=>BY,logger:()=>s0,map:()=>g$,parseBoolean:()=>v9,parseEpochTimestamp:()=>wY,parseRfc3339DateTime:()=>e9,parseRfc3339DateTimeWithOffset:()=>UY,parseRfc7231DateTime:()=>ZY,resolveDefaultRuntimeConfig:()=>qY,resolvedPath:()=>DY,serializeDateTime:()=>xY,serializeFloat:()=>hY,splitEvery:()=>fX,strictParseByte:()=>zX,strictParseDouble:()=>_$,strictParseFloat:()=>s9,strictParseFloat32:()=>YX,strictParseInt:()=>r9,strictParseInt32:()=>o9,strictParseLong:()=>FX,strictParseShort:()=>T0,take:()=>jY,throwDefaultError:()=>KX,withBaseException:()=>MY});TX.exports=j9($X);var UX=class ${trace(){}debug(){}info(){}warn(){}error(){}};R(UX,"NoOpLogger");var S9=UX,GX=o8(),WX=class ${constructor(U){this.config=U,this.middlewareStack=GX.constructStack()}send(U,G,W){const X=typeof G!=="function"?G:void 0,Z=typeof G==="function"?G:W,w=X===void 0&&this.config.cacheMiddleware===!0;let L;if(w){if(!this.handlers)this.handlers=new WeakMap;const Y=this.handlers;if(Y.has(U.constructor))L=Y.get(U.constructor);else L=U.resolveMiddleware(this.middlewareStack,this.config,X),Y.set(U.constructor,L)}else delete this.handlers,L=U.resolveMiddleware(this.middlewareStack,this.config,X);if(Z)L(U).then((Y)=>Z(null,Y.output),(Y)=>Z(Y)).catch(()=>{});else return L(U).then((Y)=>Y.output)}destroy(){var U,G,W;(W=(G=(U=this.config)==null?void 0:U.requestHandler)==null?void 0:G.destroy)==null||W.call(G),delete this.handlers}};R(WX,"Client");var k9=WX,b$=tW(),b9=R(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return b$.Uint8ArrayBlobAdapter.mutate($);if(!$)return b$.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const G=U.streamCollector($);return b$.Uint8ArrayBlobAdapter.mutate(await G)},"collectBody"),h$=D0(),XX=class ${constructor(){this.middlewareStack=GX.constructStack()}static classBuilder(){return new D9}resolveMiddlewareWithContext(U,G,W,{middlewareFn:X,clientName:Z,commandName:w,inputFilterSensitiveLog:L,outputFilterSensitiveLog:Y,smithyContext:Q,additionalContext:F,CommandCtor:z}){for(let E of X.bind(this)(z,U,G,W))this.middlewareStack.use(E);const J=U.concat(this.middlewareStack),{logger:I}=G,K={logger:I,clientName:Z,commandName:w,inputFilterSensitiveLog:L,outputFilterSensitiveLog:Y,[h$.SMITHY_CONTEXT_KEY]:{commandInstance:this,...Q},...F},{requestHandler:B}=G;return J.resolve((E)=>B.handle(E.request,W||{}),K)}};R(XX,"Command");var ZX=XX,wX=class ${constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(U)=>U,this._outputFilterSensitiveLog=(U)=>U,this._serializer=null,this._deserializer=null}init(U){this._init=U}ep(U){return this._ep=U,this}m(U){return this._middlewareFn=U,this}s(U,G,W={}){return this._smithyContext={service:U,operation:G,...W},this}c(U={}){return this._additionalContext=U,this}n(U,G){return this._clientName=U,this._commandName=G,this}f(U=(W)=>W,G=(W)=>W){return this._inputFilterSensitiveLog=U,this._outputFilterSensitiveLog=G,this}ser(U){return this._serializer=U,this}de(U){return this._deserializer=U,this}build(){var U;const G=this;let W;return W=(U=class extends ZX{constructor(...[X]){super();this.serialize=G._serializer,this.deserialize=G._deserializer,this.input=X??{},G._init(this)}static getEndpointParameterInstructions(){return G._ep}resolveMiddleware(X,Z,w){return this.resolveMiddlewareWithContext(X,Z,w,{CommandCtor:W,middlewareFn:G._middlewareFn,clientName:G._clientName,commandName:G._commandName,inputFilterSensitiveLog:G._inputFilterSensitiveLog,outputFilterSensitiveLog:G._outputFilterSensitiveLog,smithyContext:G._smithyContext,additionalContext:G._additionalContext})}},R(U,"CommandRef"),U)}};R(wX,"ClassBuilder");var D9=wX,h9="***SensitiveInformation***",x9=R(($,U)=>{for(let G of Object.keys($)){const W=$[G],X=R(async function(w,L,Y){const Q=new W(w);if(typeof L==="function")this.send(Q,L);else if(typeof Y==="function"){if(typeof L!=="object")throw new Error(`Expected http options but got ${typeof L}`);this.send(Q,L||{},Y)}else return this.send(Q,L)},"methodImpl"),Z=(G[0].toLowerCase()+G.slice(1)).replace(/Command$/,"");U.prototype[Z]=X}},"createAggregatedClient"),v9=R(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),c9=R(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)s0.warn(B1(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const U=$.toLowerCase();if(U==="false"||U==="true")s0.warn(B1(`Expected boolean, got ${typeof $}: ${$}`));if(U==="false")return!1;if(U==="true")return!0}if(typeof $==="boolean")return $;throw new TypeError(`Expected boolean, got ${typeof $}: ${$}`)},"expectBoolean"),d0=R(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))s0.warn(B1(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),y9=Math.ceil(340282346638528860000000000000000000000),E1=R(($)=>{const U=d0($);if(U!==void 0&&!Number.isNaN(U)&&U!==Infinity&&U!==(-Infinity)){if(Math.abs(U)>y9)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),g0=R(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),u9=g0,x$=R(($)=>u$($,32),"expectInt32"),v$=R(($)=>u$($,16),"expectShort"),c$=R(($)=>u$($,8),"expectByte"),u$=R(($,U)=>{const G=g0($);if(G!==void 0&&_9(G,U)!==G)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return G},"expectSizedInt"),_9=R(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),p9=R(($,U)=>{if($===null||$===void 0){if(U)throw new TypeError(`Expected a non-null value for ${U}`);throw new TypeError("Expected a non-null value")}return $},"expectNonNull"),LX=R(($)=>{if($===null||$===void 0)return;if(typeof $==="object"&&!Array.isArray($))return $;const U=Array.isArray($)?"array":typeof $;throw new TypeError(`Expected object, got ${U}: ${$}`)},"expectObject"),d9=R(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return s0.warn(B1(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),g9=R(($)=>{if($===null||$===void 0)return;const U=LX($),G=Object.entries(U).filter(([,W])=>W!=null).map(([W])=>W);if(G.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(G.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${G} were not null.`);return U},"expectUnion"),_$=R(($)=>{if(typeof $=="string")return d0(H0($));return d0($)},"strictParseDouble"),s9=_$,YX=R(($)=>{if(typeof $=="string")return E1(H0($));return E1($)},"strictParseFloat32"),l9=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,H0=R(($)=>{const U=$.match(l9);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),p$=R(($)=>{if(typeof $=="string")return QX($);return d0($)},"limitedParseDouble"),m9=p$,n9=p$,i9=R(($)=>{if(typeof $=="string")return QX($);return E1($)},"limitedParseFloat32"),QX=R(($)=>{switch($){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),FX=R(($)=>{if(typeof $==="string")return g0(H0($));return g0($)},"strictParseLong"),r9=FX,o9=R(($)=>{if(typeof $==="string")return x$(H0($));return x$($)},"strictParseInt32"),T0=R(($)=>{if(typeof $==="string")return v$(H0($));return v$($)},"strictParseShort"),zX=R(($)=>{if(typeof $==="string")return c$(H0($));return c$($)},"strictParseByte"),B1=R(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),s0={warn:console.warn},a9=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],d$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];R(JX,"dateToUtcString");var t9=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),e9=R(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=t9.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,X,Z,w,L,Y,Q]=U,F=T0(O0(W)),z=i(X,"month",1,12),J=i(Z,"day",1,31);return p0(F,z,J,{hours:w,minutes:L,seconds:Y,fractionalMilliseconds:Q})},"parseRfc3339DateTime"),$Y=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),UY=R(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=$Y.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,X,Z,w,L,Y,Q,F]=U,z=T0(O0(W)),J=i(X,"month",1,12),I=i(Z,"day",1,31),K=p0(z,J,I,{hours:w,minutes:L,seconds:Y,fractionalMilliseconds:Q});if(F.toUpperCase()!="Z")K.setTime(K.getTime()-RY(F));return K},"parseRfc3339DateTimeWithOffset"),GY=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),WY=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),XY=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),ZY=R(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=GY.exec($);if(U){const[G,W,X,Z,w,L,Y,Q]=U;return p0(T0(O0(Z)),D$(X),i(W,"day",1,31),{hours:w,minutes:L,seconds:Y,fractionalMilliseconds:Q})}if(U=WY.exec($),U){const[G,W,X,Z,w,L,Y,Q]=U;return QY(p0(LY(Z),D$(X),i(W,"day",1,31),{hours:w,minutes:L,seconds:Y,fractionalMilliseconds:Q}))}if(U=XY.exec($),U){const[G,W,X,Z,w,L,Y,Q]=U;return p0(T0(O0(Q)),D$(W),i(X.trimLeft(),"day",1,31),{hours:Z,minutes:w,seconds:L,fractionalMilliseconds:Y})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),wY=R(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=_$($);else if(typeof $==="object"&&$.tag===1)U=$.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(U)||U===Infinity||U===(-Infinity))throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(U*1000))},"parseEpochTimestamp"),p0=R(($,U,G,W)=>{const X=U-1;return zY($,X,G),new Date(Date.UTC($,X,G,i(W.hours,"hour",0,23),i(W.minutes,"minute",0,59),i(W.seconds,"seconds",0,60),IY(W.fractionalMilliseconds)))},"buildDate"),LY=R(($)=>{const U=(new Date()).getUTCFullYear(),G=Math.floor(U/100)*100+T0(O0($));if(G<U)return G+100;return G},"parseTwoDigitYear"),YY=1576800000000,QY=R(($)=>{if($.getTime()-(new Date()).getTime()>YY)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),D$=R(($)=>{const U=d$.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),FY=[31,28,31,30,31,30,31,31,30,31,30,31],zY=R(($,U,G)=>{let W=FY[U];if(U===1&&JY($))W=29;if(G>W)throw new TypeError(`Invalid day for ${d$[U]} in ${$}: ${G}`)},"validateDayOfMonth"),JY=R(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),i=R(($,U,G,W)=>{const X=zX(O0($));if(X<G||X>W)throw new TypeError(`${U} must be between ${G} and ${W}, inclusive`);return X},"parseDateValue"),IY=R(($)=>{if($===null||$===void 0)return 0;return YX("0."+$)*1000},"parseMilliseconds"),RY=R(($)=>{const U=$[0];let G=1;if(U=="+")G=1;else if(U=="-")G=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);const W=Number($.substring(1,3)),X=Number($.substring(4,6));return G*(W*60+X)*60*1000},"parseOffsetToMilliseconds"),O0=R(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),IX=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};R(IX,"ServiceException");var KY=IX,RX=R(($,U={})=>{Object.entries(U).filter(([,W])=>W!==void 0).forEach(([W,X])=>{if($[W]==null||$[W]==="")$[W]=X});const G=$.message||$.Message||"UnknownError";return $.message=G,delete $.Message,$},"decorateServiceException"),KX=R(({output:$,parsedBody:U,exceptionCtor:G,errorCode:W})=>{const X=EY($),Z=X.httpStatusCode?X.httpStatusCode+"":void 0,w=new G({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||W||Z||"UnknownError",$fault:"client",$metadata:X});throw RX(w,U)},"throwDefaultError"),MY=R(($)=>{return({output:U,parsedBody:G,errorCode:W})=>{KX({output:U,parsedBody:G,exceptionCtor:$,errorCode:W})}},"withBaseException"),EY=R(($)=>({httpStatusCode:$.statusCode,requestId:$.headers["x-amzn-requestid"]??$.headers["x-amzn-request-id"]??$.headers["x-amz-request-id"],extendedRequestId:$.headers["x-amz-id-2"],cfId:$.headers["x-amz-cf-id"]}),"deserializeMetadata"),BY=R(($)=>{switch($){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),eW=!1,VY=R(($)=>{if($&&!eW&&parseInt($.substring(1,$.indexOf(".")))<16)eW=!0},"emitWarningIfUnsupportedVersion"),fY=R(($)=>{const U=[];for(let G in h$.AlgorithmId){const W=h$.AlgorithmId[G];if($[W]===void 0)continue;U.push({algorithmId:()=>W,checksumConstructor:()=>$[W]})}return{_checksumAlgorithms:U,addChecksumAlgorithm(G){this._checksumAlgorithms.push(G)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),TY=R(($)=>{const U={};return $.checksumAlgorithms().forEach((G)=>{U[G.algorithmId()]=G.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),OY=R(($)=>{let U=$.retryStrategy;return{setRetryStrategy(G){U=G},retryStrategy(){return U}}},"getRetryConfiguration"),HY=R(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),MX=R(($)=>{return{...fY($),...OY($)}},"getDefaultExtensionConfiguration"),AY=MX,qY=R(($)=>{return{...TY($),...HY($)}},"resolveDefaultRuntimeConfig");R(V1,"extendedEncodeURIComponent");var CY=R(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),EX=R(($)=>{for(let G in $)if($.hasOwnProperty(G)&&$[G]["#text"]!==void 0)$[G]=$[G]["#text"];else if(typeof $[G]==="object"&&$[G]!==null)$[G]=EX($[G]);return $},"getValueFromTextNode"),l0=R(function(){const $=Object.getPrototypeOf(this).constructor,G=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(G,$.prototype),G},"StringWrapper");l0.prototype=Object.create(String.prototype,{constructor:{value:l0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(l0,String);var BX=class $ extends l0{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(U){if(U instanceof $)return U;else if(U instanceof String||typeof U==="string")return new $(U);return new $(JSON.stringify(U))}};R(BX,"LazyJsonString");var NY=BX;R(g$,"map");var PY=R(($)=>{const U={};for(let[G,W]of Object.entries($||{}))U[G]=[,W];return U},"convertMap"),jY=R(($,U)=>{const G={};for(let W in U)VX(G,$,U,W);return G},"take"),SY=R(($,U,G)=>{return g$($,Object.entries(G).reduce((W,[X,Z])=>{if(Array.isArray(Z))W[X]=Z;else if(typeof Z==="function")W[X]=[U,Z()];else W[X]=[U,Z];return W},{}))},"mapWithFilter"),VX=R(($,U,G,W)=>{if(U!==null){let w=G[W];if(typeof w==="function")w=[,w];const[L=kY,Y=bY,Q=W]=w;if(typeof L==="function"&&L(U[Q])||typeof L!=="function"&&!!L)$[W]=Y(U[Q]);return}let[X,Z]=G[W];if(typeof Z==="function"){let w;const L=X===void 0&&(w=Z())!=null,Y=typeof X==="function"&&!!X(void 0)||typeof X!=="function"&&!!X;if(L)$[W]=w;else if(Y)$[W]=Z()}else{const w=X===void 0&&Z!=null,L=typeof X==="function"&&!!X(Z)||typeof X!=="function"&&!!X;if(w||L)$[W]=Z}},"applyInstruction"),kY=R(($)=>$!=null,"nonNullish"),bY=R(($)=>$,"pass"),DY=R(($,U,G,W,X,Z)=>{if(U!=null&&U[G]!==void 0){const w=W();if(w.length<=0)throw new Error("Empty value provided for input HTTP label: "+G+".");$=$.replace(X,Z?w.split("/").map((L)=>V1(L)).join("/"):V1(w))}else throw new Error("No value provided for input HTTP label: "+G+".");return $},"resolvedPath"),hY=R(($)=>{if($!==$)return"NaN";switch($){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return $}},"serializeFloat"),xY=R(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),y$=R(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(y$);if(typeof $==="object"){const U={};for(let G of Object.keys($)){if($[G]==null)continue;U[G]=y$($[G])}return U}return $},"_json");R(fX,"splitEvery")});var AX=M((OX)=>{Object.defineProperty(OX,"__esModule",{value:!0});OX.isStreamingPayload=void 0;var vY=import.meta.require("stream"),cY=($)=>($===null||$===void 0?void 0:$.body)instanceof vY.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;OX.isStreamingPayload=cY});var dX=M((CI,pX)=>{var{defineProperty:T1,getOwnPropertyDescriptor:yY,getOwnPropertyNames:uY}=Object,_Y=Object.prototype.hasOwnProperty,j=($,U)=>T1($,"name",{value:U,configurable:!0}),pY=($,U)=>{for(var G in U)T1($,G,{get:U[G],enumerable:!0})},dY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of uY(U))if(!_Y.call($,X)&&X!==G)T1($,X,{get:()=>U[X],enumerable:!(W=yY(U,X))||W.enumerable})}return $},gY=($)=>dY(T1({},"__esModule",{value:!0}),$),CX={};pY(CX,{AdaptiveRetryStrategy:()=>mY,CONFIG_MAX_ATTEMPTS:()=>l$,CONFIG_RETRY_MODE:()=>xX,ENV_MAX_ATTEMPTS:()=>s$,ENV_RETRY_MODE:()=>hX,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>nY,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>rY,StandardRetryStrategy:()=>bX,defaultDelayDecider:()=>PX,defaultRetryDecider:()=>jX,getOmitRetryHeadersPlugin:()=>oY,getRetryAfterHint:()=>_X,getRetryPlugin:()=>G7,omitRetryHeadersMiddleware:()=>vX,omitRetryHeadersMiddlewareOptions:()=>cX,resolveRetryConfig:()=>iY,retryMiddleware:()=>yX,retryMiddlewareOptions:()=>uX});pX.exports=gY(CX);var q0=Q0(),NX=X$(),C=l8(),sY=j(($,U)=>{const G=$,W=(U==null?void 0:U.noRetryIncrement)??C.NO_RETRY_INCREMENT,X=(U==null?void 0:U.retryCost)??C.RETRY_COST,Z=(U==null?void 0:U.timeoutRetryCost)??C.TIMEOUT_RETRY_COST;let w=$;const L=j((z)=>z.name==="TimeoutError"?Z:X,"getCapacityAmount"),Y=j((z)=>L(z)<=w,"hasRetryTokens");return Object.freeze({hasRetryTokens:Y,retrieveRetryTokens:j((z)=>{if(!Y(z))throw new Error("No retry token available");const J=L(z);return w-=J,J},"retrieveRetryTokens"),releaseRetryTokens:j((z)=>{w+=z??W,w=Math.min(w,G)},"releaseRetryTokens")})},"getDefaultRetryQuota"),PX=j(($,U)=>Math.floor(Math.min(C.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),e=V$(),jX=j(($)=>{if(!$)return!1;return e.isRetryableByTrait($)||e.isClockSkewError($)||e.isThrottlingError($)||e.isTransientError($)},"defaultRetryDecider"),SX=j(($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)},"asSdkError"),kX=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode=C.RETRY_MODES.STANDARD,this.retryDecider=(G==null?void 0:G.retryDecider)??jX,this.delayDecider=(G==null?void 0:G.delayDecider)??PX,this.retryQuota=(G==null?void 0:G.retryQuota)??sY(C.INITIAL_RETRY_TOKENS)}shouldRetry(U,G,W){return G<W&&this.retryDecider(U)&&this.retryQuota.hasRetryTokens(U)}async getMaxAttempts(){let U;try{U=await this.maxAttemptsProvider()}catch(G){U=C.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,G,W){let X,Z=0,w=0;const L=await this.getMaxAttempts(),{request:Y}=G;if(q0.HttpRequest.isInstance(Y))Y.headers[C.INVOCATION_ID_HEADER]=NX.v4();while(!0)try{if(q0.HttpRequest.isInstance(Y))Y.headers[C.REQUEST_HEADER]=`attempt=${Z+1}; max=${L}`;if(W==null?void 0:W.beforeRequest)await W.beforeRequest();const{response:Q,output:F}=await U(G);if(W==null?void 0:W.afterRequest)W.afterRequest(Q);return this.retryQuota.releaseRetryTokens(X),F.$metadata.attempts=Z+1,F.$metadata.totalRetryDelay=w,{response:Q,output:F}}catch(Q){const F=SX(Q);if(Z++,this.shouldRetry(F,Z,L)){X=this.retryQuota.retrieveRetryTokens(F);const z=this.delayDecider(e.isThrottlingError(F)?C.THROTTLING_RETRY_DELAY_BASE:C.DEFAULT_RETRY_DELAY_BASE,Z),J=lY(F.$response),I=Math.max(J||0,z);w+=I,await new Promise((K)=>setTimeout(K,I));continue}if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=Z,F.$metadata.totalRetryDelay=w,F}}};j(kX,"StandardRetryStrategy");var bX=kX,lY=j(($)=>{if(!q0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return W*1000;return new Date(G).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),DX=class $ extends bX{constructor(U,G){const{rateLimiter:W,...X}=G??{};super(U,X);this.rateLimiter=W??new C.DefaultRateLimiter,this.mode=C.RETRY_MODES.ADAPTIVE}async retry(U,G){return super.retry(U,G,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(W)=>{this.rateLimiter.updateClientSendingRate(W)}})}};j(DX,"AdaptiveRetryStrategy");var mY=DX,qX=n(),s$="AWS_MAX_ATTEMPTS",l$="max_attempts",nY={environmentVariableSelector:($)=>{const U=$[s$];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${s$} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[l$];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${l$} mast be a number, got "${U}"`);return G},default:C.DEFAULT_MAX_ATTEMPTS},iY=j(($)=>{const{retryStrategy:U}=$,G=qX.normalizeProvider($.maxAttempts??C.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await qX.normalizeProvider($.retryMode)()===C.RETRY_MODES.ADAPTIVE)return new C.AdaptiveRetryStrategy(G);return new C.StandardRetryStrategy(G)}}},"resolveRetryConfig"),hX="AWS_RETRY_MODE",xX="retry_mode",rY={environmentVariableSelector:($)=>$[hX],configFileSelector:($)=>$[xX],default:C.DEFAULT_RETRY_MODE},vX=j(()=>($)=>async(U)=>{const{request:G}=U;if(q0.HttpRequest.isInstance(G))delete G.headers[C.INVOCATION_ID_HEADER],delete G.headers[C.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),cX={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},oY=j(($)=>({applyToStack:(U)=>{U.addRelativeTo(vX(),cX)}}),"getOmitRetryHeadersPlugin"),aY=A0(),tY=AX(),yX=j(($)=>(U,G)=>async(W)=>{var X;let Z=await $.retryStrategy();const w=await $.maxAttempts();if(eY(Z)){Z=Z;let L=await Z.acquireInitialRetryToken(G.partition_id),Y=new Error,Q=0,F=0;const{request:z}=W,J=q0.HttpRequest.isInstance(z);if(J)z.headers[C.INVOCATION_ID_HEADER]=NX.v4();while(!0)try{if(J)z.headers[C.REQUEST_HEADER]=`attempt=${Q+1}; max=${w}`;const{response:I,output:K}=await U(W);return Z.recordSuccess(L),K.$metadata.attempts=Q+1,K.$metadata.totalRetryDelay=F,{response:I,output:K}}catch(I){const K=$7(I);if(Y=SX(I),J&&tY.isStreamingPayload(z))throw(X=G.logger instanceof aY.NoOpLogger?console:G.logger)==null||X.warn("An error was encountered in a non-retryable streaming request."),Y;try{L=await Z.refreshRetryTokenForRetry(L,K)}catch(E){if(!Y.$metadata)Y.$metadata={};throw Y.$metadata.attempts=Q+1,Y.$metadata.totalRetryDelay=F,Y}Q=L.getRetryCount();const B=L.getRetryDelay();F+=B,await new Promise((E)=>setTimeout(E,B))}}else{if(Z=Z,Z==null?void 0:Z.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",Z.mode]];return Z.retry(U,W)}},"retryMiddleware"),eY=j(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),$7=j(($)=>{const U={error:$,errorType:U7($)},G=_X($.$response);if(G)U.retryAfterHint=G;return U},"getRetryErrorInfo"),U7=j(($)=>{if(e.isThrottlingError($))return"THROTTLING";if(e.isTransientError($))return"TRANSIENT";if(e.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),uX={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},G7=j(($)=>({applyToStack:(U)=>{U.add(yX($),uX)}}),"getRetryPlugin"),_X=j(($)=>{if(!q0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)},"getRetryAfterHint")});var n$=M((NI,L4)=>{var lX=function($){const U=new Map;for(let G of $)U.set(G.schemeId,G);return U},W4=function($,U){return new Z4($,U)},w4=function($,U,G,W,X){return q(async function*Z(w,L,...Y){let Q=w.startingToken||void 0,F=!0,z;while(F){if(L[G]=Q,X)L[X]=L[X]??w.pageSize;if(w.client instanceof $)z=await C7(U,w.client,L,...Y);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield z;const J=Q;Q=N7(z,W),F=!!(Q&&(!w.stopOnSameToken||Q!==J))}return},"paginateOperation")},H1=Object.defineProperty,W7=Object.getOwnPropertyDescriptor,X7=Object.getOwnPropertyNames,Z7=Object.prototype.hasOwnProperty,q=($,U)=>H1($,"name",{value:U,configurable:!0}),w7=($,U)=>{for(var G in U)H1($,G,{get:U[G],enumerable:!0})},L7=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of X7(U))if(!Z7.call($,X)&&X!==G)H1($,X,{get:()=>U[X],enumerable:!(W=W7(U,X))||W.enumerable})}return $},Y7=($)=>L7(H1({},"__esModule",{value:!0}),$),gX={};w7(gX,{DefaultIdentityProviderConfig:()=>E7,EXPIRATION_MS:()=>U4,HttpApiKeyAuthSigner:()=>B7,HttpBearerAuthSigner:()=>V7,NoAuthSigner:()=>f7,RequestBuilder:()=>Z4,createIsIdentityExpiredFunction:()=>$4,createPaginator:()=>w4,doesIdentityRequireRefresh:()=>G4,getHttpAuthSchemeEndpointRuleSetPlugin:()=>F7,getHttpAuthSchemePlugin:()=>J7,getHttpSigningPlugin:()=>M7,getSmithyContext:()=>H7,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>mX,httpAuthSchemeMiddleware:()=>m$,httpAuthSchemeMiddlewareOptions:()=>nX,httpSigningMiddleware:()=>iX,httpSigningMiddlewareOptions:()=>rX,isIdentityExpired:()=>T7,memoizeIdentityProvider:()=>O7,normalizeProvider:()=>A7,requestBuilder:()=>W4});L4.exports=Y7(gX);var sX=n();q(lX,"convertHttpAuthSchemesToMap");var m$=q(($,U)=>(G,W)=>async(X)=>{var Z;const w=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,W,X.input)),L=lX($.httpAuthSchemes),Y=sX.getSmithyContext(W),Q=[];for(let F of w){const z=L.get(F.schemeId);if(!z){Q.push(`HttpAuthScheme \`${F.schemeId}\` was not enabled for this service.`);continue}const J=z.identityProvider(await U.identityProviderConfigProvider($));if(!J){Q.push(`HttpAuthScheme \`${F.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:I={},signingProperties:K={}}=((Z=F.propertiesExtractor)==null?void 0:Z.call(F,$,W))||{};F.identityProperties=Object.assign(F.identityProperties||{},I),F.signingProperties=Object.assign(F.signingProperties||{},K),Y.selectedHttpAuthScheme={httpAuthOption:F,identity:await J(F.identityProperties),signer:z.signer};break}if(!Y.selectedHttpAuthScheme)throw new Error(Q.join("\n"));return G(X)},"httpAuthSchemeMiddleware"),Q7=N8(),mX={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Q7.endpointMiddlewareOptions.name},F7=q(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(m$($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),mX)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),z7=E$(),nX={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:z7.serializerMiddlewareOption.name},J7=q(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(m$($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),nX)}}),"getHttpAuthSchemePlugin"),A1=Q0(),I7=q(($)=>(U)=>{throw U},"defaultErrorHandler"),R7=q(($,U)=>{},"defaultSuccessHandler"),iX=q(($)=>(U,G)=>async(W)=>{if(!A1.HttpRequest.isInstance(W.request))return U(W);const Z=sX.getSmithyContext(G).selectedHttpAuthScheme;if(!Z)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:w={}},identity:L,signer:Y}=Z,Q=await U({...W,request:await Y.sign(W.request,L,w)}).catch((Y.errorHandler||I7)(w));return(Y.successHandler||R7)(Q.response,w),Q},"httpSigningMiddleware"),K7=dX(),rX={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:K7.retryMiddlewareOptions.name},M7=q(($)=>({applyToStack:(U)=>{U.addRelativeTo(iX($),rX)}}),"getHttpSigningPlugin"),oX=class ${constructor(U){this.authSchemes=new Map;for(let[G,W]of Object.entries(U))if(W!==void 0)this.authSchemes.set(G,W)}getIdentityProvider(U){return this.authSchemes.get(U)}};q(oX,"DefaultIdentityProviderConfig");var E7=oX,O1=D0(),aX=class ${async sign(U,G,W){if(!W)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!W.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!W.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!G.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const X=A1.HttpRequest.clone(U);if(W.in===O1.HttpApiKeyAuthLocation.QUERY)X.query[W.name]=G.apiKey;else if(W.in===O1.HttpApiKeyAuthLocation.HEADER)X.headers[W.name]=W.scheme?`${W.scheme} ${G.apiKey}`:G.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+W.in+"`");return X}};q(aX,"HttpApiKeyAuthSigner");var B7=aX,tX=class ${async sign(U,G,W){const X=A1.HttpRequest.clone(U);if(!G.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return X.headers.Authorization=`Bearer ${G.token}`,X}};q(tX,"HttpBearerAuthSigner");var V7=tX,eX=class ${async sign(U,G,W){return U}};q(eX,"NoAuthSigner");var f7=eX,$4=q(($)=>(U)=>G4(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),U4=300000,T7=$4(U4),G4=q(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),O7=q(($,U,G)=>{if($===void 0)return;const W=typeof $!=="function"?async()=>Promise.resolve($):$;let X,Z,w,L=!1;const Y=q(async(Q)=>{if(!Z)Z=W(Q);try{X=await Z,w=!0,L=!1}finally{Z=void 0}return X},"coalesceProvider");if(U===void 0)return async(Q)=>{if(!w||(Q==null?void 0:Q.forceRefresh))X=await Y(Q);return X};return async(Q)=>{if(!w||(Q==null?void 0:Q.forceRefresh))X=await Y(Q);if(L)return X;if(!G(X))return L=!0,X;if(U(X))return await Y(Q),X;return X}},"memoizeIdentityProvider"),H7=q(($)=>$[O1.SMITHY_CONTEXT_KEY]||($[O1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),A7=q(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),q7=A0();q(W4,"requestBuilder");var X4=class ${constructor(U,G){this.input=U,this.context=G,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:U,protocol:G="https",port:W,path:X}=await this.context.endpoint();this.path=X;for(let Z of this.resolvePathStack)Z(this.path);return new A1.HttpRequest({protocol:G,hostname:this.hostname||U,port:W,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(U){return this.hostname=U,this}bp(U){return this.resolvePathStack.push((G)=>{this.path=`${(G==null?void 0:G.endsWith("/"))?G.slice(0,-1):G||""}`+U}),this}p(U,G,W,X){return this.resolvePathStack.push((Z)=>{this.path=q7.resolvedPath(Z,this.input,U,G,W,X)}),this}h(U){return this.headers=U,this}q(U){return this.query=U,this}b(U){return this.body=U,this}m(U){return this.method=U,this}};q(X4,"RequestBuilder");var Z4=X4,C7=q(async($,U,G,...W)=>{return await U.send(new $(G),...W)},"makePagedClientRequest");q(w4,"createPaginator");var N7=q(($,U)=>{let G=$;const W=U.split(".");for(let X of W){if(!G||typeof G!=="object")return;G=G[X]}return G},"get")});var GZ=M((uB,UZ)=>{var{defineProperty:d1,getOwnPropertyDescriptor:FQ,getOwnPropertyNames:zQ}=Object,JQ=Object.prototype.hasOwnProperty,IQ=($,U)=>d1($,"name",{value:U,configurable:!0}),RQ=($,U)=>{for(var G in U)d1($,G,{get:U[G],enumerable:!0})},KQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of zQ(U))if(!JQ.call($,X)&&X!==G)d1($,X,{get:()=>U[X],enumerable:!(W=FQ(U,X))||W.enumerable})}return $},MQ=($)=>KQ(d1({},"__esModule",{value:!0}),$),$Z={};RQ($Z,{emitWarningIfUnsupportedVersion:()=>EQ});UZ.exports=MQ($Z);var e4=!1,EQ=IQ(($)=>{if($&&!e4&&parseInt($.substring(1,$.indexOf(".")))<18)e4=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
4
+ no longer support Node.js 16.x on January 6, 2025.
5
+
6
+ To continue receiving updates to AWS services, bug fixes, and security
7
+ updates please upgrade to a supported Node.js LTS version.
8
+
9
+ More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion")});var OZ=M((_B,TZ)=>{var BU=function($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break},i1=Object.defineProperty,fQ=Object.getOwnPropertyDescriptor,TQ=Object.getOwnPropertyNames,OQ=Object.prototype.hasOwnProperty,S=($,U)=>i1($,"name",{value:U,configurable:!0}),HQ=($,U)=>{for(var G in U)i1($,G,{get:U[G],enumerable:!0})},AQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of TQ(U))if(!OQ.call($,X)&&X!==G)i1($,X,{get:()=>U[X],enumerable:!(W=fQ(U,X))||W.enumerable})}return $},qQ=($)=>AQ(i1({},"__esModule",{value:!0}),$),LZ={};HQ(LZ,{SignatureV4:()=>aQ,clearCredentialCache:()=>dQ,createScope:()=>l1,getCanonicalHeaders:()=>EU,getCanonicalQuery:()=>KZ,getPayloadHash:()=>n1,getSigningKey:()=>RZ,moveHeadersToQuery:()=>VZ,prepareRequest:()=>VU});TZ.exports=qQ(LZ);var WZ=n(),RU=f0(),CQ="X-Amz-Algorithm",NQ="X-Amz-Credential",YZ="X-Amz-Date",PQ="X-Amz-SignedHeaders",jQ="X-Amz-Expires",QZ="X-Amz-Signature",FZ="X-Amz-Security-Token",zZ="authorization",JZ=YZ.toLowerCase(),SQ="date",kQ=[zZ,JZ,SQ],bQ=QZ.toLowerCase(),MU="x-amz-content-sha256",DQ=FZ.toLowerCase(),hQ={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},xQ=/^proxy-/,vQ=/^sec-/,KU="AWS4-HMAC-SHA256",cQ="AWS4-HMAC-SHA256-PAYLOAD",yQ="UNSIGNED-PAYLOAD",uQ=50,IZ="aws4_request",_Q=604800,G0=qW(),pQ=f0(),S0={},s1=[],l1=S(($,U,G)=>`${$}/${U}/${G}/${IZ}`,"createScope"),RZ=S(async($,U,G,W,X)=>{const Z=await XZ($,U.secretAccessKey,U.accessKeyId),w=`${G}:${W}:${X}:${G0.toHex(Z)}:${U.sessionToken}`;if(w in S0)return S0[w];s1.push(w);while(s1.length>uQ)delete S0[s1.shift()];let L=`AWS4${U.secretAccessKey}`;for(let Y of[G,W,X,IZ])L=await XZ($,L,Y);return S0[w]=L},"getSigningKey"),dQ=S(()=>{s1.length=0,Object.keys(S0).forEach(($)=>{delete S0[$]})},"clearCredentialCache"),XZ=S(($,U,G)=>{const W=new $(U);return W.update(pQ.toUint8Array(G)),W.digest()},"hmac"),EU=S(({headers:$},U,G)=>{const W={};for(let X of Object.keys($).sort()){if($[X]==null)continue;const Z=X.toLowerCase();if(Z in hQ||(U==null?void 0:U.has(Z))||xQ.test(Z)||vQ.test(Z)){if(!G||G&&!G.has(Z))continue}W[Z]=$[X].trim().replace(/\s+/g," ")}return W},"getCanonicalHeaders"),m1=BQ(),KZ=S(({query:$={}})=>{const U=[],G={};for(let W of Object.keys($)){if(W.toLowerCase()===bQ)continue;const X=m1.escapeUri(W);U.push(X);const Z=$[W];if(typeof Z==="string")G[X]=`${X}=${m1.escapeUri(Z)}`;else if(Array.isArray(Z))G[X]=Z.slice(0).reduce((w,L)=>w.concat([`${X}=${m1.escapeUri(L)}`]),[]).sort().join("&")}return U.sort().map((W)=>G[W]).filter((W)=>W).join("&")},"getCanonicalQuery"),gQ=VQ(),sQ=f0(),n1=S(async({headers:$,body:U},G)=>{for(let W of Object.keys($))if(W.toLowerCase()===MU)return $[W];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||gQ.isArrayBuffer(U)){const W=new G;return W.update(sQ.toUint8Array(U)),G0.toHex(await W.digest())}return yQ},"getPayloadHash"),ZZ=f0(),MZ=class ${format(U){const G=[];for(let Z of Object.keys(U)){const w=ZZ.fromUtf8(Z);G.push(Uint8Array.from([w.byteLength]),w,this.formatHeaderValue(U[Z]))}const W=new Uint8Array(G.reduce((Z,w)=>Z+w.byteLength,0));let X=0;for(let Z of G)W.set(Z,X),X+=Z.byteLength;return W}formatHeaderValue(U){switch(U.type){case"boolean":return Uint8Array.from([U.value?0:1]);case"byte":return Uint8Array.from([2,U.value]);case"short":const G=new DataView(new ArrayBuffer(3));return G.setUint8(0,3),G.setInt16(1,U.value,!1),new Uint8Array(G.buffer);case"integer":const W=new DataView(new ArrayBuffer(5));return W.setUint8(0,4),W.setInt32(1,U.value,!1),new Uint8Array(W.buffer);case"long":const X=new Uint8Array(9);return X[0]=5,X.set(U.value.bytes,1),X;case"binary":const Z=new DataView(new ArrayBuffer(3+U.value.byteLength));Z.setUint8(0,6),Z.setUint16(1,U.value.byteLength,!1);const w=new Uint8Array(Z.buffer);return w.set(U.value,3),w;case"string":const L=ZZ.fromUtf8(U.value),Y=new DataView(new ArrayBuffer(3+L.byteLength));Y.setUint8(0,7),Y.setUint16(1,L.byteLength,!1);const Q=new Uint8Array(Y.buffer);return Q.set(L,3),Q;case"timestamp":const F=new Uint8Array(9);return F[0]=8,F.set(nQ.fromNumber(U.value.valueOf()).bytes,1),F;case"uuid":if(!mQ.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const z=new Uint8Array(17);return z[0]=9,z.set(G0.fromHex(U.value.replace(/\-/g,"")),1),z}}};S(MZ,"HeaderFormatter");var lQ=MZ,mQ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,EZ=class ${constructor(U){if(this.bytes=U,U.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(U){if(U>9223372036854776000||U<-9223372036854776000)throw new Error(`${U} is too large (or, if negative, too small) to represent as an Int64`);const G=new Uint8Array(8);for(let W=7,X=Math.abs(Math.round(U));W>-1&&X>0;W--,X/=256)G[W]=X;if(U<0)BU(G);return new $(G)}valueOf(){const U=this.bytes.slice(0),G=U[0]&128;if(G)BU(U);return parseInt(G0.toHex(U),16)*(G?-1:1)}toString(){return String(this.valueOf())}};S(EZ,"Int64");var nQ=EZ;S(BU,"negate");var iQ=S(($,U)=>{$=$.toLowerCase();for(let G of Object.keys(U))if($===G.toLowerCase())return!0;return!1},"hasHeader"),BZ=Q0(),VZ=S(($,U={})=>{var G;const{headers:W,query:X={}}=BZ.HttpRequest.clone($);for(let Z of Object.keys(W)){const w=Z.toLowerCase();if(w.slice(0,6)==="x-amz-"&&!((G=U.unhoistableHeaders)==null?void 0:G.has(w)))X[Z]=W[Z],delete W[Z]}return{...$,headers:W,query:X}},"moveHeadersToQuery"),VU=S(($)=>{$=BZ.HttpRequest.clone($);for(let U of Object.keys($.headers))if(kQ.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),rQ=S(($)=>oQ($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),oQ=S(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),fZ=class ${constructor({applyChecksum:U,credentials:G,region:W,service:X,sha256:Z,uriEscapePath:w=!0}){this.headerFormatter=new lQ,this.service=X,this.sha256=Z,this.uriEscapePath=w,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=WZ.normalizeProvider(W),this.credentialProvider=WZ.normalizeProvider(G)}async presign(U,G={}){const{signingDate:W=new Date,expiresIn:X=3600,unsignableHeaders:Z,unhoistableHeaders:w,signableHeaders:L,signingRegion:Y,signingService:Q}=G,F=await this.credentialProvider();this.validateResolvedCredentials(F);const z=Y??await this.regionProvider(),{longDate:J,shortDate:I}=g1(W);if(X>_Q)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const K=l1(I,z,Q??this.service),B=VZ(VU(U),{unhoistableHeaders:w});if(F.sessionToken)B.query[FZ]=F.sessionToken;B.query[CQ]=KU,B.query[NQ]=`${F.accessKeyId}/${K}`,B.query[YZ]=J,B.query[jQ]=X.toString(10);const E=EU(B,Z,L);return B.query[PQ]=wZ(E),B.query[QZ]=await this.getSignature(J,K,this.getSigningKey(F,z,I,Q),this.createCanonicalRequest(B,E,await n1(U,this.sha256))),B}async sign(U,G){if(typeof U==="string")return this.signString(U,G);else if(U.headers&&U.payload)return this.signEvent(U,G);else if(U.message)return this.signMessage(U,G);else return this.signRequest(U,G)}async signEvent({headers:U,payload:G},{signingDate:W=new Date,priorSignature:X,signingRegion:Z,signingService:w}){const L=Z??await this.regionProvider(),{shortDate:Y,longDate:Q}=g1(W),F=l1(Y,L,w??this.service),z=await n1({headers:{},body:G},this.sha256),J=new this.sha256;J.update(U);const I=G0.toHex(await J.digest()),K=[cQ,Q,F,X,I,z].join("\n");return this.signString(K,{signingDate:W,signingRegion:L,signingService:w})}async signMessage(U,{signingDate:G=new Date,signingRegion:W,signingService:X}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:G,signingRegion:W,signingService:X,priorSignature:U.priorSignature}).then((w)=>{return{message:U.message,signature:w}})}async signString(U,{signingDate:G=new Date,signingRegion:W,signingService:X}={}){const Z=await this.credentialProvider();this.validateResolvedCredentials(Z);const w=W??await this.regionProvider(),{shortDate:L}=g1(G),Y=new this.sha256(await this.getSigningKey(Z,w,L,X));return Y.update(RU.toUint8Array(U)),G0.toHex(await Y.digest())}async signRequest(U,{signingDate:G=new Date,signableHeaders:W,unsignableHeaders:X,signingRegion:Z,signingService:w}={}){const L=await this.credentialProvider();this.validateResolvedCredentials(L);const Y=Z??await this.regionProvider(),Q=VU(U),{longDate:F,shortDate:z}=g1(G),J=l1(z,Y,w??this.service);if(Q.headers[JZ]=F,L.sessionToken)Q.headers[DQ]=L.sessionToken;const I=await n1(Q,this.sha256);if(!iQ(MU,Q.headers)&&this.applyChecksum)Q.headers[MU]=I;const K=EU(Q,X,W),B=await this.getSignature(F,J,this.getSigningKey(L,Y,z,w),this.createCanonicalRequest(Q,K,I));return Q.headers[zZ]=`${KU} Credential=${L.accessKeyId}/${J}, SignedHeaders=${wZ(K)}, Signature=${B}`,Q}createCanonicalRequest(U,G,W){const X=Object.keys(G).sort();return`${U.method}
10
+ ${this.getCanonicalPath(U)}
11
+ ${KZ(U)}
12
+ ${X.map((Z)=>`${Z}:${G[Z]}`).join("\n")}
13
+
14
+ ${X.join(";")}
15
+ ${W}`}async createStringToSign(U,G,W){const X=new this.sha256;X.update(RU.toUint8Array(W));const Z=await X.digest();return`${KU}
16
+ ${U}
17
+ ${G}
18
+ ${G0.toHex(Z)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){const G=[];for(let Z of U.split("/")){if((Z==null?void 0:Z.length)===0)continue;if(Z===".")continue;if(Z==="..")G.pop();else G.push(Z)}const W=`${(U==null?void 0:U.startsWith("/"))?"/":""}${G.join("/")}${G.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return m1.escapeUri(W).replace(/%2F/g,"/")}return U}async getSignature(U,G,W,X){const Z=await this.createStringToSign(U,G,X),w=new this.sha256(await W);return w.update(RU.toUint8Array(Z)),G0.toHex(await w.digest())}getSigningKey(U,G,W,X){return RZ(this.sha256,U,W,G,X||this.service)}validateResolvedCredentials(U){if(typeof U!=="object"||typeof U.accessKeyId!=="string"||typeof U.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};S(fZ,"SignatureV4");var aQ=fZ,g1=S(($)=>{const U=rQ($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),wZ=S(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var bZ=M((pB,kZ)=>{var{defineProperty:r1,getOwnPropertyDescriptor:tQ,getOwnPropertyNames:eQ}=Object,$F=Object.prototype.hasOwnProperty,D=($,U)=>r1($,"name",{value:U,configurable:!0}),UF=($,U)=>{for(var G in U)r1($,G,{get:U[G],enumerable:!0})},GF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of eQ(U))if(!$F.call($,X)&&X!==G)r1($,X,{get:()=>U[X],enumerable:!(W=tQ(U,X))||W.enumerable})}return $},WF=($)=>GF(r1({},"__esModule",{value:!0}),$),NZ={};UF(NZ,{AWSSDKSigV4Signer:()=>LF,AwsSdkSigV4ASigner:()=>QF,AwsSdkSigV4Signer:()=>OU,NODE_SIGV4A_CONFIG_OPTIONS:()=>JF,resolveAWSSDKSigV4Config:()=>IF,resolveAwsSdkSigV4AConfig:()=>zF,resolveAwsSdkSigV4Config:()=>SZ,validateSigningProperties:()=>TU});kZ.exports=WF(NZ);var XF=Q0(),ZF=Q0(),HZ=D(($)=>{var U,G;return ZF.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((G=$.headers)==null?void 0:G.Date):void 0},"getDateHeader"),fU=D(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),wF=D(($,U)=>Math.abs(fU(U).getTime()-$)>=300000,"isClockSkewed"),AZ=D(($,U)=>{const G=Date.parse($);if(wF(G,U))return G-Date.now();return U},"getUpdatedSystemClockOffset"),o0=D(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),TU=D(async($)=>{var U,G,W;const X=o0("context",$.context),Z=o0("config",$.config),w=(W=(G=(U=X.endpointV2)==null?void 0:U.properties)==null?void 0:G.authSchemes)==null?void 0:W[0],Y=await o0("signer",Z.signer)(w),Q=$==null?void 0:$.signingRegion,F=$==null?void 0:$.signingRegionSet,z=$==null?void 0:$.signingName;return{config:Z,signer:Y,signingRegion:Q,signingRegionSet:F,signingName:z}},"validateSigningProperties"),PZ=class ${async sign(U,G,W){var X;if(!XF.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const Z=await TU(W),{config:w,signer:L}=Z;let{signingRegion:Y,signingName:Q}=Z;const F=W.context;if(((X=F==null?void 0:F.authSchemes)==null?void 0:X.length)??0>1){const[J,I]=F.authSchemes;if((J==null?void 0:J.name)==="sigv4a"&&(I==null?void 0:I.name)==="sigv4")Y=(I==null?void 0:I.signingRegion)??Y,Q=(I==null?void 0:I.signingName)??Q}return await L.sign(U,{signingDate:fU(w.systemClockOffset),signingRegion:Y,signingService:Q})}errorHandler(U){return(G)=>{const W=G.ServerTime??HZ(G.$response);if(W){const X=o0("config",U.config),Z=X.systemClockOffset;if(X.systemClockOffset=AZ(W,X.systemClockOffset),X.systemClockOffset!==Z&&G.$metadata)G.$metadata.clockSkewCorrected=!0}throw G}}successHandler(U,G){const W=HZ(U);if(W){const X=o0("config",G.config);X.systemClockOffset=AZ(W,X.systemClockOffset)}}};D(PZ,"AwsSdkSigV4Signer");var OU=PZ,LF=OU,YF=Q0(),jZ=class $ extends OU{async sign(U,G,W){var X;if(!YF.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:Z,signer:w,signingRegion:L,signingRegionSet:Y,signingName:Q}=await TU(W),z=(await((X=Z.sigv4aSigningRegionSet)==null?void 0:X.call(Z))??Y??[L]).join(",");return await w.sign(U,{signingDate:fU(Z.systemClockOffset),signingRegion:z,signingService:Q})}};D(jZ,"AwsSdkSigV4ASigner");var QF=jZ,FF=n$(),qZ=Z$(),zF=D(($)=>{return $.sigv4aSigningRegionSet=FF.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),JF={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new qZ.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector($){if($.sigv4a_signing_region_set)return($.sigv4a_signing_region_set??"").split(",").map((U)=>U.trim());throw new qZ.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},K0=n$(),CZ=OZ(),SZ=D(($)=>{let U;if($.credentials)U=K0.memoizeIdentityProvider($.credentials,K0.isIdentityExpired,K0.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=K0.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=D(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:G=!0,systemClockOffset:W=$.systemClockOffset||0,sha256:X}=$;let Z;if($.signer)Z=K0.normalizeProvider($.signer);else if($.regionInfoProvider)Z=D(()=>K0.normalizeProvider($.region)().then(async(w)=>[await $.regionInfoProvider(w,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},w]).then(([w,L])=>{const{signingRegion:Y,signingService:Q}=w;$.signingRegion=$.signingRegion||Y||L,$.signingName=$.signingName||Q||$.serviceId;const F={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:X,uriEscapePath:G};return new($.signerConstructor||CZ.SignatureV4)(F)}),"signer");else Z=D(async(w)=>{w=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await K0.normalizeProvider($.region)(),properties:{}},w);const{signingRegion:L,signingName:Y}=w;$.signingRegion=$.signingRegion||L,$.signingName=$.signingName||Y||$.serviceId;const Q={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:X,uriEscapePath:G};return new($.signerConstructor||CZ.SignatureV4)(Q)},"signer");return{...$,systemClockOffset:W,signingEscapePath:G,credentials:U,signer:Z}},"resolveAwsSdkSigV4Config"),IF=SZ});var o1=M((BF)=>{var RF=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",DZ="[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]["+RF+"]*",KF=new RegExp("^"+DZ+"$"),MF=function($,U){const G=[];let W=U.exec($);while(W){const X=[];X.startIndex=U.lastIndex-W[0].length;const Z=W.length;for(let w=0;w<Z;w++)X.push(W[w]);G.push(X),W=U.exec($)}return G},EF=function($){const U=KF.exec($);return!(U===null||typeof U==="undefined")};BF.isExist=function($){return typeof $!=="undefined"};BF.isEmptyObject=function($){return Object.keys($).length===0};BF.merge=function($,U,G){if(U){const W=Object.keys(U),X=W.length;for(let Z=0;Z<X;Z++)if(G==="strict")$[W[Z]]=[U[W[Z]]];else $[W[Z]]=U[W[Z]]}};BF.getValue=function($){if(BF.isExist($))return $;else return""};BF.isName=EF;BF.getAllMatches=MF;BF.nameRegexp=DZ});var AU=M((hF)=>{var xZ=function($){return $===" "||$==="\t"||$==="\n"||$==="\r"},vZ=function($,U){const G=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const W=$.substr(G,U-G);if(U>5&&W==="xml")return P("InvalidXml","XML declaration allowed only at the start of the document.",b($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U},cZ=function($,U){if($.length>U+5&&$[U+1]==="-"&&$[U+2]==="-"){for(U+=3;U<$.length;U++)if($[U]==="-"&&$[U+1]==="-"&&$[U+2]===">"){U+=2;break}}else if($.length>U+8&&$[U+1]==="D"&&$[U+2]==="O"&&$[U+3]==="C"&&$[U+4]==="T"&&$[U+5]==="Y"&&$[U+6]==="P"&&$[U+7]==="E"){let G=1;for(U+=8;U<$.length;U++)if($[U]==="<")G++;else if($[U]===">"){if(G--,G===0)break}}else if($.length>U+9&&$[U+1]==="["&&$[U+2]==="C"&&$[U+3]==="D"&&$[U+4]==="A"&&$[U+5]==="T"&&$[U+6]==="A"&&$[U+7]==="["){for(U+=8;U<$.length;U++)if($[U]==="]"&&$[U+1]==="]"&&$[U+2]===">"){U+=2;break}}return U},PF=function($,U){let G="",W="",X=!1;for(;U<$.length;U++){if($[U]===CF||$[U]===NF)if(W==="")W=$[U];else if(W!==$[U]);else W="";else if($[U]===">"){if(W===""){X=!0;break}}G+=$[U]}if(W!=="")return!1;return{value:G,index:U,tagClosed:X}},yZ=function($,U){const G=HU.getAllMatches($,jF),W={};for(let X=0;X<G.length;X++){if(G[X][1].length===0)return P("InvalidAttr","Attribute '"+G[X][2]+"' has no space in starting.",a0(G[X]));else if(G[X][3]!==void 0&&G[X][4]===void 0)return P("InvalidAttr","Attribute '"+G[X][2]+"' is without value.",a0(G[X]));else if(G[X][3]===void 0&&!U.allowBooleanAttributes)return P("InvalidAttr","boolean attribute '"+G[X][2]+"' is not allowed.",a0(G[X]));const Z=G[X][2];if(!bF(Z))return P("InvalidAttr","Attribute '"+Z+"' is an invalid name.",a0(G[X]));if(!W.hasOwnProperty(Z))W[Z]=1;else return P("InvalidAttr","Attribute '"+Z+"' is repeated.",a0(G[X]))}return!0},SF=function($,U){let G=/\d/;if($[U]==="x")U++,G=/[\da-fA-F]/;for(;U<$.length;U++){if($[U]===";")return U;if(!$[U].match(G))break}return-1},kF=function($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,SF($,U);let G=0;for(;U<$.length;U++,G++){if($[U].match(/\w/)&&G<20)continue;if($[U]===";")break;return-1}return U},P=function($,U,G){return{err:{code:$,msg:U,line:G.line||G,col:G.col}}},bF=function($){return HU.isName($)},DF=function($){return HU.isName($)},b=function($,U){const G=$.substring(0,U).split(/\r?\n/);return{line:G.length,col:G[G.length-1].length+1}},a0=function($){return $.startIndex+$[1].length},HU=o1(),qF={allowBooleanAttributes:!1,unpairedTags:[]};hF.validate=function($,U){U=Object.assign({},qF,U);const G=[];let W=!1,X=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let Z=0;Z<$.length;Z++)if($[Z]==="<"&&$[Z+1]==="?"){if(Z+=2,Z=vZ($,Z),Z.err)return Z}else if($[Z]==="<"){let w=Z;if(Z++,$[Z]==="!"){Z=cZ($,Z);continue}else{let L=!1;if($[Z]==="/")L=!0,Z++;let Y="";for(;Z<$.length&&$[Z]!==">"&&$[Z]!==" "&&$[Z]!=="\t"&&$[Z]!=="\n"&&$[Z]!=="\r";Z++)Y+=$[Z];if(Y=Y.trim(),Y[Y.length-1]==="/")Y=Y.substring(0,Y.length-1),Z--;if(!DF(Y)){let z;if(Y.trim().length===0)z="Invalid space after '<'.";else z="Tag '"+Y+"' is an invalid name.";return P("InvalidTag",z,b($,Z))}const Q=PF($,Z);if(Q===!1)return P("InvalidAttr","Attributes for '"+Y+"' have open quote.",b($,Z));let F=Q.value;if(Z=Q.index,F[F.length-1]==="/"){const z=Z-F.length;F=F.substring(0,F.length-1);const J=yZ(F,U);if(J===!0)W=!0;else return P(J.err.code,J.err.msg,b($,z+J.err.line))}else if(L)if(!Q.tagClosed)return P("InvalidTag","Closing tag '"+Y+"' doesn't have proper closing.",b($,Z));else if(F.trim().length>0)return P("InvalidTag","Closing tag '"+Y+"' can't have attributes or invalid starting.",b($,w));else if(G.length===0)return P("InvalidTag","Closing tag '"+Y+"' has not been opened.",b($,w));else{const z=G.pop();if(Y!==z.tagName){let J=b($,z.tagStartPos);return P("InvalidTag","Expected closing tag '"+z.tagName+"' (opened in line "+J.line+", col "+J.col+") instead of closing tag '"+Y+"'.",b($,w))}if(G.length==0)X=!0}else{const z=yZ(F,U);if(z!==!0)return P(z.err.code,z.err.msg,b($,Z-F.length+z.err.line));if(X===!0)return P("InvalidXml","Multiple possible root nodes found.",b($,Z));else if(U.unpairedTags.indexOf(Y)!==-1);else G.push({tagName:Y,tagStartPos:w});W=!0}for(Z++;Z<$.length;Z++)if($[Z]==="<")if($[Z+1]==="!"){Z++,Z=cZ($,Z);continue}else if($[Z+1]==="?"){if(Z=vZ($,++Z),Z.err)return Z}else break;else if($[Z]==="&"){const z=kF($,Z);if(z==-1)return P("InvalidChar","char '&' is not expected.",b($,Z));Z=z}else if(X===!0&&!xZ($[Z]))return P("InvalidXml","Extra text at the end",b($,Z));if($[Z]==="<")Z--}}else{if(xZ($[Z]))continue;return P("InvalidChar","char '"+$[Z]+"' is not expected.",b($,Z))}if(!W)return P("InvalidXml","Start tag expected.",1);else if(G.length==1)return P("InvalidTag","Unclosed tag '"+G[0].tagName+"'.",b($,G[0].tagStartPos));else if(G.length>0)return P("InvalidXml","Invalid '"+JSON.stringify(G.map((Z)=>Z.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var CF='"',NF="'",jF=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var _Z=M((cF)=>{var uZ={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function($,U,G){return $}},vF=function($){return Object.assign({},uZ,$)};cF.buildOptions=vF;cF.defaultOptions=uZ});var gZ=M((lB,dZ)=>{class pZ{constructor($){this.tagname=$,this.child=[],this[":@"]={}}add($,U){if($==="__proto__")$="#__proto__";this.child.push({[$]:U})}addChild($){if($.tagname==="__proto__")$.tagname="#__proto__";if($[":@"]&&Object.keys($[":@"]).length>0)this.child.push({[$.tagname]:$.child,[":@"]:$[":@"]});else this.child.push({[$.tagname]:$.child})}}dZ.exports=pZ});var lZ=M((mB,sZ)=>{var pF=function($,U){const G={};if($[U+3]==="O"&&$[U+4]==="C"&&$[U+5]==="T"&&$[U+6]==="Y"&&$[U+7]==="P"&&$[U+8]==="E"){U=U+9;let W=1,X=!1,Z=!1,w="";for(;U<$.length;U++)if($[U]==="<"&&!Z){if(X&&sF($,U)){if(U+=7,[entityName,val,U]=dF($,U+1),val.indexOf("&")===-1)G[iF(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(X&&lF($,U))U+=8;else if(X&&mF($,U))U+=8;else if(X&&nF($,U))U+=9;else if(gF)Z=!0;else throw new Error("Invalid DOCTYPE");W++,w=""}else if($[U]===">"){if(Z){if($[U-1]==="-"&&$[U-2]==="-")Z=!1,W--}else W--;if(W===0)break}else if($[U]==="[")X=!0;else w+=$[U];if(W!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:G,i:U}},dF=function($,U){let G="";for(;U<$.length&&($[U]!=="'"&&$[U]!=='"');U++)G+=$[U];if(G=G.trim(),G.indexOf(" ")!==-1)throw new Error("External entites are not supported");const W=$[U++];let X="";for(;U<$.length&&$[U]!==W;U++)X+=$[U];return[G,X,U]},gF=function($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1},sF=function($,U){if($[U+1]==="!"&&$[U+2]==="E"&&$[U+3]==="N"&&$[U+4]==="T"&&$[U+5]==="I"&&$[U+6]==="T"&&$[U+7]==="Y")return!0;return!1},lF=function($,U){if($[U+1]==="!"&&$[U+2]==="E"&&$[U+3]==="L"&&$[U+4]==="E"&&$[U+5]==="M"&&$[U+6]==="E"&&$[U+7]==="N"&&$[U+8]==="T")return!0;return!1},mF=function($,U){if($[U+1]==="!"&&$[U+2]==="A"&&$[U+3]==="T"&&$[U+4]==="T"&&$[U+5]==="L"&&$[U+6]==="I"&&$[U+7]==="S"&&$[U+8]==="T")return!0;return!1},nF=function($,U){if($[U+1]==="!"&&$[U+2]==="N"&&$[U+3]==="O"&&$[U+4]==="T"&&$[U+5]==="A"&&$[U+6]==="T"&&$[U+7]==="I"&&$[U+8]==="O"&&$[U+9]==="N")return!0;return!1},iF=function($){if(_F.isName($))return $;else throw new Error(`Invalid entity name ${$}`)},_F=o1();sZ.exports=pF});var nZ=M((nB,mZ)=>{var tF=function($,U={}){if(U=Object.assign({},aF,U),!$||typeof $!=="string")return $;let G=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(G))return $;else if(U.hex&&rF.test(G))return Number.parseInt(G,16);else{const W=oF.exec(G);if(W){const X=W[1],Z=W[2];let w=eF(W[3]);const L=W[4]||W[6];if(!U.leadingZeros&&Z.length>0&&X&&G[2]!==".")return $;else if(!U.leadingZeros&&Z.length>0&&!X&&G[1]!==".")return $;else{const Y=Number(G),Q=""+Y;if(Q.search(/[eE]/)!==-1)if(U.eNotation)return Y;else return $;else if(L)if(U.eNotation)return Y;else return $;else if(G.indexOf(".")!==-1)if(Q==="0"&&w==="")return Y;else if(Q===w)return Y;else if(X&&Q==="-"+w)return Y;else return $;if(Z)if(w===Q)return Y;else if(X+w===Q)return Y;else return $;if(G===Q)return Y;else if(G===X+Q)return Y;return $}}else return $}},eF=function($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $},rF=/^[-+]?0x[a-fA-F0-9]+$/,oF=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;if(!Number.parseInt&&window.parseInt)Number.parseInt=window.parseInt;if(!Number.parseFloat&&window.parseFloat)Number.parseFloat=window.parseFloat;var aF={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};mZ.exports=tF});var aZ=M((iB,oZ)=>{var Gz=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];this.lastEntities[W]={regex:new RegExp("&"+W+";","g"),val:$[W]}}},Wz=function($,U,G,W,X,Z,w){if($!==void 0){if(this.options.trimValues&&!W)$=$.trim();if($.length>0){if(!w)$=this.replaceEntitiesValue($);const L=this.options.tagValueProcessor(U,$,G,X,Z);if(L===null||L===void 0)return $;else if(typeof L!==typeof $||L!==$)return L;else if(this.options.trimValues)return CU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return CU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}},Xz=function($){if(this.options.removeNSPrefix){const U=$.split(":"),G=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=G+U[1]}return $},wz=function($,U,G){if(!this.options.ignoreAttributes&&typeof $==="string"){const W=iZ.getAllMatches($,Zz),X=W.length,Z={};for(let w=0;w<X;w++){const L=this.resolveNameSpace(W[w][1]);let Y=W[w][4],Q=this.options.attributeNamePrefix+L;if(L.length){if(this.options.transformAttributeName)Q=this.options.transformAttributeName(Q);if(Q==="__proto__")Q="#__proto__";if(Y!==void 0){if(this.options.trimValues)Y=Y.trim();Y=this.replaceEntitiesValue(Y);const F=this.options.attributeValueProcessor(L,Y,U);if(F===null||F===void 0)Z[Q]=Y;else if(typeof F!==typeof Y||F!==Y)Z[Q]=F;else Z[Q]=CU(Y,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)Z[Q]=!0}}if(!Object.keys(Z).length)return;if(this.options.attributesGroupName){const w={};return w[this.options.attributesGroupName]=Z,w}return Z}},Yz=function($,U,G){const W=this.options.updateTag(U.tagname,G,U[":@"]);if(W===!1);else if(typeof W==="string")U.tagname=W,$.addChild(U);else $.addChild(U)},Fz=function($,U,G,W){if($){if(W===void 0)W=Object.keys(U.child).length===0;if($=this.parseTextData($,U.tagname,G,!1,U[":@"]?Object.keys(U[":@"]).length!==0:!1,W),$!==void 0&&$!=="")U.add(this.options.textNodeName,$);$=""}return $},zz=function($,U,G){const W="*."+G;for(let X in $){const Z=$[X];if(W===Z||U===Z)return!0}return!1},Jz=function($,U,G=">"){let W,X="";for(let Z=U;Z<$.length;Z++){let w=$[Z];if(W){if(w===W)W=""}else if(w==='"'||w==="'")W=w;else if(w===G[0])if(G[1]){if($[Z+1]===G[1])return{data:X,index:Z}}else return{data:X,index:Z};else if(w==="\t")w=" ";X+=w}},M0=function($,U,G,W){const X=$.indexOf(U,G);if(X===-1)throw new Error(W);else return X+U.length-1},qU=function($,U,G,W=">"){const X=Jz($,U+1,W);if(!X)return;let Z=X.data;const w=X.index,L=Z.search(/\s/);let Y=Z,Q=!0;if(L!==-1)Y=Z.substring(0,L),Z=Z.substring(L+1).trimStart();const F=Y;if(G){const z=Y.indexOf(":");if(z!==-1)Y=Y.substr(z+1),Q=Y!==X.data.substr(z+1)}return{tagName:Y,tagExp:Z,closeIndex:w,attrExpPresent:Q,rawTagName:F}},Iz=function($,U,G){const W=G;let X=1;for(;G<$.length;G++)if($[G]==="<")if($[G+1]==="/"){const Z=M0($,">",G,`${U} is not closed`);if($.substring(G+2,Z).trim()===U){if(X--,X===0)return{tagContent:$.substring(W,G),i:Z}}G=Z}else if($[G+1]==="?")G=M0($,"?>",G+1,"StopNode is not closed.");else if($.substr(G+1,3)==="!--")G=M0($,"-->",G+3,"StopNode is not closed.");else if($.substr(G+1,2)==="![")G=M0($,"]]>",G,"StopNode is not closed.")-2;else{const Z=qU($,G,">");if(Z){if((Z&&Z.tagName)===U&&Z.tagExp[Z.tagExp.length-1]!=="/")X++;G=Z.closeIndex}}},CU=function($,U,G){if(U&&typeof $==="string"){const W=$.trim();if(W==="true")return!0;else if(W==="false")return!1;else return Uz($,G)}else if(iZ.isExist($))return $;else return""},iZ=o1(),t0=gZ(),$z=lZ(),Uz=nZ();class rZ{constructor($){this.options=$,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:"\""}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(U,G)=>String.fromCharCode(Number.parseInt(G,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(U,G)=>String.fromCharCode(Number.parseInt(G,16))}},this.addExternalEntities=Gz,this.parseXml=Lz,this.parseTextData=Wz,this.resolveNameSpace=Xz,this.buildAttributesMap=wz,this.isItStopNode=zz,this.replaceEntitiesValue=Qz,this.readStopNodeData=Iz,this.saveTextToParentTag=Fz,this.addChild=Yz}}var Zz=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),Lz=function($){$=$.replace(/\r\n?/g,"\n");const U=new t0("!xml");let G=U,W="",X="";for(let Z=0;Z<$.length;Z++)if($[Z]==="<")if($[Z+1]==="/"){const L=M0($,">",Z,"Closing Tag is not closed.");let Y=$.substring(Z+2,L).trim();if(this.options.removeNSPrefix){const z=Y.indexOf(":");if(z!==-1)Y=Y.substr(z+1)}if(this.options.transformTagName)Y=this.options.transformTagName(Y);if(G)W=this.saveTextToParentTag(W,G,X);const Q=X.substring(X.lastIndexOf(".")+1);if(Y&&this.options.unpairedTags.indexOf(Y)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${Y}>`);let F=0;if(Q&&this.options.unpairedTags.indexOf(Q)!==-1)F=X.lastIndexOf(".",X.lastIndexOf(".")-1),this.tagsNodeStack.pop();else F=X.lastIndexOf(".");X=X.substring(0,F),G=this.tagsNodeStack.pop(),W="",Z=L}else if($[Z+1]==="?"){let L=qU($,Z,!1,"?>");if(!L)throw new Error("Pi Tag is not closed.");if(W=this.saveTextToParentTag(W,G,X),this.options.ignoreDeclaration&&L.tagName==="?xml"||this.options.ignorePiTags);else{const Y=new t0(L.tagName);if(Y.add(this.options.textNodeName,""),L.tagName!==L.tagExp&&L.attrExpPresent)Y[":@"]=this.buildAttributesMap(L.tagExp,X,L.tagName);this.addChild(G,Y,X)}Z=L.closeIndex+1}else if($.substr(Z+1,3)==="!--"){const L=M0($,"-->",Z+4,"Comment is not closed.");if(this.options.commentPropName){const Y=$.substring(Z+4,L-2);W=this.saveTextToParentTag(W,G,X),G.add(this.options.commentPropName,[{[this.options.textNodeName]:Y}])}Z=L}else if($.substr(Z+1,2)==="!D"){const L=$z($,Z);this.docTypeEntities=L.entities,Z=L.i}else if($.substr(Z+1,2)==="!["){const L=M0($,"]]>",Z,"CDATA is not closed.")-2,Y=$.substring(Z+9,L);W=this.saveTextToParentTag(W,G,X);let Q=this.parseTextData(Y,G.tagname,X,!0,!1,!0,!0);if(Q==null)Q="";if(this.options.cdataPropName)G.add(this.options.cdataPropName,[{[this.options.textNodeName]:Y}]);else G.add(this.options.textNodeName,Q);Z=L+2}else{let L=qU($,Z,this.options.removeNSPrefix),Y=L.tagName;const Q=L.rawTagName;let{tagExp:F,attrExpPresent:z,closeIndex:J}=L;if(this.options.transformTagName)Y=this.options.transformTagName(Y);if(G&&W){if(G.tagname!=="!xml")W=this.saveTextToParentTag(W,G,X,!1)}const I=G;if(I&&this.options.unpairedTags.indexOf(I.tagname)!==-1)G=this.tagsNodeStack.pop(),X=X.substring(0,X.lastIndexOf("."));if(Y!==U.tagname)X+=X?"."+Y:Y;if(this.isItStopNode(this.options.stopNodes,X,Y)){let K="";if(F.length>0&&F.lastIndexOf("/")===F.length-1){if(Y[Y.length-1]==="/")Y=Y.substr(0,Y.length-1),X=X.substr(0,X.length-1),F=Y;else F=F.substr(0,F.length-1);Z=L.closeIndex}else if(this.options.unpairedTags.indexOf(Y)!==-1)Z=L.closeIndex;else{const E=this.readStopNodeData($,Q,J+1);if(!E)throw new Error(`Unexpected end of ${Q}`);Z=E.i,K=E.tagContent}const B=new t0(Y);if(Y!==F&&z)B[":@"]=this.buildAttributesMap(F,X,Y);if(K)K=this.parseTextData(K,Y,X,!0,z,!0,!0);X=X.substr(0,X.lastIndexOf(".")),B.add(this.options.textNodeName,K),this.addChild(G,B,X)}else{if(F.length>0&&F.lastIndexOf("/")===F.length-1){if(Y[Y.length-1]==="/")Y=Y.substr(0,Y.length-1),X=X.substr(0,X.length-1),F=Y;else F=F.substr(0,F.length-1);if(this.options.transformTagName)Y=this.options.transformTagName(Y);const K=new t0(Y);if(Y!==F&&z)K[":@"]=this.buildAttributesMap(F,X,Y);this.addChild(G,K,X),X=X.substr(0,X.lastIndexOf("."))}else{const K=new t0(Y);if(this.tagsNodeStack.push(G),Y!==F&&z)K[":@"]=this.buildAttributesMap(F,X,Y);this.addChild(G,K,X),G=K}W="",Z=J}}else W+=$[Z];return U.child},Qz=function($){if(this.options.processEntities){for(let U in this.docTypeEntities){const G=this.docTypeEntities[U];$=$.replace(G.regx,G.val)}for(let U in this.lastEntities){const G=this.lastEntities[U];$=$.replace(G.regex,G.val)}if(this.options.htmlEntities)for(let U in this.htmlEntities){const G=this.htmlEntities[U];$=$.replace(G.regex,G.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};oZ.exports=rZ});var eZ=M((Bz)=>{var Rz=function($,U){return tZ($,U)},tZ=function($,U,G){let W;const X={};for(let Z=0;Z<$.length;Z++){const w=$[Z],L=Kz(w);let Y="";if(G===void 0)Y=L;else Y=G+"."+L;if(L===U.textNodeName)if(W===void 0)W=w[L];else W+=""+w[L];else if(L===void 0)continue;else if(w[L]){let Q=tZ(w[L],U,Y);const F=Ez(Q,U);if(w[":@"])Mz(Q,w[":@"],Y,U);else if(Object.keys(Q).length===1&&Q[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)Q=Q[U.textNodeName];else if(Object.keys(Q).length===0)if(U.alwaysCreateTextNode)Q[U.textNodeName]="";else Q="";if(X[L]!==void 0&&X.hasOwnProperty(L)){if(!Array.isArray(X[L]))X[L]=[X[L]];X[L].push(Q)}else if(U.isArray(L,Y,F))X[L]=[Q];else X[L]=Q}}if(typeof W==="string"){if(W.length>0)X[U.textNodeName]=W}else if(W!==void 0)X[U.textNodeName]=W;return X},Kz=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(W!==":@")return W}},Mz=function($,U,G,W){if(U){const X=Object.keys(U),Z=X.length;for(let w=0;w<Z;w++){const L=X[w];if(W.isArray(L,G+"."+L,!0,!0))$[L]=[U[L]];else $[L]=U[L]}}},Ez=function($,U){const{textNodeName:G}=U,W=Object.keys($).length;if(W===0)return!0;if(W===1&&($[G]||typeof $[G]==="boolean"||$[G]===0))return!0;return!1};Bz.prettify=Rz});var G6=M((oB,U6)=>{var{buildOptions:fz}=_Z(),Tz=aZ(),{prettify:Oz}=eZ(),Hz=AU();class $6{constructor($){this.externalEntities={},this.options=fz($)}parse($,U){if(typeof $==="string");else if($.toString)$=$.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(U){if(U===!0)U={};const X=Hz.validate($,U);if(X!==!0)throw Error(`${X.err.msg}:${X.err.line}:${X.err.col}`)}const G=new Tz(this.options);G.addExternalEntities(this.externalEntities);const W=G.parseXml($);if(this.options.preserveOrder||W===void 0)return W;else return Oz(W,this.options)}addEntity($,U){if(U.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if($.indexOf("&")!==-1||$.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(U==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[$]=U}}U6.exports=$6});var L6=M((aB,w6)=>{var Az=function($,U){let G="";if(U.format&&U.indentBy.length>0)G="\n";return X6($,U,"",G)},X6=function($,U,G,W){let X="",Z=!1;for(let w=0;w<$.length;w++){const L=$[w],Y=qz(L);if(Y===void 0)continue;let Q="";if(G.length===0)Q=Y;else Q=`${G}.${Y}`;if(Y===U.textNodeName){let K=L[Y];if(!Cz(Q,U))K=U.tagValueProcessor(Y,K),K=Z6(K,U);if(Z)X+=W;X+=K,Z=!1;continue}else if(Y===U.cdataPropName){if(Z)X+=W;X+=`<![CDATA[${L[Y][0][U.textNodeName]}]]>`,Z=!1;continue}else if(Y===U.commentPropName){X+=W+`<!--${L[Y][0][U.textNodeName]}-->`,Z=!0;continue}else if(Y[0]==="?"){const K=W6(L[":@"],U),B=Y==="?xml"?"":W;let E=L[Y][0][U.textNodeName];E=E.length!==0?" "+E:"",X+=B+`<${Y}${E}${K}?>`,Z=!0;continue}let F=W;if(F!=="")F+=U.indentBy;const z=W6(L[":@"],U),J=W+`<${Y}${z}`,I=X6(L[Y],U,Q,F);if(U.unpairedTags.indexOf(Y)!==-1)if(U.suppressUnpairedNode)X+=J+">";else X+=J+"/>";else if((!I||I.length===0)&&U.suppressEmptyNode)X+=J+"/>";else if(I&&I.endsWith(">"))X+=J+`>${I}${W}</${Y}>`;else{if(X+=J+">",I&&W!==""&&(I.includes("/>")||I.includes("</")))X+=W+U.indentBy+I+W;else X+=I;X+=`</${Y}>`}Z=!0}return X},qz=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(!$.hasOwnProperty(W))continue;if(W!==":@")return W}},W6=function($,U){let G="";if($&&!U.ignoreAttributes)for(let W in $){if(!$.hasOwnProperty(W))continue;let X=U.attributeValueProcessor(W,$[W]);if(X=Z6(X,U),X===!0&&U.suppressBooleanAttributes)G+=` ${W.substr(U.attributeNamePrefix.length)}`;else G+=` ${W.substr(U.attributeNamePrefix.length)}="${X}"`}return G},Cz=function($,U){$=$.substr(0,$.length-U.textNodeName.length-1);let G=$.substr($.lastIndexOf(".")+1);for(let W in U.stopNodes)if(U.stopNodes[W]===$||U.stopNodes[W]==="*."+G)return!0;return!1},Z6=function($,U){if($&&$.length>0&&U.processEntities)for(let G=0;G<U.entities.length;G++){const W=U.entities[G];$=$.replace(W.regex,W.val)}return $};w6.exports=Az});var Q6=M((tB,Y6)=>{var W0=function($){if(this.options=Object.assign({},Pz,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=kz;if(this.processTextOrObjNode=jz,this.options.format)this.indentate=Sz,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},jz=function($,U,G){const W=this.j2x($,G+1);if($[this.options.textNodeName]!==void 0&&Object.keys($).length===1)return this.buildTextValNode($[this.options.textNodeName],U,W.attrStr,G);else return this.buildObjectNode(W.val,U,W.attrStr,G)},Sz=function($){return this.options.indentBy.repeat($)},kz=function($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1},Nz=L6(),Pz={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("\'","g"),val:"&apos;"},{regex:new RegExp("\"","g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};W0.prototype.build=function($){if(this.options.preserveOrder)return Nz($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};W0.prototype.j2x=function($,U){let G="",W="";for(let X in $){if(!Object.prototype.hasOwnProperty.call($,X))continue;if(typeof $[X]==="undefined"){if(this.isAttribute(X))W+=""}else if($[X]===null)if(this.isAttribute(X))W+="";else if(X[0]==="?")W+=this.indentate(U)+"<"+X+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+X+"/"+this.tagEndChar;else if($[X]instanceof Date)W+=this.buildTextValNode($[X],X,"",U);else if(typeof $[X]!=="object"){const Z=this.isAttribute(X);if(Z)G+=this.buildAttrPairStr(Z,""+$[X]);else if(X===this.options.textNodeName){let w=this.options.tagValueProcessor(X,""+$[X]);W+=this.replaceEntitiesValue(w)}else W+=this.buildTextValNode($[X],X,"",U)}else if(Array.isArray($[X])){const Z=$[X].length;let w="",L="";for(let Y=0;Y<Z;Y++){const Q=$[X][Y];if(typeof Q==="undefined");else if(Q===null)if(X[0]==="?")W+=this.indentate(U)+"<"+X+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+X+"/"+this.tagEndChar;else if(typeof Q==="object")if(this.options.oneListGroup){const F=this.j2x(Q,U+1);if(w+=F.val,this.options.attributesGroupName&&Q.hasOwnProperty(this.options.attributesGroupName))L+=F.attrStr}else w+=this.processTextOrObjNode(Q,X,U);else if(this.options.oneListGroup){let F=this.options.tagValueProcessor(X,Q);F=this.replaceEntitiesValue(F),w+=F}else w+=this.buildTextValNode(Q,X,"",U)}if(this.options.oneListGroup)w=this.buildObjectNode(w,X,L,U);W+=w}else if(this.options.attributesGroupName&&X===this.options.attributesGroupName){const Z=Object.keys($[X]),w=Z.length;for(let L=0;L<w;L++)G+=this.buildAttrPairStr(Z[L],""+$[X][Z[L]])}else W+=this.processTextOrObjNode($[X],X,U)}return{attrStr:G,val:W}};W0.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};W0.prototype.buildObjectNode=function($,U,G,W){if($==="")if(U[0]==="?")return this.indentate(W)+"<"+U+G+"?"+this.tagEndChar;else return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else{let X="</"+U+this.tagEndChar,Z="";if(U[0]==="?")Z="?",X="";if((G||G==="")&&$.indexOf("<")===-1)return this.indentate(W)+"<"+U+G+Z+">"+$+X;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&Z.length===0)return this.indentate(W)+`<!--${$}-->`+this.newLine;else return this.indentate(W)+"<"+U+G+Z+this.tagEndChar+$+this.indentate(W)+X}};W0.prototype.closeTag=function($){let U="";if(this.options.unpairedTags.indexOf($)!==-1){if(!this.options.suppressUnpairedNode)U="/"}else if(this.options.suppressEmptyNode)U="/";else U=`></${$}`;return U};W0.prototype.buildTextValNode=function($,U,G,W){if(this.options.cdataPropName!==!1&&U===this.options.cdataPropName)return this.indentate(W)+`<![CDATA[${$}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName)return this.indentate(W)+`<!--${$}-->`+this.newLine;else if(U[0]==="?")return this.indentate(W)+"<"+U+G+"?"+this.tagEndChar;else{let X=this.options.tagValueProcessor(U,$);if(X=this.replaceEntitiesValue(X),X==="")return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else return this.indentate(W)+"<"+U+G+">"+X+"</"+U+this.tagEndChar}};W0.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let U=0;U<this.options.entities.length;U++){const G=this.options.entities[U];$=$.replace(G.regex,G.val)}return $};Y6.exports=W0});var z6=M((eB,F6)=>{var bz=AU(),Dz=G6(),hz=Q6();F6.exports={XMLParser:Dz,XMLValidator:bz,XMLBuilder:hz}});var E6=M(($V,M6)=>{var{defineProperty:a1,getOwnPropertyDescriptor:xz,getOwnPropertyNames:vz}=Object,cz=Object.prototype.hasOwnProperty,h=($,U)=>a1($,"name",{value:U,configurable:!0}),yz=($,U)=>{for(var G in U)a1($,G,{get:U[G],enumerable:!0})},uz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of vz(U))if(!cz.call($,X)&&X!==G)a1($,X,{get:()=>U[X],enumerable:!(W=xz(U,X))||W.enumerable})}return $},_z=($)=>uz(a1({},"__esModule",{value:!0}),$),J6={};yz(J6,{_toBool:()=>dz,_toNum:()=>gz,_toStr:()=>pz,awsExpectUnion:()=>lz,loadRestJsonErrorCode:()=>iz,loadRestXmlErrorCode:()=>tz,parseJsonBody:()=>R6,parseJsonErrorBody:()=>nz,parseXmlBody:()=>K6,parseXmlErrorBody:()=>az});M6.exports=_z(J6);var pz=h(($)=>{if($==null)return $;if(typeof $==="number"||typeof $==="bigint"){const U=new Error(`Received number ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}if(typeof $==="boolean"){const U=new Error(`Received boolean ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}return $},"_toStr"),dz=h(($)=>{if($==null)return $;if(typeof $==="string"){const U=$.toLowerCase();if($!==""&&U!=="false"&&U!=="true"){const G=new Error(`Received string "${$}" where a boolean was expected.`);G.name="Warning",console.warn(G)}return $!==""&&U!=="false"}return $},"_toBool"),gz=h(($)=>{if($==null)return $;if(typeof $==="string"){const U=Number($);if(U.toString()!==$){const G=new Error(`Received string "${$}" where a number was expected.`);return G.name="Warning",console.warn(G),$}return U}return $},"_toNum"),sz=A0(),lz=h(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return sz.expectUnion($)},"awsExpectUnion"),mz=A0(),I6=h(($,U)=>mz.collectBody($,U).then((G)=>U.utf8Encoder(G)),"collectBodyString"),R6=h(($,U)=>I6($,U).then((G)=>{if(G.length)try{return JSON.parse(G)}catch(W){if((W==null?void 0:W.name)==="SyntaxError")Object.defineProperty(W,"$responseBodyText",{value:G});throw W}return{}}),"parseJsonBody"),nz=h(async($,U)=>{const G=await R6($,U);return G.message=G.message??G.Message,G},"parseJsonErrorBody"),iz=h(($,U)=>{const G=h((Z,w)=>Object.keys(Z).find((L)=>L.toLowerCase()===w.toLowerCase()),"findKey"),W=h((Z)=>{let w=Z;if(typeof w==="number")w=w.toString();if(w.indexOf(",")>=0)w=w.split(",")[0];if(w.indexOf(":")>=0)w=w.split(":")[0];if(w.indexOf("#")>=0)w=w.split("#")[1];return w},"sanitizeErrorCode"),X=G($.headers,"x-amzn-errortype");if(X!==void 0)return W($.headers[X]);if(U.code!==void 0)return W(U.code);if(U.__type!==void 0)return W(U.__type)},"loadRestJsonErrorCode"),rz=A0(),oz=z6(),K6=h(($,U)=>I6($,U).then((G)=>{if(G.length){const W=new oz.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(Y,Q)=>Q.trim()===""&&Q.includes("\n")?"":void 0});W.addEntity("#xD","\r"),W.addEntity("#10","\n");let X;try{X=W.parse(G,!0)}catch(Y){if(Y&&typeof Y==="object")Object.defineProperty(Y,"$responseBodyText",{value:G});throw Y}const Z="#text",w=Object.keys(X)[0],L=X[w];if(L[Z])L[w]=L[Z],delete L[Z];return rz.getValueFromTextNode(L)}return{}}),"parseXmlBody"),az=h(async($,U)=>{const G=await K6($,U);if(G.Error)G.Error.message=G.Error.message??G.Error.Message;return G},"parseXmlErrorBody"),tz=h(($,U)=>{var G;if(((G=U==null?void 0:U.Error)==null?void 0:G.Code)!==void 0)return U.Error.Code;if((U==null?void 0:U.Code)!==void 0)return U.Code;if($.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var $J=M((e0)=>{Object.defineProperty(e0,"__esModule",{value:!0});var NU=ez();NU.__exportStar(GZ(),e0);NU.__exportStar(bZ(),e0);NU.__exportStar(E6(),e0)});var m=Z0(X$(),1),kJ=m.default.v1,bJ=m.default.v3,qG=m.default.v4,DJ=m.default.v5,hJ=m.default.NIL,xJ=m.default.version,vJ=m.default.validate,cJ=m.default.stringify,yJ=m.default.parse;function pJ($){return $}var g5=($)=>(U)=>async(G)=>{if(!c.isInstance(G.request))return U(G);const{request:W}=G,{handlerProtocol:X=""}=$.requestHandler.metadata||{};if(X.indexOf("h2")>=0&&!W.headers[":authority"])delete W.headers.host,W.headers[":authority"]=W.hostname+(W.port?":"+W.port:"");else if(!W.headers.host){let Z=W.hostname;if(W.port!=null)Z+=`:${W.port}`;W.headers.host=Z}return U(G)},s5={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},dJ=($)=>({applyToStack:(U)=>{U.add(g5($),s5)}});var l5=()=>($,U)=>async(G)=>{try{const W=await $(G),{clientName:X,commandName:Z,logger:w,dynamoDbDocumentClientOptions:L={}}=U,{overrideInputFilterSensitiveLog:Y,overrideOutputFilterSensitiveLog:Q}=L,F=Y??U.inputFilterSensitiveLog,z=Q??U.outputFilterSensitiveLog,{$metadata:J,...I}=W.output;return w?.info?.({clientName:X,commandName:Z,input:F(G.input),output:z(I),metadata:J}),W}catch(W){const{clientName:X,commandName:Z,logger:w,dynamoDbDocumentClientOptions:L={}}=U,{overrideInputFilterSensitiveLog:Y}=L,Q=Y??U.inputFilterSensitiveLog;throw w?.error?.({clientName:X,commandName:Z,input:Q(G.input),error:W,metadata:W.$metadata}),W}},m5={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},sJ=($)=>({applyToStack:(U)=>{U.add(l5(),m5)}});var CG="X-Amzn-Trace-Id",n5="AWS_LAMBDA_FUNCTION_NAME",i5="_X_AMZN_TRACE_ID",r5=($)=>(U)=>async(G)=>{const{request:W}=G;if(!c.isInstance(W)||$.runtime!=="node"||W.headers.hasOwnProperty(CG))return U(G);const X=process.env[n5],Z=process.env[i5],w=(L)=>typeof L==="string"&&L.length>0;if(w(X)&&w(Z))W.headers[CG]=Z;return U({...G,request:W})},o5={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},rJ=($)=>({applyToStack:(U)=>{U.add(r5($),o5)}});function PI($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}class P7{constructor({size:$,params:U}){if(this.data=new Map,this.parameters=[],this.capacity=$??50,U)this.parameters=U}get($,U){const G=this.hash($);if(G===!1)return U();if(!this.data.has(G)){if(this.data.size>this.capacity+10){const W=this.data.keys();let X=0;while(!0){const{value:Z,done:w}=W.next();if(this.data.delete(Z),w||++X>10)break}}this.data.set(G,U())}return this.data.get(G)}size(){return this.data.size}hash($){let U="";const{parameters:G}=this;if(G.length===0)return!1;for(let W of G){const X=String($[W]??"");if(X.includes("|;"))return!1;U+=X+"|;"}return U}}var j7=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),m0=($)=>j7.test($)||$.startsWith("[")&&$.endsWith("]");var S7=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),n0=($,U=!1)=>{if(!U)return S7.test($);const G=$.split(".");for(let W of G)if(!n0(W))return!1;return!0};var i0={};var o="endpoints";function _($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${_($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(_).join(", ")})`;return JSON.stringify($,null,2)}class A extends Error{constructor($){super($);this.name="EndpointError"}}var Y4=($,U)=>$===U;var Q4=($)=>{const U=$.split("."),G=[];for(let W of U){const X=W.indexOf("[");if(X!==-1){if(W.indexOf("]")!==W.length-1)throw new A(`Path: '${$}' does not end with ']'`);const Z=W.slice(X+1,-1);if(Number.isNaN(parseInt(Z)))throw new A(`Invalid array index: '${Z}' in path: '${$}'`);if(X!==0)G.push(W.slice(0,X));G.push(Z)}else G.push(W)}return G};var q1=($,U)=>Q4(U).reduce((G,W)=>{if(typeof G!=="object")throw new A(`Index '${W}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(G))return G[parseInt(W)];return G[W]},$);var F4=($)=>$!=null;var z4=($)=>!$;var C1=Z0(D0(),1);var i$={[C1.EndpointURLScheme.HTTP]:80,[C1.EndpointURLScheme.HTTPS]:443},J4=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:J,port:I,protocol:K="",path:B="",query:E={}}=$,V=new URL(`${K}//${J}${I?`:${I}`:""}${B}`);return V.search=Object.entries(E).map(([O,f])=>`${O}=${f}`).join("&"),V}return new URL($)}catch(J){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const G=U.href,{host:W,hostname:X,pathname:Z,protocol:w,search:L}=U;if(L)return null;const Y=w.slice(0,-1);if(!Object.values(C1.EndpointURLScheme).includes(Y))return null;const Q=m0(X),F=G.includes(`${W}:${i$[Y]}`)||typeof $==="string"&&$.includes(`${W}:${i$[Y]}`),z=`${W}${F?`:${i$[Y]}`:""}`;return{scheme:Y,authority:z,path:Z,normalizedPath:Z.endsWith("/")?Z:`${Z}/`,isIp:Q}};var I4=($,U)=>$===U;var R4=($,U,G,W)=>{if(U>=G||$.length<G)return null;if(!W)return $.substring(U,G);return $.substring($.length-G,$.length-U)};var K4=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var M4={booleanEquals:Y4,getAttr:q1,isSet:F4,isValidHostLabel:n0,not:z4,parseURL:J4,stringEquals:I4,substring:R4,uriEncode:K4};var N1=($,U)=>{const G=[],W={...U.endpointParams,...U.referenceRecord};let X=0;while(X<$.length){const Z=$.indexOf("{",X);if(Z===-1){G.push($.slice(X));break}G.push($.slice(X,Z));const w=$.indexOf("}",Z);if(w===-1){G.push($.slice(Z));break}if($[Z+1]==="{"&&$[w+1]==="}")G.push($.slice(Z+1,w)),X=w+2;const L=$.substring(Z+1,w);if(L.includes("#")){const[Y,Q]=L.split("#");G.push(q1(W[Y],Q))}else G.push(W[L]);X=w+1}return G.join("")};var E4=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var $0=($,U,G)=>{if(typeof $==="string")return N1($,G);else if($.fn)return P1($,G);else if($.ref)return E4($,G);throw new A(`'${U}': ${String($)} is not a string, function or reference.`)};var P1=({fn:$,argv:U},G)=>{const W=U.map((Z)=>["boolean","number"].includes(typeof Z)?Z:$0(Z,"arg",G)),X=$.split(".");if(X[0]in i0&&X[1]!=null)return i0[X[0]][X[1]](...W);return M4[$](...W)};var B4=({assign:$,...U},G)=>{if($&&$ in G.referenceRecord)throw new A(`'${$}' is already defined in Reference Record.`);const W=P1(U,G);return G.logger?.debug?.(`${o} evaluateCondition: ${_(U)} = ${_(W)}`),{result:W===""?!0:!!W,...$!=null&&{toAssign:{name:$,value:W}}}};var C0=($=[],U)=>{const G={};for(let W of $){const{result:X,toAssign:Z}=B4(W,{...U,referenceRecord:{...U.referenceRecord,...G}});if(!X)return{result:X};if(Z)G[Z.name]=Z.value,U.logger?.debug?.(`${o} assign: ${Z.name} := ${_(Z.value)}`)}return{result:!0,referenceRecord:G}};var V4=($,U)=>Object.entries($).reduce((G,[W,X])=>({...G,[W]:X.map((Z)=>{const w=$0(Z,"Header value entry",U);if(typeof w!=="string")throw new A(`Header '${W}' value '${w}' is not a string`);return w})}),{});var r$=($,U)=>{if(Array.isArray($))return $.map((G)=>r$(G,U));switch(typeof $){case"string":return N1($,U);case"object":if($===null)throw new A(`Unexpected endpoint property: ${$}`);return j1($,U);case"boolean":return $;default:throw new A(`Unexpected endpoint property type: ${typeof $}`)}};var j1=($,U)=>Object.entries($).reduce((G,[W,X])=>({...G,[W]:r$(X,U)}),{});var f4=($,U)=>{const G=$0($,"Endpoint URL",U);if(typeof G==="string")try{return new URL(G)}catch(W){throw console.error(`Failed to construct URL with ${G}`,W),W}throw new A(`Endpoint URL must be a string, got ${typeof G}`)};var T4=($,U)=>{const{conditions:G,endpoint:W}=$,{result:X,referenceRecord:Z}=C0(G,U);if(!X)return;const w={...U,referenceRecord:{...U.referenceRecord,...Z}},{url:L,properties:Y,headers:Q}=W;return U.logger?.debug?.(`${o} Resolving endpoint from template: ${_(W)}`),{...Q!=null&&{headers:V4(Q,w)},...Y!=null&&{properties:j1(Y,w)},url:f4(L,w)}};var O4=($,U)=>{const{conditions:G,error:W}=$,{result:X,referenceRecord:Z}=C0(G,U);if(!X)return;throw new A($0(W,"Error",{...U,referenceRecord:{...U.referenceRecord,...Z}}))};var H4=($,U)=>{const{conditions:G,rules:W}=$,{result:X,referenceRecord:Z}=C0(G,U);if(!X)return;return S1(W,{...U,referenceRecord:{...U.referenceRecord,...Z}})};var S1=($,U)=>{for(let G of $)if(G.type==="endpoint"){const W=T4(G,U);if(W)return W}else if(G.type==="error")O4(G,U);else if(G.type==="tree"){const W=H4(G,U);if(W)return W}else throw new A(`Unknown endpoint rule: ${G}`);throw new A("Rules evaluation failed")};var k7=($,U)=>{const{endpointParams:G,logger:W}=U,{parameters:X,rules:Z}=$;U.logger?.debug?.(`${o} Initial EndpointParams: ${_(G)}`);const w=Object.entries(X).filter(([,Q])=>Q.default!=null).map(([Q,F])=>[Q,F.default]);if(w.length>0)for(let[Q,F]of w)G[Q]=G[Q]??F;const L=Object.entries(X).filter(([,Q])=>Q.required).map(([Q])=>Q);for(let Q of L)if(G[Q]==null)throw new A(`Missing required parameter: '${Q}'`);const Y=S1(Z,{endpointParams:G,logger:W,referenceRecord:{}});return U.logger?.debug?.(`${o} Resolved endpoint: ${_(Y)}`),Y};var o$=($,U=!1)=>{if(U){for(let G of $.split("."))if(!o$(G))return!1;return!0}if(!n0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(m0($))return!1;return!0};var A4=($)=>{const U=$.split(":");if(U.length<6)return null;const[G,W,X,Z,w,...L]=U;if(G!=="arn"||W===""||X===""||L.join(":")==="")return null;const Y=L.map((Q)=>Q.split("/")).flat();return{partition:W,service:X,region:Z,accountId:w,resourceId:Y}};var q4={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};var D7=q4,h7="",C4=($)=>{const{partitions:U}=D7;for(let W of U){const{regions:X,outputs:Z}=W;for(let[w,L]of Object.entries(X))if(w===$)return{...Z,...L}}for(let W of U){const{regionRegex:X,outputs:Z}=W;if(new RegExp(X).test($))return{...Z}}const G=U.find((W)=>W.id==="aws");if(!G)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...G.outputs}};var N4=()=>h7;var x7={isVirtualHostableS3Bucket:o$,parseArn:A4,partition:C4};i0.aws=x7;var a$="user-agent",k1="x-amz-user-agent",t$=" ",b1="/",P4=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,j4=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,e$="-";var v7=($)=>(U,G)=>async(W)=>{const{request:X}=W;if(!c.isInstance(X))return U(W);const{headers:Z}=X,w=G?.userAgent?.map($U)||[],L=(await $.defaultUserAgentProvider()).map($U),Y=$?.customUserAgent?.map($U)||[],Q=N4(),F=(Q?[Q]:[]).concat([...L,...w,...Y]).join(t$),z=[...L.filter((J)=>J.startsWith("aws-sdk-")),...Y].join(t$);if($.runtime!=="browser"){if(z)Z[k1]=Z[k1]?`${Z[a$]} ${z}`:z;Z[a$]=F}else Z[k1]=F;return U({...W,request:X})},$U=($)=>{const U=$[0].split(b1).map((w)=>w.replace(P4,e$)).join(b1),G=$[1]?.replace(j4,e$),W=U.indexOf(b1),X=U.substring(0,W);let Z=U.substring(W+1);if(X==="api")Z=Z.toLowerCase();return[X,Z,G].filter((w)=>w&&w.length>0).reduce((w,L,Y)=>{switch(Y){case 0:return L;case 1:return`${w}/${L}`;default:return`${w}#${L}`}},"")},c7={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},QK=($)=>({applyToStack:(U)=>{U.add(v7($),c7)}});var D1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var UU=($)=>D1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var VK=($)=>{const{region:U,useFipsEndpoint:G}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return UU(U);const W=await U();return UU(W)},useFipsEndpoint:async()=>{const W=typeof U==="string"?U:await U();if(D1(W))return!0;return typeof G!=="function"?Promise.resolve(!!G):G()}}};var N0=($,U,G)=>{if(!(U in $))return;if($[U]==="true")return!0;if($[U]==="false")return!1;throw new Error(`Cannot load ${G} "${U}". Expected "true" or "false", got ${$[U]}.`)};var U0;(function($){$.ENV="env",$.CONFIG="shared config entry"})(U0||(U0={}));var y7="AWS_USE_DUALSTACK_ENDPOINT",u7="use_dualstack_endpoint";var jK={environmentVariableSelector:($)=>N0($,y7,U0.ENV),configFileSelector:($)=>N0($,u7,U0.CONFIG),default:!1};var _7="AWS_USE_FIPS_ENDPOINT",p7="use_fips_endpoint";var bK={environmentVariableSelector:($)=>N0($,_7,U0.ENV),configFileSelector:($)=>N0($,p7,U0.CONFIG),default:!1};var d7=Z0(n(),1);var g7=Z0(n(),1);var S4={environmentVariableSelector:($)=>$["AWS_REGION"],configFileSelector:($)=>$["region"],default:()=>{throw new Error("Region is missing")}},sK={preferredFile:"credentials"};function s7($){return(U)=>async(G)=>{const W=G.request;if(c.isInstance(W)){const{body:X,headers:Z}=W;if(X&&Object.keys(Z).map((w)=>w.toLowerCase()).indexOf(k4)===-1)try{const w=$(X);W.headers={...W.headers,[k4]:String(w)}}catch(w){}}return U({...G,request:W})}}var k4="content-length",l7={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},EM=($)=>({applyToStack:(U)=>{U.add(s7($.bodyLengthChecker),l7)}});var b4=($,U)=>(G)=>async(W)=>{const{response:X}=await G(W);try{const Z=await U(X,$);return{response:X,output:Z}}catch(Z){if(Object.defineProperty(Z,"$response",{value:X}),!("$metadata"in Z)){if(Z.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof Z.$responseBodyText!=="undefined"){if(Z.$response)Z.$response.body=Z.$responseBodyText}}throw Z}};var D4=($,U)=>(G,W)=>async(X)=>{const Z=W.endpointV2?.url&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!Z)throw new Error("No valid endpoint provider available.");const w=await U(X.input,{...$,endpoint:Z});return G({...X,request:w})};function HM($,U,G){return{applyToStack:(W)=>{W.add(b4($,G),m7),W.add(D4($,U),GU)}}}var m7={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},GU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var _4=Z0(n(),1);var h4=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(a7(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!o7(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},n7=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,i7=/(\d+\.){3}\d+/,r7=/\.\./;var o7=($)=>n7.test($)&&!i7.test($)&&!r7.test($),a7=($)=>{const[U,G,W,,,X]=$.split(":"),Z=U==="arn"&&$.split(":").length>=6,w=Boolean(Z&&G&&W&&X);if(Z&&!w)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return w};var x4=($,U,G)=>{const W=async()=>{const X=G[$]??G[U];if(typeof X==="function")return X();return X};if($==="credentialScope"||U==="CredentialScope")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return X?.credentialScope??X?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return X?.accountId??X?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{const X=await W();if(X&&typeof X==="object"){if("url"in X)return X.url.href;if("hostname"in X){const{protocol:Z,hostname:w,port:L,path:Y}=X;return`${Z}//${w}${L?":"+L:""}${Y}`}}return X};return W};var v4="AWS_ENDPOINT_URL",c4="endpoint_url",y4=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((Z)=>Z.toUpperCase()),W=U[[v4,...G].join("_")];if(W)return W;const X=U[v4];if(X)return X;return},configFileSelector:(U,G)=>{if(G&&U.services){const X=G[["services",U.services].join(WU)];if(X){const Z=$.split(" ").map((L)=>L.toLowerCase()),w=X[[Z.join("_"),c4].join(WU)];if(w)return w}}const W=U[c4];if(W)return W;return},default:void 0});var h1=async($)=>J0(y4($??""))();var x1=($)=>{if(typeof $==="object"){if("url"in $)return XU($.url);return $}return XU($)};var u4=async($,U,G,W)=>{if(!G.endpoint){let w;if(G.serviceConfiguredEndpoint)w=await G.serviceConfiguredEndpoint();else w=await h1(G.serviceId);if(w)G.endpoint=()=>Promise.resolve(x1(w))}const X=await t7($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(X,W)},t7=async($,U,G)=>{const W={},X=U?.getEndpointParameterInstructions?.()||{};for(let[Z,w]of Object.entries(X))switch(w.type){case"staticContextParams":W[Z]=w.value;break;case"contextParams":W[Z]=$[w.name];break;case"clientContextParams":case"builtInParams":W[Z]=await x4(w.name,Z,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(w))}if(Object.keys(X).length===0)Object.assign(W,G);if(String(G.serviceId).toLowerCase()==="s3")await h4(W);return W};var p4=({config:$,instructions:U})=>{return(G,W)=>async(X)=>{const Z=await u4(X.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=Z,W.authSchemes=Z.properties?.authSchemes;const w=W.authSchemes?.[0];if(w){W.signing_region=w.signingRegion,W.signing_service=w.signingName;const Y=_4.getSmithyContext(W)?.selectedHttpAuthScheme?.httpAuthOption;if(Y)Y.signingProperties=Object.assign(Y.signingProperties||{},{signing_region:w.signingRegion,signingRegion:w.signingRegion,signing_service:w.signingName,signingName:w.signingName,signingRegionSet:w.signingRegionSet},w.properties)}return G({...X})}};var e7={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:GU.name},rM=($,U)=>({applyToStack:(G)=>{G.addRelativeTo(p4({config:$,instructions:U}),e7)}});var v1=Z0(n(),1);var eM=($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>x1(await v1.normalizeProvider(G)()):void 0,Z={...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:v1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:v1.normalizeProvider($.useFipsEndpoint??!1)};let w=void 0;return Z.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!w)w=h1($.serviceId);return w},Z};var zU=Z0(n(),1);var l;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(l||(l={}));var I0=3,d4=l.STANDARD;var g4=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],s4=["TimeoutError","RequestTimeout","RequestTimeoutException"],l4=[500,502,503,504],m4=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var $Q=($)=>$.$metadata?.clockSkewCorrected,P0=($)=>$.$metadata?.httpStatusCode===429||g4.includes($.name)||$.$retryable?.throttling==!0,c1=($)=>$Q($)||s4.includes($.name)||m4.includes($?.code||"")||l4.includes($.$metadata?.httpStatusCode||0),n4=($)=>{if($.$metadata?.httpStatusCode!==void 0){const U=$.$metadata.httpStatusCode;if(500<=U&&U<=599&&!c1($))return!0;return!1}return!1};class y1{constructor($){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=$?.beta??0.7,this.minCapacity=$?.minCapacity??1,this.minFillRate=$?.minFillRate??0.5,this.scaleConstant=$?.scaleConstant??0.4,this.smooth=$?.smooth??0.8;const U=this.getCurrentTimeInSeconds();this.lastThrottleTime=U,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket($){if(!this.enabled)return;if(this.refillTokenBucket(),$>this.currentCapacity){const U=($-this.currentCapacity)/this.fillRate*1000;await new Promise((G)=>setTimeout(G,U))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){const $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}const U=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=$}updateClientSendingRate($){let U;if(this.updateMeasuredRate(),P0($)){const W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),U=this.cubicThrottle(W),this.enableTokenBucket()}else this.calculateTimeWindow(),U=this.cubicSuccess(this.getCurrentTimeInSeconds());const G=Math.min(U,2*this.measuredTxRate);this.updateTokenBucketRate(G)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle($){return this.getPrecise($*this.beta)}cubicSuccess($){return this.getPrecise(this.scaleConstant*Math.pow($-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate($){this.refillTokenBucket(),this.fillRate=Math.max($,this.minFillRate),this.maxCapacity=Math.max($,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const $=this.getCurrentTimeInSeconds(),U=Math.floor($*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){const G=this.requestCount/(U-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=U}}getPrecise($){return parseFloat($.toFixed(8))}}var R0=100,r0=20000,ZU=500,u1=500,wU=5,LU=10,YU=1,_1="amz-sdk-invocation-id",p1="amz-sdk-request";var i4=()=>{let $=R0;return{computeNextBackoffDelay:(W)=>{return Math.floor(Math.min(r0,Math.random()*2**W*$))},setDelayBase:(W)=>{$=W}}};var QU=({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(r0,$),getRetryCost:()=>G}};class j0{constructor($){this.maxAttempts=$,this.mode=l.STANDARD,this.capacity=u1,this.retryBackoffStrategy=i4(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return QU({retryDelay:R0,retryCount:0})}async refreshRetryTokenForRetry($,U){const G=await this.getMaxAttempts();if(this.shouldRetry($,U,G)){const W=U.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?ZU:R0);const X=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),Z=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,X):X,w=this.getCapacityCost(W);return this.capacity-=w,QU({retryDelay:Z,retryCount:$.getRetryCount()+1,retryCost:w})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(u1,this.capacity+($.getRetryCost()??YU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${I0}`),I0}}shouldRetry($,U,G){return $.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?LU:wU}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class FU{constructor($,U){this.maxAttemptsProvider=$,this.mode=l.ADAPTIVE;const{rateLimiter:G}=U??{};this.rateLimiter=G??new y1,this.standardRetryStrategy=new j0($)}async acquireInitialRetryToken($){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken($)}async refreshRetryTokenForRetry($,U){return this.rateLimiter.updateClientSendingRate(U),this.standardRetryStrategy.refreshRetryTokenForRetry($,U)}recordSuccess($){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess($)}}var r4="AWS_MAX_ATTEMPTS",o4="max_attempts",gE={environmentVariableSelector:($)=>{const U=$[r4];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${r4} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[o4];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${o4} mast be a number, got "${U}"`);return G},default:I0},sE=($)=>{const{retryStrategy:U}=$,G=zU.normalizeProvider($.maxAttempts??I0);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await zU.normalizeProvider($.retryMode)()===l.ADAPTIVE)return new FU(G);return new j0(G)}}},UQ="AWS_RETRY_MODE",GQ="retry_mode",lE={environmentVariableSelector:($)=>$[UQ],configFileSelector:($)=>$[GQ],default:d4};import{Readable as WQ} from"stream";var a4=($)=>$?.body instanceof WQ||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var JU=($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)};var XQ=($)=>(U,G)=>async(W)=>{let X=await $.retryStrategy();const Z=await $.maxAttempts();if(ZQ(X)){X=X;let w=await X.acquireInitialRetryToken(G.partition_id),L=new Error,Y=0,Q=0;const{request:F}=W,z=c.isInstance(F);if(z)F.headers[_1]=qG();while(!0)try{if(z)F.headers[p1]=`attempt=${Y+1}; max=${Z}`;const{response:J,output:I}=await U(W);return X.recordSuccess(w),I.$metadata.attempts=Y+1,I.$metadata.totalRetryDelay=Q,{response:J,output:I}}catch(J){const I=wQ(J);if(L=JU(J),z&&a4(F))throw(G.logger instanceof t4?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),L;try{w=await X.refreshRetryTokenForRetry(w,I)}catch(B){if(!L.$metadata)L.$metadata={};throw L.$metadata.attempts=Y+1,L.$metadata.totalRetryDelay=Q,L}Y=w.getRetryCount();const K=w.getRetryDelay();Q+=K,await new Promise((B)=>setTimeout(B,K))}}else{if(X=X,X?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",X.mode]];return X.retry(U,W)}},ZQ=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",wQ=($)=>{const U={error:$,errorType:LQ($)},G=QQ($.$response);if(G)U.retryAfterHint=G;return U},LQ=($)=>{if(P0($))return"THROTTLING";if(c1($))return"TRANSIENT";if(n4($))return"SERVER_ERROR";return"CLIENT_ERROR"},YQ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},WB=($)=>({applyToStack:(U)=>{U.add(XQ($),YQ)}}),QQ=($)=>{if(!IU.isInstance($))return;const U=Object.keys($.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)};import{platform as UJ,release as GJ} from"os";import{env as V6,versions as WJ} from"process";var PU={isCrtAvailable:!1};var B6=()=>{if(PU.isCrtAvailable)return["md/crt-avail"];return null};var XJ="AWS_SDK_UA_APP_ID",ZJ="sdk-ua-app-id",QV=({serviceId:$,clientVersion:U})=>{const G=[["aws-sdk-js",U],["ua","2.0"],[`os/${UJ()}`,GJ()],["lang/js"],["md/nodejs",`${WJ.node}`]],W=B6();if(W)G.push(W);if($)G.push([`api/${$}`,U]);if(V6.AWS_EXECUTION_ENV)G.push([`exec-env/${V6.AWS_EXECUTION_ENV}`]);const X=J0({environmentVariableSelector:(w)=>w[XJ],configFileSelector:(w)=>w[ZJ],default:void 0})();let Z=void 0;return async()=>{if(!Z){const w=await X;Z=w?[...G,[`app/${w}`]]:[...G]}return Z}};import{Buffer as wJ} from"buffer";import{createHash as LJ,createHmac as YJ} from"crypto";var f6=function($,U){if(wJ.isBuffer($))return $;if(typeof $==="string")return T6($,U);if(ArrayBuffer.isView($))return jU($.buffer,$.byteOffset,$.byteLength);return jU($)};class QJ{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(O6(f6($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?YJ(this.algorithmIdentifier,f6(this.secret)):LJ(this.algorithmIdentifier)}}import{fstatSync as FJ,lstatSync as zJ} from"fs";var BV=($)=>{if(!$)return 0;if(typeof $==="string")return Buffer.byteLength($);else if(typeof $.byteLength==="number")return $.byteLength;else if(typeof $.size==="number")return $.size;else if(typeof $.start==="number"&&typeof $.end==="number")return $.end+1-$.start;else if(typeof $.path==="string"||Buffer.isBuffer($.path))return zJ($.path).size;else if(typeof $.fd==="number")return FJ($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var H6="AWS_EXECUTION_ENV",SU="AWS_REGION",kU="AWS_DEFAULT_REGION",A6="AWS_EC2_METADATA_DISABLED",q6=["in-region","cross-region","mobile","standard","legacy"],C6="/latest/meta-data/placement/region";var N6={environmentVariableSelector:($)=>{return $["AWS_DEFAULTS_MODE"]},configFileSelector:($)=>{return $["defaults_mode"]},default:"legacy"};var jV=({region:$=J0(S4),defaultsMode:U=J0(N6)}={})=>P6(async()=>{const G=typeof U==="function"?await U():U;switch(G?.toLowerCase()){case"auto":return JJ($);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(G?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${q6.join(", ")}, got ${G}`)}}),JJ=async($)=>{if($){const U=typeof $==="function"?await $():$,G=await IJ();if(!G)return"standard";if(U===G)return"in-region";else return"cross-region"}return"standard"},IJ=async()=>{if(process.env[H6]&&(process.env[SU]||process.env[kU]))return process.env[SU]??process.env[kU];if(!process.env[A6])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-e3ee32f7c3f7bca2.js"),G=await $();return(await U({...G,path:C6})).toString()}catch($){}};var DV=($)=>{let U=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");const G=$.region;if(typeof G==="string")return G;return G()};return{setRegion(G){U=G},region(){return U}}},hV=($)=>{return{region:$.region()}};export{qG as V,n as W,pJ as X,dJ as Y,sJ as Z,rJ as _,OZ as $,N0 as aa,U0 as ba,n$ as ca,PI as da,P7 as ea,i0 as fa,k7 as ga,x7 as ha,QK as ia,jK as ja,bK as ka,S4 as la,sK as ma,VK as na,EM as oa,t7 as pa,HM as qa,rM as ra,eM as sa,d4 as ta,gE as ua,sE as va,lE as wa,WB as xa,$J as ya,QV as za,QJ as Aa,BV as Ba,jV as Ca,DV as Da,hV as Ea};
19
+
20
+ //# debugId=5376E4FD33EBA40F64756e2164756e21