gemi 0.4.59 → 0.4.60

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.
Files changed (82) hide show
  1. package/dist/chunk-0557700bf68e85d4.js +18 -0
  2. package/dist/chunk-061d95b15c00e38b.js +9 -0
  3. package/dist/chunk-06b83143607ebdc8.js +6 -0
  4. package/dist/chunk-088b47e135832170.js +1 -0
  5. package/dist/chunk-1062b3156a49fabc.js +2 -0
  6. package/dist/chunk-11d1336f6de61f45.js +16 -0
  7. package/dist/chunk-13e45ce3460f6375.js +2 -0
  8. package/dist/chunk-1838696dc4e7a115.js +2 -0
  9. package/dist/chunk-197fca66ec324ed9.js +1 -1
  10. package/dist/chunk-1b0afbf1baeeaa37.js +2 -0
  11. package/dist/chunk-1b71d04a15bfa432.js +2 -0
  12. package/dist/chunk-1b8acf308a3dc9ec.js +1 -0
  13. package/dist/chunk-22ec1973752a5488.js +2 -0
  14. package/dist/chunk-24e01cba9fc81ed1.js +2 -0
  15. package/dist/chunk-27484e5ca3244aea.js +6 -0
  16. package/dist/chunk-29a0dbe3c8eb87d4.js +6 -0
  17. package/dist/chunk-29c46abebbc0f09b.js +1 -1
  18. package/dist/chunk-2b3eabd01b2ae3f8.js +1 -1
  19. package/dist/chunk-30622b4547786346.js +2 -0
  20. package/dist/chunk-345f66382cf35683.js +2 -0
  21. package/dist/chunk-378a050132886d17.js +2 -0
  22. package/dist/chunk-3b235fc8816ff5e6.js +2 -0
  23. package/dist/chunk-4272071146eb5eb2.js +1 -0
  24. package/dist/chunk-4548da0edd8c39ed.js +2 -0
  25. package/dist/chunk-45badde289996d82.js +9 -0
  26. package/dist/chunk-489125d86cd75e69.js +9 -0
  27. package/dist/chunk-4cb5f3feff1a81c5.js +2 -0
  28. package/dist/chunk-4d46e390f99b97e0.js +2 -0
  29. package/dist/chunk-521750cca5e03c65.js +2 -0
  30. package/dist/chunk-581e0d46235dbf7c.js +2 -0
  31. package/dist/chunk-5852c4da08af607f.js +2 -0
  32. package/dist/chunk-59fe590e19085858.js +18 -0
  33. package/dist/chunk-5a2d89fce13094a9.js +2 -0
  34. package/dist/chunk-5fbde192153a2a50.js +2 -0
  35. package/dist/chunk-6ac91c66919b5ddd.js +2 -0
  36. package/dist/chunk-72add10919c9d7ae.js +2 -0
  37. package/dist/chunk-731f30522682483a.js +2 -0
  38. package/dist/chunk-7aa7f7e219919c4d.js +2 -0
  39. package/dist/chunk-817aad76d1e8eecc.js +6 -0
  40. package/dist/chunk-81a00ae1b3ea4824.js +2 -0
  41. package/dist/chunk-8450a38607a86896.js +2 -0
  42. package/dist/chunk-88103b9d011960db.js +5 -0
  43. package/dist/chunk-8d8666b73758171e.js +2 -0
  44. package/dist/chunk-93b6f53456c1251b.js +2 -0
  45. package/dist/chunk-ab7b6ceb26aca9b1.js +3 -0
  46. package/dist/chunk-b7b365f7e6038104.js +1 -1
  47. package/dist/chunk-be095501304df604.js +1 -1
  48. package/dist/chunk-c2d1f66cf8468e71.js +1 -0
  49. package/dist/chunk-c45e1427f48008f0.js +2 -0
  50. package/dist/chunk-cca1f3ae7ec0dee1.js +2 -0
  51. package/dist/chunk-ceb94e70091088e5.js +2 -0
  52. package/dist/chunk-df55f07f8adf212f.js +2 -0
  53. package/dist/chunk-e19064e9f1d5faed.js +2 -0
  54. package/dist/chunk-e1e84c38542d78ec.js +2 -0
  55. package/dist/chunk-e3acd3561fe1342c.js +18 -0
  56. package/dist/chunk-f1e28c4c1a227c27.js +2 -0
  57. package/dist/chunk-f5910f2c8a3f6974.js +2 -0
  58. package/dist/chunk-fa6bdfb32d2f97fb.js +2 -0
  59. package/dist/client/Link.d.ts +9 -7
  60. package/dist/client/Link.d.ts.map +1 -1
  61. package/dist/client/Mutation.d.ts +25 -6
  62. package/dist/client/Mutation.d.ts.map +1 -1
  63. package/dist/client/QueryManager.d.ts.map +1 -1
  64. package/dist/client/QueryManagerContext.d.ts +2 -2
  65. package/dist/client/QueryManagerContext.d.ts.map +1 -1
  66. package/dist/client/QueryResource.d.ts +18 -0
  67. package/dist/client/QueryResource.d.ts.map +1 -0
  68. package/dist/client/index.js +196 -155
  69. package/dist/client/init.d.ts.map +1 -1
  70. package/dist/client/types.d.ts +6 -1
  71. package/dist/client/types.d.ts.map +1 -1
  72. package/dist/client/useNavigate.d.ts +2 -2
  73. package/dist/client/useNavigate.d.ts.map +1 -1
  74. package/dist/client/useQuery.d.ts +12 -8
  75. package/dist/client/useQuery.d.ts.map +1 -1
  76. package/dist/client/useSearchParams.d.ts +2 -2
  77. package/dist/client/useSearchParams.d.ts.map +1 -1
  78. package/dist/http/I18nServiceContainer.d.ts.map +1 -1
  79. package/dist/kernel/index.js +1 -1
  80. package/dist/server/index.js +1 -1
  81. package/dist/storage/index.js +1 -10
  82. package/package.json +1 -1
