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