gemi 0.4.123 → 0.4.124

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 (124) hide show
  1. package/dist/app/App.d.ts.map +1 -1
  2. package/dist/app/index.js +2 -2
  3. package/dist/app/index.js.map +3 -3
  4. package/dist/bin/index.js +7 -3
  5. package/dist/broadcasting/index.js +1 -1
  6. package/dist/chunk-1we4kcb2.js +3 -0
  7. package/dist/chunk-1we4kcb2.js.map +23 -0
  8. package/dist/{chunk-35bsy26w.js → chunk-2c4nwgcj.js} +2 -2
  9. package/dist/{chunk-35bsy26w.js.map → chunk-2c4nwgcj.js.map} +1 -1
  10. package/dist/{chunk-3kfagvr7.js → chunk-34x1c2ey.js} +2 -2
  11. package/dist/{chunk-3kfagvr7.js.map → chunk-34x1c2ey.js.map} +1 -1
  12. package/dist/{chunk-s9b02cxr.js → chunk-39kxd828.js} +2 -2
  13. package/dist/{chunk-s9b02cxr.js.map → chunk-39kxd828.js.map} +1 -1
  14. package/dist/chunk-3ynep2h9.js +4 -0
  15. package/dist/{chunk-ktwy9nyn.js.map → chunk-3ynep2h9.js.map} +1 -1
  16. package/dist/{chunk-qtw719ea.js → chunk-5bsvn385.js} +2 -2
  17. package/dist/{chunk-qtw719ea.js.map → chunk-5bsvn385.js.map} +1 -1
  18. package/dist/{chunk-td079vg9.js → chunk-6wj5qxwf.js} +2 -2
  19. package/dist/{chunk-td079vg9.js.map → chunk-6wj5qxwf.js.map} +1 -1
  20. package/dist/{chunk-fn8t5a77.js → chunk-8vjfr0mp.js} +3 -3
  21. package/dist/{chunk-fn8t5a77.js.map → chunk-8vjfr0mp.js.map} +1 -1
  22. package/dist/chunk-93r4rez6.js +4 -0
  23. package/dist/{chunk-rnrwx4ge.js.map → chunk-93r4rez6.js.map} +1 -1
  24. package/dist/{chunk-nv02r6kq.js → chunk-9vb54d71.js} +2 -2
  25. package/dist/{chunk-nv02r6kq.js.map → chunk-9vb54d71.js.map} +1 -1
  26. package/dist/{chunk-1vk09mag.js → chunk-9xeqzq5a.js} +2 -2
  27. package/dist/{chunk-1vk09mag.js.map → chunk-9xeqzq5a.js.map} +1 -1
  28. package/dist/{chunk-84my1sg8.js → chunk-cw23pjra.js} +2 -2
  29. package/dist/{chunk-84my1sg8.js.map → chunk-cw23pjra.js.map} +1 -1
  30. package/dist/{chunk-jkce121q.js → chunk-d7hn6b85.js} +3 -3
  31. package/dist/{chunk-jkce121q.js.map → chunk-d7hn6b85.js.map} +1 -1
  32. package/dist/chunk-dq276gmc.js +4 -0
  33. package/dist/{chunk-dtkvdcf6.js.map → chunk-dq276gmc.js.map} +2 -2
  34. package/dist/chunk-g290rywa.js +5 -0
  35. package/dist/chunk-g290rywa.js.map +65 -0
  36. package/dist/{chunk-5pasfeez.js → chunk-g31vhvsw.js} +2 -2
  37. package/dist/{chunk-5pasfeez.js.map → chunk-g31vhvsw.js.map} +1 -1
  38. package/dist/{chunk-015evbr0.js → chunk-gz4h6jsy.js} +3 -3
  39. package/dist/{chunk-015evbr0.js.map → chunk-gz4h6jsy.js.map} +1 -1
  40. package/dist/chunk-hddz9z7a.js +11 -0
  41. package/dist/{chunk-ecdp9eb5.js.map → chunk-hddz9z7a.js.map} +5 -5
  42. package/dist/chunk-j618jvh4.js +4 -0
  43. package/dist/{chunk-m5rpyfje.js.map → chunk-j618jvh4.js.map} +2 -2
  44. package/dist/chunk-k4rg25z3.js +4 -0
  45. package/dist/chunk-k4rg25z3.js.map +16 -0
  46. package/dist/{chunk-tgfy71hb.js → chunk-kqyj62v4.js} +2 -2
  47. package/dist/{chunk-tgfy71hb.js.map → chunk-kqyj62v4.js.map} +1 -1
  48. package/dist/chunk-ksckhxbt.js +4 -0
  49. package/dist/{chunk-shjzs36s.js.map → chunk-ksckhxbt.js.map} +6 -6
  50. package/dist/chunk-m1838202.js +20 -0
  51. package/dist/{chunk-n1z7v689.js.map → chunk-m1838202.js.map} +22 -6
  52. package/dist/chunk-m7wq4g1v.js +4 -0
  53. package/dist/{chunk-6wm81mqc.js.map → chunk-m7wq4g1v.js.map} +6 -6
  54. package/dist/chunk-t6cspqr4.js +4 -0
  55. package/dist/{chunk-vtffgrjq.js.map → chunk-t6cspqr4.js.map} +5 -5
  56. package/dist/chunk-wrm0pxh2.js +4 -0
  57. package/dist/chunk-wrm0pxh2.js.map +14 -0
  58. package/dist/{chunk-dv8t6w0e.js → chunk-ycz2czq7.js} +2 -2
  59. package/dist/{chunk-dv8t6w0e.js.map → chunk-ycz2czq7.js.map} +1 -1
  60. package/dist/client/WebsocketContext.d.ts.map +1 -1
  61. package/dist/client/index.js +2 -0
  62. package/dist/client/index.js.map +1 -1
  63. package/dist/email/index.js +2 -2
  64. package/dist/email/index.js.map +1 -1
  65. package/dist/facades/Broadcast.d.ts +1 -1
  66. package/dist/facades/FileStorage.d.ts +1 -0
  67. package/dist/facades/FileStorage.d.ts.map +1 -1
  68. package/dist/facades/Log.d.ts +11 -0
  69. package/dist/facades/Log.d.ts.map +1 -0
  70. package/dist/facades/index.d.ts +1 -0
  71. package/dist/facades/index.d.ts.map +1 -1
  72. package/dist/facades/index.js +2 -2
  73. package/dist/facades/index.js.map +11 -8
  74. package/dist/http/index.js +2 -2
  75. package/dist/http/index.js.map +1 -1
  76. package/dist/kernel/Kernel.d.ts +2 -0
  77. package/dist/kernel/Kernel.d.ts.map +1 -1
  78. package/dist/kernel/index.js +2 -2
  79. package/dist/kernel/index.js.map +3 -3
  80. package/dist/server/index.js +4 -4
  81. package/dist/server/index.js.map +3 -3
  82. package/dist/services/file-storage/drivers/FileStorageDriver.d.ts +1 -0
  83. package/dist/services/file-storage/drivers/FileStorageDriver.d.ts.map +1 -1
  84. package/dist/services/file-storage/drivers/FileSystemDriver.d.ts +1 -0
  85. package/dist/services/file-storage/drivers/FileSystemDriver.d.ts.map +1 -1
  86. package/dist/services/file-storage/drivers/S3Driver.d.ts +1 -0
  87. package/dist/services/file-storage/drivers/S3Driver.d.ts.map +1 -1
  88. package/dist/services/index.d.ts +2 -0
  89. package/dist/services/index.d.ts.map +1 -1
  90. package/dist/services/index.js +3 -3
  91. package/dist/services/index.js.map +10 -8
  92. package/dist/services/logging/LoggingRouter.d.ts +7 -0
  93. package/dist/services/logging/LoggingRouter.d.ts.map +1 -0
  94. package/dist/services/logging/LoggingServiceContainer.d.ts +22 -0
  95. package/dist/services/logging/LoggingServiceContainer.d.ts.map +1 -0
  96. package/dist/services/logging/LoggingServiceProvider.d.ts +9 -0
  97. package/dist/services/logging/LoggingServiceProvider.d.ts.map +1 -0
  98. package/dist/services/logging/types.d.ts +9 -0
  99. package/dist/services/logging/types.d.ts.map +1 -0
  100. package/dist/services/pubsub/BroadcastingServiceContainer.d.ts.map +1 -1
  101. package/dist/services/router/ApiRouterServiceContainer.d.ts.map +1 -1
  102. package/dist/services/router/ApiRouterServiceProvider.d.ts +4 -0
  103. package/dist/services/router/ApiRouterServiceProvider.d.ts.map +1 -1
  104. package/dist/services/router/ViewRouterServiceContainer.d.ts.map +1 -1
  105. package/dist/services/router/ViewRouterServiceProvider.d.ts +4 -0
  106. package/dist/services/router/ViewRouterServiceProvider.d.ts.map +1 -1
  107. package/package.json +1 -1
  108. package/dist/chunk-6wm81mqc.js +0 -4
  109. package/dist/chunk-dbetpx84.js +0 -4
  110. package/dist/chunk-dbetpx84.js.map +0 -14
  111. package/dist/chunk-dszn71te.js +0 -4
  112. package/dist/chunk-dszn71te.js.map +0 -14
  113. package/dist/chunk-dtkvdcf6.js +0 -4
  114. package/dist/chunk-ecdp9eb5.js +0 -11
  115. package/dist/chunk-ktwy9nyn.js +0 -4
  116. package/dist/chunk-m5rpyfje.js +0 -4
  117. package/dist/chunk-n1z7v689.js +0 -20
  118. package/dist/chunk-r0c1108h.js +0 -4
  119. package/dist/chunk-r0c1108h.js.map +0 -16
  120. package/dist/chunk-rnrwx4ge.js +0 -4
  121. package/dist/chunk-shjzs36s.js +0 -4
  122. package/dist/chunk-ty763847.js +0 -5
  123. package/dist/chunk-ty763847.js.map +0 -73
  124. package/dist/chunk-vtffgrjq.js +0 -4