@@ -0,0 +1,16 @@
1
+ import{y as P,z as J} from"./chunk-7ce930fe69575c87.js";import{C as h,D as Jw,E as qG,F as A2,H as ZX,I as bf,K as Xf,L as OX,M as zX,N as R2} from"./chunk-88103b9d011960db.js";import{db as Jf} from"./chunk-8450a38607a86896.js";import{fb as X1,gb as e} from"./chunk-1b8acf308a3dc9ec.js";import{hb as T0} from"./chunk-22ec1973752a5488.js";import{ib as V0} from"./chunk-f5910f2c8a3f6974.js";var Af=J((Y9,pw)=>{var{defineProperty:uf,getOwnPropertyDescriptor:vI,getOwnPropertyNames:yI}=Object,xI=Object.prototype.hasOwnProperty,xw=(f,w)=>uf(f,"name",{value:w,configurable:!0}),dI=(f,w)=>{for(var $ in w)uf(f,$,{get:w[$],enumerable:!0})},pI=(f,w,$,G)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let U of yI(w))if(!xI.call(f,U)&&U!==$)uf(f,U,{get:()=>w[U],enumerable:!(G=vI(w,U))||G.enumerable})}return f},gI=(f)=>pI(uf({},"__esModule",{value:!0}),f),dw={};dI(dw,{getSmithyContext:()=>sI,normalizeProvider:()=>nI});pw.exports=gI(dw);var yw=Jf(),sI=xw((f)=>f[yw.SMITHY_CONTEXT_KEY]||(f[yw.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),nI=xw((f)=>{if(typeof f==="function")return f;const w=Promise.resolve(f);return()=>w},"normalizeProvider")});var rw=J((K9,nw)=>{var C0=function(f){try{const w=new Set(Array.from(f.match(/([A-Z_]){3,}/g)??[]));return w.delete("CONFIG"),w.delete("CONFIG_PREFIX_SEPARATOR"),w.delete("ENV"),[...w].join(", ")}catch(w){return f}},Df=Object.defineProperty,rI=Object.getOwnPropertyDescriptor,lI=Object.getOwnPropertyNames,mI=Object.prototype.hasOwnProperty,$f=(f,w)=>Df(f,"name",{value:w,configurable:!0}),oI=(f,w)=>{for(var $ in w)Df(f,$,{get:w[$],enumerable:!0})},iI=(f,w,$,G)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let U of lI(w))if(!mI.call(f,U)&&U!==$)Df(f,U,{get:()=>w[U],enumerable:!(G=rI(w,U))||G.enumerable})}return f},tI=(f)=>iI(Df({},"__esModule",{value:!0}),f),sw={};oI(sw,{loadConfig:()=>$E});nw.exports=tI(sw);var Rf=V0();$f(C0,"getSelectorName");var eI=$f((f,w)=>async()=>{try{const $=f(process.env);if($===void 0)throw new Error;return $}catch($){throw new Rf.CredentialsProviderError($.message||`Not found in ENV: ${C0(f.toString())}`,{logger:w})}},"fromEnv"),gw=T0(),aI=$f((f,{preferredFile:w="config",...$}={})=>async()=>{const G=gw.getProfileName($),{configFile:U,credentialsFile:W}=await gw.loadSharedConfigFiles($),I=W[G]||{},E=U[G]||{},F=w==="config"?{...I,...E}:{...E,...I};try{const X=f(F,w==="config"?U:W);if(X===void 0)throw new Error;return X}catch(L){throw new Rf.CredentialsProviderError(L.message||`Not found in config files w/ profile [${G}]: ${C0(f.toString())}`,{logger:$.logger})}},"fromSharedConfigFiles"),fE=$f((f)=>typeof f==="function","isFunction"),wE=$f((f)=>fE(f)?async()=>await f():Rf.fromStatic(f),"fromStatic"),$E=$f(({environmentVariableSelector:f,configFileSelector:w,default:$},G={})=>Rf.memoize(Rf.chain(eI(f),aI(w,G),wE($))),"loadConfig")});var ew=J((iw)=>{Object.defineProperty(iw,"__esModule",{value:!0});iw.getEndpointUrlConfig=void 0;var lw=T0(),mw="AWS_ENDPOINT_URL",ow="endpoint_url",UE=(f)=>({environmentVariableSelector:(w)=>{const $=f.split(" ").map((W)=>W.toUpperCase()),G=w[[mw,...$].join("_")];if(G)return G;const U=w[mw];if(U)return U;return},configFileSelector:(w,$)=>{if($&&w.services){const U=$[["services",w.services].join(lw.CONFIG_PREFIX_SEPARATOR)];if(U){const W=f.split(" ").map((E)=>E.toLowerCase()),I=U[[W.join("_"),ow].join(lw.CONFIG_PREFIX_SEPARATOR)];if(I)return I}}const G=w[ow];if(G)return G;return},default:void 0});iw.getEndpointUrlConfig=UE});var w1=J((aw)=>{Object.defineProperty(aw,"__esModule",{value:!0});aw.getEndpointFromConfig=void 0;var GE=rw(),WE=ew(),IE=async(f)=>GE.loadConfig(WE.getEndpointUrlConfig(f))();aw.getEndpointFromConfig=IE});var N0=J((H9,F1)=>{var E1=function(f,w,$){return{applyToStack:(G)=>{G.add(U1(f,$),W1),G.add(G1(f,w),I1)}}},vf=Object.defineProperty,EE=Object.getOwnPropertyDescriptor,FE=Object.getOwnPropertyNames,LE=Object.prototype.hasOwnProperty,P0=(f,w)=>vf(f,"name",{value:w,configurable:!0}),XE=(f,w)=>{for(var $ in w)vf(f,$,{get:w[$],enumerable:!0})},ZE=(f,w,$,G)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let U of FE(w))if(!LE.call(f,U)&&U!==$)vf(f,U,{get:()=>w[U],enumerable:!(G=EE(w,U))||G.enumerable})}return f},OE=(f)=>ZE(vf({},"__esModule",{value:!0}),f),$1={};XE($1,{deserializerMiddleware:()=>U1,deserializerMiddlewareOption:()=>W1,getSerdePlugin:()=>E1,serializerMiddleware:()=>G1,serializerMiddlewareOption:()=>I1});F1.exports=OE($1);var U1=P0((f,w)=>($)=>async(G)=>{const{response:U}=await $(G);try{const W=await w(U,f);return{response:U,output:W}}catch(W){if(Object.defineProperty(W,"$response",{value:U}),!("$metadata"in W)){if(W.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof W.$responseBodyText!=="undefined"){if(W.$response)W.$response.body=W.$responseBodyText}}throw W}},"deserializerMiddleware"),G1=P0((f,w)=>($,G)=>async(U)=>{var W;const I=((W=G.endpointV2)==null?void 0:W.url)&&f.urlParser?async()=>f.urlParser(G.endpointV2.url):f.endpoint;if(!I)throw new Error("No valid endpoint provider available.");const E=await w(U.input,{...f,endpoint:I});return $({...U,request:E})},"serializerMiddleware"),W1={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},I1={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};P0(E1,"getSerdePlugin")});var A1=J((V9,J1)=>{var{defineProperty:xf,getOwnPropertyDescriptor:zE,getOwnPropertyNames:QE}=Object,ME=Object.prototype.hasOwnProperty,_=(f,w)=>xf(f,"name",{value:w,configurable:!0}),JE=(f,w)=>{for(var $ in w)xf(f,$,{get:w[$],enumerable:!0})},AE=(f,w,$,G)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let U of QE(w))if(!ME.call(f,U)&&U!==$)xf(f,U,{get:()=>w[U],enumerable:!(G=zE(w,U))||G.enumerable})}return f},RE=(f)=>AE(xf({},"__esModule",{value:!0}),f),Z1={};JE(Z1,{endpointMiddleware:()=>Q1,endpointMiddlewareOptions:()=>M1,getEndpointFromInstructions:()=>O1,getEndpointPlugin:()=>NE,resolveEndpointConfig:()=>SE,resolveParams:()=>z1,toEndpointV1:()=>S0});J1.exports=RE(Z1);var YE=_(async(f)=>{const w=(f==null?void 0:f.Bucket)||"";if(typeof f.Bucket==="string")f.Bucket=w.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(VE(w)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!HE(w)||w.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||w.toLowerCase()!==w||w.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},"resolveParamsForS3"),KE=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,BE=/(\d+\.){3}\d+/,qE=/\.\./,HE=_((f)=>KE.test(f)&&!BE.test(f)&&!qE.test(f),"isDnsCompatibleBucketName"),VE=_((f)=>{const[w,$,G,,,U]=f.split(":"),W=w==="arn"&&f.split(":").length>=6,I=Boolean(W&&$&&G&&U);if(W&&!I)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return I},"isArnBucketName"),TE=_((f,w,$)=>{const G=_(async()=>{const U=$[f]??$[w];if(typeof U==="function")return U();return U},"configProvider");if(f==="credentialScope"||w==="CredentialScope")return async()=>{const U=typeof $.credentials==="function"?await $.credentials():$.credentials;return(U==null?void 0:U.credentialScope)??(U==null?void 0:U.CredentialScope)};if(f==="accountId"||w==="AccountId")return async()=>{const U=typeof $.credentials==="function"?await $.credentials():$.credentials;return(U==null?void 0:U.accountId)??(U==null?void 0:U.AccountId)};if(f==="endpoint"||w==="endpoint")return async()=>{const U=await G();if(U&&typeof U==="object"){if("url"in U)return U.url.href;if("hostname"in U){const{protocol:W,hostname:I,port:E,path:F}=U;return`${W}//${I}${E?":"+E:""}${F}`}}return U};return G},"createConfigValueProvider"),CE=w1(),L1=X1(),S0=_((f)=>{if(typeof f==="object"){if("url"in f)return L1.parseUrl(f.url);return f}return L1.parseUrl(f)},"toEndpointV1"),O1=_(async(f,w,$,G)=>{if(!$.endpoint){const I=await CE.getEndpointFromConfig($.serviceId||"");if(I)$.endpoint=()=>Promise.resolve(S0(I))}const U=await z1(f,w,$);if(typeof $.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return $.endpointProvider(U,G)},"getEndpointFromInstructions"),z1=_(async(f,w,$)=>{var G;const U={},W=((G=w==null?void 0:w.getEndpointParameterInstructions)==null?void 0:G.call(w))||{};for(let[I,E]of Object.entries(W))switch(E.type){case"staticContextParams":U[I]=E.value;break;case"contextParams":U[I]=f[E.name];break;case"clientContextParams":case"builtInParams":U[I]=await TE(E.name,I,$)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(E))}if(Object.keys(W).length===0)Object.assign(U,$);if(String($.serviceId).toLowerCase()==="s3")await YE(U);return U},"resolveParams"),yf=Af(),Q1=_(({config:f,instructions:w})=>{return($,G)=>async(U)=>{var W,I,E;const F=await O1(U.input,{getEndpointParameterInstructions(){return w}},{...f},G);G.endpointV2=F,G.authSchemes=(W=F.properties)==null?void 0:W.authSchemes;const L=(I=G.authSchemes)==null?void 0:I[0];if(L){G.signing_region=L.signingRegion,G.signing_service=L.signingName;const X=yf.getSmithyContext(G),Z=(E=X==null?void 0:X.selectedHttpAuthScheme)==null?void 0:E.httpAuthOption;if(Z)Z.signingProperties=Object.assign(Z.signingProperties||{},{signing_region:L.signingRegion,signingRegion:L.signingRegion,signing_service:L.signingName,signingName:L.signingName,signingRegionSet:L.signingRegionSet},L.properties)}return $({...U})}},"endpointMiddleware"),PE=N0(),M1={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:PE.serializerMiddlewareOption.name},NE=_((f,w)=>({applyToStack:($)=>{$.addRelativeTo(Q1({config:f,instructions:w}),M1)}}),"getEndpointPlugin"),SE=_((f)=>{const w=f.tls??!0,{endpoint:$}=f,G=$!=null?async()=>S0(await yf.normalizeProvider($)()):void 0;return{...f,endpoint:G,tls:w,isCustomEndpoint:!!$,useDualstackEndpoint:yf.normalizeProvider(f.useDualstackEndpoint??!1),useFipsEndpoint:yf.normalizeProvider(f.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var j0=J((R1)=>{var bE=function(f){return f&&f.__esModule?f:{default:f}},cE=function(){if(df>pf.length-16)jE.default.randomFillSync(pf),df=0;return pf.slice(df,df+=16)};Object.defineProperty(R1,"__esModule",{value:!0});R1.default=cE;var jE=bE(import.meta.require("crypto")),pf=new Uint8Array(256),df=pf.length});var B1=J((Y1)=>{Object.defineProperty(Y1,"__esModule",{value:!0});Y1.default=void 0;var kE=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;Y1.default=kE});var Yf=J((q1)=>{var uE=function(f){return f&&f.__esModule?f:{default:f}},DE=function(f){return typeof f==="string"&&_E.default.test(f)};Object.defineProperty(q1,"__esModule",{value:!0});q1.default=void 0;var _E=uE(B1()),vE=DE;q1.default=vE});var Kf=J((T1)=>{var xE=function(f){return f&&f.__esModule?f:{default:f}},V1=function(f,w=0){return C[f[w+0]]+C[f[w+1]]+C[f[w+2]]+C[f[w+3]]+"-"+C[f[w+4]]+C[f[w+5]]+"-"+C[f[w+6]]+C[f[w+7]]+"-"+C[f[w+8]]+C[f[w+9]]+"-"+C[f[w+10]]+C[f[w+11]]+C[f[w+12]]+C[f[w+13]]+C[f[w+14]]+C[f[w+15]]},dE=function(f,w=0){const $=V1(f,w);if(!yE.default($))throw TypeError("Stringified UUID is invalid");return $};Object.defineProperty(T1,"__esModule",{value:!0});T1.default=void 0;T1.unsafeStringify=V1;var yE=xE(Yf()),C=[];for(let f=0;f<256;++f)C.push((f+256).toString(16).slice(1));var pE=dE;T1.default=pE});var j1=J((N1)=>{var rE=function(f){return f&&f.__esModule?f:{default:f}},lE=function(f,w,$){let G=w&&$||0;const U=w||new Array(16);f=f||{};let W=f.node||P1,I=f.clockseq!==void 0?f.clockseq:b0;if(W==null||I==null){const z=f.random||(f.rng||sE.default)();if(W==null)W=P1=[z[0]|1,z[1],z[2],z[3],z[4],z[5]];if(I==null)I=b0=(z[6]<<8|z[7])&16383}let E=f.msecs!==void 0?f.msecs:Date.now(),F=f.nsecs!==void 0?f.nsecs:h0+1;const L=E-c0+(F-h0)/1e4;if(L<0&&f.clockseq===void 0)I=I+1&16383;if((L<0||E>c0)&&f.nsecs===void 0)F=0;if(F>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c0=E,h0=F,b0=I,E+=12219292800000;const X=((E&268435455)*1e4+F)%4294967296;U[G++]=X>>>24&255,U[G++]=X>>>16&255,U[G++]=X>>>8&255,U[G++]=X&255;const Z=E/4294967296*1e4&268435455;U[G++]=Z>>>8&255,U[G++]=Z&255,U[G++]=Z>>>24&15|16,U[G++]=Z>>>16&255,U[G++]=I>>>8|128,U[G++]=I&255;for(let z=0;z<6;++z)U[G+z]=W[z];return w||nE.unsafeStringify(U)};Object.defineProperty(N1,"__esModule",{value:!0});N1.default=void 0;var sE=rE(j0()),nE=Kf(),P1,b0,c0=0,h0=0,mE=lE;N1.default=mE});var k0=J((b1)=>{var iE=function(f){return f&&f.__esModule?f:{default:f}},tE=function(f){if(!oE.default(f))throw TypeError("Invalid UUID");let w;const $=new Uint8Array(16);return $[0]=(w=parseInt(f.slice(0,8),16))>>>24,$[1]=w>>>16&255,$[2]=w>>>8&255,$[3]=w&255,$[4]=(w=parseInt(f.slice(9,13),16))>>>8,$[5]=w&255,$[6]=(w=parseInt(f.slice(14,18),16))>>>8,$[7]=w&255,$[8]=(w=parseInt(f.slice(19,23),16))>>>8,$[9]=w&255,$[10]=(w=parseInt(f.slice(24,36),16))/1099511627776&255,$[11]=w/4294967296&255,$[12]=w>>>24&255,$[13]=w>>>16&255,$[14]=w>>>8&255,$[15]=w&255,$};Object.defineProperty(b1,"__esModule",{value:!0});b1.default=void 0;var oE=iE(Yf()),eE=tE;b1.default=eE});var _0=J((_1)=>{var wF=function(f){return f&&f.__esModule?f:{default:f}},$F=function(f){f=unescape(encodeURIComponent(f));const w=[];for(let $=0;$<f.length;++$)w.push(f.charCodeAt($));return w},UF=function(f,w,$){function G(U,W,I,E){var F;if(typeof U==="string")U=$F(U);if(typeof W==="string")W=fF.default(W);if(((F=W)===null||F===void 0?void 0:F.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let L=new Uint8Array(16+U.length);if(L.set(W),L.set(U,W.length),L=$(L),L[6]=L[6]&15|w,L[8]=L[8]&63|128,I){E=E||0;for(let X=0;X<16;++X)I[E+X]=L[X];return I}return aE.unsafeStringify(L)}try{G.name=f}catch(U){}return G.DNS=h1,G.URL=k1,G};Object.defineProperty(_1,"__esModule",{value:!0});_1.URL=_1.DNS=void 0;_1.default=UF;var aE=Kf(),fF=wF(k0()),h1="6ba7b810-9dad-11d1-80b4-00c04fd430c8";_1.DNS=h1;var k1="6ba7b811-9dad-11d1-80b4-00c04fd430c8";_1.URL=k1});var y1=J((D1)=>{var EF=function(f){return f&&f.__esModule?f:{default:f}},FF=function(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return IF.default.createHash("md5").update(f).digest()};Object.defineProperty(D1,"__esModule",{value:!0});D1.default=void 0;var IF=EF(import.meta.require("crypto")),LF=FF;D1.default=LF});var g1=J((d1)=>{var x1=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(d1,"__esModule",{value:!0});d1.default=void 0;var XF=x1(_0()),ZF=x1(y1()),OF=XF.default("v3",48,ZF.default),zF=OF;d1.default=zF});var r1=J((s1)=>{var MF=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s1,"__esModule",{value:!0});s1.default=void 0;var QF=MF(import.meta.require("crypto")),JF={randomUUID:QF.default.randomUUID};s1.default=JF});var t1=J((o1)=>{var m1=function(f){return f&&f.__esModule?f:{default:f}},YF=function(f,w,$){if(l1.default.randomUUID&&!w&&!f)return l1.default.randomUUID();f=f||{};const G=f.random||(f.rng||AF.default)();if(G[6]=G[6]&15|64,G[8]=G[8]&63|128,w){$=$||0;for(let U=0;U<16;++U)w[$+U]=G[U];return w}return RF.unsafeStringify(G)};Object.defineProperty(o1,"__esModule",{value:!0});o1.default=void 0;var l1=m1(r1()),AF=m1(j0()),RF=Kf(),KF=YF;o1.default=KF});var f$=J((e1)=>{var qF=function(f){return f&&f.__esModule?f:{default:f}},HF=function(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return BF.default.createHash("sha1").update(f).digest()};Object.defineProperty(e1,"__esModule",{value:!0});e1.default=void 0;var BF=qF(import.meta.require("crypto")),VF=HF;e1.default=VF});var G$=J(($$)=>{var w$=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty($$,"__esModule",{value:!0});$$.default=void 0;var TF=w$(_0()),CF=w$(f$()),PF=TF.default("v5",80,CF.default),NF=PF;$$.default=NF});var E$=J((W$)=>{Object.defineProperty(W$,"__esModule",{value:!0});W$.default=void 0;var SF="00000000-0000-0000-0000-000000000000";W$.default=SF});var X$=J((F$)=>{var bF=function(f){return f&&f.__esModule?f:{default:f}},cF=function(f){if(!jF.default(f))throw TypeError("Invalid UUID");return parseInt(f.slice(14,15),16)};Object.defineProperty(F$,"__esModule",{value:!0});F$.default=void 0;var jF=bF(Yf()),hF=cF;F$.default=hF});var u0=J((u)=>{var p=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(u,"__esModule",{value:!0});Object.defineProperty(u,"NIL",{enumerable:!0,get:function(){return vF.default}});Object.defineProperty(u,"parse",{enumerable:!0,get:function(){return pF.default}});Object.defineProperty(u,"stringify",{enumerable:!0,get:function(){return dF.default}});Object.defineProperty(u,"v1",{enumerable:!0,get:function(){return kF.default}});Object.defineProperty(u,"v3",{enumerable:!0,get:function(){return _F.default}});Object.defineProperty(u,"v4",{enumerable:!0,get:function(){return uF.default}});Object.defineProperty(u,"v5",{enumerable:!0,get:function(){return DF.default}});Object.defineProperty(u,"validate",{enumerable:!0,get:function(){return xF.default}});Object.defineProperty(u,"version",{enumerable:!0,get:function(){return yF.default}});var kF=p(j1()),_F=p(g1()),uF=p(t1()),DF=p(G$()),vF=p(E$()),yF=p(X$()),xF=p(Yf()),dF=p(Kf()),pF=p(k0())});var Gf=J((d9,Q$)=>{var{defineProperty:gf,getOwnPropertyDescriptor:gF,getOwnPropertyNames:sF}=Object,nF=Object.prototype.hasOwnProperty,Uf=(f,w)=>gf(f,"name",{value:w,configurable:!0}),rF=(f,w)=>{for(var $ in w)gf(f,$,{get:w[$],enumerable:!0})},lF=(f,w,$,G)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let U of sF(w))if(!nF.call(f,U)&&U!==$)gf(f,U,{get:()=>w[U],enumerable:!(G=gF(w,U))||G.enumerable})}return f},mF=(f)=>lF(gf({},"__esModule",{value:!0}),f),Z$={};rF(Z$,{isClockSkewCorrectedError:()=>O$,isClockSkewError:()=>w2,isRetryableByTrait:()=>f2,isServerError:()=>U2,isThrottlingError:()=>$2,isTransientError:()=>z$});Q$.exports=mF(Z$);var oF=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],iF=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],tF=["TimeoutError","RequestTimeout","RequestTimeoutException"],eF=[500,502,503,504],aF=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],f2=Uf((f)=>f.$retryable!==void 0,"isRetryableByTrait"),w2=Uf((f)=>oF.includes(f.name),"isClockSkewError"),O$=Uf((f)=>{var w;return(w=f.$metadata)==null?void 0:w.clockSkewCorrected},"isClockSkewCorrectedError"),$2=Uf((f)=>{var w,$;return((w=f.$metadata)==null?void 0:w.httpStatusCode)===429||iF.includes(f.name)||(($=f.$retryable)==null?void 0:$.throttling)==!0},"isThrottlingError"),z$=Uf((f)=>{var w;return O$(f)||tF.includes(f.name)||aF.includes((f==null?void 0:f.code)||"")||eF.includes(((w=f.$metadata)==null?void 0:w.httpStatusCode)||0)},"isTransientError"),U2=Uf((f)=>{var w;if(((w=f.$metadata)==null?void 0:w.httpStatusCode)!==void 0){const $=f.$metadata.httpStatusCode;if(500<=$&&$<=599&&!z$(f))return!0;return!1}return!1},"isServerError")});var g=J((p9,P$)=>{var{defineProperty:sf,getOwnPropertyDescriptor:G2,getOwnPropertyNames:W2}=Object,I2=Object.prototype.hasOwnProperty,D=(f,w)=>sf(f,"name",{value:w,configurable:!0}),E2=(f,w)=>{for(var $ in w)sf(f,$,{get:w[$],enumerable:!0})},F2=(f,w,$,G)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let U of W2(w))if(!I2.call(f,U)&&U!==$)sf(f,U,{get:()=>w[U],enumerable:!(G=G2(w,U))||G.enumerable})}return f},L2=(f)=>F2(sf({},"__esModule",{value:!0}),f),J$={};E2(J$,{AdaptiveRetryStrategy:()=>M2,ConfiguredRetryStrategy:()=>J2,DEFAULT_MAX_ATTEMPTS:()=>D0,DEFAULT_RETRY_DELAY_BASE:()=>Bf,DEFAULT_RETRY_MODE:()=>X2,DefaultRateLimiter:()=>Y$,INITIAL_RETRY_TOKENS:()=>v0,INVOCATION_ID_HEADER:()=>O2,MAXIMUM_RETRY_DELAY:()=>y0,NO_RETRY_INCREMENT:()=>H$,REQUEST_HEADER:()=>z2,RETRY_COST:()=>B$,RETRY_MODES:()=>A$,StandardRetryStrategy:()=>x0,THROTTLING_RETRY_DELAY_BASE:()=>K$,TIMEOUT_RETRY_COST:()=>q$});P$.exports=L2(J$);var A$=((f)=>{return f.STANDARD="standard",f.ADAPTIVE="adaptive",f})(A$||{}),D0=3,X2="standard",Z2=Gf(),R$=class f{constructor(w){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(w==null?void 0:w.beta)??0.7,this.minCapacity=(w==null?void 0:w.minCapacity)??1,this.minFillRate=(w==null?void 0:w.minFillRate)??0.5,this.scaleConstant=(w==null?void 0:w.scaleConstant)??0.4,this.smooth=(w==null?void 0:w.smooth)??0.8;const $=this.getCurrentTimeInSeconds();this.lastThrottleTime=$,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(w){if(!this.enabled)return;if(this.refillTokenBucket(),w>this.currentCapacity){const $=(w-this.currentCapacity)/this.fillRate*1000;await new Promise((G)=>setTimeout(G,$))}this.currentCapacity=this.currentCapacity-w}refillTokenBucket(){const w=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=w;return}const $=(w-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+$),this.lastTimestamp=w}updateClientSendingRate(w){let $;if(this.updateMeasuredRate(),Z2.isThrottlingError(w)){const U=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=U,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),$=this.cubicThrottle(U),this.enableTokenBucket()}else this.calculateTimeWindow(),$=this.cubicSuccess(this.getCurrentTimeInSeconds());const G=Math.min($,2*this.measuredTxRate);this.updateTokenBucketRate(G)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(w){return this.getPrecise(w*this.beta)}cubicSuccess(w){return this.getPrecise(this.scaleConstant*Math.pow(w-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(w){this.refillTokenBucket(),this.fillRate=Math.max(w,this.minFillRate),this.maxCapacity=Math.max(w,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const w=this.getCurrentTimeInSeconds(),$=Math.floor(w*2)/2;if(this.requestCount++,$>this.lastTxRateBucket){const G=this.requestCount/($-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=$}}getPrecise(w){return parseFloat(w.toFixed(8))}};D(R$,"DefaultRateLimiter");var Y$=R$,Bf=100,y0=20000,K$=500,v0=500,B$=5,q$=10,H$=1,O2="amz-sdk-invocation-id",z2="amz-sdk-request",Q2=D(()=>{let f=Bf;return{computeNextBackoffDelay:D((G)=>{return Math.floor(Math.min(y0,Math.random()*2**G*f))},"computeNextBackoffDelay"),setDelayBase:D((G)=>{f=G},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),M$=D(({retryDelay:f,retryCount:w,retryCost:$})=>{return{getRetryCount:D(()=>w,"getRetryCount"),getRetryDelay:D(()=>Math.min(y0,f),"getRetryDelay"),getRetryCost:D(()=>$,"getRetryCost")}},"createDefaultRetryToken"),V$=class f{constructor(w){this.maxAttempts=w,this.mode="standard",this.capacity=v0,this.retryBackoffStrategy=Q2(),this.maxAttemptsProvider=typeof w==="function"?w:async()=>w}async acquireInitialRetryToken(w){return M$({retryDelay:Bf,retryCount:0})}async refreshRetryTokenForRetry(w,$){const G=await this.getMaxAttempts();if(this.shouldRetry(w,$,G)){const U=$.errorType;this.retryBackoffStrategy.setDelayBase(U==="THROTTLING"?K$:Bf);const W=this.retryBackoffStrategy.computeNextBackoffDelay(w.getRetryCount()),I=$.retryAfterHint?Math.max($.retryAfterHint.getTime()-Date.now()||0,W):W,E=this.getCapacityCost(U);return this.capacity-=E,M$({retryDelay:I,retryCount:w.getRetryCount()+1,retryCost:E})}throw new Error("No retry token available")}recordSuccess(w){this.capacity=Math.max(v0,this.capacity+(w.getRetryCost()??H$))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(w){return console.warn(`Max attempts provider could not resolve. Using default of ${D0}`),D0}}shouldRetry(w,$,G){return w.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost($.errorType)&&this.isRetryableError($.errorType)}getCapacityCost(w){return w==="TRANSIENT"?q$:B$}isRetryableError(w){return w==="THROTTLING"||w==="TRANSIENT"}};D(V$,"StandardRetryStrategy");var x0=V$,T$=class f{constructor(w,$){this.maxAttemptsProvider=w,this.mode="adaptive";const{rateLimiter:G}=$??{};this.rateLimiter=G??new Y$,this.standardRetryStrategy=new x0(w)}async acquireInitialRetryToken(w){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(w)}async refreshRetryTokenForRetry(w,$){return this.rateLimiter.updateClientSendingRate($),this.standardRetryStrategy.refreshRetryTokenForRetry(w,$)}recordSuccess(w){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(w)}};D(T$,"AdaptiveRetryStrategy");var M2=T$,C$=class f extends x0{constructor(w,$=Bf){super(typeof w==="function"?w:async()=>w);if(typeof $==="number")this.computeNextBackoffDelay=()=>$;else this.computeNextBackoffDelay=$}async refreshRetryTokenForRetry(w,$){const G=await super.refreshRetryTokenForRetry(w,$);return G.getRetryDelay=()=>this.computeNextBackoffDelay(G.getRetryCount()),G}};D(C$,"ConfiguredRetryStrategy");var J2=C$});var Ff=J((g9,i$)=>{var d$=function(f){const w=f.getUTCFullYear(),$=f.getUTCMonth(),G=f.getUTCDay(),U=f.getUTCDate(),W=f.getUTCHours(),I=f.getUTCMinutes(),E=f.getUTCSeconds(),F=U<10?`0${U}`:`${U}`,L=W<10?`0${W}`:`${W}`,X=I<10?`0${I}`:`${I}`,Z=E<10?`0${E}`:`${E}`;return`${r2[G]}, ${F} ${t0[$]} ${w} ${L}:${X}:${Z} GMT`},lf=function(f){return encodeURIComponent(f).replace(/[!'()*]/g,function(w){return"%"+w.charCodeAt(0).toString(16).toUpperCase()})},e0=function(f,w,$){let G,U,W;if(typeof w==="undefined"&&typeof $==="undefined")G={},W=f;else if(G=f,typeof w==="function")return U=w,W=$,T8(G,U,W);else W=w;for(let I of Object.keys(W)){if(!Array.isArray(W[I])){G[I]=W[I];continue}m$(G,null,W,I)}return G},o$=function(f,w,$){if($<=0||!Number.isInteger($))throw new Error("Invalid number of delimiters ("+$+") for splitEvery.");const G=f.split(w);if($===1)return G;const U=[];let W="";for(let I=0;I<G.length;I++){if(W==="")W=G[I];else W+=w+G[I];if((I+1)%$===0)U.push(W),W=""}if(W!=="")U.push(W);return U},mf=Object.defineProperty,Y2=Object.getOwnPropertyDescriptor,K2=Object.getOwnPropertyNames,B2=Object.prototype.hasOwnProperty,Q=(f,w)=>mf(f,"name",{value:w,configurable:!0}),q2=(f,w)=>{for(var $ in w)mf(f,$,{get:w[$],enumerable:!0})},H2=(f,w,$,G)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let U of K2(w))if(!B2.call(f,U)&&U!==$)mf(f,U,{get:()=>w[U],enumerable:!(G=Y2(w,U))||G.enumerable})}return f},V2=(f)=>H2(mf({},"__esModule",{value:!0}),f),S$={};q2(S$,{Client:()=>C2,Command:()=>k$,LazyJsonString:()=>q8,NoOpLogger:()=>T2,SENSITIVE_STRING:()=>S2,ServiceException:()=>X8,StringWrapper:()=>Cf,_json:()=>l0,collectBody:()=>P2,convertMap:()=>H8,createAggregatedClient:()=>j2,dateToUtcString:()=>d$,decorateServiceException:()=>g$,emitWarningIfUnsupportedVersion:()=>Q8,expectBoolean:()=>c2,expectByte:()=>r0,expectFloat32:()=>nf,expectInt:()=>k2,expectInt32:()=>s0,expectLong:()=>Vf,expectNonNull:()=>u2,expectNumber:()=>Hf,expectObject:()=>u$,expectShort:()=>n0,expectString:()=>D2,expectUnion:()=>v2,extendedEncodeURIComponent:()=>lf,getArrayIfSingleItem:()=>B8,getDefaultClientConfiguration:()=>Y8,getDefaultExtensionConfiguration:()=>n$,getValueFromTextNode:()=>r$,handleFloat:()=>d2,limitedParseDouble:()=>i0,limitedParseFloat:()=>p2,limitedParseFloat32:()=>g2,loadConfigsForDefaultMode:()=>z8,logger:()=>Tf,map:()=>e0,parseBoolean:()=>b2,parseEpochTimestamp:()=>w8,parseRfc3339DateTime:()=>m2,parseRfc3339DateTimeWithOffset:()=>i2,parseRfc7231DateTime:()=>f8,resolveDefaultRuntimeConfig:()=>K8,resolvedPath:()=>N8,serializeDateTime:()=>j8,serializeFloat:()=>S8,splitEvery:()=>o$,strictParseByte:()=>x$,strictParseDouble:()=>o0,strictParseFloat:()=>y2,strictParseFloat32:()=>D$,strictParseInt:()=>s2,strictParseInt32:()=>n2,strictParseLong:()=>y$,strictParseShort:()=>Wf,take:()=>V8,throwDefaultError:()=>s$,withBaseException:()=>Z8});i$.exports=V2(S$);var j$=class f{trace(){}debug(){}info(){}warn(){}error(){}};Q(j$,"NoOpLogger");var T2=j$,b$=A2(),c$=class f{constructor(w){this.middlewareStack=b$.constructStack(),this.config=w}send(w,$,G){const U=typeof $!=="function"?$:void 0,W=typeof $==="function"?$:G,I=w.resolveMiddleware(this.middlewareStack,this.config,U);if(W)I(w).then((E)=>W(null,E.output),(E)=>W(E)).catch(()=>{});else return I(w).then((E)=>E.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};Q(c$,"Client");var C2=c$,d0=R2(),P2=Q(async(f=new Uint8Array,w)=>{if(f instanceof Uint8Array)return d0.Uint8ArrayBlobAdapter.mutate(f);if(!f)return d0.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const $=w.streamCollector(f);return d0.Uint8ArrayBlobAdapter.mutate(await $)},"collectBody"),g0=Jf(),h$=class f{constructor(){this.middlewareStack=b$.constructStack()}static classBuilder(){return new N2}resolveMiddlewareWithContext(w,$,G,{middlewareFn:U,clientName:W,commandName:I,inputFilterSensitiveLog:E,outputFilterSensitiveLog:F,smithyContext:L,additionalContext:X,CommandCtor:Z}){for(let Y of U.bind(this)(Z,w,$,G))this.middlewareStack.use(Y);const z=w.concat(this.middlewareStack),{logger:O}=$,M={logger:O,clientName:W,commandName:I,inputFilterSensitiveLog:E,outputFilterSensitiveLog:F,[g0.SMITHY_CONTEXT_KEY]:{commandInstance:this,...L},...X},{requestHandler:A}=$;return z.resolve((Y)=>A.handle(Y.request,G||{}),M)}};Q(h$,"Command");var k$=h$,_$=class f{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(w)=>w,this._outputFilterSensitiveLog=(w)=>w,this._serializer=null,this._deserializer=null}init(w){this._init=w}ep(w){return this._ep=w,this}m(w){return this._middlewareFn=w,this}s(w,$,G={}){return this._smithyContext={service:w,operation:$,...G},this}c(w={}){return this._additionalContext=w,this}n(w,$){return this._clientName=w,this._commandName=$,this}f(w=(G)=>G,$=(G)=>G){return this._inputFilterSensitiveLog=w,this._outputFilterSensitiveLog=$,this}ser(w){return this._serializer=w,this}de(w){return this._deserializer=w,this}build(){var w;const $=this;let G;return G=(w=class extends k${constructor(...[U]){super();this.serialize=$._serializer,this.deserialize=$._deserializer,this.input=U??{},$._init(this)}static getEndpointParameterInstructions(){return $._ep}resolveMiddleware(U,W,I){return this.resolveMiddlewareWithContext(U,W,I,{CommandCtor:G,middlewareFn:$._middlewareFn,clientName:$._clientName,commandName:$._commandName,inputFilterSensitiveLog:$._inputFilterSensitiveLog,outputFilterSensitiveLog:$._outputFilterSensitiveLog,smithyContext:$._smithyContext,additionalContext:$._additionalContext})}},Q(w,"CommandRef"),w)}};Q(_$,"ClassBuilder");var N2=_$,S2="***SensitiveInformation***",j2=Q((f,w)=>{for(let $ of Object.keys(f)){const G=f[$],U=Q(async function(I,E,F){const L=new G(I);if(typeof E==="function")this.send(L,E);else if(typeof F==="function"){if(typeof E!=="object")throw new Error(`Expected http options but got ${typeof E}`);this.send(L,E||{},F)}else return this.send(L,E)},"methodImpl"),W=($[0].toLowerCase()+$.slice(1)).replace(/Command$/,"");w.prototype[W]=U}},"createAggregatedClient"),b2=Q((f)=>{switch(f){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${f}"`)}},"parseBoolean"),c2=Q((f)=>{if(f===null||f===void 0)return;if(typeof f==="number"){if(f===0||f===1)Tf.warn(rf(`Expected boolean, got ${typeof f}: ${f}`));if(f===0)return!1;if(f===1)return!0}if(typeof f==="string"){const w=f.toLowerCase();if(w==="false"||w==="true")Tf.warn(rf(`Expected boolean, got ${typeof f}: ${f}`));if(w==="false")return!1;if(w==="true")return!0}if(typeof f==="boolean")return f;throw new TypeError(`Expected boolean, got ${typeof f}: ${f}`)},"expectBoolean"),Hf=Q((f)=>{if(f===null||f===void 0)return;if(typeof f==="string"){const w=parseFloat(f);if(!Number.isNaN(w)){if(String(w)!==String(f))Tf.warn(rf(`Expected number but observed string: ${f}`));return w}}if(typeof f==="number")return f;throw new TypeError(`Expected number, got ${typeof f}: ${f}`)},"expectNumber"),h2=Math.ceil(340282346638528860000000000000000000000),nf=Q((f)=>{const w=Hf(f);if(w!==void 0&&!Number.isNaN(w)&&w!==Infinity&&w!==(-Infinity)){if(Math.abs(w)>h2)throw new TypeError(`Expected 32-bit float, got ${f}`)}return w},"expectFloat32"),Vf=Q((f)=>{if(f===null||f===void 0)return;if(Number.isInteger(f)&&!Number.isNaN(f))return f;throw new TypeError(`Expected integer, got ${typeof f}: ${f}`)},"expectLong"),k2=Vf,s0=Q((f)=>m0(f,32),"expectInt32"),n0=Q((f)=>m0(f,16),"expectShort"),r0=Q((f)=>m0(f,8),"expectByte"),m0=Q((f,w)=>{const $=Vf(f);if($!==void 0&&_2($,w)!==$)throw new TypeError(`Expected ${w}-bit integer, got ${f}`);return $},"expectSizedInt"),_2=Q((f,w)=>{switch(w){case 32:return Int32Array.of(f)[0];case 16:return Int16Array.of(f)[0];case 8:return Int8Array.of(f)[0]}},"castInt"),u2=Q((f,w)=>{if(f===null||f===void 0){if(w)throw new TypeError(`Expected a non-null value for ${w}`);throw new TypeError("Expected a non-null value")}return f},"expectNonNull"),u$=Q((f)=>{if(f===null||f===void 0)return;if(typeof f==="object"&&!Array.isArray(f))return f;const w=Array.isArray(f)?"array":typeof f;throw new TypeError(`Expected object, got ${w}: ${f}`)},"expectObject"),D2=Q((f)=>{if(f===null||f===void 0)return;if(typeof f==="string")return f;if(["boolean","number","bigint"].includes(typeof f))return Tf.warn(rf(`Expected string, got ${typeof f}: ${f}`)),String(f);throw new TypeError(`Expected string, got ${typeof f}: ${f}`)},"expectString"),v2=Q((f)=>{if(f===null||f===void 0)return;const w=u$(f),$=Object.entries(w).filter(([,G])=>G!=null).map(([G])=>G);if($.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if($.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${$} were not null.`);return w},"expectUnion"),o0=Q((f)=>{if(typeof f=="string")return Hf(Ef(f));return Hf(f)},"strictParseDouble"),y2=o0,D$=Q((f)=>{if(typeof f=="string")return nf(Ef(f));return nf(f)},"strictParseFloat32"),x2=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Ef=Q((f)=>{const w=f.match(x2);if(w===null||w[0].length!==f.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(f)},"parseNumber"),i0=Q((f)=>{if(typeof f=="string")return v$(f);return Hf(f)},"limitedParseDouble"),d2=i0,p2=i0,g2=Q((f)=>{if(typeof f=="string")return v$(f);return nf(f)},"limitedParseFloat32"),v$=Q((f)=>{switch(f){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${f}`)}},"parseFloatString"),y$=Q((f)=>{if(typeof f==="string")return Vf(Ef(f));return Vf(f)},"strictParseLong"),s2=y$,n2=Q((f)=>{if(typeof f==="string")return s0(Ef(f));return s0(f)},"strictParseInt32"),Wf=Q((f)=>{if(typeof f==="string")return n0(Ef(f));return n0(f)},"strictParseShort"),x$=Q((f)=>{if(typeof f==="string")return r0(Ef(f));return r0(f)},"strictParseByte"),rf=Q((f)=>{return String(new TypeError(f).stack||f).split("\n").slice(0,5).filter((w)=>!w.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),Tf={warn:console.warn},r2=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],t0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Q(d$,"dateToUtcString");var l2=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),m2=Q((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const w=l2.exec(f);if(!w)throw new TypeError("Invalid RFC-3339 date-time value");const[$,G,U,W,I,E,F,L]=w,X=Wf(If(G)),Z=y(U,"month",1,12),z=y(W,"day",1,31);return qf(X,Z,z,{hours:I,minutes:E,seconds:F,fractionalMilliseconds:L})},"parseRfc3339DateTime"),o2=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),i2=Q((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const w=o2.exec(f);if(!w)throw new TypeError("Invalid RFC-3339 date-time value");const[$,G,U,W,I,E,F,L,X]=w,Z=Wf(If(G)),z=y(U,"month",1,12),O=y(W,"day",1,31),M=qf(Z,z,O,{hours:I,minutes:E,seconds:F,fractionalMilliseconds:L});if(X.toUpperCase()!="Z")M.setTime(M.getTime()-L8(X));return M},"parseRfc3339DateTimeWithOffset"),t2=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$/),e2=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$/),a2=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})$/),f8=Q((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let w=t2.exec(f);if(w){const[$,G,U,W,I,E,F,L]=w;return qf(Wf(If(W)),p0(U),y(G,"day",1,31),{hours:I,minutes:E,seconds:F,fractionalMilliseconds:L})}if(w=e2.exec(f),w){const[$,G,U,W,I,E,F,L]=w;return G8(qf($8(W),p0(U),y(G,"day",1,31),{hours:I,minutes:E,seconds:F,fractionalMilliseconds:L}))}if(w=a2.exec(f),w){const[$,G,U,W,I,E,F,L]=w;return qf(Wf(If(L)),p0(G),y(U.trimLeft(),"day",1,31),{hours:W,minutes:I,seconds:E,fractionalMilliseconds:F})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),w8=Q((f)=>{if(f===null||f===void 0)return;let w;if(typeof f==="number")w=f;else if(typeof f==="string")w=o0(f);else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(w)||w===Infinity||w===(-Infinity))throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(w*1000))},"parseEpochTimestamp"),qf=Q((f,w,$,G)=>{const U=w-1;return I8(f,U,$),new Date(Date.UTC(f,U,$,y(G.hours,"hour",0,23),y(G.minutes,"minute",0,59),y(G.seconds,"seconds",0,60),F8(G.fractionalMilliseconds)))},"buildDate"),$8=Q((f)=>{const w=(new Date()).getUTCFullYear(),$=Math.floor(w/100)*100+Wf(If(f));if($<w)return $+100;return $},"parseTwoDigitYear"),U8=1576800000000,G8=Q((f)=>{if(f.getTime()-(new Date()).getTime()>U8)return new Date(Date.UTC(f.getUTCFullYear()-100,f.getUTCMonth(),f.getUTCDate(),f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()));return f},"adjustRfc850Year"),p0=Q((f)=>{const w=t0.indexOf(f);if(w<0)throw new TypeError(`Invalid month: ${f}`);return w+1},"parseMonthByShortName"),W8=[31,28,31,30,31,30,31,31,30,31,30,31],I8=Q((f,w,$)=>{let G=W8[w];if(w===1&&E8(f))G=29;if($>G)throw new TypeError(`Invalid day for ${t0[w]} in ${f}: ${$}`)},"validateDayOfMonth"),E8=Q((f)=>{return f%4===0&&(f%100!==0||f%400===0)},"isLeapYear"),y=Q((f,w,$,G)=>{const U=x$(If(f));if(U<$||U>G)throw new TypeError(`${w} must be between ${$} and ${G}, inclusive`);return U},"parseDateValue"),F8=Q((f)=>{if(f===null||f===void 0)return 0;return D$("0."+f)*1000},"parseMilliseconds"),L8=Q((f)=>{const w=f[0];let $=1;if(w=="+")$=1;else if(w=="-")$=-1;else throw new TypeError(`Offset direction, ${w}, must be "+" or "-"`);const G=Number(f.substring(1,3)),U=Number(f.substring(4,6));return $*(G*60+U)*60*1000},"parseOffsetToMilliseconds"),If=Q((f)=>{let w=0;while(w<f.length-1&&f.charAt(w)==="0")w++;if(w===0)return f;return f.slice(w)},"stripLeadingZeroes"),p$=class f extends Error{constructor(w){super(w.message);Object.setPrototypeOf(this,f.prototype),this.name=w.name,this.$fault=w.$fault,this.$metadata=w.$metadata}};Q(p$,"ServiceException");var X8=p$,g$=Q((f,w={})=>{Object.entries(w).filter(([,G])=>G!==void 0).forEach(([G,U])=>{if(f[G]==null||f[G]==="")f[G]=U});const $=f.message||f.Message||"UnknownError";return f.message=$,delete f.Message,f},"decorateServiceException"),s$=Q(({output:f,parsedBody:w,exceptionCtor:$,errorCode:G})=>{const U=O8(f),W=U.httpStatusCode?U.httpStatusCode+"":void 0,I=new $({name:(w==null?void 0:w.code)||(w==null?void 0:w.Code)||G||W||"UnknownError",$fault:"client",$metadata:U});throw g$(I,w)},"throwDefaultError"),Z8=Q((f)=>{return({output:w,parsedBody:$,errorCode:G})=>{s$({output:w,parsedBody:$,exceptionCtor:f,errorCode:G})}},"withBaseException"),O8=Q((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),z8=Q((f)=>{switch(f){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),N$=!1,Q8=Q((f)=>{if(f&&!N$&&parseInt(f.substring(1,f.indexOf(".")))<16)N$=!0},"emitWarningIfUnsupportedVersion"),M8=Q((f)=>{const w=[];for(let $ in g0.AlgorithmId){const G=g0.AlgorithmId[$];if(f[G]===void 0)continue;w.push({algorithmId:()=>G,checksumConstructor:()=>f[G]})}return{_checksumAlgorithms:w,addChecksumAlgorithm($){this._checksumAlgorithms.push($)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),J8=Q((f)=>{const w={};return f.checksumAlgorithms().forEach(($)=>{w[$.algorithmId()]=$.checksumConstructor()}),w},"resolveChecksumRuntimeConfig"),A8=Q((f)=>{let w=f.retryStrategy;return{setRetryStrategy($){w=$},retryStrategy(){return w}}},"getRetryConfiguration"),R8=Q((f)=>{const w={};return w.retryStrategy=f.retryStrategy(),w},"resolveRetryRuntimeConfig"),n$=Q((f)=>{return{...M8(f),...A8(f)}},"getDefaultExtensionConfiguration"),Y8=n$,K8=Q((f)=>{return{...J8(f),...R8(f)}},"resolveDefaultRuntimeConfig");Q(lf,"extendedEncodeURIComponent");var B8=Q((f)=>Array.isArray(f)?f:[f],"getArrayIfSingleItem"),r$=Q((f)=>{for(let $ in f)if(f.hasOwnProperty($)&&f[$]["#text"]!==void 0)f[$]=f[$]["#text"];else if(typeof f[$]==="object"&&f[$]!==null)f[$]=r$(f[$]);return f},"getValueFromTextNode"),Cf=Q(function(){const f=Object.getPrototypeOf(this).constructor,$=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf($,f.prototype),$},"StringWrapper");Cf.prototype=Object.create(String.prototype,{constructor:{value:Cf,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(Cf,String);var l$=class f extends Cf{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(w){if(w instanceof f)return w;else if(w instanceof String||typeof w==="string")return new f(w);return new f(JSON.stringify(w))}};Q(l$,"LazyJsonString");var q8=l$;Q(e0,"map");var H8=Q((f)=>{const w={};for(let[$,G]of Object.entries(f||{}))w[$]=[,G];return w},"convertMap"),V8=Q((f,w)=>{const $={};for(let G in w)m$($,f,w,G);return $},"take"),T8=Q((f,w,$)=>{return e0(f,Object.entries($).reduce((G,[U,W])=>{if(Array.isArray(W))G[U]=W;else if(typeof W==="function")G[U]=[w,W()];else G[U]=[w,W];return G},{}))},"mapWithFilter"),m$=Q((f,w,$,G)=>{if(w!==null){let I=$[G];if(typeof I==="function")I=[,I];const[E=C8,F=P8,L=G]=I;if(typeof E==="function"&&E(w[L])||typeof E!=="function"&&!!E)f[G]=F(w[L]);return}let[U,W]=$[G];if(typeof W==="function"){let I;const E=U===void 0&&(I=W())!=null,F=typeof U==="function"&&!!U(void 0)||typeof U!=="function"&&!!U;if(E)f[G]=I;else if(F)f[G]=W()}else{const I=U===void 0&&W!=null,E=typeof U==="function"&&!!U(W)||typeof U!=="function"&&!!U;if(I||E)f[G]=W}},"applyInstruction"),C8=Q((f)=>f!=null,"nonNullish"),P8=Q((f)=>f,"pass"),N8=Q((f,w,$,G,U,W)=>{if(w!=null&&w[$]!==void 0){const I=G();if(I.length<=0)throw new Error("Empty value provided for input HTTP label: "+$+".");f=f.replace(U,W?I.split("/").map((E)=>lf(E)).join("/"):lf(I))}else throw new Error("No value provided for input HTTP label: "+$+".");return f},"resolvedPath"),S8=Q((f)=>{if(f!==f)return"NaN";switch(f){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return f}},"serializeFloat"),j8=Q((f)=>f.toISOString().replace(".000Z","Z"),"serializeDateTime"),l0=Q((f)=>{if(f==null)return{};if(Array.isArray(f))return f.filter((w)=>w!=null).map(l0);if(typeof f==="object"){const w={};for(let $ of Object.keys(f)){if(f[$]==null)continue;w[$]=l0(f[$])}return w}return f},"_json");Q(o$,"splitEvery")});var a$=J((t$)=>{Object.defineProperty(t$,"__esModule",{value:!0});t$.isStreamingPayload=void 0;var b8=import.meta.require("stream"),c8=(f)=>(f===null||f===void 0?void 0:f.body)instanceof b8.Readable||typeof ReadableStream!=="undefined"&&(f===null||f===void 0?void 0:f.body)instanceof ReadableStream;t$.isStreamingPayload=c8});var AU=J((r9,JU)=>{var{defineProperty:of,getOwnPropertyDescriptor:h8,getOwnPropertyNames:k8}=Object,_8=Object.prototype.hasOwnProperty,V=(f,w)=>of(f,"name",{value:w,configurable:!0}),u8=(f,w)=>{for(var $ in w)of(f,$,{get:w[$],enumerable:!0})},D8=(f,w,$,G)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let U of k8(w))if(!_8.call(f,U)&&U!==$)of(f,U,{get:()=>w[U],enumerable:!(G=h8(w,U))||G.enumerable})}return f},v8=(f)=>D8(of({},"__esModule",{value:!0}),f),wU={};u8(wU,{AdaptiveRetryStrategy:()=>d8,CONFIG_MAX_ATTEMPTS:()=>fw,CONFIG_RETRY_MODE:()=>XU,ENV_MAX_ATTEMPTS:()=>a0,ENV_RETRY_MODE:()=>LU,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>p8,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>s8,StandardRetryStrategy:()=>EU,defaultDelayDecider:()=>UU,defaultRetryDecider:()=>GU,getOmitRetryHeadersPlugin:()=>n8,getRetryAfterHint:()=>MU,getRetryPlugin:()=>t8,omitRetryHeadersMiddleware:()=>ZU,omitRetryHeadersMiddlewareOptions:()=>OU,resolveRetryConfig:()=>g8,retryMiddleware:()=>zU,retryMiddlewareOptions:()=>QU});JU.exports=v8(wU);var Lf=Xf(),$U=u0(),q=g(),y8=V((f,w)=>{const $=f,G=(w==null?void 0:w.noRetryIncrement)??q.NO_RETRY_INCREMENT,U=(w==null?void 0:w.retryCost)??q.RETRY_COST,W=(w==null?void 0:w.timeoutRetryCost)??q.TIMEOUT_RETRY_COST;let I=f;const E=V((Z)=>Z.name==="TimeoutError"?W:U,"getCapacityAmount"),F=V((Z)=>E(Z)<=I,"hasRetryTokens");return Object.freeze({hasRetryTokens:F,retrieveRetryTokens:V((Z)=>{if(!F(Z))throw new Error("No retry token available");const z=E(Z);return I-=z,z},"retrieveRetryTokens"),releaseRetryTokens:V((Z)=>{I+=Z??G,I=Math.min(I,$)},"releaseRetryTokens")})},"getDefaultRetryQuota"),UU=V((f,w)=>Math.floor(Math.min(q.MAXIMUM_RETRY_DELAY,Math.random()*2**w*f)),"defaultDelayDecider"),r=Gf(),GU=V((f)=>{if(!f)return!1;return r.isRetryableByTrait(f)||r.isClockSkewError(f)||r.isThrottlingError(f)||r.isTransientError(f)},"defaultRetryDecider"),WU=V((f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)},"asSdkError"),IU=class f{constructor(w,$){this.maxAttemptsProvider=w,this.mode=q.RETRY_MODES.STANDARD,this.retryDecider=($==null?void 0:$.retryDecider)??GU,this.delayDecider=($==null?void 0:$.delayDecider)??UU,this.retryQuota=($==null?void 0:$.retryQuota)??y8(q.INITIAL_RETRY_TOKENS)}shouldRetry(w,$,G){return $<G&&this.retryDecider(w)&&this.retryQuota.hasRetryTokens(w)}async getMaxAttempts(){let w;try{w=await this.maxAttemptsProvider()}catch($){w=q.DEFAULT_MAX_ATTEMPTS}return w}async retry(w,$,G){let U,W=0,I=0;const E=await this.getMaxAttempts(),{request:F}=$;if(Lf.HttpRequest.isInstance(F))F.headers[q.INVOCATION_ID_HEADER]=$U.v4();while(!0)try{if(Lf.HttpRequest.isInstance(F))F.headers[q.REQUEST_HEADER]=`attempt=${W+1}; max=${E}`;if(G==null?void 0:G.beforeRequest)await G.beforeRequest();const{response:L,output:X}=await w($);if(G==null?void 0:G.afterRequest)G.afterRequest(L);return this.retryQuota.releaseRetryTokens(U),X.$metadata.attempts=W+1,X.$metadata.totalRetryDelay=I,{response:L,output:X}}catch(L){const X=WU(L);if(W++,this.shouldRetry(X,W,E)){U=this.retryQuota.retrieveRetryTokens(X);const Z=this.delayDecider(r.isThrottlingError(X)?q.THROTTLING_RETRY_DELAY_BASE:q.DEFAULT_RETRY_DELAY_BASE,W),z=x8(X.$response),O=Math.max(z||0,Z);I+=O,await new Promise((M)=>setTimeout(M,O));continue}if(!X.$metadata)X.$metadata={};throw X.$metadata.attempts=W,X.$metadata.totalRetryDelay=I,X}}};V(IU,"StandardRetryStrategy");var EU=IU,x8=V((f)=>{if(!Lf.HttpResponse.isInstance(f))return;const w=Object.keys(f.headers).find((W)=>W.toLowerCase()==="retry-after");if(!w)return;const $=f.headers[w],G=Number($);if(!Number.isNaN(G))return G*1000;return new Date($).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),FU=class f extends EU{constructor(w,$){const{rateLimiter:G,...U}=$??{};super(w,U);this.rateLimiter=G??new q.DefaultRateLimiter,this.mode=q.RETRY_MODES.ADAPTIVE}async retry(w,$){return super.retry(w,$,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(G)=>{this.rateLimiter.updateClientSendingRate(G)}})}};V(FU,"AdaptiveRetryStrategy");var d8=FU,fU=Af(),a0="AWS_MAX_ATTEMPTS",fw="max_attempts",p8={environmentVariableSelector:(f)=>{const w=f[a0];if(!w)return;const $=parseInt(w);if(Number.isNaN($))throw new Error(`Environment variable ${a0} mast be a number, got "${w}"`);return $},configFileSelector:(f)=>{const w=f[fw];if(!w)return;const $=parseInt(w);if(Number.isNaN($))throw new Error(`Shared config file entry ${fw} mast be a number, got "${w}"`);return $},default:q.DEFAULT_MAX_ATTEMPTS},g8=V((f)=>{const{retryStrategy:w}=f,$=fU.normalizeProvider(f.maxAttempts??q.DEFAULT_MAX_ATTEMPTS);return{...f,maxAttempts:$,retryStrategy:async()=>{if(w)return w;if(await fU.normalizeProvider(f.retryMode)()===q.RETRY_MODES.ADAPTIVE)return new q.AdaptiveRetryStrategy($);return new q.StandardRetryStrategy($)}}},"resolveRetryConfig"),LU="AWS_RETRY_MODE",XU="retry_mode",s8={environmentVariableSelector:(f)=>f[LU],configFileSelector:(f)=>f[XU],default:q.DEFAULT_RETRY_MODE},ZU=V(()=>(f)=>async(w)=>{const{request:$}=w;if(Lf.HttpRequest.isInstance($))delete $.headers[q.INVOCATION_ID_HEADER],delete $.headers[q.REQUEST_HEADER];return f(w)},"omitRetryHeadersMiddleware"),OU={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},n8=V((f)=>({applyToStack:(w)=>{w.addRelativeTo(ZU(),OU)}}),"getOmitRetryHeadersPlugin"),r8=Ff(),l8=a$(),zU=V((f)=>(w,$)=>async(G)=>{var U;let W=await f.retryStrategy();const I=await f.maxAttempts();if(m8(W)){W=W;let E=await W.acquireInitialRetryToken($.partition_id),F=new Error,L=0,X=0;const{request:Z}=G,z=Lf.HttpRequest.isInstance(Z);if(z)Z.headers[q.INVOCATION_ID_HEADER]=$U.v4();while(!0)try{if(z)Z.headers[q.REQUEST_HEADER]=`attempt=${L+1}; max=${I}`;const{response:O,output:M}=await w(G);return W.recordSuccess(E),M.$metadata.attempts=L+1,M.$metadata.totalRetryDelay=X,{response:O,output:M}}catch(O){const M=o8(O);if(F=WU(O),z&&l8.isStreamingPayload(Z))throw(U=$.logger instanceof r8.NoOpLogger?console:$.logger)==null||U.warn("An error was encountered in a non-retryable streaming request."),F;try{E=await W.refreshRetryTokenForRetry(E,M)}catch(Y){if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=L+1,F.$metadata.totalRetryDelay=X,F}L=E.getRetryCount();const A=E.getRetryDelay();X+=A,await new Promise((Y)=>setTimeout(Y,A))}}else{if(W=W,W==null?void 0:W.mode)$.userAgent=[...$.userAgent||[],["cfg/retry-mode",W.mode]];return W.retry(w,G)}},"retryMiddleware"),m8=V((f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined","isRetryStrategyV2"),o8=V((f)=>{const w={error:f,errorType:i8(f)},$=MU(f.$response);if($)w.retryAfterHint=$;return w},"getRetryErrorInfo"),i8=V((f)=>{if(r.isThrottlingError(f))return"THROTTLING";if(r.isTransientError(f))return"TRANSIENT";if(r.isServerError(f))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),QU={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},t8=V((f)=>({applyToStack:(w)=>{w.add(zU(f),QU)}}),"getRetryPlugin"),MU=V((f)=>{if(!Lf.HttpResponse.isInstance(f))return;const w=Object.keys(f.headers).find((W)=>W.toLowerCase()==="retry-after");if(!w)return;const $=f.headers[w],G=Number($);if(!Number.isNaN(G))return new Date(G*1000);return new Date($)},"getRetryAfterHint")});var $w=J((l9,uU)=>{var KU=function(f){const w=new Map;for(let $ of f)w.set($.schemeId,$);return w},cU=function(f,w){return new kU(f,w)},_U=function(f,w,$,G,U){return B(async function*W(I,E,...F){let L=I.startingToken||void 0,X=!0,Z;while(X){if(E[$]=L,U)E[U]=E[U]??I.pageSize;if(I.client instanceof f)Z=await BL(w,I.client,E,...F);else throw new Error(`Invalid client, expected instance of ${f.name}`);yield Z;const z=L;L=qL(Z,G),X=!!(L&&(!I.stopOnSameToken||L!==z))}return},"paginateOperation")},ef=Object.defineProperty,e8=Object.getOwnPropertyDescriptor,a8=Object.getOwnPropertyNames,fL=Object.prototype.hasOwnProperty,B=(f,w)=>ef(f,"name",{value:w,configurable:!0}),wL=(f,w)=>{for(var $ in w)ef(f,$,{get:w[$],enumerable:!0})},$L=(f,w,$,G)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let U of a8(w))if(!fL.call(f,U)&&U!==$)ef(f,U,{get:()=>w[U],enumerable:!(G=e8(w,U))||G.enumerable})}return f},UL=(f)=>$L(ef({},"__esModule",{value:!0}),f),RU={};wL(RU,{DefaultIdentityProviderConfig:()=>OL,EXPIRATION_MS:()=>jU,HttpApiKeyAuthSigner:()=>zL,HttpBearerAuthSigner:()=>QL,NoAuthSigner:()=>ML,RequestBuilder:()=>kU,createIsIdentityExpiredFunction:()=>SU,createPaginator:()=>_U,doesIdentityRequireRefresh:()=>bU,getHttpAuthSchemeEndpointRuleSetPlugin:()=>WL,getHttpAuthSchemePlugin:()=>EL,getHttpSigningPlugin:()=>ZL,getSmithyContext:()=>RL,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>BU,httpAuthSchemeMiddleware:()=>ww,httpAuthSchemeMiddlewareOptions:()=>qU,httpSigningMiddleware:()=>HU,httpSigningMiddlewareOptions:()=>VU,isIdentityExpired:()=>JL,memoizeIdentityProvider:()=>AL,normalizeProvider:()=>YL,requestBuilder:()=>cU});uU.exports=UL(RU);var YU=Af();B(KU,"convertHttpAuthSchemesToMap");var ww=B((f,w)=>($,G)=>async(U)=>{var W;const I=f.httpAuthSchemeProvider(await w.httpAuthSchemeParametersProvider(f,G,U.input)),E=KU(f.httpAuthSchemes),F=YU.getSmithyContext(G),L=[];for(let X of I){const Z=E.get(X.schemeId);if(!Z){L.push(`HttpAuthScheme \`${X.schemeId}\` was not enabled for this service.`);continue}const z=Z.identityProvider(await w.identityProviderConfigProvider(f));if(!z){L.push(`HttpAuthScheme \`${X.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:O={},signingProperties:M={}}=((W=X.propertiesExtractor)==null?void 0:W.call(X,f,G))||{};X.identityProperties=Object.assign(X.identityProperties||{},O),X.signingProperties=Object.assign(X.signingProperties||{},M),F.selectedHttpAuthScheme={httpAuthOption:X,identity:await z(X.identityProperties),signer:Z.signer};break}if(!F.selectedHttpAuthScheme)throw new Error(L.join("\n"));return $(U)},"httpAuthSchemeMiddleware"),GL=A1(),BU={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:GL.endpointMiddlewareOptions.name},WL=B((f,{httpAuthSchemeParametersProvider:w,identityProviderConfigProvider:$})=>({applyToStack:(G)=>{G.addRelativeTo(ww(f,{httpAuthSchemeParametersProvider:w,identityProviderConfigProvider:$}),BU)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),IL=N0(),qU={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:IL.serializerMiddlewareOption.name},EL=B((f,{httpAuthSchemeParametersProvider:w,identityProviderConfigProvider:$})=>({applyToStack:(G)=>{G.addRelativeTo(ww(f,{httpAuthSchemeParametersProvider:w,identityProviderConfigProvider:$}),qU)}}),"getHttpAuthSchemePlugin"),af=Xf(),FL=B((f)=>(w)=>{throw w},"defaultErrorHandler"),LL=B((f,w)=>{},"defaultSuccessHandler"),HU=B((f)=>(w,$)=>async(G)=>{if(!af.HttpRequest.isInstance(G.request))return w(G);const W=YU.getSmithyContext($).selectedHttpAuthScheme;if(!W)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:I={}},identity:E,signer:F}=W,L=await w({...G,request:await F.sign(G.request,E,I)}).catch((F.errorHandler||FL)(I));return(F.successHandler||LL)(L.response,I),L},"httpSigningMiddleware"),XL=AU(),VU={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:XL.retryMiddlewareOptions.name},ZL=B((f)=>({applyToStack:(w)=>{w.addRelativeTo(HU(f),VU)}}),"getHttpSigningPlugin"),TU=class f{constructor(w){this.authSchemes=new Map;for(let[$,G]of Object.entries(w))if(G!==void 0)this.authSchemes.set($,G)}getIdentityProvider(w){return this.authSchemes.get(w)}};B(TU,"DefaultIdentityProviderConfig");var OL=TU,tf=Jf(),CU=class f{async sign(w,$,G){if(!G)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!G.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!G.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!$.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const U=af.HttpRequest.clone(w);if(G.in===tf.HttpApiKeyAuthLocation.QUERY)U.query[G.name]=$.apiKey;else if(G.in===tf.HttpApiKeyAuthLocation.HEADER)U.headers[G.name]=G.scheme?`${G.scheme} ${$.apiKey}`:$.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+G.in+"`");return U}};B(CU,"HttpApiKeyAuthSigner");var zL=CU,PU=class f{async sign(w,$,G){const U=af.HttpRequest.clone(w);if(!$.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return U.headers.Authorization=`Bearer ${$.token}`,U}};B(PU,"HttpBearerAuthSigner");var QL=PU,NU=class f{async sign(w,$,G){return w}};B(NU,"NoAuthSigner");var ML=NU,SU=B((f)=>(w)=>bU(w)&&w.expiration.getTime()-Date.now()<f,"createIsIdentityExpiredFunction"),jU=300000,JL=SU(jU),bU=B((f)=>f.expiration!==void 0,"doesIdentityRequireRefresh"),AL=B((f,w,$)=>{if(f===void 0)return;const G=typeof f!=="function"?async()=>Promise.resolve(f):f;let U,W,I,E=!1;const F=B(async(L)=>{if(!W)W=G(L);try{U=await W,I=!0,E=!1}finally{W=void 0}return U},"coalesceProvider");if(w===void 0)return async(L)=>{if(!I||(L==null?void 0:L.forceRefresh))U=await F(L);return U};return async(L)=>{if(!I||(L==null?void 0:L.forceRefresh))U=await F(L);if(E)return U;if(!$(U))return E=!0,U;if(w(U))return await F(L),U;return U}},"memoizeIdentityProvider"),RL=B((f)=>f[tf.SMITHY_CONTEXT_KEY]||(f[tf.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),YL=B((f)=>{if(typeof f==="function")return f;const w=Promise.resolve(f);return()=>w},"normalizeProvider"),KL=Ff();B(cU,"requestBuilder");var hU=class f{constructor(w,$){this.input=w,this.context=$,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:w,protocol:$="https",port:G,path:U}=await this.context.endpoint();this.path=U;for(let W of this.resolvePathStack)W(this.path);return new af.HttpRequest({protocol:$,hostname:this.hostname||w,port:G,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(w){return this.hostname=w,this}bp(w){return this.resolvePathStack.push(($)=>{this.path=`${($==null?void 0:$.endsWith("/"))?$.slice(0,-1):$||""}`+w}),this}p(w,$,G,U){return this.resolvePathStack.push((W)=>{this.path=KL.resolvedPath(W,this.input,w,$,G,U)}),this}h(w){return this.headers=w,this}q(w){return this.query=w,this}b(w){return this.body=w,this}m(w){return this.method=w,this}};B(hU,"RequestBuilder");var kU=hU,BL=B(async(f,w,$,...G)=>{return await w.send(new f($),...G)},"makePagedClientRequest");B(_U,"createPaginator");var qL=B((f,w)=>{let $=f;const G=w.split(".");for(let U of G){if(!$||typeof $!=="object")return;$=$[U]}return $},"get")});var eG=J((SQ,Q0)=>{var TG,CG,PG,NG,SG,jG,bG,cG,hG,kG,_G,uG,DG,O0,Rw,vG,yG,xG,Qf,dG,pG,gG,sG,nG,rG,lG,mG,oG,z0,iG,tG;(function(f){var w=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(G){f($(w,$(G)))});else if(typeof Q0==="object"&&typeof SQ==="object")f($(w,$(SQ)));else f($(w));function $(G,U){if(G!==w)if(typeof Object.create==="function")Object.defineProperty(G,"__esModule",{value:!0});else G.__esModule=!0;return function(W,I){return G[W]=U?U(W,I):I}}})(function(f){var w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(U,W){U.__proto__=W}||function(U,W){for(var I in W)if(Object.prototype.hasOwnProperty.call(W,I))U[I]=W[I]};TG=function(U,W){if(typeof W!=="function"&&W!==null)throw new TypeError("Class extends value "+String(W)+" is not a constructor or null");w(U,W);function I(){this.constructor=U}U.prototype=W===null?Object.create(W):(I.prototype=W.prototype,new I)},CG=Object.assign||function(U){for(var W,I=1,E=arguments.length;I<E;I++){W=arguments[I];for(var F in W)if(Object.prototype.hasOwnProperty.call(W,F))U[F]=W[F]}return U},PG=function(U,W){var I={};for(var E in U)if(Object.prototype.hasOwnProperty.call(U,E)&&W.indexOf(E)<0)I[E]=U[E];if(U!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var F=0,E=Object.getOwnPropertySymbols(U);F<E.length;F++)if(W.indexOf(E[F])<0&&Object.prototype.propertyIsEnumerable.call(U,E[F]))I[E[F]]=U[E[F]]}return I},NG=function(U,W,I,E){var F=arguments.length,L=F<3?W:E===null?E=Object.getOwnPropertyDescriptor(W,I):E,X;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")L=Reflect.decorate(U,W,I,E);else for(var Z=U.length-1;Z>=0;Z--)if(X=U[Z])L=(F<3?X(L):F>3?X(W,I,L):X(W,I))||L;return F>3&&L&&Object.defineProperty(W,I,L),L},SG=function(U,W){return function(I,E){W(I,E,U)}},jG=function(U,W,I,E,F,L){function X(t){if(t!==void 0&&typeof t!=="function")throw new TypeError("Function expected");return t}var Z=E.kind,z=Z==="getter"?"get":Z==="setter"?"set":"value",O=!W&&U?E.static?U:U.prototype:null,M=W||(O?Object.getOwnPropertyDescriptor(O,E.name):{}),A,Y=!1;for(var R=I.length-1;R>=0;R--){var N={};for(var j in E)N[j]=j==="access"?{}:E[j];for(var j in E.access)N.access[j]=E.access[j];N.addInitializer=function(t){if(Y)throw new TypeError("Cannot add initializers after decoration has completed");L.push(X(t||null))};var d=I[R](Z==="accessor"?{get:M.get,set:M.set}:M[z],N);if(Z==="accessor"){if(d===void 0)continue;if(d===null||typeof d!=="object")throw new TypeError("Object expected");if(A=X(d.get))M.get=A;if(A=X(d.set))M.set=A;if(A=X(d.init))F.unshift(A)}else if(A=X(d))if(Z==="field")F.unshift(A);else M[z]=A}if(O)Object.defineProperty(O,E.name,M);Y=!0},bG=function(U,W,I){var E=arguments.length>2;for(var F=0;F<W.length;F++)I=E?W[F].call(U,I):W[F].call(U);return E?I:void 0},cG=function(U){return typeof U==="symbol"?U:"".concat(U)},hG=function(U,W,I){if(typeof W==="symbol")W=W.description?"[".concat(W.description,"]"):"";return Object.defineProperty(U,"name",{configurable:!0,value:I?"".concat(I," ",W):W})},kG=function(U,W){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(U,W)},_G=function(U,W,I,E){function F(L){return L instanceof I?L:new I(function(X){X(L)})}return new(I||(I=Promise))(function(L,X){function Z(M){try{O(E.next(M))}catch(A){X(A)}}function z(M){try{O(E.throw(M))}catch(A){X(A)}}function O(M){M.done?L(M.value):F(M.value).then(Z,z)}O((E=E.apply(U,W||[])).next())})},uG=function(U,W){var I={label:0,sent:function(){if(L[0]&1)throw L[1];return L[1]},trys:[],ops:[]},E,F,L,X;return X={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol==="function"&&(X[Symbol.iterator]=function(){return this}),X;function Z(O){return function(M){return z([O,M])}}function z(O){if(E)throw new TypeError("Generator is already executing.");while(X&&(X=0,O[0]&&(I=0)),I)try{if(E=1,F&&(L=O[0]&2?F.return:O[0]?F.throw||((L=F.return)&&L.call(F),0):F.next)&&!(L=L.call(F,O[1])).done)return L;if(F=0,L)O=[O[0]&2,L.value];switch(O[0]){case 0:case 1:L=O;break;case 4:return I.label++,{value:O[1],done:!1};case 5:I.label++,F=O[1],O=[0];continue;case 7:O=I.ops.pop(),I.trys.pop();continue;default:if((L=I.trys,!(L=L.length>0&&L[L.length-1]))&&(O[0]===6||O[0]===2)){I=0;continue}if(O[0]===3&&(!L||O[1]>L[0]&&O[1]<L[3])){I.label=O[1];break}if(O[0]===6&&I.label<L[1]){I.label=L[1],L=O;break}if(L&&I.label<L[2]){I.label=L[2],I.ops.push(O);break}if(L[2])I.ops.pop();I.trys.pop();continue}O=W.call(U,I)}catch(M){O=[6,M],F=0}finally{E=L=0}if(O[0]&5)throw O[1];return{value:O[0]?O[1]:void 0,done:!0}}},DG=function(U,W){for(var I in U)if(I!=="default"&&!Object.prototype.hasOwnProperty.call(W,I))z0(W,U,I)},z0=Object.create?function(U,W,I,E){if(E===void 0)E=I;var F=Object.getOwnPropertyDescriptor(W,I);if(!F||("get"in F?!W.__esModule:F.writable||F.configurable))F={enumerable:!0,get:function(){return W[I]}};Object.defineProperty(U,E,F)}:function(U,W,I,E){if(E===void 0)E=I;U[E]=W[I]},O0=function(U){var W=typeof Symbol==="function"&&Symbol.iterator,I=W&&U[W],E=0;if(I)return I.call(U);if(U&&typeof U.length==="number")return{next:function(){if(U&&E>=U.length)U=void 0;return{value:U&&U[E++],done:!U}}};throw new TypeError(W?"Object is not iterable.":"Symbol.iterator is not defined.")},Rw=function(U,W){var I=typeof Symbol==="function"&&U[Symbol.iterator];if(!I)return U;var E=I.call(U),F,L=[],X;try{while((W===void 0||W-- >0)&&!(F=E.next()).done)L.push(F.value)}catch(Z){X={error:Z}}finally{try{if(F&&!F.done&&(I=E.return))I.call(E)}finally{if(X)throw X.error}}return L},vG=function(){for(var U=[],W=0;W<arguments.length;W++)U=U.concat(Rw(arguments[W]));return U},yG=function(){for(var U=0,W=0,I=arguments.length;W<I;W++)U+=arguments[W].length;for(var E=Array(U),F=0,W=0;W<I;W++)for(var L=arguments[W],X=0,Z=L.length;X<Z;X++,F++)E[F]=L[X];return E},xG=function(U,W,I){if(I||arguments.length===2){for(var E=0,F=W.length,L;E<F;E++)if(L||!(E in W)){if(!L)L=Array.prototype.slice.call(W,0,E);L[E]=W[E]}}return U.concat(L||Array.prototype.slice.call(W))},Qf=function(U){return this instanceof Qf?(this.v=U,this):new Qf(U)},dG=function(U,W,I){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var E=I.apply(U,W||[]),F,L=[];return F={},Z("next"),Z("throw"),Z("return",X),F[Symbol.asyncIterator]=function(){return this},F;function X(R){return function(N){return Promise.resolve(N).then(R,A)}}function Z(R,N){if(E[R]){if(F[R]=function(j){return new Promise(function(d,t){L.push([R,j,d,t])>1||z(R,j)})},N)F[R]=N(F[R])}}function z(R,N){try{O(E[R](N))}catch(j){Y(L[0][3],j)}}function O(R){R.value instanceof Qf?Promise.resolve(R.value.v).then(M,A):Y(L[0][2],R)}function M(R){z("next",R)}function A(R){z("throw",R)}function Y(R,N){if(R(N),L.shift(),L.length)z(L[0][0],L[0][1])}},pG=function(U){var W,I;return W={},E("next"),E("throw",function(F){throw F}),E("return"),W[Symbol.iterator]=function(){return this},W;function E(F,L){W[F]=U[F]?function(X){return(I=!I)?{value:Qf(U[F](X)),done:!1}:L?L(X):X}:L}},gG=function(U){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var W=U[Symbol.asyncIterator],I;return W?W.call(U):(U=typeof O0==="function"?O0(U):U[Symbol.iterator](),I={},E("next"),E("throw"),E("return"),I[Symbol.asyncIterator]=function(){return this},I);function E(L){I[L]=U[L]&&function(X){return new Promise(function(Z,z){X=U[L](X),F(Z,z,X.done,X.value)})}}function F(L,X,Z,z){Promise.resolve(z).then(function(O){L({value:O,done:Z})},X)}},sG=function(U,W){if(Object.defineProperty)Object.defineProperty(U,"raw",{value:W});else U.raw=W;return U};var $=Object.create?function(U,W){Object.defineProperty(U,"default",{enumerable:!0,value:W})}:function(U,W){U.default=W};nG=function(U){if(U&&U.__esModule)return U;var W={};if(U!=null){for(var I in U)if(I!=="default"&&Object.prototype.hasOwnProperty.call(U,I))z0(W,U,I)}return $(W,U),W},rG=function(U){return U&&U.__esModule?U:{default:U}},lG=function(U,W,I,E){if(I==="a"&&!E)throw new TypeError("Private accessor was defined without a getter");if(typeof W==="function"?U!==W||!E:!W.has(U))throw new TypeError("Cannot read private member from an object whose class did not declare it");return I==="m"?E:I==="a"?E.call(U):E?E.value:W.get(U)},mG=function(U,W,I,E,F){if(E==="m")throw new TypeError("Private method is not writable");if(E==="a"&&!F)throw new TypeError("Private accessor was defined without a setter");if(typeof W==="function"?U!==W||!F:!W.has(U))throw new TypeError("Cannot write private member to an object whose class did not declare it");return E==="a"?F.call(U,I):F?F.value=I:W.set(U,I),I},oG=function(U,W){if(W===null||typeof W!=="object"&&typeof W!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof U==="function"?W===U:U.has(W)},iG=function(U,W,I){if(W!==null&&W!==void 0){if(typeof W!=="object"&&typeof W!=="function")throw new TypeError("Object expected.");var E,F;if(I){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");E=W[Symbol.asyncDispose]}if(E===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(E=W[Symbol.dispose],I)F=E}if(typeof E!=="function")throw new TypeError("Object not disposable.");if(F)E=function(){try{F.call(this)}catch(L){return Promise.reject(L)}};U.stack.push({value:W,dispose:E,async:I})}else if(I)U.stack.push({async:!0});return W};var G=typeof SuppressedError==="function"?SuppressedError:function(U,W,I){var E=new Error(I);return E.name="SuppressedError",E.error=U,E.suppressed=W,E};tG=function(U){function W(E){U.error=U.hasError?new G(E,U.error,"An error was suppressed during disposal."):E,U.hasError=!0}function I(){while(U.stack.length){var E=U.stack.pop();try{var F=E.dispose&&E.dispose.call(E.value);if(E.async)return Promise.resolve(F).then(I,function(L){return W(L),I()})}catch(L){W(L)}}if(U.hasError)throw U.error}return I()},f("__extends",TG),f("__assign",CG),f("__rest",PG),f("__decorate",NG),f("__param",SG),f("__esDecorate",jG),f("__runInitializers",bG),f("__propKey",cG),f("__setFunctionName",hG),f("__metadata",kG),f("__awaiter",_G),f("__generator",uG),f("__exportStar",DG),f("__createBinding",z0),f("__values",O0),f("__read",Rw),f("__spread",vG),f("__spreadArrays",yG),f("__spreadArray",xG),f("__await",Qf),f("__asyncGenerator",dG),f("__asyncDelegator",pG),f("__asyncValues",gG),f("__makeTemplateObject",sG),f("__importStar",nG),f("__importDefault",rG),f("__classPrivateFieldGet",lG),f("__classPrivateFieldSet",mG),f("__classPrivateFieldIn",oG),f("__addDisposableResource",iG),f("__disposeResources",tG)})});var $W=J((jQ,wW)=>{var{defineProperty:M0,getOwnPropertyDescriptor:UX,getOwnPropertyNames:GX}=Object,WX=Object.prototype.hasOwnProperty,IX=(f,w)=>M0(f,"name",{value:w,configurable:!0}),EX=(f,w)=>{for(var $ in w)M0(f,$,{get:w[$],enumerable:!0})},FX=(f,w,$,G)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let U of GX(w))if(!WX.call(f,U)&&U!==$)M0(f,U,{get:()=>w[U],enumerable:!(G=UX(w,U))||G.enumerable})}return f},LX=(f)=>FX(M0({},"__esModule",{value:!0}),f),fW={};EX(fW,{emitWarningIfUnsupportedVersion:()=>XX});wW.exports=LX(fW);var aG=!1,XX=IX((f)=>{if(f&&!aG&&parseInt(f.substring(1,f.indexOf(".")))<18)aG=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
2
+ no longer support Node.js 16.x on January 6, 2025.
3
+
4
+ To continue receiving updates to AWS services, bug fixes, and security
5
+ updates please upgrade to a supported Node.js LTS version.
6
+
7
+ More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion")});var qW=J((bQ,BW)=>{var Hw=function(f){for(let w=0;w<8;w++)f[w]^=255;for(let w=7;w>-1;w--)if(f[w]++,f[w]!==0)break},K0=Object.defineProperty,QX=Object.getOwnPropertyDescriptor,MX=Object.getOwnPropertyNames,JX=Object.prototype.hasOwnProperty,T=(f,w)=>K0(f,"name",{value:w,configurable:!0}),AX=(f,w)=>{for(var $ in w)K0(f,$,{get:w[$],enumerable:!0})},RX=(f,w,$,G)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let U of MX(w))if(!JX.call(f,U)&&U!==$)K0(f,U,{get:()=>w[U],enumerable:!(G=QX(w,U))||G.enumerable})}return f},YX=(f)=>RX(K0({},"__esModule",{value:!0}),f),EW={};AX(EW,{SignatureV4:()=>nX,clearCredentialCache:()=>uX,createScope:()=>R0,getCanonicalHeaders:()=>qw,getCanonicalQuery:()=>MW,getPayloadHash:()=>Y0,getSigningKey:()=>QW,moveHeadersToQuery:()=>YW,prepareRequest:()=>Vw});BW.exports=YX(EW);var UW=Af(),Yw=bf(),KX="X-Amz-Algorithm",BX="X-Amz-Credential",FW="X-Amz-Date",qX="X-Amz-SignedHeaders",HX="X-Amz-Expires",LW="X-Amz-Signature",XW="X-Amz-Security-Token",ZW="authorization",OW=FW.toLowerCase(),VX="date",TX=[ZW,OW,VX],CX=LW.toLowerCase(),Bw="x-amz-content-sha256",PX=XW.toLowerCase(),NX={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},SX=/^proxy-/,jX=/^sec-/,Kw="AWS4-HMAC-SHA256",bX="AWS4-HMAC-SHA256-PAYLOAD",cX="UNSIGNED-PAYLOAD",hX=50,zW="aws4_request",kX=604800,o=zX(),_X=bf(),Mf={},A0=[],R0=T((f,w,$)=>`${f}/${w}/${$}/${zW}`,"createScope"),QW=T(async(f,w,$,G,U)=>{const W=await GW(f,w.secretAccessKey,w.accessKeyId),I=`${$}:${G}:${U}:${o.toHex(W)}:${w.sessionToken}`;if(I in Mf)return Mf[I];A0.push(I);while(A0.length>hX)delete Mf[A0.shift()];let E=`AWS4${w.secretAccessKey}`;for(let F of[$,G,U,zW])E=await GW(f,E,F);return Mf[I]=E},"getSigningKey"),uX=T(()=>{A0.length=0,Object.keys(Mf).forEach((f)=>{delete Mf[f]})},"clearCredentialCache"),GW=T((f,w,$)=>{const G=new f(w);return G.update(_X.toUint8Array($)),G.digest()},"hmac"),qw=T(({headers:f},w,$)=>{const G={};for(let U of Object.keys(f).sort()){if(f[U]==null)continue;const W=U.toLowerCase();if(W in NX||(w==null?void 0:w.has(W))||SX.test(W)||jX.test(W)){if(!$||$&&!$.has(W))continue}G[W]=f[U].trim().replace(/\s+/g," ")}return G},"getCanonicalHeaders"),jf=OX(),MW=T(({query:f={}})=>{const w=[],$={};for(let G of Object.keys(f).sort()){if(G.toLowerCase()===CX)continue;w.push(G);const U=f[G];if(typeof U==="string")$[G]=`${jf.escapeUri(G)}=${jf.escapeUri(U)}`;else if(Array.isArray(U))$[G]=U.slice(0).reduce((W,I)=>W.concat([`${jf.escapeUri(G)}=${jf.escapeUri(I)}`]),[]).sort().join("&")}return w.map((G)=>$[G]).filter((G)=>G).join("&")},"getCanonicalQuery"),DX=ZX(),vX=bf(),Y0=T(async({headers:f,body:w},$)=>{for(let G of Object.keys(f))if(G.toLowerCase()===Bw)return f[G];if(w==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof w==="string"||ArrayBuffer.isView(w)||DX.isArrayBuffer(w)){const G=new $;return G.update(vX.toUint8Array(w)),o.toHex(await G.digest())}return cX},"getPayloadHash"),WW=bf(),JW=class f{format(w){const $=[];for(let W of Object.keys(w)){const I=WW.fromUtf8(W);$.push(Uint8Array.from([I.byteLength]),I,this.formatHeaderValue(w[W]))}const G=new Uint8Array($.reduce((W,I)=>W+I.byteLength,0));let U=0;for(let W of $)G.set(W,U),U+=W.byteLength;return G}formatHeaderValue(w){switch(w.type){case"boolean":return Uint8Array.from([w.value?0:1]);case"byte":return Uint8Array.from([2,w.value]);case"short":const $=new DataView(new ArrayBuffer(3));return $.setUint8(0,3),$.setInt16(1,w.value,!1),new Uint8Array($.buffer);case"integer":const G=new DataView(new ArrayBuffer(5));return G.setUint8(0,4),G.setInt32(1,w.value,!1),new Uint8Array(G.buffer);case"long":const U=new Uint8Array(9);return U[0]=5,U.set(w.value.bytes,1),U;case"binary":const W=new DataView(new ArrayBuffer(3+w.value.byteLength));W.setUint8(0,6),W.setUint16(1,w.value.byteLength,!1);const I=new Uint8Array(W.buffer);return I.set(w.value,3),I;case"string":const E=WW.fromUtf8(w.value),F=new DataView(new ArrayBuffer(3+E.byteLength));F.setUint8(0,7),F.setUint16(1,E.byteLength,!1);const L=new Uint8Array(F.buffer);return L.set(E,3),L;case"timestamp":const X=new Uint8Array(9);return X[0]=8,X.set(dX.fromNumber(w.value.valueOf()).bytes,1),X;case"uuid":if(!xX.test(w.value))throw new Error(`Invalid UUID received: ${w.value}`);const Z=new Uint8Array(17);return Z[0]=9,Z.set(o.fromHex(w.value.replace(/\-/g,"")),1),Z}}};T(JW,"HeaderFormatter");var yX=JW,xX=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,AW=class f{constructor(w){if(this.bytes=w,w.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(w){if(w>9223372036854776000||w<-9223372036854776000)throw new Error(`${w} is too large (or, if negative, too small) to represent as an Int64`);const $=new Uint8Array(8);for(let G=7,U=Math.abs(Math.round(w));G>-1&&U>0;G--,U/=256)$[G]=U;if(w<0)Hw($);return new f($)}valueOf(){const w=this.bytes.slice(0),$=w[0]&128;if($)Hw(w);return parseInt(o.toHex(w),16)*($?-1:1)}toString(){return String(this.valueOf())}};T(AW,"Int64");var dX=AW;T(Hw,"negate");var pX=T((f,w)=>{f=f.toLowerCase();for(let $ of Object.keys(w))if(f===$.toLowerCase())return!0;return!1},"hasHeader"),RW=Xf(),YW=T((f,w={})=>{var $;const{headers:G,query:U={}}=RW.HttpRequest.clone(f);for(let W of Object.keys(G)){const I=W.toLowerCase();if(I.slice(0,6)==="x-amz-"&&!(($=w.unhoistableHeaders)==null?void 0:$.has(I)))U[W]=G[W],delete G[W]}return{...f,headers:G,query:U}},"moveHeadersToQuery"),Vw=T((f)=>{f=RW.HttpRequest.clone(f);for(let w of Object.keys(f.headers))if(TX.indexOf(w.toLowerCase())>-1)delete f.headers[w];return f},"prepareRequest"),gX=T((f)=>sX(f).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),sX=T((f)=>{if(typeof f==="number")return new Date(f*1000);if(typeof f==="string"){if(Number(f))return new Date(Number(f)*1000);return new Date(f)}return f},"toDate"),KW=class f{constructor({applyChecksum:w,credentials:$,region:G,service:U,sha256:W,uriEscapePath:I=!0}){this.headerFormatter=new yX,this.service=U,this.sha256=W,this.uriEscapePath=I,this.applyChecksum=typeof w==="boolean"?w:!0,this.regionProvider=UW.normalizeProvider(G),this.credentialProvider=UW.normalizeProvider($)}async presign(w,$={}){const{signingDate:G=new Date,expiresIn:U=3600,unsignableHeaders:W,unhoistableHeaders:I,signableHeaders:E,signingRegion:F,signingService:L}=$,X=await this.credentialProvider();this.validateResolvedCredentials(X);const Z=F??await this.regionProvider(),{longDate:z,shortDate:O}=J0(G);if(U>kX)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const M=R0(O,Z,L??this.service),A=YW(Vw(w),{unhoistableHeaders:I});if(X.sessionToken)A.query[XW]=X.sessionToken;A.query[KX]=Kw,A.query[BX]=`${X.accessKeyId}/${M}`,A.query[FW]=z,A.query[HX]=U.toString(10);const Y=qw(A,W,E);return A.query[qX]=IW(Y),A.query[LW]=await this.getSignature(z,M,this.getSigningKey(X,Z,O,L),this.createCanonicalRequest(A,Y,await Y0(w,this.sha256))),A}async sign(w,$){if(typeof w==="string")return this.signString(w,$);else if(w.headers&&w.payload)return this.signEvent(w,$);else if(w.message)return this.signMessage(w,$);else return this.signRequest(w,$)}async signEvent({headers:w,payload:$},{signingDate:G=new Date,priorSignature:U,signingRegion:W,signingService:I}){const E=W??await this.regionProvider(),{shortDate:F,longDate:L}=J0(G),X=R0(F,E,I??this.service),Z=await Y0({headers:{},body:$},this.sha256),z=new this.sha256;z.update(w);const O=o.toHex(await z.digest()),M=[bX,L,X,U,O,Z].join("\n");return this.signString(M,{signingDate:G,signingRegion:E,signingService:I})}async signMessage(w,{signingDate:$=new Date,signingRegion:G,signingService:U}){return this.signEvent({headers:this.headerFormatter.format(w.message.headers),payload:w.message.body},{signingDate:$,signingRegion:G,signingService:U,priorSignature:w.priorSignature}).then((I)=>{return{message:w.message,signature:I}})}async signString(w,{signingDate:$=new Date,signingRegion:G,signingService:U}={}){const W=await this.credentialProvider();this.validateResolvedCredentials(W);const I=G??await this.regionProvider(),{shortDate:E}=J0($),F=new this.sha256(await this.getSigningKey(W,I,E,U));return F.update(Yw.toUint8Array(w)),o.toHex(await F.digest())}async signRequest(w,{signingDate:$=new Date,signableHeaders:G,unsignableHeaders:U,signingRegion:W,signingService:I}={}){const E=await this.credentialProvider();this.validateResolvedCredentials(E);const F=W??await this.regionProvider(),L=Vw(w),{longDate:X,shortDate:Z}=J0($),z=R0(Z,F,I??this.service);if(L.headers[OW]=X,E.sessionToken)L.headers[PX]=E.sessionToken;const O=await Y0(L,this.sha256);if(!pX(Bw,L.headers)&&this.applyChecksum)L.headers[Bw]=O;const M=qw(L,U,G),A=await this.getSignature(X,z,this.getSigningKey(E,F,Z,I),this.createCanonicalRequest(L,M,O));return L.headers[ZW]=`${Kw} Credential=${E.accessKeyId}/${z}, SignedHeaders=${IW(M)}, Signature=${A}`,L}createCanonicalRequest(w,$,G){const U=Object.keys($).sort();return`${w.method}
8
+ ${this.getCanonicalPath(w)}
9
+ ${MW(w)}
10
+ ${U.map((W)=>`${W}:${$[W]}`).join("\n")}
11
+
12
+ ${U.join(";")}
13
+ ${G}`}async createStringToSign(w,$,G){const U=new this.sha256;U.update(Yw.toUint8Array(G));const W=await U.digest();return`${Kw}
14
+ ${w}
15
+ ${$}
16
+ ${o.toHex(W)}`}getCanonicalPath({path:w}){if(this.uriEscapePath){const $=[];for(let W of w.split("/")){if((W==null?void 0:W.length)===0)continue;if(W===".")continue;if(W==="..")$.pop();else $.push(W)}const G=`${(w==null?void 0:w.startsWith("/"))?"/":""}${$.join("/")}${$.length>0&&(w==null?void 0:w.endsWith("/"))?"/":""}`;return jf.escapeUri(G).replace(/%2F/g,"/")}return w}async getSignature(w,$,G,U){const W=await this.createStringToSign(w,$,U),I=new this.sha256(await G);return I.update(Yw.toUint8Array(W)),o.toHex(await I.digest())}getSigningKey(w,$,G,U){return QW(this.sha256,w,G,$,U||this.service)}validateResolvedCredentials(w){if(typeof w!=="object"||typeof w.accessKeyId!=="string"||typeof w.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};T(KW,"SignatureV4");var nX=KW,J0=T((f)=>{const w=gX(f).replace(/[\-:]/g,"");return{longDate:w,shortDate:w.slice(0,8)}},"formatDate"),IW=T((f)=>Object.keys(f).sort().join(";"),"getCanonicalHeaderList")});var cW=J((cQ,bW)=>{var{defineProperty:B0,getOwnPropertyDescriptor:rX,getOwnPropertyNames:lX}=Object,mX=Object.prototype.hasOwnProperty,b=(f,w)=>B0(f,"name",{value:w,configurable:!0}),oX=(f,w)=>{for(var $ in w)B0(f,$,{get:w[$],enumerable:!0})},iX=(f,w,$,G)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let U of lX(w))if(!mX.call(f,U)&&U!==$)B0(f,U,{get:()=>w[U],enumerable:!(G=rX(w,U))||G.enumerable})}return f},tX=(f)=>iX(B0({},"__esModule",{value:!0}),f),PW={};oX(PW,{AWSSDKSigV4Signer:()=>wZ,AwsSdkSigV4ASigner:()=>UZ,AwsSdkSigV4Signer:()=>Pw,NODE_SIGV4A_CONFIG_OPTIONS:()=>IZ,resolveAWSSDKSigV4Config:()=>EZ,resolveAwsSdkSigV4AConfig:()=>WZ,resolveAwsSdkSigV4Config:()=>jW,validateSigningProperties:()=>Cw});bW.exports=tX(PW);var eX=Xf(),aX=Xf(),HW=b((f)=>{var w,$;return aX.HttpResponse.isInstance(f)?((w=f.headers)==null?void 0:w.date)??(($=f.headers)==null?void 0:$.Date):void 0},"getDateHeader"),Tw=b((f)=>new Date(Date.now()+f),"getSkewCorrectedDate"),fZ=b((f,w)=>Math.abs(Tw(w).getTime()-f)>=300000,"isClockSkewed"),VW=b((f,w)=>{const $=Date.parse(f);if(fZ($,w))return $-Date.now();return w},"getUpdatedSystemClockOffset"),cf=b((f,w)=>{if(!w)throw new Error(`Property \`${f}\` is not resolved for AWS SDK SigV4Auth`);return w},"throwSigningPropertyError"),Cw=b(async(f)=>{var w,$,G;const U=cf("context",f.context),W=cf("config",f.config),I=(G=($=(w=U.endpointV2)==null?void 0:w.properties)==null?void 0:$.authSchemes)==null?void 0:G[0],F=await cf("signer",W.signer)(I),L=f==null?void 0:f.signingRegion,X=f==null?void 0:f.signingRegionSet,Z=f==null?void 0:f.signingName;return{config:W,signer:F,signingRegion:L,signingRegionSet:X,signingName:Z}},"validateSigningProperties"),NW=class f{async sign(w,$,G){var U;if(!eX.HttpRequest.isInstance(w))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const W=await Cw(G),{config:I,signer:E}=W;let{signingRegion:F,signingName:L}=W;const X=G.context;if(((U=X==null?void 0:X.authSchemes)==null?void 0:U.length)??0>1){const[z,O]=X.authSchemes;if((z==null?void 0:z.name)==="sigv4a"&&(O==null?void 0:O.name)==="sigv4")F=(O==null?void 0:O.signingRegion)??F,L=(O==null?void 0:O.signingName)??L}return await E.sign(w,{signingDate:Tw(I.systemClockOffset),signingRegion:F,signingService:L})}errorHandler(w){return($)=>{const G=$.ServerTime??HW($.$response);if(G){const U=cf("config",w.config),W=U.systemClockOffset;if(U.systemClockOffset=VW(G,U.systemClockOffset),U.systemClockOffset!==W&&$.$metadata)$.$metadata.clockSkewCorrected=!0}throw $}}successHandler(w,$){const G=HW(w);if(G){const U=cf("config",$.config);U.systemClockOffset=VW(G,U.systemClockOffset)}}};b(NW,"AwsSdkSigV4Signer");var Pw=NW,wZ=Pw,$Z=Xf(),SW=class f extends Pw{async sign(w,$,G){var U;if(!$Z.HttpRequest.isInstance(w))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:W,signer:I,signingRegion:E,signingRegionSet:F,signingName:L}=await Cw(G),Z=(await((U=W.sigv4aSigningRegionSet)==null?void 0:U.call(W))??F??[E]).join(",");return await I.sign(w,{signingDate:Tw(W.systemClockOffset),signingRegion:Z,signingService:L})}};b(SW,"AwsSdkSigV4ASigner");var UZ=SW,GZ=$w(),TW=V0(),WZ=b((f)=>{return f.sigv4aSigningRegionSet=GZ.normalizeProvider(f.sigv4aSigningRegionSet),f},"resolveAwsSdkSigV4AConfig"),IZ={environmentVariableSelector(f){if(f.AWS_SIGV4A_SIGNING_REGION_SET)return f.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((w)=>w.trim());throw new TW.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(f){if(f.sigv4a_signing_region_set)return(f.sigv4a_signing_region_set??"").split(",").map((w)=>w.trim());throw new TW.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},ff=$w(),CW=qW(),jW=b((f)=>{let w;if(f.credentials)w=ff.memoizeIdentityProvider(f.credentials,ff.isIdentityExpired,ff.doesIdentityRequireRefresh);if(!w)if(f.credentialDefaultProvider)w=ff.normalizeProvider(f.credentialDefaultProvider(Object.assign({},f,{parentClientConfig:f})));else w=b(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:$=!0,systemClockOffset:G=f.systemClockOffset||0,sha256:U}=f;let W;if(f.signer)W=ff.normalizeProvider(f.signer);else if(f.regionInfoProvider)W=b(()=>ff.normalizeProvider(f.region)().then(async(I)=>[await f.regionInfoProvider(I,{useFipsEndpoint:await f.useFipsEndpoint(),useDualstackEndpoint:await f.useDualstackEndpoint()})||{},I]).then(([I,E])=>{const{signingRegion:F,signingService:L}=I;f.signingRegion=f.signingRegion||F||E,f.signingName=f.signingName||L||f.serviceId;const X={...f,credentials:w,region:f.signingRegion,service:f.signingName,sha256:U,uriEscapePath:$};return new(f.signerConstructor||CW.SignatureV4)(X)}),"signer");else W=b(async(I)=>{I=Object.assign({},{name:"sigv4",signingName:f.signingName||f.defaultSigningName,signingRegion:await ff.normalizeProvider(f.region)(),properties:{}},I);const{signingRegion:E,signingName:F}=I;f.signingRegion=f.signingRegion||E,f.signingName=f.signingName||F||f.serviceId;const L={...f,credentials:w,region:f.signingRegion,service:f.signingName,sha256:U,uriEscapePath:$};return new(f.signerConstructor||CW.SignatureV4)(L)},"signer");return{...f,systemClockOffset:G,signingEscapePath:$,credentials:w,signer:W}},"resolveAwsSdkSigV4Config"),EZ=jW});var q0=J((OZ)=>{var FZ=":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",hW="[: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]["+FZ+"]*",LZ=new RegExp("^"+hW+"$"),XZ=function(f,w){const $=[];let G=w.exec(f);while(G){const U=[];U.startIndex=w.lastIndex-G[0].length;const W=G.length;for(let I=0;I<W;I++)U.push(G[I]);$.push(U),G=w.exec(f)}return $},ZZ=function(f){const w=LZ.exec(f);return!(w===null||typeof w==="undefined")};OZ.isExist=function(f){return typeof f!=="undefined"};OZ.isEmptyObject=function(f){return Object.keys(f).length===0};OZ.merge=function(f,w,$){if(w){const G=Object.keys(w),U=G.length;for(let W=0;W<U;W++)if($==="strict")f[G[W]]=[w[G[W]]];else f[G[W]]=w[G[W]]}};OZ.getValue=function(f){if(OZ.isExist(f))return f;else return""};OZ.isName=ZZ;OZ.getAllMatches=XZ;OZ.nameRegexp=hW});var Sw=J((NZ)=>{var _W=function(f){return f===" "||f==="\t"||f==="\n"||f==="\r"},uW=function(f,w){const $=w;for(;w<f.length;w++)if(f[w]=="?"||f[w]==" "){const G=f.substr($,w-$);if(w>5&&G==="xml")return H("InvalidXml","XML declaration allowed only at the start of the document.",S(f,w));else if(f[w]=="?"&&f[w+1]==">"){w++;break}else continue}return w},DW=function(f,w){if(f.length>w+5&&f[w+1]==="-"&&f[w+2]==="-"){for(w+=3;w<f.length;w++)if(f[w]==="-"&&f[w+1]==="-"&&f[w+2]===">"){w+=2;break}}else if(f.length>w+8&&f[w+1]==="D"&&f[w+2]==="O"&&f[w+3]==="C"&&f[w+4]==="T"&&f[w+5]==="Y"&&f[w+6]==="P"&&f[w+7]==="E"){let $=1;for(w+=8;w<f.length;w++)if(f[w]==="<")$++;else if(f[w]===">"){if($--,$===0)break}}else if(f.length>w+9&&f[w+1]==="["&&f[w+2]==="C"&&f[w+3]==="D"&&f[w+4]==="A"&&f[w+5]==="T"&&f[w+6]==="A"&&f[w+7]==="["){for(w+=8;w<f.length;w++)if(f[w]==="]"&&f[w+1]==="]"&&f[w+2]===">"){w+=2;break}}return w},qZ=function(f,w){let $="",G="",U=!1;for(;w<f.length;w++){if(f[w]===KZ||f[w]===BZ)if(G==="")G=f[w];else if(G!==f[w]);else G="";else if(f[w]===">"){if(G===""){U=!0;break}}$+=f[w]}if(G!=="")return!1;return{value:$,index:w,tagClosed:U}},vW=function(f,w){const $=Nw.getAllMatches(f,HZ),G={};for(let U=0;U<$.length;U++){if($[U][1].length===0)return H("InvalidAttr","Attribute '"+$[U][2]+"' has no space in starting.",hf($[U]));else if($[U][3]!==void 0&&$[U][4]===void 0)return H("InvalidAttr","Attribute '"+$[U][2]+"' is without value.",hf($[U]));else if($[U][3]===void 0&&!w.allowBooleanAttributes)return H("InvalidAttr","boolean attribute '"+$[U][2]+"' is not allowed.",hf($[U]));const W=$[U][2];if(!CZ(W))return H("InvalidAttr","Attribute '"+W+"' is an invalid name.",hf($[U]));if(!G.hasOwnProperty(W))G[W]=1;else return H("InvalidAttr","Attribute '"+W+"' is repeated.",hf($[U]))}return!0},VZ=function(f,w){let $=/\d/;if(f[w]==="x")w++,$=/[\da-fA-F]/;for(;w<f.length;w++){if(f[w]===";")return w;if(!f[w].match($))break}return-1},TZ=function(f,w){if(w++,f[w]===";")return-1;if(f[w]==="#")return w++,VZ(f,w);let $=0;for(;w<f.length;w++,$++){if(f[w].match(/\w/)&&$<20)continue;if(f[w]===";")break;return-1}return w},H=function(f,w,$){return{err:{code:f,msg:w,line:$.line||$,col:$.col}}},CZ=function(f){return Nw.isName(f)},PZ=function(f){return Nw.isName(f)},S=function(f,w){const $=f.substring(0,w).split(/\r?\n/);return{line:$.length,col:$[$.length-1].length+1}},hf=function(f){return f.startIndex+f[1].length},Nw=q0(),YZ={allowBooleanAttributes:!1,unpairedTags:[]};NZ.validate=function(f,w){w=Object.assign({},YZ,w);const $=[];let G=!1,U=!1;if(f[0]==="\uFEFF")f=f.substr(1);for(let W=0;W<f.length;W++)if(f[W]==="<"&&f[W+1]==="?"){if(W+=2,W=uW(f,W),W.err)return W}else if(f[W]==="<"){let I=W;if(W++,f[W]==="!"){W=DW(f,W);continue}else{let E=!1;if(f[W]==="/")E=!0,W++;let F="";for(;W<f.length&&f[W]!==">"&&f[W]!==" "&&f[W]!=="\t"&&f[W]!=="\n"&&f[W]!=="\r";W++)F+=f[W];if(F=F.trim(),F[F.length-1]==="/")F=F.substring(0,F.length-1),W--;if(!PZ(F)){let Z;if(F.trim().length===0)Z="Invalid space after '<'.";else Z="Tag '"+F+"' is an invalid name.";return H("InvalidTag",Z,S(f,W))}const L=qZ(f,W);if(L===!1)return H("InvalidAttr","Attributes for '"+F+"' have open quote.",S(f,W));let X=L.value;if(W=L.index,X[X.length-1]==="/"){const Z=W-X.length;X=X.substring(0,X.length-1);const z=vW(X,w);if(z===!0)G=!0;else return H(z.err.code,z.err.msg,S(f,Z+z.err.line))}else if(E)if(!L.tagClosed)return H("InvalidTag","Closing tag '"+F+"' doesn't have proper closing.",S(f,W));else if(X.trim().length>0)return H("InvalidTag","Closing tag '"+F+"' can't have attributes or invalid starting.",S(f,I));else if($.length===0)return H("InvalidTag","Closing tag '"+F+"' has not been opened.",S(f,I));else{const Z=$.pop();if(F!==Z.tagName){let z=S(f,Z.tagStartPos);return H("InvalidTag","Expected closing tag '"+Z.tagName+"' (opened in line "+z.line+", col "+z.col+") instead of closing tag '"+F+"'.",S(f,I))}if($.length==0)U=!0}else{const Z=vW(X,w);if(Z!==!0)return H(Z.err.code,Z.err.msg,S(f,W-X.length+Z.err.line));if(U===!0)return H("InvalidXml","Multiple possible root nodes found.",S(f,W));else if(w.unpairedTags.indexOf(F)!==-1);else $.push({tagName:F,tagStartPos:I});G=!0}for(W++;W<f.length;W++)if(f[W]==="<")if(f[W+1]==="!"){W++,W=DW(f,W);continue}else if(f[W+1]==="?"){if(W=uW(f,++W),W.err)return W}else break;else if(f[W]==="&"){const Z=TZ(f,W);if(Z==-1)return H("InvalidChar","char '&' is not expected.",S(f,W));W=Z}else if(U===!0&&!_W(f[W]))return H("InvalidXml","Extra text at the end",S(f,W));if(f[W]==="<")W--}}else{if(_W(f[W]))continue;return H("InvalidChar","char '"+f[W]+"' is not expected.",S(f,W))}if(!G)return H("InvalidXml","Start tag expected.",1);else if($.length==1)return H("InvalidTag","Unclosed tag '"+$[0].tagName+"'.",S(f,$[0].tagStartPos));else if($.length>0)return H("InvalidXml","Invalid '"+JSON.stringify($.map((W)=>W.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var KZ='"',BZ="'",HZ=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var xW=J((bZ)=>{var yW={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(f,w){return w},attributeValueProcessor:function(f,w){return w},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(f,w,$){return f}},jZ=function(f){return Object.assign({},yW,f)};bZ.buildOptions=jZ;bZ.defaultOptions=yW});var gW=J((uQ,pW)=>{class dW{constructor(f){this.tagname=f,this.child=[],this[":@"]={}}add(f,w){if(f==="__proto__")f="#__proto__";this.child.push({[f]:w})}addChild(f){if(f.tagname==="__proto__")f.tagname="#__proto__";if(f[":@"]&&Object.keys(f[":@"]).length>0)this.child.push({[f.tagname]:f.child,[":@"]:f[":@"]});else this.child.push({[f.tagname]:f.child})}}pW.exports=dW});var nW=J((DQ,sW)=>{var _Z=function(f,w){const $={};if(f[w+3]==="O"&&f[w+4]==="C"&&f[w+5]==="T"&&f[w+6]==="Y"&&f[w+7]==="P"&&f[w+8]==="E"){w=w+9;let G=1,U=!1,W=!1,I="";for(;w<f.length;w++)if(f[w]==="<"&&!W){if(U&&vZ(f,w)){if(w+=7,[entityName,val,w]=uZ(f,w+1),val.indexOf("&")===-1)$[pZ(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(U&&yZ(f,w))w+=8;else if(U&&xZ(f,w))w+=8;else if(U&&dZ(f,w))w+=9;else if(DZ)W=!0;else throw new Error("Invalid DOCTYPE");G++,I=""}else if(f[w]===">"){if(W){if(f[w-1]==="-"&&f[w-2]==="-")W=!1,G--}else G--;if(G===0)break}else if(f[w]==="[")U=!0;else I+=f[w];if(G!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:$,i:w}},uZ=function(f,w){let $="";for(;w<f.length&&(f[w]!=="'"&&f[w]!=='"');w++)$+=f[w];if($=$.trim(),$.indexOf(" ")!==-1)throw new Error("External entites are not supported");const G=f[w++];let U="";for(;w<f.length&&f[w]!==G;w++)U+=f[w];return[$,U,w]},DZ=function(f,w){if(f[w+1]==="!"&&f[w+2]==="-"&&f[w+3]==="-")return!0;return!1},vZ=function(f,w){if(f[w+1]==="!"&&f[w+2]==="E"&&f[w+3]==="N"&&f[w+4]==="T"&&f[w+5]==="I"&&f[w+6]==="T"&&f[w+7]==="Y")return!0;return!1},yZ=function(f,w){if(f[w+1]==="!"&&f[w+2]==="E"&&f[w+3]==="L"&&f[w+4]==="E"&&f[w+5]==="M"&&f[w+6]==="E"&&f[w+7]==="N"&&f[w+8]==="T")return!0;return!1},xZ=function(f,w){if(f[w+1]==="!"&&f[w+2]==="A"&&f[w+3]==="T"&&f[w+4]==="T"&&f[w+5]==="L"&&f[w+6]==="I"&&f[w+7]==="S"&&f[w+8]==="T")return!0;return!1},dZ=function(f,w){if(f[w+1]==="!"&&f[w+2]==="N"&&f[w+3]==="O"&&f[w+4]==="T"&&f[w+5]==="A"&&f[w+6]==="T"&&f[w+7]==="I"&&f[w+8]==="O"&&f[w+9]==="N")return!0;return!1},pZ=function(f){if(kZ.isName(f))return f;else throw new Error(`Invalid entity name ${f}`)},kZ=q0();sW.exports=_Z});var lW=J((vQ,rW)=>{var rZ=function(f,w={}){if(w=Object.assign({},nZ,w),!f||typeof f!=="string")return f;let $=f.trim();if(w.skipLike!==void 0&&w.skipLike.test($))return f;else if(w.hex&&gZ.test($))return Number.parseInt($,16);else{const G=sZ.exec($);if(G){const U=G[1],W=G[2];let I=lZ(G[3]);const E=G[4]||G[6];if(!w.leadingZeros&&W.length>0&&U&&$[2]!==".")return f;else if(!w.leadingZeros&&W.length>0&&!U&&$[1]!==".")return f;else{const F=Number($),L=""+F;if(L.search(/[eE]/)!==-1)if(w.eNotation)return F;else return f;else if(E)if(w.eNotation)return F;else return f;else if($.indexOf(".")!==-1)if(L==="0"&&I==="")return F;else if(L===I)return F;else if(U&&L==="-"+I)return F;else return f;if(W)if(I===L)return F;else if(U+I===L)return F;else return f;if($===L)return F;else if($===U+L)return F;return f}}else return f}},lZ=function(f){if(f&&f.indexOf(".")!==-1){if(f=f.replace(/0+$/,""),f===".")f="0";else if(f[0]===".")f="0"+f;else if(f[f.length-1]===".")f=f.substr(0,f.length-1);return f}return f},gZ=/^[-+]?0x[a-fA-F0-9]+$/,sZ=/^([\-\+])?(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 nZ={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};rW.exports=rZ});var tW=J((yQ,iW)=>{var iZ=function(f){const w=Object.keys(f);for(let $=0;$<w.length;$++){const G=w[$];this.lastEntities[G]={regex:new RegExp("&"+G+";","g"),val:f[G]}}},tZ=function(f,w,$,G,U,W,I){if(f!==void 0){if(this.options.trimValues&&!G)f=f.trim();if(f.length>0){if(!I)f=this.replaceEntitiesValue(f);const E=this.options.tagValueProcessor(w,f,$,U,W);if(E===null||E===void 0)return f;else if(typeof E!==typeof f||E!==f)return E;else if(this.options.trimValues)return bw(f,this.options.parseTagValue,this.options.numberParseOptions);else if(f.trim()===f)return bw(f,this.options.parseTagValue,this.options.numberParseOptions);else return f}}},eZ=function(f){if(this.options.removeNSPrefix){const w=f.split(":"),$=f.charAt(0)==="/"?"/":"";if(w[0]==="xmlns")return"";if(w.length===2)f=$+w[1]}return f},f4=function(f,w,$){if(!this.options.ignoreAttributes&&typeof f==="string"){const G=mW.getAllMatches(f,aZ),U=G.length,W={};for(let I=0;I<U;I++){const E=this.resolveNameSpace(G[I][1]);let F=G[I][4],L=this.options.attributeNamePrefix+E;if(E.length){if(this.options.transformAttributeName)L=this.options.transformAttributeName(L);if(L==="__proto__")L="#__proto__";if(F!==void 0){if(this.options.trimValues)F=F.trim();F=this.replaceEntitiesValue(F);const X=this.options.attributeValueProcessor(E,F,w);if(X===null||X===void 0)W[L]=F;else if(typeof X!==typeof F||X!==F)W[L]=X;else W[L]=bw(F,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)W[L]=!0}}if(!Object.keys(W).length)return;if(this.options.attributesGroupName){const I={};return I[this.options.attributesGroupName]=W,I}return W}},$4=function(f,w,$){const G=this.options.updateTag(w.tagname,$,w[":@"]);if(G===!1);else if(typeof G==="string")w.tagname=G,f.addChild(w);else f.addChild(w)},G4=function(f,w,$,G){if(f){if(G===void 0)G=Object.keys(w.child).length===0;if(f=this.parseTextData(f,w.tagname,$,!1,w[":@"]?Object.keys(w[":@"]).length!==0:!1,G),f!==void 0&&f!=="")w.add(this.options.textNodeName,f);f=""}return f},W4=function(f,w,$){const G="*."+$;for(let U in f){const W=f[U];if(G===W||w===W)return!0}return!1},I4=function(f,w,$=">"){let G,U="";for(let W=w;W<f.length;W++){let I=f[W];if(G){if(I===G)G=""}else if(I==='"'||I==="'")G=I;else if(I===$[0])if($[1]){if(f[W+1]===$[1])return{data:U,index:W}}else return{data:U,index:W};else if(I==="\t")I=" ";U+=I}},wf=function(f,w,$,G){const U=f.indexOf(w,$);if(U===-1)throw new Error(G);else return U+w.length-1},jw=function(f,w,$,G=">"){const U=I4(f,w+1,G);if(!U)return;let W=U.data;const I=U.index,E=W.search(/\s/);let F=W,L=!0;if(E!==-1)F=W.substring(0,E),W=W.substring(E+1).trimStart();const X=F;if($){const Z=F.indexOf(":");if(Z!==-1)F=F.substr(Z+1),L=F!==U.data.substr(Z+1)}return{tagName:F,tagExp:W,closeIndex:I,attrExpPresent:L,rawTagName:X}},E4=function(f,w,$){const G=$;let U=1;for(;$<f.length;$++)if(f[$]==="<")if(f[$+1]==="/"){const W=wf(f,">",$,`${w} is not closed`);if(f.substring($+2,W).trim()===w){if(U--,U===0)return{tagContent:f.substring(G,$),i:W}}$=W}else if(f[$+1]==="?")$=wf(f,"?>",$+1,"StopNode is not closed.");else if(f.substr($+1,3)==="!--")$=wf(f,"-->",$+3,"StopNode is not closed.");else if(f.substr($+1,2)==="![")$=wf(f,"]]>",$,"StopNode is not closed.")-2;else{const W=jw(f,$,">");if(W){if((W&&W.tagName)===w&&W.tagExp[W.tagExp.length-1]!=="/")U++;$=W.closeIndex}}},bw=function(f,w,$){if(w&&typeof f==="string"){const G=f.trim();if(G==="true")return!0;else if(G==="false")return!1;else return oZ(f,$)}else if(mW.isExist(f))return f;else return""},mW=q0(),kf=gW(),mZ=nW(),oZ=lW();class oW{constructor(f){this.options=f,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:"\""}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(w,$)=>String.fromCharCode(Number.parseInt($,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(w,$)=>String.fromCharCode(Number.parseInt($,16))}},this.addExternalEntities=iZ,this.parseXml=w4,this.parseTextData=tZ,this.resolveNameSpace=eZ,this.buildAttributesMap=f4,this.isItStopNode=W4,this.replaceEntitiesValue=U4,this.readStopNodeData=E4,this.saveTextToParentTag=G4,this.addChild=$4}}var aZ=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),w4=function(f){f=f.replace(/\r\n?/g,"\n");const w=new kf("!xml");let $=w,G="",U="";for(let W=0;W<f.length;W++)if(f[W]==="<")if(f[W+1]==="/"){const E=wf(f,">",W,"Closing Tag is not closed.");let F=f.substring(W+2,E).trim();if(this.options.removeNSPrefix){const Z=F.indexOf(":");if(Z!==-1)F=F.substr(Z+1)}if(this.options.transformTagName)F=this.options.transformTagName(F);if($)G=this.saveTextToParentTag(G,$,U);const L=U.substring(U.lastIndexOf(".")+1);if(F&&this.options.unpairedTags.indexOf(F)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${F}>`);let X=0;if(L&&this.options.unpairedTags.indexOf(L)!==-1)X=U.lastIndexOf(".",U.lastIndexOf(".")-1),this.tagsNodeStack.pop();else X=U.lastIndexOf(".");U=U.substring(0,X),$=this.tagsNodeStack.pop(),G="",W=E}else if(f[W+1]==="?"){let E=jw(f,W,!1,"?>");if(!E)throw new Error("Pi Tag is not closed.");if(G=this.saveTextToParentTag(G,$,U),this.options.ignoreDeclaration&&E.tagName==="?xml"||this.options.ignorePiTags);else{const F=new kf(E.tagName);if(F.add(this.options.textNodeName,""),E.tagName!==E.tagExp&&E.attrExpPresent)F[":@"]=this.buildAttributesMap(E.tagExp,U,E.tagName);this.addChild($,F,U)}W=E.closeIndex+1}else if(f.substr(W+1,3)==="!--"){const E=wf(f,"-->",W+4,"Comment is not closed.");if(this.options.commentPropName){const F=f.substring(W+4,E-2);G=this.saveTextToParentTag(G,$,U),$.add(this.options.commentPropName,[{[this.options.textNodeName]:F}])}W=E}else if(f.substr(W+1,2)==="!D"){const E=mZ(f,W);this.docTypeEntities=E.entities,W=E.i}else if(f.substr(W+1,2)==="!["){const E=wf(f,"]]>",W,"CDATA is not closed.")-2,F=f.substring(W+9,E);G=this.saveTextToParentTag(G,$,U);let L=this.parseTextData(F,$.tagname,U,!0,!1,!0,!0);if(L==null)L="";if(this.options.cdataPropName)$.add(this.options.cdataPropName,[{[this.options.textNodeName]:F}]);else $.add(this.options.textNodeName,L);W=E+2}else{let E=jw(f,W,this.options.removeNSPrefix),F=E.tagName;const L=E.rawTagName;let{tagExp:X,attrExpPresent:Z,closeIndex:z}=E;if(this.options.transformTagName)F=this.options.transformTagName(F);if($&&G){if($.tagname!=="!xml")G=this.saveTextToParentTag(G,$,U,!1)}const O=$;if(O&&this.options.unpairedTags.indexOf(O.tagname)!==-1)$=this.tagsNodeStack.pop(),U=U.substring(0,U.lastIndexOf("."));if(F!==w.tagname)U+=U?"."+F:F;if(this.isItStopNode(this.options.stopNodes,U,F)){let M="";if(X.length>0&&X.lastIndexOf("/")===X.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),U=U.substr(0,U.length-1),X=F;else X=X.substr(0,X.length-1);W=E.closeIndex}else if(this.options.unpairedTags.indexOf(F)!==-1)W=E.closeIndex;else{const Y=this.readStopNodeData(f,L,z+1);if(!Y)throw new Error(`Unexpected end of ${L}`);W=Y.i,M=Y.tagContent}const A=new kf(F);if(F!==X&&Z)A[":@"]=this.buildAttributesMap(X,U,F);if(M)M=this.parseTextData(M,F,U,!0,Z,!0,!0);U=U.substr(0,U.lastIndexOf(".")),A.add(this.options.textNodeName,M),this.addChild($,A,U)}else{if(X.length>0&&X.lastIndexOf("/")===X.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),U=U.substr(0,U.length-1),X=F;else X=X.substr(0,X.length-1);if(this.options.transformTagName)F=this.options.transformTagName(F);const M=new kf(F);if(F!==X&&Z)M[":@"]=this.buildAttributesMap(X,U,F);this.addChild($,M,U),U=U.substr(0,U.lastIndexOf("."))}else{const M=new kf(F);if(this.tagsNodeStack.push($),F!==X&&Z)M[":@"]=this.buildAttributesMap(X,U,F);this.addChild($,M,U),$=M}G="",W=z}}else G+=f[W];return w.child},U4=function(f){if(this.options.processEntities){for(let w in this.docTypeEntities){const $=this.docTypeEntities[w];f=f.replace($.regx,$.val)}for(let w in this.lastEntities){const $=this.lastEntities[w];f=f.replace($.regex,$.val)}if(this.options.htmlEntities)for(let w in this.htmlEntities){const $=this.htmlEntities[w];f=f.replace($.regex,$.val)}f=f.replace(this.ampEntity.regex,this.ampEntity.val)}return f};iW.exports=oW});var aW=J((O4)=>{var F4=function(f,w){return eW(f,w)},eW=function(f,w,$){let G;const U={};for(let W=0;W<f.length;W++){const I=f[W],E=L4(I);let F="";if($===void 0)F=E;else F=$+"."+E;if(E===w.textNodeName)if(G===void 0)G=I[E];else G+=""+I[E];else if(E===void 0)continue;else if(I[E]){let L=eW(I[E],w,F);const X=Z4(L,w);if(I[":@"])X4(L,I[":@"],F,w);else if(Object.keys(L).length===1&&L[w.textNodeName]!==void 0&&!w.alwaysCreateTextNode)L=L[w.textNodeName];else if(Object.keys(L).length===0)if(w.alwaysCreateTextNode)L[w.textNodeName]="";else L="";if(U[E]!==void 0&&U.hasOwnProperty(E)){if(!Array.isArray(U[E]))U[E]=[U[E]];U[E].push(L)}else if(w.isArray(E,F,X))U[E]=[L];else U[E]=L}}if(typeof G==="string"){if(G.length>0)U[w.textNodeName]=G}else if(G!==void 0)U[w.textNodeName]=G;return U},L4=function(f){const w=Object.keys(f);for(let $=0;$<w.length;$++){const G=w[$];if(G!==":@")return G}},X4=function(f,w,$,G){if(w){const U=Object.keys(w),W=U.length;for(let I=0;I<W;I++){const E=U[I];if(G.isArray(E,$+"."+E,!0,!0))f[E]=[w[E]];else f[E]=w[E]}}},Z4=function(f,w){const{textNodeName:$}=w,G=Object.keys(f).length;if(G===0)return!0;if(G===1&&(f[$]||typeof f[$]==="boolean"||f[$]===0))return!0;return!1};O4.prettify=F4});var $I=J((dQ,wI)=>{var{buildOptions:Q4}=xW(),M4=tW(),{prettify:J4}=aW(),A4=Sw();class fI{constructor(f){this.externalEntities={},this.options=Q4(f)}parse(f,w){if(typeof f==="string");else if(f.toString)f=f.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(w){if(w===!0)w={};const U=A4.validate(f,w);if(U!==!0)throw Error(`${U.err.msg}:${U.err.line}:${U.err.col}`)}const $=new M4(this.options);$.addExternalEntities(this.externalEntities);const G=$.parseXml(f);if(this.options.preserveOrder||G===void 0)return G;else return J4(G,this.options)}addEntity(f,w){if(w.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if(f.indexOf("&")!==-1||f.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(w==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[f]=w}}wI.exports=fI});var EI=J((pQ,II)=>{var R4=function(f,w){let $="";if(w.format&&w.indentBy.length>0)$="\n";return GI(f,w,"",$)},GI=function(f,w,$,G){let U="",W=!1;for(let I=0;I<f.length;I++){const E=f[I],F=Y4(E);if(F===void 0)continue;let L="";if($.length===0)L=F;else L=`${$}.${F}`;if(F===w.textNodeName){let M=E[F];if(!K4(L,w))M=w.tagValueProcessor(F,M),M=WI(M,w);if(W)U+=G;U+=M,W=!1;continue}else if(F===w.cdataPropName){if(W)U+=G;U+=`<![CDATA[${E[F][0][w.textNodeName]}]]>`,W=!1;continue}else if(F===w.commentPropName){U+=G+`<!--${E[F][0][w.textNodeName]}-->`,W=!0;continue}else if(F[0]==="?"){const M=UI(E[":@"],w),A=F==="?xml"?"":G;let Y=E[F][0][w.textNodeName];Y=Y.length!==0?" "+Y:"",U+=A+`<${F}${Y}${M}?>`,W=!0;continue}let X=G;if(X!=="")X+=w.indentBy;const Z=UI(E[":@"],w),z=G+`<${F}${Z}`,O=GI(E[F],w,L,X);if(w.unpairedTags.indexOf(F)!==-1)if(w.suppressUnpairedNode)U+=z+">";else U+=z+"/>";else if((!O||O.length===0)&&w.suppressEmptyNode)U+=z+"/>";else if(O&&O.endsWith(">"))U+=z+`>${O}${G}</${F}>`;else{if(U+=z+">",O&&G!==""&&(O.includes("/>")||O.includes("</")))U+=G+w.indentBy+O+G;else U+=O;U+=`</${F}>`}W=!0}return U},Y4=function(f){const w=Object.keys(f);for(let $=0;$<w.length;$++){const G=w[$];if(!f.hasOwnProperty(G))continue;if(G!==":@")return G}},UI=function(f,w){let $="";if(f&&!w.ignoreAttributes)for(let G in f){if(!f.hasOwnProperty(G))continue;let U=w.attributeValueProcessor(G,f[G]);if(U=WI(U,w),U===!0&&w.suppressBooleanAttributes)$+=` ${G.substr(w.attributeNamePrefix.length)}`;else $+=` ${G.substr(w.attributeNamePrefix.length)}="${U}"`}return $},K4=function(f,w){f=f.substr(0,f.length-w.textNodeName.length-1);let $=f.substr(f.lastIndexOf(".")+1);for(let G in w.stopNodes)if(w.stopNodes[G]===f||w.stopNodes[G]==="*."+$)return!0;return!1},WI=function(f,w){if(f&&f.length>0&&w.processEntities)for(let $=0;$<w.entities.length;$++){const G=w.entities[$];f=f.replace(G.regex,G.val)}return f};II.exports=R4});var LI=J((gQ,FI)=>{var i=function(f){if(this.options=Object.assign({},q4,f),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=T4;if(this.processTextOrObjNode=H4,this.options.format)this.indentate=V4,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},H4=function(f,w,$){const G=this.j2x(f,$+1);if(f[this.options.textNodeName]!==void 0&&Object.keys(f).length===1)return this.buildTextValNode(f[this.options.textNodeName],w,G.attrStr,$);else return this.buildObjectNode(G.val,w,G.attrStr,$)},V4=function(f){return this.options.indentBy.repeat(f)},T4=function(f){if(f.startsWith(this.options.attributeNamePrefix)&&f!==this.options.textNodeName)return f.substr(this.attrPrefixLen);else return!1},B4=EI(),q4={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(f,w){return w},attributeValueProcessor:function(f,w){return w},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("\'","g"),val:"&apos;"},{regex:new RegExp("\"","g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};i.prototype.build=function(f){if(this.options.preserveOrder)return B4(f,this.options);else{if(Array.isArray(f)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)f={[this.options.arrayNodeName]:f};return this.j2x(f,0).val}};i.prototype.j2x=function(f,w){let $="",G="";for(let U in f){if(!Object.prototype.hasOwnProperty.call(f,U))continue;if(typeof f[U]==="undefined"){if(this.isAttribute(U))G+=""}else if(f[U]===null)if(this.isAttribute(U))G+="";else if(U[0]==="?")G+=this.indentate(w)+"<"+U+"?"+this.tagEndChar;else G+=this.indentate(w)+"<"+U+"/"+this.tagEndChar;else if(f[U]instanceof Date)G+=this.buildTextValNode(f[U],U,"",w);else if(typeof f[U]!=="object"){const W=this.isAttribute(U);if(W)$+=this.buildAttrPairStr(W,""+f[U]);else if(U===this.options.textNodeName){let I=this.options.tagValueProcessor(U,""+f[U]);G+=this.replaceEntitiesValue(I)}else G+=this.buildTextValNode(f[U],U,"",w)}else if(Array.isArray(f[U])){const W=f[U].length;let I="",E="";for(let F=0;F<W;F++){const L=f[U][F];if(typeof L==="undefined");else if(L===null)if(U[0]==="?")G+=this.indentate(w)+"<"+U+"?"+this.tagEndChar;else G+=this.indentate(w)+"<"+U+"/"+this.tagEndChar;else if(typeof L==="object")if(this.options.oneListGroup){const X=this.j2x(L,w+1);if(I+=X.val,this.options.attributesGroupName&&L.hasOwnProperty(this.options.attributesGroupName))E+=X.attrStr}else I+=this.processTextOrObjNode(L,U,w);else if(this.options.oneListGroup){let X=this.options.tagValueProcessor(U,L);X=this.replaceEntitiesValue(X),I+=X}else I+=this.buildTextValNode(L,U,"",w)}if(this.options.oneListGroup)I=this.buildObjectNode(I,U,E,w);G+=I}else if(this.options.attributesGroupName&&U===this.options.attributesGroupName){const W=Object.keys(f[U]),I=W.length;for(let E=0;E<I;E++)$+=this.buildAttrPairStr(W[E],""+f[U][W[E]])}else G+=this.processTextOrObjNode(f[U],U,w)}return{attrStr:$,val:G}};i.prototype.buildAttrPairStr=function(f,w){if(w=this.options.attributeValueProcessor(f,""+w),w=this.replaceEntitiesValue(w),this.options.suppressBooleanAttributes&&w==="true")return" "+f;else return" "+f+'="'+w+'"'};i.prototype.buildObjectNode=function(f,w,$,G){if(f==="")if(w[0]==="?")return this.indentate(G)+"<"+w+$+"?"+this.tagEndChar;else return this.indentate(G)+"<"+w+$+this.closeTag(w)+this.tagEndChar;else{let U="</"+w+this.tagEndChar,W="";if(w[0]==="?")W="?",U="";if(($||$==="")&&f.indexOf("<")===-1)return this.indentate(G)+"<"+w+$+W+">"+f+U;else if(this.options.commentPropName!==!1&&w===this.options.commentPropName&&W.length===0)return this.indentate(G)+`<!--${f}-->`+this.newLine;else return this.indentate(G)+"<"+w+$+W+this.tagEndChar+f+this.indentate(G)+U}};i.prototype.closeTag=function(f){let w="";if(this.options.unpairedTags.indexOf(f)!==-1){if(!this.options.suppressUnpairedNode)w="/"}else if(this.options.suppressEmptyNode)w="/";else w=`></${f}`;return w};i.prototype.buildTextValNode=function(f,w,$,G){if(this.options.cdataPropName!==!1&&w===this.options.cdataPropName)return this.indentate(G)+`<![CDATA[${f}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&w===this.options.commentPropName)return this.indentate(G)+`<!--${f}-->`+this.newLine;else if(w[0]==="?")return this.indentate(G)+"<"+w+$+"?"+this.tagEndChar;else{let U=this.options.tagValueProcessor(w,f);if(U=this.replaceEntitiesValue(U),U==="")return this.indentate(G)+"<"+w+$+this.closeTag(w)+this.tagEndChar;else return this.indentate(G)+"<"+w+$+">"+U+"</"+w+this.tagEndChar}};i.prototype.replaceEntitiesValue=function(f){if(f&&f.length>0&&this.options.processEntities)for(let w=0;w<this.options.entities.length;w++){const $=this.options.entities[w];f=f.replace($.regex,$.val)}return f};FI.exports=i});var ZI=J((sQ,XI)=>{var C4=Sw(),P4=$I(),N4=LI();XI.exports={XMLParser:P4,XMLValidator:C4,XMLBuilder:N4}});var AI=J((nQ,JI)=>{var{defineProperty:H0,getOwnPropertyDescriptor:S4,getOwnPropertyNames:j4}=Object,b4=Object.prototype.hasOwnProperty,c=(f,w)=>H0(f,"name",{value:w,configurable:!0}),c4=(f,w)=>{for(var $ in w)H0(f,$,{get:w[$],enumerable:!0})},h4=(f,w,$,G)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let U of j4(w))if(!b4.call(f,U)&&U!==$)H0(f,U,{get:()=>w[U],enumerable:!(G=S4(w,U))||G.enumerable})}return f},k4=(f)=>h4(H0({},"__esModule",{value:!0}),f),OI={};c4(OI,{_toBool:()=>u4,_toNum:()=>D4,_toStr:()=>_4,awsExpectUnion:()=>y4,loadRestJsonErrorCode:()=>p4,loadRestXmlErrorCode:()=>r4,parseJsonBody:()=>QI,parseJsonErrorBody:()=>d4,parseXmlBody:()=>MI,parseXmlErrorBody:()=>n4});JI.exports=k4(OI);var _4=c((f)=>{if(f==null)return f;if(typeof f==="number"||typeof f==="bigint"){const w=new Error(`Received number ${f} where a string was expected.`);return w.name="Warning",console.warn(w),String(f)}if(typeof f==="boolean"){const w=new Error(`Received boolean ${f} where a string was expected.`);return w.name="Warning",console.warn(w),String(f)}return f},"_toStr"),u4=c((f)=>{if(f==null)return f;if(typeof f==="string"){const w=f.toLowerCase();if(f!==""&&w!=="false"&&w!=="true"){const $=new Error(`Received string "${f}" where a boolean was expected.`);$.name="Warning",console.warn($)}return f!==""&&w!=="false"}return f},"_toBool"),D4=c((f)=>{if(f==null)return f;if(typeof f==="string"){const w=Number(f);if(w.toString()!==f){const $=new Error(`Received string "${f}" where a number was expected.`);return $.name="Warning",console.warn($),f}return w}return f},"_toNum"),v4=Ff(),y4=c((f)=>{if(f==null)return;if(typeof f==="object"&&"__type"in f)delete f.__type;return v4.expectUnion(f)},"awsExpectUnion"),x4=Ff(),zI=c((f,w)=>x4.collectBody(f,w).then(($)=>w.utf8Encoder($)),"collectBodyString"),QI=c((f,w)=>zI(f,w).then(($)=>{if($.length)try{return JSON.parse($)}catch(G){if((G==null?void 0:G.name)==="SyntaxError")Object.defineProperty(G,"$responseBodyText",{value:$});throw G}return{}}),"parseJsonBody"),d4=c(async(f,w)=>{const $=await QI(f,w);return $.message=$.message??$.Message,$},"parseJsonErrorBody"),p4=c((f,w)=>{const $=c((W,I)=>Object.keys(W).find((E)=>E.toLowerCase()===I.toLowerCase()),"findKey"),G=c((W)=>{let I=W;if(typeof I==="number")I=I.toString();if(I.indexOf(",")>=0)I=I.split(",")[0];if(I.indexOf(":")>=0)I=I.split(":")[0];if(I.indexOf("#")>=0)I=I.split("#")[1];return I},"sanitizeErrorCode"),U=$(f.headers,"x-amzn-errortype");if(U!==void 0)return G(f.headers[U]);if(w.code!==void 0)return G(w.code);if(w.__type!==void 0)return G(w.__type)},"loadRestJsonErrorCode"),g4=Ff(),s4=ZI(),MI=c((f,w)=>zI(f,w).then(($)=>{if($.length){const G=new s4.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(F,L)=>L.trim()===""&&L.includes("\n")?"":void 0});G.addEntity("#xD","\r"),G.addEntity("#10","\n");let U;try{U=G.parse($,!0)}catch(F){if(F&&typeof F==="object")Object.defineProperty(F,"$responseBodyText",{value:$});throw F}const W="#text",I=Object.keys(U)[0],E=U[I];if(E[W])E[I]=E[W],delete E[W];return g4.getValueFromTextNode(E)}return{}}),"parseXmlBody"),n4=c(async(f,w)=>{const $=await MI(f,w);if($.Error)$.Error.message=$.Error.message??$.Error.Message;return $},"parseXmlErrorBody"),r4=c((f,w)=>{var $;if((($=w==null?void 0:w.Error)==null?void 0:$.Code)!==void 0)return w.Error.Code;if((w==null?void 0:w.Code)!==void 0)return w.Code;if(f.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var l4=J((_f)=>{Object.defineProperty(_f,"__esModule",{value:!0});var cw=eG();cw.__exportStar($W(),_f);cw.__exportStar(cW(),_f);cw.__exportStar(AI(),_f)});function L9(f){return f}var jI=(f)=>(w)=>async($)=>{if(!h.isInstance($.request))return w($);const{request:G}=$,{handlerProtocol:U=""}=f.requestHandler.metadata||{};if(U.indexOf("h2")>=0&&!G.headers[":authority"])delete G.headers.host,G.headers[":authority"]=G.hostname+(G.port?":"+G.port:"");else if(!G.headers.host){let W=G.hostname;if(G.port!=null)W+=`:${G.port}`;G.headers.host=W}return w($)},bI={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},X9=(f)=>({applyToStack:(w)=>{w.add(jI(f),bI)}});var cI=()=>(f,w)=>async($)=>{try{const G=await f($),{clientName:U,commandName:W,logger:I,dynamoDbDocumentClientOptions:E={}}=w,{overrideInputFilterSensitiveLog:F,overrideOutputFilterSensitiveLog:L}=E,X=F??w.inputFilterSensitiveLog,Z=L??w.outputFilterSensitiveLog,{$metadata:z,...O}=G.output;return I?.info?.({clientName:U,commandName:W,input:X($.input),output:Z(O),metadata:z}),G}catch(G){const{clientName:U,commandName:W,logger:I,dynamoDbDocumentClientOptions:E={}}=w,{overrideInputFilterSensitiveLog:F}=E,L=F??w.inputFilterSensitiveLog;throw I?.error?.({clientName:U,commandName:W,input:L($.input),error:G,metadata:G.$metadata}),G}},hI={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},O9=(f)=>({applyToStack:(w)=>{w.add(cI(),hI)}});var vw="X-Amzn-Trace-Id",kI="AWS_LAMBDA_FUNCTION_NAME",_I="_X_AMZN_TRACE_ID",uI=(f)=>(w)=>async($)=>{const{request:G}=$;if(!h.isInstance(G)||f.runtime!=="node"||G.headers.hasOwnProperty(vw))return w($);const U=process.env[kI],W=process.env[_I],I=(E)=>typeof E==="string"&&E.length>0;if(I(U)&&I(W))G.headers[vw]=W;return w({...$,request:G})},DI={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},A9=(f)=>({applyToStack:(w)=>{w.add(uI(f),DI)}});function m9(f){return{...f,customUserAgent:typeof f.customUserAgent==="string"?[[f.customUserAgent]]:f.customUserAgent}}var HL=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}$"),Pf=(f)=>HL.test(f)||f.startsWith("[")&&f.endsWith("]");var VL=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Nf=(f,w=!1)=>{if(!w)return VL.test(f);const $=f.split(".");for(let G of $)if(!Nf(G))return!1;return!0};var Sf={};var s="endpoints";function k(f){if(typeof f!=="object"||f==null)return f;if("ref"in f)return`\$${k(f.ref)}`;if("fn"in f)return`${f.fn}(${(f.argv||[]).map(k).join(", ")})`;return JSON.stringify(f,null,2)}class K extends Error{constructor(f){super(f);this.name="EndpointError"}}var DU=(f,w)=>f===w;var vU=(f)=>{const w=f.split("."),$=[];for(let G of w){const U=G.indexOf("[");if(U!==-1){if(G.indexOf("]")!==G.length-1)throw new K(`Path: '${f}' does not end with ']'`);const W=G.slice(U+1,-1);if(Number.isNaN(parseInt(W)))throw new K(`Invalid array index: '${W}' in path: '${f}'`);if(U!==0)$.push(G.slice(0,U));$.push(W)}else $.push(G)}return $};var f0=(f,w)=>vU(w).reduce(($,G)=>{if(typeof $!=="object")throw new K(`Index '${G}' in '${w}' not found in '${JSON.stringify(f)}'`);else if(Array.isArray($))return $[parseInt(G)];return $[G]},f);var yU=(f)=>f!=null;var xU=(f)=>!f;var w0=P(Jf(),1);var Uw={[w0.EndpointURLScheme.HTTP]:80,[w0.EndpointURLScheme.HTTPS]:443},dU=(f)=>{const w=(()=>{try{if(f instanceof URL)return f;if(typeof f==="object"&&"hostname"in f){const{hostname:z,port:O,protocol:M="",path:A="",query:Y={}}=f,R=new URL(`${M}//${z}${O?`:${O}`:""}${A}`);return R.search=Object.entries(Y).map(([N,j])=>`${N}=${j}`).join("&"),R}return new URL(f)}catch(z){return null}})();if(!w)return console.error(`Unable to parse ${JSON.stringify(f)} as a whatwg URL.`),null;const $=w.href,{host:G,hostname:U,pathname:W,protocol:I,search:E}=w;if(E)return null;const F=I.slice(0,-1);if(!Object.values(w0.EndpointURLScheme).includes(F))return null;const L=Pf(U),X=$.includes(`${G}:${Uw[F]}`)||typeof f==="string"&&f.includes(`${G}:${Uw[F]}`),Z=`${G}${X?`:${Uw[F]}`:""}`;return{scheme:F,authority:Z,path:W,normalizedPath:W.endsWith("/")?W:`${W}/`,isIp:L}};var pU=(f,w)=>f===w;var gU=(f,w,$,G)=>{if(w>=$||f.length<$)return null;if(!G)return f.substring(w,$);return f.substring(f.length-$,f.length-w)};var sU=(f)=>encodeURIComponent(f).replace(/[!*'()]/g,(w)=>`%${w.charCodeAt(0).toString(16).toUpperCase()}`);var nU={booleanEquals:DU,getAttr:f0,isSet:yU,isValidHostLabel:Nf,not:xU,parseURL:dU,stringEquals:pU,substring:gU,uriEncode:sU};var $0=(f,w)=>{const $=[],G={...w.endpointParams,...w.referenceRecord};let U=0;while(U<f.length){const W=f.indexOf("{",U);if(W===-1){$.push(f.slice(U));break}$.push(f.slice(U,W));const I=f.indexOf("}",W);if(I===-1){$.push(f.slice(W));break}if(f[W+1]==="{"&&f[I+1]==="}")$.push(f.slice(W+1,I)),U=I+2;const E=f.substring(W+1,I);if(E.includes("#")){const[F,L]=E.split("#");$.push(f0(G[F],L))}else $.push(G[E]);U=I+1}return $.join("")};var rU=({ref:f},w)=>{return{...w.endpointParams,...w.referenceRecord}[f]};var l=(f,w,$)=>{if(typeof f==="string")return $0(f,$);else if(f.fn)return U0(f,$);else if(f.ref)return rU(f,$);throw new K(`'${w}': ${String(f)} is not a string, function or reference.`)};var U0=({fn:f,argv:w},$)=>{const G=w.map((W)=>["boolean","number"].includes(typeof W)?W:l(W,"arg",$)),U=f.split(".");if(U[0]in Sf&&U[1]!=null)return Sf[U[0]][U[1]](...G);return nU[f](...G)};var lU=({assign:f,...w},$)=>{if(f&&f in $.referenceRecord)throw new K(`'${f}' is already defined in Reference Record.`);const G=U0(w,$);return $.logger?.debug?.(`${s} evaluateCondition: ${k(w)} = ${k(G)}`),{result:G===""?!0:!!G,...f!=null&&{toAssign:{name:f,value:G}}}};var Zf=(f=[],w)=>{const $={};for(let G of f){const{result:U,toAssign:W}=lU(G,{...w,referenceRecord:{...w.referenceRecord,...$}});if(!U)return{result:U};if(W)$[W.name]=W.value,w.logger?.debug?.(`${s} assign: ${W.name} := ${k(W.value)}`)}return{result:!0,referenceRecord:$}};var mU=(f,w)=>Object.entries(f).reduce(($,[G,U])=>({...$,[G]:U.map((W)=>{const I=l(W,"Header value entry",w);if(typeof I!=="string")throw new K(`Header '${G}' value '${I}' is not a string`);return I})}),{});var Gw=(f,w)=>{if(Array.isArray(f))return f.map(($)=>Gw($,w));switch(typeof f){case"string":return $0(f,w);case"object":if(f===null)throw new K(`Unexpected endpoint property: ${f}`);return G0(f,w);case"boolean":return f;default:throw new K(`Unexpected endpoint property type: ${typeof f}`)}};var G0=(f,w)=>Object.entries(f).reduce(($,[G,U])=>({...$,[G]:Gw(U,w)}),{});var oU=(f,w)=>{const $=l(f,"Endpoint URL",w);if(typeof $==="string")try{return new URL($)}catch(G){throw console.error(`Failed to construct URL with ${$}`,G),G}throw new K(`Endpoint URL must be a string, got ${typeof $}`)};var iU=(f,w)=>{const{conditions:$,endpoint:G}=f,{result:U,referenceRecord:W}=Zf($,w);if(!U)return;const I={...w,referenceRecord:{...w.referenceRecord,...W}},{url:E,properties:F,headers:L}=G;return w.logger?.debug?.(`${s} Resolving endpoint from template: ${k(G)}`),{...L!=null&&{headers:mU(L,I)},...F!=null&&{properties:G0(F,I)},url:oU(E,I)}};var tU=(f,w)=>{const{conditions:$,error:G}=f,{result:U,referenceRecord:W}=Zf($,w);if(!U)return;throw new K(l(G,"Error",{...w,referenceRecord:{...w.referenceRecord,...W}}))};var eU=(f,w)=>{const{conditions:$,rules:G}=f,{result:U,referenceRecord:W}=Zf($,w);if(!U)return;return W0(G,{...w,referenceRecord:{...w.referenceRecord,...W}})};var W0=(f,w)=>{for(let $ of f)if($.type==="endpoint"){const G=iU($,w);if(G)return G}else if($.type==="error")tU($,w);else if($.type==="tree"){const G=eU($,w);if(G)return G}else throw new K(`Unknown endpoint rule: ${$}`);throw new K("Rules evaluation failed")};var TL=(f,w)=>{const{endpointParams:$,logger:G}=w,{parameters:U,rules:W}=f;w.logger?.debug?.(`${s} Initial EndpointParams: ${k($)}`);const I=Object.entries(U).filter(([,L])=>L.default!=null).map(([L,X])=>[L,X.default]);if(I.length>0)for(let[L,X]of I)$[L]=$[L]??X;const E=Object.entries(U).filter(([,L])=>L.required).map(([L])=>L);for(let L of E)if($[L]==null)throw new K(`Missing required parameter: '${L}'`);const F=W0(W,{endpointParams:$,logger:G,referenceRecord:{}});if(w.endpointParams?.Endpoint)try{const L=new URL(w.endpointParams.Endpoint),{protocol:X,port:Z}=L;F.url.protocol=X,F.url.port=Z}catch(L){}return w.logger?.debug?.(`${s} Resolved endpoint: ${k(F)}`),F};var Ww=(f,w=!1)=>{if(w){for(let $ of f.split("."))if(!Ww($))return!1;return!0}if(!Nf(f))return!1;if(f.length<3||f.length>63)return!1;if(f!==f.toLowerCase())return!1;if(Pf(f))return!1;return!0};var aU=(f)=>{const w=f.split(":");if(w.length<6)return null;const[$,G,U,W,I,...E]=w;if($!=="arn"||G===""||U===""||E[0]==="")return null;return{partition:G,service:U,region:W,accountId:I,resourceId:E[0].includes("/")?E[0].split("/"):E}};var fG={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};var PL=fG,NL="",wG=(f)=>{const{partitions:w}=PL;for(let G of w){const{regions:U,outputs:W}=G;for(let[I,E]of Object.entries(U))if(I===f)return{...W,...E}}for(let G of w){const{regionRegex:U,outputs:W}=G;if(new RegExp(U).test(f))return{...W}}const $=w.find((G)=>G.id==="aws");if(!$)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...$.outputs}};var $G=()=>NL;var SL={isVirtualHostableS3Bucket:Ww,parseArn:aU,partition:wG};Sf.aws=SL;var Iw="user-agent",I0="x-amz-user-agent",Ew=" ",E0="/",UG=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,GG=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,Fw="-";var jL=(f)=>(w,$)=>async(G)=>{const{request:U}=G;if(!h.isInstance(U))return w(G);const{headers:W}=U,I=$?.userAgent?.map(Lw)||[],E=(await f.defaultUserAgentProvider()).map(Lw),F=f?.customUserAgent?.map(Lw)||[],L=$G(),X=(L?[L]:[]).concat([...E,...I,...F]).join(Ew),Z=[...E.filter((z)=>z.startsWith("aws-sdk-")),...F].join(Ew);if(f.runtime!=="browser"){if(Z)W[I0]=W[I0]?`${W[Iw]} ${Z}`:Z;W[Iw]=X}else W[I0]=X;return w({...G,request:U})},Lw=(f)=>{const w=f[0].split(E0).map((I)=>I.replace(UG,Fw)).join(E0),$=f[1]?.replace(GG,Fw),G=w.indexOf(E0),U=w.substring(0,G);let W=w.substring(G+1);if(U==="api")W=W.toLowerCase();return[U,W,$].filter((I)=>I&&I.length>0).reduce((I,E,F)=>{switch(F){case 0:return E;case 1:return`${I}/${E}`;default:return`${I}#${E}`}},"")},bL={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},P5=(f)=>({applyToStack:(w)=>{w.add(jL(f),bL)}});var F0=(f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips"));var Xw=(f)=>F0(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f;var D5=(f)=>{const{region:w,useFipsEndpoint:$}=f;if(!w)throw new Error("Region is missing");return{...f,region:async()=>{if(typeof w==="string")return Xw(w);const G=await w();return Xw(G)},useFipsEndpoint:async()=>{const G=typeof w==="string"?w:await w();if(F0(G))return!0;return typeof $!=="function"?Promise.resolve(!!$):$()}}};var Of=(f,w,$)=>{if(!(w in f))return;if(f[w]==="true")return!0;if(f[w]==="false")return!1;throw new Error(`Cannot load ${$} "${w}". Expected "true" or "false", got ${f[w]}.`)};var m;(function(f){f.ENV="env",f.CONFIG="shared config entry"})(m||(m={}));var cL="AWS_USE_DUALSTACK_ENDPOINT",hL="use_dualstack_endpoint";var l5={environmentVariableSelector:(f)=>Of(f,cL,m.ENV),configFileSelector:(f)=>Of(f,hL,m.CONFIG),default:!1};var kL="AWS_USE_FIPS_ENDPOINT",_L="use_fips_endpoint";var i5={environmentVariableSelector:(f)=>Of(f,kL,m.ENV),configFileSelector:(f)=>Of(f,_L,m.CONFIG),default:!1};var Zw=P(Jf(),1),WG=(f)=>f[Zw.SMITHY_CONTEXT_KEY]||(f[Zw.SMITHY_CONTEXT_KEY]={});var n=(f)=>{if(typeof f==="function")return f;const w=Promise.resolve(f);return()=>w};var IG={environmentVariableSelector:(f)=>f["AWS_REGION"],configFileSelector:(f)=>f["region"],default:()=>{throw new Error("Region is missing")}},M7={preferredFile:"credentials"};function uL(f){return(w)=>async($)=>{const G=$.request;if(h.isInstance(G)){const{body:U,headers:W}=G;if(U&&Object.keys(W).map((I)=>I.toLowerCase()).indexOf(EG)===-1)try{const I=f(U);G.headers={...G.headers,[EG]:String(I)}}catch(I){}}return w({...$,request:G})}}var EG="content-length",DL={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},p7=(f)=>({applyToStack:(w)=>{w.add(uL(f.bodyLengthChecker),DL)}});var FG=(f,w)=>($)=>async(G)=>{const{response:U}=await $(G);try{const W=await w(U,f);return{response:U,output:W}}catch(W){if(Object.defineProperty(W,"$response",{value:U}),!("$metadata"in W)){if(W.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof W.$responseBodyText!=="undefined"){if(W.$response)W.$response.body=W.$responseBodyText}}throw W}};var LG=(f,w)=>($,G)=>async(U)=>{const W=G.endpointV2?.url&&f.urlParser?async()=>f.urlParser(G.endpointV2.url):f.endpoint;if(!W)throw new Error("No valid endpoint provider available.");const I=await w(U.input,{...f,endpoint:W});return $({...U,request:I})};function m7(f,w,$){return{applyToStack:(G)=>{G.add(FG(f,$),vL),G.add(LG(f,w),Ow)}}}var vL={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Ow={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var XG=async(f)=>{const w=f?.Bucket||"";if(typeof f.Bucket==="string")f.Bucket=w.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(gL(w)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!pL(w)||w.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||w.toLowerCase()!==w||w.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},yL=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,xL=/(\d+\.){3}\d+/,dL=/\.\./;var pL=(f)=>yL.test(f)&&!xL.test(f)&&!dL.test(f),gL=(f)=>{const[w,$,G,,,U]=f.split(":"),W=w==="arn"&&f.split(":").length>=6,I=Boolean(W&&$&&G&&U);if(W&&!I)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return I};var ZG=(f,w,$)=>{const G=async()=>{const U=$[f]??$[w];if(typeof U==="function")return U();return U};if(f==="credentialScope"||w==="CredentialScope")return async()=>{const U=typeof $.credentials==="function"?await $.credentials():$.credentials;return U?.credentialScope??U?.CredentialScope};if(f==="accountId"||w==="AccountId")return async()=>{const U=typeof $.credentials==="function"?await $.credentials():$.credentials;return U?.accountId??U?.AccountId};if(f==="endpoint"||w==="endpoint")return async()=>{const U=await G();if(U&&typeof U==="object"){if("url"in U)return U.url.href;if("hostname"in U){const{protocol:W,hostname:I,port:E,path:F}=U;return`${W}//${I}${E?":"+E:""}${F}`}}return U};return G};var zw=P(T0(),1),OG="AWS_ENDPOINT_URL",zG="endpoint_url",QG=(f)=>({environmentVariableSelector:(w)=>{const $=f.split(" ").map((W)=>W.toUpperCase()),G=w[[OG,...$].join("_")];if(G)return G;const U=w[OG];if(U)return U;return},configFileSelector:(w,$)=>{if($&&w.services){const U=$[["services",w.services].join(zw.CONFIG_PREFIX_SEPARATOR)];if(U){const W=f.split(" ").map((E)=>E.toLowerCase()),I=U[[W.join("_"),zG].join(zw.CONFIG_PREFIX_SEPARATOR)];if(I)return I}}const G=w[zG];if(G)return G;return},default:void 0});var MG=async(f)=>e(QG(f))();var Qw=P(X1(),1),L0=(f)=>{if(typeof f==="object"){if("url"in f)return Qw.parseUrl(f.url);return f}return Qw.parseUrl(f)};var JG=async(f,w,$,G)=>{if(!$.endpoint){const I=await MG($.serviceId||"");if(I)$.endpoint=()=>Promise.resolve(L0(I))}const U=await sL(f,w,$);if(typeof $.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return $.endpointProvider(U,G)},sL=async(f,w,$)=>{const G={},U=w?.getEndpointParameterInstructions?.()||{};for(let[W,I]of Object.entries(U))switch(I.type){case"staticContextParams":G[W]=I.value;break;case"contextParams":G[W]=f[I.name];break;case"clientContextParams":case"builtInParams":G[W]=await ZG(I.name,W,$)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(I))}if(Object.keys(U).length===0)Object.assign(G,$);if(String($.serviceId).toLowerCase()==="s3")await XG(G);return G};var AG=({config:f,instructions:w})=>{return($,G)=>async(U)=>{const W=await JG(U.input,{getEndpointParameterInstructions(){return w}},{...f},G);G.endpointV2=W,G.authSchemes=W.properties?.authSchemes;const I=G.authSchemes?.[0];if(I){G.signing_region=I.signingRegion,G.signing_service=I.signingName;const F=WG(G)?.selectedHttpAuthScheme?.httpAuthOption;if(F)F.signingProperties=Object.assign(F.signingProperties||{},{signing_region:I.signingRegion,signingRegion:I.signingRegion,signing_service:I.signingName,signingName:I.signingName,signingRegionSet:I.signingRegionSet},I.properties)}return $({...U})}};var nL={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Ow.name},Yz=(f,w)=>({applyToStack:($)=>{$.addRelativeTo(AG({config:f,instructions:w}),nL)}});var Hz=(f)=>{const w=f.tls??!0,{endpoint:$}=f,G=$!=null?async()=>L0(await n($)()):void 0;return{...f,endpoint:G,tls:w,isCustomEndpoint:!!$,useDualstackEndpoint:n(f.useDualstackEndpoint??!1),useFipsEndpoint:n(f.useFipsEndpoint??!1)}};var x=P(u0(),1),kz=x.default.v1,_z=x.default.v3,RG=x.default.v4,uz=x.default.v5,Dz=x.default.NIL,vz=x.default.version,yz=x.default.validate,xz=x.default.stringify,dz=x.default.parse;var v=P(g(),1),YG="AWS_MAX_ATTEMPTS",KG="max_attempts",sz={environmentVariableSelector:(f)=>{const w=f[YG];if(!w)return;const $=parseInt(w);if(Number.isNaN($))throw new Error(`Environment variable ${YG} mast be a number, got "${w}"`);return $},configFileSelector:(f)=>{const w=f[KG];if(!w)return;const $=parseInt(w);if(Number.isNaN($))throw new Error(`Shared config file entry ${KG} mast be a number, got "${w}"`);return $},default:v.DEFAULT_MAX_ATTEMPTS},nz=(f)=>{const{retryStrategy:w}=f,$=n(f.maxAttempts??v.DEFAULT_MAX_ATTEMPTS);return{...f,maxAttempts:$,retryStrategy:async()=>{if(w)return w;if(await n(f.retryMode)()===v.RETRY_MODES.ADAPTIVE)return new v.AdaptiveRetryStrategy($);return new v.StandardRetryStrategy($)}}},rL="AWS_RETRY_MODE",lL="retry_mode",rz={environmentVariableSelector:(f)=>f[rL],configFileSelector:(f)=>f[lL],default:v.DEFAULT_RETRY_MODE};var zf=P(Gf(),1);var X0=P(g(),1);import{Readable as mL} from"stream";var BG=(f)=>f?.body instanceof mL||typeof ReadableStream!=="undefined"&&f?.body instanceof ReadableStream;var Mw=(f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)};var oL=(f)=>(w,$)=>async(G)=>{let U=await f.retryStrategy();const W=await f.maxAttempts();if(iL(U)){U=U;let I=await U.acquireInitialRetryToken($.partition_id),E=new Error,F=0,L=0;const{request:X}=G,Z=h.isInstance(X);if(Z)X.headers[X0.INVOCATION_ID_HEADER]=RG();while(!0)try{if(Z)X.headers[X0.REQUEST_HEADER]=`attempt=${F+1}; max=${W}`;const{response:z,output:O}=await w(G);return U.recordSuccess(I),O.$metadata.attempts=F+1,O.$metadata.totalRetryDelay=L,{response:z,output:O}}catch(z){const O=tL(z);if(E=Mw(z),Z&&BG(X))throw($.logger instanceof qG?console:$.logger)?.warn("An error was encountered in a non-retryable streaming request."),E;try{I=await U.refreshRetryTokenForRetry(I,O)}catch(A){if(!E.$metadata)E.$metadata={};throw E.$metadata.attempts=F+1,E.$metadata.totalRetryDelay=L,E}F=I.getRetryCount();const M=I.getRetryDelay();L+=M,await new Promise((A)=>setTimeout(A,M))}}else{if(U=U,U?.mode)$.userAgent=[...$.userAgent||[],["cfg/retry-mode",U.mode]];return U.retry(w,G)}},iL=(f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined",tL=(f)=>{const w={error:f,errorType:eL(f)},$=fX(f.$response);if($)w.retryAfterHint=$;return w},eL=(f)=>{if(zf.isThrottlingError(f))return"THROTTLING";if(zf.isTransientError(f))return"TRANSIENT";if(zf.isServerError(f))return"SERVER_ERROR";return"CLIENT_ERROR"},aL={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},$Q=(f)=>({applyToStack:(w)=>{w.add(oL(f),aL)}}),fX=(f)=>{if(!Jw.isInstance(f))return;const w=Object.keys(f.headers).find((W)=>W.toLowerCase()==="retry-after");if(!w)return;const $=f.headers[w],G=Number($);if(!Number.isNaN(G))return new Date(G*1000);return new Date($)};var HG=P(g(),1);var $X=P(Gf(),1),a=P(g(),1);var Aw=P(g(),1);var wX=P(g(),1);var Z0=P(Gf(),1);var VG=P(g(),1);import{platform as m4,release as o4} from"os";import{env as YI,versions as i4} from"process";var hw={isCrtAvailable:!1};var RI=()=>{if(hw.isCrtAvailable)return["md/crt-avail"];return null};var t4="AWS_SDK_UA_APP_ID",e4="sdk-ua-app-id",fM=({serviceId:f,clientVersion:w})=>{const $=[["aws-sdk-js",w],["ua","2.0"],[`os/${m4()}`,o4()],["lang/js"],["md/nodejs",`${i4.node}`]],G=RI();if(G)$.push(G);if(f)$.push([`api/${f}`,w]);if(YI.AWS_EXECUTION_ENV)$.push([`exec-env/${YI.AWS_EXECUTION_ENV}`]);const U=e({environmentVariableSelector:(I)=>I[t4],configFileSelector:(I)=>I[e4],default:void 0})();let W=void 0;return async()=>{if(!W){const I=await U;W=I?[...$,[`app/${I}`]]:[...$]}return W}};var KI=(f)=>typeof ArrayBuffer==="function"&&f instanceof ArrayBuffer||Object.prototype.toString.call(f)==="[object ArrayBuffer]";import{Buffer as kw} from"buffer";var _w=(f,w=0,$=f.byteLength-w)=>{if(!KI(f))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof f} (${f})`);return kw.from(f,w,$)},BI=(f,w)=>{if(typeof f!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof f} (${f})`);return w?kw.from(f,w):kw.from(f)};var HI=P(bf(),1);import{Buffer as a4} from"buffer";import{createHash as f9,createHmac as w9} from"crypto";var qI=function(f,w){if(a4.isBuffer(f))return f;if(typeof f==="string")return BI(f,w);if(ArrayBuffer.isView(f))return _w(f.buffer,f.byteOffset,f.byteLength);return _w(f)};class $9{constructor(f,w){this.algorithmIdentifier=f,this.secret=w,this.reset()}update(f,w){this.hash.update(HI.toUint8Array(qI(f,w)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?w9(this.algorithmIdentifier,qI(this.secret)):f9(this.algorithmIdentifier)}}import{fstatSync as U9,lstatSync as G9} from"fs";var OM=(f)=>{if(!f)return 0;if(typeof f==="string")return Buffer.byteLength(f);else if(typeof f.byteLength==="number")return f.byteLength;else if(typeof f.size==="number")return f.size;else if(typeof f.start==="number"&&typeof f.end==="number")return f.end+1-f.start;else if(typeof f.path==="string"||Buffer.isBuffer(f.path))return G9(f.path).size;else if(typeof f.fd==="number")return U9(f.fd).size;throw new Error(`Body Length computation failed for ${f}`)};var SI=P(V0(),1);var VI="AWS_EXECUTION_ENV",uw="AWS_REGION",Dw="AWS_DEFAULT_REGION",TI="AWS_EC2_METADATA_DISABLED",CI=["in-region","cross-region","mobile","standard","legacy"],PI="/latest/meta-data/placement/region";var NI={environmentVariableSelector:(f)=>{return f["AWS_DEFAULTS_MODE"]},configFileSelector:(f)=>{return f["defaults_mode"]},default:"legacy"};var qM=({region:f=e(IG),defaultsMode:w=e(NI)}={})=>SI.memoize(async()=>{const $=typeof w==="function"?await w():w;switch($?.toLowerCase()){case"auto":return W9(f);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve($?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${CI.join(", ")}, got ${$}`)}}),W9=async(f)=>{if(f){const w=typeof f==="function"?await f():f,$=await I9();if(!$)return"standard";if(w===$)return"in-region";else return"cross-region"}return"standard"},I9=async()=>{if(process.env[VI]&&(process.env[uw]||process.env[Dw]))return process.env[uw]??process.env[Dw];if(!process.env[TI])try{const{getInstanceMetadataEndpoint:f,httpRequest:w}=await import("./chunk-731f30522682483a.js"),$=await f();return(await w({...$,path:PI})).toString()}catch(f){}};var CM=(f)=>{let w=async()=>{if(f.region===void 0)throw new Error("Region is missing from runtimeConfig");const $=f.region;if(typeof $==="string")return $;return $()};return{setRegion($){w=$},region(){return w}}},PM=(f)=>{return{region:f.region()}};export{L9 as ra,X9 as sa,O9 as ta,A9 as ua,qW as va,Of as wa,m as xa,g as ya,$w as za,WG as Aa,n as Ba,m9 as Ca,Sf as Da,TL as Ea,SL as Fa,P5 as Ga,l5 as Ha,i5 as Ia,IG as Ja,M7 as Ka,D5 as La,p7 as Ma,sL as Na,m7 as Oa,Yz as Pa,Hz as Qa,RG as Ra,sz as Sa,nz as Ta,rz as Ua,$Q as Va,eG as Wa,l4 as Xa,fM as Ya,KI as Za,$9 as _a,OM as $a,qM as ab,CM as bb,PM as cb};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-4548da0edd8c39ed.js";import{y as A} from"./chunk-7ce930fe69575c87.js";import{A as w0,B as G0,C as W0,E as Nl,F as F0,J as Wl,K as Tl,M as Al,N as Rl,Q as sl,R as _l,X as K,Y as Hh,Z as o0,ba as T0,da as S,fa as u,ia as A0,ka as $0,la as T,ma as R0,na as bl,oa as fl,pa as I0,qa as H0,ra as eh} from"./chunk-ab7b6ceb26aca9b1.js";import{Aa as K0,Ba as Sd,Fa as Qh,Ga as B0,Ha as Pl,Ia as vl,Ja as Ml,Ka as q0,La as Cl,Ma as Ol,Na as gl,Oa as xl,Pa as y0,Qa as Q0,Sa as F,Ta as B,Ua as X0,Va as il,Xa as cl,Ya as Y0,Za as el,_a as Z0,ab as dh,bb as pl,cb as nl,db as ol,eb as ul,fb as S0,gb as m0,xa as D0,ya as E0,za as k0} from"./chunk-0557700bf68e85d4.js";import"./chunk-c2d1f66cf8468e71.js";import{lb as f,mb as Ll} from"./chunk-1b0afbf1baeeaa37.js";import"./chunk-e19064e9f1d5faed.js";import{ob as Xh} from"./chunk-45badde289996d82.js";import"./chunk-4272071146eb5eb2.js";var C=A(Qh(),1);var wl=A(dh(),1),wh=A(Sd(),1);var md=function(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(d,l)=>({signingProperties:{config:d,context:l}})}},dl=function(h){return{schemeId:"smithy.api#noAuth"}},Gl=async(h,d,l)=>{return{operation:wh.getSmithyContext(d).operation,region:await wh.normalizeProvider(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Il=(h)=>{const d=[];switch(h.operation){case"AssumeRoleWithSAML":{d.push(dl(h));break}case"AssumeRoleWithWebIdentity":{d.push(dl(h));break}default:d.push(md(h))}return d},Jd=(h)=>({...h,stsClientCtor:R}),Hl=(h)=>{const d=Jd(h);return{...wl.resolveAwsSdkSigV4Config(d)}};var Sl=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},D={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var ml={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.629.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"yarn test:unit","test:unit":"jest"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.629.0","@aws-sdk/core":"3.629.0","@aws-sdk/credential-provider-node":"3.629.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.620.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.3.2","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.14","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.1.12","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.14","@smithy/util-defaults-mode-node":"^3.0.14","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}};var Gh=A(dh(),1);var tl=A(Qh(),1);var jl=A(dh(),1),al=A(Qh(),1);var Jl={["required"]:!1,["type"]:"String"},yh={["required"]:!0,default:!1,["type"]:"Boolean"},Ql={["ref"]:"Endpoint"},Dl={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},J={["ref"]:"Region"},El={["fn"]:"aws.partition",["argv"]:[J],assign:"PartitionResult"},Xl={["ref"]:"UseFIPS"},Yl={["ref"]:"UseDualStack"},E={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},X={},kl={conditions:[{["fn"]:"stringEquals",["argv"]:[J,"aws-global"]}],["endpoint"]:E,["type"]:"endpoint"},Zl={["fn"]:"booleanEquals",["argv"]:[Xl,!0]},$l={["fn"]:"booleanEquals",["argv"]:[Yl,!0]},Kl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Ul={["ref"]:"PartitionResult"},Fl={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Ul,"supportsDualStack"]}]},Bl=[{["fn"]:"isSet",["argv"]:[Ql]}],ql=[Zl],yl=[$l],Ed={version:"1.0",parameters:{Region:Jl,UseDualStack:yh,UseFIPS:yh,Endpoint:Jl,UseGlobalEndpoint:yh},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:Bl},Dl,El,{["fn"]:"booleanEquals",["argv"]:[Xl,!1]},{["fn"]:"booleanEquals",["argv"]:[Yl,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-northeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-south-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-2"]}],endpoint:E,["type"]:"endpoint"},kl,{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ca-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-north-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-3"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"sa-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-2"]}],endpoint:E,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:Bl,rules:[{conditions:ql,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:yl,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:Ql,properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[Dl],rules:[{conditions:[El],rules:[{conditions:[Zl,$l],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Kl]},Fl],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:ql,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Kl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Ul,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:X,headers:X},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:yl,rules:[{conditions:[Fl],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},kl,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},Vl=Ed;var zl=(h,d={})=>{return vl(Vl,{endpointParams:h,logger:d.logger})};Pl.aws=Ml;var rl=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??Wl,base64Encoder:h?.base64Encoder??Rl,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??zl,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??Il,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(d)=>d.getIdentityProvider("aws.auth#sigv4"),signer:new jl.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(d)=>d.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new al.NoAuthSigner}],logger:h?.logger??new Nl,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??Ll,utf8Decoder:h?.utf8Decoder??Tl,utf8Encoder:h?.utf8Encoder??Al}};var h0=(h)=>{fl(process.version);const d=ul(h),l=()=>d().then(bl),w=rl(h);return Gh.emitWarningIfUnsupportedVersion(process.version),{...w,...h,runtime:"node",defaultsMode:d,bodyLengthChecker:h?.bodyLengthChecker??ol,credentialDefaultProvider:h?.credentialDefaultProvider??Xh,defaultUserAgentProvider:h?.defaultUserAgentProvider??pl({serviceId:w.serviceId,clientVersion:ml.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(G)=>G.getIdentityProvider("aws.auth#sigv4")||(async(H)=>await Xh(H?.__config||{})()),signer:new Gh.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(G)=>G.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new tl.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(cl),region:h?.region??f(gl,xl),requestHandler:sl.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...el,default:async()=>(await l()).retryMode||il}),sha256:h?.sha256??nl.bind(null,"sha256"),streamCollector:h?.streamCollector??_l,useDualstackEndpoint:h?.useDualstackEndpoint??f(Cl),useFipsEndpoint:h?.useFipsEndpoint??f(Ol)}};var l0=(h)=>{const d=h.httpAuthSchemes;let{httpAuthSchemeProvider:l,credentials:w}=h;return{setHttpAuthScheme(G){const H=d.findIndex((I)=>I.schemeId===G.schemeId);if(H===-1)d.push(G);else d.splice(H,1,G)},httpAuthSchemes(){return d},setHttpAuthSchemeProvider(G){l=G},httpAuthSchemeProvider(){return l},setCredentials(G){w=G},credentials(){return w}}},d0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var Ih=(h)=>h,J0=(h,d)=>{const l={...Ih(S0(h)),...Ih(I0(h)),...Ih(w0(h)),...Ih(l0(h))};return d.forEach((w)=>w.configure(l)),{...h,...m0(l),...H0(l),...G0(l),...d0(l)}};class R extends F0{constructor(...[h]){const d=h0(h||{}),l=Sl(d),w=B0(l),G=Y0(w),H=y0(G),I=D0(H),Q=X0(I),v=Hl(Q),M=J0(v,h?.extensions||[]);super(M);this.config=M,this.middlewareStack.use(q0(this.config)),this.middlewareStack.use(Z0(this.config)),this.middlewareStack.use(Q0(this.config)),this.middlewareStack.use(E0(this.config)),this.middlewareStack.use(k0(this.config)),this.middlewareStack.use(K0(this.config)),this.middlewareStack.use(C.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Gl,identityProviderConfigProvider:async(n)=>new C.DefaultIdentityProviderConfig({"aws.auth#sigv4":n.credentials})})),this.middlewareStack.use(C.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class Y extends $0{constructor(h){super(h);Object.setPrototypeOf(this,Y.prototype)}}class Sh extends Y{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,Sh.prototype)}}class mh extends Y{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,mh.prototype)}}class Jh extends Y{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends Y{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class Eh extends Y{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}class kh extends Y{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,kh.prototype)}}class Kh extends Y{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,Kh.prototype)}}class Fh extends Y{constructor(h){super({name:"InvalidAuthorizationMessageException",$fault:"client",...h});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Fh.prototype)}}var o=(h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:Hh}}),U0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),V0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:Hh}}),P0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),v0=(h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:Hh}}),M0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),z0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),N0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}});var P=A(dh(),1);var L0=async(h,d)=>{const l=a;let w;return w=b({...Yd(h,d),[s]:od,[_]:r}),j(d,l,"/",void 0,w)},j0=async(h,d)=>{const l=a;let w;return w=b({...Zd(h,d),[s]:ud,[_]:r}),j(d,l,"/",void 0,w)},a0=async(h,d)=>{const l=a;let w;return w=b({...$d(h,d),[s]:td,[_]:r}),j(d,l,"/",void 0,w)},r0=async(h,d)=>{const l=a;let w;return w=b({...Ud(h,d),[s]:hw,[_]:r}),j(d,l,"/",void 0,w)},s0=async(h,d)=>{const l=a;let w;return w=b({...Vd(h,d),[s]:lw,[_]:r}),j(d,l,"/",void 0,w)},_0=async(h,d)=>{const l=a;let w;return w=b({...Pd(h,d),[s]:dw,[_]:r}),j(d,l,"/",void 0,w)},b0=async(h,d)=>{const l=a;let w;return w=b({...vd(h,d),[s]:ww,[_]:r}),j(d,l,"/",void 0,w)},f0=async(h,d)=>{const l=a;let w;return w=b({...Md(h,d),[s]:Gw,[_]:r}),j(d,l,"/",void 0,w)},C0=async(h,d)=>{if(h.statusCode>=300)return L(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Rd(l.AssumeRoleResult,d),{$metadata:k(h),...w}},O0=async(h,d)=>{if(h.statusCode>=300)return L(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Ld(l.AssumeRoleWithSAMLResult,d),{$metadata:k(h),...w}},g0=async(h,d)=>{if(h.statusCode>=300)return L(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=jd(l.AssumeRoleWithWebIdentityResult,d),{$metadata:k(h),...w}},x0=async(h,d)=>{if(h.statusCode>=300)return L(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=ad(l.DecodeAuthorizationMessageResult,d),{$metadata:k(h),...w}},i0=async(h,d)=>{if(h.statusCode>=300)return L(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=_d(l.GetAccessKeyInfoResult,d),{$metadata:k(h),...w}},c0=async(h,d)=>{if(h.statusCode>=300)return L(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=bd(l.GetCallerIdentityResult,d),{$metadata:k(h),...w}},e0=async(h,d)=>{if(h.statusCode>=300)return L(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=fd(l.GetFederationTokenResult,d),{$metadata:k(h),...w}},p0=async(h,d)=>{if(h.statusCode>=300)return L(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Cd(l.GetSessionTokenResult,d),{$metadata:k(h),...w}},L=async(h,d)=>{const l={...h,body:await P.parseXmlErrorBody(h.body,d)},w=Iw(h,l.body);switch(w){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await kd(l,d);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await yd(l,d);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Qd(l,d);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Xd(l,d);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Fd(l,d);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await qd(l,d);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Kd(l,d);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Bd(l,d);default:const G=l.body;return nd({output:h,parsedBody:G.Error,errorCode:w})}},kd=async(h,d)=>{const l=h.body,w=rd(l.Error,d),G=new Sh({$metadata:k(h),...w});return T(G,l)},Kd=async(h,d)=>{const l=h.body,w=Od(l.Error,d),G=new Kh({$metadata:k(h),...w});return T(G,l)},Fd=async(h,d)=>{const l=h.body,w=gd(l.Error,d),G=new Eh({$metadata:k(h),...w});return T(G,l)},Bd=async(h,d)=>{const l=h.body,w=xd(l.Error,d),G=new Fh({$metadata:k(h),...w});return T(G,l)},qd=async(h,d)=>{const l=h.body,w=id(l.Error,d),G=new kh({$metadata:k(h),...w});return T(G,l)},yd=async(h,d)=>{const l=h.body,w=cd(l.Error,d),G=new mh({$metadata:k(h),...w});return T(G,l)},Qd=async(h,d)=>{const l=h.body,w=ed(l.Error,d),G=new Jh({$metadata:k(h),...w});return T(G,l)},Xd=async(h,d)=>{const l=h.body,w=pd(l.Error,d),G=new Dh({$metadata:k(h),...w});return T(G,l)},Yd=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[$]!=null){const w=Bh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const w=n0(h[e],d);if(h[e]?.length===0)l.Tags=[];Object.entries(w).forEach(([G,H])=>{const I=`Tags.${G}`;l[I]=H})}if(h[Oh]!=null){const w=Ad(h[Oh],d);if(h[Oh]?.length===0)l.TransitiveTagKeys=[];Object.entries(w).forEach(([G,H])=>{const I=`TransitiveTagKeys.${G}`;l[I]=H})}if(h[Vh]!=null)l[Vh]=h[Vh];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];if(h[V]!=null)l[V]=h[V];if(h[Lh]!=null){const w=Wd(h[Lh],d);if(h[Lh]?.length===0)l.ProvidedContexts=[];Object.entries(w).forEach(([G,H])=>{const I=`ProvidedContexts.${G}`;l[I]=H})}return l},Zd=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[Ah]!=null)l[Ah]=h[Ah];if(h[_h]!=null)l[_h]=h[_h];if(h[$]!=null){const w=Bh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},$d=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[ih]!=null)l[ih]=h[ih];if(h[jh]!=null)l[jh]=h[jh];if(h[$]!=null){const w=Bh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},Ud=(h,d)=>{const l={};if(h[Ph]!=null)l[Ph]=h[Ph];return l},Vd=(h,d)=>{const l={};if(h[O]!=null)l[O]=h[O];return l},Pd=(h,d)=>{return{}},vd=(h,d)=>{const l={};if(h[Wh]!=null)l[Wh]=h[Wh];if(h[Z]!=null)l[Z]=h[Z];if(h[$]!=null){const w=Bh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const w=n0(h[e],d);if(h[e]?.length===0)l.Tags=[];Object.entries(w).forEach(([G,H])=>{const I=`Tags.${G}`;l[I]=H})}return l},Md=(h,d)=>{const l={};if(h[y]!=null)l[y]=h[y];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];return l},Bh=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=zd(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},zd=(h,d)=>{const l={};if(h[ch]!=null)l[ch]=h[ch];return l},Nd=(h,d)=>{const l={};if(h[Rh]!=null)l[Rh]=h[Rh];if(h[Zh]!=null)l[Zh]=h[Zh];return l},Wd=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=Nd(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},Td=(h,d)=>{const l={};if(h[Nh]!=null)l[Nh]=h[Nh];if(h[xh]!=null)l[xh]=h[xh];return l},Ad=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;l[`member.${w}`]=G,w++}return l},n0=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=Td(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},ph=(h,d)=>{const l={};if(h[Yh]!=null)l[Yh]=S(h[Yh]);if(h[N]!=null)l[N]=S(h[N]);return l},Rd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[z]!=null)l[z]=ph(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[V]!=null)l[V]=S(h[V]);return l},Ld=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[z]!=null)l[z]=ph(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[rh]!=null)l[rh]=S(h[rh]);if(h[fh]!=null)l[fh]=S(h[fh]);if(h[zh]!=null)l[zh]=S(h[zh]);if(h[x]!=null)l[x]=S(h[x]);if(h[Th]!=null)l[Th]=S(h[Th]);if(h[V]!=null)l[V]=S(h[V]);return l},jd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[bh]!=null)l[bh]=S(h[bh]);if(h[z]!=null)l[z]=ph(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[ah]!=null)l[ah]=S(h[ah]);if(h[x]!=null)l[x]=S(h[x]);if(h[V]!=null)l[V]=S(h[V]);return l},t=(h,d)=>{const l={};if(h[O]!=null)l[O]=S(h[O]);if(h[sh]!=null)l[sh]=S(h[sh]);if(h[Ch]!=null)l[Ch]=S(h[Ch]);if(h[Uh]!=null)l[Uh]=T0(A0(h[Uh]));return l},ad=(h,d)=>{const l={};if(h[$h]!=null)l[$h]=S(h[$h]);return l},rd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},sd=(h,d)=>{const l={};if(h[Mh]!=null)l[Mh]=S(h[Mh]);if(h[N]!=null)l[N]=S(h[N]);return l},_d=(h,d)=>{const l={};if(h[g]!=null)l[g]=S(h[g]);return l},bd=(h,d)=>{const l={};if(h[gh]!=null)l[gh]=S(h[gh]);if(h[g]!=null)l[g]=S(h[g]);if(h[N]!=null)l[N]=S(h[N]);return l},fd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[vh]!=null)l[vh]=sd(h[vh],d);if(h[U]!=null)l[U]=u(h[U]);return l},Cd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);return l},Od=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},gd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},xd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},id=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},cd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},ed=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},pd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},k=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var nd=R0(Y),j=async(h,d,l,w,G)=>{const{hostname:H,protocol:I="https",port:Q,path:v}=await h.endpoint(),M={protocol:I,hostname:H,port:Q,method:"POST",path:v.endsWith("/")?v.slice(0,-1)+l:v+l,headers:d};if(w!==void 0)M.hostname=w;if(G!==void 0)M.body=G;return new W0(M)},a={"content-type":"application/x-www-form-urlencoded"},r="2011-06-15",s="Action",O="AccessKeyId",od="AssumeRole",Yh="AssumedRoleId",z="AssumedRoleUser",ud="AssumeRoleWithSAML",td="AssumeRoleWithWebIdentity",g="Account",N="Arn",x="Audience",q="Credentials",Zh="ContextAssertion",hw="DecodeAuthorizationMessage",$h="DecodedMessage",y="DurationSeconds",Uh="Expiration",Vh="ExternalId",Ph="EncodedMessage",vh="FederatedUser",Mh="FederatedUserId",lw="GetAccessKeyInfo",dw="GetCallerIdentity",ww="GetFederationToken",Gw="GetSessionToken",zh="Issuer",Nh="Key",Wh="Name",Th="NameQualifier",Z="Policy",$="PolicyArns",Ah="PrincipalArn",Rh="ProviderArn",Lh="ProvidedContexts",jh="ProviderId",U="PackedPolicySize",ah="Provider",W="RoleArn",i="RoleSessionName",rh="Subject",sh="SecretAccessKey",_h="SAMLAssertion",bh="SubjectFromWebIdentityToken",V="SourceIdentity",c="SerialNumber",fh="SubjectType",Ch="SessionToken",e="Tags",p="TokenCode",Oh="TransitiveTagKeys",gh="UserId",_="Version",xh="Value",ih="WebIdentityToken",ch="arn",m="message",b=(h)=>Object.entries(h).map(([d,l])=>eh(d)+"="+eh(l)).join("&"),Iw=(h,d)=>{if(d.Error?.Code!==void 0)return d.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,U0).ser(L0).de(C0).build(){}class nh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(V0,P0).ser(j0).de(O0).build(){}class lh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(v0,M0).ser(a0).de(g0).build(){}class oh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(r0).de(x0).build(){}class uh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(s0).de(i0).build(){}class th extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(_0).de(c0).build(){}class hl extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,z0).ser(b0).de(e0).build(){}class ll extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,N0).ser(f0).de(p0).build(){}var Hw={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:nh,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:oh,GetAccessKeyInfoCommand:uh,GetCallerIdentityCommand:th,GetFederationTokenCommand:hl,GetSessionTokenCommand:ll};class u0 extends R{}o0(Hw,u0);var t0="us-east-1",hd=(h)=>{if(typeof h?.Arn==="string"){const d=h.Arn.split(":");if(d.length>4&&d[4]!=="")return d[4]}return},ld=async(h,d,l)=>{const w=typeof h==="function"?await h():h,G=typeof d==="function"?await d():d;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${w} (provider)`,`${G} (parent client)`,`${t0} (STS default)`),w??G??t0},dd=(h,d)=>{let l,w;return async(G,H)=>{if(w=G,!l){const{logger:M=h?.parentClientConfig?.logger,region:n,requestHandler:qh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:Id}=h,Hd=await ld(n,h?.parentClientConfig?.region,Id);l=new d({credentialDefaultProvider:()=>async()=>w,region:Hd,requestHandler:qh,logger:M})}const{Credentials:I,AssumedRoleUser:Q}=await l.send(new hh(H));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${H.RoleArn}`);const v=hd(Q);return{accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...v&&{accountId:v}}}},wd=(h,d)=>{let l;return async(w)=>{if(!l){const{logger:Q=h?.parentClientConfig?.logger,region:v,requestHandler:M=h?.parentClientConfig?.requestHandler,credentialProviderLogger:n}=h,qh=await ld(v,h?.parentClientConfig?.region,n);l=new d({region:qh,requestHandler:M,logger:Q})}const{Credentials:G,AssumedRoleUser:H}=await l.send(new lh(w));if(!G||!G.AccessKeyId||!G.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${w.RoleArn}`);const I=hd(H);return{accessKeyId:G.AccessKeyId,secretAccessKey:G.SecretAccessKey,sessionToken:G.SessionToken,expiration:G.Expiration,...G.CredentialScope&&{credentialScope:G.CredentialScope},...I&&{accountId:I}}}};var Gd=(h,d)=>{if(!d)return h;else return class l extends h{constructor(w){super(w);for(let G of d)this.middlewareStack.use(G)}}},Sw=(h={},d)=>dd(h,Gd(R,d)),mw=(h={},d)=>wd(h,Gd(R,d)),AG=(h)=>(d)=>h({roleAssumer:Sw(d),roleAssumerWithWebIdentity:mw(d),...d});export{mw as getDefaultRoleAssumerWithWebIdentity,Sw as getDefaultRoleAssumer,AG as decorateDefaultCredentialProvider,F0 as __Client,Y as STSServiceException,R as STSClient,u0 as STS,Dh as RegionDisabledException,Jh as PackedPolicyTooLargeException,mh as MalformedPolicyDocumentException,kh as InvalidIdentityTokenException,Fh as InvalidAuthorizationMessageException,Eh as IDPRejectedClaimException,Kh as IDPCommunicationErrorException,N0 as GetSessionTokenResponseFilterSensitiveLog,ll as GetSessionTokenCommand,z0 as GetFederationTokenResponseFilterSensitiveLog,hl as GetFederationTokenCommand,th as GetCallerIdentityCommand,uh as GetAccessKeyInfoCommand,Sh as ExpiredTokenException,oh as DecodeAuthorizationMessageCommand,o as CredentialsFilterSensitiveLog,M0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,v0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,P0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,V0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,nh as AssumeRoleWithSAMLCommand,U0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,K as $Command};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{y as _} from"./chunk-7ce930fe69575c87.js";import"./chunk-c2d1f66cf8468e71.js";import{nb as a} from"./chunk-e19064e9f1d5faed.js";import{qb as l,wb as h} from"./chunk-4272071146eb5eb2.js";var R=_(a(),1);var m=_(a(),1);var c=_(a(),1),C=(e,s,r)=>{const i={EcsContainer:async(t)=>{const{fromHttp:n}=await import("./chunk-06b83143607ebdc8.js"),{fromContainerMetadata:d}=await import("./chunk-72add10919c9d7ae.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),c.chain(n(t??{}),d(t))},Ec2InstanceMetadata:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:n}=await import("./chunk-72add10919c9d7ae.js");return n(t)},Environment:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:n}=await import("./chunk-4548da0edd8c39ed.js");return n(t)}};if(e in i)return i[e];else throw new c.CredentialsProviderError(`Unsupported credential source in profile ${s}. Got ${e}, `+"expected EcsContainer or Ec2InstanceMetadata or Environment.",{logger:r})};var P=(e,{profile:s="default",logger:r}={})=>{return Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(j(e,{profile:s,logger:r})||O(e,{profile:s,logger:r}))},j=(e,{profile:s,logger:r})=>{const i=typeof e.source_profile==="string"&&typeof e.credential_source==="undefined";if(i)r?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return i},O=(e,{profile:s,logger:r})=>{const i=typeof e.credential_source==="string"&&typeof e.source_profile==="undefined";if(i)r?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return i},v=async(e,s,r,i={})=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const t=s[e];if(!r.roleAssumer){const{getDefaultRoleAssumer:I}=await import("./chunk-13e45ce3460f6375.js");r.roleAssumer=I({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:r?.parentClientConfig},r.clientPlugins)}const{source_profile:n}=t;if(n&&n in i)throw new m.CredentialsProviderError("Detected a cycle attempting to resolve credentials for profile"+` ${l(r)}. Profiles visited: `+Object.keys(i).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${n?`source_profile=[${n}]`:`profile=[${e}]`}`);const d=n?o(n,{...s,[n]:{...s[n],role_arn:t.role_arn??s[n].role_arn}},r,{...i,[n]:!0}):(await C(t.credential_source,e,r.logger)(r))(),u={RoleArn:t.role_arn,RoleSessionName:t.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:t.external_id,DurationSeconds:parseInt(t.duration_seconds||"3600",10)},{mfa_serial:f}=t;if(f){if(!r.mfaCodeProvider)throw new m.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});u.SerialNumber=f,u.TokenCode=await r.mfaCodeProvider(f)}const D=await d;return r.roleAssumer(D,u)};var x=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",b=async(e,s)=>import("./chunk-7aa7f7e219919c4d.js").then(({fromProcess:r})=>r({...e,profile:s})());var A=async(e,s={})=>{const{fromSSO:r}=await import("./chunk-5a2d89fce13094a9.js");return r({profile:e,logger:s.logger})()},k=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var w=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,y=(e,s)=>{return s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}})};var S=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,$=async(e,s)=>import("./chunk-1b71d04a15bfa432.js").then(({fromTokenFile:r})=>r({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})());var o=async(e,s,r,i={})=>{const t=s[e];if(Object.keys(i).length>0&&w(t))return y(t,r);if(P(t,{profile:e,logger:r.logger}))return v(e,s,r,i);if(w(t))return y(t,r);if(S(t))return $(t,r);if(x(t))return b(r,e);if(k(t))return await A(e,r);throw new R.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var H=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const s=await h(e);return o(l(e),s,e)};export{H as fromIni};