gemi 0.4.112 → 0.4.113
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-gmfpzjq8.js → chunk-11azhtfq.js} +2 -2
- package/dist/{chunk-gmfpzjq8.js.map → chunk-11azhtfq.js.map} +1 -1
- package/dist/{chunk-d5sps5cz.js → chunk-2p10c4kh.js} +3 -3
- package/dist/{chunk-d5sps5cz.js.map → chunk-2p10c4kh.js.map} +1 -1
- package/dist/{chunk-h32wyhch.js → chunk-3ndk6f56.js} +2 -2
- package/dist/{chunk-h32wyhch.js.map → chunk-3ndk6f56.js.map} +5 -5
- package/dist/chunk-8mtrpdem.js +20 -0
- package/dist/{chunk-mv6z1e1k.js.map → chunk-8mtrpdem.js.map} +5 -8
- package/dist/{chunk-9nrnhtax.js → chunk-9txn8acf.js} +3 -3
- package/dist/{chunk-9nrnhtax.js.map → chunk-9txn8acf.js.map} +1 -1
- package/dist/chunk-bhxyhsqr.js +4 -0
- package/dist/{chunk-qsz9qyck.js.map → chunk-bhxyhsqr.js.map} +4 -4
- package/dist/{chunk-8r4gf4db.js → chunk-bn6dtgj4.js} +2 -2
- package/dist/{chunk-8r4gf4db.js.map → chunk-bn6dtgj4.js.map} +1 -1
- package/dist/{chunk-vp9qt0ma.js → chunk-cj78pfaa.js} +2 -2
- package/dist/{chunk-vp9qt0ma.js.map → chunk-cj78pfaa.js.map} +1 -1
- package/dist/{chunk-g31s71mt.js → chunk-fc27f4cb.js} +2 -2
- package/dist/{chunk-g31s71mt.js.map → chunk-fc27f4cb.js.map} +1 -1
- package/dist/{chunk-3tkcbjr7.js → chunk-mvmwz99e.js} +2 -2
- package/dist/{chunk-3tkcbjr7.js.map → chunk-mvmwz99e.js.map} +1 -1
- package/dist/{chunk-7dzytwxa.js → chunk-pd22hcnn.js} +3 -3
- package/dist/{chunk-7dzytwxa.js.map → chunk-pd22hcnn.js.map} +1 -1
- package/dist/{chunk-6mhs44ws.js → chunk-rb7jfsvq.js} +2 -2
- package/dist/{chunk-6mhs44ws.js.map → chunk-rb7jfsvq.js.map} +1 -1
- package/dist/{chunk-k95a7x24.js → chunk-tpdm7nax.js} +2 -2
- package/dist/{chunk-k95a7x24.js.map → chunk-tpdm7nax.js.map} +1 -1
- package/dist/{chunk-a8p9qrrx.js → chunk-tqey3r3k.js} +2 -2
- package/dist/{chunk-a8p9qrrx.js.map → chunk-tqey3r3k.js.map} +1 -1
- package/dist/{chunk-bvznvw9v.js → chunk-tr7zwxhw.js} +2 -2
- package/dist/{chunk-bvznvw9v.js.map → chunk-tr7zwxhw.js.map} +1 -1
- package/dist/{chunk-7z68xeph.js → chunk-x2f9x5m1.js} +2 -2
- package/dist/{chunk-7z68xeph.js.map → chunk-x2f9x5m1.js.map} +1 -1
- package/dist/chunk-yec7wnh4.js +4 -0
- package/dist/{chunk-0z7rregx.js.map → chunk-yec7wnh4.js.map} +4 -4
- package/dist/client/auth/useForgotPassword.d.ts +1 -1
- package/dist/client/auth/useResetPassword.d.ts +1 -1
- package/dist/client/auth/useSignIn.d.ts +1 -1
- package/dist/client/auth/useSignOut.d.ts +1 -1
- package/dist/client/auth/useSignUp.d.ts +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/useMutation.d.ts +5 -5
- package/dist/client/useMutation.d.ts.map +1 -1
- package/dist/kernel/index.js +1 -1
- package/dist/services/index.js +2 -11
- package/dist/services/index.js.map +5 -16
- package/package.json +1 -1
- package/dist/chunk-0z7rregx.js +0 -4
- package/dist/chunk-mv6z1e1k.js +0 -20
- package/dist/chunk-qsz9qyck.js +0 -4
package/dist/chunk-mv6z1e1k.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{I as X1,J as M}from"./chunk-td079vg9.js";import{U as aJ}from"./chunk-wfc30gdx.js";import{Ha as y,Ia as SU,Ka as mU,La as HL,Na as AL,Pa as tX,Ua as g4,Xa as f6}from"./chunk-d5sps5cz.js";import{Bb as Q0}from"./chunk-6mhs44ws.js";import{Cb as I0,Db as AU}from"./chunk-7dzytwxa.js";import{Eb as O$}from"./chunk-vp9qt0ma.js";import{Kb as HU}from"./chunk-a8p9qrrx.js";var w$=M((rU)=>{function kL($){return $&&$.__esModule?$:{default:$}}function DL(){if(G1>W1.length-16)SL.default.randomFillSync(W1),G1=0;return W1.slice(G1,G1+=16)}Object.defineProperty(rU,"__esModule",{value:!0});rU.default=DL;var SL=kL(import.meta.require("crypto")),W1=new Uint8Array(256),G1=W1.length});var tU=M((oU)=>{Object.defineProperty(oU,"__esModule",{value:!0});oU.default=void 0;var hL=/^(?:[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;oU.default=hL});var D0=M((eU)=>{function vL($){return $&&$.__esModule?$:{default:$}}function cL($){return typeof $==="string"&&xL.default.test($)}Object.defineProperty(eU,"__esModule",{value:!0});eU.default=void 0;var xL=vL(tU()),yL=cL;eU.default=yL});var b0=M((GG)=>{function _L($){return $&&$.__esModule?$:{default:$}}function UG($,U=0){return D[$[U+0]]+D[$[U+1]]+D[$[U+2]]+D[$[U+3]]+"-"+D[$[U+4]]+D[$[U+5]]+"-"+D[$[U+6]]+D[$[U+7]]+"-"+D[$[U+8]]+D[$[U+9]]+"-"+D[$[U+10]]+D[$[U+11]]+D[$[U+12]]+D[$[U+13]]+D[$[U+14]]+D[$[U+15]]}function dL($,U=0){const G=UG($,U);if(!uL.default(G))throw TypeError("Stringified UUID is invalid");return G}Object.defineProperty(GG,"__esModule",{value:!0});GG.default=void 0;GG.unsafeStringify=UG;var uL=_L(D0()),D=[];for(let $=0;$<256;++$)D.push(($+256).toString(16).slice(1));var gL=dL;GG.default=gL});var YG=M((ZG)=>{function mL($){return $&&$.__esModule?$:{default:$}}function nL($,U,G){let W=U&&G||0;const X=U||new Array(16);$=$||{};let Z=$.node||XG,L=$.clockseq!==void 0?$.clockseq:Q$;if(Z==null||L==null){const R=$.random||($.rng||lL.default)();if(Z==null)Z=XG=[R[0]|1,R[1],R[2],R[3],R[4],R[5]];if(L==null)L=Q$=(R[6]<<8|R[7])&16383}let Y=$.msecs!==void 0?$.msecs:Date.now(),w=$.nsecs!==void 0?$.nsecs:F$+1;const Q=Y-z$+(w-F$)/1e4;if(Q<0&&$.clockseq===void 0)L=L+1&16383;if((Q<0||Y>z$)&&$.nsecs===void 0)w=0;if(w>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");z$=Y,F$=w,Q$=L,Y+=12219292800000;const z=((Y&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=Y/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++]=L>>>8|128,X[W++]=L&255;for(let R=0;R<6;++R)X[W+R]=Z[R];return U||sL.unsafeStringify(X)}Object.defineProperty(ZG,"__esModule",{value:!0});ZG.default=void 0;var lL=mL(w$()),sL=b0(),XG,Q$,z$=0,F$=0,iL=nL;ZG.default=iL});var R$=M((wG)=>{function oL($){return $&&$.__esModule?$:{default:$}}function aL($){if(!rL.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(wG,"__esModule",{value:!0});wG.default=void 0;var rL=oL(D0()),tL=aL;wG.default=tL});var J$=M((RG)=>{function U5($){return $&&$.__esModule?$:{default:$}}function G5($){$=unescape(encodeURIComponent($));const U=[];for(let G=0;G<$.length;++G)U.push($.charCodeAt(G));return U}function W5($,U,G){function W(X,Z,L,Y){var w;if(typeof X==="string")X=G5(X);if(typeof Z==="string")Z=$5.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,L){Y=Y||0;for(let z=0;z<16;++z)L[Y+z]=Q[z];return L}return eL.unsafeStringify(Q)}try{W.name=$}catch(X){}return W.DNS=zG,W.URL=FG,W}Object.defineProperty(RG,"__esModule",{value:!0});RG.URL=RG.DNS=void 0;RG.default=W5;var eL=b0(),$5=U5(R$()),zG="6ba7b810-9dad-11d1-80b4-00c04fd430c8";RG.DNS=zG;var FG="6ba7b811-9dad-11d1-80b4-00c04fd430c8";RG.URL=FG});var MG=M((IG)=>{function Y5($){return $&&$.__esModule?$:{default:$}}function w5($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return L5.default.createHash("md5").update($).digest()}Object.defineProperty(IG,"__esModule",{value:!0});IG.default=void 0;var L5=Y5(import.meta.require("crypto")),Q5=w5;IG.default=Q5});var TG=M((BG)=>{function EG($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(BG,"__esModule",{value:!0});BG.default=void 0;var z5=EG(J$()),F5=EG(MG()),R5=z5.default("v3",48,F5.default),J5=R5;BG.default=J5});var OG=M((HG)=>{function K5($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(HG,"__esModule",{value:!0});HG.default=void 0;var I5=K5(import.meta.require("crypto")),M5={randomUUID:I5.default.randomUUID};HG.default=M5});var PG=M((qG)=>{function fG($){return $&&$.__esModule?$:{default:$}}function V5($,U,G){if(CG.default.randomUUID&&!U&&!$)return CG.default.randomUUID();$=$||{};const W=$.random||($.rng||E5.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 B5.unsafeStringify(W)}Object.defineProperty(qG,"__esModule",{value:!0});qG.default=void 0;var CG=fG(OG()),E5=fG(w$()),B5=b0(),T5=V5;qG.default=T5});var kG=M((jG)=>{function A5($){return $&&$.__esModule?$:{default:$}}function O5($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return H5.default.createHash("sha1").update($).digest()}Object.defineProperty(jG,"__esModule",{value:!0});jG.default=void 0;var H5=A5(import.meta.require("crypto")),C5=O5;jG.default=C5});var xG=M((bG)=>{function DG($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(bG,"__esModule",{value:!0});bG.default=void 0;var f5=DG(J$()),q5=DG(kG()),N5=f5.default("v5",80,q5.default),P5=N5;bG.default=P5});var yG=M((vG)=>{Object.defineProperty(vG,"__esModule",{value:!0});vG.default=void 0;var j5="00000000-0000-0000-0000-000000000000";vG.default=j5});var dG=M((uG)=>{function k5($){return $&&$.__esModule?$:{default:$}}function D5($){if(!S5.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)}Object.defineProperty(uG,"__esModule",{value:!0});uG.default=void 0;var S5=k5(D0()),b5=D5;uG.default=b5});var I$=M((l)=>{function r($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(l,"__esModule",{value:!0});Object.defineProperty(l,"NIL",{enumerable:!0,get:function(){return y5.default}});Object.defineProperty(l,"parse",{enumerable:!0,get:function(){return g5.default}});Object.defineProperty(l,"stringify",{enumerable:!0,get:function(){return d5.default}});Object.defineProperty(l,"v1",{enumerable:!0,get:function(){return h5.default}});Object.defineProperty(l,"v3",{enumerable:!0,get:function(){return x5.default}});Object.defineProperty(l,"v4",{enumerable:!0,get:function(){return v5.default}});Object.defineProperty(l,"v5",{enumerable:!0,get:function(){return c5.default}});Object.defineProperty(l,"validate",{enumerable:!0,get:function(){return _5.default}});Object.defineProperty(l,"version",{enumerable:!0,get:function(){return u5.default}});var h5=r(YG()),x5=r(TG()),v5=r(PG()),c5=r(xG()),y5=r(yG()),u5=r(dG()),_5=r(D0()),d5=r(b0()),g5=r(R$())});var h0=M((rI,nG)=>{var{defineProperty:Z1,getOwnPropertyDescriptor:a5,getOwnPropertyNames:t5}=Object,e5=Object.prototype.hasOwnProperty,sG=($,U)=>Z1($,"name",{value:U,configurable:!0}),$Y=($,U)=>{for(var G in U)Z1($,G,{get:U[G],enumerable:!0})},UY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of t5(U))if(!e5.call($,X)&&X!==G)Z1($,X,{get:()=>U[X],enumerable:!(W=a5(U,X))||W.enumerable})}return $},GY=($)=>UY(Z1({},"__esModule",{value:!0}),$),mG={};$Y(mG,{getSmithyContext:()=>WY,normalizeProvider:()=>XY});nG.exports=GY(mG);var lG=Q0(),WY=sG(($)=>$[lG.SMITHY_CONTEXT_KEY]||($[lG.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),XY=sG(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var V0=M((iG)=>{Object.defineProperty(iG,"__esModule",{value:!0});iG.getHomeDir=void 0;var ZY=import.meta.require("os"),LY=import.meta.require("path"),K$={},YY=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},wY=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:G,HOMEDRIVE:W=`C:${LY.sep}`}=process.env;if($)return $;if(U)return U;if(G)return`${W}${G}`;const X=YY();if(!K$[X])K$[X]=ZY.homedir();return K$[X]};iG.getHomeDir=wY});var M$=M((oG)=>{Object.defineProperty(oG,"__esModule",{value:!0});oG.getSSOTokenFilepath=void 0;var QY=import.meta.require("crypto"),zY=import.meta.require("path"),FY=V0(),RY=($)=>{const G=QY.createHash("sha1").update($).digest("hex");return zY.join(FY.getHomeDir(),".aws","sso","cache",`${G}.json`)};oG.getSSOTokenFilepath=RY});var $8=M((tG)=>{Object.defineProperty(tG,"__esModule",{value:!0});tG.getSSOTokenFromFile=void 0;var JY=import.meta.require("fs"),IY=M$(),{readFile:KY}=JY.promises,MY=async($)=>{const U=IY.getSSOTokenFilepath($),G=await KY(U,"utf8");return JSON.parse(G)};tG.getSSOTokenFromFile=MY});var B$=M((U8)=>{Object.defineProperty(U8,"__esModule",{value:!0});U8.slurpFile=void 0;var EY=import.meta.require("fs"),{readFile:BY}=EY.promises,E$={},VY=($,U)=>{if(!E$[$]||(U===null||U===void 0?void 0:U.ignoreCache))E$[$]=BY($,"utf8");return E$[$]};U8.slurpFile=VY});var A$=M(($3,v0)=>{var{defineProperty:w1,getOwnPropertyDescriptor:TY,getOwnPropertyNames:HY}=Object,AY=Object.prototype.hasOwnProperty,u=($,U)=>w1($,"name",{value:U,configurable:!0}),OY=($,U)=>{for(var G in U)w1($,G,{get:U[G],enumerable:!0})},V$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of HY(U))if(!AY.call($,X)&&X!==G)w1($,X,{get:()=>U[X],enumerable:!(W=TY(U,X))||W.enumerable})}return $},H$=($,U,G)=>(V$($,U,"default"),G&&V$(G,U,"default")),CY=($)=>V$(w1({},"__esModule",{value:!0}),$),x0={};OY(x0,{CONFIG_PREFIX_SEPARATOR:()=>z0,DEFAULT_PROFILE:()=>L8,ENV_PROFILE:()=>Z8,getProfileName:()=>fY,loadSharedConfigFiles:()=>w8,loadSsoSessionData:()=>yY,parseKnownFiles:()=>_Y});v0.exports=CY(x0);H$(x0,V0(),v0.exports);var Z8="AWS_PROFILE",L8="default",fY=u(($)=>$.profile||process.env[Z8]||L8,"getProfileName");H$(x0,M$(),v0.exports);H$(x0,$8(),v0.exports);var L1=Q0(),qY=u(($)=>Object.entries($).filter(([U])=>{const G=U.indexOf(z0);if(G===-1)return!1;return Object.values(L1.IniSectionType).includes(U.substring(0,G))}).reduce((U,[G,W])=>{const X=G.indexOf(z0),Z=G.substring(0,X)===L1.IniSectionType.PROFILE?G.substring(X+1):G;return U[Z]=W,U},{...$.default&&{default:$.default}}),"getConfigData"),Y1=import.meta.require("path"),NY=V0(),PY="AWS_CONFIG_FILE",Y8=u(()=>process.env[PY]||Y1.join(NY.getHomeDir(),".aws","config"),"getConfigFilepath"),jY=V0(),SY="AWS_SHARED_CREDENTIALS_FILE",kY=u(()=>process.env[SY]||Y1.join(jY.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),DY=V0(),bY=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,hY=["__proto__","profile __proto__"],T$=u(($)=>{const U={};let G,W;for(let X of $.split(/\r?\n/)){const Z=X.split(/(^|\s)[;#]/)[0].trim();if(Z[0]==="["&&Z[Z.length-1]==="]"){G=void 0,W=void 0;const Y=Z.substring(1,Z.length-1),w=bY.exec(Y);if(w){const[,Q,,z]=w;if(Object.values(L1.IniSectionType).includes(Q))G=[Q,z].join(z0)}else G=Y;if(hY.includes(Y))throw new Error(`Found invalid profile name "${Y}"`)}else if(G){const Y=Z.indexOf("=");if(![0,-1].includes(Y)){const[w,Q]=[Z.substring(0,Y).trim(),Z.substring(Y+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(z0):w;U[G][z]=Q}}}}return U},"parseIni"),W8=B$(),X8=u(()=>({}),"swallowError"),z0=".",w8=u(async($={})=>{const{filepath:U=kY(),configFilepath:G=Y8()}=$,W=DY.getHomeDir();let Z=U;if(U.startsWith("~/"))Z=Y1.join(W,U.slice(2));let L=G;if(G.startsWith("~/"))L=Y1.join(W,G.slice(2));const Y=await Promise.all([W8.slurpFile(L,{ignoreCache:$.ignoreCache}).then(T$).then(qY).catch(X8),W8.slurpFile(Z,{ignoreCache:$.ignoreCache}).then(T$).catch(X8)]);return{configFile:Y[0],credentialsFile:Y[1]}},"loadSharedConfigFiles"),xY=u(($)=>Object.entries($).filter(([U])=>U.startsWith(L1.IniSectionType.SSO_SESSION+z0)).reduce((U,[G,W])=>({...U,[G.substring(G.indexOf(z0)+1)]:W}),{}),"getSsoSessionData"),vY=B$(),cY=u(()=>({}),"swallowError"),yY=u(async($={})=>vY.slurpFile($.configFilepath??Y8()).then(T$).then(xY).catch(cY),"loadSsoSessionData"),uY=u((...$)=>{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"),_Y=u(async($)=>{const U=await w8($);return uY(U.configFile,U.credentialsFile)},"parseKnownFiles")});var R8=M((U3,F8)=>{function C$($){try{const U=new Set(Array.from($.match(/([A-Z_]){3,}/g)??[]));return U.delete("CONFIG"),U.delete("CONFIG_PREFIX_SEPARATOR"),U.delete("ENV"),[...U].join(", ")}catch(U){return $}}var{defineProperty:Q1,getOwnPropertyDescriptor:dY,getOwnPropertyNames:gY}=Object,pY=Object.prototype.hasOwnProperty,T0=($,U)=>Q1($,"name",{value:U,configurable:!0}),lY=($,U)=>{for(var G in U)Q1($,G,{get:U[G],enumerable:!0})},sY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of gY(U))if(!pY.call($,X)&&X!==G)Q1($,X,{get:()=>U[X],enumerable:!(W=dY(U,X))||W.enumerable})}return $},mY=($)=>sY(Q1({},"__esModule",{value:!0}),$),z8={};lY(z8,{loadConfig:()=>aY});F8.exports=mY(z8);var c0=O$();T0(C$,"getSelectorName");var nY=T0(($,U)=>async()=>{try{const G=$(process.env);if(G===void 0)throw new Error;return G}catch(G){throw new c0.CredentialsProviderError(G.message||`Not found in ENV: ${C$($.toString())}`,{logger:U})}},"fromEnv"),Q8=A$(),iY=T0(($,{preferredFile:U="config",...G}={})=>async()=>{const W=Q8.getProfileName(G),{configFile:X,credentialsFile:Z}=await Q8.loadSharedConfigFiles(G),L=Z[W]||{},Y=X[W]||{},w=U==="config"?{...L,...Y}:{...Y,...L};try{const z=$(w,U==="config"?X:Z);if(z===void 0)throw new Error;return z}catch(Q){throw new c0.CredentialsProviderError(Q.message||`Not found in config files w/ profile [${W}]: ${C$($.toString())}`,{logger:G.logger})}},"fromSharedConfigFiles"),rY=T0(($)=>typeof $==="function","isFunction"),oY=T0(($)=>rY($)?async()=>await $():c0.fromStatic($),"fromStatic"),aY=T0(({environmentVariableSelector:$,configFileSelector:U,default:G},W={})=>c0.memoize(c0.chain(nY($),iY(U,W),oY(G))),"loadConfig")});var B8=M((M8)=>{Object.defineProperty(M8,"__esModule",{value:!0});M8.getEndpointUrlConfig=void 0;var J8=A$(),I8="AWS_ENDPOINT_URL",K8="endpoint_url",tY=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((Z)=>Z.toUpperCase()),W=U[[I8,...G].join("_")];if(W)return W;const X=U[I8];if(X)return X;return},configFileSelector:(U,G)=>{if(G&&U.services){const X=G[["services",U.services].join(J8.CONFIG_PREFIX_SEPARATOR)];if(X){const Z=$.split(" ").map((Y)=>Y.toLowerCase()),L=X[[Z.join("_"),K8].join(J8.CONFIG_PREFIX_SEPARATOR)];if(L)return L}}const W=U[K8];if(W)return W;return},default:void 0});M8.getEndpointUrlConfig=tY});var f$=M((V8)=>{Object.defineProperty(V8,"__esModule",{value:!0});V8.getEndpointFromConfig=void 0;var eY=R8(),$w=B8(),Uw=async($)=>eY.loadConfig($w.getEndpointUrlConfig($!==null&&$!==void 0?$:""))();V8.getEndpointFromConfig=Uw});var C8=M((X3,O8)=>{function A8($){const U={};if($=$.replace(/^\?/,""),$)for(let G of $.split("&")){let[W,X=null]=G.split("=");if(W=decodeURIComponent(W),X)X=decodeURIComponent(X);if(!(W in U))U[W]=X;else if(Array.isArray(U[W]))U[W].push(X);else U[W]=[U[W],X]}return U}var{defineProperty:z1,getOwnPropertyDescriptor:Gw,getOwnPropertyNames:Ww}=Object,Xw=Object.prototype.hasOwnProperty,Zw=($,U)=>z1($,"name",{value:U,configurable:!0}),Lw=($,U)=>{for(var G in U)z1($,G,{get:U[G],enumerable:!0})},Yw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Ww(U))if(!Xw.call($,X)&&X!==G)z1($,X,{get:()=>U[X],enumerable:!(W=Gw(U,X))||W.enumerable})}return $},ww=($)=>Yw(z1({},"__esModule",{value:!0}),$),H8={};Lw(H8,{parseQueryString:()=>A8});O8.exports=ww(H8);Zw(A8,"parseQueryString")});var P8=M((Z3,N8)=>{var{defineProperty:F1,getOwnPropertyDescriptor:Qw,getOwnPropertyNames:zw}=Object,Fw=Object.prototype.hasOwnProperty,Rw=($,U)=>F1($,"name",{value:U,configurable:!0}),Jw=($,U)=>{for(var G in U)F1($,G,{get:U[G],enumerable:!0})},Iw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of zw(U))if(!Fw.call($,X)&&X!==G)F1($,X,{get:()=>U[X],enumerable:!(W=Qw(U,X))||W.enumerable})}return $},Kw=($)=>Iw(F1({},"__esModule",{value:!0}),$),f8={};Jw(f8,{parseUrl:()=>q8});N8.exports=Kw(f8);var Mw=C8(),q8=Rw(($)=>{if(typeof $==="string")return q8(new URL($));const{hostname:U,pathname:G,port:W,protocol:X,search:Z}=$;let L;if(Z)L=Mw.parseQueryString(Z);return{hostname:U,port:W?parseInt(W):void 0,protocol:X,path:G,query:L}},"parseUrl")});var N$=M((L3,x8)=>{function h8($,U,G){return{applyToStack:(W)=>{W.add(S8($,G),D8),W.add(k8($,U),b8)}}}var{defineProperty:R1,getOwnPropertyDescriptor:Ew,getOwnPropertyNames:Bw}=Object,Vw=Object.prototype.hasOwnProperty,q$=($,U)=>R1($,"name",{value:U,configurable:!0}),Tw=($,U)=>{for(var G in U)R1($,G,{get:U[G],enumerable:!0})},Hw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Bw(U))if(!Vw.call($,X)&&X!==G)R1($,X,{get:()=>U[X],enumerable:!(W=Ew(U,X))||W.enumerable})}return $},Aw=($)=>Hw(R1({},"__esModule",{value:!0}),$),j8={};Tw(j8,{deserializerMiddleware:()=>S8,deserializerMiddlewareOption:()=>D8,getSerdePlugin:()=>h8,serializerMiddleware:()=>k8,serializerMiddlewareOption:()=>b8});x8.exports=Aw(j8);var S8=q$(($,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"),k8=q$(($,U)=>(G,W)=>async(X)=>{var Z;const L=((Z=W.endpointV2)==null?void 0:Z.url)&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!L)throw new Error("No valid endpoint provider available.");const Y=await U(X.input,{...$,endpoint:L});return G({...X,request:Y})},"serializerMiddleware"),D8={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},b8={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};q$(h8,"getSerdePlugin")});var p8=M((Y3,g8)=>{var{defineProperty:I1,getOwnPropertyDescriptor:Ow,getOwnPropertyNames:Cw}=Object,fw=Object.prototype.hasOwnProperty,s=($,U)=>I1($,"name",{value:U,configurable:!0}),qw=($,U)=>{for(var G in U)I1($,G,{get:U[G],enumerable:!0})},Nw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Cw(U))if(!fw.call($,X)&&X!==G)I1($,X,{get:()=>U[X],enumerable:!(W=Ow(U,X))||W.enumerable})}return $},Pw=($)=>Nw(I1({},"__esModule",{value:!0}),$),c8={};qw(c8,{endpointMiddleware:()=>_8,endpointMiddlewareOptions:()=>d8,getEndpointFromInstructions:()=>y8,getEndpointPlugin:()=>yw,resolveEndpointConfig:()=>_w,resolveParams:()=>u8,toEndpointV1:()=>P$});g8.exports=Pw(c8);var jw=s(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(hw(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!bw(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),Sw=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,kw=/(\d+\.){3}\d+/,Dw=/\.\./,bw=s(($)=>Sw.test($)&&!kw.test($)&&!Dw.test($),"isDnsCompatibleBucketName"),hw=s(($)=>{const[U,G,W,,,X]=$.split(":"),Z=U==="arn"&&$.split(":").length>=6,L=Boolean(Z&&G&&W&&X);if(Z&&!L)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return L},"isArnBucketName"),xw=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:L,port:Y,path:w}=X;return`${Z}//${L}${Y?":"+Y:""}${w}`}}return X};return W},"createConfigValueProvider"),vw=f$(),v8=P8(),P$=s(($)=>{if(typeof $==="object"){if("url"in $)return v8.parseUrl($.url);return $}return v8.parseUrl($)},"toEndpointV1"),y8=s(async($,U,G,W)=>{if(!G.endpoint){let L;if(G.serviceConfiguredEndpoint)L=await G.serviceConfiguredEndpoint();else L=await vw.getEndpointFromConfig(G.serviceId);if(L)G.endpoint=()=>Promise.resolve(P$(L))}const X=await u8($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(X,W)},"getEndpointFromInstructions"),u8=s(async($,U,G)=>{var W;const X={},Z=((W=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:W.call(U))||{};for(let[L,Y]of Object.entries(Z))switch(Y.type){case"staticContextParams":X[L]=Y.value;break;case"contextParams":X[L]=$[Y.name];break;case"clientContextParams":case"builtInParams":X[L]=await xw(Y.name,L,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(Y))}if(Object.keys(Z).length===0)Object.assign(X,G);if(String(G.serviceId).toLowerCase()==="s3")await jw(X);return X},"resolveParams"),J1=h0(),_8=s(({config:$,instructions:U})=>{return(G,W)=>async(X)=>{var Z,L,Y;const w=await y8(X.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=w,W.authSchemes=(Z=w.properties)==null?void 0:Z.authSchemes;const Q=(L=W.authSchemes)==null?void 0:L[0];if(Q){W.signing_region=Q.signingRegion,W.signing_service=Q.signingName;const z=J1.getSmithyContext(W),F=(Y=z==null?void 0:z.selectedHttpAuthScheme)==null?void 0:Y.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"),cw=N$(),d8={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:cw.serializerMiddlewareOption.name},yw=s(($,U)=>({applyToStack:(G)=>{G.addRelativeTo(_8({config:$,instructions:U}),d8)}}),"getEndpointPlugin"),uw=f$(),_w=s(($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>P$(await J1.normalizeProvider(G)()):void 0,Z={...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:J1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:J1.normalizeProvider($.useFipsEndpoint??!1)};let L=void 0;return Z.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!L)L=uw.getEndpointFromConfig($.serviceId);return L},Z},"resolveEndpointConfig")});var o=M((w3,t8)=>{function r8($){return Object.keys($).reduce((U,G)=>{const W=$[G];return{...U,[G]:Array.isArray(W)?[...W]:W}},{})}function a8($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)}var{defineProperty:K1,getOwnPropertyDescriptor:dw,getOwnPropertyNames:gw}=Object,pw=Object.prototype.hasOwnProperty,$0=($,U)=>K1($,"name",{value:U,configurable:!0}),lw=($,U)=>{for(var G in U)K1($,G,{get:U[G],enumerable:!0})},sw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of gw(U))if(!pw.call($,X)&&X!==G)K1($,X,{get:()=>U[X],enumerable:!(W=dw(U,X))||W.enumerable})}return $},mw=($)=>sw(K1({},"__esModule",{value:!0}),$),l8={};lw(l8,{Field:()=>rw,Fields:()=>ow,HttpRequest:()=>aw,HttpResponse:()=>tw,IHttpRequest:()=>s8.HttpRequest,getHttpHandlerExtensionConfiguration:()=>nw,isValidHostname:()=>a8,resolveHttpHandlerRuntimeConfig:()=>iw});t8.exports=mw(l8);var nw=$0(($)=>{let U=$.httpHandler;return{setHttpHandler(G){U=G},httpHandler(){return U},updateHttpClientConfig(G,W){U.updateHttpClientConfig(G,W)},httpHandlerConfigs(){return U.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),iw=$0(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),s8=Q0(),m8=class ${constructor({name:U,kind:G=s8.FieldPosition.HEADER,values:W=[]}){this.name=U,this.kind=G,this.values=W}add(U){this.values.push(U)}set(U){this.values=U}remove(U){this.values=this.values.filter((G)=>G!==U)}toString(){return this.values.map((U)=>U.includes(",")||U.includes(" ")?`"${U}"`:U).join(", ")}get(){return this.values}};$0(m8,"Field");var rw=m8,n8=class ${constructor({fields:U=[],encoding:G="utf-8"}){this.entries={},U.forEach(this.setField.bind(this)),this.encoding=G}setField(U){this.entries[U.name.toLowerCase()]=U}getField(U){return this.entries[U.toLowerCase()]}removeField(U){delete this.entries[U.toLowerCase()]}getByType(U){return Object.values(this.entries).filter((G)=>G.kind===U)}};$0(n8,"Fields");var ow=n8,i8=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=r8(G.query);return G}static isInstance(U){if(!U)return!1;const G=U;return"method"in G&&"protocol"in G&&"hostname"in G&&"path"in G&&typeof G.query==="object"&&typeof G.headers==="object"}clone(){return $.clone(this)}};$0(i8,"HttpRequest");var aw=i8;$0(r8,"cloneQuery");var o8=class ${constructor(U){this.statusCode=U.statusCode,this.reason=U.reason,this.headers=U.headers||{},this.body=U.body}static isInstance(U){if(!U)return!1;const G=U;return typeof G.statusCode==="number"&&typeof G.headers==="object"}};$0(o8,"HttpResponse");var tw=o8;$0(a8,"isValidHostname")});var j$=M((Q3,G4)=>{var{defineProperty:M1,getOwnPropertyDescriptor:ew,getOwnPropertyNames:$2}=Object,U2=Object.prototype.hasOwnProperty,H0=($,U)=>M1($,"name",{value:U,configurable:!0}),G2=($,U)=>{for(var G in U)M1($,G,{get:U[G],enumerable:!0})},W2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of $2(U))if(!U2.call($,X)&&X!==G)M1($,X,{get:()=>U[X],enumerable:!(W=ew(U,X))||W.enumerable})}return $},X2=($)=>W2(M1({},"__esModule",{value:!0}),$),e8={};G2(e8,{isClockSkewCorrectedError:()=>$4,isClockSkewError:()=>F2,isRetryableByTrait:()=>z2,isServerError:()=>J2,isThrottlingError:()=>R2,isTransientError:()=>U4});G4.exports=X2(e8);var Z2=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],L2=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Y2=["TimeoutError","RequestTimeout","RequestTimeoutException"],w2=[500,502,503,504],Q2=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],z2=H0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),F2=H0(($)=>Z2.includes($.name),"isClockSkewError"),$4=H0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),R2=H0(($)=>{var U,G;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||L2.includes($.name)||((G=$.$retryable)==null?void 0:G.throttling)==!0},"isThrottlingError"),U4=H0(($)=>{var U;return $4($)||Y2.includes($.name)||Q2.includes(($==null?void 0:$.code)||"")||w2.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),J2=H0(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const G=$.$metadata.httpStatusCode;if(500<=G&&G<=599&&!U4($))return!0;return!1}return!1},"isServerError")});var M4=M((z3,K4)=>{var{defineProperty:E1,getOwnPropertyDescriptor:I2,getOwnPropertyNames:K2}=Object,M2=Object.prototype.hasOwnProperty,m=($,U)=>E1($,"name",{value:U,configurable:!0}),E2=($,U)=>{for(var G in U)E1($,G,{get:U[G],enumerable:!0})},B2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of K2(U))if(!M2.call($,X)&&X!==G)E1($,X,{get:()=>U[X],enumerable:!(W=I2(U,X))||W.enumerable})}return $},V2=($)=>B2(E1({},"__esModule",{value:!0}),$),X4={};E2(X4,{AdaptiveRetryStrategy:()=>f2,ConfiguredRetryStrategy:()=>q2,DEFAULT_MAX_ATTEMPTS:()=>S$,DEFAULT_RETRY_DELAY_BASE:()=>y0,DEFAULT_RETRY_MODE:()=>T2,DefaultRateLimiter:()=>Y4,INITIAL_RETRY_TOKENS:()=>k$,INVOCATION_ID_HEADER:()=>A2,MAXIMUM_RETRY_DELAY:()=>D$,NO_RETRY_INCREMENT:()=>F4,REQUEST_HEADER:()=>O2,RETRY_COST:()=>Q4,RETRY_MODES:()=>Z4,StandardRetryStrategy:()=>b$,THROTTLING_RETRY_DELAY_BASE:()=>w4,TIMEOUT_RETRY_COST:()=>z4});K4.exports=V2(X4);var Z4=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(Z4||{}),S$=3,T2="standard",H2=j$(),L4=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(),H2.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(L4,"DefaultRateLimiter");var Y4=L4,y0=100,D$=20000,w4=500,k$=500,Q4=5,z4=10,F4=1,A2="amz-sdk-invocation-id",O2="amz-sdk-request",C2=m(()=>{let $=y0;return{computeNextBackoffDelay:m((W)=>{return Math.floor(Math.min(D$,Math.random()*2**W*$))},"computeNextBackoffDelay"),setDelayBase:m((W)=>{$=W},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),W4=m(({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:m(()=>U,"getRetryCount"),getRetryDelay:m(()=>Math.min(D$,$),"getRetryDelay"),getRetryCost:m(()=>G,"getRetryCost")}},"createDefaultRetryToken"),R4=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=k$,this.retryBackoffStrategy=C2(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return W4({retryDelay:y0,retryCount:0})}async refreshRetryTokenForRetry(U,G){const W=await this.getMaxAttempts();if(this.shouldRetry(U,G,W)){const X=G.errorType;this.retryBackoffStrategy.setDelayBase(X==="THROTTLING"?w4:y0);const Z=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),L=G.retryAfterHint?Math.max(G.retryAfterHint.getTime()-Date.now()||0,Z):Z,Y=this.getCapacityCost(X);return this.capacity-=Y,W4({retryDelay:L,retryCount:U.getRetryCount()+1,retryCost:Y})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(k$,this.capacity+(U.getRetryCost()??F4))}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 ${S$}`),S$}}shouldRetry(U,G,W){return U.getRetryCount()+1<W&&this.capacity>=this.getCapacityCost(G.errorType)&&this.isRetryableError(G.errorType)}getCapacityCost(U){return U==="TRANSIENT"?z4:Q4}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};m(R4,"StandardRetryStrategy");var b$=R4,J4=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:W}=G??{};this.rateLimiter=W??new Y4,this.standardRetryStrategy=new b$(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 f2=J4,I4=class $ extends b${constructor(U,G=y0){super(typeof U==="function"?U:async()=>U);if(typeof G==="number")this.computeNextBackoffDelay=()=>G;else this.computeNextBackoffDelay=G}async refreshRetryTokenForRetry(U,G){const W=await super.refreshRetryTokenForRetry(U,G);return W.getRetryDelay=()=>this.computeNextBackoffDelay(W.getRetryCount()),W}};m(I4,"ConfiguredRetryStrategy");var q2=I4});var H4=M((F3,T4)=>{var{defineProperty:B1,getOwnPropertyDescriptor:N2,getOwnPropertyNames:P2}=Object,j2=Object.prototype.hasOwnProperty,_=($,U)=>B1($,"name",{value:U,configurable:!0}),S2=($,U)=>{for(var G in U)B1($,G,{get:U[G],enumerable:!0})},k2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of P2(U))if(!j2.call($,X)&&X!==G)B1($,X,{get:()=>U[X],enumerable:!(W=N2(U,X))||W.enumerable})}return $},D2=($)=>k2(B1({},"__esModule",{value:!0}),$),V4={};S2(V4,{constructStack:()=>h$});T4.exports=D2(V4);var F0=_(($,U)=>{const G=[];if($)G.push($);if(U)for(let W of U)G.push(W);return G},"getAllAliases"),U0=_(($,U)=>{return`${$||"anonymous"}${U&&U.length>0?` (a.k.a. ${U.join(",")})`:""}`},"getMiddlewareNameWithAliases"),h$=_(()=>{let $=[],U=[],G=!1;const W=new Set,X=_((F)=>F.sort((R,J)=>E4[J.step]-E4[R.step]||B4[J.priority||"normal"]-B4[R.priority||"normal"]),"sort"),Z=_((F)=>{let R=!1;const J=_((I)=>{const B=F0(I.name,I.aliases);if(B.includes(F)){R=!0;for(let E of B)W.delete(E);return!1}return!0},"filterCb");return $=$.filter(J),U=U.filter(J),R},"removeByName"),L=_((F)=>{let R=!1;const J=_((I)=>{if(I.middleware===F){R=!0;for(let B of F0(I.name,I.aliases))W.delete(B);return!1}return!0},"filterCb");return $=$.filter(J),U=U.filter(J),R},"removeByReference"),Y=_((F)=>{var R;return $.forEach((J)=>{F.add(J.middleware,{...J})}),U.forEach((J)=>{F.addRelativeTo(J.middleware,{...J})}),(R=F.identifyOnResolve)==null||R.call(F,z.identifyOnResolve()),F},"cloneTo"),w=_((F)=>{const R=[];return F.before.forEach((J)=>{if(J.before.length===0&&J.after.length===0)R.push(J);else R.push(...w(J))}),R.push(F),F.after.reverse().forEach((J)=>{if(J.before.length===0&&J.after.length===0)R.push(J);else R.push(...w(J))}),R},"expandRelativeMiddlewareList"),Q=_((F=!1)=>{const R=[],J=[],I={};return $.forEach((E)=>{const V={...E,before:[],after:[]};for(let T of F0(V.name,V.aliases))I[T]=V;R.push(V)}),U.forEach((E)=>{const V={...E,before:[],after:[]};for(let T of F0(V.name,V.aliases))I[T]=V;J.push(V)}),J.forEach((E)=>{if(E.toMiddleware){const V=I[E.toMiddleware];if(V===void 0){if(F)return;throw new Error(`${E.toMiddleware} is not found when adding ${U0(E.name,E.aliases)} middleware ${E.relation} ${E.toMiddleware}`)}if(E.relation==="after")V.after.push(E);if(E.relation==="before")V.before.push(E)}}),X(R).map(w).reduce((E,V)=>{return E.push(...V),E},[])},"getMiddlewareList"),z={add:(F,R={})=>{const{name:J,override:I,aliases:B}=R,E={step:"initialize",priority:"normal",middleware:F,...R},V=F0(J,B);if(V.length>0){if(V.some((T)=>W.has(T))){if(!I)throw new Error(`Duplicate middleware name '${U0(J,B)}'`);for(let T of V){const H=$.findIndex((S)=>{var h;return S.name===T||((h=S.aliases)==null?void 0:h.some((w0)=>w0===T))});if(H===-1)continue;const A=$[H];if(A.step!==E.step||E.priority!==A.priority)throw new Error(`"${U0(A.name,A.aliases)}" middleware with ${A.priority} priority in ${A.step} step cannot be overridden by "${U0(J,B)}" middleware with ${E.priority} priority in ${E.step} step.`);$.splice(H,1)}}for(let T of V)W.add(T)}$.push(E)},addRelativeTo:(F,R)=>{const{name:J,override:I,aliases:B}=R,E={middleware:F,...R},V=F0(J,B);if(V.length>0){if(V.some((T)=>W.has(T))){if(!I)throw new Error(`Duplicate middleware name '${U0(J,B)}'`);for(let T of V){const H=U.findIndex((S)=>{var h;return S.name===T||((h=S.aliases)==null?void 0:h.some((w0)=>w0===T))});if(H===-1)continue;const A=U[H];if(A.toMiddleware!==E.toMiddleware||A.relation!==E.relation)throw new Error(`"${U0(A.name,A.aliases)}" middleware ${A.relation} "${A.toMiddleware}" middleware cannot be overridden by "${U0(J,B)}" middleware ${E.relation} "${E.toMiddleware}" middleware.`);U.splice(H,1)}}for(let T of V)W.add(T)}U.push(E)},clone:()=>Y(h$()),use:(F)=>{F.applyToStack(z)},remove:(F)=>{if(typeof F==="string")return Z(F);else return L(F)},removeByTag:(F)=>{let R=!1;const J=_((I)=>{const{tags:B,name:E,aliases:V}=I;if(B&&B.includes(F)){const T=F0(E,V);for(let H of T)W.delete(H);return R=!0,!1}return!0},"filterCb");return $=$.filter(J),U=U.filter(J),R},concat:(F)=>{var R;const J=Y(h$());return J.use(F),J.identifyOnResolve(G||J.identifyOnResolve()||(((R=F.identifyOnResolve)==null?void 0:R.call(F))??!1)),J},applyToStack:Y,identify:()=>{return Q(!0).map((F)=>{const R=F.step??F.relation+" "+F.toMiddleware;return U0(F.name,F.aliases)+" - "+R})},identifyOnResolve(F){if(typeof F==="boolean")G=F;return G},resolve:(F,R)=>{for(let J of Q().map((I)=>I.middleware).reverse())F=J(F,R);if(G)console.log(z.identify());return F}};return z},"constructStack"),E4={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},B4={high:3,normal:2,low:1}});var x$=M((R3,O4)=>{var{defineProperty:V1,getOwnPropertyDescriptor:b2,getOwnPropertyNames:h2}=Object,x2=Object.prototype.hasOwnProperty,v2=($,U)=>V1($,"name",{value:U,configurable:!0}),c2=($,U)=>{for(var G in U)V1($,G,{get:U[G],enumerable:!0})},y2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of h2(U))if(!x2.call($,X)&&X!==G)V1($,X,{get:()=>U[X],enumerable:!(W=b2(U,X))||W.enumerable})}return $},u2=($)=>y2(V1({},"__esModule",{value:!0}),$),A4={};c2(A4,{isArrayBuffer:()=>_2});O4.exports=u2(A4);var _2=v2(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var u0=M((J3,q4)=>{var{defineProperty:T1,getOwnPropertyDescriptor:d2,getOwnPropertyNames:g2}=Object,p2=Object.prototype.hasOwnProperty,C4=($,U)=>T1($,"name",{value:U,configurable:!0}),l2=($,U)=>{for(var G in U)T1($,G,{get:U[G],enumerable:!0})},s2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of g2(U))if(!p2.call($,X)&&X!==G)T1($,X,{get:()=>U[X],enumerable:!(W=d2(U,X))||W.enumerable})}return $},m2=($)=>s2(T1({},"__esModule",{value:!0}),$),f4={};l2(f4,{fromArrayBuffer:()=>i2,fromString:()=>r2});q4.exports=m2(f4);var n2=x$(),v$=import.meta.require("buffer"),i2=C4(($,U=0,G=$.byteLength-U)=>{if(!n2.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return v$.Buffer.from($,U,G)},"fromArrayBuffer"),r2=C4(($,U)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return U?v$.Buffer.from($,U):v$.Buffer.from($)},"fromString")});var j4=M((N4)=>{Object.defineProperty(N4,"__esModule",{value:!0});N4.fromBase64=void 0;var o2=u0(),a2=/^[A-Za-z0-9+/]*={0,2}$/,t2=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!a2.exec($))throw new TypeError("Invalid base64 string.");const U=o2.fromString($,"base64");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength)};N4.fromBase64=t2});var G0=M((K3,b4)=>{var{defineProperty:H1,getOwnPropertyDescriptor:e2,getOwnPropertyNames:$9}=Object,U9=Object.prototype.hasOwnProperty,c$=($,U)=>H1($,"name",{value:U,configurable:!0}),G9=($,U)=>{for(var G in U)H1($,G,{get:U[G],enumerable:!0})},W9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of $9(U))if(!U9.call($,X)&&X!==G)H1($,X,{get:()=>U[X],enumerable:!(W=e2(U,X))||W.enumerable})}return $},X9=($)=>W9(H1({},"__esModule",{value:!0}),$),S4={};G9(S4,{fromUtf8:()=>D4,toUint8Array:()=>Z9,toUtf8:()=>L9});b4.exports=X9(S4);var k4=u0(),D4=c$(($)=>{const U=k4.fromString($,"utf8");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Z9=c$(($)=>{if(typeof $==="string")return D4($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),L9=c$(($)=>{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 k4.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var v4=M((h4)=>{Object.defineProperty(h4,"__esModule",{value:!0});h4.toBase64=void 0;var Y9=u0(),w9=G0(),Q9=($)=>{let U;if(typeof $==="string")U=w9.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 Y9.fromArrayBuffer(U.buffer,U.byteOffset,U.byteLength).toString("base64")};h4.toBase64=Q9});var O1=M((E3,A1)=>{var{defineProperty:c4,getOwnPropertyDescriptor:z9,getOwnPropertyNames:F9}=Object,R9=Object.prototype.hasOwnProperty,y$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of F9(U))if(!R9.call($,X)&&X!==G)c4($,X,{get:()=>U[X],enumerable:!(W=z9(U,X))||W.enumerable})}return $},y4=($,U,G)=>(y$($,U,"default"),G&&y$(G,U,"default")),J9=($)=>y$(c4({},"__esModule",{value:!0}),$),u$={};A1.exports=J9(u$);y4(u$,j4(),A1.exports);y4(u$,v4(),A1.exports)});var d4=M((u4)=>{Object.defineProperty(u4,"__esModule",{value:!0});u4.getAwsChunkedEncodingStream=void 0;var I9=import.meta.require("stream"),K9=($,U)=>{const{base64Encoder:G,bodyLengthChecker:W,checksumAlgorithmFn:X,checksumLocationName:Z,streamHasher:L}=U,Y=G!==void 0&&X!==void 0&&Z!==void 0&&L!==void 0,w=Y?L(X,$):void 0,Q=new I9.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"),Y){const z=G(await w);Q.push(`${Z}:${z}\r\n`),Q.push("\r\n")}Q.push(null)}),Q};u4.getAwsChunkedEncodingStream=K9});var d$=M((V3,s4)=>{function l4($){const U=[];for(let G of Object.keys($).sort()){const W=$[G];if(G=_$.escapeUri(G),Array.isArray(W))for(let X=0,Z=W.length;X<Z;X++)U.push(`${G}=${_$.escapeUri(W[X])}`);else{let X=G;if(W||typeof W==="string")X+=`=${_$.escapeUri(W)}`;U.push(X)}}return U.join("&")}var{defineProperty:C1,getOwnPropertyDescriptor:M9,getOwnPropertyNames:E9}=Object,B9=Object.prototype.hasOwnProperty,V9=($,U)=>C1($,"name",{value:U,configurable:!0}),T9=($,U)=>{for(var G in U)C1($,G,{get:U[G],enumerable:!0})},H9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of E9(U))if(!B9.call($,X)&&X!==G)C1($,X,{get:()=>U[X],enumerable:!(W=M9(U,X))||W.enumerable})}return $},A9=($)=>H9(C1({},"__esModule",{value:!0}),$),p4={};T9(p4,{buildQueryString:()=>l4});s4.exports=A9(p4);var _$=g4();V9(l4,"buildQueryString")});var z6=M((T3,Q6)=>{async function l$($,U,G=i4){const W=U.headers??{},X=W.Expect||W.expect;let Z=-1,L=!1;if(X==="100-continue")await Promise.race([new Promise((Y)=>{Z=Number(setTimeout(Y,Math.max(i4,G)))}),new Promise((Y)=>{$.on("continue",()=>{clearTimeout(Z),Y()}),$.on("error",()=>{L=!0,clearTimeout(Z),Y()})})]);if(!L)G6($,U.body)}function G6($,U){if(U instanceof U6.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 w6($){const U=[],G=$.getReader();let W=!1,X=0;while(!W){const{done:Y,value:w}=await G.read();if(w)U.push(w),X+=w.length;W=Y}const Z=new Uint8Array(X);let L=0;for(let Y of U)Z.set(Y,L),L+=Y.length;return Z}var{create:O9,defineProperty:_0,getOwnPropertyDescriptor:C9,getOwnPropertyNames:f9,getPrototypeOf:q9}=Object,N9=Object.prototype.hasOwnProperty,O=($,U)=>_0($,"name",{value:U,configurable:!0}),P9=($,U)=>{for(var G in U)_0($,G,{get:U[G],enumerable:!0})},o4=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of f9(U))if(!N9.call($,X)&&X!==G)_0($,X,{get:()=>U[X],enumerable:!(W=C9(U,X))||W.enumerable})}return $},j9=($,U,G)=>(G=$!=null?O9(q9($)):{},o4(U||!$||!$.__esModule?_0(G,"default",{value:$,enumerable:!0}):G,$)),S9=($)=>o4(_0({},"__esModule",{value:!0}),$),a4={};P9(a4,{DEFAULT_REQUEST_TIMEOUT:()=>v9,NodeHttp2Handler:()=>d9,NodeHttpHandler:()=>c9,streamCollector:()=>p9});Q6.exports=S9(a4);var t4=o(),e4=d$(),g$=import.meta.require("http"),p$=import.meta.require("https"),k9=["ECONNRESET","EPIPE","ETIMEDOUT"],$6=O(($)=>{const U={};for(let G of Object.keys($)){const W=$[G];U[G]=Array.isArray(W)?W.join(","):W}return U},"getTransformedHeaders"),m4=1000,D9=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),L=O((Y)=>{if(Y==null?void 0:Y.connecting)Y.on("connect",()=>{clearTimeout(Z)});else clearTimeout(Z)},"doWithSocket");if($.socket)L($.socket);else $.on("socket",L)},"registerTimeout");if(G<2000)return W(0),0;return setTimeout(W.bind(null,m4),m4)},"setConnectionTimeout"),b9=3000,h9=O(($,{keepAlive:U,keepAliveMsecs:G},W=b9)=>{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"),n4=3000,x9=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:n4),n4)},"setSocketTimeout"),U6=import.meta.require("stream"),i4=1000;O(l$,"writeRequestBody");O(G6,"writeBody");var v9=0,W6=class ${constructor(U){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((X)=>{G(this.resolveDefaultConfig(X))}).catch(W);else G(this.resolveDefaultConfig(U))})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}static checkSocketUsage(U,G,W=console){var X,Z,L;const{sockets:Y,requests:w,maxSockets:Q}=U;if(typeof Q!=="number"||Q===1/0)return G;const z=15000;if(Date.now()-z<G)return G;if(Y&&w)for(let F in Y){const R=((X=Y[F])==null?void 0:X.length)??0,J=((Z=w[F])==null?void 0:Z.length)??0;if(R>=Q&&J>=2*Q)return(L=W==null?void 0:W.warn)==null||L.call(W,`@smithy/node-http-handler:WARN - socket usage at capacity=${R} and ${J} additional requests are enqueued.
|
|
2
|
-
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
-
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return G}resolveDefaultConfig(U){const{requestTimeout:G,connectionTimeout:W,socketTimeout:X,httpAgent:Z,httpsAgent:L}=U||{};return{connectionTimeout:W,requestTimeout:G??X,httpAgent:(()=>{if(Z instanceof g$.Agent||typeof(Z==null?void 0:Z.destroy)==="function")return Z;return new g$.Agent({keepAlive:!0,maxSockets:50,...Z})})(),httpsAgent:(()=>{if(L instanceof p$.Agent||typeof(L==null?void 0:L.destroy)==="function")return L;return new p$.Agent({keepAlive:!0,maxSockets:50,...L})})(),logger:console}}destroy(){var U,G,W,X;(G=(U=this.config)==null?void 0:U.httpAgent)==null||G.destroy(),(X=(W=this.config)==null?void 0:W.httpsAgent)==null||X.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;return new Promise((W,X)=>{let Z=void 0;const L=[],Y=O(async(H)=>{await Z,L.forEach(clearTimeout),W(H)},"resolve"),w=O(async(H)=>{await Z,L.forEach(clearTimeout),X(H)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(G==null?void 0:G.aborted){const H=new Error("Request aborted");H.name="AbortError",w(H);return}const Q=U.protocol==="https:",z=Q?this.config.httpsAgent:this.config.httpAgent;L.push(setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(z,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const F=e4.buildQueryString(U.query||{});let R=void 0;if(U.username!=null||U.password!=null){const H=U.username??"",A=U.password??"";R=`${H}:${A}`}let J=U.path;if(F)J+=`?${F}`;if(U.fragment)J+=`#${U.fragment}`;let I=U.hostname??"";if(I[0]==="["&&I.endsWith("]"))I=U.hostname.slice(1,-1);else I=U.hostname;const B={headers:U.headers,host:I,method:U.method,path:J,port:U.port,agent:z,auth:R},V=(Q?p$.request:g$.request)(B,(H)=>{const A=new t4.HttpResponse({statusCode:H.statusCode||-1,reason:H.statusMessage,headers:$6(H.headers),body:H});Y({response:A})});if(V.on("error",(H)=>{if(k9.includes(H.code))w(Object.assign(H,{name:"TimeoutError"}));else w(H)}),G){const H=O(()=>{V.destroy();const A=new Error("Request aborted");A.name="AbortError",w(A)},"onAbort");if(typeof G.addEventListener==="function"){const A=G;A.addEventListener("abort",H,{once:!0}),V.once("close",()=>A.removeEventListener("abort",H))}else G.onabort=H}L.push(D9(V,w,this.config.connectionTimeout)),L.push(x9(V,w,this.config.requestTimeout));const T=B.agent;if(typeof T==="object"&&"keepAlive"in T)L.push(h9(V,{keepAlive:T.keepAlive,keepAliveMsecs:T.keepAliveMsecs}));Z=l$(V,U,this.config.requestTimeout).catch((H)=>{return L.forEach(clearTimeout),X(H)})})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}};O(W6,"NodeHttpHandler");var c9=W6,r4=import.meta.require("http2"),y9=j9(import.meta.require("http2")),X6=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(X6,"NodeHttp2ConnectionPool");var u9=X6,Z6=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=y9.default.connect(W);if(this.config.maxConcurrency)Z.settings({maxConcurrentStreams:this.config.maxConcurrency},(w)=>{if(w)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});Z.unref();const L=O(()=>{Z.destroy(),this.deleteSession(W,Z)},"destroySessionCb");if(Z.on("goaway",L),Z.on("error",L),Z.on("frameError",L),Z.on("close",()=>this.deleteSession(W,Z)),G.requestTimeout)Z.setTimeout(G.requestTimeout,L);const Y=this.sessionCache.get(W)||new u9;return Y.offerLast(Z),this.sessionCache.set(W,Y),Z}deleteSession(U,G){const W=this.sessionCache.get(U);if(!W)return;if(!W.contains(G))return;W.remove(G),this.sessionCache.set(U,W)}release(U,G){var W;const X=this.getUrlString(U);(W=this.sessionCache.get(X))==null||W.offerLast(G)}destroy(){for(let[U,G]of this.sessionCache){for(let W of G){if(!W.destroyed)W.destroy();G.remove(W)}this.sessionCache.delete(U)}}setMaxConcurrentStreams(U){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=U}setDisableConcurrentStreams(U){this.config.disableConcurrency=U}getUrlString(U){return U.destination.toString()}};O(Z6,"NodeHttp2ConnectionManager");var _9=Z6,L6=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new _9({}),this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((X)=>{G(X||{})}).catch(W);else G(U||{})})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}destroy(){this.connectionManager.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:W,disableConcurrentStreams:X}=this.config;return new Promise((Z,L)=>{var Y;let w=!1,Q=void 0;const z=O(async(N)=>{await Q,Z(N)},"resolve"),F=O(async(N)=>{await Q,L(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:R,method:J,port:I,protocol:B,query:E}=U;let V="";if(U.username!=null||U.password!=null){const N=U.username??"",p=U.password??"";V=`${N}:${p}@`}const T=`${B}//${V}${R}${I?`:${I}`:""}`,H={destination:new URL(T)},A=this.connectionManager.lease(H,{requestTimeout:(Y=this.config)==null?void 0:Y.sessionTimeout,disableConcurrentStreams:X||!1}),S=O((N)=>{if(X)this.destroySession(A);w=!0,F(N)},"rejectWithDestroy"),h=e4.buildQueryString(E||{});let w0=U.path;if(h)w0+=`?${h}`;if(U.fragment)w0+=`#${U.fragment}`;const c=A.request({...U.headers,[r4.constants.HTTP2_HEADER_PATH]:w0,[r4.constants.HTTP2_HEADER_METHOD]:J});if(A.ref(),c.on("response",(N)=>{const p=new t4.HttpResponse({statusCode:N[":status"]||-1,headers:$6(N),body:c});if(w=!0,z({response:p}),X)A.close(),this.connectionManager.deleteSession(T,A)}),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,jL)=>{S(new Error(`Frame type id ${N} in stream id ${jL} 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(A.unref(),X)A.destroy();if(!w)S(new Error("Unexpected error: http2 request did not get a response"))}),Q=l$(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(L6,"NodeHttp2Handler");var d9=L6,Y6=class $ extends U6.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,G,W){this.bufferedBytes.push(U),W()}};O(Y6,"Collector");var g9=Y6,p9=O(($)=>{if(l9($))return w6($);return new Promise((U,G)=>{const W=new g9;$.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"),l9=O(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");O(w6,"collectReadableStream")});var V6=M((H3,B6)=>{function J6($=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 E6($),G=e9.fromBase64(U);return new Uint8Array(G)}async function M6($){const U=[],G=$.getReader();let W=!1,X=0;while(!W){const{done:Y,value:w}=await G.read();if(w)U.push(w),X+=w.length;W=Y}const Z=new Uint8Array(X);let L=0;for(let Y of U)Z.set(Y,L),L+=Y.length;return Z}function E6($){return new Promise((U,G)=>{const W=new FileReader;W.onloadend=()=>{if(W.readyState!==2)return G(new Error("Reader aborted too early"));const X=W.result??"",Z=X.indexOf(","),L=Z>-1?Z+1:X.length;U(X.substring(L))},W.onabort=()=>G(new Error("Read aborted")),W.onerror=()=>G(W.error),W.readAsDataURL($)})}var{defineProperty:q1,getOwnPropertyDescriptor:s9,getOwnPropertyNames:m9}=Object,n9=Object.prototype.hasOwnProperty,a=($,U)=>q1($,"name",{value:U,configurable:!0}),i9=($,U)=>{for(var G in U)q1($,G,{get:U[G],enumerable:!0})},r9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of m9(U))if(!n9.call($,X)&&X!==G)q1($,X,{get:()=>U[X],enumerable:!(W=s9(U,X))||W.enumerable})}return $},o9=($)=>r9(q1({},"__esModule",{value:!0}),$),R6={};i9(R6,{FetchHttpHandler:()=>t9,keepAliveSupport:()=>f1,streamCollector:()=>$Q});B6.exports=o9(R6);var F6=o(),a9=d$();a(J6,"requestTimeout");var f1={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(f1.supported===void 0)f1.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,L=this.config.credentials;if(G==null?void 0:G.aborted){const T=new Error("Request aborted");return T.name="AbortError",Promise.reject(T)}let Y=U.path;const w=a9.buildQueryString(U.query||{});if(w)Y+=`?${w}`;if(U.fragment)Y+=`#${U.fragment}`;let Q="";if(U.username!=null||U.password!=null){const T=U.username??"",H=U.password??"";Q=`${T}:${H}@`}const{port:z,method:F}=U,R=`${U.protocol}//${Q}${U.hostname}${z?`:${z}`:""}${Y}`,J=F==="GET"||F==="HEAD"?void 0:U.body,I={body:J,headers:new Headers(U.headers),method:F,credentials:L};if((W=this.config)==null?void 0:W.cache)I.cache=this.config.cache;if(J)I.duplex="half";if(typeof AbortController!=="undefined")I.signal=G;if(f1.supported)I.keepalive=Z;if(typeof this.config.requestInit==="function")Object.assign(I,this.config.requestInit(U));let B=a(()=>{},"removeSignalEventListener");const E=new Request(R,I),V=[fetch(E).then((T)=>{const H=T.headers,A={};for(let h of H.entries())A[h[0]]=h[1];if(T.body==null)return T.blob().then((h)=>({response:new F6.HttpResponse({headers:A,reason:T.statusText,statusCode:T.status,body:h})}));return{response:new F6.HttpResponse({headers:A,reason:T.statusText,statusCode:T.status,body:T.body})}}),J6(X)];if(G)V.push(new Promise((T,H)=>{const A=a(()=>{const S=new Error("Request aborted");S.name="AbortError",H(S)},"onAbort");if(typeof G.addEventListener==="function"){const S=G;S.addEventListener("abort",A,{once:!0}),B=a(()=>S.removeEventListener("abort",A),"removeSignalEventListener")}else G.onabort=A}));return Promise.race(V).finally(B)}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return W[U]=G,W})}httpHandlerConfigs(){return this.config??{}}};a(I6,"FetchHttpHandler");var t9=I6,e9=O1(),$Q=a(($)=>{if(typeof Blob==="function"&&$ instanceof Blob)return K6($);return M6($)},"streamCollector");a(K6,"collectBlob");a(M6,"collectStream");a(E6,"readToBase64")});var d0=M((T6)=>{Object.defineProperty(T6,"__esModule",{value:!0});T6.isReadableStream=void 0;var UQ=($)=>{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)};T6.isReadableStream=UQ});var P6=M((q6)=>{Object.defineProperty(q6,"__esModule",{value:!0});q6.sdkStreamMixin=void 0;var GQ=V6(),WQ=O1(),XQ=f6(),ZQ=G0(),A6=d0(),O6="The stream has already been transformed.",LQ=($)=>{var U,G;if(!C6($)&&!A6.isReadableStream($)){const L=((G=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||G===void 0?void 0:G.name)||$;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${L}`)}let W=!1;const X=async()=>{if(W)throw new Error(O6);return W=!0,await GQ.streamCollector($)},Z=(L)=>{if(typeof L.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return L.stream()};return Object.assign($,{transformToByteArray:X,transformToString:async(L)=>{const Y=await X();if(L==="base64")return WQ.toBase64(Y);else if(L==="hex")return XQ.toHex(Y);else if(L===void 0||L==="utf8"||L==="utf-8")return ZQ.toUtf8(Y);else if(typeof TextDecoder==="function")return new TextDecoder(L).decode(Y);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(W)throw new Error(O6);if(W=!0,C6($))return Z($);else if(A6.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};q6.sdkStreamMixin=LQ;var C6=($)=>typeof Blob==="function"&&$ instanceof Blob});var D6=M((S6)=>{Object.defineProperty(S6,"__esModule",{value:!0});S6.sdkStreamMixin=void 0;var YQ=z6(),wQ=u0(),s$=import.meta.require("stream"),QQ=import.meta.require("util"),zQ=P6(),j6="The stream has already been transformed.",FQ=($)=>{var U,G;if(!($ instanceof s$.Readable))try{return zQ.sdkStreamMixin($)}catch(Z){const L=((G=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||G===void 0?void 0:G.name)||$;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${L}`)}let W=!1;const X=async()=>{if(W)throw new Error(j6);return W=!0,await YQ.streamCollector($)};return Object.assign($,{transformToByteArray:X,transformToString:async(Z)=>{const L=await X();if(Z===void 0||Buffer.isEncoding(Z))return wQ.fromArrayBuffer(L.buffer,L.byteOffset,L.byteLength).toString(Z);else return new QQ.TextDecoder(Z).decode(L)},transformToWebStream:()=>{if(W)throw new Error(j6);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof s$.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,s$.Readable.toWeb($)}})};S6.sdkStreamMixin=FQ});var x6=M((b6)=>{async function RQ($){if(typeof $.stream==="function")$=$.stream();return $.tee()}Object.defineProperty(b6,"__esModule",{value:!0});b6.splitStream=void 0;b6.splitStream=RQ});var u6=M((c6)=>{async function KQ($){if(IQ.isReadableStream($))return JQ.splitStream($);const U=new v6.PassThrough,G=new v6.PassThrough;return $.pipe(U),$.pipe(G),[U,G]}Object.defineProperty(c6,"__esModule",{value:!0});c6.splitStream=void 0;var v6=import.meta.require("stream"),JQ=x6(),IQ=d0();c6.splitStream=KQ});var g6=M((_6)=>{async function MQ($,U){var G;let W=0;const X=[],Z=$.getReader();let L=!1;while(!L){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;L=Q}Z.releaseLock();const Y=new Uint8Array(Math.min(U,W));let w=0;for(let Q of X){if(Q.byteLength>Y.byteLength-w){Y.set(Q.subarray(0,Y.byteLength-w),w);break}else Y.set(Q,w);w+=Q.length}return Y}Object.defineProperty(_6,"__esModule",{value:!0});_6.headStream=void 0;_6.headStream=MQ});var m6=M((l6)=>{Object.defineProperty(l6,"__esModule",{value:!0});l6.headStream=void 0;var EQ=import.meta.require("stream"),BQ=g6(),VQ=d0(),TQ=($,U)=>{if(VQ.isReadableStream($))return BQ.headStream($,U);return new Promise((G,W)=>{const X=new p6;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)})})};l6.headStream=TQ;class p6 extends EQ.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write($,U,G){var W;if(this.buffers.push($),this.bytesBuffered+=(W=$.byteLength)!==null&&W!==void 0?W:0,this.bytesBuffered>=this.limit){const 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 t6=M((j3,J0)=>{function r6($,U="utf-8"){if(U==="base64")return n6.toBase64($);return i6.toUtf8($)}function o6($,U){if(U==="base64")return n$.mutate(n6.fromBase64($));return n$.mutate(i6.fromUtf8($))}var{defineProperty:N1,getOwnPropertyDescriptor:HQ,getOwnPropertyNames:AQ}=Object,OQ=Object.prototype.hasOwnProperty,i$=($,U)=>N1($,"name",{value:U,configurable:!0}),CQ=($,U)=>{for(var G in U)N1($,G,{get:U[G],enumerable:!0})},m$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of AQ(U))if(!OQ.call($,X)&&X!==G)N1($,X,{get:()=>U[X],enumerable:!(W=HQ(U,X))||W.enumerable})}return $},g0=($,U,G)=>(m$($,U,"default"),G&&m$(G,U,"default")),fQ=($)=>m$(N1({},"__esModule",{value:!0}),$),R0={};CQ(R0,{Uint8ArrayBlobAdapter:()=>n$});J0.exports=fQ(R0);var n6=O1(),i6=G0();i$(r6,"transformToString");i$(o6,"transformFromString");var a6=class $ extends Uint8Array{static fromString(U,G="utf-8"){switch(typeof U){case"string":return o6(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 r6(this,U)}};i$(a6,"Uint8ArrayBlobAdapter");var n$=a6;g0(R0,d4(),J0.exports);g0(R0,D6(),J0.exports);g0(R0,u6(),J0.exports);g0(R0,m6(),J0.exports);g0(R0,d0(),J0.exports)});var f0=M((S3,HW)=>{function RW($){const U=$.getUTCFullYear(),G=$.getUTCMonth(),W=$.getUTCDay(),X=$.getUTCDate(),Z=$.getUTCHours(),L=$.getUTCMinutes(),Y=$.getUTCSeconds(),w=X<10?`0${X}`:`${X}`,Q=Z<10?`0${Z}`:`${Z}`,z=L<10?`0${L}`:`${L}`,F=Y<10?`0${Y}`:`${Y}`;return`${eQ[W]}, ${w} ${ZU[G]} ${U} ${Q}:${z}:${F} GMT`}function S1($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})}function LU($,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,D7(W,X,Z);else Z=U;for(let L of Object.keys(Z)){if(!Array.isArray(Z[L])){W[L]=Z[L];continue}VW(W,null,Z,L)}return W}function TW($,U,G){if(G<=0||!Number.isInteger(G))throw new Error("Invalid number of delimiters ("+G+") for splitEvery.");const W=$.split(U);if(G===1)return W;const X=[];let Z="";for(let L=0;L<W.length;L++){if(Z==="")Z=W[L];else Z+=U+W[L];if((L+1)%G===0)X.push(Z),Z=""}if(Z!=="")X.push(Z);return X}var{defineProperty:k1,getOwnPropertyDescriptor:qQ,getOwnPropertyNames:NQ}=Object,PQ=Object.prototype.hasOwnProperty,K=($,U)=>k1($,"name",{value:U,configurable:!0}),jQ=($,U)=>{for(var G in U)k1($,G,{get:U[G],enumerable:!0})},SQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of NQ(U))if(!PQ.call($,X)&&X!==G)k1($,X,{get:()=>U[X],enumerable:!(W=qQ(U,X))||W.enumerable})}return $},kQ=($)=>SQ(k1({},"__esModule",{value:!0}),$),$W={};jQ($W,{Client:()=>bQ,Command:()=>ZW,LazyJsonString:()=>j7,NoOpLogger:()=>DQ,SENSITIVE_STRING:()=>vQ,ServiceException:()=>E7,StringWrapper:()=>n0,_json:()=>UU,collectBody:()=>hQ,convertMap:()=>S7,createAggregatedClient:()=>cQ,dateToUtcString:()=>RW,decorateServiceException:()=>IW,emitWarningIfUnsupportedVersion:()=>H7,expectBoolean:()=>uQ,expectByte:()=>$U,expectFloat32:()=>P1,expectInt:()=>dQ,expectInt32:()=>t$,expectLong:()=>s0,expectNonNull:()=>pQ,expectNumber:()=>l0,expectObject:()=>YW,expectShort:()=>e$,expectString:()=>lQ,expectUnion:()=>sQ,extendedEncodeURIComponent:()=>S1,getArrayIfSingleItem:()=>P7,getDefaultClientConfiguration:()=>q7,getDefaultExtensionConfiguration:()=>MW,getValueFromTextNode:()=>EW,handleFloat:()=>iQ,limitedParseDouble:()=>XU,limitedParseFloat:()=>rQ,limitedParseFloat32:()=>oQ,loadConfigsForDefaultMode:()=>T7,logger:()=>m0,map:()=>LU,parseBoolean:()=>yQ,parseEpochTimestamp:()=>w7,parseRfc3339DateTime:()=>U7,parseRfc3339DateTimeWithOffset:()=>W7,parseRfc7231DateTime:()=>Y7,resolveDefaultRuntimeConfig:()=>N7,resolvedPath:()=>x7,serializeDateTime:()=>c7,serializeFloat:()=>v7,splitEvery:()=>TW,strictParseByte:()=>FW,strictParseDouble:()=>WU,strictParseFloat:()=>mQ,strictParseFloat32:()=>wW,strictParseInt:()=>aQ,strictParseInt32:()=>tQ,strictParseLong:()=>zW,strictParseShort:()=>A0,take:()=>k7,throwDefaultError:()=>KW,withBaseException:()=>B7});HW.exports=kQ($W);var UW=class ${trace(){}debug(){}info(){}warn(){}error(){}};K(UW,"NoOpLogger");var DQ=UW,GW=H4(),WW=class ${constructor(U){this.config=U,this.middlewareStack=GW.constructStack()}send(U,G,W){const X=typeof G!=="function"?G:void 0,Z=typeof G==="function"?G:W,L=X===void 0&&this.config.cacheMiddleware===!0;let Y;if(L){if(!this.handlers)this.handlers=new WeakMap;const w=this.handlers;if(w.has(U.constructor))Y=w.get(U.constructor);else Y=U.resolveMiddleware(this.middlewareStack,this.config,X),w.set(U.constructor,Y)}else delete this.handlers,Y=U.resolveMiddleware(this.middlewareStack,this.config,X);if(Z)Y(U).then((w)=>Z(null,w.output),(w)=>Z(w)).catch(()=>{});else return Y(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}};K(WW,"Client");var bQ=WW,r$=t6(),hQ=K(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return r$.Uint8ArrayBlobAdapter.mutate($);if(!$)return r$.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const G=U.streamCollector($);return r$.Uint8ArrayBlobAdapter.mutate(await G)},"collectBody"),a$=Q0(),XW=class ${constructor(){this.middlewareStack=GW.constructStack()}static classBuilder(){return new xQ}resolveMiddlewareWithContext(U,G,W,{middlewareFn:X,clientName:Z,commandName:L,inputFilterSensitiveLog:Y,outputFilterSensitiveLog:w,smithyContext:Q,additionalContext:z,CommandCtor:F}){for(let E of X.bind(this)(F,U,G,W))this.middlewareStack.use(E);const R=U.concat(this.middlewareStack),{logger:J}=G,I={logger:J,clientName:Z,commandName:L,inputFilterSensitiveLog:Y,outputFilterSensitiveLog:w,[a$.SMITHY_CONTEXT_KEY]:{commandInstance:this,...Q},...z},{requestHandler:B}=G;return R.resolve((E)=>B.handle(E.request,W||{}),I)}};K(XW,"Command");var ZW=XW,LW=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 ZW{constructor(...[X]){super();this.serialize=G._serializer,this.deserialize=G._deserializer,this.input=X??{},G._init(this)}static getEndpointParameterInstructions(){return G._ep}resolveMiddleware(X,Z,L){return this.resolveMiddlewareWithContext(X,Z,L,{CommandCtor:W,middlewareFn:G._middlewareFn,clientName:G._clientName,commandName:G._commandName,inputFilterSensitiveLog:G._inputFilterSensitiveLog,outputFilterSensitiveLog:G._outputFilterSensitiveLog,smithyContext:G._smithyContext,additionalContext:G._additionalContext})}},K(U,"CommandRef"),U)}};K(LW,"ClassBuilder");var xQ=LW,vQ="***SensitiveInformation***",cQ=K(($,U)=>{for(let G of Object.keys($)){const W=$[G],X=K(async function(L,Y,w){const Q=new W(L);if(typeof Y==="function")this.send(Q,Y);else if(typeof w==="function"){if(typeof Y!=="object")throw new Error(`Expected http options but got ${typeof Y}`);this.send(Q,Y||{},w)}else return this.send(Q,Y)},"methodImpl"),Z=(G[0].toLowerCase()+G.slice(1)).replace(/Command$/,"");U.prototype[Z]=X}},"createAggregatedClient"),yQ=K(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),uQ=K(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)m0.warn(j1(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const U=$.toLowerCase();if(U==="false"||U==="true")m0.warn(j1(`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"),l0=K(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))m0.warn(j1(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),_Q=Math.ceil(340282346638528860000000000000000000000),P1=K(($)=>{const U=l0($);if(U!==void 0&&!Number.isNaN(U)&&U!==1/0&&U!==-1/0){if(Math.abs(U)>_Q)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),s0=K(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),dQ=s0,t$=K(($)=>GU($,32),"expectInt32"),e$=K(($)=>GU($,16),"expectShort"),$U=K(($)=>GU($,8),"expectByte"),GU=K(($,U)=>{const G=s0($);if(G!==void 0&&gQ(G,U)!==G)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return G},"expectSizedInt"),gQ=K(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),pQ=K(($,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=K(($)=>{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"),lQ=K(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return m0.warn(j1(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),sQ=K(($)=>{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"),WU=K(($)=>{if(typeof $=="string")return l0(C0($));return l0($)},"strictParseDouble"),mQ=WU,wW=K(($)=>{if(typeof $=="string")return P1(C0($));return P1($)},"strictParseFloat32"),nQ=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,C0=K(($)=>{const U=$.match(nQ);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),XU=K(($)=>{if(typeof $=="string")return QW($);return l0($)},"limitedParseDouble"),iQ=XU,rQ=XU,oQ=K(($)=>{if(typeof $=="string")return QW($);return P1($)},"limitedParseFloat32"),QW=K(($)=>{switch($){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),zW=K(($)=>{if(typeof $==="string")return s0(C0($));return s0($)},"strictParseLong"),aQ=zW,tQ=K(($)=>{if(typeof $==="string")return t$(C0($));return t$($)},"strictParseInt32"),A0=K(($)=>{if(typeof $==="string")return e$(C0($));return e$($)},"strictParseShort"),FW=K(($)=>{if(typeof $==="string")return $U(C0($));return $U($)},"strictParseByte"),j1=K(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),m0={warn:console.warn},eQ=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ZU=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];K(RW,"dateToUtcString");var $7=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),U7=K(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=$7.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,X,Z,L,Y,w,Q]=U,z=A0(O0(W)),F=i(X,"month",1,12),R=i(Z,"day",1,31);return p0(z,F,R,{hours:L,minutes:Y,seconds:w,fractionalMilliseconds:Q})},"parseRfc3339DateTime"),G7=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),W7=K(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=G7.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,X,Z,L,Y,w,Q,z]=U,F=A0(O0(W)),R=i(X,"month",1,12),J=i(Z,"day",1,31),I=p0(F,R,J,{hours:L,minutes:Y,seconds:w,fractionalMilliseconds:Q});if(z.toUpperCase()!="Z")I.setTime(I.getTime()-M7(z));return I},"parseRfc3339DateTimeWithOffset"),X7=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$/),Z7=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$/),L7=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})$/),Y7=K(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=X7.exec($);if(U){const[G,W,X,Z,L,Y,w,Q]=U;return p0(A0(O0(Z)),o$(X),i(W,"day",1,31),{hours:L,minutes:Y,seconds:w,fractionalMilliseconds:Q})}if(U=Z7.exec($),U){const[G,W,X,Z,L,Y,w,Q]=U;return F7(p0(Q7(Z),o$(X),i(W,"day",1,31),{hours:L,minutes:Y,seconds:w,fractionalMilliseconds:Q}))}if(U=L7.exec($),U){const[G,W,X,Z,L,Y,w,Q]=U;return p0(A0(O0(Q)),o$(W),i(X.trimLeft(),"day",1,31),{hours:Z,minutes:L,seconds:Y,fractionalMilliseconds:w})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),w7=K(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=WU($);else if(typeof $==="object"&&$.tag===1)U=$.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(U)||U===1/0||U===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(U*1000))},"parseEpochTimestamp"),p0=K(($,U,G,W)=>{const X=U-1;return J7($,X,G),new Date(Date.UTC($,X,G,i(W.hours,"hour",0,23),i(W.minutes,"minute",0,59),i(W.seconds,"seconds",0,60),K7(W.fractionalMilliseconds)))},"buildDate"),Q7=K(($)=>{const U=new Date().getUTCFullYear(),G=Math.floor(U/100)*100+A0(O0($));if(G<U)return G+100;return G},"parseTwoDigitYear"),z7=1576800000000,F7=K(($)=>{if($.getTime()-new Date().getTime()>z7)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),o$=K(($)=>{const U=ZU.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),R7=[31,28,31,30,31,30,31,31,30,31,30,31],J7=K(($,U,G)=>{let W=R7[U];if(U===1&&I7($))W=29;if(G>W)throw new TypeError(`Invalid day for ${ZU[U]} in ${$}: ${G}`)},"validateDayOfMonth"),I7=K(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),i=K(($,U,G,W)=>{const X=FW(O0($));if(X<G||X>W)throw new TypeError(`${U} must be between ${G} and ${W}, inclusive`);return X},"parseDateValue"),K7=K(($)=>{if($===null||$===void 0)return 0;return wW("0."+$)*1000},"parseMilliseconds"),M7=K(($)=>{const U=$[0];let G=1;if(U=="+")G=1;else if(U=="-")G=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);const W=Number($.substring(1,3)),X=Number($.substring(4,6));return G*(W*60+X)*60*1000},"parseOffsetToMilliseconds"),O0=K(($)=>{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}};K(JW,"ServiceException");var E7=JW,IW=K(($,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=K(({output:$,parsedBody:U,exceptionCtor:G,errorCode:W})=>{const X=V7($),Z=X.httpStatusCode?X.httpStatusCode+"":void 0,L=new G({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||W||Z||"UnknownError",$fault:"client",$metadata:X});throw IW(L,U)},"throwDefaultError"),B7=K(($)=>{return({output:U,parsedBody:G,errorCode:W})=>{KW({output:U,parsedBody:G,exceptionCtor:$,errorCode:W})}},"withBaseException"),V7=K(($)=>({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"),T7=K(($)=>{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"),e6=!1,H7=K(($)=>{if($&&!e6&&parseInt($.substring(1,$.indexOf(".")))<16)e6=!0},"emitWarningIfUnsupportedVersion"),A7=K(($)=>{const U=[];for(let G in a$.AlgorithmId){const W=a$.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"),O7=K(($)=>{const U={};return $.checksumAlgorithms().forEach((G)=>{U[G.algorithmId()]=G.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),C7=K(($)=>{let U=$.retryStrategy;return{setRetryStrategy(G){U=G},retryStrategy(){return U}}},"getRetryConfiguration"),f7=K(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),MW=K(($)=>{return{...A7($),...C7($)}},"getDefaultExtensionConfiguration"),q7=MW,N7=K(($)=>{return{...O7($),...f7($)}},"resolveDefaultRuntimeConfig");K(S1,"extendedEncodeURIComponent");var P7=K(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),EW=K(($)=>{for(let G in $)if($.hasOwnProperty(G)&&$[G]["#text"]!==void 0)$[G]=$[G]["#text"];else if(typeof $[G]==="object"&&$[G]!==null)$[G]=EW($[G]);return $},"getValueFromTextNode"),n0=K(function(){const $=Object.getPrototypeOf(this).constructor,G=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(G,$.prototype),G},"StringWrapper");n0.prototype=Object.create(String.prototype,{constructor:{value:n0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(n0,String);var BW=class $ extends n0{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(U){if(U instanceof $)return U;else if(U instanceof String||typeof U==="string")return new $(U);return new $(JSON.stringify(U))}};K(BW,"LazyJsonString");var j7=BW;K(LU,"map");var S7=K(($)=>{const U={};for(let[G,W]of Object.entries($||{}))U[G]=[,W];return U},"convertMap"),k7=K(($,U)=>{const G={};for(let W in U)VW(G,$,U,W);return G},"take"),D7=K(($,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=K(($,U,G,W)=>{if(U!==null){let L=G[W];if(typeof L==="function")L=[,L];const[Y=b7,w=h7,Q=W]=L;if(typeof Y==="function"&&Y(U[Q])||typeof Y!=="function"&&!!Y)$[W]=w(U[Q]);return}let[X,Z]=G[W];if(typeof Z==="function"){let L;const Y=X===void 0&&(L=Z())!=null,w=typeof X==="function"&&!!X(void 0)||typeof X!=="function"&&!!X;if(Y)$[W]=L;else if(w)$[W]=Z()}else{const L=X===void 0&&Z!=null,Y=typeof X==="function"&&!!X(Z)||typeof X!=="function"&&!!X;if(L||Y)$[W]=Z}},"applyInstruction"),b7=K(($)=>$!=null,"nonNullish"),h7=K(($)=>$,"pass"),x7=K(($,U,G,W,X,Z)=>{if(U!=null&&U[G]!==void 0){const L=W();if(L.length<=0)throw new Error("Empty value provided for input HTTP label: "+G+".");$=$.replace(X,Z?L.split("/").map((Y)=>S1(Y)).join("/"):S1(L))}else throw new Error("No value provided for input HTTP label: "+G+".");return $},"resolvedPath"),v7=K(($)=>{if($!==$)return"NaN";switch($){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return $}},"serializeFloat"),c7=K(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),UU=K(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(UU);if(typeof $==="object"){const U={};for(let G of Object.keys($)){if($[G]==null)continue;U[G]=UU($[G])}return U}return $},"_json");K(TW,"splitEvery")});var CW=M((AW)=>{Object.defineProperty(AW,"__esModule",{value:!0});AW.isStreamingPayload=void 0;var y7=import.meta.require("stream"),u7=($)=>($===null||$===void 0?void 0:$.body)instanceof y7.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;AW.isStreamingPayload=u7});var gW=M((b3,dW)=>{var{defineProperty:D1,getOwnPropertyDescriptor:_7,getOwnPropertyNames:d7}=Object,g7=Object.prototype.hasOwnProperty,j=($,U)=>D1($,"name",{value:U,configurable:!0}),p7=($,U)=>{for(var G in U)D1($,G,{get:U[G],enumerable:!0})},l7=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of d7(U))if(!g7.call($,X)&&X!==G)D1($,X,{get:()=>U[X],enumerable:!(W=_7(U,X))||W.enumerable})}return $},s7=($)=>l7(D1({},"__esModule",{value:!0}),$),qW={};p7(qW,{AdaptiveRetryStrategy:()=>i7,CONFIG_MAX_ATTEMPTS:()=>wU,CONFIG_RETRY_MODE:()=>xW,ENV_MAX_ATTEMPTS:()=>YU,ENV_RETRY_MODE:()=>hW,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>r7,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>a7,StandardRetryStrategy:()=>DW,defaultDelayDecider:()=>PW,defaultRetryDecider:()=>jW,getOmitRetryHeadersPlugin:()=>t7,getRetryAfterHint:()=>_W,getRetryPlugin:()=>Xz,omitRetryHeadersMiddleware:()=>vW,omitRetryHeadersMiddlewareOptions:()=>cW,resolveRetryConfig:()=>o7,retryMiddleware:()=>yW,retryMiddlewareOptions:()=>uW});dW.exports=s7(qW);var q0=o(),NW=I$(),q=M4(),m7=j(($,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 L=$;const Y=j((F)=>F.name==="TimeoutError"?Z:X,"getCapacityAmount"),w=j((F)=>Y(F)<=L,"hasRetryTokens");return Object.freeze({hasRetryTokens:w,retrieveRetryTokens:j((F)=>{if(!w(F))throw new Error("No retry token available");const R=Y(F);return L-=R,R},"retrieveRetryTokens"),releaseRetryTokens:j((F)=>{L+=F??W,L=Math.min(L,G)},"releaseRetryTokens")})},"getDefaultRetryQuota"),PW=j(($,U)=>Math.floor(Math.min(q.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),W0=j$(),jW=j(($)=>{if(!$)return!1;return W0.isRetryableByTrait($)||W0.isClockSkewError($)||W0.isThrottlingError($)||W0.isTransientError($)},"defaultRetryDecider"),SW=j(($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)},"asSdkError"),kW=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)??PW,this.retryQuota=(G==null?void 0:G.retryQuota)??m7(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,L=0;const Y=await this.getMaxAttempts(),{request:w}=G;if(q0.HttpRequest.isInstance(w))w.headers[q.INVOCATION_ID_HEADER]=NW.v4();while(!0)try{if(q0.HttpRequest.isInstance(w))w.headers[q.REQUEST_HEADER]=`attempt=${Z+1}; max=${Y}`;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=L,{response:Q,output:z}}catch(Q){const z=SW(Q);if(Z++,this.shouldRetry(z,Z,Y)){X=this.retryQuota.retrieveRetryTokens(z);const F=this.delayDecider(W0.isThrottlingError(z)?q.THROTTLING_RETRY_DELAY_BASE:q.DEFAULT_RETRY_DELAY_BASE,Z),R=n7(z.$response),J=Math.max(R||0,F);L+=J,await new Promise((I)=>setTimeout(I,J));continue}if(!z.$metadata)z.$metadata={};throw z.$metadata.attempts=Z,z.$metadata.totalRetryDelay=L,z}}};j(kW,"StandardRetryStrategy");var DW=kW,n7=j(($)=>{if(!q0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return W*1000;return new Date(G).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),bW=class $ extends DW{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)}})}};j(bW,"AdaptiveRetryStrategy");var i7=bW,fW=h0(),YU="AWS_MAX_ATTEMPTS",wU="max_attempts",r7={environmentVariableSelector:($)=>{const U=$[YU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${YU} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[wU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${wU} mast be a number, got "${U}"`);return G},default:q.DEFAULT_MAX_ATTEMPTS},o7=j(($)=>{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"),hW="AWS_RETRY_MODE",xW="retry_mode",a7={environmentVariableSelector:($)=>$[hW],configFileSelector:($)=>$[xW],default:q.DEFAULT_RETRY_MODE},vW=j(()=>($)=>async(U)=>{const{request:G}=U;if(q0.HttpRequest.isInstance(G))delete G.headers[q.INVOCATION_ID_HEADER],delete G.headers[q.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),cW={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},t7=j(($)=>({applyToStack:(U)=>{U.addRelativeTo(vW(),cW)}}),"getOmitRetryHeadersPlugin"),e7=f0(),$z=CW(),yW=j(($)=>(U,G)=>async(W)=>{var X;let Z=await $.retryStrategy();const L=await $.maxAttempts();if(Uz(Z)){Z=Z;let Y=await Z.acquireInitialRetryToken(G.partition_id),w=new Error,Q=0,z=0;const{request:F}=W,R=q0.HttpRequest.isInstance(F);if(R)F.headers[q.INVOCATION_ID_HEADER]=NW.v4();while(!0)try{if(R)F.headers[q.REQUEST_HEADER]=`attempt=${Q+1}; max=${L}`;const{response:J,output:I}=await U(W);return Z.recordSuccess(Y),I.$metadata.attempts=Q+1,I.$metadata.totalRetryDelay=z,{response:J,output:I}}catch(J){const I=Gz(J);if(w=SW(J),R&&$z.isStreamingPayload(F))throw(X=G.logger instanceof e7.NoOpLogger?console:G.logger)==null||X.warn("An error was encountered in a non-retryable streaming request."),w;try{Y=await Z.refreshRetryTokenForRetry(Y,I)}catch(E){if(!w.$metadata)w.$metadata={};throw w.$metadata.attempts=Q+1,w.$metadata.totalRetryDelay=z,w}Q=Y.getRetryCount();const B=Y.getRetryDelay();z+=B,await new Promise((E)=>setTimeout(E,B))}}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"),Uz=j(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),Gz=j(($)=>{const U={error:$,errorType:Wz($)},G=_W($.$response);if(G)U.retryAfterHint=G;return U},"getRetryErrorInfo"),Wz=j(($)=>{if(W0.isThrottlingError($))return"THROTTLING";if(W0.isTransientError($))return"TRANSIENT";if(W0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),uW={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Xz=j(($)=>({applyToStack:(U)=>{U.add(yW($),uW)}}),"getRetryPlugin"),_W=j(($)=>{if(!q0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)},"getRetryAfterHint")});var zU=M((h3,YX)=>{function sW($){const U=new Map;for(let G of $)U.set(G.schemeId,G);return U}function WX($,U){return new ZX($,U)}function LX($,U,G,W,X){return f(async function*Z(L,Y,...w){let Q=L.startingToken||void 0,z=!0,F;while(z){if(Y[G]=Q,X)Y[X]=Y[X]??L.pageSize;if(L.client instanceof $)F=await Pz(U,L.client,Y,...w);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield F;const R=Q;Q=jz(F,W),z=!!(Q&&(!L.stopOnSameToken||Q!==R))}return},"paginateOperation")}var{defineProperty:h1,getOwnPropertyDescriptor:Zz,getOwnPropertyNames:Lz}=Object,Yz=Object.prototype.hasOwnProperty,f=($,U)=>h1($,"name",{value:U,configurable:!0}),wz=($,U)=>{for(var G in U)h1($,G,{get:U[G],enumerable:!0})},Qz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Lz(U))if(!Yz.call($,X)&&X!==G)h1($,X,{get:()=>U[X],enumerable:!(W=Zz(U,X))||W.enumerable})}return $},zz=($)=>Qz(h1({},"__esModule",{value:!0}),$),pW={};wz(pW,{DefaultIdentityProviderConfig:()=>Vz,EXPIRATION_MS:()=>UX,HttpApiKeyAuthSigner:()=>Tz,HttpBearerAuthSigner:()=>Hz,NoAuthSigner:()=>Az,RequestBuilder:()=>ZX,createIsIdentityExpiredFunction:()=>$X,createPaginator:()=>LX,doesIdentityRequireRefresh:()=>GX,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Rz,getHttpAuthSchemePlugin:()=>Iz,getHttpSigningPlugin:()=>Bz,getSmithyContext:()=>fz,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>mW,httpAuthSchemeMiddleware:()=>QU,httpAuthSchemeMiddlewareOptions:()=>nW,httpSigningMiddleware:()=>iW,httpSigningMiddlewareOptions:()=>rW,isIdentityExpired:()=>Oz,memoizeIdentityProvider:()=>Cz,normalizeProvider:()=>qz,requestBuilder:()=>WX});YX.exports=zz(pW);var lW=h0();f(sW,"convertHttpAuthSchemesToMap");var QU=f(($,U)=>(G,W)=>async(X)=>{var Z;const L=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,W,X.input)),Y=sW($.httpAuthSchemes),w=lW.getSmithyContext(W),Q=[];for(let z of L){const F=Y.get(z.schemeId);if(!F){Q.push(`HttpAuthScheme \`${z.schemeId}\` was not enabled for this service.`);continue}const R=F.identityProvider(await U.identityProviderConfigProvider($));if(!R){Q.push(`HttpAuthScheme \`${z.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:J={},signingProperties:I={}}=((Z=z.propertiesExtractor)==null?void 0:Z.call(z,$,W))||{};z.identityProperties=Object.assign(z.identityProperties||{},J),z.signingProperties=Object.assign(z.signingProperties||{},I),w.selectedHttpAuthScheme={httpAuthOption:z,identity:await R(z.identityProperties),signer:F.signer};break}if(!w.selectedHttpAuthScheme)throw new Error(Q.join("\n"));return G(X)},"httpAuthSchemeMiddleware"),Fz=p8(),mW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Fz.endpointMiddlewareOptions.name},Rz=f(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(QU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),mW)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),Jz=N$(),nW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Jz.serializerMiddlewareOption.name},Iz=f(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(QU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),nW)}}),"getHttpAuthSchemePlugin"),x1=o(),Kz=f(($)=>(U)=>{throw U},"defaultErrorHandler"),Mz=f(($,U)=>{},"defaultSuccessHandler"),iW=f(($)=>(U,G)=>async(W)=>{if(!x1.HttpRequest.isInstance(W.request))return U(W);const Z=lW.getSmithyContext(G).selectedHttpAuthScheme;if(!Z)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:L={}},identity:Y,signer:w}=Z,Q=await U({...W,request:await w.sign(W.request,Y,L)}).catch((w.errorHandler||Kz)(L));return(w.successHandler||Mz)(Q.response,L),Q},"httpSigningMiddleware"),Ez=gW(),rW={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:Ez.retryMiddlewareOptions.name},Bz=f(($)=>({applyToStack:(U)=>{U.addRelativeTo(iW($),rW)}}),"getHttpSigningPlugin"),oW=class ${constructor(U){this.authSchemes=new Map;for(let[G,W]of Object.entries(U))if(W!==void 0)this.authSchemes.set(G,W)}getIdentityProvider(U){return this.authSchemes.get(U)}};f(oW,"DefaultIdentityProviderConfig");var Vz=oW,b1=Q0(),aW=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=x1.HttpRequest.clone(U);if(W.in===b1.HttpApiKeyAuthLocation.QUERY)X.query[W.name]=G.apiKey;else if(W.in===b1.HttpApiKeyAuthLocation.HEADER)X.headers[W.name]=W.scheme?`${W.scheme} ${G.apiKey}`:G.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+W.in+"`");return X}};f(aW,"HttpApiKeyAuthSigner");var Tz=aW,tW=class ${async sign(U,G,W){const X=x1.HttpRequest.clone(U);if(!G.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return X.headers.Authorization=`Bearer ${G.token}`,X}};f(tW,"HttpBearerAuthSigner");var Hz=tW,eW=class ${async sign(U,G,W){return U}};f(eW,"NoAuthSigner");var Az=eW,$X=f(($)=>(U)=>GX(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),UX=300000,Oz=$X(UX),GX=f(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),Cz=f(($,U,G)=>{if($===void 0)return;const W=typeof $!=="function"?async()=>Promise.resolve($):$;let X,Z,L,Y=!1;const w=f(async(Q)=>{if(!Z)Z=W(Q);try{X=await Z,L=!0,Y=!1}finally{Z=void 0}return X},"coalesceProvider");if(U===void 0)return async(Q)=>{if(!L||(Q==null?void 0:Q.forceRefresh))X=await w(Q);return X};return async(Q)=>{if(!L||(Q==null?void 0:Q.forceRefresh))X=await w(Q);if(Y)return X;if(!G(X))return Y=!0,X;if(U(X))return await w(Q),X;return X}},"memoizeIdentityProvider"),fz=f(($)=>$[b1.SMITHY_CONTEXT_KEY]||($[b1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),qz=f(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),Nz=f0();f(WX,"requestBuilder");var XX=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 x1.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=Nz.resolvedPath(Z,this.input,U,G,W,X)}),this}h(U){return this.headers=U,this}q(U){return this.query=U,this}b(U){return this.body=U,this}m(U){return this.method=U,this}};f(XX,"RequestBuilder");var ZX=XX,Pz=f(async($,U,G,...W)=>{return await U.send(new $(G),...W)},"makePagedClientRequest");f(LX,"createPaginator");var jz=f(($,U)=>{let G=$;const W=U.split(".");for(let X of W){if(!G||typeof G!=="object")return;G=G[X]}return G},"get")});var GZ=M((GH,UZ)=>{var{defineProperty:t1,getOwnPropertyDescriptor:zF,getOwnPropertyNames:FF}=Object,RF=Object.prototype.hasOwnProperty,JF=($,U)=>t1($,"name",{value:U,configurable:!0}),IF=($,U)=>{for(var G in U)t1($,G,{get:U[G],enumerable:!0})},KF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of FF(U))if(!RF.call($,X)&&X!==G)t1($,X,{get:()=>U[X],enumerable:!(W=zF(U,X))||W.enumerable})}return $},MF=($)=>KF(t1({},"__esModule",{value:!0}),$),$Z={};IF($Z,{emitWarningIfUnsupportedVersion:()=>EF});UZ.exports=MF($Z);var eX=!1,EF=JF(($)=>{if($&&!eX&&parseInt($.substring(1,$.indexOf(".")))<18)eX=!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 AZ=M((WH,HZ)=>{function xU($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break}var{defineProperty:X$,getOwnPropertyDescriptor:BF,getOwnPropertyNames:VF}=Object,TF=Object.prototype.hasOwnProperty,k=($,U)=>X$($,"name",{value:U,configurable:!0}),HF=($,U)=>{for(var G in U)X$($,G,{get:U[G],enumerable:!0})},AF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of VF(U))if(!TF.call($,X)&&X!==G)X$($,X,{get:()=>U[X],enumerable:!(W=BF(U,X))||W.enumerable})}return $},OF=($)=>AF(X$({},"__esModule",{value:!0}),$),YZ={};HF(YZ,{SignatureV4:()=>rF,clearCredentialCache:()=>_F,createScope:()=>U$,getCanonicalHeaders:()=>hU,getCanonicalQuery:()=>KZ,getPayloadHash:()=>W$,getSigningKey:()=>IZ,moveHeadersToQuery:()=>VZ,prepareRequest:()=>vU});HZ.exports=OF(YZ);var WZ=h0(),kU=G0(),CF="X-Amz-Algorithm",fF="X-Amz-Credential",wZ="X-Amz-Date",qF="X-Amz-SignedHeaders",NF="X-Amz-Expires",QZ="X-Amz-Signature",zZ="X-Amz-Security-Token",FZ="authorization",RZ=wZ.toLowerCase(),PF="date",jF=[FZ,RZ,PF],SF=QZ.toLowerCase(),bU="x-amz-content-sha256",kF=zZ.toLowerCase(),DF={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},bF=/^proxy-/,hF=/^sec-/,DU="AWS4-HMAC-SHA256",xF="AWS4-HMAC-SHA256-PAYLOAD",vF="UNSIGNED-PAYLOAD",cF=50,JZ="aws4_request",yF=604800,L0=f6(),uF=G0(),k0={},$$=[],U$=k(($,U,G)=>`${$}/${U}/${G}/${JZ}`,"createScope"),IZ=k(async($,U,G,W,X)=>{const Z=await XZ($,U.secretAccessKey,U.accessKeyId),L=`${G}:${W}:${X}:${L0.toHex(Z)}:${U.sessionToken}`;if(L in k0)return k0[L];$$.push(L);while($$.length>cF)delete k0[$$.shift()];let Y=`AWS4${U.secretAccessKey}`;for(let w of[G,W,X,JZ])Y=await XZ($,Y,w);return k0[L]=Y},"getSigningKey"),_F=k(()=>{$$.length=0,Object.keys(k0).forEach(($)=>{delete k0[$]})},"clearCredentialCache"),XZ=k(($,U,G)=>{const W=new $(U);return W.update(uF.toUint8Array(G)),W.digest()},"hmac"),hU=k(({headers:$},U,G)=>{const W={};for(let X of Object.keys($).sort()){if($[X]==null)continue;const Z=X.toLowerCase();if(Z in DF||(U==null?void 0:U.has(Z))||bF.test(Z)||hF.test(Z)){if(!G||G&&!G.has(Z))continue}W[Z]=$[X].trim().replace(/\s+/g," ")}return W},"getCanonicalHeaders"),G$=g4(),KZ=k(({query:$={}})=>{const U=[],G={};for(let W of Object.keys($)){if(W.toLowerCase()===SF)continue;const X=G$.escapeUri(W);U.push(X);const Z=$[W];if(typeof Z==="string")G[X]=`${X}=${G$.escapeUri(Z)}`;else if(Array.isArray(Z))G[X]=Z.slice(0).reduce((L,Y)=>L.concat([`${X}=${G$.escapeUri(Y)}`]),[]).sort().join("&")}return U.sort().map((W)=>G[W]).filter((W)=>W).join("&")},"getCanonicalQuery"),dF=x$(),gF=G0(),W$=k(async({headers:$,body:U},G)=>{for(let W of Object.keys($))if(W.toLowerCase()===bU)return $[W];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||dF.isArrayBuffer(U)){const W=new G;return W.update(gF.toUint8Array(U)),L0.toHex(await W.digest())}return vF},"getPayloadHash"),ZZ=G0(),MZ=class ${format(U){const G=[];for(let Z of Object.keys(U)){const L=ZZ.fromUtf8(Z);G.push(Uint8Array.from([L.byteLength]),L,this.formatHeaderValue(U[Z]))}const W=new Uint8Array(G.reduce((Z,L)=>Z+L.byteLength,0));let X=0;for(let Z of G)W.set(Z,X),X+=Z.byteLength;return W}formatHeaderValue(U){switch(U.type){case"boolean":return Uint8Array.from([U.value?0:1]);case"byte":return Uint8Array.from([2,U.value]);case"short":const G=new DataView(new ArrayBuffer(3));return G.setUint8(0,3),G.setInt16(1,U.value,!1),new Uint8Array(G.buffer);case"integer":const W=new DataView(new ArrayBuffer(5));return W.setUint8(0,4),W.setInt32(1,U.value,!1),new Uint8Array(W.buffer);case"long":const X=new Uint8Array(9);return X[0]=5,X.set(U.value.bytes,1),X;case"binary":const Z=new DataView(new ArrayBuffer(3+U.value.byteLength));Z.setUint8(0,6),Z.setUint16(1,U.value.byteLength,!1);const L=new Uint8Array(Z.buffer);return L.set(U.value,3),L;case"string":const Y=ZZ.fromUtf8(U.value),w=new DataView(new ArrayBuffer(3+Y.byteLength));w.setUint8(0,7),w.setUint16(1,Y.byteLength,!1);const Q=new Uint8Array(w.buffer);return Q.set(Y,3),Q;case"timestamp":const z=new Uint8Array(9);return z[0]=8,z.set(sF.fromNumber(U.value.valueOf()).bytes,1),z;case"uuid":if(!lF.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(MZ,"HeaderFormatter");var pF=MZ,lF=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,EZ=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)xU(G);return new $(G)}valueOf(){const U=this.bytes.slice(0),G=U[0]&128;if(G)xU(U);return parseInt(L0.toHex(U),16)*(G?-1:1)}toString(){return String(this.valueOf())}};k(EZ,"Int64");var sF=EZ;k(xU,"negate");var mF=k(($,U)=>{$=$.toLowerCase();for(let G of Object.keys(U))if($===G.toLowerCase())return!0;return!1},"hasHeader"),BZ=o(),VZ=k(($,U={})=>{var G;const{headers:W,query:X={}}=BZ.HttpRequest.clone($);for(let Z of Object.keys(W)){const L=Z.toLowerCase();if(L.slice(0,6)==="x-amz-"&&!((G=U.unhoistableHeaders)==null?void 0:G.has(L)))X[Z]=W[Z],delete W[Z]}return{...$,headers:W,query:X}},"moveHeadersToQuery"),vU=k(($)=>{$=BZ.HttpRequest.clone($);for(let U of Object.keys($.headers))if(jF.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),nF=k(($)=>iF($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),iF=k(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),TZ=class ${constructor({applyChecksum:U,credentials:G,region:W,service:X,sha256:Z,uriEscapePath:L=!0}){this.headerFormatter=new pF,this.service=X,this.sha256=Z,this.uriEscapePath=L,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=WZ.normalizeProvider(W),this.credentialProvider=WZ.normalizeProvider(G)}async presign(U,G={}){const{signingDate:W=new Date,expiresIn:X=3600,unsignableHeaders:Z,unhoistableHeaders:L,signableHeaders:Y,signingRegion:w,signingService:Q}=G,z=await this.credentialProvider();this.validateResolvedCredentials(z);const F=w??await this.regionProvider(),{longDate:R,shortDate:J}=e1(W);if(X>yF)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const I=U$(J,F,Q??this.service),B=VZ(vU(U),{unhoistableHeaders:L});if(z.sessionToken)B.query[zZ]=z.sessionToken;B.query[CF]=DU,B.query[fF]=`${z.accessKeyId}/${I}`,B.query[wZ]=R,B.query[NF]=X.toString(10);const E=hU(B,Z,Y);return B.query[qF]=LZ(E),B.query[QZ]=await this.getSignature(R,I,this.getSigningKey(z,F,J,Q),this.createCanonicalRequest(B,E,await W$(U,this.sha256))),B}async sign(U,G){if(typeof U==="string")return this.signString(U,G);else if(U.headers&&U.payload)return this.signEvent(U,G);else if(U.message)return this.signMessage(U,G);else return this.signRequest(U,G)}async signEvent({headers:U,payload:G},{signingDate:W=new Date,priorSignature:X,signingRegion:Z,signingService:L}){const Y=Z??await this.regionProvider(),{shortDate:w,longDate:Q}=e1(W),z=U$(w,Y,L??this.service),F=await W$({headers:{},body:G},this.sha256),R=new this.sha256;R.update(U);const J=L0.toHex(await R.digest()),I=[xF,Q,z,X,J,F].join("\n");return this.signString(I,{signingDate:W,signingRegion:Y,signingService:L})}async signMessage(U,{signingDate:G=new Date,signingRegion:W,signingService:X}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:G,signingRegion:W,signingService:X,priorSignature:U.priorSignature}).then((L)=>{return{message:U.message,signature:L}})}async signString(U,{signingDate:G=new Date,signingRegion:W,signingService:X}={}){const Z=await this.credentialProvider();this.validateResolvedCredentials(Z);const L=W??await this.regionProvider(),{shortDate:Y}=e1(G),w=new this.sha256(await this.getSigningKey(Z,L,Y,X));return w.update(kU.toUint8Array(U)),L0.toHex(await w.digest())}async signRequest(U,{signingDate:G=new Date,signableHeaders:W,unsignableHeaders:X,signingRegion:Z,signingService:L}={}){const Y=await this.credentialProvider();this.validateResolvedCredentials(Y);const w=Z??await this.regionProvider(),Q=vU(U),{longDate:z,shortDate:F}=e1(G),R=U$(F,w,L??this.service);if(Q.headers[RZ]=z,Y.sessionToken)Q.headers[kF]=Y.sessionToken;const J=await W$(Q,this.sha256);if(!mF(bU,Q.headers)&&this.applyChecksum)Q.headers[bU]=J;const I=hU(Q,X,W),B=await this.getSignature(z,R,this.getSigningKey(Y,w,F,L),this.createCanonicalRequest(Q,I,J));return Q.headers[FZ]=`${DU} Credential=${Y.accessKeyId}/${R}, SignedHeaders=${LZ(I)}, Signature=${B}`,Q}createCanonicalRequest(U,G,W){const X=Object.keys(G).sort();return`${U.method}
|
|
10
|
-
${this.getCanonicalPath(U)}
|
|
11
|
-
${KZ(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(kU.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 G$.escapeUri(W).replace(/%2F/g,"/")}return U}async getSignature(U,G,W,X){const Z=await this.createStringToSign(U,G,X),L=new this.sha256(await W);return L.update(kU.toUint8Array(Z)),L0.toHex(await L.digest())}getSigningKey(U,G,W,X){return IZ(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(TZ,"SignatureV4");var rF=TZ,e1=k(($)=>{const U=nF($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),LZ=k(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var DZ=M((XH,kZ)=>{var{defineProperty:Z$,getOwnPropertyDescriptor:oF,getOwnPropertyNames:aF}=Object,tF=Object.prototype.hasOwnProperty,x=($,U)=>Z$($,"name",{value:U,configurable:!0}),eF=($,U)=>{for(var G in U)Z$($,G,{get:U[G],enumerable:!0})},$R=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of aF(U))if(!tF.call($,X)&&X!==G)Z$($,X,{get:()=>U[X],enumerable:!(W=oF(U,X))||W.enumerable})}return $},UR=($)=>$R(Z$({},"__esModule",{value:!0}),$),NZ={};eF(NZ,{AWSSDKSigV4Signer:()=>ZR,AwsSdkSigV4ASigner:()=>YR,AwsSdkSigV4Signer:()=>uU,NODE_SIGV4A_CONFIG_OPTIONS:()=>zR,resolveAWSSDKSigV4Config:()=>FR,resolveAwsSdkSigV4AConfig:()=>QR,resolveAwsSdkSigV4Config:()=>SZ,validateSigningProperties:()=>yU});kZ.exports=UR(NZ);var GR=o(),WR=o(),OZ=x(($)=>{var U,G;return WR.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((G=$.headers)==null?void 0:G.Date):void 0},"getDateHeader"),cU=x(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),XR=x(($,U)=>Math.abs(cU(U).getTime()-$)>=300000,"isClockSkewed"),CZ=x(($,U)=>{const G=Date.parse($);if(XR(G,U))return G-Date.now();return U},"getUpdatedSystemClockOffset"),t0=x(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),yU=x(async($)=>{var U,G,W;const X=t0("context",$.context),Z=t0("config",$.config),L=(W=(G=(U=X.endpointV2)==null?void 0:U.properties)==null?void 0:G.authSchemes)==null?void 0:W[0],w=await t0("signer",Z.signer)(L),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"),PZ=class ${async sign(U,G,W){var X;if(!GR.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const Z=await yU(W),{config:L,signer:Y}=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[R,J]=z.authSchemes;if((R==null?void 0:R.name)==="sigv4a"&&(J==null?void 0:J.name)==="sigv4")w=(J==null?void 0:J.signingRegion)??w,Q=(J==null?void 0:J.signingName)??Q}return await Y.sign(U,{signingDate:cU(L.systemClockOffset),signingRegion:w,signingService:Q})}errorHandler(U){return(G)=>{const W=G.ServerTime??OZ(G.$response);if(W){const X=t0("config",U.config),Z=X.systemClockOffset;if(X.systemClockOffset=CZ(W,X.systemClockOffset),X.systemClockOffset!==Z&&G.$metadata)G.$metadata.clockSkewCorrected=!0}throw G}}successHandler(U,G){const W=OZ(U);if(W){const X=t0("config",G.config);X.systemClockOffset=CZ(W,X.systemClockOffset)}}};x(PZ,"AwsSdkSigV4Signer");var uU=PZ,ZR=uU,LR=o(),jZ=class $ extends uU{async sign(U,G,W){var X;if(!LR.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:Z,signer:L,signingRegion:Y,signingRegionSet:w,signingName:Q}=await yU(W),F=(await((X=Z.sigv4aSigningRegionSet)==null?void 0:X.call(Z))??w??[Y]).join(",");return await L.sign(U,{signingDate:cU(Z.systemClockOffset),signingRegion:F,signingService:Q})}};x(jZ,"AwsSdkSigV4ASigner");var YR=jZ,wR=zU(),fZ=O$(),QR=x(($)=>{return $.sigv4aSigningRegionSet=wR.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),zR={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new fZ.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 fZ.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},E0=zU(),qZ=AZ(),SZ=x(($)=>{let U;if($.credentials)U=E0.memoizeIdentityProvider($.credentials,E0.isIdentityExpired,E0.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=E0.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=E0.normalizeProvider($.signer);else if($.regionInfoProvider)Z=x(()=>E0.normalizeProvider($.region)().then(async(L)=>[await $.regionInfoProvider(L,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},L]).then(([L,Y])=>{const{signingRegion:w,signingService:Q}=L;$.signingRegion=$.signingRegion||w||Y,$.signingName=$.signingName||Q||$.serviceId;const z={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:X,uriEscapePath:G};return new($.signerConstructor||qZ.SignatureV4)(z)}),"signer");else Z=x(async(L)=>{L=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await E0.normalizeProvider($.region)(),properties:{}},L);const{signingRegion:Y,signingName:w}=L;$.signingRegion=$.signingRegion||Y,$.signingName=$.signingName||w||$.serviceId;const Q={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:X,uriEscapePath:G};return new($.signerConstructor||qZ.SignatureV4)(Q)},"signer");return{...$,systemClockOffset:W,signingEscapePath:G,credentials:U,signer:Z}},"resolveAwsSdkSigV4Config"),FR=SZ});var L$=M((MR)=>{var RR=":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",bZ="[: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]["+RR+"]*",JR=new RegExp("^"+bZ+"$"),IR=function($,U){const G=[];let W=U.exec($);while(W){const X=[];X.startIndex=U.lastIndex-W[0].length;const Z=W.length;for(let L=0;L<Z;L++)X.push(W[L]);G.push(X),W=U.exec($)}return G},KR=function($){const U=JR.exec($);return!(U===null||typeof U==="undefined")};MR.isExist=function($){return typeof $!=="undefined"};MR.isEmptyObject=function($){return Object.keys($).length===0};MR.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]]}};MR.getValue=function($){if(MR.isExist($))return $;else return""};MR.isName=KR;MR.getAllMatches=IR;MR.nameRegexp=bZ});var dU=M((DR)=>{function xZ($){return $===" "||$==="\t"||$==="\n"||$==="\r"}function vZ($,U){const G=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const W=$.substr(G,U-G);if(U>5&&W==="xml")return P("InvalidXml","XML declaration allowed only at the start of the document.",b($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U}function cZ($,U){if($.length>U+5&&$[U+1]==="-"&&$[U+2]==="-"){for(U+=3;U<$.length;U++)if($[U]==="-"&&$[U+1]==="-"&&$[U+2]===">"){U+=2;break}}else if($.length>U+8&&$[U+1]==="D"&&$[U+2]==="O"&&$[U+3]==="C"&&$[U+4]==="T"&&$[U+5]==="Y"&&$[U+6]==="P"&&$[U+7]==="E"){let G=1;for(U+=8;U<$.length;U++)if($[U]==="<")G++;else if($[U]===">"){if(G--,G===0)break}}else if($.length>U+9&&$[U+1]==="["&&$[U+2]==="C"&&$[U+3]==="D"&&$[U+4]==="A"&&$[U+5]==="T"&&$[U+6]==="A"&&$[U+7]==="["){for(U+=8;U<$.length;U++)if($[U]==="]"&&$[U+1]==="]"&&$[U+2]===">"){U+=2;break}}return U}function qR($,U){let G="",W="",X=!1;for(;U<$.length;U++){if($[U]===CR||$[U]===fR)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}}function yZ($,U){const G=_U.getAllMatches($,NR),W={};for(let X=0;X<G.length;X++){if(G[X][1].length===0)return P("InvalidAttr","Attribute '"+G[X][2]+"' has no space in starting.",e0(G[X]));else if(G[X][3]!==void 0&&G[X][4]===void 0)return P("InvalidAttr","Attribute '"+G[X][2]+"' is without value.",e0(G[X]));else if(G[X][3]===void 0&&!U.allowBooleanAttributes)return P("InvalidAttr","boolean attribute '"+G[X][2]+"' is not allowed.",e0(G[X]));const Z=G[X][2];if(!SR(Z))return P("InvalidAttr","Attribute '"+Z+"' is an invalid name.",e0(G[X]));if(!W.hasOwnProperty(Z))W[Z]=1;else return P("InvalidAttr","Attribute '"+Z+"' is repeated.",e0(G[X]))}return!0}function PR($,U){let G=/\d/;if($[U]==="x")U++,G=/[\da-fA-F]/;for(;U<$.length;U++){if($[U]===";")return U;if(!$[U].match(G))break}return-1}function jR($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,PR($,U);let G=0;for(;U<$.length;U++,G++){if($[U].match(/\w/)&&G<20)continue;if($[U]===";")break;return-1}return U}function P($,U,G){return{err:{code:$,msg:U,line:G.line||G,col:G.col}}}function SR($){return _U.isName($)}function kR($){return _U.isName($)}function b($,U){const G=$.substring(0,U).split(/\r?\n/);return{line:G.length,col:G[G.length-1].length+1}}function e0($){return $.startIndex+$[1].length}var _U=L$(),OR={allowBooleanAttributes:!1,unpairedTags:[]};DR.validate=function($,U){U=Object.assign({},OR,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=vZ($,Z),Z.err)return Z}else if($[Z]==="<"){let L=Z;if(Z++,$[Z]==="!"){Z=cZ($,Z);continue}else{let Y=!1;if($[Z]==="/")Y=!0,Z++;let w="";for(;Z<$.length&&$[Z]!==">"&&$[Z]!==" "&&$[Z]!=="\t"&&$[Z]!=="\n"&&$[Z]!=="\r";Z++)w+=$[Z];if(w=w.trim(),w[w.length-1]==="/")w=w.substring(0,w.length-1),Z--;if(!kR(w)){let F;if(w.trim().length===0)F="Invalid space after '<'.";else F="Tag '"+w+"' is an invalid name.";return P("InvalidTag",F,b($,Z))}const Q=qR($,Z);if(Q===!1)return P("InvalidAttr","Attributes for '"+w+"' have open quote.",b($,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 R=yZ(z,U);if(R===!0)W=!0;else return P(R.err.code,R.err.msg,b($,F+R.err.line))}else if(Y)if(!Q.tagClosed)return P("InvalidTag","Closing tag '"+w+"' doesn't have proper closing.",b($,Z));else if(z.trim().length>0)return P("InvalidTag","Closing tag '"+w+"' can't have attributes or invalid starting.",b($,L));else if(G.length===0)return P("InvalidTag","Closing tag '"+w+"' has not been opened.",b($,L));else{const F=G.pop();if(w!==F.tagName){let R=b($,F.tagStartPos);return P("InvalidTag","Expected closing tag '"+F.tagName+"' (opened in line "+R.line+", col "+R.col+") instead of closing tag '"+w+"'.",b($,L))}if(G.length==0)X=!0}else{const F=yZ(z,U);if(F!==!0)return P(F.err.code,F.err.msg,b($,Z-z.length+F.err.line));if(X===!0)return P("InvalidXml","Multiple possible root nodes found.",b($,Z));else if(U.unpairedTags.indexOf(w)!==-1);else G.push({tagName:w,tagStartPos:L});W=!0}for(Z++;Z<$.length;Z++)if($[Z]==="<")if($[Z+1]==="!"){Z++,Z=cZ($,Z);continue}else if($[Z+1]==="?"){if(Z=vZ($,++Z),Z.err)return Z}else break;else if($[Z]==="&"){const F=jR($,Z);if(F==-1)return P("InvalidChar","char '&' is not expected.",b($,Z));Z=F}else if(X===!0&&!xZ($[Z]))return P("InvalidXml","Extra text at the end",b($,Z));if($[Z]==="<")Z--}}else{if(xZ($[Z]))continue;return P("InvalidChar","char '"+$[Z]+"' is not expected.",b($,Z))}if(!W)return P("InvalidXml","Start tag expected.",1);else if(G.length==1)return P("InvalidTag","Unclosed tag '"+G[0].tagName+"'.",b($,G[0].tagStartPos));else if(G.length>0)return P("InvalidXml","Invalid '"+JSON.stringify(G.map((Z)=>Z.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var CR='"',fR="'",NR=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var _Z=M((xR)=>{var uZ={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 $}},hR=function($){return Object.assign({},uZ,$)};xR.buildOptions=hR;xR.defaultOptions=uZ});var pZ=M((wH,gZ)=>{class dZ{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})}}gZ.exports=dZ});var sZ=M((QH,lZ)=>{function uR($,U){const G={};if($[U+3]==="O"&&$[U+4]==="C"&&$[U+5]==="T"&&$[U+6]==="Y"&&$[U+7]==="P"&&$[U+8]==="E"){U=U+9;let W=1,X=!1,Z=!1,L="";for(;U<$.length;U++)if($[U]==="<"&&!Z){if(X&&gR($,U)){if(U+=7,[entityName,val,U]=_R($,U+1),val.indexOf("&")===-1)G[mR(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(X&&pR($,U))U+=8;else if(X&&lR($,U))U+=8;else if(X&&sR($,U))U+=9;else if(dR)Z=!0;else throw new Error("Invalid DOCTYPE");W++,L=""}else if($[U]===">"){if(Z){if($[U-1]==="-"&&$[U-2]==="-")Z=!1,W--}else W--;if(W===0)break}else if($[U]==="[")X=!0;else L+=$[U];if(W!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:G,i:U}}function _R($,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]}function dR($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1}function gR($,U){if($[U+1]==="!"&&$[U+2]==="E"&&$[U+3]==="N"&&$[U+4]==="T"&&$[U+5]==="I"&&$[U+6]==="T"&&$[U+7]==="Y")return!0;return!1}function pR($,U){if($[U+1]==="!"&&$[U+2]==="E"&&$[U+3]==="L"&&$[U+4]==="E"&&$[U+5]==="M"&&$[U+6]==="E"&&$[U+7]==="N"&&$[U+8]==="T")return!0;return!1}function lR($,U){if($[U+1]==="!"&&$[U+2]==="A"&&$[U+3]==="T"&&$[U+4]==="T"&&$[U+5]==="L"&&$[U+6]==="I"&&$[U+7]==="S"&&$[U+8]==="T")return!0;return!1}function sR($,U){if($[U+1]==="!"&&$[U+2]==="N"&&$[U+3]==="O"&&$[U+4]==="T"&&$[U+5]==="A"&&$[U+6]==="T"&&$[U+7]==="I"&&$[U+8]==="O"&&$[U+9]==="N")return!0;return!1}function mR($){if(yR.isName($))return $;else throw new Error(`Invalid entity name ${$}`)}var yR=L$();lZ.exports=uR});var nZ=M((zH,mZ)=>{function oR($,U={}){if(U=Object.assign({},rR,U),!$||typeof $!=="string")return $;let G=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(G))return $;else if(U.hex&&nR.test(G))return Number.parseInt(G,16);else{const W=iR.exec(G);if(W){const X=W[1],Z=W[2];let L=aR(W[3]);const Y=W[4]||W[6];if(!U.leadingZeros&&Z.length>0&&X&&G[2]!==".")return $;else if(!U.leadingZeros&&Z.length>0&&!X&&G[1]!==".")return $;else{const w=Number(G),Q=""+w;if(Q.search(/[eE]/)!==-1)if(U.eNotation)return w;else return $;else if(Y)if(U.eNotation)return w;else return $;else if(G.indexOf(".")!==-1)if(Q==="0"&&L==="")return w;else if(Q===L)return w;else if(X&&Q==="-"+L)return w;else return $;if(Z)if(L===Q)return w;else if(X+L===Q)return w;else return $;if(G===Q)return w;else if(G===X+Q)return w;return $}}else return $}}function aR($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $}var nR=/^[-+]?0x[a-fA-F0-9]+$/,iR=/^([\-\+])?(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 rR={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};mZ.exports=oR});var aZ=M((FH,oZ)=>{function $J($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];this.lastEntities[W]={regex:new RegExp("&"+W+";","g"),val:$[W]}}}function UJ($,U,G,W,X,Z,L){if($!==void 0){if(this.options.trimValues&&!W)$=$.trim();if($.length>0){if(!L)$=this.replaceEntitiesValue($);const Y=this.options.tagValueProcessor(U,$,G,X,Z);if(Y===null||Y===void 0)return $;else if(typeof Y!==typeof $||Y!==$)return Y;else if(this.options.trimValues)return pU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return pU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}}function GJ($){if(this.options.removeNSPrefix){const U=$.split(":"),G=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=G+U[1]}return $}function XJ($,U,G){if(!this.options.ignoreAttributes&&typeof $==="string"){const W=iZ.getAllMatches($,WJ),X=W.length,Z={};for(let L=0;L<X;L++){const Y=this.resolveNameSpace(W[L][1]);let w=W[L][4],Q=this.options.attributeNamePrefix+Y;if(Y.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(Y,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]=pU(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 L={};return L[this.options.attributesGroupName]=Z,L}return Z}}function LJ($,U,G){const W=this.options.updateTag(U.tagname,G,U[":@"]);if(W===!1);else if(typeof W==="string")U.tagname=W,$.addChild(U);else $.addChild(U)}function wJ($,U,G,W){if($){if(W===void 0)W=Object.keys(U.child).length===0;if($=this.parseTextData($,U.tagname,G,!1,U[":@"]?Object.keys(U[":@"]).length!==0:!1,W),$!==void 0&&$!=="")U.add(this.options.textNodeName,$);$=""}return $}function QJ($,U,G){const W="*."+G;for(let X in $){const Z=$[X];if(W===Z||U===Z)return!0}return!1}function zJ($,U,G=">"){let W,X="";for(let Z=U;Z<$.length;Z++){let L=$[Z];if(W){if(L===W)W=""}else if(L==='"'||L==="'")W=L;else if(L===G[0])if(G[1]){if($[Z+1]===G[1])return{data:X,index:Z}}else return{data:X,index:Z};else if(L==="\t")L=" ";X+=L}}function B0($,U,G,W){const X=$.indexOf(U,G);if(X===-1)throw new Error(W);else return X+U.length-1}function gU($,U,G,W=">"){const X=zJ($,U+1,W);if(!X)return;let Z=X.data;const L=X.index,Y=Z.search(/\s/);let w=Z,Q=!0;if(Y!==-1)w=Z.substring(0,Y),Z=Z.substring(Y+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:L,attrExpPresent:Q,rawTagName:z}}function FJ($,U,G){const W=G;let X=1;for(;G<$.length;G++)if($[G]==="<")if($[G+1]==="/"){const Z=B0($,">",G,`${U} is not closed`);if($.substring(G+2,Z).trim()===U){if(X--,X===0)return{tagContent:$.substring(W,G),i:Z}}G=Z}else if($[G+1]==="?")G=B0($,"?>",G+1,"StopNode is not closed.");else if($.substr(G+1,3)==="!--")G=B0($,"-->",G+3,"StopNode is not closed.");else if($.substr(G+1,2)==="![")G=B0($,"]]>",G,"StopNode is not closed.")-2;else{const Z=gU($,G,">");if(Z){if((Z&&Z.tagName)===U&&Z.tagExp[Z.tagExp.length-1]!=="/")X++;G=Z.closeIndex}}}function pU($,U,G){if(U&&typeof $==="string"){const W=$.trim();if(W==="true")return!0;else if(W==="false")return!1;else return eR($,G)}else if(iZ.isExist($))return $;else return""}var iZ=L$(),$1=pZ(),tR=sZ(),eR=nZ();class rZ{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=$J,this.parseXml=ZJ,this.parseTextData=UJ,this.resolveNameSpace=GJ,this.buildAttributesMap=XJ,this.isItStopNode=QJ,this.replaceEntitiesValue=YJ,this.readStopNodeData=FJ,this.saveTextToParentTag=wJ,this.addChild=LJ}}var WJ=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),ZJ=function($){$=$.replace(/\r\n?/g,"\n");const U=new $1("!xml");let G=U,W="",X="";for(let Z=0;Z<$.length;Z++)if($[Z]==="<")if($[Z+1]==="/"){const Y=B0($,">",Z,"Closing Tag is not closed.");let w=$.substring(Z+2,Y).trim();if(this.options.removeNSPrefix){const 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=Y}else if($[Z+1]==="?"){let Y=gU($,Z,!1,"?>");if(!Y)throw new Error("Pi Tag is not closed.");if(W=this.saveTextToParentTag(W,G,X),this.options.ignoreDeclaration&&Y.tagName==="?xml"||this.options.ignorePiTags);else{const w=new $1(Y.tagName);if(w.add(this.options.textNodeName,""),Y.tagName!==Y.tagExp&&Y.attrExpPresent)w[":@"]=this.buildAttributesMap(Y.tagExp,X,Y.tagName);this.addChild(G,w,X)}Z=Y.closeIndex+1}else if($.substr(Z+1,3)==="!--"){const Y=B0($,"-->",Z+4,"Comment is not closed.");if(this.options.commentPropName){const w=$.substring(Z+4,Y-2);W=this.saveTextToParentTag(W,G,X),G.add(this.options.commentPropName,[{[this.options.textNodeName]:w}])}Z=Y}else if($.substr(Z+1,2)==="!D"){const Y=tR($,Z);this.docTypeEntities=Y.entities,Z=Y.i}else if($.substr(Z+1,2)==="!["){const Y=B0($,"]]>",Z,"CDATA is not closed.")-2,w=$.substring(Z+9,Y);W=this.saveTextToParentTag(W,G,X);let 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=Y+2}else{let Y=gU($,Z,this.options.removeNSPrefix),w=Y.tagName;const Q=Y.rawTagName;let{tagExp:z,attrExpPresent:F,closeIndex:R}=Y;if(this.options.transformTagName)w=this.options.transformTagName(w);if(G&&W){if(G.tagname!=="!xml")W=this.saveTextToParentTag(W,G,X,!1)}const J=G;if(J&&this.options.unpairedTags.indexOf(J.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 I="";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=Y.closeIndex}else if(this.options.unpairedTags.indexOf(w)!==-1)Z=Y.closeIndex;else{const E=this.readStopNodeData($,Q,R+1);if(!E)throw new Error(`Unexpected end of ${Q}`);Z=E.i,I=E.tagContent}const B=new $1(w);if(w!==z&&F)B[":@"]=this.buildAttributesMap(z,X,w);if(I)I=this.parseTextData(I,w,X,!0,F,!0,!0);X=X.substr(0,X.lastIndexOf(".")),B.add(this.options.textNodeName,I),this.addChild(G,B,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 I=new $1(w);if(w!==z&&F)I[":@"]=this.buildAttributesMap(z,X,w);this.addChild(G,I,X),X=X.substr(0,X.lastIndexOf("."))}else{const I=new $1(w);if(this.tagsNodeStack.push(G),w!==z&&F)I[":@"]=this.buildAttributesMap(z,X,w);this.addChild(G,I,X),G=I}W="",Z=R}}else W+=$[Z];return U.child},YJ=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 $};oZ.exports=rZ});var eZ=M((MJ)=>{function RJ($,U){return tZ($,U)}function tZ($,U,G){let W;const X={};for(let Z=0;Z<$.length;Z++){const L=$[Z],Y=JJ(L);let w="";if(G===void 0)w=Y;else w=G+"."+Y;if(Y===U.textNodeName)if(W===void 0)W=L[Y];else W+=""+L[Y];else if(Y===void 0)continue;else if(L[Y]){let Q=tZ(L[Y],U,w);const z=KJ(Q,U);if(L[":@"])IJ(Q,L[":@"],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[Y]!==void 0&&X.hasOwnProperty(Y)){if(!Array.isArray(X[Y]))X[Y]=[X[Y]];X[Y].push(Q)}else if(U.isArray(Y,w,z))X[Y]=[Q];else X[Y]=Q}}if(typeof W==="string"){if(W.length>0)X[U.textNodeName]=W}else if(W!==void 0)X[U.textNodeName]=W;return X}function JJ($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(W!==":@")return W}}function IJ($,U,G,W){if(U){const X=Object.keys(U),Z=X.length;for(let L=0;L<Z;L++){const Y=X[L];if(W.isArray(Y,G+"."+Y,!0,!0))$[Y]=[U[Y]];else $[Y]=U[Y]}}}function KJ($,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}MJ.prettify=RJ});var GL=M((JH,UL)=>{var{buildOptions:BJ}=_Z(),VJ=aZ(),{prettify:TJ}=eZ(),HJ=dU();class $L{constructor($){this.externalEntities={},this.options=BJ($)}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=HJ.validate($,U);if(X!==!0)throw Error(`${X.err.msg}:${X.err.line}:${X.err.col}`)}const G=new VJ(this.options);G.addExternalEntities(this.externalEntities);const W=G.parseXml($);if(this.options.preserveOrder||W===void 0)return W;else return TJ(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}}UL.exports=$L});var YL=M((IH,LL)=>{function AJ($,U){let G="";if(U.format&&U.indentBy.length>0)G="\n";return XL($,U,"",G)}function XL($,U,G,W){let X="",Z=!1;for(let L=0;L<$.length;L++){const Y=$[L],w=OJ(Y);if(w===void 0)continue;let Q="";if(G.length===0)Q=w;else Q=`${G}.${w}`;if(w===U.textNodeName){let I=Y[w];if(!CJ(Q,U))I=U.tagValueProcessor(w,I),I=ZL(I,U);if(Z)X+=W;X+=I,Z=!1;continue}else if(w===U.cdataPropName){if(Z)X+=W;X+=`<![CDATA[${Y[w][0][U.textNodeName]}]]>`,Z=!1;continue}else if(w===U.commentPropName){X+=W+`<!--${Y[w][0][U.textNodeName]}-->`,Z=!0;continue}else if(w[0]==="?"){const I=WL(Y[":@"],U),B=w==="?xml"?"":W;let E=Y[w][0][U.textNodeName];E=E.length!==0?" "+E:"",X+=B+`<${w}${E}${I}?>`,Z=!0;continue}let z=W;if(z!=="")z+=U.indentBy;const F=WL(Y[":@"],U),R=W+`<${w}${F}`,J=XL(Y[w],U,Q,z);if(U.unpairedTags.indexOf(w)!==-1)if(U.suppressUnpairedNode)X+=R+">";else X+=R+"/>";else if((!J||J.length===0)&&U.suppressEmptyNode)X+=R+"/>";else if(J&&J.endsWith(">"))X+=R+`>${J}${W}</${w}>`;else{if(X+=R+">",J&&W!==""&&(J.includes("/>")||J.includes("</")))X+=W+U.indentBy+J+W;else X+=J;X+=`</${w}>`}Z=!0}return X}function OJ($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(!$.hasOwnProperty(W))continue;if(W!==":@")return W}}function WL($,U){let G="";if($&&!U.ignoreAttributes)for(let W in $){if(!$.hasOwnProperty(W))continue;let X=U.attributeValueProcessor(W,$[W]);if(X=ZL(X,U),X===!0&&U.suppressBooleanAttributes)G+=` ${W.substr(U.attributeNamePrefix.length)}`;else G+=` ${W.substr(U.attributeNamePrefix.length)}="${X}"`}return G}function CJ($,U){$=$.substr(0,$.length-U.textNodeName.length-1);let G=$.substr($.lastIndexOf(".")+1);for(let W in U.stopNodes)if(U.stopNodes[W]===$||U.stopNodes[W]==="*."+G)return!0;return!1}function ZL($,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 $}LL.exports=AJ});var QL=M((KH,wL)=>{function Y0($){if(this.options=Object.assign({},qJ,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=jJ;if(this.processTextOrObjNode=NJ,this.options.format)this.indentate=PJ,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}function NJ($,U,G){const W=this.j2x($,G+1);if($[this.options.textNodeName]!==void 0&&Object.keys($).length===1)return this.buildTextValNode($[this.options.textNodeName],U,W.attrStr,G);else return this.buildObjectNode(W.val,U,W.attrStr,G)}function PJ($){return this.options.indentBy.repeat($)}function jJ($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1}var fJ=YL(),qJ={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("\'","g"),val:"'"},{regex:new RegExp("\"","g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};Y0.prototype.build=function($){if(this.options.preserveOrder)return fJ($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};Y0.prototype.j2x=function($,U){let G="",W="";for(let X in $){if(!Object.prototype.hasOwnProperty.call($,X))continue;if(typeof $[X]==="undefined"){if(this.isAttribute(X))W+=""}else if($[X]===null)if(this.isAttribute(X))W+="";else if(X[0]==="?")W+=this.indentate(U)+"<"+X+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+X+"/"+this.tagEndChar;else if($[X]instanceof Date)W+=this.buildTextValNode($[X],X,"",U);else if(typeof $[X]!=="object"){const Z=this.isAttribute(X);if(Z)G+=this.buildAttrPairStr(Z,""+$[X]);else if(X===this.options.textNodeName){let L=this.options.tagValueProcessor(X,""+$[X]);W+=this.replaceEntitiesValue(L)}else W+=this.buildTextValNode($[X],X,"",U)}else if(Array.isArray($[X])){const Z=$[X].length;let L="",Y="";for(let w=0;w<Z;w++){const 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(L+=z.val,this.options.attributesGroupName&&Q.hasOwnProperty(this.options.attributesGroupName))Y+=z.attrStr}else L+=this.processTextOrObjNode(Q,X,U);else if(this.options.oneListGroup){let z=this.options.tagValueProcessor(X,Q);z=this.replaceEntitiesValue(z),L+=z}else L+=this.buildTextValNode(Q,X,"",U)}if(this.options.oneListGroup)L=this.buildObjectNode(L,X,Y,U);W+=L}else if(this.options.attributesGroupName&&X===this.options.attributesGroupName){const Z=Object.keys($[X]),L=Z.length;for(let Y=0;Y<L;Y++)G+=this.buildAttrPairStr(Z[Y],""+$[X][Z[Y]])}else W+=this.processTextOrObjNode($[X],X,U)}return{attrStr:G,val:W}};Y0.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};Y0.prototype.buildObjectNode=function($,U,G,W){if($==="")if(U[0]==="?")return this.indentate(W)+"<"+U+G+"?"+this.tagEndChar;else return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else{let X="</"+U+this.tagEndChar,Z="";if(U[0]==="?")Z="?",X="";if((G||G==="")&&$.indexOf("<")===-1)return this.indentate(W)+"<"+U+G+Z+">"+$+X;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&Z.length===0)return this.indentate(W)+`<!--${$}-->`+this.newLine;else return this.indentate(W)+"<"+U+G+Z+this.tagEndChar+$+this.indentate(W)+X}};Y0.prototype.closeTag=function($){let U="";if(this.options.unpairedTags.indexOf($)!==-1){if(!this.options.suppressUnpairedNode)U="/"}else if(this.options.suppressEmptyNode)U="/";else U=`></${$}`;return U};Y0.prototype.buildTextValNode=function($,U,G,W){if(this.options.cdataPropName!==!1&&U===this.options.cdataPropName)return this.indentate(W)+`<![CDATA[${$}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName)return this.indentate(W)+`<!--${$}-->`+this.newLine;else if(U[0]==="?")return this.indentate(W)+"<"+U+G+"?"+this.tagEndChar;else{let X=this.options.tagValueProcessor(U,$);if(X=this.replaceEntitiesValue(X),X==="")return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else return this.indentate(W)+"<"+U+G+">"+X+"</"+U+this.tagEndChar}};Y0.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let U=0;U<this.options.entities.length;U++){const G=this.options.entities[U];$=$.replace(G.regex,G.val)}return $};wL.exports=Y0});var FL=M((MH,zL)=>{var SJ=dU(),kJ=GL(),DJ=QL();zL.exports={XMLParser:kJ,XMLValidator:SJ,XMLBuilder:DJ}});var EL=M((EH,ML)=>{var{defineProperty:Y$,getOwnPropertyDescriptor:bJ,getOwnPropertyNames:hJ}=Object,xJ=Object.prototype.hasOwnProperty,v=($,U)=>Y$($,"name",{value:U,configurable:!0}),vJ=($,U)=>{for(var G in U)Y$($,G,{get:U[G],enumerable:!0})},cJ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of hJ(U))if(!xJ.call($,X)&&X!==G)Y$($,X,{get:()=>U[X],enumerable:!(W=bJ(U,X))||W.enumerable})}return $},yJ=($)=>cJ(Y$({},"__esModule",{value:!0}),$),RL={};vJ(RL,{_toBool:()=>_J,_toNum:()=>dJ,_toStr:()=>uJ,awsExpectUnion:()=>pJ,loadRestJsonErrorCode:()=>mJ,loadRestXmlErrorCode:()=>oJ,parseJsonBody:()=>IL,parseJsonErrorBody:()=>sJ,parseXmlBody:()=>KL,parseXmlErrorBody:()=>rJ});ML.exports=yJ(RL);var uJ=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"),_J=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"),dJ=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"),gJ=f0(),pJ=v(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return gJ.expectUnion($)},"awsExpectUnion"),lJ=f0(),JL=v(($,U)=>lJ.collectBody($,U).then((G)=>U.utf8Encoder(G)),"collectBodyString"),IL=v(($,U)=>JL($,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"),sJ=v(async($,U)=>{const G=await IL($,U);return G.message=G.message??G.Message,G},"parseJsonErrorBody"),mJ=v(($,U)=>{const G=v((Z,L)=>Object.keys(Z).find((Y)=>Y.toLowerCase()===L.toLowerCase()),"findKey"),W=v((Z)=>{let L=Z;if(typeof L==="number")L=L.toString();if(L.indexOf(",")>=0)L=L.split(",")[0];if(L.indexOf(":")>=0)L=L.split(":")[0];if(L.indexOf("#")>=0)L=L.split("#")[1];return L},"sanitizeErrorCode"),X=G($.headers,"x-amzn-errortype");if(X!==void 0)return W($.headers[X]);if(U.code!==void 0)return W(U.code);if(U.__type!==void 0)return W(U.__type)},"loadRestJsonErrorCode"),nJ=f0(),iJ=FL(),KL=v(($,U)=>JL($,U).then((G)=>{if(G.length){const W=new iJ.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",L=Object.keys(X)[0],Y=X[L];if(Y[Z])Y[L]=Y[Z],delete Y[Z];return nJ.getValueFromTextNode(Y)}return{}}),"parseXmlBody"),rJ=v(async($,U)=>{const G=await KL($,U);if(G.Error)G.Error.message=G.Error.message??G.Error.Message;return G},"parseXmlErrorBody"),oJ=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 tJ=M((U1)=>{Object.defineProperty(U1,"__esModule",{value:!0});var lU=aJ();lU.__exportStar(GZ(),U1);lU.__exportStar(DZ(),U1);lU.__exportStar(EL(),U1)});var n=X1(I$(),1),jI=n.default.v1,SI=n.default.v3,gG=n.default.v4,kI=n.default.v5,DI=n.default.NIL,bI=n.default.version,hI=n.default.validate,xI=n.default.stringify,vI=n.default.parse;function uI($){return $}var p5=($)=>(U)=>async(G)=>{if(!y.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)},l5={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},_I=($)=>({applyToStack:(U)=>{U.add(p5($),l5)}});var s5=()=>($,U)=>async(G)=>{try{const W=await $(G),{clientName:X,commandName:Z,logger:L,dynamoDbDocumentClientOptions:Y={}}=U,{overrideInputFilterSensitiveLog:w,overrideOutputFilterSensitiveLog:Q}=Y,z=w??U.inputFilterSensitiveLog,F=Q??U.outputFilterSensitiveLog,{$metadata:R,...J}=W.output;return L?.info?.({clientName:X,commandName:Z,input:z(G.input),output:F(J),metadata:R}),W}catch(W){const{clientName:X,commandName:Z,logger:L,dynamoDbDocumentClientOptions:Y={}}=U,{overrideInputFilterSensitiveLog:w}=Y,Q=w??U.inputFilterSensitiveLog;throw L?.error?.({clientName:X,commandName:Z,input:Q(G.input),error:W,metadata:W.$metadata}),W}},m5={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},gI=($)=>({applyToStack:(U)=>{U.add(s5(),m5)}});var pG="X-Amzn-Trace-Id",n5="AWS_LAMBDA_FUNCTION_NAME",i5="_X_AMZN_TRACE_ID",r5=($)=>(U)=>async(G)=>{const{request:W}=G;if(!y.isInstance(W)||$.runtime!=="node"||W.headers.hasOwnProperty(pG))return U(G);const X=process.env[n5],Z=process.env[i5],L=(Y)=>typeof Y==="string"&&Y.length>0;if(L(X)&&L(Z))W.headers[pG]=Z;return U({...G,request:W})},o5={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},nI=($)=>({applyToStack:(U)=>{U.add(r5($),o5)}});function x3($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}class Sz{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:L}=W.next();if(this.data.delete(Z),L||++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 kz=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),i0=($)=>kz.test($)||$.startsWith("[")&&$.endsWith("]");var Dz=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),r0=($,U=!1)=>{if(!U)return Dz.test($);const G=$.split(".");for(let W of G)if(!r0(W))return!1;return!0};var o0={};var t="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 C extends Error{constructor($){super($);this.name="EndpointError"}}var wX=($,U)=>$===U;var QX=($)=>{const U=$.split("."),G=[];for(let W of U){const X=W.indexOf("[");if(X!==-1){if(W.indexOf("]")!==W.length-1)throw new C(`Path: '${$}' does not end with ']'`);const Z=W.slice(X+1,-1);if(Number.isNaN(parseInt(Z)))throw new C(`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 v1=($,U)=>QX(U).reduce((G,W)=>{if(typeof G!=="object")throw new C(`Index '${W}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(G))return G[parseInt(W)];return G[W]},$);var zX=($)=>$!=null;var FX=($)=>!$;var c1=X1(Q0(),1);var FU={[c1.EndpointURLScheme.HTTP]:80,[c1.EndpointURLScheme.HTTPS]:443},RX=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:R,port:J,protocol:I="",path:B="",query:E={}}=$,V=new URL(`${I}//${R}${J?`:${J}`:""}${B}`);return V.search=Object.entries(E).map(([T,H])=>`${T}=${H}`).join("&"),V}return new URL($)}catch(R){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const G=U.href,{host:W,hostname:X,pathname:Z,protocol:L,search:Y}=U;if(Y)return null;const w=L.slice(0,-1);if(!Object.values(c1.EndpointURLScheme).includes(w))return null;const Q=i0(X),z=G.includes(`${W}:${FU[w]}`)||typeof $==="string"&&$.includes(`${W}:${FU[w]}`),F=`${W}${z?`:${FU[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:wX,getAttr:v1,isSet:zX,isValidHostLabel:r0,not:FX,parseURL:RX,stringEquals:JX,substring:IX,uriEncode:KX};var y1=($,U)=>{const G=[],W={...U.endpointParams,...U.referenceRecord};let X=0;while(X<$.length){const Z=$.indexOf("{",X);if(Z===-1){G.push($.slice(X));break}G.push($.slice(X,Z));const L=$.indexOf("}",Z);if(L===-1){G.push($.slice(Z));break}if($[Z+1]==="{"&&$[L+1]==="}")G.push($.slice(Z+1,L)),X=L+2;const Y=$.substring(Z+1,L);if(Y.includes("#")){const[w,Q]=Y.split("#");G.push(v1(W[w],Q))}else G.push(W[Y]);X=L+1}return G.join("")};var EX=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var X0=($,U,G)=>{if(typeof $==="string")return y1($,G);else if($.fn)return u1($,G);else if($.ref)return EX($,G);throw new C(`'${U}': ${String($)} is not a string, function or reference.`)};var u1=({fn:$,argv:U},G)=>{const W=U.map((Z)=>["boolean","number"].includes(typeof Z)?Z:X0(Z,"arg",G)),X=$.split(".");if(X[0]in o0&&X[1]!=null)return o0[X[0]][X[1]](...W);return MX[$](...W)};var BX=({assign:$,...U},G)=>{if($&&$ in G.referenceRecord)throw new C(`'${$}' is already defined in Reference Record.`);const W=u1(U,G);return G.logger?.debug?.(`${t} evaluateCondition: ${d(U)} = ${d(W)}`),{result:W===""?!0:!!W,...$!=null&&{toAssign:{name:$,value:W}}}};var N0=($=[],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?.(`${t} 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 L=X0(Z,"Header value entry",U);if(typeof L!=="string")throw new C(`Header '${W}' value '${L}' is not a string`);return L})}),{});var RU=($,U)=>{if(Array.isArray($))return $.map((G)=>RU(G,U));switch(typeof $){case"string":return y1($,U);case"object":if($===null)throw new C(`Unexpected endpoint property: ${$}`);return _1($,U);case"boolean":return $;default:throw new C(`Unexpected endpoint property type: ${typeof $}`)}};var _1=($,U)=>Object.entries($).reduce((G,[W,X])=>({...G,[W]:RU(X,U)}),{});var TX=($,U)=>{const G=X0($,"Endpoint URL",U);if(typeof G==="string")try{return new URL(G)}catch(W){throw console.error(`Failed to construct URL with ${G}`,W),W}throw new C(`Endpoint URL must be a string, got ${typeof G}`)};var HX=($,U)=>{const{conditions:G,endpoint:W}=$,{result:X,referenceRecord:Z}=N0(G,U);if(!X)return;const L={...U,referenceRecord:{...U.referenceRecord,...Z}},{url:Y,properties:w,headers:Q}=W;return U.logger?.debug?.(`${t} Resolving endpoint from template: ${d(W)}`),{...Q!=null&&{headers:VX(Q,L)},...w!=null&&{properties:_1(w,L)},url:TX(Y,L)}};var AX=($,U)=>{const{conditions:G,error:W}=$,{result:X,referenceRecord:Z}=N0(G,U);if(!X)return;throw new C(X0(W,"Error",{...U,referenceRecord:{...U.referenceRecord,...Z}}))};var OX=($,U)=>{const{conditions:G,rules:W}=$,{result:X,referenceRecord:Z}=N0(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=HX(G,U);if(W)return W}else if(G.type==="error")AX(G,U);else if(G.type==="tree"){const W=OX(G,U);if(W)return W}else throw new C(`Unknown endpoint rule: ${G}`);throw new C("Rules evaluation failed")};var bz=($,U)=>{const{endpointParams:G,logger:W}=U,{parameters:X,rules:Z}=$;U.logger?.debug?.(`${t} Initial EndpointParams: ${d(G)}`);const L=Object.entries(X).filter(([,Q])=>Q.default!=null).map(([Q,z])=>[Q,z.default]);if(L.length>0)for(let[Q,z]of L)G[Q]=G[Q]??z;const Y=Object.entries(X).filter(([,Q])=>Q.required).map(([Q])=>Q);for(let Q of Y)if(G[Q]==null)throw new C(`Missing required parameter: '${Q}'`);const w=d1(Z,{endpointParams:G,logger:W,referenceRecord:{}});return U.logger?.debug?.(`${t} Resolved endpoint: ${d(w)}`),w};var JU=($,U=!1)=>{if(U){for(let G of $.split("."))if(!JU(G))return!1;return!0}if(!r0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(i0($))return!1;return!0};var CX=($)=>{const U=$.split(":");if(U.length<6)return null;const[G,W,X,Z,L,...Y]=U;if(G!=="arn"||W===""||X===""||Y.join(":")==="")return null;const w=Y.map((Q)=>Q.split("/")).flat();return{partition:W,service:X,region:Z,accountId:L,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 xz=fX,vz="",qX=($)=>{const{partitions:U}=xz;for(let W of U){const{regions:X,outputs:Z}=W;for(let[L,Y]of Object.entries(X))if(L===$)return{...Z,...Y}}for(let W of U){const{regionRegex:X,outputs:Z}=W;if(new RegExp(X).test($))return{...Z}}const G=U.find((W)=>W.id==="aws");if(!G)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...G.outputs}};var NX=()=>vz;var cz={isVirtualHostableS3Bucket:JU,parseArn:CX,partition:qX};o0.aws=cz;var IU="user-agent",g1="x-amz-user-agent",KU=" ",p1="/",PX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,jX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,MU="-";var yz=($)=>(U,G)=>async(W)=>{const{request:X}=W;if(!y.isInstance(X))return U(W);const{headers:Z}=X,L=G?.userAgent?.map(EU)||[],Y=(await $.defaultUserAgentProvider()).map(EU),w=$?.customUserAgent?.map(EU)||[],Q=NX(),z=(Q?[Q]:[]).concat([...Y,...L,...w]).join(KU),F=[...Y.filter((R)=>R.startsWith("aws-sdk-")),...w].join(KU);if($.runtime!=="browser"){if(F)Z[g1]=Z[g1]?`${Z[IU]} ${F}`:F;Z[IU]=z}else Z[g1]=z;return U({...W,request:X})},EU=($)=>{const U=$[0].split(p1).map((L)=>L.replace(PX,MU)).join(p1),G=$[1]?.replace(jX,MU),W=U.indexOf(p1),X=U.substring(0,W);let Z=U.substring(W+1);if(X==="api")Z=Z.toLowerCase();return[X,Z,G].filter((L)=>L&&L.length>0).reduce((L,Y,w)=>{switch(w){case 0:return Y;case 1:return`${L}/${Y}`;default:return`${L}#${Y}`}},"")},uz={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},ME=($)=>({applyToStack:(U)=>{U.add(yz($),uz)}});var l1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var BU=($)=>l1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var qE=($)=>{const{region:U,useFipsEndpoint:G}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return BU(U);const W=await U();return BU(W)},useFipsEndpoint:async()=>{const W=typeof U==="string"?U:await U();if(l1(W))return!0;return typeof G!=="function"?Promise.resolve(!!G):G()}}};var P0=($,U,G)=>{if(!(U in $))return;if($[U]==="true")return!0;if($[U]==="false")return!1;throw new Error(`Cannot load ${G} "${U}". Expected "true" or "false", got ${$[U]}.`)};var Z0;(function($){$.ENV="env",$.CONFIG="shared config entry"})(Z0||(Z0={}));var _z="AWS_USE_DUALSTACK_ENDPOINT",dz="use_dualstack_endpoint";var vE={environmentVariableSelector:($)=>P0($,_z,Z0.ENV),configFileSelector:($)=>P0($,dz,Z0.CONFIG),default:!1};var gz="AWS_USE_FIPS_ENDPOINT",pz="use_fips_endpoint";var uE={environmentVariableSelector:($)=>P0($,gz,Z0.ENV),configFileSelector:($)=>P0($,pz,Z0.CONFIG),default:!1};var VU=X1(Q0(),1),SX=($)=>$[VU.SMITHY_CONTEXT_KEY]||($[VU.SMITHY_CONTEXT_KEY]={});var e=($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U};var kX={environmentVariableSelector:($)=>$.AWS_REGION,configFileSelector:($)=>$.region,default:()=>{throw new Error("Region is missing")}},XB={preferredFile:"credentials"};function lz($){return(U)=>async(G)=>{const W=G.request;if(y.isInstance(W)){const{body:X,headers:Z}=W;if(X&&Object.keys(Z).map((L)=>L.toLowerCase()).indexOf(DX)===-1)try{const L=$(X);W.headers={...W.headers,[DX]:String(L)}}catch(L){}}return U({...G,request:W})}}var DX="content-length",sz={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},kB=($)=>({applyToStack:(U)=>{U.add(lz($.bodyLengthChecker),sz)}});var bX=($,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 hX=($,U)=>(G,W)=>async(X)=>{const Z=W.endpointV2?.url&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!Z)throw new Error("No valid endpoint provider available.");const L=await U(X.input,{...$,endpoint:Z});return G({...X,request:L})};function cB($,U,G){return{applyToStack:(W)=>{W.add(bX($,G),mz),W.add(hX($,U),TU)}}}var mz={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},TU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var xX=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(az(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!oz(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},nz=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,iz=/(\d+\.){3}\d+/,rz=/\.\./;var oz=($)=>nz.test($)&&!iz.test($)&&!rz.test($),az=($)=>{const[U,G,W,,,X]=$.split(":"),Z=U==="arn"&&$.split(":").length>=6,L=Boolean(Z&&G&&W&&X);if(Z&&!L)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return L};var vX=($,U,G)=>{const W=async()=>{const X=G[$]??G[U];if(typeof X==="function")return X();return X};if($==="credentialScope"||U==="CredentialScope")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return X?.credentialScope??X?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return X?.accountId??X?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{const X=await W();if(X&&typeof X==="object"){if("url"in X)return X.url.href;if("hostname"in X){const{protocol:Z,hostname:L,port:Y,path:w}=X;return`${Z}//${L}${Y?":"+Y:""}${w}`}}return X};return W};var cX="AWS_ENDPOINT_URL",yX="endpoint_url",uX=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((Z)=>Z.toUpperCase()),W=U[[cX,...G].join("_")];if(W)return W;const X=U[cX];if(X)return X;return},configFileSelector:(U,G)=>{if(G&&U.services){const X=G[["services",U.services].join(HU)];if(X){const Z=$.split(" ").map((Y)=>Y.toLowerCase()),L=X[[Z.join("_"),yX].join(HU)];if(L)return L}}const W=U[yX];if(W)return W;return},default:void 0});var s1=async($)=>I0(uX($??""))();var m1=($)=>{if(typeof $==="object"){if("url"in $)return AU($.url);return $}return AU($)};var _X=async($,U,G,W)=>{if(!G.endpoint){let L;if(G.serviceConfiguredEndpoint)L=await G.serviceConfiguredEndpoint();else L=await s1(G.serviceId);if(L)G.endpoint=()=>Promise.resolve(m1(L))}const X=await tz($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(X,W)},tz=async($,U,G)=>{const W={},X=U?.getEndpointParameterInstructions?.()||{};for(let[Z,L]of Object.entries(X))switch(L.type){case"staticContextParams":W[Z]=L.value;break;case"contextParams":W[Z]=$[L.name];break;case"clientContextParams":case"builtInParams":W[Z]=await vX(L.name,Z,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}if(Object.keys(X).length===0)Object.assign(W,G);if(String(G.serviceId).toLowerCase()==="s3")await xX(W);return W};var dX=({config:$,instructions:U})=>{return(G,W)=>async(X)=>{const Z=await _X(X.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=Z,W.authSchemes=Z.properties?.authSchemes;const L=W.authSchemes?.[0];if(L){W.signing_region=L.signingRegion,W.signing_service=L.signingName;const w=SX(W)?.selectedHttpAuthScheme?.httpAuthOption;if(w)w.signingProperties=Object.assign(w.signingProperties||{},{signing_region:L.signingRegion,signingRegion:L.signingRegion,signing_service:L.signingName,signingName:L.signingName,signingRegionSet:L.signingRegionSet},L.properties)}return G({...X})}};var ez={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:TU.name},zV=($,U)=>({applyToStack:(G)=>{G.addRelativeTo(dX({config:$,instructions:U}),ez)}});var KV=($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>m1(await e(G)()):void 0,Z={...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:e($.useDualstackEndpoint??!1),useFipsEndpoint:e($.useFipsEndpoint??!1)};let L=void 0;return Z.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!L)L=s1($.serviceId);return L},Z};var g;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(g||(g={}));var K0=3,gX=g.STANDARD;var pX=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],lX=["TimeoutError","RequestTimeout","RequestTimeoutException"],sX=[500,502,503,504],mX=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var $F=($)=>$.$metadata?.clockSkewCorrected,j0=($)=>$.$metadata?.httpStatusCode===429||pX.includes($.name)||$.$retryable?.throttling==!0,n1=($)=>$F($)||lX.includes($.name)||mX.includes($?.code||"")||sX.includes($.$metadata?.httpStatusCode||0),nX=($)=>{if($.$metadata?.httpStatusCode!==void 0){const U=$.$metadata.httpStatusCode;if(500<=U&&U<=599&&!n1($))return!0;return!1}return!1};class i1{constructor($){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=$?.beta??0.7,this.minCapacity=$?.minCapacity??1,this.minFillRate=$?.minFillRate??0.5,this.scaleConstant=$?.scaleConstant??0.4,this.smooth=$?.smooth??0.8;const U=this.getCurrentTimeInSeconds();this.lastThrottleTime=U,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket($){if(!this.enabled)return;if(this.refillTokenBucket(),$>this.currentCapacity){const U=($-this.currentCapacity)/this.fillRate*1000;await new Promise((G)=>setTimeout(G,U))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){const $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}const U=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=$}updateClientSendingRate($){let U;if(this.updateMeasuredRate(),j0($)){const W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),U=this.cubicThrottle(W),this.enableTokenBucket()}else this.calculateTimeWindow(),U=this.cubicSuccess(this.getCurrentTimeInSeconds());const G=Math.min(U,2*this.measuredTxRate);this.updateTokenBucketRate(G)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle($){return this.getPrecise($*this.beta)}cubicSuccess($){return this.getPrecise(this.scaleConstant*Math.pow($-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate($){this.refillTokenBucket(),this.fillRate=Math.max($,this.minFillRate),this.maxCapacity=Math.max($,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const $=this.getCurrentTimeInSeconds(),U=Math.floor($*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){const G=this.requestCount/(U-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=U}}getPrecise($){return parseFloat($.toFixed(8))}}var M0=100,a0=20000,OU=500,r1=500,CU=5,fU=10,qU=1,o1="amz-sdk-invocation-id",a1="amz-sdk-request";var iX=()=>{let $=M0;return{computeNextBackoffDelay:(W)=>{return Math.floor(Math.min(a0,Math.random()*2**W*$))},setDelayBase:(W)=>{$=W}}};var NU=({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(a0,$),getRetryCost:()=>G}};class S0{constructor($){this.maxAttempts=$,this.mode=g.STANDARD,this.capacity=r1,this.retryBackoffStrategy=iX(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return NU({retryDelay:M0,retryCount:0})}async refreshRetryTokenForRetry($,U){const G=await this.getMaxAttempts();if(this.shouldRetry($,U,G)){const W=U.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?OU:M0);const X=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),Z=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,X):X,L=this.getCapacityCost(W);return this.capacity-=L,NU({retryDelay:Z,retryCount:$.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(r1,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 ${K0}`),K0}}shouldRetry($,U,G){return $.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?fU:CU}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class PU{constructor($,U){this.maxAttemptsProvider=$,this.mode=g.ADAPTIVE;const{rateLimiter:G}=U??{};this.rateLimiter=G??new i1,this.standardRetryStrategy=new S0($)}async acquireInitialRetryToken($){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken($)}async refreshRetryTokenForRetry($,U){return this.rateLimiter.updateClientSendingRate(U),this.standardRetryStrategy.refreshRetryTokenForRetry($,U)}recordSuccess($){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess($)}}var rX="AWS_MAX_ATTEMPTS",oX="max_attempts",LT={environmentVariableSelector:($)=>{const U=$[rX];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${rX} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[oX];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${oX} mast be a number, got "${U}"`);return G},default:K0},YT=($)=>{const{retryStrategy:U}=$,G=e($.maxAttempts??K0);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await e($.retryMode)()===g.ADAPTIVE)return new PU(G);return new S0(G)}}},UF="AWS_RETRY_MODE",GF="retry_mode",wT={environmentVariableSelector:($)=>$[UF],configFileSelector:($)=>$[GF],default:gX};import{Readable as WF}from"stream";var aX=($)=>$?.body instanceof WF||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var jU=($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)};var XF=($)=>(U,G)=>async(W)=>{let X=await $.retryStrategy();const Z=await $.maxAttempts();if(ZF(X)){X=X;let L=await X.acquireInitialRetryToken(G.partition_id),Y=new Error,w=0,Q=0;const{request:z}=W,F=y.isInstance(z);if(F)z.headers[o1]=gG();while(!0)try{if(F)z.headers[a1]=`attempt=${w+1}; max=${Z}`;const{response:R,output:J}=await U(W);return X.recordSuccess(L),J.$metadata.attempts=w+1,J.$metadata.totalRetryDelay=Q,{response:R,output:J}}catch(R){const J=LF(R);if(Y=jU(R),F&&aX(z))throw(G.logger instanceof tX?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),Y;try{L=await X.refreshRetryTokenForRetry(L,J)}catch(B){if(!Y.$metadata)Y.$metadata={};throw Y.$metadata.attempts=w+1,Y.$metadata.totalRetryDelay=Q,Y}w=L.getRetryCount();const I=L.getRetryDelay();Q+=I,await new Promise((B)=>setTimeout(B,I))}}else{if(X=X,X?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",X.mode]];return X.retry(U,W)}},ZF=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",LF=($)=>{const U={error:$,errorType:YF($)},G=QF($.$response);if(G)U.retryAfterHint=G;return U},YF=($)=>{if(j0($))return"THROTTLING";if(n1($))return"TRANSIENT";if(nX($))return"SERVER_ERROR";return"CLIENT_ERROR"},wF={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},TT=($)=>({applyToStack:(U)=>{U.add(XF($),wF)}}),QF=($)=>{if(!SU.isInstance($))return;const U=Object.keys($.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)};import{platform as eJ,release as $I}from"os";import{env as VL,versions as UI}from"process";var sU={isCrtAvailable:!1};var BL=()=>{if(sU.isCrtAvailable)return["md/crt-avail"];return null};var GI="AWS_SDK_UA_APP_ID",WI="sdk-ua-app-id",qH=({serviceId:$,clientVersion:U})=>{const G=[["aws-sdk-js",U],["ua","2.0"],[`os/${eJ()}`,$I()],["lang/js"],["md/nodejs",`${UI.node}`]],W=BL();if(W)G.push(W);if($)G.push([`api/${$}`,U]);if(VL.AWS_EXECUTION_ENV)G.push([`exec-env/${VL.AWS_EXECUTION_ENV}`]);const X=I0({environmentVariableSelector:(L)=>L[GI],configFileSelector:(L)=>L[WI],default:void 0})();let Z=void 0;return async()=>{if(!Z){const L=await X;Z=L?[...G,[`app/${L}`]]:[...G]}return Z}};import{Buffer as XI}from"buffer";import{createHash as ZI,createHmac as LI}from"crypto";function TL($,U){if(XI.isBuffer($))return $;if(typeof $==="string")return HL($,U);if(ArrayBuffer.isView($))return mU($.buffer,$.byteOffset,$.byteLength);return mU($)}class YI{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(AL(TL($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?LI(this.algorithmIdentifier,TL(this.secret)):ZI(this.algorithmIdentifier)}}import{fstatSync as wI,lstatSync as QI}from"fs";var xH=($)=>{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 QI($.path).size;else if(typeof $.fd==="number")return wI($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var PL=X1(O$(),1);var OL="AWS_EXECUTION_ENV",nU="AWS_REGION",iU="AWS_DEFAULT_REGION",CL="AWS_EC2_METADATA_DISABLED",fL=["in-region","cross-region","mobile","standard","legacy"],qL="/latest/meta-data/placement/region";var NL={environmentVariableSelector:($)=>{return $.AWS_DEFAULTS_MODE},configFileSelector:($)=>{return $.defaults_mode},default:"legacy"};var sH=({region:$=I0(kX),defaultsMode:U=I0(NL)}={})=>PL.memoize(async()=>{const G=typeof U==="function"?await U():U;switch(G?.toLowerCase()){case"auto":return zI($);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 ${fL.join(", ")}, got ${G}`)}}),zI=async($)=>{if($){const U=typeof $==="function"?await $():$,G=await FI();if(!G)return"standard";if(U===G)return"in-region";else return"cross-region"}return"standard"},FI=async()=>{if(process.env[OL]&&(process.env[nU]||process.env[iU]))return process.env[nU]??process.env[iU];if(!process.env[CL])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-3tkcbjr7.js"),G=await $();return(await U({...G,path:qL})).toString()}catch($){}};var rH=($)=>{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}}},oH=($)=>{return{region:$.region()}};export{gG as V,SX as W,e as X,uI as Y,_I as Z,gI as _,nI as $,P0 as aa,Z0 as ba,zU as ca,x3 as da,Sz as ea,o0 as fa,bz as ga,cz as ha,ME as ia,vE as ja,uE as ka,kX as la,XB as ma,qE as na,kB as oa,tz as pa,cB as qa,zV as ra,KV as sa,gX as ta,LT as ua,YT as va,wT as wa,TT as xa,tJ as ya,qH as za,YI as Aa,xH as Ba,sH as Ca,rH as Da,oH as Ea};
|
|
19
|
-
|
|
20
|
-
//# debugId=16953DF9E642FADF64756E2164756E21
|
package/dist/chunk-qsz9qyck.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-g31s71mt.js";import{I as $}from"./chunk-td079vg9.js";import"./chunk-wfc30gdx.js";import{$ as yr,Aa as He,Ba as Ne,Ca as _e,Da as lr,Ea as hr,W as ee,X as re,Y as or,Z as dr,_ as cr,ca as H,da as ar,ea as Ie,fa as Re,ga as Pe,ha as Te,ia as mr,ja as Ke,ka as Me,la as Be,ma as Le,na as wr,oa as kr,qa as E,ra as S,sa as vr,ta as Qe,ua as Xe,va as Er,wa as Ye,xa as Sr,ya as U,za as Ze}from"./chunk-mv6z1e1k.js";import{Ab as I,Fa as er,Ga as rr,Ma as je,Oa as Fe,Pa as De,Qa as tr,Ra as Ue,Sa as qe,Va as Ve,Wa as We,ab as v,bb as t,cb as Wr,eb as _,fb as b,gb as j,hb as F,ib as h,pb as $r,qb as a,rb as Fr,sb as fe,tb as Ae,ub as sr,vb as ir,xb as c,yb as o}from"./chunk-d5sps5cz.js";import"./chunk-6mhs44ws.js";import{Cb as R,Db as xe}from"./chunk-7dzytwxa.js";import"./chunk-vp9qt0ma.js";import{Fb as ge}from"./chunk-9nrnhtax.js";import"./chunk-a8p9qrrx.js";var P=$(H(),1);var se=$(U(),1);function Br(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}}function Z(e){return{schemeId:"smithy.api#noAuth"}}var ie=async(e,s,r)=>{return{operation:ee(s).operation,region:await re(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},le=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(Z(e));break}case"RegisterClient":{s.push(Z(e));break}case"StartDeviceAuthorization":{s.push(Z(e));break}default:s.push(Br(e))}return s},he=(e)=>{return{...se.resolveAwsSdkSigV4Config(e)}};var ne=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},k={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var oe={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 pe=$(U(),1);var ze=$(U(),1),Ge=$(H(),1);var de={["required"]:!1,type:"String"},ce={["required"]:!0,default:!1,type:"Boolean"},ye={["ref"]:"Endpoint"},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},Ee={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},te={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Se={["ref"]:"PartitionResult"},ae={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Se,"supportsDualStack"]}]},me=[ve],we=[Ee],ke=[{["ref"]:"Region"}],Qr={version:"1.0",parameters:{Region:de,UseDualStack:ce,UseFIPS:ce,Endpoint:de},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ye]}],rules:[{conditions:me,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:we,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ye,properties:m,headers:m},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ke}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ke,assign:"PartitionResult"}],rules:[{conditions:[ve,Ee],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,te]},ae],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:me,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[te,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Se,"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:we,rules:[{conditions:[ae],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"}]},$e=Qr;var Xr=new Ie({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),be=(e,s={})=>{return Xr.get(e,()=>Pe($e,{endpointParams:e,logger:s.logger}))};Re.aws=Te;var Je=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Ue,base64Encoder:e?.base64Encoder??qe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??be,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new ze.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ge.NoAuthSigner}],logger:e?.logger??new De,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??xe,utf8Decoder:e?.utf8Decoder??je,utf8Encoder:e?.utf8Encoder??Fe}};var Ce=(e)=>{Ae(process.version);const s=_e(e),r=()=>s().then(fe),i=Je(e);return pe.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Ne,credentialDefaultProvider:e?.credentialDefaultProvider??ge,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ze({serviceId:i.serviceId,clientVersion:oe.version}),maxAttempts:e?.maxAttempts??R(Xe),region:e?.region??R(Be,Le),requestHandler:Ve.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Ye,default:async()=>(await r()).retryMode||Qe}),sha256:e?.sha256??He.bind(null,"sha256"),streamCollector:e?.streamCollector??We,useDualstackEndpoint:e?.useDualstackEndpoint??R(Ke),useFipsEndpoint:e?.useFipsEndpoint??R(Me)}};var Oe=(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}}},ue=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var q=(e)=>e,nr=(e,s)=>{const r={...q(lr(e)),...q(sr(e)),...q(er(e)),...q(Oe(e))};return s.forEach((i)=>i.configure(r)),{...e,...hr(r),...ir(r),...rr(r),...ue(r)}};class N extends tr{constructor(...[e]){const s=Ce(e||{}),r=ne(s),i=ar(r),l=Er(i),n=wr(l),T=or(n),Ar=vr(T),Kr=he(Ar),u=nr(Kr,e?.extensions||[]);super(u);this.config=u,this.middlewareStack.use(mr(this.config)),this.middlewareStack.use(Sr(this.config)),this.middlewareStack.use(kr(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(cr(this.config)),this.middlewareStack.use(yr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ie,identityProviderConfigProvider:async(Mr)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Mr.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class d extends $r{constructor(e){super(e);Object.setPrototypeOf(this,d.prototype)}}class x extends d{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.error=e.error,this.error_description=e.error_description}}class z extends d{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends d{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends d{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends d{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends d{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends d{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends d{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends d{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends d{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends d{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends d{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class Q extends d{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}class X extends d{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}var Ir=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),Rr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Pr=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Tr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),br=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),jr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var w=$(U(),1),D=$(H(),1);var Dr=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()},Ur=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=c({[hs]:[,"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()},qr=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()},xr=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()},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=c({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=c({$metadata:y(e)}),i=j(F(await w.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},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=c({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:_,clientSecret:h,clientSecretExpiresAt:_,tokenEndpoint:h});return Object.assign(r,l),r},Vr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=c({$metadata:y(e)}),i=j(F(await w.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},Y=async(e,s)=>{const r={...e,body:await w.parseJsonErrorBody(e.body,s)},i=w.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Zr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Hr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Nr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await _r(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await pr(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await gr(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await ur(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await rs(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await ss(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await is(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await ls(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await es(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await Cr(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await Or(r,s);default:const l=r.body;return Yr({output:e,parsedBody:l,errorCode:i})}},Yr=Fr(d),Zr=async(e,s)=>{const r=c({}),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)},Hr=async(e,s)=>{const r=c({}),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=c({}),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=c({}),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=c({}),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=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new Q({$metadata:y(e),...r});return a(n,e.body)},gr=async(e,s)=>{const r=c({}),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)},Or=async(e,s)=>{const r=c({}),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)},ur=async(e,s)=>{const r=c({}),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)},es=async(e,s)=>{const r=c({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);const n=new L({$metadata:y(e),...r});return a(n,e.body)},rs=async(e,s)=>{const r=c({}),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)},ss=async(e,s)=>{const r=c({}),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=c({}),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=c({}),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)},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 hs="aws_iam";class p extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(Ir,Rr).ser(Dr).de(zr).build(){}class C extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Pr,Tr).ser(Ur).de(Gr).build(){}class g extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,br).ser(qr).de(Jr).build(){}class O extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(jr,void 0).ser(xr).de(Vr).build(){}var ns={CreateTokenCommand:p,CreateTokenWithIAMCommand:C,RegisterClientCommand:g,StartDeviceAuthorizationCommand:O};class fr extends N{}Wr(ns,fr);export{tr as __Client,B as UnsupportedGrantTypeException,M as UnauthorizedClientException,jr as StartDeviceAuthorizationRequestFilterSensitiveLog,O as StartDeviceAuthorizationCommand,K as SlowDownException,d as SSOOIDCServiceException,N as SSOOIDCClient,fr as SSOOIDC,br as RegisterClientResponseFilterSensitiveLog,g as RegisterClientCommand,A as InvalidScopeException,L as InvalidRequestRegionException,f as InvalidRequestException,X as InvalidRedirectUriException,W as InvalidGrantException,Q as InvalidClientMetadataException,V as InvalidClientException,J as InternalServerException,G as ExpiredTokenException,Tr as CreateTokenWithIAMResponseFilterSensitiveLog,Pr as CreateTokenWithIAMRequestFilterSensitiveLog,C as CreateTokenWithIAMCommand,Rr as CreateTokenResponseFilterSensitiveLog,Ir as CreateTokenRequestFilterSensitiveLog,p as CreateTokenCommand,z as AuthorizationPendingException,x as AccessDeniedException,v as $Command};
|
|
3
|
-
|
|
4
|
-
//# debugId=D30F12CDD8DFF52164756E2164756E21
|