@stacksjs/buddy 0.64.3 → 0.64.4

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 (46) hide show
  1. package/dist/{chunk-ac1gbd0g.js → chunk-1b3vtfck.js} +4 -4
  2. package/dist/{chunk-ac1gbd0g.js.map → chunk-1b3vtfck.js.map} +1 -1
  3. package/dist/chunk-40ywd06q.js +5 -0
  4. package/dist/{chunk-0bcq9pbj.js.map → chunk-40ywd06q.js.map} +4 -4
  5. package/dist/chunk-4vf3e1hx.js +5 -0
  6. package/dist/{chunk-a1sxtbv1.js.map → chunk-4vf3e1hx.js.map} +4 -4
  7. package/dist/{chunk-pj6d7hvk.js → chunk-8ae8k7zp.js} +3 -3
  8. package/dist/{chunk-pj6d7hvk.js.map → chunk-8ae8k7zp.js.map} +1 -1
  9. package/dist/{chunk-59vbpar7.js → chunk-8enz17vb.js} +3 -3
  10. package/dist/{chunk-59vbpar7.js.map → chunk-8enz17vb.js.map} +1 -1
  11. package/dist/{chunk-vc4pnt6y.js → chunk-8s3k0fs4.js} +4 -4
  12. package/dist/{chunk-vc4pnt6y.js.map → chunk-8s3k0fs4.js.map} +1 -1
  13. package/dist/{chunk-agapayce.js → chunk-9ttt4yty.js} +3 -3
  14. package/dist/{chunk-agapayce.js.map → chunk-9ttt4yty.js.map} +1 -1
  15. package/dist/chunk-bjtazfcc.js +7 -0
  16. package/dist/{chunk-pf356ggx.js.map → chunk-bjtazfcc.js.map} +2 -2
  17. package/dist/{chunk-nnneyqej.js → chunk-da47cv59.js} +3 -3
  18. package/dist/{chunk-nnneyqej.js.map → chunk-da47cv59.js.map} +1 -1
  19. package/dist/{chunk-cpn7yy6s.js → chunk-emgvdvgv.js} +3 -3
  20. package/dist/{chunk-cpn7yy6s.js.map → chunk-emgvdvgv.js.map} +1 -1
  21. package/dist/chunk-hbfjzk5j.js +21 -0
  22. package/dist/{chunk-v1w6bgfy.js.map → chunk-hbfjzk5j.js.map} +18 -11
  23. package/dist/{chunk-5bf9sq7t.js → chunk-m4ha2b7x.js} +3 -3
  24. package/dist/{chunk-5bf9sq7t.js.map → chunk-m4ha2b7x.js.map} +1 -1
  25. package/dist/{chunk-zpm61fm8.js → chunk-qzys4y28.js} +3 -3
  26. package/dist/{chunk-zpm61fm8.js.map → chunk-qzys4y28.js.map} +1 -1
  27. package/dist/chunk-vv8b2cgh.js +6 -0
  28. package/dist/{chunk-a6jhzhht.js.map → chunk-vv8b2cgh.js.map} +4 -13
  29. package/dist/{chunk-1mphypxn.js → chunk-wrrrgt8g.js} +3 -3
  30. package/dist/{chunk-1mphypxn.js.map → chunk-wrrrgt8g.js.map} +1 -1
  31. package/dist/chunk-zeyas8gc.js +5 -0
  32. package/dist/{chunk-nw65c3yh.js.map → chunk-zeyas8gc.js.map} +5 -5
  33. package/dist/{chunk-t49ytmk0.js → chunk-zj93wgdp.js} +3 -3
  34. package/dist/{chunk-t49ytmk0.js.map → chunk-zj93wgdp.js.map} +1 -1
  35. package/dist/{chunk-gqfh2x89.js → chunk-zw6qgfz1.js} +3 -3
  36. package/dist/{chunk-gqfh2x89.js.map → chunk-zw6qgfz1.js.map} +1 -1
  37. package/dist/cli.js +1 -1
  38. package/dist/index.js +1 -1
  39. package/dist/stacks +0 -0
  40. package/package.json +1 -1
  41. package/dist/chunk-0bcq9pbj.js +0 -5
  42. package/dist/chunk-a1sxtbv1.js +0 -5
  43. package/dist/chunk-a6jhzhht.js +0 -6
  44. package/dist/chunk-nw65c3yh.js +0 -5
  45. package/dist/chunk-pf356ggx.js +0 -7
  46. package/dist/chunk-v1w6bgfy.js +0 -21
