gemi 0.8.8 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/index.js +2 -2
- package/dist/app/index.js.map +1 -1
- package/dist/bin/index.js +4 -4
- package/dist/broadcasting/index.js +1 -1
- package/dist/{chunk-5kxgspw3.js → chunk-0tsd6d6s.js} +2 -2
- package/dist/{chunk-5kxgspw3.js.map → chunk-0tsd6d6s.js.map} +1 -1
- package/dist/{chunk-1tp2s8s2.js → chunk-0wqf4729.js} +3 -3
- package/dist/{chunk-1tp2s8s2.js.map → chunk-0wqf4729.js.map} +1 -1
- package/dist/chunk-21mvg3dx.js +4 -0
- package/dist/{chunk-1vrq8vch.js.map → chunk-21mvg3dx.js.map} +1 -1
- package/dist/{chunk-5nkd0pky.js → chunk-2myc2s6w.js} +3 -3
- package/dist/{chunk-5nkd0pky.js.map → chunk-2myc2s6w.js.map} +1 -1
- package/dist/{chunk-fv48m6ej.js → chunk-36mj8mav.js} +2 -2
- package/dist/{chunk-fv48m6ej.js.map → chunk-36mj8mav.js.map} +1 -1
- package/dist/chunk-5yex263y.js +4 -0
- package/dist/{chunk-haysh2cn.js.map → chunk-5yex263y.js.map} +2 -2
- package/dist/{chunk-d3a38r6t.js → chunk-6g1mntab.js} +2 -2
- package/dist/{chunk-d3a38r6t.js.map → chunk-6g1mntab.js.map} +1 -1
- package/dist/chunk-8arqqbhx.js +20 -0
- package/dist/{chunk-t01kx7b9.js.map → chunk-8arqqbhx.js.map} +18 -7
- package/dist/{chunk-rr5pxvn2.js → chunk-98e4g3z6.js} +3 -3
- package/dist/{chunk-rr5pxvn2.js.map → chunk-98e4g3z6.js.map} +1 -1
- package/dist/{chunk-jmr4pqkg.js → chunk-9qk0pjxc.js} +2 -2
- package/dist/{chunk-jmr4pqkg.js.map → chunk-9qk0pjxc.js.map} +1 -1
- package/dist/{chunk-5gfvsf2h.js → chunk-ameyxxdy.js} +2 -2
- package/dist/{chunk-5gfvsf2h.js.map → chunk-ameyxxdy.js.map} +1 -1
- package/dist/{chunk-fqqevh9q.js → chunk-avqfpn5v.js} +3 -3
- package/dist/{chunk-fqqevh9q.js.map → chunk-avqfpn5v.js.map} +1 -1
- package/dist/chunk-b8d5htph.js +4 -0
- package/dist/{chunk-gbyyfd5n.js.map → chunk-b8d5htph.js.map} +2 -2
- package/dist/chunk-d1jvc299.js +4 -0
- package/dist/chunk-d1jvc299.js.map +16 -0
- package/dist/{chunk-8b17k5kr.js → chunk-ek6n8gyv.js} +3 -3
- package/dist/{chunk-8b17k5kr.js.map → chunk-ek6n8gyv.js.map} +1 -1
- package/dist/chunk-hwaaf04e.js +4 -0
- package/dist/{chunk-dn7n97pc.js.map → chunk-hwaaf04e.js.map} +2 -2
- package/dist/{chunk-kgvx8f4w.js → chunk-k9katf2f.js} +2 -2
- package/dist/{chunk-kgvx8f4w.js.map → chunk-k9katf2f.js.map} +1 -1
- package/dist/{chunk-vw5n61vd.js → chunk-mhs8rp3d.js} +3 -3
- package/dist/{chunk-vw5n61vd.js.map → chunk-mhs8rp3d.js.map} +1 -1
- package/dist/{chunk-pn0gn3dz.js → chunk-papxj58y.js} +2 -2
- package/dist/{chunk-pn0gn3dz.js.map → chunk-papxj58y.js.map} +1 -1
- package/dist/{chunk-87tyw2m9.js → chunk-t0br3jky.js} +2 -2
- package/dist/{chunk-87tyw2m9.js.map → chunk-t0br3jky.js.map} +1 -1
- package/dist/chunk-t6h32cqw.js +5 -0
- package/dist/{chunk-60vt9r0e.js.map → chunk-t6h32cqw.js.map} +4 -12
- package/dist/{chunk-zyqwxmp6.js → chunk-vqpqea57.js} +2 -2
- package/dist/{chunk-zyqwxmp6.js.map → chunk-vqpqea57.js.map} +1 -1
- package/dist/{chunk-a167bv1a.js → chunk-vvdgy5ba.js} +2 -2
- package/dist/{chunk-a167bv1a.js.map → chunk-vvdgy5ba.js.map} +1 -1
- package/dist/{chunk-w7fz5zck.js → chunk-wrtx683g.js} +3 -3
- package/dist/{chunk-w7fz5zck.js.map → chunk-wrtx683g.js.map} +1 -1
- package/dist/{chunk-mvwes2jb.js → chunk-wv5423nm.js} +2 -2
- package/dist/{chunk-mvwes2jb.js.map → chunk-wv5423nm.js.map} +1 -1
- package/dist/{chunk-svsxbj15.js → chunk-x46drz7r.js} +2 -2
- package/dist/{chunk-svsxbj15.js.map → chunk-x46drz7r.js.map} +1 -1
- package/dist/chunk-zp1h0k9v.js +4 -0
- package/dist/{chunk-p6spvhhx.js.map → chunk-zp1h0k9v.js.map} +4 -4
- package/dist/email/index.js +2 -2
- package/dist/email/index.js.map +1 -1
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +3 -3
- package/dist/http/AuthenticationMiddlware.d.ts.map +1 -1
- package/dist/http/CorsMiddleware.d.ts +14 -0
- package/dist/http/CorsMiddleware.d.ts.map +1 -0
- package/dist/http/Middleware.d.ts +3 -1
- package/dist/http/Middleware.d.ts.map +1 -1
- package/dist/http/index.d.ts +1 -0
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +6 -5
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/services/index.js +3 -3
- package/dist/services/index.js.map +2 -2
- package/dist/services/router/createFlatApiRoutes.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-1vrq8vch.js +0 -4
- package/dist/chunk-60vt9r0e.js +0 -5
- package/dist/chunk-dn7n97pc.js +0 -4
- package/dist/chunk-gbyyfd5n.js +0 -4
- package/dist/chunk-haysh2cn.js +0 -4
- package/dist/chunk-jk9zhs7r.js +0 -3
- package/dist/chunk-jk9zhs7r.js.map +0 -16
- package/dist/chunk-p6spvhhx.js +0 -4
- package/dist/chunk-t01kx7b9.js +0 -20
package/dist/chunk-t01kx7b9.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{aa as eU,ba as L1}from"./chunk-jk9zhs7r.js";import{Aa as e4,Ba as w8,ea as c,fa as i0,ha as FU,ia as UX,ka as GX,ma as k6,ra as T5,ua as w1,va as P4,wa as V5,xa as XL,ya as K1,za as W8}from"./chunk-60vt9r0e.js";import{kb as y0}from"./chunk-kgvx8f4w.js";import{ob as C1}from"./chunk-w7fz5zck.js";import{sb as i$}from"./chunk-8b17k5kr.js";import{ub as _2,vb as b6}from"./chunk-1tp2s8s2.js";import{ac as UQ}from"./chunk-5nkd0pky.js";import{bc as n,cc as M}from"./chunk-a167bv1a.js";var s=M((jQ,EU)=>{var{defineProperty:n1,getOwnPropertyDescriptor:MX,getOwnPropertyNames:BX}=Object,TX=Object.prototype.hasOwnProperty,KU=($,U)=>n1($,"name",{value:U,configurable:!0}),VX=($,U)=>{for(var G in U)n1($,G,{get:U[G],enumerable:!0})},HX=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of BX(U))if(!TX.call($,w)&&w!==G)n1($,w,{get:()=>U[w],enumerable:!(W=MX(U,w))||W.enumerable})}return $},AX=($)=>HX(n1({},"__esModule",{value:!0}),$),fU={};VX(fU,{getSmithyContext:()=>OX,normalizeProvider:()=>qX});EU.exports=AX(fU);var IU=C1(),OX=KU(($)=>$[IU.SMITHY_CONTEXT_KEY]||($[IU.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),qX=KU(($)=>{if(typeof $==="function")return $;let U=Promise.resolve($);return()=>U},"normalizeProvider")});var z1=M((MU)=>{Object.defineProperty(MU,"__esModule",{value:!0});MU.getHomeDir=void 0;var CX=import.meta.require("os"),NX=import.meta.require("path"),u$={},jX=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},PX=()=>{let{HOME:$,USERPROFILE:U,HOMEPATH:G,HOMEDRIVE:W=`C:${NX.sep}`}=process.env;if($)return $;if(U)return U;if(G)return`${W}${G}`;let w=jX();if(!u$[w])u$[w]=CX.homedir();return u$[w]};MU.getHomeDir=PX});var p$=M((TU)=>{Object.defineProperty(TU,"__esModule",{value:!0});TU.getSSOTokenFilepath=void 0;var SX=import.meta.require("crypto"),bX=import.meta.require("path"),kX=z1(),hX=($)=>{let G=SX.createHash("sha1").update($).digest("hex");return bX.join(kX.getHomeDir(),".aws","sso","cache",`${G}.json`)};TU.getSSOTokenFilepath=hX});var OU=M((HU)=>{Object.defineProperty(HU,"__esModule",{value:!0});HU.getSSOTokenFromFile=void 0;var DX=import.meta.require("fs"),xX=p$(),{readFile:cX}=DX.promises,vX=async($)=>{let U=xX.getSSOTokenFilepath($),G=await cX(U,"utf8");return JSON.parse(G)};HU.getSSOTokenFromFile=vX});var g$=M((qU)=>{Object.defineProperty(qU,"__esModule",{value:!0});qU.slurpFile=void 0;var yX=import.meta.require("fs"),{readFile:_X}=yX.promises,d$={},uX=($,U)=>{if(!d$[$]||(U===null||U===void 0?void 0:U.ignoreCache))d$[$]=_X($,"utf8");return d$[$]};qU.slurpFile=uX});var n$=M((hQ,j1)=>{var{defineProperty:r1,getOwnPropertyDescriptor:pX,getOwnPropertyNames:dX}=Object,gX=Object.prototype.hasOwnProperty,v=($,U)=>r1($,"name",{value:U,configurable:!0}),sX=($,U)=>{for(var G in U)r1($,G,{get:U[G],enumerable:!0})},s$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of dX(U))if(!gX.call($,w)&&w!==G)r1($,w,{get:()=>U[w],enumerable:!(W=pX(U,w))||W.enumerable})}return $},l$=($,U,G)=>(s$($,U,"default"),G&&s$(G,U,"default")),mX=($)=>s$(r1({},"__esModule",{value:!0}),$),N1={};sX(N1,{CONFIG_PREFIX_SEPARATOR:()=>G1,DEFAULT_PROFILE:()=>SU,ENV_PROFILE:()=>PU,getProfileName:()=>lX,loadSharedConfigFiles:()=>kU,loadSsoSessionData:()=>XZ,parseKnownFiles:()=>LZ});j1.exports=mX(N1);l$(N1,z1(),j1.exports);var PU="AWS_PROFILE",SU="default",lX=v(($)=>$.profile||process.env[PU]||SU,"getProfileName");l$(N1,p$(),j1.exports);l$(N1,OU(),j1.exports);var i1=C1(),nX=v(($)=>Object.entries($).filter(([U])=>{let G=U.indexOf(G1);if(G===-1)return!1;return Object.values(i1.IniSectionType).includes(U.substring(0,G))}).reduce((U,[G,W])=>{let w=G.indexOf(G1),X=G.substring(0,w)===i1.IniSectionType.PROFILE?G.substring(w+1):G;return U[X]=W,U},{...$.default&&{default:$.default}}),"getConfigData"),o1=import.meta.require("path"),iX=z1(),oX="AWS_CONFIG_FILE",bU=v(()=>process.env[oX]||o1.join(iX.getHomeDir(),".aws","config"),"getConfigFilepath"),rX=z1(),aX="AWS_SHARED_CREDENTIALS_FILE",tX=v(()=>process.env[aX]||o1.join(rX.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),eX=z1(),$Z=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,UZ=["__proto__","profile __proto__"],m$=v(($)=>{let U={},G,W;for(let w of $.split(/\r?\n/)){let X=w.split(/(^|\s)[;#]/)[0].trim();if(X[0]==="["&&X[X.length-1]==="]"){G=void 0,W=void 0;let L=X.substring(1,X.length-1),Y=$Z.exec(L);if(Y){let[,Q,,F]=Y;if(Object.values(i1.IniSectionType).includes(Q))G=[Q,F].join(G1)}else G=L;if(UZ.includes(L))throw new Error(`Found invalid profile name "${L}"`)}else if(G){let L=X.indexOf("=");if(![0,-1].includes(L)){let[Y,Q]=[X.substring(0,L).trim(),X.substring(L+1).trim()];if(Q==="")W=Y;else{if(W&&w.trimStart()===w)W=void 0;U[G]=U[G]||{};let F=W?[W,Y].join(G1):Y;U[G][F]=Q}}}}return U},"parseIni"),NU=g$(),jU=v(()=>({}),"swallowError"),G1=".",kU=v(async($={})=>{let{filepath:U=tX(),configFilepath:G=bU()}=$,W=eX.getHomeDir(),w="~/",X=U;if(U.startsWith("~/"))X=o1.join(W,U.slice(2));let Z=G;if(G.startsWith("~/"))Z=o1.join(W,G.slice(2));let L=await Promise.all([NU.slurpFile(Z,{ignoreCache:$.ignoreCache}).then(m$).then(nX).catch(jU),NU.slurpFile(X,{ignoreCache:$.ignoreCache}).then(m$).catch(jU)]);return{configFile:L[0],credentialsFile:L[1]}},"loadSharedConfigFiles"),GZ=v(($)=>Object.entries($).filter(([U])=>U.startsWith(i1.IniSectionType.SSO_SESSION+G1)).reduce((U,[G,W])=>({...U,[G.substring(G.indexOf(G1)+1)]:W}),{}),"getSsoSessionData"),WZ=g$(),wZ=v(()=>({}),"swallowError"),XZ=v(async($={})=>WZ.slurpFile($.configFilepath??bU()).then(m$).then(GZ).catch(wZ),"loadSsoSessionData"),ZZ=v((...$)=>{let U={};for(let G of $)for(let[W,w]of Object.entries(G))if(U[W]!==void 0)Object.assign(U[W],w);else U[W]=w;return U},"mergeConfigFiles"),LZ=v(async($)=>{let U=await kU($);return ZZ(U.configFile,U.credentialsFile)},"parseKnownFiles")});var cU=M((DQ,xU)=>{var{defineProperty:a1,getOwnPropertyDescriptor:YZ,getOwnPropertyNames:QZ}=Object,FZ=Object.prototype.hasOwnProperty,R1=($,U)=>a1($,"name",{value:U,configurable:!0}),JZ=($,U)=>{for(var G in U)a1($,G,{get:U[G],enumerable:!0})},zZ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of QZ(U))if(!FZ.call($,w)&&w!==G)a1($,w,{get:()=>U[w],enumerable:!(W=YZ(U,w))||W.enumerable})}return $},RZ=($)=>zZ(a1({},"__esModule",{value:!0}),$),DU={};JZ(DU,{loadConfig:()=>MZ});xU.exports=RZ(DU);var P1=i$();function o$($){try{let U=new Set(Array.from($.match(/([A-Z_]){3,}/g)??[]));return U.delete("CONFIG"),U.delete("CONFIG_PREFIX_SEPARATOR"),U.delete("ENV"),[...U].join(", ")}catch(U){return $}}R1(o$,"getSelectorName");var IZ=R1(($,U)=>async()=>{try{let G=$(process.env);if(G===void 0)throw new Error;return G}catch(G){throw new P1.CredentialsProviderError(G.message||`Not found in ENV: ${o$($.toString())}`,{logger:U})}},"fromEnv"),hU=n$(),KZ=R1(($,{preferredFile:U="config",...G}={})=>async()=>{let W=hU.getProfileName(G),{configFile:w,credentialsFile:X}=await hU.loadSharedConfigFiles(G),Z=X[W]||{},L=w[W]||{},Y=U==="config"?{...Z,...L}:{...L,...Z};try{let F=$(Y,U==="config"?w:X);if(F===void 0)throw new Error;return F}catch(Q){throw new P1.CredentialsProviderError(Q.message||`Not found in config files w/ profile [${W}]: ${o$($.toString())}`,{logger:G.logger})}},"fromSharedConfigFiles"),fZ=R1(($)=>typeof $==="function","isFunction"),EZ=R1(($)=>fZ($)?async()=>await $():P1.fromStatic($),"fromStatic"),MZ=R1(({environmentVariableSelector:$,configFileSelector:U,default:G},W={})=>P1.memoize(P1.chain(IZ($),KZ(U,W),EZ(G))),"loadConfig")});var dU=M((uU)=>{Object.defineProperty(uU,"__esModule",{value:!0});uU.getEndpointUrlConfig=void 0;var vU=n$(),yU="AWS_ENDPOINT_URL",_U="endpoint_url",BZ=($)=>({environmentVariableSelector:(U)=>{let G=$.split(" ").map((X)=>X.toUpperCase()),W=U[[yU,...G].join("_")];if(W)return W;let w=U[yU];if(w)return w;return},configFileSelector:(U,G)=>{if(G&&U.services){let w=G[["services",U.services].join(vU.CONFIG_PREFIX_SEPARATOR)];if(w){let X=$.split(" ").map((L)=>L.toLowerCase()),Z=w[[X.join("_"),_U].join(vU.CONFIG_PREFIX_SEPARATOR)];if(Z)return Z}}let W=U[_U];if(W)return W;return},default:void 0});uU.getEndpointUrlConfig=BZ});var r$=M((gU)=>{Object.defineProperty(gU,"__esModule",{value:!0});gU.getEndpointFromConfig=void 0;var TZ=cU(),VZ=dU(),HZ=async($)=>TZ.loadConfig(VZ.getEndpointUrlConfig($!==null&&$!==void 0?$:""))();gU.getEndpointFromConfig=HZ});var t$=M((vQ,aU)=>{var{defineProperty:t1,getOwnPropertyDescriptor:AZ,getOwnPropertyNames:OZ}=Object,qZ=Object.prototype.hasOwnProperty,a$=($,U)=>t1($,"name",{value:U,configurable:!0}),CZ=($,U)=>{for(var G in U)t1($,G,{get:U[G],enumerable:!0})},NZ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of OZ(U))if(!qZ.call($,w)&&w!==G)t1($,w,{get:()=>U[w],enumerable:!(W=AZ(U,w))||W.enumerable})}return $},jZ=($)=>NZ(t1({},"__esModule",{value:!0}),$),mU={};CZ(mU,{deserializerMiddleware:()=>lU,deserializerMiddlewareOption:()=>iU,getSerdePlugin:()=>rU,serializerMiddleware:()=>nU,serializerMiddlewareOption:()=>oU});aU.exports=jZ(mU);var lU=a$(($,U)=>(G)=>async(W)=>{let{response:w}=await G(W);try{let X=await U(w,$);return{response:w,output:X}}catch(X){if(Object.defineProperty(X,"$response",{value:w}),!("$metadata"in X)){if(X.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof X.$responseBodyText!=="undefined"){if(X.$response)X.$response.body=X.$responseBodyText}}throw X}},"deserializerMiddleware"),nU=a$(($,U)=>(G,W)=>async(w)=>{var X;let Z=((X=W.endpointV2)==null?void 0:X.url)&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!Z)throw new Error("No valid endpoint provider available.");let L=await U(w.input,{...$,endpoint:Z});return G({...w,request:L})},"serializerMiddleware"),iU={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},oU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function rU($,U,G){return{applyToStack:(W)=>{W.add(lU($,G),iU),W.add(nU($,U),oU)}}}a$(rU,"getSerdePlugin")});var ZG=M((yQ,XG)=>{var{defineProperty:$$,getOwnPropertyDescriptor:PZ,getOwnPropertyNames:SZ}=Object,bZ=Object.prototype.hasOwnProperty,d=($,U)=>$$($,"name",{value:U,configurable:!0}),kZ=($,U)=>{for(var G in U)$$($,G,{get:U[G],enumerable:!0})},hZ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of SZ(U))if(!bZ.call($,w)&&w!==G)$$($,w,{get:()=>U[w],enumerable:!(W=PZ(U,w))||W.enumerable})}return $},DZ=($)=>hZ($$({},"__esModule",{value:!0}),$),$G={};kZ($G,{endpointMiddleware:()=>WG,endpointMiddlewareOptions:()=>wG,getEndpointFromInstructions:()=>UG,getEndpointPlugin:()=>sZ,resolveEndpointConfig:()=>lZ,resolveParams:()=>GG,toEndpointV1:()=>e$});XG.exports=DZ($G);var xZ=d(async($)=>{let U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(uZ(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!_Z(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),cZ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,vZ=/(\d+\.){3}\d+/,yZ=/\.\./,_Z=d(($)=>cZ.test($)&&!vZ.test($)&&!yZ.test($),"isDnsCompatibleBucketName"),uZ=d(($)=>{let[U,G,W,,,w]=$.split(":"),X=U==="arn"&&$.split(":").length>=6,Z=Boolean(X&&G&&W&&w);if(X&&!Z)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return Z},"isArnBucketName"),pZ=d(($,U,G)=>{let W=d(async()=>{let w=G[$]??G[U];if(typeof w==="function")return w();return w},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{let w=typeof G.credentials==="function"?await G.credentials():G.credentials;return(w==null?void 0:w.credentialScope)??(w==null?void 0:w.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{let w=typeof G.credentials==="function"?await G.credentials():G.credentials;return(w==null?void 0:w.accountId)??(w==null?void 0:w.AccountId)};if($==="endpoint"||U==="endpoint")return async()=>{let w=await W();if(w&&typeof w==="object"){if("url"in w)return w.url.href;if("hostname"in w){let{protocol:X,hostname:Z,port:L,path:Y}=w;return`${X}//${Z}${L?":"+L:""}${Y}`}}return w};return W},"createConfigValueProvider"),dZ=r$(),tU=eU(),e$=d(($)=>{if(typeof $==="object"){if("url"in $)return tU.parseUrl($.url);return $}return tU.parseUrl($)},"toEndpointV1"),UG=d(async($,U,G,W)=>{if(!G.endpoint){let Z;if(G.serviceConfiguredEndpoint)Z=await G.serviceConfiguredEndpoint();else Z=await dZ.getEndpointFromConfig(G.serviceId);if(Z)G.endpoint=()=>Promise.resolve(e$(Z))}let w=await GG($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(w,W)},"getEndpointFromInstructions"),GG=d(async($,U,G)=>{var W;let w={},X=((W=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:W.call(U))||{};for(let[Z,L]of Object.entries(X))switch(L.type){case"staticContextParams":w[Z]=L.value;break;case"contextParams":w[Z]=$[L.name];break;case"clientContextParams":case"builtInParams":w[Z]=await pZ(L.name,Z,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}if(Object.keys(X).length===0)Object.assign(w,G);if(String(G.serviceId).toLowerCase()==="s3")await xZ(w);return w},"resolveParams"),e1=s(),WG=d(({config:$,instructions:U})=>{return(G,W)=>async(w)=>{var X,Z,L;let Y=await UG(w.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=Y,W.authSchemes=(X=Y.properties)==null?void 0:X.authSchemes;let Q=(Z=W.authSchemes)==null?void 0:Z[0];if(Q){W.signing_region=Q.signingRegion,W.signing_service=Q.signingName;let F=e1.getSmithyContext(W),J=(L=F==null?void 0:F.selectedHttpAuthScheme)==null?void 0:L.httpAuthOption;if(J)J.signingProperties=Object.assign(J.signingProperties||{},{signing_region:Q.signingRegion,signingRegion:Q.signingRegion,signing_service:Q.signingName,signingName:Q.signingName,signingRegionSet:Q.signingRegionSet},Q.properties)}return G({...w})}},"endpointMiddleware"),gZ=t$(),wG={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:gZ.serializerMiddlewareOption.name},sZ=d(($,U)=>({applyToStack:(G)=>{G.addRelativeTo(WG({config:$,instructions:U}),wG)}}),"getEndpointPlugin"),mZ=r$(),lZ=d(($)=>{let U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>e$(await e1.normalizeProvider(G)()):void 0,X={...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:e1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:e1.normalizeProvider($.useFipsEndpoint??!1)},Z=void 0;return X.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!Z)Z=mZ.getEndpointFromConfig($.serviceId);return Z},X},"resolveEndpointConfig")});var $0=M((_Q,FG)=>{var{defineProperty:U$,getOwnPropertyDescriptor:nZ,getOwnPropertyNames:iZ}=Object,oZ=Object.prototype.hasOwnProperty,I1=($,U)=>U$($,"name",{value:U,configurable:!0}),rZ=($,U)=>{for(var G in U)U$($,G,{get:U[G],enumerable:!0})},aZ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of iZ(U))if(!oZ.call($,w)&&w!==G)U$($,w,{get:()=>U[w],enumerable:!(W=nZ(U,w))||W.enumerable})}return $},tZ=($)=>aZ(U$({},"__esModule",{value:!0}),$),LG={};rZ(LG,{isClockSkewCorrectedError:()=>YG,isClockSkewError:()=>X4,isRetryableByTrait:()=>w4,isServerError:()=>L4,isThrottlingError:()=>Z4,isTransientError:()=>QG});FG.exports=tZ(LG);var eZ=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],$4=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],U4=["TimeoutError","RequestTimeout","RequestTimeoutException"],G4=[500,502,503,504],W4=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],w4=I1(($)=>$.$retryable!==void 0,"isRetryableByTrait"),X4=I1(($)=>eZ.includes($.name),"isClockSkewError"),YG=I1(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),Z4=I1(($)=>{var U,G;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||$4.includes($.name)||((G=$.$retryable)==null?void 0:G.throttling)==!0},"isThrottlingError"),QG=I1(($)=>{var U;return YG($)||U4.includes($.name)||W4.includes(($==null?void 0:$.code)||"")||G4.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),L4=I1(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){let G=$.$metadata.httpStatusCode;if(500<=G&&G<=599&&!QG($))return!0;return!1}return!1},"isServerError")});var OG=M((uQ,AG)=>{var{defineProperty:G$,getOwnPropertyDescriptor:Y4,getOwnPropertyNames:Q4}=Object,F4=Object.prototype.hasOwnProperty,g=($,U)=>G$($,"name",{value:U,configurable:!0}),J4=($,U)=>{for(var G in U)G$($,G,{get:U[G],enumerable:!0})},z4=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of Q4(U))if(!F4.call($,w)&&w!==G)G$($,w,{get:()=>U[w],enumerable:!(W=Y4(U,w))||W.enumerable})}return $},R4=($)=>z4(G$({},"__esModule",{value:!0}),$),zG={};J4(zG,{AdaptiveRetryStrategy:()=>B4,ConfiguredRetryStrategy:()=>T4,DEFAULT_MAX_ATTEMPTS:()=>U0,DEFAULT_RETRY_DELAY_BASE:()=>S1,DEFAULT_RETRY_MODE:()=>I4,DefaultRateLimiter:()=>KG,INITIAL_RETRY_TOKENS:()=>G0,INVOCATION_ID_HEADER:()=>f4,MAXIMUM_RETRY_DELAY:()=>W0,NO_RETRY_INCREMENT:()=>BG,REQUEST_HEADER:()=>E4,RETRY_COST:()=>EG,RETRY_MODES:()=>RG,StandardRetryStrategy:()=>w0,THROTTLING_RETRY_DELAY_BASE:()=>fG,TIMEOUT_RETRY_COST:()=>MG});AG.exports=R4(zG);var RG=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(RG||{}),U0=3,I4="standard",K4=$0(),IG=class ${constructor(U){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(U==null?void 0:U.beta)??0.7,this.minCapacity=(U==null?void 0:U.minCapacity)??1,this.minFillRate=(U==null?void 0:U.minFillRate)??0.5,this.scaleConstant=(U==null?void 0:U.scaleConstant)??0.4,this.smooth=(U==null?void 0:U.smooth)??0.8;let G=this.getCurrentTimeInSeconds();this.lastThrottleTime=G,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(U){if(!this.enabled)return;if(this.refillTokenBucket(),U>this.currentCapacity){let G=(U-this.currentCapacity)/this.fillRate*1000;await new Promise((W)=>setTimeout(W,G))}this.currentCapacity=this.currentCapacity-U}refillTokenBucket(){let U=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=U;return}let G=(U-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+G),this.lastTimestamp=U}updateClientSendingRate(U){let G;if(this.updateMeasuredRate(),K4.isThrottlingError(U)){let w=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=w,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),G=this.cubicThrottle(w),this.enableTokenBucket()}else this.calculateTimeWindow(),G=this.cubicSuccess(this.getCurrentTimeInSeconds());let W=Math.min(G,2*this.measuredTxRate);this.updateTokenBucketRate(W)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(U){return this.getPrecise(U*this.beta)}cubicSuccess(U){return this.getPrecise(this.scaleConstant*Math.pow(U-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(U){this.refillTokenBucket(),this.fillRate=Math.max(U,this.minFillRate),this.maxCapacity=Math.max(U,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let U=this.getCurrentTimeInSeconds(),G=Math.floor(U*2)/2;if(this.requestCount++,G>this.lastTxRateBucket){let W=this.requestCount/(G-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(W*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=G}}getPrecise(U){return parseFloat(U.toFixed(8))}};g(IG,"DefaultRateLimiter");var KG=IG,S1=100,W0=20000,fG=500,G0=500,EG=5,MG=10,BG=1,f4="amz-sdk-invocation-id",E4="amz-sdk-request",M4=g(()=>{let $=S1;return{computeNextBackoffDelay:g((W)=>{return Math.floor(Math.min(W0,Math.random()*2**W*$))},"computeNextBackoffDelay"),setDelayBase:g((W)=>{$=W},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),JG=g(({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:g(()=>U,"getRetryCount"),getRetryDelay:g(()=>Math.min(W0,$),"getRetryDelay"),getRetryCost:g(()=>G,"getRetryCost")}},"createDefaultRetryToken"),TG=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=G0,this.retryBackoffStrategy=M4(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return JG({retryDelay:S1,retryCount:0})}async refreshRetryTokenForRetry(U,G){let W=await this.getMaxAttempts();if(this.shouldRetry(U,G,W)){let w=G.errorType;this.retryBackoffStrategy.setDelayBase(w==="THROTTLING"?fG:S1);let X=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),Z=G.retryAfterHint?Math.max(G.retryAfterHint.getTime()-Date.now()||0,X):X,L=this.getCapacityCost(w);return this.capacity-=L,JG({retryDelay:Z,retryCount:U.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(G0,this.capacity+(U.getRetryCost()??BG))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(U){return console.warn(`Max attempts provider could not resolve. Using default of ${U0}`),U0}}shouldRetry(U,G,W){return U.getRetryCount()+1<W&&this.capacity>=this.getCapacityCost(G.errorType)&&this.isRetryableError(G.errorType)}getCapacityCost(U){return U==="TRANSIENT"?MG:EG}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};g(TG,"StandardRetryStrategy");var w0=TG,VG=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode="adaptive";let{rateLimiter:W}=G??{};this.rateLimiter=W??new KG,this.standardRetryStrategy=new w0(U)}async acquireInitialRetryToken(U){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(U)}async refreshRetryTokenForRetry(U,G){return this.rateLimiter.updateClientSendingRate(G),this.standardRetryStrategy.refreshRetryTokenForRetry(U,G)}recordSuccess(U){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(U)}};g(VG,"AdaptiveRetryStrategy");var B4=VG,HG=class $ extends w0{constructor(U,G=S1){super(typeof U==="function"?U:async()=>U);if(typeof G==="number")this.computeNextBackoffDelay=()=>G;else this.computeNextBackoffDelay=G}async refreshRetryTokenForRetry(U,G){let W=await super.refreshRetryTokenForRetry(U,G);return W.getRetryDelay=()=>this.computeNextBackoffDelay(W.getRetryCount()),W}};g(HG,"ConfiguredRetryStrategy");var T4=HG});var PG=M((pQ,jG)=>{var{defineProperty:W$,getOwnPropertyDescriptor:V4,getOwnPropertyNames:H4}=Object,A4=Object.prototype.hasOwnProperty,y=($,U)=>W$($,"name",{value:U,configurable:!0}),O4=($,U)=>{for(var G in U)W$($,G,{get:U[G],enumerable:!0})},q4=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of H4(U))if(!A4.call($,w)&&w!==G)W$($,w,{get:()=>U[w],enumerable:!(W=V4(U,w))||W.enumerable})}return $},C4=($)=>q4(W$({},"__esModule",{value:!0}),$),NG={};O4(NG,{constructStack:()=>X0});jG.exports=C4(NG);var W1=y(($,U)=>{let G=[];if($)G.push($);if(U)for(let W of U)G.push(W);return G},"getAllAliases"),o=y(($,U)=>{return`${$||"anonymous"}${U&&U.length>0?` (a.k.a. ${U.join(",")})`:""}`},"getMiddlewareNameWithAliases"),X0=y(()=>{let $=[],U=[],G=!1,W=new Set,w=y((J)=>J.sort((R,z)=>qG[z.step]-qG[R.step]||CG[z.priority||"normal"]-CG[R.priority||"normal"]),"sort"),X=y((J)=>{let R=!1,z=y((K)=>{let E=W1(K.name,K.aliases);if(E.includes(J)){R=!0;for(let f of E)W.delete(f);return!1}return!0},"filterCb");return $=$.filter(z),U=U.filter(z),R},"removeByName"),Z=y((J)=>{let R=!1,z=y((K)=>{if(K.middleware===J){R=!0;for(let E of W1(K.name,K.aliases))W.delete(E);return!1}return!0},"filterCb");return $=$.filter(z),U=U.filter(z),R},"removeByReference"),L=y((J)=>{var R;return $.forEach((z)=>{J.add(z.middleware,{...z})}),U.forEach((z)=>{J.addRelativeTo(z.middleware,{...z})}),(R=J.identifyOnResolve)==null||R.call(J,F.identifyOnResolve()),J},"cloneTo"),Y=y((J)=>{let R=[];return J.before.forEach((z)=>{if(z.before.length===0&&z.after.length===0)R.push(z);else R.push(...Y(z))}),R.push(J),J.after.reverse().forEach((z)=>{if(z.before.length===0&&z.after.length===0)R.push(z);else R.push(...Y(z))}),R},"expandRelativeMiddlewareList"),Q=y((J=!1)=>{let R=[],z=[],K={};return $.forEach((f)=>{let B={...f,before:[],after:[]};for(let H of W1(B.name,B.aliases))K[H]=B;R.push(B)}),U.forEach((f)=>{let B={...f,before:[],after:[]};for(let H of W1(B.name,B.aliases))K[H]=B;z.push(B)}),z.forEach((f)=>{if(f.toMiddleware){let B=K[f.toMiddleware];if(B===void 0){if(J)return;throw new Error(`${f.toMiddleware} is not found when adding ${o(f.name,f.aliases)} middleware ${f.relation} ${f.toMiddleware}`)}if(f.relation==="after")B.after.push(f);if(f.relation==="before")B.before.push(f)}}),w(R).map(Y).reduce((f,B)=>{return f.push(...B),f},[])},"getMiddlewareList"),F={add:(J,R={})=>{let{name:z,override:K,aliases:E}=R,f={step:"initialize",priority:"normal",middleware:J,...R},B=W1(z,E);if(B.length>0){if(B.some((H)=>W.has(H))){if(!K)throw new Error(`Duplicate middleware name '${o(z,E)}'`);for(let H of B){let T=$.findIndex((D)=>{var i;return D.name===H||((i=D.aliases)==null?void 0:i.some((U1)=>U1===H))});if(T===-1)continue;let V=$[T];if(V.step!==f.step||f.priority!==V.priority)throw new Error(`"${o(V.name,V.aliases)}" middleware with ${V.priority} priority in ${V.step} step cannot be overridden by "${o(z,E)}" middleware with ${f.priority} priority in ${f.step} step.`);$.splice(T,1)}}for(let H of B)W.add(H)}$.push(f)},addRelativeTo:(J,R)=>{let{name:z,override:K,aliases:E}=R,f={middleware:J,...R},B=W1(z,E);if(B.length>0){if(B.some((H)=>W.has(H))){if(!K)throw new Error(`Duplicate middleware name '${o(z,E)}'`);for(let H of B){let T=U.findIndex((D)=>{var i;return D.name===H||((i=D.aliases)==null?void 0:i.some((U1)=>U1===H))});if(T===-1)continue;let V=U[T];if(V.toMiddleware!==f.toMiddleware||V.relation!==f.relation)throw new Error(`"${o(V.name,V.aliases)}" middleware ${V.relation} "${V.toMiddleware}" middleware cannot be overridden by "${o(z,E)}" middleware ${f.relation} "${f.toMiddleware}" middleware.`);U.splice(T,1)}}for(let H of B)W.add(H)}U.push(f)},clone:()=>L(X0()),use:(J)=>{J.applyToStack(F)},remove:(J)=>{if(typeof J==="string")return X(J);else return Z(J)},removeByTag:(J)=>{let R=!1,z=y((K)=>{let{tags:E,name:f,aliases:B}=K;if(E&&E.includes(J)){let H=W1(f,B);for(let T of H)W.delete(T);return R=!0,!1}return!0},"filterCb");return $=$.filter(z),U=U.filter(z),R},concat:(J)=>{var R;let z=L(X0());return z.use(J),z.identifyOnResolve(G||z.identifyOnResolve()||(((R=J.identifyOnResolve)==null?void 0:R.call(J))??!1)),z},applyToStack:L,identify:()=>{return Q(!0).map((J)=>{let R=J.step??J.relation+" "+J.toMiddleware;return o(J.name,J.aliases)+" - "+R})},identifyOnResolve(J){if(typeof J==="boolean")G=J;return G},resolve:(J,R)=>{for(let z of Q().map((K)=>K.middleware).reverse())J=z(J,R);if(G)console.log(F.identify());return J}};return F},"constructStack"),qG={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},CG={high:3,normal:2,low:1}});var kG=M((SG)=>{Object.defineProperty(SG,"__esModule",{value:!0});SG.getAwsChunkedEncodingStream=void 0;var N4=import.meta.require("stream"),j4=($,U)=>{let{base64Encoder:G,bodyLengthChecker:W,checksumAlgorithmFn:w,checksumLocationName:X,streamHasher:Z}=U,L=G!==void 0&&w!==void 0&&X!==void 0&&Z!==void 0,Y=L?Z(w,$):void 0,Q=new N4.Readable({read:()=>{}});return $.on("data",(F)=>{let J=W(F)||0;Q.push(`${J.toString(16)}\r\n`),Q.push(F),Q.push("\r\n")}),$.on("end",async()=>{if(Q.push("0\r\n"),L){let F=G(await Y);Q.push(`${X}:${F}\r\n`),Q.push("\r\n")}Q.push(null)}),Q};SG.getAwsChunkedEncodingStream=j4});var aG=M((gQ,rG)=>{var{create:S4,defineProperty:b1,getOwnPropertyDescriptor:b4,getOwnPropertyNames:k4,getPrototypeOf:h4}=Object,D4=Object.prototype.hasOwnProperty,A=($,U)=>b1($,"name",{value:U,configurable:!0}),x4=($,U)=>{for(var G in U)b1($,G,{get:U[G],enumerable:!0})},vG=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of k4(U))if(!D4.call($,w)&&w!==G)b1($,w,{get:()=>U[w],enumerable:!(W=b4(U,w))||W.enumerable})}return $},c4=($,U,G)=>(G=$!=null?S4(h4($)):{},vG(U||!$||!$.__esModule?b1(G,"default",{value:$,enumerable:!0}):G,$)),v4=($)=>vG(b1({},"__esModule",{value:!0}),$),yG={};x4(yG,{DEFAULT_REQUEST_TIMEOUT:()=>g4,NodeHttp2Handler:()=>i4,NodeHttpHandler:()=>s4,streamCollector:()=>r4});rG.exports=v4(yG);var _G=w1(),uG=P4(),Z0=import.meta.require("http"),L0=import.meta.require("https"),y4=["ECONNRESET","EPIPE","ETIMEDOUT"],pG=A(($)=>{let U={};for(let G of Object.keys($)){let W=$[G];U[G]=Array.isArray(W)?W.join(","):W}return U},"getTransformedHeaders"),hG=1000,_4=A(($,U,G=0)=>{if(!G)return-1;let W=A((w)=>{let X=setTimeout(()=>{$.destroy(),U(Object.assign(new Error(`Socket timed out without establishing a connection within ${G} ms`),{name:"TimeoutError"}))},G-w),Z=A((L)=>{if(L==null?void 0:L.connecting)L.on("connect",()=>{clearTimeout(X)});else clearTimeout(X)},"doWithSocket");if($.socket)Z($.socket);else $.on("socket",Z)},"registerTimeout");if(G<2000)return W(0),0;return setTimeout(W.bind(null,hG),hG)},"setConnectionTimeout"),u4=3000,p4=A(($,{keepAlive:U,keepAliveMsecs:G},W=u4)=>{if(U!==!0)return-1;let w=A(()=>{if($.socket)$.socket.setKeepAlive(U,G||0);else $.on("socket",(X)=>{X.setKeepAlive(U,G||0)})},"registerListener");if(W===0)return w(),0;return setTimeout(w,W)},"setSocketKeepAlive"),DG=3000,d4=A(($,U,G=0)=>{let W=A((w)=>{$.setTimeout(G-w,()=>{$.destroy(),U(Object.assign(new Error(`Connection timed out after ${G} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<G&&G<6000)return W(0),0;return setTimeout(W.bind(null,G===0?0:DG),DG)},"setSocketTimeout"),dG=import.meta.require("stream"),xG=1000;async function Y0($,U,G=xG){let W=U.headers??{},w=W.Expect||W.expect,X=-1,Z=!1;if(w==="100-continue")await Promise.race([new Promise((L)=>{X=Number(setTimeout(L,Math.max(xG,G)))}),new Promise((L)=>{$.on("continue",()=>{clearTimeout(X),L()}),$.on("error",()=>{Z=!0,clearTimeout(X),L()})})]);if(!Z)gG($,U.body)}A(Y0,"writeRequestBody");function gG($,U){if(U instanceof dG.Readable){U.pipe($);return}if(U){if(Buffer.isBuffer(U)||typeof U==="string"){$.end(U);return}let G=U;if(typeof G==="object"&&G.buffer&&typeof G.byteOffset==="number"&&typeof G.byteLength==="number"){$.end(Buffer.from(G.buffer,G.byteOffset,G.byteLength));return}$.end(Buffer.from(U));return}$.end()}A(gG,"writeBody");var g4=0,sG=class ${constructor(U){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((w)=>{G(this.resolveDefaultConfig(w))}).catch(W);else G(this.resolveDefaultConfig(U))})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}static checkSocketUsage(U,G,W=console){var w,X,Z;let{sockets:L,requests:Y,maxSockets:Q}=U;if(typeof Q!=="number"||Q===1/0)return G;let F=15000;if(Date.now()-F<G)return G;if(L&&Y)for(let J in L){let R=((w=L[J])==null?void 0:w.length)??0,z=((X=Y[J])==null?void 0:X.length)??0;if(R>=Q&&z>=2*Q)return(Z=W==null?void 0:W.warn)==null||Z.call(W,`@smithy/node-http-handler:WARN - socket usage at capacity=${R} and ${z} additional requests are enqueued.
|
|
2
|
-
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
-
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return G}resolveDefaultConfig(U){let{requestTimeout:G,connectionTimeout:W,socketTimeout:w,httpAgent:X,httpsAgent:Z}=U||{},L=!0,Y=50;return{connectionTimeout:W,requestTimeout:G??w,httpAgent:(()=>{if(X instanceof Z0.Agent||typeof(X==null?void 0:X.destroy)==="function")return X;return new Z0.Agent({keepAlive:!0,maxSockets:50,...X})})(),httpsAgent:(()=>{if(Z instanceof L0.Agent||typeof(Z==null?void 0:Z.destroy)==="function")return Z;return new L0.Agent({keepAlive:!0,maxSockets:50,...Z})})(),logger:console}}destroy(){var U,G,W,w;(G=(U=this.config)==null?void 0:U.httpAgent)==null||G.destroy(),(w=(W=this.config)==null?void 0:W.httpsAgent)==null||w.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;return new Promise((W,w)=>{let X=void 0,Z=[],L=A(async(T)=>{await X,Z.forEach(clearTimeout),W(T)},"resolve"),Y=A(async(T)=>{await X,Z.forEach(clearTimeout),w(T)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(G==null?void 0:G.aborted){let T=new Error("Request aborted");T.name="AbortError",Y(T);return}let Q=U.protocol==="https:",F=Q?this.config.httpsAgent:this.config.httpAgent;Z.push(setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(F,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let J=uG.buildQueryString(U.query||{}),R=void 0;if(U.username!=null||U.password!=null){let T=U.username??"",V=U.password??"";R=`${T}:${V}`}let z=U.path;if(J)z+=`?${J}`;if(U.fragment)z+=`#${U.fragment}`;let K=U.hostname??"";if(K[0]==="["&&K.endsWith("]"))K=U.hostname.slice(1,-1);else K=U.hostname;let E={headers:U.headers,host:K,method:U.method,path:z,port:U.port,agent:F,auth:R},B=(Q?L0.request:Z0.request)(E,(T)=>{let V=new _G.HttpResponse({statusCode:T.statusCode||-1,reason:T.statusMessage,headers:pG(T.headers),body:T});L({response:V})});if(B.on("error",(T)=>{if(y4.includes(T.code))Y(Object.assign(T,{name:"TimeoutError"}));else Y(T)}),G){let T=A(()=>{B.destroy();let V=new Error("Request aborted");V.name="AbortError",Y(V)},"onAbort");if(typeof G.addEventListener==="function"){let V=G;V.addEventListener("abort",T,{once:!0}),B.once("close",()=>V.removeEventListener("abort",T))}else G.onabort=T}Z.push(_4(B,Y,this.config.connectionTimeout)),Z.push(d4(B,Y,this.config.requestTimeout));let H=E.agent;if(typeof H==="object"&&"keepAlive"in H)Z.push(p4(B,{keepAlive:H.keepAlive,keepAliveMsecs:H.keepAliveMsecs}));X=Y0(B,U,this.config.requestTimeout).catch((T)=>{return Z.forEach(clearTimeout),w(T)})})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}};A(sG,"NodeHttpHandler");var s4=sG,cG=import.meta.require("http2"),m4=c4(import.meta.require("http2")),mG=class ${constructor(U){this.sessions=[],this.sessions=U??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(U){this.sessions.push(U)}contains(U){return this.sessions.includes(U)}remove(U){this.sessions=this.sessions.filter((G)=>G!==U)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(U){for(let G of this.sessions)if(G===U){if(!G.destroyed)G.destroy()}}};A(mG,"NodeHttp2ConnectionPool");var l4=mG,lG=class ${constructor(U){if(this.sessionCache=new Map,this.config=U,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(U,G){let W=this.getUrlString(U),w=this.sessionCache.get(W);if(w){let Y=w.poll();if(Y&&!this.config.disableConcurrency)return Y}let X=m4.default.connect(W);if(this.config.maxConcurrency)X.settings({maxConcurrentStreams:this.config.maxConcurrency},(Y)=>{if(Y)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});X.unref();let Z=A(()=>{X.destroy(),this.deleteSession(W,X)},"destroySessionCb");if(X.on("goaway",Z),X.on("error",Z),X.on("frameError",Z),X.on("close",()=>this.deleteSession(W,X)),G.requestTimeout)X.setTimeout(G.requestTimeout,Z);let L=this.sessionCache.get(W)||new l4;return L.offerLast(X),this.sessionCache.set(W,L),X}deleteSession(U,G){let W=this.sessionCache.get(U);if(!W)return;if(!W.contains(G))return;W.remove(G),this.sessionCache.set(U,W)}release(U,G){var W;let w=this.getUrlString(U);(W=this.sessionCache.get(w))==null||W.offerLast(G)}destroy(){for(let[U,G]of this.sessionCache){for(let W of G){if(!W.destroyed)W.destroy();G.remove(W)}this.sessionCache.delete(U)}}setMaxConcurrentStreams(U){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=U}setDisableConcurrentStreams(U){this.config.disableConcurrency=U}getUrlString(U){return U.destination.toString()}};A(lG,"NodeHttp2ConnectionManager");var n4=lG,nG=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new n4({}),this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((w)=>{G(w||{})}).catch(W);else G(U||{})})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}destroy(){this.connectionManager.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}let{requestTimeout:W,disableConcurrentStreams:w}=this.config;return new Promise((X,Z)=>{var L;let Y=!1,Q=void 0,F=A(async(N)=>{await Q,X(N)},"resolve"),J=A(async(N)=>{await Q,Z(N)},"reject");if(G==null?void 0:G.aborted){Y=!0;let N=new Error("Request aborted");N.name="AbortError",J(N);return}let{hostname:R,method:z,port:K,protocol:E,query:f}=U,B="";if(U.username!=null||U.password!=null){let N=U.username??"",p=U.password??"";B=`${N}:${p}@`}let H=`${E}//${B}${R}${K?`:${K}`:""}`,T={destination:new URL(H)},V=this.connectionManager.lease(T,{requestTimeout:(L=this.config)==null?void 0:L.sessionTimeout,disableConcurrentStreams:w||!1}),D=A((N)=>{if(w)this.destroySession(V);Y=!0,J(N)},"rejectWithDestroy"),i=uG.buildQueryString(f||{}),U1=U.path;if(i)U1+=`?${i}`;if(U.fragment)U1+=`#${U.fragment}`;let x=V.request({...U.headers,[cG.constants.HTTP2_HEADER_PATH]:U1,[cG.constants.HTTP2_HEADER_METHOD]:z});if(V.ref(),x.on("response",(N)=>{let p=new _G.HttpResponse({statusCode:N[":status"]||-1,headers:pG(N),body:x});if(Y=!0,F({response:p}),w)V.close(),this.connectionManager.deleteSession(H,V)}),W)x.setTimeout(W,()=>{x.close();let N=new Error(`Stream timed out because of no activity for ${W} ms`);N.name="TimeoutError",D(N)});if(G){let N=A(()=>{x.close();let p=new Error("Request aborted");p.name="AbortError",D(p)},"onAbort");if(typeof G.addEventListener==="function"){let p=G;p.addEventListener("abort",N,{once:!0}),x.once("close",()=>p.removeEventListener("abort",N))}else G.onabort=N}x.on("frameError",(N,p,QX)=>{D(new Error(`Frame type id ${N} in stream id ${QX} has failed with code ${p}.`))}),x.on("error",D),x.on("aborted",()=>{D(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${x.rstCode}.`))}),x.on("close",()=>{if(V.unref(),w)V.destroy();if(!Y)D(new Error("Unexpected error: http2 request did not get a response"))}),Q=Y0(x,U,W)})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}destroySession(U){if(!U.destroyed)U.destroy()}};A(nG,"NodeHttp2Handler");var i4=nG,iG=class $ extends dG.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,G,W){this.bufferedBytes.push(U),W()}};A(iG,"Collector");var o4=iG,r4=A(($)=>{if(a4($))return oG($);return new Promise((U,G)=>{let W=new o4;$.pipe(W),$.on("error",(w)=>{W.end(),G(w)}),W.on("error",G),W.on("finish",function(){let w=new Uint8Array(Buffer.concat(this.bufferedBytes));U(w)})})},"streamCollector"),a4=A(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");async function oG($){let U=[],G=$.getReader(),W=!1,w=0;while(!W){let{done:L,value:Y}=await G.read();if(Y)U.push(Y),w+=Y.length;W=L}let X=new Uint8Array(w),Z=0;for(let L of U)X.set(L,Z),Z+=L.length;return X}A(oG,"collectReadableStream")});var k1=M((tG)=>{Object.defineProperty(tG,"__esModule",{value:!0});tG.isReadableStream=void 0;var t4=($)=>{var U;return typeof ReadableStream==="function"&&(((U=$===null||$===void 0?void 0:$.constructor)===null||U===void 0?void 0:U.name)===ReadableStream.name||$ instanceof ReadableStream)};tG.isReadableStream=t4});var L8=M((X8)=>{Object.defineProperty(X8,"__esModule",{value:!0});X8.sdkStreamMixin=void 0;var $L=e4(),UL=W8(),GL=w8(),WL=K1(),$8=k1(),U8="The stream has already been transformed.",wL=($)=>{var U,G;if(!G8($)&&!$8.isReadableStream($)){let Z=((G=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||G===void 0?void 0:G.name)||$;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${Z}`)}let W=!1,w=async()=>{if(W)throw new Error(U8);return W=!0,await $L.streamCollector($)},X=(Z)=>{if(typeof Z.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return Z.stream()};return Object.assign($,{transformToByteArray:w,transformToString:async(Z)=>{let L=await w();if(Z==="base64")return UL.toBase64(L);else if(Z==="hex")return GL.toHex(L);else if(Z===void 0||Z==="utf8"||Z==="utf-8")return WL.toUtf8(L);else if(typeof TextDecoder==="function")return new TextDecoder(Z).decode(L);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(W)throw new Error(U8);if(W=!0,G8($))return X($);else if($8.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};X8.sdkStreamMixin=wL;var G8=($)=>typeof Blob==="function"&&$ instanceof Blob});var J8=M((Q8)=>{Object.defineProperty(Q8,"__esModule",{value:!0});Q8.sdkStreamMixin=void 0;var ZL=aG(),LL=XL(),Q0=import.meta.require("stream"),YL=import.meta.require("util"),QL=L8(),Y8="The stream has already been transformed.",FL=($)=>{var U,G;if(!($ instanceof Q0.Readable))try{return QL.sdkStreamMixin($)}catch(X){let Z=((G=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||G===void 0?void 0:G.name)||$;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${Z}`)}let W=!1,w=async()=>{if(W)throw new Error(Y8);return W=!0,await ZL.streamCollector($)};return Object.assign($,{transformToByteArray:w,transformToString:async(X)=>{let Z=await w();if(X===void 0||Buffer.isEncoding(X))return LL.fromArrayBuffer(Z.buffer,Z.byteOffset,Z.byteLength).toString(X);else return new YL.TextDecoder(X).decode(Z)},transformToWebStream:()=>{if(W)throw new Error(Y8);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof Q0.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return W=!0,Q0.Readable.toWeb($)}})};Q8.sdkStreamMixin=FL});var I8=M((z8)=>{Object.defineProperty(z8,"__esModule",{value:!0});z8.splitStream=void 0;async function JL($){if(typeof $.stream==="function")$=$.stream();return $.tee()}z8.splitStream=JL});var M8=M((f8)=>{Object.defineProperty(f8,"__esModule",{value:!0});f8.splitStream=void 0;var K8=import.meta.require("stream"),zL=I8(),RL=k1();async function IL($){if(RL.isReadableStream($))return zL.splitStream($);let U=new K8.PassThrough,G=new K8.PassThrough;return $.pipe(U),$.pipe(G),[U,G]}f8.splitStream=IL});var V8=M((B8)=>{Object.defineProperty(B8,"__esModule",{value:!0});B8.headStream=void 0;async function KL($,U){var G;let W=0,w=[],X=$.getReader(),Z=!1;while(!Z){let{done:Q,value:F}=await X.read();if(F)w.push(F),W+=(G=F===null||F===void 0?void 0:F.byteLength)!==null&&G!==void 0?G:0;if(W>=U)break;Z=Q}X.releaseLock();let L=new Uint8Array(Math.min(U,W)),Y=0;for(let Q of w){if(Q.byteLength>L.byteLength-Y){L.set(Q.subarray(0,L.byteLength-Y),Y);break}else L.set(Q,Y);Y+=Q.length}return L}B8.headStream=KL});var q8=M((A8)=>{Object.defineProperty(A8,"__esModule",{value:!0});A8.headStream=void 0;var fL=import.meta.require("stream"),EL=V8(),ML=k1(),BL=($,U)=>{if(ML.isReadableStream($))return EL.headStream($,U);return new Promise((G,W)=>{let w=new H8;w.limit=U,$.pipe(w),$.on("error",(X)=>{w.end(),W(X)}),w.on("error",W),w.on("finish",function(){let X=new Uint8Array(Buffer.concat(this.buffers));G(X)})})};A8.headStream=BL;class H8 extends fL.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write($,U,G){var W;if(this.buffers.push($),this.bytesBuffered+=(W=$.byteLength)!==null&&W!==void 0?W:0,this.bytesBuffered>=this.limit){let w=this.bytesBuffered-this.limit,X=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=X.subarray(0,X.byteLength-w),this.emit("finish")}G()}}});var b8=M((aQ,Z1)=>{var{defineProperty:w$,getOwnPropertyDescriptor:TL,getOwnPropertyNames:VL}=Object,HL=Object.prototype.hasOwnProperty,z0=($,U)=>w$($,"name",{value:U,configurable:!0}),AL=($,U)=>{for(var G in U)w$($,G,{get:U[G],enumerable:!0})},F0=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of VL(U))if(!HL.call($,w)&&w!==G)w$($,w,{get:()=>U[w],enumerable:!(W=TL(U,w))||W.enumerable})}return $},h1=($,U,G)=>(F0($,U,"default"),G&&F0(G,U,"default")),OL=($)=>F0(w$({},"__esModule",{value:!0}),$),X1={};AL(X1,{Uint8ArrayBlobAdapter:()=>J0});Z1.exports=OL(X1);var C8=W8(),N8=K1();function j8($,U="utf-8"){if(U==="base64")return C8.toBase64($);return N8.toUtf8($)}z0(j8,"transformToString");function P8($,U){if(U==="base64")return J0.mutate(C8.fromBase64($));return J0.mutate(N8.fromUtf8($))}z0(P8,"transformFromString");var S8=class $ extends Uint8Array{static fromString(U,G="utf-8"){switch(typeof U){case"string":return P8(U,G);default:throw new Error(`Unsupported conversion from ${typeof U} to Uint8ArrayBlobAdapter.`)}}static mutate(U){return Object.setPrototypeOf(U,$.prototype),U}transformToString(U="utf-8"){return j8(this,U)}};z0(S8,"Uint8ArrayBlobAdapter");var J0=S8;h1(X1,kG(),Z1.exports);h1(X1,J8(),Z1.exports);h1(X1,M8(),Z1.exports);h1(X1,q8(),Z1.exports);h1(X1,k1(),Z1.exports)});var B1=M((tQ,$W)=>{var{defineProperty:Y$,getOwnPropertyDescriptor:qL,getOwnPropertyNames:CL}=Object,NL=Object.prototype.hasOwnProperty,I=($,U)=>Y$($,"name",{value:U,configurable:!0}),jL=($,U)=>{for(var G in U)Y$($,G,{get:U[G],enumerable:!0})},PL=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of CL(U))if(!NL.call($,w)&&w!==G)Y$($,w,{get:()=>U[w],enumerable:!(W=qL(U,w))||W.enumerable})}return $},SL=($)=>PL(Y$({},"__esModule",{value:!0}),$),h8={};jL(h8,{Client:()=>kL,Command:()=>y8,LazyJsonString:()=>j2,NoOpLogger:()=>bL,SENSITIVE_STRING:()=>xL,ServiceException:()=>f2,StringWrapper:()=>y1,_json:()=>B0,collectBody:()=>hL,convertMap:()=>P2,createAggregatedClient:()=>cL,dateToUtcString:()=>m8,decorateServiceException:()=>n8,emitWarningIfUnsupportedVersion:()=>T2,expectBoolean:()=>yL,expectByte:()=>M0,expectFloat32:()=>X$,expectInt:()=>uL,expectInt32:()=>f0,expectLong:()=>c1,expectNonNull:()=>dL,expectNumber:()=>x1,expectObject:()=>u8,expectShort:()=>E0,expectString:()=>gL,expectUnion:()=>sL,extendedEncodeURIComponent:()=>L$,getArrayIfSingleItem:()=>N2,getDefaultClientConfiguration:()=>q2,getDefaultExtensionConfiguration:()=>o8,getValueFromTextNode:()=>r8,handleFloat:()=>nL,limitedParseDouble:()=>H0,limitedParseFloat:()=>iL,limitedParseFloat32:()=>oL,loadConfigsForDefaultMode:()=>B2,logger:()=>v1,map:()=>O0,parseBoolean:()=>vL,parseEpochTimestamp:()=>L2,parseRfc3339DateTime:()=>$2,parseRfc3339DateTimeWithOffset:()=>G2,parseRfc7231DateTime:()=>Z2,resolveDefaultRuntimeConfig:()=>C2,resolvedPath:()=>D2,serializeDateTime:()=>c2,serializeFloat:()=>x2,splitEvery:()=>e8,strictParseByte:()=>s8,strictParseDouble:()=>V0,strictParseFloat:()=>mL,strictParseFloat32:()=>p8,strictParseInt:()=>rL,strictParseInt32:()=>aL,strictParseLong:()=>g8,strictParseShort:()=>f1,take:()=>S2,throwDefaultError:()=>i8,withBaseException:()=>E2});$W.exports=SL(h8);var D8=class ${trace(){}debug(){}info(){}warn(){}error(){}};I(D8,"NoOpLogger");var bL=D8,x8=PG(),c8=class ${constructor(U){this.config=U,this.middlewareStack=x8.constructStack()}send(U,G,W){let w=typeof G!=="function"?G:void 0,X=typeof G==="function"?G:W,Z=w===void 0&&this.config.cacheMiddleware===!0,L;if(Z){if(!this.handlers)this.handlers=new WeakMap;let Y=this.handlers;if(Y.has(U.constructor))L=Y.get(U.constructor);else L=U.resolveMiddleware(this.middlewareStack,this.config,w),Y.set(U.constructor,L)}else delete this.handlers,L=U.resolveMiddleware(this.middlewareStack,this.config,w);if(X)L(U).then((Y)=>X(null,Y.output),(Y)=>X(Y)).catch(()=>{});else return L(U).then((Y)=>Y.output)}destroy(){var U,G,W;(W=(G=(U=this.config)==null?void 0:U.requestHandler)==null?void 0:G.destroy)==null||W.call(G),delete this.handlers}};I(c8,"Client");var kL=c8,R0=b8(),hL=I(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return R0.Uint8ArrayBlobAdapter.mutate($);if(!$)return R0.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let G=U.streamCollector($);return R0.Uint8ArrayBlobAdapter.mutate(await G)},"collectBody"),K0=C1(),v8=class ${constructor(){this.middlewareStack=x8.constructStack()}static classBuilder(){return new DL}resolveMiddlewareWithContext(U,G,W,{middlewareFn:w,clientName:X,commandName:Z,inputFilterSensitiveLog:L,outputFilterSensitiveLog:Y,smithyContext:Q,additionalContext:F,CommandCtor:J}){for(let f of w.bind(this)(J,U,G,W))this.middlewareStack.use(f);let R=U.concat(this.middlewareStack),{logger:z}=G,K={logger:z,clientName:X,commandName:Z,inputFilterSensitiveLog:L,outputFilterSensitiveLog:Y,[K0.SMITHY_CONTEXT_KEY]:{commandInstance:this,...Q},...F},{requestHandler:E}=G;return R.resolve((f)=>E.handle(f.request,W||{}),K)}};I(v8,"Command");var y8=v8,_8=class ${constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(U)=>U,this._outputFilterSensitiveLog=(U)=>U,this._serializer=null,this._deserializer=null}init(U){this._init=U}ep(U){return this._ep=U,this}m(U){return this._middlewareFn=U,this}s(U,G,W={}){return this._smithyContext={service:U,operation:G,...W},this}c(U={}){return this._additionalContext=U,this}n(U,G){return this._clientName=U,this._commandName=G,this}f(U=(W)=>W,G=(W)=>W){return this._inputFilterSensitiveLog=U,this._outputFilterSensitiveLog=G,this}ser(U){return this._serializer=U,this}de(U){return this._deserializer=U,this}build(){var U;let G=this,W;return W=(U=class extends y8{constructor(...[w]){super();this.serialize=G._serializer,this.deserialize=G._deserializer,this.input=w??{},G._init(this)}static getEndpointParameterInstructions(){return G._ep}resolveMiddleware(w,X,Z){return this.resolveMiddlewareWithContext(w,X,Z,{CommandCtor:W,middlewareFn:G._middlewareFn,clientName:G._clientName,commandName:G._commandName,inputFilterSensitiveLog:G._inputFilterSensitiveLog,outputFilterSensitiveLog:G._outputFilterSensitiveLog,smithyContext:G._smithyContext,additionalContext:G._additionalContext})}},I(U,"CommandRef"),U)}};I(_8,"ClassBuilder");var DL=_8,xL="***SensitiveInformation***",cL=I(($,U)=>{for(let G of Object.keys($)){let W=$[G],w=I(async function(Z,L,Y){let Q=new W(Z);if(typeof L==="function")this.send(Q,L);else if(typeof Y==="function"){if(typeof L!=="object")throw new Error(`Expected http options but got ${typeof L}`);this.send(Q,L||{},Y)}else return this.send(Q,L)},"methodImpl"),X=(G[0].toLowerCase()+G.slice(1)).replace(/Command$/,"");U.prototype[X]=w}},"createAggregatedClient"),vL=I(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),yL=I(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)v1.warn(Z$(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){let U=$.toLowerCase();if(U==="false"||U==="true")v1.warn(Z$(`Expected boolean, got ${typeof $}: ${$}`));if(U==="false")return!1;if(U==="true")return!0}if(typeof $==="boolean")return $;throw new TypeError(`Expected boolean, got ${typeof $}: ${$}`)},"expectBoolean"),x1=I(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){let U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))v1.warn(Z$(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),_L=Math.ceil(340282346638528860000000000000000000000),X$=I(($)=>{let U=x1($);if(U!==void 0&&!Number.isNaN(U)&&U!==1/0&&U!==-1/0){if(Math.abs(U)>_L)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),c1=I(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),uL=c1,f0=I(($)=>T0($,32),"expectInt32"),E0=I(($)=>T0($,16),"expectShort"),M0=I(($)=>T0($,8),"expectByte"),T0=I(($,U)=>{let G=c1($);if(G!==void 0&&pL(G,U)!==G)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return G},"expectSizedInt"),pL=I(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),dL=I(($,U)=>{if($===null||$===void 0){if(U)throw new TypeError(`Expected a non-null value for ${U}`);throw new TypeError("Expected a non-null value")}return $},"expectNonNull"),u8=I(($)=>{if($===null||$===void 0)return;if(typeof $==="object"&&!Array.isArray($))return $;let U=Array.isArray($)?"array":typeof $;throw new TypeError(`Expected object, got ${U}: ${$}`)},"expectObject"),gL=I(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return v1.warn(Z$(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),sL=I(($)=>{if($===null||$===void 0)return;let U=u8($),G=Object.entries(U).filter(([,W])=>W!=null).map(([W])=>W);if(G.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(G.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${G} were not null.`);return U},"expectUnion"),V0=I(($)=>{if(typeof $=="string")return x1(M1($));return x1($)},"strictParseDouble"),mL=V0,p8=I(($)=>{if(typeof $=="string")return X$(M1($));return X$($)},"strictParseFloat32"),lL=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,M1=I(($)=>{let U=$.match(lL);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),H0=I(($)=>{if(typeof $=="string")return d8($);return x1($)},"limitedParseDouble"),nL=H0,iL=H0,oL=I(($)=>{if(typeof $=="string")return d8($);return X$($)},"limitedParseFloat32"),d8=I(($)=>{switch($){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),g8=I(($)=>{if(typeof $==="string")return c1(M1($));return c1($)},"strictParseLong"),rL=g8,aL=I(($)=>{if(typeof $==="string")return f0(M1($));return f0($)},"strictParseInt32"),f1=I(($)=>{if(typeof $==="string")return E0(M1($));return E0($)},"strictParseShort"),s8=I(($)=>{if(typeof $==="string")return M0(M1($));return M0($)},"strictParseByte"),Z$=I(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),v1={warn:console.warn},tL=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function m8($){let U=$.getUTCFullYear(),G=$.getUTCMonth(),W=$.getUTCDay(),w=$.getUTCDate(),X=$.getUTCHours(),Z=$.getUTCMinutes(),L=$.getUTCSeconds(),Y=w<10?`0${w}`:`${w}`,Q=X<10?`0${X}`:`${X}`,F=Z<10?`0${Z}`:`${Z}`,J=L<10?`0${L}`:`${L}`;return`${tL[W]}, ${Y} ${A0[G]} ${U} ${Q}:${F}:${J} GMT`}I(m8,"dateToUtcString");var eL=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),$2=I(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let U=eL.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");let[G,W,w,X,Z,L,Y,Q]=U,F=f1(E1(W)),J=m(w,"month",1,12),R=m(X,"day",1,31);return D1(F,J,R,{hours:Z,minutes:L,seconds:Y,fractionalMilliseconds:Q})},"parseRfc3339DateTime"),U2=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),G2=I(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let U=U2.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");let[G,W,w,X,Z,L,Y,Q,F]=U,J=f1(E1(W)),R=m(w,"month",1,12),z=m(X,"day",1,31),K=D1(J,R,z,{hours:Z,minutes:L,seconds:Y,fractionalMilliseconds:Q});if(F.toUpperCase()!="Z")K.setTime(K.getTime()-K2(F));return K},"parseRfc3339DateTimeWithOffset"),W2=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$/),w2=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$/),X2=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})$/),Z2=I(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=W2.exec($);if(U){let[G,W,w,X,Z,L,Y,Q]=U;return D1(f1(E1(X)),I0(w),m(W,"day",1,31),{hours:Z,minutes:L,seconds:Y,fractionalMilliseconds:Q})}if(U=w2.exec($),U){let[G,W,w,X,Z,L,Y,Q]=U;return F2(D1(Y2(X),I0(w),m(W,"day",1,31),{hours:Z,minutes:L,seconds:Y,fractionalMilliseconds:Q}))}if(U=X2.exec($),U){let[G,W,w,X,Z,L,Y,Q]=U;return D1(f1(E1(Q)),I0(W),m(w.trimLeft(),"day",1,31),{hours:X,minutes:Z,seconds:L,fractionalMilliseconds:Y})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),L2=I(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=V0($);else if(typeof $==="object"&&$.tag===1)U=$.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(U)||U===1/0||U===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(U*1000))},"parseEpochTimestamp"),D1=I(($,U,G,W)=>{let w=U-1;return z2($,w,G),new Date(Date.UTC($,w,G,m(W.hours,"hour",0,23),m(W.minutes,"minute",0,59),m(W.seconds,"seconds",0,60),I2(W.fractionalMilliseconds)))},"buildDate"),Y2=I(($)=>{let U=new Date().getUTCFullYear(),G=Math.floor(U/100)*100+f1(E1($));if(G<U)return G+100;return G},"parseTwoDigitYear"),Q2=1576800000000,F2=I(($)=>{if($.getTime()-new Date().getTime()>Q2)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),I0=I(($)=>{let U=A0.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),J2=[31,28,31,30,31,30,31,31,30,31,30,31],z2=I(($,U,G)=>{let W=J2[U];if(U===1&&R2($))W=29;if(G>W)throw new TypeError(`Invalid day for ${A0[U]} in ${$}: ${G}`)},"validateDayOfMonth"),R2=I(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),m=I(($,U,G,W)=>{let w=s8(E1($));if(w<G||w>W)throw new TypeError(`${U} must be between ${G} and ${W}, inclusive`);return w},"parseDateValue"),I2=I(($)=>{if($===null||$===void 0)return 0;return p8("0."+$)*1000},"parseMilliseconds"),K2=I(($)=>{let U=$[0],G=1;if(U=="+")G=1;else if(U=="-")G=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);let W=Number($.substring(1,3)),w=Number($.substring(4,6));return G*(W*60+w)*60*1000},"parseOffsetToMilliseconds"),E1=I(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),l8=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};I(l8,"ServiceException");var f2=l8,n8=I(($,U={})=>{Object.entries(U).filter(([,W])=>W!==void 0).forEach(([W,w])=>{if($[W]==null||$[W]==="")$[W]=w});let G=$.message||$.Message||"UnknownError";return $.message=G,delete $.Message,$},"decorateServiceException"),i8=I(({output:$,parsedBody:U,exceptionCtor:G,errorCode:W})=>{let w=M2($),X=w.httpStatusCode?w.httpStatusCode+"":void 0,Z=new G({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||W||X||"UnknownError",$fault:"client",$metadata:w});throw n8(Z,U)},"throwDefaultError"),E2=I(($)=>{return({output:U,parsedBody:G,errorCode:W})=>{i8({output:U,parsedBody:G,exceptionCtor:$,errorCode:W})}},"withBaseException"),M2=I(($)=>({httpStatusCode:$.statusCode,requestId:$.headers["x-amzn-requestid"]??$.headers["x-amzn-request-id"]??$.headers["x-amz-request-id"],extendedRequestId:$.headers["x-amz-id-2"],cfId:$.headers["x-amz-cf-id"]}),"deserializeMetadata"),B2=I(($)=>{switch($){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),k8=!1,T2=I(($)=>{if($&&!k8&&parseInt($.substring(1,$.indexOf(".")))<16)k8=!0},"emitWarningIfUnsupportedVersion"),V2=I(($)=>{let U=[];for(let G in K0.AlgorithmId){let W=K0.AlgorithmId[G];if($[W]===void 0)continue;U.push({algorithmId:()=>W,checksumConstructor:()=>$[W]})}return{_checksumAlgorithms:U,addChecksumAlgorithm(G){this._checksumAlgorithms.push(G)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),H2=I(($)=>{let U={};return $.checksumAlgorithms().forEach((G)=>{U[G.algorithmId()]=G.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),A2=I(($)=>{let U=$.retryStrategy;return{setRetryStrategy(G){U=G},retryStrategy(){return U}}},"getRetryConfiguration"),O2=I(($)=>{let U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),o8=I(($)=>{return{...V2($),...A2($)}},"getDefaultExtensionConfiguration"),q2=o8,C2=I(($)=>{return{...H2($),...O2($)}},"resolveDefaultRuntimeConfig");function L$($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})}I(L$,"extendedEncodeURIComponent");var N2=I(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),r8=I(($)=>{for(let G in $)if($.hasOwnProperty(G)&&$[G]["#text"]!==void 0)$[G]=$[G]["#text"];else if(typeof $[G]==="object"&&$[G]!==null)$[G]=r8($[G]);return $},"getValueFromTextNode"),y1=I(function(){let $=Object.getPrototypeOf(this).constructor,G=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(G,$.prototype),G},"StringWrapper");y1.prototype=Object.create(String.prototype,{constructor:{value:y1,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(y1,String);var a8=class $ extends y1{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(U){if(U instanceof $)return U;else if(U instanceof String||typeof U==="string")return new $(U);return new $(JSON.stringify(U))}};I(a8,"LazyJsonString");var j2=a8;function O0($,U,G){let W,w,X;if(typeof U==="undefined"&&typeof G==="undefined")W={},X=$;else if(W=$,typeof U==="function")return w=U,X=G,b2(W,w,X);else X=U;for(let Z of Object.keys(X)){if(!Array.isArray(X[Z])){W[Z]=X[Z];continue}t8(W,null,X,Z)}return W}I(O0,"map");var P2=I(($)=>{let U={};for(let[G,W]of Object.entries($||{}))U[G]=[,W];return U},"convertMap"),S2=I(($,U)=>{let G={};for(let W in U)t8(G,$,U,W);return G},"take"),b2=I(($,U,G)=>{return O0($,Object.entries(G).reduce((W,[w,X])=>{if(Array.isArray(X))W[w]=X;else if(typeof X==="function")W[w]=[U,X()];else W[w]=[U,X];return W},{}))},"mapWithFilter"),t8=I(($,U,G,W)=>{if(U!==null){let Z=G[W];if(typeof Z==="function")Z=[,Z];let[L=k2,Y=h2,Q=W]=Z;if(typeof L==="function"&&L(U[Q])||typeof L!=="function"&&!!L)$[W]=Y(U[Q]);return}let[w,X]=G[W];if(typeof X==="function"){let Z,L=w===void 0&&(Z=X())!=null,Y=typeof w==="function"&&!!w(void 0)||typeof w!=="function"&&!!w;if(L)$[W]=Z;else if(Y)$[W]=X()}else{let Z=w===void 0&&X!=null,L=typeof w==="function"&&!!w(X)||typeof w!=="function"&&!!w;if(Z||L)$[W]=X}},"applyInstruction"),k2=I(($)=>$!=null,"nonNullish"),h2=I(($)=>$,"pass"),D2=I(($,U,G,W,w,X)=>{if(U!=null&&U[G]!==void 0){let Z=W();if(Z.length<=0)throw new Error("Empty value provided for input HTTP label: "+G+".");$=$.replace(w,X?Z.split("/").map((L)=>L$(L)).join("/"):L$(Z))}else throw new Error("No value provided for input HTTP label: "+G+".");return $},"resolvedPath"),x2=I(($)=>{if($!==$)return"NaN";switch($){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return $}},"serializeFloat"),c2=I(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),B0=I(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(B0);if(typeof $==="object"){let U={};for(let G of Object.keys($)){if($[G]==null)continue;U[G]=B0($[G])}return U}return $},"_json");function e8($,U,G){if(G<=0||!Number.isInteger(G))throw new Error("Invalid number of delimiters ("+G+") for splitEvery.");let W=$.split(U);if(G===1)return W;let w=[],X="";for(let Z=0;Z<W.length;Z++){if(X==="")X=W[Z];else X+=U+W[Z];if((Z+1)%G===0)w.push(X),X=""}if(X!=="")w.push(X);return w}I(e8,"splitEvery")});var WW=M((UW)=>{Object.defineProperty(UW,"__esModule",{value:!0});UW.isStreamingPayload=void 0;var v2=import.meta.require("stream"),y2=($)=>($===null||$===void 0?void 0:$.body)instanceof v2.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;UW.isStreamingPayload=y2});var VW=M((UF,TW)=>{var{defineProperty:Q$,getOwnPropertyDescriptor:u2,getOwnPropertyNames:p2}=Object,d2=Object.prototype.hasOwnProperty,P=($,U)=>Q$($,"name",{value:U,configurable:!0}),g2=($,U)=>{for(var G in U)Q$($,G,{get:U[G],enumerable:!0})},s2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of p2(U))if(!d2.call($,w)&&w!==G)Q$($,w,{get:()=>U[w],enumerable:!(W=u2(U,w))||W.enumerable})}return $},m2=($)=>s2(Q$({},"__esModule",{value:!0}),$),XW={};g2(XW,{AdaptiveRetryStrategy:()=>i2,CONFIG_MAX_ATTEMPTS:()=>C0,CONFIG_RETRY_MODE:()=>IW,ENV_MAX_ATTEMPTS:()=>q0,ENV_RETRY_MODE:()=>RW,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>o2,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>a2,StandardRetryStrategy:()=>JW,defaultDelayDecider:()=>LW,defaultRetryDecider:()=>YW,getOmitRetryHeadersPlugin:()=>t2,getRetryAfterHint:()=>BW,getRetryPlugin:()=>wY,omitRetryHeadersMiddleware:()=>KW,omitRetryHeadersMiddlewareOptions:()=>fW,resolveRetryConfig:()=>r2,retryMiddleware:()=>EW,retryMiddlewareOptions:()=>MW});TW.exports=m2(XW);var T1=w1(),ZW=_2(),C=OG(),l2=P(($,U)=>{let G=$,W=(U==null?void 0:U.noRetryIncrement)??C.NO_RETRY_INCREMENT,w=(U==null?void 0:U.retryCost)??C.RETRY_COST,X=(U==null?void 0:U.timeoutRetryCost)??C.TIMEOUT_RETRY_COST,Z=$,L=P((J)=>J.name==="TimeoutError"?X:w,"getCapacityAmount"),Y=P((J)=>L(J)<=Z,"hasRetryTokens");return Object.freeze({hasRetryTokens:Y,retrieveRetryTokens:P((J)=>{if(!Y(J))throw new Error("No retry token available");let R=L(J);return Z-=R,R},"retrieveRetryTokens"),releaseRetryTokens:P((J)=>{Z+=J??W,Z=Math.min(Z,G)},"releaseRetryTokens")})},"getDefaultRetryQuota"),LW=P(($,U)=>Math.floor(Math.min(C.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),r=$0(),YW=P(($)=>{if(!$)return!1;return r.isRetryableByTrait($)||r.isClockSkewError($)||r.isThrottlingError($)||r.isTransientError($)},"defaultRetryDecider"),QW=P(($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)},"asSdkError"),FW=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode=C.RETRY_MODES.STANDARD,this.retryDecider=(G==null?void 0:G.retryDecider)??YW,this.delayDecider=(G==null?void 0:G.delayDecider)??LW,this.retryQuota=(G==null?void 0:G.retryQuota)??l2(C.INITIAL_RETRY_TOKENS)}shouldRetry(U,G,W){return G<W&&this.retryDecider(U)&&this.retryQuota.hasRetryTokens(U)}async getMaxAttempts(){let U;try{U=await this.maxAttemptsProvider()}catch(G){U=C.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,G,W){let w,X=0,Z=0,L=await this.getMaxAttempts(),{request:Y}=G;if(T1.HttpRequest.isInstance(Y))Y.headers[C.INVOCATION_ID_HEADER]=ZW.v4();while(!0)try{if(T1.HttpRequest.isInstance(Y))Y.headers[C.REQUEST_HEADER]=`attempt=${X+1}; max=${L}`;if(W==null?void 0:W.beforeRequest)await W.beforeRequest();let{response:Q,output:F}=await U(G);if(W==null?void 0:W.afterRequest)W.afterRequest(Q);return this.retryQuota.releaseRetryTokens(w),F.$metadata.attempts=X+1,F.$metadata.totalRetryDelay=Z,{response:Q,output:F}}catch(Q){let F=QW(Q);if(X++,this.shouldRetry(F,X,L)){w=this.retryQuota.retrieveRetryTokens(F);let J=this.delayDecider(r.isThrottlingError(F)?C.THROTTLING_RETRY_DELAY_BASE:C.DEFAULT_RETRY_DELAY_BASE,X),R=n2(F.$response),z=Math.max(R||0,J);Z+=z,await new Promise((K)=>setTimeout(K,z));continue}if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=X,F.$metadata.totalRetryDelay=Z,F}}};P(FW,"StandardRetryStrategy");var JW=FW,n2=P(($)=>{if(!T1.HttpResponse.isInstance($))return;let U=Object.keys($.headers).find((X)=>X.toLowerCase()==="retry-after");if(!U)return;let G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return W*1000;return new Date(G).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),zW=class $ extends JW{constructor(U,G){let{rateLimiter:W,...w}=G??{};super(U,w);this.rateLimiter=W??new C.DefaultRateLimiter,this.mode=C.RETRY_MODES.ADAPTIVE}async retry(U,G){return super.retry(U,G,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(W)=>{this.rateLimiter.updateClientSendingRate(W)}})}};P(zW,"AdaptiveRetryStrategy");var i2=zW,wW=s(),q0="AWS_MAX_ATTEMPTS",C0="max_attempts",o2={environmentVariableSelector:($)=>{let U=$[q0];if(!U)return;let G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${q0} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{let U=$[C0];if(!U)return;let G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${C0} mast be a number, got "${U}"`);return G},default:C.DEFAULT_MAX_ATTEMPTS},r2=P(($)=>{let{retryStrategy:U}=$,G=wW.normalizeProvider($.maxAttempts??C.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await wW.normalizeProvider($.retryMode)()===C.RETRY_MODES.ADAPTIVE)return new C.AdaptiveRetryStrategy(G);return new C.StandardRetryStrategy(G)}}},"resolveRetryConfig"),RW="AWS_RETRY_MODE",IW="retry_mode",a2={environmentVariableSelector:($)=>$[RW],configFileSelector:($)=>$[IW],default:C.DEFAULT_RETRY_MODE},KW=P(()=>($)=>async(U)=>{let{request:G}=U;if(T1.HttpRequest.isInstance(G))delete G.headers[C.INVOCATION_ID_HEADER],delete G.headers[C.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),fW={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},t2=P(($)=>({applyToStack:(U)=>{U.addRelativeTo(KW(),fW)}}),"getOmitRetryHeadersPlugin"),e2=B1(),$Y=WW(),EW=P(($)=>(U,G)=>async(W)=>{var w;let X=await $.retryStrategy(),Z=await $.maxAttempts();if(UY(X)){X=X;let L=await X.acquireInitialRetryToken(G.partition_id),Y=new Error,Q=0,F=0,{request:J}=W,R=T1.HttpRequest.isInstance(J);if(R)J.headers[C.INVOCATION_ID_HEADER]=ZW.v4();while(!0)try{if(R)J.headers[C.REQUEST_HEADER]=`attempt=${Q+1}; max=${Z}`;let{response:z,output:K}=await U(W);return X.recordSuccess(L),K.$metadata.attempts=Q+1,K.$metadata.totalRetryDelay=F,{response:z,output:K}}catch(z){let K=GY(z);if(Y=QW(z),R&&$Y.isStreamingPayload(J))throw(w=G.logger instanceof e2.NoOpLogger?console:G.logger)==null||w.warn("An error was encountered in a non-retryable streaming request."),Y;try{L=await X.refreshRetryTokenForRetry(L,K)}catch(f){if(!Y.$metadata)Y.$metadata={};throw Y.$metadata.attempts=Q+1,Y.$metadata.totalRetryDelay=F,Y}Q=L.getRetryCount();let E=L.getRetryDelay();F+=E,await new Promise((f)=>setTimeout(f,E))}}else{if(X=X,X==null?void 0:X.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",X.mode]];return X.retry(U,W)}},"retryMiddleware"),UY=P(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),GY=P(($)=>{let U={error:$,errorType:WY($)},G=BW($.$response);if(G)U.retryAfterHint=G;return U},"getRetryErrorInfo"),WY=P(($)=>{if(r.isThrottlingError($))return"THROTTLING";if(r.isTransientError($))return"TRANSIENT";if(r.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),MW={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},wY=P(($)=>({applyToStack:(U)=>{U.add(EW($),MW)}}),"getRetryPlugin"),BW=P(($)=>{if(!T1.HttpResponse.isInstance($))return;let U=Object.keys($.headers).find((X)=>X.toLowerCase()==="retry-after");if(!U)return;let G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)},"getRetryAfterHint")});var j0=M((GF,uW)=>{var{defineProperty:J$,getOwnPropertyDescriptor:XY,getOwnPropertyNames:ZY}=Object,LY=Object.prototype.hasOwnProperty,q=($,U)=>J$($,"name",{value:U,configurable:!0}),YY=($,U)=>{for(var G in U)J$($,G,{get:U[G],enumerable:!0})},QY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of ZY(U))if(!LY.call($,w)&&w!==G)J$($,w,{get:()=>U[w],enumerable:!(W=XY(U,w))||W.enumerable})}return $},FY=($)=>QY(J$({},"__esModule",{value:!0}),$),HW={};YY(HW,{DefaultIdentityProviderConfig:()=>BY,EXPIRATION_MS:()=>DW,HttpApiKeyAuthSigner:()=>TY,HttpBearerAuthSigner:()=>VY,NoAuthSigner:()=>HY,RequestBuilder:()=>yW,createIsIdentityExpiredFunction:()=>hW,createPaginator:()=>_W,doesIdentityRequireRefresh:()=>xW,getHttpAuthSchemeEndpointRuleSetPlugin:()=>zY,getHttpAuthSchemePlugin:()=>IY,getHttpSigningPlugin:()=>MY,getSmithyContext:()=>qY,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>qW,httpAuthSchemeMiddleware:()=>N0,httpAuthSchemeMiddlewareOptions:()=>CW,httpSigningMiddleware:()=>NW,httpSigningMiddlewareOptions:()=>jW,isIdentityExpired:()=>AY,memoizeIdentityProvider:()=>OY,normalizeProvider:()=>CY,requestBuilder:()=>cW});uW.exports=FY(HW);var AW=s();function OW($){let U=new Map;for(let G of $)U.set(G.schemeId,G);return U}q(OW,"convertHttpAuthSchemesToMap");var N0=q(($,U)=>(G,W)=>async(w)=>{var X;let Z=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,W,w.input)),L=OW($.httpAuthSchemes),Y=AW.getSmithyContext(W),Q=[];for(let F of Z){let J=L.get(F.schemeId);if(!J){Q.push(`HttpAuthScheme \`${F.schemeId}\` was not enabled for this service.`);continue}let R=J.identityProvider(await U.identityProviderConfigProvider($));if(!R){Q.push(`HttpAuthScheme \`${F.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:z={},signingProperties:K={}}=((X=F.propertiesExtractor)==null?void 0:X.call(F,$,W))||{};F.identityProperties=Object.assign(F.identityProperties||{},z),F.signingProperties=Object.assign(F.signingProperties||{},K),Y.selectedHttpAuthScheme={httpAuthOption:F,identity:await R(F.identityProperties),signer:J.signer};break}if(!Y.selectedHttpAuthScheme)throw new Error(Q.join("\n"));return G(w)},"httpAuthSchemeMiddleware"),JY=ZG(),qW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:JY.endpointMiddlewareOptions.name},zY=q(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(N0($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),qW)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),RY=t$(),CW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:RY.serializerMiddlewareOption.name},IY=q(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(N0($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),CW)}}),"getHttpAuthSchemePlugin"),z$=w1(),KY=q(($)=>(U)=>{throw U},"defaultErrorHandler"),fY=q(($,U)=>{},"defaultSuccessHandler"),NW=q(($)=>(U,G)=>async(W)=>{if(!z$.HttpRequest.isInstance(W.request))return U(W);let X=AW.getSmithyContext(G).selectedHttpAuthScheme;if(!X)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:Z={}},identity:L,signer:Y}=X,Q=await U({...W,request:await Y.sign(W.request,L,Z)}).catch((Y.errorHandler||KY)(Z));return(Y.successHandler||fY)(Q.response,Z),Q},"httpSigningMiddleware"),EY=VW(),jW={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:EY.retryMiddlewareOptions.name},MY=q(($)=>({applyToStack:(U)=>{U.addRelativeTo(NW($),jW)}}),"getHttpSigningPlugin"),PW=class ${constructor(U){this.authSchemes=new Map;for(let[G,W]of Object.entries(U))if(W!==void 0)this.authSchemes.set(G,W)}getIdentityProvider(U){return this.authSchemes.get(U)}};q(PW,"DefaultIdentityProviderConfig");var BY=PW,F$=C1(),SW=class ${async sign(U,G,W){if(!W)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!W.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!W.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!G.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let w=z$.HttpRequest.clone(U);if(W.in===F$.HttpApiKeyAuthLocation.QUERY)w.query[W.name]=G.apiKey;else if(W.in===F$.HttpApiKeyAuthLocation.HEADER)w.headers[W.name]=W.scheme?`${W.scheme} ${G.apiKey}`:G.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+W.in+"`");return w}};q(SW,"HttpApiKeyAuthSigner");var TY=SW,bW=class ${async sign(U,G,W){let w=z$.HttpRequest.clone(U);if(!G.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return w.headers.Authorization=`Bearer ${G.token}`,w}};q(bW,"HttpBearerAuthSigner");var VY=bW,kW=class ${async sign(U,G,W){return U}};q(kW,"NoAuthSigner");var HY=kW,hW=q(($)=>(U)=>xW(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),DW=300000,AY=hW(DW),xW=q(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),OY=q(($,U,G)=>{if($===void 0)return;let W=typeof $!=="function"?async()=>Promise.resolve($):$,w,X,Z,L=!1,Y=q(async(Q)=>{if(!X)X=W(Q);try{w=await X,Z=!0,L=!1}finally{X=void 0}return w},"coalesceProvider");if(U===void 0)return async(Q)=>{if(!Z||(Q==null?void 0:Q.forceRefresh))w=await Y(Q);return w};return async(Q)=>{if(!Z||(Q==null?void 0:Q.forceRefresh))w=await Y(Q);if(L)return w;if(!G(w))return L=!0,w;if(U(w))return await Y(Q),w;return w}},"memoizeIdentityProvider"),qY=q(($)=>$[F$.SMITHY_CONTEXT_KEY]||($[F$.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),CY=q(($)=>{if(typeof $==="function")return $;let U=Promise.resolve($);return()=>U},"normalizeProvider"),NY=B1();function cW($,U){return new yW($,U)}q(cW,"requestBuilder");var vW=class ${constructor(U,G){this.input=U,this.context=G,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:U,protocol:G="https",port:W,path:w}=await this.context.endpoint();this.path=w;for(let X of this.resolvePathStack)X(this.path);return new z$.HttpRequest({protocol:G,hostname:this.hostname||U,port:W,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(U){return this.hostname=U,this}bp(U){return this.resolvePathStack.push((G)=>{this.path=`${(G==null?void 0:G.endsWith("/"))?G.slice(0,-1):G||""}`+U}),this}p(U,G,W,w){return this.resolvePathStack.push((X)=>{this.path=NY.resolvedPath(X,this.input,U,G,W,w)}),this}h(U){return this.headers=U,this}q(U){return this.query=U,this}b(U){return this.body=U,this}m(U){return this.method=U,this}};q(vW,"RequestBuilder");var yW=vW,jY=q(async($,U,G,...W)=>{return await U.send(new $(G),...W)},"makePagedClientRequest");function _W($,U,G,W,w){return q(async function*X(Z,L,...Y){let Q=Z.startingToken||void 0,F=!0,J;while(F){if(L[G]=Q,w)L[w]=L[w]??Z.pageSize;if(Z.client instanceof $)J=await jY(U,Z.client,L,...Y);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield J;let R=Q;Q=PY(J,W),F=!!(Q&&(!Z.stopOnSameToken||Q!==R))}return},"paginateOperation")}q(_W,"createPaginator");var PY=q(($,U)=>{let G=$,W=U.split(".");for(let w of W){if(!G||typeof G!=="object")return;G=G[w]}return G},"get")});var c6=M((R3,x6)=>{var{defineProperty:S$,getOwnPropertyDescriptor:z5,getOwnPropertyNames:R5}=Object,I5=Object.prototype.hasOwnProperty,K5=($,U)=>S$($,"name",{value:U,configurable:!0}),f5=($,U)=>{for(var G in U)S$($,G,{get:U[G],enumerable:!0})},E5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of R5(U))if(!I5.call($,w)&&w!==G)S$($,w,{get:()=>U[w],enumerable:!(W=z5(U,w))||W.enumerable})}return $},M5=($)=>E5(S$({},"__esModule",{value:!0}),$),D6={};f5(D6,{emitWarningIfUnsupportedVersion:()=>B5});x6.exports=M5(D6);var h6=!1,B5=K5(($)=>{if($&&!h6&&parseInt($.substring(1,$.indexOf(".")))<18)h6=!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 Gw=M((I3,Uw)=>{var{defineProperty:c$,getOwnPropertyDescriptor:H5,getOwnPropertyNames:A5}=Object,O5=Object.prototype.hasOwnProperty,S=($,U)=>c$($,"name",{value:U,configurable:!0}),q5=($,U)=>{for(var G in U)c$($,G,{get:U[G],enumerable:!0})},C5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of A5(U))if(!O5.call($,w)&&w!==G)c$($,w,{get:()=>U[w],enumerable:!(W=H5(U,w))||W.enumerable})}return $},N5=($)=>C5(c$({},"__esModule",{value:!0}),$),p6={};q5(p6,{SignatureV4:()=>e5,clearCredentialCache:()=>s5,createScope:()=>h$,getCanonicalHeaders:()=>t0,getCanonicalQuery:()=>o6,getPayloadHash:()=>x$,getSigningKey:()=>i6,moveHeadersToQuery:()=>e6,prepareRequest:()=>$U});Uw.exports=N5(p6);var v6=s(),o0=K1(),j5="X-Amz-Algorithm",P5="X-Amz-Credential",d6="X-Amz-Date",S5="X-Amz-SignedHeaders",b5="X-Amz-Expires",g6="X-Amz-Signature",s6="X-Amz-Security-Token",m6="authorization",l6=d6.toLowerCase(),k5="date",h5=[m6,l6,k5],D5=g6.toLowerCase(),a0="x-amz-content-sha256",x5=s6.toLowerCase(),c5={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},v5=/^proxy-/,y5=/^sec-/,r0="AWS4-HMAC-SHA256",_5="AWS4-HMAC-SHA256-PAYLOAD",u5="UNSIGNED-PAYLOAD",p5=50,n6="aws4_request",d5=604800,e=w8(),g5=K1(),q1={},k$=[],h$=S(($,U,G)=>`${$}/${U}/${G}/${n6}`,"createScope"),i6=S(async($,U,G,W,w)=>{let X=await y6($,U.secretAccessKey,U.accessKeyId),Z=`${G}:${W}:${w}:${e.toHex(X)}:${U.sessionToken}`;if(Z in q1)return q1[Z];k$.push(Z);while(k$.length>p5)delete q1[k$.shift()];let L=`AWS4${U.secretAccessKey}`;for(let Y of[G,W,w,n6])L=await y6($,L,Y);return q1[Z]=L},"getSigningKey"),s5=S(()=>{k$.length=0,Object.keys(q1).forEach(($)=>{delete q1[$]})},"clearCredentialCache"),y6=S(($,U,G)=>{let W=new $(U);return W.update(g5.toUint8Array(G)),W.digest()},"hmac"),t0=S(({headers:$},U,G)=>{let W={};for(let w of Object.keys($).sort()){if($[w]==null)continue;let X=w.toLowerCase();if(X in c5||(U==null?void 0:U.has(X))||v5.test(X)||y5.test(X)){if(!G||G&&!G.has(X))continue}W[X]=$[w].trim().replace(/\s+/g," ")}return W},"getCanonicalHeaders"),D$=T5(),o6=S(({query:$={}})=>{let U=[],G={};for(let W of Object.keys($)){if(W.toLowerCase()===D5)continue;let w=D$.escapeUri(W);U.push(w);let X=$[W];if(typeof X==="string")G[w]=`${w}=${D$.escapeUri(X)}`;else if(Array.isArray(X))G[w]=X.slice(0).reduce((Z,L)=>Z.concat([`${w}=${D$.escapeUri(L)}`]),[]).sort().join("&")}return U.sort().map((W)=>G[W]).filter((W)=>W).join("&")},"getCanonicalQuery"),m5=V5(),l5=K1(),x$=S(async({headers:$,body:U},G)=>{for(let W of Object.keys($))if(W.toLowerCase()===a0)return $[W];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||m5.isArrayBuffer(U)){let W=new G;return W.update(l5.toUint8Array(U)),e.toHex(await W.digest())}return u5},"getPayloadHash"),_6=K1(),r6=class ${format(U){let G=[];for(let X of Object.keys(U)){let Z=_6.fromUtf8(X);G.push(Uint8Array.from([Z.byteLength]),Z,this.formatHeaderValue(U[X]))}let W=new Uint8Array(G.reduce((X,Z)=>X+Z.byteLength,0)),w=0;for(let X of G)W.set(X,w),w+=X.byteLength;return W}formatHeaderValue(U){switch(U.type){case"boolean":return Uint8Array.from([U.value?0:1]);case"byte":return Uint8Array.from([2,U.value]);case"short":let G=new DataView(new ArrayBuffer(3));return G.setUint8(0,3),G.setInt16(1,U.value,!1),new Uint8Array(G.buffer);case"integer":let W=new DataView(new ArrayBuffer(5));return W.setUint8(0,4),W.setInt32(1,U.value,!1),new Uint8Array(W.buffer);case"long":let w=new Uint8Array(9);return w[0]=5,w.set(U.value.bytes,1),w;case"binary":let X=new DataView(new ArrayBuffer(3+U.value.byteLength));X.setUint8(0,6),X.setUint16(1,U.value.byteLength,!1);let Z=new Uint8Array(X.buffer);return Z.set(U.value,3),Z;case"string":let L=_6.fromUtf8(U.value),Y=new DataView(new ArrayBuffer(3+L.byteLength));Y.setUint8(0,7),Y.setUint16(1,L.byteLength,!1);let Q=new Uint8Array(Y.buffer);return Q.set(L,3),Q;case"timestamp":let F=new Uint8Array(9);return F[0]=8,F.set(o5.fromNumber(U.value.valueOf()).bytes,1),F;case"uuid":if(!i5.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);let J=new Uint8Array(17);return J[0]=9,J.set(e.fromHex(U.value.replace(/\-/g,"")),1),J}}};S(r6,"HeaderFormatter");var n5=r6,i5=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,a6=class ${constructor(U){if(this.bytes=U,U.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(U){if(U>9223372036854776000||U<-9223372036854776000)throw new Error(`${U} is too large (or, if negative, too small) to represent as an Int64`);let G=new Uint8Array(8);for(let W=7,w=Math.abs(Math.round(U));W>-1&&w>0;W--,w/=256)G[W]=w;if(U<0)e0(G);return new $(G)}valueOf(){let U=this.bytes.slice(0),G=U[0]&128;if(G)e0(U);return parseInt(e.toHex(U),16)*(G?-1:1)}toString(){return String(this.valueOf())}};S(a6,"Int64");var o5=a6;function e0($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break}S(e0,"negate");var r5=S(($,U)=>{$=$.toLowerCase();for(let G of Object.keys(U))if($===G.toLowerCase())return!0;return!1},"hasHeader"),t6=w1(),e6=S(($,U={})=>{var G;let{headers:W,query:w={}}=t6.HttpRequest.clone($);for(let X of Object.keys(W)){let Z=X.toLowerCase();if(Z.slice(0,6)==="x-amz-"&&!((G=U.unhoistableHeaders)==null?void 0:G.has(Z)))w[X]=W[X],delete W[X]}return{...$,headers:W,query:w}},"moveHeadersToQuery"),$U=S(($)=>{$=t6.HttpRequest.clone($);for(let U of Object.keys($.headers))if(h5.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),a5=S(($)=>t5($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),t5=S(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),$w=class ${constructor({applyChecksum:U,credentials:G,region:W,service:w,sha256:X,uriEscapePath:Z=!0}){this.headerFormatter=new n5,this.service=w,this.sha256=X,this.uriEscapePath=Z,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=v6.normalizeProvider(W),this.credentialProvider=v6.normalizeProvider(G)}async presign(U,G={}){let{signingDate:W=new Date,expiresIn:w=3600,unsignableHeaders:X,unhoistableHeaders:Z,signableHeaders:L,signingRegion:Y,signingService:Q}=G,F=await this.credentialProvider();this.validateResolvedCredentials(F);let J=Y??await this.regionProvider(),{longDate:R,shortDate:z}=b$(W);if(w>d5)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let K=h$(z,J,Q??this.service),E=e6($U(U),{unhoistableHeaders:Z});if(F.sessionToken)E.query[s6]=F.sessionToken;E.query[j5]=r0,E.query[P5]=`${F.accessKeyId}/${K}`,E.query[d6]=R,E.query[b5]=w.toString(10);let f=t0(E,X,L);return E.query[S5]=u6(f),E.query[g6]=await this.getSignature(R,K,this.getSigningKey(F,J,z,Q),this.createCanonicalRequest(E,f,await x$(U,this.sha256))),E}async sign(U,G){if(typeof U==="string")return this.signString(U,G);else if(U.headers&&U.payload)return this.signEvent(U,G);else if(U.message)return this.signMessage(U,G);else return this.signRequest(U,G)}async signEvent({headers:U,payload:G},{signingDate:W=new Date,priorSignature:w,signingRegion:X,signingService:Z}){let L=X??await this.regionProvider(),{shortDate:Y,longDate:Q}=b$(W),F=h$(Y,L,Z??this.service),J=await x$({headers:{},body:G},this.sha256),R=new this.sha256;R.update(U);let z=e.toHex(await R.digest()),K=[_5,Q,F,w,z,J].join("\n");return this.signString(K,{signingDate:W,signingRegion:L,signingService:Z})}async signMessage(U,{signingDate:G=new Date,signingRegion:W,signingService:w}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:G,signingRegion:W,signingService:w,priorSignature:U.priorSignature}).then((Z)=>{return{message:U.message,signature:Z}})}async signString(U,{signingDate:G=new Date,signingRegion:W,signingService:w}={}){let X=await this.credentialProvider();this.validateResolvedCredentials(X);let Z=W??await this.regionProvider(),{shortDate:L}=b$(G),Y=new this.sha256(await this.getSigningKey(X,Z,L,w));return Y.update(o0.toUint8Array(U)),e.toHex(await Y.digest())}async signRequest(U,{signingDate:G=new Date,signableHeaders:W,unsignableHeaders:w,signingRegion:X,signingService:Z}={}){let L=await this.credentialProvider();this.validateResolvedCredentials(L);let Y=X??await this.regionProvider(),Q=$U(U),{longDate:F,shortDate:J}=b$(G),R=h$(J,Y,Z??this.service);if(Q.headers[l6]=F,L.sessionToken)Q.headers[x5]=L.sessionToken;let z=await x$(Q,this.sha256);if(!r5(a0,Q.headers)&&this.applyChecksum)Q.headers[a0]=z;let K=t0(Q,w,W),E=await this.getSignature(F,R,this.getSigningKey(L,Y,J,Z),this.createCanonicalRequest(Q,K,z));return Q.headers[m6]=`${r0} Credential=${L.accessKeyId}/${R}, SignedHeaders=${u6(K)}, Signature=${E}`,Q}createCanonicalRequest(U,G,W){let w=Object.keys(G).sort();return`${U.method}
|
|
10
|
-
${this.getCanonicalPath(U)}
|
|
11
|
-
${o6(U)}
|
|
12
|
-
${w.map((X)=>`${X}:${G[X]}`).join("\n")}
|
|
13
|
-
|
|
14
|
-
${w.join(";")}
|
|
15
|
-
${W}`}async createStringToSign(U,G,W){let w=new this.sha256;w.update(o0.toUint8Array(W));let X=await w.digest();return`${r0}
|
|
16
|
-
${U}
|
|
17
|
-
${G}
|
|
18
|
-
${e.toHex(X)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){let G=[];for(let X of U.split("/")){if((X==null?void 0:X.length)===0)continue;if(X===".")continue;if(X==="..")G.pop();else G.push(X)}let W=`${(U==null?void 0:U.startsWith("/"))?"/":""}${G.join("/")}${G.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return D$.escapeUri(W).replace(/%2F/g,"/")}return U}async getSignature(U,G,W,w){let X=await this.createStringToSign(U,G,w),Z=new this.sha256(await W);return Z.update(o0.toUint8Array(X)),e.toHex(await Z.digest())}getSigningKey(U,G,W,w){return i6(this.sha256,U,W,G,w||this.service)}validateResolvedCredentials(U){if(typeof U!=="object"||typeof U.accessKeyId!=="string"||typeof U.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};S($w,"SignatureV4");var e5=$w,b$=S(($)=>{let U=a5($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),u6=S(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var zw=M((K3,Jw)=>{var{defineProperty:v$,getOwnPropertyDescriptor:$9,getOwnPropertyNames:U9}=Object,G9=Object.prototype.hasOwnProperty,k=($,U)=>v$($,"name",{value:U,configurable:!0}),W9=($,U)=>{for(var G in U)v$($,G,{get:U[G],enumerable:!0})},w9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of U9(U))if(!G9.call($,w)&&w!==G)v$($,w,{get:()=>U[w],enumerable:!(W=$9(U,w))||W.enumerable})}return $},X9=($)=>w9(v$({},"__esModule",{value:!0}),$),Lw={};W9(Lw,{AWSSDKSigV4Signer:()=>Q9,AwsSdkSigV4ASigner:()=>J9,AwsSdkSigV4Signer:()=>WU,NODE_SIGV4A_CONFIG_OPTIONS:()=>I9,resolveAWSSDKSigV4Config:()=>K9,resolveAwsSdkSigV4AConfig:()=>R9,resolveAwsSdkSigV4Config:()=>Fw,validateSigningProperties:()=>GU});Jw.exports=X9(Lw);var Z9=w1(),L9=w1(),Ww=k(($)=>{var U,G;return L9.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((G=$.headers)==null?void 0:G.Date):void 0},"getDateHeader"),UU=k(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),Y9=k(($,U)=>Math.abs(UU(U).getTime()-$)>=300000,"isClockSkewed"),ww=k(($,U)=>{let G=Date.parse($);if(Y9(G,U))return G-Date.now();return U},"getUpdatedSystemClockOffset"),g1=k(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),GU=k(async($)=>{var U,G,W;let w=g1("context",$.context),X=g1("config",$.config),Z=(W=(G=(U=w.endpointV2)==null?void 0:U.properties)==null?void 0:G.authSchemes)==null?void 0:W[0],Y=await g1("signer",X.signer)(Z),Q=$==null?void 0:$.signingRegion,F=$==null?void 0:$.signingRegionSet,J=$==null?void 0:$.signingName;return{config:X,signer:Y,signingRegion:Q,signingRegionSet:F,signingName:J}},"validateSigningProperties"),Yw=class ${async sign(U,G,W){var w;if(!Z9.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let X=await GU(W),{config:Z,signer:L}=X,{signingRegion:Y,signingName:Q}=X,F=W.context;if(((w=F==null?void 0:F.authSchemes)==null?void 0:w.length)??0>1){let[R,z]=F.authSchemes;if((R==null?void 0:R.name)==="sigv4a"&&(z==null?void 0:z.name)==="sigv4")Y=(z==null?void 0:z.signingRegion)??Y,Q=(z==null?void 0:z.signingName)??Q}return await L.sign(U,{signingDate:UU(Z.systemClockOffset),signingRegion:Y,signingService:Q})}errorHandler(U){return(G)=>{let W=G.ServerTime??Ww(G.$response);if(W){let w=g1("config",U.config),X=w.systemClockOffset;if(w.systemClockOffset=ww(W,w.systemClockOffset),w.systemClockOffset!==X&&G.$metadata)G.$metadata.clockSkewCorrected=!0}throw G}}successHandler(U,G){let W=Ww(U);if(W){let w=g1("config",G.config);w.systemClockOffset=ww(W,w.systemClockOffset)}}};k(Yw,"AwsSdkSigV4Signer");var WU=Yw,Q9=WU,F9=w1(),Qw=class $ extends WU{async sign(U,G,W){var w;if(!F9.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:X,signer:Z,signingRegion:L,signingRegionSet:Y,signingName:Q}=await GU(W),J=(await((w=X.sigv4aSigningRegionSet)==null?void 0:w.call(X))??Y??[L]).join(",");return await Z.sign(U,{signingDate:UU(X.systemClockOffset),signingRegion:J,signingService:Q})}};k(Qw,"AwsSdkSigV4ASigner");var J9=Qw,z9=j0(),Xw=i$(),R9=k(($)=>{return $.sigv4aSigningRegionSet=z9.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),I9={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new Xw.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector($){if($.sigv4a_signing_region_set)return($.sigv4a_signing_region_set??"").split(",").map((U)=>U.trim());throw new Xw.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},F1=j0(),Zw=Gw(),Fw=k(($)=>{let U;if($.credentials)U=F1.memoizeIdentityProvider($.credentials,F1.isIdentityExpired,F1.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=F1.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=k(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");let{signingEscapePath:G=!0,systemClockOffset:W=$.systemClockOffset||0,sha256:w}=$,X;if($.signer)X=F1.normalizeProvider($.signer);else if($.regionInfoProvider)X=k(()=>F1.normalizeProvider($.region)().then(async(Z)=>[await $.regionInfoProvider(Z,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},Z]).then(([Z,L])=>{let{signingRegion:Y,signingService:Q}=Z;$.signingRegion=$.signingRegion||Y||L,$.signingName=$.signingName||Q||$.serviceId;let F={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:w,uriEscapePath:G};return new($.signerConstructor||Zw.SignatureV4)(F)}),"signer");else X=k(async(Z)=>{Z=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await F1.normalizeProvider($.region)(),properties:{}},Z);let{signingRegion:L,signingName:Y}=Z;$.signingRegion=$.signingRegion||L,$.signingName=$.signingName||Y||$.serviceId;let Q={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:w,uriEscapePath:G};return new($.signerConstructor||Zw.SignatureV4)(Q)},"signer");return{...$,systemClockOffset:W,signingEscapePath:G,credentials:U,signer:X}},"resolveAwsSdkSigV4Config"),K9=Fw});var y$=M((T9)=>{var f9=":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",Rw="[: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]["+f9+"]*",E9=new RegExp("^"+Rw+"$"),M9=function($,U){let G=[],W=U.exec($);while(W){let w=[];w.startIndex=U.lastIndex-W[0].length;let X=W.length;for(let Z=0;Z<X;Z++)w.push(W[Z]);G.push(w),W=U.exec($)}return G},B9=function($){let U=E9.exec($);return!(U===null||typeof U==="undefined")};T9.isExist=function($){return typeof $!=="undefined"};T9.isEmptyObject=function($){return Object.keys($).length===0};T9.merge=function($,U,G){if(U){let W=Object.keys(U),w=W.length;for(let X=0;X<w;X++)if(G==="strict")$[W[X]]=[U[W[X]]];else $[W[X]]=U[W[X]]}};T9.getValue=function($){if(T9.isExist($))return $;else return""};T9.isName=B9;T9.getAllMatches=M9;T9.nameRegexp=Rw});var XU=M((c9)=>{var wU=y$(),N9={allowBooleanAttributes:!1,unpairedTags:[]};c9.validate=function($,U){U=Object.assign({},N9,U);let G=[],W=!1,w=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let X=0;X<$.length;X++)if($[X]==="<"&&$[X+1]==="?"){if(X+=2,X=fw($,X),X.err)return X}else if($[X]==="<"){let Z=X;if(X++,$[X]==="!"){X=Ew($,X);continue}else{let L=!1;if($[X]==="/")L=!0,X++;let Y="";for(;X<$.length&&$[X]!==">"&&$[X]!==" "&&$[X]!=="\t"&&$[X]!=="\n"&&$[X]!=="\r";X++)Y+=$[X];if(Y=Y.trim(),Y[Y.length-1]==="/")Y=Y.substring(0,Y.length-1),X--;if(!x9(Y)){let J;if(Y.trim().length===0)J="Invalid space after '<'.";else J="Tag '"+Y+"' is an invalid name.";return j("InvalidTag",J,b($,X))}let Q=S9($,X);if(Q===!1)return j("InvalidAttr","Attributes for '"+Y+"' have open quote.",b($,X));let F=Q.value;if(X=Q.index,F[F.length-1]==="/"){let J=X-F.length;F=F.substring(0,F.length-1);let R=Mw(F,U);if(R===!0)W=!0;else return j(R.err.code,R.err.msg,b($,J+R.err.line))}else if(L)if(!Q.tagClosed)return j("InvalidTag","Closing tag '"+Y+"' doesn't have proper closing.",b($,X));else if(F.trim().length>0)return j("InvalidTag","Closing tag '"+Y+"' can't have attributes or invalid starting.",b($,Z));else if(G.length===0)return j("InvalidTag","Closing tag '"+Y+"' has not been opened.",b($,Z));else{let J=G.pop();if(Y!==J.tagName){let R=b($,J.tagStartPos);return j("InvalidTag","Expected closing tag '"+J.tagName+"' (opened in line "+R.line+", col "+R.col+") instead of closing tag '"+Y+"'.",b($,Z))}if(G.length==0)w=!0}else{let J=Mw(F,U);if(J!==!0)return j(J.err.code,J.err.msg,b($,X-F.length+J.err.line));if(w===!0)return j("InvalidXml","Multiple possible root nodes found.",b($,X));else if(U.unpairedTags.indexOf(Y)!==-1);else G.push({tagName:Y,tagStartPos:Z});W=!0}for(X++;X<$.length;X++)if($[X]==="<")if($[X+1]==="!"){X++,X=Ew($,X);continue}else if($[X+1]==="?"){if(X=fw($,++X),X.err)return X}else break;else if($[X]==="&"){let J=h9($,X);if(J==-1)return j("InvalidChar","char '&' is not expected.",b($,X));X=J}else if(w===!0&&!Kw($[X]))return j("InvalidXml","Extra text at the end",b($,X));if($[X]==="<")X--}}else{if(Kw($[X]))continue;return j("InvalidChar","char '"+$[X]+"' is not expected.",b($,X))}if(!W)return j("InvalidXml","Start tag expected.",1);else if(G.length==1)return j("InvalidTag","Unclosed tag '"+G[0].tagName+"'.",b($,G[0].tagStartPos));else if(G.length>0)return j("InvalidXml","Invalid '"+JSON.stringify(G.map((X)=>X.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};function Kw($){return $===" "||$==="\t"||$==="\n"||$==="\r"}function fw($,U){let G=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){let W=$.substr(G,U-G);if(U>5&&W==="xml")return j("InvalidXml","XML declaration allowed only at the start of the document.",b($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U}function Ew($,U){if($.length>U+5&&$[U+1]==="-"&&$[U+2]==="-"){for(U+=3;U<$.length;U++)if($[U]==="-"&&$[U+1]==="-"&&$[U+2]===">"){U+=2;break}}else if($.length>U+8&&$[U+1]==="D"&&$[U+2]==="O"&&$[U+3]==="C"&&$[U+4]==="T"&&$[U+5]==="Y"&&$[U+6]==="P"&&$[U+7]==="E"){let G=1;for(U+=8;U<$.length;U++)if($[U]==="<")G++;else if($[U]===">"){if(G--,G===0)break}}else if($.length>U+9&&$[U+1]==="["&&$[U+2]==="C"&&$[U+3]==="D"&&$[U+4]==="A"&&$[U+5]==="T"&&$[U+6]==="A"&&$[U+7]==="["){for(U+=8;U<$.length;U++)if($[U]==="]"&&$[U+1]==="]"&&$[U+2]===">"){U+=2;break}}return U}var j9='"',P9="'";function S9($,U){let G="",W="",w=!1;for(;U<$.length;U++){if($[U]===j9||$[U]===P9)if(W==="")W=$[U];else if(W!==$[U]);else W="";else if($[U]===">"){if(W===""){w=!0;break}}G+=$[U]}if(W!=="")return!1;return{value:G,index:U,tagClosed:w}}var b9=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g");function Mw($,U){let G=wU.getAllMatches($,b9),W={};for(let w=0;w<G.length;w++){if(G[w][1].length===0)return j("InvalidAttr","Attribute '"+G[w][2]+"' has no space in starting.",s1(G[w]));else if(G[w][3]!==void 0&&G[w][4]===void 0)return j("InvalidAttr","Attribute '"+G[w][2]+"' is without value.",s1(G[w]));else if(G[w][3]===void 0&&!U.allowBooleanAttributes)return j("InvalidAttr","boolean attribute '"+G[w][2]+"' is not allowed.",s1(G[w]));let X=G[w][2];if(!D9(X))return j("InvalidAttr","Attribute '"+X+"' is an invalid name.",s1(G[w]));if(!W.hasOwnProperty(X))W[X]=1;else return j("InvalidAttr","Attribute '"+X+"' is repeated.",s1(G[w]))}return!0}function k9($,U){let G=/\d/;if($[U]==="x")U++,G=/[\da-fA-F]/;for(;U<$.length;U++){if($[U]===";")return U;if(!$[U].match(G))break}return-1}function h9($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,k9($,U);let G=0;for(;U<$.length;U++,G++){if($[U].match(/\w/)&&G<20)continue;if($[U]===";")break;return-1}return U}function j($,U,G){return{err:{code:$,msg:U,line:G.line||G,col:G.col}}}function D9($){return wU.isName($)}function x9($){return wU.isName($)}function b($,U){let G=$.substring(0,U).split(/\r?\n/);return{line:G.length,col:G[G.length-1].length+1}}function s1($){return $.startIndex+$[1].length}});var Tw=M((_9)=>{var Bw={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function($,U,G){return $}},y9=function($){return Object.assign({},Bw,$)};_9.buildOptions=y9;_9.defaultOptions=Bw});var Aw=M((B3,Hw)=>{class Vw{constructor($){this.tagname=$,this.child=[],this[":@"]={}}add($,U){if($==="__proto__")$="#__proto__";this.child.push({[$]:U})}addChild($){if($.tagname==="__proto__")$.tagname="#__proto__";if($[":@"]&&Object.keys($[":@"]).length>0)this.child.push({[$.tagname]:$.child,[":@"]:$[":@"]});else this.child.push({[$.tagname]:$.child})}}Hw.exports=Vw});var qw=M((T3,Ow)=>{var d9=y$();function g9($,U){let G={};if($[U+3]==="O"&&$[U+4]==="C"&&$[U+5]==="T"&&$[U+6]==="Y"&&$[U+7]==="P"&&$[U+8]==="E"){U=U+9;let W=1,w=!1,X=!1,Z="";for(;U<$.length;U++)if($[U]==="<"&&!X){if(w&&l9($,U)){if(U+=7,[entityName,val,U]=s9($,U+1),val.indexOf("&")===-1)G[r9(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(w&&n9($,U))U+=8;else if(w&&i9($,U))U+=8;else if(w&&o9($,U))U+=9;else if(m9)X=!0;else throw new Error("Invalid DOCTYPE");W++,Z=""}else if($[U]===">"){if(X){if($[U-1]==="-"&&$[U-2]==="-")X=!1,W--}else W--;if(W===0)break}else if($[U]==="[")w=!0;else Z+=$[U];if(W!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:G,i:U}}function s9($,U){let G="";for(;U<$.length&&($[U]!=="'"&&$[U]!=='"');U++)G+=$[U];if(G=G.trim(),G.indexOf(" ")!==-1)throw new Error("External entites are not supported");let W=$[U++],w="";for(;U<$.length&&$[U]!==W;U++)w+=$[U];return[G,w,U]}function m9($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1}function l9($,U){if($[U+1]==="!"&&$[U+2]==="E"&&$[U+3]==="N"&&$[U+4]==="T"&&$[U+5]==="I"&&$[U+6]==="T"&&$[U+7]==="Y")return!0;return!1}function n9($,U){if($[U+1]==="!"&&$[U+2]==="E"&&$[U+3]==="L"&&$[U+4]==="E"&&$[U+5]==="M"&&$[U+6]==="E"&&$[U+7]==="N"&&$[U+8]==="T")return!0;return!1}function i9($,U){if($[U+1]==="!"&&$[U+2]==="A"&&$[U+3]==="T"&&$[U+4]==="T"&&$[U+5]==="L"&&$[U+6]==="I"&&$[U+7]==="S"&&$[U+8]==="T")return!0;return!1}function o9($,U){if($[U+1]==="!"&&$[U+2]==="N"&&$[U+3]==="O"&&$[U+4]==="T"&&$[U+5]==="A"&&$[U+6]==="T"&&$[U+7]==="I"&&$[U+8]==="O"&&$[U+9]==="N")return!0;return!1}function r9($){if(d9.isName($))return $;else throw new Error(`Invalid entity name ${$}`)}Ow.exports=g9});var Nw=M((V3,Cw)=>{var a9=/^[-+]?0x[a-fA-F0-9]+$/,t9=/^([\-\+])?(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 e9={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function $7($,U={}){if(U=Object.assign({},e9,U),!$||typeof $!=="string")return $;let G=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(G))return $;else if(U.hex&&a9.test(G))return Number.parseInt(G,16);else{let W=t9.exec(G);if(W){let w=W[1],X=W[2],Z=U7(W[3]),L=W[4]||W[6];if(!U.leadingZeros&&X.length>0&&w&&G[2]!==".")return $;else if(!U.leadingZeros&&X.length>0&&!w&&G[1]!==".")return $;else{let Y=Number(G),Q=""+Y;if(Q.search(/[eE]/)!==-1)if(U.eNotation)return Y;else return $;else if(L)if(U.eNotation)return Y;else return $;else if(G.indexOf(".")!==-1)if(Q==="0"&&Z==="")return Y;else if(Q===Z)return Y;else if(w&&Q==="-"+Z)return Y;else return $;if(X)if(Z===Q)return Y;else if(w+Z===Q)return Y;else return $;if(G===Q)return Y;else if(G===w+Q)return Y;return $}}else return $}}function U7($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $}Cw.exports=$7});var bw=M((H3,Sw)=>{var jw=y$(),m1=Aw(),G7=qw(),W7=Nw();class Pw{constructor($){this.options=$,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:"\""}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(U,G)=>String.fromCharCode(Number.parseInt(G,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(U,G)=>String.fromCharCode(Number.parseInt(G,16))}},this.addExternalEntities=w7,this.parseXml=Q7,this.parseTextData=X7,this.resolveNameSpace=Z7,this.buildAttributesMap=Y7,this.isItStopNode=R7,this.replaceEntitiesValue=J7,this.readStopNodeData=K7,this.saveTextToParentTag=z7,this.addChild=F7}}function w7($){let U=Object.keys($);for(let G=0;G<U.length;G++){let W=U[G];this.lastEntities[W]={regex:new RegExp("&"+W+";","g"),val:$[W]}}}function X7($,U,G,W,w,X,Z){if($!==void 0){if(this.options.trimValues&&!W)$=$.trim();if($.length>0){if(!Z)$=this.replaceEntitiesValue($);let L=this.options.tagValueProcessor(U,$,G,w,X);if(L===null||L===void 0)return $;else if(typeof L!==typeof $||L!==$)return L;else if(this.options.trimValues)return LU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return LU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}}function Z7($){if(this.options.removeNSPrefix){let U=$.split(":"),G=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=G+U[1]}return $}var L7=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm");function Y7($,U,G){if(!this.options.ignoreAttributes&&typeof $==="string"){let W=jw.getAllMatches($,L7),w=W.length,X={};for(let Z=0;Z<w;Z++){let L=this.resolveNameSpace(W[Z][1]),Y=W[Z][4],Q=this.options.attributeNamePrefix+L;if(L.length){if(this.options.transformAttributeName)Q=this.options.transformAttributeName(Q);if(Q==="__proto__")Q="#__proto__";if(Y!==void 0){if(this.options.trimValues)Y=Y.trim();Y=this.replaceEntitiesValue(Y);let F=this.options.attributeValueProcessor(L,Y,U);if(F===null||F===void 0)X[Q]=Y;else if(typeof F!==typeof Y||F!==Y)X[Q]=F;else X[Q]=LU(Y,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)X[Q]=!0}}if(!Object.keys(X).length)return;if(this.options.attributesGroupName){let Z={};return Z[this.options.attributesGroupName]=X,Z}return X}}var Q7=function($){$=$.replace(/\r\n?/g,"\n");let U=new m1("!xml"),G=U,W="",w="";for(let X=0;X<$.length;X++)if($[X]==="<")if($[X+1]==="/"){let L=J1($,">",X,"Closing Tag is not closed."),Y=$.substring(X+2,L).trim();if(this.options.removeNSPrefix){let J=Y.indexOf(":");if(J!==-1)Y=Y.substr(J+1)}if(this.options.transformTagName)Y=this.options.transformTagName(Y);if(G)W=this.saveTextToParentTag(W,G,w);let Q=w.substring(w.lastIndexOf(".")+1);if(Y&&this.options.unpairedTags.indexOf(Y)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${Y}>`);let F=0;if(Q&&this.options.unpairedTags.indexOf(Q)!==-1)F=w.lastIndexOf(".",w.lastIndexOf(".")-1),this.tagsNodeStack.pop();else F=w.lastIndexOf(".");w=w.substring(0,F),G=this.tagsNodeStack.pop(),W="",X=L}else if($[X+1]==="?"){let L=ZU($,X,!1,"?>");if(!L)throw new Error("Pi Tag is not closed.");if(W=this.saveTextToParentTag(W,G,w),this.options.ignoreDeclaration&&L.tagName==="?xml"||this.options.ignorePiTags);else{let Y=new m1(L.tagName);if(Y.add(this.options.textNodeName,""),L.tagName!==L.tagExp&&L.attrExpPresent)Y[":@"]=this.buildAttributesMap(L.tagExp,w,L.tagName);this.addChild(G,Y,w)}X=L.closeIndex+1}else if($.substr(X+1,3)==="!--"){let L=J1($,"-->",X+4,"Comment is not closed.");if(this.options.commentPropName){let Y=$.substring(X+4,L-2);W=this.saveTextToParentTag(W,G,w),G.add(this.options.commentPropName,[{[this.options.textNodeName]:Y}])}X=L}else if($.substr(X+1,2)==="!D"){let L=G7($,X);this.docTypeEntities=L.entities,X=L.i}else if($.substr(X+1,2)==="!["){let L=J1($,"]]>",X,"CDATA is not closed.")-2,Y=$.substring(X+9,L);W=this.saveTextToParentTag(W,G,w);let Q=this.parseTextData(Y,G.tagname,w,!0,!1,!0,!0);if(Q==null)Q="";if(this.options.cdataPropName)G.add(this.options.cdataPropName,[{[this.options.textNodeName]:Y}]);else G.add(this.options.textNodeName,Q);X=L+2}else{let L=ZU($,X,this.options.removeNSPrefix),Y=L.tagName,Q=L.rawTagName,F=L.tagExp,J=L.attrExpPresent,R=L.closeIndex;if(this.options.transformTagName)Y=this.options.transformTagName(Y);if(G&&W){if(G.tagname!=="!xml")W=this.saveTextToParentTag(W,G,w,!1)}let z=G;if(z&&this.options.unpairedTags.indexOf(z.tagname)!==-1)G=this.tagsNodeStack.pop(),w=w.substring(0,w.lastIndexOf("."));if(Y!==U.tagname)w+=w?"."+Y:Y;if(this.isItStopNode(this.options.stopNodes,w,Y)){let K="";if(F.length>0&&F.lastIndexOf("/")===F.length-1){if(Y[Y.length-1]==="/")Y=Y.substr(0,Y.length-1),w=w.substr(0,w.length-1),F=Y;else F=F.substr(0,F.length-1);X=L.closeIndex}else if(this.options.unpairedTags.indexOf(Y)!==-1)X=L.closeIndex;else{let f=this.readStopNodeData($,Q,R+1);if(!f)throw new Error(`Unexpected end of ${Q}`);X=f.i,K=f.tagContent}let E=new m1(Y);if(Y!==F&&J)E[":@"]=this.buildAttributesMap(F,w,Y);if(K)K=this.parseTextData(K,Y,w,!0,J,!0,!0);w=w.substr(0,w.lastIndexOf(".")),E.add(this.options.textNodeName,K),this.addChild(G,E,w)}else{if(F.length>0&&F.lastIndexOf("/")===F.length-1){if(Y[Y.length-1]==="/")Y=Y.substr(0,Y.length-1),w=w.substr(0,w.length-1),F=Y;else F=F.substr(0,F.length-1);if(this.options.transformTagName)Y=this.options.transformTagName(Y);let K=new m1(Y);if(Y!==F&&J)K[":@"]=this.buildAttributesMap(F,w,Y);this.addChild(G,K,w),w=w.substr(0,w.lastIndexOf("."))}else{let K=new m1(Y);if(this.tagsNodeStack.push(G),Y!==F&&J)K[":@"]=this.buildAttributesMap(F,w,Y);this.addChild(G,K,w),G=K}W="",X=R}}else W+=$[X];return U.child};function F7($,U,G){let W=this.options.updateTag(U.tagname,G,U[":@"]);if(W===!1);else if(typeof W==="string")U.tagname=W,$.addChild(U);else $.addChild(U)}var J7=function($){if(this.options.processEntities){for(let U in this.docTypeEntities){let G=this.docTypeEntities[U];$=$.replace(G.regx,G.val)}for(let U in this.lastEntities){let G=this.lastEntities[U];$=$.replace(G.regex,G.val)}if(this.options.htmlEntities)for(let U in this.htmlEntities){let G=this.htmlEntities[U];$=$.replace(G.regex,G.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};function z7($,U,G,W){if($){if(W===void 0)W=Object.keys(U.child).length===0;if($=this.parseTextData($,U.tagname,G,!1,U[":@"]?Object.keys(U[":@"]).length!==0:!1,W),$!==void 0&&$!=="")U.add(this.options.textNodeName,$);$=""}return $}function R7($,U,G){let W="*."+G;for(let w in $){let X=$[w];if(W===X||U===X)return!0}return!1}function I7($,U,G=">"){let W,w="";for(let X=U;X<$.length;X++){let Z=$[X];if(W){if(Z===W)W=""}else if(Z==='"'||Z==="'")W=Z;else if(Z===G[0])if(G[1]){if($[X+1]===G[1])return{data:w,index:X}}else return{data:w,index:X};else if(Z==="\t")Z=" ";w+=Z}}function J1($,U,G,W){let w=$.indexOf(U,G);if(w===-1)throw new Error(W);else return w+U.length-1}function ZU($,U,G,W=">"){let w=I7($,U+1,W);if(!w)return;let{data:X,index:Z}=w,L=X.search(/\s/),Y=X,Q=!0;if(L!==-1)Y=X.substring(0,L),X=X.substring(L+1).trimStart();let F=Y;if(G){let J=Y.indexOf(":");if(J!==-1)Y=Y.substr(J+1),Q=Y!==w.data.substr(J+1)}return{tagName:Y,tagExp:X,closeIndex:Z,attrExpPresent:Q,rawTagName:F}}function K7($,U,G){let W=G,w=1;for(;G<$.length;G++)if($[G]==="<")if($[G+1]==="/"){let X=J1($,">",G,`${U} is not closed`);if($.substring(G+2,X).trim()===U){if(w--,w===0)return{tagContent:$.substring(W,G),i:X}}G=X}else if($[G+1]==="?")G=J1($,"?>",G+1,"StopNode is not closed.");else if($.substr(G+1,3)==="!--")G=J1($,"-->",G+3,"StopNode is not closed.");else if($.substr(G+1,2)==="![")G=J1($,"]]>",G,"StopNode is not closed.")-2;else{let X=ZU($,G,">");if(X){if((X&&X.tagName)===U&&X.tagExp[X.tagExp.length-1]!=="/")w++;G=X.closeIndex}}}function LU($,U,G){if(U&&typeof $==="string"){let W=$.trim();if(W==="true")return!0;else if(W==="false")return!1;else return W7($,G)}else if(jw.isExist($))return $;else return""}Sw.exports=Pw});var hw=M((T7)=>{function f7($,U){return kw($,U)}function kw($,U,G){let W,w={};for(let X=0;X<$.length;X++){let Z=$[X],L=E7(Z),Y="";if(G===void 0)Y=L;else Y=G+"."+L;if(L===U.textNodeName)if(W===void 0)W=Z[L];else W+=""+Z[L];else if(L===void 0)continue;else if(Z[L]){let Q=kw(Z[L],U,Y),F=B7(Q,U);if(Z[":@"])M7(Q,Z[":@"],Y,U);else if(Object.keys(Q).length===1&&Q[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)Q=Q[U.textNodeName];else if(Object.keys(Q).length===0)if(U.alwaysCreateTextNode)Q[U.textNodeName]="";else Q="";if(w[L]!==void 0&&w.hasOwnProperty(L)){if(!Array.isArray(w[L]))w[L]=[w[L]];w[L].push(Q)}else if(U.isArray(L,Y,F))w[L]=[Q];else w[L]=Q}}if(typeof W==="string"){if(W.length>0)w[U.textNodeName]=W}else if(W!==void 0)w[U.textNodeName]=W;return w}function E7($){let U=Object.keys($);for(let G=0;G<U.length;G++){let W=U[G];if(W!==":@")return W}}function M7($,U,G,W){if(U){let w=Object.keys(U),X=w.length;for(let Z=0;Z<X;Z++){let L=w[Z];if(W.isArray(L,G+"."+L,!0,!0))$[L]=[U[L]];else $[L]=U[L]}}}function B7($,U){let{textNodeName:G}=U,W=Object.keys($).length;if(W===0)return!0;if(W===1&&($[G]||typeof $[G]==="boolean"||$[G]===0))return!0;return!1}T7.prettify=f7});var cw=M((O3,xw)=>{var{buildOptions:H7}=Tw(),A7=bw(),{prettify:O7}=hw(),q7=XU();class Dw{constructor($){this.externalEntities={},this.options=H7($)}parse($,U){if(typeof $==="string");else if($.toString)$=$.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(U){if(U===!0)U={};let w=q7.validate($,U);if(w!==!0)throw Error(`${w.err.msg}:${w.err.line}:${w.err.col}`)}let G=new A7(this.options);G.addExternalEntities(this.externalEntities);let W=G.parseXml($);if(this.options.preserveOrder||W===void 0)return W;else return O7(W,this.options)}addEntity($,U){if(U.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if($.indexOf("&")!==-1||$.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");else if(U==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[$]=U}}xw.exports=Dw});var pw=M((q3,uw)=>{function C7($,U){let G="";if(U.format&&U.indentBy.length>0)G="\n";return yw($,U,"",G)}function yw($,U,G,W){let w="",X=!1;for(let Z=0;Z<$.length;Z++){let L=$[Z],Y=N7(L);if(Y===void 0)continue;let Q="";if(G.length===0)Q=Y;else Q=`${G}.${Y}`;if(Y===U.textNodeName){let K=L[Y];if(!j7(Q,U))K=U.tagValueProcessor(Y,K),K=_w(K,U);if(X)w+=W;w+=K,X=!1;continue}else if(Y===U.cdataPropName){if(X)w+=W;w+=`<![CDATA[${L[Y][0][U.textNodeName]}]]>`,X=!1;continue}else if(Y===U.commentPropName){w+=W+`<!--${L[Y][0][U.textNodeName]}-->`,X=!0;continue}else if(Y[0]==="?"){let K=vw(L[":@"],U),E=Y==="?xml"?"":W,f=L[Y][0][U.textNodeName];f=f.length!==0?" "+f:"",w+=E+`<${Y}${f}${K}?>`,X=!0;continue}let F=W;if(F!=="")F+=U.indentBy;let J=vw(L[":@"],U),R=W+`<${Y}${J}`,z=yw(L[Y],U,Q,F);if(U.unpairedTags.indexOf(Y)!==-1)if(U.suppressUnpairedNode)w+=R+">";else w+=R+"/>";else if((!z||z.length===0)&&U.suppressEmptyNode)w+=R+"/>";else if(z&&z.endsWith(">"))w+=R+`>${z}${W}</${Y}>`;else{if(w+=R+">",z&&W!==""&&(z.includes("/>")||z.includes("</")))w+=W+U.indentBy+z+W;else w+=z;w+=`</${Y}>`}X=!0}return w}function N7($){let U=Object.keys($);for(let G=0;G<U.length;G++){let W=U[G];if(!$.hasOwnProperty(W))continue;if(W!==":@")return W}}function vw($,U){let G="";if($&&!U.ignoreAttributes)for(let W in $){if(!$.hasOwnProperty(W))continue;let w=U.attributeValueProcessor(W,$[W]);if(w=_w(w,U),w===!0&&U.suppressBooleanAttributes)G+=` ${W.substr(U.attributeNamePrefix.length)}`;else G+=` ${W.substr(U.attributeNamePrefix.length)}="${w}"`}return G}function j7($,U){$=$.substr(0,$.length-U.textNodeName.length-1);let G=$.substr($.lastIndexOf(".")+1);for(let W in U.stopNodes)if(U.stopNodes[W]===$||U.stopNodes[W]==="*."+G)return!0;return!1}function _w($,U){if($&&$.length>0&&U.processEntities)for(let G=0;G<U.entities.length;G++){let W=U.entities[G];$=$.replace(W.regex,W.val)}return $}uw.exports=C7});var gw=M((C3,dw)=>{var P7=pw(),S7={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("\'","g"),val:"'"},{regex:new RegExp("\"","g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function $1($){if(this.options=Object.assign({},S7,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=h7;if(this.processTextOrObjNode=b7,this.options.format)this.indentate=k7,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}$1.prototype.build=function($){if(this.options.preserveOrder)return P7($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};$1.prototype.j2x=function($,U){let G="",W="";for(let w in $){if(!Object.prototype.hasOwnProperty.call($,w))continue;if(typeof $[w]==="undefined"){if(this.isAttribute(w))W+=""}else if($[w]===null)if(this.isAttribute(w))W+="";else if(w[0]==="?")W+=this.indentate(U)+"<"+w+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+w+"/"+this.tagEndChar;else if($[w]instanceof Date)W+=this.buildTextValNode($[w],w,"",U);else if(typeof $[w]!=="object"){let X=this.isAttribute(w);if(X)G+=this.buildAttrPairStr(X,""+$[w]);else if(w===this.options.textNodeName){let Z=this.options.tagValueProcessor(w,""+$[w]);W+=this.replaceEntitiesValue(Z)}else W+=this.buildTextValNode($[w],w,"",U)}else if(Array.isArray($[w])){let X=$[w].length,Z="",L="";for(let Y=0;Y<X;Y++){let Q=$[w][Y];if(typeof Q==="undefined");else if(Q===null)if(w[0]==="?")W+=this.indentate(U)+"<"+w+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+w+"/"+this.tagEndChar;else if(typeof Q==="object")if(this.options.oneListGroup){let F=this.j2x(Q,U+1);if(Z+=F.val,this.options.attributesGroupName&&Q.hasOwnProperty(this.options.attributesGroupName))L+=F.attrStr}else Z+=this.processTextOrObjNode(Q,w,U);else if(this.options.oneListGroup){let F=this.options.tagValueProcessor(w,Q);F=this.replaceEntitiesValue(F),Z+=F}else Z+=this.buildTextValNode(Q,w,"",U)}if(this.options.oneListGroup)Z=this.buildObjectNode(Z,w,L,U);W+=Z}else if(this.options.attributesGroupName&&w===this.options.attributesGroupName){let X=Object.keys($[w]),Z=X.length;for(let L=0;L<Z;L++)G+=this.buildAttrPairStr(X[L],""+$[w][X[L]])}else W+=this.processTextOrObjNode($[w],w,U)}return{attrStr:G,val:W}};$1.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};function b7($,U,G){let W=this.j2x($,G+1);if($[this.options.textNodeName]!==void 0&&Object.keys($).length===1)return this.buildTextValNode($[this.options.textNodeName],U,W.attrStr,G);else return this.buildObjectNode(W.val,U,W.attrStr,G)}$1.prototype.buildObjectNode=function($,U,G,W){if($==="")if(U[0]==="?")return this.indentate(W)+"<"+U+G+"?"+this.tagEndChar;else return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else{let w="</"+U+this.tagEndChar,X="";if(U[0]==="?")X="?",w="";if((G||G==="")&&$.indexOf("<")===-1)return this.indentate(W)+"<"+U+G+X+">"+$+w;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&X.length===0)return this.indentate(W)+`<!--${$}-->`+this.newLine;else return this.indentate(W)+"<"+U+G+X+this.tagEndChar+$+this.indentate(W)+w}};$1.prototype.closeTag=function($){let U="";if(this.options.unpairedTags.indexOf($)!==-1){if(!this.options.suppressUnpairedNode)U="/"}else if(this.options.suppressEmptyNode)U="/";else U=`></${$}`;return U};$1.prototype.buildTextValNode=function($,U,G,W){if(this.options.cdataPropName!==!1&&U===this.options.cdataPropName)return this.indentate(W)+`<![CDATA[${$}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName)return this.indentate(W)+`<!--${$}-->`+this.newLine;else if(U[0]==="?")return this.indentate(W)+"<"+U+G+"?"+this.tagEndChar;else{let w=this.options.tagValueProcessor(U,$);if(w=this.replaceEntitiesValue(w),w==="")return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else return this.indentate(W)+"<"+U+G+">"+w+"</"+U+this.tagEndChar}};$1.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let U=0;U<this.options.entities.length;U++){let G=this.options.entities[U];$=$.replace(G.regex,G.val)}return $};function k7($){return this.options.indentBy.repeat($)}function h7($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1}dw.exports=$1});var mw=M((N3,sw)=>{var D7=XU(),x7=cw(),c7=gw();sw.exports={XMLParser:x7,XMLValidator:D7,XMLBuilder:c7}});var aw=M((j3,rw)=>{var{defineProperty:_$,getOwnPropertyDescriptor:v7,getOwnPropertyNames:y7}=Object,_7=Object.prototype.hasOwnProperty,h=($,U)=>_$($,"name",{value:U,configurable:!0}),u7=($,U)=>{for(var G in U)_$($,G,{get:U[G],enumerable:!0})},p7=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of y7(U))if(!_7.call($,w)&&w!==G)_$($,w,{get:()=>U[w],enumerable:!(W=v7(U,w))||W.enumerable})}return $},d7=($)=>p7(_$({},"__esModule",{value:!0}),$),lw={};u7(lw,{_toBool:()=>s7,_toNum:()=>m7,_toStr:()=>g7,awsExpectUnion:()=>n7,loadRestJsonErrorCode:()=>r7,loadRestXmlErrorCode:()=>$Q,parseJsonBody:()=>iw,parseJsonErrorBody:()=>o7,parseXmlBody:()=>ow,parseXmlErrorBody:()=>e7});rw.exports=d7(lw);var g7=h(($)=>{if($==null)return $;if(typeof $==="number"||typeof $==="bigint"){let U=new Error(`Received number ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}if(typeof $==="boolean"){let U=new Error(`Received boolean ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}return $},"_toStr"),s7=h(($)=>{if($==null)return $;if(typeof $==="string"){let U=$.toLowerCase();if($!==""&&U!=="false"&&U!=="true"){let G=new Error(`Received string "${$}" where a boolean was expected.`);G.name="Warning",console.warn(G)}return $!==""&&U!=="false"}return $},"_toBool"),m7=h(($)=>{if($==null)return $;if(typeof $==="string"){let U=Number($);if(U.toString()!==$){let G=new Error(`Received string "${$}" where a number was expected.`);return G.name="Warning",console.warn(G),$}return U}return $},"_toNum"),l7=B1(),n7=h(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return l7.expectUnion($)},"awsExpectUnion"),i7=B1(),nw=h(($,U)=>i7.collectBody($,U).then((G)=>U.utf8Encoder(G)),"collectBodyString"),iw=h(($,U)=>nw($,U).then((G)=>{if(G.length)try{return JSON.parse(G)}catch(W){if((W==null?void 0:W.name)==="SyntaxError")Object.defineProperty(W,"$responseBodyText",{value:G});throw W}return{}}),"parseJsonBody"),o7=h(async($,U)=>{let G=await iw($,U);return G.message=G.message??G.Message,G},"parseJsonErrorBody"),r7=h(($,U)=>{let G=h((X,Z)=>Object.keys(X).find((L)=>L.toLowerCase()===Z.toLowerCase()),"findKey"),W=h((X)=>{let Z=X;if(typeof Z==="number")Z=Z.toString();if(Z.indexOf(",")>=0)Z=Z.split(",")[0];if(Z.indexOf(":")>=0)Z=Z.split(":")[0];if(Z.indexOf("#")>=0)Z=Z.split("#")[1];return Z},"sanitizeErrorCode"),w=G($.headers,"x-amzn-errortype");if(w!==void 0)return W($.headers[w]);if(U.code!==void 0)return W(U.code);if(U.__type!==void 0)return W(U.__type)},"loadRestJsonErrorCode"),a7=B1(),t7=mw(),ow=h(($,U)=>nw($,U).then((G)=>{if(G.length){let W=new t7.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(Y,Q)=>Q.trim()===""&&Q.includes("\n")?"":void 0});W.addEntity("#xD","\r"),W.addEntity("#10","\n");let w;try{w=W.parse(G,!0)}catch(Y){if(Y&&typeof Y==="object")Object.defineProperty(Y,"$responseBodyText",{value:G});throw Y}let X="#text",Z=Object.keys(w)[0],L=w[Z];if(L[X])L[Z]=L[X],delete L[X];return a7.getValueFromTextNode(L)}return{}}),"parseXmlBody"),e7=h(async($,U)=>{let G=await ow($,U);if(G.Error)G.Error.message=G.Error.message??G.Error.Message;return G},"parseXmlErrorBody"),$Q=h(($,U)=>{var G;if(((G=U==null?void 0:U.Error)==null?void 0:G.Code)!==void 0)return U.Error.Code;if((U==null?void 0:U.Code)!==void 0)return U.Code;if($.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var GQ=M((l1)=>{Object.defineProperty(l1,"__esModule",{value:!0});var YU=UQ();YU.__exportStar(c6(),l1);YU.__exportStar(zw(),l1);YU.__exportStar(aw(),l1)});function MQ($){return $}var FX=($)=>(U)=>async(G)=>{if(!c.isInstance(G.request))return U(G);let{request:W}=G,{handlerProtocol:w=""}=$.requestHandler.metadata||{};if(w.indexOf("h2")>=0&&!W.headers[":authority"])delete W.headers.host,W.headers[":authority"]=W.hostname+(W.port?":"+W.port:"");else if(!W.headers.host){let X=W.hostname;if(W.port!=null)X+=`:${W.port}`;W.headers.host=X}return U(G)},JX={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},BQ=($)=>({applyToStack:(U)=>{U.add(FX($),JX)}});var zX=()=>($,U)=>async(G)=>{try{let W=await $(G),{clientName:w,commandName:X,logger:Z,dynamoDbDocumentClientOptions:L={}}=U,{overrideInputFilterSensitiveLog:Y,overrideOutputFilterSensitiveLog:Q}=L,F=Y??U.inputFilterSensitiveLog,J=Q??U.outputFilterSensitiveLog,{$metadata:R,...z}=W.output;return Z?.info?.({clientName:w,commandName:X,input:F(G.input),output:J(z),metadata:R}),W}catch(W){let{clientName:w,commandName:X,logger:Z,dynamoDbDocumentClientOptions:L={}}=U,{overrideInputFilterSensitiveLog:Y}=L,Q=Y??U.inputFilterSensitiveLog;throw Z?.error?.({clientName:w,commandName:X,input:Q(G.input),error:W,metadata:W.$metadata}),W}},RX={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},VQ=($)=>({applyToStack:(U)=>{U.add(zX(),RX)}});var RU="X-Amzn-Trace-Id",IX="AWS_LAMBDA_FUNCTION_NAME",KX="_X_AMZN_TRACE_ID",fX=($)=>(U)=>async(G)=>{let{request:W}=G;if(!c.isInstance(W)||$.runtime!=="node"||W.headers.hasOwnProperty(RU))return U(G);let w=process.env[IX],X=process.env[KX],Z=(L)=>typeof L==="string"&&L.length>0;if(Z(w)&&Z(X))W.headers[RU]=X;return U({...G,request:W})},EX={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},CQ=($)=>({applyToStack:(U)=>{U.add(fX($),EX)}});function WF($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}class SY{constructor({size:$,params:U}){if(this.data=new Map,this.parameters=[],this.capacity=$??50,U)this.parameters=U}get($,U){let G=this.hash($);if(G===!1)return U();if(!this.data.has(G)){if(this.data.size>this.capacity+10){let W=this.data.keys(),w=0;while(!0){let{value:X,done:Z}=W.next();if(this.data.delete(X),Z||++w>10)break}}this.data.set(G,U())}return this.data.get(G)}size(){return this.data.size}hash($){let U="",{parameters:G}=this;if(G.length===0)return!1;for(let W of G){let w=String($[W]??"");if(w.includes("|;"))return!1;U+=w+"|;"}return U}}var bY=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}$"),_1=($)=>bY.test($)||$.startsWith("[")&&$.endsWith("]");var kY=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),u1=($,U=!1)=>{if(!U)return kY.test($);let G=$.split(".");for(let W of G)if(!u1(W))return!1;return!0};var p1={};var l="endpoints";function _($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${_($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(_).join(", ")})`;return JSON.stringify($,null,2)}class O extends Error{constructor($){super($);this.name="EndpointError"}}var pW=($,U)=>$===U;var dW=($)=>{let U=$.split("."),G=[];for(let W of U){let w=W.indexOf("[");if(w!==-1){if(W.indexOf("]")!==W.length-1)throw new O(`Path: '${$}' does not end with ']'`);let X=W.slice(w+1,-1);if(Number.isNaN(parseInt(X)))throw new O(`Invalid array index: '${X}' in path: '${$}'`);if(w!==0)G.push(W.slice(0,w));G.push(X)}else G.push(W)}return G};var R$=($,U)=>dW(U).reduce((G,W)=>{if(typeof G!=="object")throw new O(`Index '${W}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(G))return G[parseInt(W)];return G[W]},$);var gW=($)=>$!=null;var sW=($)=>!$;var I$=n(C1(),1);var P0={[I$.EndpointURLScheme.HTTP]:80,[I$.EndpointURLScheme.HTTPS]:443},mW=($)=>{let U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){let{hostname:R,port:z,protocol:K="",path:E="",query:f={}}=$,B=new URL(`${K}//${R}${z?`:${z}`:""}${E}`);return B.search=Object.entries(f).map(([H,T])=>`${H}=${T}`).join("&"),B}return new URL($)}catch(R){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;let G=U.href,{host:W,hostname:w,pathname:X,protocol:Z,search:L}=U;if(L)return null;let Y=Z.slice(0,-1);if(!Object.values(I$.EndpointURLScheme).includes(Y))return null;let Q=_1(w),F=G.includes(`${W}:${P0[Y]}`)||typeof $==="string"&&$.includes(`${W}:${P0[Y]}`),J=`${W}${F?`:${P0[Y]}`:""}`;return{scheme:Y,authority:J,path:X,normalizedPath:X.endsWith("/")?X:`${X}/`,isIp:Q}};var lW=($,U)=>$===U;var nW=($,U,G,W)=>{if(U>=G||$.length<G)return null;if(!W)return $.substring(U,G);return $.substring($.length-G,$.length-U)};var iW=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var oW={booleanEquals:pW,getAttr:R$,isSet:gW,isValidHostLabel:u1,not:sW,parseURL:mW,stringEquals:lW,substring:nW,uriEncode:iW};var K$=($,U)=>{let G=[],W={...U.endpointParams,...U.referenceRecord},w=0;while(w<$.length){let X=$.indexOf("{",w);if(X===-1){G.push($.slice(w));break}G.push($.slice(w,X));let Z=$.indexOf("}",X);if(Z===-1){G.push($.slice(X));break}if($[X+1]==="{"&&$[Z+1]==="}")G.push($.slice(X+1,Z)),w=Z+2;let L=$.substring(X+1,Z);if(L.includes("#")){let[Y,Q]=L.split("#");G.push(R$(W[Y],Q))}else G.push(W[L]);w=Z+1}return G.join("")};var rW=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var a=($,U,G)=>{if(typeof $==="string")return K$($,G);else if($.fn)return f$($,G);else if($.ref)return rW($,G);throw new O(`'${U}': ${String($)} is not a string, function or reference.`)};var f$=({fn:$,argv:U},G)=>{let W=U.map((X)=>["boolean","number"].includes(typeof X)?X:a(X,"arg",G)),w=$.split(".");if(w[0]in p1&&w[1]!=null)return p1[w[0]][w[1]](...W);return oW[$](...W)};var aW=({assign:$,...U},G)=>{if($&&$ in G.referenceRecord)throw new O(`'${$}' is already defined in Reference Record.`);let W=f$(U,G);return G.logger?.debug?.(`${l} evaluateCondition: ${_(U)} = ${_(W)}`),{result:W===""?!0:!!W,...$!=null&&{toAssign:{name:$,value:W}}}};var V1=($=[],U)=>{let G={};for(let W of $){let{result:w,toAssign:X}=aW(W,{...U,referenceRecord:{...U.referenceRecord,...G}});if(!w)return{result:w};if(X)G[X.name]=X.value,U.logger?.debug?.(`${l} assign: ${X.name} := ${_(X.value)}`)}return{result:!0,referenceRecord:G}};var tW=($,U)=>Object.entries($).reduce((G,[W,w])=>({...G,[W]:w.map((X)=>{let Z=a(X,"Header value entry",U);if(typeof Z!=="string")throw new O(`Header '${W}' value '${Z}' is not a string`);return Z})}),{});var S0=($,U)=>{if(Array.isArray($))return $.map((G)=>S0(G,U));switch(typeof $){case"string":return K$($,U);case"object":if($===null)throw new O(`Unexpected endpoint property: ${$}`);return E$($,U);case"boolean":return $;default:throw new O(`Unexpected endpoint property type: ${typeof $}`)}};var E$=($,U)=>Object.entries($).reduce((G,[W,w])=>({...G,[W]:S0(w,U)}),{});var eW=($,U)=>{let G=a($,"Endpoint URL",U);if(typeof G==="string")try{return new URL(G)}catch(W){throw console.error(`Failed to construct URL with ${G}`,W),W}throw new O(`Endpoint URL must be a string, got ${typeof G}`)};var $6=($,U)=>{let{conditions:G,endpoint:W}=$,{result:w,referenceRecord:X}=V1(G,U);if(!w)return;let Z={...U,referenceRecord:{...U.referenceRecord,...X}},{url:L,properties:Y,headers:Q}=W;return U.logger?.debug?.(`${l} Resolving endpoint from template: ${_(W)}`),{...Q!=null&&{headers:tW(Q,Z)},...Y!=null&&{properties:E$(Y,Z)},url:eW(L,Z)}};var U6=($,U)=>{let{conditions:G,error:W}=$,{result:w,referenceRecord:X}=V1(G,U);if(!w)return;throw new O(a(W,"Error",{...U,referenceRecord:{...U.referenceRecord,...X}}))};var G6=($,U)=>{let{conditions:G,rules:W}=$,{result:w,referenceRecord:X}=V1(G,U);if(!w)return;return M$(W,{...U,referenceRecord:{...U.referenceRecord,...X}})};var M$=($,U)=>{for(let G of $)if(G.type==="endpoint"){let W=$6(G,U);if(W)return W}else if(G.type==="error")U6(G,U);else if(G.type==="tree"){let W=G6(G,U);if(W)return W}else throw new O(`Unknown endpoint rule: ${G}`);throw new O("Rules evaluation failed")};var hY=($,U)=>{let{endpointParams:G,logger:W}=U,{parameters:w,rules:X}=$;U.logger?.debug?.(`${l} Initial EndpointParams: ${_(G)}`);let Z=Object.entries(w).filter(([,Q])=>Q.default!=null).map(([Q,F])=>[Q,F.default]);if(Z.length>0)for(let[Q,F]of Z)G[Q]=G[Q]??F;let L=Object.entries(w).filter(([,Q])=>Q.required).map(([Q])=>Q);for(let Q of L)if(G[Q]==null)throw new O(`Missing required parameter: '${Q}'`);let Y=M$(X,{endpointParams:G,logger:W,referenceRecord:{}});return U.logger?.debug?.(`${l} Resolved endpoint: ${_(Y)}`),Y};var b0=($,U=!1)=>{if(U){for(let G of $.split("."))if(!b0(G))return!1;return!0}if(!u1($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(_1($))return!1;return!0};var W6=($)=>{let U=$.split(":");if(U.length<6)return null;let[G,W,w,X,Z,...L]=U;if(G!=="arn"||W===""||w===""||L.join(":")==="")return null;let Y=L.map((Q)=>Q.split("/")).flat();return{partition:W,service:w,region:X,accountId:Z,resourceId:Y}};var w6={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};var xY=w6,cY="",X6=($)=>{let{partitions:U}=xY;for(let W of U){let{regions:w,outputs:X}=W;for(let[Z,L]of Object.entries(w))if(Z===$)return{...X,...L}}for(let W of U){let{regionRegex:w,outputs:X}=W;if(new RegExp(w).test($))return{...X}}let G=U.find((W)=>W.id==="aws");if(!G)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...G.outputs}};var Z6=()=>cY;var vY={isVirtualHostableS3Bucket:b0,parseArn:W6,partition:X6};p1.aws=vY;var k0="user-agent",B$="x-amz-user-agent",h0=" ",T$="/",L6=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Y6=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,D0="-";var yY=($)=>(U,G)=>async(W)=>{let{request:w}=W;if(!c.isInstance(w))return U(W);let{headers:X}=w,Z=G?.userAgent?.map(x0)||[],L=(await $.defaultUserAgentProvider()).map(x0),Y=$?.customUserAgent?.map(x0)||[],Q=Z6(),F=(Q?[Q]:[]).concat([...L,...Z,...Y]).join(h0),J=[...L.filter((R)=>R.startsWith("aws-sdk-")),...Y].join(h0);if($.runtime!=="browser"){if(J)X[B$]=X[B$]?`${X[k0]} ${J}`:J;X[k0]=F}else X[B$]=F;return U({...W,request:w})},x0=($)=>{let U=$[0].split(T$).map((Z)=>Z.replace(L6,D0)).join(T$),G=$[1]?.replace(Y6,D0),W=U.indexOf(T$),w=U.substring(0,W),X=U.substring(W+1);if(w==="api")X=X.toLowerCase();return[w,X,G].filter((Z)=>Z&&Z.length>0).reduce((Z,L,Y)=>{switch(Y){case 0:return L;case 1:return`${Z}/${L}`;default:return`${Z}#${L}`}},"")},_Y={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},yz=($)=>({applyToStack:(U)=>{U.add(yY($),_Y)}});var V$=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var c0=($)=>V$($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var iz=($)=>{let{region:U,useFipsEndpoint:G}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return c0(U);let W=await U();return c0(W)},useFipsEndpoint:async()=>{let W=typeof U==="string"?U:await U();if(V$(W))return!0;return typeof G!=="function"?Promise.resolve(!!G):G()}}};var H1=($,U,G)=>{if(!(U in $))return;if($[U]==="true")return!0;if($[U]==="false")return!1;throw new Error(`Cannot load ${G} "${U}". Expected "true" or "false", got ${$[U]}.`)};var t;(function($){$.ENV="env",$.CONFIG="shared config entry"})(t||(t={}));var uY="AWS_USE_DUALSTACK_ENDPOINT",pY="use_dualstack_endpoint";var wR={environmentVariableSelector:($)=>H1($,uY,t.ENV),configFileSelector:($)=>H1($,pY,t.CONFIG),default:!1};var dY="AWS_USE_FIPS_ENDPOINT",gY="use_fips_endpoint";var LR={environmentVariableSelector:($)=>H1($,dY,t.ENV),configFileSelector:($)=>H1($,gY,t.CONFIG),default:!1};var sY=n(s(),1);var mY=n(s(),1);var Q6={environmentVariableSelector:($)=>$.AWS_REGION,configFileSelector:($)=>$.region,default:()=>{throw new Error("Region is missing")}},BR={preferredFile:"credentials"};var F6="content-length";function lY($){return(U)=>async(G)=>{let W=G.request;if(c.isInstance(W)){let{body:w,headers:X}=W;if(w&&Object.keys(X).map((Z)=>Z.toLowerCase()).indexOf(F6)===-1)try{let Z=$(w);W.headers={...W.headers,[F6]:String(Z)}}catch(Z){}}return U({...G,request:W})}}var nY={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},lR=($)=>({applyToStack:(U)=>{U.add(lY($.bodyLengthChecker),nY)}});var J6=($,U)=>(G)=>async(W)=>{let{response:w}=await G(W);try{let X=await U(w,$);return{response:w,output:X}}catch(X){if(Object.defineProperty(X,"$response",{value:w}),!("$metadata"in X)){if(X.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof X.$responseBodyText!=="undefined"){if(X.$response)X.$response.body=X.$responseBodyText}}throw X}};var z6=($,U)=>(G,W)=>async(w)=>{let X=W.endpointV2?.url&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!X)throw new Error("No valid endpoint provider available.");let Z=await U(w.input,{...$,endpoint:X});return G({...w,request:Z})};var iY={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},v0={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function tR($,U,G){return{applyToStack:(W)=>{W.add(J6($,G),iY),W.add(z6($,U),v0)}}}var B6=n(s(),1);var R6=async($)=>{let U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(eY(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!tY(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},oY=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,rY=/(\d+\.){3}\d+/,aY=/\.\./;var tY=($)=>oY.test($)&&!rY.test($)&&!aY.test($),eY=($)=>{let[U,G,W,,,w]=$.split(":"),X=U==="arn"&&$.split(":").length>=6,Z=Boolean(X&&G&&W&&w);if(X&&!Z)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return Z};var I6=($,U,G)=>{let W=async()=>{let w=G[$]??G[U];if(typeof w==="function")return w();return w};if($==="credentialScope"||U==="CredentialScope")return async()=>{let w=typeof G.credentials==="function"?await G.credentials():G.credentials;return w?.credentialScope??w?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{let w=typeof G.credentials==="function"?await G.credentials():G.credentials;return w?.accountId??w?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{let w=await W();if(w&&typeof w==="object"){if("url"in w)return w.url.href;if("hostname"in w){let{protocol:X,hostname:Z,port:L,path:Y}=w;return`${X}//${Z}${L?":"+L:""}${Y}`}}return w};return W};var K6="AWS_ENDPOINT_URL",f6="endpoint_url",E6=($)=>({environmentVariableSelector:(U)=>{let G=$.split(" ").map((X)=>X.toUpperCase()),W=U[[K6,...G].join("_")];if(W)return W;let w=U[K6];if(w)return w;return},configFileSelector:(U,G)=>{if(G&&U.services){let w=G[["services",U.services].join(y0)];if(w){let X=$.split(" ").map((L)=>L.toLowerCase()),Z=w[[X.join("_"),f6].join(y0)];if(Z)return Z}}let W=U[f6];if(W)return W;return},default:void 0});var H$=async($)=>L1(E6($??""))();var _0=n(eU(),1),A$=($)=>{if(typeof $==="object"){if("url"in $)return _0.parseUrl($.url);return $}return _0.parseUrl($)};var M6=async($,U,G,W)=>{if(!G.endpoint){let Z;if(G.serviceConfiguredEndpoint)Z=await G.serviceConfiguredEndpoint();else Z=await H$(G.serviceId);if(Z)G.endpoint=()=>Promise.resolve(A$(Z))}let w=await $5($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(w,W)},$5=async($,U,G)=>{let W={},w=U?.getEndpointParameterInstructions?.()||{};for(let[X,Z]of Object.entries(w))switch(Z.type){case"staticContextParams":W[X]=Z.value;break;case"contextParams":W[X]=$[Z.name];break;case"clientContextParams":case"builtInParams":W[X]=await I6(Z.name,X,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(Z))}if(Object.keys(w).length===0)Object.assign(W,G);if(String(G.serviceId).toLowerCase()==="s3")await R6(W);return W};var T6=({config:$,instructions:U})=>{return(G,W)=>async(w)=>{let X=await M6(w.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=X,W.authSchemes=X.properties?.authSchemes;let Z=W.authSchemes?.[0];if(Z){W.signing_region=Z.signingRegion,W.signing_service=Z.signingName;let Y=B6.getSmithyContext(W)?.selectedHttpAuthScheme?.httpAuthOption;if(Y)Y.signingProperties=Object.assign(Y.signingProperties||{},{signing_region:Z.signingRegion,signingRegion:Z.signingRegion,signing_service:Z.signingName,signingName:Z.signingName,signingRegionSet:Z.signingRegionSet},Z.properties)}return G({...w})}};var U5={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:v0.name},AI=($,U)=>({applyToStack:(G)=>{G.addRelativeTo(T6({config:$,instructions:U}),U5)}});var O$=n(s(),1);var NI=($)=>{let U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>A$(await O$.normalizeProvider(G)()):void 0,X={...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:O$.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:O$.normalizeProvider($.useFipsEndpoint??!1)},Z=void 0;return X.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!Z)Z=H$($.serviceId);return Z},X};var l0=n(s(),1);var u;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(u||(u={}));var Y1=3,V6=u.STANDARD;var H6=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],A6=["TimeoutError","RequestTimeout","RequestTimeoutException"],O6=[500,502,503,504],q6=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var G5=($)=>$.$metadata?.clockSkewCorrected,A1=($)=>$.$metadata?.httpStatusCode===429||H6.includes($.name)||$.$retryable?.throttling==!0,q$=($)=>G5($)||A6.includes($.name)||q6.includes($?.code||"")||O6.includes($.$metadata?.httpStatusCode||0),C6=($)=>{if($.$metadata?.httpStatusCode!==void 0){let U=$.$metadata.httpStatusCode;if(500<=U&&U<=599&&!q$($))return!0;return!1}return!1};class C${constructor($){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=$?.beta??0.7,this.minCapacity=$?.minCapacity??1,this.minFillRate=$?.minFillRate??0.5,this.scaleConstant=$?.scaleConstant??0.4,this.smooth=$?.smooth??0.8;let 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){let U=($-this.currentCapacity)/this.fillRate*1000;await new Promise((G)=>setTimeout(G,U))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){let $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}let U=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=$}updateClientSendingRate($){let U;if(this.updateMeasuredRate(),A1($)){let 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());let 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(){let $=this.getCurrentTimeInSeconds(),U=Math.floor($*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){let G=this.requestCount/(U-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=U}}getPrecise($){return parseFloat($.toFixed(8))}}var Q1=100,d1=20000,u0=500,N$=500,p0=5,d0=10,g0=1,j$="amz-sdk-invocation-id",P$="amz-sdk-request";var N6=()=>{let $=Q1;return{computeNextBackoffDelay:(W)=>{return Math.floor(Math.min(d1,Math.random()*2**W*$))},setDelayBase:(W)=>{$=W}}};var s0=({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(d1,$),getRetryCost:()=>G}};class O1{constructor($){this.maxAttempts=$,this.mode=u.STANDARD,this.capacity=N$,this.retryBackoffStrategy=N6(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return s0({retryDelay:Q1,retryCount:0})}async refreshRetryTokenForRetry($,U){let G=await this.getMaxAttempts();if(this.shouldRetry($,U,G)){let W=U.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?u0:Q1);let w=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),X=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,w):w,Z=this.getCapacityCost(W);return this.capacity-=Z,s0({retryDelay:X,retryCount:$.getRetryCount()+1,retryCost:Z})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(N$,this.capacity+($.getRetryCost()??g0))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${Y1}`),Y1}}shouldRetry($,U,G){return $.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?d0:p0}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class m0{constructor($,U){this.maxAttemptsProvider=$,this.mode=u.ADAPTIVE;let{rateLimiter:G}=U??{};this.rateLimiter=G??new C$,this.standardRetryStrategy=new O1($)}async acquireInitialRetryToken($){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken($)}async refreshRetryTokenForRetry($,U){return this.rateLimiter.updateClientSendingRate(U),this.standardRetryStrategy.refreshRetryTokenForRetry($,U)}recordSuccess($){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess($)}}var j6="AWS_MAX_ATTEMPTS",P6="max_attempts",EK={environmentVariableSelector:($)=>{let U=$[j6];if(!U)return;let G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${j6} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{let U=$[P6];if(!U)return;let G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${P6} mast be a number, got "${U}"`);return G},default:Y1},MK=($)=>{let{retryStrategy:U}=$,G=l0.normalizeProvider($.maxAttempts??Y1);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await l0.normalizeProvider($.retryMode)()===u.ADAPTIVE)return new m0(G);return new O1(G)}}},W5="AWS_RETRY_MODE",w5="retry_mode",BK={environmentVariableSelector:($)=>$[W5],configFileSelector:($)=>$[w5],default:V6};import{Readable as X5}from"stream";var S6=($)=>$?.body instanceof X5||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var n0=($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)};var Z5=($)=>(U,G)=>async(W)=>{let w=await $.retryStrategy(),X=await $.maxAttempts();if(L5(w)){w=w;let Z=await w.acquireInitialRetryToken(G.partition_id),L=new Error,Y=0,Q=0,{request:F}=W,J=c.isInstance(F);if(J)F.headers[j$]=b6();while(!0)try{if(J)F.headers[P$]=`attempt=${Y+1}; max=${X}`;let{response:R,output:z}=await U(W);return w.recordSuccess(Z),z.$metadata.attempts=Y+1,z.$metadata.totalRetryDelay=Q,{response:R,output:z}}catch(R){let z=Y5(R);if(L=n0(R),J&&S6(F))throw(G.logger instanceof k6?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),L;try{Z=await w.refreshRetryTokenForRetry(Z,z)}catch(E){if(!L.$metadata)L.$metadata={};throw L.$metadata.attempts=Y+1,L.$metadata.totalRetryDelay=Q,L}Y=Z.getRetryCount();let K=Z.getRetryDelay();Q+=K,await new Promise((E)=>setTimeout(E,K))}}else{if(w=w,w?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",w.mode]];return w.retry(U,W)}},L5=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",Y5=($)=>{let U={error:$,errorType:Q5($)},G=J5($.$response);if(G)U.retryAfterHint=G;return U},Q5=($)=>{if(A1($))return"THROTTLING";if(q$($))return"TRANSIENT";if(C6($))return"SERVER_ERROR";return"CLIENT_ERROR"},F5={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},bK=($)=>({applyToStack:(U)=>{U.add(Z5($),F5)}}),J5=($)=>{if(!i0.isInstance($))return;let U=Object.keys($.headers).find((X)=>X.toLowerCase()==="retry-after");if(!U)return;let G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)};import{platform as WQ,release as wQ}from"os";import{env as ew,versions as XQ}from"process";var QU={isCrtAvailable:!1};var tw=()=>{if(QU.isCrtAvailable)return["md/crt-avail"];return null};var ZQ="AWS_SDK_UA_APP_ID",LQ="sdk-ua-app-id",v3=({serviceId:$,clientVersion:U})=>{let G=[["aws-sdk-js",U],["ua","2.0"],[`os/${WQ()}`,wQ()],["lang/js"],["md/nodejs",`${XQ.node}`]],W=tw();if(W)G.push(W);if($)G.push([`api/${$}`,U]);if(ew.AWS_EXECUTION_ENV)G.push([`exec-env/${ew.AWS_EXECUTION_ENV}`]);let w=L1({environmentVariableSelector:(Z)=>Z[ZQ],configFileSelector:(Z)=>Z[LQ],default:void 0})(),X=void 0;return async()=>{if(!X){let Z=await w;X=Z?[...G,[`app/${Z}`]]:[...G]}return X}};import{Buffer as YQ}from"buffer";import{createHash as QQ,createHmac as FQ}from"crypto";class JQ{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(GX($X($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?FQ(this.algorithmIdentifier,$X(this.secret)):QQ(this.algorithmIdentifier)}}function $X($,U){if(YQ.isBuffer($))return $;if(typeof $==="string")return UX($,U);if(ArrayBuffer.isView($))return FU($.buffer,$.byteOffset,$.byteLength);return FU($)}import{fstatSync as zQ,lstatSync as RQ}from"fs";var l3=($)=>{if(!$)return 0;if(typeof $==="string")return Buffer.byteLength($);else if(typeof $.byteLength==="number")return $.byteLength;else if(typeof $.size==="number")return $.size;else if(typeof $.start==="number"&&typeof $.end==="number")return $.end+1-$.start;else if(typeof $.path==="string"||Buffer.isBuffer($.path))return RQ($.path).size;else if(typeof $.fd==="number")return zQ($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var YX=n(i$(),1);var WX="AWS_EXECUTION_ENV",JU="AWS_REGION",zU="AWS_DEFAULT_REGION",wX="AWS_EC2_METADATA_DISABLED",XX=["in-region","cross-region","mobile","standard","legacy"],ZX="/latest/meta-data/placement/region";var LX={environmentVariableSelector:($)=>{return $.AWS_DEFAULTS_MODE},configFileSelector:($)=>{return $.defaults_mode},default:"legacy"};var Gf=({region:$=L1(Q6),defaultsMode:U=L1(LX)}={})=>YX.memoize(async()=>{let G=typeof U==="function"?await U():U;switch(G?.toLowerCase()){case"auto":return IQ($);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(G?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${XX.join(", ")}, got ${G}`)}}),IQ=async($)=>{if($){let U=typeof $==="function"?await $():$,G=await KQ();if(!G)return"standard";if(U===G)return"in-region";else return"cross-region"}return"standard"},KQ=async()=>{if(process.env[WX]&&(process.env[JU]||process.env[zU]))return process.env[JU]??process.env[zU];if(!process.env[wX])try{let{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-p6spvhhx.js"),G=await $();return(await U({...G,path:ZX})).toString()}catch($){}};var Zf=($)=>{let U=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");let G=$.region;if(typeof G==="string")return G;return G()};return{setRegion(G){U=G},region(){return U}}},Lf=($)=>{return{region:$.region()}};export{s as r,MQ as s,BQ as t,VQ as u,CQ as v,Gw as w,H1 as x,t as y,j0 as z,WF as A,SY as B,p1 as C,hY as D,vY as E,yz as F,wR as G,LR as H,Q6 as I,BR as J,iz as K,lR as L,$5 as M,tR as N,AI as O,NI as P,V6 as Q,EK as R,MK as S,BK as T,bK as U,GQ as V,v3 as W,JQ as X,l3 as Y,Gf as Z,Zf as _,Lf as $};
|
|
19
|
-
|
|
20
|
-
//# debugId=A43CEE2CCBBB501664756E2164756E21
|