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