@@ -0,0 +1,21 @@
1
+ import{N as X1,O as T}from"./chunk-wmfxrbxe.js";import{R as x,S as xU,T as R4,U as fL,W as $G,X as FX,_ as IX}from"./chunk-vv8b2cgh.js";import{gb as F0}from"./chunk-m4ha2b7x.js";import{hb as z0,ib as PU}from"./chunk-1b3vtfck.js";import{ob as JX}from"./chunk-9ttt4yty.js";import{ub as jU}from"./chunk-8enz17vb.js";var J1=T((OM,kG)=>{function DG($,U,G){return{applyToStack:(W)=>{W.add(PG($,G),bG),W.add(SG($,U),hG)}}}var{defineProperty:z1,getOwnPropertyDescriptor:yX,getOwnPropertyNames:_X}=Object,dX=Object.prototype.hasOwnProperty,C$=($,U)=>z1($,"name",{value:U,configurable:!0}),gX=($,U)=>{for(var G in U)z1($,G,{get:U[G],enumerable:!0})},pX=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of _X(U))if(!dX.call($,w)&&w!==G)z1($,w,{get:()=>U[w],enumerable:!(W=yX(U,w))||W.enumerable})}return $},lX=($)=>pX(z1({},"__esModule",{value:!0}),$),jG={};gX(jG,{deserializerMiddleware:()=>PG,deserializerMiddlewareOption:()=>bG,getSerdePlugin:()=>DG,serializerMiddleware:()=>SG,serializerMiddlewareOption:()=>hG});kG.exports=lX(jG);var PG=C$(($,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"),SG=C$(($,U)=>(G,W)=>async(w)=>{var L;const E=((L=W.endpointV2)==null?void 0:L.url)&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!E)throw new Error("No valid endpoint provider available.");const X=await U(w.input,{...$,endpoint:E});return G({...w,request:X})},"serializerMiddleware"),bG={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},hG={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};C$(DG,"getSerdePlugin")});var x0=T((AM,uG)=>{var{defineProperty:T1,getOwnPropertyDescriptor:nX,getOwnPropertyNames:sX}=Object,mX=Object.prototype.hasOwnProperty,vG=($,U)=>T1($,"name",{value:U,configurable:!0}),iX=($,U)=>{for(var G in U)T1($,G,{get:U[G],enumerable:!0})},rX=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of sX(U))if(!mX.call($,w)&&w!==G)T1($,w,{get:()=>U[w],enumerable:!(W=nX(U,w))||W.enumerable})}return $},oX=($)=>rX(T1({},"__esModule",{value:!0}),$),xG={};iX(xG,{getSmithyContext:()=>tX,normalizeProvider:()=>aX});uG.exports=oX(xG);var cG=F0(),tX=vG(($)=>$[cG.SMITHY_CONTEXT_KEY]||($[cG.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),aX=vG(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var N$=T((BM,pG)=>{var{defineProperty:K1,getOwnPropertyDescriptor:eX,getOwnPropertyNames:$R}=Object,UR=Object.prototype.hasOwnProperty,I0=($,U)=>K1($,"name",{value:U,configurable:!0}),GR=($,U)=>{for(var G in U)K1($,G,{get:U[G],enumerable:!0})},wR=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of $R(U))if(!UR.call($,w)&&w!==G)K1($,w,{get:()=>U[w],enumerable:!(W=eX(U,w))||W.enumerable})}return $},WR=($)=>wR(K1({},"__esModule",{value:!0}),$),yG={};GR(yG,{CredentialsProviderError:()=>LR,ProviderError:()=>M1,TokenProviderError:()=>ER,chain:()=>XR,fromStatic:()=>RR,memoize:()=>FR});pG.exports=WR(yG);var _G=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)}};I0(_G,"ProviderError");var M1=_G,dG=class $ extends M1{constructor(U,G=!0){super(U,G);this.name="CredentialsProviderError",Object.setPrototypeOf(this,$.prototype)}};I0(dG,"CredentialsProviderError");var LR=dG,gG=class $ extends M1{constructor(U,G=!0){super(U,G);this.name="TokenProviderError",Object.setPrototypeOf(this,$.prototype)}};I0(gG,"TokenProviderError");var ER=gG,XR=I0((...$)=>async()=>{if($.length===0)throw new M1("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"),RR=I0(($)=>()=>Promise.resolve($),"fromStatic"),FR=I0(($,U,G)=>{let W,w,L,E=!1;const X=I0(async()=>{if(!w)w=$();try{W=await w,L=!0,E=!1}finally{w=void 0}return W},"coalesceProvider");if(U===void 0)return async(R)=>{if(!L||(R==null?void 0:R.forceRefresh))W=await X();return W};return async(R)=>{if(!L||(R==null?void 0:R.forceRefresh))W=await X();if(E)return W;if(G&&!G(W))return E=!0,W;if(U(W))return await X(),W;return W}},"memoize")});var B0=T((lG)=>{Object.defineProperty(lG,"__esModule",{value:!0});lG.getHomeDir=void 0;var IR=import.meta.require("os"),ZR=import.meta.require("path"),q$={},fR=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},YR=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:G,HOMEDRIVE:W=`C:${ZR.sep}`}=process.env;if($)return $;if(U)return U;if(G)return`${W}${G}`;const w=fR();if(!q$[w])q$[w]=IR.homedir();return q$[w]};lG.getHomeDir=YR});var j$=T((sG)=>{Object.defineProperty(sG,"__esModule",{value:!0});sG.getSSOTokenFilepath=void 0;var QR=import.meta.require("crypto"),zR=import.meta.require("path"),JR=B0(),TR=($)=>{const G=QR.createHash("sha1").update($).digest("hex");return zR.join(JR.getHomeDir(),".aws","sso","cache",`${G}.json`)};sG.getSSOTokenFilepath=TR});var oG=T((iG)=>{Object.defineProperty(iG,"__esModule",{value:!0});iG.getSSOTokenFromFile=void 0;var KR=import.meta.require("fs"),MR=j$(),{readFile:OR}=KR.promises,AR=async($)=>{const U=MR.getSSOTokenFilepath($),G=await OR(U,"utf8");return JSON.parse(G)};iG.getSSOTokenFromFile=AR});var S$=T((tG)=>{Object.defineProperty(tG,"__esModule",{value:!0});tG.slurpFile=void 0;var BR=import.meta.require("fs"),{readFile:VR}=BR.promises,P$={},HR=($,U)=>{if(!P$[$]||(U===null||U===void 0?void 0:U.ignoreCache))P$[$]=VR($,"utf8");return P$[$]};tG.slurpFile=HR});var k$=T((qM,y0)=>{var{defineProperty:B1,getOwnPropertyDescriptor:CR,getOwnPropertyNames:NR}=Object,qR=Object.prototype.hasOwnProperty,y=($,U)=>B1($,"name",{value:U,configurable:!0}),jR=($,U)=>{for(var G in U)B1($,G,{get:U[G],enumerable:!0})},b$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of NR(U))if(!qR.call($,w)&&w!==G)B1($,w,{get:()=>U[w],enumerable:!(W=CR(U,w))||W.enumerable})}return $},D$=($,U,G)=>(b$($,U,"default"),G&&b$(G,U,"default")),PR=($)=>b$(B1({},"__esModule",{value:!0}),$),u0={};jR(u0,{CONFIG_PREFIX_SEPARATOR:()=>Z0,DEFAULT_PROFILE:()=>Gw,ENV_PROFILE:()=>Uw,getProfileName:()=>SR,loadSharedConfigFiles:()=>Ww,loadSsoSessionData:()=>pR,parseKnownFiles:()=>nR});y0.exports=PR(u0);D$(u0,B0(),y0.exports);var Uw="AWS_PROFILE",Gw="default",SR=y(($)=>$.profile||process.env[Uw]||Gw,"getProfileName");D$(u0,j$(),y0.exports);D$(u0,oG(),y0.exports);var O1=F0(),bR=y(($)=>Object.entries($).filter(([U])=>{const G=U.indexOf(Z0);if(G===-1)return!1;return Object.values(O1.IniSectionType).includes(U.substring(0,G))}).reduce((U,[G,W])=>{const w=G.indexOf(Z0),L=G.substring(0,w)===O1.IniSectionType.PROFILE?G.substring(w+1):G;return U[L]=W,U},{...$.default&&{default:$.default}}),"getConfigData"),A1=import.meta.require("path"),hR=B0(),DR="AWS_CONFIG_FILE",ww=y(()=>process.env[DR]||A1.join(hR.getHomeDir(),".aws","config"),"getConfigFilepath"),kR=B0(),cR="AWS_SHARED_CREDENTIALS_FILE",vR=y(()=>process.env[cR]||A1.join(kR.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),xR=B0(),uR=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,yR=["__proto__","profile __proto__"],h$=y(($)=>{const U={};let G,W;for(let w of $.split(/\r?\n/)){const L=w.split(/(^|\s)[;#]/)[0].trim();if(L[0]==="["&&L[L.length-1]==="]"){G=void 0,W=void 0;const X=L.substring(1,L.length-1),R=uR.exec(X);if(R){const[,F,,I]=R;if(Object.values(O1.IniSectionType).includes(F))G=[F,I].join(Z0)}else G=X;if(yR.includes(X))throw new Error(`Found invalid profile name "${X}"`)}else if(G){const X=L.indexOf("=");if(![0,-1].includes(X)){const[R,F]=[L.substring(0,X).trim(),L.substring(X+1).trim()];if(F==="")W=R;else{if(W&&w.trimStart()===w)W=void 0;U[G]=U[G]||{};const I=W?[W,R].join(Z0):R;U[G][I]=F}}}}return U},"parseIni"),eG=S$(),$w=y(()=>({}),"swallowError"),Z0=".",Ww=y(async($={})=>{const{filepath:U=vR(),configFilepath:G=ww()}=$,W=xR.getHomeDir();let L=U;if(U.startsWith("~/"))L=A1.join(W,U.slice(2));let E=G;if(G.startsWith("~/"))E=A1.join(W,G.slice(2));const X=await Promise.all([eG.slurpFile(E,{ignoreCache:$.ignoreCache}).then(h$).then(bR).catch($w),eG.slurpFile(L,{ignoreCache:$.ignoreCache}).then(h$).catch($w)]);return{configFile:X[0],credentialsFile:X[1]}},"loadSharedConfigFiles"),_R=y(($)=>Object.entries($).filter(([U])=>U.startsWith(O1.IniSectionType.SSO_SESSION+Z0)).reduce((U,[G,W])=>({...U,[G.substring(G.indexOf(Z0)+1)]:W}),{}),"getSsoSessionData"),dR=S$(),gR=y(()=>({}),"swallowError"),pR=y(async($={})=>dR.slurpFile($.configFilepath??ww()).then(h$).then(_R).catch(gR),"loadSsoSessionData"),lR=y((...$)=>{const U={};for(let G of $)for(let[W,w]of Object.entries(G))if(U[W]!==void 0)Object.assign(U[W],w);else U[W]=w;return U},"mergeConfigFiles"),nR=y(async($)=>{const U=await Ww($);return lR(U.configFile,U.credentialsFile)},"parseKnownFiles")});var Rw=T((jM,Xw)=>{function c$($){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:V1,getOwnPropertyDescriptor:sR,getOwnPropertyNames:mR}=Object,iR=Object.prototype.hasOwnProperty,V0=($,U)=>V1($,"name",{value:U,configurable:!0}),rR=($,U)=>{for(var G in U)V1($,G,{get:U[G],enumerable:!0})},oR=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of mR(U))if(!iR.call($,w)&&w!==G)V1($,w,{get:()=>U[w],enumerable:!(W=sR(U,w))||W.enumerable})}return $},tR=($)=>oR(V1({},"__esModule",{value:!0}),$),Ew={};rR(Ew,{loadConfig:()=>GF});Xw.exports=tR(Ew);var _0=N$();V0(c$,"getSelectorName");var aR=V0(($,U)=>async()=>{try{const G=$(process.env);if(G===void 0)throw new Error;return G}catch(G){throw new _0.CredentialsProviderError(G.message||`Not found in ENV: ${c$($.toString())}`,{logger:U})}},"fromEnv"),Lw=k$(),eR=V0(($,{preferredFile:U="config",...G}={})=>async()=>{const W=Lw.getProfileName(G),{configFile:w,credentialsFile:L}=await Lw.loadSharedConfigFiles(G),E=L[W]||{},X=w[W]||{},R=U==="config"?{...E,...X}:{...X,...E};try{const I=$(R,U==="config"?w:L);if(I===void 0)throw new Error;return I}catch(F){throw new _0.CredentialsProviderError(F.message||`Not found in config files w/ profile [${W}]: ${c$($.toString())}`,{logger:G.logger})}},"fromSharedConfigFiles"),$F=V0(($)=>typeof $==="function","isFunction"),UF=V0(($)=>$F($)?async()=>await $():_0.fromStatic($),"fromStatic"),GF=V0(({environmentVariableSelector:$,configFileSelector:U,default:G},W={})=>_0.memoize(_0.chain(aR($),eR(U,W),UF(G))),"loadConfig")});var Qw=T((fw)=>{Object.defineProperty(fw,"__esModule",{value:!0});fw.getEndpointUrlConfig=void 0;var Fw=k$(),Iw="AWS_ENDPOINT_URL",Zw="endpoint_url",wF=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((L)=>L.toUpperCase()),W=U[[Iw,...G].join("_")];if(W)return W;const w=U[Iw];if(w)return w;return},configFileSelector:(U,G)=>{if(G&&U.services){const w=G[["services",U.services].join(Fw.CONFIG_PREFIX_SEPARATOR)];if(w){const L=$.split(" ").map((X)=>X.toLowerCase()),E=w[[L.join("_"),Zw].join(Fw.CONFIG_PREFIX_SEPARATOR)];if(E)return E}}const W=U[Zw];if(W)return W;return},default:void 0});fw.getEndpointUrlConfig=wF});var Tw=T((zw)=>{Object.defineProperty(zw,"__esModule",{value:!0});zw.getEndpointFromConfig=void 0;var WF=Rw(),LF=Qw(),EF=async($)=>WF.loadConfig(LF.getEndpointUrlConfig($))();zw.getEndpointFromConfig=EF});var Aw=T((bM,Ow)=>{function Mw($){const U={};if($=$.replace(/^\?/,""),$)for(let G of $.split("&")){let[W,w=null]=G.split("=");if(W=decodeURIComponent(W),w)w=decodeURIComponent(w);if(!(W in U))U[W]=w;else if(Array.isArray(U[W]))U[W].push(w);else U[W]=[U[W],w]}return U}var{defineProperty:H1,getOwnPropertyDescriptor:XF,getOwnPropertyNames:RF}=Object,FF=Object.prototype.hasOwnProperty,IF=($,U)=>H1($,"name",{value:U,configurable:!0}),ZF=($,U)=>{for(var G in U)H1($,G,{get:U[G],enumerable:!0})},fF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of RF(U))if(!FF.call($,w)&&w!==G)H1($,w,{get:()=>U[w],enumerable:!(W=XF(U,w))||W.enumerable})}return $},YF=($)=>fF(H1({},"__esModule",{value:!0}),$),Kw={};ZF(Kw,{parseQueryString:()=>Mw});Ow.exports=YF(Kw);IF(Mw,"parseQueryString")});var Cw=T((hM,Hw)=>{var{defineProperty:C1,getOwnPropertyDescriptor:QF,getOwnPropertyNames:zF}=Object,JF=Object.prototype.hasOwnProperty,TF=($,U)=>C1($,"name",{value:U,configurable:!0}),KF=($,U)=>{for(var G in U)C1($,G,{get:U[G],enumerable:!0})},MF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of zF(U))if(!JF.call($,w)&&w!==G)C1($,w,{get:()=>U[w],enumerable:!(W=QF(U,w))||W.enumerable})}return $},OF=($)=>MF(C1({},"__esModule",{value:!0}),$),Bw={};KF(Bw,{parseUrl:()=>Vw});Hw.exports=OF(Bw);var AF=Aw(),Vw=TF(($)=>{if(typeof $==="string")return Vw(new URL($));const{hostname:U,pathname:G,port:W,protocol:w,search:L}=$;let E;if(L)E=AF.parseQueryString(L);return{hostname:U,port:W?parseInt(W):void 0,protocol:w,path:G,query:E}},"parseUrl")});var Dw=T((DM,hw)=>{var{defineProperty:q1,getOwnPropertyDescriptor:BF,getOwnPropertyNames:VF}=Object,HF=Object.prototype.hasOwnProperty,p=($,U)=>q1($,"name",{value:U,configurable:!0}),CF=($,U)=>{for(var G in U)q1($,G,{get:U[G],enumerable:!0})},NF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of VF(U))if(!HF.call($,w)&&w!==G)q1($,w,{get:()=>U[w],enumerable:!(W=BF(U,w))||W.enumerable})}return $},qF=($)=>NF(q1({},"__esModule",{value:!0}),$),qw={};CF(qw,{endpointMiddleware:()=>Sw,endpointMiddlewareOptions:()=>bw,getEndpointFromInstructions:()=>jw,getEndpointPlugin:()=>xF,resolveEndpointConfig:()=>uF,resolveParams:()=>Pw,toEndpointV1:()=>v$});hw.exports=qF(qw);var jF=p(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(DF(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!hF(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),PF=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,SF=/(\d+\.){3}\d+/,bF=/\.\./,hF=p(($)=>PF.test($)&&!SF.test($)&&!bF.test($),"isDnsCompatibleBucketName"),DF=p(($)=>{const[U,G,W,,,w]=$.split(":"),L=U==="arn"&&$.split(":").length>=6,E=Boolean(L&&G&&W&&w);if(L&&!E)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return E},"isArnBucketName"),kF=p(($,U,G)=>{const W=p(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:E,port:X,path:R}=w;return`${L}//${E}${X?":"+X:""}${R}`}}return w};return W},"createConfigValueProvider"),cF=Tw(),Nw=Cw(),v$=p(($)=>{if(typeof $==="object"){if("url"in $)return Nw.parseUrl($.url);return $}return Nw.parseUrl($)},"toEndpointV1"),jw=p(async($,U,G,W)=>{if(!G.endpoint){const E=await cF.getEndpointFromConfig(G.serviceId||"");if(E)G.endpoint=()=>Promise.resolve(v$(E))}const w=await Pw($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(w,W)},"getEndpointFromInstructions"),Pw=p(async($,U,G)=>{var W;const w={},L=((W=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:W.call(U))||{};for(let[E,X]of Object.entries(L))switch(X.type){case"staticContextParams":w[E]=X.value;break;case"contextParams":w[E]=$[X.name];break;case"clientContextParams":case"builtInParams":w[E]=await kF(X.name,E,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(X))}if(Object.keys(L).length===0)Object.assign(w,G);if(String(G.serviceId).toLowerCase()==="s3")await jF(w);return w},"resolveParams"),N1=x0(),Sw=p(({config:$,instructions:U})=>{return(G,W)=>async(w)=>{var L,E,X;const R=await jw(w.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=R,W.authSchemes=(L=R.properties)==null?void 0:L.authSchemes;const F=(E=W.authSchemes)==null?void 0:E[0];if(F){W.signing_region=F.signingRegion,W.signing_service=F.signingName;const I=N1.getSmithyContext(W),Z=(X=I==null?void 0:I.selectedHttpAuthScheme)==null?void 0:X.httpAuthOption;if(Z)Z.signingProperties=Object.assign(Z.signingProperties||{},{signing_region:F.signingRegion,signingRegion:F.signingRegion,signing_service:F.signingName,signingName:F.signingName,signingRegionSet:F.signingRegionSet},F.properties)}return G({...w})}},"endpointMiddleware"),vF=J1(),bw={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:vF.serializerMiddlewareOption.name},xF=p(($,U)=>({applyToStack:(G)=>{G.addRelativeTo(Sw({config:$,instructions:U}),bw)}}),"getEndpointPlugin"),uF=p(($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>v$(await N1.normalizeProvider(G)()):void 0;return{...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:N1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:N1.normalizeProvider($.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var o=T((kM,gw)=>{function yw($){return Object.keys($).reduce((U,G)=>{const W=$[G];return{...U,[G]:Array.isArray(W)?[...W]:W}},{})}function dw($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)}var{defineProperty:j1,getOwnPropertyDescriptor:yF,getOwnPropertyNames:_F}=Object,dF=Object.prototype.hasOwnProperty,G0=($,U)=>j1($,"name",{value:U,configurable:!0}),gF=($,U)=>{for(var G in U)j1($,G,{get:U[G],enumerable:!0})},pF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of _F(U))if(!dF.call($,w)&&w!==G)j1($,w,{get:()=>U[w],enumerable:!(W=yF(U,w))||W.enumerable})}return $},lF=($)=>pF(j1({},"__esModule",{value:!0}),$),kw={};gF(kw,{Field:()=>mF,Fields:()=>iF,HttpRequest:()=>rF,HttpResponse:()=>oF,IHttpRequest:()=>cw.HttpRequest,getHttpHandlerExtensionConfiguration:()=>nF,isValidHostname:()=>dw,resolveHttpHandlerRuntimeConfig:()=>sF});gw.exports=lF(kw);var nF=G0(($)=>{let U=$.httpHandler;return{setHttpHandler(G){U=G},httpHandler(){return U},updateHttpClientConfig(G,W){U.updateHttpClientConfig(G,W)},httpHandlerConfigs(){return U.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),sF=G0(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),cw=F0(),vw=class ${constructor({name:U,kind:G=cw.FieldPosition.HEADER,values:W=[]}){this.name=U,this.kind=G,this.values=W}add(U){this.values.push(U)}set(U){this.values=U}remove(U){this.values=this.values.filter((G)=>G!==U)}toString(){return this.values.map((U)=>U.includes(",")||U.includes(" ")?`"${U}"`:U).join(", ")}get(){return this.values}};G0(vw,"Field");var mF=vw,xw=class ${constructor({fields:U=[],encoding:G="utf-8"}){this.entries={},U.forEach(this.setField.bind(this)),this.encoding=G}setField(U){this.entries[U.name.toLowerCase()]=U}getField(U){return this.entries[U.toLowerCase()]}removeField(U){delete this.entries[U.toLowerCase()]}getByType(U){return Object.values(this.entries).filter((G)=>G.kind===U)}};G0(xw,"Fields");var iF=xw,uw=class ${constructor(U){this.method=U.method||"GET",this.hostname=U.hostname||"localhost",this.port=U.port,this.query=U.query||{},this.headers=U.headers||{},this.body=U.body,this.protocol=U.protocol?U.protocol.slice(-1)!==":"?`${U.protocol}:`:U.protocol:"https:",this.path=U.path?U.path.charAt(0)!=="/"?`/${U.path}`:U.path:"/",this.username=U.username,this.password=U.password,this.fragment=U.fragment}static clone(U){const G=new $({...U,headers:{...U.headers}});if(G.query)G.query=yw(G.query);return G}static isInstance(U){if(!U)return!1;const G=U;return"method"in G&&"protocol"in G&&"hostname"in G&&"path"in G&&typeof G.query==="object"&&typeof G.headers==="object"}clone(){return $.clone(this)}};G0(uw,"HttpRequest");var rF=uw;G0(yw,"cloneQuery");var _w=class ${constructor(U){this.statusCode=U.statusCode,this.reason=U.reason,this.headers=U.headers||{},this.body=U.body}static isInstance(U){if(!U)return!1;const G=U;return typeof G.statusCode==="number"&&typeof G.headers==="object"}};G0(_w,"HttpResponse");var oF=_w;G0(dw,"isValidHostname")});var x$=T((pw)=>{function aF($){return $&&$.__esModule?$:{default:$}}function eF(){if(P1>S1.length-16)tF.default.randomFillSync(S1),P1=0;return S1.slice(P1,P1+=16)}Object.defineProperty(pw,"__esModule",{value:!0});pw.default=eF;var tF=aF(import.meta.require("crypto")),S1=new Uint8Array(256),P1=S1.length});var sw=T((lw)=>{Object.defineProperty(lw,"__esModule",{value:!0});lw.default=void 0;var U2=/^(?:[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;lw.default=U2});var d0=T((mw)=>{function w2($){return $&&$.__esModule?$:{default:$}}function W2($){return typeof $==="string"&&G2.default.test($)}Object.defineProperty(mw,"__esModule",{value:!0});mw.default=void 0;var G2=w2(sw()),L2=W2;mw.default=L2});var g0=T((ow)=>{function X2($){return $&&$.__esModule?$:{default:$}}function rw($,U=0){return h[$[U+0]]+h[$[U+1]]+h[$[U+2]]+h[$[U+3]]+"-"+h[$[U+4]]+h[$[U+5]]+"-"+h[$[U+6]]+h[$[U+7]]+"-"+h[$[U+8]]+h[$[U+9]]+"-"+h[$[U+10]]+h[$[U+11]]+h[$[U+12]]+h[$[U+13]]+h[$[U+14]]+h[$[U+15]]}function R2($,U=0){const G=rw($,U);if(!E2.default(G))throw TypeError("Stringified UUID is invalid");return G}Object.defineProperty(ow,"__esModule",{value:!0});ow.default=void 0;ow.unsafeStringify=rw;var E2=X2(d0()),h=[];for(let $=0;$<256;++$)h.push(($+256).toString(16).slice(1));var F2=R2;ow.default=F2});var UW=T((ew)=>{function Y2($){return $&&$.__esModule?$:{default:$}}function Q2($,U,G){let W=U&&G||0;const w=U||new Array(16);$=$||{};let L=$.node||aw,E=$.clockseq!==void 0?$.clockseq:u$;if(L==null||E==null){const Y=$.random||($.rng||Z2.default)();if(L==null)L=aw=[Y[0]|1,Y[1],Y[2],Y[3],Y[4],Y[5]];if(E==null)E=u$=(Y[6]<<8|Y[7])&16383}let X=$.msecs!==void 0?$.msecs:Date.now(),R=$.nsecs!==void 0?$.nsecs:_$+1;const F=X-y$+(R-_$)/1e4;if(F<0&&$.clockseq===void 0)E=E+1&16383;if((F<0||X>y$)&&$.nsecs===void 0)R=0;if(R>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");y$=X,_$=R,u$=E,X+=12219292800000;const I=((X&268435455)*1e4+R)%4294967296;w[W++]=I>>>24&255,w[W++]=I>>>16&255,w[W++]=I>>>8&255,w[W++]=I&255;const Z=X/4294967296*1e4&268435455;w[W++]=Z>>>8&255,w[W++]=Z&255,w[W++]=Z>>>24&15|16,w[W++]=Z>>>16&255,w[W++]=E>>>8|128,w[W++]=E&255;for(let Y=0;Y<6;++Y)w[W+Y]=L[Y];return U||f2.unsafeStringify(w)}Object.defineProperty(ew,"__esModule",{value:!0});ew.default=void 0;var Z2=Y2(x$()),f2=g0(),aw,u$,y$=0,_$=0,z2=Q2;ew.default=z2});var d$=T((GW)=>{function T2($){return $&&$.__esModule?$:{default:$}}function K2($){if(!J2.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(GW,"__esModule",{value:!0});GW.default=void 0;var J2=T2(d0()),M2=K2;GW.default=M2});var g$=T((EW)=>{function B2($){return $&&$.__esModule?$:{default:$}}function V2($){$=unescape(encodeURIComponent($));const U=[];for(let G=0;G<$.length;++G)U.push($.charCodeAt(G));return U}function H2($,U,G){function W(w,L,E,X){var R;if(typeof w==="string")w=V2(w);if(typeof L==="string")L=A2.default(L);if(((R=L)===null||R===void 0?void 0:R.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let F=new Uint8Array(16+w.length);if(F.set(L),F.set(w,L.length),F=G(F),F[6]=F[6]&15|U,F[8]=F[8]&63|128,E){X=X||0;for(let I=0;I<16;++I)E[X+I]=F[I];return E}return O2.unsafeStringify(F)}try{W.name=$}catch(w){}return W.DNS=WW,W.URL=LW,W}Object.defineProperty(EW,"__esModule",{value:!0});EW.URL=EW.DNS=void 0;EW.default=H2;var O2=g0(),A2=B2(d$()),WW="6ba7b810-9dad-11d1-80b4-00c04fd430c8";EW.DNS=WW;var LW="6ba7b811-9dad-11d1-80b4-00c04fd430c8";EW.URL=LW});var IW=T((RW)=>{function j2($){return $&&$.__esModule?$:{default:$}}function P2($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return q2.default.createHash("md5").update($).digest()}Object.defineProperty(RW,"__esModule",{value:!0});RW.default=void 0;var q2=j2(import.meta.require("crypto")),S2=P2;RW.default=S2});var QW=T((fW)=>{function ZW($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(fW,"__esModule",{value:!0});fW.default=void 0;var b2=ZW(g$()),h2=ZW(IW()),D2=b2.default("v3",48,h2.default),k2=D2;fW.default=k2});var TW=T((zW)=>{function v2($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(zW,"__esModule",{value:!0});zW.default=void 0;var c2=v2(import.meta.require("crypto")),x2={randomUUID:c2.default.randomUUID};zW.default=x2});var BW=T((OW)=>{function MW($){return $&&$.__esModule?$:{default:$}}function _2($,U,G){if(KW.default.randomUUID&&!U&&!$)return KW.default.randomUUID();$=$||{};const W=$.random||($.rng||u2.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 y2.unsafeStringify(W)}Object.defineProperty(OW,"__esModule",{value:!0});OW.default=void 0;var KW=MW(TW()),u2=MW(x$()),y2=g0(),d2=_2;OW.default=d2});var CW=T((VW)=>{function p2($){return $&&$.__esModule?$:{default:$}}function l2($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return g2.default.createHash("sha1").update($).digest()}Object.defineProperty(VW,"__esModule",{value:!0});VW.default=void 0;var g2=p2(import.meta.require("crypto")),n2=l2;VW.default=n2});var PW=T((qW)=>{function NW($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(qW,"__esModule",{value:!0});qW.default=void 0;var s2=NW(g$()),m2=NW(CW()),i2=s2.default("v5",80,m2.default),r2=i2;qW.default=r2});var hW=T((SW)=>{Object.defineProperty(SW,"__esModule",{value:!0});SW.default=void 0;var o2="00000000-0000-0000-0000-000000000000";SW.default=o2});var cW=T((DW)=>{function a2($){return $&&$.__esModule?$:{default:$}}function e2($){if(!t2.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)}Object.defineProperty(DW,"__esModule",{value:!0});DW.default=void 0;var t2=a2(d0()),$I=e2;DW.default=$I});var p$=T((l)=>{function t($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(l,"__esModule",{value:!0});Object.defineProperty(l,"NIL",{enumerable:!0,get:function(){return LI.default}});Object.defineProperty(l,"parse",{enumerable:!0,get:function(){return FI.default}});Object.defineProperty(l,"stringify",{enumerable:!0,get:function(){return RI.default}});Object.defineProperty(l,"v1",{enumerable:!0,get:function(){return UI.default}});Object.defineProperty(l,"v3",{enumerable:!0,get:function(){return GI.default}});Object.defineProperty(l,"v4",{enumerable:!0,get:function(){return wI.default}});Object.defineProperty(l,"v5",{enumerable:!0,get:function(){return WI.default}});Object.defineProperty(l,"validate",{enumerable:!0,get:function(){return XI.default}});Object.defineProperty(l,"version",{enumerable:!0,get:function(){return EI.default}});var UI=t(UW()),GI=t(QW()),wI=t(BW()),WI=t(PW()),LI=t(hW()),EI=t(cW()),XI=t(d0()),RI=t(g0()),FI=t(d$())});var l$=T((tM,yW)=>{var{defineProperty:b1,getOwnPropertyDescriptor:II,getOwnPropertyNames:ZI}=Object,fI=Object.prototype.hasOwnProperty,H0=($,U)=>b1($,"name",{value:U,configurable:!0}),YI=($,U)=>{for(var G in U)b1($,G,{get:U[G],enumerable:!0})},QI=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of ZI(U))if(!fI.call($,w)&&w!==G)b1($,w,{get:()=>U[w],enumerable:!(W=II(U,w))||W.enumerable})}return $},zI=($)=>QI(b1({},"__esModule",{value:!0}),$),vW={};YI(vW,{isClockSkewCorrectedError:()=>xW,isClockSkewError:()=>BI,isRetryableByTrait:()=>AI,isServerError:()=>HI,isThrottlingError:()=>VI,isTransientError:()=>uW});yW.exports=zI(vW);var JI=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],TI=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],KI=["TimeoutError","RequestTimeout","RequestTimeoutException"],MI=[500,502,503,504],OI=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],AI=H0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),BI=H0(($)=>JI.includes($.name),"isClockSkewError"),xW=H0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),VI=H0(($)=>{var U,G;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||TI.includes($.name)||((G=$.$retryable)==null?void 0:G.throttling)==!0},"isThrottlingError"),uW=H0(($)=>{var U;return xW($)||KI.includes($.name)||OI.includes(($==null?void 0:$.code)||"")||MI.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),HI=H0(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const G=$.$metadata.httpStatusCode;if(500<=G&&G<=599&&!uW($))return!0;return!1}return!1},"isServerError")});var eW=T((aM,aW)=>{var{defineProperty:h1,getOwnPropertyDescriptor:CI,getOwnPropertyNames:NI}=Object,qI=Object.prototype.hasOwnProperty,n=($,U)=>h1($,"name",{value:U,configurable:!0}),jI=($,U)=>{for(var G in U)h1($,G,{get:U[G],enumerable:!0})},PI=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of NI(U))if(!qI.call($,w)&&w!==G)h1($,w,{get:()=>U[w],enumerable:!(W=CI(U,w))||W.enumerable})}return $},SI=($)=>PI(h1({},"__esModule",{value:!0}),$),dW={};jI(dW,{AdaptiveRetryStrategy:()=>vI,ConfiguredRetryStrategy:()=>xI,DEFAULT_MAX_ATTEMPTS:()=>n$,DEFAULT_RETRY_DELAY_BASE:()=>p0,DEFAULT_RETRY_MODE:()=>bI,DefaultRateLimiter:()=>lW,INITIAL_RETRY_TOKENS:()=>s$,INVOCATION_ID_HEADER:()=>DI,MAXIMUM_RETRY_DELAY:()=>m$,NO_RETRY_INCREMENT:()=>iW,REQUEST_HEADER:()=>kI,RETRY_COST:()=>sW,RETRY_MODES:()=>gW,StandardRetryStrategy:()=>i$,THROTTLING_RETRY_DELAY_BASE:()=>nW,TIMEOUT_RETRY_COST:()=>mW});aW.exports=SI(dW);var gW=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(gW||{}),n$=3,bI="standard",hI=l$(),pW=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(),hI.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))}};n(pW,"DefaultRateLimiter");var lW=pW,p0=100,m$=20000,nW=500,s$=500,sW=5,mW=10,iW=1,DI="amz-sdk-invocation-id",kI="amz-sdk-request",cI=n(()=>{let $=p0;return{computeNextBackoffDelay:n((W)=>{return Math.floor(Math.min(m$,Math.random()*2**W*$))},"computeNextBackoffDelay"),setDelayBase:n((W)=>{$=W},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),_W=n(({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:n(()=>U,"getRetryCount"),getRetryDelay:n(()=>Math.min(m$,$),"getRetryDelay"),getRetryCost:n(()=>G,"getRetryCost")}},"createDefaultRetryToken"),rW=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=s$,this.retryBackoffStrategy=cI(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return _W({retryDelay:p0,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"?nW:p0);const L=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),E=G.retryAfterHint?Math.max(G.retryAfterHint.getTime()-Date.now()||0,L):L,X=this.getCapacityCost(w);return this.capacity-=X,_W({retryDelay:E,retryCount:U.getRetryCount()+1,retryCost:X})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(s$,this.capacity+(U.getRetryCost()??iW))}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 ${n$}`),n$}}shouldRetry(U,G,W){return U.getRetryCount()+1<W&&this.capacity>=this.getCapacityCost(G.errorType)&&this.isRetryableError(G.errorType)}getCapacityCost(U){return U==="TRANSIENT"?mW:sW}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};n(rW,"StandardRetryStrategy");var i$=rW,oW=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:W}=G??{};this.rateLimiter=W??new lW,this.standardRetryStrategy=new i$(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)}};n(oW,"AdaptiveRetryStrategy");var vI=oW,tW=class $ extends i${constructor(U,G=p0){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}};n(tW,"ConfiguredRetryStrategy");var xI=tW});var W8=T((eM,w8)=>{var{defineProperty:D1,getOwnPropertyDescriptor:uI,getOwnPropertyNames:yI}=Object,_I=Object.prototype.hasOwnProperty,_=($,U)=>D1($,"name",{value:U,configurable:!0}),dI=($,U)=>{for(var G in U)D1($,G,{get:U[G],enumerable:!0})},gI=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of yI(U))if(!_I.call($,w)&&w!==G)D1($,w,{get:()=>U[w],enumerable:!(W=uI(U,w))||W.enumerable})}return $},pI=($)=>gI(D1({},"__esModule",{value:!0}),$),G8={};dI(G8,{constructStack:()=>r$});w8.exports=pI(G8);var f0=_(($,U)=>{const G=[];if($)G.push($);if(U)for(let W of U)G.push(W);return G},"getAllAliases"),w0=_(($,U)=>{return`${$||"anonymous"}${U&&U.length>0?` (a.k.a. ${U.join(",")})`:""}`},"getMiddlewareNameWithAliases"),r$=_(()=>{let $=[],U=[],G=!1;const W=new Set,w=_((Z)=>Z.sort((Y,f)=>$8[f.step]-$8[Y.step]||U8[f.priority||"normal"]-U8[Y.priority||"normal"]),"sort"),L=_((Z)=>{let Y=!1;const f=_((Q)=>{const O=f0(Q.name,Q.aliases);if(O.includes(Z)){Y=!0;for(let K of O)W.delete(K);return!1}return!0},"filterCb");return $=$.filter(f),U=U.filter(f),Y},"removeByName"),E=_((Z)=>{let Y=!1;const f=_((Q)=>{if(Q.middleware===Z){Y=!0;for(let O of f0(Q.name,Q.aliases))W.delete(O);return!1}return!0},"filterCb");return $=$.filter(f),U=U.filter(f),Y},"removeByReference"),X=_((Z)=>{var Y;return $.forEach((f)=>{Z.add(f.middleware,{...f})}),U.forEach((f)=>{Z.addRelativeTo(f.middleware,{...f})}),(Y=Z.identifyOnResolve)==null||Y.call(Z,I.identifyOnResolve()),Z},"cloneTo"),R=_((Z)=>{const Y=[];return Z.before.forEach((f)=>{if(f.before.length===0&&f.after.length===0)Y.push(f);else Y.push(...R(f))}),Y.push(Z),Z.after.reverse().forEach((f)=>{if(f.before.length===0&&f.after.length===0)Y.push(f);else Y.push(...R(f))}),Y},"expandRelativeMiddlewareList"),F=_((Z=!1)=>{const Y=[],f=[],Q={};return $.forEach((K)=>{const z={...K,before:[],after:[]};for(let M of f0(z.name,z.aliases))Q[M]=z;Y.push(z)}),U.forEach((K)=>{const z={...K,before:[],after:[]};for(let M of f0(z.name,z.aliases))Q[M]=z;f.push(z)}),f.forEach((K)=>{if(K.toMiddleware){const z=Q[K.toMiddleware];if(z===void 0){if(Z)return;throw new Error(`${K.toMiddleware} is not found when adding ${w0(K.name,K.aliases)} middleware ${K.relation} ${K.toMiddleware}`)}if(K.relation==="after")z.after.push(K);if(K.relation==="before")z.before.push(K)}}),w(Y).map(R).reduce((K,z)=>{return K.push(...z),K},[])},"getMiddlewareList"),I={add:(Z,Y={})=>{const{name:f,override:Q,aliases:O}=Y,K={step:"initialize",priority:"normal",middleware:Z,...Y},z=f0(f,O);if(z.length>0){if(z.some((M)=>W.has(M))){if(!Q)throw new Error(`Duplicate middleware name '${w0(f,O)}'`);for(let M of z){const A=$.findIndex((V)=>{var e;return V.name===M||((e=V.aliases)==null?void 0:e.some((R0)=>R0===M))});if(A===-1)continue;const B=$[A];if(B.step!==K.step||K.priority!==B.priority)throw new Error(`"${w0(B.name,B.aliases)}" middleware with ${B.priority} priority in ${B.step} step cannot be overridden by "${w0(f,O)}" middleware with ${K.priority} priority in ${K.step} step.`);$.splice(A,1)}}for(let M of z)W.add(M)}$.push(K)},addRelativeTo:(Z,Y)=>{const{name:f,override:Q,aliases:O}=Y,K={middleware:Z,...Y},z=f0(f,O);if(z.length>0){if(z.some((M)=>W.has(M))){if(!Q)throw new Error(`Duplicate middleware name '${w0(f,O)}'`);for(let M of z){const A=U.findIndex((V)=>{var e;return V.name===M||((e=V.aliases)==null?void 0:e.some((R0)=>R0===M))});if(A===-1)continue;const B=U[A];if(B.toMiddleware!==K.toMiddleware||B.relation!==K.relation)throw new Error(`"${w0(B.name,B.aliases)}" middleware ${B.relation} "${B.toMiddleware}" middleware cannot be overridden by "${w0(f,O)}" middleware ${K.relation} "${K.toMiddleware}" middleware.`);U.splice(A,1)}}for(let M of z)W.add(M)}U.push(K)},clone:()=>X(r$()),use:(Z)=>{Z.applyToStack(I)},remove:(Z)=>{if(typeof Z==="string")return L(Z);else return E(Z)},removeByTag:(Z)=>{let Y=!1;const f=_((Q)=>{const{tags:O,name:K,aliases:z}=Q;if(O&&O.includes(Z)){const M=f0(K,z);for(let A of M)W.delete(A);return Y=!0,!1}return!0},"filterCb");return $=$.filter(f),U=U.filter(f),Y},concat:(Z)=>{var Y;const f=X(r$());return f.use(Z),f.identifyOnResolve(G||f.identifyOnResolve()||(((Y=Z.identifyOnResolve)==null?void 0:Y.call(Z))??!1)),f},applyToStack:X,identify:()=>{return F(!0).map((Z)=>{const Y=Z.step??Z.relation+" "+Z.toMiddleware;return w0(Z.name,Z.aliases)+" - "+Y})},identifyOnResolve(Z){if(typeof Z==="boolean")G=Z;return G},resolve:(Z,Y)=>{for(let f of F().map((Q)=>Q.middleware).reverse())Z=f(Z,Y);if(G)console.log(I.identify());return Z}};return I},"constructStack"),$8={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},U8={high:3,normal:2,low:1}});var o$=T(($3,E8)=>{var{defineProperty:k1,getOwnPropertyDescriptor:lI,getOwnPropertyNames:nI}=Object,sI=Object.prototype.hasOwnProperty,mI=($,U)=>k1($,"name",{value:U,configurable:!0}),iI=($,U)=>{for(var G in U)k1($,G,{get:U[G],enumerable:!0})},rI=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of nI(U))if(!sI.call($,w)&&w!==G)k1($,w,{get:()=>U[w],enumerable:!(W=lI(U,w))||W.enumerable})}return $},oI=($)=>rI(k1({},"__esModule",{value:!0}),$),L8={};iI(L8,{isArrayBuffer:()=>tI});E8.exports=oI(L8);var tI=mI(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var l0=T((U3,F8)=>{var{defineProperty:c1,getOwnPropertyDescriptor:aI,getOwnPropertyNames:eI}=Object,$Z=Object.prototype.hasOwnProperty,X8=($,U)=>c1($,"name",{value:U,configurable:!0}),UZ=($,U)=>{for(var G in U)c1($,G,{get:U[G],enumerable:!0})},GZ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of eI(U))if(!$Z.call($,w)&&w!==G)c1($,w,{get:()=>U[w],enumerable:!(W=aI(U,w))||W.enumerable})}return $},wZ=($)=>GZ(c1({},"__esModule",{value:!0}),$),R8={};UZ(R8,{fromArrayBuffer:()=>LZ,fromString:()=>EZ});F8.exports=wZ(R8);var WZ=o$(),t$=import.meta.require("buffer"),LZ=X8(($,U=0,G=$.byteLength-U)=>{if(!WZ.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return t$.Buffer.from($,U,G)},"fromArrayBuffer"),EZ=X8(($,U)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return U?t$.Buffer.from($,U):t$.Buffer.from($)},"fromString")});var f8=T((I8)=>{Object.defineProperty(I8,"__esModule",{value:!0});I8.fromBase64=void 0;var XZ=l0(),RZ=/^[A-Za-z0-9+/]*={0,2}$/,FZ=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!RZ.exec($))throw new TypeError("Invalid base64 string.");const U=XZ.fromString($,"base64");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength)};I8.fromBase64=FZ});var W0=T((w3,J8)=>{var{defineProperty:v1,getOwnPropertyDescriptor:IZ,getOwnPropertyNames:ZZ}=Object,fZ=Object.prototype.hasOwnProperty,a$=($,U)=>v1($,"name",{value:U,configurable:!0}),YZ=($,U)=>{for(var G in U)v1($,G,{get:U[G],enumerable:!0})},QZ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of ZZ(U))if(!fZ.call($,w)&&w!==G)v1($,w,{get:()=>U[w],enumerable:!(W=IZ(U,w))||W.enumerable})}return $},zZ=($)=>QZ(v1({},"__esModule",{value:!0}),$),Y8={};YZ(Y8,{fromUtf8:()=>z8,toUint8Array:()=>JZ,toUtf8:()=>TZ});J8.exports=zZ(Y8);var Q8=l0(),z8=a$(($)=>{const U=Q8.fromString($,"utf8");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),JZ=a$(($)=>{if(typeof $==="string")return z8($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),TZ=a$(($)=>{if(typeof $==="string")return $;if(typeof $!=="object"||typeof $.byteOffset!=="number"||typeof $.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return Q8.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var M8=T((T8)=>{Object.defineProperty(T8,"__esModule",{value:!0});T8.toBase64=void 0;var KZ=l0(),MZ=W0(),OZ=($)=>{let U;if(typeof $==="string")U=MZ.fromUtf8($);else U=$;if(typeof U!=="object"||typeof U.byteOffset!=="number"||typeof U.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return KZ.fromArrayBuffer(U.buffer,U.byteOffset,U.byteLength).toString("base64")};T8.toBase64=OZ});var u1=T((L3,x1)=>{var{defineProperty:O8,getOwnPropertyDescriptor:AZ,getOwnPropertyNames:BZ}=Object,VZ=Object.prototype.hasOwnProperty,e$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of BZ(U))if(!VZ.call($,w)&&w!==G)O8($,w,{get:()=>U[w],enumerable:!(W=AZ(U,w))||W.enumerable})}return $},A8=($,U,G)=>(e$($,U,"default"),G&&e$(G,U,"default")),HZ=($)=>e$(O8({},"__esModule",{value:!0}),$),$U={};x1.exports=HZ($U);A8($U,f8(),x1.exports);A8($U,M8(),x1.exports)});var H8=T((B8)=>{Object.defineProperty(B8,"__esModule",{value:!0});B8.getAwsChunkedEncodingStream=void 0;var CZ=import.meta.require("stream"),NZ=($,U)=>{const{base64Encoder:G,bodyLengthChecker:W,checksumAlgorithmFn:w,checksumLocationName:L,streamHasher:E}=U,X=G!==void 0&&w!==void 0&&L!==void 0&&E!==void 0,R=X?E(w,$):void 0,F=new CZ.Readable({read:()=>{}});return $.on("data",(I)=>{const Z=W(I)||0;F.push(`${Z.toString(16)}\r\n`),F.push(I),F.push("\r\n")}),$.on("end",async()=>{if(F.push("0\r\n"),X){const I=G(await R);F.push(`${L}:${I}\r\n`),F.push("\r\n")}F.push(null)}),F};B8.getAwsChunkedEncodingStream=NZ});var GU=T((X3,q8)=>{var{defineProperty:y1,getOwnPropertyDescriptor:qZ,getOwnPropertyNames:jZ}=Object,PZ=Object.prototype.hasOwnProperty,UU=($,U)=>y1($,"name",{value:U,configurable:!0}),SZ=($,U)=>{for(var G in U)y1($,G,{get:U[G],enumerable:!0})},bZ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of jZ(U))if(!PZ.call($,w)&&w!==G)y1($,w,{get:()=>U[w],enumerable:!(W=qZ(U,w))||W.enumerable})}return $},hZ=($)=>bZ(y1({},"__esModule",{value:!0}),$),C8={};SZ(C8,{escapeUri:()=>N8,escapeUriPath:()=>kZ});q8.exports=hZ(C8);var N8=UU(($)=>encodeURIComponent($).replace(/[!'()*]/g,DZ),"escapeUri"),DZ=UU(($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),kZ=UU(($)=>$.split("/").map(N8).join("/"),"escapeUriPath")});var WU=T((R3,S8)=>{function P8($){const U=[];for(let G of Object.keys($).sort()){const W=$[G];if(G=wU.escapeUri(G),Array.isArray(W))for(let w=0,L=W.length;w<L;w++)U.push(`${G}=${wU.escapeUri(W[w])}`);else{let w=G;if(W||typeof W==="string")w+=`=${wU.escapeUri(W)}`;U.push(w)}}return U.join("&")}var{defineProperty:_1,getOwnPropertyDescriptor:cZ,getOwnPropertyNames:vZ}=Object,xZ=Object.prototype.hasOwnProperty,uZ=($,U)=>_1($,"name",{value:U,configurable:!0}),yZ=($,U)=>{for(var G in U)_1($,G,{get:U[G],enumerable:!0})},_Z=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of vZ(U))if(!xZ.call($,w)&&w!==G)_1($,w,{get:()=>U[w],enumerable:!(W=cZ(U,w))||W.enumerable})}return $},dZ=($)=>_Z(_1({},"__esModule",{value:!0}),$),j8={};yZ(j8,{buildQueryString:()=>P8});S8.exports=dZ(j8);var wU=GU();uZ(P8,"buildQueryString")});var m8=T((F3,s8)=>{async function XU($,U,G=b8){const W=U.headers??{},w=W.Expect||W.expect;let L=-1,E=!1;if(w==="100-continue")await Promise.race([new Promise((X)=>{L=Number(setTimeout(X,Math.max(b8,G)))}),new Promise((X)=>{$.on("continue",()=>{clearTimeout(L),X()}),$.on("error",()=>{E=!0,clearTimeout(L),X()})})]);if(!E)y8($,U.body)}function y8($,U){if(U instanceof u8.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 n8($){const U=[],G=$.getReader();let W=!1,w=0;while(!W){const{done:X,value:R}=await G.read();if(R)U.push(R),w+=R.length;W=X}const L=new Uint8Array(w);let E=0;for(let X of U)L.set(X,E),E+=X.length;return L}var{create:gZ,defineProperty:n0,getOwnPropertyDescriptor:pZ,getOwnPropertyNames:lZ,getPrototypeOf:nZ}=Object,sZ=Object.prototype.hasOwnProperty,j=($,U)=>n0($,"name",{value:U,configurable:!0}),mZ=($,U)=>{for(var G in U)n0($,G,{get:U[G],enumerable:!0})},D8=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of lZ(U))if(!sZ.call($,w)&&w!==G)n0($,w,{get:()=>U[w],enumerable:!(W=pZ(U,w))||W.enumerable})}return $},iZ=($,U,G)=>(G=$!=null?gZ(nZ($)):{},D8(U||!$||!$.__esModule?n0(G,"default",{value:$,enumerable:!0}):G,$)),rZ=($)=>D8(n0({},"__esModule",{value:!0}),$),k8={};mZ(k8,{DEFAULT_REQUEST_TIMEOUT:()=>$f,NodeHttp2Handler:()=>Lf,NodeHttpHandler:()=>Uf,streamCollector:()=>Xf});s8.exports=rZ(k8);var c8=o(),v8=WU(),LU=import.meta.require("http"),EU=import.meta.require("https"),oZ=["ECONNRESET","EPIPE","ETIMEDOUT"],x8=j(($)=>{const U={};for(let G of Object.keys($)){const W=$[G];U[G]=Array.isArray(W)?W.join(","):W}return U},"getTransformedHeaders"),tZ=j(($,U,G=0)=>{if(!G)return;const W=setTimeout(()=>{$.destroy(),U(Object.assign(new Error(`Socket timed out without establishing a connection within ${G} ms`),{name:"TimeoutError"}))},G);$.on("socket",(w)=>{if(w.connecting)w.on("connect",()=>{clearTimeout(W)});else clearTimeout(W)})},"setConnectionTimeout"),aZ=j(($,{keepAlive:U,keepAliveMsecs:G})=>{if(U!==!0)return;$.on("socket",(W)=>{W.setKeepAlive(U,G||0)})},"setSocketKeepAlive"),eZ=j(($,U,G=0)=>{$.setTimeout(G,()=>{$.destroy(),U(Object.assign(new Error(`Connection timed out after ${G} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),u8=import.meta.require("stream"),b8=1000;j(XU,"writeRequestBody");j(y8,"writeBody");var $f=0,_8=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,E;const{sockets:X,requests:R,maxSockets:F}=U;if(typeof F!=="number"||F===1/0)return G;const I=15000;if(Date.now()-I<G)return G;if(X&&R)for(let Z in X){const Y=((w=X[Z])==null?void 0:w.length)??0,f=((L=R[Z])==null?void 0:L.length)??0;if(Y>=F&&f>=2*F)return(E=W==null?void 0:W.warn)==null||E.call(W,`@smithy/node-http-handler:WARN - socket usage at capacity=${Y} and ${f} 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:E}=U||{};return{connectionTimeout:W,requestTimeout:G??w,httpAgent:(()=>{if(L instanceof LU.Agent||typeof(L==null?void 0:L.destroy)==="function")return L;return new LU.Agent({keepAlive:!0,maxSockets:50,...L})})(),httpsAgent:(()=>{if(E instanceof EU.Agent||typeof(E==null?void 0:E.destroy)==="function")return E;return new EU.Agent({keepAlive:!0,maxSockets:50,...E})})(),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;let W;return new Promise((w,L)=>{let E=void 0;const X=j(async(M)=>{await E,clearTimeout(W),w(M)},"resolve"),R=j(async(M)=>{await E,clearTimeout(W),L(M)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(G==null?void 0:G.aborted){const M=new Error("Request aborted");M.name="AbortError",R(M);return}const F=U.protocol==="https:",I=F?this.config.httpsAgent:this.config.httpAgent;W=setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(I,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const Z=v8.buildQueryString(U.query||{});let Y=void 0;if(U.username!=null||U.password!=null){const M=U.username??"",A=U.password??"";Y=`${M}:${A}`}let f=U.path;if(Z)f+=`?${Z}`;if(U.fragment)f+=`#${U.fragment}`;const Q={headers:U.headers,host:U.hostname,method:U.method,path:f,port:U.port,agent:I,auth:Y},K=(F?EU.request:LU.request)(Q,(M)=>{const A=new c8.HttpResponse({statusCode:M.statusCode||-1,reason:M.statusMessage,headers:x8(M.headers),body:M});X({response:A})});if(K.on("error",(M)=>{if(oZ.includes(M.code))R(Object.assign(M,{name:"TimeoutError"}));else R(M)}),tZ(K,R,this.config.connectionTimeout),eZ(K,R,this.config.requestTimeout),G){const M=j(()=>{K.destroy();const A=new Error("Request aborted");A.name="AbortError",R(A)},"onAbort");if(typeof G.addEventListener==="function"){const A=G;A.addEventListener("abort",M,{once:!0}),K.once("close",()=>A.removeEventListener("abort",M))}else G.onabort=M}const z=Q.agent;if(typeof z==="object"&&"keepAlive"in z)aZ(K,{keepAlive:z.keepAlive,keepAliveMsecs:z.keepAliveMsecs});E=XU(K,U,this.config.requestTimeout).catch((M)=>{return clearTimeout(W),L(M)})})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}};j(_8,"NodeHttpHandler");var Uf=_8,h8=import.meta.require("http2"),Gf=iZ(import.meta.require("http2")),d8=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()}}};j(d8,"NodeHttp2ConnectionPool");var wf=d8,g8=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 R=w.poll();if(R&&!this.config.disableConcurrency)return R}const L=Gf.default.connect(W);if(this.config.maxConcurrency)L.settings({maxConcurrentStreams:this.config.maxConcurrency},(R)=>{if(R)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});L.unref();const E=j(()=>{L.destroy(),this.deleteSession(W,L)},"destroySessionCb");if(L.on("goaway",E),L.on("error",E),L.on("frameError",E),L.on("close",()=>this.deleteSession(W,L)),G.requestTimeout)L.setTimeout(G.requestTimeout,E);const X=this.sessionCache.get(W)||new wf;return X.offerLast(L),this.sessionCache.set(W,X),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()}};j(g8,"NodeHttp2ConnectionManager");var Wf=g8,p8=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Wf({}),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,E)=>{var X;let R=!1,F=void 0;const I=j(async(q)=>{await F,L(q)},"resolve"),Z=j(async(q)=>{await F,E(q)},"reject");if(G==null?void 0:G.aborted){R=!0;const q=new Error("Request aborted");q.name="AbortError",Z(q);return}const{hostname:Y,method:f,port:Q,protocol:O,query:K}=U;let z="";if(U.username!=null||U.password!=null){const q=U.username??"",g=U.password??"";z=`${q}:${g}@`}const M=`${O}//${z}${Y}${Q?`:${Q}`:""}`,A={destination:new URL(M)},B=this.connectionManager.lease(A,{requestTimeout:(X=this.config)==null?void 0:X.sessionTimeout,disableConcurrentStreams:w||!1}),V=j((q)=>{if(w)this.destroySession(B);R=!0,Z(q)},"rejectWithDestroy"),e=v8.buildQueryString(K||{});let R0=U.path;if(e)R0+=`?${e}`;if(U.fragment)R0+=`#${U.fragment}`;const v=B.request({...U.headers,[h8.constants.HTTP2_HEADER_PATH]:R0,[h8.constants.HTTP2_HEADER_METHOD]:f});if(B.ref(),v.on("response",(q)=>{const g=new c8.HttpResponse({statusCode:q[":status"]||-1,headers:x8(q),body:v});if(R=!0,I({response:g}),w)B.close(),this.connectionManager.deleteSession(M,B)}),W)v.setTimeout(W,()=>{v.close();const q=new Error(`Stream timed out because of no activity for ${W} ms`);q.name="TimeoutError",V(q)});if(G){const q=j(()=>{v.close();const g=new Error("Request aborted");g.name="AbortError",V(g)},"onAbort");if(typeof G.addEventListener==="function"){const g=G;g.addEventListener("abort",q,{once:!0}),v.once("close",()=>g.removeEventListener("abort",q))}else G.onabort=q}v.on("frameError",(q,g,TX)=>{V(new Error(`Frame type id ${q} in stream id ${TX} has failed with code ${g}.`))}),v.on("error",V),v.on("aborted",()=>{V(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${v.rstCode}.`))}),v.on("close",()=>{if(B.unref(),w)B.destroy();if(!R)V(new Error("Unexpected error: http2 request did not get a response"))}),F=XU(v,U,W)})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}destroySession(U){if(!U.destroyed)U.destroy()}};j(p8,"NodeHttp2Handler");var Lf=p8,l8=class $ extends u8.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,G,W){this.bufferedBytes.push(U),W()}};j(l8,"Collector");var Ef=l8,Xf=j(($)=>{if(Rf($))return n8($);return new Promise((U,G)=>{const W=new Ef;$.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"),Rf=j(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");j(n8,"collectReadableStream")});var G4=T((I3,U4)=>{function o8($=0){return new Promise((U,G)=>{if($)setTimeout(()=>{const W=new Error(`Request did not complete within ${$} ms`);W.name="TimeoutError",G(W)},$)})}async function a8($){const U=await $4($),G=Tf.fromBase64(U);return new Uint8Array(G)}async function e8($){const U=[],G=$.getReader();let W=!1,w=0;while(!W){const{done:X,value:R}=await G.read();if(R)U.push(R),w+=R.length;W=X}const L=new Uint8Array(w);let E=0;for(let X of U)L.set(X,E),E+=X.length;return L}function $4($){return new Promise((U,G)=>{const W=new FileReader;W.onloadend=()=>{if(W.readyState!==2)return G(new Error("Reader aborted too early"));const w=W.result??"",L=w.indexOf(","),E=L>-1?L+1:w.length;U(w.substring(E))},W.onabort=()=>G(new Error("Read aborted")),W.onerror=()=>G(W.error),W.readAsDataURL($)})}var{defineProperty:g1,getOwnPropertyDescriptor:Ff,getOwnPropertyNames:If}=Object,Zf=Object.prototype.hasOwnProperty,a=($,U)=>g1($,"name",{value:U,configurable:!0}),ff=($,U)=>{for(var G in U)g1($,G,{get:U[G],enumerable:!0})},Yf=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of If(U))if(!Zf.call($,w)&&w!==G)g1($,w,{get:()=>U[w],enumerable:!(W=Ff(U,w))||W.enumerable})}return $},Qf=($)=>Yf(g1({},"__esModule",{value:!0}),$),r8={};ff(r8,{FetchHttpHandler:()=>Jf,keepAliveSupport:()=>d1,streamCollector:()=>Kf});U4.exports=Qf(r8);var i8=o(),zf=WU();a(o8,"requestTimeout");var d1={supported:void 0},t8=class ${static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}constructor(U){if(typeof U==="function")this.configProvider=U().then((G)=>G||{});else this.config=U??{},this.configProvider=Promise.resolve(this.config);if(d1.supported===void 0)d1.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;const W=this.config.requestTimeout,w=this.config.keepAlive===!0,L=this.config.credentials;if(G==null?void 0:G.aborted){const z=new Error("Request aborted");return z.name="AbortError",Promise.reject(z)}let E=U.path;const X=zf.buildQueryString(U.query||{});if(X)E+=`?${X}`;if(U.fragment)E+=`#${U.fragment}`;let R="";if(U.username!=null||U.password!=null){const z=U.username??"",M=U.password??"";R=`${z}:${M}@`}const{port:F,method:I}=U,Z=`${U.protocol}//${R}${U.hostname}${F?`:${F}`:""}${E}`,Y=I==="GET"||I==="HEAD"?void 0:U.body,f={body:Y,headers:new Headers(U.headers),method:I,credentials:L};if(Y)f.duplex="half";if(typeof AbortController!=="undefined")f.signal=G;if(d1.supported)f.keepalive=w;let Q=a(()=>{},"removeSignalEventListener");const O=new Request(Z,f),K=[fetch(O).then((z)=>{const M=z.headers,A={};for(let V of M.entries())A[V[0]]=V[1];if(z.body==null)return z.blob().then((V)=>({response:new i8.HttpResponse({headers:A,reason:z.statusText,statusCode:z.status,body:V})}));return{response:new i8.HttpResponse({headers:A,reason:z.statusText,statusCode:z.status,body:z.body})}}),o8(W)];if(G)K.push(new Promise((z,M)=>{const A=a(()=>{const B=new Error("Request aborted");B.name="AbortError",M(B)},"onAbort");if(typeof G.addEventListener==="function"){const B=G;B.addEventListener("abort",A,{once:!0}),Q=a(()=>B.removeEventListener("abort",A),"removeSignalEventListener")}else G.onabort=A}));return Promise.race(K).finally(Q)}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return W[U]=G,W})}httpHandlerConfigs(){return this.config??{}}};a(t8,"FetchHttpHandler");var Jf=t8,Tf=u1(),Kf=a(($)=>{if(typeof Blob==="function"&&$ instanceof Blob)return a8($);return e8($)},"streamCollector");a(a8,"collectBlob");a(e8,"collectStream");a($4,"readToBase64")});var s0=T((w4)=>{Object.defineProperty(w4,"__esModule",{value:!0});w4.isReadableStream=void 0;var Mf=($)=>{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)};w4.isReadableStream=Mf});var Z4=T((F4)=>{Object.defineProperty(F4,"__esModule",{value:!0});F4.sdkStreamMixin=void 0;var Of=G4(),Af=u1(),Bf=R4(),Vf=W0(),L4=s0(),E4="The stream has already been transformed.",Hf=($)=>{var U,G;if(!X4($)&&!L4.isReadableStream($)){const E=((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 ${E}`)}let W=!1;const w=async()=>{if(W)throw new Error(E4);return W=!0,await Of.streamCollector($)},L=(E)=>{if(typeof E.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 E.stream()};return Object.assign($,{transformToByteArray:w,transformToString:async(E)=>{const X=await w();if(E==="base64")return Af.toBase64(X);else if(E==="hex")return Bf.toHex(X);else if(E===void 0||E==="utf8"||E==="utf-8")return Vf.toUtf8(X);else if(typeof TextDecoder==="function")return new TextDecoder(E).decode(X);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(W)throw new Error(E4);if(W=!0,X4($))return L($);else if(L4.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};F4.sdkStreamMixin=Hf;var X4=($)=>typeof Blob==="function"&&$ instanceof Blob});var z4=T((Y4)=>{Object.defineProperty(Y4,"__esModule",{value:!0});Y4.sdkStreamMixin=void 0;var Cf=m8(),Nf=l0(),RU=import.meta.require("stream"),qf=import.meta.require("util"),jf=Z4(),f4="The stream has already been transformed.",Pf=($)=>{var U,G;if(!($ instanceof RU.Readable))try{return jf.sdkStreamMixin($)}catch(L){const E=((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 ${E}`)}let W=!1;const w=async()=>{if(W)throw new Error(f4);return W=!0,await Cf.streamCollector($)};return Object.assign($,{transformToByteArray:w,transformToString:async(L)=>{const E=await w();if(L===void 0||Buffer.isEncoding(L))return Nf.fromArrayBuffer(E.buffer,E.byteOffset,E.byteLength).toString(L);else return new qf.TextDecoder(L).decode(E)},transformToWebStream:()=>{if(W)throw new Error(f4);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof RU.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,RU.Readable.toWeb($)}})};Y4.sdkStreamMixin=Pf});var K4=T((J4)=>{async function Sf($){if(typeof $.stream==="function")$=$.stream();return $.tee()}Object.defineProperty(J4,"__esModule",{value:!0});J4.splitStream=void 0;J4.splitStream=Sf});var B4=T((O4)=>{async function Df($){if(hf.isReadableStream($))return bf.splitStream($);const U=new M4.PassThrough,G=new M4.PassThrough;return $.pipe(U),$.pipe(G),[U,G]}Object.defineProperty(O4,"__esModule",{value:!0});O4.splitStream=void 0;var M4=import.meta.require("stream"),bf=K4(),hf=s0();O4.splitStream=Df});var C4=T((V4)=>{async function kf($,U){var G;let W=0;const w=[],L=$.getReader();let E=!1;while(!E){const{done:F,value:I}=await L.read();if(I)w.push(I),W+=(G=I===null||I===void 0?void 0:I.byteLength)!==null&&G!==void 0?G:0;if(W>=U)break;E=F}L.releaseLock();const X=new Uint8Array(Math.min(U,W));let R=0;for(let F of w){if(F.byteLength>X.byteLength-R){X.set(F.subarray(0,X.byteLength-R),R);break}else X.set(F,R);R+=F.length}return X}Object.defineProperty(V4,"__esModule",{value:!0});V4.headStream=void 0;V4.headStream=kf});var P4=T((q4)=>{Object.defineProperty(q4,"__esModule",{value:!0});q4.headStream=void 0;var cf=import.meta.require("stream"),vf=C4(),xf=s0(),uf=($,U)=>{if(xf.isReadableStream($))return vf.headStream($,U);return new Promise((G,W)=>{const w=new N4;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)})})};q4.headStream=uf;class N4 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 c4=T((K3,Q0)=>{function h4($,U="utf-8"){if(U==="base64")return S4.toBase64($);return b4.toUtf8($)}function D4($,U){if(U==="base64")return IU.mutate(S4.fromBase64($));return IU.mutate(b4.fromUtf8($))}var{defineProperty:p1,getOwnPropertyDescriptor:yf,getOwnPropertyNames:_f}=Object,df=Object.prototype.hasOwnProperty,ZU=($,U)=>p1($,"name",{value:U,configurable:!0}),gf=($,U)=>{for(var G in U)p1($,G,{get:U[G],enumerable:!0})},FU=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of _f(U))if(!df.call($,w)&&w!==G)p1($,w,{get:()=>U[w],enumerable:!(W=yf(U,w))||W.enumerable})}return $},m0=($,U,G)=>(FU($,U,"default"),G&&FU(G,U,"default")),pf=($)=>FU(p1({},"__esModule",{value:!0}),$),Y0={};gf(Y0,{Uint8ArrayBlobAdapter:()=>IU});Q0.exports=pf(Y0);var S4=u1(),b4=W0();ZU(h4,"transformToString");ZU(D4,"transformFromString");var k4=class $ extends Uint8Array{static fromString(U,G="utf-8"){switch(typeof U){case"string":return D4(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 h4(this,U)}};ZU(k4,"Uint8ArrayBlobAdapter");var IU=k4;m0(Y0,H8(),Q0.exports);m0(Y0,z4(),Q0.exports);m0(Y0,B4(),Q0.exports);m0(Y0,P4(),Q0.exports);m0(Y0,s0(),Q0.exports)});var j0=T((M3,W6)=>{function r4($){const U=$.getUTCFullYear(),G=$.getUTCMonth(),W=$.getUTCDay(),w=$.getUTCDate(),L=$.getUTCHours(),E=$.getUTCMinutes(),X=$.getUTCSeconds(),R=w<10?`0${w}`:`${w}`,F=L<10?`0${L}`:`${L}`,I=E<10?`0${E}`:`${E}`,Z=X<10?`0${X}`:`${X}`;return`${KY[W]}, ${R} ${BU[G]} ${U} ${F}:${I}:${Z} GMT`}function s1($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})}function VU($,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,tY(W,w,L);else L=U;for(let E of Object.keys(L)){if(!Array.isArray(L[E])){W[E]=L[E];continue}G6(W,null,L,E)}return W}function w6($,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 E=0;E<W.length;E++){if(L==="")L=W[E];else L+=U+W[E];if((E+1)%G===0)w.push(L),L=""}if(L!=="")w.push(L);return w}var{defineProperty:m1,getOwnPropertyDescriptor:lf,getOwnPropertyNames:nf}=Object,sf=Object.prototype.hasOwnProperty,J=($,U)=>m1($,"name",{value:U,configurable:!0}),mf=($,U)=>{for(var G in U)m1($,G,{get:U[G],enumerable:!0})},rf=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of nf(U))if(!sf.call($,w)&&w!==G)m1($,w,{get:()=>U[w],enumerable:!(W=lf(U,w))||W.enumerable})}return $},of=($)=>rf(m1({},"__esModule",{value:!0}),$),x4={};mf(x4,{Client:()=>af,Command:()=>g4,LazyJsonString:()=>iY,NoOpLogger:()=>tf,SENSITIVE_STRING:()=>UY,ServiceException:()=>vY,StringWrapper:()=>a0,_json:()=>KU,collectBody:()=>ef,convertMap:()=>rY,createAggregatedClient:()=>GY,dateToUtcString:()=>r4,decorateServiceException:()=>t4,emitWarningIfUnsupportedVersion:()=>_Y,expectBoolean:()=>WY,expectByte:()=>TU,expectFloat32:()=>l1,expectInt:()=>EY,expectInt32:()=>zU,expectLong:()=>o0,expectNonNull:()=>RY,expectNumber:()=>r0,expectObject:()=>l4,expectShort:()=>JU,expectString:()=>FY,expectUnion:()=>IY,extendedEncodeURIComponent:()=>s1,getArrayIfSingleItem:()=>mY,getDefaultClientConfiguration:()=>nY,getDefaultExtensionConfiguration:()=>e4,getValueFromTextNode:()=>$6,handleFloat:()=>YY,limitedParseDouble:()=>AU,limitedParseFloat:()=>QY,limitedParseFloat32:()=>zY,loadConfigsForDefaultMode:()=>yY,logger:()=>t0,map:()=>VU,parseBoolean:()=>wY,parseEpochTimestamp:()=>qY,parseRfc3339DateTime:()=>OY,parseRfc3339DateTimeWithOffset:()=>BY,parseRfc7231DateTime:()=>NY,resolveDefaultRuntimeConfig:()=>sY,resolvedPath:()=>$5,serializeDateTime:()=>G5,serializeFloat:()=>U5,splitEvery:()=>w6,strictParseByte:()=>i4,strictParseDouble:()=>OU,strictParseFloat:()=>ZY,strictParseFloat32:()=>n4,strictParseInt:()=>JY,strictParseInt32:()=>TY,strictParseLong:()=>m4,strictParseShort:()=>C0,take:()=>oY,throwDefaultError:()=>a4,withBaseException:()=>xY});W6.exports=of(x4);var u4=class ${trace(){}debug(){}info(){}warn(){}error(){}};J(u4,"NoOpLogger");var tf=u4,y4=W8(),_4=class ${constructor(U){this.middlewareStack=y4.constructStack(),this.config=U}send(U,G,W){const w=typeof G!=="function"?G:void 0,L=typeof G==="function"?G:W,E=U.resolveMiddleware(this.middlewareStack,this.config,w);if(L)E(U).then((X)=>L(null,X.output),(X)=>L(X)).catch(()=>{});else return E(U).then((X)=>X.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};J(_4,"Client");var af=_4,fU=c4(),ef=J(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return fU.Uint8ArrayBlobAdapter.mutate($);if(!$)return fU.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const G=U.streamCollector($);return fU.Uint8ArrayBlobAdapter.mutate(await G)},"collectBody"),QU=F0(),d4=class ${constructor(){this.middlewareStack=y4.constructStack()}static classBuilder(){return new $Y}resolveMiddlewareWithContext(U,G,W,{middlewareFn:w,clientName:L,commandName:E,inputFilterSensitiveLog:X,outputFilterSensitiveLog:R,smithyContext:F,additionalContext:I,CommandCtor:Z}){for(let K of w.bind(this)(Z,U,G,W))this.middlewareStack.use(K);const Y=U.concat(this.middlewareStack),{logger:f}=G,Q={logger:f,clientName:L,commandName:E,inputFilterSensitiveLog:X,outputFilterSensitiveLog:R,[QU.SMITHY_CONTEXT_KEY]:{commandInstance:this,...F},...I},{requestHandler:O}=G;return Y.resolve((K)=>O.handle(K.request,W||{}),Q)}};J(d4,"Command");var g4=d4,p4=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 g4{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,E){return this.resolveMiddlewareWithContext(w,L,E,{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(p4,"ClassBuilder");var $Y=p4,UY="***SensitiveInformation***",GY=J(($,U)=>{for(let G of Object.keys($)){const W=$[G],w=J(async function(E,X,R){const F=new W(E);if(typeof X==="function")this.send(F,X);else if(typeof R==="function"){if(typeof X!=="object")throw new Error(`Expected http options but got ${typeof X}`);this.send(F,X||{},R)}else return this.send(F,X)},"methodImpl"),L=(G[0].toLowerCase()+G.slice(1)).replace(/Command$/,"");U.prototype[L]=w}},"createAggregatedClient"),wY=J(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),WY=J(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)t0.warn(n1(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const U=$.toLowerCase();if(U==="false"||U==="true")t0.warn(n1(`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"),r0=J(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))t0.warn(n1(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),LY=Math.ceil(340282346638528860000000000000000000000),l1=J(($)=>{const U=r0($);if(U!==void 0&&!Number.isNaN(U)&&U!==1/0&&U!==-1/0){if(Math.abs(U)>LY)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),o0=J(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),EY=o0,zU=J(($)=>MU($,32),"expectInt32"),JU=J(($)=>MU($,16),"expectShort"),TU=J(($)=>MU($,8),"expectByte"),MU=J(($,U)=>{const G=o0($);if(G!==void 0&&XY(G,U)!==G)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return G},"expectSizedInt"),XY=J(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),RY=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"),l4=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"),FY=J(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return t0.warn(n1(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),IY=J(($)=>{if($===null||$===void 0)return;const U=l4($),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"),OU=J(($)=>{if(typeof $=="string")return r0(q0($));return r0($)},"strictParseDouble"),ZY=OU,n4=J(($)=>{if(typeof $=="string")return l1(q0($));return l1($)},"strictParseFloat32"),fY=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,q0=J(($)=>{const U=$.match(fY);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),AU=J(($)=>{if(typeof $=="string")return s4($);return r0($)},"limitedParseDouble"),YY=AU,QY=AU,zY=J(($)=>{if(typeof $=="string")return s4($);return l1($)},"limitedParseFloat32"),s4=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"),m4=J(($)=>{if(typeof $==="string")return o0(q0($));return o0($)},"strictParseLong"),JY=m4,TY=J(($)=>{if(typeof $==="string")return zU(q0($));return zU($)},"strictParseInt32"),C0=J(($)=>{if(typeof $==="string")return JU(q0($));return JU($)},"strictParseShort"),i4=J(($)=>{if(typeof $==="string")return TU(q0($));return TU($)},"strictParseByte"),n1=J(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),t0={warn:console.warn},KY=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],BU=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];J(r4,"dateToUtcString");var MY=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),OY=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=MY.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,w,L,E,X,R,F]=U,I=C0(N0(W)),Z=s(w,"month",1,12),Y=s(L,"day",1,31);return i0(I,Z,Y,{hours:E,minutes:X,seconds:R,fractionalMilliseconds:F})},"parseRfc3339DateTime"),AY=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),BY=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=AY.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,w,L,E,X,R,F,I]=U,Z=C0(N0(W)),Y=s(w,"month",1,12),f=s(L,"day",1,31),Q=i0(Z,Y,f,{hours:E,minutes:X,seconds:R,fractionalMilliseconds:F});if(I.toUpperCase()!="Z")Q.setTime(Q.getTime()-cY(I));return Q},"parseRfc3339DateTimeWithOffset"),VY=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$/),HY=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$/),CY=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})$/),NY=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=VY.exec($);if(U){const[G,W,w,L,E,X,R,F]=U;return i0(C0(N0(L)),YU(w),s(W,"day",1,31),{hours:E,minutes:X,seconds:R,fractionalMilliseconds:F})}if(U=HY.exec($),U){const[G,W,w,L,E,X,R,F]=U;return SY(i0(jY(L),YU(w),s(W,"day",1,31),{hours:E,minutes:X,seconds:R,fractionalMilliseconds:F}))}if(U=CY.exec($),U){const[G,W,w,L,E,X,R,F]=U;return i0(C0(N0(F)),YU(W),s(w.trimLeft(),"day",1,31),{hours:L,minutes:E,seconds:X,fractionalMilliseconds:R})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),qY=J(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=OU($);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"),i0=J(($,U,G,W)=>{const w=U-1;return hY($,w,G),new Date(Date.UTC($,w,G,s(W.hours,"hour",0,23),s(W.minutes,"minute",0,59),s(W.seconds,"seconds",0,60),kY(W.fractionalMilliseconds)))},"buildDate"),jY=J(($)=>{const U=new Date().getUTCFullYear(),G=Math.floor(U/100)*100+C0(N0($));if(G<U)return G+100;return G},"parseTwoDigitYear"),PY=1576800000000,SY=J(($)=>{if($.getTime()-new Date().getTime()>PY)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),YU=J(($)=>{const U=BU.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),bY=[31,28,31,30,31,30,31,31,30,31,30,31],hY=J(($,U,G)=>{let W=bY[U];if(U===1&&DY($))W=29;if(G>W)throw new TypeError(`Invalid day for ${BU[U]} in ${$}: ${G}`)},"validateDayOfMonth"),DY=J(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),s=J(($,U,G,W)=>{const w=i4(N0($));if(w<G||w>W)throw new TypeError(`${U} must be between ${G} and ${W}, inclusive`);return w},"parseDateValue"),kY=J(($)=>{if($===null||$===void 0)return 0;return n4("0."+$)*1000},"parseMilliseconds"),cY=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"),N0=J(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),o4=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(o4,"ServiceException");var vY=o4,t4=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"),a4=J(({output:$,parsedBody:U,exceptionCtor:G,errorCode:W})=>{const w=uY($),L=w.httpStatusCode?w.httpStatusCode+"":void 0,E=new G({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||W||L||"UnknownError",$fault:"client",$metadata:w});throw t4(E,U)},"throwDefaultError"),xY=J(($)=>{return({output:U,parsedBody:G,errorCode:W})=>{a4({output:U,parsedBody:G,exceptionCtor:$,errorCode:W})}},"withBaseException"),uY=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"),yY=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"),v4=!1,_Y=J(($)=>{if($&&!v4&&parseInt($.substring(1,$.indexOf(".")))<16)v4=!0},"emitWarningIfUnsupportedVersion"),dY=J(($)=>{const U=[];for(let G in QU.AlgorithmId){const W=QU.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"),gY=J(($)=>{const U={};return $.checksumAlgorithms().forEach((G)=>{U[G.algorithmId()]=G.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),pY=J(($)=>{let U=$.retryStrategy;return{setRetryStrategy(G){U=G},retryStrategy(){return U}}},"getRetryConfiguration"),lY=J(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),e4=J(($)=>{return{...dY($),...pY($)}},"getDefaultExtensionConfiguration"),nY=e4,sY=J(($)=>{return{...gY($),...lY($)}},"resolveDefaultRuntimeConfig");J(s1,"extendedEncodeURIComponent");var mY=J(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),$6=J(($)=>{for(let G in $)if($.hasOwnProperty(G)&&$[G]["#text"]!==void 0)$[G]=$[G]["#text"];else if(typeof $[G]==="object"&&$[G]!==null)$[G]=$6($[G]);return $},"getValueFromTextNode"),a0=J(function(){const $=Object.getPrototypeOf(this).constructor,G=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(G,$.prototype),G},"StringWrapper");a0.prototype=Object.create(String.prototype,{constructor:{value:a0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(a0,String);var U6=class $ extends a0{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(U6,"LazyJsonString");var iY=U6;J(VU,"map");var rY=J(($)=>{const U={};for(let[G,W]of Object.entries($||{}))U[G]=[,W];return U},"convertMap"),oY=J(($,U)=>{const G={};for(let W in U)G6(G,$,U,W);return G},"take"),tY=J(($,U,G)=>{return VU($,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"),G6=J(($,U,G,W)=>{if(U!==null){let E=G[W];if(typeof E==="function")E=[,E];const[X=aY,R=eY,F=W]=E;if(typeof X==="function"&&X(U[F])||typeof X!=="function"&&!!X)$[W]=R(U[F]);return}let[w,L]=G[W];if(typeof L==="function"){let E;const X=w===void 0&&(E=L())!=null,R=typeof w==="function"&&!!w(void 0)||typeof w!=="function"&&!!w;if(X)$[W]=E;else if(R)$[W]=L()}else{const E=w===void 0&&L!=null,X=typeof w==="function"&&!!w(L)||typeof w!=="function"&&!!w;if(E||X)$[W]=L}},"applyInstruction"),aY=J(($)=>$!=null,"nonNullish"),eY=J(($)=>$,"pass"),$5=J(($,U,G,W,w,L)=>{if(U!=null&&U[G]!==void 0){const E=W();if(E.length<=0)throw new Error("Empty value provided for input HTTP label: "+G+".");$=$.replace(w,L?E.split("/").map((X)=>s1(X)).join("/"):s1(E))}else throw new Error("No value provided for input HTTP label: "+G+".");return $},"resolvedPath"),U5=J(($)=>{if($!==$)return"NaN";switch($){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return $}},"serializeFloat"),G5=J(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),KU=J(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(KU);if(typeof $==="object"){const U={};for(let G of Object.keys($)){if($[G]==null)continue;U[G]=KU($[G])}return U}return $},"_json");J(w6,"splitEvery")});var X6=T((L6)=>{Object.defineProperty(L6,"__esModule",{value:!0});L6.isStreamingPayload=void 0;var w5=import.meta.require("stream"),W5=($)=>($===null||$===void 0?void 0:$.body)instanceof w5.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;L6.isStreamingPayload=W5});var C6=T((B3,H6)=>{var{defineProperty:i1,getOwnPropertyDescriptor:L5,getOwnPropertyNames:E5}=Object,X5=Object.prototype.hasOwnProperty,S=($,U)=>i1($,"name",{value:U,configurable:!0}),R5=($,U)=>{for(var G in U)i1($,G,{get:U[G],enumerable:!0})},F5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of E5(U))if(!X5.call($,w)&&w!==G)i1($,w,{get:()=>U[w],enumerable:!(W=L5(U,w))||W.enumerable})}return $},I5=($)=>F5(i1({},"__esModule",{value:!0}),$),F6={};R5(F6,{AdaptiveRetryStrategy:()=>Y5,CONFIG_MAX_ATTEMPTS:()=>CU,CONFIG_RETRY_MODE:()=>K6,ENV_MAX_ATTEMPTS:()=>HU,ENV_RETRY_MODE:()=>T6,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>Q5,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>J5,StandardRetryStrategy:()=>z6,defaultDelayDecider:()=>Z6,defaultRetryDecider:()=>f6,getOmitRetryHeadersPlugin:()=>T5,getRetryAfterHint:()=>V6,getRetryPlugin:()=>V5,omitRetryHeadersMiddleware:()=>M6,omitRetryHeadersMiddlewareOptions:()=>O6,resolveRetryConfig:()=>z5,retryMiddleware:()=>A6,retryMiddlewareOptions:()=>B6});H6.exports=I5(F6);var P0=o(),I6=p$(),N=eW(),Z5=S(($,U)=>{const G=$,W=(U==null?void 0:U.noRetryIncrement)??N.NO_RETRY_INCREMENT,w=(U==null?void 0:U.retryCost)??N.RETRY_COST,L=(U==null?void 0:U.timeoutRetryCost)??N.TIMEOUT_RETRY_COST;let E=$;const X=S((Z)=>Z.name==="TimeoutError"?L:w,"getCapacityAmount"),R=S((Z)=>X(Z)<=E,"hasRetryTokens");return Object.freeze({hasRetryTokens:R,retrieveRetryTokens:S((Z)=>{if(!R(Z))throw new Error("No retry token available");const Y=X(Z);return E-=Y,Y},"retrieveRetryTokens"),releaseRetryTokens:S((Z)=>{E+=Z??W,E=Math.min(E,G)},"releaseRetryTokens")})},"getDefaultRetryQuota"),Z6=S(($,U)=>Math.floor(Math.min(N.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),L0=l$(),f6=S(($)=>{if(!$)return!1;return L0.isRetryableByTrait($)||L0.isClockSkewError($)||L0.isThrottlingError($)||L0.isTransientError($)},"defaultRetryDecider"),Y6=S(($)=>{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"),Q6=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode=N.RETRY_MODES.STANDARD,this.retryDecider=(G==null?void 0:G.retryDecider)??f6,this.delayDecider=(G==null?void 0:G.delayDecider)??Z6,this.retryQuota=(G==null?void 0:G.retryQuota)??Z5(N.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=N.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,G,W){let w,L=0,E=0;const X=await this.getMaxAttempts(),{request:R}=G;if(P0.HttpRequest.isInstance(R))R.headers[N.INVOCATION_ID_HEADER]=I6.v4();while(!0)try{if(P0.HttpRequest.isInstance(R))R.headers[N.REQUEST_HEADER]=`attempt=${L+1}; max=${X}`;if(W==null?void 0:W.beforeRequest)await W.beforeRequest();const{response:F,output:I}=await U(G);if(W==null?void 0:W.afterRequest)W.afterRequest(F);return this.retryQuota.releaseRetryTokens(w),I.$metadata.attempts=L+1,I.$metadata.totalRetryDelay=E,{response:F,output:I}}catch(F){const I=Y6(F);if(L++,this.shouldRetry(I,L,X)){w=this.retryQuota.retrieveRetryTokens(I);const Z=this.delayDecider(L0.isThrottlingError(I)?N.THROTTLING_RETRY_DELAY_BASE:N.DEFAULT_RETRY_DELAY_BASE,L),Y=f5(I.$response),f=Math.max(Y||0,Z);E+=f,await new Promise((Q)=>setTimeout(Q,f));continue}if(!I.$metadata)I.$metadata={};throw I.$metadata.attempts=L,I.$metadata.totalRetryDelay=E,I}}};S(Q6,"StandardRetryStrategy");var z6=Q6,f5=S(($)=>{if(!P0.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"),J6=class $ extends z6{constructor(U,G){const{rateLimiter:W,...w}=G??{};super(U,w);this.rateLimiter=W??new N.DefaultRateLimiter,this.mode=N.RETRY_MODES.ADAPTIVE}async retry(U,G){return super.retry(U,G,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(W)=>{this.rateLimiter.updateClientSendingRate(W)}})}};S(J6,"AdaptiveRetryStrategy");var Y5=J6,R6=x0(),HU="AWS_MAX_ATTEMPTS",CU="max_attempts",Q5={environmentVariableSelector:($)=>{const U=$[HU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${HU} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[CU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${CU} mast be a number, got "${U}"`);return G},default:N.DEFAULT_MAX_ATTEMPTS},z5=S(($)=>{const{retryStrategy:U}=$,G=R6.normalizeProvider($.maxAttempts??N.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await R6.normalizeProvider($.retryMode)()===N.RETRY_MODES.ADAPTIVE)return new N.AdaptiveRetryStrategy(G);return new N.StandardRetryStrategy(G)}}},"resolveRetryConfig"),T6="AWS_RETRY_MODE",K6="retry_mode",J5={environmentVariableSelector:($)=>$[T6],configFileSelector:($)=>$[K6],default:N.DEFAULT_RETRY_MODE},M6=S(()=>($)=>async(U)=>{const{request:G}=U;if(P0.HttpRequest.isInstance(G))delete G.headers[N.INVOCATION_ID_HEADER],delete G.headers[N.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),O6={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},T5=S(($)=>({applyToStack:(U)=>{U.addRelativeTo(M6(),O6)}}),"getOmitRetryHeadersPlugin"),K5=j0(),M5=X6(),A6=S(($)=>(U,G)=>async(W)=>{var w;let L=await $.retryStrategy();const E=await $.maxAttempts();if(O5(L)){L=L;let X=await L.acquireInitialRetryToken(G.partition_id),R=new Error,F=0,I=0;const{request:Z}=W,Y=P0.HttpRequest.isInstance(Z);if(Y)Z.headers[N.INVOCATION_ID_HEADER]=I6.v4();while(!0)try{if(Y)Z.headers[N.REQUEST_HEADER]=`attempt=${F+1}; max=${E}`;const{response:f,output:Q}=await U(W);return L.recordSuccess(X),Q.$metadata.attempts=F+1,Q.$metadata.totalRetryDelay=I,{response:f,output:Q}}catch(f){const Q=A5(f);if(R=Y6(f),Y&&M5.isStreamingPayload(Z))throw(w=G.logger instanceof K5.NoOpLogger?console:G.logger)==null||w.warn("An error was encountered in a non-retryable streaming request."),R;try{X=await L.refreshRetryTokenForRetry(X,Q)}catch(K){if(!R.$metadata)R.$metadata={};throw R.$metadata.attempts=F+1,R.$metadata.totalRetryDelay=I,R}F=X.getRetryCount();const O=X.getRetryDelay();I+=O,await new Promise((K)=>setTimeout(K,O))}}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=S(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),A5=S(($)=>{const U={error:$,errorType:B5($)},G=V6($.$response);if(G)U.retryAfterHint=G;return U},"getRetryErrorInfo"),B5=S(($)=>{if(L0.isThrottlingError($))return"THROTTLING";if(L0.isTransientError($))return"TRANSIENT";if(L0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),B6={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},V5=S(($)=>({applyToStack:(U)=>{U.add(A6($),B6)}}),"getRetryPlugin"),V6=S(($)=>{if(!P0.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 qU=T((V3,l6)=>{function j6($){const U=new Map;for(let G of $)U.set(G.schemeId,G);return U}function _6($,U){return new g6($,U)}function p6($,U,G,W,w){return C(async function*L(E,X,...R){let F=E.startingToken||void 0,I=!0,Z;while(I){if(X[G]=F,w)X[w]=X[w]??E.pageSize;if(E.client instanceof $)Z=await m5(U,E.client,X,...R);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield Z;const Y=F;F=i5(Z,W),I=!!(F&&(!E.stopOnSameToken||F!==Y))}return},"paginateOperation")}var{defineProperty:o1,getOwnPropertyDescriptor:H5,getOwnPropertyNames:C5}=Object,N5=Object.prototype.hasOwnProperty,C=($,U)=>o1($,"name",{value:U,configurable:!0}),q5=($,U)=>{for(var G in U)o1($,G,{get:U[G],enumerable:!0})},j5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of C5(U))if(!N5.call($,w)&&w!==G)o1($,w,{get:()=>U[w],enumerable:!(W=H5(U,w))||W.enumerable})}return $},P5=($)=>j5(o1({},"__esModule",{value:!0}),$),N6={};q5(N6,{DefaultIdentityProviderConfig:()=>u5,EXPIRATION_MS:()=>u6,HttpApiKeyAuthSigner:()=>y5,HttpBearerAuthSigner:()=>_5,NoAuthSigner:()=>d5,RequestBuilder:()=>g6,createIsIdentityExpiredFunction:()=>x6,createPaginator:()=>p6,doesIdentityRequireRefresh:()=>y6,getHttpAuthSchemeEndpointRuleSetPlugin:()=>b5,getHttpAuthSchemePlugin:()=>D5,getHttpSigningPlugin:()=>x5,getSmithyContext:()=>l5,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>P6,httpAuthSchemeMiddleware:()=>NU,httpAuthSchemeMiddlewareOptions:()=>S6,httpSigningMiddleware:()=>b6,httpSigningMiddlewareOptions:()=>h6,isIdentityExpired:()=>g5,memoizeIdentityProvider:()=>p5,normalizeProvider:()=>n5,requestBuilder:()=>_6});l6.exports=P5(N6);var q6=x0();C(j6,"convertHttpAuthSchemesToMap");var NU=C(($,U)=>(G,W)=>async(w)=>{var L;const E=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,W,w.input)),X=j6($.httpAuthSchemes),R=q6.getSmithyContext(W),F=[];for(let I of E){const Z=X.get(I.schemeId);if(!Z){F.push(`HttpAuthScheme \`${I.schemeId}\` was not enabled for this service.`);continue}const Y=Z.identityProvider(await U.identityProviderConfigProvider($));if(!Y){F.push(`HttpAuthScheme \`${I.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:f={},signingProperties:Q={}}=((L=I.propertiesExtractor)==null?void 0:L.call(I,$,W))||{};I.identityProperties=Object.assign(I.identityProperties||{},f),I.signingProperties=Object.assign(I.signingProperties||{},Q),R.selectedHttpAuthScheme={httpAuthOption:I,identity:await Y(I.identityProperties),signer:Z.signer};break}if(!R.selectedHttpAuthScheme)throw new Error(F.join("\n"));return G(w)},"httpAuthSchemeMiddleware"),S5=Dw(),P6={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:S5.endpointMiddlewareOptions.name},b5=C(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(NU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),P6)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),h5=J1(),S6={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:h5.serializerMiddlewareOption.name},D5=C(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(NU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),S6)}}),"getHttpAuthSchemePlugin"),t1=o(),k5=C(($)=>(U)=>{throw U},"defaultErrorHandler"),c5=C(($,U)=>{},"defaultSuccessHandler"),b6=C(($)=>(U,G)=>async(W)=>{if(!t1.HttpRequest.isInstance(W.request))return U(W);const L=q6.getSmithyContext(G).selectedHttpAuthScheme;if(!L)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:E={}},identity:X,signer:R}=L,F=await U({...W,request:await R.sign(W.request,X,E)}).catch((R.errorHandler||k5)(E));return(R.successHandler||c5)(F.response,E),F},"httpSigningMiddleware"),v5=C6(),h6={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:v5.retryMiddlewareOptions.name},x5=C(($)=>({applyToStack:(U)=>{U.addRelativeTo(b6($),h6)}}),"getHttpSigningPlugin"),D6=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)}};C(D6,"DefaultIdentityProviderConfig");var u5=D6,r1=F0(),k6=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=t1.HttpRequest.clone(U);if(W.in===r1.HttpApiKeyAuthLocation.QUERY)w.query[W.name]=G.apiKey;else if(W.in===r1.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}};C(k6,"HttpApiKeyAuthSigner");var y5=k6,c6=class ${async sign(U,G,W){const w=t1.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}};C(c6,"HttpBearerAuthSigner");var _5=c6,v6=class ${async sign(U,G,W){return U}};C(v6,"NoAuthSigner");var d5=v6,x6=C(($)=>(U)=>y6(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),u6=300000,g5=x6(u6),y6=C(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),p5=C(($,U,G)=>{if($===void 0)return;const W=typeof $!=="function"?async()=>Promise.resolve($):$;let w,L,E,X=!1;const R=C(async(F)=>{if(!L)L=W(F);try{w=await L,E=!0,X=!1}finally{L=void 0}return w},"coalesceProvider");if(U===void 0)return async(F)=>{if(!E||(F==null?void 0:F.forceRefresh))w=await R(F);return w};return async(F)=>{if(!E||(F==null?void 0:F.forceRefresh))w=await R(F);if(X)return w;if(!G(w))return X=!0,w;if(U(w))return await R(F),w;return w}},"memoizeIdentityProvider"),l5=C(($)=>$[r1.SMITHY_CONTEXT_KEY]||($[r1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),n5=C(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),s5=j0();C(_6,"requestBuilder");var d6=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 t1.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=s5.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}};C(d6,"RequestBuilder");var g6=d6,m5=C(async($,U,G,...W)=>{return await U.send(new $(G),...W)},"makePagedClientRequest");C(p6,"createPaginator");var i5=C(($,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 _L=T((mA,E$)=>{var YL,QL,zL,JL,TL,KL,ML,OL,AL,BL,VL,HL,CL,W$,uU,NL,qL,jL,h0,PL,SL,bL,hL,DL,kL,cL,vL,xL,L$,uL,yL;(function($){var U=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(W){$(G(U,G(W)))});else if(typeof E$==="object"&&typeof mA==="object")$(G(U,G(mA)));else $(G(U));function G(W,w){if(W!==U)if(typeof Object.create==="function")Object.defineProperty(W,"__esModule",{value:!0});else W.__esModule=!0;return function(L,E){return W[L]=w?w(L,E):E}}})(function($){var U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,L){w.__proto__=L}||function(w,L){for(var E in L)if(Object.prototype.hasOwnProperty.call(L,E))w[E]=L[E]};YL=function(w,L){if(typeof L!=="function"&&L!==null)throw new TypeError("Class extends value "+String(L)+" is not a constructor or null");U(w,L);function E(){this.constructor=w}w.prototype=L===null?Object.create(L):(E.prototype=L.prototype,new E)},QL=Object.assign||function(w){for(var L,E=1,X=arguments.length;E<X;E++){L=arguments[E];for(var R in L)if(Object.prototype.hasOwnProperty.call(L,R))w[R]=L[R]}return w},zL=function(w,L){var E={};for(var X in w)if(Object.prototype.hasOwnProperty.call(w,X)&&L.indexOf(X)<0)E[X]=w[X];if(w!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var R=0,X=Object.getOwnPropertySymbols(w);R<X.length;R++)if(L.indexOf(X[R])<0&&Object.prototype.propertyIsEnumerable.call(w,X[R]))E[X[R]]=w[X[R]]}return E},JL=function(w,L,E,X){var R=arguments.length,F=R<3?L:X===null?X=Object.getOwnPropertyDescriptor(L,E):X,I;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")F=Reflect.decorate(w,L,E,X);else for(var Z=w.length-1;Z>=0;Z--)if(I=w[Z])F=(R<3?I(F):R>3?I(L,E,F):I(L,E))||F;return R>3&&F&&Object.defineProperty(L,E,F),F},TL=function(w,L){return function(E,X){L(E,X,w)}},KL=function(w,L,E,X,R,F){function I(V){if(V!==void 0&&typeof V!=="function")throw new TypeError("Function expected");return V}var Z=X.kind,Y=Z==="getter"?"get":Z==="setter"?"set":"value",f=!L&&w?X.static?w:w.prototype:null,Q=L||(f?Object.getOwnPropertyDescriptor(f,X.name):{}),O,K=!1;for(var z=E.length-1;z>=0;z--){var M={};for(var A in X)M[A]=A==="access"?{}:X[A];for(var A in X.access)M.access[A]=X.access[A];M.addInitializer=function(V){if(K)throw new TypeError("Cannot add initializers after decoration has completed");F.push(I(V||null))};var B=E[z](Z==="accessor"?{get:Q.get,set:Q.set}:Q[Y],M);if(Z==="accessor"){if(B===void 0)continue;if(B===null||typeof B!=="object")throw new TypeError("Object expected");if(O=I(B.get))Q.get=O;if(O=I(B.set))Q.set=O;if(O=I(B.init))R.unshift(O)}else if(O=I(B))if(Z==="field")R.unshift(O);else Q[Y]=O}if(f)Object.defineProperty(f,X.name,Q);K=!0},ML=function(w,L,E){var X=arguments.length>2;for(var R=0;R<L.length;R++)E=X?L[R].call(w,E):L[R].call(w);return X?E:void 0},OL=function(w){return typeof w==="symbol"?w:"".concat(w)},AL=function(w,L,E){if(typeof L==="symbol")L=L.description?"[".concat(L.description,"]"):"";return Object.defineProperty(w,"name",{configurable:!0,value:E?"".concat(E," ",L):L})},BL=function(w,L){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(w,L)},VL=function(w,L,E,X){function R(F){return F instanceof E?F:new E(function(I){I(F)})}return new(E||(E=Promise))(function(F,I){function Z(Q){try{f(X.next(Q))}catch(O){I(O)}}function Y(Q){try{f(X.throw(Q))}catch(O){I(O)}}function f(Q){Q.done?F(Q.value):R(Q.value).then(Z,Y)}f((X=X.apply(w,L||[])).next())})},HL=function(w,L){var E={label:0,sent:function(){if(F[0]&1)throw F[1];return F[1]},trys:[],ops:[]},X,R,F,I;return I={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol==="function"&&(I[Symbol.iterator]=function(){return this}),I;function Z(f){return function(Q){return Y([f,Q])}}function Y(f){if(X)throw new TypeError("Generator is already executing.");while(I&&(I=0,f[0]&&(E=0)),E)try{if(X=1,R&&(F=f[0]&2?R.return:f[0]?R.throw||((F=R.return)&&F.call(R),0):R.next)&&!(F=F.call(R,f[1])).done)return F;if(R=0,F)f=[f[0]&2,F.value];switch(f[0]){case 0:case 1:F=f;break;case 4:return E.label++,{value:f[1],done:!1};case 5:E.label++,R=f[1],f=[0];continue;case 7:f=E.ops.pop(),E.trys.pop();continue;default:if((F=E.trys,!(F=F.length>0&&F[F.length-1]))&&(f[0]===6||f[0]===2)){E=0;continue}if(f[0]===3&&(!F||f[1]>F[0]&&f[1]<F[3])){E.label=f[1];break}if(f[0]===6&&E.label<F[1]){E.label=F[1],F=f;break}if(F&&E.label<F[2]){E.label=F[2],E.ops.push(f);break}if(F[2])E.ops.pop();E.trys.pop();continue}f=L.call(w,E)}catch(Q){f=[6,Q],R=0}finally{X=F=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},CL=function(w,L){for(var E in w)if(E!=="default"&&!Object.prototype.hasOwnProperty.call(L,E))L$(L,w,E)},L$=Object.create?function(w,L,E,X){if(X===void 0)X=E;var R=Object.getOwnPropertyDescriptor(L,E);if(!R||("get"in R?!L.__esModule:R.writable||R.configurable))R={enumerable:!0,get:function(){return L[E]}};Object.defineProperty(w,X,R)}:function(w,L,E,X){if(X===void 0)X=E;w[X]=L[E]},W$=function(w){var L=typeof Symbol==="function"&&Symbol.iterator,E=L&&w[L],X=0;if(E)return E.call(w);if(w&&typeof w.length==="number")return{next:function(){if(w&&X>=w.length)w=void 0;return{value:w&&w[X++],done:!w}}};throw new TypeError(L?"Object is not iterable.":"Symbol.iterator is not defined.")},uU=function(w,L){var E=typeof Symbol==="function"&&w[Symbol.iterator];if(!E)return w;var X=E.call(w),R,F=[],I;try{while((L===void 0||L-- >0)&&!(R=X.next()).done)F.push(R.value)}catch(Z){I={error:Z}}finally{try{if(R&&!R.done&&(E=X.return))E.call(X)}finally{if(I)throw I.error}}return F},NL=function(){for(var w=[],L=0;L<arguments.length;L++)w=w.concat(uU(arguments[L]));return w},qL=function(){for(var w=0,L=0,E=arguments.length;L<E;L++)w+=arguments[L].length;for(var X=Array(w),R=0,L=0;L<E;L++)for(var F=arguments[L],I=0,Z=F.length;I<Z;I++,R++)X[R]=F[I];return X},jL=function(w,L,E){if(E||arguments.length===2){for(var X=0,R=L.length,F;X<R;X++)if(F||!(X in L)){if(!F)F=Array.prototype.slice.call(L,0,X);F[X]=L[X]}}return w.concat(F||Array.prototype.slice.call(L))},h0=function(w){return this instanceof h0?(this.v=w,this):new h0(w)},PL=function(w,L,E){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var X=E.apply(w,L||[]),R,F=[];return R={},Z("next"),Z("throw"),Z("return",I),R[Symbol.asyncIterator]=function(){return this},R;function I(z){return function(M){return Promise.resolve(M).then(z,O)}}function Z(z,M){if(X[z]){if(R[z]=function(A){return new Promise(function(B,V){F.push([z,A,B,V])>1||Y(z,A)})},M)R[z]=M(R[z])}}function Y(z,M){try{f(X[z](M))}catch(A){K(F[0][3],A)}}function f(z){z.value instanceof h0?Promise.resolve(z.value.v).then(Q,O):K(F[0][2],z)}function Q(z){Y("next",z)}function O(z){Y("throw",z)}function K(z,M){if(z(M),F.shift(),F.length)Y(F[0][0],F[0][1])}},SL=function(w){var L,E;return L={},X("next"),X("throw",function(R){throw R}),X("return"),L[Symbol.iterator]=function(){return this},L;function X(R,F){L[R]=w[R]?function(I){return(E=!E)?{value:h0(w[R](I)),done:!1}:F?F(I):I}:F}},bL=function(w){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var L=w[Symbol.asyncIterator],E;return L?L.call(w):(w=typeof W$==="function"?W$(w):w[Symbol.iterator](),E={},X("next"),X("throw"),X("return"),E[Symbol.asyncIterator]=function(){return this},E);function X(F){E[F]=w[F]&&function(I){return new Promise(function(Z,Y){I=w[F](I),R(Z,Y,I.done,I.value)})}}function R(F,I,Z,Y){Promise.resolve(Y).then(function(f){F({value:f,done:Z})},I)}},hL=function(w,L){if(Object.defineProperty)Object.defineProperty(w,"raw",{value:L});else w.raw=L;return w};var G=Object.create?function(w,L){Object.defineProperty(w,"default",{enumerable:!0,value:L})}:function(w,L){w.default=L};DL=function(w){if(w&&w.__esModule)return w;var L={};if(w!=null){for(var E in w)if(E!=="default"&&Object.prototype.hasOwnProperty.call(w,E))L$(L,w,E)}return G(L,w),L},kL=function(w){return w&&w.__esModule?w:{default:w}},cL=function(w,L,E,X){if(E==="a"&&!X)throw new TypeError("Private accessor was defined without a getter");if(typeof L==="function"?w!==L||!X:!L.has(w))throw new TypeError("Cannot read private member from an object whose class did not declare it");return E==="m"?X:E==="a"?X.call(w):X?X.value:L.get(w)},vL=function(w,L,E,X,R){if(X==="m")throw new TypeError("Private method is not writable");if(X==="a"&&!R)throw new TypeError("Private accessor was defined without a setter");if(typeof L==="function"?w!==L||!R:!L.has(w))throw new TypeError("Cannot write private member to an object whose class did not declare it");return X==="a"?R.call(w,E):R?R.value=E:L.set(w,E),E},xL=function(w,L){if(L===null||typeof L!=="object"&&typeof L!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof w==="function"?L===w:w.has(L)},uL=function(w,L,E){if(L!==null&&L!==void 0){if(typeof L!=="object"&&typeof L!=="function")throw new TypeError("Object expected.");var X,R;if(E){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");X=L[Symbol.asyncDispose]}if(X===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(X=L[Symbol.dispose],E)R=X}if(typeof X!=="function")throw new TypeError("Object not disposable.");if(R)X=function(){try{R.call(this)}catch(F){return Promise.reject(F)}};w.stack.push({value:L,dispose:X,async:E})}else if(E)w.stack.push({async:!0});return L};var W=typeof SuppressedError==="function"?SuppressedError:function(w,L,E){var X=new Error(E);return X.name="SuppressedError",X.error=w,X.suppressed=L,X};yL=function(w){function L(X){w.error=w.hasError?new W(X,w.error,"An error was suppressed during disposal."):X,w.hasError=!0}function E(){while(w.stack.length){var X=w.stack.pop();try{var R=X.dispose&&X.dispose.call(X.value);if(X.async)return Promise.resolve(R).then(E,function(F){return L(F),E()})}catch(F){L(F)}}if(w.hasError)throw w.error}return E()},$("__extends",YL),$("__assign",QL),$("__rest",zL),$("__decorate",JL),$("__param",TL),$("__esDecorate",KL),$("__runInitializers",ML),$("__propKey",OL),$("__setFunctionName",AL),$("__metadata",BL),$("__awaiter",VL),$("__generator",HL),$("__exportStar",CL),$("__createBinding",L$),$("__values",W$),$("__read",uU),$("__spread",NL),$("__spreadArrays",qL),$("__spreadArray",jL),$("__await",h0),$("__asyncGenerator",PL),$("__asyncDelegator",SL),$("__asyncValues",bL),$("__makeTemplateObject",hL),$("__importStar",DL),$("__importDefault",kL),$("__classPrivateFieldGet",cL),$("__classPrivateFieldSet",vL),$("__classPrivateFieldIn",xL),$("__addDisposableResource",uL),$("__disposeResources",yL)})});var lL=T((iA,pL)=>{var{defineProperty:X$,getOwnPropertyDescriptor:Q9,getOwnPropertyNames:z9}=Object,J9=Object.prototype.hasOwnProperty,T9=($,U)=>X$($,"name",{value:U,configurable:!0}),K9=($,U)=>{for(var G in U)X$($,G,{get:U[G],enumerable:!0})},M9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of z9(U))if(!J9.call($,w)&&w!==G)X$($,w,{get:()=>U[w],enumerable:!(W=Q9(U,w))||W.enumerable})}return $},O9=($)=>M9(X$({},"__esModule",{value:!0}),$),gL={};K9(gL,{emitWarningIfUnsupportedVersion:()=>A9});pL.exports=O9(gL);var dL=!1,A9=T9(($)=>{if($&&!dL&&parseInt($.substring(1,$.indexOf(".")))<18)dL=!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 IE=T((rA,FE)=>{function pU($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break}var{defineProperty:f$,getOwnPropertyDescriptor:B9,getOwnPropertyNames:V9}=Object,H9=Object.prototype.hasOwnProperty,b=($,U)=>f$($,"name",{value:U,configurable:!0}),C9=($,U)=>{for(var G in U)f$($,G,{get:U[G],enumerable:!0})},N9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of V9(U))if(!H9.call($,w)&&w!==G)f$($,w,{get:()=>U[w],enumerable:!(W=B9(U,w))||W.enumerable})}return $},q9=($)=>N9(f$({},"__esModule",{value:!0}),$),rL={};C9(rL,{SignatureV4:()=>e9,clearCredentialCache:()=>l9,createScope:()=>I$,getCanonicalHeaders:()=>gU,getCanonicalQuery:()=>wE,getPayloadHash:()=>Z$,getSigningKey:()=>GE,moveHeadersToQuery:()=>XE,prepareRequest:()=>lU});FE.exports=q9(rL);var nL=x0(),yU=W0(),j9="X-Amz-Algorithm",P9="X-Amz-Credential",oL="X-Amz-Date",S9="X-Amz-SignedHeaders",b9="X-Amz-Expires",tL="X-Amz-Signature",aL="X-Amz-Security-Token",eL="authorization",$E=oL.toLowerCase(),h9="date",D9=[eL,$E,h9],k9=tL.toLowerCase(),dU="x-amz-content-sha256",c9=aL.toLowerCase(),v9={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},x9=/^proxy-/,u9=/^sec-/,_U="AWS4-HMAC-SHA256",y9="AWS4-HMAC-SHA256-PAYLOAD",_9="UNSIGNED-PAYLOAD",d9=50,UE="aws4_request",g9=604800,E0=R4(),p9=W0(),D0={},F$=[],I$=b(($,U,G)=>`${$}/${U}/${G}/${UE}`,"createScope"),GE=b(async($,U,G,W,w)=>{const L=await sL($,U.secretAccessKey,U.accessKeyId),E=`${G}:${W}:${w}:${E0.toHex(L)}:${U.sessionToken}`;if(E in D0)return D0[E];F$.push(E);while(F$.length>d9)delete D0[F$.shift()];let X=`AWS4${U.secretAccessKey}`;for(let R of[G,W,w,UE])X=await sL($,X,R);return D0[E]=X},"getSigningKey"),l9=b(()=>{F$.length=0,Object.keys(D0).forEach(($)=>{delete D0[$]})},"clearCredentialCache"),sL=b(($,U,G)=>{const W=new $(U);return W.update(p9.toUint8Array(G)),W.digest()},"hmac"),gU=b(({headers:$},U,G)=>{const W={};for(let w of Object.keys($).sort()){if($[w]==null)continue;const L=w.toLowerCase();if(L in v9||(U==null?void 0:U.has(L))||x9.test(L)||u9.test(L)){if(!G||G&&!G.has(L))continue}W[L]=$[w].trim().replace(/\s+/g," ")}return W},"getCanonicalHeaders"),$1=GU(),wE=b(({query:$={}})=>{const U=[],G={};for(let W of Object.keys($).sort()){if(W.toLowerCase()===k9)continue;U.push(W);const w=$[W];if(typeof w==="string")G[W]=`${$1.escapeUri(W)}=${$1.escapeUri(w)}`;else if(Array.isArray(w))G[W]=w.slice(0).reduce((L,E)=>L.concat([`${$1.escapeUri(W)}=${$1.escapeUri(E)}`]),[]).sort().join("&")}return U.map((W)=>G[W]).filter((W)=>W).join("&")},"getCanonicalQuery"),n9=o$(),s9=W0(),Z$=b(async({headers:$,body:U},G)=>{for(let W of Object.keys($))if(W.toLowerCase()===dU)return $[W];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||n9.isArrayBuffer(U)){const W=new G;return W.update(s9.toUint8Array(U)),E0.toHex(await W.digest())}return _9},"getPayloadHash"),mL=W0(),WE=class ${format(U){const G=[];for(let L of Object.keys(U)){const E=mL.fromUtf8(L);G.push(Uint8Array.from([E.byteLength]),E,this.formatHeaderValue(U[L]))}const W=new Uint8Array(G.reduce((L,E)=>L+E.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 E=new Uint8Array(L.buffer);return E.set(U.value,3),E;case"string":const X=mL.fromUtf8(U.value),R=new DataView(new ArrayBuffer(3+X.byteLength));R.setUint8(0,7),R.setUint16(1,X.byteLength,!1);const F=new Uint8Array(R.buffer);return F.set(X,3),F;case"timestamp":const I=new Uint8Array(9);return I[0]=8,I.set(r9.fromNumber(U.value.valueOf()).bytes,1),I;case"uuid":if(!i9.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const Z=new Uint8Array(17);return Z[0]=9,Z.set(E0.fromHex(U.value.replace(/\-/g,"")),1),Z}}};b(WE,"HeaderFormatter");var m9=WE,i9=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,LE=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)pU(G);return new $(G)}valueOf(){const U=this.bytes.slice(0),G=U[0]&128;if(G)pU(U);return parseInt(E0.toHex(U),16)*(G?-1:1)}toString(){return String(this.valueOf())}};b(LE,"Int64");var r9=LE;b(pU,"negate");var o9=b(($,U)=>{$=$.toLowerCase();for(let G of Object.keys(U))if($===G.toLowerCase())return!0;return!1},"hasHeader"),EE=o(),XE=b(($,U={})=>{var G;const{headers:W,query:w={}}=EE.HttpRequest.clone($);for(let L of Object.keys(W)){const E=L.toLowerCase();if(E.slice(0,6)==="x-amz-"&&!((G=U.unhoistableHeaders)==null?void 0:G.has(E)))w[L]=W[L],delete W[L]}return{...$,headers:W,query:w}},"moveHeadersToQuery"),lU=b(($)=>{$=EE.HttpRequest.clone($);for(let U of Object.keys($.headers))if(D9.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),t9=b(($)=>a9($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),a9=b(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),RE=class ${constructor({applyChecksum:U,credentials:G,region:W,service:w,sha256:L,uriEscapePath:E=!0}){this.headerFormatter=new m9,this.service=w,this.sha256=L,this.uriEscapePath=E,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=nL.normalizeProvider(W),this.credentialProvider=nL.normalizeProvider(G)}async presign(U,G={}){const{signingDate:W=new Date,expiresIn:w=3600,unsignableHeaders:L,unhoistableHeaders:E,signableHeaders:X,signingRegion:R,signingService:F}=G,I=await this.credentialProvider();this.validateResolvedCredentials(I);const Z=R??await this.regionProvider(),{longDate:Y,shortDate:f}=R$(W);if(w>g9)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const Q=I$(f,Z,F??this.service),O=XE(lU(U),{unhoistableHeaders:E});if(I.sessionToken)O.query[aL]=I.sessionToken;O.query[j9]=_U,O.query[P9]=`${I.accessKeyId}/${Q}`,O.query[oL]=Y,O.query[b9]=w.toString(10);const K=gU(O,L,X);return O.query[S9]=iL(K),O.query[tL]=await this.getSignature(Y,Q,this.getSigningKey(I,Z,f,F),this.createCanonicalRequest(O,K,await Z$(U,this.sha256))),O}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:E}){const X=L??await this.regionProvider(),{shortDate:R,longDate:F}=R$(W),I=I$(R,X,E??this.service),Z=await Z$({headers:{},body:G},this.sha256),Y=new this.sha256;Y.update(U);const f=E0.toHex(await Y.digest()),Q=[y9,F,I,w,f,Z].join("\n");return this.signString(Q,{signingDate:W,signingRegion:X,signingService:E})}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((E)=>{return{message:U.message,signature:E}})}async signString(U,{signingDate:G=new Date,signingRegion:W,signingService:w}={}){const L=await this.credentialProvider();this.validateResolvedCredentials(L);const E=W??await this.regionProvider(),{shortDate:X}=R$(G),R=new this.sha256(await this.getSigningKey(L,E,X,w));return R.update(yU.toUint8Array(U)),E0.toHex(await R.digest())}async signRequest(U,{signingDate:G=new Date,signableHeaders:W,unsignableHeaders:w,signingRegion:L,signingService:E}={}){const X=await this.credentialProvider();this.validateResolvedCredentials(X);const R=L??await this.regionProvider(),F=lU(U),{longDate:I,shortDate:Z}=R$(G),Y=I$(Z,R,E??this.service);if(F.headers[$E]=I,X.sessionToken)F.headers[c9]=X.sessionToken;const f=await Z$(F,this.sha256);if(!o9(dU,F.headers)&&this.applyChecksum)F.headers[dU]=f;const Q=gU(F,w,W),O=await this.getSignature(I,Y,this.getSigningKey(X,R,Z,E),this.createCanonicalRequest(F,Q,f));return F.headers[eL]=`${_U} Credential=${X.accessKeyId}/${Y}, SignedHeaders=${iL(Q)}, Signature=${O}`,F}createCanonicalRequest(U,G,W){const w=Object.keys(G).sort();return`${U.method}
10
+ ${this.getCanonicalPath(U)}
11
+ ${wE(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(yU.toUint8Array(W));const L=await w.digest();return`${_U}
16
+ ${U}
17
+ ${G}
18
+ ${E0.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 $1.escapeUri(W).replace(/%2F/g,"/")}return U}async getSignature(U,G,W,w){const L=await this.createStringToSign(U,G,w),E=new this.sha256(await W);return E.update(yU.toUint8Array(L)),E0.toHex(await E.digest())}getSigningKey(U,G,W,w){return GE(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")}};b(RE,"SignatureV4");var e9=RE,R$=b(($)=>{const U=t9($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),iL=b(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var OE=T((oA,ME)=>{var{defineProperty:Y$,getOwnPropertyDescriptor:$Q,getOwnPropertyNames:UQ}=Object,GQ=Object.prototype.hasOwnProperty,k=($,U)=>Y$($,"name",{value:U,configurable:!0}),wQ=($,U)=>{for(var G in U)Y$($,G,{get:U[G],enumerable:!0})},WQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of UQ(U))if(!GQ.call($,w)&&w!==G)Y$($,w,{get:()=>U[w],enumerable:!(W=$Q(U,w))||W.enumerable})}return $},LQ=($)=>WQ(Y$({},"__esModule",{value:!0}),$),zE={};wQ(zE,{AWSSDKSigV4Signer:()=>FQ,AwsSdkSigV4ASigner:()=>ZQ,AwsSdkSigV4Signer:()=>mU,NODE_SIGV4A_CONFIG_OPTIONS:()=>QQ,resolveAWSSDKSigV4Config:()=>zQ,resolveAwsSdkSigV4AConfig:()=>YQ,resolveAwsSdkSigV4Config:()=>KE,validateSigningProperties:()=>sU});ME.exports=LQ(zE);var EQ=o(),XQ=o(),ZE=k(($)=>{var U,G;return XQ.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((G=$.headers)==null?void 0:G.Date):void 0},"getDateHeader"),nU=k(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),RQ=k(($,U)=>Math.abs(nU(U).getTime()-$)>=300000,"isClockSkewed"),fE=k(($,U)=>{const G=Date.parse($);if(RQ(G,U))return G-Date.now();return U},"getUpdatedSystemClockOffset"),U1=k(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),sU=k(async($)=>{var U,G,W;const w=U1("context",$.context),L=U1("config",$.config),E=(W=(G=(U=w.endpointV2)==null?void 0:U.properties)==null?void 0:G.authSchemes)==null?void 0:W[0],R=await U1("signer",L.signer)(E),F=$==null?void 0:$.signingRegion,I=$==null?void 0:$.signingRegionSet,Z=$==null?void 0:$.signingName;return{config:L,signer:R,signingRegion:F,signingRegionSet:I,signingName:Z}},"validateSigningProperties"),JE=class ${async sign(U,G,W){var w;if(!EQ.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const L=await sU(W),{config:E,signer:X}=L;let{signingRegion:R,signingName:F}=L;const I=W.context;if(((w=I==null?void 0:I.authSchemes)==null?void 0:w.length)??0>1){const[Y,f]=I.authSchemes;if((Y==null?void 0:Y.name)==="sigv4a"&&(f==null?void 0:f.name)==="sigv4")R=(f==null?void 0:f.signingRegion)??R,F=(f==null?void 0:f.signingName)??F}return await X.sign(U,{signingDate:nU(E.systemClockOffset),signingRegion:R,signingService:F})}errorHandler(U){return(G)=>{const W=G.ServerTime??ZE(G.$response);if(W){const w=U1("config",U.config),L=w.systemClockOffset;if(w.systemClockOffset=fE(W,w.systemClockOffset),w.systemClockOffset!==L&&G.$metadata)G.$metadata.clockSkewCorrected=!0}throw G}}successHandler(U,G){const W=ZE(U);if(W){const w=U1("config",G.config);w.systemClockOffset=fE(W,w.systemClockOffset)}}};k(JE,"AwsSdkSigV4Signer");var mU=JE,FQ=mU,IQ=o(),TE=class $ extends mU{async sign(U,G,W){var w;if(!IQ.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:L,signer:E,signingRegion:X,signingRegionSet:R,signingName:F}=await sU(W),Z=(await((w=L.sigv4aSigningRegionSet)==null?void 0:w.call(L))??R??[X]).join(",");return await E.sign(U,{signingDate:nU(L.systemClockOffset),signingRegion:Z,signingService:F})}};k(TE,"AwsSdkSigV4ASigner");var ZQ=TE,fQ=qU(),YE=N$(),YQ=k(($)=>{return $.sigv4aSigningRegionSet=fQ.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),QQ={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new YE.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 YE.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},K0=qU(),QE=IE(),KE=k(($)=>{let U;if($.credentials)U=K0.memoizeIdentityProvider($.credentials,K0.isIdentityExpired,K0.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=K0.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=k(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:G=!0,systemClockOffset:W=$.systemClockOffset||0,sha256:w}=$;let L;if($.signer)L=K0.normalizeProvider($.signer);else if($.regionInfoProvider)L=k(()=>K0.normalizeProvider($.region)().then(async(E)=>[await $.regionInfoProvider(E,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},E]).then(([E,X])=>{const{signingRegion:R,signingService:F}=E;$.signingRegion=$.signingRegion||R||X,$.signingName=$.signingName||F||$.serviceId;const I={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:w,uriEscapePath:G};return new($.signerConstructor||QE.SignatureV4)(I)}),"signer");else L=k(async(E)=>{E=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await K0.normalizeProvider($.region)(),properties:{}},E);const{signingRegion:X,signingName:R}=E;$.signingRegion=$.signingRegion||X,$.signingName=$.signingName||R||$.serviceId;const F={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:w,uriEscapePath:G};return new($.signerConstructor||QE.SignatureV4)(F)},"signer");return{...$,systemClockOffset:W,signingEscapePath:G,credentials:U,signer:L}},"resolveAwsSdkSigV4Config"),zQ=KE});var Q$=T((OQ)=>{var JQ=":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",AE="[: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]["+JQ+"]*",TQ=new RegExp("^"+AE+"$"),KQ=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 E=0;E<L;E++)w.push(W[E]);G.push(w),W=U.exec($)}return G},MQ=function($){const U=TQ.exec($);return!(U===null||typeof U==="undefined")};OQ.isExist=function($){return typeof $!=="undefined"};OQ.isEmptyObject=function($){return Object.keys($).length===0};OQ.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]]}};OQ.getValue=function($){if(OQ.isExist($))return $;else return""};OQ.isName=MQ;OQ.getAllMatches=KQ;OQ.nameRegexp=AE});var rU=T((vQ)=>{function VE($){return $===" "||$==="\t"||$==="\n"||$==="\r"}function HE($,U){const G=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const W=$.substr(G,U-G);if(U>5&&W==="xml")return P("InvalidXml","XML declaration allowed only at the start of the document.",D($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U}function CE($,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 SQ($,U){let G="",W="",w=!1;for(;U<$.length;U++){if($[U]===jQ||$[U]===PQ)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 NE($,U){const G=iU.getAllMatches($,bQ),W={};for(let w=0;w<G.length;w++){if(G[w][1].length===0)return P("InvalidAttr","Attribute '"+G[w][2]+"' has no space in starting.",G1(G[w]));else if(G[w][3]!==void 0&&G[w][4]===void 0)return P("InvalidAttr","Attribute '"+G[w][2]+"' is without value.",G1(G[w]));else if(G[w][3]===void 0&&!U.allowBooleanAttributes)return P("InvalidAttr","boolean attribute '"+G[w][2]+"' is not allowed.",G1(G[w]));const L=G[w][2];if(!kQ(L))return P("InvalidAttr","Attribute '"+L+"' is an invalid name.",G1(G[w]));if(!W.hasOwnProperty(L))W[L]=1;else return P("InvalidAttr","Attribute '"+L+"' is repeated.",G1(G[w]))}return!0}function hQ($,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 DQ($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,hQ($,U);let G=0;for(;U<$.length;U++,G++){if($[U].match(/\w/)&&G<20)continue;if($[U]===";")break;return-1}return U}function P($,U,G){return{err:{code:$,msg:U,line:G.line||G,col:G.col}}}function kQ($){return iU.isName($)}function cQ($){return iU.isName($)}function D($,U){const G=$.substring(0,U).split(/\r?\n/);return{line:G.length,col:G[G.length-1].length+1}}function G1($){return $.startIndex+$[1].length}var iU=Q$(),qQ={allowBooleanAttributes:!1,unpairedTags:[]};vQ.validate=function($,U){U=Object.assign({},qQ,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=HE($,L),L.err)return L}else if($[L]==="<"){let E=L;if(L++,$[L]==="!"){L=CE($,L);continue}else{let X=!1;if($[L]==="/")X=!0,L++;let R="";for(;L<$.length&&$[L]!==">"&&$[L]!==" "&&$[L]!=="\t"&&$[L]!=="\n"&&$[L]!=="\r";L++)R+=$[L];if(R=R.trim(),R[R.length-1]==="/")R=R.substring(0,R.length-1),L--;if(!cQ(R)){let Z;if(R.trim().length===0)Z="Invalid space after '<'.";else Z="Tag '"+R+"' is an invalid name.";return P("InvalidTag",Z,D($,L))}const F=SQ($,L);if(F===!1)return P("InvalidAttr","Attributes for '"+R+"' have open quote.",D($,L));let I=F.value;if(L=F.index,I[I.length-1]==="/"){const Z=L-I.length;I=I.substring(0,I.length-1);const Y=NE(I,U);if(Y===!0)W=!0;else return P(Y.err.code,Y.err.msg,D($,Z+Y.err.line))}else if(X)if(!F.tagClosed)return P("InvalidTag","Closing tag '"+R+"' doesn't have proper closing.",D($,L));else if(I.trim().length>0)return P("InvalidTag","Closing tag '"+R+"' can't have attributes or invalid starting.",D($,E));else if(G.length===0)return P("InvalidTag","Closing tag '"+R+"' has not been opened.",D($,E));else{const Z=G.pop();if(R!==Z.tagName){let Y=D($,Z.tagStartPos);return P("InvalidTag","Expected closing tag '"+Z.tagName+"' (opened in line "+Y.line+", col "+Y.col+") instead of closing tag '"+R+"'.",D($,E))}if(G.length==0)w=!0}else{const Z=NE(I,U);if(Z!==!0)return P(Z.err.code,Z.err.msg,D($,L-I.length+Z.err.line));if(w===!0)return P("InvalidXml","Multiple possible root nodes found.",D($,L));else if(U.unpairedTags.indexOf(R)!==-1);else G.push({tagName:R,tagStartPos:E});W=!0}for(L++;L<$.length;L++)if($[L]==="<")if($[L+1]==="!"){L++,L=CE($,L);continue}else if($[L+1]==="?"){if(L=HE($,++L),L.err)return L}else break;else if($[L]==="&"){const Z=DQ($,L);if(Z==-1)return P("InvalidChar","char '&' is not expected.",D($,L));L=Z}else if(w===!0&&!VE($[L]))return P("InvalidXml","Extra text at the end",D($,L));if($[L]==="<")L--}}else{if(VE($[L]))continue;return P("InvalidChar","char '"+$[L]+"' is not expected.",D($,L))}if(!W)return P("InvalidXml","Start tag expected.",1);else if(G.length==1)return P("InvalidTag","Unclosed tag '"+G[0].tagName+"'.",D($,G[0].tagStartPos));else if(G.length>0)return P("InvalidXml","Invalid '"+JSON.stringify(G.map((L)=>L.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var jQ='"',PQ="'",bQ=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var jE=T((yQ)=>{var qE={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 $}},uQ=function($){return Object.assign({},qE,$)};yQ.buildOptions=uQ;yQ.defaultOptions=qE});var bE=T(($B,SE)=>{class PE{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})}}SE.exports=PE});var DE=T((UB,hE)=>{function pQ($,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,E="";for(;U<$.length;U++)if($[U]==="<"&&!L){if(w&&sQ($,U)){if(U+=7,[entityName,val,U]=lQ($,U+1),val.indexOf("&")===-1)G[oQ(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(w&&mQ($,U))U+=8;else if(w&&iQ($,U))U+=8;else if(w&&rQ($,U))U+=9;else if(nQ)L=!0;else throw new Error("Invalid DOCTYPE");W++,E=""}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 E+=$[U];if(W!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:G,i:U}}function lQ($,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 nQ($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1}function sQ($,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 mQ($,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 iQ($,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 rQ($,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 oQ($){if(gQ.isName($))return $;else throw new Error(`Invalid entity name ${$}`)}var gQ=Q$();hE.exports=pQ});var cE=T((GB,kE)=>{function $7($,U={}){if(U=Object.assign({},eQ,U),!$||typeof $!=="string")return $;let G=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(G))return $;else if(U.hex&&tQ.test(G))return Number.parseInt(G,16);else{const W=aQ.exec(G);if(W){const w=W[1],L=W[2];let E=U7(W[3]);const X=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 R=Number(G),F=""+R;if(F.search(/[eE]/)!==-1)if(U.eNotation)return R;else return $;else if(X)if(U.eNotation)return R;else return $;else if(G.indexOf(".")!==-1)if(F==="0"&&E==="")return R;else if(F===E)return R;else if(w&&F==="-"+E)return R;else return $;if(L)if(E===F)return R;else if(w+E===F)return R;else return $;if(G===F)return R;else if(G===w+F)return R;return $}}else return $}}function U7($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $}var tQ=/^[-+]?0x[a-fA-F0-9]+$/,aQ=/^([\-\+])?(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 eQ={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};kE.exports=$7});var yE=T((wB,uE)=>{function W7($){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 L7($,U,G,W,w,L,E){if($!==void 0){if(this.options.trimValues&&!W)$=$.trim();if($.length>0){if(!E)$=this.replaceEntitiesValue($);const X=this.options.tagValueProcessor(U,$,G,w,L);if(X===null||X===void 0)return $;else if(typeof X!==typeof $||X!==$)return X;else if(this.options.trimValues)return tU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return tU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}}function E7($){if(this.options.removeNSPrefix){const U=$.split(":"),G=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=G+U[1]}return $}function R7($,U,G){if(!this.options.ignoreAttributes&&typeof $==="string"){const W=vE.getAllMatches($,X7),w=W.length,L={};for(let E=0;E<w;E++){const X=this.resolveNameSpace(W[E][1]);let R=W[E][4],F=this.options.attributeNamePrefix+X;if(X.length){if(this.options.transformAttributeName)F=this.options.transformAttributeName(F);if(F==="__proto__")F="#__proto__";if(R!==void 0){if(this.options.trimValues)R=R.trim();R=this.replaceEntitiesValue(R);const I=this.options.attributeValueProcessor(X,R,U);if(I===null||I===void 0)L[F]=R;else if(typeof I!==typeof R||I!==R)L[F]=I;else L[F]=tU(R,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)L[F]=!0}}if(!Object.keys(L).length)return;if(this.options.attributesGroupName){const E={};return E[this.options.attributesGroupName]=L,E}return L}}function I7($,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 f7($,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 Y7($,U,G){const W="*."+G;for(let w in $){const L=$[w];if(W===L||U===L)return!0}return!1}function Q7($,U,G=">"){let W,w="";for(let L=U;L<$.length;L++){let E=$[L];if(W){if(E===W)W=""}else if(E==='"'||E==="'")W=E;else if(E===G[0])if(G[1]){if($[L+1]===G[1])return{data:w,index:L}}else return{data:w,index:L};else if(E==="\t")E=" ";w+=E}}function M0($,U,G,W){const w=$.indexOf(U,G);if(w===-1)throw new Error(W);else return w+U.length-1}function oU($,U,G,W=">"){const w=Q7($,U+1,W);if(!w)return;let L=w.data;const E=w.index,X=L.search(/\s/);let R=L,F=!0;if(X!==-1)R=L.substring(0,X),L=L.substring(X+1).trimStart();const I=R;if(G){const Z=R.indexOf(":");if(Z!==-1)R=R.substr(Z+1),F=R!==w.data.substr(Z+1)}return{tagName:R,tagExp:L,closeIndex:E,attrExpPresent:F,rawTagName:I}}function z7($,U,G){const W=G;let w=1;for(;G<$.length;G++)if($[G]==="<")if($[G+1]==="/"){const L=M0($,">",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=M0($,"?>",G+1,"StopNode is not closed.");else if($.substr(G+1,3)==="!--")G=M0($,"-->",G+3,"StopNode is not closed.");else if($.substr(G+1,2)==="![")G=M0($,"]]>",G,"StopNode is not closed.")-2;else{const L=oU($,G,">");if(L){if((L&&L.tagName)===U&&L.tagExp[L.tagExp.length-1]!=="/")w++;G=L.closeIndex}}}function tU($,U,G){if(U&&typeof $==="string"){const W=$.trim();if(W==="true")return!0;else if(W==="false")return!1;else return w7($,G)}else if(vE.isExist($))return $;else return""}var vE=Q$(),w1=bE(),G7=DE(),w7=cE();class xE{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=W7,this.parseXml=F7,this.parseTextData=L7,this.resolveNameSpace=E7,this.buildAttributesMap=R7,this.isItStopNode=Y7,this.replaceEntitiesValue=Z7,this.readStopNodeData=z7,this.saveTextToParentTag=f7,this.addChild=I7}}var X7=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),F7=function($){$=$.replace(/\r\n?/g,"\n");const U=new w1("!xml");let G=U,W="",w="";for(let L=0;L<$.length;L++)if($[L]==="<")if($[L+1]==="/"){const X=M0($,">",L,"Closing Tag is not closed.");let R=$.substring(L+2,X).trim();if(this.options.removeNSPrefix){const Z=R.indexOf(":");if(Z!==-1)R=R.substr(Z+1)}if(this.options.transformTagName)R=this.options.transformTagName(R);if(G)W=this.saveTextToParentTag(W,G,w);const F=w.substring(w.lastIndexOf(".")+1);if(R&&this.options.unpairedTags.indexOf(R)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${R}>`);let I=0;if(F&&this.options.unpairedTags.indexOf(F)!==-1)I=w.lastIndexOf(".",w.lastIndexOf(".")-1),this.tagsNodeStack.pop();else I=w.lastIndexOf(".");w=w.substring(0,I),G=this.tagsNodeStack.pop(),W="",L=X}else if($[L+1]==="?"){let X=oU($,L,!1,"?>");if(!X)throw new Error("Pi Tag is not closed.");if(W=this.saveTextToParentTag(W,G,w),this.options.ignoreDeclaration&&X.tagName==="?xml"||this.options.ignorePiTags);else{const R=new w1(X.tagName);if(R.add(this.options.textNodeName,""),X.tagName!==X.tagExp&&X.attrExpPresent)R[":@"]=this.buildAttributesMap(X.tagExp,w,X.tagName);this.addChild(G,R,w)}L=X.closeIndex+1}else if($.substr(L+1,3)==="!--"){const X=M0($,"-->",L+4,"Comment is not closed.");if(this.options.commentPropName){const R=$.substring(L+4,X-2);W=this.saveTextToParentTag(W,G,w),G.add(this.options.commentPropName,[{[this.options.textNodeName]:R}])}L=X}else if($.substr(L+1,2)==="!D"){const X=G7($,L);this.docTypeEntities=X.entities,L=X.i}else if($.substr(L+1,2)==="!["){const X=M0($,"]]>",L,"CDATA is not closed.")-2,R=$.substring(L+9,X);W=this.saveTextToParentTag(W,G,w);let F=this.parseTextData(R,G.tagname,w,!0,!1,!0,!0);if(F==null)F="";if(this.options.cdataPropName)G.add(this.options.cdataPropName,[{[this.options.textNodeName]:R}]);else G.add(this.options.textNodeName,F);L=X+2}else{let X=oU($,L,this.options.removeNSPrefix),R=X.tagName;const F=X.rawTagName;let{tagExp:I,attrExpPresent:Z,closeIndex:Y}=X;if(this.options.transformTagName)R=this.options.transformTagName(R);if(G&&W){if(G.tagname!=="!xml")W=this.saveTextToParentTag(W,G,w,!1)}const f=G;if(f&&this.options.unpairedTags.indexOf(f.tagname)!==-1)G=this.tagsNodeStack.pop(),w=w.substring(0,w.lastIndexOf("."));if(R!==U.tagname)w+=w?"."+R:R;if(this.isItStopNode(this.options.stopNodes,w,R)){let Q="";if(I.length>0&&I.lastIndexOf("/")===I.length-1){if(R[R.length-1]==="/")R=R.substr(0,R.length-1),w=w.substr(0,w.length-1),I=R;else I=I.substr(0,I.length-1);L=X.closeIndex}else if(this.options.unpairedTags.indexOf(R)!==-1)L=X.closeIndex;else{const K=this.readStopNodeData($,F,Y+1);if(!K)throw new Error(`Unexpected end of ${F}`);L=K.i,Q=K.tagContent}const O=new w1(R);if(R!==I&&Z)O[":@"]=this.buildAttributesMap(I,w,R);if(Q)Q=this.parseTextData(Q,R,w,!0,Z,!0,!0);w=w.substr(0,w.lastIndexOf(".")),O.add(this.options.textNodeName,Q),this.addChild(G,O,w)}else{if(I.length>0&&I.lastIndexOf("/")===I.length-1){if(R[R.length-1]==="/")R=R.substr(0,R.length-1),w=w.substr(0,w.length-1),I=R;else I=I.substr(0,I.length-1);if(this.options.transformTagName)R=this.options.transformTagName(R);const Q=new w1(R);if(R!==I&&Z)Q[":@"]=this.buildAttributesMap(I,w,R);this.addChild(G,Q,w),w=w.substr(0,w.lastIndexOf("."))}else{const Q=new w1(R);if(this.tagsNodeStack.push(G),R!==I&&Z)Q[":@"]=this.buildAttributesMap(I,w,R);this.addChild(G,Q,w),G=Q}W="",L=Y}}else W+=$[L];return U.child},Z7=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 $};uE.exports=xE});var dE=T((O7)=>{function J7($,U){return _E($,U)}function _E($,U,G){let W;const w={};for(let L=0;L<$.length;L++){const E=$[L],X=T7(E);let R="";if(G===void 0)R=X;else R=G+"."+X;if(X===U.textNodeName)if(W===void 0)W=E[X];else W+=""+E[X];else if(X===void 0)continue;else if(E[X]){let F=_E(E[X],U,R);const I=M7(F,U);if(E[":@"])K7(F,E[":@"],R,U);else if(Object.keys(F).length===1&&F[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)F=F[U.textNodeName];else if(Object.keys(F).length===0)if(U.alwaysCreateTextNode)F[U.textNodeName]="";else F="";if(w[X]!==void 0&&w.hasOwnProperty(X)){if(!Array.isArray(w[X]))w[X]=[w[X]];w[X].push(F)}else if(U.isArray(X,R,I))w[X]=[F];else w[X]=F}}if(typeof W==="string"){if(W.length>0)w[U.textNodeName]=W}else if(W!==void 0)w[U.textNodeName]=W;return w}function T7($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(W!==":@")return W}}function K7($,U,G,W){if(U){const w=Object.keys(U),L=w.length;for(let E=0;E<L;E++){const X=w[E];if(W.isArray(X,G+"."+X,!0,!0))$[X]=[U[X]];else $[X]=U[X]}}}function M7($,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}O7.prettify=J7});var lE=T((LB,pE)=>{var{buildOptions:B7}=jE(),V7=yE(),{prettify:H7}=dE(),C7=rU();class gE{constructor($){this.externalEntities={},this.options=B7($)}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=C7.validate($,U);if(w!==!0)throw Error(`${w.err.msg}:${w.err.line}:${w.err.col}`)}const G=new V7(this.options);G.addExternalEntities(this.externalEntities);const W=G.parseXml($);if(this.options.preserveOrder||W===void 0)return W;else return H7(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}}pE.exports=gE});var rE=T((EB,iE)=>{function N7($,U){let G="";if(U.format&&U.indentBy.length>0)G="\n";return sE($,U,"",G)}function sE($,U,G,W){let w="",L=!1;for(let E=0;E<$.length;E++){const X=$[E],R=q7(X);if(R===void 0)continue;let F="";if(G.length===0)F=R;else F=`${G}.${R}`;if(R===U.textNodeName){let Q=X[R];if(!j7(F,U))Q=U.tagValueProcessor(R,Q),Q=mE(Q,U);if(L)w+=W;w+=Q,L=!1;continue}else if(R===U.cdataPropName){if(L)w+=W;w+=`<![CDATA[${X[R][0][U.textNodeName]}]]>`,L=!1;continue}else if(R===U.commentPropName){w+=W+`<!--${X[R][0][U.textNodeName]}-->`,L=!0;continue}else if(R[0]==="?"){const Q=nE(X[":@"],U),O=R==="?xml"?"":W;let K=X[R][0][U.textNodeName];K=K.length!==0?" "+K:"",w+=O+`<${R}${K}${Q}?>`,L=!0;continue}let I=W;if(I!=="")I+=U.indentBy;const Z=nE(X[":@"],U),Y=W+`<${R}${Z}`,f=sE(X[R],U,F,I);if(U.unpairedTags.indexOf(R)!==-1)if(U.suppressUnpairedNode)w+=Y+">";else w+=Y+"/>";else if((!f||f.length===0)&&U.suppressEmptyNode)w+=Y+"/>";else if(f&&f.endsWith(">"))w+=Y+`>${f}${W}</${R}>`;else{if(w+=Y+">",f&&W!==""&&(f.includes("/>")||f.includes("</")))w+=W+U.indentBy+f+W;else w+=f;w+=`</${R}>`}L=!0}return w}function q7($){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 nE($,U){let G="";if($&&!U.ignoreAttributes)for(let W in $){if(!$.hasOwnProperty(W))continue;let w=U.attributeValueProcessor(W,$[W]);if(w=mE(w,U),w===!0&&U.suppressBooleanAttributes)G+=` ${W.substr(U.attributeNamePrefix.length)}`;else G+=` ${W.substr(U.attributeNamePrefix.length)}="${w}"`}return G}function j7($,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 mE($,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 $}iE.exports=N7});var tE=T((XB,oE)=>{function X0($){if(this.options=Object.assign({},S7,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=D7;if(this.processTextOrObjNode=b7,this.options.format)this.indentate=h7,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}function b7($,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 h7($){return this.options.indentBy.repeat($)}function D7($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1}var P7=rE(),S7={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};X0.prototype.build=function($){if(this.options.preserveOrder)return P7($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};X0.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 E=this.options.tagValueProcessor(w,""+$[w]);W+=this.replaceEntitiesValue(E)}else W+=this.buildTextValNode($[w],w,"",U)}else if(Array.isArray($[w])){const L=$[w].length;let E="",X="";for(let R=0;R<L;R++){const F=$[w][R];if(typeof F==="undefined");else if(F===null)if(w[0]==="?")W+=this.indentate(U)+"<"+w+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+w+"/"+this.tagEndChar;else if(typeof F==="object")if(this.options.oneListGroup){const I=this.j2x(F,U+1);if(E+=I.val,this.options.attributesGroupName&&F.hasOwnProperty(this.options.attributesGroupName))X+=I.attrStr}else E+=this.processTextOrObjNode(F,w,U);else if(this.options.oneListGroup){let I=this.options.tagValueProcessor(w,F);I=this.replaceEntitiesValue(I),E+=I}else E+=this.buildTextValNode(F,w,"",U)}if(this.options.oneListGroup)E=this.buildObjectNode(E,w,X,U);W+=E}else if(this.options.attributesGroupName&&w===this.options.attributesGroupName){const L=Object.keys($[w]),E=L.length;for(let X=0;X<E;X++)G+=this.buildAttrPairStr(L[X],""+$[w][L[X]])}else W+=this.processTextOrObjNode($[w],w,U)}return{attrStr:G,val:W}};X0.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};X0.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}};X0.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};X0.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}};X0.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 $};oE.exports=X0});var eE=T((RB,aE)=>{var k7=rU(),c7=lE(),v7=tE();aE.exports={XMLParser:c7,XMLValidator:k7,XMLBuilder:v7}});var LX=T((FB,WX)=>{var{defineProperty:z$,getOwnPropertyDescriptor:x7,getOwnPropertyNames:u7}=Object,y7=Object.prototype.hasOwnProperty,c=($,U)=>z$($,"name",{value:U,configurable:!0}),_7=($,U)=>{for(var G in U)z$($,G,{get:U[G],enumerable:!0})},d7=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of u7(U))if(!y7.call($,w)&&w!==G)z$($,w,{get:()=>U[w],enumerable:!(W=x7(U,w))||W.enumerable})}return $},g7=($)=>d7(z$({},"__esModule",{value:!0}),$),$X={};_7($X,{_toBool:()=>l7,_toNum:()=>n7,_toStr:()=>p7,awsExpectUnion:()=>m7,loadRestJsonErrorCode:()=>o7,loadRestXmlErrorCode:()=>$z,parseJsonBody:()=>GX,parseJsonErrorBody:()=>r7,parseXmlBody:()=>wX,parseXmlErrorBody:()=>e7});WX.exports=g7($X);var p7=c(($)=>{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"),l7=c(($)=>{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"),n7=c(($)=>{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"),s7=j0(),m7=c(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return s7.expectUnion($)},"awsExpectUnion"),i7=j0(),UX=c(($,U)=>i7.collectBody($,U).then((G)=>U.utf8Encoder(G)),"collectBodyString"),GX=c(($,U)=>UX($,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"),r7=c(async($,U)=>{const G=await GX($,U);return G.message=G.message??G.Message,G},"parseJsonErrorBody"),o7=c(($,U)=>{const G=c((L,E)=>Object.keys(L).find((X)=>X.toLowerCase()===E.toLowerCase()),"findKey"),W=c((L)=>{let E=L;if(typeof E==="number")E=E.toString();if(E.indexOf(",")>=0)E=E.split(",")[0];if(E.indexOf(":")>=0)E=E.split(":")[0];if(E.indexOf("#")>=0)E=E.split("#")[1];return E},"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"),t7=j0(),a7=eE(),wX=c(($,U)=>UX($,U).then((G)=>{if(G.length){const W=new a7.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(R,F)=>F.trim()===""&&F.includes("\n")?"":void 0});W.addEntity("#xD","\r"),W.addEntity("#10","\n");let w;try{w=W.parse(G,!0)}catch(R){if(R&&typeof R==="object")Object.defineProperty(R,"$responseBodyText",{value:G});throw R}const L="#text",E=Object.keys(w)[0],X=w[E];if(X[L])X[E]=X[L],delete X[L];return t7.getValueFromTextNode(X)}return{}}),"parseXmlBody"),e7=c(async($,U)=>{const G=await wX($,U);if(G.Error)G.Error.message=G.Error.message??G.Error.Message;return G},"parseXmlErrorBody"),$z=c(($,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 Uz=T((W1)=>{Object.defineProperty(W1,"__esModule",{value:!0});var aU=_L();aU.__exportStar(lL(),W1);aU.__exportStar(OE(),W1);aU.__exportStar(LX(),W1)});function Tz($){return $}var KX=($)=>(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)},MX={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Kz=($)=>({applyToStack:(U)=>{U.add(KX($),MX)}});var OX=()=>($,U)=>async(G)=>{try{const W=await $(G),{clientName:w,commandName:L,logger:E,dynamoDbDocumentClientOptions:X={}}=U,{overrideInputFilterSensitiveLog:R,overrideOutputFilterSensitiveLog:F}=X,I=R??U.inputFilterSensitiveLog,Z=F??U.outputFilterSensitiveLog,{$metadata:Y,...f}=W.output;return E?.info?.({clientName:w,commandName:L,input:I(G.input),output:Z(f),metadata:Y}),W}catch(W){const{clientName:w,commandName:L,logger:E,dynamoDbDocumentClientOptions:X={}}=U,{overrideInputFilterSensitiveLog:R}=X,F=R??U.inputFilterSensitiveLog;throw E?.error?.({clientName:w,commandName:L,input:F(G.input),error:W,metadata:W.$metadata}),W}},AX={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Oz=($)=>({applyToStack:(U)=>{U.add(OX(),AX)}});var wG="X-Amzn-Trace-Id",BX="AWS_LAMBDA_FUNCTION_NAME",VX="_X_AMZN_TRACE_ID",HX=($)=>(U)=>async(G)=>{const{request:W}=G;if(!x.isInstance(W)||$.runtime!=="node"||W.headers.hasOwnProperty(wG))return U(G);const w=process.env[BX],L=process.env[VX],E=(X)=>typeof X==="string"&&X.length>0;if(E(w)&&E(L))W.headers[wG]=L;return U({...G,request:W})},CX={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Cz=($)=>({applyToStack:(U)=>{U.add(HX($),CX)}});function qz($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}var NX=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}$"),k0=($)=>NX.test($)||$.startsWith("[")&&$.endsWith("]");var qX=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),c0=($,U=!1)=>{if(!U)return qX.test($);const G=$.split(".");for(let W of G)if(!c0(W))return!1;return!0};var v0={};var i="endpoints";function u($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${u($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(u).join(", ")})`;return JSON.stringify($,null,2)}class H extends Error{constructor($){super($);this.name="EndpointError"}}var WG=($,U)=>$===U;var LG=($)=>{const U=$.split("."),G=[];for(let W of U){const w=W.indexOf("[");if(w!==-1){if(W.indexOf("]")!==W.length-1)throw new H(`Path: '${$}' does not end with ']'`);const L=W.slice(w+1,-1);if(Number.isNaN(parseInt(L)))throw new H(`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 L1=($,U)=>LG(U).reduce((G,W)=>{if(typeof G!=="object")throw new H(`Index '${W}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(G))return G[parseInt(W)];return G[W]},$);var EG=($)=>$!=null;var XG=($)=>!$;var E1=X1(F0(),1);var J$={[E1.EndpointURLScheme.HTTP]:80,[E1.EndpointURLScheme.HTTPS]:443},RG=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:Y,port:f,protocol:Q="",path:O="",query:K={}}=$,z=new URL(`${Q}//${Y}${f?`:${f}`:""}${O}`);return z.search=Object.entries(K).map(([M,A])=>`${M}=${A}`).join("&"),z}return new URL($)}catch(Y){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:E,search:X}=U;if(X)return null;const R=E.slice(0,-1);if(!Object.values(E1.EndpointURLScheme).includes(R))return null;const F=k0(w),I=G.includes(`${W}:${J$[R]}`)||typeof $==="string"&&$.includes(`${W}:${J$[R]}`),Z=`${W}${I?`:${J$[R]}`:""}`;return{scheme:R,authority:Z,path:L,normalizedPath:L.endsWith("/")?L:`${L}/`,isIp:F}};var FG=($,U)=>$===U;var IG=($,U,G,W)=>{if(U>=G||$.length<G)return null;if(!W)return $.substring(U,G);return $.substring($.length-G,$.length-U)};var ZG=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var fG={booleanEquals:WG,getAttr:L1,isSet:EG,isValidHostLabel:c0,not:XG,parseURL:RG,stringEquals:FG,substring:IG,uriEncode:ZG};var R1=($,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 E=$.indexOf("}",L);if(E===-1){G.push($.slice(L));break}if($[L+1]==="{"&&$[E+1]==="}")G.push($.slice(L+1,E)),w=E+2;const X=$.substring(L+1,E);if(X.includes("#")){const[R,F]=X.split("#");G.push(L1(W[R],F))}else G.push(W[X]);w=E+1}return G.join("")};var YG=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var $0=($,U,G)=>{if(typeof $==="string")return R1($,G);else if($.fn)return F1($,G);else if($.ref)return YG($,G);throw new H(`'${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:$0(L,"arg",G)),w=$.split(".");if(w[0]in v0&&w[1]!=null)return v0[w[0]][w[1]](...W);return fG[$](...W)};var QG=({assign:$,...U},G)=>{if($&&$ in G.referenceRecord)throw new H(`'${$}' is already defined in Reference Record.`);const W=F1(U,G);return G.logger?.debug?.(`${i} evaluateCondition: ${u(U)} = ${u(W)}`),{result:W===""?!0:!!W,...$!=null&&{toAssign:{name:$,value:W}}}};var O0=($=[],U)=>{const G={};for(let W of $){const{result:w,toAssign:L}=QG(W,{...U,referenceRecord:{...U.referenceRecord,...G}});if(!w)return{result:w};if(L)G[L.name]=L.value,U.logger?.debug?.(`${i} assign: ${L.name} := ${u(L.value)}`)}return{result:!0,referenceRecord:G}};var zG=($,U)=>Object.entries($).reduce((G,[W,w])=>({...G,[W]:w.map((L)=>{const E=$0(L,"Header value entry",U);if(typeof E!=="string")throw new H(`Header '${W}' value '${E}' is not a string`);return E})}),{});var T$=($,U)=>{if(Array.isArray($))return $.map((G)=>T$(G,U));switch(typeof $){case"string":return R1($,U);case"object":if($===null)throw new H(`Unexpected endpoint property: ${$}`);return I1($,U);case"boolean":return $;default:throw new H(`Unexpected endpoint property type: ${typeof $}`)}};var I1=($,U)=>Object.entries($).reduce((G,[W,w])=>({...G,[W]:T$(w,U)}),{});var JG=($,U)=>{const G=$0($,"Endpoint URL",U);if(typeof G==="string")try{return new URL(G)}catch(W){throw console.error(`Failed to construct URL with ${G}`,W),W}throw new H(`Endpoint URL must be a string, got ${typeof G}`)};var TG=($,U)=>{const{conditions:G,endpoint:W}=$,{result:w,referenceRecord:L}=O0(G,U);if(!w)return;const E={...U,referenceRecord:{...U.referenceRecord,...L}},{url:X,properties:R,headers:F}=W;return U.logger?.debug?.(`${i} Resolving endpoint from template: ${u(W)}`),{...F!=null&&{headers:zG(F,E)},...R!=null&&{properties:I1(R,E)},url:JG(X,E)}};var KG=($,U)=>{const{conditions:G,error:W}=$,{result:w,referenceRecord:L}=O0(G,U);if(!w)return;throw new H($0(W,"Error",{...U,referenceRecord:{...U.referenceRecord,...L}}))};var MG=($,U)=>{const{conditions:G,rules:W}=$,{result:w,referenceRecord:L}=O0(G,U);if(!w)return;return Z1(W,{...U,referenceRecord:{...U.referenceRecord,...L}})};var Z1=($,U)=>{for(let G of $)if(G.type==="endpoint"){const W=TG(G,U);if(W)return W}else if(G.type==="error")KG(G,U);else if(G.type==="tree"){const W=MG(G,U);if(W)return W}else throw new H(`Unknown endpoint rule: ${G}`);throw new H("Rules evaluation failed")};var jX=($,U)=>{const{endpointParams:G,logger:W}=U,{parameters:w,rules:L}=$;U.logger?.debug?.(`${i} Initial EndpointParams: ${u(G)}`);const E=Object.entries(w).filter(([,F])=>F.default!=null).map(([F,I])=>[F,I.default]);if(E.length>0)for(let[F,I]of E)G[F]=G[F]??I;const X=Object.entries(w).filter(([,F])=>F.required).map(([F])=>F);for(let F of X)if(G[F]==null)throw new H(`Missing required parameter: '${F}'`);const R=Z1(L,{endpointParams:G,logger:W,referenceRecord:{}});if(U.endpointParams?.Endpoint)try{const F=new URL(U.endpointParams.Endpoint),{protocol:I,port:Z}=F;R.url.protocol=I,R.url.port=Z}catch(F){}return U.logger?.debug?.(`${i} Resolved endpoint: ${u(R)}`),R};var K$=($,U=!1)=>{if(U){for(let G of $.split("."))if(!K$(G))return!1;return!0}if(!c0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(k0($))return!1;return!0};var OG=($)=>{const U=$.split(":");if(U.length<6)return null;const[G,W,w,L,E,...X]=U;if(G!=="arn"||W===""||w===""||X.join(":")==="")return null;const R=X.map((F)=>F.split("/")).flat();return{partition:W,service:w,region:L,accountId:E,resourceId:R}};var AG={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)\\-\\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 SX=AG,bX="",BG=($)=>{const{partitions:U}=SX;for(let W of U){const{regions:w,outputs:L}=W;for(let[E,X]of Object.entries(w))if(E===$)return{...L,...X}}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 VG=()=>bX;var hX={isVirtualHostableS3Bucket:K$,parseArn:OG,partition:BG};v0.aws=hX;var M$="user-agent",f1="x-amz-user-agent",O$=" ",Y1="/",HG=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,CG=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,A$="-";var DX=($)=>(U,G)=>async(W)=>{const{request:w}=W;if(!x.isInstance(w))return U(W);const{headers:L}=w,E=G?.userAgent?.map(B$)||[],X=(await $.defaultUserAgentProvider()).map(B$),R=$?.customUserAgent?.map(B$)||[],F=VG(),I=(F?[F]:[]).concat([...X,...E,...R]).join(O$),Z=[...X.filter((Y)=>Y.startsWith("aws-sdk-")),...R].join(O$);if($.runtime!=="browser"){if(Z)L[f1]=L[f1]?`${L[M$]} ${Z}`:Z;L[M$]=I}else L[f1]=I;return U({...W,request:w})},B$=($)=>{const U=$[0].split(Y1).map((E)=>E.replace(HG,A$)).join(Y1),G=$[1]?.replace(CG,A$),W=U.indexOf(Y1),w=U.substring(0,W);let L=U.substring(W+1);if(w==="api")L=L.toLowerCase();return[w,L,G].filter((E)=>E&&E.length>0).reduce((E,X,R)=>{switch(R){case 0:return X;case 1:return`${E}/${X}`;default:return`${E}#${X}`}},"")},kX={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},EK=($)=>({applyToStack:(U)=>{U.add(DX($),kX)}});var Q1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var V$=($)=>Q1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var JK=($)=>{const{region:U,useFipsEndpoint:G}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return V$(U);const W=await U();return V$(W)},useFipsEndpoint:async()=>{const W=typeof U==="string"?U:await U();if(Q1(W))return!0;return typeof G!=="function"?Promise.resolve(!!G):G()}}};var A0=($,U,G)=>{if(!(U in $))return;if($[U]==="true")return!0;if($[U]==="false")return!1;throw new Error(`Cannot load ${G} "${U}". Expected "true" or "false", got ${$[U]}.`)};var U0;(function($){$.ENV="env",$.CONFIG="shared config entry"})(U0||(U0={}));var cX="AWS_USE_DUALSTACK_ENDPOINT",vX="use_dualstack_endpoint";var NK={environmentVariableSelector:($)=>A0($,cX,U0.ENV),configFileSelector:($)=>A0($,vX,U0.CONFIG),default:!1};var xX="AWS_USE_FIPS_ENDPOINT",uX="use_fips_endpoint";var PK={environmentVariableSelector:($)=>A0($,xX,U0.ENV),configFileSelector:($)=>A0($,uX,U0.CONFIG),default:!1};var H$=X1(F0(),1),NG=($)=>$[H$.SMITHY_CONTEXT_KEY]||($[H$.SMITHY_CONTEXT_KEY]={});var r=($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U};var qG={environmentVariableSelector:($)=>$.AWS_REGION,configFileSelector:($)=>$.region,default:()=>{throw new Error("Region is missing")}},iK={preferredFile:"credentials"};function r5($){return(U)=>async(G)=>{const W=G.request;if(x.isInstance(W)){const{body:w,headers:L}=W;if(w&&Object.keys(L).map((E)=>E.toLowerCase()).indexOf(n6)===-1)try{const E=$(w);W.headers={...W.headers,[n6]:String(E)}}catch(E){}}return U({...G,request:W})}}var n6="content-length",o5={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},C3=($)=>({applyToStack:(U)=>{U.add(r5($.bodyLengthChecker),o5)}});var $L=X1(J1(),1);var s6=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(U9(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!$9(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},t5=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,a5=/(\d+\.){3}\d+/,e5=/\.\./;var $9=($)=>t5.test($)&&!a5.test($)&&!e5.test($),U9=($)=>{const[U,G,W,,,w]=$.split(":"),L=U==="arn"&&$.split(":").length>=6,E=Boolean(L&&G&&W&&w);if(L&&!E)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return E};var m6=($,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:E,port:X,path:R}=w;return`${L}//${E}${X?":"+X:""}${R}`}}return w};return W};var i6="AWS_ENDPOINT_URL",r6="endpoint_url",o6=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((L)=>L.toUpperCase()),W=U[[i6,...G].join("_")];if(W)return W;const w=U[i6];if(w)return w;return},configFileSelector:(U,G)=>{if(G&&U.services){const w=G[["services",U.services].join(jU)];if(w){const L=$.split(" ").map((X)=>X.toLowerCase()),E=w[[L.join("_"),r6].join(jU)];if(E)return E}}const W=U[r6];if(W)return W;return},default:void 0});var t6=async($)=>z0(o6($))();var a1=($)=>{if(typeof $==="object"){if("url"in $)return PU($.url);return $}return PU($)};var a6=async($,U,G,W)=>{if(!G.endpoint){const E=await t6(G.serviceId||"");if(E)G.endpoint=()=>Promise.resolve(a1(E))}const w=await G9($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(w,W)},G9=async($,U,G)=>{const W={},w=U?.getEndpointParameterInstructions?.()||{};for(let[L,E]of Object.entries(w))switch(E.type){case"staticContextParams":W[L]=E.value;break;case"contextParams":W[L]=$[E.name];break;case"clientContextParams":case"builtInParams":W[L]=await m6(E.name,L,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(E))}if(Object.keys(w).length===0)Object.assign(W,G);if(String(G.serviceId).toLowerCase()==="s3")await s6(W);return W};var e6=({config:$,instructions:U})=>{return(G,W)=>async(w)=>{const L=await a6(w.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=L,W.authSchemes=L.properties?.authSchemes;const E=W.authSchemes?.[0];if(E){W.signing_region=E.signingRegion,W.signing_service=E.signingName;const R=NG(W)?.selectedHttpAuthScheme?.httpAuthOption;if(R)R.signingProperties=Object.assign(R.signingProperties||{},{signing_region:E.signingRegion,signingRegion:E.signingRegion,signing_service:E.signingName,signingName:E.signingName,signingRegionSet:E.signingRegionSet},E.properties)}return G({...w})}};var w9={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:$L.serializerMiddlewareOption.name},m3=($,U)=>({applyToStack:(G)=>{G.addRelativeTo(e6({config:$,instructions:U}),w9)}});var t3=($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>a1(await r(G)()):void 0;return{...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:r($.useDualstackEndpoint??!1),useFipsEndpoint:r($.useFipsEndpoint??!1)}};var d;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(d||(d={}));var J0=3,UL=d.STANDARD;var GL=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],wL=["TimeoutError","RequestTimeout","RequestTimeoutException"],WL=[500,502,503,504],LL=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var W9=($)=>$.$metadata?.clockSkewCorrected,S0=($)=>$.$metadata?.httpStatusCode===429||GL.includes($.name)||$.$retryable?.throttling==!0,e1=($)=>W9($)||wL.includes($.name)||LL.includes($?.code||"")||WL.includes($.$metadata?.httpStatusCode||0),EL=($)=>{if($.$metadata?.httpStatusCode!==void 0){const U=$.$metadata.httpStatusCode;if(500<=U&&U<=599&&!e1($))return!0;return!1}return!1};class $${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(),S0($)){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 T0=100,e0=20000,SU=500,U$=500,bU=5,hU=10,DU=1,G$="amz-sdk-invocation-id",w$="amz-sdk-request";var XL=()=>{let $=T0;return{computeNextBackoffDelay:(W)=>{return Math.floor(Math.min(e0,Math.random()*2**W*$))},setDelayBase:(W)=>{$=W}}};var kU=({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(e0,$),getRetryCost:()=>G}};class b0{constructor($){this.maxAttempts=$,this.mode=d.STANDARD,this.capacity=U$,this.retryBackoffStrategy=XL(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return kU({retryDelay:T0,retryCount:0})}async refreshRetryTokenForRetry($,U){const G=await this.getMaxAttempts();if(this.shouldRetry($,U,G)){const W=U.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?SU:T0);const w=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),L=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,w):w,E=this.getCapacityCost(W);return this.capacity-=E,kU({retryDelay:L,retryCount:$.getRetryCount()+1,retryCost:E})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(U$,this.capacity+($.getRetryCost()??DU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${J0}`),J0}}shouldRetry($,U,G){return $.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?hU:bU}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class cU{constructor($,U){this.maxAttemptsProvider=$,this.mode=d.ADAPTIVE;const{rateLimiter:G}=U??{};this.rateLimiter=G??new $$,this.standardRetryStrategy=new b0($)}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 RL="AWS_MAX_ATTEMPTS",FL="max_attempts",gO={environmentVariableSelector:($)=>{const U=$[RL];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${RL} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[FL];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${FL} mast be a number, got "${U}"`);return G},default:J0},pO=($)=>{const{retryStrategy:U}=$,G=r($.maxAttempts??J0);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await r($.retryMode)()===d.ADAPTIVE)return new cU(G);return new b0(G)}}},L9="AWS_RETRY_MODE",E9="retry_mode",lO={environmentVariableSelector:($)=>$[L9],configFileSelector:($)=>$[E9],default:UL};var m=X1(p$(),1),sO=m.default.v1,mO=m.default.v3,IL=m.default.v4,iO=m.default.v5,rO=m.default.NIL,oO=m.default.version,tO=m.default.validate,aO=m.default.stringify,eO=m.default.parse;import{Readable as X9}from"stream";var ZL=($)=>$?.body instanceof X9||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var vU=($)=>{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 R9=($)=>(U,G)=>async(W)=>{let w=await $.retryStrategy();const L=await $.maxAttempts();if(F9(w)){w=w;let E=await w.acquireInitialRetryToken(G.partition_id),X=new Error,R=0,F=0;const{request:I}=W,Z=x.isInstance(I);if(Z)I.headers[G$]=IL();while(!0)try{if(Z)I.headers[w$]=`attempt=${R+1}; max=${L}`;const{response:Y,output:f}=await U(W);return w.recordSuccess(E),f.$metadata.attempts=R+1,f.$metadata.totalRetryDelay=F,{response:Y,output:f}}catch(Y){const f=I9(Y);if(X=vU(Y),Z&&ZL(I))throw(G.logger instanceof fL?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),X;try{E=await w.refreshRetryTokenForRetry(E,f)}catch(O){if(!X.$metadata)X.$metadata={};throw X.$metadata.attempts=R+1,X.$metadata.totalRetryDelay=F,X}R=E.getRetryCount();const Q=E.getRetryDelay();F+=Q,await new Promise((O)=>setTimeout(O,Q))}}else{if(w=w,w?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",w.mode]];return w.retry(U,W)}},F9=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",I9=($)=>{const U={error:$,errorType:Z9($)},G=Y9($.$response);if(G)U.retryAfterHint=G;return U},Z9=($)=>{if(S0($))return"THROTTLING";if(e1($))return"TRANSIENT";if(EL($))return"SERVER_ERROR";return"CLIENT_ERROR"},f9={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ZA=($)=>({applyToStack:(U)=>{U.add(R9($),f9)}}),Y9=($)=>{if(!xU.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)};import{platform as Gz,release as wz}from"os";import{env as XX,versions as Wz}from"process";var eU={isCrtAvailable:!1};var EX=()=>{if(eU.isCrtAvailable)return["md/crt-avail"];return null};var Lz="AWS_SDK_UA_APP_ID",Ez="sdk-ua-app-id",KB=({serviceId:$,clientVersion:U})=>{const G=[["aws-sdk-js",U],["ua","2.0"],[`os/${Gz()}`,wz()],["lang/js"],["md/nodejs",`${Wz.node}`]],W=EX();if(W)G.push(W);if($)G.push([`api/${$}`,U]);if(XX.AWS_EXECUTION_ENV)G.push([`exec-env/${XX.AWS_EXECUTION_ENV}`]);const w=z0({environmentVariableSelector:(E)=>E[Lz],configFileSelector:(E)=>E[Ez],default:void 0})();let L=void 0;return async()=>{if(!L){const E=await w;L=E?[...G,[`app/${E}`]]:[...G]}return L}};import{Buffer as Xz}from"buffer";import{createHash as Rz,createHmac as Fz}from"crypto";function RX($,U){if(Xz.isBuffer($))return $;if(typeof $==="string")return FX($,U);if(ArrayBuffer.isView($))return $G($.buffer,$.byteOffset,$.byteLength);return $G($)}class Iz{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(IX(RX($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?Fz(this.algorithmIdentifier,RX(this.secret)):Rz(this.algorithmIdentifier)}}import{fstatSync as Zz,lstatSync as fz}from"fs";var qB=($)=>{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 fz($.path).size;else if(typeof $.fd==="number")return Zz($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var ZX="AWS_EXECUTION_ENV",UG="AWS_REGION",GG="AWS_DEFAULT_REGION",fX="AWS_EC2_METADATA_DISABLED",YX=["in-region","cross-region","mobile","standard","legacy"],QX="/latest/meta-data/placement/region";var zX={environmentVariableSelector:($)=>{return $.AWS_DEFAULTS_MODE},configFileSelector:($)=>{return $.defaults_mode},default:"legacy"};var uB=({region:$=z0(qG),defaultsMode:U=z0(zX)}={})=>JX(async()=>{const G=typeof U==="function"?await U():U;switch(G?.toLowerCase()){case"auto":return Yz($);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 ${YX.join(", ")}, got ${G}`)}}),Yz=async($)=>{if($){const U=typeof $==="function"?await $():$,G=await Qz();if(!G)return"standard";if(U===G)return"in-region";else return"cross-region"}return"standard"},Qz=async()=>{if(process.env[ZX]&&(process.env[UG]||process.env[GG]))return process.env[UG]??process.env[GG];if(!process.env[fX])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-qzys4y28.js"),G=await $();return(await U({...G,path:QX})).toString()}catch($){}};var gB=($)=>{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}}},pB=($)=>{return{region:$.region()}};export{Tz as Ba,Kz as Ca,Oz as Da,Cz as Ea,qz as Fa,v0 as Ga,jX as Ha,hX as Ia,EK as Ja,NK as Ka,PK as La,NG as Ma,r as Na,qG as Oa,iK as Pa,JK as Qa,J1 as Ra,qU as Sa,C3 as Ta,m3 as Ua,t3 as Va,UL as Wa,gO as Xa,pO as Ya,lO as Za,ZA as _a,Uz as $a,KB as ab,Iz as bb,qB as cb,uB as db,gB as eb,pB as fb};
19
+
20
+ //# debugId=08CED0AB7031091164756E2164756E21
21
+ //# sourceMappingURL=chunk-hbfjzk5j.js.map