gemi 0.4.102 → 0.4.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-9fefc0c4a022180f.js → chunk-1dcc74f569d82336.js} +2 -2
- package/dist/{chunk-9fefc0c4a022180f.js.map → chunk-1dcc74f569d82336.js.map} +1 -1
- package/dist/{chunk-89e42f2de63525a8.js → chunk-213873f56884b132.js} +2 -2
- package/dist/{chunk-89e42f2de63525a8.js.map → chunk-213873f56884b132.js.map} +1 -1
- package/dist/chunk-3548ae4b3ab96c21.js +4 -0
- package/dist/{chunk-76ab9cb416bb617d.js.map → chunk-3548ae4b3ab96c21.js.map} +2 -2
- package/dist/chunk-3ab549e1278958db.js +4 -0
- package/dist/{chunk-fea6a8b61878c7b7.js.map → chunk-3ab549e1278958db.js.map} +2 -2
- package/dist/{chunk-4e3d8823a08776e9.js → chunk-3bcacf5cc1e6cc17.js} +2 -2
- package/dist/{chunk-4e3d8823a08776e9.js.map → chunk-3bcacf5cc1e6cc17.js.map} +1 -1
- package/dist/chunk-402c227b95ad9a77.js +4 -0
- package/dist/{chunk-225a2ac22f559ca4.js.map → chunk-402c227b95ad9a77.js.map} +5 -5
- package/dist/{chunk-b2c75658070c9da8.js → chunk-4880adc4cf447a91.js} +2 -2
- package/dist/{chunk-b2c75658070c9da8.js.map → chunk-4880adc4cf447a91.js.map} +1 -1
- package/dist/chunk-5376e4fd33eba40f.js +20 -0
- package/dist/{chunk-de8906c4ce089607.js.map → chunk-5376e4fd33eba40f.js.map} +7 -15
- package/dist/chunk-611e511a95c844a7.js +4 -0
- package/dist/{chunk-c69698325e61e6cf.js.map → chunk-611e511a95c844a7.js.map} +2 -2
- package/dist/{chunk-8d48861243d49671.js → chunk-63ecca203d5f57d9.js} +2 -2
- package/dist/{chunk-8d48861243d49671.js.map → chunk-63ecca203d5f57d9.js.map} +1 -1
- package/dist/{chunk-f5707f3bdba77464.js → chunk-7d69aa73d7fc1f66.js} +2 -2
- package/dist/{chunk-f5707f3bdba77464.js.map → chunk-7d69aa73d7fc1f66.js.map} +1 -1
- package/dist/{chunk-7f095ebadaafbe12.js → chunk-7f9e205bb6fc61db.js} +2 -2
- package/dist/{chunk-7f095ebadaafbe12.js.map → chunk-7f9e205bb6fc61db.js.map} +1 -1
- package/dist/{chunk-83f822c222295a62.js → chunk-9ef7636cea963dff.js} +2 -2
- package/dist/{chunk-83f822c222295a62.js.map → chunk-9ef7636cea963dff.js.map} +1 -1
- package/dist/chunk-a433eaaec29698ba.js +5 -0
- package/dist/{chunk-1c2835b8ab6601e6.js.map → chunk-a433eaaec29698ba.js.map} +12 -4
- package/dist/{chunk-7c5cdd2ff0c5a588.js → chunk-c7894ed595fd0b08.js} +3 -3
- package/dist/{chunk-7c5cdd2ff0c5a588.js.map → chunk-c7894ed595fd0b08.js.map} +1 -1
- package/dist/chunk-e3ee32f7c3f7bca2.js +4 -0
- package/dist/{chunk-3840523c97bd28e4.js.map → chunk-e3ee32f7c3f7bca2.js.map} +4 -4
- package/dist/{chunk-056c4bd9d2ac239c.js → chunk-fbf888655f08faa6.js} +2 -2
- package/dist/{chunk-056c4bd9d2ac239c.js.map → chunk-fbf888655f08faa6.js.map} +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +3 -3
- package/dist/kernel/index.js +1 -1
- package/dist/services/index.js +2 -11
- package/dist/services/index.js.map +4 -15
- package/package.json +1 -1
- package/dist/chunk-1c2835b8ab6601e6.js +0 -5
- package/dist/chunk-225a2ac22f559ca4.js +0 -3
- package/dist/chunk-3840523c97bd28e4.js +0 -4
- package/dist/chunk-76ab9cb416bb617d.js +0 -4
- package/dist/chunk-c69698325e61e6cf.js +0 -4
- package/dist/chunk-de8906c4ce089607.js +0 -20
- package/dist/chunk-fea6a8b61878c7b7.js +0 -4
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{I as y,J as R} from"./chunk-c83dcc500d5fefe3.js";import{U as l3} from"./chunk-9e77cade8671df8d.js";import{Ga as u,Ha as kU,Ja as nU,Ka as RY,Ma as BY,Oa as nX,Ta as g4,Wa as f6} from"./chunk-1c2835b8ab6601e6.js";import{Ab as x8,Bb as R0} from"./chunk-225a2ac22f559ca4.js";import{Cb as E0} from"./chunk-7f095ebadaafbe12.js";import{Ib as EU} from"./chunk-4e3d8823a08776e9.js";import{Rb as OY} from"./chunk-89e42f2de63525a8.js";var z$=R((oU)=>{var qY=function($){return $&&$.__esModule?$:{default:$}},NY=function(){if(X1>Z1.length-16)CY.default.randomFillSync(Z1),X1=0;return Z1.slice(X1,X1+=16)};Object.defineProperty(oU,"__esModule",{value:!0});oU.default=NY;var CY=qY(import.meta.require("crypto")),Z1=new Uint8Array(256),X1=Z1.length});var eU=R((aU)=>{Object.defineProperty(aU,"__esModule",{value:!0});aU.default=void 0;var PY=/^(?:[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;aU.default=PY});var x0=R(($G)=>{var kY=function($){return $&&$.__esModule?$:{default:$}},bY=function($){return typeof $==="string"&&SY.default.test($)};Object.defineProperty($G,"__esModule",{value:!0});$G.default=void 0;var SY=kY(eU()),DY=bY;$G.default=DY});var v0=R((WG)=>{var xY=function($){return $&&$.__esModule?$:{default:$}},GG=function($,U=0){return b[$[U+0]]+b[$[U+1]]+b[$[U+2]]+b[$[U+3]]+"-"+b[$[U+4]]+b[$[U+5]]+"-"+b[$[U+6]]+b[$[U+7]]+"-"+b[$[U+8]]+b[$[U+9]]+"-"+b[$[U+10]]+b[$[U+11]]+b[$[U+12]]+b[$[U+13]]+b[$[U+14]]+b[$[U+15]]},vY=function($,U=0){const G=GG($,U);if(!hY.default(G))throw TypeError("Stringified UUID is invalid");return G};Object.defineProperty(WG,"__esModule",{value:!0});WG.default=void 0;WG.unsafeStringify=GG;var hY=xY(x0()),b=[];for(let $=0;$<256;++$)b.push(($+256).toString(16).slice(1));var cY=vY;WG.default=cY});var wG=R((YG)=>{var gY=function($){return $&&$.__esModule?$:{default:$}},dY=function($,U,G){let W=U&&G||0;const X=U||new Array(16);$=$||{};let Z=$.node||ZG,Y=$.clockseq!==void 0?$.clockseq:F$;if(Z==null||Y==null){const J=$.random||($.rng||uY.default)();if(Z==null)Z=ZG=[J[0]|1,J[1],J[2],J[3],J[4],J[5]];if(Y==null)Y=F$=(J[6]<<8|J[7])&16383}let L=$.msecs!==void 0?$.msecs:Date.now(),w=$.nsecs!==void 0?$.nsecs:I$+1;const Q=L-J$+(w-I$)/1e4;if(Q<0&&$.clockseq===void 0)Y=Y+1&16383;if((Q<0||L>J$)&&$.nsecs===void 0)w=0;if(w>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");J$=L,I$=w,F$=Y,L+=12219292800000;const z=((L&268435455)*1e4+w)%4294967296;X[W++]=z>>>24&255,X[W++]=z>>>16&255,X[W++]=z>>>8&255,X[W++]=z&255;const F=L/4294967296*1e4&268435455;X[W++]=F>>>8&255,X[W++]=F&255,X[W++]=F>>>24&15|16,X[W++]=F>>>16&255,X[W++]=Y>>>8|128,X[W++]=Y&255;for(let J=0;J<6;++J)X[W+J]=Z[J];return U||_Y.unsafeStringify(X)};Object.defineProperty(YG,"__esModule",{value:!0});YG.default=void 0;var uY=gY(z$()),_Y=v0(),ZG,F$,J$=0,I$=0,pY=dY;YG.default=pY});var K$=R((QG)=>{var sY=function($){return $&&$.__esModule?$:{default:$}},mY=function($){if(!lY.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(QG,"__esModule",{value:!0});QG.default=void 0;var lY=sY(x0()),nY=mY;QG.default=nY});var M$=R((IG)=>{var oY=function($){return $&&$.__esModule?$:{default:$}},aY=function($){$=unescape(encodeURIComponent($));const U=[];for(let G=0;G<$.length;++G)U.push($.charCodeAt(G));return U},tY=function($,U,G){function W(X,Z,Y,L){var w;if(typeof X==="string")X=aY(X);if(typeof Z==="string")Z=rY.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 Q=new Uint8Array(16+X.length);if(Q.set(Z),Q.set(X,Z.length),Q=G(Q),Q[6]=Q[6]&15|U,Q[8]=Q[8]&63|128,Y){L=L||0;for(let z=0;z<16;++z)Y[L+z]=Q[z];return Y}return iY.unsafeStringify(Q)}try{W.name=$}catch(X){}return W.DNS=FG,W.URL=JG,W};Object.defineProperty(IG,"__esModule",{value:!0});IG.URL=IG.DNS=void 0;IG.default=tY;var iY=v0(),rY=oY(K$()),FG="6ba7b810-9dad-11d1-80b4-00c04fd430c8";IG.DNS=FG;var JG="6ba7b811-9dad-11d1-80b4-00c04fd430c8";IG.URL=JG});var BG=R((MG)=>{var GL=function($){return $&&$.__esModule?$:{default:$}},WL=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return UL.default.createHash("md5").update($).digest()};Object.defineProperty(MG,"__esModule",{value:!0});MG.default=void 0;var UL=GL(import.meta.require("crypto")),XL=WL;MG.default=XL});var EG=R((HG)=>{var VG=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(HG,"__esModule",{value:!0});HG.default=void 0;var ZL=VG(M$()),YL=VG(BG()),LL=ZL.default("v3",48,YL.default),wL=LL;HG.default=wL});var fG=R((TG)=>{var zL=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(TG,"__esModule",{value:!0});TG.default=void 0;var QL=zL(import.meta.require("crypto")),FL={randomUUID:QL.default.randomUUID};TG.default=FL});var PG=R((NG)=>{var qG=function($){return $&&$.__esModule?$:{default:$}},KL=function($,U,G){if(CG.default.randomUUID&&!U&&!$)return CG.default.randomUUID();$=$||{};const W=$.random||($.rng||JL.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 IL.unsafeStringify(W)};Object.defineProperty(NG,"__esModule",{value:!0});NG.default=void 0;var CG=qG(fG()),JL=qG(z$()),IL=v0(),ML=KL;NG.default=ML});var bG=R((SG)=>{var BL=function($){return $&&$.__esModule?$:{default:$}},VL=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return RL.default.createHash("sha1").update($).digest()};Object.defineProperty(SG,"__esModule",{value:!0});SG.default=void 0;var RL=BL(import.meta.require("crypto")),HL=VL;SG.default=HL});var vG=R((hG)=>{var DG=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(hG,"__esModule",{value:!0});hG.default=void 0;var AL=DG(M$()),EL=DG(bG()),TL=AL.default("v5",80,EL.default),OL=TL;hG.default=OL});var uG=R((cG)=>{Object.defineProperty(cG,"__esModule",{value:!0});cG.default=void 0;var fL="00000000-0000-0000-0000-000000000000";cG.default=fL});var dG=R((_G)=>{var qL=function($){return $&&$.__esModule?$:{default:$}},NL=function($){if(!CL.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)};Object.defineProperty(_G,"__esModule",{value:!0});_G.default=void 0;var CL=qL(x0()),jL=NL;_G.default=jL});var R$=R((l)=>{var a=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(l,"__esModule",{value:!0});Object.defineProperty(l,"NIL",{enumerable:!0,get:function(){return DL.default}});Object.defineProperty(l,"parse",{enumerable:!0,get:function(){return cL.default}});Object.defineProperty(l,"stringify",{enumerable:!0,get:function(){return vL.default}});Object.defineProperty(l,"v1",{enumerable:!0,get:function(){return PL.default}});Object.defineProperty(l,"v3",{enumerable:!0,get:function(){return SL.default}});Object.defineProperty(l,"v4",{enumerable:!0,get:function(){return kL.default}});Object.defineProperty(l,"v5",{enumerable:!0,get:function(){return bL.default}});Object.defineProperty(l,"validate",{enumerable:!0,get:function(){return xL.default}});Object.defineProperty(l,"version",{enumerable:!0,get:function(){return hL.default}});var PL=a(wG()),SL=a(EG()),kL=a(PG()),bL=a(vG()),DL=a(uG()),hL=a(dG()),xL=a(x0()),vL=a(v0()),cL=a(K$())});var r=R((dI,iG)=>{var{defineProperty:Y1,getOwnPropertyDescriptor:mL,getOwnPropertyNames:nL}=Object,iL=Object.prototype.hasOwnProperty,mG=($,U)=>Y1($,"name",{value:U,configurable:!0}),rL=($,U)=>{for(var G in U)Y1($,G,{get:U[G],enumerable:!0})},oL=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of nL(U))if(!iL.call($,X)&&X!==G)Y1($,X,{get:()=>U[X],enumerable:!(W=mL(U,X))||W.enumerable})}return $},aL=($)=>oL(Y1({},"__esModule",{value:!0}),$),nG={};rL(nG,{getSmithyContext:()=>tL,normalizeProvider:()=>eL});iG.exports=aL(nG);var sG=E0(),tL=mG(($)=>$[sG.SMITHY_CONTEXT_KEY]||($[sG.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),eL=mG(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var B$=R((pI,eG)=>{var{defineProperty:L1,getOwnPropertyDescriptor:$2,getOwnPropertyNames:U2}=Object,G2=Object.prototype.hasOwnProperty,z0=($,U)=>L1($,"name",{value:U,configurable:!0}),W2=($,U)=>{for(var G in U)L1($,G,{get:U[G],enumerable:!0})},X2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of U2(U))if(!G2.call($,X)&&X!==G)L1($,X,{get:()=>U[X],enumerable:!(W=$2(U,X))||W.enumerable})}return $},Z2=($)=>X2(L1({},"__esModule",{value:!0}),$),rG={};W2(rG,{CredentialsProviderError:()=>Y2,ProviderError:()=>w1,TokenProviderError:()=>L2,chain:()=>w2,fromStatic:()=>Q2,memoize:()=>z2});eG.exports=Z2(rG);var oG=class $ extends Error{constructor(U,G=!0){var W;let X,Z=!0;if(typeof G==="boolean")X=void 0,Z=G;else if(G!=null&&typeof G==="object")X=G.logger,Z=G.tryNextLink??!0;super(U);this.name="ProviderError",this.tryNextLink=Z,Object.setPrototypeOf(this,$.prototype),(W=X==null?void 0:X.debug)==null||W.call(X,`@smithy/property-provider ${Z?"->":"(!)"} ${U}`)}static from(U,G=!0){return Object.assign(new this(U.message,G),U)}};z0(oG,"ProviderError");var w1=oG,aG=class $ extends w1{constructor(U,G=!0){super(U,G);this.name="CredentialsProviderError",Object.setPrototypeOf(this,$.prototype)}};z0(aG,"CredentialsProviderError");var Y2=aG,tG=class $ extends w1{constructor(U,G=!0){super(U,G);this.name="TokenProviderError",Object.setPrototypeOf(this,$.prototype)}};z0(tG,"TokenProviderError");var L2=tG,w2=z0((...$)=>async()=>{if($.length===0)throw new w1("No providers in chain");let U;for(let G of $)try{return await G()}catch(W){if(U=W,W==null?void 0:W.tryNextLink)continue;throw W}throw U},"chain"),Q2=z0(($)=>()=>Promise.resolve($),"fromStatic"),z2=z0(($,U,G)=>{let W,X,Z,Y=!1;const L=z0(async()=>{if(!X)X=$();try{W=await X,Z=!0,Y=!1}finally{X=void 0}return W},"coalesceProvider");if(U===void 0)return async(w)=>{if(!Z||(w==null?void 0:w.forceRefresh))W=await L();return W};return async(w)=>{if(!Z||(w==null?void 0:w.forceRefresh))W=await L();if(Y)return W;if(G&&!G(W))return Y=!0,W;if(U(W))return await L(),W;return W}},"memoize")});var T0=R(($8)=>{Object.defineProperty($8,"__esModule",{value:!0});$8.getHomeDir=void 0;var F2=import.meta.require("os"),J2=import.meta.require("path"),V$={},I2=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},K2=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:G,HOMEDRIVE:W=`C:${J2.sep}`}=process.env;if($)return $;if(U)return U;if(G)return`${W}${G}`;const X=I2();if(!V$[X])V$[X]=F2.homedir();return V$[X]};$8.getHomeDir=K2});var H$=R((G8)=>{Object.defineProperty(G8,"__esModule",{value:!0});G8.getSSOTokenFilepath=void 0;var M2=import.meta.require("crypto"),R2=import.meta.require("path"),B2=T0(),V2=($)=>{const G=M2.createHash("sha1").update($).digest("hex");return R2.join(B2.getHomeDir(),".aws","sso","cache",`${G}.json`)};G8.getSSOTokenFilepath=V2});var Y8=R((X8)=>{Object.defineProperty(X8,"__esModule",{value:!0});X8.getSSOTokenFromFile=void 0;var H2=import.meta.require("fs"),A2=H$(),{readFile:E2}=H2.promises,T2=async($)=>{const U=A2.getSSOTokenFilepath($),G=await E2(U,"utf8");return JSON.parse(G)};X8.getSSOTokenFromFile=T2});var E$=R((L8)=>{Object.defineProperty(L8,"__esModule",{value:!0});L8.slurpFile=void 0;var O2=import.meta.require("fs"),{readFile:f2}=O2.promises,A$={},C2=($,U)=>{if(!A$[$]||(U===null||U===void 0?void 0:U.ignoreCache))A$[$]=f2($,"utf8");return A$[$]};L8.slurpFile=C2});var C$=R((iI,y0)=>{var{defineProperty:F1,getOwnPropertyDescriptor:q2,getOwnPropertyNames:N2}=Object,j2=Object.prototype.hasOwnProperty,_=($,U)=>F1($,"name",{value:U,configurable:!0}),P2=($,U)=>{for(var G in U)F1($,G,{get:U[G],enumerable:!0})},T$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of N2(U))if(!j2.call($,X)&&X!==G)F1($,X,{get:()=>U[X],enumerable:!(W=q2(U,X))||W.enumerable})}return $},f$=($,U,G)=>(T$($,U,"default"),G&&T$(G,U,"default")),S2=($)=>T$(F1({},"__esModule",{value:!0}),$),c0={};P2(c0,{CONFIG_PREFIX_SEPARATOR:()=>F0,DEFAULT_PROFILE:()=>J8,ENV_PROFILE:()=>F8,getProfileName:()=>k2,loadSharedConfigFiles:()=>K8,loadSsoSessionData:()=>l2,parseKnownFiles:()=>m2});y0.exports=S2(c0);f$(c0,T0(),y0.exports);var F8="AWS_PROFILE",J8="default",k2=_(($)=>$.profile||process.env[F8]||J8,"getProfileName");f$(c0,H$(),y0.exports);f$(c0,Y8(),y0.exports);var Q1=E0(),b2=_(($)=>Object.entries($).filter(([U])=>{const G=U.indexOf(F0);if(G===-1)return!1;return Object.values(Q1.IniSectionType).includes(U.substring(0,G))}).reduce((U,[G,W])=>{const X=G.indexOf(F0),Z=G.substring(0,X)===Q1.IniSectionType.PROFILE?G.substring(X+1):G;return U[Z]=W,U},{...$.default&&{default:$.default}}),"getConfigData"),z1=import.meta.require("path"),D2=T0(),h2="AWS_CONFIG_FILE",I8=_(()=>process.env[h2]||z1.join(D2.getHomeDir(),".aws","config"),"getConfigFilepath"),x2=T0(),v2="AWS_SHARED_CREDENTIALS_FILE",c2=_(()=>process.env[v2]||z1.join(x2.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),y2=T0(),u2=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,_2=["__proto__","profile __proto__"],O$=_(($)=>{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 L=Z.substring(1,Z.length-1),w=u2.exec(L);if(w){const[,Q,,z]=w;if(Object.values(Q1.IniSectionType).includes(Q))G=[Q,z].join(F0)}else G=L;if(_2.includes(L))throw new Error(`Found invalid profile name "${L}"`)}else if(G){const L=Z.indexOf("=");if(![0,-1].includes(L)){const[w,Q]=[Z.substring(0,L).trim(),Z.substring(L+1).trim()];if(Q==="")W=w;else{if(W&&X.trimStart()===X)W=void 0;U[G]=U[G]||{};const z=W?[W,w].join(F0):w;U[G][z]=Q}}}}return U},"parseIni"),Q8=E$(),z8=_(()=>({}),"swallowError"),F0=".",K8=_(async($={})=>{const{filepath:U=c2(),configFilepath:G=I8()}=$,W=y2.getHomeDir();let Z=U;if(U.startsWith("~/"))Z=z1.join(W,U.slice(2));let Y=G;if(G.startsWith("~/"))Y=z1.join(W,G.slice(2));const L=await Promise.all([Q8.slurpFile(Y,{ignoreCache:$.ignoreCache}).then(O$).then(b2).catch(z8),Q8.slurpFile(Z,{ignoreCache:$.ignoreCache}).then(O$).catch(z8)]);return{configFile:L[0],credentialsFile:L[1]}},"loadSharedConfigFiles"),g2=_(($)=>Object.entries($).filter(([U])=>U.startsWith(Q1.IniSectionType.SSO_SESSION+F0)).reduce((U,[G,W])=>({...U,[G.substring(G.indexOf(F0)+1)]:W}),{}),"getSsoSessionData"),d2=E$(),p2=_(()=>({}),"swallowError"),l2=_(async($={})=>d2.slurpFile($.configFilepath??I8()).then(O$).then(g2).catch(p2),"loadSsoSessionData"),s2=_((...$)=>{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"),m2=_(async($)=>{const U=await K8($);return s2(U.configFile,U.credentialsFile)},"parseKnownFiles")});var V8=R((rI,B8)=>{var q$=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 $}},J1=Object.defineProperty,n2=Object.getOwnPropertyDescriptor,i2=Object.getOwnPropertyNames,r2=Object.prototype.hasOwnProperty,O0=($,U)=>J1($,"name",{value:U,configurable:!0}),o2=($,U)=>{for(var G in U)J1($,G,{get:U[G],enumerable:!0})},a2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of i2(U))if(!r2.call($,X)&&X!==G)J1($,X,{get:()=>U[X],enumerable:!(W=n2(U,X))||W.enumerable})}return $},t2=($)=>a2(J1({},"__esModule",{value:!0}),$),R8={};o2(R8,{loadConfig:()=>W5});B8.exports=t2(R8);var u0=B$();O0(q$,"getSelectorName");var e2=O0(($,U)=>async()=>{try{const G=$(process.env);if(G===void 0)throw new Error;return G}catch(G){throw new u0.CredentialsProviderError(G.message||`Not found in ENV: ${q$($.toString())}`,{logger:U})}},"fromEnv"),M8=C$(),$5=O0(($,{preferredFile:U="config",...G}={})=>async()=>{const W=M8.getProfileName(G),{configFile:X,credentialsFile:Z}=await M8.loadSharedConfigFiles(G),Y=Z[W]||{},L=X[W]||{},w=U==="config"?{...Y,...L}:{...L,...Y};try{const z=$(w,U==="config"?X:Z);if(z===void 0)throw new Error;return z}catch(Q){throw new u0.CredentialsProviderError(Q.message||`Not found in config files w/ profile [${W}]: ${q$($.toString())}`,{logger:G.logger})}},"fromSharedConfigFiles"),U5=O0(($)=>typeof $==="function","isFunction"),G5=O0(($)=>U5($)?async()=>await $():u0.fromStatic($),"fromStatic"),W5=O0(({environmentVariableSelector:$,configFileSelector:U,default:G},W={})=>u0.memoize(u0.chain(e2($),$5(U,W),G5(G))),"loadConfig")});var f8=R((T8)=>{Object.defineProperty(T8,"__esModule",{value:!0});T8.getEndpointUrlConfig=void 0;var H8=C$(),A8="AWS_ENDPOINT_URL",E8="endpoint_url",X5=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((Z)=>Z.toUpperCase()),W=U[[A8,...G].join("_")];if(W)return W;const X=U[A8];if(X)return X;return},configFileSelector:(U,G)=>{if(G&&U.services){const X=G[["services",U.services].join(H8.CONFIG_PREFIX_SEPARATOR)];if(X){const Z=$.split(" ").map((L)=>L.toLowerCase()),Y=X[[Z.join("_"),E8].join(H8.CONFIG_PREFIX_SEPARATOR)];if(Y)return Y}}const W=U[E8];if(W)return W;return},default:void 0});T8.getEndpointUrlConfig=X5});var N$=R((C8)=>{Object.defineProperty(C8,"__esModule",{value:!0});C8.getEndpointFromConfig=void 0;var Z5=V8(),Y5=f8(),L5=async($)=>Z5.loadConfig(Y5.getEndpointUrlConfig($!==null&&$!==void 0?$:""))();C8.getEndpointFromConfig=L5});var P$=R((tI,D8)=>{var b8=function($,U,G){return{applyToStack:(W)=>{W.add(j8($,G),S8),W.add(P8($,U),k8)}}},I1=Object.defineProperty,w5=Object.getOwnPropertyDescriptor,Q5=Object.getOwnPropertyNames,z5=Object.prototype.hasOwnProperty,j$=($,U)=>I1($,"name",{value:U,configurable:!0}),F5=($,U)=>{for(var G in U)I1($,G,{get:U[G],enumerable:!0})},J5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Q5(U))if(!z5.call($,X)&&X!==G)I1($,X,{get:()=>U[X],enumerable:!(W=w5(U,X))||W.enumerable})}return $},I5=($)=>J5(I1({},"__esModule",{value:!0}),$),N8={};F5(N8,{deserializerMiddleware:()=>j8,deserializerMiddlewareOption:()=>S8,getSerdePlugin:()=>b8,serializerMiddleware:()=>P8,serializerMiddlewareOption:()=>k8});D8.exports=I5(N8);var j8=j$(($,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"),P8=j$(($,U)=>(G,W)=>async(X)=>{var Z;const Y=((Z=W.endpointV2)==null?void 0:Z.url)&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!Y)throw new Error("No valid endpoint provider available.");const L=await U(X.input,{...$,endpoint:Y});return G({...X,request:L})},"serializerMiddleware"),S8={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},k8={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};j$(b8,"getSerdePlugin")});var d8=R((eI,g8)=>{var{defineProperty:M1,getOwnPropertyDescriptor:K5,getOwnPropertyNames:M5}=Object,R5=Object.prototype.hasOwnProperty,s=($,U)=>M1($,"name",{value:U,configurable:!0}),B5=($,U)=>{for(var G in U)M1($,G,{get:U[G],enumerable:!0})},V5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of M5(U))if(!R5.call($,X)&&X!==G)M1($,X,{get:()=>U[X],enumerable:!(W=K5(U,X))||W.enumerable})}return $},H5=($)=>V5(M1({},"__esModule",{value:!0}),$),v8={};B5(v8,{endpointMiddleware:()=>u8,endpointMiddlewareOptions:()=>_8,getEndpointFromInstructions:()=>c8,getEndpointPlugin:()=>P5,resolveEndpointConfig:()=>k5,resolveParams:()=>y8,toEndpointV1:()=>S$});g8.exports=H5(v8);var A5=s(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(C5(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!f5(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),E5=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,T5=/(\d+\.){3}\d+/,O5=/\.\./,f5=s(($)=>E5.test($)&&!T5.test($)&&!O5.test($),"isDnsCompatibleBucketName"),C5=s(($)=>{const[U,G,W,,,X]=$.split(":"),Z=U==="arn"&&$.split(":").length>=6,Y=Boolean(Z&&G&&W&&X);if(Z&&!Y)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return Y},"isArnBucketName"),q5=s(($,U,G)=>{const W=s(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:Y,port:L,path:w}=X;return`${Z}//${Y}${L?":"+L:""}${w}`}}return X};return W},"createConfigValueProvider"),N5=N$(),h8=x8(),S$=s(($)=>{if(typeof $==="object"){if("url"in $)return h8.parseUrl($.url);return $}return h8.parseUrl($)},"toEndpointV1"),c8=s(async($,U,G,W)=>{if(!G.endpoint){let Y;if(G.serviceConfiguredEndpoint)Y=await G.serviceConfiguredEndpoint();else Y=await N5.getEndpointFromConfig(G.serviceId);if(Y)G.endpoint=()=>Promise.resolve(S$(Y))}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=s(async($,U,G)=>{var W;const X={},Z=((W=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:W.call(U))||{};for(let[Y,L]of Object.entries(Z))switch(L.type){case"staticContextParams":X[Y]=L.value;break;case"contextParams":X[Y]=$[L.name];break;case"clientContextParams":case"builtInParams":X[Y]=await q5(L.name,Y,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}if(Object.keys(Z).length===0)Object.assign(X,G);if(String(G.serviceId).toLowerCase()==="s3")await A5(X);return X},"resolveParams"),K1=r(),u8=s(({config:$,instructions:U})=>{return(G,W)=>async(X)=>{var Z,Y,L;const w=await c8(X.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=w,W.authSchemes=(Z=w.properties)==null?void 0:Z.authSchemes;const Q=(Y=W.authSchemes)==null?void 0:Y[0];if(Q){W.signing_region=Q.signingRegion,W.signing_service=Q.signingName;const z=K1.getSmithyContext(W),F=(L=z==null?void 0:z.selectedHttpAuthScheme)==null?void 0:L.httpAuthOption;if(F)F.signingProperties=Object.assign(F.signingProperties||{},{signing_region:Q.signingRegion,signingRegion:Q.signingRegion,signing_service:Q.signingName,signingName:Q.signingName,signingRegionSet:Q.signingRegionSet},Q.properties)}return G({...X})}},"endpointMiddleware"),j5=P$(),_8={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:j5.serializerMiddlewareOption.name},P5=s(($,U)=>({applyToStack:(G)=>{G.addRelativeTo(u8({config:$,instructions:U}),_8)}}),"getEndpointPlugin"),S5=N$(),k5=s(($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>S$(await K1.normalizeProvider(G)()):void 0,Z={...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:K1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:K1.normalizeProvider($.useFipsEndpoint??!1)};let Y=void 0;return Z.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!Y)Y=S5.getEndpointFromConfig($.serviceId);return Y},Z},"resolveEndpointConfig")});var t=R(($K,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($)},R1=Object.defineProperty,b5=Object.getOwnPropertyDescriptor,D5=Object.getOwnPropertyNames,h5=Object.prototype.hasOwnProperty,U0=($,U)=>R1($,"name",{value:U,configurable:!0}),x5=($,U)=>{for(var G in U)R1($,G,{get:U[G],enumerable:!0})},v5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of D5(U))if(!h5.call($,X)&&X!==G)R1($,X,{get:()=>U[X],enumerable:!(W=b5(U,X))||W.enumerable})}return $},c5=($)=>v5(R1({},"__esModule",{value:!0}),$),p8={};x5(p8,{Field:()=>_5,Fields:()=>g5,HttpRequest:()=>d5,HttpResponse:()=>p5,IHttpRequest:()=>l8.HttpRequest,getHttpHandlerExtensionConfiguration:()=>y5,isValidHostname:()=>o8,resolveHttpHandlerRuntimeConfig:()=>u5});a8.exports=c5(p8);var y5=U0(($)=>{let U=$.httpHandler;return{setHttpHandler(G){U=G},httpHandler(){return U},updateHttpClientConfig(G,W){U.updateHttpClientConfig(G,W)},httpHandlerConfigs(){return U.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),u5=U0(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),l8=E0(),s8=class ${constructor({name:U,kind:G=l8.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}};U0(s8,"Field");var _5=s8,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)}};U0(m8,"Fields");var g5=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)}};U0(n8,"HttpRequest");var d5=n8;U0(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"}};U0(r8,"HttpResponse");var p5=r8;U0(o8,"isValidHostname")});var J0=R((UK,U4)=>{var{defineProperty:B1,getOwnPropertyDescriptor:l5,getOwnPropertyNames:s5}=Object,m5=Object.prototype.hasOwnProperty,f0=($,U)=>B1($,"name",{value:U,configurable:!0}),n5=($,U)=>{for(var G in U)B1($,G,{get:U[G],enumerable:!0})},i5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of s5(U))if(!m5.call($,X)&&X!==G)B1($,X,{get:()=>U[X],enumerable:!(W=l5(U,X))||W.enumerable})}return $},r5=($)=>i5(B1({},"__esModule",{value:!0}),$),t8={};n5(t8,{isClockSkewCorrectedError:()=>e8,isClockSkewError:()=>Gw,isRetryableByTrait:()=>Uw,isServerError:()=>Xw,isThrottlingError:()=>Ww,isTransientError:()=>$4});U4.exports=r5(t8);var o5=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],a5=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],t5=["TimeoutError","RequestTimeout","RequestTimeoutException"],e5=[500,502,503,504],$w=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Uw=f0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),Gw=f0(($)=>o5.includes($.name),"isClockSkewError"),e8=f0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),Ww=f0(($)=>{var U,G;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||a5.includes($.name)||((G=$.$retryable)==null?void 0:G.throttling)==!0},"isThrottlingError"),$4=f0(($)=>{var U;return e8($)||t5.includes($.name)||$w.includes(($==null?void 0:$.code)||"")||e5.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),Xw=f0(($)=>{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 M4=R((GK,K4)=>{var{defineProperty:V1,getOwnPropertyDescriptor:Zw,getOwnPropertyNames:Yw}=Object,Lw=Object.prototype.hasOwnProperty,m=($,U)=>V1($,"name",{value:U,configurable:!0}),ww=($,U)=>{for(var G in U)V1($,G,{get:U[G],enumerable:!0})},Qw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Yw(U))if(!Lw.call($,X)&&X!==G)V1($,X,{get:()=>U[X],enumerable:!(W=Zw(U,X))||W.enumerable})}return $},zw=($)=>Qw(V1({},"__esModule",{value:!0}),$),W4={};ww(W4,{AdaptiveRetryStrategy:()=>Rw,ConfiguredRetryStrategy:()=>Bw,DEFAULT_MAX_ATTEMPTS:()=>k$,DEFAULT_RETRY_DELAY_BASE:()=>_0,DEFAULT_RETRY_MODE:()=>Fw,DefaultRateLimiter:()=>Y4,INITIAL_RETRY_TOKENS:()=>b$,INVOCATION_ID_HEADER:()=>Iw,MAXIMUM_RETRY_DELAY:()=>D$,NO_RETRY_INCREMENT:()=>z4,REQUEST_HEADER:()=>Kw,RETRY_COST:()=>w4,RETRY_MODES:()=>X4,StandardRetryStrategy:()=>h$,THROTTLING_RETRY_DELAY_BASE:()=>L4,TIMEOUT_RETRY_COST:()=>Q4});K4.exports=zw(W4);var X4=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(X4||{}),k$=3,Fw="standard",Jw=J0(),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(),Jw.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))}};m(Z4,"DefaultRateLimiter");var Y4=Z4,_0=100,D$=20000,L4=500,b$=500,w4=5,Q4=10,z4=1,Iw="amz-sdk-invocation-id",Kw="amz-sdk-request",Mw=m(()=>{let $=_0;return{computeNextBackoffDelay:m((W)=>{return Math.floor(Math.min(D$,Math.random()*2**W*$))},"computeNextBackoffDelay"),setDelayBase:m((W)=>{$=W},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),G4=m(({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:m(()=>U,"getRetryCount"),getRetryDelay:m(()=>Math.min(D$,$),"getRetryDelay"),getRetryCost:m(()=>G,"getRetryCost")}},"createDefaultRetryToken"),F4=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=b$,this.retryBackoffStrategy=Mw(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return G4({retryDelay:_0,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"?L4:_0);const Z=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),Y=G.retryAfterHint?Math.max(G.retryAfterHint.getTime()-Date.now()||0,Z):Z,L=this.getCapacityCost(X);return this.capacity-=L,G4({retryDelay:Y,retryCount:U.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(b$,this.capacity+(U.getRetryCost()??z4))}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 ${k$}`),k$}}shouldRetry(U,G,W){return U.getRetryCount()+1<W&&this.capacity>=this.getCapacityCost(G.errorType)&&this.isRetryableError(G.errorType)}getCapacityCost(U){return U==="TRANSIENT"?Q4:w4}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};m(F4,"StandardRetryStrategy");var h$=F4,J4=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:W}=G??{};this.rateLimiter=W??new Y4,this.standardRetryStrategy=new h$(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)}};m(J4,"AdaptiveRetryStrategy");var Rw=J4,I4=class $ extends h${constructor(U,G=_0){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}};m(I4,"ConfiguredRetryStrategy");var Bw=I4});var A4=R((WK,H4)=>{var{defineProperty:H1,getOwnPropertyDescriptor:Vw,getOwnPropertyNames:Hw}=Object,Aw=Object.prototype.hasOwnProperty,g=($,U)=>H1($,"name",{value:U,configurable:!0}),Ew=($,U)=>{for(var G in U)H1($,G,{get:U[G],enumerable:!0})},Tw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Hw(U))if(!Aw.call($,X)&&X!==G)H1($,X,{get:()=>U[X],enumerable:!(W=Vw(U,X))||W.enumerable})}return $},Ow=($)=>Tw(H1({},"__esModule",{value:!0}),$),V4={};Ew(V4,{constructStack:()=>x$});H4.exports=Ow(V4);var I0=g(($,U)=>{const G=[];if($)G.push($);if(U)for(let W of U)G.push(W);return G},"getAllAliases"),G0=g(($,U)=>{return`${$||"anonymous"}${U&&U.length>0?` (a.k.a. ${U.join(",")})`:""}`},"getMiddlewareNameWithAliases"),x$=g(()=>{let $=[],U=[],G=!1;const W=new Set,X=g((F)=>F.sort((J,I)=>R4[I.step]-R4[J.step]||B4[I.priority||"normal"]-B4[J.priority||"normal"]),"sort"),Z=g((F)=>{let J=!1;const I=g((K)=>{const V=I0(K.name,K.aliases);if(V.includes(F)){J=!0;for(let B of V)W.delete(B);return!1}return!0},"filterCb");return $=$.filter(I),U=U.filter(I),J},"removeByName"),Y=g((F)=>{let J=!1;const I=g((K)=>{if(K.middleware===F){J=!0;for(let V of I0(K.name,K.aliases))W.delete(V);return!1}return!0},"filterCb");return $=$.filter(I),U=U.filter(I),J},"removeByReference"),L=g((F)=>{var J;return $.forEach((I)=>{F.add(I.middleware,{...I})}),U.forEach((I)=>{F.addRelativeTo(I.middleware,{...I})}),(J=F.identifyOnResolve)==null||J.call(F,z.identifyOnResolve()),F},"cloneTo"),w=g((F)=>{const J=[];return F.before.forEach((I)=>{if(I.before.length===0&&I.after.length===0)J.push(I);else J.push(...w(I))}),J.push(F),F.after.reverse().forEach((I)=>{if(I.before.length===0&&I.after.length===0)J.push(I);else J.push(...w(I))}),J},"expandRelativeMiddlewareList"),Q=g((F=!1)=>{const J=[],I=[],K={};return $.forEach((B)=>{const H={...B,before:[],after:[]};for(let A of I0(H.name,H.aliases))K[A]=H;J.push(H)}),U.forEach((B)=>{const H={...B,before:[],after:[]};for(let A of I0(H.name,H.aliases))K[A]=H;I.push(H)}),I.forEach((B)=>{if(B.toMiddleware){const H=K[B.toMiddleware];if(H===void 0){if(F)return;throw new Error(`${B.toMiddleware} is not found when adding ${G0(B.name,B.aliases)} middleware ${B.relation} ${B.toMiddleware}`)}if(B.relation==="after")H.after.push(B);if(B.relation==="before")H.before.push(B)}}),X(J).map(w).reduce((B,H)=>{return B.push(...H),B},[])},"getMiddlewareList"),z={add:(F,J={})=>{const{name:I,override:K,aliases:V}=J,B={step:"initialize",priority:"normal",middleware:F,...J},H=I0(I,V);if(H.length>0){if(H.some((A)=>W.has(A))){if(!K)throw new Error(`Duplicate middleware name '${G0(I,V)}'`);for(let A of H){const E=$.findIndex((S)=>{var h;return S.name===A||((h=S.aliases)==null?void 0:h.some((Q0)=>Q0===A))});if(E===-1)continue;const T=$[E];if(T.step!==B.step||B.priority!==T.priority)throw new Error(`"${G0(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.step} step cannot be overridden by "${G0(I,V)}" middleware with ${B.priority} priority in ${B.step} step.`);$.splice(E,1)}}for(let A of H)W.add(A)}$.push(B)},addRelativeTo:(F,J)=>{const{name:I,override:K,aliases:V}=J,B={middleware:F,...J},H=I0(I,V);if(H.length>0){if(H.some((A)=>W.has(A))){if(!K)throw new Error(`Duplicate middleware name '${G0(I,V)}'`);for(let A of H){const E=U.findIndex((S)=>{var h;return S.name===A||((h=S.aliases)==null?void 0:h.some((Q0)=>Q0===A))});if(E===-1)continue;const T=U[E];if(T.toMiddleware!==B.toMiddleware||T.relation!==B.relation)throw new Error(`"${G0(T.name,T.aliases)}" middleware ${T.relation} "${T.toMiddleware}" middleware cannot be overridden by "${G0(I,V)}" middleware ${B.relation} "${B.toMiddleware}" middleware.`);U.splice(E,1)}}for(let A of H)W.add(A)}U.push(B)},clone:()=>L(x$()),use:(F)=>{F.applyToStack(z)},remove:(F)=>{if(typeof F==="string")return Z(F);else return Y(F)},removeByTag:(F)=>{let J=!1;const I=g((K)=>{const{tags:V,name:B,aliases:H}=K;if(V&&V.includes(F)){const A=I0(B,H);for(let E of A)W.delete(E);return J=!0,!1}return!0},"filterCb");return $=$.filter(I),U=U.filter(I),J},concat:(F)=>{var J;const I=L(x$());return I.use(F),I.identifyOnResolve(G||I.identifyOnResolve()||(((J=F.identifyOnResolve)==null?void 0:J.call(F))??!1)),I},applyToStack:L,identify:()=>{return Q(!0).map((F)=>{const J=F.step??F.relation+" "+F.toMiddleware;return G0(F.name,F.aliases)+" - "+J})},identifyOnResolve(F){if(typeof F==="boolean")G=F;return G},resolve:(F,J)=>{for(let I of Q().map((K)=>K.middleware).reverse())F=I(F,J);if(G)console.log(z.identify());return F}};return z},"constructStack"),R4={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},B4={high:3,normal:2,low:1}});var v$=R((XK,T4)=>{var{defineProperty:A1,getOwnPropertyDescriptor:fw,getOwnPropertyNames:Cw}=Object,qw=Object.prototype.hasOwnProperty,Nw=($,U)=>A1($,"name",{value:U,configurable:!0}),jw=($,U)=>{for(var G in U)A1($,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)A1($,X,{get:()=>U[X],enumerable:!(W=fw(U,X))||W.enumerable})}return $},Sw=($)=>Pw(A1({},"__esModule",{value:!0}),$),E4={};jw(E4,{isArrayBuffer:()=>kw});T4.exports=Sw(E4);var kw=Nw(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var g0=R((ZK,C4)=>{var{defineProperty:E1,getOwnPropertyDescriptor:bw,getOwnPropertyNames:Dw}=Object,hw=Object.prototype.hasOwnProperty,O4=($,U)=>E1($,"name",{value:U,configurable:!0}),xw=($,U)=>{for(var G in U)E1($,G,{get:U[G],enumerable:!0})},vw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Dw(U))if(!hw.call($,X)&&X!==G)E1($,X,{get:()=>U[X],enumerable:!(W=bw(U,X))||W.enumerable})}return $},cw=($)=>vw(E1({},"__esModule",{value:!0}),$),f4={};xw(f4,{fromArrayBuffer:()=>uw,fromString:()=>_w});C4.exports=cw(f4);var yw=v$(),c$=import.meta.require("buffer"),uw=O4(($,U=0,G=$.byteLength-U)=>{if(!yw.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return c$.Buffer.from($,U,G)},"fromArrayBuffer"),_w=O4(($,U)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return U?c$.Buffer.from($,U):c$.Buffer.from($)},"fromString")});var j4=R((q4)=>{Object.defineProperty(q4,"__esModule",{value:!0});q4.fromBase64=void 0;var gw=g0(),dw=/^[A-Za-z0-9+/]*={0,2}$/,pw=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!dw.exec($))throw new TypeError("Invalid base64 string.");const U=gw.fromString($,"base64");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength)};q4.fromBase64=pw});var W0=R((LK,b4)=>{var{defineProperty:T1,getOwnPropertyDescriptor:lw,getOwnPropertyNames:sw}=Object,mw=Object.prototype.hasOwnProperty,y$=($,U)=>T1($,"name",{value:U,configurable:!0}),nw=($,U)=>{for(var G in U)T1($,G,{get:U[G],enumerable:!0})},iw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of sw(U))if(!mw.call($,X)&&X!==G)T1($,X,{get:()=>U[X],enumerable:!(W=lw(U,X))||W.enumerable})}return $},rw=($)=>iw(T1({},"__esModule",{value:!0}),$),P4={};nw(P4,{fromUtf8:()=>k4,toUint8Array:()=>ow,toUtf8:()=>aw});b4.exports=rw(P4);var S4=g0(),k4=y$(($)=>{const U=S4.fromString($,"utf8");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),ow=y$(($)=>{if(typeof $==="string")return k4($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),aw=y$(($)=>{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=R((D4)=>{Object.defineProperty(D4,"__esModule",{value:!0});D4.toBase64=void 0;var tw=g0(),ew=W0(),$9=($)=>{let U;if(typeof $==="string")U=ew.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 tw.fromArrayBuffer(U.buffer,U.byteOffset,U.byteLength).toString("base64")};D4.toBase64=$9});var f1=R((QK,O1)=>{var{defineProperty:v4,getOwnPropertyDescriptor:U9,getOwnPropertyNames:G9}=Object,W9=Object.prototype.hasOwnProperty,u$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of G9(U))if(!W9.call($,X)&&X!==G)v4($,X,{get:()=>U[X],enumerable:!(W=U9(U,X))||W.enumerable})}return $},c4=($,U,G)=>(u$($,U,"default"),G&&u$(G,U,"default")),X9=($)=>u$(v4({},"__esModule",{value:!0}),$),_$={};O1.exports=X9(_$);c4(_$,j4(),O1.exports);c4(_$,x4(),O1.exports)});var _4=R((y4)=>{Object.defineProperty(y4,"__esModule",{value:!0});y4.getAwsChunkedEncodingStream=void 0;var Z9=import.meta.require("stream"),Y9=($,U)=>{const{base64Encoder:G,bodyLengthChecker:W,checksumAlgorithmFn:X,checksumLocationName:Z,streamHasher:Y}=U,L=G!==void 0&&X!==void 0&&Z!==void 0&&Y!==void 0,w=L?Y(X,$):void 0,Q=new Z9.Readable({read:()=>{}});return $.on("data",(z)=>{const F=W(z)||0;Q.push(`${F.toString(16)}\r\n`),Q.push(z),Q.push("\r\n")}),$.on("end",async()=>{if(Q.push("0\r\n"),L){const z=G(await w);Q.push(`${Z}:${z}\r\n`),Q.push("\r\n")}Q.push(null)}),Q};y4.getAwsChunkedEncodingStream=Y9});var d$=R((FK,l4)=>{var p4=function($){const U=[];for(let G of Object.keys($).sort()){const W=$[G];if(G=g$.escapeUri(G),Array.isArray(W))for(let X=0,Z=W.length;X<Z;X++)U.push(`${G}=${g$.escapeUri(W[X])}`);else{let X=G;if(W||typeof W==="string")X+=`=${g$.escapeUri(W)}`;U.push(X)}}return U.join("&")},C1=Object.defineProperty,L9=Object.getOwnPropertyDescriptor,w9=Object.getOwnPropertyNames,Q9=Object.prototype.hasOwnProperty,z9=($,U)=>C1($,"name",{value:U,configurable:!0}),F9=($,U)=>{for(var G in U)C1($,G,{get:U[G],enumerable:!0})},J9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of w9(U))if(!Q9.call($,X)&&X!==G)C1($,X,{get:()=>U[X],enumerable:!(W=L9(U,X))||W.enumerable})}return $},I9=($)=>J9(C1({},"__esModule",{value:!0}),$),d4={};F9(d4,{buildQueryString:()=>p4});l4.exports=I9(d4);var g$=g4();z9(p4,"buildQueryString")});var Q6=R((JK,w6)=>{async function s$($,U,G=n4){const W=U.headers??{},X=W.Expect||W.expect;let Z=-1,Y=!1;if(X==="100-continue")await Promise.race([new Promise((L)=>{Z=Number(setTimeout(L,Math.max(n4,G)))}),new Promise((L)=>{$.on("continue",()=>{clearTimeout(Z),L()}),$.on("error",()=>{Y=!0,clearTimeout(Z),L()})})]);if(!Y)U6($,U.body)}var U6=function($,U){if(U instanceof $6.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 L6($){const U=[],G=$.getReader();let W=!1,X=0;while(!W){const{done:L,value:w}=await G.read();if(w)U.push(w),X+=w.length;W=L}const Z=new Uint8Array(X);let Y=0;for(let L of U)Z.set(L,Y),Y+=L.length;return Z}var{create:K9,defineProperty:d0,getOwnPropertyDescriptor:M9,getOwnPropertyNames:R9,getPrototypeOf:B9}=Object,V9=Object.prototype.hasOwnProperty,O=($,U)=>d0($,"name",{value:U,configurable:!0}),H9=($,U)=>{for(var G in U)d0($,G,{get:U[G],enumerable:!0})},r4=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of R9(U))if(!V9.call($,X)&&X!==G)d0($,X,{get:()=>U[X],enumerable:!(W=M9(U,X))||W.enumerable})}return $},A9=($,U,G)=>(G=$!=null?K9(B9($)):{},r4(U||!$||!$.__esModule?d0(G,"default",{value:$,enumerable:!0}):G,$)),E9=($)=>r4(d0({},"__esModule",{value:!0}),$),o4={};H9(o4,{DEFAULT_REQUEST_TIMEOUT:()=>N9,NodeHttp2Handler:()=>b9,NodeHttpHandler:()=>j9,streamCollector:()=>h9});w6.exports=E9(o4);var a4=t(),t4=d$(),p$=import.meta.require("http"),l$=import.meta.require("https"),T9=["ECONNRESET","EPIPE","ETIMEDOUT"],e4=O(($)=>{const U={};for(let G of Object.keys($)){const W=$[G];U[G]=Array.isArray(W)?W.join(","):W}return U},"getTransformedHeaders"),s4=1000,O9=O(($,U,G=0)=>{if(!G)return-1;const W=O((X)=>{const Z=setTimeout(()=>{$.destroy(),U(Object.assign(new Error(`Socket timed out without establishing a connection within ${G} ms`),{name:"TimeoutError"}))},G-X),Y=O((L)=>{if(L==null?void 0:L.connecting)L.on("connect",()=>{clearTimeout(Z)});else clearTimeout(Z)},"doWithSocket");if($.socket)Y($.socket);else $.on("socket",Y)},"registerTimeout");if(G<2000)return W(0),0;return setTimeout(W.bind(null,s4),s4)},"setConnectionTimeout"),f9=3000,C9=O(($,{keepAlive:U,keepAliveMsecs:G},W=f9)=>{if(U!==!0)return-1;const X=O(()=>{if($.socket)$.socket.setKeepAlive(U,G||0);else $.on("socket",(Z)=>{Z.setKeepAlive(U,G||0)})},"registerListener");if(W===0)return X(),0;return setTimeout(X,W)},"setSocketKeepAlive"),m4=3000,q9=O(($,U,G=0)=>{const W=O((X)=>{$.setTimeout(G-X,()=>{$.destroy(),U(Object.assign(new Error(`Connection timed out after ${G} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<G&&G<6000)return W(0),0;return setTimeout(W.bind(null,G===0?0:m4),m4)},"setSocketTimeout"),$6=import.meta.require("stream"),n4=1000;O(s$,"writeRequestBody");O(U6,"writeBody");var N9=0,G6=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,Y;const{sockets:L,requests:w,maxSockets:Q}=U;if(typeof Q!=="number"||Q===Infinity)return G;const z=15000;if(Date.now()-z<G)return G;if(L&&w)for(let F in L){const J=((X=L[F])==null?void 0:X.length)??0,I=((Z=w[F])==null?void 0:Z.length)??0;if(J>=Q&&I>=2*Q)return(Y=W==null?void 0:W.warn)==null||Y.call(W,`@smithy/node-http-handler:WARN - socket usage at capacity=${J} 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:Y}=U||{};return{connectionTimeout:W,requestTimeout:G??X,httpAgent:(()=>{if(Z instanceof p$.Agent||typeof(Z==null?void 0:Z.destroy)==="function")return Z;return new p$.Agent({keepAlive:!0,maxSockets:50,...Z})})(),httpsAgent:(()=>{if(Y instanceof l$.Agent||typeof(Y==null?void 0:Y.destroy)==="function")return Y;return new l$.Agent({keepAlive:!0,maxSockets:50,...Y})})(),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;return new Promise((W,X)=>{let Z=void 0;const Y=[],L=O(async(E)=>{await Z,Y.forEach(clearTimeout),W(E)},"resolve"),w=O(async(E)=>{await Z,Y.forEach(clearTimeout),X(E)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(G==null?void 0:G.aborted){const E=new Error("Request aborted");E.name="AbortError",w(E);return}const Q=U.protocol==="https:",z=Q?this.config.httpsAgent:this.config.httpAgent;Y.push(setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(z,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const F=t4.buildQueryString(U.query||{});let J=void 0;if(U.username!=null||U.password!=null){const E=U.username??"",T=U.password??"";J=`${E}:${T}`}let I=U.path;if(F)I+=`?${F}`;if(U.fragment)I+=`#${U.fragment}`;let K=U.hostname??"";if(K[0]==="["&&K.endsWith("]"))K=U.hostname.slice(1,-1);else K=U.hostname;const V={headers:U.headers,host:K,method:U.method,path:I,port:U.port,agent:z,auth:J},H=(Q?l$.request:p$.request)(V,(E)=>{const T=new a4.HttpResponse({statusCode:E.statusCode||-1,reason:E.statusMessage,headers:e4(E.headers),body:E});L({response:T})});if(H.on("error",(E)=>{if(T9.includes(E.code))w(Object.assign(E,{name:"TimeoutError"}));else w(E)}),G){const E=O(()=>{H.destroy();const T=new Error("Request aborted");T.name="AbortError",w(T)},"onAbort");if(typeof G.addEventListener==="function"){const T=G;T.addEventListener("abort",E,{once:!0}),H.once("close",()=>T.removeEventListener("abort",E))}else G.onabort=E}Y.push(O9(H,w,this.config.connectionTimeout)),Y.push(q9(H,w,this.config.requestTimeout));const A=V.agent;if(typeof A==="object"&&"keepAlive"in A)Y.push(C9(H,{keepAlive:A.keepAlive,keepAliveMsecs:A.keepAliveMsecs}));Z=s$(H,U,this.config.requestTimeout).catch((E)=>{return Y.forEach(clearTimeout),X(E)})})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}};O(G6,"NodeHttpHandler");var j9=G6,i4=import.meta.require("http2"),P9=A9(import.meta.require("http2")),W6=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()}}};O(W6,"NodeHttp2ConnectionPool");var S9=W6,X6=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=P9.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 Y=O(()=>{Z.destroy(),this.deleteSession(W,Z)},"destroySessionCb");if(Z.on("goaway",Y),Z.on("error",Y),Z.on("frameError",Y),Z.on("close",()=>this.deleteSession(W,Z)),G.requestTimeout)Z.setTimeout(G.requestTimeout,Y);const L=this.sessionCache.get(W)||new S9;return L.offerLast(Z),this.sessionCache.set(W,L),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()}};O(X6,"NodeHttp2ConnectionManager");var k9=X6,Z6=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new k9({}),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,Y)=>{var L;let w=!1,Q=void 0;const z=O(async(N)=>{await Q,Z(N)},"resolve"),F=O(async(N)=>{await Q,Y(N)},"reject");if(G==null?void 0:G.aborted){w=!0;const N=new Error("Request aborted");N.name="AbortError",F(N);return}const{hostname:J,method:I,port:K,protocol:V,query:B}=U;let H="";if(U.username!=null||U.password!=null){const N=U.username??"",p=U.password??"";H=`${N}:${p}@`}const A=`${V}//${H}${J}${K?`:${K}`:""}`,E={destination:new URL(A)},T=this.connectionManager.lease(E,{requestTimeout:(L=this.config)==null?void 0:L.sessionTimeout,disableConcurrentStreams:X||!1}),S=O((N)=>{if(X)this.destroySession(T);w=!0,F(N)},"rejectWithDestroy"),h=t4.buildQueryString(B||{});let Q0=U.path;if(h)Q0+=`?${h}`;if(U.fragment)Q0+=`#${U.fragment}`;const c=T.request({...U.headers,[i4.constants.HTTP2_HEADER_PATH]:Q0,[i4.constants.HTTP2_HEADER_METHOD]:I});if(T.ref(),c.on("response",(N)=>{const p=new a4.HttpResponse({statusCode:N[":status"]||-1,headers:e4(N),body:c});if(w=!0,z({response:p}),X)T.close(),this.connectionManager.deleteSession(A,T)}),W)c.setTimeout(W,()=>{c.close();const N=new Error(`Stream timed out because of no activity for ${W} ms`);N.name="TimeoutError",S(N)});if(G){const N=O(()=>{c.close();const p=new Error("Request aborted");p.name="AbortError",S(p)},"onAbort");if(typeof G.addEventListener==="function"){const p=G;p.addEventListener("abort",N,{once:!0}),c.once("close",()=>p.removeEventListener("abort",N))}else G.onabort=N}c.on("frameError",(N,p,fY)=>{S(new Error(`Frame type id ${N} in stream id ${fY} has failed with code ${p}.`))}),c.on("error",S),c.on("aborted",()=>{S(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${c.rstCode}.`))}),c.on("close",()=>{if(T.unref(),X)T.destroy();if(!w)S(new Error("Unexpected error: http2 request did not get a response"))}),Q=s$(c,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()}};O(Z6,"NodeHttp2Handler");var b9=Z6,Y6=class $ extends $6.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,G,W){this.bufferedBytes.push(U),W()}};O(Y6,"Collector");var D9=Y6,h9=O(($)=>{if(x9($))return L6($);return new Promise((U,G)=>{const W=new D9;$.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"),x9=O(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");O(L6,"collectReadableStream")});var V6=R((IK,B6)=>{var J6=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 K6($){const U=await R6($),G=l9.fromBase64(U);return new Uint8Array(G)}async function M6($){const U=[],G=$.getReader();let W=!1,X=0;while(!W){const{done:L,value:w}=await G.read();if(w)U.push(w),X+=w.length;W=L}const Z=new Uint8Array(X);let Y=0;for(let L of U)Z.set(L,Y),Y+=L.length;return Z}var R6=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(","),Y=Z>-1?Z+1:X.length;U(X.substring(Y))},W.onabort=()=>G(new Error("Read aborted")),W.onerror=()=>G(W.error),W.readAsDataURL($)})},N1=Object.defineProperty,v9=Object.getOwnPropertyDescriptor,c9=Object.getOwnPropertyNames,y9=Object.prototype.hasOwnProperty,e=($,U)=>N1($,"name",{value:U,configurable:!0}),u9=($,U)=>{for(var G in U)N1($,G,{get:U[G],enumerable:!0})},_9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of c9(U))if(!y9.call($,X)&&X!==G)N1($,X,{get:()=>U[X],enumerable:!(W=v9(U,X))||W.enumerable})}return $},g9=($)=>_9(N1({},"__esModule",{value:!0}),$),F6={};u9(F6,{FetchHttpHandler:()=>p9,keepAliveSupport:()=>q1,streamCollector:()=>s9});B6.exports=g9(F6);var z6=t(),d9=d$();e(J6,"requestTimeout");var q1={supported:void 0},I6=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}={}){var W;if(!this.config)this.config=await this.configProvider;const X=this.config.requestTimeout,Z=this.config.keepAlive===!0,Y=this.config.credentials;if(G==null?void 0:G.aborted){const A=new Error("Request aborted");return A.name="AbortError",Promise.reject(A)}let L=U.path;const w=d9.buildQueryString(U.query||{});if(w)L+=`?${w}`;if(U.fragment)L+=`#${U.fragment}`;let Q="";if(U.username!=null||U.password!=null){const A=U.username??"",E=U.password??"";Q=`${A}:${E}@`}const{port:z,method:F}=U,J=`${U.protocol}//${Q}${U.hostname}${z?`:${z}`:""}${L}`,I=F==="GET"||F==="HEAD"?void 0:U.body,K={body:I,headers:new Headers(U.headers),method:F,credentials:Y};if((W=this.config)==null?void 0:W.cache)K.cache=this.config.cache;if(I)K.duplex="half";if(typeof AbortController!=="undefined")K.signal=G;if(q1.supported)K.keepalive=Z;if(typeof this.config.requestInit==="function")Object.assign(K,this.config.requestInit(U));let V=e(()=>{},"removeSignalEventListener");const B=new Request(J,K),H=[fetch(B).then((A)=>{const E=A.headers,T={};for(let h of E.entries())T[h[0]]=h[1];if(A.body==null)return A.blob().then((h)=>({response:new z6.HttpResponse({headers:T,reason:A.statusText,statusCode:A.status,body:h})}));return{response:new z6.HttpResponse({headers:T,reason:A.statusText,statusCode:A.status,body:A.body})}}),J6(X)];if(G)H.push(new Promise((A,E)=>{const T=e(()=>{const S=new Error("Request aborted");S.name="AbortError",E(S)},"onAbort");if(typeof G.addEventListener==="function"){const S=G;S.addEventListener("abort",T,{once:!0}),V=e(()=>S.removeEventListener("abort",T),"removeSignalEventListener")}else G.onabort=T}));return Promise.race(H).finally(V)}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return W[U]=G,W})}httpHandlerConfigs(){return this.config??{}}};e(I6,"FetchHttpHandler");var p9=I6,l9=f1(),s9=e(($)=>{if(typeof Blob==="function"&&$ instanceof Blob)return K6($);return M6($)},"streamCollector");e(K6,"collectBlob");e(M6,"collectStream");e(R6,"readToBase64")});var p0=R((H6)=>{Object.defineProperty(H6,"__esModule",{value:!0});H6.isReadableStream=void 0;var m9=($)=>{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)};H6.isReadableStream=m9});var N6=R((C6)=>{Object.defineProperty(C6,"__esModule",{value:!0});C6.sdkStreamMixin=void 0;var n9=V6(),i9=f1(),r9=f6(),o9=W0(),E6=p0(),T6="The stream has already been transformed.",a9=($)=>{var U,G;if(!O6($)&&!E6.isReadableStream($)){const Y=((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 ${Y}`)}let W=!1;const X=async()=>{if(W)throw new Error(T6);return W=!0,await n9.streamCollector($)},Z=(Y)=>{if(typeof Y.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 Y.stream()};return Object.assign($,{transformToByteArray:X,transformToString:async(Y)=>{const L=await X();if(Y==="base64")return i9.toBase64(L);else if(Y==="hex")return r9.toHex(L);else if(Y===void 0||Y==="utf8"||Y==="utf-8")return o9.toUtf8(L);else if(typeof TextDecoder==="function")return new TextDecoder(Y).decode(L);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(W)throw new Error(T6);if(W=!0,O6($))return Z($);else if(E6.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};C6.sdkStreamMixin=a9;var O6=($)=>typeof Blob==="function"&&$ instanceof Blob});var k6=R((P6)=>{Object.defineProperty(P6,"__esModule",{value:!0});P6.sdkStreamMixin=void 0;var t9=Q6(),e9=g0(),m$=import.meta.require("stream"),$Q=import.meta.require("util"),UQ=N6(),j6="The stream has already been transformed.",GQ=($)=>{var U,G;if(!($ instanceof m$.Readable))try{return UQ.sdkStreamMixin($)}catch(Z){const Y=((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 ${Y}`)}let W=!1;const X=async()=>{if(W)throw new Error(j6);return W=!0,await t9.streamCollector($)};return Object.assign($,{transformToByteArray:X,transformToString:async(Z)=>{const Y=await X();if(Z===void 0||Buffer.isEncoding(Z))return e9.fromArrayBuffer(Y.buffer,Y.byteOffset,Y.byteLength).toString(Z);else return new $Q.TextDecoder(Z).decode(Y)},transformToWebStream:()=>{if(W)throw new Error(j6);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof m$.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,m$.Readable.toWeb($)}})};P6.sdkStreamMixin=GQ});var h6=R((b6)=>{async function WQ($){if(typeof $.stream==="function")$=$.stream();return $.tee()}Object.defineProperty(b6,"__esModule",{value:!0});b6.splitStream=void 0;b6.splitStream=WQ});var y6=R((v6)=>{async function YQ($){if(ZQ.isReadableStream($))return XQ.splitStream($);const U=new x6.PassThrough,G=new x6.PassThrough;return $.pipe(U),$.pipe(G),[U,G]}Object.defineProperty(v6,"__esModule",{value:!0});v6.splitStream=void 0;var x6=import.meta.require("stream"),XQ=h6(),ZQ=p0();v6.splitStream=YQ});var g6=R((u6)=>{async function LQ($,U){var G;let W=0;const X=[],Z=$.getReader();let Y=!1;while(!Y){const{done:Q,value:z}=await Z.read();if(z)X.push(z),W+=(G=z===null||z===void 0?void 0:z.byteLength)!==null&&G!==void 0?G:0;if(W>=U)break;Y=Q}Z.releaseLock();const L=new Uint8Array(Math.min(U,W));let w=0;for(let Q of X){if(Q.byteLength>L.byteLength-w){L.set(Q.subarray(0,L.byteLength-w),w);break}else L.set(Q,w);w+=Q.length}return L}Object.defineProperty(u6,"__esModule",{value:!0});u6.headStream=void 0;u6.headStream=LQ});var s6=R((p6)=>{Object.defineProperty(p6,"__esModule",{value:!0});p6.headStream=void 0;var wQ=import.meta.require("stream"),QQ=g6(),zQ=p0(),FQ=($,U)=>{if(zQ.isReadableStream($))return QQ.headStream($,U);return new Promise((G,W)=>{const X=new d6;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)})})};p6.headStream=FQ;class d6 extends wQ.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 a6=R((EK,M0)=>{var i6=function($,U="utf-8"){if(U==="base64")return m6.toBase64($);return n6.toUtf8($)},r6=function($,U){if(U==="base64")return i$.mutate(m6.fromBase64($));return i$.mutate(n6.fromUtf8($))},j1=Object.defineProperty,JQ=Object.getOwnPropertyDescriptor,IQ=Object.getOwnPropertyNames,KQ=Object.prototype.hasOwnProperty,r$=($,U)=>j1($,"name",{value:U,configurable:!0}),MQ=($,U)=>{for(var G in U)j1($,G,{get:U[G],enumerable:!0})},n$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of IQ(U))if(!KQ.call($,X)&&X!==G)j1($,X,{get:()=>U[X],enumerable:!(W=JQ(U,X))||W.enumerable})}return $},l0=($,U,G)=>(n$($,U,"default"),G&&n$(G,U,"default")),RQ=($)=>n$(j1({},"__esModule",{value:!0}),$),K0={};MQ(K0,{Uint8ArrayBlobAdapter:()=>i$});M0.exports=RQ(K0);var m6=f1(),n6=W0();r$(i6,"transformToString");r$(r6,"transformFromString");var o6=class $ extends Uint8Array{static fromString(U,G="utf-8"){switch(typeof U){case"string":return r6(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 i6(this,U)}};r$(o6,"Uint8ArrayBlobAdapter");var i$=o6;l0(K0,_4(),M0.exports);l0(K0,k6(),M0.exports);l0(K0,y6(),M0.exports);l0(K0,s6(),M0.exports);l0(K0,p0(),M0.exports)});var j0=R((TK,AW)=>{var FW=function($){const U=$.getUTCFullYear(),G=$.getUTCMonth(),W=$.getUTCDay(),X=$.getUTCDate(),Z=$.getUTCHours(),Y=$.getUTCMinutes(),L=$.getUTCSeconds(),w=X<10?`0${X}`:`${X}`,Q=Z<10?`0${Z}`:`${Z}`,z=Y<10?`0${Y}`:`${Y}`,F=L<10?`0${L}`:`${L}`;return`${lQ[W]}, ${w} ${YU[G]} ${U} ${Q}:${z}:${F} GMT`},k1=function($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})},LU=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,O7(W,X,Z);else Z=U;for(let Y of Object.keys(Z)){if(!Array.isArray(Z[Y])){W[Y]=Z[Y];continue}VW(W,null,Z,Y)}return W},HW=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 Y=0;Y<W.length;Y++){if(Z==="")Z=W[Y];else Z+=U+W[Y];if((Y+1)%G===0)X.push(Z),Z=""}if(Z!=="")X.push(Z);return X},b1=Object.defineProperty,BQ=Object.getOwnPropertyDescriptor,VQ=Object.getOwnPropertyNames,HQ=Object.prototype.hasOwnProperty,M=($,U)=>b1($,"name",{value:U,configurable:!0}),AQ=($,U)=>{for(var G in U)b1($,G,{get:U[G],enumerable:!0})},EQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of VQ(U))if(!HQ.call($,X)&&X!==G)b1($,X,{get:()=>U[X],enumerable:!(W=BQ(U,X))||W.enumerable})}return $},TQ=($)=>EQ(b1({},"__esModule",{value:!0}),$),e6={};AQ(e6,{Client:()=>fQ,Command:()=>XW,LazyJsonString:()=>A7,NoOpLogger:()=>OQ,SENSITIVE_STRING:()=>NQ,ServiceException:()=>w7,StringWrapper:()=>r0,_json:()=>GU,collectBody:()=>CQ,convertMap:()=>E7,createAggregatedClient:()=>jQ,dateToUtcString:()=>FW,decorateServiceException:()=>IW,emitWarningIfUnsupportedVersion:()=>J7,expectBoolean:()=>SQ,expectByte:()=>UU,expectFloat32:()=>P1,expectInt:()=>bQ,expectInt32:()=>e$,expectLong:()=>n0,expectNonNull:()=>hQ,expectNumber:()=>m0,expectObject:()=>YW,expectShort:()=>$U,expectString:()=>xQ,expectUnion:()=>vQ,extendedEncodeURIComponent:()=>k1,getArrayIfSingleItem:()=>H7,getDefaultClientConfiguration:()=>B7,getDefaultExtensionConfiguration:()=>MW,getValueFromTextNode:()=>RW,handleFloat:()=>uQ,limitedParseDouble:()=>ZU,limitedParseFloat:()=>_Q,limitedParseFloat32:()=>gQ,loadConfigsForDefaultMode:()=>F7,logger:()=>i0,map:()=>LU,parseBoolean:()=>PQ,parseEpochTimestamp:()=>eQ,parseRfc3339DateTime:()=>mQ,parseRfc3339DateTimeWithOffset:()=>iQ,parseRfc7231DateTime:()=>tQ,resolveDefaultRuntimeConfig:()=>V7,resolvedPath:()=>q7,serializeDateTime:()=>j7,serializeFloat:()=>N7,splitEvery:()=>HW,strictParseByte:()=>zW,strictParseDouble:()=>XU,strictParseFloat:()=>cQ,strictParseFloat32:()=>LW,strictParseInt:()=>dQ,strictParseInt32:()=>pQ,strictParseLong:()=>QW,strictParseShort:()=>C0,take:()=>T7,throwDefaultError:()=>KW,withBaseException:()=>Q7});AW.exports=TQ(e6);var $W=class ${trace(){}debug(){}info(){}warn(){}error(){}};M($W,"NoOpLogger");var OQ=$W,UW=A4(),GW=class ${constructor(U){this.config=U,this.middlewareStack=UW.constructStack()}send(U,G,W){const X=typeof G!=="function"?G:void 0,Z=typeof G==="function"?G:W,Y=X===void 0&&this.config.cacheMiddleware===!0;let L;if(Y){if(!this.handlers)this.handlers=new WeakMap;const w=this.handlers;if(w.has(U.constructor))L=w.get(U.constructor);else L=U.resolveMiddleware(this.middlewareStack,this.config,X),w.set(U.constructor,L)}else delete this.handlers,L=U.resolveMiddleware(this.middlewareStack,this.config,X);if(Z)L(U).then((w)=>Z(null,w.output),(w)=>Z(w)).catch(()=>{});else return L(U).then((w)=>w.output)}destroy(){var U,G,W;(W=(G=(U=this.config)==null?void 0:U.requestHandler)==null?void 0:G.destroy)==null||W.call(G),delete this.handlers}};M(GW,"Client");var fQ=GW,o$=a6(),CQ=M(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return o$.Uint8ArrayBlobAdapter.mutate($);if(!$)return o$.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const G=U.streamCollector($);return o$.Uint8ArrayBlobAdapter.mutate(await G)},"collectBody"),t$=E0(),WW=class ${constructor(){this.middlewareStack=UW.constructStack()}static classBuilder(){return new qQ}resolveMiddlewareWithContext(U,G,W,{middlewareFn:X,clientName:Z,commandName:Y,inputFilterSensitiveLog:L,outputFilterSensitiveLog:w,smithyContext:Q,additionalContext:z,CommandCtor:F}){for(let B of X.bind(this)(F,U,G,W))this.middlewareStack.use(B);const J=U.concat(this.middlewareStack),{logger:I}=G,K={logger:I,clientName:Z,commandName:Y,inputFilterSensitiveLog:L,outputFilterSensitiveLog:w,[t$.SMITHY_CONTEXT_KEY]:{commandInstance:this,...Q},...z},{requestHandler:V}=G;return J.resolve((B)=>V.handle(B.request,W||{}),K)}};M(WW,"Command");var XW=WW,ZW=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 XW{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,Y){return this.resolveMiddlewareWithContext(X,Z,Y,{CommandCtor:W,middlewareFn:G._middlewareFn,clientName:G._clientName,commandName:G._commandName,inputFilterSensitiveLog:G._inputFilterSensitiveLog,outputFilterSensitiveLog:G._outputFilterSensitiveLog,smithyContext:G._smithyContext,additionalContext:G._additionalContext})}},M(U,"CommandRef"),U)}};M(ZW,"ClassBuilder");var qQ=ZW,NQ="***SensitiveInformation***",jQ=M(($,U)=>{for(let G of Object.keys($)){const W=$[G],X=M(async function(Y,L,w){const Q=new W(Y);if(typeof L==="function")this.send(Q,L);else if(typeof w==="function"){if(typeof L!=="object")throw new Error(`Expected http options but got ${typeof L}`);this.send(Q,L||{},w)}else return this.send(Q,L)},"methodImpl"),Z=(G[0].toLowerCase()+G.slice(1)).replace(/Command$/,"");U.prototype[Z]=X}},"createAggregatedClient"),PQ=M(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),SQ=M(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)i0.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")i0.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"),m0=M(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))i0.warn(S1(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),kQ=Math.ceil(340282346638528860000000000000000000000),P1=M(($)=>{const U=m0($);if(U!==void 0&&!Number.isNaN(U)&&U!==Infinity&&U!==(-Infinity)){if(Math.abs(U)>kQ)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),n0=M(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),bQ=n0,e$=M(($)=>WU($,32),"expectInt32"),$U=M(($)=>WU($,16),"expectShort"),UU=M(($)=>WU($,8),"expectByte"),WU=M(($,U)=>{const G=n0($);if(G!==void 0&&DQ(G,U)!==G)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return G},"expectSizedInt"),DQ=M(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),hQ=M(($,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"),YW=M(($)=>{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"),xQ=M(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return i0.warn(S1(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),vQ=M(($)=>{if($===null||$===void 0)return;const U=YW($),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"),XU=M(($)=>{if(typeof $=="string")return m0(N0($));return m0($)},"strictParseDouble"),cQ=XU,LW=M(($)=>{if(typeof $=="string")return P1(N0($));return P1($)},"strictParseFloat32"),yQ=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,N0=M(($)=>{const U=$.match(yQ);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),ZU=M(($)=>{if(typeof $=="string")return wW($);return m0($)},"limitedParseDouble"),uQ=ZU,_Q=ZU,gQ=M(($)=>{if(typeof $=="string")return wW($);return P1($)},"limitedParseFloat32"),wW=M(($)=>{switch($){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),QW=M(($)=>{if(typeof $==="string")return n0(N0($));return n0($)},"strictParseLong"),dQ=QW,pQ=M(($)=>{if(typeof $==="string")return e$(N0($));return e$($)},"strictParseInt32"),C0=M(($)=>{if(typeof $==="string")return $U(N0($));return $U($)},"strictParseShort"),zW=M(($)=>{if(typeof $==="string")return UU(N0($));return UU($)},"strictParseByte"),S1=M(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),i0={warn:console.warn},lQ=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],YU=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];M(FW,"dateToUtcString");var sQ=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),mQ=M(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=sQ.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,X,Z,Y,L,w,Q]=U,z=C0(q0(W)),F=o(X,"month",1,12),J=o(Z,"day",1,31);return s0(z,F,J,{hours:Y,minutes:L,seconds:w,fractionalMilliseconds:Q})},"parseRfc3339DateTime"),nQ=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),iQ=M(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=nQ.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,X,Z,Y,L,w,Q,z]=U,F=C0(q0(W)),J=o(X,"month",1,12),I=o(Z,"day",1,31),K=s0(F,J,I,{hours:Y,minutes:L,seconds:w,fractionalMilliseconds:Q});if(z.toUpperCase()!="Z")K.setTime(K.getTime()-L7(z));return K},"parseRfc3339DateTimeWithOffset"),rQ=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$/),oQ=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$/),aQ=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})$/),tQ=M(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=rQ.exec($);if(U){const[G,W,X,Z,Y,L,w,Q]=U;return s0(C0(q0(Z)),a$(X),o(W,"day",1,31),{hours:Y,minutes:L,seconds:w,fractionalMilliseconds:Q})}if(U=oQ.exec($),U){const[G,W,X,Z,Y,L,w,Q]=U;return G7(s0($7(Z),a$(X),o(W,"day",1,31),{hours:Y,minutes:L,seconds:w,fractionalMilliseconds:Q}))}if(U=aQ.exec($),U){const[G,W,X,Z,Y,L,w,Q]=U;return s0(C0(q0(Q)),a$(W),o(X.trimLeft(),"day",1,31),{hours:Z,minutes:Y,seconds:L,fractionalMilliseconds:w})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),eQ=M(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=XU($);else if(typeof $==="object"&&$.tag===1)U=$.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(U)||U===Infinity||U===(-Infinity))throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(U*1000))},"parseEpochTimestamp"),s0=M(($,U,G,W)=>{const X=U-1;return X7($,X,G),new Date(Date.UTC($,X,G,o(W.hours,"hour",0,23),o(W.minutes,"minute",0,59),o(W.seconds,"seconds",0,60),Y7(W.fractionalMilliseconds)))},"buildDate"),$7=M(($)=>{const U=(new Date()).getUTCFullYear(),G=Math.floor(U/100)*100+C0(q0($));if(G<U)return G+100;return G},"parseTwoDigitYear"),U7=1576800000000,G7=M(($)=>{if($.getTime()-(new Date()).getTime()>U7)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),a$=M(($)=>{const U=YU.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),W7=[31,28,31,30,31,30,31,31,30,31,30,31],X7=M(($,U,G)=>{let W=W7[U];if(U===1&&Z7($))W=29;if(G>W)throw new TypeError(`Invalid day for ${YU[U]} in ${$}: ${G}`)},"validateDayOfMonth"),Z7=M(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),o=M(($,U,G,W)=>{const X=zW(q0($));if(X<G||X>W)throw new TypeError(`${U} must be between ${G} and ${W}, inclusive`);return X},"parseDateValue"),Y7=M(($)=>{if($===null||$===void 0)return 0;return LW("0."+$)*1000},"parseMilliseconds"),L7=M(($)=>{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"),q0=M(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),JW=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};M(JW,"ServiceException");var w7=JW,IW=M(($,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"),KW=M(({output:$,parsedBody:U,exceptionCtor:G,errorCode:W})=>{const X=z7($),Z=X.httpStatusCode?X.httpStatusCode+"":void 0,Y=new G({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||W||Z||"UnknownError",$fault:"client",$metadata:X});throw IW(Y,U)},"throwDefaultError"),Q7=M(($)=>{return({output:U,parsedBody:G,errorCode:W})=>{KW({output:U,parsedBody:G,exceptionCtor:$,errorCode:W})}},"withBaseException"),z7=M(($)=>({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"),F7=M(($)=>{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"),t6=!1,J7=M(($)=>{if($&&!t6&&parseInt($.substring(1,$.indexOf(".")))<16)t6=!0},"emitWarningIfUnsupportedVersion"),I7=M(($)=>{const U=[];for(let G in t$.AlgorithmId){const W=t$.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"),K7=M(($)=>{const U={};return $.checksumAlgorithms().forEach((G)=>{U[G.algorithmId()]=G.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),M7=M(($)=>{let U=$.retryStrategy;return{setRetryStrategy(G){U=G},retryStrategy(){return U}}},"getRetryConfiguration"),R7=M(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),MW=M(($)=>{return{...I7($),...M7($)}},"getDefaultExtensionConfiguration"),B7=MW,V7=M(($)=>{return{...K7($),...R7($)}},"resolveDefaultRuntimeConfig");M(k1,"extendedEncodeURIComponent");var H7=M(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),RW=M(($)=>{for(let G in $)if($.hasOwnProperty(G)&&$[G]["#text"]!==void 0)$[G]=$[G]["#text"];else if(typeof $[G]==="object"&&$[G]!==null)$[G]=RW($[G]);return $},"getValueFromTextNode"),r0=M(function(){const $=Object.getPrototypeOf(this).constructor,G=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(G,$.prototype),G},"StringWrapper");r0.prototype=Object.create(String.prototype,{constructor:{value:r0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(r0,String);var BW=class $ extends r0{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))}};M(BW,"LazyJsonString");var A7=BW;M(LU,"map");var E7=M(($)=>{const U={};for(let[G,W]of Object.entries($||{}))U[G]=[,W];return U},"convertMap"),T7=M(($,U)=>{const G={};for(let W in U)VW(G,$,U,W);return G},"take"),O7=M(($,U,G)=>{return LU($,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"),VW=M(($,U,G,W)=>{if(U!==null){let Y=G[W];if(typeof Y==="function")Y=[,Y];const[L=f7,w=C7,Q=W]=Y;if(typeof L==="function"&&L(U[Q])||typeof L!=="function"&&!!L)$[W]=w(U[Q]);return}let[X,Z]=G[W];if(typeof Z==="function"){let Y;const L=X===void 0&&(Y=Z())!=null,w=typeof X==="function"&&!!X(void 0)||typeof X!=="function"&&!!X;if(L)$[W]=Y;else if(w)$[W]=Z()}else{const Y=X===void 0&&Z!=null,L=typeof X==="function"&&!!X(Z)||typeof X!=="function"&&!!X;if(Y||L)$[W]=Z}},"applyInstruction"),f7=M(($)=>$!=null,"nonNullish"),C7=M(($)=>$,"pass"),q7=M(($,U,G,W,X,Z)=>{if(U!=null&&U[G]!==void 0){const Y=W();if(Y.length<=0)throw new Error("Empty value provided for input HTTP label: "+G+".");$=$.replace(X,Z?Y.split("/").map((L)=>k1(L)).join("/"):k1(Y))}else throw new Error("No value provided for input HTTP label: "+G+".");return $},"resolvedPath"),N7=M(($)=>{if($!==$)return"NaN";switch($){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return $}},"serializeFloat"),j7=M(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),GU=M(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(GU);if(typeof $==="object"){const U={};for(let G of Object.keys($)){if($[G]==null)continue;U[G]=GU($[G])}return U}return $},"_json");M(HW,"splitEvery")});var OW=R((EW)=>{Object.defineProperty(EW,"__esModule",{value:!0});EW.isStreamingPayload=void 0;var P7=import.meta.require("stream"),S7=($)=>($===null||$===void 0?void 0:$.body)instanceof P7.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;EW.isStreamingPayload=S7});var gW=R((CK,_W)=>{var{defineProperty:D1,getOwnPropertyDescriptor:k7,getOwnPropertyNames:b7}=Object,D7=Object.prototype.hasOwnProperty,P=($,U)=>D1($,"name",{value:U,configurable:!0}),h7=($,U)=>{for(var G in U)D1($,G,{get:U[G],enumerable:!0})},x7=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of b7(U))if(!D7.call($,X)&&X!==G)D1($,X,{get:()=>U[X],enumerable:!(W=k7(U,X))||W.enumerable})}return $},v7=($)=>x7(D1({},"__esModule",{value:!0}),$),CW={};h7(CW,{AdaptiveRetryStrategy:()=>u7,CONFIG_MAX_ATTEMPTS:()=>QU,CONFIG_RETRY_MODE:()=>hW,ENV_MAX_ATTEMPTS:()=>wU,ENV_RETRY_MODE:()=>DW,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>_7,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>d7,StandardRetryStrategy:()=>kW,defaultDelayDecider:()=>NW,defaultRetryDecider:()=>jW,getOmitRetryHeadersPlugin:()=>p7,getRetryAfterHint:()=>uW,getRetryPlugin:()=>r7,omitRetryHeadersMiddleware:()=>xW,omitRetryHeadersMiddlewareOptions:()=>vW,resolveRetryConfig:()=>g7,retryMiddleware:()=>cW,retryMiddlewareOptions:()=>yW});_W.exports=v7(CW);var P0=t(),qW=R$(),q=M4(),c7=P(($,U)=>{const G=$,W=(U==null?void 0:U.noRetryIncrement)??q.NO_RETRY_INCREMENT,X=(U==null?void 0:U.retryCost)??q.RETRY_COST,Z=(U==null?void 0:U.timeoutRetryCost)??q.TIMEOUT_RETRY_COST;let Y=$;const L=P((F)=>F.name==="TimeoutError"?Z:X,"getCapacityAmount"),w=P((F)=>L(F)<=Y,"hasRetryTokens");return Object.freeze({hasRetryTokens:w,retrieveRetryTokens:P((F)=>{if(!w(F))throw new Error("No retry token available");const J=L(F);return Y-=J,J},"retrieveRetryTokens"),releaseRetryTokens:P((F)=>{Y+=F??W,Y=Math.min(Y,G)},"releaseRetryTokens")})},"getDefaultRetryQuota"),NW=P(($,U)=>Math.floor(Math.min(q.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),X0=J0(),jW=P(($)=>{if(!$)return!1;return X0.isRetryableByTrait($)||X0.isClockSkewError($)||X0.isThrottlingError($)||X0.isTransientError($)},"defaultRetryDecider"),PW=P(($)=>{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"),SW=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode=q.RETRY_MODES.STANDARD,this.retryDecider=(G==null?void 0:G.retryDecider)??jW,this.delayDecider=(G==null?void 0:G.delayDecider)??NW,this.retryQuota=(G==null?void 0:G.retryQuota)??c7(q.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=q.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,G,W){let X,Z=0,Y=0;const L=await this.getMaxAttempts(),{request:w}=G;if(P0.HttpRequest.isInstance(w))w.headers[q.INVOCATION_ID_HEADER]=qW.v4();while(!0)try{if(P0.HttpRequest.isInstance(w))w.headers[q.REQUEST_HEADER]=`attempt=${Z+1}; max=${L}`;if(W==null?void 0:W.beforeRequest)await W.beforeRequest();const{response:Q,output:z}=await U(G);if(W==null?void 0:W.afterRequest)W.afterRequest(Q);return this.retryQuota.releaseRetryTokens(X),z.$metadata.attempts=Z+1,z.$metadata.totalRetryDelay=Y,{response:Q,output:z}}catch(Q){const z=PW(Q);if(Z++,this.shouldRetry(z,Z,L)){X=this.retryQuota.retrieveRetryTokens(z);const F=this.delayDecider(X0.isThrottlingError(z)?q.THROTTLING_RETRY_DELAY_BASE:q.DEFAULT_RETRY_DELAY_BASE,Z),J=y7(z.$response),I=Math.max(J||0,F);Y+=I,await new Promise((K)=>setTimeout(K,I));continue}if(!z.$metadata)z.$metadata={};throw z.$metadata.attempts=Z,z.$metadata.totalRetryDelay=Y,z}}};P(SW,"StandardRetryStrategy");var kW=SW,y7=P(($)=>{if(!P0.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"),bW=class $ extends kW{constructor(U,G){const{rateLimiter:W,...X}=G??{};super(U,X);this.rateLimiter=W??new q.DefaultRateLimiter,this.mode=q.RETRY_MODES.ADAPTIVE}async retry(U,G){return super.retry(U,G,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(W)=>{this.rateLimiter.updateClientSendingRate(W)}})}};P(bW,"AdaptiveRetryStrategy");var u7=bW,fW=r(),wU="AWS_MAX_ATTEMPTS",QU="max_attempts",_7={environmentVariableSelector:($)=>{const U=$[wU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${wU} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[QU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${QU} mast be a number, got "${U}"`);return G},default:q.DEFAULT_MAX_ATTEMPTS},g7=P(($)=>{const{retryStrategy:U}=$,G=fW.normalizeProvider($.maxAttempts??q.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await fW.normalizeProvider($.retryMode)()===q.RETRY_MODES.ADAPTIVE)return new q.AdaptiveRetryStrategy(G);return new q.StandardRetryStrategy(G)}}},"resolveRetryConfig"),DW="AWS_RETRY_MODE",hW="retry_mode",d7={environmentVariableSelector:($)=>$[DW],configFileSelector:($)=>$[hW],default:q.DEFAULT_RETRY_MODE},xW=P(()=>($)=>async(U)=>{const{request:G}=U;if(P0.HttpRequest.isInstance(G))delete G.headers[q.INVOCATION_ID_HEADER],delete G.headers[q.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),vW={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},p7=P(($)=>({applyToStack:(U)=>{U.addRelativeTo(xW(),vW)}}),"getOmitRetryHeadersPlugin"),l7=j0(),s7=OW(),cW=P(($)=>(U,G)=>async(W)=>{var X;let Z=await $.retryStrategy();const Y=await $.maxAttempts();if(m7(Z)){Z=Z;let L=await Z.acquireInitialRetryToken(G.partition_id),w=new Error,Q=0,z=0;const{request:F}=W,J=P0.HttpRequest.isInstance(F);if(J)F.headers[q.INVOCATION_ID_HEADER]=qW.v4();while(!0)try{if(J)F.headers[q.REQUEST_HEADER]=`attempt=${Q+1}; max=${Y}`;const{response:I,output:K}=await U(W);return Z.recordSuccess(L),K.$metadata.attempts=Q+1,K.$metadata.totalRetryDelay=z,{response:I,output:K}}catch(I){const K=n7(I);if(w=PW(I),J&&s7.isStreamingPayload(F))throw(X=G.logger instanceof l7.NoOpLogger?console:G.logger)==null||X.warn("An error was encountered in a non-retryable streaming request."),w;try{L=await Z.refreshRetryTokenForRetry(L,K)}catch(B){if(!w.$metadata)w.$metadata={};throw w.$metadata.attempts=Q+1,w.$metadata.totalRetryDelay=z,w}Q=L.getRetryCount();const V=L.getRetryDelay();z+=V,await new Promise((B)=>setTimeout(B,V))}}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"),m7=P(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),n7=P(($)=>{const U={error:$,errorType:i7($)},G=uW($.$response);if(G)U.retryAfterHint=G;return U},"getRetryErrorInfo"),i7=P(($)=>{if(X0.isThrottlingError($))return"THROTTLING";if(X0.isTransientError($))return"TRANSIENT";if(X0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),yW={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},r7=P(($)=>({applyToStack:(U)=>{U.add(cW($),yW)}}),"getRetryPlugin"),uW=P(($)=>{if(!P0.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 FU=R((qK,YX)=>{var lW=function($){const U=new Map;for(let G of $)U.set(G.schemeId,G);return U},GX=function($,U){return new XX($,U)},ZX=function($,U,G,W,X){return C(async function*Z(Y,L,...w){let Q=Y.startingToken||void 0,z=!0,F;while(z){if(L[G]=Q,X)L[X]=L[X]??Y.pageSize;if(Y.client instanceof $)F=await Hz(U,Y.client,L,...w);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield F;const J=Q;Q=Az(F,W),z=!!(Q&&(!Y.stopOnSameToken||Q!==J))}return},"paginateOperation")},x1=Object.defineProperty,o7=Object.getOwnPropertyDescriptor,a7=Object.getOwnPropertyNames,t7=Object.prototype.hasOwnProperty,C=($,U)=>x1($,"name",{value:U,configurable:!0}),e7=($,U)=>{for(var G in U)x1($,G,{get:U[G],enumerable:!0})},$z=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of a7(U))if(!t7.call($,X)&&X!==G)x1($,X,{get:()=>U[X],enumerable:!(W=o7(U,X))||W.enumerable})}return $},Uz=($)=>$z(x1({},"__esModule",{value:!0}),$),dW={};e7(dW,{DefaultIdentityProviderConfig:()=>zz,EXPIRATION_MS:()=>$X,HttpApiKeyAuthSigner:()=>Fz,HttpBearerAuthSigner:()=>Jz,NoAuthSigner:()=>Iz,RequestBuilder:()=>XX,createIsIdentityExpiredFunction:()=>eW,createPaginator:()=>ZX,doesIdentityRequireRefresh:()=>UX,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Wz,getHttpAuthSchemePlugin:()=>Zz,getHttpSigningPlugin:()=>Qz,getSmithyContext:()=>Rz,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>sW,httpAuthSchemeMiddleware:()=>zU,httpAuthSchemeMiddlewareOptions:()=>mW,httpSigningMiddleware:()=>nW,httpSigningMiddlewareOptions:()=>iW,isIdentityExpired:()=>Kz,memoizeIdentityProvider:()=>Mz,normalizeProvider:()=>Bz,requestBuilder:()=>GX});YX.exports=Uz(dW);var pW=r();C(lW,"convertHttpAuthSchemesToMap");var zU=C(($,U)=>(G,W)=>async(X)=>{var Z;const Y=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,W,X.input)),L=lW($.httpAuthSchemes),w=pW.getSmithyContext(W),Q=[];for(let z of Y){const F=L.get(z.schemeId);if(!F){Q.push(`HttpAuthScheme \`${z.schemeId}\` was not enabled for this service.`);continue}const J=F.identityProvider(await U.identityProviderConfigProvider($));if(!J){Q.push(`HttpAuthScheme \`${z.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:I={},signingProperties:K={}}=((Z=z.propertiesExtractor)==null?void 0:Z.call(z,$,W))||{};z.identityProperties=Object.assign(z.identityProperties||{},I),z.signingProperties=Object.assign(z.signingProperties||{},K),w.selectedHttpAuthScheme={httpAuthOption:z,identity:await J(z.identityProperties),signer:F.signer};break}if(!w.selectedHttpAuthScheme)throw new Error(Q.join("\n"));return G(X)},"httpAuthSchemeMiddleware"),Gz=d8(),sW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Gz.endpointMiddlewareOptions.name},Wz=C(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(zU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),sW)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),Xz=P$(),mW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Xz.serializerMiddlewareOption.name},Zz=C(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(zU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),mW)}}),"getHttpAuthSchemePlugin"),v1=t(),Yz=C(($)=>(U)=>{throw U},"defaultErrorHandler"),Lz=C(($,U)=>{},"defaultSuccessHandler"),nW=C(($)=>(U,G)=>async(W)=>{if(!v1.HttpRequest.isInstance(W.request))return U(W);const Z=pW.getSmithyContext(G).selectedHttpAuthScheme;if(!Z)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:Y={}},identity:L,signer:w}=Z,Q=await U({...W,request:await w.sign(W.request,L,Y)}).catch((w.errorHandler||Yz)(Y));return(w.successHandler||Lz)(Q.response,Y),Q},"httpSigningMiddleware"),wz=gW(),iW={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:wz.retryMiddlewareOptions.name},Qz=C(($)=>({applyToStack:(U)=>{U.addRelativeTo(nW($),iW)}}),"getHttpSigningPlugin"),rW=class ${constructor(U){this.authSchemes=new Map;for(let[G,W]of Object.entries(U))if(W!==void 0)this.authSchemes.set(G,W)}getIdentityProvider(U){return this.authSchemes.get(U)}};C(rW,"DefaultIdentityProviderConfig");var zz=rW,h1=E0(),oW=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}};C(oW,"HttpApiKeyAuthSigner");var Fz=oW,aW=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}};C(aW,"HttpBearerAuthSigner");var Jz=aW,tW=class ${async sign(U,G,W){return U}};C(tW,"NoAuthSigner");var Iz=tW,eW=C(($)=>(U)=>UX(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),$X=300000,Kz=eW($X),UX=C(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),Mz=C(($,U,G)=>{if($===void 0)return;const W=typeof $!=="function"?async()=>Promise.resolve($):$;let X,Z,Y,L=!1;const w=C(async(Q)=>{if(!Z)Z=W(Q);try{X=await Z,Y=!0,L=!1}finally{Z=void 0}return X},"coalesceProvider");if(U===void 0)return async(Q)=>{if(!Y||(Q==null?void 0:Q.forceRefresh))X=await w(Q);return X};return async(Q)=>{if(!Y||(Q==null?void 0:Q.forceRefresh))X=await w(Q);if(L)return X;if(!G(X))return L=!0,X;if(U(X))return await w(Q),X;return X}},"memoizeIdentityProvider"),Rz=C(($)=>$[h1.SMITHY_CONTEXT_KEY]||($[h1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),Bz=C(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),Vz=j0();C(GX,"requestBuilder");var WX=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=Vz.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}};C(WX,"RequestBuilder");var XX=WX,Hz=C(async($,U,G,...W)=>{return await U.send(new $(G),...W)},"makePagedClientRequest");C(ZX,"createPaginator");var Az=C(($,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 aX=R((NA,oX)=>{var{defineProperty:$$,getOwnPropertyDescriptor:WF,getOwnPropertyNames:XF}=Object,ZF=Object.prototype.hasOwnProperty,YF=($,U)=>$$($,"name",{value:U,configurable:!0}),LF=($,U)=>{for(var G in U)$$($,G,{get:U[G],enumerable:!0})},wF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of XF(U))if(!ZF.call($,X)&&X!==G)$$($,X,{get:()=>U[X],enumerable:!(W=WF(U,X))||W.enumerable})}return $},QF=($)=>wF($$({},"__esModule",{value:!0}),$),rX={};LF(rX,{emitWarningIfUnsupportedVersion:()=>zF});oX.exports=QF(rX);var iX=!1,zF=YF(($)=>{if($&&!iX&&parseInt($.substring(1,$.indexOf(".")))<18)iX=!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 BZ=R((jA,RZ)=>{var vU=function($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break},Y$=Object.defineProperty,FF=Object.getOwnPropertyDescriptor,JF=Object.getOwnPropertyNames,IF=Object.prototype.hasOwnProperty,k=($,U)=>Y$($,"name",{value:U,configurable:!0}),KF=($,U)=>{for(var G in U)Y$($,G,{get:U[G],enumerable:!0})},MF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of JF(U))if(!IF.call($,X)&&X!==G)Y$($,X,{get:()=>U[X],enumerable:!(W=FF(U,X))||W.enumerable})}return $},RF=($)=>MF(Y$({},"__esModule",{value:!0}),$),GZ={};KF(GZ,{SignatureV4:()=>dF,clearCredentialCache:()=>DF,createScope:()=>W$,getCanonicalHeaders:()=>xU,getCanonicalQuery:()=>zZ,getPayloadHash:()=>Z$,getSigningKey:()=>QZ,moveHeadersToQuery:()=>KZ,prepareRequest:()=>cU});RZ.exports=RF(GZ);var tX=r(),bU=W0(),BF="X-Amz-Algorithm",VF="X-Amz-Credential",WZ="X-Amz-Date",HF="X-Amz-SignedHeaders",AF="X-Amz-Expires",XZ="X-Amz-Signature",ZZ="X-Amz-Security-Token",YZ="authorization",LZ=WZ.toLowerCase(),EF="date",TF=[YZ,LZ,EF],OF=XZ.toLowerCase(),hU="x-amz-content-sha256",fF=ZZ.toLowerCase(),CF={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},qF=/^proxy-/,NF=/^sec-/,DU="AWS4-HMAC-SHA256",jF="AWS4-HMAC-SHA256-PAYLOAD",PF="UNSIGNED-PAYLOAD",SF=50,wZ="aws4_request",kF=604800,L0=f6(),bF=W0(),h0={},G$=[],W$=k(($,U,G)=>`${$}/${U}/${G}/${wZ}`,"createScope"),QZ=k(async($,U,G,W,X)=>{const Z=await eX($,U.secretAccessKey,U.accessKeyId),Y=`${G}:${W}:${X}:${L0.toHex(Z)}:${U.sessionToken}`;if(Y in h0)return h0[Y];G$.push(Y);while(G$.length>SF)delete h0[G$.shift()];let L=`AWS4${U.secretAccessKey}`;for(let w of[G,W,X,wZ])L=await eX($,L,w);return h0[Y]=L},"getSigningKey"),DF=k(()=>{G$.length=0,Object.keys(h0).forEach(($)=>{delete h0[$]})},"clearCredentialCache"),eX=k(($,U,G)=>{const W=new $(U);return W.update(bF.toUint8Array(G)),W.digest()},"hmac"),xU=k(({headers:$},U,G)=>{const W={};for(let X of Object.keys($).sort()){if($[X]==null)continue;const Z=X.toLowerCase();if(Z in CF||(U==null?void 0:U.has(Z))||qF.test(Z)||NF.test(Z)){if(!G||G&&!G.has(Z))continue}W[Z]=$[X].trim().replace(/\s+/g," ")}return W},"getCanonicalHeaders"),X$=g4(),zZ=k(({query:$={}})=>{const U=[],G={};for(let W of Object.keys($)){if(W.toLowerCase()===OF)continue;const X=X$.escapeUri(W);U.push(X);const Z=$[W];if(typeof Z==="string")G[X]=`${X}=${X$.escapeUri(Z)}`;else if(Array.isArray(Z))G[X]=Z.slice(0).reduce((Y,L)=>Y.concat([`${X}=${X$.escapeUri(L)}`]),[]).sort().join("&")}return U.sort().map((W)=>G[W]).filter((W)=>W).join("&")},"getCanonicalQuery"),hF=v$(),xF=W0(),Z$=k(async({headers:$,body:U},G)=>{for(let W of Object.keys($))if(W.toLowerCase()===hU)return $[W];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||hF.isArrayBuffer(U)){const W=new G;return W.update(xF.toUint8Array(U)),L0.toHex(await W.digest())}return PF},"getPayloadHash"),$Z=W0(),FZ=class ${format(U){const G=[];for(let Z of Object.keys(U)){const Y=$Z.fromUtf8(Z);G.push(Uint8Array.from([Y.byteLength]),Y,this.formatHeaderValue(U[Z]))}const W=new Uint8Array(G.reduce((Z,Y)=>Z+Y.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 Y=new Uint8Array(Z.buffer);return Y.set(U.value,3),Y;case"string":const L=$Z.fromUtf8(U.value),w=new DataView(new ArrayBuffer(3+L.byteLength));w.setUint8(0,7),w.setUint16(1,L.byteLength,!1);const Q=new Uint8Array(w.buffer);return Q.set(L,3),Q;case"timestamp":const z=new Uint8Array(9);return z[0]=8,z.set(yF.fromNumber(U.value.valueOf()).bytes,1),z;case"uuid":if(!cF.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const F=new Uint8Array(17);return F[0]=9,F.set(L0.fromHex(U.value.replace(/\-/g,"")),1),F}}};k(FZ,"HeaderFormatter");var vF=FZ,cF=/^[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)vU(G);return new $(G)}valueOf(){const U=this.bytes.slice(0),G=U[0]&128;if(G)vU(U);return parseInt(L0.toHex(U),16)*(G?-1:1)}toString(){return String(this.valueOf())}};k(JZ,"Int64");var yF=JZ;k(vU,"negate");var uF=k(($,U)=>{$=$.toLowerCase();for(let G of Object.keys(U))if($===G.toLowerCase())return!0;return!1},"hasHeader"),IZ=t(),KZ=k(($,U={})=>{var G;const{headers:W,query:X={}}=IZ.HttpRequest.clone($);for(let Z of Object.keys(W)){const Y=Z.toLowerCase();if(Y.slice(0,6)==="x-amz-"&&!((G=U.unhoistableHeaders)==null?void 0:G.has(Y)))X[Z]=W[Z],delete W[Z]}return{...$,headers:W,query:X}},"moveHeadersToQuery"),cU=k(($)=>{$=IZ.HttpRequest.clone($);for(let U of Object.keys($.headers))if(TF.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),_F=k(($)=>gF($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),gF=k(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),MZ=class ${constructor({applyChecksum:U,credentials:G,region:W,service:X,sha256:Z,uriEscapePath:Y=!0}){this.headerFormatter=new vF,this.service=X,this.sha256=Z,this.uriEscapePath=Y,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=tX.normalizeProvider(W),this.credentialProvider=tX.normalizeProvider(G)}async presign(U,G={}){const{signingDate:W=new Date,expiresIn:X=3600,unsignableHeaders:Z,unhoistableHeaders:Y,signableHeaders:L,signingRegion:w,signingService:Q}=G,z=await this.credentialProvider();this.validateResolvedCredentials(z);const F=w??await this.regionProvider(),{longDate:J,shortDate:I}=U$(W);if(X>kF)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const K=W$(I,F,Q??this.service),V=KZ(cU(U),{unhoistableHeaders:Y});if(z.sessionToken)V.query[ZZ]=z.sessionToken;V.query[BF]=DU,V.query[VF]=`${z.accessKeyId}/${K}`,V.query[WZ]=J,V.query[AF]=X.toString(10);const B=xU(V,Z,L);return V.query[HF]=UZ(B),V.query[XZ]=await this.getSignature(J,K,this.getSigningKey(z,F,I,Q),this.createCanonicalRequest(V,B,await Z$(U,this.sha256))),V}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:Y}){const L=Z??await this.regionProvider(),{shortDate:w,longDate:Q}=U$(W),z=W$(w,L,Y??this.service),F=await Z$({headers:{},body:G},this.sha256),J=new this.sha256;J.update(U);const I=L0.toHex(await J.digest()),K=[jF,Q,z,X,I,F].join("\n");return this.signString(K,{signingDate:W,signingRegion:L,signingService:Y})}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((Y)=>{return{message:U.message,signature:Y}})}async signString(U,{signingDate:G=new Date,signingRegion:W,signingService:X}={}){const Z=await this.credentialProvider();this.validateResolvedCredentials(Z);const Y=W??await this.regionProvider(),{shortDate:L}=U$(G),w=new this.sha256(await this.getSigningKey(Z,Y,L,X));return w.update(bU.toUint8Array(U)),L0.toHex(await w.digest())}async signRequest(U,{signingDate:G=new Date,signableHeaders:W,unsignableHeaders:X,signingRegion:Z,signingService:Y}={}){const L=await this.credentialProvider();this.validateResolvedCredentials(L);const w=Z??await this.regionProvider(),Q=cU(U),{longDate:z,shortDate:F}=U$(G),J=W$(F,w,Y??this.service);if(Q.headers[LZ]=z,L.sessionToken)Q.headers[fF]=L.sessionToken;const I=await Z$(Q,this.sha256);if(!uF(hU,Q.headers)&&this.applyChecksum)Q.headers[hU]=I;const K=xU(Q,X,W),V=await this.getSignature(z,J,this.getSigningKey(L,w,F,Y),this.createCanonicalRequest(Q,K,I));return Q.headers[YZ]=`${DU} Credential=${L.accessKeyId}/${J}, SignedHeaders=${UZ(K)}, Signature=${V}`,Q}createCanonicalRequest(U,G,W){const X=Object.keys(G).sort();return`${U.method}
|
|
10
|
-
${this.getCanonicalPath(U)}
|
|
11
|
-
${zZ(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(bU.toUint8Array(W));const Z=await X.digest();return`${DU}
|
|
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 X$.escapeUri(W).replace(/%2F/g,"/")}return U}async getSignature(U,G,W,X){const Z=await this.createStringToSign(U,G,X),Y=new this.sha256(await W);return Y.update(bU.toUint8Array(Z)),L0.toHex(await Y.digest())}getSigningKey(U,G,W,X){return QZ(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")}};k(MZ,"SignatureV4");var dF=MZ,U$=k(($)=>{const U=_F($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),UZ=k(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var NZ=R((PA,qZ)=>{var{defineProperty:L$,getOwnPropertyDescriptor:pF,getOwnPropertyNames:lF}=Object,sF=Object.prototype.hasOwnProperty,x=($,U)=>L$($,"name",{value:U,configurable:!0}),mF=($,U)=>{for(var G in U)L$($,G,{get:U[G],enumerable:!0})},nF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of lF(U))if(!sF.call($,X)&&X!==G)L$($,X,{get:()=>U[X],enumerable:!(W=pF(U,X))||W.enumerable})}return $},iF=($)=>nF(L$({},"__esModule",{value:!0}),$),TZ={};mF(TZ,{AWSSDKSigV4Signer:()=>tF,AwsSdkSigV4ASigner:()=>$J,AwsSdkSigV4Signer:()=>_U,NODE_SIGV4A_CONFIG_OPTIONS:()=>WJ,resolveAWSSDKSigV4Config:()=>XJ,resolveAwsSdkSigV4AConfig:()=>GJ,resolveAwsSdkSigV4Config:()=>CZ,validateSigningProperties:()=>uU});qZ.exports=iF(TZ);var rF=t(),oF=t(),VZ=x(($)=>{var U,G;return oF.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((G=$.headers)==null?void 0:G.Date):void 0},"getDateHeader"),yU=x(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),aF=x(($,U)=>Math.abs(yU(U).getTime()-$)>=300000,"isClockSkewed"),HZ=x(($,U)=>{const G=Date.parse($);if(aF(G,U))return G-Date.now();return U},"getUpdatedSystemClockOffset"),$1=x(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),uU=x(async($)=>{var U,G,W;const X=$1("context",$.context),Z=$1("config",$.config),Y=(W=(G=(U=X.endpointV2)==null?void 0:U.properties)==null?void 0:G.authSchemes)==null?void 0:W[0],w=await $1("signer",Z.signer)(Y),Q=$==null?void 0:$.signingRegion,z=$==null?void 0:$.signingRegionSet,F=$==null?void 0:$.signingName;return{config:Z,signer:w,signingRegion:Q,signingRegionSet:z,signingName:F}},"validateSigningProperties"),OZ=class ${async sign(U,G,W){var X;if(!rF.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const Z=await uU(W),{config:Y,signer:L}=Z;let{signingRegion:w,signingName:Q}=Z;const z=W.context;if(((X=z==null?void 0:z.authSchemes)==null?void 0:X.length)??0>1){const[J,I]=z.authSchemes;if((J==null?void 0:J.name)==="sigv4a"&&(I==null?void 0:I.name)==="sigv4")w=(I==null?void 0:I.signingRegion)??w,Q=(I==null?void 0:I.signingName)??Q}return await L.sign(U,{signingDate:yU(Y.systemClockOffset),signingRegion:w,signingService:Q})}errorHandler(U){return(G)=>{const W=G.ServerTime??VZ(G.$response);if(W){const X=$1("config",U.config),Z=X.systemClockOffset;if(X.systemClockOffset=HZ(W,X.systemClockOffset),X.systemClockOffset!==Z&&G.$metadata)G.$metadata.clockSkewCorrected=!0}throw G}}successHandler(U,G){const W=VZ(U);if(W){const X=$1("config",G.config);X.systemClockOffset=HZ(W,X.systemClockOffset)}}};x(OZ,"AwsSdkSigV4Signer");var _U=OZ,tF=_U,eF=t(),fZ=class $ extends _U{async sign(U,G,W){var X;if(!eF.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:Z,signer:Y,signingRegion:L,signingRegionSet:w,signingName:Q}=await uU(W),F=(await((X=Z.sigv4aSigningRegionSet)==null?void 0:X.call(Z))??w??[L]).join(",");return await Y.sign(U,{signingDate:yU(Z.systemClockOffset),signingRegion:F,signingService:Q})}};x(fZ,"AwsSdkSigV4ASigner");var $J=fZ,UJ=FU(),AZ=B$(),GJ=x(($)=>{return $.sigv4aSigningRegionSet=UJ.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),WJ={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new AZ.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 AZ.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},H0=FU(),EZ=BZ(),CZ=x(($)=>{let U;if($.credentials)U=H0.memoizeIdentityProvider($.credentials,H0.isIdentityExpired,H0.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=H0.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=x(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:G=!0,systemClockOffset:W=$.systemClockOffset||0,sha256:X}=$;let Z;if($.signer)Z=H0.normalizeProvider($.signer);else if($.regionInfoProvider)Z=x(()=>H0.normalizeProvider($.region)().then(async(Y)=>[await $.regionInfoProvider(Y,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},Y]).then(([Y,L])=>{const{signingRegion:w,signingService:Q}=Y;$.signingRegion=$.signingRegion||w||L,$.signingName=$.signingName||Q||$.serviceId;const z={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:X,uriEscapePath:G};return new($.signerConstructor||EZ.SignatureV4)(z)}),"signer");else Z=x(async(Y)=>{Y=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await H0.normalizeProvider($.region)(),properties:{}},Y);const{signingRegion:L,signingName:w}=Y;$.signingRegion=$.signingRegion||L,$.signingName=$.signingName||w||$.serviceId;const Q={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:X,uriEscapePath:G};return new($.signerConstructor||EZ.SignatureV4)(Q)},"signer");return{...$,systemClockOffset:W,signingEscapePath:G,credentials:U,signer:Z}},"resolveAwsSdkSigV4Config"),XJ=CZ});var w$=R((QJ)=>{var ZJ=":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",jZ="[: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]["+ZJ+"]*",YJ=new RegExp("^"+jZ+"$"),LJ=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 Y=0;Y<Z;Y++)X.push(W[Y]);G.push(X),W=U.exec($)}return G},wJ=function($){const U=YJ.exec($);return!(U===null||typeof U==="undefined")};QJ.isExist=function($){return typeof $!=="undefined"};QJ.isEmptyObject=function($){return Object.keys($).length===0};QJ.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]]}};QJ.getValue=function($){if(QJ.isExist($))return $;else return""};QJ.isName=wJ;QJ.getAllMatches=LJ;QJ.nameRegexp=jZ});var dU=R((CJ)=>{var SZ=function($){return $===" "||$==="\t"||$==="\n"||$==="\r"},kZ=function($,U){const G=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const W=$.substr(G,U-G);if(U>5&&W==="xml")return j("InvalidXml","XML declaration allowed only at the start of the document.",D($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U},bZ=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},HJ=function($,U){let G="",W="",X=!1;for(;U<$.length;U++){if($[U]===BJ||$[U]===VJ)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}},DZ=function($,U){const G=gU.getAllMatches($,AJ),W={};for(let X=0;X<G.length;X++){if(G[X][1].length===0)return j("InvalidAttr","Attribute '"+G[X][2]+"' has no space in starting.",U1(G[X]));else if(G[X][3]!==void 0&&G[X][4]===void 0)return j("InvalidAttr","Attribute '"+G[X][2]+"' is without value.",U1(G[X]));else if(G[X][3]===void 0&&!U.allowBooleanAttributes)return j("InvalidAttr","boolean attribute '"+G[X][2]+"' is not allowed.",U1(G[X]));const Z=G[X][2];if(!OJ(Z))return j("InvalidAttr","Attribute '"+Z+"' is an invalid name.",U1(G[X]));if(!W.hasOwnProperty(Z))W[Z]=1;else return j("InvalidAttr","Attribute '"+Z+"' is repeated.",U1(G[X]))}return!0},EJ=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},TJ=function($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,EJ($,U);let G=0;for(;U<$.length;U++,G++){if($[U].match(/\w/)&&G<20)continue;if($[U]===";")break;return-1}return U},j=function($,U,G){return{err:{code:$,msg:U,line:G.line||G,col:G.col}}},OJ=function($){return gU.isName($)},fJ=function($){return gU.isName($)},D=function($,U){const G=$.substring(0,U).split(/\r?\n/);return{line:G.length,col:G[G.length-1].length+1}},U1=function($){return $.startIndex+$[1].length},gU=w$(),RJ={allowBooleanAttributes:!1,unpairedTags:[]};CJ.validate=function($,U){U=Object.assign({},RJ,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=kZ($,Z),Z.err)return Z}else if($[Z]==="<"){let Y=Z;if(Z++,$[Z]==="!"){Z=bZ($,Z);continue}else{let L=!1;if($[Z]==="/")L=!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(!fJ(w)){let F;if(w.trim().length===0)F="Invalid space after '<'.";else F="Tag '"+w+"' is an invalid name.";return j("InvalidTag",F,D($,Z))}const Q=HJ($,Z);if(Q===!1)return j("InvalidAttr","Attributes for '"+w+"' have open quote.",D($,Z));let z=Q.value;if(Z=Q.index,z[z.length-1]==="/"){const F=Z-z.length;z=z.substring(0,z.length-1);const J=DZ(z,U);if(J===!0)W=!0;else return j(J.err.code,J.err.msg,D($,F+J.err.line))}else if(L)if(!Q.tagClosed)return j("InvalidTag","Closing tag '"+w+"' doesn't have proper closing.",D($,Z));else if(z.trim().length>0)return j("InvalidTag","Closing tag '"+w+"' can't have attributes or invalid starting.",D($,Y));else if(G.length===0)return j("InvalidTag","Closing tag '"+w+"' has not been opened.",D($,Y));else{const F=G.pop();if(w!==F.tagName){let J=D($,F.tagStartPos);return j("InvalidTag","Expected closing tag '"+F.tagName+"' (opened in line "+J.line+", col "+J.col+") instead of closing tag '"+w+"'.",D($,Y))}if(G.length==0)X=!0}else{const F=DZ(z,U);if(F!==!0)return j(F.err.code,F.err.msg,D($,Z-z.length+F.err.line));if(X===!0)return j("InvalidXml","Multiple possible root nodes found.",D($,Z));else if(U.unpairedTags.indexOf(w)!==-1);else G.push({tagName:w,tagStartPos:Y});W=!0}for(Z++;Z<$.length;Z++)if($[Z]==="<")if($[Z+1]==="!"){Z++,Z=bZ($,Z);continue}else if($[Z+1]==="?"){if(Z=kZ($,++Z),Z.err)return Z}else break;else if($[Z]==="&"){const F=TJ($,Z);if(F==-1)return j("InvalidChar","char '&' is not expected.",D($,Z));Z=F}else if(X===!0&&!SZ($[Z]))return j("InvalidXml","Extra text at the end",D($,Z));if($[Z]==="<")Z--}}else{if(SZ($[Z]))continue;return j("InvalidChar","char '"+$[Z]+"' is not expected.",D($,Z))}if(!W)return j("InvalidXml","Start tag expected.",1);else if(G.length==1)return j("InvalidTag","Unclosed tag '"+G[0].tagName+"'.",D($,G[0].tagStartPos));else if(G.length>0)return j("InvalidXml","Invalid '"+JSON.stringify(G.map((Z)=>Z.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var BJ='"',VJ="'",AJ=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var xZ=R((jJ)=>{var hZ={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 $}},NJ=function($){return Object.assign({},hZ,$)};jJ.buildOptions=NJ;jJ.defaultOptions=hZ});var yZ=R((DA,cZ)=>{class vZ{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})}}cZ.exports=vZ});var _Z=R((hA,uZ)=>{var bJ=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,Y="";for(;U<$.length;U++)if($[U]==="<"&&!Z){if(X&&xJ($,U)){if(U+=7,[entityName,val,U]=DJ($,U+1),val.indexOf("&")===-1)G[uJ(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(X&&vJ($,U))U+=8;else if(X&&cJ($,U))U+=8;else if(X&&yJ($,U))U+=9;else if(hJ)Z=!0;else throw new Error("Invalid DOCTYPE");W++,Y=""}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 Y+=$[U];if(W!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:G,i:U}},DJ=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]},hJ=function($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1},xJ=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},vJ=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},cJ=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},yJ=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},uJ=function($){if(kJ.isName($))return $;else throw new Error(`Invalid entity name ${$}`)},kJ=w$();uZ.exports=bJ});var dZ=R((xA,gZ)=>{var pJ=function($,U={}){if(U=Object.assign({},dJ,U),!$||typeof $!=="string")return $;let G=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(G))return $;else if(U.hex&&_J.test(G))return Number.parseInt(G,16);else{const W=gJ.exec(G);if(W){const X=W[1],Z=W[2];let Y=lJ(W[3]);const L=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),Q=""+w;if(Q.search(/[eE]/)!==-1)if(U.eNotation)return w;else return $;else if(L)if(U.eNotation)return w;else return $;else if(G.indexOf(".")!==-1)if(Q==="0"&&Y==="")return w;else if(Q===Y)return w;else if(X&&Q==="-"+Y)return w;else return $;if(Z)if(Y===Q)return w;else if(X+Y===Q)return w;else return $;if(G===Q)return w;else if(G===X+Q)return w;return $}}else return $}},lJ=function($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $},_J=/^[-+]?0x[a-fA-F0-9]+$/,gJ=/^([\-\+])?(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 dJ={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};gZ.exports=pJ});var mZ=R((vA,sZ)=>{var nJ=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]}}},iJ=function($,U,G,W,X,Z,Y){if($!==void 0){if(this.options.trimValues&&!W)$=$.trim();if($.length>0){if(!Y)$=this.replaceEntitiesValue($);const L=this.options.tagValueProcessor(U,$,G,X,Z);if(L===null||L===void 0)return $;else if(typeof L!==typeof $||L!==$)return L;else if(this.options.trimValues)return lU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return lU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}},rJ=function($){if(this.options.removeNSPrefix){const U=$.split(":"),G=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=G+U[1]}return $},aJ=function($,U,G){if(!this.options.ignoreAttributes&&typeof $==="string"){const W=pZ.getAllMatches($,oJ),X=W.length,Z={};for(let Y=0;Y<X;Y++){const L=this.resolveNameSpace(W[Y][1]);let w=W[Y][4],Q=this.options.attributeNamePrefix+L;if(L.length){if(this.options.transformAttributeName)Q=this.options.transformAttributeName(Q);if(Q==="__proto__")Q="#__proto__";if(w!==void 0){if(this.options.trimValues)w=w.trim();w=this.replaceEntitiesValue(w);const z=this.options.attributeValueProcessor(L,w,U);if(z===null||z===void 0)Z[Q]=w;else if(typeof z!==typeof w||z!==w)Z[Q]=z;else Z[Q]=lU(w,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)Z[Q]=!0}}if(!Object.keys(Z).length)return;if(this.options.attributesGroupName){const Y={};return Y[this.options.attributesGroupName]=Z,Y}return Z}},eJ=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)},U3=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 $},G3=function($,U,G){const W="*."+G;for(let X in $){const Z=$[X];if(W===Z||U===Z)return!0}return!1},W3=function($,U,G=">"){let W,X="";for(let Z=U;Z<$.length;Z++){let Y=$[Z];if(W){if(Y===W)W=""}else if(Y==='"'||Y==="'")W=Y;else if(Y===G[0])if(G[1]){if($[Z+1]===G[1])return{data:X,index:Z}}else return{data:X,index:Z};else if(Y==="\t")Y=" ";X+=Y}},A0=function($,U,G,W){const X=$.indexOf(U,G);if(X===-1)throw new Error(W);else return X+U.length-1},pU=function($,U,G,W=">"){const X=W3($,U+1,W);if(!X)return;let Z=X.data;const Y=X.index,L=Z.search(/\s/);let w=Z,Q=!0;if(L!==-1)w=Z.substring(0,L),Z=Z.substring(L+1).trimStart();const z=w;if(G){const F=w.indexOf(":");if(F!==-1)w=w.substr(F+1),Q=w!==X.data.substr(F+1)}return{tagName:w,tagExp:Z,closeIndex:Y,attrExpPresent:Q,rawTagName:z}},X3=function($,U,G){const W=G;let X=1;for(;G<$.length;G++)if($[G]==="<")if($[G+1]==="/"){const Z=A0($,">",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=A0($,"?>",G+1,"StopNode is not closed.");else if($.substr(G+1,3)==="!--")G=A0($,"-->",G+3,"StopNode is not closed.");else if($.substr(G+1,2)==="![")G=A0($,"]]>",G,"StopNode is not closed.")-2;else{const Z=pU($,G,">");if(Z){if((Z&&Z.tagName)===U&&Z.tagExp[Z.tagExp.length-1]!=="/")X++;G=Z.closeIndex}}},lU=function($,U,G){if(U&&typeof $==="string"){const W=$.trim();if(W==="true")return!0;else if(W==="false")return!1;else return mJ($,G)}else if(pZ.isExist($))return $;else return""},pZ=w$(),G1=yZ(),sJ=_Z(),mJ=dZ();class lZ{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=nJ,this.parseXml=tJ,this.parseTextData=iJ,this.resolveNameSpace=rJ,this.buildAttributesMap=aJ,this.isItStopNode=G3,this.replaceEntitiesValue=$3,this.readStopNodeData=X3,this.saveTextToParentTag=U3,this.addChild=eJ}}var oJ=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),tJ=function($){$=$.replace(/\r\n?/g,"\n");const U=new G1("!xml");let G=U,W="",X="";for(let Z=0;Z<$.length;Z++)if($[Z]==="<")if($[Z+1]==="/"){const L=A0($,">",Z,"Closing Tag is not closed.");let w=$.substring(Z+2,L).trim();if(this.options.removeNSPrefix){const F=w.indexOf(":");if(F!==-1)w=w.substr(F+1)}if(this.options.transformTagName)w=this.options.transformTagName(w);if(G)W=this.saveTextToParentTag(W,G,X);const Q=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 z=0;if(Q&&this.options.unpairedTags.indexOf(Q)!==-1)z=X.lastIndexOf(".",X.lastIndexOf(".")-1),this.tagsNodeStack.pop();else z=X.lastIndexOf(".");X=X.substring(0,z),G=this.tagsNodeStack.pop(),W="",Z=L}else if($[Z+1]==="?"){let L=pU($,Z,!1,"?>");if(!L)throw new Error("Pi Tag is not closed.");if(W=this.saveTextToParentTag(W,G,X),this.options.ignoreDeclaration&&L.tagName==="?xml"||this.options.ignorePiTags);else{const w=new G1(L.tagName);if(w.add(this.options.textNodeName,""),L.tagName!==L.tagExp&&L.attrExpPresent)w[":@"]=this.buildAttributesMap(L.tagExp,X,L.tagName);this.addChild(G,w,X)}Z=L.closeIndex+1}else if($.substr(Z+1,3)==="!--"){const L=A0($,"-->",Z+4,"Comment is not closed.");if(this.options.commentPropName){const w=$.substring(Z+4,L-2);W=this.saveTextToParentTag(W,G,X),G.add(this.options.commentPropName,[{[this.options.textNodeName]:w}])}Z=L}else if($.substr(Z+1,2)==="!D"){const L=sJ($,Z);this.docTypeEntities=L.entities,Z=L.i}else if($.substr(Z+1,2)==="!["){const L=A0($,"]]>",Z,"CDATA is not closed.")-2,w=$.substring(Z+9,L);W=this.saveTextToParentTag(W,G,X);let Q=this.parseTextData(w,G.tagname,X,!0,!1,!0,!0);if(Q==null)Q="";if(this.options.cdataPropName)G.add(this.options.cdataPropName,[{[this.options.textNodeName]:w}]);else G.add(this.options.textNodeName,Q);Z=L+2}else{let L=pU($,Z,this.options.removeNSPrefix),w=L.tagName;const Q=L.rawTagName;let{tagExp:z,attrExpPresent:F,closeIndex:J}=L;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 K="";if(z.length>0&&z.lastIndexOf("/")===z.length-1){if(w[w.length-1]==="/")w=w.substr(0,w.length-1),X=X.substr(0,X.length-1),z=w;else z=z.substr(0,z.length-1);Z=L.closeIndex}else if(this.options.unpairedTags.indexOf(w)!==-1)Z=L.closeIndex;else{const B=this.readStopNodeData($,Q,J+1);if(!B)throw new Error(`Unexpected end of ${Q}`);Z=B.i,K=B.tagContent}const V=new G1(w);if(w!==z&&F)V[":@"]=this.buildAttributesMap(z,X,w);if(K)K=this.parseTextData(K,w,X,!0,F,!0,!0);X=X.substr(0,X.lastIndexOf(".")),V.add(this.options.textNodeName,K),this.addChild(G,V,X)}else{if(z.length>0&&z.lastIndexOf("/")===z.length-1){if(w[w.length-1]==="/")w=w.substr(0,w.length-1),X=X.substr(0,X.length-1),z=w;else z=z.substr(0,z.length-1);if(this.options.transformTagName)w=this.options.transformTagName(w);const K=new G1(w);if(w!==z&&F)K[":@"]=this.buildAttributesMap(z,X,w);this.addChild(G,K,X),X=X.substr(0,X.lastIndexOf("."))}else{const K=new G1(w);if(this.tagsNodeStack.push(G),w!==z&&F)K[":@"]=this.buildAttributesMap(z,X,w);this.addChild(G,K,X),G=K}W="",Z=J}}else W+=$[Z];return U.child},$3=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 $};sZ.exports=lZ});var iZ=R((Q3)=>{var Z3=function($,U){return nZ($,U)},nZ=function($,U,G){let W;const X={};for(let Z=0;Z<$.length;Z++){const Y=$[Z],L=Y3(Y);let w="";if(G===void 0)w=L;else w=G+"."+L;if(L===U.textNodeName)if(W===void 0)W=Y[L];else W+=""+Y[L];else if(L===void 0)continue;else if(Y[L]){let Q=nZ(Y[L],U,w);const z=w3(Q,U);if(Y[":@"])L3(Q,Y[":@"],w,U);else if(Object.keys(Q).length===1&&Q[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)Q=Q[U.textNodeName];else if(Object.keys(Q).length===0)if(U.alwaysCreateTextNode)Q[U.textNodeName]="";else Q="";if(X[L]!==void 0&&X.hasOwnProperty(L)){if(!Array.isArray(X[L]))X[L]=[X[L]];X[L].push(Q)}else if(U.isArray(L,w,z))X[L]=[Q];else X[L]=Q}}if(typeof W==="string"){if(W.length>0)X[U.textNodeName]=W}else if(W!==void 0)X[U.textNodeName]=W;return X},Y3=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(W!==":@")return W}},L3=function($,U,G,W){if(U){const X=Object.keys(U),Z=X.length;for(let Y=0;Y<Z;Y++){const L=X[Y];if(W.isArray(L,G+"."+L,!0,!0))$[L]=[U[L]];else $[L]=U[L]}}},w3=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};Q3.prettify=Z3});var aZ=R((yA,oZ)=>{var{buildOptions:F3}=xZ(),J3=mZ(),{prettify:I3}=iZ(),K3=dU();class rZ{constructor($){this.externalEntities={},this.options=F3($)}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=K3.validate($,U);if(X!==!0)throw Error(`${X.err.msg}:${X.err.line}:${X.err.col}`)}const G=new J3(this.options);G.addExternalEntities(this.externalEntities);const W=G.parseXml($);if(this.options.preserveOrder||W===void 0)return W;else return I3(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}}oZ.exports=rZ});var GY=R((uA,UY)=>{var M3=function($,U){let G="";if(U.format&&U.indentBy.length>0)G="\n";return eZ($,U,"",G)},eZ=function($,U,G,W){let X="",Z=!1;for(let Y=0;Y<$.length;Y++){const L=$[Y],w=R3(L);if(w===void 0)continue;let Q="";if(G.length===0)Q=w;else Q=`${G}.${w}`;if(w===U.textNodeName){let K=L[w];if(!B3(Q,U))K=U.tagValueProcessor(w,K),K=$Y(K,U);if(Z)X+=W;X+=K,Z=!1;continue}else if(w===U.cdataPropName){if(Z)X+=W;X+=`<![CDATA[${L[w][0][U.textNodeName]}]]>`,Z=!1;continue}else if(w===U.commentPropName){X+=W+`<!--${L[w][0][U.textNodeName]}-->`,Z=!0;continue}else if(w[0]==="?"){const K=tZ(L[":@"],U),V=w==="?xml"?"":W;let B=L[w][0][U.textNodeName];B=B.length!==0?" "+B:"",X+=V+`<${w}${B}${K}?>`,Z=!0;continue}let z=W;if(z!=="")z+=U.indentBy;const F=tZ(L[":@"],U),J=W+`<${w}${F}`,I=eZ(L[w],U,Q,z);if(U.unpairedTags.indexOf(w)!==-1)if(U.suppressUnpairedNode)X+=J+">";else X+=J+"/>";else if((!I||I.length===0)&&U.suppressEmptyNode)X+=J+"/>";else if(I&&I.endsWith(">"))X+=J+`>${I}${W}</${w}>`;else{if(X+=J+">",I&&W!==""&&(I.includes("/>")||I.includes("</")))X+=W+U.indentBy+I+W;else X+=I;X+=`</${w}>`}Z=!0}return X},R3=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}},tZ=function($,U){let G="";if($&&!U.ignoreAttributes)for(let W in $){if(!$.hasOwnProperty(W))continue;let X=U.attributeValueProcessor(W,$[W]);if(X=$Y(X,U),X===!0&&U.suppressBooleanAttributes)G+=` ${W.substr(U.attributeNamePrefix.length)}`;else G+=` ${W.substr(U.attributeNamePrefix.length)}="${X}"`}return G},B3=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},$Y=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 $};UY.exports=M3});var XY=R((_A,WY)=>{var w0=function($){if(this.options=Object.assign({},H3,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=T3;if(this.processTextOrObjNode=A3,this.options.format)this.indentate=E3,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},A3=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)},E3=function($){return this.options.indentBy.repeat($)},T3=function($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1},V3=GY(),H3={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};w0.prototype.build=function($){if(this.options.preserveOrder)return V3($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};w0.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 Y=this.options.tagValueProcessor(X,""+$[X]);W+=this.replaceEntitiesValue(Y)}else W+=this.buildTextValNode($[X],X,"",U)}else if(Array.isArray($[X])){const Z=$[X].length;let Y="",L="";for(let w=0;w<Z;w++){const Q=$[X][w];if(typeof Q==="undefined");else if(Q===null)if(X[0]==="?")W+=this.indentate(U)+"<"+X+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+X+"/"+this.tagEndChar;else if(typeof Q==="object")if(this.options.oneListGroup){const z=this.j2x(Q,U+1);if(Y+=z.val,this.options.attributesGroupName&&Q.hasOwnProperty(this.options.attributesGroupName))L+=z.attrStr}else Y+=this.processTextOrObjNode(Q,X,U);else if(this.options.oneListGroup){let z=this.options.tagValueProcessor(X,Q);z=this.replaceEntitiesValue(z),Y+=z}else Y+=this.buildTextValNode(Q,X,"",U)}if(this.options.oneListGroup)Y=this.buildObjectNode(Y,X,L,U);W+=Y}else if(this.options.attributesGroupName&&X===this.options.attributesGroupName){const Z=Object.keys($[X]),Y=Z.length;for(let L=0;L<Y;L++)G+=this.buildAttrPairStr(Z[L],""+$[X][Z[L]])}else W+=this.processTextOrObjNode($[X],X,U)}return{attrStr:G,val:W}};w0.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};w0.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}};w0.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};w0.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}};w0.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 $};WY.exports=w0});var YY=R((gA,ZY)=>{var O3=dU(),f3=aZ(),C3=XY();ZY.exports={XMLParser:f3,XMLValidator:O3,XMLBuilder:C3}});var JY=R((dA,FY)=>{var{defineProperty:Q$,getOwnPropertyDescriptor:q3,getOwnPropertyNames:N3}=Object,j3=Object.prototype.hasOwnProperty,v=($,U)=>Q$($,"name",{value:U,configurable:!0}),P3=($,U)=>{for(var G in U)Q$($,G,{get:U[G],enumerable:!0})},S3=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of N3(U))if(!j3.call($,X)&&X!==G)Q$($,X,{get:()=>U[X],enumerable:!(W=q3(U,X))||W.enumerable})}return $},k3=($)=>S3(Q$({},"__esModule",{value:!0}),$),LY={};P3(LY,{_toBool:()=>D3,_toNum:()=>h3,_toStr:()=>b3,awsExpectUnion:()=>v3,loadRestJsonErrorCode:()=>u3,loadRestXmlErrorCode:()=>p3,parseJsonBody:()=>QY,parseJsonErrorBody:()=>y3,parseXmlBody:()=>zY,parseXmlErrorBody:()=>d3});FY.exports=k3(LY);var b3=v(($)=>{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"),D3=v(($)=>{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"),h3=v(($)=>{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"),x3=j0(),v3=v(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return x3.expectUnion($)},"awsExpectUnion"),c3=j0(),wY=v(($,U)=>c3.collectBody($,U).then((G)=>U.utf8Encoder(G)),"collectBodyString"),QY=v(($,U)=>wY($,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"),y3=v(async($,U)=>{const G=await QY($,U);return G.message=G.message??G.Message,G},"parseJsonErrorBody"),u3=v(($,U)=>{const G=v((Z,Y)=>Object.keys(Z).find((L)=>L.toLowerCase()===Y.toLowerCase()),"findKey"),W=v((Z)=>{let Y=Z;if(typeof Y==="number")Y=Y.toString();if(Y.indexOf(",")>=0)Y=Y.split(",")[0];if(Y.indexOf(":")>=0)Y=Y.split(":")[0];if(Y.indexOf("#")>=0)Y=Y.split("#")[1];return Y},"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"),_3=j0(),g3=YY(),zY=v(($,U)=>wY($,U).then((G)=>{if(G.length){const W=new g3.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(w,Q)=>Q.trim()===""&&Q.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",Y=Object.keys(X)[0],L=X[Y];if(L[Z])L[Y]=L[Z],delete L[Z];return _3.getValueFromTextNode(L)}return{}}),"parseXmlBody"),d3=v(async($,U)=>{const G=await zY($,U);if(G.Error)G.Error.message=G.Error.message??G.Error.Message;return G},"parseXmlErrorBody"),p3=v(($,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 s3=R((W1)=>{Object.defineProperty(W1,"__esModule",{value:!0});var sU=l3();sU.__exportStar(aX(),W1);sU.__exportStar(NZ(),W1);sU.__exportStar(JY(),W1)});var i=y(R$(),1),TI=i.default.v1,OI=i.default.v3,pG=i.default.v4,fI=i.default.v5,CI=i.default.NIL,qI=i.default.version,NI=i.default.validate,jI=i.default.stringify,PI=i.default.parse;function bI($){return $}var yL=($)=>(U)=>async(G)=>{if(!u.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)},uL={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},DI=($)=>({applyToStack:(U)=>{U.add(yL($),uL)}});var _L=()=>($,U)=>async(G)=>{try{const W=await $(G),{clientName:X,commandName:Z,logger:Y,dynamoDbDocumentClientOptions:L={}}=U,{overrideInputFilterSensitiveLog:w,overrideOutputFilterSensitiveLog:Q}=L,z=w??U.inputFilterSensitiveLog,F=Q??U.outputFilterSensitiveLog,{$metadata:J,...I}=W.output;return Y?.info?.({clientName:X,commandName:Z,input:z(G.input),output:F(I),metadata:J}),W}catch(W){const{clientName:X,commandName:Z,logger:Y,dynamoDbDocumentClientOptions:L={}}=U,{overrideInputFilterSensitiveLog:w}=L,Q=w??U.inputFilterSensitiveLog;throw Y?.error?.({clientName:X,commandName:Z,input:Q(G.input),error:W,metadata:W.$metadata}),W}},gL={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},xI=($)=>({applyToStack:(U)=>{U.add(_L(),gL)}});var lG="X-Amzn-Trace-Id",dL="AWS_LAMBDA_FUNCTION_NAME",pL="_X_AMZN_TRACE_ID",lL=($)=>(U)=>async(G)=>{const{request:W}=G;if(!u.isInstance(W)||$.runtime!=="node"||W.headers.hasOwnProperty(lG))return U(G);const X=process.env[dL],Z=process.env[pL],Y=(L)=>typeof L==="string"&&L.length>0;if(Y(X)&&Y(Z))W.headers[lG]=Z;return U({...G,request:W})},sL={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},_I=($)=>({applyToStack:(U)=>{U.add(lL($),sL)}});function NK($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}class Ez{constructor({size:$,params:U}){if(this.data=new Map,this.parameters=[],this.capacity=$??50,U)this.parameters=U}get($,U){const G=this.hash($);if(G===!1)return U();if(!this.data.has(G)){if(this.data.size>this.capacity+10){const W=this.data.keys();let X=0;while(!0){const{value:Z,done:Y}=W.next();if(this.data.delete(Z),Y||++X>10)break}}this.data.set(G,U())}return this.data.get(G)}size(){return this.data.size}hash($){let U="";const{parameters:G}=this;if(G.length===0)return!1;for(let W of G){const X=String($[W]??"");if(X.includes("|;"))return!1;U+=X+"|;"}return U}}var Tz=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}$"),o0=($)=>Tz.test($)||$.startsWith("[")&&$.endsWith("]");var Oz=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),a0=($,U=!1)=>{if(!U)return Oz.test($);const G=$.split(".");for(let W of G)if(!a0(W))return!1;return!0};var t0={};var $0="endpoints";function d($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${d($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(d).join(", ")})`;return JSON.stringify($,null,2)}class f extends Error{constructor($){super($);this.name="EndpointError"}}var LX=($,U)=>$===U;var wX=($)=>{const U=$.split("."),G=[];for(let W of U){const X=W.indexOf("[");if(X!==-1){if(W.indexOf("]")!==W.length-1)throw new f(`Path: '${$}' does not end with ']'`);const Z=W.slice(X+1,-1);if(Number.isNaN(parseInt(Z)))throw new f(`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)=>wX(U).reduce((G,W)=>{if(typeof G!=="object")throw new f(`Index '${W}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(G))return G[parseInt(W)];return G[W]},$);var QX=($)=>$!=null;var zX=($)=>!$;var y1=y(E0(),1);var JU={[y1.EndpointURLScheme.HTTP]:80,[y1.EndpointURLScheme.HTTPS]:443},FX=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:J,port:I,protocol:K="",path:V="",query:B={}}=$,H=new URL(`${K}//${J}${I?`:${I}`:""}${V}`);return H.search=Object.entries(B).map(([A,E])=>`${A}=${E}`).join("&"),H}return new URL($)}catch(J){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const G=U.href,{host:W,hostname:X,pathname:Z,protocol:Y,search:L}=U;if(L)return null;const w=Y.slice(0,-1);if(!Object.values(y1.EndpointURLScheme).includes(w))return null;const Q=o0(X),z=G.includes(`${W}:${JU[w]}`)||typeof $==="string"&&$.includes(`${W}:${JU[w]}`),F=`${W}${z?`:${JU[w]}`:""}`;return{scheme:w,authority:F,path:Z,normalizedPath:Z.endsWith("/")?Z:`${Z}/`,isIp:Q}};var JX=($,U)=>$===U;var IX=($,U,G,W)=>{if(U>=G||$.length<G)return null;if(!W)return $.substring(U,G);return $.substring($.length-G,$.length-U)};var KX=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var MX={booleanEquals:LX,getAttr:c1,isSet:QX,isValidHostLabel:a0,not:zX,parseURL:FX,stringEquals:JX,substring:IX,uriEncode:KX};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 Y=$.indexOf("}",Z);if(Y===-1){G.push($.slice(Z));break}if($[Z+1]==="{"&&$[Y+1]==="}")G.push($.slice(Z+1,Y)),X=Y+2;const L=$.substring(Z+1,Y);if(L.includes("#")){const[w,Q]=L.split("#");G.push(c1(W[w],Q))}else G.push(W[L]);X=Y+1}return G.join("")};var RX=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var Z0=($,U,G)=>{if(typeof $==="string")return u1($,G);else if($.fn)return _1($,G);else if($.ref)return RX($,G);throw new f(`'${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:Z0(Z,"arg",G)),X=$.split(".");if(X[0]in t0&&X[1]!=null)return t0[X[0]][X[1]](...W);return MX[$](...W)};var BX=({assign:$,...U},G)=>{if($&&$ in G.referenceRecord)throw new f(`'${$}' is already defined in Reference Record.`);const W=_1(U,G);return G.logger?.debug?.(`${$0} evaluateCondition: ${d(U)} = ${d(W)}`),{result:W===""?!0:!!W,...$!=null&&{toAssign:{name:$,value:W}}}};var S0=($=[],U)=>{const G={};for(let W of $){const{result:X,toAssign:Z}=BX(W,{...U,referenceRecord:{...U.referenceRecord,...G}});if(!X)return{result:X};if(Z)G[Z.name]=Z.value,U.logger?.debug?.(`${$0} assign: ${Z.name} := ${d(Z.value)}`)}return{result:!0,referenceRecord:G}};var VX=($,U)=>Object.entries($).reduce((G,[W,X])=>({...G,[W]:X.map((Z)=>{const Y=Z0(Z,"Header value entry",U);if(typeof Y!=="string")throw new f(`Header '${W}' value '${Y}' is not a string`);return Y})}),{});var IU=($,U)=>{if(Array.isArray($))return $.map((G)=>IU(G,U));switch(typeof $){case"string":return u1($,U);case"object":if($===null)throw new f(`Unexpected endpoint property: ${$}`);return g1($,U);case"boolean":return $;default:throw new f(`Unexpected endpoint property type: ${typeof $}`)}};var g1=($,U)=>Object.entries($).reduce((G,[W,X])=>({...G,[W]:IU(X,U)}),{});var HX=($,U)=>{const G=Z0($,"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 f(`Endpoint URL must be a string, got ${typeof G}`)};var AX=($,U)=>{const{conditions:G,endpoint:W}=$,{result:X,referenceRecord:Z}=S0(G,U);if(!X)return;const Y={...U,referenceRecord:{...U.referenceRecord,...Z}},{url:L,properties:w,headers:Q}=W;return U.logger?.debug?.(`${$0} Resolving endpoint from template: ${d(W)}`),{...Q!=null&&{headers:VX(Q,Y)},...w!=null&&{properties:g1(w,Y)},url:HX(L,Y)}};var EX=($,U)=>{const{conditions:G,error:W}=$,{result:X,referenceRecord:Z}=S0(G,U);if(!X)return;throw new f(Z0(W,"Error",{...U,referenceRecord:{...U.referenceRecord,...Z}}))};var TX=($,U)=>{const{conditions:G,rules:W}=$,{result:X,referenceRecord:Z}=S0(G,U);if(!X)return;return d1(W,{...U,referenceRecord:{...U.referenceRecord,...Z}})};var d1=($,U)=>{for(let G of $)if(G.type==="endpoint"){const W=AX(G,U);if(W)return W}else if(G.type==="error")EX(G,U);else if(G.type==="tree"){const W=TX(G,U);if(W)return W}else throw new f(`Unknown endpoint rule: ${G}`);throw new f("Rules evaluation failed")};var fz=($,U)=>{const{endpointParams:G,logger:W}=U,{parameters:X,rules:Z}=$;U.logger?.debug?.(`${$0} Initial EndpointParams: ${d(G)}`);const Y=Object.entries(X).filter(([,Q])=>Q.default!=null).map(([Q,z])=>[Q,z.default]);if(Y.length>0)for(let[Q,z]of Y)G[Q]=G[Q]??z;const L=Object.entries(X).filter(([,Q])=>Q.required).map(([Q])=>Q);for(let Q of L)if(G[Q]==null)throw new f(`Missing required parameter: '${Q}'`);const w=d1(Z,{endpointParams:G,logger:W,referenceRecord:{}});return U.logger?.debug?.(`${$0} Resolved endpoint: ${d(w)}`),w};var KU=($,U=!1)=>{if(U){for(let G of $.split("."))if(!KU(G))return!1;return!0}if(!a0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(o0($))return!1;return!0};var OX=($)=>{const U=$.split(":");if(U.length<6)return null;const[G,W,X,Z,Y,...L]=U;if(G!=="arn"||W===""||X===""||L.join(":")==="")return null;const w=L.map((Q)=>Q.split("/")).flat();return{partition:W,service:X,region:Z,accountId:Y,resourceId:w}};var fX={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};var qz=fX,Nz="",CX=($)=>{const{partitions:U}=qz;for(let W of U){const{regions:X,outputs:Z}=W;for(let[Y,L]of Object.entries(X))if(Y===$)return{...Z,...L}}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 qX=()=>Nz;var jz={isVirtualHostableS3Bucket:KU,parseArn:OX,partition:CX};t0.aws=jz;var MU="user-agent",p1="x-amz-user-agent",RU=" ",l1="/",NX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,jX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,BU="-";var Pz=($)=>(U,G)=>async(W)=>{const{request:X}=W;if(!u.isInstance(X))return U(W);const{headers:Z}=X,Y=G?.userAgent?.map(VU)||[],L=(await $.defaultUserAgentProvider()).map(VU),w=$?.customUserAgent?.map(VU)||[],Q=qX(),z=(Q?[Q]:[]).concat([...L,...Y,...w]).join(RU),F=[...L.filter((J)=>J.startsWith("aws-sdk-")),...w].join(RU);if($.runtime!=="browser"){if(F)Z[p1]=Z[p1]?`${Z[MU]} ${F}`:F;Z[MU]=z}else Z[p1]=z;return U({...W,request:X})},VU=($)=>{const U=$[0].split(l1).map((Y)=>Y.replace(NX,BU)).join(l1),G=$[1]?.replace(jX,BU),W=U.indexOf(l1),X=U.substring(0,W);let Z=U.substring(W+1);if(X==="api")Z=Z.toLowerCase();return[X,Z,G].filter((Y)=>Y&&Y.length>0).reduce((Y,L,w)=>{switch(w){case 0:return L;case 1:return`${Y}/${L}`;default:return`${Y}#${L}`}},"")},Sz={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},wB=($)=>({applyToStack:(U)=>{U.add(Pz($),Sz)}});var s1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var HU=($)=>s1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var VB=($)=>{const{region:U,useFipsEndpoint:G}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return HU(U);const W=await U();return HU(W)},useFipsEndpoint:async()=>{const W=typeof U==="string"?U:await U();if(s1(W))return!0;return typeof G!=="function"?Promise.resolve(!!G):G()}}};var k0=($,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 Y0;(function($){$.ENV="env",$.CONFIG="shared config entry"})(Y0||(Y0={}));var kz="AWS_USE_DUALSTACK_ENDPOINT",bz="use_dualstack_endpoint";var jB={environmentVariableSelector:($)=>k0($,kz,Y0.ENV),configFileSelector:($)=>k0($,bz,Y0.CONFIG),default:!1};var Dz="AWS_USE_FIPS_ENDPOINT",hz="use_fips_endpoint";var kB={environmentVariableSelector:($)=>k0($,Dz,Y0.ENV),configFileSelector:($)=>k0($,hz,Y0.CONFIG),default:!1};var xz=y(r(),1);var vz=y(r(),1);var PX={environmentVariableSelector:($)=>$["AWS_REGION"],configFileSelector:($)=>$["region"],default:()=>{throw new Error("Region is missing")}},pB={preferredFile:"credentials"};function cz($){return(U)=>async(G)=>{const W=G.request;if(u.isInstance(W)){const{body:X,headers:Z}=W;if(X&&Object.keys(Z).map((Y)=>Y.toLowerCase()).indexOf(SX)===-1)try{const Y=$(X);W.headers={...W.headers,[SX]:String(Y)}}catch(Y){}}return U({...G,request:W})}}var SX="content-length",yz={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},RV=($)=>({applyToStack:(U)=>{U.add(cz($.bodyLengthChecker),yz)}});var kX=($,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 bX=($,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 Y=await U(X.input,{...$,endpoint:Z});return G({...X,request:Y})};function TV($,U,G){return{applyToStack:(W)=>{W.add(kX($,G),uz),W.add(bX($,U),AU)}}}var uz={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},AU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var uX=y(r(),1);var DX=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(lz(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!pz(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},_z=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,gz=/(\d+\.){3}\d+/,dz=/\.\./;var pz=($)=>_z.test($)&&!gz.test($)&&!dz.test($),lz=($)=>{const[U,G,W,,,X]=$.split(":"),Z=U==="arn"&&$.split(":").length>=6,Y=Boolean(Z&&G&&W&&X);if(Z&&!Y)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return Y};var hX=($,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:Y,port:L,path:w}=X;return`${Z}//${Y}${L?":"+L:""}${w}`}}return X};return W};var xX="AWS_ENDPOINT_URL",vX="endpoint_url",cX=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((Z)=>Z.toUpperCase()),W=U[[xX,...G].join("_")];if(W)return W;const X=U[xX];if(X)return X;return},configFileSelector:(U,G)=>{if(G&&U.services){const X=G[["services",U.services].join(EU)];if(X){const Z=$.split(" ").map((L)=>L.toLowerCase()),Y=X[[Z.join("_"),vX].join(EU)];if(Y)return Y}}const W=U[vX];if(W)return W;return},default:void 0});var m1=async($)=>R0(cX($??""))();var TU=y(x8(),1),n1=($)=>{if(typeof $==="object"){if("url"in $)return TU.parseUrl($.url);return $}return TU.parseUrl($)};var yX=async($,U,G,W)=>{if(!G.endpoint){let Y;if(G.serviceConfiguredEndpoint)Y=await G.serviceConfiguredEndpoint();else Y=await m1(G.serviceId);if(Y)G.endpoint=()=>Promise.resolve(n1(Y))}const X=await sz($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(X,W)},sz=async($,U,G)=>{const W={},X=U?.getEndpointParameterInstructions?.()||{};for(let[Z,Y]of Object.entries(X))switch(Y.type){case"staticContextParams":W[Z]=Y.value;break;case"contextParams":W[Z]=$[Y.name];break;case"clientContextParams":case"builtInParams":W[Z]=await hX(Y.name,Z,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(Y))}if(Object.keys(X).length===0)Object.assign(W,G);if(String(G.serviceId).toLowerCase()==="s3")await DX(W);return W};var _X=({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 Y=W.authSchemes?.[0];if(Y){W.signing_region=Y.signingRegion,W.signing_service=Y.signingName;const w=uX.getSmithyContext(W)?.selectedHttpAuthScheme?.httpAuthOption;if(w)w.signingProperties=Object.assign(w.signingProperties||{},{signing_region:Y.signingRegion,signingRegion:Y.signingRegion,signing_service:Y.signingName,signingName:Y.signingName,signingRegionSet:Y.signingRegionSet},Y.properties)}return G({...X})}};var mz={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:AU.name},nV=($,U)=>({applyToStack:(G)=>{G.addRelativeTo(_X({config:$,instructions:U}),mz)}});var i1=y(r(),1);var aV=($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>n1(await i1.normalizeProvider(G)()):void 0,Z={...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:i1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:i1.normalizeProvider($.useFipsEndpoint??!1)};let Y=void 0;return Z.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!Y)Y=m1($.serviceId);return Y},Z};var PU=y(r(),1);var n;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(n||(n={}));var B0=3,gX=n.STANDARD;var dX=y(J0(),1);class r1{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(),dX.isThrottlingError($)){const W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),U=this.cubicThrottle(W),this.enableTokenBucket()}else this.calculateTimeWindow(),U=this.cubicSuccess(this.getCurrentTimeInSeconds());const G=Math.min(U,2*this.measuredTxRate);this.updateTokenBucketRate(G)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle($){return this.getPrecise($*this.beta)}cubicSuccess($){return this.getPrecise(this.scaleConstant*Math.pow($-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate($){this.refillTokenBucket(),this.fillRate=Math.max($,this.minFillRate),this.maxCapacity=Math.max($,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const $=this.getCurrentTimeInSeconds(),U=Math.floor($*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){const G=this.requestCount/(U-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=U}}getPrecise($){return parseFloat($.toFixed(8))}}var V0=100,e0=20000,OU=500,o1=500,fU=5,CU=10,qU=1,a1="amz-sdk-invocation-id",t1="amz-sdk-request";var pX=()=>{let $=V0;return{computeNextBackoffDelay:(W)=>{return Math.floor(Math.min(e0,Math.random()*2**W*$))},setDelayBase:(W)=>{$=W}}};var NU=({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(e0,$),getRetryCost:()=>G}};class b0{constructor($){this.maxAttempts=$,this.mode=n.STANDARD,this.capacity=o1,this.retryBackoffStrategy=pX(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return NU({retryDelay:V0,retryCount:0})}async refreshRetryTokenForRetry($,U){const G=await this.getMaxAttempts();if(this.shouldRetry($,U,G)){const W=U.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?OU:V0);const X=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),Z=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,X):X,Y=this.getCapacityCost(W);return this.capacity-=Y,NU({retryDelay:Z,retryCount:$.getRetryCount()+1,retryCost:Y})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(o1,this.capacity+($.getRetryCost()??qU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${B0}`),B0}}shouldRetry($,U,G){return $.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?CU:fU}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class jU{constructor($,U){this.maxAttemptsProvider=$,this.mode=n.ADAPTIVE;const{rateLimiter:G}=U??{};this.rateLimiter=G??new r1,this.standardRetryStrategy=new b0($)}async acquireInitialRetryToken($){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken($)}async refreshRetryTokenForRetry($,U){return this.rateLimiter.updateClientSendingRate(U),this.standardRetryStrategy.refreshRetryTokenForRetry($,U)}recordSuccess($){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess($)}}var lX="AWS_MAX_ATTEMPTS",sX="max_attempts",vH={environmentVariableSelector:($)=>{const U=$[lX];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${lX} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[sX];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${sX} mast be a number, got "${U}"`);return G},default:B0},cH=($)=>{const{retryStrategy:U}=$,G=PU.normalizeProvider($.maxAttempts??B0);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await PU.normalizeProvider($.retryMode)()===n.ADAPTIVE)return new jU(G);return new b0(G)}}},nz="AWS_RETRY_MODE",iz="retry_mode",yH={environmentVariableSelector:($)=>$[nz],configFileSelector:($)=>$[iz],default:gX};var D0=y(J0(),1);import{Readable as rz} from"stream";var mX=($)=>$?.body instanceof rz||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var SU=($)=>{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 oz=($)=>(U,G)=>async(W)=>{let X=await $.retryStrategy();const Z=await $.maxAttempts();if(az(X)){X=X;let Y=await X.acquireInitialRetryToken(G.partition_id),L=new Error,w=0,Q=0;const{request:z}=W,F=u.isInstance(z);if(F)z.headers[a1]=pG();while(!0)try{if(F)z.headers[t1]=`attempt=${w+1}; max=${Z}`;const{response:J,output:I}=await U(W);return X.recordSuccess(Y),I.$metadata.attempts=w+1,I.$metadata.totalRetryDelay=Q,{response:J,output:I}}catch(J){const I=tz(J);if(L=SU(J),F&&mX(z))throw(G.logger instanceof nX?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),L;try{Y=await X.refreshRetryTokenForRetry(Y,I)}catch(V){if(!L.$metadata)L.$metadata={};throw L.$metadata.attempts=w+1,L.$metadata.totalRetryDelay=Q,L}w=Y.getRetryCount();const K=Y.getRetryDelay();Q+=K,await new Promise((V)=>setTimeout(V,K))}}else{if(X=X,X?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",X.mode]];return X.retry(U,W)}},az=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",tz=($)=>{const U={error:$,errorType:ez($)},G=UF($.$response);if(G)U.retryAfterHint=G;return U},ez=($)=>{if(D0.isThrottlingError($))return"THROTTLING";if(D0.isTransientError($))return"TRANSIENT";if(D0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},$F={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},rH=($)=>({applyToStack:(U)=>{U.add(oz($),$F)}}),UF=($)=>{if(!kU.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)};var GF=y(J0(),1);var e1=y(J0(),1);import{platform as m3,release as n3} from"os";import{env as KY,versions as i3} from"process";var mU={isCrtAvailable:!1};var IY=()=>{if(mU.isCrtAvailable)return["md/crt-avail"];return null};var r3="AWS_SDK_UA_APP_ID",o3="sdk-ua-app-id",aA=({serviceId:$,clientVersion:U})=>{const G=[["aws-sdk-js",U],["ua","2.0"],[`os/${m3()}`,n3()],["lang/js"],["md/nodejs",`${i3.node}`]],W=IY();if(W)G.push(W);if($)G.push([`api/${$}`,U]);if(KY.AWS_EXECUTION_ENV)G.push([`exec-env/${KY.AWS_EXECUTION_ENV}`]);const X=R0({environmentVariableSelector:(Y)=>Y[r3],configFileSelector:(Y)=>Y[o3],default:void 0})();let Z=void 0;return async()=>{if(!Z){const Y=await X;Z=Y?[...G,[`app/${Y}`]]:[...G]}return Z}};import{Buffer as a3} from"buffer";import{createHash as t3,createHmac as e3} from"crypto";var MY=function($,U){if(a3.isBuffer($))return $;if(typeof $==="string")return RY($,U);if(ArrayBuffer.isView($))return nU($.buffer,$.byteOffset,$.byteLength);return nU($)};class $I{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(BY(MY($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?e3(this.algorithmIdentifier,MY(this.secret)):t3(this.algorithmIdentifier)}}import{fstatSync as UI,lstatSync as GI} from"fs";var YE=($)=>{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 GI($.path).size;else if(typeof $.fd==="number")return UI($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var VY="AWS_EXECUTION_ENV",iU="AWS_REGION",rU="AWS_DEFAULT_REGION",HY="AWS_EC2_METADATA_DISABLED",AY=["in-region","cross-region","mobile","standard","legacy"],EY="/latest/meta-data/placement/region";var TY={environmentVariableSelector:($)=>{return $["AWS_DEFAULTS_MODE"]},configFileSelector:($)=>{return $["defaults_mode"]},default:"legacy"};var BE=({region:$=R0(PX),defaultsMode:U=R0(TY)}={})=>OY(async()=>{const G=typeof U==="function"?await U():U;switch(G?.toLowerCase()){case"auto":return WI($);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 ${AY.join(", ")}, got ${G}`)}}),WI=async($)=>{if($){const U=typeof $==="function"?await $():$,G=await XI();if(!G)return"standard";if(U===G)return"in-region";else return"cross-region"}return"standard"},XI=async()=>{if(process.env[VY]&&(process.env[iU]||process.env[rU]))return process.env[iU]??process.env[rU];if(!process.env[HY])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-3840523c97bd28e4.js"),G=await $();return(await U({...G,path:EY})).toString()}catch($){}};var EE=($)=>{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}}},TE=($)=>{return{region:$.region()}};export{pG as V,r as W,bI as X,DI as Y,xI as Z,_I as _,k0 as $,Y0 as aa,FU as ba,NK as ca,Ez as da,t0 as ea,fz as fa,jz as ga,wB as ha,jB as ia,kB as ja,PX as ka,pB as la,VB as ma,RV as na,sz as oa,TV as pa,nV as qa,aV as ra,gX as sa,vH as ta,cH as ua,yH as va,rH as wa,s3 as xa,aA as ya,$I as za,YE as Aa,BE as Ba,EE as Ca,TE as Da};
|
|
19
|
-
|
|
20
|
-
//# debugId=DE8906C4CE08960764756e2164756e21
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-f5707f3bdba77464.js";import{I as w} from"./chunk-c83dcc500d5fefe3.js";import"./chunk-9e77cade8671df8d.js";import{Aa as He,Ba as Ne,Ca as ir,Da as lr,W as Mr,X as nr,Y as or,Z as dr,_ as cr,ba as N,ca as tr,da as $e,ea as Ie,fa as Re,ga as Pe,ha as ar,ia as Ae,ja as Ke,ka as Me,la as Be,ma as mr,na as wr,pa as S,qa as $,ra as kr,sa as Le,ta as Qe,ua as vr,va as Xe,wa as Er,xa as U,ya as Ye,za as Ze} from"./chunk-de8906c4ce089607.js";import{$a as E,Ea as ue,Fa as er,La as be,Na as je,Oa as Fe,Pa as yr,Qa as De,Ra as Ue,Ua as Je,Va as Ve,ab as t,bb as Vr,db as p,eb as b,fb as j,gb as F,hb as h,ob as Sr,pb as a,qb as jr,rb as We,sb as fe,tb as rr,ub as sr,wb as d,xb as o,zb as I} from"./chunk-1c2835b8ab6601e6.js";import{Ab as Yr,Bb as R} from"./chunk-225a2ac22f559ca4.js";import"./chunk-7f095ebadaafbe12.js";import{Db as Ce} from"./chunk-7c5cdd2ff0c5a588.js";import"./chunk-4e3d8823a08776e9.js";import"./chunk-89e42f2de63525a8.js";var P=w(N(),1);var re=w(U(),1),q=w(Mr(),1),Br=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}},H=function(e){return{schemeId:"smithy.api#noAuth"}},se=async(e,s,r)=>{return{operation:q.getSmithyContext(s).operation,region:await q.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},ie=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(H(e));break}case"RegisterClient":{s.push(H(e));break}case"StartDeviceAuthorization":{s.push(H(e));break}default:s.push(Br(e))}return s},le=(e)=>{return{...re.resolveAwsSdkSigV4Config(e)}};var he=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},v={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var ne={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.654.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.654.0","@aws-sdk/credential-provider-node":"3.654.0","@aws-sdk/middleware-host-header":"3.654.0","@aws-sdk/middleware-logger":"3.654.0","@aws-sdk/middleware-recursion-detection":"3.654.0","@aws-sdk/middleware-user-agent":"3.654.0","@aws-sdk/region-config-resolver":"3.654.0","@aws-sdk/types":"3.654.0","@aws-sdk/util-endpoints":"3.654.0","@aws-sdk/util-user-agent-browser":"3.654.0","@aws-sdk/util-user-agent-node":"3.654.0","@smithy/config-resolver":"^3.0.8","@smithy/core":"^2.4.3","@smithy/fetch-http-handler":"^3.2.7","@smithy/hash-node":"^3.0.6","@smithy/invalid-dependency":"^3.0.6","@smithy/middleware-content-length":"^3.0.8","@smithy/middleware-endpoint":"^3.1.3","@smithy/middleware-retry":"^3.0.18","@smithy/middleware-serde":"^3.0.6","@smithy/middleware-stack":"^3.0.6","@smithy/node-config-provider":"^3.1.7","@smithy/node-http-handler":"^3.2.2","@smithy/protocol-http":"^4.1.3","@smithy/smithy-client":"^3.3.2","@smithy/types":"^3.4.2","@smithy/url-parser":"^3.0.6","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.18","@smithy/util-defaults-mode-node":"^3.0.18","@smithy/util-endpoints":"^2.1.2","@smithy/util-middleware":"^3.0.6","@smithy/util-retry":"^3.0.6","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.654.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}};var _e=w(U(),1);var qe=w(U(),1),xe=w(N(),1);var ze=w(Yr(),1);var oe={["required"]:!1,type:"String"},de={["required"]:!0,default:!1,type:"Boolean"},ce={["ref"]:"Endpoint"},ke={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},ye={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Ee={["ref"]:"PartitionResult"},te={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Ee,"supportsDualStack"]}]},ae=[ke],me=[ve],we=[{["ref"]:"Region"}],Qr={version:"1.0",parameters:{Region:oe,UseDualStack:de,UseFIPS:de,Endpoint:oe},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ce]}],rules:[{conditions:ae,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:me,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ce,properties:m,headers:m},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:we}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:we,assign:"PartitionResult"}],rules:[{conditions:[ke,ve],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,ye]},te],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:ae,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[ye,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Ee,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:m,headers:m},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:me,rules:[{conditions:[te],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},Se=Qr;var Xr=new $e({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Te=(e,s={})=>{return Xr.get(e,()=>Re(Se,{endpointParams:e,logger:s.logger}))};Ie.aws=Pe;var Ge=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??De,base64Encoder:e?.base64Encoder??Ue,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Te,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ie,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new qe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new xe.NoAuthSigner}],logger:e?.logger??new Fe,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??ze.parseUrl,utf8Decoder:e?.utf8Decoder??be,utf8Encoder:e?.utf8Encoder??je}};var pe=(e)=>{fe(process.version);const s=Ne(e),r=()=>s().then(We),i=Ge(e);return _e.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??He,credentialDefaultProvider:e?.credentialDefaultProvider??Ce,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ye({serviceId:i.serviceId,clientVersion:ne.version}),maxAttempts:e?.maxAttempts??R(Qe),region:e?.region??R(Me,Be),requestHandler:Je.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Xe,default:async()=>(await r()).retryMode||Le}),sha256:e?.sha256??Ze.bind(null,"sha256"),streamCollector:e?.streamCollector??Ve,useDualstackEndpoint:e?.useDualstackEndpoint??R(Ae),useFipsEndpoint:e?.useFipsEndpoint??R(Ke)}};var ge=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){const n=s.findIndex((T)=>T.schemeId===l.schemeId);if(n===-1)s.push(l);else s.splice(n,1,l)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(l){r=l},httpAuthSchemeProvider(){return r},setCredentials(l){i=l},credentials(){return i}}},Oe=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var x=(e)=>e,hr=(e,s)=>{const r={...x(ir(e)),...x(rr(e)),...x(ue(e)),...x(ge(e))};return s.forEach((i)=>i.configure(r)),{...e,...lr(r),...sr(r),...er(r),...Oe(r)}};class _ extends yr{constructor(...[e]){const s=pe(e||{}),r=he(s),i=tr(r),l=vr(i),n=mr(l),T=nr(n),fr=kr(T),Ar=le(fr),ee=hr(Ar,e?.extensions||[]);super(ee);this.config=ee,this.middlewareStack.use(ar(this.config)),this.middlewareStack.use(Er(this.config)),this.middlewareStack.use(wr(this.config)),this.middlewareStack.use(or(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(cr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:se,identityProviderConfigProvider:async(Kr)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Kr.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class c extends Sr{constructor(e){super(e);Object.setPrototypeOf(this,c.prototype)}}class z extends c{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends c{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends c{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends c{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends c{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends c{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends c{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends c{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends c{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends c{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends c{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description}}class Q extends c{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class X extends c{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}class Y extends c{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,Y.prototype),this.error=e.error,this.error_description=e.error_description}}var $r=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),Ir=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Rr=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Pr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Tr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),br=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var k=w(U(),1),D=w(N(),1);var Fr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Dr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=d({[ns]:[,"t"]});let n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(T)=>I(T),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},Ur=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/client/register");let l;return l=JSON.stringify(o(e,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(n)=>I(n),issuerUrl:[],redirectUris:(n)=>I(n),scopes:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},qr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/device_authorization");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],startUrl:[]})),r.m("POST").h(i).b(l),r.build()},xr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:y(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:y(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,issuedTokenType:h,refreshToken:h,scope:I,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:y(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:p,clientSecret:h,clientSecretExpiresAt:p,tokenEndpoint:h});return Object.assign(r,l),r},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:y(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:b,interval:b,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},Z=async(e,s)=>{const r={...e,body:await k.parseJsonErrorBody(e.body,s)},i=k.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Hr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Nr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await _r(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await pr(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await Cr(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Or(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await es(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await ss(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await is(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await ls(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await hs(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await rs(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await gr(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await ur(r,s);default:const l=r.body;return Zr({output:e,parsedBody:l,errorCode:i})}},Zr=jr(c),Hr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new z({$metadata:y(e),...r});return a(n,e.body)},Nr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new G({$metadata:y(e),...r});return a(n,e.body)},_r=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new J({$metadata:y(e),...r});return a(n,e.body)},pr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new V({$metadata:y(e),...r});return a(n,e.body)},Cr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new W({$metadata:y(e),...r});return a(n,e.body)},gr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new X({$metadata:y(e),...r});return a(n,e.body)},Or=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new f({$metadata:y(e),...r});return a(n,e.body)},ur=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new Y({$metadata:y(e),...r});return a(n,e.body)},es=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new A({$metadata:y(e),...r});return a(n,e.body)},rs=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);const n=new Q({$metadata:y(e),...r});return a(n,e.body)},ss=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new K({$metadata:y(e),...r});return a(n,e.body)},is=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new M({$metadata:y(e),...r});return a(n,e.body)},ls=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new B({$metadata:y(e),...r});return a(n,e.body)},hs=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new L({$metadata:y(e),...r});return a(n,e.body)},y=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var ns="aws_iam";class C extends E.classBuilder().ep(v).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f($r,Ir).ser(Fr).de(xr).build(){}class g extends E.classBuilder().ep(v).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Rr,Pr).ser(Dr).de(zr).build(){}class O extends E.classBuilder().ep(v).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,Tr).ser(Ur).de(Gr).build(){}class u extends E.classBuilder().ep(v).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(br,void 0).ser(qr).de(Jr).build(){}var os={CreateTokenCommand:C,CreateTokenWithIAMCommand:g,RegisterClientCommand:O,StartDeviceAuthorizationCommand:u};class Wr extends _{}Vr(os,Wr);export{yr as __Client,L as UnsupportedGrantTypeException,B as UnauthorizedClientException,br as StartDeviceAuthorizationRequestFilterSensitiveLog,u as StartDeviceAuthorizationCommand,M as SlowDownException,c as SSOOIDCServiceException,_ as SSOOIDCClient,Wr as SSOOIDC,Tr as RegisterClientResponseFilterSensitiveLog,O as RegisterClientCommand,K as InvalidScopeException,Q as InvalidRequestRegionException,A as InvalidRequestException,Y as InvalidRedirectUriException,f as InvalidGrantException,X as InvalidClientMetadataException,W as InvalidClientException,V as InternalServerException,J as ExpiredTokenException,Pr as CreateTokenWithIAMResponseFilterSensitiveLog,Rr as CreateTokenWithIAMRequestFilterSensitiveLog,g as CreateTokenWithIAMCommand,Ir as CreateTokenResponseFilterSensitiveLog,$r as CreateTokenRequestFilterSensitiveLog,C as CreateTokenCommand,G as AuthorizationPendingException,z as AccessDeniedException,E as $Command};
|
|
3
|
-
|
|
4
|
-
//# debugId=FEA6A8B61878C7B764756e2164756e21
|