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