@@ -1,20 +0,0 @@
1
- import{I as i,J as f}from"./chunk-td079vg9.js";import{S as Bz}from"./chunk-jkce121q.js";import{$a as J0,Ga as x,Ha as m$,Ja as FU,Ka as kX,Ma as bX,Oa as F8,Pa as mF,Wa as G0,Xa as _Y,Ya as o6,Za as uY,_a as CF,ab as yw,bb as BF,cb as _w}from"./chunk-ty763847.js";import{Ib as d4,Jb as L0,Kb as y$}from"./chunk-r0c1108h.js";import{Lb as i1}from"./chunk-dbetpx84.js";import{Mb as C0}from"./chunk-fn8t5a77.js";import{Tb as yX}from"./chunk-5pasfeez.js";var u1=f((IU)=>{function dX($){return $&&$.__esModule?$:{default:$}}function pX(){if(m0>n0.length-16)uX.default.randomFillSync(n0),m0=0;return n0.slice(m0,m0+=16)}Object.defineProperty(IU,"__esModule",{value:!0});IU.default=pX;var uX=dX(import.meta.require("crypto")),n0=new Uint8Array(256),m0=n0.length});var MU=f((JU)=>{Object.defineProperty(JU,"__esModule",{value:!0});JU.default=void 0;var sX=/^(?:[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;JU.default=sX});var T0=f((fU)=>{function mX($){return $&&$.__esModule?$:{default:$}}function nX($){return typeof $==="string"&&lX.default.test($)}Object.defineProperty(fU,"__esModule",{value:!0});fU.default=void 0;var lX=mX(MU()),iX=nX;fU.default=iX});var q0=f((AU)=>{function oX($){return $&&$.__esModule?$:{default:$}}function EU($,U=0){return j[$[U+0]]+j[$[U+1]]+j[$[U+2]]+j[$[U+3]]+"-"+j[$[U+4]]+j[$[U+5]]+"-"+j[$[U+6]]+j[$[U+7]]+"-"+j[$[U+8]]+j[$[U+9]]+"-"+j[$[U+10]]+j[$[U+11]]+j[$[U+12]]+j[$[U+13]]+j[$[U+14]]+j[$[U+15]]}function aX($,U=0){const G=EU($,U);if(!rX.default(G))throw TypeError("Stringified UUID is invalid");return G}Object.defineProperty(AU,"__esModule",{value:!0});AU.default=void 0;AU.unsafeStringify=EU;var rX=oX(T0()),j=[];for(let $=0;$<256;++$)j.push(($+256).toString(16).slice(1));var tX=aX;AU.default=tX});var TU=f((OU)=>{function GZ($){return $&&$.__esModule?$:{default:$}}function wZ($,U,G){let w=U&&G||0;const W=U||new Array(16);$=$||{};let L=$.node||VU,X=$.clockseq!==void 0?$.clockseq:d1;if(L==null||X==null){const I=$.random||($.rng||$Z.default)();if(L==null)L=VU=[I[0]|1,I[1],I[2],I[3],I[4],I[5]];if(X==null)X=d1=(I[6]<<8|I[7])&16383}let Z=$.msecs!==void 0?$.msecs:Date.now(),F=$.nsecs!==void 0?$.nsecs:g1+1;const Y=Z-p1+(F-g1)/1e4;if(Y<0&&$.clockseq===void 0)X=X+1&16383;if((Y<0||Z>p1)&&$.nsecs===void 0)F=0;if(F>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p1=Z,g1=F,d1=X,Z+=12219292800000;const z=((Z&268435455)*1e4+F)%4294967296;W[w++]=z>>>24&255,W[w++]=z>>>16&255,W[w++]=z>>>8&255,W[w++]=z&255;const Q=Z/4294967296*1e4&268435455;W[w++]=Q>>>8&255,W[w++]=Q&255,W[w++]=Q>>>24&15|16,W[w++]=Q>>>16&255,W[w++]=X>>>8|128,W[w++]=X&255;for(let I=0;I<6;++I)W[w+I]=L[I];return U||UZ.unsafeStringify(W)}Object.defineProperty(OU,"__esModule",{value:!0});OU.default=void 0;var $Z=GZ(u1()),UZ=q0(),VU,d1,p1=0,g1=0,WZ=wZ;OU.default=WZ});var s1=f((qU)=>{function XZ($){return $&&$.__esModule?$:{default:$}}function ZZ($){if(!LZ.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(qU,"__esModule",{value:!0});qU.default=void 0;var LZ=XZ(T0()),FZ=ZZ;qU.default=FZ});var l1=f((jU)=>{function QZ($){return $&&$.__esModule?$:{default:$}}function IZ($){$=unescape(encodeURIComponent($));const U=[];for(let G=0;G<$.length;++G)U.push($.charCodeAt(G));return U}function JZ($,U,G){function w(W,L,X,Z){var F;if(typeof W==="string")W=IZ(W);if(typeof L==="string")L=zZ.default(L);if(((F=L)===null||F===void 0?void 0:F.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let Y=new Uint8Array(16+W.length);if(Y.set(L),Y.set(W,L.length),Y=G(Y),Y[6]=Y[6]&15|U,Y[8]=Y[8]&63|128,X){Z=Z||0;for(let z=0;z<16;++z)X[Z+z]=Y[z];return X}return YZ.unsafeStringify(Y)}try{w.name=$}catch(W){}return w.DNS=NU,w.URL=PU,w}Object.defineProperty(jU,"__esModule",{value:!0});jU.URL=jU.DNS=void 0;jU.default=JZ;var YZ=q0(),zZ=QZ(s1()),NU="6ba7b810-9dad-11d1-80b4-00c04fd430c8";jU.DNS=NU;var PU="6ba7b811-9dad-11d1-80b4-00c04fd430c8";jU.URL=PU});var hU=f((kU)=>{function KZ($){return $&&$.__esModule?$:{default:$}}function EZ($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return fZ.default.createHash("md5").update($).digest()}Object.defineProperty(kU,"__esModule",{value:!0});kU.default=void 0;var fZ=KZ(import.meta.require("crypto")),AZ=EZ;kU.default=AZ});var cU=f((xU)=>{function DU($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(xU,"__esModule",{value:!0});xU.default=void 0;var BZ=DU(l1()),VZ=DU(hU()),OZ=BZ.default("v3",48,VZ.default),HZ=OZ;xU.default=HZ});var uU=f((yU)=>{function qZ($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(yU,"__esModule",{value:!0});yU.default=void 0;var TZ=qZ(import.meta.require("crypto")),CZ={randomUUID:TZ.default.randomUUID};yU.default=CZ});var lU=f((gU)=>{function pU($){return $&&$.__esModule?$:{default:$}}function jZ($,U,G){if(dU.default.randomUUID&&!U&&!$)return dU.default.randomUUID();$=$||{};const w=$.random||($.rng||NZ.default)();if(w[6]=w[6]&15|64,w[8]=w[8]&63|128,U){G=G||0;for(let W=0;W<16;++W)U[G+W]=w[W];return U}return PZ.unsafeStringify(w)}Object.defineProperty(gU,"__esModule",{value:!0});gU.default=void 0;var dU=pU(uU()),NZ=pU(u1()),PZ=q0(),SZ=jZ;gU.default=SZ});var iU=f((mU)=>{function bZ($){return $&&$.__esModule?$:{default:$}}function hZ($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return kZ.default.createHash("sha1").update($).digest()}Object.defineProperty(mU,"__esModule",{value:!0});mU.default=void 0;var kZ=bZ(import.meta.require("crypto")),DZ=hZ;mU.default=DZ});var tU=f((oU)=>{function rU($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(oU,"__esModule",{value:!0});oU.default=void 0;var xZ=rU(l1()),vZ=rU(iU()),cZ=xZ.default("v5",80,vZ.default),yZ=cZ;oU.default=yZ});var UG=f((eU)=>{Object.defineProperty(eU,"__esModule",{value:!0});eU.default=void 0;var _Z="00000000-0000-0000-0000-000000000000";eU.default=_Z});var WG=f((GG)=>{function dZ($){return $&&$.__esModule?$:{default:$}}function pZ($){if(!uZ.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)}Object.defineProperty(GG,"__esModule",{value:!0});GG.default=void 0;var uZ=dZ(T0()),gZ=pZ;GG.default=gZ});var m1=f((_)=>{function l($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(_,"__esModule",{value:!0});Object.defineProperty(_,"NIL",{enumerable:!0,get:function(){return iZ.default}});Object.defineProperty(_,"parse",{enumerable:!0,get:function(){return tZ.default}});Object.defineProperty(_,"stringify",{enumerable:!0,get:function(){return aZ.default}});Object.defineProperty(_,"v1",{enumerable:!0,get:function(){return sZ.default}});Object.defineProperty(_,"v3",{enumerable:!0,get:function(){return lZ.default}});Object.defineProperty(_,"v4",{enumerable:!0,get:function(){return mZ.default}});Object.defineProperty(_,"v5",{enumerable:!0,get:function(){return nZ.default}});Object.defineProperty(_,"validate",{enumerable:!0,get:function(){return oZ.default}});Object.defineProperty(_,"version",{enumerable:!0,get:function(){return rZ.default}});var sZ=l(TU()),lZ=l(cU()),mZ=l(lU()),nZ=l(tU()),iZ=l(UG()),rZ=l(WG()),oZ=l(T0()),aZ=l(q0()),tZ=l(s1())});var N0=f((EQ,zG)=>{var{defineProperty:i0,getOwnPropertyDescriptor:Z4,getOwnPropertyNames:F4}=Object,Y4=Object.prototype.hasOwnProperty,FG=($,U)=>i0($,"name",{value:U,configurable:!0}),z4=($,U)=>{for(var G in U)i0($,G,{get:U[G],enumerable:!0})},Q4=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of F4(U))if(!Y4.call($,W)&&W!==G)i0($,W,{get:()=>U[W],enumerable:!(w=Z4(U,W))||w.enumerable})}return $},I4=($)=>Q4(i0({},"__esModule",{value:!0}),$),YG={};z4(YG,{getSmithyContext:()=>J4,normalizeProvider:()=>R4});zG.exports=I4(YG);var ZG=C0(),J4=FG(($)=>$[ZG.SMITHY_CONTEXT_KEY]||($[ZG.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),R4=FG(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var n1=f((AQ,MG)=>{var{defineProperty:r0,getOwnPropertyDescriptor:M4,getOwnPropertyNames:f4}=Object,K4=Object.prototype.hasOwnProperty,$0=($,U)=>r0($,"name",{value:U,configurable:!0}),E4=($,U)=>{for(var G in U)r0($,G,{get:U[G],enumerable:!0})},A4=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of f4(U))if(!K4.call($,W)&&W!==G)r0($,W,{get:()=>U[W],enumerable:!(w=M4(U,W))||w.enumerable})}return $},B4=($)=>A4(r0({},"__esModule",{value:!0}),$),QG={};E4(QG,{CredentialsProviderError:()=>V4,ProviderError:()=>o0,TokenProviderError:()=>O4,chain:()=>H4,fromStatic:()=>T4,memoize:()=>q4});MG.exports=B4(QG);var IG=class $ extends Error{constructor(U,G=!0){var w;let W,L=!0;if(typeof G==="boolean")W=void 0,L=G;else if(G!=null&&typeof G==="object")W=G.logger,L=G.tryNextLink??!0;super(U);this.name="ProviderError",this.tryNextLink=L,Object.setPrototypeOf(this,$.prototype),(w=W==null?void 0:W.debug)==null||w.call(W,`@smithy/property-provider ${L?"->":"(!)"} ${U}`)}static from(U,G=!0){return Object.assign(new this(U.message,G),U)}};$0(IG,"ProviderError");var o0=IG,JG=class $ extends o0{constructor(U,G=!0){super(U,G);this.name="CredentialsProviderError",Object.setPrototypeOf(this,$.prototype)}};$0(JG,"CredentialsProviderError");var V4=JG,RG=class $ extends o0{constructor(U,G=!0){super(U,G);this.name="TokenProviderError",Object.setPrototypeOf(this,$.prototype)}};$0(RG,"TokenProviderError");var O4=RG,H4=$0((...$)=>async()=>{if($.length===0)throw new o0("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"),T4=$0(($)=>()=>Promise.resolve($),"fromStatic"),q4=$0(($,U,G)=>{let w,W,L,X=!1;const Z=$0(async()=>{if(!W)W=$();try{w=await W,L=!0,X=!1}finally{W=void 0}return w},"coalesceProvider");if(U===void 0)return async(F)=>{if(!L||(F==null?void 0:F.forceRefresh))w=await Z();return w};return async(F)=>{if(!L||(F==null?void 0:F.forceRefresh))w=await Z();if(X)return w;if(G&&!G(w))return X=!0,w;if(U(w))return await Z(),w;return w}},"memoize")});var AG=f((BQ,EG)=>{function r1($){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 $}}var{defineProperty:a0,getOwnPropertyDescriptor:C4,getOwnPropertyNames:N4}=Object,P4=Object.prototype.hasOwnProperty,Q0=($,U)=>a0($,"name",{value:U,configurable:!0}),j4=($,U)=>{for(var G in U)a0($,G,{get:U[G],enumerable:!0})},S4=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of N4(U))if(!P4.call($,W)&&W!==G)a0($,W,{get:()=>U[W],enumerable:!(w=C4(U,W))||w.enumerable})}return $},k4=($)=>S4(a0({},"__esModule",{value:!0}),$),KG={};j4(KG,{loadConfig:()=>v4});EG.exports=k4(KG);var P0=n1();Q0(r1,"getSelectorName");var b4=Q0(($,U)=>async()=>{try{const G=$(process.env);if(G===void 0)throw new Error;return G}catch(G){throw new P0.CredentialsProviderError(G.message||`Not found in ENV: ${r1($.toString())}`,{logger:U})}},"fromEnv"),fG=i1(),h4=Q0(($,{preferredFile:U="config",...G}={})=>async()=>{const w=fG.getProfileName(G),{configFile:W,credentialsFile:L}=await fG.loadSharedConfigFiles(G),X=L[w]||{},Z=W[w]||{},F=U==="config"?{...X,...Z}:{...Z,...X};try{const z=$(F,U==="config"?W:L);if(z===void 0)throw new Error;return z}catch(Y){throw new P0.CredentialsProviderError(Y.message||`Not found in config files w/ profile [${w}]: ${r1($.toString())}`,{logger:G.logger})}},"fromSharedConfigFiles"),D4=Q0(($)=>typeof $==="function","isFunction"),x4=Q0(($)=>D4($)?async()=>await $():P0.fromStatic($),"fromStatic"),v4=Q0(({environmentVariableSelector:$,configFileSelector:U,default:G},w={})=>P0.memoize(P0.chain(b4($),h4(U,w),x4(G))),"loadConfig")});var qG=f((HG)=>{Object.defineProperty(HG,"__esModule",{value:!0});HG.getEndpointUrlConfig=void 0;var BG=i1(),VG="AWS_ENDPOINT_URL",OG="endpoint_url",c4=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((L)=>L.toUpperCase()),w=U[[VG,...G].join("_")];if(w)return w;const W=U[VG];if(W)return W;return},configFileSelector:(U,G)=>{if(G&&U.services){const W=G[["services",U.services].join(BG.CONFIG_PREFIX_SEPARATOR)];if(W){const L=$.split(" ").map((Z)=>Z.toLowerCase()),X=W[[L.join("_"),OG].join(BG.CONFIG_PREFIX_SEPARATOR)];if(X)return X}}const w=U[OG];if(w)return w;return},default:void 0});HG.getEndpointUrlConfig=c4});var o1=f((CG)=>{Object.defineProperty(CG,"__esModule",{value:!0});CG.getEndpointFromConfig=void 0;var y4=AG(),_4=qG(),u4=async($)=>y4.loadConfig(_4.getEndpointUrlConfig($!==null&&$!==void 0?$:""))();CG.getEndpointFromConfig=u4});var kG=f((HQ,SG)=>{var{defineProperty:t0,getOwnPropertyDescriptor:p4,getOwnPropertyNames:g4}=Object,s4=Object.prototype.hasOwnProperty,l4=($,U)=>t0($,"name",{value:U,configurable:!0}),m4=($,U)=>{for(var G in U)t0($,G,{get:U[G],enumerable:!0})},n4=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of g4(U))if(!s4.call($,W)&&W!==G)t0($,W,{get:()=>U[W],enumerable:!(w=p4(U,W))||w.enumerable})}return $},i4=($)=>n4(t0({},"__esModule",{value:!0}),$),PG={};m4(PG,{parseUrl:()=>jG});SG.exports=i4(PG);var r4=d4(),jG=l4(($)=>{if(typeof $==="string")return jG(new URL($));const{hostname:U,pathname:G,port:w,protocol:W,search:L}=$;let X;if(L)X=r4.parseQueryString(L);return{hostname:U,port:w?parseInt(w):void 0,protocol:W,path:G,query:X}},"parseUrl")});var t1=f((TQ,yG)=>{function cG($,U,G){return{applyToStack:(w)=>{w.add(hG($,G),xG),w.add(DG($,U),vG)}}}var{defineProperty:e0,getOwnPropertyDescriptor:o4,getOwnPropertyNames:a4}=Object,t4=Object.prototype.hasOwnProperty,a1=($,U)=>e0($,"name",{value:U,configurable:!0}),e4=($,U)=>{for(var G in U)e0($,G,{get:U[G],enumerable:!0})},$6=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of a4(U))if(!t4.call($,W)&&W!==G)e0($,W,{get:()=>U[W],enumerable:!(w=o4(U,W))||w.enumerable})}return $},U6=($)=>$6(e0({},"__esModule",{value:!0}),$),bG={};e4(bG,{deserializerMiddleware:()=>hG,deserializerMiddlewareOption:()=>xG,getSerdePlugin:()=>cG,serializerMiddleware:()=>DG,serializerMiddlewareOption:()=>vG});yG.exports=U6(bG);var hG=a1(($,U)=>(G)=>async(w)=>{const{response:W}=await G(w);try{const L=await U(W,$);return{response:W,output:L}}catch(L){if(Object.defineProperty(L,"$response",{value:W}),!("$metadata"in L)){if(L.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof L.$responseBodyText!=="undefined"){if(L.$response)L.$response.body=L.$responseBodyText}}throw L}},"deserializerMiddleware"),DG=a1(($,U)=>(G,w)=>async(W)=>{var L;const X=((L=w.endpointV2)==null?void 0:L.url)&&$.urlParser?async()=>$.urlParser(w.endpointV2.url):$.endpoint;if(!X)throw new Error("No valid endpoint provider available.");const Z=await U(W.input,{...$,endpoint:X});return G({...W,request:Z})},"serializerMiddleware"),xG={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},vG={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};a1(cG,"getSerdePlugin")});var mG=f((qQ,lG)=>{var{defineProperty:U1,getOwnPropertyDescriptor:G6,getOwnPropertyNames:w6}=Object,W6=Object.prototype.hasOwnProperty,u=($,U)=>U1($,"name",{value:U,configurable:!0}),L6=($,U)=>{for(var G in U)U1($,G,{get:U[G],enumerable:!0})},X6=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of w6(U))if(!W6.call($,W)&&W!==G)U1($,W,{get:()=>U[W],enumerable:!(w=G6(U,W))||w.enumerable})}return $},Z6=($)=>X6(U1({},"__esModule",{value:!0}),$),uG={};L6(uG,{endpointMiddleware:()=>gG,endpointMiddlewareOptions:()=>sG,getEndpointFromInstructions:()=>dG,getEndpointPlugin:()=>K6,resolveEndpointConfig:()=>A6,resolveParams:()=>pG,toEndpointV1:()=>e1});lG.exports=Z6(uG);var F6=u(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(J6(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!I6(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),Y6=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,z6=/(\d+\.){3}\d+/,Q6=/\.\./,I6=u(($)=>Y6.test($)&&!z6.test($)&&!Q6.test($),"isDnsCompatibleBucketName"),J6=u(($)=>{const[U,G,w,,,W]=$.split(":"),L=U==="arn"&&$.split(":").length>=6,X=Boolean(L&&G&&w&&W);if(L&&!X)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return X},"isArnBucketName"),R6=u(($,U,G)=>{const w=u(async()=>{const W=G[$]??G[U];if(typeof W==="function")return W();return W},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{const W=typeof G.credentials==="function"?await G.credentials():G.credentials;return(W==null?void 0:W.credentialScope)??(W==null?void 0:W.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{const W=typeof G.credentials==="function"?await G.credentials():G.credentials;return(W==null?void 0:W.accountId)??(W==null?void 0:W.AccountId)};if($==="endpoint"||U==="endpoint")return async()=>{const W=await w();if(W&&typeof W==="object"){if("url"in W)return W.url.href;if("hostname"in W){const{protocol:L,hostname:X,port:Z,path:F}=W;return`${L}//${X}${Z?":"+Z:""}${F}`}}return W};return w},"createConfigValueProvider"),M6=o1(),_G=kG(),e1=u(($)=>{if(typeof $==="object"){if("url"in $)return _G.parseUrl($.url);return $}return _G.parseUrl($)},"toEndpointV1"),dG=u(async($,U,G,w)=>{if(!G.endpoint){let X;if(G.serviceConfiguredEndpoint)X=await G.serviceConfiguredEndpoint();else X=await M6.getEndpointFromConfig(G.serviceId);if(X)G.endpoint=()=>Promise.resolve(e1(X))}const W=await pG($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(W,w)},"getEndpointFromInstructions"),pG=u(async($,U,G)=>{var w;const W={},L=((w=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:w.call(U))||{};for(let[X,Z]of Object.entries(L))switch(Z.type){case"staticContextParams":W[X]=Z.value;break;case"contextParams":W[X]=$[Z.name];break;case"clientContextParams":case"builtInParams":W[X]=await R6(Z.name,X,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(Z))}if(Object.keys(L).length===0)Object.assign(W,G);if(String(G.serviceId).toLowerCase()==="s3")await F6(W);return W},"resolveParams"),$1=N0(),gG=u(({config:$,instructions:U})=>{return(G,w)=>async(W)=>{var L,X,Z;const F=await dG(W.input,{getEndpointParameterInstructions(){return U}},{...$},w);w.endpointV2=F,w.authSchemes=(L=F.properties)==null?void 0:L.authSchemes;const Y=(X=w.authSchemes)==null?void 0:X[0];if(Y){w.signing_region=Y.signingRegion,w.signing_service=Y.signingName;const z=$1.getSmithyContext(w),Q=(Z=z==null?void 0:z.selectedHttpAuthScheme)==null?void 0:Z.httpAuthOption;if(Q)Q.signingProperties=Object.assign(Q.signingProperties||{},{signing_region:Y.signingRegion,signingRegion:Y.signingRegion,signing_service:Y.signingName,signingName:Y.signingName,signingRegionSet:Y.signingRegionSet},Y.properties)}return G({...W})}},"endpointMiddleware"),f6=t1(),sG={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:f6.serializerMiddlewareOption.name},K6=u(($,U)=>({applyToStack:(G)=>{G.addRelativeTo(gG({config:$,instructions:U}),sG)}}),"getEndpointPlugin"),E6=o1(),A6=u(($)=>{const U=$.tls??!0,{endpoint:G}=$,w=G!=null?async()=>e1(await $1.normalizeProvider(G)()):void 0,L={...$,endpoint:w,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:$1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:$1.normalizeProvider($.useFipsEndpoint??!1)};let X=void 0;return L.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!X)X=E6.getEndpointFromConfig($.serviceId);return X},L},"resolveEndpointConfig")});var U0=f((CQ,oG)=>{var{defineProperty:G1,getOwnPropertyDescriptor:B6,getOwnPropertyNames:V6}=Object,O6=Object.prototype.hasOwnProperty,I0=($,U)=>G1($,"name",{value:U,configurable:!0}),H6=($,U)=>{for(var G in U)G1($,G,{get:U[G],enumerable:!0})},T6=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of V6(U))if(!O6.call($,W)&&W!==G)G1($,W,{get:()=>U[W],enumerable:!(w=B6(U,W))||w.enumerable})}return $},q6=($)=>T6(G1({},"__esModule",{value:!0}),$),nG={};H6(nG,{isClockSkewCorrectedError:()=>iG,isClockSkewError:()=>b6,isRetryableByTrait:()=>k6,isServerError:()=>D6,isThrottlingError:()=>h6,isTransientError:()=>rG});oG.exports=q6(nG);var C6=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],N6=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],P6=["TimeoutError","RequestTimeout","RequestTimeoutException"],j6=[500,502,503,504],S6=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],k6=I0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),b6=I0(($)=>C6.includes($.name),"isClockSkewError"),iG=I0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),h6=I0(($)=>{var U,G;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||N6.includes($.name)||((G=$.$retryable)==null?void 0:G.throttling)==!0},"isThrottlingError"),rG=I0(($)=>{var U;return iG($)||P6.includes($.name)||S6.includes(($==null?void 0:$.code)||"")||j6.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),D6=I0(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const G=$.$metadata.httpStatusCode;if(500<=G&&G<=599&&!rG($))return!0;return!1}return!1},"isServerError")});var zw=f((NQ,Yw)=>{var{defineProperty:w1,getOwnPropertyDescriptor:x6,getOwnPropertyNames:v6}=Object,c6=Object.prototype.hasOwnProperty,d=($,U)=>w1($,"name",{value:U,configurable:!0}),y6=($,U)=>{for(var G in U)w1($,G,{get:U[G],enumerable:!0})},_6=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of v6(U))if(!c6.call($,W)&&W!==G)w1($,W,{get:()=>U[W],enumerable:!(w=x6(U,W))||w.enumerable})}return $},u6=($)=>_6(w1({},"__esModule",{value:!0}),$),tG={};y6(tG,{AdaptiveRetryStrategy:()=>m6,ConfiguredRetryStrategy:()=>n6,DEFAULT_MAX_ATTEMPTS:()=>$$,DEFAULT_RETRY_DELAY_BASE:()=>j0,DEFAULT_RETRY_MODE:()=>d6,DefaultRateLimiter:()=>Uw,INITIAL_RETRY_TOKENS:()=>U$,INVOCATION_ID_HEADER:()=>g6,MAXIMUM_RETRY_DELAY:()=>G$,NO_RETRY_INCREMENT:()=>Lw,REQUEST_HEADER:()=>s6,RETRY_COST:()=>ww,RETRY_MODES:()=>eG,StandardRetryStrategy:()=>w$,THROTTLING_RETRY_DELAY_BASE:()=>Gw,TIMEOUT_RETRY_COST:()=>Ww});Yw.exports=u6(tG);var eG=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(eG||{}),$$=3,d6="standard",p6=U0(),$w=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(),p6.isThrottlingError(U)){const W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),G=this.cubicThrottle(W),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))}};d($w,"DefaultRateLimiter");var Uw=$w,j0=100,G$=20000,Gw=500,U$=500,ww=5,Ww=10,Lw=1,g6="amz-sdk-invocation-id",s6="amz-sdk-request",l6=d(()=>{let $=j0;return{computeNextBackoffDelay:d((w)=>{return Math.floor(Math.min(G$,Math.random()*2**w*$))},"computeNextBackoffDelay"),setDelayBase:d((w)=>{$=w},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),aG=d(({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:d(()=>U,"getRetryCount"),getRetryDelay:d(()=>Math.min(G$,$),"getRetryDelay"),getRetryCost:d(()=>G,"getRetryCost")}},"createDefaultRetryToken"),Xw=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=U$,this.retryBackoffStrategy=l6(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return aG({retryDelay:j0,retryCount:0})}async refreshRetryTokenForRetry(U,G){const w=await this.getMaxAttempts();if(this.shouldRetry(U,G,w)){const W=G.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?Gw:j0);const L=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),X=G.retryAfterHint?Math.max(G.retryAfterHint.getTime()-Date.now()||0,L):L,Z=this.getCapacityCost(W);return this.capacity-=Z,aG({retryDelay:X,retryCount:U.getRetryCount()+1,retryCost:Z})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(U$,this.capacity+(U.getRetryCost()??Lw))}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 ${$$}`),$$}}shouldRetry(U,G,w){return U.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(G.errorType)&&this.isRetryableError(G.errorType)}getCapacityCost(U){return U==="TRANSIENT"?Ww:ww}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};d(Xw,"StandardRetryStrategy");var w$=Xw,Zw=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:w}=G??{};this.rateLimiter=w??new Uw,this.standardRetryStrategy=new w$(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)}};d(Zw,"AdaptiveRetryStrategy");var m6=Zw,Fw=class $ extends w${constructor(U,G=j0){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}};d(Fw,"ConfiguredRetryStrategy");var n6=Fw});var Jw=f((Qw)=>{Object.defineProperty(Qw,"__esModule",{value:!0});Qw.getAwsChunkedEncodingStream=void 0;var i6=import.meta.require("stream"),r6=($,U)=>{const{base64Encoder:G,bodyLengthChecker:w,checksumAlgorithmFn:W,checksumLocationName:L,streamHasher:X}=U,Z=G!==void 0&&W!==void 0&&L!==void 0&&X!==void 0,F=Z?X(W,$):void 0,Y=new i6.Readable({read:()=>{}});return $.on("data",(z)=>{const Q=w(z)||0;Y.push(`${Q.toString(16)}\r\n`),Y.push(z),Y.push("\r\n")}),$.on("end",async()=>{if(Y.push("0\r\n"),Z){const z=G(await F);Y.push(`${L}:${z}\r\n`),Y.push("\r\n")}Y.push(null)}),Y};Qw.getAwsChunkedEncodingStream=r6});var bw=f((jQ,kw)=>{async function X$($,U,G=fw){const w=U.headers??{},W=w.Expect||w.expect;let L=-1,X=!1;if(W==="100-continue")await Promise.race([new Promise((Z)=>{L=Number(setTimeout(Z,Math.max(fw,G)))}),new Promise((Z)=>{$.on("continue",()=>{clearTimeout(L),Z()}),$.on("error",()=>{X=!0,clearTimeout(L),Z()})})]);if(!X)Tw($,U.body)}function Tw($,U){if(U instanceof Hw.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 Sw($){const U=[],G=$.getReader();let w=!1,W=0;while(!w){const{done:Z,value:F}=await G.read();if(F)U.push(F),W+=F.length;w=Z}const L=new Uint8Array(W);let X=0;for(let Z of U)L.set(Z,X),X+=Z.length;return L}var{create:a6,defineProperty:S0,getOwnPropertyDescriptor:t6,getOwnPropertyNames:e6,getPrototypeOf:$F}=Object,UF=Object.prototype.hasOwnProperty,A=($,U)=>S0($,"name",{value:U,configurable:!0}),GF=($,U)=>{for(var G in U)S0($,G,{get:U[G],enumerable:!0})},Ew=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of e6(U))if(!UF.call($,W)&&W!==G)S0($,W,{get:()=>U[W],enumerable:!(w=t6(U,W))||w.enumerable})}return $},wF=($,U,G)=>(G=$!=null?a6($F($)):{},Ew(U||!$||!$.__esModule?S0(G,"default",{value:$,enumerable:!0}):G,$)),WF=($)=>Ew(S0({},"__esModule",{value:!0}),$),Aw={};GF(Aw,{DEFAULT_REQUEST_TIMEOUT:()=>zF,NodeHttp2Handler:()=>MF,NodeHttpHandler:()=>QF,streamCollector:()=>KF});kw.exports=WF(Aw);var Bw=G0(),Vw=o6(),W$=import.meta.require("http"),L$=import.meta.require("https"),LF=["ECONNRESET","EPIPE","ETIMEDOUT"],Ow=A(($)=>{const U={};for(let G of Object.keys($)){const w=$[G];U[G]=Array.isArray(w)?w.join(","):w}return U},"getTransformedHeaders"),Rw=1000,XF=A(($,U,G=0)=>{if(!G)return-1;const w=A((W)=>{const L=setTimeout(()=>{$.destroy(),U(Object.assign(new Error(`Socket timed out without establishing a connection within ${G} ms`),{name:"TimeoutError"}))},G-W),X=A((Z)=>{if(Z==null?void 0:Z.connecting)Z.on("connect",()=>{clearTimeout(L)});else clearTimeout(L)},"doWithSocket");if($.socket)X($.socket);else $.on("socket",X)},"registerTimeout");if(G<2000)return w(0),0;return setTimeout(w.bind(null,Rw),Rw)},"setConnectionTimeout"),ZF=3000,FF=A(($,{keepAlive:U,keepAliveMsecs:G},w=ZF)=>{if(U!==!0)return-1;const W=A(()=>{if($.socket)$.socket.setKeepAlive(U,G||0);else $.on("socket",(L)=>{L.setKeepAlive(U,G||0)})},"registerListener");if(w===0)return W(),0;return setTimeout(W,w)},"setSocketKeepAlive"),Mw=3000,YF=A(($,U,G=0)=>{const w=A((W)=>{$.setTimeout(G-W,()=>{$.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:Mw),Mw)},"setSocketTimeout"),Hw=import.meta.require("stream"),fw=1000;A(X$,"writeRequestBody");A(Tw,"writeBody");var zF=0,qw=class ${constructor(U){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((G,w)=>{if(typeof U==="function")U().then((W)=>{G(this.resolveDefaultConfig(W))}).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 W,L,X;const{sockets:Z,requests:F,maxSockets:Y}=U;if(typeof Y!=="number"||Y===1/0)return G;const z=15000;if(Date.now()-z<G)return G;if(Z&&F)for(let Q in Z){const I=((W=Z[Q])==null?void 0:W.length)??0,R=((L=F[Q])==null?void 0:L.length)??0;if(I>=Y&&R>=2*Y)return(X=w==null?void 0:w.warn)==null||X.call(w,`@smithy/node-http-handler:WARN - socket usage at capacity=${I} and ${R} 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:W,httpAgent:L,httpsAgent:X}=U||{};return{connectionTimeout:w,requestTimeout:G??W,httpAgent:(()=>{if(L instanceof W$.Agent||typeof(L==null?void 0:L.destroy)==="function")return L;return new W$.Agent({keepAlive:!0,maxSockets:50,...L})})(),httpsAgent:(()=>{if(X instanceof L$.Agent||typeof(X==null?void 0:X.destroy)==="function")return X;return new L$.Agent({keepAlive:!0,maxSockets:50,...X})})(),logger:console}}destroy(){var U,G,w,W;(G=(U=this.config)==null?void 0:U.httpAgent)==null||G.destroy(),(W=(w=this.config)==null?void 0:w.httpsAgent)==null||W.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;return new Promise((w,W)=>{let L=void 0;const X=[],Z=A(async(E)=>{await L,X.forEach(clearTimeout),w(E)},"resolve"),F=A(async(E)=>{await L,X.forEach(clearTimeout),W(E)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(G==null?void 0:G.aborted){const E=new Error("Request aborted");E.name="AbortError",F(E);return}const Y=U.protocol==="https:",z=Y?this.config.httpsAgent:this.config.httpAgent;X.push(setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(z,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const Q=Vw.buildQueryString(U.query||{});let I=void 0;if(U.username!=null||U.password!=null){const E=U.username??"",P=U.password??"";I=`${E}:${P}`}let R=U.path;if(Q)R+=`?${Q}`;if(U.fragment)R+=`#${U.fragment}`;let M=U.hostname??"";if(M[0]==="["&&M.endsWith("]"))M=U.hostname.slice(1,-1);else M=U.hostname;const K={headers:U.headers,host:M,method:U.method,path:R,port:U.port,agent:z,auth:I},k=(Y?L$.request:W$.request)(K,(E)=>{const P=new Bw.HttpResponse({statusCode:E.statusCode||-1,reason:E.statusMessage,headers:Ow(E.headers),body:E});Z({response:P})});if(k.on("error",(E)=>{if(LF.includes(E.code))F(Object.assign(E,{name:"TimeoutError"}));else F(E)}),G){const E=A(()=>{k.destroy();const P=new Error("Request aborted");P.name="AbortError",F(P)},"onAbort");if(typeof G.addEventListener==="function"){const P=G;P.addEventListener("abort",E,{once:!0}),k.once("close",()=>P.removeEventListener("abort",E))}else G.onabort=E}X.push(XF(k,F,this.config.connectionTimeout)),X.push(YF(k,F,this.config.requestTimeout));const s=K.agent;if(typeof s==="object"&&"keepAlive"in s)X.push(FF(k,{keepAlive:s.keepAlive,keepAliveMsecs:s.keepAliveMsecs}));L=X$(k,U,this.config.requestTimeout).catch((E)=>{return X.forEach(clearTimeout),W(E)})})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[U]:G}})}httpHandlerConfigs(){return this.config??{}}};A(qw,"NodeHttpHandler");var QF=qw,Kw=import.meta.require("http2"),IF=wF(import.meta.require("http2")),Cw=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()}}};A(Cw,"NodeHttp2ConnectionPool");var JF=Cw,Nw=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),W=this.sessionCache.get(w);if(W){const F=W.poll();if(F&&!this.config.disableConcurrency)return F}const L=IF.default.connect(w);if(this.config.maxConcurrency)L.settings({maxConcurrentStreams:this.config.maxConcurrency},(F)=>{if(F)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});L.unref();const X=A(()=>{L.destroy(),this.deleteSession(w,L)},"destroySessionCb");if(L.on("goaway",X),L.on("error",X),L.on("frameError",X),L.on("close",()=>this.deleteSession(w,L)),G.requestTimeout)L.setTimeout(G.requestTimeout,X);const Z=this.sessionCache.get(w)||new JF;return Z.offerLast(L),this.sessionCache.set(w,Z),L}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 W=this.getUrlString(U);(w=this.sessionCache.get(W))==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()}};A(Nw,"NodeHttp2ConnectionManager");var RF=Nw,Pw=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new RF({}),this.configProvider=new Promise((G,w)=>{if(typeof U==="function")U().then((W)=>{G(W||{})}).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:W}=this.config;return new Promise((L,X)=>{var Z;let F=!1,Y=void 0;const z=A(async(T)=>{await Y,L(T)},"resolve"),Q=A(async(T)=>{await Y,X(T)},"reject");if(G==null?void 0:G.aborted){F=!0;const T=new Error("Request aborted");T.name="AbortError",Q(T);return}const{hostname:I,method:R,port:M,protocol:K,query:O}=U;let k="";if(U.username!=null||U.password!=null){const T=U.username??"",y=U.password??"";k=`${T}:${y}@`}const s=`${K}//${k}${I}${M?`:${M}`:""}`,E={destination:new URL(s)},P=this.connectionManager.lease(E,{requestTimeout:(Z=this.config)==null?void 0:Z.sessionTimeout,disableConcurrentStreams:W||!1}),z0=A((T)=>{if(W)this.destroySession(P);F=!0,Q(T)},"rejectWithDestroy"),QU=Vw.buildQueryString(O||{});let _1=U.path;if(QU)_1+=`?${QU}`;if(U.fragment)_1+=`#${U.fragment}`;const D=P.request({...U.headers,[Kw.constants.HTTP2_HEADER_PATH]:_1,[Kw.constants.HTTP2_HEADER_METHOD]:R});if(P.ref(),D.on("response",(T)=>{const y=new Bw.HttpResponse({statusCode:T[":status"]||-1,headers:Ow(T),body:D});if(F=!0,z({response:y}),W)P.close(),this.connectionManager.deleteSession(s,P)}),w)D.setTimeout(w,()=>{D.close();const T=new Error(`Stream timed out because of no activity for ${w} ms`);T.name="TimeoutError",z0(T)});if(G){const T=A(()=>{D.close();const y=new Error("Request aborted");y.name="AbortError",z0(y)},"onAbort");if(typeof G.addEventListener==="function"){const y=G;y.addEventListener("abort",T,{once:!0}),D.once("close",()=>y.removeEventListener("abort",T))}else G.onabort=T}D.on("frameError",(T,y,_X)=>{z0(new Error(`Frame type id ${T} in stream id ${_X} has failed with code ${y}.`))}),D.on("error",z0),D.on("aborted",()=>{z0(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${D.rstCode}.`))}),D.on("close",()=>{if(P.unref(),W)P.destroy();if(!F)z0(new Error("Unexpected error: http2 request did not get a response"))}),Y=X$(D,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()}};A(Pw,"NodeHttp2Handler");var MF=Pw,jw=class $ extends Hw.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,G,w){this.bufferedBytes.push(U),w()}};A(jw,"Collector");var fF=jw,KF=A(($)=>{if(EF($))return Sw($);return new Promise((U,G)=>{const w=new fF;$.pipe(w),$.on("error",(W)=>{w.end(),G(W)}),w.on("error",G),w.on("finish",function(){const W=new Uint8Array(Buffer.concat(this.bufferedBytes));U(W)})})},"streamCollector"),EF=A(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");A(Sw,"collectReadableStream")});var k0=f((hw)=>{Object.defineProperty(hw,"__esModule",{value:!0});hw.isReadableStream=void 0;var AF=($)=>{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)};hw.isReadableStream=AF});var pw=f((uw)=>{Object.defineProperty(uw,"__esModule",{value:!0});uw.sdkStreamMixin=void 0;var VF=BF(),OF=yw(),HF=_w(),TF=J0(),xw=k0(),vw="The stream has already been transformed.",qF=($)=>{var U,G;if(!cw($)&&!xw.isReadableStream($)){const X=((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 ${X}`)}let w=!1;const W=async()=>{if(w)throw new Error(vw);return w=!0,await VF.streamCollector($)},L=(X)=>{if(typeof X.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 X.stream()};return Object.assign($,{transformToByteArray:W,transformToString:async(X)=>{const Z=await W();if(X==="base64")return OF.toBase64(Z);else if(X==="hex")return HF.toHex(Z);else if(X===void 0||X==="utf8"||X==="utf-8")return TF.toUtf8(Z);else if(typeof TextDecoder==="function")return new TextDecoder(X).decode(Z);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(w)throw new Error(vw);if(w=!0,cw($))return L($);else if(xw.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};uw.sdkStreamMixin=qF;var cw=($)=>typeof Blob==="function"&&$ instanceof Blob});var mw=f((sw)=>{Object.defineProperty(sw,"__esModule",{value:!0});sw.sdkStreamMixin=void 0;var NF=bw(),PF=CF(),Z$=import.meta.require("stream"),jF=import.meta.require("util"),SF=pw(),gw="The stream has already been transformed.",kF=($)=>{var U,G;if(!($ instanceof Z$.Readable))try{return SF.sdkStreamMixin($)}catch(L){const X=((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 ${X}`)}let w=!1;const W=async()=>{if(w)throw new Error(gw);return w=!0,await NF.streamCollector($)};return Object.assign($,{transformToByteArray:W,transformToString:async(L)=>{const X=await W();if(L===void 0||Buffer.isEncoding(L))return PF.fromArrayBuffer(X.buffer,X.byteOffset,X.byteLength).toString(L);else return new jF.TextDecoder(L).decode(X)},transformToWebStream:()=>{if(w)throw new Error(gw);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof Z$.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,Z$.Readable.toWeb($)}})};sw.sdkStreamMixin=kF});var rw=f((nw)=>{async function bF($){if(typeof $.stream==="function")$=$.stream();return $.tee()}Object.defineProperty(nw,"__esModule",{value:!0});nw.splitStream=void 0;nw.splitStream=bF});var ew=f((aw)=>{async function xF($){if(DF.isReadableStream($))return hF.splitStream($);const U=new ow.PassThrough,G=new ow.PassThrough;return $.pipe(U),$.pipe(G),[U,G]}Object.defineProperty(aw,"__esModule",{value:!0});aw.splitStream=void 0;var ow=import.meta.require("stream"),hF=rw(),DF=k0();aw.splitStream=xF});var GW=f(($W)=>{async function vF($,U){var G;let w=0;const W=[],L=$.getReader();let X=!1;while(!X){const{done:Y,value:z}=await L.read();if(z)W.push(z),w+=(G=z===null||z===void 0?void 0:z.byteLength)!==null&&G!==void 0?G:0;if(w>=U)break;X=Y}L.releaseLock();const Z=new Uint8Array(Math.min(U,w));let F=0;for(let Y of W){if(Y.byteLength>Z.byteLength-F){Z.set(Y.subarray(0,Z.byteLength-F),F);break}else Z.set(Y,F);F+=Y.length}return Z}Object.defineProperty($W,"__esModule",{value:!0});$W.headStream=void 0;$W.headStream=vF});var XW=f((WW)=>{Object.defineProperty(WW,"__esModule",{value:!0});WW.headStream=void 0;var cF=import.meta.require("stream"),yF=GW(),_F=k0(),uF=($,U)=>{if(_F.isReadableStream($))return yF.headStream($,U);return new Promise((G,w)=>{const W=new wW;W.limit=U,$.pipe(W),$.on("error",(L)=>{W.end(),w(L)}),W.on("error",w),W.on("finish",function(){const L=new Uint8Array(Buffer.concat(this.buffers));G(L)})})};WW.headStream=uF;class wW extends cF.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,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 W=this.bytesBuffered-this.limit,L=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=L.subarray(0,L.byteLength-W),this.emit("finish")}G()}}});var IW=f((cQ,W0)=>{function YW($,U="utf-8"){if(U==="base64")return ZW.toBase64($);return FW.toUtf8($)}function zW($,U){if(U==="base64")return Y$.mutate(ZW.fromBase64($));return Y$.mutate(FW.fromUtf8($))}var{defineProperty:W1,getOwnPropertyDescriptor:dF,getOwnPropertyNames:pF}=Object,gF=Object.prototype.hasOwnProperty,z$=($,U)=>W1($,"name",{value:U,configurable:!0}),sF=($,U)=>{for(var G in U)W1($,G,{get:U[G],enumerable:!0})},F$=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of pF(U))if(!gF.call($,W)&&W!==G)W1($,W,{get:()=>U[W],enumerable:!(w=dF(U,W))||w.enumerable})}return $},b0=($,U,G)=>(F$($,U,"default"),G&&F$(G,U,"default")),lF=($)=>F$(W1({},"__esModule",{value:!0}),$),w0={};sF(w0,{Uint8ArrayBlobAdapter:()=>Y$});W0.exports=lF(w0);var ZW=yw(),FW=J0();z$(YW,"transformToString");z$(zW,"transformFromString");var QW=class $ extends Uint8Array{static fromString(U,G="utf-8"){switch(typeof U){case"string":return zW(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 YW(this,U)}};z$(QW,"Uint8ArrayBlobAdapter");var Y$=QW;b0(w0,Jw(),W0.exports);b0(w0,mw(),W0.exports);b0(w0,ew(),W0.exports);b0(w0,XW(),W0.exports);b0(w0,k0(),W0.exports)});var K0=f((yQ,xW)=>{function CW($){const U=$.getUTCFullYear(),G=$.getUTCMonth(),w=$.getUTCDay(),W=$.getUTCDate(),L=$.getUTCHours(),X=$.getUTCMinutes(),Z=$.getUTCSeconds(),F=W<10?`0${W}`:`${W}`,Y=L<10?`0${L}`:`${L}`,z=X<10?`0${X}`:`${X}`,Q=Z<10?`0${Z}`:`${Z}`;return`${B2[w]}, ${F} ${V$[G]} ${U} ${Y}:${z}:${Q} GMT`}function Z1($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})}function O$($,U,G){let w,W,L;if(typeof U==="undefined"&&typeof G==="undefined")w={},L=$;else if(w=$,typeof U==="function")return W=U,L=G,e2(w,W,L);else L=U;for(let X of Object.keys(L)){if(!Array.isArray(L[X])){w[X]=L[X];continue}hW(w,null,L,X)}return w}function DW($,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 W=[];let L="";for(let X=0;X<w.length;X++){if(L==="")L=w[X];else L+=U+w[X];if((X+1)%G===0)W.push(L),L=""}if(L!=="")W.push(L);return W}var{defineProperty:F1,getOwnPropertyDescriptor:nF,getOwnPropertyNames:iF}=Object,rF=Object.prototype.hasOwnProperty,J=($,U)=>F1($,"name",{value:U,configurable:!0}),oF=($,U)=>{for(var G in U)F1($,G,{get:U[G],enumerable:!0})},aF=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of iF(U))if(!rF.call($,W)&&W!==G)F1($,W,{get:()=>U[W],enumerable:!(w=nF(U,W))||w.enumerable})}return $},tF=($)=>aF(F1({},"__esModule",{value:!0}),$),RW={};oF(RW,{Client:()=>$2,Command:()=>AW,LazyJsonString:()=>o2,NoOpLogger:()=>eF,SENSITIVE_STRING:()=>w2,ServiceException:()=>y2,StringWrapper:()=>c0,_json:()=>K$,collectBody:()=>U2,convertMap:()=>a2,createAggregatedClient:()=>W2,dateToUtcString:()=>CW,decorateServiceException:()=>PW,emitWarningIfUnsupportedVersion:()=>p2,expectBoolean:()=>X2,expectByte:()=>f$,expectFloat32:()=>L1,expectInt:()=>F2,expectInt32:()=>R$,expectLong:()=>x0,expectNonNull:()=>z2,expectNumber:()=>D0,expectObject:()=>VW,expectShort:()=>M$,expectString:()=>Q2,expectUnion:()=>I2,extendedEncodeURIComponent:()=>Z1,getArrayIfSingleItem:()=>r2,getDefaultClientConfiguration:()=>n2,getDefaultExtensionConfiguration:()=>SW,getValueFromTextNode:()=>kW,handleFloat:()=>M2,limitedParseDouble:()=>B$,limitedParseFloat:()=>f2,limitedParseFloat32:()=>K2,loadConfigsForDefaultMode:()=>d2,logger:()=>v0,map:()=>O$,parseBoolean:()=>L2,parseEpochTimestamp:()=>j2,parseRfc3339DateTime:()=>O2,parseRfc3339DateTimeWithOffset:()=>T2,parseRfc7231DateTime:()=>P2,resolveDefaultRuntimeConfig:()=>i2,resolvedPath:()=>G5,serializeDateTime:()=>W5,serializeFloat:()=>w5,splitEvery:()=>DW,strictParseByte:()=>qW,strictParseDouble:()=>A$,strictParseFloat:()=>J2,strictParseFloat32:()=>OW,strictParseInt:()=>E2,strictParseInt32:()=>A2,strictParseLong:()=>TW,strictParseShort:()=>R0,take:()=>t2,throwDefaultError:()=>jW,withBaseException:()=>_2});xW.exports=tF(RW);var MW=class ${trace(){}debug(){}info(){}warn(){}error(){}};J(MW,"NoOpLogger");var eF=MW,fW=mF(),KW=class ${constructor(U){this.config=U,this.middlewareStack=fW.constructStack()}send(U,G,w){const W=typeof G!=="function"?G:void 0,L=typeof G==="function"?G:w,X=W===void 0&&this.config.cacheMiddleware===!0;let Z;if(X){if(!this.handlers)this.handlers=new WeakMap;const F=this.handlers;if(F.has(U.constructor))Z=F.get(U.constructor);else Z=U.resolveMiddleware(this.middlewareStack,this.config,W),F.set(U.constructor,Z)}else delete this.handlers,Z=U.resolveMiddleware(this.middlewareStack,this.config,W);if(L)Z(U).then((F)=>L(null,F.output),(F)=>L(F)).catch(()=>{});else return Z(U).then((F)=>F.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}};J(KW,"Client");var $2=KW,Q$=IW(),U2=J(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return Q$.Uint8ArrayBlobAdapter.mutate($);if(!$)return Q$.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const G=U.streamCollector($);return Q$.Uint8ArrayBlobAdapter.mutate(await G)},"collectBody"),J$=C0(),EW=class ${constructor(){this.middlewareStack=fW.constructStack()}static classBuilder(){return new G2}resolveMiddlewareWithContext(U,G,w,{middlewareFn:W,clientName:L,commandName:X,inputFilterSensitiveLog:Z,outputFilterSensitiveLog:F,smithyContext:Y,additionalContext:z,CommandCtor:Q}){for(let O of W.bind(this)(Q,U,G,w))this.middlewareStack.use(O);const I=U.concat(this.middlewareStack),{logger:R}=G,M={logger:R,clientName:L,commandName:X,inputFilterSensitiveLog:Z,outputFilterSensitiveLog:F,[J$.SMITHY_CONTEXT_KEY]:{commandInstance:this,...Y},...z},{requestHandler:K}=G;return I.resolve((O)=>K.handle(O.request,w||{}),M)}};J(EW,"Command");var AW=EW,BW=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 AW{constructor(...[W]){super();this.serialize=G._serializer,this.deserialize=G._deserializer,this.input=W??{},G._init(this)}static getEndpointParameterInstructions(){return G._ep}resolveMiddleware(W,L,X){return this.resolveMiddlewareWithContext(W,L,X,{CommandCtor:w,middlewareFn:G._middlewareFn,clientName:G._clientName,commandName:G._commandName,inputFilterSensitiveLog:G._inputFilterSensitiveLog,outputFilterSensitiveLog:G._outputFilterSensitiveLog,smithyContext:G._smithyContext,additionalContext:G._additionalContext})}},J(U,"CommandRef"),U)}};J(BW,"ClassBuilder");var G2=BW,w2="***SensitiveInformation***",W2=J(($,U)=>{for(let G of Object.keys($)){const w=$[G],W=J(async function(X,Z,F){const Y=new w(X);if(typeof Z==="function")this.send(Y,Z);else if(typeof F==="function"){if(typeof Z!=="object")throw new Error(`Expected http options but got ${typeof Z}`);this.send(Y,Z||{},F)}else return this.send(Y,Z)},"methodImpl"),L=(G[0].toLowerCase()+G.slice(1)).replace(/Command$/,"");U.prototype[L]=W}},"createAggregatedClient"),L2=J(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),X2=J(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)v0.warn(X1(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const U=$.toLowerCase();if(U==="false"||U==="true")v0.warn(X1(`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=J(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))v0.warn(X1(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),Z2=Math.ceil(340282346638528860000000000000000000000),L1=J(($)=>{const U=D0($);if(U!==void 0&&!Number.isNaN(U)&&U!==1/0&&U!==-1/0){if(Math.abs(U)>Z2)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),x0=J(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),F2=x0,R$=J(($)=>E$($,32),"expectInt32"),M$=J(($)=>E$($,16),"expectShort"),f$=J(($)=>E$($,8),"expectByte"),E$=J(($,U)=>{const G=x0($);if(G!==void 0&&Y2(G,U)!==G)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return G},"expectSizedInt"),Y2=J(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),z2=J(($,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"),VW=J(($)=>{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"),Q2=J(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return v0.warn(X1(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),I2=J(($)=>{if($===null||$===void 0)return;const U=VW($),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"),A$=J(($)=>{if(typeof $=="string")return D0(f0($));return D0($)},"strictParseDouble"),J2=A$,OW=J(($)=>{if(typeof $=="string")return L1(f0($));return L1($)},"strictParseFloat32"),R2=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,f0=J(($)=>{const U=$.match(R2);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),B$=J(($)=>{if(typeof $=="string")return HW($);return D0($)},"limitedParseDouble"),M2=B$,f2=B$,K2=J(($)=>{if(typeof $=="string")return HW($);return L1($)},"limitedParseFloat32"),HW=J(($)=>{switch($){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),TW=J(($)=>{if(typeof $==="string")return x0(f0($));return x0($)},"strictParseLong"),E2=TW,A2=J(($)=>{if(typeof $==="string")return R$(f0($));return R$($)},"strictParseInt32"),R0=J(($)=>{if(typeof $==="string")return M$(f0($));return M$($)},"strictParseShort"),qW=J(($)=>{if(typeof $==="string")return f$(f0($));return f$($)},"strictParseByte"),X1=J(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),v0={warn:console.warn},B2=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],V$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];J(CW,"dateToUtcString");var V2=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),O2=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=V2.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,w,W,L,X,Z,F,Y]=U,z=R0(M0(w)),Q=g(W,"month",1,12),I=g(L,"day",1,31);return h0(z,Q,I,{hours:X,minutes:Z,seconds:F,fractionalMilliseconds:Y})},"parseRfc3339DateTime"),H2=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),T2=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=H2.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,w,W,L,X,Z,F,Y,z]=U,Q=R0(M0(w)),I=g(W,"month",1,12),R=g(L,"day",1,31),M=h0(Q,I,R,{hours:X,minutes:Z,seconds:F,fractionalMilliseconds:Y});if(z.toUpperCase()!="Z")M.setTime(M.getTime()-c2(z));return M},"parseRfc3339DateTimeWithOffset"),q2=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$/),C2=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$/),N2=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})$/),P2=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=q2.exec($);if(U){const[G,w,W,L,X,Z,F,Y]=U;return h0(R0(M0(L)),I$(W),g(w,"day",1,31),{hours:X,minutes:Z,seconds:F,fractionalMilliseconds:Y})}if(U=C2.exec($),U){const[G,w,W,L,X,Z,F,Y]=U;return b2(h0(S2(L),I$(W),g(w,"day",1,31),{hours:X,minutes:Z,seconds:F,fractionalMilliseconds:Y}))}if(U=N2.exec($),U){const[G,w,W,L,X,Z,F,Y]=U;return h0(R0(M0(Y)),I$(w),g(W.trimLeft(),"day",1,31),{hours:L,minutes:X,seconds:Z,fractionalMilliseconds:F})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),j2=J(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=A$($);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===1/0||U===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(U*1000))},"parseEpochTimestamp"),h0=J(($,U,G,w)=>{const W=U-1;return D2($,W,G),new Date(Date.UTC($,W,G,g(w.hours,"hour",0,23),g(w.minutes,"minute",0,59),g(w.seconds,"seconds",0,60),v2(w.fractionalMilliseconds)))},"buildDate"),S2=J(($)=>{const U=new Date().getUTCFullYear(),G=Math.floor(U/100)*100+R0(M0($));if(G<U)return G+100;return G},"parseTwoDigitYear"),k2=1576800000000,b2=J(($)=>{if($.getTime()-new Date().getTime()>k2)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),I$=J(($)=>{const U=V$.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),h2=[31,28,31,30,31,30,31,31,30,31,30,31],D2=J(($,U,G)=>{let w=h2[U];if(U===1&&x2($))w=29;if(G>w)throw new TypeError(`Invalid day for ${V$[U]} in ${$}: ${G}`)},"validateDayOfMonth"),x2=J(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),g=J(($,U,G,w)=>{const W=qW(M0($));if(W<G||W>w)throw new TypeError(`${U} must be between ${G} and ${w}, inclusive`);return W},"parseDateValue"),v2=J(($)=>{if($===null||$===void 0)return 0;return OW("0."+$)*1000},"parseMilliseconds"),c2=J(($)=>{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)),W=Number($.substring(4,6));return G*(w*60+W)*60*1000},"parseOffsetToMilliseconds"),M0=J(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),NW=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};J(NW,"ServiceException");var y2=NW,PW=J(($,U={})=>{Object.entries(U).filter(([,w])=>w!==void 0).forEach(([w,W])=>{if($[w]==null||$[w]==="")$[w]=W});const G=$.message||$.Message||"UnknownError";return $.message=G,delete $.Message,$},"decorateServiceException"),jW=J(({output:$,parsedBody:U,exceptionCtor:G,errorCode:w})=>{const W=u2($),L=W.httpStatusCode?W.httpStatusCode+"":void 0,X=new G({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||w||L||"UnknownError",$fault:"client",$metadata:W});throw PW(X,U)},"throwDefaultError"),_2=J(($)=>{return({output:U,parsedBody:G,errorCode:w})=>{jW({output:U,parsedBody:G,exceptionCtor:$,errorCode:w})}},"withBaseException"),u2=J(($)=>({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"),d2=J(($)=>{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"),JW=!1,p2=J(($)=>{if($&&!JW&&parseInt($.substring(1,$.indexOf(".")))<16)JW=!0},"emitWarningIfUnsupportedVersion"),g2=J(($)=>{const U=[];for(let G in J$.AlgorithmId){const w=J$.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"),s2=J(($)=>{const U={};return $.checksumAlgorithms().forEach((G)=>{U[G.algorithmId()]=G.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),l2=J(($)=>{let U=$.retryStrategy;return{setRetryStrategy(G){U=G},retryStrategy(){return U}}},"getRetryConfiguration"),m2=J(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),SW=J(($)=>{return{...g2($),...l2($)}},"getDefaultExtensionConfiguration"),n2=SW,i2=J(($)=>{return{...s2($),...m2($)}},"resolveDefaultRuntimeConfig");J(Z1,"extendedEncodeURIComponent");var r2=J(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),kW=J(($)=>{for(let G in $)if($.hasOwnProperty(G)&&$[G]["#text"]!==void 0)$[G]=$[G]["#text"];else if(typeof $[G]==="object"&&$[G]!==null)$[G]=kW($[G]);return $},"getValueFromTextNode"),c0=J(function(){const $=Object.getPrototypeOf(this).constructor,G=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(G,$.prototype),G},"StringWrapper");c0.prototype=Object.create(String.prototype,{constructor:{value:c0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(c0,String);var bW=class $ extends c0{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))}};J(bW,"LazyJsonString");var o2=bW;J(O$,"map");var a2=J(($)=>{const U={};for(let[G,w]of Object.entries($||{}))U[G]=[,w];return U},"convertMap"),t2=J(($,U)=>{const G={};for(let w in U)hW(G,$,U,w);return G},"take"),e2=J(($,U,G)=>{return O$($,Object.entries(G).reduce((w,[W,L])=>{if(Array.isArray(L))w[W]=L;else if(typeof L==="function")w[W]=[U,L()];else w[W]=[U,L];return w},{}))},"mapWithFilter"),hW=J(($,U,G,w)=>{if(U!==null){let X=G[w];if(typeof X==="function")X=[,X];const[Z=$5,F=U5,Y=w]=X;if(typeof Z==="function"&&Z(U[Y])||typeof Z!=="function"&&!!Z)$[w]=F(U[Y]);return}let[W,L]=G[w];if(typeof L==="function"){let X;const Z=W===void 0&&(X=L())!=null,F=typeof W==="function"&&!!W(void 0)||typeof W!=="function"&&!!W;if(Z)$[w]=X;else if(F)$[w]=L()}else{const X=W===void 0&&L!=null,Z=typeof W==="function"&&!!W(L)||typeof W!=="function"&&!!W;if(X||Z)$[w]=L}},"applyInstruction"),$5=J(($)=>$!=null,"nonNullish"),U5=J(($)=>$,"pass"),G5=J(($,U,G,w,W,L)=>{if(U!=null&&U[G]!==void 0){const X=w();if(X.length<=0)throw new Error("Empty value provided for input HTTP label: "+G+".");$=$.replace(W,L?X.split("/").map((Z)=>Z1(Z)).join("/"):Z1(X))}else throw new Error("No value provided for input HTTP label: "+G+".");return $},"resolvedPath"),w5=J(($)=>{if($!==$)return"NaN";switch($){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return $}},"serializeFloat"),W5=J(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),K$=J(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(K$);if(typeof $==="object"){const U={};for(let G of Object.keys($)){if($[G]==null)continue;U[G]=K$($[G])}return U}return $},"_json");J(DW,"splitEvery")});var yW=f((vW)=>{Object.defineProperty(vW,"__esModule",{value:!0});vW.isStreamingPayload=void 0;var L5=import.meta.require("stream"),X5=($)=>($===null||$===void 0?void 0:$.body)instanceof L5.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;vW.isStreamingPayload=X5});var GL=f((dQ,UL)=>{var{defineProperty:Y1,getOwnPropertyDescriptor:Z5,getOwnPropertyNames:F5}=Object,Y5=Object.prototype.hasOwnProperty,C=($,U)=>Y1($,"name",{value:U,configurable:!0}),z5=($,U)=>{for(var G in U)Y1($,G,{get:U[G],enumerable:!0})},Q5=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of F5(U))if(!Y5.call($,W)&&W!==G)Y1($,W,{get:()=>U[W],enumerable:!(w=Z5(U,W))||w.enumerable})}return $},I5=($)=>Q5(Y1({},"__esModule",{value:!0}),$),uW={};z5(uW,{AdaptiveRetryStrategy:()=>M5,CONFIG_MAX_ATTEMPTS:()=>T$,CONFIG_RETRY_MODE:()=>rW,ENV_MAX_ATTEMPTS:()=>H$,ENV_RETRY_MODE:()=>iW,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>f5,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>E5,StandardRetryStrategy:()=>mW,defaultDelayDecider:()=>pW,defaultRetryDecider:()=>gW,getOmitRetryHeadersPlugin:()=>A5,getRetryAfterHint:()=>$L,getRetryPlugin:()=>q5,omitRetryHeadersMiddleware:()=>oW,omitRetryHeadersMiddlewareOptions:()=>aW,resolveRetryConfig:()=>K5,retryMiddleware:()=>tW,retryMiddlewareOptions:()=>eW});UL.exports=I5(uW);var E0=G0(),dW=m1(),H=zw(),J5=C(($,U)=>{const G=$,w=(U==null?void 0:U.noRetryIncrement)??H.NO_RETRY_INCREMENT,W=(U==null?void 0:U.retryCost)??H.RETRY_COST,L=(U==null?void 0:U.timeoutRetryCost)??H.TIMEOUT_RETRY_COST;let X=$;const Z=C((Q)=>Q.name==="TimeoutError"?L:W,"getCapacityAmount"),F=C((Q)=>Z(Q)<=X,"hasRetryTokens");return Object.freeze({hasRetryTokens:F,retrieveRetryTokens:C((Q)=>{if(!F(Q))throw new Error("No retry token available");const I=Z(Q);return X-=I,I},"retrieveRetryTokens"),releaseRetryTokens:C((Q)=>{X+=Q??w,X=Math.min(X,G)},"releaseRetryTokens")})},"getDefaultRetryQuota"),pW=C(($,U)=>Math.floor(Math.min(H.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),r=U0(),gW=C(($)=>{if(!$)return!1;return r.isRetryableByTrait($)||r.isClockSkewError($)||r.isThrottlingError($)||r.isTransientError($)},"defaultRetryDecider"),sW=C(($)=>{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"),lW=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode=H.RETRY_MODES.STANDARD,this.retryDecider=(G==null?void 0:G.retryDecider)??gW,this.delayDecider=(G==null?void 0:G.delayDecider)??pW,this.retryQuota=(G==null?void 0:G.retryQuota)??J5(H.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=H.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,G,w){let W,L=0,X=0;const Z=await this.getMaxAttempts(),{request:F}=G;if(E0.HttpRequest.isInstance(F))F.headers[H.INVOCATION_ID_HEADER]=dW.v4();while(!0)try{if(E0.HttpRequest.isInstance(F))F.headers[H.REQUEST_HEADER]=`attempt=${L+1}; max=${Z}`;if(w==null?void 0:w.beforeRequest)await w.beforeRequest();const{response:Y,output:z}=await U(G);if(w==null?void 0:w.afterRequest)w.afterRequest(Y);return this.retryQuota.releaseRetryTokens(W),z.$metadata.attempts=L+1,z.$metadata.totalRetryDelay=X,{response:Y,output:z}}catch(Y){const z=sW(Y);if(L++,this.shouldRetry(z,L,Z)){W=this.retryQuota.retrieveRetryTokens(z);const Q=this.delayDecider(r.isThrottlingError(z)?H.THROTTLING_RETRY_DELAY_BASE:H.DEFAULT_RETRY_DELAY_BASE,L),I=R5(z.$response),R=Math.max(I||0,Q);X+=R,await new Promise((M)=>setTimeout(M,R));continue}if(!z.$metadata)z.$metadata={};throw z.$metadata.attempts=L,z.$metadata.totalRetryDelay=X,z}}};C(lW,"StandardRetryStrategy");var mW=lW,R5=C(($)=>{if(!E0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((L)=>L.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"),nW=class $ extends mW{constructor(U,G){const{rateLimiter:w,...W}=G??{};super(U,W);this.rateLimiter=w??new H.DefaultRateLimiter,this.mode=H.RETRY_MODES.ADAPTIVE}async retry(U,G){return super.retry(U,G,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}};C(nW,"AdaptiveRetryStrategy");var M5=nW,_W=N0(),H$="AWS_MAX_ATTEMPTS",T$="max_attempts",f5={environmentVariableSelector:($)=>{const U=$[H$];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${H$} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[T$];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${T$} mast be a number, got "${U}"`);return G},default:H.DEFAULT_MAX_ATTEMPTS},K5=C(($)=>{const{retryStrategy:U}=$,G=_W.normalizeProvider($.maxAttempts??H.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await _W.normalizeProvider($.retryMode)()===H.RETRY_MODES.ADAPTIVE)return new H.AdaptiveRetryStrategy(G);return new H.StandardRetryStrategy(G)}}},"resolveRetryConfig"),iW="AWS_RETRY_MODE",rW="retry_mode",E5={environmentVariableSelector:($)=>$[iW],configFileSelector:($)=>$[rW],default:H.DEFAULT_RETRY_MODE},oW=C(()=>($)=>async(U)=>{const{request:G}=U;if(E0.HttpRequest.isInstance(G))delete G.headers[H.INVOCATION_ID_HEADER],delete G.headers[H.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),aW={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},A5=C(($)=>({applyToStack:(U)=>{U.addRelativeTo(oW(),aW)}}),"getOmitRetryHeadersPlugin"),B5=K0(),V5=yW(),tW=C(($)=>(U,G)=>async(w)=>{var W;let L=await $.retryStrategy();const X=await $.maxAttempts();if(O5(L)){L=L;let Z=await L.acquireInitialRetryToken(G.partition_id),F=new Error,Y=0,z=0;const{request:Q}=w,I=E0.HttpRequest.isInstance(Q);if(I)Q.headers[H.INVOCATION_ID_HEADER]=dW.v4();while(!0)try{if(I)Q.headers[H.REQUEST_HEADER]=`attempt=${Y+1}; max=${X}`;const{response:R,output:M}=await U(w);return L.recordSuccess(Z),M.$metadata.attempts=Y+1,M.$metadata.totalRetryDelay=z,{response:R,output:M}}catch(R){const M=H5(R);if(F=sW(R),I&&V5.isStreamingPayload(Q))throw(W=G.logger instanceof B5.NoOpLogger?console:G.logger)==null||W.warn("An error was encountered in a non-retryable streaming request."),F;try{Z=await L.refreshRetryTokenForRetry(Z,M)}catch(O){if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=Y+1,F.$metadata.totalRetryDelay=z,F}Y=Z.getRetryCount();const K=Z.getRetryDelay();z+=K,await new Promise((O)=>setTimeout(O,K))}}else{if(L=L,L==null?void 0:L.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",L.mode]];return L.retry(U,w)}},"retryMiddleware"),O5=C(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),H5=C(($)=>{const U={error:$,errorType:T5($)},G=$L($.$response);if(G)U.retryAfterHint=G;return U},"getRetryErrorInfo"),T5=C(($)=>{if(r.isThrottlingError($))return"THROTTLING";if(r.isTransientError($))return"TRANSIENT";if(r.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),eW={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},q5=C(($)=>({applyToStack:(U)=>{U.add(tW($),eW)}}),"getRetryPlugin"),$L=C(($)=>{if(!E0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((L)=>L.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 C$=f((pQ,VL)=>{function LL($){const U=new Map;for(let G of $)U.set(G.schemeId,G);return U}function KL($,U){return new AL($,U)}function BL($,U,G,w,W){return V(async function*L(X,Z,...F){let Y=X.startingToken||void 0,z=!0,Q;while(z){if(Z[G]=Y,W)Z[W]=Z[W]??X.pageSize;if(X.client instanceof $)Q=await r5(U,X.client,Z,...F);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield Q;const I=Y;Y=o5(Q,w),z=!!(Y&&(!X.stopOnSameToken||Y!==I))}return},"paginateOperation")}var{defineProperty:Q1,getOwnPropertyDescriptor:C5,getOwnPropertyNames:N5}=Object,P5=Object.prototype.hasOwnProperty,V=($,U)=>Q1($,"name",{value:U,configurable:!0}),j5=($,U)=>{for(var G in U)Q1($,G,{get:U[G],enumerable:!0})},S5=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of N5(U))if(!P5.call($,W)&&W!==G)Q1($,W,{get:()=>U[W],enumerable:!(w=C5(U,W))||w.enumerable})}return $},k5=($)=>S5(Q1({},"__esModule",{value:!0}),$),wL={};j5(wL,{DefaultIdentityProviderConfig:()=>u5,EXPIRATION_MS:()=>ML,HttpApiKeyAuthSigner:()=>d5,HttpBearerAuthSigner:()=>p5,NoAuthSigner:()=>g5,RequestBuilder:()=>AL,createIsIdentityExpiredFunction:()=>RL,createPaginator:()=>BL,doesIdentityRequireRefresh:()=>fL,getHttpAuthSchemeEndpointRuleSetPlugin:()=>h5,getHttpAuthSchemePlugin:()=>x5,getHttpSigningPlugin:()=>_5,getSmithyContext:()=>m5,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>XL,httpAuthSchemeMiddleware:()=>q$,httpAuthSchemeMiddlewareOptions:()=>ZL,httpSigningMiddleware:()=>FL,httpSigningMiddlewareOptions:()=>YL,isIdentityExpired:()=>s5,memoizeIdentityProvider:()=>l5,normalizeProvider:()=>n5,requestBuilder:()=>KL});VL.exports=k5(wL);var WL=N0();V(LL,"convertHttpAuthSchemesToMap");var q$=V(($,U)=>(G,w)=>async(W)=>{var L;const X=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,w,W.input)),Z=LL($.httpAuthSchemes),F=WL.getSmithyContext(w),Y=[];for(let z of X){const Q=Z.get(z.schemeId);if(!Q){Y.push(`HttpAuthScheme \`${z.schemeId}\` was not enabled for this service.`);continue}const I=Q.identityProvider(await U.identityProviderConfigProvider($));if(!I){Y.push(`HttpAuthScheme \`${z.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:R={},signingProperties:M={}}=((L=z.propertiesExtractor)==null?void 0:L.call(z,$,w))||{};z.identityProperties=Object.assign(z.identityProperties||{},R),z.signingProperties=Object.assign(z.signingProperties||{},M),F.selectedHttpAuthScheme={httpAuthOption:z,identity:await I(z.identityProperties),signer:Q.signer};break}if(!F.selectedHttpAuthScheme)throw new Error(Y.join("\n"));return G(W)},"httpAuthSchemeMiddleware"),b5=mG(),XL={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:b5.endpointMiddlewareOptions.name},h5=V(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(w)=>{w.addRelativeTo(q$($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),XL)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),D5=t1(),ZL={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:D5.serializerMiddlewareOption.name},x5=V(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(w)=>{w.addRelativeTo(q$($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),ZL)}}),"getHttpAuthSchemePlugin"),I1=G0(),v5=V(($)=>(U)=>{throw U},"defaultErrorHandler"),c5=V(($,U)=>{},"defaultSuccessHandler"),FL=V(($)=>(U,G)=>async(w)=>{if(!I1.HttpRequest.isInstance(w.request))return U(w);const L=WL.getSmithyContext(G).selectedHttpAuthScheme;if(!L)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:X={}},identity:Z,signer:F}=L,Y=await U({...w,request:await F.sign(w.request,Z,X)}).catch((F.errorHandler||v5)(X));return(F.successHandler||c5)(Y.response,X),Y},"httpSigningMiddleware"),y5=GL(),YL={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:y5.retryMiddlewareOptions.name},_5=V(($)=>({applyToStack:(U)=>{U.addRelativeTo(FL($),YL)}}),"getHttpSigningPlugin"),zL=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)}};V(zL,"DefaultIdentityProviderConfig");var u5=zL,z1=C0(),QL=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 W=I1.HttpRequest.clone(U);if(w.in===z1.HttpApiKeyAuthLocation.QUERY)W.query[w.name]=G.apiKey;else if(w.in===z1.HttpApiKeyAuthLocation.HEADER)W.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 W}};V(QL,"HttpApiKeyAuthSigner");var d5=QL,IL=class ${async sign(U,G,w){const W=I1.HttpRequest.clone(U);if(!G.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return W.headers.Authorization=`Bearer ${G.token}`,W}};V(IL,"HttpBearerAuthSigner");var p5=IL,JL=class ${async sign(U,G,w){return U}};V(JL,"NoAuthSigner");var g5=JL,RL=V(($)=>(U)=>fL(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),ML=300000,s5=RL(ML),fL=V(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),l5=V(($,U,G)=>{if($===void 0)return;const w=typeof $!=="function"?async()=>Promise.resolve($):$;let W,L,X,Z=!1;const F=V(async(Y)=>{if(!L)L=w(Y);try{W=await L,X=!0,Z=!1}finally{L=void 0}return W},"coalesceProvider");if(U===void 0)return async(Y)=>{if(!X||(Y==null?void 0:Y.forceRefresh))W=await F(Y);return W};return async(Y)=>{if(!X||(Y==null?void 0:Y.forceRefresh))W=await F(Y);if(Z)return W;if(!G(W))return Z=!0,W;if(U(W))return await F(Y),W;return W}},"memoizeIdentityProvider"),m5=V(($)=>$[z1.SMITHY_CONTEXT_KEY]||($[z1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),n5=V(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),i5=K0();V(KL,"requestBuilder");var EL=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:W}=await this.context.endpoint();this.path=W;for(let L of this.resolvePathStack)L(this.path);return new I1.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,W){return this.resolvePathStack.push((L)=>{this.path=i5.resolvedPath(L,this.input,U,G,w,W)}),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}};V(EL,"RequestBuilder");var AL=EL,r5=V(async($,U,G,...w)=>{return await U.send(new $(G),...w)},"makePagedClientRequest");V(BL,"createPaginator");var o5=V(($,U)=>{let G=$;const w=U.split(".");for(let W of w){if(!G||typeof G!=="object")return;G=G[W]}return G},"get")});var I8=f(($K,Q8)=>{var{defineProperty:j1,getOwnPropertyDescriptor:kY,getOwnPropertyNames:bY}=Object,hY=Object.prototype.hasOwnProperty,DY=($,U)=>j1($,"name",{value:U,configurable:!0}),xY=($,U)=>{for(var G in U)j1($,G,{get:U[G],enumerable:!0})},vY=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of bY(U))if(!hY.call($,W)&&W!==G)j1($,W,{get:()=>U[W],enumerable:!(w=kY(U,W))||w.enumerable})}return $},cY=($)=>vY(j1({},"__esModule",{value:!0}),$),z8={};xY(z8,{emitWarningIfUnsupportedVersion:()=>yY});Q8.exports=cY(z8);var Y8=!1,yY=DY(($)=>{if($&&!Y8&&parseInt($.substring(1,$.indexOf(".")))<18)Y8=!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 b8=f((UK,k8)=>{function a$($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break}var{defineProperty:x1,getOwnPropertyDescriptor:dY,getOwnPropertyNames:pY}=Object,gY=Object.prototype.hasOwnProperty,N=($,U)=>x1($,"name",{value:U,configurable:!0}),sY=($,U)=>{for(var G in U)x1($,G,{get:U[G],enumerable:!0})},lY=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of pY(U))if(!gY.call($,W)&&W!==G)x1($,W,{get:()=>U[W],enumerable:!(w=dY(U,W))||w.enumerable})}return $},mY=($)=>lY(x1({},"__esModule",{value:!0}),$),K8={};sY(K8,{SignatureV4:()=>E7,clearCredentialCache:()=>Y7,createScope:()=>b1,getCanonicalHeaders:()=>o$,getCanonicalQuery:()=>q8,getPayloadHash:()=>D1,getSigningKey:()=>T8,moveHeadersToQuery:()=>j8,prepareRequest:()=>t$});k8.exports=mY(K8);var J8=N0(),n$=J0(),nY="X-Amz-Algorithm",iY="X-Amz-Credential",E8="X-Amz-Date",rY="X-Amz-SignedHeaders",oY="X-Amz-Expires",A8="X-Amz-Signature",B8="X-Amz-Security-Token",V8="authorization",O8=E8.toLowerCase(),aY="date",tY=[V8,O8,aY],eY=A8.toLowerCase(),r$="x-amz-content-sha256",$7=B8.toLowerCase(),U7={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},G7=/^proxy-/,w7=/^sec-/,i$="AWS4-HMAC-SHA256",W7="AWS4-HMAC-SHA256-PAYLOAD",L7="UNSIGNED-PAYLOAD",X7=50,H8="aws4_request",Z7=604800,t=_w(),F7=J0(),H0={},k1=[],b1=N(($,U,G)=>`${$}/${U}/${G}/${H8}`,"createScope"),T8=N(async($,U,G,w,W)=>{const L=await R8($,U.secretAccessKey,U.accessKeyId),X=`${G}:${w}:${W}:${t.toHex(L)}:${U.sessionToken}`;if(X in H0)return H0[X];k1.push(X);while(k1.length>X7)delete H0[k1.shift()];let Z=`AWS4${U.secretAccessKey}`;for(let F of[G,w,W,H8])Z=await R8($,Z,F);return H0[X]=Z},"getSigningKey"),Y7=N(()=>{k1.length=0,Object.keys(H0).forEach(($)=>{delete H0[$]})},"clearCredentialCache"),R8=N(($,U,G)=>{const w=new $(U);return w.update(F7.toUint8Array(G)),w.digest()},"hmac"),o$=N(({headers:$},U,G)=>{const w={};for(let W of Object.keys($).sort()){if($[W]==null)continue;const L=W.toLowerCase();if(L in U7||(U==null?void 0:U.has(L))||G7.test(L)||w7.test(L)){if(!G||G&&!G.has(L))continue}w[L]=$[W].trim().replace(/\s+/g," ")}return w},"getCanonicalHeaders"),h1=_Y(),q8=N(({query:$={}})=>{const U=[],G={};for(let w of Object.keys($)){if(w.toLowerCase()===eY)continue;const W=h1.escapeUri(w);U.push(W);const L=$[w];if(typeof L==="string")G[W]=`${W}=${h1.escapeUri(L)}`;else if(Array.isArray(L))G[W]=L.slice(0).reduce((X,Z)=>X.concat([`${W}=${h1.escapeUri(Z)}`]),[]).sort().join("&")}return U.sort().map((w)=>G[w]).filter((w)=>w).join("&")},"getCanonicalQuery"),z7=uY(),Q7=J0(),D1=N(async({headers:$,body:U},G)=>{for(let w of Object.keys($))if(w.toLowerCase()===r$)return $[w];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||z7.isArrayBuffer(U)){const w=new G;return w.update(Q7.toUint8Array(U)),t.toHex(await w.digest())}return L7},"getPayloadHash"),M8=J0(),C8=class ${format(U){const G=[];for(let L of Object.keys(U)){const X=M8.fromUtf8(L);G.push(Uint8Array.from([X.byteLength]),X,this.formatHeaderValue(U[L]))}const w=new Uint8Array(G.reduce((L,X)=>L+X.byteLength,0));let W=0;for(let L of G)w.set(L,W),W+=L.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 W=new Uint8Array(9);return W[0]=5,W.set(U.value.bytes,1),W;case"binary":const L=new DataView(new ArrayBuffer(3+U.value.byteLength));L.setUint8(0,6),L.setUint16(1,U.value.byteLength,!1);const X=new Uint8Array(L.buffer);return X.set(U.value,3),X;case"string":const Z=M8.fromUtf8(U.value),F=new DataView(new ArrayBuffer(3+Z.byteLength));F.setUint8(0,7),F.setUint16(1,Z.byteLength,!1);const Y=new Uint8Array(F.buffer);return Y.set(Z,3),Y;case"timestamp":const z=new Uint8Array(9);return z[0]=8,z.set(R7.fromNumber(U.value.valueOf()).bytes,1),z;case"uuid":if(!J7.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const Q=new Uint8Array(17);return Q[0]=9,Q.set(t.fromHex(U.value.replace(/\-/g,"")),1),Q}}};N(C8,"HeaderFormatter");var I7=C8,J7=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,N8=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,W=Math.abs(Math.round(U));w>-1&&W>0;w--,W/=256)G[w]=W;if(U<0)a$(G);return new $(G)}valueOf(){const U=this.bytes.slice(0),G=U[0]&128;if(G)a$(U);return parseInt(t.toHex(U),16)*(G?-1:1)}toString(){return String(this.valueOf())}};N(N8,"Int64");var R7=N8;N(a$,"negate");var M7=N(($,U)=>{$=$.toLowerCase();for(let G of Object.keys(U))if($===G.toLowerCase())return!0;return!1},"hasHeader"),P8=G0(),j8=N(($,U={})=>{var G;const{headers:w,query:W={}}=P8.HttpRequest.clone($);for(let L of Object.keys(w)){const X=L.toLowerCase();if(X.slice(0,6)==="x-amz-"&&!((G=U.unhoistableHeaders)==null?void 0:G.has(X)))W[L]=w[L],delete w[L]}return{...$,headers:w,query:W}},"moveHeadersToQuery"),t$=N(($)=>{$=P8.HttpRequest.clone($);for(let U of Object.keys($.headers))if(tY.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),f7=N(($)=>K7($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),K7=N(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),S8=class ${constructor({applyChecksum:U,credentials:G,region:w,service:W,sha256:L,uriEscapePath:X=!0}){this.headerFormatter=new I7,this.service=W,this.sha256=L,this.uriEscapePath=X,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=J8.normalizeProvider(w),this.credentialProvider=J8.normalizeProvider(G)}async presign(U,G={}){const{signingDate:w=new Date,expiresIn:W=3600,unsignableHeaders:L,unhoistableHeaders:X,signableHeaders:Z,signingRegion:F,signingService:Y}=G,z=await this.credentialProvider();this.validateResolvedCredentials(z);const Q=F??await this.regionProvider(),{longDate:I,shortDate:R}=S1(w);if(W>Z7)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const M=b1(R,Q,Y??this.service),K=j8(t$(U),{unhoistableHeaders:X});if(z.sessionToken)K.query[B8]=z.sessionToken;K.query[nY]=i$,K.query[iY]=`${z.accessKeyId}/${M}`,K.query[E8]=I,K.query[oY]=W.toString(10);const O=o$(K,L,Z);return K.query[rY]=f8(O),K.query[A8]=await this.getSignature(I,M,this.getSigningKey(z,Q,R,Y),this.createCanonicalRequest(K,O,await D1(U,this.sha256))),K}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:W,signingRegion:L,signingService:X}){const Z=L??await this.regionProvider(),{shortDate:F,longDate:Y}=S1(w),z=b1(F,Z,X??this.service),Q=await D1({headers:{},body:G},this.sha256),I=new this.sha256;I.update(U);const R=t.toHex(await I.digest()),M=[W7,Y,z,W,R,Q].join("\n");return this.signString(M,{signingDate:w,signingRegion:Z,signingService:X})}async signMessage(U,{signingDate:G=new Date,signingRegion:w,signingService:W}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:G,signingRegion:w,signingService:W,priorSignature:U.priorSignature}).then((X)=>{return{message:U.message,signature:X}})}async signString(U,{signingDate:G=new Date,signingRegion:w,signingService:W}={}){const L=await this.credentialProvider();this.validateResolvedCredentials(L);const X=w??await this.regionProvider(),{shortDate:Z}=S1(G),F=new this.sha256(await this.getSigningKey(L,X,Z,W));return F.update(n$.toUint8Array(U)),t.toHex(await F.digest())}async signRequest(U,{signingDate:G=new Date,signableHeaders:w,unsignableHeaders:W,signingRegion:L,signingService:X}={}){const Z=await this.credentialProvider();this.validateResolvedCredentials(Z);const F=L??await this.regionProvider(),Y=t$(U),{longDate:z,shortDate:Q}=S1(G),I=b1(Q,F,X??this.service);if(Y.headers[O8]=z,Z.sessionToken)Y.headers[$7]=Z.sessionToken;const R=await D1(Y,this.sha256);if(!M7(r$,Y.headers)&&this.applyChecksum)Y.headers[r$]=R;const M=o$(Y,W,w),K=await this.getSignature(z,I,this.getSigningKey(Z,F,Q,X),this.createCanonicalRequest(Y,M,R));return Y.headers[V8]=`${i$} Credential=${Z.accessKeyId}/${I}, SignedHeaders=${f8(M)}, Signature=${K}`,Y}createCanonicalRequest(U,G,w){const W=Object.keys(G).sort();return`${U.method}
10
- ${this.getCanonicalPath(U)}
11
- ${q8(U)}
12
- ${W.map((L)=>`${L}:${G[L]}`).join("\n")}
13
-
14
- ${W.join(";")}
15
- ${w}`}async createStringToSign(U,G,w){const W=new this.sha256;W.update(n$.toUint8Array(w));const L=await W.digest();return`${i$}
16
- ${U}
17
- ${G}
18
- ${t.toHex(L)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){const G=[];for(let L of U.split("/")){if((L==null?void 0:L.length)===0)continue;if(L===".")continue;if(L==="..")G.pop();else G.push(L)}const w=`${(U==null?void 0:U.startsWith("/"))?"/":""}${G.join("/")}${G.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return h1.escapeUri(w).replace(/%2F/g,"/")}return U}async getSignature(U,G,w,W){const L=await this.createStringToSign(U,G,W),X=new this.sha256(await w);return X.update(n$.toUint8Array(L)),t.toHex(await X.digest())}getSigningKey(U,G,w,W){return T8(this.sha256,U,w,G,W||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")}};N(S8,"SignatureV4");var E7=S8,S1=N(($)=>{const U=f7($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),f8=N(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var p8=f((GK,d8)=>{var{defineProperty:v1,getOwnPropertyDescriptor:A7,getOwnPropertyNames:B7}=Object,V7=Object.prototype.hasOwnProperty,b=($,U)=>v1($,"name",{value:U,configurable:!0}),O7=($,U)=>{for(var G in U)v1($,G,{get:U[G],enumerable:!0})},H7=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of B7(U))if(!V7.call($,W)&&W!==G)v1($,W,{get:()=>U[W],enumerable:!(w=A7(U,W))||w.enumerable})}return $},T7=($)=>H7(v1({},"__esModule",{value:!0}),$),c8={};O7(c8,{AWSSDKSigV4Signer:()=>P7,AwsSdkSigV4ASigner:()=>S7,AwsSdkSigV4Signer:()=>UU,NODE_SIGV4A_CONFIG_OPTIONS:()=>h7,resolveAWSSDKSigV4Config:()=>D7,resolveAwsSdkSigV4AConfig:()=>b7,resolveAwsSdkSigV4Config:()=>u8,validateSigningProperties:()=>$U});d8.exports=T7(c8);var q7=G0(),C7=G0(),h8=b(($)=>{var U,G;return C7.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((G=$.headers)==null?void 0:G.Date):void 0},"getDateHeader"),e$=b(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),N7=b(($,U)=>Math.abs(e$(U).getTime()-$)>=300000,"isClockSkewed"),D8=b(($,U)=>{const G=Date.parse($);if(N7(G,U))return G-Date.now();return U},"getUpdatedSystemClockOffset"),p0=b(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),$U=b(async($)=>{var U,G,w;const W=p0("context",$.context),L=p0("config",$.config),X=(w=(G=(U=W.endpointV2)==null?void 0:U.properties)==null?void 0:G.authSchemes)==null?void 0:w[0],F=await p0("signer",L.signer)(X),Y=$==null?void 0:$.signingRegion,z=$==null?void 0:$.signingRegionSet,Q=$==null?void 0:$.signingName;return{config:L,signer:F,signingRegion:Y,signingRegionSet:z,signingName:Q}},"validateSigningProperties"),y8=class ${async sign(U,G,w){var W;if(!q7.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const L=await $U(w),{config:X,signer:Z}=L;let{signingRegion:F,signingName:Y}=L;const z=w.context;if(((W=z==null?void 0:z.authSchemes)==null?void 0:W.length)??0>1){const[I,R]=z.authSchemes;if((I==null?void 0:I.name)==="sigv4a"&&(R==null?void 0:R.name)==="sigv4")F=(R==null?void 0:R.signingRegion)??F,Y=(R==null?void 0:R.signingName)??Y}return await Z.sign(U,{signingDate:e$(X.systemClockOffset),signingRegion:F,signingService:Y})}errorHandler(U){return(G)=>{const w=G.ServerTime??h8(G.$response);if(w){const W=p0("config",U.config),L=W.systemClockOffset;if(W.systemClockOffset=D8(w,W.systemClockOffset),W.systemClockOffset!==L&&G.$metadata)G.$metadata.clockSkewCorrected=!0}throw G}}successHandler(U,G){const w=h8(U);if(w){const W=p0("config",G.config);W.systemClockOffset=D8(w,W.systemClockOffset)}}};b(y8,"AwsSdkSigV4Signer");var UU=y8,P7=UU,j7=G0(),_8=class $ extends UU{async sign(U,G,w){var W;if(!j7.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:L,signer:X,signingRegion:Z,signingRegionSet:F,signingName:Y}=await $U(w),Q=(await((W=L.sigv4aSigningRegionSet)==null?void 0:W.call(L))??F??[Z]).join(",");return await X.sign(U,{signingDate:e$(L.systemClockOffset),signingRegion:Q,signingService:Y})}};b(_8,"AwsSdkSigV4ASigner");var S7=_8,k7=C$(),x8=n1(),b7=b(($)=>{return $.sigv4aSigningRegionSet=k7.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),h7={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new x8.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 x8.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},F0=C$(),v8=b8(),u8=b(($)=>{let U;if($.credentials)U=F0.memoizeIdentityProvider($.credentials,F0.isIdentityExpired,F0.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=F0.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=b(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:G=!0,systemClockOffset:w=$.systemClockOffset||0,sha256:W}=$;let L;if($.signer)L=F0.normalizeProvider($.signer);else if($.regionInfoProvider)L=b(()=>F0.normalizeProvider($.region)().then(async(X)=>[await $.regionInfoProvider(X,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},X]).then(([X,Z])=>{const{signingRegion:F,signingService:Y}=X;$.signingRegion=$.signingRegion||F||Z,$.signingName=$.signingName||Y||$.serviceId;const z={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:W,uriEscapePath:G};return new($.signerConstructor||v8.SignatureV4)(z)}),"signer");else L=b(async(X)=>{X=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await F0.normalizeProvider($.region)(),properties:{}},X);const{signingRegion:Z,signingName:F}=X;$.signingRegion=$.signingRegion||Z,$.signingName=$.signingName||F||$.serviceId;const Y={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:W,uriEscapePath:G};return new($.signerConstructor||v8.SignatureV4)(Y)},"signer");return{...$,systemClockOffset:w,signingEscapePath:G,credentials:U,signer:L}},"resolveAwsSdkSigV4Config"),D7=u8});var c1=f((_7)=>{var x7=":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",g8="[: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]["+x7+"]*",v7=new RegExp("^"+g8+"$"),c7=function($,U){const G=[];let w=U.exec($);while(w){const W=[];W.startIndex=U.lastIndex-w[0].length;const L=w.length;for(let X=0;X<L;X++)W.push(w[X]);G.push(W),w=U.exec($)}return G},y7=function($){const U=v7.exec($);return!(U===null||typeof U==="undefined")};_7.isExist=function($){return typeof $!=="undefined"};_7.isEmptyObject=function($){return Object.keys($).length===0};_7.merge=function($,U,G){if(U){const w=Object.keys(U),W=w.length;for(let L=0;L<W;L++)if(G==="strict")$[w[L]]=[U[w[L]]];else $[w[L]]=U[w[L]]}};_7.getValue=function($){if(_7.isExist($))return $;else return""};_7.isName=y7;_7.getAllMatches=c7;_7.nameRegexp=g8});var wU=f((U9)=>{function l8($){return $===" "||$==="\t"||$==="\n"||$==="\r"}function m8($,U){const G=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const w=$.substr(G,U-G);if(U>5&&w==="xml")return q("InvalidXml","XML declaration allowed only at the start of the document.",S($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U}function n8($,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}function r7($,U){let G="",w="",W=!1;for(;U<$.length;U++){if($[U]===n7||$[U]===i7)if(w==="")w=$[U];else if(w!==$[U]);else w="";else if($[U]===">"){if(w===""){W=!0;break}}G+=$[U]}if(w!=="")return!1;return{value:G,index:U,tagClosed:W}}function i8($,U){const G=GU.getAllMatches($,o7),w={};for(let W=0;W<G.length;W++){if(G[W][1].length===0)return q("InvalidAttr","Attribute '"+G[W][2]+"' has no space in starting.",g0(G[W]));else if(G[W][3]!==void 0&&G[W][4]===void 0)return q("InvalidAttr","Attribute '"+G[W][2]+"' is without value.",g0(G[W]));else if(G[W][3]===void 0&&!U.allowBooleanAttributes)return q("InvalidAttr","boolean attribute '"+G[W][2]+"' is not allowed.",g0(G[W]));const L=G[W][2];if(!e7(L))return q("InvalidAttr","Attribute '"+L+"' is an invalid name.",g0(G[W]));if(!w.hasOwnProperty(L))w[L]=1;else return q("InvalidAttr","Attribute '"+L+"' is repeated.",g0(G[W]))}return!0}function a7($,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}function t7($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,a7($,U);let G=0;for(;U<$.length;U++,G++){if($[U].match(/\w/)&&G<20)continue;if($[U]===";")break;return-1}return U}function q($,U,G){return{err:{code:$,msg:U,line:G.line||G,col:G.col}}}function e7($){return GU.isName($)}function $9($){return GU.isName($)}function S($,U){const G=$.substring(0,U).split(/\r?\n/);return{line:G.length,col:G[G.length-1].length+1}}function g0($){return $.startIndex+$[1].length}var GU=c1(),m7={allowBooleanAttributes:!1,unpairedTags:[]};U9.validate=function($,U){U=Object.assign({},m7,U);const G=[];let w=!1,W=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let L=0;L<$.length;L++)if($[L]==="<"&&$[L+1]==="?"){if(L+=2,L=m8($,L),L.err)return L}else if($[L]==="<"){let X=L;if(L++,$[L]==="!"){L=n8($,L);continue}else{let Z=!1;if($[L]==="/")Z=!0,L++;let F="";for(;L<$.length&&$[L]!==">"&&$[L]!==" "&&$[L]!=="\t"&&$[L]!=="\n"&&$[L]!=="\r";L++)F+=$[L];if(F=F.trim(),F[F.length-1]==="/")F=F.substring(0,F.length-1),L--;if(!$9(F)){let Q;if(F.trim().length===0)Q="Invalid space after '<'.";else Q="Tag '"+F+"' is an invalid name.";return q("InvalidTag",Q,S($,L))}const Y=r7($,L);if(Y===!1)return q("InvalidAttr","Attributes for '"+F+"' have open quote.",S($,L));let z=Y.value;if(L=Y.index,z[z.length-1]==="/"){const Q=L-z.length;z=z.substring(0,z.length-1);const I=i8(z,U);if(I===!0)w=!0;else return q(I.err.code,I.err.msg,S($,Q+I.err.line))}else if(Z)if(!Y.tagClosed)return q("InvalidTag","Closing tag '"+F+"' doesn't have proper closing.",S($,L));else if(z.trim().length>0)return q("InvalidTag","Closing tag '"+F+"' can't have attributes or invalid starting.",S($,X));else if(G.length===0)return q("InvalidTag","Closing tag '"+F+"' has not been opened.",S($,X));else{const Q=G.pop();if(F!==Q.tagName){let I=S($,Q.tagStartPos);return q("InvalidTag","Expected closing tag '"+Q.tagName+"' (opened in line "+I.line+", col "+I.col+") instead of closing tag '"+F+"'.",S($,X))}if(G.length==0)W=!0}else{const Q=i8(z,U);if(Q!==!0)return q(Q.err.code,Q.err.msg,S($,L-z.length+Q.err.line));if(W===!0)return q("InvalidXml","Multiple possible root nodes found.",S($,L));else if(U.unpairedTags.indexOf(F)!==-1);else G.push({tagName:F,tagStartPos:X});w=!0}for(L++;L<$.length;L++)if($[L]==="<")if($[L+1]==="!"){L++,L=n8($,L);continue}else if($[L+1]==="?"){if(L=m8($,++L),L.err)return L}else break;else if($[L]==="&"){const Q=t7($,L);if(Q==-1)return q("InvalidChar","char '&' is not expected.",S($,L));L=Q}else if(W===!0&&!l8($[L]))return q("InvalidXml","Extra text at the end",S($,L));if($[L]==="<")L--}}else{if(l8($[L]))continue;return q("InvalidChar","char '"+$[L]+"' is not expected.",S($,L))}if(!w)return q("InvalidXml","Start tag expected.",1);else if(G.length==1)return q("InvalidTag","Unclosed tag '"+G[0].tagName+"'.",S($,G[0].tagStartPos));else if(G.length>0)return q("InvalidXml","Invalid '"+JSON.stringify(G.map((L)=>L.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var n7='"',i7="'",o7=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var o8=f((W9)=>{var r8={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 $}},w9=function($){return Object.assign({},r8,$)};W9.buildOptions=w9;W9.defaultOptions=r8});var e8=f((XK,t8)=>{class a8{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})}}t8.exports=a8});var UX=f((ZK,$X)=>{function F9($,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,W=!1,L=!1,X="";for(;U<$.length;U++)if($[U]==="<"&&!L){if(W&&Q9($,U)){if(U+=7,[entityName,val,U]=Y9($,U+1),val.indexOf("&")===-1)G[M9(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(W&&I9($,U))U+=8;else if(W&&J9($,U))U+=8;else if(W&&R9($,U))U+=9;else if(z9)L=!0;else throw new Error("Invalid DOCTYPE");w++,X=""}else if($[U]===">"){if(L){if($[U-1]==="-"&&$[U-2]==="-")L=!1,w--}else w--;if(w===0)break}else if($[U]==="[")W=!0;else X+=$[U];if(w!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:G,i:U}}function Y9($,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 W="";for(;U<$.length&&$[U]!==w;U++)W+=$[U];return[G,W,U]}function z9($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1}function Q9($,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}function I9($,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}function J9($,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}function R9($,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}function M9($){if(Z9.isName($))return $;else throw new Error(`Invalid entity name ${$}`)}var Z9=c1();$X.exports=F9});var wX=f((FK,GX)=>{function A9($,U={}){if(U=Object.assign({},E9,U),!$||typeof $!=="string")return $;let G=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(G))return $;else if(U.hex&&f9.test(G))return Number.parseInt(G,16);else{const w=K9.exec(G);if(w){const W=w[1],L=w[2];let X=B9(w[3]);const Z=w[4]||w[6];if(!U.leadingZeros&&L.length>0&&W&&G[2]!==".")return $;else if(!U.leadingZeros&&L.length>0&&!W&&G[1]!==".")return $;else{const F=Number(G),Y=""+F;if(Y.search(/[eE]/)!==-1)if(U.eNotation)return F;else return $;else if(Z)if(U.eNotation)return F;else return $;else if(G.indexOf(".")!==-1)if(Y==="0"&&X==="")return F;else if(Y===X)return F;else if(W&&Y==="-"+X)return F;else return $;if(L)if(X===Y)return F;else if(W+X===Y)return F;else return $;if(G===Y)return F;else if(G===W+Y)return F;return $}}else return $}}function B9($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $}var f9=/^[-+]?0x[a-fA-F0-9]+$/,K9=/^([\-\+])?(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 E9={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};GX.exports=A9});var ZX=f((YK,XX)=>{function H9($){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]}}}function T9($,U,G,w,W,L,X){if($!==void 0){if(this.options.trimValues&&!w)$=$.trim();if($.length>0){if(!X)$=this.replaceEntitiesValue($);const Z=this.options.tagValueProcessor(U,$,G,W,L);if(Z===null||Z===void 0)return $;else if(typeof Z!==typeof $||Z!==$)return Z;else if(this.options.trimValues)return LU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return LU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}}function q9($){if(this.options.removeNSPrefix){const U=$.split(":"),G=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=G+U[1]}return $}function N9($,U,G){if(!this.options.ignoreAttributes&&typeof $==="string"){const w=WX.getAllMatches($,C9),W=w.length,L={};for(let X=0;X<W;X++){const Z=this.resolveNameSpace(w[X][1]);let F=w[X][4],Y=this.options.attributeNamePrefix+Z;if(Z.length){if(this.options.transformAttributeName)Y=this.options.transformAttributeName(Y);if(Y==="__proto__")Y="#__proto__";if(F!==void 0){if(this.options.trimValues)F=F.trim();F=this.replaceEntitiesValue(F);const z=this.options.attributeValueProcessor(Z,F,U);if(z===null||z===void 0)L[Y]=F;else if(typeof z!==typeof F||z!==F)L[Y]=z;else L[Y]=LU(F,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)L[Y]=!0}}if(!Object.keys(L).length)return;if(this.options.attributesGroupName){const X={};return X[this.options.attributesGroupName]=L,X}return L}}function j9($,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)}function k9($,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 $}function b9($,U,G){const w="*."+G;for(let W in $){const L=$[W];if(w===L||U===L)return!0}return!1}function h9($,U,G=">"){let w,W="";for(let L=U;L<$.length;L++){let X=$[L];if(w){if(X===w)w=""}else if(X==='"'||X==="'")w=X;else if(X===G[0])if(G[1]){if($[L+1]===G[1])return{data:W,index:L}}else return{data:W,index:L};else if(X==="\t")X=" ";W+=X}}function Y0($,U,G,w){const W=$.indexOf(U,G);if(W===-1)throw new Error(w);else return W+U.length-1}function WU($,U,G,w=">"){const W=h9($,U+1,w);if(!W)return;let L=W.data;const X=W.index,Z=L.search(/\s/);let F=L,Y=!0;if(Z!==-1)F=L.substring(0,Z),L=L.substring(Z+1).trimStart();const z=F;if(G){const Q=F.indexOf(":");if(Q!==-1)F=F.substr(Q+1),Y=F!==W.data.substr(Q+1)}return{tagName:F,tagExp:L,closeIndex:X,attrExpPresent:Y,rawTagName:z}}function D9($,U,G){const w=G;let W=1;for(;G<$.length;G++)if($[G]==="<")if($[G+1]==="/"){const L=Y0($,">",G,`${U} is not closed`);if($.substring(G+2,L).trim()===U){if(W--,W===0)return{tagContent:$.substring(w,G),i:L}}G=L}else if($[G+1]==="?")G=Y0($,"?>",G+1,"StopNode is not closed.");else if($.substr(G+1,3)==="!--")G=Y0($,"-->",G+3,"StopNode is not closed.");else if($.substr(G+1,2)==="![")G=Y0($,"]]>",G,"StopNode is not closed.")-2;else{const L=WU($,G,">");if(L){if((L&&L.tagName)===U&&L.tagExp[L.tagExp.length-1]!=="/")W++;G=L.closeIndex}}}function LU($,U,G){if(U&&typeof $==="string"){const w=$.trim();if(w==="true")return!0;else if(w==="false")return!1;else return O9($,G)}else if(WX.isExist($))return $;else return""}var WX=c1(),s0=e8(),V9=UX(),O9=wX();class LX{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=H9,this.parseXml=P9,this.parseTextData=T9,this.resolveNameSpace=q9,this.buildAttributesMap=N9,this.isItStopNode=b9,this.replaceEntitiesValue=S9,this.readStopNodeData=D9,this.saveTextToParentTag=k9,this.addChild=j9}}var C9=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),P9=function($){$=$.replace(/\r\n?/g,"\n");const U=new s0("!xml");let G=U,w="",W="";for(let L=0;L<$.length;L++)if($[L]==="<")if($[L+1]==="/"){const Z=Y0($,">",L,"Closing Tag is not closed.");let F=$.substring(L+2,Z).trim();if(this.options.removeNSPrefix){const Q=F.indexOf(":");if(Q!==-1)F=F.substr(Q+1)}if(this.options.transformTagName)F=this.options.transformTagName(F);if(G)w=this.saveTextToParentTag(w,G,W);const Y=W.substring(W.lastIndexOf(".")+1);if(F&&this.options.unpairedTags.indexOf(F)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${F}>`);let z=0;if(Y&&this.options.unpairedTags.indexOf(Y)!==-1)z=W.lastIndexOf(".",W.lastIndexOf(".")-1),this.tagsNodeStack.pop();else z=W.lastIndexOf(".");W=W.substring(0,z),G=this.tagsNodeStack.pop(),w="",L=Z}else if($[L+1]==="?"){let Z=WU($,L,!1,"?>");if(!Z)throw new Error("Pi Tag is not closed.");if(w=this.saveTextToParentTag(w,G,W),this.options.ignoreDeclaration&&Z.tagName==="?xml"||this.options.ignorePiTags);else{const F=new s0(Z.tagName);if(F.add(this.options.textNodeName,""),Z.tagName!==Z.tagExp&&Z.attrExpPresent)F[":@"]=this.buildAttributesMap(Z.tagExp,W,Z.tagName);this.addChild(G,F,W)}L=Z.closeIndex+1}else if($.substr(L+1,3)==="!--"){const Z=Y0($,"-->",L+4,"Comment is not closed.");if(this.options.commentPropName){const F=$.substring(L+4,Z-2);w=this.saveTextToParentTag(w,G,W),G.add(this.options.commentPropName,[{[this.options.textNodeName]:F}])}L=Z}else if($.substr(L+1,2)==="!D"){const Z=V9($,L);this.docTypeEntities=Z.entities,L=Z.i}else if($.substr(L+1,2)==="!["){const Z=Y0($,"]]>",L,"CDATA is not closed.")-2,F=$.substring(L+9,Z);w=this.saveTextToParentTag(w,G,W);let Y=this.parseTextData(F,G.tagname,W,!0,!1,!0,!0);if(Y==null)Y="";if(this.options.cdataPropName)G.add(this.options.cdataPropName,[{[this.options.textNodeName]:F}]);else G.add(this.options.textNodeName,Y);L=Z+2}else{let Z=WU($,L,this.options.removeNSPrefix),F=Z.tagName;const Y=Z.rawTagName;let{tagExp:z,attrExpPresent:Q,closeIndex:I}=Z;if(this.options.transformTagName)F=this.options.transformTagName(F);if(G&&w){if(G.tagname!=="!xml")w=this.saveTextToParentTag(w,G,W,!1)}const R=G;if(R&&this.options.unpairedTags.indexOf(R.tagname)!==-1)G=this.tagsNodeStack.pop(),W=W.substring(0,W.lastIndexOf("."));if(F!==U.tagname)W+=W?"."+F:F;if(this.isItStopNode(this.options.stopNodes,W,F)){let M="";if(z.length>0&&z.lastIndexOf("/")===z.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),W=W.substr(0,W.length-1),z=F;else z=z.substr(0,z.length-1);L=Z.closeIndex}else if(this.options.unpairedTags.indexOf(F)!==-1)L=Z.closeIndex;else{const O=this.readStopNodeData($,Y,I+1);if(!O)throw new Error(`Unexpected end of ${Y}`);L=O.i,M=O.tagContent}const K=new s0(F);if(F!==z&&Q)K[":@"]=this.buildAttributesMap(z,W,F);if(M)M=this.parseTextData(M,F,W,!0,Q,!0,!0);W=W.substr(0,W.lastIndexOf(".")),K.add(this.options.textNodeName,M),this.addChild(G,K,W)}else{if(z.length>0&&z.lastIndexOf("/")===z.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),W=W.substr(0,W.length-1),z=F;else z=z.substr(0,z.length-1);if(this.options.transformTagName)F=this.options.transformTagName(F);const M=new s0(F);if(F!==z&&Q)M[":@"]=this.buildAttributesMap(z,W,F);this.addChild(G,M,W),W=W.substr(0,W.lastIndexOf("."))}else{const M=new s0(F);if(this.tagsNodeStack.push(G),F!==z&&Q)M[":@"]=this.buildAttributesMap(z,W,F);this.addChild(G,M,W),G=M}w="",L=I}}else w+=$[L];return U.child},S9=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 $};XX.exports=LX});var YX=f((_9)=>{function x9($,U){return FX($,U)}function FX($,U,G){let w;const W={};for(let L=0;L<$.length;L++){const X=$[L],Z=v9(X);let F="";if(G===void 0)F=Z;else F=G+"."+Z;if(Z===U.textNodeName)if(w===void 0)w=X[Z];else w+=""+X[Z];else if(Z===void 0)continue;else if(X[Z]){let Y=FX(X[Z],U,F);const z=y9(Y,U);if(X[":@"])c9(Y,X[":@"],F,U);else if(Object.keys(Y).length===1&&Y[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)Y=Y[U.textNodeName];else if(Object.keys(Y).length===0)if(U.alwaysCreateTextNode)Y[U.textNodeName]="";else Y="";if(W[Z]!==void 0&&W.hasOwnProperty(Z)){if(!Array.isArray(W[Z]))W[Z]=[W[Z]];W[Z].push(Y)}else if(U.isArray(Z,F,z))W[Z]=[Y];else W[Z]=Y}}if(typeof w==="string"){if(w.length>0)W[U.textNodeName]=w}else if(w!==void 0)W[U.textNodeName]=w;return W}function v9($){const U=Object.keys($);for(let G=0;G<U.length;G++){const w=U[G];if(w!==":@")return w}}function c9($,U,G,w){if(U){const W=Object.keys(U),L=W.length;for(let X=0;X<L;X++){const Z=W[X];if(w.isArray(Z,G+"."+Z,!0,!0))$[Z]=[U[Z]];else $[Z]=U[Z]}}}function y9($,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}_9.prettify=x9});var IX=f((QK,QX)=>{var{buildOptions:d9}=o8(),p9=ZX(),{prettify:g9}=YX(),s9=wU();class zX{constructor($){this.externalEntities={},this.options=d9($)}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 W=s9.validate($,U);if(W!==!0)throw Error(`${W.err.msg}:${W.err.line}:${W.err.col}`)}const G=new p9(this.options);G.addExternalEntities(this.externalEntities);const w=G.parseXml($);if(this.options.preserveOrder||w===void 0)return w;else return g9(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}}QX.exports=zX});var KX=f((IK,fX)=>{function l9($,U){let G="";if(U.format&&U.indentBy.length>0)G="\n";return RX($,U,"",G)}function RX($,U,G,w){let W="",L=!1;for(let X=0;X<$.length;X++){const Z=$[X],F=m9(Z);if(F===void 0)continue;let Y="";if(G.length===0)Y=F;else Y=`${G}.${F}`;if(F===U.textNodeName){let M=Z[F];if(!n9(Y,U))M=U.tagValueProcessor(F,M),M=MX(M,U);if(L)W+=w;W+=M,L=!1;continue}else if(F===U.cdataPropName){if(L)W+=w;W+=`<![CDATA[${Z[F][0][U.textNodeName]}]]>`,L=!1;continue}else if(F===U.commentPropName){W+=w+`<!--${Z[F][0][U.textNodeName]}-->`,L=!0;continue}else if(F[0]==="?"){const M=JX(Z[":@"],U),K=F==="?xml"?"":w;let O=Z[F][0][U.textNodeName];O=O.length!==0?" "+O:"",W+=K+`<${F}${O}${M}?>`,L=!0;continue}let z=w;if(z!=="")z+=U.indentBy;const Q=JX(Z[":@"],U),I=w+`<${F}${Q}`,R=RX(Z[F],U,Y,z);if(U.unpairedTags.indexOf(F)!==-1)if(U.suppressUnpairedNode)W+=I+">";else W+=I+"/>";else if((!R||R.length===0)&&U.suppressEmptyNode)W+=I+"/>";else if(R&&R.endsWith(">"))W+=I+`>${R}${w}</${F}>`;else{if(W+=I+">",R&&w!==""&&(R.includes("/>")||R.includes("</")))W+=w+U.indentBy+R+w;else W+=R;W+=`</${F}>`}L=!0}return W}function m9($){const U=Object.keys($);for(let G=0;G<U.length;G++){const w=U[G];if(!$.hasOwnProperty(w))continue;if(w!==":@")return w}}function JX($,U){let G="";if($&&!U.ignoreAttributes)for(let w in $){if(!$.hasOwnProperty(w))continue;let W=U.attributeValueProcessor(w,$[w]);if(W=MX(W,U),W===!0&&U.suppressBooleanAttributes)G+=` ${w.substr(U.attributeNamePrefix.length)}`;else G+=` ${w.substr(U.attributeNamePrefix.length)}="${W}"`}return G}function n9($,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}function MX($,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 $}fX.exports=l9});var AX=f((JK,EX)=>{function e($){if(this.options=Object.assign({},r9,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=t9;if(this.processTextOrObjNode=o9,this.options.format)this.indentate=a9,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}function o9($,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)}function a9($){return this.options.indentBy.repeat($)}function t9($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1}var i9=KX(),r9={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};e.prototype.build=function($){if(this.options.preserveOrder)return i9($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};e.prototype.j2x=function($,U){let G="",w="";for(let W in $){if(!Object.prototype.hasOwnProperty.call($,W))continue;if(typeof $[W]==="undefined"){if(this.isAttribute(W))w+=""}else if($[W]===null)if(this.isAttribute(W))w+="";else if(W[0]==="?")w+=this.indentate(U)+"<"+W+"?"+this.tagEndChar;else w+=this.indentate(U)+"<"+W+"/"+this.tagEndChar;else if($[W]instanceof Date)w+=this.buildTextValNode($[W],W,"",U);else if(typeof $[W]!=="object"){const L=this.isAttribute(W);if(L)G+=this.buildAttrPairStr(L,""+$[W]);else if(W===this.options.textNodeName){let X=this.options.tagValueProcessor(W,""+$[W]);w+=this.replaceEntitiesValue(X)}else w+=this.buildTextValNode($[W],W,"",U)}else if(Array.isArray($[W])){const L=$[W].length;let X="",Z="";for(let F=0;F<L;F++){const Y=$[W][F];if(typeof Y==="undefined");else if(Y===null)if(W[0]==="?")w+=this.indentate(U)+"<"+W+"?"+this.tagEndChar;else w+=this.indentate(U)+"<"+W+"/"+this.tagEndChar;else if(typeof Y==="object")if(this.options.oneListGroup){const z=this.j2x(Y,U+1);if(X+=z.val,this.options.attributesGroupName&&Y.hasOwnProperty(this.options.attributesGroupName))Z+=z.attrStr}else X+=this.processTextOrObjNode(Y,W,U);else if(this.options.oneListGroup){let z=this.options.tagValueProcessor(W,Y);z=this.replaceEntitiesValue(z),X+=z}else X+=this.buildTextValNode(Y,W,"",U)}if(this.options.oneListGroup)X=this.buildObjectNode(X,W,Z,U);w+=X}else if(this.options.attributesGroupName&&W===this.options.attributesGroupName){const L=Object.keys($[W]),X=L.length;for(let Z=0;Z<X;Z++)G+=this.buildAttrPairStr(L[Z],""+$[W][L[Z]])}else w+=this.processTextOrObjNode($[W],W,U)}return{attrStr:G,val:w}};e.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};e.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 W="</"+U+this.tagEndChar,L="";if(U[0]==="?")L="?",W="";if((G||G==="")&&$.indexOf("<")===-1)return this.indentate(w)+"<"+U+G+L+">"+$+W;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&L.length===0)return this.indentate(w)+`<!--${$}-->`+this.newLine;else return this.indentate(w)+"<"+U+G+L+this.tagEndChar+$+this.indentate(w)+W}};e.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};e.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 W=this.options.tagValueProcessor(U,$);if(W=this.replaceEntitiesValue(W),W==="")return this.indentate(w)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else return this.indentate(w)+"<"+U+G+">"+W+"</"+U+this.tagEndChar}};e.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 $};EX.exports=e});var VX=f((RK,BX)=>{var e9=wU(),$z=IX(),Uz=AX();BX.exports={XMLParser:$z,XMLValidator:e9,XMLBuilder:Uz}});var NX=f((MK,CX)=>{var{defineProperty:y1,getOwnPropertyDescriptor:Gz,getOwnPropertyNames:wz}=Object,Wz=Object.prototype.hasOwnProperty,h=($,U)=>y1($,"name",{value:U,configurable:!0}),Lz=($,U)=>{for(var G in U)y1($,G,{get:U[G],enumerable:!0})},Xz=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of wz(U))if(!Wz.call($,W)&&W!==G)y1($,W,{get:()=>U[W],enumerable:!(w=Gz(U,W))||w.enumerable})}return $},Zz=($)=>Xz(y1({},"__esModule",{value:!0}),$),OX={};Lz(OX,{_toBool:()=>Yz,_toNum:()=>zz,_toStr:()=>Fz,awsExpectUnion:()=>Iz,loadRestJsonErrorCode:()=>Mz,loadRestXmlErrorCode:()=>Az,parseJsonBody:()=>TX,parseJsonErrorBody:()=>Rz,parseXmlBody:()=>qX,parseXmlErrorBody:()=>Ez});CX.exports=Zz(OX);var Fz=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"),Yz=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"),zz=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"),Qz=K0(),Iz=h(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return Qz.expectUnion($)},"awsExpectUnion"),Jz=K0(),HX=h(($,U)=>Jz.collectBody($,U).then((G)=>U.utf8Encoder(G)),"collectBodyString"),TX=h(($,U)=>HX($,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"),Rz=h(async($,U)=>{const G=await TX($,U);return G.message=G.message??G.Message,G},"parseJsonErrorBody"),Mz=h(($,U)=>{const G=h((L,X)=>Object.keys(L).find((Z)=>Z.toLowerCase()===X.toLowerCase()),"findKey"),w=h((L)=>{let X=L;if(typeof X==="number")X=X.toString();if(X.indexOf(",")>=0)X=X.split(",")[0];if(X.indexOf(":")>=0)X=X.split(":")[0];if(X.indexOf("#")>=0)X=X.split("#")[1];return X},"sanitizeErrorCode"),W=G($.headers,"x-amzn-errortype");if(W!==void 0)return w($.headers[W]);if(U.code!==void 0)return w(U.code);if(U.__type!==void 0)return w(U.__type)},"loadRestJsonErrorCode"),fz=K0(),Kz=VX(),qX=h(($,U)=>HX($,U).then((G)=>{if(G.length){const w=new Kz.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(F,Y)=>Y.trim()===""&&Y.includes("\n")?"":void 0});w.addEntity("#xD","\r"),w.addEntity("#10","\n");let W;try{W=w.parse(G,!0)}catch(F){if(F&&typeof F==="object")Object.defineProperty(F,"$responseBodyText",{value:G});throw F}const L="#text",X=Object.keys(W)[0],Z=W[X];if(Z[L])Z[X]=Z[L],delete Z[L];return fz.getValueFromTextNode(Z)}return{}}),"parseXmlBody"),Ez=h(async($,U)=>{const G=await qX($,U);if(G.Error)G.Error.message=G.Error.message??G.Error.Message;return G},"parseXmlErrorBody"),Az=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 Vz=f((l0)=>{Object.defineProperty(l0,"__esModule",{value:!0});var XU=Bz();XU.__exportStar(I8(),l0);XU.__exportStar(p8(),l0);XU.__exportStar(NX(),l0)});var p=i(m1(),1),tz=p.default.v1,ez=p.default.v3,LG=p.default.v4,$Q=p.default.v5,UQ=p.default.NIL,GQ=p.default.version,wQ=p.default.validate,WQ=p.default.stringify,LQ=p.default.parse;function FQ($){return $}var eZ=($)=>(U)=>async(G)=>{if(!x.isInstance(G.request))return U(G);const{request:w}=G,{handlerProtocol:W=""}=$.requestHandler.metadata||{};if(W.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 L=w.hostname;if(w.port!=null)L+=`:${w.port}`;w.headers.host=L}return U(G)},$4={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},YQ=($)=>({applyToStack:(U)=>{U.add(eZ($),$4)}});var U4=()=>($,U)=>async(G)=>{try{const w=await $(G),{clientName:W,commandName:L,logger:X,dynamoDbDocumentClientOptions:Z={}}=U,{overrideInputFilterSensitiveLog:F,overrideOutputFilterSensitiveLog:Y}=Z,z=F??U.inputFilterSensitiveLog,Q=Y??U.outputFilterSensitiveLog,{$metadata:I,...R}=w.output;return X?.info?.({clientName:W,commandName:L,input:z(G.input),output:Q(R),metadata:I}),w}catch(w){const{clientName:W,commandName:L,logger:X,dynamoDbDocumentClientOptions:Z={}}=U,{overrideInputFilterSensitiveLog:F}=Z,Y=F??U.inputFilterSensitiveLog;throw X?.error?.({clientName:W,commandName:L,input:Y(G.input),error:w,metadata:w.$metadata}),w}},G4={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},QQ=($)=>({applyToStack:(U)=>{U.add(U4(),G4)}});var XG="X-Amzn-Trace-Id",w4="AWS_LAMBDA_FUNCTION_NAME",W4="_X_AMZN_TRACE_ID",L4=($)=>(U)=>async(G)=>{const{request:w}=G;if(!x.isInstance(w)||$.runtime!=="node"||w.headers.hasOwnProperty(XG))return U(G);const W=process.env[w4],L=process.env[W4],X=(Z)=>typeof Z==="string"&&Z.length>0;if(X(W)&&X(L))w.headers[XG]=L;return U({...G,request:w})},X4={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},fQ=($)=>({applyToStack:(U)=>{U.add(L4($),X4)}});function gQ($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}class a5{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 W=0;while(!0){const{value:L,done:X}=w.next();if(this.data.delete(L),X||++W>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 W=String($[w]??"");if(W.includes("|;"))return!1;U+=W+"|;"}return U}}var t5=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}$"),y0=($)=>t5.test($)||$.startsWith("[")&&$.endsWith("]");var e5=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),_0=($,U=!1)=>{if(!U)return e5.test($);const G=$.split(".");for(let w of G)if(!_0(w))return!1;return!0};var u0={};var m="endpoints";function v($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${v($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(v).join(", ")})`;return JSON.stringify($,null,2)}class B extends Error{constructor($){super($);this.name="EndpointError"}}var OL=($,U)=>$===U;var HL=($)=>{const U=$.split("."),G=[];for(let w of U){const W=w.indexOf("[");if(W!==-1){if(w.indexOf("]")!==w.length-1)throw new B(`Path: '${$}' does not end with ']'`);const L=w.slice(W+1,-1);if(Number.isNaN(parseInt(L)))throw new B(`Invalid array index: '${L}' in path: '${$}'`);if(W!==0)G.push(w.slice(0,W));G.push(L)}else G.push(w)}return G};var J1=($,U)=>HL(U).reduce((G,w)=>{if(typeof G!=="object")throw new B(`Index '${w}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(G))return G[parseInt(w)];return G[w]},$);var TL=($)=>$!=null;var qL=($)=>!$;var R1=i(C0(),1);var N$={[R1.EndpointURLScheme.HTTP]:80,[R1.EndpointURLScheme.HTTPS]:443},CL=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:I,port:R,protocol:M="",path:K="",query:O={}}=$,k=new URL(`${M}//${I}${R?`:${R}`:""}${K}`);return k.search=Object.entries(O).map(([s,E])=>`${s}=${E}`).join("&"),k}return new URL($)}catch(I){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const G=U.href,{host:w,hostname:W,pathname:L,protocol:X,search:Z}=U;if(Z)return null;const F=X.slice(0,-1);if(!Object.values(R1.EndpointURLScheme).includes(F))return null;const Y=y0(W),z=G.includes(`${w}:${N$[F]}`)||typeof $==="string"&&$.includes(`${w}:${N$[F]}`),Q=`${w}${z?`:${N$[F]}`:""}`;return{scheme:F,authority:Q,path:L,normalizedPath:L.endsWith("/")?L:`${L}/`,isIp:Y}};var NL=($,U)=>$===U;var PL=($,U,G,w)=>{if(U>=G||$.length<G)return null;if(!w)return $.substring(U,G);return $.substring($.length-G,$.length-U)};var jL=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var SL={booleanEquals:OL,getAttr:J1,isSet:TL,isValidHostLabel:_0,not:qL,parseURL:CL,stringEquals:NL,substring:PL,uriEncode:jL};var M1=($,U)=>{const G=[],w={...U.endpointParams,...U.referenceRecord};let W=0;while(W<$.length){const L=$.indexOf("{",W);if(L===-1){G.push($.slice(W));break}G.push($.slice(W,L));const X=$.indexOf("}",L);if(X===-1){G.push($.slice(L));break}if($[L+1]==="{"&&$[X+1]==="}")G.push($.slice(L+1,X)),W=X+2;const Z=$.substring(L+1,X);if(Z.includes("#")){const[F,Y]=Z.split("#");G.push(J1(w[F],Y))}else G.push(w[Z]);W=X+1}return G.join("")};var kL=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var o=($,U,G)=>{if(typeof $==="string")return M1($,G);else if($.fn)return f1($,G);else if($.ref)return kL($,G);throw new B(`'${U}': ${String($)} is not a string, function or reference.`)};var f1=({fn:$,argv:U},G)=>{const w=U.map((L)=>["boolean","number"].includes(typeof L)?L:o(L,"arg",G)),W=$.split(".");if(W[0]in u0&&W[1]!=null)return u0[W[0]][W[1]](...w);return SL[$](...w)};var bL=({assign:$,...U},G)=>{if($&&$ in G.referenceRecord)throw new B(`'${$}' is already defined in Reference Record.`);const w=f1(U,G);return G.logger?.debug?.(`${m} evaluateCondition: ${v(U)} = ${v(w)}`),{result:w===""?!0:!!w,...$!=null&&{toAssign:{name:$,value:w}}}};var A0=($=[],U)=>{const G={};for(let w of $){const{result:W,toAssign:L}=bL(w,{...U,referenceRecord:{...U.referenceRecord,...G}});if(!W)return{result:W};if(L)G[L.name]=L.value,U.logger?.debug?.(`${m} assign: ${L.name} := ${v(L.value)}`)}return{result:!0,referenceRecord:G}};var hL=($,U)=>Object.entries($).reduce((G,[w,W])=>({...G,[w]:W.map((L)=>{const X=o(L,"Header value entry",U);if(typeof X!=="string")throw new B(`Header '${w}' value '${X}' is not a string`);return X})}),{});var P$=($,U)=>{if(Array.isArray($))return $.map((G)=>P$(G,U));switch(typeof $){case"string":return M1($,U);case"object":if($===null)throw new B(`Unexpected endpoint property: ${$}`);return K1($,U);case"boolean":return $;default:throw new B(`Unexpected endpoint property type: ${typeof $}`)}};var K1=($,U)=>Object.entries($).reduce((G,[w,W])=>({...G,[w]:P$(W,U)}),{});var DL=($,U)=>{const G=o($,"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 B(`Endpoint URL must be a string, got ${typeof G}`)};var xL=($,U)=>{const{conditions:G,endpoint:w}=$,{result:W,referenceRecord:L}=A0(G,U);if(!W)return;const X={...U,referenceRecord:{...U.referenceRecord,...L}},{url:Z,properties:F,headers:Y}=w;return U.logger?.debug?.(`${m} Resolving endpoint from template: ${v(w)}`),{...Y!=null&&{headers:hL(Y,X)},...F!=null&&{properties:K1(F,X)},url:DL(Z,X)}};var vL=($,U)=>{const{conditions:G,error:w}=$,{result:W,referenceRecord:L}=A0(G,U);if(!W)return;throw new B(o(w,"Error",{...U,referenceRecord:{...U.referenceRecord,...L}}))};var cL=($,U)=>{const{conditions:G,rules:w}=$,{result:W,referenceRecord:L}=A0(G,U);if(!W)return;return E1(w,{...U,referenceRecord:{...U.referenceRecord,...L}})};var E1=($,U)=>{for(let G of $)if(G.type==="endpoint"){const w=xL(G,U);if(w)return w}else if(G.type==="error")vL(G,U);else if(G.type==="tree"){const w=cL(G,U);if(w)return w}else throw new B(`Unknown endpoint rule: ${G}`);throw new B("Rules evaluation failed")};var $Y=($,U)=>{const{endpointParams:G,logger:w}=U,{parameters:W,rules:L}=$;U.logger?.debug?.(`${m} Initial EndpointParams: ${v(G)}`);const X=Object.entries(W).filter(([,Y])=>Y.default!=null).map(([Y,z])=>[Y,z.default]);if(X.length>0)for(let[Y,z]of X)G[Y]=G[Y]??z;const Z=Object.entries(W).filter(([,Y])=>Y.required).map(([Y])=>Y);for(let Y of Z)if(G[Y]==null)throw new B(`Missing required parameter: '${Y}'`);const F=E1(L,{endpointParams:G,logger:w,referenceRecord:{}});return U.logger?.debug?.(`${m} Resolved endpoint: ${v(F)}`),F};var j$=($,U=!1)=>{if(U){for(let G of $.split("."))if(!j$(G))return!1;return!0}if(!_0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(y0($))return!1;return!0};var yL=($)=>{const U=$.split(":");if(U.length<6)return null;const[G,w,W,L,X,...Z]=U;if(G!=="arn"||w===""||W===""||Z.join(":")==="")return null;const F=Z.map((Y)=>Y.split("/")).flat();return{partition:w,service:W,region:L,accountId:X,resourceId:F}};var _L={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 GY=_L,wY="",uL=($)=>{const{partitions:U}=GY;for(let w of U){const{regions:W,outputs:L}=w;for(let[X,Z]of Object.entries(W))if(X===$)return{...L,...Z}}for(let w of U){const{regionRegex:W,outputs:L}=w;if(new RegExp(W).test($))return{...L}}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 dL=()=>wY;var WY={isVirtualHostableS3Bucket:j$,parseArn:yL,partition:uL};u0.aws=WY;var S$="user-agent",A1="x-amz-user-agent",k$=" ",B1="/",pL=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,gL=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,b$="-";var LY=($)=>(U,G)=>async(w)=>{const{request:W}=w;if(!x.isInstance(W))return U(w);const{headers:L}=W,X=G?.userAgent?.map(h$)||[],Z=(await $.defaultUserAgentProvider()).map(h$),F=$?.customUserAgent?.map(h$)||[],Y=dL(),z=(Y?[Y]:[]).concat([...Z,...X,...F]).join(k$),Q=[...Z.filter((I)=>I.startsWith("aws-sdk-")),...F].join(k$);if($.runtime!=="browser"){if(Q)L[A1]=L[A1]?`${L[S$]} ${Q}`:Q;L[S$]=z}else L[A1]=z;return U({...w,request:W})},h$=($)=>{const U=$[0].split(B1).map((X)=>X.replace(pL,b$)).join(B1),G=$[1]?.replace(gL,b$),w=U.indexOf(B1),W=U.substring(0,w);let L=U.substring(w+1);if(W==="api")L=L.toLowerCase();return[W,L,G].filter((X)=>X&&X.length>0).reduce((X,Z,F)=>{switch(F){case 0:return Z;case 1:return`${X}/${Z}`;default:return`${X}#${Z}`}},"")},XY={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},TR=($)=>({applyToStack:(U)=>{U.add(LY($),XY)}});var V1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var D$=($)=>V1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var DR=($)=>{const{region:U,useFipsEndpoint:G}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return D$(U);const w=await U();return D$(w)},useFipsEndpoint:async()=>{const w=typeof U==="string"?U:await U();if(V1(w))return!0;return typeof G!=="function"?Promise.resolve(!!G):G()}}};var B0=($,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 a;(function($){$.ENV="env",$.CONFIG="shared config entry"})(a||(a={}));var ZY="AWS_USE_DUALSTACK_ENDPOINT",FY="use_dualstack_endpoint";var sR={environmentVariableSelector:($)=>B0($,ZY,a.ENV),configFileSelector:($)=>B0($,FY,a.CONFIG),default:!1};var YY="AWS_USE_FIPS_ENDPOINT",zY="use_fips_endpoint";var nR={environmentVariableSelector:($)=>B0($,YY,a.ENV),configFileSelector:($)=>B0($,zY,a.CONFIG),default:!1};var x$=i(C0(),1),sL=($)=>$[x$.SMITHY_CONTEXT_KEY]||($[x$.SMITHY_CONTEXT_KEY]={});var n=($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U};var lL={environmentVariableSelector:($)=>$.AWS_REGION,configFileSelector:($)=>$.region,default:()=>{throw new Error("Region is missing")}},I3={preferredFile:"credentials"};function QY($){return(U)=>async(G)=>{const w=G.request;if(x.isInstance(w)){const{body:W,headers:L}=w;if(W&&Object.keys(L).map((X)=>X.toLowerCase()).indexOf(mL)===-1)try{const X=$(W);w.headers={...w.headers,[mL]:String(X)}}catch(X){}}return U({...G,request:w})}}var mL="content-length",IY={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},_3=($)=>({applyToStack:(U)=>{U.add(QY($.bodyLengthChecker),IY)}});var nL=($,U)=>(G)=>async(w)=>{const{response:W}=await G(w);try{const L=await U(W,$);return{response:W,output:L}}catch(L){if(Object.defineProperty(L,"$response",{value:W}),!("$metadata"in L)){if(L.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof L.$responseBodyText!=="undefined"){if(L.$response)L.$response.body=L.$responseBodyText}}throw L}};var iL=($,U)=>(G,w)=>async(W)=>{const L=w.endpointV2?.url&&$.urlParser?async()=>$.urlParser(w.endpointV2.url):$.endpoint;if(!L)throw new Error("No valid endpoint provider available.");const X=await U(W.input,{...$,endpoint:L});return G({...W,request:X})};function l3($,U,G){return{applyToStack:(w)=>{w.add(nL($,G),JY),w.add(iL($,U),v$)}}}var JY={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},v$={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var rL=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(EY(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!KY(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},RY=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,MY=/(\d+\.){3}\d+/,fY=/\.\./;var KY=($)=>RY.test($)&&!MY.test($)&&!fY.test($),EY=($)=>{const[U,G,w,,,W]=$.split(":"),L=U==="arn"&&$.split(":").length>=6,X=Boolean(L&&G&&w&&W);if(L&&!X)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return X};var oL=($,U,G)=>{const w=async()=>{const W=G[$]??G[U];if(typeof W==="function")return W();return W};if($==="credentialScope"||U==="CredentialScope")return async()=>{const W=typeof G.credentials==="function"?await G.credentials():G.credentials;return W?.credentialScope??W?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{const W=typeof G.credentials==="function"?await G.credentials():G.credentials;return W?.accountId??W?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{const W=await w();if(W&&typeof W==="object"){if("url"in W)return W.url.href;if("hostname"in W){const{protocol:L,hostname:X,port:Z,path:F}=W;return`${L}//${X}${Z?":"+Z:""}${F}`}}return W};return w};var c$=i(i1(),1),aL="AWS_ENDPOINT_URL",tL="endpoint_url",eL=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((L)=>L.toUpperCase()),w=U[[aL,...G].join("_")];if(w)return w;const W=U[aL];if(W)return W;return},configFileSelector:(U,G)=>{if(G&&U.services){const W=G[["services",U.services].join(c$.CONFIG_PREFIX_SEPARATOR)];if(W){const L=$.split(" ").map((Z)=>Z.toLowerCase()),X=W[[L.join("_"),tL].join(c$.CONFIG_PREFIX_SEPARATOR)];if(X)return X}}const w=U[tL];if(w)return w;return},default:void 0});var O1=async($)=>L0(eL($??""))();var H1=($)=>{if(typeof $==="object"){if("url"in $)return y$($.url);return $}return y$($)};var $8=async($,U,G,w)=>{if(!G.endpoint){let X;if(G.serviceConfiguredEndpoint)X=await G.serviceConfiguredEndpoint();else X=await O1(G.serviceId);if(X)G.endpoint=()=>Promise.resolve(H1(X))}const W=await AY($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(W,w)},AY=async($,U,G)=>{const w={},W=U?.getEndpointParameterInstructions?.()||{};for(let[L,X]of Object.entries(W))switch(X.type){case"staticContextParams":w[L]=X.value;break;case"contextParams":w[L]=$[X.name];break;case"clientContextParams":case"builtInParams":w[L]=await oL(X.name,L,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(X))}if(Object.keys(W).length===0)Object.assign(w,G);if(String(G.serviceId).toLowerCase()==="s3")await rL(w);return w};var U8=({config:$,instructions:U})=>{return(G,w)=>async(W)=>{const L=await $8(W.input,{getEndpointParameterInstructions(){return U}},{...$},w);w.endpointV2=L,w.authSchemes=L.properties?.authSchemes;const X=w.authSchemes?.[0];if(X){w.signing_region=X.signingRegion,w.signing_service=X.signingName;const F=sL(w)?.selectedHttpAuthScheme?.httpAuthOption;if(F)F.signingProperties=Object.assign(F.signingProperties||{},{signing_region:X.signingRegion,signingRegion:X.signingRegion,signing_service:X.signingName,signingName:X.signingName,signingRegionSet:X.signingRegionSet},X.properties)}return G({...W})}};var BY={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:v$.name},KM=($,U)=>({applyToStack:(G)=>{G.addRelativeTo(U8({config:$,instructions:U}),BY)}});var OM=($)=>{const U=$.tls??!0,{endpoint:G}=$,w=G!=null?async()=>H1(await n(G)()):void 0,L={...$,endpoint:w,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:n($.useDualstackEndpoint??!1),useFipsEndpoint:n($.useFipsEndpoint??!1)};let X=void 0;return L.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!X)X=O1($.serviceId);return X},L};var c;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(c||(c={}));var X0=3,G8=c.STANDARD;var w8=i(U0(),1);class T1{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(),w8.isThrottlingError($)){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 Z0=100,d0=20000,_$=500,q1=500,u$=5,d$=10,p$=1,C1="amz-sdk-invocation-id",N1="amz-sdk-request";var W8=()=>{let $=Z0;return{computeNextBackoffDelay:(w)=>{return Math.floor(Math.min(d0,Math.random()*2**w*$))},setDelayBase:(w)=>{$=w}}};var g$=({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(d0,$),getRetryCost:()=>G}};class V0{constructor($){this.maxAttempts=$,this.mode=c.STANDARD,this.capacity=q1,this.retryBackoffStrategy=W8(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return g$({retryDelay:Z0,retryCount:0})}async refreshRetryTokenForRetry($,U){const G=await this.getMaxAttempts();if(this.shouldRetry($,U,G)){const w=U.errorType;this.retryBackoffStrategy.setDelayBase(w==="THROTTLING"?_$:Z0);const W=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),L=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,W):W,X=this.getCapacityCost(w);return this.capacity-=X,g$({retryDelay:L,retryCount:$.getRetryCount()+1,retryCost:X})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(q1,this.capacity+($.getRetryCost()??p$))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${X0}`),X0}}shouldRetry($,U,G){return $.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?d$:u$}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class s${constructor($,U){this.maxAttemptsProvider=$,this.mode=c.ADAPTIVE;const{rateLimiter:G}=U??{};this.rateLimiter=G??new T1,this.standardRetryStrategy=new V0($)}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 L8="AWS_MAX_ATTEMPTS",X8="max_attempts",Ff={environmentVariableSelector:($)=>{const U=$[L8];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${L8} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[X8];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${X8} mast be a number, got "${U}"`);return G},default:X0},Yf=($)=>{const{retryStrategy:U}=$,G=n($.maxAttempts??X0);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await n($.retryMode)()===c.ADAPTIVE)return new s$(G);return new V0(G)}}},VY="AWS_RETRY_MODE",OY="retry_mode",zf={environmentVariableSelector:($)=>$[VY],configFileSelector:($)=>$[OY],default:G8};var O0=i(U0(),1);import{Readable as HY}from"stream";var Z8=($)=>$?.body instanceof HY||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var l$=($)=>{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 TY=($)=>(U,G)=>async(w)=>{let W=await $.retryStrategy();const L=await $.maxAttempts();if(qY(W)){W=W;let X=await W.acquireInitialRetryToken(G.partition_id),Z=new Error,F=0,Y=0;const{request:z}=w,Q=x.isInstance(z);if(Q)z.headers[C1]=LG();while(!0)try{if(Q)z.headers[N1]=`attempt=${F+1}; max=${L}`;const{response:I,output:R}=await U(w);return W.recordSuccess(X),R.$metadata.attempts=F+1,R.$metadata.totalRetryDelay=Y,{response:I,output:R}}catch(I){const R=CY(I);if(Z=l$(I),Q&&Z8(z))throw(G.logger instanceof F8?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),Z;try{X=await W.refreshRetryTokenForRetry(X,R)}catch(K){if(!Z.$metadata)Z.$metadata={};throw Z.$metadata.attempts=F+1,Z.$metadata.totalRetryDelay=Y,Z}F=X.getRetryCount();const M=X.getRetryDelay();Y+=M,await new Promise((K)=>setTimeout(K,M))}}else{if(W=W,W?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",W.mode]];return W.retry(U,w)}},qY=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",CY=($)=>{const U={error:$,errorType:NY($)},G=jY($.$response);if(G)U.retryAfterHint=G;return U},NY=($)=>{if(O0.isThrottlingError($))return"THROTTLING";if(O0.isTransientError($))return"TRANSIENT";if(O0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},PY={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Vf=($)=>({applyToStack:(U)=>{U.add(TY($),PY)}}),jY=($)=>{if(!m$.isInstance($))return;const U=Object.keys($.headers).find((L)=>L.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)};var SY=i(U0(),1);var P1=i(U0(),1);import{platform as Oz,release as Hz}from"os";import{env as jX,versions as Tz}from"process";var ZU={isCrtAvailable:!1};var PX=()=>{if(ZU.isCrtAvailable)return["md/crt-avail"];return null};var qz="AWS_SDK_UA_APP_ID",Cz="sdk-ua-app-id",TK=({serviceId:$,clientVersion:U})=>{const G=[["aws-sdk-js",U],["ua","2.0"],[`os/${Oz()}`,Hz()],["lang/js"],["md/nodejs",`${Tz.node}`]],w=PX();if(w)G.push(w);if($)G.push([`api/${$}`,U]);if(jX.AWS_EXECUTION_ENV)G.push([`exec-env/${jX.AWS_EXECUTION_ENV}`]);const W=L0({environmentVariableSelector:(X)=>X[qz],configFileSelector:(X)=>X[Cz],default:void 0})();let L=void 0;return async()=>{if(!L){const X=await W;L=X?[...G,[`app/${X}`]]:[...G]}return L}};import{Buffer as Nz}from"buffer";import{createHash as Pz,createHmac as jz}from"crypto";function SX($,U){if(Nz.isBuffer($))return $;if(typeof $==="string")return kX($,U);if(ArrayBuffer.isView($))return FU($.buffer,$.byteOffset,$.byteLength);return FU($)}class Sz{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(bX(SX($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?jz(this.algorithmIdentifier,SX(this.secret)):Pz(this.algorithmIdentifier)}}import{fstatSync as kz,lstatSync as bz}from"fs";var hK=($)=>{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 bz($.path).size;else if(typeof $.fd==="number")return kz($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var hX="AWS_EXECUTION_ENV",YU="AWS_REGION",zU="AWS_DEFAULT_REGION",DX="AWS_EC2_METADATA_DISABLED",xX=["in-region","cross-region","mobile","standard","legacy"],vX="/latest/meta-data/placement/region";var cX={environmentVariableSelector:($)=>{return $.AWS_DEFAULTS_MODE},configFileSelector:($)=>{return $.defaults_mode},default:"legacy"};var sK=({region:$=L0(lL),defaultsMode:U=L0(cX)}={})=>yX(async()=>{const G=typeof U==="function"?await U():U;switch(G?.toLowerCase()){case"auto":return hz($);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 ${xX.join(", ")}, got ${G}`)}}),hz=async($)=>{if($){const U=typeof $==="function"?await $():$,G=await Dz();if(!G)return"standard";if(U===G)return"in-region";else return"cross-region"}return"standard"},Dz=async()=>{if(process.env[hX]&&(process.env[YU]||process.env[zU]))return process.env[YU]??process.env[zU];if(!process.env[DX])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-84my1sg8.js"),G=await $();return(await U({...G,path:vX})).toString()}catch($){}};var iK=($)=>{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}}},rK=($)=>{return{region:$.region()}};export{LG as T,sL as U,n as V,FQ as W,YQ as X,QQ as Y,fQ as Z,b8 as _,B0 as $,a as aa,C$ as ba,gQ as ca,a5 as da,u0 as ea,$Y as fa,WY as ga,TR as ha,sR as ia,nR as ja,lL as ka,I3 as la,DR as ma,_3 as na,AY as oa,l3 as pa,KM as qa,OM as ra,G8 as sa,Ff as ta,Yf as ua,zf as va,Vf as wa,Vz as xa,TK as ya,Sz as za,hK as Aa,sK as Ba,iK as Ca,rK as Da};
19
-
20
- //# debugId=1147A41184C52F5464756E2164756E21
@@ -1,4 +0,0 @@
1
- import{I as d,J as j}from"./chunk-td079vg9.js";import{Lb as T}from"./chunk-dbetpx84.js";import{Pb as e,Rb as C,Sb as E,Tb as l}from"./chunk-5pasfeez.js";var A=j((to,R)=>{function I(o){const t={};if(o=o.replace(/^\?/,""),o)for(let n of o.split("&")){let[i,r=null]=n.split("=");if(i=decodeURIComponent(i),r)r=decodeURIComponent(r);if(!(i in t))t[i]=r;else if(Array.isArray(t[i]))t[i].push(r);else t[i]=[t[i],r]}return t}var{defineProperty:h,getOwnPropertyDescriptor:x,getOwnPropertyNames:z}=Object,L=Object.prototype.hasOwnProperty,X=(o,t)=>h(o,"name",{value:t,configurable:!0}),Z=(o,t)=>{for(var n in t)h(o,n,{get:t[n],enumerable:!0})},b=(o,t,n,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let r of z(t))if(!L.call(o,r)&&r!==n)h(o,r,{get:()=>t[r],enumerable:!(i=x(t,r))||i.enumerable})}return o},B=(o)=>b(h({},"__esModule",{value:!0}),o),S={};Z(S,{parseQueryString:()=>I});R.exports=B(S);X(I,"parseQueryString")});function s(o){try{const t=new Set(Array.from(o.match(/([A-Z_]){3,}/g)??[]));return t.delete("CONFIG"),t.delete("CONFIG_PREFIX_SEPARATOR"),t.delete("ENV"),[...t].join(", ")}catch(t){return o}}var a=(o,t)=>async()=>{try{const n=o(process.env);if(n===void 0)throw new Error;return n}catch(n){throw new e(n.message||`Not found in ENV: ${s(o.toString())}`,{logger:t})}};var m=d(T(),1);var w=(o,{preferredFile:t="config",...n}={})=>async()=>{const i=m.getProfileName(n),{configFile:r,credentialsFile:c}=await m.loadSharedConfigFiles(n),f=c[i]||{},p=r[i]||{},G=t==="config"?{...f,...p}:{...p,...f};try{const F=o(G,t==="config"?r:c);if(F===void 0)throw new Error;return F}catch(g){throw new e(g.message||`Not found in config files w/ profile [${i}]: ${s(o.toString())}`,{logger:n.logger})}};var U=(o)=>typeof o==="function",N=(o)=>U(o)?async()=>await o():E(o);var u=({environmentVariableSelector:o,configFileSelector:t,default:n},i={})=>l(C(a(o),w(t,i),N(n)));var $=d(A(),1),H=(o)=>{if(typeof o==="string")return H(new URL(o));const{hostname:t,pathname:n,port:i,protocol:r,search:c}=o;let f;if(c)f=$.parseQueryString(c);return{hostname:t,port:i?parseInt(i):void 0,protocol:r,path:n,query:f}};
2
- export{A as Ib,u as Jb,H as Kb};
3
-
4
- //# debugId=25EB9CDADD036ECE64756E2164756E21
@@ -1,16 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../node_modules/@smithy/querystring-parser/dist-cjs/index.js", "../../../node_modules/@smithy/node-config-provider/dist-es/getSelectorName.js", "../../../node_modules/@smithy/node-config-provider/dist-es/fromEnv.js", "../../../node_modules/@smithy/node-config-provider/dist-es/fromSharedConfigFiles.js", "../../../node_modules/@smithy/node-config-provider/dist-es/fromStatic.js", "../../../node_modules/@smithy/node-config-provider/dist-es/configLoader.js", "../../../node_modules/@smithy/url-parser/dist-es/index.js"],
4
- "sourcesContent": [
5
- "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n parseQueryString: () => parseQueryString\n});\nmodule.exports = __toCommonJS(src_exports);\nfunction parseQueryString(querystring) {\n const query = {};\n querystring = querystring.replace(/^\\?/, \"\");\n if (querystring) {\n for (const pair of querystring.split(\"&\")) {\n let [key, value = null] = pair.split(\"=\");\n key = decodeURIComponent(key);\n if (value) {\n value = decodeURIComponent(value);\n }\n if (!(key in query)) {\n query[key] = value;\n } else if (Array.isArray(query[key])) {\n query[key].push(value);\n } else {\n query[key] = [query[key], value];\n }\n }\n }\n return query;\n}\n__name(parseQueryString, \"parseQueryString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n parseQueryString\n});\n\n",
6
- "export function getSelectorName(functionString) {\n try {\n const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));\n constants.delete(\"CONFIG\");\n constants.delete(\"CONFIG_PREFIX_SEPARATOR\");\n constants.delete(\"ENV\");\n return [...constants].join(\", \");\n }\n catch (e) {\n return functionString;\n }\n}\n",
7
- "import { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { getSelectorName } from \"./getSelectorName\";\nexport const fromEnv = (envVarSelector, logger) => async () => {\n try {\n const config = envVarSelector(process.env);\n if (config === undefined) {\n throw new Error();\n }\n return config;\n }\n catch (e) {\n throw new CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger });\n }\n};\n",
8
- "import { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { getProfileName, loadSharedConfigFiles } from \"@smithy/shared-ini-file-loader\";\nimport { getSelectorName } from \"./getSelectorName\";\nexport const fromSharedConfigFiles = (configSelector, { preferredFile = \"config\", ...init } = {}) => async () => {\n const profile = getProfileName(init);\n const { configFile, credentialsFile } = await loadSharedConfigFiles(init);\n const profileFromCredentials = credentialsFile[profile] || {};\n const profileFromConfig = configFile[profile] || {};\n const mergedProfile = preferredFile === \"config\"\n ? { ...profileFromCredentials, ...profileFromConfig }\n : { ...profileFromConfig, ...profileFromCredentials };\n try {\n const cfgFile = preferredFile === \"config\" ? configFile : credentialsFile;\n const configValue = configSelector(mergedProfile, cfgFile);\n if (configValue === undefined) {\n throw new Error();\n }\n return configValue;\n }\n catch (e) {\n throw new CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger });\n }\n};\n",
9
- "import { fromStatic as convertToProvider } from \"@smithy/property-provider\";\nconst isFunction = (func) => typeof func === \"function\";\nexport const fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : convertToProvider(defaultValue);\n",
10
- "import { chain, memoize } from \"@smithy/property-provider\";\nimport { fromEnv } from \"./fromEnv\";\nimport { fromSharedConfigFiles } from \"./fromSharedConfigFiles\";\nimport { fromStatic } from \"./fromStatic\";\nexport const loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => memoize(chain(fromEnv(environmentVariableSelector), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue)));\n",
11
- "import { parseQueryString } from \"@smithy/querystring-parser\";\nexport const parseUrl = (url) => {\n if (typeof url === \"string\") {\n return parseUrl(new URL(url));\n }\n const { hostname, pathname, port, protocol, search } = url;\n let query;\n if (search) {\n query = parseQueryString(search);\n }\n return {\n hostname,\n port: port ? parseInt(port) : undefined,\n protocol,\n path: pathname,\n query,\n };\n};\n"
12
- ],
13
- "mappings": "sLAyBA,GAAS,LAAgB,CAAC,EAAa,CACrC,MAAM,EAAQ,CAAC,EAEf,GADA,EAAc,EAAY,QAAQ,MAAO,EAAE,EACvC,EACF,QAAW,KAAQ,EAAY,MAAM,GAAG,EAAG,CACzC,IAAK,EAAK,EAAQ,MAAQ,EAAK,MAAM,GAAG,EAExC,GADA,EAAM,mBAAmB,CAAG,EACxB,EACF,EAAQ,mBAAmB,CAAK,EAElC,KAAM,KAAO,GACX,EAAM,GAAO,UACJ,MAAM,QAAQ,EAAM,EAAI,EACjC,EAAM,GAAK,KAAK,CAAK,MAErB,GAAM,GAAO,CAAC,EAAM,GAAM,CAAK,EAIrC,OAAO,EA5CT,IAAuB,eAAnB,EAC0B,yBAA1B,EAC2B,oBAA3B,GADmB,OAEnB,EAAe,OAAO,UAAU,eAChC,EAAS,CAAC,EAAQ,IAAU,EAAU,EAAQ,OAAQ,CAAE,QAAO,aAAc,EAAK,CAAC,EACnF,EAAW,CAAC,EAAQ,IAAQ,CAC9B,QAAS,KAAQ,EACf,EAAU,EAAQ,EAAM,CAAE,IAAK,EAAI,GAAO,WAAY,EAAK,CAAC,GAE5D,EAAc,CAAC,EAAI,EAAM,EAAQ,IAAS,CAC5C,GAAI,UAAe,IAAS,iBAAmB,IAAS,YACtD,QAAS,KAAO,EAAkB,CAAI,EACpC,IAAK,EAAa,KAAK,EAAI,CAAG,GAAK,IAAQ,EACzC,EAAU,EAAI,EAAK,CAAE,IAAK,IAAM,EAAK,GAAM,aAAc,EAAO,EAAiB,EAAM,CAAG,IAAM,EAAK,UAAW,CAAC,EAEvH,OAAO,GAEL,EAAe,CAAC,IAAQ,EAAY,EAAU,CAAC,EAAG,aAAc,CAAE,MAAO,EAAK,CAAC,EAAG,CAAG,EAGrF,EAAc,CAAC,EACnB,EAAS,EAAa,CACpB,iBAAkB,IAAM,CAC1B,CAAC,EACD,EAAO,QAAU,EAAa,CAAW,EAsBzC,EAAO,EAAkB,kBAAkB,IC9CpC,SAAS,CAAe,CAAC,EAAgB,CAC5C,GAAI,CACA,MAAM,EAAY,IAAI,IAAI,MAAM,KAAK,EAAe,MAAM,eAAe,GAAK,CAAC,CAAC,CAAC,EAIjF,OAHA,EAAU,OAAO,QAAQ,EACzB,EAAU,OAAO,yBAAyB,EAC1C,EAAU,OAAO,KAAK,EACf,CAAC,GAAG,CAAS,EAAE,KAAK,IAAI,QAE5B,EAAP,CACI,OAAO,GCPR,IAAM,EAAU,CAAC,EAAgB,IAAW,SAAY,CAC3D,GAAI,CACA,MAAM,EAAS,EAAe,QAAQ,GAAG,EACzC,GAAI,IAAW,OACX,MAAM,IAAI,MAEd,OAAO,QAEJ,EAAP,CACI,MAAM,IAAI,EAAyB,EAAE,SAAW,qBAAqB,EAAgB,EAAe,SAAS,CAAC,IAAK,CAAE,QAAO,CAAC,ICVrI,eAEO,IAAM,EAAwB,CAAC,GAAkB,gBAAgB,YAAa,GAAS,CAAC,IAAM,SAAY,CAC7G,MAAM,EAAU,iBAAe,CAAI,GAC3B,aAAY,mBAAoB,MAAM,wBAAsB,CAAI,EAClE,EAAyB,EAAgB,IAAY,CAAC,EACtD,EAAoB,EAAW,IAAY,CAAC,EAC5C,EAAgB,IAAkB,SAClC,IAAK,KAA2B,CAAkB,EAClD,IAAK,KAAsB,CAAuB,EACxD,GAAI,CAEA,MAAM,EAAc,EAAe,EADnB,IAAkB,SAAW,EAAa,CACD,EACzD,GAAI,IAAgB,OAChB,MAAM,IAAI,MAEd,OAAO,QAEJ,EAAP,CACI,MAAM,IAAI,EAAyB,EAAE,SAAW,yCAAyC,OAAa,EAAgB,EAAe,SAAS,CAAC,IAAK,CAAE,OAAQ,EAAK,MAAO,CAAC,ICnBnL,IAAM,EAAa,CAAC,WAAgB,IAAS,WAChC,EAAa,CAAC,IAAiB,EAAW,CAAY,EAAI,SAAY,MAAM,EAAa,EAAI,EAAkB,CAAY,ECEjI,IAAM,EAAa,EAAG,8BAA6B,qBAAoB,QAAS,GAAgB,EAAgB,CAAC,IAAM,EAAQ,EAAM,EAAQ,CAA2B,EAAG,EAAsB,EAAoB,CAAa,EAAG,EAAW,CAAY,CAAC,CAAC,ECJrQ,eACa,EAAW,CAAC,IAAQ,CAC7B,UAAW,IAAQ,SACf,OAAO,EAAS,IAAI,IAAI,CAAG,CAAC,EAEhC,MAAQ,WAAU,WAAU,OAAM,WAAU,UAAW,EACvD,IAAI,EACJ,GAAI,EACA,EAAQ,mBAAiB,CAAM,EAEnC,MAAO,CACH,WACA,KAAM,EAAO,SAAS,CAAI,EAAI,OAC9B,WACA,KAAM,EACN,OACJ",
14
- "debugId": "25EB9CDADD036ECE64756E2164756E21",
15
- "names": []
16
- }
@@ -1,4 +0,0 @@
1
- import{G as e}from"./chunk-35bsy26w.js";class r extends e{i;static _name="EmailServiceContainer";constructor(i){super();this.service=i}}
2
- export{r as M};
3
-
4
- //# debugId=0930D178849F022464756E2164756E21
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{I as A}from"./chunk-td079vg9.js";import{Lb as G}from"./chunk-dbetpx84.js";import"./chunk-fn8t5a77.js";import{Pb as I,Rb as $}from"./chunk-5pasfeez.js";var j=A(G(),1);var J=A(G(),1);var q=(y,c,_)=>{const b={EcsContainer:async(x)=>{const{fromHttp:w}=await import("./chunk-1vk09mag.js"),{fromContainerMetadata:C}=await import("./chunk-84my1sg8.js");return _?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),$(w(x??{}),C(x))},Ec2InstanceMetadata:async(x)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:w}=await import("./chunk-84my1sg8.js");return w(x)},Environment:async(x)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:w}=await import("./chunk-nv02r6kq.js");return w(x)}};if(y in b)return b[y];else throw new I(`Unsupported credential source in profile ${c}. Got ${y}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:_})};var L=(y,{profile:c="default",logger:_}={})=>{return Boolean(y)&&typeof y==="object"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1&&["undefined","string"].indexOf(typeof y.external_id)>-1&&["undefined","string"].indexOf(typeof y.mfa_serial)>-1&&(F(y,{profile:c,logger:_})||H(y,{profile:c,logger:_}))},F=(y,{profile:c,logger:_})=>{const b=typeof y.source_profile==="string"&&typeof y.credential_source==="undefined";if(b)_?.debug?.(` ${c} isAssumeRoleWithSourceProfile source_profile=${y.source_profile}`);return b},H=(y,{profile:c,logger:_})=>{const b=typeof y.credential_source==="string"&&typeof y.source_profile==="undefined";if(b)_?.debug?.(` ${c} isCredentialSourceProfile credential_source=${y.credential_source}`);return b},Q=async(y,c,_,b={})=>{_.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const x=c[y];if(!_.roleAssumer){const{getDefaultRoleAssumer:k}=await import("./chunk-dv8t6w0e.js");_.roleAssumer=k({..._.clientConfig,credentialProviderLogger:_.logger,parentClientConfig:_?.parentClientConfig},_.clientPlugins)}const{source_profile:w}=x;if(w&&w in b)throw new I(`Detected a cycle attempting to resolve credentials for profile ${J.getProfileName(_)}. Profiles visited: `+Object.keys(b).join(", "),{logger:_.logger});_.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${w?`source_profile=[${w}]`:`profile=[${y}]`}`);const C=w?K(w,c,_,{...b,[w]:!0},z(c[w]??{})):(await q(x.credential_source,y,_.logger)(_))();if(z(x))return C;else{const k={RoleArn:x.role_arn,RoleSessionName:x.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:x.external_id,DurationSeconds:parseInt(x.duration_seconds||"3600",10)},{mfa_serial:O}=x;if(O){if(!_.mfaCodeProvider)throw new I(`Profile ${y} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:_.logger,tryNextLink:!1});k.SerialNumber=O,k.TokenCode=await _.mfaCodeProvider(O)}const E=await C;return _.roleAssumer(E,k)}},z=(y)=>{return!y.role_arn&&!!y.credential_source};var U=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.credential_process==="string",V=async(y,c)=>import("./chunk-vtffgrjq.js").then(({fromProcess:_})=>_({...y,profile:c})());var W=async(y,c={})=>{const{fromSSO:_}=await import("./chunk-6wm81mqc.js");return _({profile:y,logger:c.logger})()},X=(y)=>y&&(typeof y.sso_start_url==="string"||typeof y.sso_account_id==="string"||typeof y.sso_session==="string"||typeof y.sso_region==="string"||typeof y.sso_role_name==="string");var B=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.aws_access_key_id==="string"&&typeof y.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof y.aws_session_token)>-1&&["undefined","string"].indexOf(typeof y.aws_account_id)>-1,D=(y,c)=>{return c?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:y.aws_access_key_id,secretAccessKey:y.aws_secret_access_key,sessionToken:y.aws_session_token,...y.aws_credential_scope&&{credentialScope:y.aws_credential_scope},...y.aws_account_id&&{accountId:y.aws_account_id}})};var Y=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.web_identity_token_file==="string"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1,Z=async(y,c)=>import("./chunk-tgfy71hb.js").then(({fromTokenFile:_})=>_({webIdentityTokenFile:y.web_identity_token_file,roleArn:y.role_arn,roleSessionName:y.role_session_name,roleAssumerWithWebIdentity:c.roleAssumerWithWebIdentity,logger:c.logger,parentClientConfig:c.parentClientConfig})());var K=async(y,c,_,b={},x=!1)=>{const w=c[y];if(Object.keys(b).length>0&&B(w))return D(w,_);if(x||L(w,{profile:y,logger:_.logger}))return Q(y,c,_,b);if(B(w))return D(w,_);if(Y(w))return Z(w,_);if(U(w))return V(_,y);if(X(w))return await W(y,_);throw new I(`Could not resolve credentials using profile: [${y}] in configuration/credentials file(s).`,{logger:_.logger})};var a=(y={})=>async()=>{y.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const c=await j.parseKnownFiles(y);return K(j.getProfileName(y),c,y)};export{a as fromIni};
3
-
4
- //# debugId=A571201E9D717CB064756E2164756E21