gemi 0.4.78 → 0.4.79
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/app/index.js +1 -1
- package/dist/chunk-0f4780d78065ed6f.js +2 -0
- package/dist/chunk-1488c30be491de9b.js +2 -0
- package/dist/chunk-1e96eb132f10e361.js +2 -0
- package/dist/{chunk-4ad752c87b795617.js → chunk-3bb296632dccdb02.js} +1 -1
- package/dist/chunk-3ccfbc315f74b335.js +2 -0
- package/dist/chunk-4573fe60e6dbd787.js +2 -0
- package/dist/chunk-4e41bf12b68e3aa2.js +2 -0
- package/dist/chunk-584b2ebaffb0c907.js +9 -0
- package/dist/{chunk-28c7d04b6f555350.js → chunk-611480789c8b04f4.js} +2 -2
- package/dist/chunk-788611478527c8c3.js +6 -0
- package/dist/chunk-7ab2e8abae3c8902.js +2 -0
- package/dist/{chunk-9631e167bae739a0.js → chunk-827fe74e5b55863c.js} +1 -1
- package/dist/chunk-8b1dc3428a74b1f4.js +2 -0
- package/dist/chunk-9b2a6bd400c9c6c7.js +18 -0
- package/dist/chunk-9ca526226958d45c.js +2 -0
- package/dist/chunk-a2795d68352fdd98.js +2 -0
- package/dist/chunk-ae46c8b6092236d2.js +2 -0
- package/dist/chunk-b092d6945f70ff1c.js +2 -0
- package/dist/chunk-bfc01c0e40e4551c.js +2 -0
- package/dist/chunk-e20c0e69128c42f5.js +2 -0
- package/dist/{chunk-20e12a96dfe36b97.js → chunk-e9695f3cdafee20b.js} +1 -1
- package/dist/{chunk-4e37f45d636da627.js → chunk-ed4022c20775d58f.js} +1 -1
- package/dist/chunk-f7784dffc6c59a9e.js +2 -0
- package/dist/chunk-fcaf4626e5fe5d26.js +3 -0
- package/dist/client/index.js +8 -7
- package/dist/client/useQuery.d.ts.map +1 -1
- package/dist/email/Email.d.ts +12 -5
- package/dist/email/Email.d.ts.map +1 -1
- package/dist/email/index.d.ts +0 -2
- package/dist/email/index.d.ts.map +1 -1
- package/dist/email/index.js +1 -1
- package/dist/facades/Prefetch.d.ts.map +1 -1
- package/dist/facades/index.js +1 -1
- package/dist/http/index.js +1 -1
- package/dist/kernel/Kernel.d.ts +4 -3
- package/dist/kernel/Kernel.d.ts.map +1 -1
- package/dist/kernel/context.d.ts +2 -2
- package/dist/kernel/context.d.ts.map +1 -1
- package/dist/kernel/index.js +1 -2
- package/dist/server/index.js +1 -1
- package/dist/services/ServiceContainer.d.ts +7 -0
- package/dist/services/ServiceContainer.d.ts.map +1 -0
- package/dist/services/email/EmailServiceContainer.d.ts +8 -0
- package/dist/services/email/EmailServiceContainer.d.ts.map +1 -0
- package/dist/services/email/EmailServiceProvider.d.ts +9 -0
- package/dist/services/email/EmailServiceProvider.d.ts.map +1 -0
- package/dist/services/email/drivers/EmailDriver.d.ts +5 -0
- package/dist/services/email/drivers/EmailDriver.d.ts.map +1 -0
- package/dist/services/email/drivers/ResendDriver.d.ts +8 -0
- package/dist/services/email/drivers/ResendDriver.d.ts.map +1 -0
- package/dist/{email → services/email/drivers}/types.d.ts +2 -3
- package/dist/services/email/drivers/types.d.ts.map +1 -0
- package/dist/services/index.d.ts +4 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +1 -1
- package/package.json +2 -1
- package/dist/chunk-168ace6fc79b185b.js +0 -2
- package/dist/chunk-1c56f79378e4123d.js +0 -2
- package/dist/chunk-269dd2cd89aa1c32.js +0 -2
- package/dist/chunk-30daf610f498e198.js +0 -6
- package/dist/chunk-3abc648638ed6645.js +0 -18
- package/dist/chunk-48b2990a93ae50b3.js +0 -2
- package/dist/chunk-52dd5453e79e1cef.js +0 -2
- package/dist/chunk-5c1c113b94101135.js +0 -2
- package/dist/chunk-5fb9d31b7b4629e9.js +0 -1
- package/dist/chunk-8bf925705fdcef0c.js +0 -2
- package/dist/chunk-9c05674e98ebc485.js +0 -2
- package/dist/chunk-a5da5f8d6f9e8633.js +0 -2
- package/dist/chunk-b943cac32cc3670f.js +0 -2
- package/dist/chunk-d4eceea16ddc567d.js +0 -9
- package/dist/chunk-e64fe80074576b85.js +0 -2
- package/dist/chunk-f9d7921dc209275a.js +0 -2
- package/dist/email/EmailServiceProvider.d.ts +0 -8
- package/dist/email/EmailServiceProvider.d.ts.map +0 -1
- package/dist/email/EmailTemplate.d.ts +0 -22
- package/dist/email/EmailTemplate.d.ts.map +0 -1
- package/dist/email/providers.d.ts +0 -5
- package/dist/email/providers.d.ts.map +0 -1
- package/dist/email/types.d.ts.map +0 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import{A as Z1,B as K} from"./chunk-e3d242546d1a2927.js";import{K as mI} from"./chunk-3bb296632dccdb02.js";import{Ca as sU,Da as VL,Ga as TL,Ka as d4,Na as A6,xa as c,ya as PU,za as oX} from"./chunk-611480789c8b04f4.js";import{rb as F0} from"./chunk-ed4022c20775d58f.js";import{sb as E0,tb as TU} from"./chunk-1488c30be491de9b.js";import{ub as A$} from"./chunk-9ca526226958d45c.js";import{Ab as VU} from"./chunk-827fe74e5b55863c.js";var Y$=K((nU)=>{var jL=function($){return $&&$.__esModule?$:{default:$}},SL=function(){if(W1>X1.length-16)PL.default.randomFillSync(X1),W1=0;return X1.slice(W1,W1+=16)};Object.defineProperty(nU,"__esModule",{value:!0});nU.default=SL;var PL=jL(import.meta.require("crypto")),X1=new Uint8Array(256),W1=X1.length});var oU=K((iU)=>{Object.defineProperty(iU,"__esModule",{value:!0});iU.default=void 0;var DL=/^(?:[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=DL});var D0=K((aU)=>{var hL=function($){return $&&$.__esModule?$:{default:$}},xL=function($){return typeof $==="string"&&bL.default.test($)};Object.defineProperty(aU,"__esModule",{value:!0});aU.default=void 0;var bL=hL(oU()),vL=xL;aU.default=vL});var b0=K(($G)=>{var yL=function($){return $&&$.__esModule?$:{default:$}},eU=function($,U=0){return D[$[U+0]]+D[$[U+1]]+D[$[U+2]]+D[$[U+3]]+"-"+D[$[U+4]]+D[$[U+5]]+"-"+D[$[U+6]]+D[$[U+7]]+"-"+D[$[U+8]]+D[$[U+9]]+"-"+D[$[U+10]]+D[$[U+11]]+D[$[U+12]]+D[$[U+13]]+D[$[U+14]]+D[$[U+15]]},uL=function($,U=0){const G=eU($,U);if(!cL.default(G))throw TypeError("Stringified UUID is invalid");return G};Object.defineProperty($G,"__esModule",{value:!0});$G.default=void 0;$G.unsafeStringify=eU;var cL=yL(D0()),D=[];for(let $=0;$<256;++$)D.push(($+256).toString(16).slice(1));var _L=uL;$G.default=_L});var ZG=K((WG)=>{var sL=function($){return $&&$.__esModule?$:{default:$}},lL=function($,U,G){let W=U&&G||0;const X=U||new Array(16);$=$||{};let Z=$.node||GG,L=$.clockseq!==void 0?$.clockseq:w$;if(Z==null||L==null){const R=$.random||($.rng||pL.default)();if(Z==null)Z=GG=[R[0]|1,R[1],R[2],R[3],R[4],R[5]];if(L==null)L=w$=(R[6]<<8|R[7])&16383}let Y=$.msecs!==void 0?$.msecs:Date.now(),w=$.nsecs!==void 0?$.nsecs:Q$+1;const F=Y-F$+(w-Q$)/1e4;if(F<0&&$.clockseq===void 0)L=L+1&16383;if((F<0||Y>F$)&&$.nsecs===void 0)w=0;if(w>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");F$=Y,Q$=w,w$=L,Y+=12219292800000;const Q=((Y&268435455)*1e4+w)%4294967296;X[W++]=Q>>>24&255,X[W++]=Q>>>16&255,X[W++]=Q>>>8&255,X[W++]=Q&255;const z=Y/4294967296*1e4&268435455;X[W++]=z>>>8&255,X[W++]=z&255,X[W++]=z>>>24&15|16,X[W++]=z>>>16&255,X[W++]=L>>>8|128,X[W++]=L&255;for(let R=0;R<6;++R)X[W+R]=Z[R];return U||gL.unsafeStringify(X)};Object.defineProperty(WG,"__esModule",{value:!0});WG.default=void 0;var pL=sL(Y$()),gL=b0(),GG,w$,F$=0,Q$=0,mL=lL;WG.default=mL});var z$=K((LG)=>{var iL=function($){return $&&$.__esModule?$:{default:$}},rL=function($){if(!nL.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(LG,"__esModule",{value:!0});LG.default=void 0;var nL=iL(D0()),oL=rL;LG.default=oL});var R$=K((QG)=>{var eL=function($){return $&&$.__esModule?$:{default:$}},$Y=function($){$=unescape(encodeURIComponent($));const U=[];for(let G=0;G<$.length;++G)U.push($.charCodeAt(G));return U},UY=function($,U,G){function W(X,Z,L,Y){var w;if(typeof X==="string")X=$Y(X);if(typeof Z==="string")Z=tL.default(Z);if(((w=Z)===null||w===void 0?void 0:w.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let F=new Uint8Array(16+X.length);if(F.set(Z),F.set(X,Z.length),F=G(F),F[6]=F[6]&15|U,F[8]=F[8]&63|128,L){Y=Y||0;for(let Q=0;Q<16;++Q)L[Y+Q]=F[Q];return L}return aL.unsafeStringify(F)}try{W.name=$}catch(X){}return W.DNS=wG,W.URL=FG,W};Object.defineProperty(QG,"__esModule",{value:!0});QG.URL=QG.DNS=void 0;QG.default=UY;var aL=b0(),tL=eL(z$()),wG="6ba7b810-9dad-11d1-80b4-00c04fd430c8";QG.DNS=wG;var FG="6ba7b811-9dad-11d1-80b4-00c04fd430c8";QG.URL=FG});var EG=K((RG)=>{var ZY=function($){return $&&$.__esModule?$:{default:$}},LY=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return XY.default.createHash("md5").update($).digest()};Object.defineProperty(RG,"__esModule",{value:!0});RG.default=void 0;var XY=ZY(import.meta.require("crypto")),YY=LY;RG.default=YY});var BG=K((KG)=>{var JG=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(KG,"__esModule",{value:!0});KG.default=void 0;var wY=JG(R$()),FY=JG(EG()),QY=wY.default("v3",48,FY.default),zY=QY;KG.default=zY});var HG=K((VG)=>{var IY=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(VG,"__esModule",{value:!0});VG.default=void 0;var RY=IY(import.meta.require("crypto")),EY={randomUUID:RY.default.randomUUID};VG.default=EY});var qG=K((fG)=>{var OG=function($){return $&&$.__esModule?$:{default:$}},MY=function($,U,G){if(AG.default.randomUUID&&!U&&!$)return AG.default.randomUUID();$=$||{};const W=$.random||($.rng||JY.default)();if(W[6]=W[6]&15|64,W[8]=W[8]&63|128,U){G=G||0;for(let X=0;X<16;++X)U[G+X]=W[X];return U}return KY.unsafeStringify(W)};Object.defineProperty(fG,"__esModule",{value:!0});fG.default=void 0;var AG=OG(HG()),JY=OG(Y$()),KY=b0(),BY=MY;fG.default=BY});var jG=K((NG)=>{var TY=function($){return $&&$.__esModule?$:{default:$}},HY=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return VY.default.createHash("sha1").update($).digest()};Object.defineProperty(NG,"__esModule",{value:!0});NG.default=void 0;var VY=TY(import.meta.require("crypto")),AY=HY;NG.default=AY});var bG=K((kG)=>{var SG=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(kG,"__esModule",{value:!0});kG.default=void 0;var OY=SG(R$()),fY=SG(jG()),CY=OY.default("v5",80,fY.default),qY=CY;kG.default=qY});var vG=K((hG)=>{Object.defineProperty(hG,"__esModule",{value:!0});hG.default=void 0;var NY="00000000-0000-0000-0000-000000000000";hG.default=NY});var uG=K((cG)=>{var jY=function($){return $&&$.__esModule?$:{default:$}},SY=function($){if(!PY.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)};Object.defineProperty(cG,"__esModule",{value:!0});cG.default=void 0;var PY=jY(D0()),kY=SY;cG.default=kY});var I$=K((p)=>{var i=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(p,"__esModule",{value:!0});Object.defineProperty(p,"NIL",{enumerable:!0,get:function(){return vY.default}});Object.defineProperty(p,"parse",{enumerable:!0,get:function(){return _Y.default}});Object.defineProperty(p,"stringify",{enumerable:!0,get:function(){return uY.default}});Object.defineProperty(p,"v1",{enumerable:!0,get:function(){return DY.default}});Object.defineProperty(p,"v3",{enumerable:!0,get:function(){return bY.default}});Object.defineProperty(p,"v4",{enumerable:!0,get:function(){return hY.default}});Object.defineProperty(p,"v5",{enumerable:!0,get:function(){return xY.default}});Object.defineProperty(p,"validate",{enumerable:!0,get:function(){return yY.default}});Object.defineProperty(p,"version",{enumerable:!0,get:function(){return cY.default}});var DY=i(ZG()),bY=i(BG()),hY=i(qG()),xY=i(bG()),vY=i(vG()),cY=i(uG()),yY=i(D0()),uY=i(b0()),_Y=i(z$())});var h0=K((sE,lG)=>{var{defineProperty:L1,getOwnPropertyDescriptor:rY,getOwnPropertyNames:oY}=Object,aY=Object.prototype.hasOwnProperty,gG=($,U)=>L1($,"name",{value:U,configurable:!0}),tY=($,U)=>{for(var G in U)L1($,G,{get:U[G],enumerable:!0})},eY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of oY(U))if(!aY.call($,X)&&X!==G)L1($,X,{get:()=>U[X],enumerable:!(W=rY(U,X))||W.enumerable})}return $},$5=($)=>eY(L1({},"__esModule",{value:!0}),$),sG={};tY(sG,{getSmithyContext:()=>U5,normalizeProvider:()=>G5});lG.exports=$5(sG);var pG=F0(),U5=gG(($)=>$[pG.SMITHY_CONTEXT_KEY]||($[pG.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),G5=gG(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var V0=K((mG)=>{Object.defineProperty(mG,"__esModule",{value:!0});mG.getHomeDir=void 0;var W5=import.meta.require("os"),X5=import.meta.require("path"),E$={},Z5=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},L5=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:G,HOMEDRIVE:W=`C:${X5.sep}`}=process.env;if($)return $;if(U)return U;if(G)return`${W}${G}`;const X=Z5();if(!E$[X])E$[X]=W5.homedir();return E$[X]};mG.getHomeDir=L5});var J$=K((iG)=>{Object.defineProperty(iG,"__esModule",{value:!0});iG.getSSOTokenFilepath=void 0;var Y5=import.meta.require("crypto"),w5=import.meta.require("path"),F5=V0(),Q5=($)=>{const G=Y5.createHash("sha1").update($).digest("hex");return w5.join(F5.getHomeDir(),".aws","sso","cache",`${G}.json`)};iG.getSSOTokenFilepath=Q5});var tG=K((oG)=>{Object.defineProperty(oG,"__esModule",{value:!0});oG.getSSOTokenFromFile=void 0;var z5=import.meta.require("fs"),R5=J$(),{readFile:I5}=z5.promises,E5=async($)=>{const U=R5.getSSOTokenFilepath($),G=await I5(U,"utf8");return JSON.parse(G)};oG.getSSOTokenFromFile=E5});var M$=K((eG)=>{Object.defineProperty(eG,"__esModule",{value:!0});eG.slurpFile=void 0;var J5=import.meta.require("fs"),{readFile:K5}=J5.promises,K$={},M5=($,U)=>{if(!K$[$]||(U===null||U===void 0?void 0:U.ignoreCache))K$[$]=K5($,"utf8");return K$[$]};eG.slurpFile=M5});var H$=K((rE,v0)=>{var{defineProperty:F1,getOwnPropertyDescriptor:B5,getOwnPropertyNames:V5}=Object,T5=Object.prototype.hasOwnProperty,y=($,U)=>F1($,"name",{value:U,configurable:!0}),H5=($,U)=>{for(var G in U)F1($,G,{get:U[G],enumerable:!0})},B$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of V5(U))if(!T5.call($,X)&&X!==G)F1($,X,{get:()=>U[X],enumerable:!(W=B5(U,X))||W.enumerable})}return $},T$=($,U,G)=>(B$($,U,"default"),G&&B$(G,U,"default")),A5=($)=>B$(F1({},"__esModule",{value:!0}),$),x0={};H5(x0,{CONFIG_PREFIX_SEPARATOR:()=>Q0,DEFAULT_PROFILE:()=>X8,ENV_PROFILE:()=>W8,getProfileName:()=>O5,loadSharedConfigFiles:()=>L8,loadSsoSessionData:()=>v5,parseKnownFiles:()=>y5});v0.exports=A5(x0);T$(x0,V0(),v0.exports);var W8="AWS_PROFILE",X8="default",O5=y(($)=>$.profile||process.env[W8]||X8,"getProfileName");T$(x0,J$(),v0.exports);T$(x0,tG(),v0.exports);var Y1=F0(),f5=y(($)=>Object.entries($).filter(([U])=>{const G=U.indexOf(Q0);if(G===-1)return!1;return Object.values(Y1.IniSectionType).includes(U.substring(0,G))}).reduce((U,[G,W])=>{const X=G.indexOf(Q0),Z=G.substring(0,X)===Y1.IniSectionType.PROFILE?G.substring(X+1):G;return U[Z]=W,U},{...$.default&&{default:$.default}}),"getConfigData"),w1=import.meta.require("path"),C5=V0(),q5="AWS_CONFIG_FILE",Z8=y(()=>process.env[q5]||w1.join(C5.getHomeDir(),".aws","config"),"getConfigFilepath"),N5=V0(),P5="AWS_SHARED_CREDENTIALS_FILE",j5=y(()=>process.env[P5]||w1.join(N5.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),S5=V0(),k5=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,D5=["__proto__","profile __proto__"],V$=y(($)=>{const U={};let G,W;for(let X of $.split(/\r?\n/)){const Z=X.split(/(^|\s)[;#]/)[0].trim();if(Z[0]==="["&&Z[Z.length-1]==="]"){G=void 0,W=void 0;const Y=Z.substring(1,Z.length-1),w=k5.exec(Y);if(w){const[,F,,Q]=w;if(Object.values(Y1.IniSectionType).includes(F))G=[F,Q].join(Q0)}else G=Y;if(D5.includes(Y))throw new Error(`Found invalid profile name "${Y}"`)}else if(G){const Y=Z.indexOf("=");if(![0,-1].includes(Y)){const[w,F]=[Z.substring(0,Y).trim(),Z.substring(Y+1).trim()];if(F==="")W=w;else{if(W&&X.trimStart()===X)W=void 0;U[G]=U[G]||{};const Q=W?[W,w].join(Q0):w;U[G][Q]=F}}}}return U},"parseIni"),U8=M$(),G8=y(()=>({}),"swallowError"),Q0=".",L8=y(async($={})=>{const{filepath:U=j5(),configFilepath:G=Z8()}=$,W=S5.getHomeDir();let Z=U;if(U.startsWith("~/"))Z=w1.join(W,U.slice(2));let L=G;if(G.startsWith("~/"))L=w1.join(W,G.slice(2));const Y=await Promise.all([U8.slurpFile(L,{ignoreCache:$.ignoreCache}).then(V$).then(f5).catch(G8),U8.slurpFile(Z,{ignoreCache:$.ignoreCache}).then(V$).catch(G8)]);return{configFile:Y[0],credentialsFile:Y[1]}},"loadSharedConfigFiles"),b5=y(($)=>Object.entries($).filter(([U])=>U.startsWith(Y1.IniSectionType.SSO_SESSION+Q0)).reduce((U,[G,W])=>({...U,[G.substring(G.indexOf(Q0)+1)]:W}),{}),"getSsoSessionData"),h5=M$(),x5=y(()=>({}),"swallowError"),v5=y(async($={})=>h5.slurpFile($.configFilepath??Z8()).then(V$).then(b5).catch(x5),"loadSsoSessionData"),c5=y((...$)=>{const U={};for(let G of $)for(let[W,X]of Object.entries(G))if(U[W]!==void 0)Object.assign(U[W],X);else U[W]=X;return U},"mergeConfigFiles"),y5=y(async($)=>{const U=await L8($);return c5(U.configFile,U.credentialsFile)},"parseKnownFiles")});var Q8=K((oE,F8)=>{var O$=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 $}},Q1=Object.defineProperty,u5=Object.getOwnPropertyDescriptor,_5=Object.getOwnPropertyNames,d5=Object.prototype.hasOwnProperty,T0=($,U)=>Q1($,"name",{value:U,configurable:!0}),p5=($,U)=>{for(var G in U)Q1($,G,{get:U[G],enumerable:!0})},g5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of _5(U))if(!d5.call($,X)&&X!==G)Q1($,X,{get:()=>U[X],enumerable:!(W=u5(U,X))||W.enumerable})}return $},s5=($)=>g5(Q1({},"__esModule",{value:!0}),$),w8={};p5(w8,{loadConfig:()=>r5});F8.exports=s5(w8);var c0=A$();T0(O$,"getSelectorName");var l5=T0(($,U)=>async()=>{try{const G=$(process.env);if(G===void 0)throw new Error;return G}catch(G){throw new c0.CredentialsProviderError(G.message||`Not found in ENV: ${O$($.toString())}`,{logger:U})}},"fromEnv"),Y8=H$(),m5=T0(($,{preferredFile:U="config",...G}={})=>async()=>{const W=Y8.getProfileName(G),{configFile:X,credentialsFile:Z}=await Y8.loadSharedConfigFiles(G),L=Z[W]||{},Y=X[W]||{},w=U==="config"?{...L,...Y}:{...Y,...L};try{const Q=$(w,U==="config"?X:Z);if(Q===void 0)throw new Error;return Q}catch(F){throw new c0.CredentialsProviderError(F.message||`Not found in config files w/ profile [${W}]: ${O$($.toString())}`,{logger:G.logger})}},"fromSharedConfigFiles"),n5=T0(($)=>typeof $==="function","isFunction"),i5=T0(($)=>n5($)?async()=>await $():c0.fromStatic($),"fromStatic"),r5=T0(({environmentVariableSelector:$,configFileSelector:U,default:G},W={})=>c0.memoize(c0.chain(l5($),m5(U,W),i5(G))),"loadConfig")});var K8=K((E8)=>{Object.defineProperty(E8,"__esModule",{value:!0});E8.getEndpointUrlConfig=void 0;var z8=H$(),R8="AWS_ENDPOINT_URL",I8="endpoint_url",o5=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((Z)=>Z.toUpperCase()),W=U[[R8,...G].join("_")];if(W)return W;const X=U[R8];if(X)return X;return},configFileSelector:(U,G)=>{if(G&&U.services){const X=G[["services",U.services].join(z8.CONFIG_PREFIX_SEPARATOR)];if(X){const Z=$.split(" ").map((Y)=>Y.toLowerCase()),L=X[[Z.join("_"),I8].join(z8.CONFIG_PREFIX_SEPARATOR)];if(L)return L}}const W=U[I8];if(W)return W;return},default:void 0});E8.getEndpointUrlConfig=o5});var V8=K((M8)=>{Object.defineProperty(M8,"__esModule",{value:!0});M8.getEndpointFromConfig=void 0;var a5=Q8(),t5=K8(),e5=async($)=>a5.loadConfig(t5.getEndpointUrlConfig($))();M8.getEndpointFromConfig=e5});var O8=K((eE,A8)=>{var H8=function($){const U={};if($=$.replace(/^\?/,""),$)for(let G of $.split("&")){let[W,X=null]=G.split("=");if(W=decodeURIComponent(W),X)X=decodeURIComponent(X);if(!(W in U))U[W]=X;else if(Array.isArray(U[W]))U[W].push(X);else U[W]=[U[W],X]}return U},z1=Object.defineProperty,$2=Object.getOwnPropertyDescriptor,U2=Object.getOwnPropertyNames,G2=Object.prototype.hasOwnProperty,W2=($,U)=>z1($,"name",{value:U,configurable:!0}),X2=($,U)=>{for(var G in U)z1($,G,{get:U[G],enumerable:!0})},Z2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of U2(U))if(!G2.call($,X)&&X!==G)z1($,X,{get:()=>U[X],enumerable:!(W=$2(U,X))||W.enumerable})}return $},L2=($)=>Z2(z1({},"__esModule",{value:!0}),$),T8={};X2(T8,{parseQueryString:()=>H8});A8.exports=L2(T8);W2(H8,"parseQueryString")});var N8=K(($J,q8)=>{var{defineProperty:R1,getOwnPropertyDescriptor:Y2,getOwnPropertyNames:w2}=Object,F2=Object.prototype.hasOwnProperty,Q2=($,U)=>R1($,"name",{value:U,configurable:!0}),z2=($,U)=>{for(var G in U)R1($,G,{get:U[G],enumerable:!0})},R2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of w2(U))if(!F2.call($,X)&&X!==G)R1($,X,{get:()=>U[X],enumerable:!(W=Y2(U,X))||W.enumerable})}return $},I2=($)=>R2(R1({},"__esModule",{value:!0}),$),f8={};z2(f8,{parseUrl:()=>C8});q8.exports=I2(f8);var E2=O8(),C8=Q2(($)=>{if(typeof $==="string")return C8(new URL($));const{hostname:U,pathname:G,port:W,protocol:X,search:Z}=$;let L;if(Z)L=E2.parseQueryString(Z);return{hostname:U,port:W?parseInt(W):void 0,protocol:X,path:G,query:L}},"parseUrl")});var C$=K((UJ,h8)=>{var b8=function($,U,G){return{applyToStack:(W)=>{W.add(j8($,G),k8),W.add(S8($,U),D8)}}},I1=Object.defineProperty,J2=Object.getOwnPropertyDescriptor,K2=Object.getOwnPropertyNames,M2=Object.prototype.hasOwnProperty,f$=($,U)=>I1($,"name",{value:U,configurable:!0}),B2=($,U)=>{for(var G in U)I1($,G,{get:U[G],enumerable:!0})},V2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of K2(U))if(!M2.call($,X)&&X!==G)I1($,X,{get:()=>U[X],enumerable:!(W=J2(U,X))||W.enumerable})}return $},T2=($)=>V2(I1({},"__esModule",{value:!0}),$),P8={};B2(P8,{deserializerMiddleware:()=>j8,deserializerMiddlewareOption:()=>k8,getSerdePlugin:()=>b8,serializerMiddleware:()=>S8,serializerMiddlewareOption:()=>D8});h8.exports=T2(P8);var j8=f$(($,U)=>(G)=>async(W)=>{const{response:X}=await G(W);try{const Z=await U(X,$);return{response:X,output:Z}}catch(Z){if(Object.defineProperty(Z,"$response",{value:X}),!("$metadata"in Z)){if(Z.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof Z.$responseBodyText!=="undefined"){if(Z.$response)Z.$response.body=Z.$responseBodyText}}throw Z}},"deserializerMiddleware"),S8=f$(($,U)=>(G,W)=>async(X)=>{var Z;const L=((Z=W.endpointV2)==null?void 0:Z.url)&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!L)throw new Error("No valid endpoint provider available.");const Y=await U(X.input,{...$,endpoint:L});return G({...X,request:Y})},"serializerMiddleware"),k8={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},D8={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};f$(b8,"getSerdePlugin")});var p8=K((GJ,d8)=>{var{defineProperty:J1,getOwnPropertyDescriptor:H2,getOwnPropertyNames:A2}=Object,O2=Object.prototype.hasOwnProperty,g=($,U)=>J1($,"name",{value:U,configurable:!0}),f2=($,U)=>{for(var G in U)J1($,G,{get:U[G],enumerable:!0})},C2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of A2(U))if(!O2.call($,X)&&X!==G)J1($,X,{get:()=>U[X],enumerable:!(W=H2(U,X))||W.enumerable})}return $},q2=($)=>C2(J1({},"__esModule",{value:!0}),$),v8={};f2(v8,{endpointMiddleware:()=>u8,endpointMiddlewareOptions:()=>_8,getEndpointFromInstructions:()=>c8,getEndpointPlugin:()=>v2,resolveEndpointConfig:()=>c2,resolveParams:()=>y8,toEndpointV1:()=>q$});d8.exports=q2(v8);var N2=g(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(D2(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!k2(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),P2=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,j2=/(\d+\.){3}\d+/,S2=/\.\./,k2=g(($)=>P2.test($)&&!j2.test($)&&!S2.test($),"isDnsCompatibleBucketName"),D2=g(($)=>{const[U,G,W,,,X]=$.split(":"),Z=U==="arn"&&$.split(":").length>=6,L=Boolean(Z&&G&&W&&X);if(Z&&!L)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return L},"isArnBucketName"),b2=g(($,U,G)=>{const W=g(async()=>{const X=G[$]??G[U];if(typeof X==="function")return X();return X},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return(X==null?void 0:X.credentialScope)??(X==null?void 0:X.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return(X==null?void 0:X.accountId)??(X==null?void 0:X.AccountId)};if($==="endpoint"||U==="endpoint")return async()=>{const X=await W();if(X&&typeof X==="object"){if("url"in X)return X.url.href;if("hostname"in X){const{protocol:Z,hostname:L,port:Y,path:w}=X;return`${Z}//${L}${Y?":"+Y:""}${w}`}}return X};return W},"createConfigValueProvider"),h2=V8(),x8=N8(),q$=g(($)=>{if(typeof $==="object"){if("url"in $)return x8.parseUrl($.url);return $}return x8.parseUrl($)},"toEndpointV1"),c8=g(async($,U,G,W)=>{if(!G.endpoint){const L=await h2.getEndpointFromConfig(G.serviceId||"");if(L)G.endpoint=()=>Promise.resolve(q$(L))}const X=await y8($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(X,W)},"getEndpointFromInstructions"),y8=g(async($,U,G)=>{var W;const X={},Z=((W=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:W.call(U))||{};for(let[L,Y]of Object.entries(Z))switch(Y.type){case"staticContextParams":X[L]=Y.value;break;case"contextParams":X[L]=$[Y.name];break;case"clientContextParams":case"builtInParams":X[L]=await b2(Y.name,L,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(Y))}if(Object.keys(Z).length===0)Object.assign(X,G);if(String(G.serviceId).toLowerCase()==="s3")await N2(X);return X},"resolveParams"),E1=h0(),u8=g(({config:$,instructions:U})=>{return(G,W)=>async(X)=>{var Z,L,Y;const w=await c8(X.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=w,W.authSchemes=(Z=w.properties)==null?void 0:Z.authSchemes;const F=(L=W.authSchemes)==null?void 0:L[0];if(F){W.signing_region=F.signingRegion,W.signing_service=F.signingName;const Q=E1.getSmithyContext(W),z=(Y=Q==null?void 0:Q.selectedHttpAuthScheme)==null?void 0:Y.httpAuthOption;if(z)z.signingProperties=Object.assign(z.signingProperties||{},{signing_region:F.signingRegion,signingRegion:F.signingRegion,signing_service:F.signingName,signingName:F.signingName,signingRegionSet:F.signingRegionSet},F.properties)}return G({...X})}},"endpointMiddleware"),x2=C$(),_8={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:x2.serializerMiddlewareOption.name},v2=g(($,U)=>({applyToStack:(G)=>{G.addRelativeTo(u8({config:$,instructions:U}),_8)}}),"getEndpointPlugin"),c2=g(($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>q$(await E1.normalizeProvider(G)()):void 0;return{...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:E1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:E1.normalizeProvider($.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var r=K((WJ,a8)=>{var i8=function($){return Object.keys($).reduce((U,G)=>{const W=$[G];return{...U,[G]:Array.isArray(W)?[...W]:W}},{})},o8=function($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)},K1=Object.defineProperty,y2=Object.getOwnPropertyDescriptor,u2=Object.getOwnPropertyNames,_2=Object.prototype.hasOwnProperty,$0=($,U)=>K1($,"name",{value:U,configurable:!0}),d2=($,U)=>{for(var G in U)K1($,G,{get:U[G],enumerable:!0})},p2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of u2(U))if(!_2.call($,X)&&X!==G)K1($,X,{get:()=>U[X],enumerable:!(W=y2(U,X))||W.enumerable})}return $},g2=($)=>p2(K1({},"__esModule",{value:!0}),$),g8={};d2(g8,{Field:()=>m2,Fields:()=>n2,HttpRequest:()=>i2,HttpResponse:()=>r2,IHttpRequest:()=>s8.HttpRequest,getHttpHandlerExtensionConfiguration:()=>s2,isValidHostname:()=>o8,resolveHttpHandlerRuntimeConfig:()=>l2});a8.exports=g2(g8);var s2=$0(($)=>{let U=$.httpHandler;return{setHttpHandler(G){U=G},httpHandler(){return U},updateHttpClientConfig(G,W){U.updateHttpClientConfig(G,W)},httpHandlerConfigs(){return U.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),l2=$0(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),s8=F0(),l8=class ${constructor({name:U,kind:G=s8.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}};$0(l8,"Field");var m2=l8,m8=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)}};$0(m8,"Fields");var n2=m8,n8=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=i8(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)}};$0(n8,"HttpRequest");var i2=n8;$0(i8,"cloneQuery");var r8=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"}};$0(r8,"HttpResponse");var r2=r8;$0(o8,"isValidHostname")});var N$=K((XJ,U4)=>{var{defineProperty:M1,getOwnPropertyDescriptor:o2,getOwnPropertyNames:a2}=Object,t2=Object.prototype.hasOwnProperty,H0=($,U)=>M1($,"name",{value:U,configurable:!0}),e2=($,U)=>{for(var G in U)M1($,G,{get:U[G],enumerable:!0})},$w=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of a2(U))if(!t2.call($,X)&&X!==G)M1($,X,{get:()=>U[X],enumerable:!(W=o2(U,X))||W.enumerable})}return $},Uw=($)=>$w(M1({},"__esModule",{value:!0}),$),t8={};e2(t8,{isClockSkewCorrectedError:()=>e8,isClockSkewError:()=>ww,isRetryableByTrait:()=>Yw,isServerError:()=>Qw,isThrottlingError:()=>Fw,isTransientError:()=>$4});U4.exports=Uw(t8);var Gw=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Ww=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Xw=["TimeoutError","RequestTimeout","RequestTimeoutException"],Zw=[500,502,503,504],Lw=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Yw=H0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),ww=H0(($)=>Gw.includes($.name),"isClockSkewError"),e8=H0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),Fw=H0(($)=>{var U,G;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||Ww.includes($.name)||((G=$.$retryable)==null?void 0:G.throttling)==!0},"isThrottlingError"),$4=H0(($)=>{var U;return e8($)||Xw.includes($.name)||Lw.includes(($==null?void 0:$.code)||"")||Zw.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),Qw=H0(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const G=$.$metadata.httpStatusCode;if(500<=G&&G<=599&&!$4($))return!0;return!1}return!1},"isServerError")});var J4=K((ZJ,E4)=>{var{defineProperty:B1,getOwnPropertyDescriptor:zw,getOwnPropertyNames:Rw}=Object,Iw=Object.prototype.hasOwnProperty,s=($,U)=>B1($,"name",{value:U,configurable:!0}),Ew=($,U)=>{for(var G in U)B1($,G,{get:U[G],enumerable:!0})},Jw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Rw(U))if(!Iw.call($,X)&&X!==G)B1($,X,{get:()=>U[X],enumerable:!(W=zw(U,X))||W.enumerable})}return $},Kw=($)=>Jw(B1({},"__esModule",{value:!0}),$),W4={};Ew(W4,{AdaptiveRetryStrategy:()=>Aw,ConfiguredRetryStrategy:()=>Ow,DEFAULT_MAX_ATTEMPTS:()=>P$,DEFAULT_RETRY_DELAY_BASE:()=>y0,DEFAULT_RETRY_MODE:()=>Mw,DefaultRateLimiter:()=>L4,INITIAL_RETRY_TOKENS:()=>j$,INVOCATION_ID_HEADER:()=>Vw,MAXIMUM_RETRY_DELAY:()=>S$,NO_RETRY_INCREMENT:()=>Q4,REQUEST_HEADER:()=>Tw,RETRY_COST:()=>w4,RETRY_MODES:()=>X4,StandardRetryStrategy:()=>k$,THROTTLING_RETRY_DELAY_BASE:()=>Y4,TIMEOUT_RETRY_COST:()=>F4});E4.exports=Kw(W4);var X4=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(X4||{}),P$=3,Mw="standard",Bw=N$(),Z4=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(),Bw.isThrottlingError(U)){const X=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=X,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),G=this.cubicThrottle(X),this.enableTokenBucket()}else this.calculateTimeWindow(),G=this.cubicSuccess(this.getCurrentTimeInSeconds());const W=Math.min(G,2*this.measuredTxRate);this.updateTokenBucketRate(W)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(U){return this.getPrecise(U*this.beta)}cubicSuccess(U){return this.getPrecise(this.scaleConstant*Math.pow(U-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(U){this.refillTokenBucket(),this.fillRate=Math.max(U,this.minFillRate),this.maxCapacity=Math.max(U,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const U=this.getCurrentTimeInSeconds(),G=Math.floor(U*2)/2;if(this.requestCount++,G>this.lastTxRateBucket){const W=this.requestCount/(G-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(W*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=G}}getPrecise(U){return parseFloat(U.toFixed(8))}};s(Z4,"DefaultRateLimiter");var L4=Z4,y0=100,S$=20000,Y4=500,j$=500,w4=5,F4=10,Q4=1,Vw="amz-sdk-invocation-id",Tw="amz-sdk-request",Hw=s(()=>{let $=y0;return{computeNextBackoffDelay:s((W)=>{return Math.floor(Math.min(S$,Math.random()*2**W*$))},"computeNextBackoffDelay"),setDelayBase:s((W)=>{$=W},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),G4=s(({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:s(()=>U,"getRetryCount"),getRetryDelay:s(()=>Math.min(S$,$),"getRetryDelay"),getRetryCost:s(()=>G,"getRetryCost")}},"createDefaultRetryToken"),z4=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=j$,this.retryBackoffStrategy=Hw(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return G4({retryDelay:y0,retryCount:0})}async refreshRetryTokenForRetry(U,G){const W=await this.getMaxAttempts();if(this.shouldRetry(U,G,W)){const X=G.errorType;this.retryBackoffStrategy.setDelayBase(X==="THROTTLING"?Y4:y0);const Z=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),L=G.retryAfterHint?Math.max(G.retryAfterHint.getTime()-Date.now()||0,Z):Z,Y=this.getCapacityCost(X);return this.capacity-=Y,G4({retryDelay:L,retryCount:U.getRetryCount()+1,retryCost:Y})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(j$,this.capacity+(U.getRetryCost()??Q4))}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"?F4:w4}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};s(z4,"StandardRetryStrategy");var k$=z4,R4=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:W}=G??{};this.rateLimiter=W??new L4,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)}};s(R4,"AdaptiveRetryStrategy");var Aw=R4,I4=class $ extends k${constructor(U,G=y0){super(typeof U==="function"?U:async()=>U);if(typeof G==="number")this.computeNextBackoffDelay=()=>G;else this.computeNextBackoffDelay=G}async refreshRetryTokenForRetry(U,G){const W=await super.refreshRetryTokenForRetry(U,G);return W.getRetryDelay=()=>this.computeNextBackoffDelay(W.getRetryCount()),W}};s(I4,"ConfiguredRetryStrategy");var Ow=I4});var T4=K((LJ,V4)=>{var{defineProperty:V1,getOwnPropertyDescriptor:fw,getOwnPropertyNames:Cw}=Object,qw=Object.prototype.hasOwnProperty,u=($,U)=>V1($,"name",{value:U,configurable:!0}),Nw=($,U)=>{for(var G in U)V1($,G,{get:U[G],enumerable:!0})},Pw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Cw(U))if(!qw.call($,X)&&X!==G)V1($,X,{get:()=>U[X],enumerable:!(W=fw(U,X))||W.enumerable})}return $},jw=($)=>Pw(V1({},"__esModule",{value:!0}),$),B4={};Nw(B4,{constructStack:()=>D$});V4.exports=jw(B4);var z0=u(($,U)=>{const G=[];if($)G.push($);if(U)for(let W of U)G.push(W);return G},"getAllAliases"),U0=u(($,U)=>{return`${$||"anonymous"}${U&&U.length>0?` (a.k.a. ${U.join(",")})`:""}`},"getMiddlewareNameWithAliases"),D$=u(()=>{let $=[],U=[],G=!1;const W=new Set,X=u((z)=>z.sort((R,I)=>K4[I.step]-K4[R.step]||M4[I.priority||"normal"]-M4[R.priority||"normal"]),"sort"),Z=u((z)=>{let R=!1;const I=u((J)=>{const T=z0(J.name,J.aliases);if(T.includes(z)){R=!0;for(let M of T)W.delete(M);return!1}return!0},"filterCb");return $=$.filter(I),U=U.filter(I),R},"removeByName"),L=u((z)=>{let R=!1;const I=u((J)=>{if(J.middleware===z){R=!0;for(let T of z0(J.name,J.aliases))W.delete(T);return!1}return!0},"filterCb");return $=$.filter(I),U=U.filter(I),R},"removeByReference"),Y=u((z)=>{var R;return $.forEach((I)=>{z.add(I.middleware,{...I})}),U.forEach((I)=>{z.addRelativeTo(I.middleware,{...I})}),(R=z.identifyOnResolve)==null||R.call(z,Q.identifyOnResolve()),z},"cloneTo"),w=u((z)=>{const R=[];return z.before.forEach((I)=>{if(I.before.length===0&&I.after.length===0)R.push(I);else R.push(...w(I))}),R.push(z),z.after.reverse().forEach((I)=>{if(I.before.length===0&&I.after.length===0)R.push(I);else R.push(...w(I))}),R},"expandRelativeMiddlewareList"),F=u((z=!1)=>{const R=[],I=[],J={};return $.forEach((M)=>{const V={...M,before:[],after:[]};for(let B of z0(V.name,V.aliases))J[B]=V;R.push(V)}),U.forEach((M)=>{const V={...M,before:[],after:[]};for(let B of z0(V.name,V.aliases))J[B]=V;I.push(V)}),I.forEach((M)=>{if(M.toMiddleware){const V=J[M.toMiddleware];if(V===void 0){if(z)return;throw new Error(`${M.toMiddleware} is not found when adding ${U0(M.name,M.aliases)} middleware ${M.relation} ${M.toMiddleware}`)}if(M.relation==="after")V.after.push(M);if(M.relation==="before")V.before.push(M)}}),X(R).map(w).reduce((M,V)=>{return M.push(...V),M},[])},"getMiddlewareList"),Q={add:(z,R={})=>{const{name:I,override:J,aliases:T}=R,M={step:"initialize",priority:"normal",middleware:z,...R},V=z0(I,T);if(V.length>0){if(V.some((B)=>W.has(B))){if(!J)throw new Error(`Duplicate middleware name '${U0(I,T)}'`);for(let B of V){const H=$.findIndex((k)=>{var e;return k.name===B||((e=k.aliases)==null?void 0:e.some((w0)=>w0===B))});if(H===-1)continue;const A=$[H];if(A.step!==M.step||M.priority!==A.priority)throw new Error(`"${U0(A.name,A.aliases)}" middleware with ${A.priority} priority in ${A.step} step cannot be overridden by "${U0(I,T)}" middleware with ${M.priority} priority in ${M.step} step.`);$.splice(H,1)}}for(let B of V)W.add(B)}$.push(M)},addRelativeTo:(z,R)=>{const{name:I,override:J,aliases:T}=R,M={middleware:z,...R},V=z0(I,T);if(V.length>0){if(V.some((B)=>W.has(B))){if(!J)throw new Error(`Duplicate middleware name '${U0(I,T)}'`);for(let B of V){const H=U.findIndex((k)=>{var e;return k.name===B||((e=k.aliases)==null?void 0:e.some((w0)=>w0===B))});if(H===-1)continue;const A=U[H];if(A.toMiddleware!==M.toMiddleware||A.relation!==M.relation)throw new Error(`"${U0(A.name,A.aliases)}" middleware ${A.relation} "${A.toMiddleware}" middleware cannot be overridden by "${U0(I,T)}" middleware ${M.relation} "${M.toMiddleware}" middleware.`);U.splice(H,1)}}for(let B of V)W.add(B)}U.push(M)},clone:()=>Y(D$()),use:(z)=>{z.applyToStack(Q)},remove:(z)=>{if(typeof z==="string")return Z(z);else return L(z)},removeByTag:(z)=>{let R=!1;const I=u((J)=>{const{tags:T,name:M,aliases:V}=J;if(T&&T.includes(z)){const B=z0(M,V);for(let H of B)W.delete(H);return R=!0,!1}return!0},"filterCb");return $=$.filter(I),U=U.filter(I),R},concat:(z)=>{var R;const I=Y(D$());return I.use(z),I.identifyOnResolve(G||I.identifyOnResolve()||(((R=z.identifyOnResolve)==null?void 0:R.call(z))??!1)),I},applyToStack:Y,identify:()=>{return F(!0).map((z)=>{const R=z.step??z.relation+" "+z.toMiddleware;return U0(z.name,z.aliases)+" - "+R})},identifyOnResolve(z){if(typeof z==="boolean")G=z;return G},resolve:(z,R)=>{for(let I of F().map((J)=>J.middleware).reverse())z=I(z,R);if(G)console.log(Q.identify());return z}};return Q},"constructStack"),K4={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},M4={high:3,normal:2,low:1}});var b$=K((YJ,A4)=>{var{defineProperty:T1,getOwnPropertyDescriptor:Sw,getOwnPropertyNames:kw}=Object,Dw=Object.prototype.hasOwnProperty,bw=($,U)=>T1($,"name",{value:U,configurable:!0}),hw=($,U)=>{for(var G in U)T1($,G,{get:U[G],enumerable:!0})},xw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of kw(U))if(!Dw.call($,X)&&X!==G)T1($,X,{get:()=>U[X],enumerable:!(W=Sw(U,X))||W.enumerable})}return $},vw=($)=>xw(T1({},"__esModule",{value:!0}),$),H4={};hw(H4,{isArrayBuffer:()=>cw});A4.exports=vw(H4);var cw=bw(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var u0=K((wJ,C4)=>{var{defineProperty:H1,getOwnPropertyDescriptor:yw,getOwnPropertyNames:uw}=Object,_w=Object.prototype.hasOwnProperty,O4=($,U)=>H1($,"name",{value:U,configurable:!0}),dw=($,U)=>{for(var G in U)H1($,G,{get:U[G],enumerable:!0})},pw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of uw(U))if(!_w.call($,X)&&X!==G)H1($,X,{get:()=>U[X],enumerable:!(W=yw(U,X))||W.enumerable})}return $},gw=($)=>pw(H1({},"__esModule",{value:!0}),$),f4={};dw(f4,{fromArrayBuffer:()=>lw,fromString:()=>mw});C4.exports=gw(f4);var sw=b$(),h$=import.meta.require("buffer"),lw=O4(($,U=0,G=$.byteLength-U)=>{if(!sw.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return h$.Buffer.from($,U,G)},"fromArrayBuffer"),mw=O4(($,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 P4=K((q4)=>{Object.defineProperty(q4,"__esModule",{value:!0});q4.fromBase64=void 0;var nw=u0(),iw=/^[A-Za-z0-9+/]*={0,2}$/,rw=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!iw.exec($))throw new TypeError("Invalid base64 string.");const U=nw.fromString($,"base64");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength)};q4.fromBase64=rw});var G0=K((QJ,D4)=>{var{defineProperty:A1,getOwnPropertyDescriptor:ow,getOwnPropertyNames:aw}=Object,tw=Object.prototype.hasOwnProperty,x$=($,U)=>A1($,"name",{value:U,configurable:!0}),ew=($,U)=>{for(var G in U)A1($,G,{get:U[G],enumerable:!0})},$9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of aw(U))if(!tw.call($,X)&&X!==G)A1($,X,{get:()=>U[X],enumerable:!(W=ow(U,X))||W.enumerable})}return $},U9=($)=>$9(A1({},"__esModule",{value:!0}),$),j4={};ew(j4,{fromUtf8:()=>k4,toUint8Array:()=>G9,toUtf8:()=>W9});D4.exports=U9(j4);var S4=u0(),k4=x$(($)=>{const U=S4.fromString($,"utf8");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),G9=x$(($)=>{if(typeof $==="string")return k4($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),W9=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 S4.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var x4=K((b4)=>{Object.defineProperty(b4,"__esModule",{value:!0});b4.toBase64=void 0;var X9=u0(),Z9=G0(),L9=($)=>{let U;if(typeof $==="string")U=Z9.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 X9.fromArrayBuffer(U.buffer,U.byteOffset,U.byteLength).toString("base64")};b4.toBase64=L9});var f1=K((RJ,O1)=>{var{defineProperty:v4,getOwnPropertyDescriptor:Y9,getOwnPropertyNames:w9}=Object,F9=Object.prototype.hasOwnProperty,v$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of w9(U))if(!F9.call($,X)&&X!==G)v4($,X,{get:()=>U[X],enumerable:!(W=Y9(U,X))||W.enumerable})}return $},c4=($,U,G)=>(v$($,U,"default"),G&&v$(G,U,"default")),Q9=($)=>v$(v4({},"__esModule",{value:!0}),$),c$={};O1.exports=Q9(c$);c4(c$,P4(),O1.exports);c4(c$,x4(),O1.exports)});var _4=K((y4)=>{Object.defineProperty(y4,"__esModule",{value:!0});y4.getAwsChunkedEncodingStream=void 0;var z9=import.meta.require("stream"),R9=($,U)=>{const{base64Encoder:G,bodyLengthChecker:W,checksumAlgorithmFn:X,checksumLocationName:Z,streamHasher:L}=U,Y=G!==void 0&&X!==void 0&&Z!==void 0&&L!==void 0,w=Y?L(X,$):void 0,F=new z9.Readable({read:()=>{}});return $.on("data",(Q)=>{const z=W(Q)||0;F.push(`${z.toString(16)}\r\n`),F.push(Q),F.push("\r\n")}),$.on("end",async()=>{if(F.push("0\r\n"),Y){const Q=G(await w);F.push(`${Z}:${Q}\r\n`),F.push("\r\n")}F.push(null)}),F};y4.getAwsChunkedEncodingStream=R9});var u$=K((EJ,s4)=>{var g4=function($){const U=[];for(let G of Object.keys($).sort()){const W=$[G];if(G=y$.escapeUri(G),Array.isArray(W))for(let X=0,Z=W.length;X<Z;X++)U.push(`${G}=${y$.escapeUri(W[X])}`);else{let X=G;if(W||typeof W==="string")X+=`=${y$.escapeUri(W)}`;U.push(X)}}return U.join("&")},C1=Object.defineProperty,I9=Object.getOwnPropertyDescriptor,E9=Object.getOwnPropertyNames,J9=Object.prototype.hasOwnProperty,K9=($,U)=>C1($,"name",{value:U,configurable:!0}),M9=($,U)=>{for(var G in U)C1($,G,{get:U[G],enumerable:!0})},B9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of E9(U))if(!J9.call($,X)&&X!==G)C1($,X,{get:()=>U[X],enumerable:!(W=I9(U,X))||W.enumerable})}return $},V9=($)=>B9(C1({},"__esModule",{value:!0}),$),p4={};M9(p4,{buildQueryString:()=>g4});s4.exports=V9(p4);var y$=d4();K9(g4,"buildQueryString")});var Y6=K((JJ,L6)=>{async function p$($,U,G=l4){const W=U.headers??{},X=W.Expect||W.expect;let Z=-1,L=!1;if(X==="100-continue")await Promise.race([new Promise((Y)=>{Z=Number(setTimeout(Y,Math.max(l4,G)))}),new Promise((Y)=>{$.on("continue",()=>{clearTimeout(Z),Y()}),$.on("error",()=>{L=!0,clearTimeout(Z),Y()})})]);if(!L)e4($,U.body)}var e4=function($,U){if(U instanceof t4.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 Z6($){const U=[],G=$.getReader();let W=!1,X=0;while(!W){const{done:Y,value:w}=await G.read();if(w)U.push(w),X+=w.length;W=Y}const Z=new Uint8Array(X);let L=0;for(let Y of U)Z.set(Y,L),L+=Y.length;return Z}var{create:T9,defineProperty:_0,getOwnPropertyDescriptor:H9,getOwnPropertyNames:A9,getPrototypeOf:O9}=Object,f9=Object.prototype.hasOwnProperty,N=($,U)=>_0($,"name",{value:U,configurable:!0}),C9=($,U)=>{for(var G in U)_0($,G,{get:U[G],enumerable:!0})},n4=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of A9(U))if(!f9.call($,X)&&X!==G)_0($,X,{get:()=>U[X],enumerable:!(W=H9(U,X))||W.enumerable})}return $},q9=($,U,G)=>(G=$!=null?T9(O9($)):{},n4(U||!$||!$.__esModule?_0(G,"default",{value:$,enumerable:!0}):G,$)),N9=($)=>n4(_0({},"__esModule",{value:!0}),$),i4={};C9(i4,{DEFAULT_REQUEST_TIMEOUT:()=>D9,NodeHttp2Handler:()=>c9,NodeHttpHandler:()=>b9,streamCollector:()=>u9});L6.exports=N9(i4);var r4=r(),o4=u$(),_$=import.meta.require("http"),d$=import.meta.require("https"),P9=["ECONNRESET","EPIPE","ETIMEDOUT"],a4=N(($)=>{const U={};for(let G of Object.keys($)){const W=$[G];U[G]=Array.isArray(W)?W.join(","):W}return U},"getTransformedHeaders"),j9=N(($,U,G=0)=>{if(!G)return;const W=setTimeout(()=>{$.destroy(),U(Object.assign(new Error(`Socket timed out without establishing a connection within ${G} ms`),{name:"TimeoutError"}))},G);$.on("socket",(X)=>{if(X.connecting)X.on("connect",()=>{clearTimeout(W)});else clearTimeout(W)})},"setConnectionTimeout"),S9=N(($,{keepAlive:U,keepAliveMsecs:G})=>{if(U!==!0)return;$.on("socket",(W)=>{W.setKeepAlive(U,G||0)})},"setSocketKeepAlive"),k9=N(($,U,G=0)=>{$.setTimeout(G,()=>{$.destroy(),U(Object.assign(new Error(`Connection timed out after ${G} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),t4=import.meta.require("stream"),l4=1000;N(p$,"writeRequestBody");N(e4,"writeBody");var D9=0,$6=class ${constructor(U){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((X)=>{G(this.resolveDefaultConfig(X))}).catch(W);else G(this.resolveDefaultConfig(U))})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}static checkSocketUsage(U,G,W=console){var X,Z,L;const{sockets:Y,requests:w,maxSockets:F}=U;if(typeof F!=="number"||F===Infinity)return G;const Q=15000;if(Date.now()-Q<G)return G;if(Y&&w)for(let z in Y){const R=((X=Y[z])==null?void 0:X.length)??0,I=((Z=w[z])==null?void 0:Z.length)??0;if(R>=F&&I>=2*F)return(L=W==null?void 0:W.warn)==null||L.call(W,`@smithy/node-http-handler:WARN - socket usage at capacity=${R} and ${I} additional requests are enqueued.
|
|
2
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return G}resolveDefaultConfig(U){const{requestTimeout:G,connectionTimeout:W,socketTimeout:X,httpAgent:Z,httpsAgent:L}=U||{};return{connectionTimeout:W,requestTimeout:G??X,httpAgent:(()=>{if(Z instanceof _$.Agent||typeof(Z==null?void 0:Z.destroy)==="function")return Z;return new _$.Agent({keepAlive:!0,maxSockets:50,...Z})})(),httpsAgent:(()=>{if(L instanceof d$.Agent||typeof(L==null?void 0:L.destroy)==="function")return L;return new d$.Agent({keepAlive:!0,maxSockets:50,...L})})(),logger:console}}destroy(){var U,G,W,X;(G=(U=this.config)==null?void 0:U.httpAgent)==null||G.destroy(),(X=(W=this.config)==null?void 0:W.httpsAgent)==null||X.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;let W;return new Promise((X,Z)=>{let L=void 0;const Y=N(async(B)=>{await L,clearTimeout(W),X(B)},"resolve"),w=N(async(B)=>{await L,clearTimeout(W),Z(B)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(G==null?void 0:G.aborted){const B=new Error("Request aborted");B.name="AbortError",w(B);return}const F=U.protocol==="https:",Q=F?this.config.httpsAgent:this.config.httpAgent;W=setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(Q,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const z=o4.buildQueryString(U.query||{});let R=void 0;if(U.username!=null||U.password!=null){const B=U.username??"",H=U.password??"";R=`${B}:${H}`}let I=U.path;if(z)I+=`?${z}`;if(U.fragment)I+=`#${U.fragment}`;const J={headers:U.headers,host:U.hostname,method:U.method,path:I,port:U.port,agent:Q,auth:R},M=(F?d$.request:_$.request)(J,(B)=>{const H=new r4.HttpResponse({statusCode:B.statusCode||-1,reason:B.statusMessage,headers:a4(B.headers),body:B});Y({response:H})});if(M.on("error",(B)=>{if(P9.includes(B.code))w(Object.assign(B,{name:"TimeoutError"}));else w(B)}),j9(M,w,this.config.connectionTimeout),k9(M,w,this.config.requestTimeout),G){const B=N(()=>{M.destroy();const H=new Error("Request aborted");H.name="AbortError",w(H)},"onAbort");if(typeof G.addEventListener==="function"){const H=G;H.addEventListener("abort",B,{once:!0}),M.once("close",()=>H.removeEventListener("abort",B))}else G.onabort=B}const V=J.agent;if(typeof V==="object"&&"keepAlive"in V)S9(M,{keepAlive:V.keepAlive,keepAliveMsecs:V.keepAliveMsecs});L=p$(M,U,this.config.requestTimeout).catch((B)=>{return clearTimeout(W),Z(B)})})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}};N($6,"NodeHttpHandler");var b9=$6,m4=import.meta.require("http2"),h9=q9(import.meta.require("http2")),U6=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()}}};N(U6,"NodeHttp2ConnectionPool");var x9=U6,G6=class ${constructor(U){if(this.sessionCache=new Map,this.config=U,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(U,G){const W=this.getUrlString(U),X=this.sessionCache.get(W);if(X){const w=X.poll();if(w&&!this.config.disableConcurrency)return w}const Z=h9.default.connect(W);if(this.config.maxConcurrency)Z.settings({maxConcurrentStreams:this.config.maxConcurrency},(w)=>{if(w)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});Z.unref();const L=N(()=>{Z.destroy(),this.deleteSession(W,Z)},"destroySessionCb");if(Z.on("goaway",L),Z.on("error",L),Z.on("frameError",L),Z.on("close",()=>this.deleteSession(W,Z)),G.requestTimeout)Z.setTimeout(G.requestTimeout,L);const Y=this.sessionCache.get(W)||new x9;return Y.offerLast(Z),this.sessionCache.set(W,Y),Z}deleteSession(U,G){const W=this.sessionCache.get(U);if(!W)return;if(!W.contains(G))return;W.remove(G),this.sessionCache.set(U,W)}release(U,G){var W;const X=this.getUrlString(U);(W=this.sessionCache.get(X))==null||W.offerLast(G)}destroy(){for(let[U,G]of this.sessionCache){for(let W of G){if(!W.destroyed)W.destroy();G.remove(W)}this.sessionCache.delete(U)}}setMaxConcurrentStreams(U){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=U}setDisableConcurrentStreams(U){this.config.disableConcurrency=U}getUrlString(U){return U.destination.toString()}};N(G6,"NodeHttp2ConnectionManager");var v9=G6,W6=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new v9({}),this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((X)=>{G(X||{})}).catch(W);else G(U||{})})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}destroy(){this.connectionManager.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:W,disableConcurrentStreams:X}=this.config;return new Promise((Z,L)=>{var Y;let w=!1,F=void 0;const Q=N(async(q)=>{await F,Z(q)},"resolve"),z=N(async(q)=>{await F,L(q)},"reject");if(G==null?void 0:G.aborted){w=!0;const q=new Error("Request aborted");q.name="AbortError",z(q);return}const{hostname:R,method:I,port:J,protocol:T,query:M}=U;let V="";if(U.username!=null||U.password!=null){const q=U.username??"",d=U.password??"";V=`${q}:${d}@`}const B=`${T}//${V}${R}${J?`:${J}`:""}`,H={destination:new URL(B)},A=this.connectionManager.lease(H,{requestTimeout:(Y=this.config)==null?void 0:Y.sessionTimeout,disableConcurrentStreams:X||!1}),k=N((q)=>{if(X)this.destroySession(A);w=!0,z(q)},"rejectWithDestroy"),e=o4.buildQueryString(M||{});let w0=U.path;if(e)w0+=`?${e}`;if(U.fragment)w0+=`#${U.fragment}`;const v=A.request({...U.headers,[m4.constants.HTTP2_HEADER_PATH]:w0,[m4.constants.HTTP2_HEADER_METHOD]:I});if(A.ref(),v.on("response",(q)=>{const d=new r4.HttpResponse({statusCode:q[":status"]||-1,headers:a4(q),body:v});if(w=!0,Q({response:d}),X)A.close(),this.connectionManager.deleteSession(B,A)}),W)v.setTimeout(W,()=>{v.close();const q=new Error(`Stream timed out because of no activity for ${W} ms`);q.name="TimeoutError",k(q)});if(G){const q=N(()=>{v.close();const d=new Error("Request aborted");d.name="AbortError",k(d)},"onAbort");if(typeof G.addEventListener==="function"){const d=G;d.addEventListener("abort",q,{once:!0}),v.once("close",()=>d.removeEventListener("abort",q))}else G.onabort=q}v.on("frameError",(q,d,NL)=>{k(new Error(`Frame type id ${q} in stream id ${NL} has failed with code ${d}.`))}),v.on("error",k),v.on("aborted",()=>{k(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${v.rstCode}.`))}),v.on("close",()=>{if(A.unref(),X)A.destroy();if(!w)k(new Error("Unexpected error: http2 request did not get a response"))}),F=p$(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()}};N(W6,"NodeHttp2Handler");var c9=W6,X6=class $ extends t4.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,G,W){this.bufferedBytes.push(U),W()}};N(X6,"Collector");var y9=X6,u9=N(($)=>{if(_9($))return Z6($);return new Promise((U,G)=>{const W=new y9;$.pipe(W),$.on("error",(X)=>{W.end(),G(X)}),W.on("error",G),W.on("finish",function(){const X=new Uint8Array(Buffer.concat(this.bufferedBytes));U(X)})})},"streamCollector"),_9=N(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");N(Z6,"collectReadableStream")});var K6=K((KJ,J6)=>{var Q6=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 R6($){const U=await E6($),G=r9.fromBase64(U);return new Uint8Array(G)}async function I6($){const U=[],G=$.getReader();let W=!1,X=0;while(!W){const{done:Y,value:w}=await G.read();if(w)U.push(w),X+=w.length;W=Y}const Z=new Uint8Array(X);let L=0;for(let Y of U)Z.set(Y,L),L+=Y.length;return Z}var E6=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 X=W.result??"",Z=X.indexOf(","),L=Z>-1?Z+1:X.length;U(X.substring(L))},W.onabort=()=>G(new Error("Read aborted")),W.onerror=()=>G(W.error),W.readAsDataURL($)})},N1=Object.defineProperty,d9=Object.getOwnPropertyDescriptor,p9=Object.getOwnPropertyNames,g9=Object.prototype.hasOwnProperty,o=($,U)=>N1($,"name",{value:U,configurable:!0}),s9=($,U)=>{for(var G in U)N1($,G,{get:U[G],enumerable:!0})},l9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of p9(U))if(!g9.call($,X)&&X!==G)N1($,X,{get:()=>U[X],enumerable:!(W=d9(U,X))||W.enumerable})}return $},m9=($)=>l9(N1({},"__esModule",{value:!0}),$),F6={};s9(F6,{FetchHttpHandler:()=>i9,keepAliveSupport:()=>q1,streamCollector:()=>o9});J6.exports=m9(F6);var w6=r(),n9=u$();o(Q6,"requestTimeout");var q1={supported:void 0},z6=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(q1.supported===void 0)q1.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;const W=this.config.requestTimeout,X=this.config.keepAlive===!0,Z=this.config.credentials;if(G==null?void 0:G.aborted){const V=new Error("Request aborted");return V.name="AbortError",Promise.reject(V)}let L=U.path;const Y=n9.buildQueryString(U.query||{});if(Y)L+=`?${Y}`;if(U.fragment)L+=`#${U.fragment}`;let w="";if(U.username!=null||U.password!=null){const V=U.username??"",B=U.password??"";w=`${V}:${B}@`}const{port:F,method:Q}=U,z=`${U.protocol}//${w}${U.hostname}${F?`:${F}`:""}${L}`,R=Q==="GET"||Q==="HEAD"?void 0:U.body,I={body:R,headers:new Headers(U.headers),method:Q,credentials:Z};if(R)I.duplex="half";if(typeof AbortController!=="undefined")I.signal=G;if(q1.supported)I.keepalive=X;let J=o(()=>{},"removeSignalEventListener");const T=new Request(z,I),M=[fetch(T).then((V)=>{const B=V.headers,H={};for(let k of B.entries())H[k[0]]=k[1];if(V.body==null)return V.blob().then((k)=>({response:new w6.HttpResponse({headers:H,reason:V.statusText,statusCode:V.status,body:k})}));return{response:new w6.HttpResponse({headers:H,reason:V.statusText,statusCode:V.status,body:V.body})}}),Q6(W)];if(G)M.push(new Promise((V,B)=>{const H=o(()=>{const A=new Error("Request aborted");A.name="AbortError",B(A)},"onAbort");if(typeof G.addEventListener==="function"){const A=G;A.addEventListener("abort",H,{once:!0}),J=o(()=>A.removeEventListener("abort",H),"removeSignalEventListener")}else G.onabort=H}));return Promise.race(M).finally(J)}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return W[U]=G,W})}httpHandlerConfigs(){return this.config??{}}};o(z6,"FetchHttpHandler");var i9=z6,r9=f1(),o9=o(($)=>{if(typeof Blob==="function"&&$ instanceof Blob)return R6($);return I6($)},"streamCollector");o(R6,"collectBlob");o(I6,"collectStream");o(E6,"readToBase64")});var d0=K((M6)=>{Object.defineProperty(M6,"__esModule",{value:!0});M6.isReadableStream=void 0;var a9=($)=>{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)};M6.isReadableStream=a9});var C6=K((O6)=>{Object.defineProperty(O6,"__esModule",{value:!0});O6.sdkStreamMixin=void 0;var t9=K6(),e9=f1(),$F=A6(),UF=G0(),V6=d0(),T6="The stream has already been transformed.",GF=($)=>{var U,G;if(!H6($)&&!V6.isReadableStream($)){const L=((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 ${L}`)}let W=!1;const X=async()=>{if(W)throw new Error(T6);return W=!0,await t9.streamCollector($)},Z=(L)=>{if(typeof L.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return L.stream()};return Object.assign($,{transformToByteArray:X,transformToString:async(L)=>{const Y=await X();if(L==="base64")return e9.toBase64(Y);else if(L==="hex")return $F.toHex(Y);else if(L===void 0||L==="utf8"||L==="utf-8")return UF.toUtf8(Y);else if(typeof TextDecoder==="function")return new TextDecoder(L).decode(Y);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(W)throw new Error(T6);if(W=!0,H6($))return Z($);else if(V6.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};O6.sdkStreamMixin=GF;var H6=($)=>typeof Blob==="function"&&$ instanceof Blob});var j6=K((N6)=>{Object.defineProperty(N6,"__esModule",{value:!0});N6.sdkStreamMixin=void 0;var WF=Y6(),XF=u0(),g$=import.meta.require("stream"),ZF=import.meta.require("util"),LF=C6(),q6="The stream has already been transformed.",YF=($)=>{var U,G;if(!($ instanceof g$.Readable))try{return LF.sdkStreamMixin($)}catch(Z){const L=((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 ${L}`)}let W=!1;const X=async()=>{if(W)throw new Error(q6);return W=!0,await WF.streamCollector($)};return Object.assign($,{transformToByteArray:X,transformToString:async(Z)=>{const L=await X();if(Z===void 0||Buffer.isEncoding(Z))return XF.fromArrayBuffer(L.buffer,L.byteOffset,L.byteLength).toString(Z);else return new ZF.TextDecoder(Z).decode(L)},transformToWebStream:()=>{if(W)throw new Error(q6);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof g$.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,g$.Readable.toWeb($)}})};N6.sdkStreamMixin=YF});var D6=K((S6)=>{async function wF($){if(typeof $.stream==="function")$=$.stream();return $.tee()}Object.defineProperty(S6,"__esModule",{value:!0});S6.splitStream=void 0;S6.splitStream=wF});var v6=K((h6)=>{async function zF($){if(QF.isReadableStream($))return FF.splitStream($);const U=new b6.PassThrough,G=new b6.PassThrough;return $.pipe(U),$.pipe(G),[U,G]}Object.defineProperty(h6,"__esModule",{value:!0});h6.splitStream=void 0;var b6=import.meta.require("stream"),FF=D6(),QF=d0();h6.splitStream=zF});var u6=K((c6)=>{async function RF($,U){var G;let W=0;const X=[],Z=$.getReader();let L=!1;while(!L){const{done:F,value:Q}=await Z.read();if(Q)X.push(Q),W+=(G=Q===null||Q===void 0?void 0:Q.byteLength)!==null&&G!==void 0?G:0;if(W>=U)break;L=F}Z.releaseLock();const Y=new Uint8Array(Math.min(U,W));let w=0;for(let F of X){if(F.byteLength>Y.byteLength-w){Y.set(F.subarray(0,Y.byteLength-w),w);break}else Y.set(F,w);w+=F.length}return Y}Object.defineProperty(c6,"__esModule",{value:!0});c6.headStream=void 0;c6.headStream=RF});var g6=K((d6)=>{Object.defineProperty(d6,"__esModule",{value:!0});d6.headStream=void 0;var IF=import.meta.require("stream"),EF=u6(),JF=d0(),KF=($,U)=>{if(JF.isReadableStream($))return EF.headStream($,U);return new Promise((G,W)=>{const X=new _6;X.limit=U,$.pipe(X),$.on("error",(Z)=>{X.end(),W(Z)}),X.on("error",W),X.on("finish",function(){const Z=new Uint8Array(Buffer.concat(this.buffers));G(Z)})})};d6.headStream=KF;class _6 extends IF.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write($,U,G){var W;if(this.buffers.push($),this.bytesBuffered+=(W=$.byteLength)!==null&&W!==void 0?W:0,this.bytesBuffered>=this.limit){const X=this.bytesBuffered-this.limit,Z=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=Z.subarray(0,Z.byteLength-X),this.emit("finish")}G()}}});var r6=K((fJ,I0)=>{var m6=function($,U="utf-8"){if(U==="base64")return s6.toBase64($);return l6.toUtf8($)},n6=function($,U){if(U==="base64")return l$.mutate(s6.fromBase64($));return l$.mutate(l6.fromUtf8($))},P1=Object.defineProperty,MF=Object.getOwnPropertyDescriptor,BF=Object.getOwnPropertyNames,VF=Object.prototype.hasOwnProperty,m$=($,U)=>P1($,"name",{value:U,configurable:!0}),TF=($,U)=>{for(var G in U)P1($,G,{get:U[G],enumerable:!0})},s$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of BF(U))if(!VF.call($,X)&&X!==G)P1($,X,{get:()=>U[X],enumerable:!(W=MF(U,X))||W.enumerable})}return $},p0=($,U,G)=>(s$($,U,"default"),G&&s$(G,U,"default")),HF=($)=>s$(P1({},"__esModule",{value:!0}),$),R0={};TF(R0,{Uint8ArrayBlobAdapter:()=>l$});I0.exports=HF(R0);var s6=f1(),l6=G0();m$(m6,"transformToString");m$(n6,"transformFromString");var i6=class $ extends Uint8Array{static fromString(U,G="utf-8"){switch(typeof U){case"string":return n6(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 m6(this,U)}};m$(i6,"Uint8ArrayBlobAdapter");var l$=i6;p0(R0,_4(),I0.exports);p0(R0,j6(),I0.exports);p0(R0,v6(),I0.exports);p0(R0,g6(),I0.exports);p0(R0,d0(),I0.exports)});var C0=K((CJ,BW)=>{var FW=function($){const U=$.getUTCFullYear(),G=$.getUTCMonth(),W=$.getUTCDay(),X=$.getUTCDate(),Z=$.getUTCHours(),L=$.getUTCMinutes(),Y=$.getUTCSeconds(),w=X<10?`0${X}`:`${X}`,F=Z<10?`0${Z}`:`${Z}`,Q=L<10?`0${L}`:`${L}`,z=Y<10?`0${Y}`:`${Y}`;return`${rF[W]}, ${w} ${WU[G]} ${U} ${F}:${Q}:${z} GMT`},k1=function($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})},XU=function($,U,G){let W,X,Z;if(typeof U==="undefined"&&typeof G==="undefined")W={},Z=$;else if(W=$,typeof U==="function")return X=U,Z=G,PQ(W,X,Z);else Z=U;for(let L of Object.keys(Z)){if(!Array.isArray(Z[L])){W[L]=Z[L];continue}KW(W,null,Z,L)}return W},MW=function($,U,G){if(G<=0||!Number.isInteger(G))throw new Error("Invalid number of delimiters ("+G+") for splitEvery.");const W=$.split(U);if(G===1)return W;const X=[];let Z="";for(let L=0;L<W.length;L++){if(Z==="")Z=W[L];else Z+=U+W[L];if((L+1)%G===0)X.push(Z),Z=""}if(Z!=="")X.push(Z);return X},D1=Object.defineProperty,AF=Object.getOwnPropertyDescriptor,OF=Object.getOwnPropertyNames,fF=Object.prototype.hasOwnProperty,E=($,U)=>D1($,"name",{value:U,configurable:!0}),CF=($,U)=>{for(var G in U)D1($,G,{get:U[G],enumerable:!0})},qF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of OF(U))if(!fF.call($,X)&&X!==G)D1($,X,{get:()=>U[X],enumerable:!(W=AF(U,X))||W.enumerable})}return $},NF=($)=>qF(D1({},"__esModule",{value:!0}),$),a6={};CF(a6,{Client:()=>jF,Command:()=>GW,LazyJsonString:()=>CQ,NoOpLogger:()=>PF,SENSITIVE_STRING:()=>DF,ServiceException:()=>IQ,StringWrapper:()=>n0,_json:()=>e$,collectBody:()=>SF,convertMap:()=>qQ,createAggregatedClient:()=>bF,dateToUtcString:()=>FW,decorateServiceException:()=>zW,emitWarningIfUnsupportedVersion:()=>MQ,expectBoolean:()=>xF,expectByte:()=>t$,expectFloat32:()=>j1,expectInt:()=>cF,expectInt32:()=>o$,expectLong:()=>l0,expectNonNull:()=>uF,expectNumber:()=>s0,expectObject:()=>XW,expectShort:()=>a$,expectString:()=>_F,expectUnion:()=>dF,extendedEncodeURIComponent:()=>k1,getArrayIfSingleItem:()=>fQ,getDefaultClientConfiguration:()=>AQ,getDefaultExtensionConfiguration:()=>IW,getValueFromTextNode:()=>EW,handleFloat:()=>sF,limitedParseDouble:()=>GU,limitedParseFloat:()=>lF,limitedParseFloat32:()=>mF,loadConfigsForDefaultMode:()=>KQ,logger:()=>m0,map:()=>XU,parseBoolean:()=>hF,parseEpochTimestamp:()=>XQ,parseRfc3339DateTime:()=>aF,parseRfc3339DateTimeWithOffset:()=>eF,parseRfc7231DateTime:()=>WQ,resolveDefaultRuntimeConfig:()=>OQ,resolvedPath:()=>kQ,serializeDateTime:()=>bQ,serializeFloat:()=>DQ,splitEvery:()=>MW,strictParseByte:()=>wW,strictParseDouble:()=>UU,strictParseFloat:()=>pF,strictParseFloat32:()=>ZW,strictParseInt:()=>nF,strictParseInt32:()=>iF,strictParseLong:()=>YW,strictParseShort:()=>A0,take:()=>NQ,throwDefaultError:()=>RW,withBaseException:()=>EQ});BW.exports=NF(a6);var t6=class ${trace(){}debug(){}info(){}warn(){}error(){}};E(t6,"NoOpLogger");var PF=t6,e6=T4(),$W=class ${constructor(U){this.middlewareStack=e6.constructStack(),this.config=U}send(U,G,W){const X=typeof G!=="function"?G:void 0,Z=typeof G==="function"?G:W,L=U.resolveMiddleware(this.middlewareStack,this.config,X);if(Z)L(U).then((Y)=>Z(null,Y.output),(Y)=>Z(Y)).catch(()=>{});else return L(U).then((Y)=>Y.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};E($W,"Client");var jF=$W,n$=r6(),SF=E(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$=F0(),UW=class ${constructor(){this.middlewareStack=e6.constructStack()}static classBuilder(){return new kF}resolveMiddlewareWithContext(U,G,W,{middlewareFn:X,clientName:Z,commandName:L,inputFilterSensitiveLog:Y,outputFilterSensitiveLog:w,smithyContext:F,additionalContext:Q,CommandCtor:z}){for(let M of X.bind(this)(z,U,G,W))this.middlewareStack.use(M);const R=U.concat(this.middlewareStack),{logger:I}=G,J={logger:I,clientName:Z,commandName:L,inputFilterSensitiveLog:Y,outputFilterSensitiveLog:w,[r$.SMITHY_CONTEXT_KEY]:{commandInstance:this,...F},...Q},{requestHandler:T}=G;return R.resolve((M)=>T.handle(M.request,W||{}),J)}};E(UW,"Command");var GW=UW,WW=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 GW{constructor(...[X]){super();this.serialize=G._serializer,this.deserialize=G._deserializer,this.input=X??{},G._init(this)}static getEndpointParameterInstructions(){return G._ep}resolveMiddleware(X,Z,L){return this.resolveMiddlewareWithContext(X,Z,L,{CommandCtor:W,middlewareFn:G._middlewareFn,clientName:G._clientName,commandName:G._commandName,inputFilterSensitiveLog:G._inputFilterSensitiveLog,outputFilterSensitiveLog:G._outputFilterSensitiveLog,smithyContext:G._smithyContext,additionalContext:G._additionalContext})}},E(U,"CommandRef"),U)}};E(WW,"ClassBuilder");var kF=WW,DF="***SensitiveInformation***",bF=E(($,U)=>{for(let G of Object.keys($)){const W=$[G],X=E(async function(L,Y,w){const F=new W(L);if(typeof Y==="function")this.send(F,Y);else if(typeof w==="function"){if(typeof Y!=="object")throw new Error(`Expected http options but got ${typeof Y}`);this.send(F,Y||{},w)}else return this.send(F,Y)},"methodImpl"),Z=(G[0].toLowerCase()+G.slice(1)).replace(/Command$/,"");U.prototype[Z]=X}},"createAggregatedClient"),hF=E(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),xF=E(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)m0.warn(S1(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const U=$.toLowerCase();if(U==="false"||U==="true")m0.warn(S1(`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"),s0=E(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))m0.warn(S1(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),vF=Math.ceil(340282346638528860000000000000000000000),j1=E(($)=>{const U=s0($);if(U!==void 0&&!Number.isNaN(U)&&U!==Infinity&&U!==(-Infinity)){if(Math.abs(U)>vF)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),l0=E(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),cF=l0,o$=E(($)=>$U($,32),"expectInt32"),a$=E(($)=>$U($,16),"expectShort"),t$=E(($)=>$U($,8),"expectByte"),$U=E(($,U)=>{const G=l0($);if(G!==void 0&&yF(G,U)!==G)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return G},"expectSizedInt"),yF=E(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),uF=E(($,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"),XW=E(($)=>{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"),_F=E(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return m0.warn(S1(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),dF=E(($)=>{if($===null||$===void 0)return;const U=XW($),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=E(($)=>{if(typeof $=="string")return s0(f0($));return s0($)},"strictParseDouble"),pF=UU,ZW=E(($)=>{if(typeof $=="string")return j1(f0($));return j1($)},"strictParseFloat32"),gF=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,f0=E(($)=>{const U=$.match(gF);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),GU=E(($)=>{if(typeof $=="string")return LW($);return s0($)},"limitedParseDouble"),sF=GU,lF=GU,mF=E(($)=>{if(typeof $=="string")return LW($);return j1($)},"limitedParseFloat32"),LW=E(($)=>{switch($){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),YW=E(($)=>{if(typeof $==="string")return l0(f0($));return l0($)},"strictParseLong"),nF=YW,iF=E(($)=>{if(typeof $==="string")return o$(f0($));return o$($)},"strictParseInt32"),A0=E(($)=>{if(typeof $==="string")return a$(f0($));return a$($)},"strictParseShort"),wW=E(($)=>{if(typeof $==="string")return t$(f0($));return t$($)},"strictParseByte"),S1=E(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),m0={warn:console.warn},rF=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],WU=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];E(FW,"dateToUtcString");var oF=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),aF=E(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=oF.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,X,Z,L,Y,w,F]=U,Q=A0(O0(W)),z=n(X,"month",1,12),R=n(Z,"day",1,31);return g0(Q,z,R,{hours:L,minutes:Y,seconds:w,fractionalMilliseconds:F})},"parseRfc3339DateTime"),tF=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),eF=E(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=tF.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,X,Z,L,Y,w,F,Q]=U,z=A0(O0(W)),R=n(X,"month",1,12),I=n(Z,"day",1,31),J=g0(z,R,I,{hours:L,minutes:Y,seconds:w,fractionalMilliseconds:F});if(Q.toUpperCase()!="Z")J.setTime(J.getTime()-RQ(Q));return J},"parseRfc3339DateTimeWithOffset"),$Q=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$/),UQ=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$/),GQ=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})$/),WQ=E(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=$Q.exec($);if(U){const[G,W,X,Z,L,Y,w,F]=U;return g0(A0(O0(Z)),i$(X),n(W,"day",1,31),{hours:L,minutes:Y,seconds:w,fractionalMilliseconds:F})}if(U=UQ.exec($),U){const[G,W,X,Z,L,Y,w,F]=U;return YQ(g0(ZQ(Z),i$(X),n(W,"day",1,31),{hours:L,minutes:Y,seconds:w,fractionalMilliseconds:F}))}if(U=GQ.exec($),U){const[G,W,X,Z,L,Y,w,F]=U;return g0(A0(O0(F)),i$(W),n(X.trimLeft(),"day",1,31),{hours:Z,minutes:L,seconds:Y,fractionalMilliseconds:w})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),XQ=E(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=UU($);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"),g0=E(($,U,G,W)=>{const X=U-1;return FQ($,X,G),new Date(Date.UTC($,X,G,n(W.hours,"hour",0,23),n(W.minutes,"minute",0,59),n(W.seconds,"seconds",0,60),zQ(W.fractionalMilliseconds)))},"buildDate"),ZQ=E(($)=>{const U=(new Date()).getUTCFullYear(),G=Math.floor(U/100)*100+A0(O0($));if(G<U)return G+100;return G},"parseTwoDigitYear"),LQ=1576800000000,YQ=E(($)=>{if($.getTime()-(new Date()).getTime()>LQ)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),i$=E(($)=>{const U=WU.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),wQ=[31,28,31,30,31,30,31,31,30,31,30,31],FQ=E(($,U,G)=>{let W=wQ[U];if(U===1&&QQ($))W=29;if(G>W)throw new TypeError(`Invalid day for ${WU[U]} in ${$}: ${G}`)},"validateDayOfMonth"),QQ=E(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),n=E(($,U,G,W)=>{const X=wW(O0($));if(X<G||X>W)throw new TypeError(`${U} must be between ${G} and ${W}, inclusive`);return X},"parseDateValue"),zQ=E(($)=>{if($===null||$===void 0)return 0;return ZW("0."+$)*1000},"parseMilliseconds"),RQ=E(($)=>{const U=$[0];let G=1;if(U=="+")G=1;else if(U=="-")G=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);const W=Number($.substring(1,3)),X=Number($.substring(4,6));return G*(W*60+X)*60*1000},"parseOffsetToMilliseconds"),O0=E(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),QW=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};E(QW,"ServiceException");var IQ=QW,zW=E(($,U={})=>{Object.entries(U).filter(([,W])=>W!==void 0).forEach(([W,X])=>{if($[W]==null||$[W]==="")$[W]=X});const G=$.message||$.Message||"UnknownError";return $.message=G,delete $.Message,$},"decorateServiceException"),RW=E(({output:$,parsedBody:U,exceptionCtor:G,errorCode:W})=>{const X=JQ($),Z=X.httpStatusCode?X.httpStatusCode+"":void 0,L=new G({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||W||Z||"UnknownError",$fault:"client",$metadata:X});throw zW(L,U)},"throwDefaultError"),EQ=E(($)=>{return({output:U,parsedBody:G,errorCode:W})=>{RW({output:U,parsedBody:G,exceptionCtor:$,errorCode:W})}},"withBaseException"),JQ=E(($)=>({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"),KQ=E(($)=>{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"),o6=!1,MQ=E(($)=>{if($&&!o6&&parseInt($.substring(1,$.indexOf(".")))<16)o6=!0},"emitWarningIfUnsupportedVersion"),BQ=E(($)=>{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"),VQ=E(($)=>{const U={};return $.checksumAlgorithms().forEach((G)=>{U[G.algorithmId()]=G.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),TQ=E(($)=>{let U=$.retryStrategy;return{setRetryStrategy(G){U=G},retryStrategy(){return U}}},"getRetryConfiguration"),HQ=E(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),IW=E(($)=>{return{...BQ($),...TQ($)}},"getDefaultExtensionConfiguration"),AQ=IW,OQ=E(($)=>{return{...VQ($),...HQ($)}},"resolveDefaultRuntimeConfig");E(k1,"extendedEncodeURIComponent");var fQ=E(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),EW=E(($)=>{for(let G in $)if($.hasOwnProperty(G)&&$[G]["#text"]!==void 0)$[G]=$[G]["#text"];else if(typeof $[G]==="object"&&$[G]!==null)$[G]=EW($[G]);return $},"getValueFromTextNode"),n0=E(function(){const $=Object.getPrototypeOf(this).constructor,G=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(G,$.prototype),G},"StringWrapper");n0.prototype=Object.create(String.prototype,{constructor:{value:n0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(n0,String);var JW=class $ extends n0{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))}};E(JW,"LazyJsonString");var CQ=JW;E(XU,"map");var qQ=E(($)=>{const U={};for(let[G,W]of Object.entries($||{}))U[G]=[,W];return U},"convertMap"),NQ=E(($,U)=>{const G={};for(let W in U)KW(G,$,U,W);return G},"take"),PQ=E(($,U,G)=>{return XU($,Object.entries(G).reduce((W,[X,Z])=>{if(Array.isArray(Z))W[X]=Z;else if(typeof Z==="function")W[X]=[U,Z()];else W[X]=[U,Z];return W},{}))},"mapWithFilter"),KW=E(($,U,G,W)=>{if(U!==null){let L=G[W];if(typeof L==="function")L=[,L];const[Y=jQ,w=SQ,F=W]=L;if(typeof Y==="function"&&Y(U[F])||typeof Y!=="function"&&!!Y)$[W]=w(U[F]);return}let[X,Z]=G[W];if(typeof Z==="function"){let L;const Y=X===void 0&&(L=Z())!=null,w=typeof X==="function"&&!!X(void 0)||typeof X!=="function"&&!!X;if(Y)$[W]=L;else if(w)$[W]=Z()}else{const L=X===void 0&&Z!=null,Y=typeof X==="function"&&!!X(Z)||typeof X!=="function"&&!!X;if(L||Y)$[W]=Z}},"applyInstruction"),jQ=E(($)=>$!=null,"nonNullish"),SQ=E(($)=>$,"pass"),kQ=E(($,U,G,W,X,Z)=>{if(U!=null&&U[G]!==void 0){const L=W();if(L.length<=0)throw new Error("Empty value provided for input HTTP label: "+G+".");$=$.replace(X,Z?L.split("/").map((Y)=>k1(Y)).join("/"):k1(L))}else throw new Error("No value provided for input HTTP label: "+G+".");return $},"resolvedPath"),DQ=E(($)=>{if($!==$)return"NaN";switch($){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return $}},"serializeFloat"),bQ=E(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),e$=E(($)=>{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");E(MW,"splitEvery")});var HW=K((VW)=>{Object.defineProperty(VW,"__esModule",{value:!0});VW.isStreamingPayload=void 0;var hQ=import.meta.require("stream"),xQ=($)=>($===null||$===void 0?void 0:$.body)instanceof hQ.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;VW.isStreamingPayload=xQ});var uW=K((PJ,yW)=>{var{defineProperty:b1,getOwnPropertyDescriptor:vQ,getOwnPropertyNames:cQ}=Object,yQ=Object.prototype.hasOwnProperty,j=($,U)=>b1($,"name",{value:U,configurable:!0}),uQ=($,U)=>{for(var G in U)b1($,G,{get:U[G],enumerable:!0})},_Q=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of cQ(U))if(!yQ.call($,X)&&X!==G)b1($,X,{get:()=>U[X],enumerable:!(W=vQ(U,X))||W.enumerable})}return $},dQ=($)=>_Q(b1({},"__esModule",{value:!0}),$),OW={};uQ(OW,{AdaptiveRetryStrategy:()=>sQ,CONFIG_MAX_ATTEMPTS:()=>LU,CONFIG_RETRY_MODE:()=>DW,ENV_MAX_ATTEMPTS:()=>ZU,ENV_RETRY_MODE:()=>kW,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>lQ,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>nQ,StandardRetryStrategy:()=>jW,defaultDelayDecider:()=>CW,defaultRetryDecider:()=>qW,getOmitRetryHeadersPlugin:()=>iQ,getRetryAfterHint:()=>cW,getRetryPlugin:()=>$7,omitRetryHeadersMiddleware:()=>bW,omitRetryHeadersMiddlewareOptions:()=>hW,resolveRetryConfig:()=>mQ,retryMiddleware:()=>xW,retryMiddlewareOptions:()=>vW});yW.exports=dQ(OW);var q0=r(),fW=I$(),C=J4(),pQ=j(($,U)=>{const G=$,W=(U==null?void 0:U.noRetryIncrement)??C.NO_RETRY_INCREMENT,X=(U==null?void 0:U.retryCost)??C.RETRY_COST,Z=(U==null?void 0:U.timeoutRetryCost)??C.TIMEOUT_RETRY_COST;let L=$;const Y=j((z)=>z.name==="TimeoutError"?Z:X,"getCapacityAmount"),w=j((z)=>Y(z)<=L,"hasRetryTokens");return Object.freeze({hasRetryTokens:w,retrieveRetryTokens:j((z)=>{if(!w(z))throw new Error("No retry token available");const R=Y(z);return L-=R,R},"retrieveRetryTokens"),releaseRetryTokens:j((z)=>{L+=z??W,L=Math.min(L,G)},"releaseRetryTokens")})},"getDefaultRetryQuota"),CW=j(($,U)=>Math.floor(Math.min(C.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),W0=N$(),qW=j(($)=>{if(!$)return!1;return W0.isRetryableByTrait($)||W0.isClockSkewError($)||W0.isThrottlingError($)||W0.isTransientError($)},"defaultRetryDecider"),NW=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"),PW=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode=C.RETRY_MODES.STANDARD,this.retryDecider=(G==null?void 0:G.retryDecider)??qW,this.delayDecider=(G==null?void 0:G.delayDecider)??CW,this.retryQuota=(G==null?void 0:G.retryQuota)??pQ(C.INITIAL_RETRY_TOKENS)}shouldRetry(U,G,W){return G<W&&this.retryDecider(U)&&this.retryQuota.hasRetryTokens(U)}async getMaxAttempts(){let U;try{U=await this.maxAttemptsProvider()}catch(G){U=C.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,G,W){let X,Z=0,L=0;const Y=await this.getMaxAttempts(),{request:w}=G;if(q0.HttpRequest.isInstance(w))w.headers[C.INVOCATION_ID_HEADER]=fW.v4();while(!0)try{if(q0.HttpRequest.isInstance(w))w.headers[C.REQUEST_HEADER]=`attempt=${Z+1}; max=${Y}`;if(W==null?void 0:W.beforeRequest)await W.beforeRequest();const{response:F,output:Q}=await U(G);if(W==null?void 0:W.afterRequest)W.afterRequest(F);return this.retryQuota.releaseRetryTokens(X),Q.$metadata.attempts=Z+1,Q.$metadata.totalRetryDelay=L,{response:F,output:Q}}catch(F){const Q=NW(F);if(Z++,this.shouldRetry(Q,Z,Y)){X=this.retryQuota.retrieveRetryTokens(Q);const z=this.delayDecider(W0.isThrottlingError(Q)?C.THROTTLING_RETRY_DELAY_BASE:C.DEFAULT_RETRY_DELAY_BASE,Z),R=gQ(Q.$response),I=Math.max(R||0,z);L+=I,await new Promise((J)=>setTimeout(J,I));continue}if(!Q.$metadata)Q.$metadata={};throw Q.$metadata.attempts=Z,Q.$metadata.totalRetryDelay=L,Q}}};j(PW,"StandardRetryStrategy");var jW=PW,gQ=j(($)=>{if(!q0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return W*1000;return new Date(G).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),SW=class $ extends jW{constructor(U,G){const{rateLimiter:W,...X}=G??{};super(U,X);this.rateLimiter=W??new C.DefaultRateLimiter,this.mode=C.RETRY_MODES.ADAPTIVE}async retry(U,G){return super.retry(U,G,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(W)=>{this.rateLimiter.updateClientSendingRate(W)}})}};j(SW,"AdaptiveRetryStrategy");var sQ=SW,AW=h0(),ZU="AWS_MAX_ATTEMPTS",LU="max_attempts",lQ={environmentVariableSelector:($)=>{const U=$[ZU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${ZU} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[LU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${LU} mast be a number, got "${U}"`);return G},default:C.DEFAULT_MAX_ATTEMPTS},mQ=j(($)=>{const{retryStrategy:U}=$,G=AW.normalizeProvider($.maxAttempts??C.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await AW.normalizeProvider($.retryMode)()===C.RETRY_MODES.ADAPTIVE)return new C.AdaptiveRetryStrategy(G);return new C.StandardRetryStrategy(G)}}},"resolveRetryConfig"),kW="AWS_RETRY_MODE",DW="retry_mode",nQ={environmentVariableSelector:($)=>$[kW],configFileSelector:($)=>$[DW],default:C.DEFAULT_RETRY_MODE},bW=j(()=>($)=>async(U)=>{const{request:G}=U;if(q0.HttpRequest.isInstance(G))delete G.headers[C.INVOCATION_ID_HEADER],delete G.headers[C.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),hW={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},iQ=j(($)=>({applyToStack:(U)=>{U.addRelativeTo(bW(),hW)}}),"getOmitRetryHeadersPlugin"),rQ=C0(),oQ=HW(),xW=j(($)=>(U,G)=>async(W)=>{var X;let Z=await $.retryStrategy();const L=await $.maxAttempts();if(aQ(Z)){Z=Z;let Y=await Z.acquireInitialRetryToken(G.partition_id),w=new Error,F=0,Q=0;const{request:z}=W,R=q0.HttpRequest.isInstance(z);if(R)z.headers[C.INVOCATION_ID_HEADER]=fW.v4();while(!0)try{if(R)z.headers[C.REQUEST_HEADER]=`attempt=${F+1}; max=${L}`;const{response:I,output:J}=await U(W);return Z.recordSuccess(Y),J.$metadata.attempts=F+1,J.$metadata.totalRetryDelay=Q,{response:I,output:J}}catch(I){const J=tQ(I);if(w=NW(I),R&&oQ.isStreamingPayload(z))throw(X=G.logger instanceof rQ.NoOpLogger?console:G.logger)==null||X.warn("An error was encountered in a non-retryable streaming request."),w;try{Y=await Z.refreshRetryTokenForRetry(Y,J)}catch(M){if(!w.$metadata)w.$metadata={};throw w.$metadata.attempts=F+1,w.$metadata.totalRetryDelay=Q,w}F=Y.getRetryCount();const T=Y.getRetryDelay();Q+=T,await new Promise((M)=>setTimeout(M,T))}}else{if(Z=Z,Z==null?void 0:Z.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",Z.mode]];return Z.retry(U,W)}},"retryMiddleware"),aQ=j(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),tQ=j(($)=>{const U={error:$,errorType:eQ($)},G=cW($.$response);if(G)U.retryAfterHint=G;return U},"getRetryErrorInfo"),eQ=j(($)=>{if(W0.isThrottlingError($))return"THROTTLING";if(W0.isTransientError($))return"TRANSIENT";if(W0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),vW={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},$7=j(($)=>({applyToStack:(U)=>{U.add(xW($),vW)}}),"getRetryPlugin"),cW=j(($)=>{if(!q0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)},"getRetryAfterHint")});var wU=K((jJ,XX)=>{var pW=function($){const U=new Map;for(let G of $)U.set(G.schemeId,G);return U},$X=function($,U){return new GX($,U)},WX=function($,U,G,W,X){return f(async function*Z(L,Y,...w){let F=L.startingToken||void 0,Q=!0,z;while(Q){if(Y[G]=F,X)Y[X]=Y[X]??L.pageSize;if(L.client instanceof $)z=await f7(U,L.client,Y,...w);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield z;const R=F;F=C7(z,W),Q=!!(F&&(!L.stopOnSameToken||F!==R))}return},"paginateOperation")},x1=Object.defineProperty,U7=Object.getOwnPropertyDescriptor,G7=Object.getOwnPropertyNames,W7=Object.prototype.hasOwnProperty,f=($,U)=>x1($,"name",{value:U,configurable:!0}),X7=($,U)=>{for(var G in U)x1($,G,{get:U[G],enumerable:!0})},Z7=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of G7(U))if(!W7.call($,X)&&X!==G)x1($,X,{get:()=>U[X],enumerable:!(W=U7(U,X))||W.enumerable})}return $},L7=($)=>Z7(x1({},"__esModule",{value:!0}),$),_W={};X7(_W,{DefaultIdentityProviderConfig:()=>J7,EXPIRATION_MS:()=>tW,HttpApiKeyAuthSigner:()=>K7,HttpBearerAuthSigner:()=>M7,NoAuthSigner:()=>B7,RequestBuilder:()=>GX,createIsIdentityExpiredFunction:()=>aW,createPaginator:()=>WX,doesIdentityRequireRefresh:()=>eW,getHttpAuthSchemeEndpointRuleSetPlugin:()=>w7,getHttpAuthSchemePlugin:()=>Q7,getHttpSigningPlugin:()=>E7,getSmithyContext:()=>H7,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>gW,httpAuthSchemeMiddleware:()=>YU,httpAuthSchemeMiddlewareOptions:()=>sW,httpSigningMiddleware:()=>lW,httpSigningMiddlewareOptions:()=>mW,isIdentityExpired:()=>V7,memoizeIdentityProvider:()=>T7,normalizeProvider:()=>A7,requestBuilder:()=>$X});XX.exports=L7(_W);var dW=h0();f(pW,"convertHttpAuthSchemesToMap");var YU=f(($,U)=>(G,W)=>async(X)=>{var Z;const L=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,W,X.input)),Y=pW($.httpAuthSchemes),w=dW.getSmithyContext(W),F=[];for(let Q of L){const z=Y.get(Q.schemeId);if(!z){F.push(`HttpAuthScheme \`${Q.schemeId}\` was not enabled for this service.`);continue}const R=z.identityProvider(await U.identityProviderConfigProvider($));if(!R){F.push(`HttpAuthScheme \`${Q.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:I={},signingProperties:J={}}=((Z=Q.propertiesExtractor)==null?void 0:Z.call(Q,$,W))||{};Q.identityProperties=Object.assign(Q.identityProperties||{},I),Q.signingProperties=Object.assign(Q.signingProperties||{},J),w.selectedHttpAuthScheme={httpAuthOption:Q,identity:await R(Q.identityProperties),signer:z.signer};break}if(!w.selectedHttpAuthScheme)throw new Error(F.join("\n"));return G(X)},"httpAuthSchemeMiddleware"),Y7=p8(),gW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Y7.endpointMiddlewareOptions.name},w7=f(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(YU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),gW)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),F7=C$(),sW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:F7.serializerMiddlewareOption.name},Q7=f(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(YU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),sW)}}),"getHttpAuthSchemePlugin"),v1=r(),z7=f(($)=>(U)=>{throw U},"defaultErrorHandler"),R7=f(($,U)=>{},"defaultSuccessHandler"),lW=f(($)=>(U,G)=>async(W)=>{if(!v1.HttpRequest.isInstance(W.request))return U(W);const Z=dW.getSmithyContext(G).selectedHttpAuthScheme;if(!Z)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:L={}},identity:Y,signer:w}=Z,F=await U({...W,request:await w.sign(W.request,Y,L)}).catch((w.errorHandler||z7)(L));return(w.successHandler||R7)(F.response,L),F},"httpSigningMiddleware"),I7=uW(),mW={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:I7.retryMiddlewareOptions.name},E7=f(($)=>({applyToStack:(U)=>{U.addRelativeTo(lW($),mW)}}),"getHttpSigningPlugin"),nW=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(nW,"DefaultIdentityProviderConfig");var J7=nW,h1=F0(),iW=class ${async sign(U,G,W){if(!W)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!W.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!W.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!G.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const X=v1.HttpRequest.clone(U);if(W.in===h1.HttpApiKeyAuthLocation.QUERY)X.query[W.name]=G.apiKey;else if(W.in===h1.HttpApiKeyAuthLocation.HEADER)X.headers[W.name]=W.scheme?`${W.scheme} ${G.apiKey}`:G.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+W.in+"`");return X}};f(iW,"HttpApiKeyAuthSigner");var K7=iW,rW=class ${async sign(U,G,W){const X=v1.HttpRequest.clone(U);if(!G.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return X.headers.Authorization=`Bearer ${G.token}`,X}};f(rW,"HttpBearerAuthSigner");var M7=rW,oW=class ${async sign(U,G,W){return U}};f(oW,"NoAuthSigner");var B7=oW,aW=f(($)=>(U)=>eW(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),tW=300000,V7=aW(tW),eW=f(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),T7=f(($,U,G)=>{if($===void 0)return;const W=typeof $!=="function"?async()=>Promise.resolve($):$;let X,Z,L,Y=!1;const w=f(async(F)=>{if(!Z)Z=W(F);try{X=await Z,L=!0,Y=!1}finally{Z=void 0}return X},"coalesceProvider");if(U===void 0)return async(F)=>{if(!L||(F==null?void 0:F.forceRefresh))X=await w(F);return X};return async(F)=>{if(!L||(F==null?void 0:F.forceRefresh))X=await w(F);if(Y)return X;if(!G(X))return Y=!0,X;if(U(X))return await w(F),X;return X}},"memoizeIdentityProvider"),H7=f(($)=>$[h1.SMITHY_CONTEXT_KEY]||($[h1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),A7=f(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),O7=C0();f($X,"requestBuilder");var UX=class ${constructor(U,G){this.input=U,this.context=G,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:U,protocol:G="https",port:W,path:X}=await this.context.endpoint();this.path=X;for(let Z of this.resolvePathStack)Z(this.path);return new v1.HttpRequest({protocol:G,hostname:this.hostname||U,port:W,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(U){return this.hostname=U,this}bp(U){return this.resolvePathStack.push((G)=>{this.path=`${(G==null?void 0:G.endsWith("/"))?G.slice(0,-1):G||""}`+U}),this}p(U,G,W,X){return this.resolvePathStack.push((Z)=>{this.path=O7.resolvedPath(Z,this.input,U,G,W,X)}),this}h(U){return this.headers=U,this}q(U){return this.query=U,this}b(U){return this.body=U,this}m(U){return this.method=U,this}};f(UX,"RequestBuilder");var GX=UX,f7=f(async($,U,G,...W)=>{return await U.send(new $(G),...W)},"makePagedClientRequest");f(WX,"createPaginator");var C7=f(($,U)=>{let G=$;const W=U.split(".");for(let X of W){if(!G||typeof G!=="object")return;G=G[X]}return G},"get")});var $Z=K((iT,eX)=>{var{defineProperty:t1,getOwnPropertyDescriptor:Zz,getOwnPropertyNames:Lz}=Object,Yz=Object.prototype.hasOwnProperty,wz=($,U)=>t1($,"name",{value:U,configurable:!0}),Fz=($,U)=>{for(var G in U)t1($,G,{get:U[G],enumerable:!0})},Qz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Lz(U))if(!Yz.call($,X)&&X!==G)t1($,X,{get:()=>U[X],enumerable:!(W=Zz(U,X))||W.enumerable})}return $},zz=($)=>Qz(t1({},"__esModule",{value:!0}),$),tX={};Fz(tX,{emitWarningIfUnsupportedVersion:()=>Rz});eX.exports=zz(tX);var aX=!1,Rz=wz(($)=>{if($&&!aX&&parseInt($.substring(1,$.indexOf(".")))<18)aX=!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 TZ=K((rT,VZ)=>{var bU=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,Iz=Object.getOwnPropertyDescriptor,Ez=Object.getOwnPropertyNames,Jz=Object.prototype.hasOwnProperty,S=($,U)=>W$($,"name",{value:U,configurable:!0}),Kz=($,U)=>{for(var G in U)W$($,G,{get:U[G],enumerable:!0})},Mz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Ez(U))if(!Jz.call($,X)&&X!==G)W$($,X,{get:()=>U[X],enumerable:!(W=Iz(U,X))||W.enumerable})}return $},Bz=($)=>Mz(W$({},"__esModule",{value:!0}),$),ZZ={};Kz(ZZ,{SignatureV4:()=>sz,clearCredentialCache:()=>xz,createScope:()=>U$,getCanonicalHeaders:()=>DU,getCanonicalQuery:()=>IZ,getPayloadHash:()=>G$,getSigningKey:()=>RZ,moveHeadersToQuery:()=>MZ,prepareRequest:()=>hU});VZ.exports=Bz(ZZ);var UZ=h0(),jU=G0(),Vz="X-Amz-Algorithm",Tz="X-Amz-Credential",LZ="X-Amz-Date",Hz="X-Amz-SignedHeaders",Az="X-Amz-Expires",YZ="X-Amz-Signature",wZ="X-Amz-Security-Token",FZ="authorization",QZ=LZ.toLowerCase(),Oz="date",fz=[FZ,QZ,Oz],Cz=YZ.toLowerCase(),kU="x-amz-content-sha256",qz=wZ.toLowerCase(),Nz={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},Pz=/^proxy-/,jz=/^sec-/,SU="AWS4-HMAC-SHA256",Sz="AWS4-HMAC-SHA256-PAYLOAD",kz="UNSIGNED-PAYLOAD",Dz=50,zZ="aws4_request",bz=604800,L0=A6(),hz=G0(),k0={},$$=[],U$=S(($,U,G)=>`${$}/${U}/${G}/${zZ}`,"createScope"),RZ=S(async($,U,G,W,X)=>{const Z=await GZ($,U.secretAccessKey,U.accessKeyId),L=`${G}:${W}:${X}:${L0.toHex(Z)}:${U.sessionToken}`;if(L in k0)return k0[L];$$.push(L);while($$.length>Dz)delete k0[$$.shift()];let Y=`AWS4${U.secretAccessKey}`;for(let w of[G,W,X,zZ])Y=await GZ($,Y,w);return k0[L]=Y},"getSigningKey"),xz=S(()=>{$$.length=0,Object.keys(k0).forEach(($)=>{delete k0[$]})},"clearCredentialCache"),GZ=S(($,U,G)=>{const W=new $(U);return W.update(hz.toUint8Array(G)),W.digest()},"hmac"),DU=S(({headers:$},U,G)=>{const W={};for(let X of Object.keys($).sort()){if($[X]==null)continue;const Z=X.toLowerCase();if(Z in Nz||(U==null?void 0:U.has(Z))||Pz.test(Z)||jz.test(Z)){if(!G||G&&!G.has(Z))continue}W[Z]=$[X].trim().replace(/\s+/g," ")}return W},"getCanonicalHeaders"),t0=d4(),IZ=S(({query:$={}})=>{const U=[],G={};for(let W of Object.keys($).sort()){if(W.toLowerCase()===Cz)continue;U.push(W);const X=$[W];if(typeof X==="string")G[W]=`${t0.escapeUri(W)}=${t0.escapeUri(X)}`;else if(Array.isArray(X))G[W]=X.slice(0).reduce((Z,L)=>Z.concat([`${t0.escapeUri(W)}=${t0.escapeUri(L)}`]),[]).sort().join("&")}return U.map((W)=>G[W]).filter((W)=>W).join("&")},"getCanonicalQuery"),vz=b$(),cz=G0(),G$=S(async({headers:$,body:U},G)=>{for(let W of Object.keys($))if(W.toLowerCase()===kU)return $[W];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||vz.isArrayBuffer(U)){const W=new G;return W.update(cz.toUint8Array(U)),L0.toHex(await W.digest())}return kz},"getPayloadHash"),WZ=G0(),EZ=class ${format(U){const G=[];for(let Z of Object.keys(U)){const L=WZ.fromUtf8(Z);G.push(Uint8Array.from([L.byteLength]),L,this.formatHeaderValue(U[Z]))}const W=new Uint8Array(G.reduce((Z,L)=>Z+L.byteLength,0));let X=0;for(let Z of G)W.set(Z,X),X+=Z.byteLength;return W}formatHeaderValue(U){switch(U.type){case"boolean":return Uint8Array.from([U.value?0:1]);case"byte":return Uint8Array.from([2,U.value]);case"short":const G=new DataView(new ArrayBuffer(3));return G.setUint8(0,3),G.setInt16(1,U.value,!1),new Uint8Array(G.buffer);case"integer":const W=new DataView(new ArrayBuffer(5));return W.setUint8(0,4),W.setInt32(1,U.value,!1),new Uint8Array(W.buffer);case"long":const X=new Uint8Array(9);return X[0]=5,X.set(U.value.bytes,1),X;case"binary":const Z=new DataView(new ArrayBuffer(3+U.value.byteLength));Z.setUint8(0,6),Z.setUint16(1,U.value.byteLength,!1);const L=new Uint8Array(Z.buffer);return L.set(U.value,3),L;case"string":const Y=WZ.fromUtf8(U.value),w=new DataView(new ArrayBuffer(3+Y.byteLength));w.setUint8(0,7),w.setUint16(1,Y.byteLength,!1);const F=new Uint8Array(w.buffer);return F.set(Y,3),F;case"timestamp":const Q=new Uint8Array(9);return Q[0]=8,Q.set(_z.fromNumber(U.value.valueOf()).bytes,1),Q;case"uuid":if(!uz.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const z=new Uint8Array(17);return z[0]=9,z.set(L0.fromHex(U.value.replace(/\-/g,"")),1),z}}};S(EZ,"HeaderFormatter");var yz=EZ,uz=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,JZ=class ${constructor(U){if(this.bytes=U,U.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(U){if(U>9223372036854776000||U<-9223372036854776000)throw new Error(`${U} is too large (or, if negative, too small) to represent as an Int64`);const G=new Uint8Array(8);for(let W=7,X=Math.abs(Math.round(U));W>-1&&X>0;W--,X/=256)G[W]=X;if(U<0)bU(G);return new $(G)}valueOf(){const U=this.bytes.slice(0),G=U[0]&128;if(G)bU(U);return parseInt(L0.toHex(U),16)*(G?-1:1)}toString(){return String(this.valueOf())}};S(JZ,"Int64");var _z=JZ;S(bU,"negate");var dz=S(($,U)=>{$=$.toLowerCase();for(let G of Object.keys(U))if($===G.toLowerCase())return!0;return!1},"hasHeader"),KZ=r(),MZ=S(($,U={})=>{var G;const{headers:W,query:X={}}=KZ.HttpRequest.clone($);for(let Z of Object.keys(W)){const L=Z.toLowerCase();if(L.slice(0,6)==="x-amz-"&&!((G=U.unhoistableHeaders)==null?void 0:G.has(L)))X[Z]=W[Z],delete W[Z]}return{...$,headers:W,query:X}},"moveHeadersToQuery"),hU=S(($)=>{$=KZ.HttpRequest.clone($);for(let U of Object.keys($.headers))if(fz.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),pz=S(($)=>gz($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),gz=S(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),BZ=class ${constructor({applyChecksum:U,credentials:G,region:W,service:X,sha256:Z,uriEscapePath:L=!0}){this.headerFormatter=new yz,this.service=X,this.sha256=Z,this.uriEscapePath=L,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=UZ.normalizeProvider(W),this.credentialProvider=UZ.normalizeProvider(G)}async presign(U,G={}){const{signingDate:W=new Date,expiresIn:X=3600,unsignableHeaders:Z,unhoistableHeaders:L,signableHeaders:Y,signingRegion:w,signingService:F}=G,Q=await this.credentialProvider();this.validateResolvedCredentials(Q);const z=w??await this.regionProvider(),{longDate:R,shortDate:I}=e1(W);if(X>bz)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const J=U$(I,z,F??this.service),T=MZ(hU(U),{unhoistableHeaders:L});if(Q.sessionToken)T.query[wZ]=Q.sessionToken;T.query[Vz]=SU,T.query[Tz]=`${Q.accessKeyId}/${J}`,T.query[LZ]=R,T.query[Az]=X.toString(10);const M=DU(T,Z,Y);return T.query[Hz]=XZ(M),T.query[YZ]=await this.getSignature(R,J,this.getSigningKey(Q,z,I,F),this.createCanonicalRequest(T,M,await G$(U,this.sha256))),T}async sign(U,G){if(typeof U==="string")return this.signString(U,G);else if(U.headers&&U.payload)return this.signEvent(U,G);else if(U.message)return this.signMessage(U,G);else return this.signRequest(U,G)}async signEvent({headers:U,payload:G},{signingDate:W=new Date,priorSignature:X,signingRegion:Z,signingService:L}){const Y=Z??await this.regionProvider(),{shortDate:w,longDate:F}=e1(W),Q=U$(w,Y,L??this.service),z=await G$({headers:{},body:G},this.sha256),R=new this.sha256;R.update(U);const I=L0.toHex(await R.digest()),J=[Sz,F,Q,X,I,z].join("\n");return this.signString(J,{signingDate:W,signingRegion:Y,signingService:L})}async signMessage(U,{signingDate:G=new Date,signingRegion:W,signingService:X}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:G,signingRegion:W,signingService:X,priorSignature:U.priorSignature}).then((L)=>{return{message:U.message,signature:L}})}async signString(U,{signingDate:G=new Date,signingRegion:W,signingService:X}={}){const Z=await this.credentialProvider();this.validateResolvedCredentials(Z);const L=W??await this.regionProvider(),{shortDate:Y}=e1(G),w=new this.sha256(await this.getSigningKey(Z,L,Y,X));return w.update(jU.toUint8Array(U)),L0.toHex(await w.digest())}async signRequest(U,{signingDate:G=new Date,signableHeaders:W,unsignableHeaders:X,signingRegion:Z,signingService:L}={}){const Y=await this.credentialProvider();this.validateResolvedCredentials(Y);const w=Z??await this.regionProvider(),F=hU(U),{longDate:Q,shortDate:z}=e1(G),R=U$(z,w,L??this.service);if(F.headers[QZ]=Q,Y.sessionToken)F.headers[qz]=Y.sessionToken;const I=await G$(F,this.sha256);if(!dz(kU,F.headers)&&this.applyChecksum)F.headers[kU]=I;const J=DU(F,X,W),T=await this.getSignature(Q,R,this.getSigningKey(Y,w,z,L),this.createCanonicalRequest(F,J,I));return F.headers[FZ]=`${SU} Credential=${Y.accessKeyId}/${R}, SignedHeaders=${XZ(J)}, Signature=${T}`,F}createCanonicalRequest(U,G,W){const X=Object.keys(G).sort();return`${U.method}
|
|
10
|
+
${this.getCanonicalPath(U)}
|
|
11
|
+
${IZ(U)}
|
|
12
|
+
${X.map((Z)=>`${Z}:${G[Z]}`).join("\n")}
|
|
13
|
+
|
|
14
|
+
${X.join(";")}
|
|
15
|
+
${W}`}async createStringToSign(U,G,W){const X=new this.sha256;X.update(jU.toUint8Array(W));const Z=await X.digest();return`${SU}
|
|
16
|
+
${U}
|
|
17
|
+
${G}
|
|
18
|
+
${L0.toHex(Z)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){const G=[];for(let Z of U.split("/")){if((Z==null?void 0:Z.length)===0)continue;if(Z===".")continue;if(Z==="..")G.pop();else G.push(Z)}const W=`${(U==null?void 0:U.startsWith("/"))?"/":""}${G.join("/")}${G.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return t0.escapeUri(W).replace(/%2F/g,"/")}return U}async getSignature(U,G,W,X){const Z=await this.createStringToSign(U,G,X),L=new this.sha256(await W);return L.update(jU.toUint8Array(Z)),L0.toHex(await L.digest())}getSigningKey(U,G,W,X){return RZ(this.sha256,U,W,G,X||this.service)}validateResolvedCredentials(U){if(typeof U!=="object"||typeof U.accessKeyId!=="string"||typeof U.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};S(BZ,"SignatureV4");var sz=BZ,e1=S(($)=>{const U=pz($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),XZ=S(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var SZ=K((oT,jZ)=>{var{defineProperty:X$,getOwnPropertyDescriptor:lz,getOwnPropertyNames:mz}=Object,nz=Object.prototype.hasOwnProperty,h=($,U)=>X$($,"name",{value:U,configurable:!0}),iz=($,U)=>{for(var G in U)X$($,G,{get:U[G],enumerable:!0})},rz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of mz(U))if(!nz.call($,X)&&X!==G)X$($,X,{get:()=>U[X],enumerable:!(W=lz(U,X))||W.enumerable})}return $},oz=($)=>rz(X$({},"__esModule",{value:!0}),$),CZ={};iz(CZ,{AWSSDKSigV4Signer:()=>$R,AwsSdkSigV4ASigner:()=>GR,AwsSdkSigV4Signer:()=>cU,NODE_SIGV4A_CONFIG_OPTIONS:()=>ZR,resolveAWSSDKSigV4Config:()=>LR,resolveAwsSdkSigV4AConfig:()=>XR,resolveAwsSdkSigV4Config:()=>PZ,validateSigningProperties:()=>vU});jZ.exports=oz(CZ);var az=r(),tz=r(),HZ=h(($)=>{var U,G;return tz.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"),ez=h(($,U)=>Math.abs(xU(U).getTime()-$)>=300000,"isClockSkewed"),AZ=h(($,U)=>{const G=Date.parse($);if(ez(G,U))return G-Date.now();return U},"getUpdatedSystemClockOffset"),e0=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 X=e0("context",$.context),Z=e0("config",$.config),L=(W=(G=(U=X.endpointV2)==null?void 0:U.properties)==null?void 0:G.authSchemes)==null?void 0:W[0],w=await e0("signer",Z.signer)(L),F=$==null?void 0:$.signingRegion,Q=$==null?void 0:$.signingRegionSet,z=$==null?void 0:$.signingName;return{config:Z,signer:w,signingRegion:F,signingRegionSet:Q,signingName:z}},"validateSigningProperties"),qZ=class ${async sign(U,G,W){var X;if(!az.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const Z=await vU(W),{config:L,signer:Y}=Z;let{signingRegion:w,signingName:F}=Z;const Q=W.context;if(((X=Q==null?void 0:Q.authSchemes)==null?void 0:X.length)??0>1){const[R,I]=Q.authSchemes;if((R==null?void 0:R.name)==="sigv4a"&&(I==null?void 0:I.name)==="sigv4")w=(I==null?void 0:I.signingRegion)??w,F=(I==null?void 0:I.signingName)??F}return await Y.sign(U,{signingDate:xU(L.systemClockOffset),signingRegion:w,signingService:F})}errorHandler(U){return(G)=>{const W=G.ServerTime??HZ(G.$response);if(W){const X=e0("config",U.config),Z=X.systemClockOffset;if(X.systemClockOffset=AZ(W,X.systemClockOffset),X.systemClockOffset!==Z&&G.$metadata)G.$metadata.clockSkewCorrected=!0}throw G}}successHandler(U,G){const W=HZ(U);if(W){const X=e0("config",G.config);X.systemClockOffset=AZ(W,X.systemClockOffset)}}};h(qZ,"AwsSdkSigV4Signer");var cU=qZ,$R=cU,UR=r(),NZ=class $ extends cU{async sign(U,G,W){var X;if(!UR.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:Z,signer:L,signingRegion:Y,signingRegionSet:w,signingName:F}=await vU(W),z=(await((X=Z.sigv4aSigningRegionSet)==null?void 0:X.call(Z))??w??[Y]).join(",");return await L.sign(U,{signingDate:xU(Z.systemClockOffset),signingRegion:z,signingService:F})}};h(NZ,"AwsSdkSigV4ASigner");var GR=NZ,WR=wU(),OZ=A$(),XR=h(($)=>{return $.sigv4aSigningRegionSet=WR.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),ZR={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new OZ.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 OZ.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},M0=wU(),fZ=TZ(),PZ=h(($)=>{let U;if($.credentials)U=M0.memoizeIdentityProvider($.credentials,M0.isIdentityExpired,M0.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=M0.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=h(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:G=!0,systemClockOffset:W=$.systemClockOffset||0,sha256:X}=$;let Z;if($.signer)Z=M0.normalizeProvider($.signer);else if($.regionInfoProvider)Z=h(()=>M0.normalizeProvider($.region)().then(async(L)=>[await $.regionInfoProvider(L,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},L]).then(([L,Y])=>{const{signingRegion:w,signingService:F}=L;$.signingRegion=$.signingRegion||w||Y,$.signingName=$.signingName||F||$.serviceId;const Q={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:X,uriEscapePath:G};return new($.signerConstructor||fZ.SignatureV4)(Q)}),"signer");else Z=h(async(L)=>{L=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await M0.normalizeProvider($.region)(),properties:{}},L);const{signingRegion:Y,signingName:w}=L;$.signingRegion=$.signingRegion||Y,$.signingName=$.signingName||w||$.serviceId;const F={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:X,uriEscapePath:G};return new($.signerConstructor||fZ.SignatureV4)(F)},"signer");return{...$,systemClockOffset:W,signingEscapePath:G,credentials:U,signer:Z}},"resolveAwsSdkSigV4Config"),LR=PZ});var Z$=K((zR)=>{var YR=":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",kZ="[: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]["+YR+"]*",wR=new RegExp("^"+kZ+"$"),FR=function($,U){const G=[];let W=U.exec($);while(W){const X=[];X.startIndex=U.lastIndex-W[0].length;const Z=W.length;for(let L=0;L<Z;L++)X.push(W[L]);G.push(X),W=U.exec($)}return G},QR=function($){const U=wR.exec($);return!(U===null||typeof U==="undefined")};zR.isExist=function($){return typeof $!=="undefined"};zR.isEmptyObject=function($){return Object.keys($).length===0};zR.merge=function($,U,G){if(U){const W=Object.keys(U),X=W.length;for(let Z=0;Z<X;Z++)if(G==="strict")$[W[Z]]=[U[W[Z]]];else $[W[Z]]=U[W[Z]]}};zR.getValue=function($){if(zR.isExist($))return $;else return""};zR.isName=QR;zR.getAllMatches=FR;zR.nameRegexp=kZ});var uU=K((NR)=>{var bZ=function($){return $===" "||$==="\t"||$==="\n"||$==="\r"},hZ=function($,U){const G=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const W=$.substr(G,U-G);if(U>5&&W==="xml")return P("InvalidXml","XML declaration allowed only at the start of the document.",b($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U},xZ=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},HR=function($,U){let G="",W="",X=!1;for(;U<$.length;U++){if($[U]===VR||$[U]===TR)if(W==="")W=$[U];else if(W!==$[U]);else W="";else if($[U]===">"){if(W===""){X=!0;break}}G+=$[U]}if(W!=="")return!1;return{value:G,index:U,tagClosed:X}},vZ=function($,U){const G=yU.getAllMatches($,AR),W={};for(let X=0;X<G.length;X++){if(G[X][1].length===0)return P("InvalidAttr","Attribute '"+G[X][2]+"' has no space in starting.",$1(G[X]));else if(G[X][3]!==void 0&&G[X][4]===void 0)return P("InvalidAttr","Attribute '"+G[X][2]+"' is without value.",$1(G[X]));else if(G[X][3]===void 0&&!U.allowBooleanAttributes)return P("InvalidAttr","boolean attribute '"+G[X][2]+"' is not allowed.",$1(G[X]));const Z=G[X][2];if(!CR(Z))return P("InvalidAttr","Attribute '"+Z+"' is an invalid name.",$1(G[X]));if(!W.hasOwnProperty(Z))W[Z]=1;else return P("InvalidAttr","Attribute '"+Z+"' is repeated.",$1(G[X]))}return!0},OR=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},fR=function($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,OR($,U);let G=0;for(;U<$.length;U++,G++){if($[U].match(/\w/)&&G<20)continue;if($[U]===";")break;return-1}return U},P=function($,U,G){return{err:{code:$,msg:U,line:G.line||G,col:G.col}}},CR=function($){return yU.isName($)},qR=function($){return yU.isName($)},b=function($,U){const G=$.substring(0,U).split(/\r?\n/);return{line:G.length,col:G[G.length-1].length+1}},$1=function($){return $.startIndex+$[1].length},yU=Z$(),BR={allowBooleanAttributes:!1,unpairedTags:[]};NR.validate=function($,U){U=Object.assign({},BR,U);const G=[];let W=!1,X=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let Z=0;Z<$.length;Z++)if($[Z]==="<"&&$[Z+1]==="?"){if(Z+=2,Z=hZ($,Z),Z.err)return Z}else if($[Z]==="<"){let L=Z;if(Z++,$[Z]==="!"){Z=xZ($,Z);continue}else{let Y=!1;if($[Z]==="/")Y=!0,Z++;let w="";for(;Z<$.length&&$[Z]!==">"&&$[Z]!==" "&&$[Z]!=="\t"&&$[Z]!=="\n"&&$[Z]!=="\r";Z++)w+=$[Z];if(w=w.trim(),w[w.length-1]==="/")w=w.substring(0,w.length-1),Z--;if(!qR(w)){let z;if(w.trim().length===0)z="Invalid space after '<'.";else z="Tag '"+w+"' is an invalid name.";return P("InvalidTag",z,b($,Z))}const F=HR($,Z);if(F===!1)return P("InvalidAttr","Attributes for '"+w+"' have open quote.",b($,Z));let Q=F.value;if(Z=F.index,Q[Q.length-1]==="/"){const z=Z-Q.length;Q=Q.substring(0,Q.length-1);const R=vZ(Q,U);if(R===!0)W=!0;else return P(R.err.code,R.err.msg,b($,z+R.err.line))}else if(Y)if(!F.tagClosed)return P("InvalidTag","Closing tag '"+w+"' doesn't have proper closing.",b($,Z));else if(Q.trim().length>0)return P("InvalidTag","Closing tag '"+w+"' can't have attributes or invalid starting.",b($,L));else if(G.length===0)return P("InvalidTag","Closing tag '"+w+"' has not been opened.",b($,L));else{const z=G.pop();if(w!==z.tagName){let R=b($,z.tagStartPos);return P("InvalidTag","Expected closing tag '"+z.tagName+"' (opened in line "+R.line+", col "+R.col+") instead of closing tag '"+w+"'.",b($,L))}if(G.length==0)X=!0}else{const z=vZ(Q,U);if(z!==!0)return P(z.err.code,z.err.msg,b($,Z-Q.length+z.err.line));if(X===!0)return P("InvalidXml","Multiple possible root nodes found.",b($,Z));else if(U.unpairedTags.indexOf(w)!==-1);else G.push({tagName:w,tagStartPos:L});W=!0}for(Z++;Z<$.length;Z++)if($[Z]==="<")if($[Z+1]==="!"){Z++,Z=xZ($,Z);continue}else if($[Z+1]==="?"){if(Z=hZ($,++Z),Z.err)return Z}else break;else if($[Z]==="&"){const z=fR($,Z);if(z==-1)return P("InvalidChar","char '&' is not expected.",b($,Z));Z=z}else if(X===!0&&!bZ($[Z]))return P("InvalidXml","Extra text at the end",b($,Z));if($[Z]==="<")Z--}}else{if(bZ($[Z]))continue;return P("InvalidChar","char '"+$[Z]+"' is not expected.",b($,Z))}if(!W)return P("InvalidXml","Start tag expected.",1);else if(G.length==1)return P("InvalidTag","Unclosed tag '"+G[0].tagName+"'.",b($,G[0].tagStartPos));else if(G.length>0)return P("InvalidXml","Invalid '"+JSON.stringify(G.map((Z)=>Z.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var VR='"',TR="'",AR=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var yZ=K((SR)=>{var cZ={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 $}},jR=function($){return Object.assign({},cZ,$)};SR.buildOptions=jR;SR.defaultOptions=cZ});var dZ=K(($H,_Z)=>{class uZ{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})}}_Z.exports=uZ});var gZ=K((UH,pZ)=>{var hR=function($,U){const G={};if($[U+3]==="O"&&$[U+4]==="C"&&$[U+5]==="T"&&$[U+6]==="Y"&&$[U+7]==="P"&&$[U+8]==="E"){U=U+9;let W=1,X=!1,Z=!1,L="";for(;U<$.length;U++)if($[U]==="<"&&!Z){if(X&&cR($,U)){if(U+=7,[entityName,val,U]=xR($,U+1),val.indexOf("&")===-1)G[dR(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(X&&yR($,U))U+=8;else if(X&&uR($,U))U+=8;else if(X&&_R($,U))U+=9;else if(vR)Z=!0;else throw new Error("Invalid DOCTYPE");W++,L=""}else if($[U]===">"){if(Z){if($[U-1]==="-"&&$[U-2]==="-")Z=!1,W--}else W--;if(W===0)break}else if($[U]==="[")X=!0;else L+=$[U];if(W!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:G,i:U}},xR=function($,U){let G="";for(;U<$.length&&($[U]!=="'"&&$[U]!=='"');U++)G+=$[U];if(G=G.trim(),G.indexOf(" ")!==-1)throw new Error("External entites are not supported");const W=$[U++];let X="";for(;U<$.length&&$[U]!==W;U++)X+=$[U];return[G,X,U]},vR=function($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1},cR=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},yR=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},uR=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},_R=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},dR=function($){if(bR.isName($))return $;else throw new Error(`Invalid entity name ${$}`)},bR=Z$();pZ.exports=hR});var lZ=K((GH,sZ)=>{var lR=function($,U={}){if(U=Object.assign({},sR,U),!$||typeof $!=="string")return $;let G=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(G))return $;else if(U.hex&&pR.test(G))return Number.parseInt(G,16);else{const W=gR.exec(G);if(W){const X=W[1],Z=W[2];let L=mR(W[3]);const Y=W[4]||W[6];if(!U.leadingZeros&&Z.length>0&&X&&G[2]!==".")return $;else if(!U.leadingZeros&&Z.length>0&&!X&&G[1]!==".")return $;else{const w=Number(G),F=""+w;if(F.search(/[eE]/)!==-1)if(U.eNotation)return w;else return $;else if(Y)if(U.eNotation)return w;else return $;else if(G.indexOf(".")!==-1)if(F==="0"&&L==="")return w;else if(F===L)return w;else if(X&&F==="-"+L)return w;else return $;if(Z)if(L===F)return w;else if(X+L===F)return w;else return $;if(G===F)return w;else if(G===X+F)return w;return $}}else return $}},mR=function($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $},pR=/^[-+]?0x[a-fA-F0-9]+$/,gR=/^([\-\+])?(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 sR={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};sZ.exports=lR});var rZ=K((WH,iZ)=>{var rR=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]}}},oR=function($,U,G,W,X,Z,L){if($!==void 0){if(this.options.trimValues&&!W)$=$.trim();if($.length>0){if(!L)$=this.replaceEntitiesValue($);const Y=this.options.tagValueProcessor(U,$,G,X,Z);if(Y===null||Y===void 0)return $;else if(typeof Y!==typeof $||Y!==$)return Y;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 $}}},aR=function($){if(this.options.removeNSPrefix){const U=$.split(":"),G=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=G+U[1]}return $},eR=function($,U,G){if(!this.options.ignoreAttributes&&typeof $==="string"){const W=mZ.getAllMatches($,tR),X=W.length,Z={};for(let L=0;L<X;L++){const Y=this.resolveNameSpace(W[L][1]);let w=W[L][4],F=this.options.attributeNamePrefix+Y;if(Y.length){if(this.options.transformAttributeName)F=this.options.transformAttributeName(F);if(F==="__proto__")F="#__proto__";if(w!==void 0){if(this.options.trimValues)w=w.trim();w=this.replaceEntitiesValue(w);const Q=this.options.attributeValueProcessor(Y,w,U);if(Q===null||Q===void 0)Z[F]=w;else if(typeof Q!==typeof w||Q!==w)Z[F]=Q;else Z[F]=dU(w,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)Z[F]=!0}}if(!Object.keys(Z).length)return;if(this.options.attributesGroupName){const L={};return L[this.options.attributesGroupName]=Z,L}return Z}},UI=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)},WI=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 $},XI=function($,U,G){const W="*."+G;for(let X in $){const Z=$[X];if(W===Z||U===Z)return!0}return!1},ZI=function($,U,G=">"){let W,X="";for(let Z=U;Z<$.length;Z++){let L=$[Z];if(W){if(L===W)W=""}else if(L==='"'||L==="'")W=L;else if(L===G[0])if(G[1]){if($[Z+1]===G[1])return{data:X,index:Z}}else return{data:X,index:Z};else if(L==="\t")L=" ";X+=L}},B0=function($,U,G,W){const X=$.indexOf(U,G);if(X===-1)throw new Error(W);else return X+U.length-1},_U=function($,U,G,W=">"){const X=ZI($,U+1,W);if(!X)return;let Z=X.data;const L=X.index,Y=Z.search(/\s/);let w=Z,F=!0;if(Y!==-1)w=Z.substring(0,Y),Z=Z.substring(Y+1).trimStart();const Q=w;if(G){const z=w.indexOf(":");if(z!==-1)w=w.substr(z+1),F=w!==X.data.substr(z+1)}return{tagName:w,tagExp:Z,closeIndex:L,attrExpPresent:F,rawTagName:Q}},LI=function($,U,G){const W=G;let X=1;for(;G<$.length;G++)if($[G]==="<")if($[G+1]==="/"){const Z=B0($,">",G,`${U} is not closed`);if($.substring(G+2,Z).trim()===U){if(X--,X===0)return{tagContent:$.substring(W,G),i:Z}}G=Z}else if($[G+1]==="?")G=B0($,"?>",G+1,"StopNode is not closed.");else if($.substr(G+1,3)==="!--")G=B0($,"-->",G+3,"StopNode is not closed.");else if($.substr(G+1,2)==="![")G=B0($,"]]>",G,"StopNode is not closed.")-2;else{const Z=_U($,G,">");if(Z){if((Z&&Z.tagName)===U&&Z.tagExp[Z.tagExp.length-1]!=="/")X++;G=Z.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 iR($,G)}else if(mZ.isExist($))return $;else return""},mZ=Z$(),U1=dZ(),nR=gZ(),iR=lZ();class nZ{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=rR,this.parseXml=$I,this.parseTextData=oR,this.resolveNameSpace=aR,this.buildAttributesMap=eR,this.isItStopNode=XI,this.replaceEntitiesValue=GI,this.readStopNodeData=LI,this.saveTextToParentTag=WI,this.addChild=UI}}var tR=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),$I=function($){$=$.replace(/\r\n?/g,"\n");const U=new U1("!xml");let G=U,W="",X="";for(let Z=0;Z<$.length;Z++)if($[Z]==="<")if($[Z+1]==="/"){const Y=B0($,">",Z,"Closing Tag is not closed.");let w=$.substring(Z+2,Y).trim();if(this.options.removeNSPrefix){const z=w.indexOf(":");if(z!==-1)w=w.substr(z+1)}if(this.options.transformTagName)w=this.options.transformTagName(w);if(G)W=this.saveTextToParentTag(W,G,X);const F=X.substring(X.lastIndexOf(".")+1);if(w&&this.options.unpairedTags.indexOf(w)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${w}>`);let Q=0;if(F&&this.options.unpairedTags.indexOf(F)!==-1)Q=X.lastIndexOf(".",X.lastIndexOf(".")-1),this.tagsNodeStack.pop();else Q=X.lastIndexOf(".");X=X.substring(0,Q),G=this.tagsNodeStack.pop(),W="",Z=Y}else if($[Z+1]==="?"){let Y=_U($,Z,!1,"?>");if(!Y)throw new Error("Pi Tag is not closed.");if(W=this.saveTextToParentTag(W,G,X),this.options.ignoreDeclaration&&Y.tagName==="?xml"||this.options.ignorePiTags);else{const w=new U1(Y.tagName);if(w.add(this.options.textNodeName,""),Y.tagName!==Y.tagExp&&Y.attrExpPresent)w[":@"]=this.buildAttributesMap(Y.tagExp,X,Y.tagName);this.addChild(G,w,X)}Z=Y.closeIndex+1}else if($.substr(Z+1,3)==="!--"){const Y=B0($,"-->",Z+4,"Comment is not closed.");if(this.options.commentPropName){const w=$.substring(Z+4,Y-2);W=this.saveTextToParentTag(W,G,X),G.add(this.options.commentPropName,[{[this.options.textNodeName]:w}])}Z=Y}else if($.substr(Z+1,2)==="!D"){const Y=nR($,Z);this.docTypeEntities=Y.entities,Z=Y.i}else if($.substr(Z+1,2)==="!["){const Y=B0($,"]]>",Z,"CDATA is not closed.")-2,w=$.substring(Z+9,Y);W=this.saveTextToParentTag(W,G,X);let F=this.parseTextData(w,G.tagname,X,!0,!1,!0,!0);if(F==null)F="";if(this.options.cdataPropName)G.add(this.options.cdataPropName,[{[this.options.textNodeName]:w}]);else G.add(this.options.textNodeName,F);Z=Y+2}else{let Y=_U($,Z,this.options.removeNSPrefix),w=Y.tagName;const F=Y.rawTagName;let{tagExp:Q,attrExpPresent:z,closeIndex:R}=Y;if(this.options.transformTagName)w=this.options.transformTagName(w);if(G&&W){if(G.tagname!=="!xml")W=this.saveTextToParentTag(W,G,X,!1)}const I=G;if(I&&this.options.unpairedTags.indexOf(I.tagname)!==-1)G=this.tagsNodeStack.pop(),X=X.substring(0,X.lastIndexOf("."));if(w!==U.tagname)X+=X?"."+w:w;if(this.isItStopNode(this.options.stopNodes,X,w)){let J="";if(Q.length>0&&Q.lastIndexOf("/")===Q.length-1){if(w[w.length-1]==="/")w=w.substr(0,w.length-1),X=X.substr(0,X.length-1),Q=w;else Q=Q.substr(0,Q.length-1);Z=Y.closeIndex}else if(this.options.unpairedTags.indexOf(w)!==-1)Z=Y.closeIndex;else{const M=this.readStopNodeData($,F,R+1);if(!M)throw new Error(`Unexpected end of ${F}`);Z=M.i,J=M.tagContent}const T=new U1(w);if(w!==Q&&z)T[":@"]=this.buildAttributesMap(Q,X,w);if(J)J=this.parseTextData(J,w,X,!0,z,!0,!0);X=X.substr(0,X.lastIndexOf(".")),T.add(this.options.textNodeName,J),this.addChild(G,T,X)}else{if(Q.length>0&&Q.lastIndexOf("/")===Q.length-1){if(w[w.length-1]==="/")w=w.substr(0,w.length-1),X=X.substr(0,X.length-1),Q=w;else Q=Q.substr(0,Q.length-1);if(this.options.transformTagName)w=this.options.transformTagName(w);const J=new U1(w);if(w!==Q&&z)J[":@"]=this.buildAttributesMap(Q,X,w);this.addChild(G,J,X),X=X.substr(0,X.lastIndexOf("."))}else{const J=new U1(w);if(this.tagsNodeStack.push(G),w!==Q&&z)J[":@"]=this.buildAttributesMap(Q,X,w);this.addChild(G,J,X),G=J}W="",Z=R}}else W+=$[Z];return U.child},GI=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 $};iZ.exports=nZ});var aZ=K((zI)=>{var YI=function($,U){return oZ($,U)},oZ=function($,U,G){let W;const X={};for(let Z=0;Z<$.length;Z++){const L=$[Z],Y=wI(L);let w="";if(G===void 0)w=Y;else w=G+"."+Y;if(Y===U.textNodeName)if(W===void 0)W=L[Y];else W+=""+L[Y];else if(Y===void 0)continue;else if(L[Y]){let F=oZ(L[Y],U,w);const Q=QI(F,U);if(L[":@"])FI(F,L[":@"],w,U);else if(Object.keys(F).length===1&&F[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)F=F[U.textNodeName];else if(Object.keys(F).length===0)if(U.alwaysCreateTextNode)F[U.textNodeName]="";else F="";if(X[Y]!==void 0&&X.hasOwnProperty(Y)){if(!Array.isArray(X[Y]))X[Y]=[X[Y]];X[Y].push(F)}else if(U.isArray(Y,w,Q))X[Y]=[F];else X[Y]=F}}if(typeof W==="string"){if(W.length>0)X[U.textNodeName]=W}else if(W!==void 0)X[U.textNodeName]=W;return X},wI=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(W!==":@")return W}},FI=function($,U,G,W){if(U){const X=Object.keys(U),Z=X.length;for(let L=0;L<Z;L++){const Y=X[L];if(W.isArray(Y,G+"."+Y,!0,!0))$[Y]=[U[Y]];else $[Y]=U[Y]}}},QI=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};zI.prettify=YI});var $L=K((ZH,eZ)=>{var{buildOptions:II}=yZ(),EI=rZ(),{prettify:JI}=aZ(),KI=uU();class tZ{constructor($){this.externalEntities={},this.options=II($)}parse($,U){if(typeof $==="string");else if($.toString)$=$.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(U){if(U===!0)U={};const X=KI.validate($,U);if(X!==!0)throw Error(`${X.err.msg}:${X.err.line}:${X.err.col}`)}const G=new EI(this.options);G.addExternalEntities(this.externalEntities);const W=G.parseXml($);if(this.options.preserveOrder||W===void 0)return W;else return JI(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}}eZ.exports=tZ});var ZL=K((LH,XL)=>{var MI=function($,U){let G="";if(U.format&&U.indentBy.length>0)G="\n";return GL($,U,"",G)},GL=function($,U,G,W){let X="",Z=!1;for(let L=0;L<$.length;L++){const Y=$[L],w=BI(Y);if(w===void 0)continue;let F="";if(G.length===0)F=w;else F=`${G}.${w}`;if(w===U.textNodeName){let J=Y[w];if(!VI(F,U))J=U.tagValueProcessor(w,J),J=WL(J,U);if(Z)X+=W;X+=J,Z=!1;continue}else if(w===U.cdataPropName){if(Z)X+=W;X+=`<![CDATA[${Y[w][0][U.textNodeName]}]]>`,Z=!1;continue}else if(w===U.commentPropName){X+=W+`<!--${Y[w][0][U.textNodeName]}-->`,Z=!0;continue}else if(w[0]==="?"){const J=UL(Y[":@"],U),T=w==="?xml"?"":W;let M=Y[w][0][U.textNodeName];M=M.length!==0?" "+M:"",X+=T+`<${w}${M}${J}?>`,Z=!0;continue}let Q=W;if(Q!=="")Q+=U.indentBy;const z=UL(Y[":@"],U),R=W+`<${w}${z}`,I=GL(Y[w],U,F,Q);if(U.unpairedTags.indexOf(w)!==-1)if(U.suppressUnpairedNode)X+=R+">";else X+=R+"/>";else if((!I||I.length===0)&&U.suppressEmptyNode)X+=R+"/>";else if(I&&I.endsWith(">"))X+=R+`>${I}${W}</${w}>`;else{if(X+=R+">",I&&W!==""&&(I.includes("/>")||I.includes("</")))X+=W+U.indentBy+I+W;else X+=I;X+=`</${w}>`}Z=!0}return X},BI=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}},UL=function($,U){let G="";if($&&!U.ignoreAttributes)for(let W in $){if(!$.hasOwnProperty(W))continue;let X=U.attributeValueProcessor(W,$[W]);if(X=WL(X,U),X===!0&&U.suppressBooleanAttributes)G+=` ${W.substr(U.attributeNamePrefix.length)}`;else G+=` ${W.substr(U.attributeNamePrefix.length)}="${X}"`}return G},VI=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},WL=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 $};XL.exports=MI});var YL=K((YH,LL)=>{var Y0=function($){if(this.options=Object.assign({},HI,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=fI;if(this.processTextOrObjNode=AI,this.options.format)this.indentate=OI,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},AI=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)},OI=function($){return this.options.indentBy.repeat($)},fI=function($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1},TI=ZL(),HI={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};Y0.prototype.build=function($){if(this.options.preserveOrder)return TI($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};Y0.prototype.j2x=function($,U){let G="",W="";for(let X in $){if(!Object.prototype.hasOwnProperty.call($,X))continue;if(typeof $[X]==="undefined"){if(this.isAttribute(X))W+=""}else if($[X]===null)if(this.isAttribute(X))W+="";else if(X[0]==="?")W+=this.indentate(U)+"<"+X+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+X+"/"+this.tagEndChar;else if($[X]instanceof Date)W+=this.buildTextValNode($[X],X,"",U);else if(typeof $[X]!=="object"){const Z=this.isAttribute(X);if(Z)G+=this.buildAttrPairStr(Z,""+$[X]);else if(X===this.options.textNodeName){let L=this.options.tagValueProcessor(X,""+$[X]);W+=this.replaceEntitiesValue(L)}else W+=this.buildTextValNode($[X],X,"",U)}else if(Array.isArray($[X])){const Z=$[X].length;let L="",Y="";for(let w=0;w<Z;w++){const F=$[X][w];if(typeof F==="undefined");else if(F===null)if(X[0]==="?")W+=this.indentate(U)+"<"+X+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+X+"/"+this.tagEndChar;else if(typeof F==="object")if(this.options.oneListGroup){const Q=this.j2x(F,U+1);if(L+=Q.val,this.options.attributesGroupName&&F.hasOwnProperty(this.options.attributesGroupName))Y+=Q.attrStr}else L+=this.processTextOrObjNode(F,X,U);else if(this.options.oneListGroup){let Q=this.options.tagValueProcessor(X,F);Q=this.replaceEntitiesValue(Q),L+=Q}else L+=this.buildTextValNode(F,X,"",U)}if(this.options.oneListGroup)L=this.buildObjectNode(L,X,Y,U);W+=L}else if(this.options.attributesGroupName&&X===this.options.attributesGroupName){const Z=Object.keys($[X]),L=Z.length;for(let Y=0;Y<L;Y++)G+=this.buildAttrPairStr(Z[Y],""+$[X][Z[Y]])}else W+=this.processTextOrObjNode($[X],X,U)}return{attrStr:G,val:W}};Y0.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};Y0.prototype.buildObjectNode=function($,U,G,W){if($==="")if(U[0]==="?")return this.indentate(W)+"<"+U+G+"?"+this.tagEndChar;else return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else{let X="</"+U+this.tagEndChar,Z="";if(U[0]==="?")Z="?",X="";if((G||G==="")&&$.indexOf("<")===-1)return this.indentate(W)+"<"+U+G+Z+">"+$+X;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&Z.length===0)return this.indentate(W)+`<!--${$}-->`+this.newLine;else return this.indentate(W)+"<"+U+G+Z+this.tagEndChar+$+this.indentate(W)+X}};Y0.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};Y0.prototype.buildTextValNode=function($,U,G,W){if(this.options.cdataPropName!==!1&&U===this.options.cdataPropName)return this.indentate(W)+`<![CDATA[${$}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName)return this.indentate(W)+`<!--${$}-->`+this.newLine;else if(U[0]==="?")return this.indentate(W)+"<"+U+G+"?"+this.tagEndChar;else{let X=this.options.tagValueProcessor(U,$);if(X=this.replaceEntitiesValue(X),X==="")return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else return this.indentate(W)+"<"+U+G+">"+X+"</"+U+this.tagEndChar}};Y0.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 $};LL.exports=Y0});var FL=K((wH,wL)=>{var CI=uU(),qI=$L(),NI=YL();wL.exports={XMLParser:qI,XMLValidator:CI,XMLBuilder:NI}});var JL=K((FH,EL)=>{var{defineProperty:L$,getOwnPropertyDescriptor:PI,getOwnPropertyNames:jI}=Object,SI=Object.prototype.hasOwnProperty,x=($,U)=>L$($,"name",{value:U,configurable:!0}),kI=($,U)=>{for(var G in U)L$($,G,{get:U[G],enumerable:!0})},DI=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of jI(U))if(!SI.call($,X)&&X!==G)L$($,X,{get:()=>U[X],enumerable:!(W=PI(U,X))||W.enumerable})}return $},bI=($)=>DI(L$({},"__esModule",{value:!0}),$),QL={};kI(QL,{_toBool:()=>xI,_toNum:()=>vI,_toStr:()=>hI,awsExpectUnion:()=>yI,loadRestJsonErrorCode:()=>dI,loadRestXmlErrorCode:()=>lI,parseJsonBody:()=>RL,parseJsonErrorBody:()=>_I,parseXmlBody:()=>IL,parseXmlErrorBody:()=>sI});EL.exports=bI(QL);var hI=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"),xI=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"),vI=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"),cI=C0(),yI=x(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return cI.expectUnion($)},"awsExpectUnion"),uI=C0(),zL=x(($,U)=>uI.collectBody($,U).then((G)=>U.utf8Encoder(G)),"collectBodyString"),RL=x(($,U)=>zL($,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"),_I=x(async($,U)=>{const G=await RL($,U);return G.message=G.message??G.Message,G},"parseJsonErrorBody"),dI=x(($,U)=>{const G=x((Z,L)=>Object.keys(Z).find((Y)=>Y.toLowerCase()===L.toLowerCase()),"findKey"),W=x((Z)=>{let L=Z;if(typeof L==="number")L=L.toString();if(L.indexOf(",")>=0)L=L.split(",")[0];if(L.indexOf(":")>=0)L=L.split(":")[0];if(L.indexOf("#")>=0)L=L.split("#")[1];return L},"sanitizeErrorCode"),X=G($.headers,"x-amzn-errortype");if(X!==void 0)return W($.headers[X]);if(U.code!==void 0)return W(U.code);if(U.__type!==void 0)return W(U.__type)},"loadRestJsonErrorCode"),pI=C0(),gI=FL(),IL=x(($,U)=>zL($,U).then((G)=>{if(G.length){const W=new gI.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(w,F)=>F.trim()===""&&F.includes("\n")?"":void 0});W.addEntity("#xD","\r"),W.addEntity("#10","\n");let X;try{X=W.parse(G,!0)}catch(w){if(w&&typeof w==="object")Object.defineProperty(w,"$responseBodyText",{value:G});throw w}const Z="#text",L=Object.keys(X)[0],Y=X[L];if(Y[Z])Y[L]=Y[Z],delete Y[Z];return pI.getValueFromTextNode(Y)}return{}}),"parseXmlBody"),sI=x(async($,U)=>{const G=await IL($,U);if(G.Error)G.Error.message=G.Error.message??G.Error.Message;return G},"parseXmlErrorBody"),lI=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 nI=K((G1)=>{Object.defineProperty(G1,"__esModule",{value:!0});var pU=mI();pU.__exportStar($Z(),G1);pU.__exportStar(SZ(),G1);pU.__exportStar(JL(),G1)});var m=Z1(I$(),1),fE=m.default.v1,CE=m.default.v3,_G=m.default.v4,qE=m.default.v5,NE=m.default.NIL,PE=m.default.version,jE=m.default.validate,SE=m.default.stringify,kE=m.default.parse;function hE($){return $}var dY=($)=>(U)=>async(G)=>{if(!c.isInstance(G.request))return U(G);const{request:W}=G,{handlerProtocol:X=""}=$.requestHandler.metadata||{};if(X.indexOf("h2")>=0&&!W.headers[":authority"])delete W.headers.host,W.headers[":authority"]=W.hostname+(W.port?":"+W.port:"");else if(!W.headers.host){let Z=W.hostname;if(W.port!=null)Z+=`:${W.port}`;W.headers.host=Z}return U(G)},pY={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},xE=($)=>({applyToStack:(U)=>{U.add(dY($),pY)}});var gY=()=>($,U)=>async(G)=>{try{const W=await $(G),{clientName:X,commandName:Z,logger:L,dynamoDbDocumentClientOptions:Y={}}=U,{overrideInputFilterSensitiveLog:w,overrideOutputFilterSensitiveLog:F}=Y,Q=w??U.inputFilterSensitiveLog,z=F??U.outputFilterSensitiveLog,{$metadata:R,...I}=W.output;return L?.info?.({clientName:X,commandName:Z,input:Q(G.input),output:z(I),metadata:R}),W}catch(W){const{clientName:X,commandName:Z,logger:L,dynamoDbDocumentClientOptions:Y={}}=U,{overrideInputFilterSensitiveLog:w}=Y,F=w??U.inputFilterSensitiveLog;throw L?.error?.({clientName:X,commandName:Z,input:F(G.input),error:W,metadata:W.$metadata}),W}},sY={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},cE=($)=>({applyToStack:(U)=>{U.add(gY(),sY)}});var dG="X-Amzn-Trace-Id",lY="AWS_LAMBDA_FUNCTION_NAME",mY="_X_AMZN_TRACE_ID",nY=($)=>(U)=>async(G)=>{const{request:W}=G;if(!c.isInstance(W)||$.runtime!=="node"||W.headers.hasOwnProperty(dG))return U(G);const X=process.env[lY],Z=process.env[mY],L=(Y)=>typeof Y==="string"&&Y.length>0;if(L(X)&&L(Z))W.headers[dG]=Z;return U({...G,request:W})},iY={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},pE=($)=>({applyToStack:(U)=>{U.add(nY($),iY)}});function SJ($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}var q7=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}$"),i0=($)=>q7.test($)||$.startsWith("[")&&$.endsWith("]");var N7=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),r0=($,U=!1)=>{if(!U)return N7.test($);const G=$.split(".");for(let W of G)if(!r0(W))return!1;return!0};var o0={};var a="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 O extends Error{constructor($){super($);this.name="EndpointError"}}var ZX=($,U)=>$===U;var LX=($)=>{const U=$.split("."),G=[];for(let W of U){const X=W.indexOf("[");if(X!==-1){if(W.indexOf("]")!==W.length-1)throw new O(`Path: '${$}' does not end with ']'`);const Z=W.slice(X+1,-1);if(Number.isNaN(parseInt(Z)))throw new O(`Invalid array index: '${Z}' in path: '${$}'`);if(X!==0)G.push(W.slice(0,X));G.push(Z)}else G.push(W)}return G};var c1=($,U)=>LX(U).reduce((G,W)=>{if(typeof G!=="object")throw new O(`Index '${W}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(G))return G[parseInt(W)];return G[W]},$);var YX=($)=>$!=null;var wX=($)=>!$;var y1=Z1(F0(),1);var FU={[y1.EndpointURLScheme.HTTP]:80,[y1.EndpointURLScheme.HTTPS]:443},FX=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:R,port:I,protocol:J="",path:T="",query:M={}}=$,V=new URL(`${J}//${R}${I?`:${I}`:""}${T}`);return V.search=Object.entries(M).map(([B,H])=>`${B}=${H}`).join("&"),V}return new URL($)}catch(R){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const G=U.href,{host:W,hostname:X,pathname:Z,protocol:L,search:Y}=U;if(Y)return null;const w=L.slice(0,-1);if(!Object.values(y1.EndpointURLScheme).includes(w))return null;const F=i0(X),Q=G.includes(`${W}:${FU[w]}`)||typeof $==="string"&&$.includes(`${W}:${FU[w]}`),z=`${W}${Q?`:${FU[w]}`:""}`;return{scheme:w,authority:z,path:Z,normalizedPath:Z.endsWith("/")?Z:`${Z}/`,isIp:F}};var QX=($,U)=>$===U;var zX=($,U,G,W)=>{if(U>=G||$.length<G)return null;if(!W)return $.substring(U,G);return $.substring($.length-G,$.length-U)};var RX=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var IX={booleanEquals:ZX,getAttr:c1,isSet:YX,isValidHostLabel:r0,not:wX,parseURL:FX,stringEquals:QX,substring:zX,uriEncode:RX};var u1=($,U)=>{const G=[],W={...U.endpointParams,...U.referenceRecord};let X=0;while(X<$.length){const Z=$.indexOf("{",X);if(Z===-1){G.push($.slice(X));break}G.push($.slice(X,Z));const L=$.indexOf("}",Z);if(L===-1){G.push($.slice(Z));break}if($[Z+1]==="{"&&$[L+1]==="}")G.push($.slice(Z+1,L)),X=L+2;const Y=$.substring(Z+1,L);if(Y.includes("#")){const[w,F]=Y.split("#");G.push(c1(W[w],F))}else G.push(W[Y]);X=L+1}return G.join("")};var EX=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var X0=($,U,G)=>{if(typeof $==="string")return u1($,G);else if($.fn)return _1($,G);else if($.ref)return EX($,G);throw new O(`'${U}': ${String($)} is not a string, function or reference.`)};var _1=({fn:$,argv:U},G)=>{const W=U.map((Z)=>["boolean","number"].includes(typeof Z)?Z:X0(Z,"arg",G)),X=$.split(".");if(X[0]in o0&&X[1]!=null)return o0[X[0]][X[1]](...W);return IX[$](...W)};var JX=({assign:$,...U},G)=>{if($&&$ in G.referenceRecord)throw new O(`'${$}' is already defined in Reference Record.`);const W=_1(U,G);return G.logger?.debug?.(`${a} evaluateCondition: ${_(U)} = ${_(W)}`),{result:W===""?!0:!!W,...$!=null&&{toAssign:{name:$,value:W}}}};var N0=($=[],U)=>{const G={};for(let W of $){const{result:X,toAssign:Z}=JX(W,{...U,referenceRecord:{...U.referenceRecord,...G}});if(!X)return{result:X};if(Z)G[Z.name]=Z.value,U.logger?.debug?.(`${a} assign: ${Z.name} := ${_(Z.value)}`)}return{result:!0,referenceRecord:G}};var KX=($,U)=>Object.entries($).reduce((G,[W,X])=>({...G,[W]:X.map((Z)=>{const L=X0(Z,"Header value entry",U);if(typeof L!=="string")throw new O(`Header '${W}' value '${L}' is not a string`);return L})}),{});var QU=($,U)=>{if(Array.isArray($))return $.map((G)=>QU(G,U));switch(typeof $){case"string":return u1($,U);case"object":if($===null)throw new O(`Unexpected endpoint property: ${$}`);return d1($,U);case"boolean":return $;default:throw new O(`Unexpected endpoint property type: ${typeof $}`)}};var d1=($,U)=>Object.entries($).reduce((G,[W,X])=>({...G,[W]:QU(X,U)}),{});var MX=($,U)=>{const G=X0($,"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 O(`Endpoint URL must be a string, got ${typeof G}`)};var BX=($,U)=>{const{conditions:G,endpoint:W}=$,{result:X,referenceRecord:Z}=N0(G,U);if(!X)return;const L={...U,referenceRecord:{...U.referenceRecord,...Z}},{url:Y,properties:w,headers:F}=W;return U.logger?.debug?.(`${a} Resolving endpoint from template: ${_(W)}`),{...F!=null&&{headers:KX(F,L)},...w!=null&&{properties:d1(w,L)},url:MX(Y,L)}};var VX=($,U)=>{const{conditions:G,error:W}=$,{result:X,referenceRecord:Z}=N0(G,U);if(!X)return;throw new O(X0(W,"Error",{...U,referenceRecord:{...U.referenceRecord,...Z}}))};var TX=($,U)=>{const{conditions:G,rules:W}=$,{result:X,referenceRecord:Z}=N0(G,U);if(!X)return;return p1(W,{...U,referenceRecord:{...U.referenceRecord,...Z}})};var p1=($,U)=>{for(let G of $)if(G.type==="endpoint"){const W=BX(G,U);if(W)return W}else if(G.type==="error")VX(G,U);else if(G.type==="tree"){const W=TX(G,U);if(W)return W}else throw new O(`Unknown endpoint rule: ${G}`);throw new O("Rules evaluation failed")};var P7=($,U)=>{const{endpointParams:G,logger:W}=U,{parameters:X,rules:Z}=$;U.logger?.debug?.(`${a} Initial EndpointParams: ${_(G)}`);const L=Object.entries(X).filter(([,F])=>F.default!=null).map(([F,Q])=>[F,Q.default]);if(L.length>0)for(let[F,Q]of L)G[F]=G[F]??Q;const Y=Object.entries(X).filter(([,F])=>F.required).map(([F])=>F);for(let F of Y)if(G[F]==null)throw new O(`Missing required parameter: '${F}'`);const w=p1(Z,{endpointParams:G,logger:W,referenceRecord:{}});if(U.endpointParams?.Endpoint)try{const F=new URL(U.endpointParams.Endpoint),{protocol:Q,port:z}=F;w.url.protocol=Q,w.url.port=z}catch(F){}return U.logger?.debug?.(`${a} Resolved endpoint: ${_(w)}`),w};var zU=($,U=!1)=>{if(U){for(let G of $.split("."))if(!zU(G))return!1;return!0}if(!r0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(i0($))return!1;return!0};var HX=($)=>{const U=$.split(":");if(U.length<6)return null;const[G,W,X,Z,L,...Y]=U;if(G!=="arn"||W===""||X===""||Y[0]==="")return null;return{partition:W,service:X,region:Z,accountId:L,resourceId:Y[0].includes("/")?Y[0].split("/"):Y}};var AX={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"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 S7=AX,k7="",OX=($)=>{const{partitions:U}=S7;for(let W of U){const{regions:X,outputs:Z}=W;for(let[L,Y]of Object.entries(X))if(L===$)return{...Z,...Y}}for(let W of U){const{regionRegex:X,outputs:Z}=W;if(new RegExp(X).test($))return{...Z}}const G=U.find((W)=>W.id==="aws");if(!G)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...G.outputs}};var fX=()=>k7;var D7={isVirtualHostableS3Bucket:zU,parseArn:HX,partition:OX};o0.aws=D7;var RU="user-agent",g1="x-amz-user-agent",IU=" ",s1="/",CX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,qX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,EU="-";var b7=($)=>(U,G)=>async(W)=>{const{request:X}=W;if(!c.isInstance(X))return U(W);const{headers:Z}=X,L=G?.userAgent?.map(JU)||[],Y=(await $.defaultUserAgentProvider()).map(JU),w=$?.customUserAgent?.map(JU)||[],F=fX(),Q=(F?[F]:[]).concat([...Y,...L,...w]).join(IU),z=[...Y.filter((R)=>R.startsWith("aws-sdk-")),...w].join(IU);if($.runtime!=="browser"){if(z)Z[g1]=Z[g1]?`${Z[RU]} ${z}`:z;Z[RU]=Q}else Z[g1]=Q;return U({...W,request:X})},JU=($)=>{const U=$[0].split(s1).map((L)=>L.replace(CX,EU)).join(s1),G=$[1]?.replace(qX,EU),W=U.indexOf(s1),X=U.substring(0,W);let Z=U.substring(W+1);if(X==="api")Z=Z.toLowerCase();return[X,Z,G].filter((L)=>L&&L.length>0).reduce((L,Y,w)=>{switch(w){case 0:return Y;case 1:return`${L}/${Y}`;default:return`${L}#${Y}`}},"")},h7={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},FM=($)=>({applyToStack:(U)=>{U.add(b7($),h7)}});var l1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var KU=($)=>l1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var VM=($)=>{const{region:U,useFipsEndpoint:G}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return KU(U);const W=await U();return KU(W)},useFipsEndpoint:async()=>{const W=typeof U==="string"?U:await U();if(l1(W))return!0;return typeof G!=="function"?Promise.resolve(!!G):G()}}};var P0=($,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 Z0;(function($){$.ENV="env",$.CONFIG="shared config entry"})(Z0||(Z0={}));var x7="AWS_USE_DUALSTACK_ENDPOINT",v7="use_dualstack_endpoint";var jM={environmentVariableSelector:($)=>P0($,x7,Z0.ENV),configFileSelector:($)=>P0($,v7,Z0.CONFIG),default:!1};var c7="AWS_USE_FIPS_ENDPOINT",y7="use_fips_endpoint";var DM={environmentVariableSelector:($)=>P0($,c7,Z0.ENV),configFileSelector:($)=>P0($,y7,Z0.CONFIG),default:!1};var MU=Z1(F0(),1),NX=($)=>$[MU.SMITHY_CONTEXT_KEY]||($[MU.SMITHY_CONTEXT_KEY]={});var t=($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U};var PX={environmentVariableSelector:($)=>$["AWS_REGION"],configFileSelector:($)=>$["region"],default:()=>{throw new Error("Region is missing")}},aM={preferredFile:"credentials"};function u7($){return(U)=>async(G)=>{const W=G.request;if(c.isInstance(W)){const{body:X,headers:Z}=W;if(X&&Object.keys(Z).map((L)=>L.toLowerCase()).indexOf(jX)===-1)try{const L=$(X);W.headers={...W.headers,[jX]:String(L)}}catch(L){}}return U({...G,request:W})}}var jX="content-length",_7={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},fB=($)=>({applyToStack:(U)=>{U.add(u7($.bodyLengthChecker),_7)}});var SX=($,U)=>(G)=>async(W)=>{const{response:X}=await G(W);try{const Z=await U(X,$);return{response:X,output:Z}}catch(Z){if(Object.defineProperty(Z,"$response",{value:X}),!("$metadata"in Z)){if(Z.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof Z.$responseBodyText!=="undefined"){if(Z.$response)Z.$response.body=Z.$responseBodyText}}throw Z}};var kX=($,U)=>(G,W)=>async(X)=>{const Z=W.endpointV2?.url&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!Z)throw new Error("No valid endpoint provider available.");const L=await U(X.input,{...$,endpoint:Z});return G({...X,request:L})};function SB($,U,G){return{applyToStack:(W)=>{W.add(SX($,G),d7),W.add(kX($,U),BU)}}}var d7={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},BU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var DX=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(m7(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!l7(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},p7=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,g7=/(\d+\.){3}\d+/,s7=/\.\./;var l7=($)=>p7.test($)&&!g7.test($)&&!s7.test($),m7=($)=>{const[U,G,W,,,X]=$.split(":"),Z=U==="arn"&&$.split(":").length>=6,L=Boolean(Z&&G&&W&&X);if(Z&&!L)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return L};var bX=($,U,G)=>{const W=async()=>{const X=G[$]??G[U];if(typeof X==="function")return X();return X};if($==="credentialScope"||U==="CredentialScope")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return X?.credentialScope??X?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return X?.accountId??X?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{const X=await W();if(X&&typeof X==="object"){if("url"in X)return X.url.href;if("hostname"in X){const{protocol:Z,hostname:L,port:Y,path:w}=X;return`${Z}//${L}${Y?":"+Y:""}${w}`}}return X};return W};var hX="AWS_ENDPOINT_URL",xX="endpoint_url",vX=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((Z)=>Z.toUpperCase()),W=U[[hX,...G].join("_")];if(W)return W;const X=U[hX];if(X)return X;return},configFileSelector:(U,G)=>{if(G&&U.services){const X=G[["services",U.services].join(VU)];if(X){const Z=$.split(" ").map((Y)=>Y.toLowerCase()),L=X[[Z.join("_"),xX].join(VU)];if(L)return L}}const W=U[xX];if(W)return W;return},default:void 0});var cX=async($)=>E0(vX($))();var m1=($)=>{if(typeof $==="object"){if("url"in $)return TU($.url);return $}return TU($)};var yX=async($,U,G,W)=>{if(!G.endpoint){const L=await cX(G.serviceId||"");if(L)G.endpoint=()=>Promise.resolve(m1(L))}const X=await n7($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(X,W)},n7=async($,U,G)=>{const W={},X=U?.getEndpointParameterInstructions?.()||{};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 bX(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 DX(W);return W};var uX=({config:$,instructions:U})=>{return(G,W)=>async(X)=>{const Z=await yX(X.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=Z,W.authSchemes=Z.properties?.authSchemes;const L=W.authSchemes?.[0];if(L){W.signing_region=L.signingRegion,W.signing_service=L.signingName;const w=NX(W)?.selectedHttpAuthScheme?.httpAuthOption;if(w)w.signingProperties=Object.assign(w.signingProperties||{},{signing_region:L.signingRegion,signingRegion:L.signingRegion,signing_service:L.signingName,signingName:L.signingName,signingRegionSet:L.signingRegionSet},L.properties)}return G({...X})}};var i7={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:BU.name},WV=($,U)=>({applyToStack:(G)=>{G.addRelativeTo(uX({config:$,instructions:U}),i7)}});var YV=($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>m1(await t(G)()):void 0;return{...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:t($.useDualstackEndpoint??!1),useFipsEndpoint:t($.useFipsEndpoint??!1)}};var l;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(l||(l={}));var J0=3,_X=l.STANDARD;var dX=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],pX=["TimeoutError","RequestTimeout","RequestTimeoutException"],gX=[500,502,503,504],sX=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var r7=($)=>$.$metadata?.clockSkewCorrected,j0=($)=>$.$metadata?.httpStatusCode===429||dX.includes($.name)||$.$retryable?.throttling==!0,n1=($)=>r7($)||pX.includes($.name)||sX.includes($?.code||"")||gX.includes($.$metadata?.httpStatusCode||0),lX=($)=>{if($.$metadata?.httpStatusCode!==void 0){const U=$.$metadata.httpStatusCode;if(500<=U&&U<=599&&!n1($))return!0;return!1}return!1};class i1{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(),j0($)){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 K0=100,a0=20000,HU=500,r1=500,AU=5,OU=10,fU=1,o1="amz-sdk-invocation-id",a1="amz-sdk-request";var mX=()=>{let $=K0;return{computeNextBackoffDelay:(W)=>{return Math.floor(Math.min(a0,Math.random()*2**W*$))},setDelayBase:(W)=>{$=W}}};var CU=({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(a0,$),getRetryCost:()=>G}};class S0{constructor($){this.maxAttempts=$,this.mode=l.STANDARD,this.capacity=r1,this.retryBackoffStrategy=mX(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return CU({retryDelay:K0,retryCount:0})}async refreshRetryTokenForRetry($,U){const G=await this.getMaxAttempts();if(this.shouldRetry($,U,G)){const W=U.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?HU:K0);const X=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),Z=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,X):X,L=this.getCapacityCost(W);return this.capacity-=L,CU({retryDelay:Z,retryCount:$.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(r1,this.capacity+($.getRetryCost()??fU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${J0}`),J0}}shouldRetry($,U,G){return $.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?OU:AU}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class qU{constructor($,U){this.maxAttemptsProvider=$,this.mode=l.ADAPTIVE;const{rateLimiter:G}=U??{};this.rateLimiter=G??new i1,this.standardRetryStrategy=new S0($)}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 nX="AWS_MAX_ATTEMPTS",iX="max_attempts",tV={environmentVariableSelector:($)=>{const U=$[nX];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${nX} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[iX];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${iX} mast be a number, got "${U}"`);return G},default:J0},eV=($)=>{const{retryStrategy:U}=$,G=t($.maxAttempts??J0);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await t($.retryMode)()===l.ADAPTIVE)return new qU(G);return new S0(G)}}},o7="AWS_RETRY_MODE",a7="retry_mode",$T={environmentVariableSelector:($)=>$[o7],configFileSelector:($)=>$[a7],default:_X};import{Readable as t7} from"stream";var rX=($)=>$?.body instanceof t7||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var NU=($)=>{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 e7=($)=>(U,G)=>async(W)=>{let X=await $.retryStrategy();const Z=await $.maxAttempts();if($z(X)){X=X;let L=await X.acquireInitialRetryToken(G.partition_id),Y=new Error,w=0,F=0;const{request:Q}=W,z=c.isInstance(Q);if(z)Q.headers[o1]=_G();while(!0)try{if(z)Q.headers[a1]=`attempt=${w+1}; max=${Z}`;const{response:R,output:I}=await U(W);return X.recordSuccess(L),I.$metadata.attempts=w+1,I.$metadata.totalRetryDelay=F,{response:R,output:I}}catch(R){const I=Uz(R);if(Y=NU(R),z&&rX(Q))throw(G.logger instanceof oX?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),Y;try{L=await X.refreshRetryTokenForRetry(L,I)}catch(T){if(!Y.$metadata)Y.$metadata={};throw Y.$metadata.attempts=w+1,Y.$metadata.totalRetryDelay=F,Y}w=L.getRetryCount();const J=L.getRetryDelay();F+=J,await new Promise((T)=>setTimeout(T,J))}}else{if(X=X,X?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",X.mode]];return X.retry(U,W)}},$z=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",Uz=($)=>{const U={error:$,errorType:Gz($)},G=Xz($.$response);if(G)U.retryAfterHint=G;return U},Gz=($)=>{if(j0($))return"THROTTLING";if(n1($))return"TRANSIENT";if(lX($))return"SERVER_ERROR";return"CLIENT_ERROR"},Wz={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},RT=($)=>({applyToStack:(U)=>{U.add(e7($),Wz)}}),Xz=($)=>{if(!PU.isInstance($))return;const U=Object.keys($.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)};import{platform as iI,release as rI} from"os";import{env as ML,versions as oI} from"process";var gU={isCrtAvailable:!1};var KL=()=>{if(gU.isCrtAvailable)return["md/crt-avail"];return null};var aI="AWS_SDK_UA_APP_ID",tI="sdk-ua-app-id",BH=({serviceId:$,clientVersion:U})=>{const G=[["aws-sdk-js",U],["ua","2.0"],[`os/${iI()}`,rI()],["lang/js"],["md/nodejs",`${oI.node}`]],W=KL();if(W)G.push(W);if($)G.push([`api/${$}`,U]);if(ML.AWS_EXECUTION_ENV)G.push([`exec-env/${ML.AWS_EXECUTION_ENV}`]);const X=E0({environmentVariableSelector:(L)=>L[aI],configFileSelector:(L)=>L[tI],default:void 0})();let Z=void 0;return async()=>{if(!Z){const L=await X;Z=L?[...G,[`app/${L}`]]:[...G]}return Z}};import{Buffer as eI} from"buffer";import{createHash as $E,createHmac as UE} from"crypto";var BL=function($,U){if(eI.isBuffer($))return $;if(typeof $==="string")return VL($,U);if(ArrayBuffer.isView($))return sU($.buffer,$.byteOffset,$.byteLength);return sU($)};class GE{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(TL(BL($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?UE(this.algorithmIdentifier,BL(this.secret)):$E(this.algorithmIdentifier)}}import{fstatSync as WE,lstatSync as XE} from"fs";var NH=($)=>{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 XE($.path).size;else if(typeof $.fd==="number")return WE($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var qL=Z1(A$(),1);var HL="AWS_EXECUTION_ENV",lU="AWS_REGION",mU="AWS_DEFAULT_REGION",AL="AWS_EC2_METADATA_DISABLED",OL=["in-region","cross-region","mobile","standard","legacy"],fL="/latest/meta-data/placement/region";var CL={environmentVariableSelector:($)=>{return $["AWS_DEFAULTS_MODE"]},configFileSelector:($)=>{return $["defaults_mode"]},default:"legacy"};var cH=({region:$=E0(PX),defaultsMode:U=E0(CL)}={})=>qL.memoize(async()=>{const G=typeof U==="function"?await U():U;switch(G?.toLowerCase()){case"auto":return ZE($);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 ${OL.join(", ")}, got ${G}`)}}),ZE=async($)=>{if($){const U=typeof $==="function"?await $():$,G=await LE();if(!G)return"standard";if(U===G)return"in-region";else return"cross-region"}return"standard"},LE=async()=>{if(process.env[HL]&&(process.env[lU]||process.env[mU]))return process.env[lU]??process.env[mU];if(!process.env[AL])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-e20c0e69128c42f5.js"),G=await $();return(await U({...G,path:fL})).toString()}catch($){}};var dH=($)=>{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}}},pH=($)=>{return{region:$.region()}};export{_G as L,hE as M,xE as N,cE as O,pE as P,TZ as Q,P0 as R,Z0 as S,wU as T,NX as U,t as V,SJ as W,o0 as X,P7 as Y,D7 as Z,FM as _,jM as $,DM as aa,PX as ba,aM as ca,VM as da,fB as ea,n7 as fa,SB as ga,WV as ha,YV as ia,_X as ja,tV as ka,eV as la,$T as ma,RT as na,nI as oa,BH as pa,GE as qa,NH as ra,cH as sa,dH as ta,pH as ua};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{B as D} from"./chunk-e3d242546d1a2927.js";var C=D((h,A)=>{var{defineProperty:Q,getOwnPropertyDescriptor:M,getOwnPropertyNames:J}=Object,V=Object.prototype.hasOwnProperty,I=(j,b)=>Q(j,"name",{value:b,configurable:!0}),w=(j,b)=>{for(var F in b)Q(j,F,{get:b[F],enumerable:!0})},O=(j,b,F,B)=>{if(b&&typeof b==="object"||typeof b==="function"){for(let G of J(b))if(!V.call(j,G)&&G!==F)Q(j,G,{get:()=>b[G],enumerable:!(B=M(b,G))||B.enumerable})}return j},q=(j)=>O(Q({},"__esModule",{value:!0}),j),Y={};w(Y,{CredentialsProviderError:()=>L,ProviderError:()=>U,TokenProviderError:()=>S,chain:()=>T,fromStatic:()=>N,memoize:()=>R});A.exports=q(Y);var Z=class j extends Error{constructor(b,F=!0){var B;let G,H=!0;if(typeof F==="boolean")G=void 0,H=F;else if(F!=null&&typeof F==="object")G=F.logger,H=F.tryNextLink??!0;super(b);this.name="ProviderError",this.tryNextLink=H,Object.setPrototypeOf(this,j.prototype),(B=G==null?void 0:G.debug)==null||B.call(G,`@smithy/property-provider ${H?"->":"(!)"} ${b}`)}static from(b,F=!0){return Object.assign(new this(b.message,F),b)}};I(Z,"ProviderError");var U=Z,$=class j extends U{constructor(b,F=!0){super(b,F);this.name="CredentialsProviderError",Object.setPrototypeOf(this,j.prototype)}};I($,"CredentialsProviderError");var L=$,z=class j extends U{constructor(b,F=!0){super(b,F);this.name="TokenProviderError",Object.setPrototypeOf(this,j.prototype)}};I(z,"TokenProviderError");var S=z,T=I((...j)=>async()=>{if(j.length===0)throw new U("No providers in chain");let b;for(let F of j)try{return await F()}catch(B){if(b=B,B==null?void 0:B.tryNextLink)continue;throw B}throw b},"chain"),N=I((j)=>()=>Promise.resolve(j),"fromStatic"),R=I((j,b,F)=>{let B,G,H,W=!1;const X=I(async()=>{if(!G)G=j();try{B=await G,H=!0,W=!1}finally{G=void 0}return B},"coalesceProvider");if(b===void 0)return async(K)=>{if(!H||(K==null?void 0:K.forceRefresh))B=await X();return B};return async(K)=>{if(!H||(K==null?void 0:K.forceRefresh))B=await X();if(W)return B;if(F&&!F(B))return W=!0,B;if(b(B))return await X(),B;return B}},"memoize")});
|
|
2
|
+
export{C as ub};
|