@agentlang/lstudio 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{fs-Dyzn-3Q3.js → fs-CnoJf0OJ.js} +1 -1
- package/assets/{index-Bh5WGO72.js → index-7hDd_gG8.js} +86 -86
- package/assets/{index-Bd3UX10E.js → index-CyKk8HIa.js} +1 -1
- package/assets/{index-D4z_hbl0-owKXW4gh.js → index-D4z_hbl0-BSSIfHPQ.js} +1 -1
- package/assets/{index-C2QJ348N.js → index-D7RCttBT.js} +1 -1
- package/assets/{index-CvMhd4nu.js → index-DKYFN0ml.js} +1 -1
- package/assets/{index.browser-D0HvYWwC.js → index.browser-Cp5A8bSI.js} +3 -3
- package/assets/{loadCognitoIdentity-B5bBCqUu.js → loadCognitoIdentity-BxZf5foT.js} +1 -1
- package/assets/{loadSts-ez7ksS5B.js → loadSts-DwTUXGQw.js} +1 -1
- package/assets/{replService-C-Kfsr9e.js → replService-0g6vmxbl.js} +1 -1
- package/assets/{resolveDefaultsModeConfig-Dw2VgoA0.js → resolveDefaultsModeConfig-B9DEWYJ0.js} +1 -1
- package/assets/{util-CVB5Ujo1.js → util-BUUm0rJY.js} +1 -1
- package/assets/{winston-1qzyIKCb-B6Pv3uKG.js → winston-1qzyIKCb-CQkZOlCR.js} +1 -1
- package/assets/{winston-D9Nua224.js → winston-CAEC4nbA.js} +1 -1
- package/assets/{winston-C8qEAtEw.js → winston-CgtDbNtM.js} +1 -1
- package/assets/{winston-CtxF18qc-DAaFLwqu.js → winston-CtxF18qc-EuBZu91o.js} +1 -1
- package/index.html +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/loadCognitoIdentity-
|
|
2
|
-
import{_ as I}from"./preload-helper-BlTxHScW.js";import{a as O,b as N,t as x,s as D,H as K,p as H,F as j,n as q}from"./normalizeProvider-BrOPyH3l.js";class A extends Error{name="ProviderError";tryNextLink;constructor(t,o=!0){let r,n=!0;typeof o=="boolean"?(r=void 0,n=o):o!=null&&typeof o=="object"&&(r=o.logger,n=o.tryNextLink??!0),super(t),this.tryNextLink=n,Object.setPrototypeOf(this,A.prototype),r?.debug?.(`@smithy/property-provider ${n?"->":"(!)"} ${t}`)}static from(t,o=!0){return Object.assign(new this(t.message,o),t)}}class l extends A{name="CredentialsProviderError";constructor(t,o=!0){super(t,o),Object.setPrototypeOf(this,l.prototype)}}function _(e){return Promise.all(Object.keys(e).reduce((t,o)=>{const r=e[o];return typeof r=="string"?t.push([o,r]):t.push(r().then(n=>[o,n])),t},[])).then(t=>t.reduce((o,[r,n])=>(o[r]=n,o),{}))}function k(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:o,CognitoIdentityClient:r}=await I(async()=>{const{GetCredentialsForIdentityCommand:c,CognitoIdentityClient:f}=await import("./loadCognitoIdentity-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/loadCognitoIdentity-BxZf5foT.js","assets/normalizeProvider-BrOPyH3l.js","assets/resolveDefaultsModeConfig-B9DEWYJ0.js","assets/preload-helper-BlTxHScW.js","assets/index-7hDd_gG8.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-ChvoNxcO.js","assets/__vite-browser-external-DLjrMatA.js","assets/inherits_browser-nmOknR35-Bp0mvRSL.js","assets/index-6mKfgpcs-DsgiI2lM.js","assets/_commonjsHelpers-B4e78b8K-W3E8ocG7.js","assets/index-DsIu-45t-Bejjlpz4.js","assets/index-DSosZ5sh-Ceejs_jv.js","assets/index-69shuAsh-DF18H7zf.js","assets/index-BJBOx-Z---hbiLl7B.js","assets/index.browser-BHPvGrwi-6Mh8eUw-.js","assets/_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js","assets/_commonjs-dynamic-modules-B7n8ZNar.js","assets/index-OdGGJiBD.css","assets/loadSts-DwTUXGQw.js","assets/index-CyKk8HIa.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as I}from"./preload-helper-BlTxHScW.js";import{a as O,b as N,t as x,s as D,H as K,p as H,F as j,n as q}from"./normalizeProvider-BrOPyH3l.js";class A extends Error{name="ProviderError";tryNextLink;constructor(t,o=!0){let r,n=!0;typeof o=="boolean"?(r=void 0,n=o):o!=null&&typeof o=="object"&&(r=o.logger,n=o.tryNextLink??!0),super(t),this.tryNextLink=n,Object.setPrototypeOf(this,A.prototype),r?.debug?.(`@smithy/property-provider ${n?"->":"(!)"} ${t}`)}static from(t,o=!0){return Object.assign(new this(t.message,o),t)}}class l extends A{name="CredentialsProviderError";constructor(t,o=!0){super(t,o),Object.setPrototypeOf(this,l.prototype)}}function _(e){return Promise.all(Object.keys(e).reduce((t,o)=>{const r=e[o];return typeof r=="string"?t.push([o,r]):t.push(r().then(n=>[o,n])),t},[])).then(t=>t.reduce((o,[r,n])=>(o[r]=n,o),{}))}function k(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:o,CognitoIdentityClient:r}=await I(async()=>{const{GetCredentialsForIdentityCommand:c,CognitoIdentityClient:f}=await import("./loadCognitoIdentity-BxZf5foT.js");return{GetCredentialsForIdentityCommand:c,CognitoIdentityClient:f}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])),n=c=>e.clientConfig?.[c]??e.parentClientConfig?.[c]??t?.callerClientConfig?.[c],{Credentials:{AccessKeyId:s=L(e.logger),Expiration:i,SecretKey:d=M(e.logger),SessionToken:u}=$(e.logger)}=await(e.client??new r(Object.assign({},e.clientConfig??{},{region:n("region"),profile:n("profile"),userAgentAppId:n("userAgentAppId")}))).send(new o({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await _(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:s,secretAccessKey:d,sessionToken:u,expiration:i}}}function L(e){throw new l("Response from Amazon Cognito contained no access key ID",{logger:e})}function $(e){throw new l("Response from Amazon Cognito contained no credentials",{logger:e})}function M(e){throw new l("Response from Amazon Cognito contained no secret key",{logger:e})}const b="IdentityIds";class B{dbName;constructor(t="aws:cognito-identity-ids"){this.dbName=t}getItem(t){return this.withObjectStore("readonly",o=>{const r=o.get(t);return new Promise(n=>{r.onerror=()=>n(null),r.onsuccess=()=>n(r.result?r.result.value:null)})}).catch(()=>null)}removeItem(t){return this.withObjectStore("readwrite",o=>{const r=o.delete(t);return new Promise((n,s)=>{r.onerror=()=>s(r.error),r.onsuccess=()=>n()})})}setItem(t,o){return this.withObjectStore("readwrite",r=>{const n=r.put({id:t,value:o});return new Promise((s,i)=>{n.onerror=()=>i(n.error),n.onsuccess=()=>s()})})}getDb(){const t=self.indexedDB.open(this.dbName,1);return new Promise((o,r)=>{t.onsuccess=()=>{o(t.result)},t.onerror=()=>{r(t.error)},t.onblocked=()=>{r(new Error("Unable to access DB"))},t.onupgradeneeded=()=>{const n=t.result;n.onerror=()=>{r(new Error("Failed to create object store"))},n.createObjectStore(b,{keyPath:"id"})}})}withObjectStore(t,o){return this.getDb().then(r=>{const n=r.transaction(b,t);return n.oncomplete=()=>r.close(),new Promise((s,i)=>{n.onerror=()=>i(n.error),s(o(n.objectStore(b)))}).catch(s=>{throw r.close(),s})})}}class W{store;constructor(t={}){this.store=t}getItem(t){return t in this.store?this.store[t]:null}removeItem(t){delete this.store[t]}setItem(t,o){this.store[t]=o}}const U=new W;function F(){return typeof self=="object"&&self.indexedDB?new B:typeof window=="object"&&window.localStorage?window.localStorage:U}function z({accountId:e,cache:t=F(),client:o,clientConfig:r,customRoleArn:n,identityPoolId:s,logins:i,userIdentifier:d=!i||Object.keys(i).length===0?"ANONYMOUS":void 0,logger:u,parentClientConfig:c}){u?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const f=d?`aws:cognito-identity-credentials:${s}:${d}`:void 0;let a=async w=>{const{GetIdCommand:m,CognitoIdentityClient:y}=await I(async()=>{const{GetIdCommand:g,CognitoIdentityClient:P}=await import("./loadCognitoIdentity-BxZf5foT.js");return{GetIdCommand:g,CognitoIdentityClient:P}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])),h=g=>r?.[g]??c?.[g]??w?.callerClientConfig?.[g],C=o??new y(Object.assign({},r??{},{region:h("region"),profile:h("profile"),userAgentAppId:h("userAgentAppId")}));let p=f&&await t.getItem(f);if(!p){const{IdentityId:g=G(u)}=await C.send(new m({AccountId:e,IdentityPoolId:s,Logins:i?await _(i):void 0}));p=g,f&&Promise.resolve(t.setItem(f,p)).catch(()=>{})}return a=k({client:C,customRoleArn:n,logins:i,identityId:p}),a(w)};return w=>a(w).catch(async m=>{throw f&&Promise.resolve(t.removeItem(f)).catch(()=>{}),m})}function G(e){throw new l("Response from Amazon Cognito contained no identity ID",{logger:e})}const ie=e=>k({...e}),ae=e=>z({...e}),V="169.254.170.2",J="169.254.170.23",Y="[fd00:ec2::23]",Q=(e,t)=>{if(e.protocol!=="https:"&&!(e.hostname===V||e.hostname===J||e.hostname===Y)){if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;const o=e.hostname.split("."),r=n=>{const s=parseInt(n,10);return 0<=s&&s<=255};if(o[0]==="127"&&r(o[1])&&r(o[2])&&r(o[3])&&o.length===4)return}throw new l(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
3
3
|
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
4
4
|
- ECS container host 169.254.170.2
|
|
5
5
|
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:t})}},T=e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),R="The stream has already been transformed.",X=e=>{if(!E(e)&&!T(e)){const n=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${n}`)}let t=!1;const o=async()=>{if(t)throw new Error(R);return t=!0,await D(e)},r=n=>{if(typeof n.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
|
|
6
|
-
If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return n.stream()};return Object.assign(e,{transformToByteArray:o,transformToString:async n=>{const s=await o();if(n==="base64")return O(s);if(n==="hex")return N(s);if(n===void 0||n==="utf8"||n==="utf-8")return x(s);if(typeof TextDecoder=="function")return new TextDecoder(n).decode(s);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(R);if(t=!0,E(e))return r(e);if(T(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},E=e=>typeof Blob=="function"&&e instanceof Blob;function Z(e){return new K({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((t,[o,r])=>(t[o]=r,t),{}),fragment:e.hash})}async function ee(e,t){const r=await X(e.body).transformToString();if(e.statusCode===200){const n=JSON.parse(r);if(typeof n.AccessKeyId!="string"||typeof n.SecretAccessKey!="string"||typeof n.Token!="string"||typeof n.Expiration!="string")throw new l("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:t});return{accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,sessionToken:n.Token,expiration:H(n.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let n={};try{n=JSON.parse(r)}catch{}throw Object.assign(new l(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:n.Code,Message:n.Message})}throw new l(`Server responded with status: ${e.statusCode}`,{logger:t})}const te=(e,t,o)=>async()=>{for(let r=0;r<t;++r)try{return await e()}catch{await new Promise(s=>setTimeout(s,o))}return await e()},ce=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let t;const o=e.credentialsFullUri;if(o)t=o;else throw new l("No HTTP credential provider host provided.",{logger:e.logger});const r=new URL(t);Q(r,e.logger);const n=new j;return te(async()=>{const s=Z(r);e.authorizationToken&&(s.headers.Authorization=e.authorizationToken);const i=await n.handle(s);return ee(i.response)},e.maxRetries??3,e.timeout??1e3)},ne="us-east-1",le=(e,t,o)=>{let r;return async(n={})=>{const{callerClientConfig:s}=n,i=e.clientConfig?.profile??s?.profile,d=e.logger??s?.logger;d?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");const u={...e.params,RoleSessionName:e.params.RoleSessionName??"aws-sdk-js-"+Date.now()};if(u?.SerialNumber){if(!e.mfaCodeProvider)throw new l("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:d});u.TokenCode=await e.mfaCodeProvider(u?.SerialNumber)}const{AssumeRoleCommand:c,STSClient:f}=await I(async()=>{const{AssumeRoleCommand:w,STSClient:m}=await import("./loadSts-
|
|
6
|
+
If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return n.stream()};return Object.assign(e,{transformToByteArray:o,transformToString:async n=>{const s=await o();if(n==="base64")return O(s);if(n==="hex")return N(s);if(n===void 0||n==="utf8"||n==="utf-8")return x(s);if(typeof TextDecoder=="function")return new TextDecoder(n).decode(s);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(R);if(t=!0,E(e))return r(e);if(T(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},E=e=>typeof Blob=="function"&&e instanceof Blob;function Z(e){return new K({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((t,[o,r])=>(t[o]=r,t),{}),fragment:e.hash})}async function ee(e,t){const r=await X(e.body).transformToString();if(e.statusCode===200){const n=JSON.parse(r);if(typeof n.AccessKeyId!="string"||typeof n.SecretAccessKey!="string"||typeof n.Token!="string"||typeof n.Expiration!="string")throw new l("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:t});return{accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,sessionToken:n.Token,expiration:H(n.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let n={};try{n=JSON.parse(r)}catch{}throw Object.assign(new l(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:n.Code,Message:n.Message})}throw new l(`Server responded with status: ${e.statusCode}`,{logger:t})}const te=(e,t,o)=>async()=>{for(let r=0;r<t;++r)try{return await e()}catch{await new Promise(s=>setTimeout(s,o))}return await e()},ce=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let t;const o=e.credentialsFullUri;if(o)t=o;else throw new l("No HTTP credential provider host provided.",{logger:e.logger});const r=new URL(t);Q(r,e.logger);const n=new j;return te(async()=>{const s=Z(r);e.authorizationToken&&(s.headers.Authorization=e.authorizationToken);const i=await n.handle(s);return ee(i.response)},e.maxRetries??3,e.timeout??1e3)},ne="us-east-1",le=(e,t,o)=>{let r;return async(n={})=>{const{callerClientConfig:s}=n,i=e.clientConfig?.profile??s?.profile,d=e.logger??s?.logger;d?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");const u={...e.params,RoleSessionName:e.params.RoleSessionName??"aws-sdk-js-"+Date.now()};if(u?.SerialNumber){if(!e.mfaCodeProvider)throw new l("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:d});u.TokenCode=await e.mfaCodeProvider(u?.SerialNumber)}const{AssumeRoleCommand:c,STSClient:f}=await I(async()=>{const{AssumeRoleCommand:w,STSClient:m}=await import("./loadSts-DwTUXGQw.js").then(y=>y.w);return{AssumeRoleCommand:w,STSClient:m}},__vite__mapDeps([19,2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]));if(!r){const w=typeof t=="function"?t():void 0,m=[e.masterCredentials,e.clientConfig?.credentials,void s?.credentials,s?.credentialDefaultProvider?.(),w];let y="STS client default credentials";if(m[0])y="options.masterCredentials";else if(m[1])y="options.clientConfig.credentials";else{if(m[2])throw y="caller client's credentials",new Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");m[3]?y="caller client's credentialDefaultProvider":m[4]&&(y="AWS SDK default credentials")}const h=[e.clientConfig?.region,s?.region,await o?.({profile:i}),ne];let C="default partition's default region";h[0]?C="options.clientConfig.region":h[1]?C="caller client's region":h[2]&&(C="file or env region");const p=[v(e.clientConfig?.requestHandler),v(s?.requestHandler)];let g="STS default requestHandler";p[0]?g="options.clientConfig.requestHandler":p[1]&&(g="caller client's requestHandler"),d?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ${C}=${await q(S(h))()}, ${y}, ${g}.`),r=new f({userAgentAppId:s?.userAgentAppId,...e.clientConfig,credentials:S(m),logger:d,profile:i,region:S(h),requestHandler:S(p)})}if(e.clientPlugins)for(const w of e.clientPlugins)r.middlewareStack.use(w);const{Credentials:a}=await r.send(new c(u));if(!a||!a.AccessKeyId||!a.SecretAccessKey)throw new l(`Invalid response from STS.assumeRole call with role ${u.RoleArn}`,{logger:d});return{accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,sessionToken:a.SessionToken,expiration:a.Expiration,credentialScope:a.CredentialScope}}},v=e=>e?.metadata?.handlerProtocol==="h2"?void 0:e,S=e=>{for(const t of e)if(t!==void 0)return t},re=e=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:o,roleSessionName:r,webIdentityToken:n,providerId:s,policyArns:i,policy:d,durationSeconds:u}=e;let{roleAssumerWithWebIdentity:c}=e;if(!c){const{getDefaultRoleAssumerWithWebIdentity:f}=await I(async()=>{const{getDefaultRoleAssumerWithWebIdentity:a}=await import("./index-CyKk8HIa.js");return{getDefaultRoleAssumerWithWebIdentity:a}},__vite__mapDeps([20,19,2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]));c=f({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...t?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return c({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:s,PolicyArns:i,Policy:d,DurationSeconds:u})},de=e=>re({...e});export{ie as fromCognitoIdentity,ae as fromCognitoIdentityPool,ce as fromHttp,le as fromTemporaryCredentials,de as fromWebToken};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as G,n as M,c as qe,t as xe,d as _e,e as Ve,g as Je,h as We,a as H,i as Ke,f as Qe,s as Xe,F as Ye}from"./normalizeProvider-BrOPyH3l.js";import{i as Ze,b as et,c as Pe,S as ie,m as tt,d as st,e as nt,T as y,f as oe,N as k,h as R,j as rt,L as Re,k as ke,v as it,R as ot,l as at,n as ve,o as ct,E as ut,r as dt,p as pt,q as lt,s as gt,t as ft,u as mt,D as ht,w as St,x as yt,y as Et,z as wt,A as Ct,B as It,F as bt,G as At,H as xt,I as _t,a as Pt,J as Rt,K as kt,M as vt,O as Ot,P as Dt,Q as Tt,U as Nt,V as Mt,W as Ut,X as $t,C as Oe,g as De}from"./resolveDefaultsModeConfig-Dw2VgoA0.js";import"./preload-helper-BlTxHScW.js";import"./index-Bh5WGO72.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-B7n8ZNar.js";const Ft=t=>e=>async s=>{if(!G.isInstance(s.request))return e(s);const{request:n}=s,{handlerProtocol:r=""}=t.requestHandler.metadata||{};if(r.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let i=n.hostname;n.port!=null&&(i+=`:${n.port}`),n.headers.host=i}return e(s)},zt={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},jt=t=>({applyToStack:e=>{e.add(Ft(t),zt)}}),Lt=()=>(t,e)=>async s=>{try{const n=await t(s),{clientName:r,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u,overrideOutputFilterSensitiveLog:c}=a,d=u??e.inputFilterSensitiveLog,p=c??e.outputFilterSensitiveLog,{$metadata:g,...m}=n.output;return o?.info?.({clientName:r,commandName:i,input:d(s.input),output:p(m),metadata:g}),n}catch(n){const{clientName:r,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u}=a,c=u??e.inputFilterSensitiveLog;throw o?.error?.({clientName:r,commandName:i,input:c(s.input),error:n,metadata:n.$metadata}),n}},Ht={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Gt=t=>({applyToStack:e=>{e.add(Lt(),Ht)}}),Bt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},qt=()=>t=>async e=>t(e),Vt=t=>({applyToStack:e=>{e.add(qt(),Bt)}}),Jt=void 0;function Wt(t){return t===void 0?!0:typeof t=="string"&&t.length<=50}function Kt(t){const e=M(t.userAgentAppId??Jt),{customUserAgent:s}=t;return Object.assign(t,{customUserAgent:typeof s=="string"?[[s]]:s,userAgentAppId:async()=>{const n=await e();if(!Wt(n)){const r=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?console:t.logger;typeof n!="string"?r?.warn("userAgentAppId must be a string or undefined."):n.length>50&&r?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}const Te=(t,e=!1)=>{if(e){for(const s of t.split("."))if(!Te(s))return!1;return!0}return!(!Ze(t)||t.length<3||t.length>63||t!==t.toLowerCase()||et(t))},ae=":",Qt="/",Xt=t=>{const e=t.split(ae);if(e.length<6)return null;const[s,n,r,i,o,...a]=e;if(s!=="arn"||n===""||r===""||a.join(ae)==="")return null;const u=a.map(c=>c.split(Qt)).flat();return{partition:n,service:r,region:i,accountId:o,resourceId:u}},Yt=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws 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)"},"mx-central-1":{description:"Mexico (Central)"},"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-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"EU (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso 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:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{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-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],Zt={partitions:Yt};let es=Zt;const ts=t=>{const{partitions:e}=es;for(const n of e){const{regions:r,outputs:i}=n;for(const[o,a]of Object.entries(r))if(o===t)return{...i,...a}}for(const n of e){const{regionRegex:r,outputs:i}=n;if(new RegExp(r).test(t))return{...i}}const s=e.find(n=>n.id==="aws");if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}},Ne={isVirtualHostableS3Bucket:Te,parseArn:Xt,partition:ts};Pe.aws=Ne;function ss(t,e,s){return t.$source||(t.$source={}),t.$source[e]=s,t}function I(t,e,s){t.__aws_sdk_context?t.__aws_sdk_context.features||(t.__aws_sdk_context.features={}):t.__aws_sdk_context={features:{}},t.__aws_sdk_context.features[e]=s}const ce=t=>qe.isInstance(t)?t.headers?.date??t.headers?.Date:void 0,Me=t=>new Date(Date.now()+t),ns=(t,e)=>Math.abs(Me(e).getTime()-t)>=3e5,ue=(t,e)=>{const s=Date.parse(t);return ns(s,e)?s-Date.now():e},U=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},rs=async t=>{const e=U("context",t.context),s=U("config",t.config),n=e.endpointV2?.properties?.authSchemes?.[0],i=await U("signer",s.signer)(n),o=t?.signingRegion,a=t?.signingRegionSet,u=t?.signingName;return{config:s,signer:i,signingRegion:o,signingRegionSet:a,signingName:u}};class is{async sign(e,s,n){if(!G.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await rs(n),{config:i,signer:o}=r;let{signingRegion:a,signingName:u}=r;const c=n.context;if(c?.authSchemes?.length??!1){const[p,g]=c.authSchemes;p?.name==="sigv4a"&&g?.name==="sigv4"&&(a=g?.signingRegion??a,u=g?.signingName??u)}return await o.sign(e,{signingDate:Me(i.systemClockOffset),signingRegion:a,signingService:u})}errorHandler(e){return s=>{const n=s.ServerTime??ce(s.$response);if(n){const r=U("config",e.config),i=r.systemClockOffset;r.systemClockOffset=ue(n,r.systemClockOffset),r.systemClockOffset!==i&&s.$metadata&&(s.$metadata.clockSkewCorrected=!0)}throw s}}successHandler(e,s){const n=ce(e);if(n){const r=U("config",s.config);r.systemClockOffset=ue(n,r.systemClockOffset)}}}const os=t=>{let e=t.credentials,s=!!t.credentials,n;Object.defineProperty(t,"credentials",{set(c){c&&c!==e&&c!==n&&(s=!0),e=c;const d=as(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),p=cs(t,d);if(s&&!p.attributed){const g=typeof e=="object"&&e!==null;n=async m=>{const v=await p(m);return g&&(!v.$source||Object.keys(v.$source).length===0)?ss(v,"CREDENTIALS_CODE","e"):v},n.memoized=p.memoized,n.configBound=p.configBound,n.attributed=!0}else n=p},get(){return n},enumerable:!0,configurable:!0}),t.credentials=e;const{signingEscapePath:r=!0,systemClockOffset:i=t.systemClockOffset||0,sha256:o}=t;let a;return t.signer?a=M(t.signer):t.regionInfoProvider?a=()=>M(t.region)().then(async c=>[await t.regionInfoProvider(c,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},c]).then(([c,d])=>{const{signingRegion:p,signingService:g}=c;t.signingRegion=t.signingRegion||p||d,t.signingName=t.signingName||g||t.serviceId;const m={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:r},P=t.signerConstructor||ie;return new P(m)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await M(t.region)(),properties:{}},c);const d=c.signingRegion,p=c.signingName;t.signingRegion=t.signingRegion||d,t.signingName=t.signingName||p||t.serviceId;const g={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:r},m=t.signerConstructor||ie;return new m(g)},Object.assign(t,{systemClockOffset:i,signingEscapePath:r,signer:a})};function as(t,{credentials:e,credentialDefaultProvider:s}){let n;return e?e?.memoized?n=e:n=tt(e,nt,st):s?n=M(s(Object.assign({},t,{parentClientConfig:t}))):n=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},n.memoized=!0,n}function cs(t,e){if(e.configBound)return e;const s=async n=>e({...n,callerClientConfig:t});return s.memoized=e.memoized,s.configBound=!0,s}class us{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,s){const n=s.getMemberSchemas(),r=Object.values(n).find(i=>!!i.getMergedTraits().httpPayload);if(r){const i=r.getMergedTraits().mediaType;return i||(r.isStringSchema()?"text/plain":r.isBlobSchema()?"application/octet-stream":e)}else if(!s.isUnitSchema()&&Object.values(n).find(o=>{const{httpQuery:a,httpQueryParams:u,httpHeader:c,httpLabel:d,httpPrefixHeaders:p}=o.getMergedTraits();return!a&&!u&&!c&&!d&&p===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,s,n,r,i,o){let a=s,u=e;e.includes("#")&&([a,u]=e.split("#"));const c={$metadata:i,$fault:n.statusCode<500?"client":"server"},d=y.for(a);try{return{errorSchema:o?.(d,u)??d.getSchema(e),errorMetadata:c}}catch{r.message=r.message??r.Message??"UnknownError";const g=y.for("smithy.ts.sdk.synthetic."+a),m=g.getBaseException();if(m){const P=g.getErrorCtor(m)??Error;throw this.decorateServiceException(Object.assign(new P({name:u}),c),r)}throw this.decorateServiceException(Object.assign(new Error(u),c),r)}}decorateServiceException(e,s={}){if(this.queryCompat){const n=e.Message??s.Message,r=oe(e,s);n&&(r.message=n),r.Error={...r.Error,Type:r.Error.Type,Code:r.Error.Code,Message:r.Error.message??r.Error.Message??n};const i=r.$metadata.requestId;return i&&(r.RequestId=i),r}return oe(e,s)}setQueryCompatError(e,s){const n=s.headers?.["x-amzn-query-error"];if(e!==void 0&&n!=null){const[r,i]=n.split(";"),o=Object.entries(e),a={Code:r,Type:i};Object.assign(e,a);for(const[u,c]of o)a[u==="message"?"Message":u]=c;delete a.__type,e.Error=a}}queryCompatOutput(e,s){e.Error&&(s.Error=e.Error),e.Type&&(s.Type=e.Type),e.Code&&(s.Code=e.Code)}findQueryCompatibleError(e,s){try{return e.getSchema(s)}catch{return e.find(r=>k.of(r).getMergedTraits().awsQueryError?.[0]===s)}}}class B{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*ds(t,e){if(t.isUnitSchema())return;const s=t.getSchema();for(let n=0;n<s[4].length;++n){const r=s[4][n],i=s[5][n],o=new k([i,0],r);!(r in e)&&!o.isIdempotencyToken()||(yield[r,o])}}function*ps(t,e,s){if(t.isUnitSchema())return;const n=t.getSchema();let r=Object.keys(e).filter(i=>i!=="__type").length;for(let i=0;i<n[4].length&&r!==0;++i){const o=n[4][i],a=n[5][i],u=new k([a,0],o);let c=o;s&&(c=u.getMergedTraits()[s]??o),c in e&&(yield[o,u],r-=1)}}class ls{from;to;keys;constructor(e,s){this.from=e,this.to=s,this.keys=new Set(Object.keys(this.from).filter(n=>n!=="__type"))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,s=this.from[e];this.to.$unknown=[e,s]}}}function gs(t,e,s){if(s?.source){const n=s.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||n!==String(e)))return n.includes(".")?new R(n,"bigDecimal"):BigInt(n)}return e}const fs=(t,e)=>rt(t,e).then(s=>(e?.utf8Encoder??xe)(s)),ms=(t,e)=>fs(t,e).then(s=>{if(s.length)try{return JSON.parse(s)}catch(n){throw n?.name==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:s}),n}return{}}),hs=(t,e)=>{const s=(i,o)=>Object.keys(i).find(a=>a.toLowerCase()===o.toLowerCase()),n=i=>{let o=i;return typeof o=="number"&&(o=o.toString()),o.indexOf(",")>=0&&(o=o.split(",")[0]),o.indexOf(":")>=0&&(o=o.split(":")[0]),o.indexOf("#")>=0&&(o=o.split("#")[1]),o},r=s(t.headers,"x-amzn-errortype");if(r!==void 0)return n(t.headers[r]);if(e&&typeof e=="object"){const i=s(e,"code");if(i&&e[i]!==void 0)return n(e[i]);if(e.__type!==void 0)return n(e.__type)}};class Ss extends B{settings;constructor(e){super(),this.settings=e}async read(e,s){return this._read(e,typeof s=="string"?JSON.parse(s,gs):await ms(s,this.serdeContext))}readObject(e,s){return this._read(e,s)}_read(e,s){const n=s!==null&&typeof s=="object",r=k.of(e);if(n){if(r.isStructSchema()){const o=r.isUnionSchema(),a={};let u;o&&(u=new ls(s,a));for(const[c,d]of ps(r,s,this.settings.jsonName?"jsonName":!1)){const p=this.settings.jsonName?d.getMergedTraits().jsonName??c:c;o&&u.mark(p),s[p]!=null&&(a[c]=this._read(d,s[p]))}return o&&u.writeUnknown(),a}if(Array.isArray(s)&&r.isListSchema()){const o=r.getValueSchema(),a=[],u=!!r.getMergedTraits().sparse;for(const c of s)(u||c!=null)&&a.push(this._read(o,c));return a}if(r.isMapSchema()){const o=r.getValueSchema(),a={},u=!!r.getMergedTraits().sparse;for(const[c,d]of Object.entries(s))(u||d!=null)&&(a[c]=this._read(o,d));return a}}if(r.isBlobSchema()&&typeof s=="string")return _e(s);const i=r.getMergedTraits().mediaType;if(r.isStringSchema()&&typeof s=="string"&&i)return i==="application/json"||i.endsWith("+json")?Re.from(s):s;if(r.isTimestampSchema()&&s!=null)switch(ke(r,this.settings)){case 5:return We(s);case 6:return Je(s);case 7:return Ve(s);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",s),new Date(s)}if(r.isBigIntegerSchema()&&(typeof s=="number"||typeof s=="string"))return BigInt(s);if(r.isBigDecimalSchema()&&s!=null){if(s instanceof R)return s;const o=s;return o.type==="bigDecimal"&&"string"in o?new R(o.string,o.type):new R(String(s),"bigDecimal")}if(r.isNumericSchema()&&typeof s=="string"){switch(s){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return s}if(r.isDocumentSchema())if(n){const o=Array.isArray(s)?[]:{};for(const[a,u]of Object.entries(s))u instanceof R?o[a]=u:o[a]=this._read(r,u);return o}else return structuredClone(s);return s}}const de="Ν";class ys{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(e,s)=>{if(s instanceof R){const n=`${de+"nv"+this.counter++}_`+s.string;return this.values.set(`"${n}"`,s.string),n}if(typeof s=="bigint"){const n=s.toString(),r=`${de+"b"+this.counter++}_`+n;return this.values.set(`"${r}"`,n),r}return s}}replaceInJson(e){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return e;for(const[s,n]of this.values)e=e.replace(s,n);return e}}class Es extends B{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,s){this.rootSchema=k.of(e),this.buffer=this._write(this.rootSchema,s)}writeDiscriminatedDocument(e,s){this.write(e,s),typeof this.buffer=="object"&&(this.buffer.__type=k.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:s}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!s)return JSON.stringify(this.buffer);const n=new ys;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}_write(e,s,n){const r=s!==null&&typeof s=="object",i=k.of(e);if(r){if(i.isStructSchema()){const o={};for(const[a,u]of ds(i,s)){const c=this._write(u,s[a],i);if(c!==void 0){const d=u.getMergedTraits().jsonName,p=this.settings.jsonName?d??a:a;o[p]=c}}if(i.isUnionSchema()&&Object.keys(o).length===0){const{$unknown:a}=s;if(Array.isArray(a)){const[u,c]=a;o[u]=this._write(15,c)}}return o}if(Array.isArray(s)&&i.isListSchema()){const o=i.getValueSchema(),a=[],u=!!i.getMergedTraits().sparse;for(const c of s)(u||c!=null)&&a.push(this._write(o,c));return a}if(i.isMapSchema()){const o=i.getValueSchema(),a={},u=!!i.getMergedTraits().sparse;for(const[c,d]of Object.entries(s))(u||d!=null)&&(a[c]=this._write(o,d));return a}if(s instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema()))return i===this.rootSchema?s:(this.serdeContext?.base64Encoder??H)(s);if(s instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema()))switch(ke(i,this.settings)){case 5:return s.toISOString().replace(".000Z","Z");case 6:return Ke(s);case 7:return s.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",s),s.getTime()/1e3}s instanceof R&&(this.useReplacer=!0)}if(!(s===null&&n?.isStructSchema())){if(i.isStringSchema()){if(typeof s>"u"&&i.isIdempotencyToken())return it();const o=i.getMergedTraits().mediaType;return s!=null&&o&&(o==="application/json"||o.endsWith("+json"))?Re.from(s):s}if(typeof s=="number"&&i.isNumericSchema())return Math.abs(s)===1/0||isNaN(s)?String(s):s;if(typeof s=="string"&&i.isBlobSchema())return i===this.rootSchema?s:(this.serdeContext?.base64Encoder??H)(s);if(typeof s=="bigint"&&(this.useReplacer=!0),i.isDocumentSchema())if(r){const o=Array.isArray(s)?[]:{};for(const[a,u]of Object.entries(s))u instanceof R?(this.useReplacer=!0,o[a]=u):o[a]=this._write(i,u);return o}else return structuredClone(s);return s}}}class ws extends B{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new Es(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new Ss(this.settings);return e.setSerdeContext(this.serdeContext),e}}class Cs extends ot{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:n,jsonCodec:r}){super({defaultNamespace:e}),this.serviceTarget=s,this.codec=r??new ws({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!n,this.mixin=new us(this.awsQueryCompatible)}async serializeRequest(e,s,n){const r=await super.serializeRequest(e,s,n);return r.path.endsWith("/")||(r.path+="/"),Object.assign(r.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(r.headers["x-amzn-query-mode"]="true"),(at(e.input)==="unit"||!r.body)&&(r.body="{}"),r}getPayloadCodec(){return this.codec}async handleError(e,s,n,r,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,n);const o=hs(n,r)??"Unknown",{errorSchema:a,errorMetadata:u}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,n,r,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),c=k.of(a),d=r.message??r.Message??"Unknown",p=y.for(a[1]).getErrorCtor(a)??Error,g=new p(d),m={};for(const[P,v]of c.structIterator())r[P]!=null&&(m[P]=this.codec.createDeserializer().readObject(v,r[P]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,m),this.mixin.decorateServiceException(Object.assign(g,u,{$fault:c.getMergedTraits().error,message:d},m),r)}}class Is extends Cs{constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:n,jsonCodec:r}){super({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:n,jsonCodec:r})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const bs=/\d{12}\.ddb/;async function As(t,e,s){if(s.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&I(t,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const i=await e.retryStrategy();typeof i.acquireInitialRetryToken=="function"?i.constructor?.name?.includes("Adaptive")?I(t,"RETRY_MODE_ADAPTIVE","F"):I(t,"RETRY_MODE_STANDARD","E"):I(t,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const i=t.endpointV2;switch(String(i?.url?.hostname).match(bs)&&I(t,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":I(t,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":I(t,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":I(t,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const r=t.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const i=r;i.accountId&&I(t,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(i.$source??{}))I(t,o,a)}}const pe="user-agent",j="x-amz-user-agent",le=" ",L="/",xs=/[^!$%&'*+\-.^_`|~\w]/g,_s=/[^!$%&'*+\-.^_`|~\w#]/g,ge="-",Ps=1024;function Rs(t){let e="";for(const s in t){const n=t[s];if(e.length+n.length+1<=Ps){e.length?e+=","+n:e+=n;continue}break}return e}const ks=t=>(e,s)=>async n=>{const{request:r}=n;if(!G.isInstance(r))return e(n);const{headers:i}=r,o=s?.userAgent?.map(F)||[],a=(await t.defaultUserAgentProvider()).map(F);await As(s,t,n);const u=s;a.push(`m/${Rs(Object.assign({},s.__smithy_context?.features,u.__aws_sdk_context?.features))}`);const c=t?.customUserAgent?.map(F)||[],d=await t.userAgentAppId();d&&a.push(F(["app",`${d}`]));const p=[].concat([...a,...o,...c]).join(le),g=[...a.filter(m=>m.startsWith("aws-sdk-")),...c].join(le);return t.runtime!=="browser"?(g&&(i[j]=i[j]?`${i[pe]} ${g}`:g),i[pe]=p):i[j]=p,e({...n,request:r})},F=t=>{const e=t[0].split(L).map(o=>o.replace(xs,ge)).join(L),s=t[1]?.replace(_s,ge),n=e.indexOf(L),r=e.substring(0,n);let i=e.substring(n+1);return r==="api"&&(i=i.toLowerCase()),[r,i,s].filter(o=>o&&o.length>0).reduce((o,a,u)=>{switch(u){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},vs={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Os=t=>({applyToStack:e=>{e.add(ks(t),vs)}}),Ds=async(t,e,s)=>({operation:ct(e).operation,region:await ve(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Ts(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:t.region},propertiesExtractor:(e,s)=>({signingProperties:{config:e,context:s}})}}function z(t){return{schemeId:"smithy.api#noAuth"}}const Ns=t=>{const e=[];switch(t.operation){case"GetCredentialsForIdentity":{e.push(z());break}case"GetId":{e.push(z());break}case"GetOpenIdToken":{e.push(z());break}case"UnlinkIdentity":{e.push(z());break}default:e.push(Ts(t))}return e},Ms=t=>{const e=os(t);return Object.assign(e,{authSchemePreference:ve(t.authSchemePreference??[])})},Us=t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),Ue={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},$s="3.968.0",Fs={version:$s},zs=({serviceId:t,clientVersion:e})=>async s=>{const n=typeof window<"u"?window.navigator:void 0,r=n?.userAgent??"",i=n?.userAgentData?.platform??fe.os(r)??"other",o=void 0,a=n?.userAgentData?.brands??[],u=a[a.length-1],c=u?.brand??fe.browser(r)??"unknown",d=u?.version??"unknown",p=[["aws-sdk-js",e],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${c}_${d}`]];t&&p.push([`api/${t}`,e]);const g=await s?.userAgentAppId?.();return g&&p.push([`app/${g}`]),p},fe={os(t){if(/iPhone|iPad|iPod/.test(t))return"iOS";if(/Macintosh|Mac OS X/.test(t))return"macOS";if(/Windows NT/.test(t))return"Windows";if(/Android/.test(t))return"Android";if(/Linux/.test(t))return"Linux"},browser(t){if(/EdgiOS|EdgA|Edg\//.test(t))return"Microsoft Edge";if(/Firefox\//.test(t))return"Firefox";if(/Chrome\//.test(t))return"Chrome";if(/Safari\//.test(t))return"Safari"}},$e="required",h="fn",S="argv",D="ref",me=!0,he="isSet",$="booleanEquals",O="error",b="endpoint",_="tree",q="PartitionResult",V="getAttr",T="stringEquals",Se={[$e]:!1,type:"string"},ye={[$e]:!0,default:!1,type:"boolean"},Ee={[D]:"Endpoint"},Fe={[h]:$,[S]:[{[D]:"UseFIPS"},!0]},ze={[h]:$,[S]:[{[D]:"UseDualStack"},!0]},f={},N={[D]:"Region"},we={[h]:V,[S]:[{[D]:q},"supportsFIPS"]},je={[D]:q},Ce={[h]:$,[S]:[!0,{[h]:V,[S]:[je,"supportsDualStack"]}]},Ie=[Fe],be=[ze],Ae=[N],js={parameters:{Region:Se,UseDualStack:ye,UseFIPS:ye,Endpoint:Se},rules:[{conditions:[{[h]:he,[S]:[Ee]}],rules:[{conditions:Ie,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:O},{conditions:be,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:O},{endpoint:{url:Ee,properties:f,headers:f},type:b}],type:_},{conditions:[{[h]:he,[S]:Ae}],rules:[{conditions:[{[h]:"aws.partition",[S]:Ae,assign:q}],rules:[{conditions:[Fe,ze],rules:[{conditions:[{[h]:$,[S]:[me,we]},Ce],rules:[{conditions:[{[h]:T,[S]:[N,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:f,headers:f},type:b},{conditions:[{[h]:T,[S]:[N,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:f,headers:f},type:b},{conditions:[{[h]:T,[S]:[N,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:f,headers:f},type:b},{conditions:[{[h]:T,[S]:[N,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:f,headers:f},type:b},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:f,headers:f},type:b}],type:_},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:O}],type:_},{conditions:Ie,rules:[{conditions:[{[h]:$,[S]:[we,me]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:f,headers:f},type:b}],type:_},{error:"FIPS is enabled but this partition does not support FIPS",type:O}],type:_},{conditions:be,rules:[{conditions:[Ce],rules:[{conditions:[{[h]:T,[S]:["aws",{[h]:V,[S]:[je,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:f,headers:f},type:b},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:f,headers:f},type:b}],type:_},{error:"DualStack is enabled but this partition does not support DualStack",type:O}],type:_},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:f,headers:f},type:b}],type:_}],type:_},{error:"Invalid Configuration: Missing Region",type:O}]},Ls=js,Hs=new ut({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Gs=(t,e={})=>Hs.get(t,()=>dt(Ls,{endpointParams:t,logger:e.logger}));Pe.aws=Ne;const Bs=t=>({apiVersion:"2014-06-30",base64Decoder:t?.base64Decoder??_e,base64Encoder:t?.base64Encoder??H,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??Gs,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??Ns,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new is},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new gt}],logger:t?.logger??new lt,protocol:t?.protocol??Is,protocolSettings:t?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:t?.serviceId??"Cognito Identity",urlParser:t?.urlParser??pt,utf8Decoder:t?.utf8Decoder??Qe,utf8Encoder:t?.utf8Encoder??xe}),qs=t=>{const e=ft(t),s=()=>e().then(It),n=Bs(t);return{...n,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??Et,credentialDefaultProvider:t?.credentialDefaultProvider??(r=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:t?.defaultUserAgentProvider??zs({serviceId:n.serviceId,clientVersion:Fs.version}),maxAttempts:t?.maxAttempts??yt,region:t?.region??St("Region is missing"),requestHandler:Ye.create(t?.requestHandler??s),retryMode:t?.retryMode??(async()=>(await s()).retryMode||ht),sha256:t?.sha256??mt,streamCollector:t?.streamCollector??Xe,useDualstackEndpoint:t?.useDualstackEndpoint??(()=>Promise.resolve(Ct)),useFipsEndpoint:t?.useFipsEndpoint??(()=>Promise.resolve(wt))}},Vs=t=>({setRegion(e){t.region=e},region(){return t.region}}),Js=t=>({region:t.region()}),Ws=t=>{const e=t.httpAuthSchemes;let s=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(r){const i=e.findIndex(o=>o.schemeId===r.schemeId);i===-1?e.push(r):e.splice(i,1,r)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(r){s=r},httpAuthSchemeProvider(){return s},setCredentials(r){n=r},credentials(){return n}}},Ks=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),Qs=(t,e)=>{const s=Object.assign(Vs(t),bt(t),At(t),Ws(t));return e.forEach(n=>n.configure(s)),Object.assign(t,Js(s),xt(s),_t(s),Ks(s))};class dr extends Pt{config;constructor(...[e]){const s=qs(e||{});super(s),this.initConfig=s;const n=Us(s),r=Kt(n),i=Rt(r),o=kt(i),a=o,u=vt(a),c=Ms(u),d=Qs(c,e?.extensions||[]);this.config=d,this.middlewareStack.use(Ot(this.config)),this.middlewareStack.use(Os(this.config)),this.middlewareStack.use(Dt(this.config)),this.middlewareStack.use(Tt(this.config)),this.middlewareStack.use(jt(this.config)),this.middlewareStack.use(Gt(this.config)),this.middlewareStack.use(Vt(this.config)),this.middlewareStack.use(Nt(this.config,{httpAuthSchemeParametersProvider:Ds,identityProviderConfigProvider:async p=>new Ut({"aws.auth#sigv4":p.credentials})})),this.middlewareStack.use(Mt(this.config))}destroy(){super.destroy()}}class E extends $t{constructor(e){super(e),Object.setPrototypeOf(this,E.prototype)}}class J extends E{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,J.prototype)}}class W extends E{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,W.prototype)}}class K extends E{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,K.prototype)}}class Q extends E{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,Q.prototype)}}class X extends E{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,X.prototype)}}class Y extends E{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,Y.prototype)}}class Z extends E{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Z.prototype)}}class ee extends E{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,ee.prototype)}}class te extends E{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,te.prototype)}}class se extends E{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,se.prototype)}}class ne extends E{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,ne.prototype)}}const Xs="AccountId",Ys="AccessKeyId",Le="Credentials",Zs="ConcurrentModificationException",en="CustomRoleArn",tn="DeveloperUserAlreadyRegisteredException",sn="Expiration",nn="ExternalServiceException",rn="GetCredentialsForIdentity",on="GetCredentialsForIdentityInput",an="GetCredentialsForIdentityResponse",cn="GetId",un="GetIdInput",dn="GetIdResponse",pn="InternalErrorException",re="IdentityId",ln="InvalidIdentityPoolConfigurationException",gn="InvalidParameterException",fn="IdentityPoolId",mn="IdentityProviderToken",He="Logins",hn="LimitExceededException",Sn="LoginsMap",yn="NotAuthorizedException",En="ResourceConflictException",wn="ResourceNotFoundException",Cn="SecretKey",In="SecretKeyString",bn="SessionToken",An="TooManyRequestsException",A="client",w="error",x="httpError",C="message",xn="server",Ge="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",l="com.amazonaws.cognitoidentity";var _n=[0,l,mn,8,0],Pn=[0,l,In,8,0],Rn=[-3,l,Zs,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(Rn,ne);var kn=[3,l,Le,0,[Ys,Cn,bn,sn],[0,[()=>Pn,0],0,4]],vn=[-3,l,tn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(vn,se);var On=[-3,l,nn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(On,ee);var Dn=[3,l,on,0,[re,He,en],[0,[()=>Be,0],0]],Tn=[3,l,an,0,[re,Le],[0,[()=>kn,0]]],Nn=[3,l,un,0,[Xs,fn,He],[0,0,[()=>Be,0]]],Mn=[3,l,dn,0,[re],[0]],Un=[-3,l,pn,{[w]:xn},[C],[0]];y.for(l).registerError(Un,J);var $n=[-3,l,ln,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError($n,te);var Fn=[-3,l,gn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(Fn,W);var zn=[-3,l,hn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(zn,K);var jn=[-3,l,yn,{[w]:A,[x]:403},[C],[0]];y.for(l).registerError(jn,Q);var Ln=[-3,l,En,{[w]:A,[x]:409},[C],[0]];y.for(l).registerError(Ln,X);var Hn=[-3,l,wn,{[w]:A,[x]:404},[C],[0]];y.for(l).registerError(Hn,Z);var Gn=[-3,l,An,{[w]:A,[x]:429},[C],[0]];y.for(l).registerError(Gn,Y);var Bn=[-3,Ge,"CognitoIdentityServiceException",0,[],[]];y.for(Ge).registerError(Bn,E);var Be=[2,l,Sn,0,[0,0],[()=>_n,0]],qn=[9,l,rn,0,()=>Dn,()=>Tn],Vn=[9,l,cn,0,()=>Nn,()=>Mn];class pr extends Oe.classBuilder().ep(Ue).m(function(e,s,n,r){return[De(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(qn).build(){}class lr extends Oe.classBuilder().ep(Ue).m(function(e,s,n,r){return[De(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(Vn).build(){}export{dr as CognitoIdentityClient,pr as GetCredentialsForIdentityCommand,lr as GetIdCommand};
|
|
1
|
+
import{H as G,n as M,c as qe,t as xe,d as _e,e as Ve,g as Je,h as We,a as H,i as Ke,f as Qe,s as Xe,F as Ye}from"./normalizeProvider-BrOPyH3l.js";import{i as Ze,b as et,c as Pe,S as ie,m as tt,d as st,e as nt,T as y,f as oe,N as k,h as R,j as rt,L as Re,k as ke,v as it,R as ot,l as at,n as ve,o as ct,E as ut,r as dt,p as pt,q as lt,s as gt,t as ft,u as mt,D as ht,w as St,x as yt,y as Et,z as wt,A as Ct,B as It,F as bt,G as At,H as xt,I as _t,a as Pt,J as Rt,K as kt,M as vt,O as Ot,P as Dt,Q as Tt,U as Nt,V as Mt,W as Ut,X as $t,C as Oe,g as De}from"./resolveDefaultsModeConfig-B9DEWYJ0.js";import"./preload-helper-BlTxHScW.js";import"./index-7hDd_gG8.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-B7n8ZNar.js";const Ft=t=>e=>async s=>{if(!G.isInstance(s.request))return e(s);const{request:n}=s,{handlerProtocol:r=""}=t.requestHandler.metadata||{};if(r.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let i=n.hostname;n.port!=null&&(i+=`:${n.port}`),n.headers.host=i}return e(s)},zt={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},jt=t=>({applyToStack:e=>{e.add(Ft(t),zt)}}),Lt=()=>(t,e)=>async s=>{try{const n=await t(s),{clientName:r,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u,overrideOutputFilterSensitiveLog:c}=a,d=u??e.inputFilterSensitiveLog,p=c??e.outputFilterSensitiveLog,{$metadata:g,...m}=n.output;return o?.info?.({clientName:r,commandName:i,input:d(s.input),output:p(m),metadata:g}),n}catch(n){const{clientName:r,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u}=a,c=u??e.inputFilterSensitiveLog;throw o?.error?.({clientName:r,commandName:i,input:c(s.input),error:n,metadata:n.$metadata}),n}},Ht={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Gt=t=>({applyToStack:e=>{e.add(Lt(),Ht)}}),Bt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},qt=()=>t=>async e=>t(e),Vt=t=>({applyToStack:e=>{e.add(qt(),Bt)}}),Jt=void 0;function Wt(t){return t===void 0?!0:typeof t=="string"&&t.length<=50}function Kt(t){const e=M(t.userAgentAppId??Jt),{customUserAgent:s}=t;return Object.assign(t,{customUserAgent:typeof s=="string"?[[s]]:s,userAgentAppId:async()=>{const n=await e();if(!Wt(n)){const r=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?console:t.logger;typeof n!="string"?r?.warn("userAgentAppId must be a string or undefined."):n.length>50&&r?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}const Te=(t,e=!1)=>{if(e){for(const s of t.split("."))if(!Te(s))return!1;return!0}return!(!Ze(t)||t.length<3||t.length>63||t!==t.toLowerCase()||et(t))},ae=":",Qt="/",Xt=t=>{const e=t.split(ae);if(e.length<6)return null;const[s,n,r,i,o,...a]=e;if(s!=="arn"||n===""||r===""||a.join(ae)==="")return null;const u=a.map(c=>c.split(Qt)).flat();return{partition:n,service:r,region:i,accountId:o,resourceId:u}},Yt=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws 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)"},"mx-central-1":{description:"Mexico (Central)"},"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-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"EU (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso 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:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{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-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],Zt={partitions:Yt};let es=Zt;const ts=t=>{const{partitions:e}=es;for(const n of e){const{regions:r,outputs:i}=n;for(const[o,a]of Object.entries(r))if(o===t)return{...i,...a}}for(const n of e){const{regionRegex:r,outputs:i}=n;if(new RegExp(r).test(t))return{...i}}const s=e.find(n=>n.id==="aws");if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}},Ne={isVirtualHostableS3Bucket:Te,parseArn:Xt,partition:ts};Pe.aws=Ne;function ss(t,e,s){return t.$source||(t.$source={}),t.$source[e]=s,t}function I(t,e,s){t.__aws_sdk_context?t.__aws_sdk_context.features||(t.__aws_sdk_context.features={}):t.__aws_sdk_context={features:{}},t.__aws_sdk_context.features[e]=s}const ce=t=>qe.isInstance(t)?t.headers?.date??t.headers?.Date:void 0,Me=t=>new Date(Date.now()+t),ns=(t,e)=>Math.abs(Me(e).getTime()-t)>=3e5,ue=(t,e)=>{const s=Date.parse(t);return ns(s,e)?s-Date.now():e},U=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},rs=async t=>{const e=U("context",t.context),s=U("config",t.config),n=e.endpointV2?.properties?.authSchemes?.[0],i=await U("signer",s.signer)(n),o=t?.signingRegion,a=t?.signingRegionSet,u=t?.signingName;return{config:s,signer:i,signingRegion:o,signingRegionSet:a,signingName:u}};class is{async sign(e,s,n){if(!G.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await rs(n),{config:i,signer:o}=r;let{signingRegion:a,signingName:u}=r;const c=n.context;if(c?.authSchemes?.length??!1){const[p,g]=c.authSchemes;p?.name==="sigv4a"&&g?.name==="sigv4"&&(a=g?.signingRegion??a,u=g?.signingName??u)}return await o.sign(e,{signingDate:Me(i.systemClockOffset),signingRegion:a,signingService:u})}errorHandler(e){return s=>{const n=s.ServerTime??ce(s.$response);if(n){const r=U("config",e.config),i=r.systemClockOffset;r.systemClockOffset=ue(n,r.systemClockOffset),r.systemClockOffset!==i&&s.$metadata&&(s.$metadata.clockSkewCorrected=!0)}throw s}}successHandler(e,s){const n=ce(e);if(n){const r=U("config",s.config);r.systemClockOffset=ue(n,r.systemClockOffset)}}}const os=t=>{let e=t.credentials,s=!!t.credentials,n;Object.defineProperty(t,"credentials",{set(c){c&&c!==e&&c!==n&&(s=!0),e=c;const d=as(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),p=cs(t,d);if(s&&!p.attributed){const g=typeof e=="object"&&e!==null;n=async m=>{const v=await p(m);return g&&(!v.$source||Object.keys(v.$source).length===0)?ss(v,"CREDENTIALS_CODE","e"):v},n.memoized=p.memoized,n.configBound=p.configBound,n.attributed=!0}else n=p},get(){return n},enumerable:!0,configurable:!0}),t.credentials=e;const{signingEscapePath:r=!0,systemClockOffset:i=t.systemClockOffset||0,sha256:o}=t;let a;return t.signer?a=M(t.signer):t.regionInfoProvider?a=()=>M(t.region)().then(async c=>[await t.regionInfoProvider(c,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},c]).then(([c,d])=>{const{signingRegion:p,signingService:g}=c;t.signingRegion=t.signingRegion||p||d,t.signingName=t.signingName||g||t.serviceId;const m={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:r},P=t.signerConstructor||ie;return new P(m)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await M(t.region)(),properties:{}},c);const d=c.signingRegion,p=c.signingName;t.signingRegion=t.signingRegion||d,t.signingName=t.signingName||p||t.serviceId;const g={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:r},m=t.signerConstructor||ie;return new m(g)},Object.assign(t,{systemClockOffset:i,signingEscapePath:r,signer:a})};function as(t,{credentials:e,credentialDefaultProvider:s}){let n;return e?e?.memoized?n=e:n=tt(e,nt,st):s?n=M(s(Object.assign({},t,{parentClientConfig:t}))):n=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},n.memoized=!0,n}function cs(t,e){if(e.configBound)return e;const s=async n=>e({...n,callerClientConfig:t});return s.memoized=e.memoized,s.configBound=!0,s}class us{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,s){const n=s.getMemberSchemas(),r=Object.values(n).find(i=>!!i.getMergedTraits().httpPayload);if(r){const i=r.getMergedTraits().mediaType;return i||(r.isStringSchema()?"text/plain":r.isBlobSchema()?"application/octet-stream":e)}else if(!s.isUnitSchema()&&Object.values(n).find(o=>{const{httpQuery:a,httpQueryParams:u,httpHeader:c,httpLabel:d,httpPrefixHeaders:p}=o.getMergedTraits();return!a&&!u&&!c&&!d&&p===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,s,n,r,i,o){let a=s,u=e;e.includes("#")&&([a,u]=e.split("#"));const c={$metadata:i,$fault:n.statusCode<500?"client":"server"},d=y.for(a);try{return{errorSchema:o?.(d,u)??d.getSchema(e),errorMetadata:c}}catch{r.message=r.message??r.Message??"UnknownError";const g=y.for("smithy.ts.sdk.synthetic."+a),m=g.getBaseException();if(m){const P=g.getErrorCtor(m)??Error;throw this.decorateServiceException(Object.assign(new P({name:u}),c),r)}throw this.decorateServiceException(Object.assign(new Error(u),c),r)}}decorateServiceException(e,s={}){if(this.queryCompat){const n=e.Message??s.Message,r=oe(e,s);n&&(r.message=n),r.Error={...r.Error,Type:r.Error.Type,Code:r.Error.Code,Message:r.Error.message??r.Error.Message??n};const i=r.$metadata.requestId;return i&&(r.RequestId=i),r}return oe(e,s)}setQueryCompatError(e,s){const n=s.headers?.["x-amzn-query-error"];if(e!==void 0&&n!=null){const[r,i]=n.split(";"),o=Object.entries(e),a={Code:r,Type:i};Object.assign(e,a);for(const[u,c]of o)a[u==="message"?"Message":u]=c;delete a.__type,e.Error=a}}queryCompatOutput(e,s){e.Error&&(s.Error=e.Error),e.Type&&(s.Type=e.Type),e.Code&&(s.Code=e.Code)}findQueryCompatibleError(e,s){try{return e.getSchema(s)}catch{return e.find(r=>k.of(r).getMergedTraits().awsQueryError?.[0]===s)}}}class B{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*ds(t,e){if(t.isUnitSchema())return;const s=t.getSchema();for(let n=0;n<s[4].length;++n){const r=s[4][n],i=s[5][n],o=new k([i,0],r);!(r in e)&&!o.isIdempotencyToken()||(yield[r,o])}}function*ps(t,e,s){if(t.isUnitSchema())return;const n=t.getSchema();let r=Object.keys(e).filter(i=>i!=="__type").length;for(let i=0;i<n[4].length&&r!==0;++i){const o=n[4][i],a=n[5][i],u=new k([a,0],o);let c=o;s&&(c=u.getMergedTraits()[s]??o),c in e&&(yield[o,u],r-=1)}}class ls{from;to;keys;constructor(e,s){this.from=e,this.to=s,this.keys=new Set(Object.keys(this.from).filter(n=>n!=="__type"))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,s=this.from[e];this.to.$unknown=[e,s]}}}function gs(t,e,s){if(s?.source){const n=s.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||n!==String(e)))return n.includes(".")?new R(n,"bigDecimal"):BigInt(n)}return e}const fs=(t,e)=>rt(t,e).then(s=>(e?.utf8Encoder??xe)(s)),ms=(t,e)=>fs(t,e).then(s=>{if(s.length)try{return JSON.parse(s)}catch(n){throw n?.name==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:s}),n}return{}}),hs=(t,e)=>{const s=(i,o)=>Object.keys(i).find(a=>a.toLowerCase()===o.toLowerCase()),n=i=>{let o=i;return typeof o=="number"&&(o=o.toString()),o.indexOf(",")>=0&&(o=o.split(",")[0]),o.indexOf(":")>=0&&(o=o.split(":")[0]),o.indexOf("#")>=0&&(o=o.split("#")[1]),o},r=s(t.headers,"x-amzn-errortype");if(r!==void 0)return n(t.headers[r]);if(e&&typeof e=="object"){const i=s(e,"code");if(i&&e[i]!==void 0)return n(e[i]);if(e.__type!==void 0)return n(e.__type)}};class Ss extends B{settings;constructor(e){super(),this.settings=e}async read(e,s){return this._read(e,typeof s=="string"?JSON.parse(s,gs):await ms(s,this.serdeContext))}readObject(e,s){return this._read(e,s)}_read(e,s){const n=s!==null&&typeof s=="object",r=k.of(e);if(n){if(r.isStructSchema()){const o=r.isUnionSchema(),a={};let u;o&&(u=new ls(s,a));for(const[c,d]of ps(r,s,this.settings.jsonName?"jsonName":!1)){const p=this.settings.jsonName?d.getMergedTraits().jsonName??c:c;o&&u.mark(p),s[p]!=null&&(a[c]=this._read(d,s[p]))}return o&&u.writeUnknown(),a}if(Array.isArray(s)&&r.isListSchema()){const o=r.getValueSchema(),a=[],u=!!r.getMergedTraits().sparse;for(const c of s)(u||c!=null)&&a.push(this._read(o,c));return a}if(r.isMapSchema()){const o=r.getValueSchema(),a={},u=!!r.getMergedTraits().sparse;for(const[c,d]of Object.entries(s))(u||d!=null)&&(a[c]=this._read(o,d));return a}}if(r.isBlobSchema()&&typeof s=="string")return _e(s);const i=r.getMergedTraits().mediaType;if(r.isStringSchema()&&typeof s=="string"&&i)return i==="application/json"||i.endsWith("+json")?Re.from(s):s;if(r.isTimestampSchema()&&s!=null)switch(ke(r,this.settings)){case 5:return We(s);case 6:return Je(s);case 7:return Ve(s);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",s),new Date(s)}if(r.isBigIntegerSchema()&&(typeof s=="number"||typeof s=="string"))return BigInt(s);if(r.isBigDecimalSchema()&&s!=null){if(s instanceof R)return s;const o=s;return o.type==="bigDecimal"&&"string"in o?new R(o.string,o.type):new R(String(s),"bigDecimal")}if(r.isNumericSchema()&&typeof s=="string"){switch(s){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return s}if(r.isDocumentSchema())if(n){const o=Array.isArray(s)?[]:{};for(const[a,u]of Object.entries(s))u instanceof R?o[a]=u:o[a]=this._read(r,u);return o}else return structuredClone(s);return s}}const de="Ν";class ys{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(e,s)=>{if(s instanceof R){const n=`${de+"nv"+this.counter++}_`+s.string;return this.values.set(`"${n}"`,s.string),n}if(typeof s=="bigint"){const n=s.toString(),r=`${de+"b"+this.counter++}_`+n;return this.values.set(`"${r}"`,n),r}return s}}replaceInJson(e){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return e;for(const[s,n]of this.values)e=e.replace(s,n);return e}}class Es extends B{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,s){this.rootSchema=k.of(e),this.buffer=this._write(this.rootSchema,s)}writeDiscriminatedDocument(e,s){this.write(e,s),typeof this.buffer=="object"&&(this.buffer.__type=k.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:s}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!s)return JSON.stringify(this.buffer);const n=new ys;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}_write(e,s,n){const r=s!==null&&typeof s=="object",i=k.of(e);if(r){if(i.isStructSchema()){const o={};for(const[a,u]of ds(i,s)){const c=this._write(u,s[a],i);if(c!==void 0){const d=u.getMergedTraits().jsonName,p=this.settings.jsonName?d??a:a;o[p]=c}}if(i.isUnionSchema()&&Object.keys(o).length===0){const{$unknown:a}=s;if(Array.isArray(a)){const[u,c]=a;o[u]=this._write(15,c)}}return o}if(Array.isArray(s)&&i.isListSchema()){const o=i.getValueSchema(),a=[],u=!!i.getMergedTraits().sparse;for(const c of s)(u||c!=null)&&a.push(this._write(o,c));return a}if(i.isMapSchema()){const o=i.getValueSchema(),a={},u=!!i.getMergedTraits().sparse;for(const[c,d]of Object.entries(s))(u||d!=null)&&(a[c]=this._write(o,d));return a}if(s instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema()))return i===this.rootSchema?s:(this.serdeContext?.base64Encoder??H)(s);if(s instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema()))switch(ke(i,this.settings)){case 5:return s.toISOString().replace(".000Z","Z");case 6:return Ke(s);case 7:return s.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",s),s.getTime()/1e3}s instanceof R&&(this.useReplacer=!0)}if(!(s===null&&n?.isStructSchema())){if(i.isStringSchema()){if(typeof s>"u"&&i.isIdempotencyToken())return it();const o=i.getMergedTraits().mediaType;return s!=null&&o&&(o==="application/json"||o.endsWith("+json"))?Re.from(s):s}if(typeof s=="number"&&i.isNumericSchema())return Math.abs(s)===1/0||isNaN(s)?String(s):s;if(typeof s=="string"&&i.isBlobSchema())return i===this.rootSchema?s:(this.serdeContext?.base64Encoder??H)(s);if(typeof s=="bigint"&&(this.useReplacer=!0),i.isDocumentSchema())if(r){const o=Array.isArray(s)?[]:{};for(const[a,u]of Object.entries(s))u instanceof R?(this.useReplacer=!0,o[a]=u):o[a]=this._write(i,u);return o}else return structuredClone(s);return s}}}class ws extends B{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new Es(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new Ss(this.settings);return e.setSerdeContext(this.serdeContext),e}}class Cs extends ot{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:n,jsonCodec:r}){super({defaultNamespace:e}),this.serviceTarget=s,this.codec=r??new ws({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!n,this.mixin=new us(this.awsQueryCompatible)}async serializeRequest(e,s,n){const r=await super.serializeRequest(e,s,n);return r.path.endsWith("/")||(r.path+="/"),Object.assign(r.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(r.headers["x-amzn-query-mode"]="true"),(at(e.input)==="unit"||!r.body)&&(r.body="{}"),r}getPayloadCodec(){return this.codec}async handleError(e,s,n,r,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,n);const o=hs(n,r)??"Unknown",{errorSchema:a,errorMetadata:u}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,n,r,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),c=k.of(a),d=r.message??r.Message??"Unknown",p=y.for(a[1]).getErrorCtor(a)??Error,g=new p(d),m={};for(const[P,v]of c.structIterator())r[P]!=null&&(m[P]=this.codec.createDeserializer().readObject(v,r[P]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,m),this.mixin.decorateServiceException(Object.assign(g,u,{$fault:c.getMergedTraits().error,message:d},m),r)}}class Is extends Cs{constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:n,jsonCodec:r}){super({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:n,jsonCodec:r})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const bs=/\d{12}\.ddb/;async function As(t,e,s){if(s.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&I(t,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const i=await e.retryStrategy();typeof i.acquireInitialRetryToken=="function"?i.constructor?.name?.includes("Adaptive")?I(t,"RETRY_MODE_ADAPTIVE","F"):I(t,"RETRY_MODE_STANDARD","E"):I(t,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const i=t.endpointV2;switch(String(i?.url?.hostname).match(bs)&&I(t,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":I(t,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":I(t,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":I(t,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const r=t.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const i=r;i.accountId&&I(t,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(i.$source??{}))I(t,o,a)}}const pe="user-agent",j="x-amz-user-agent",le=" ",L="/",xs=/[^!$%&'*+\-.^_`|~\w]/g,_s=/[^!$%&'*+\-.^_`|~\w#]/g,ge="-",Ps=1024;function Rs(t){let e="";for(const s in t){const n=t[s];if(e.length+n.length+1<=Ps){e.length?e+=","+n:e+=n;continue}break}return e}const ks=t=>(e,s)=>async n=>{const{request:r}=n;if(!G.isInstance(r))return e(n);const{headers:i}=r,o=s?.userAgent?.map(F)||[],a=(await t.defaultUserAgentProvider()).map(F);await As(s,t,n);const u=s;a.push(`m/${Rs(Object.assign({},s.__smithy_context?.features,u.__aws_sdk_context?.features))}`);const c=t?.customUserAgent?.map(F)||[],d=await t.userAgentAppId();d&&a.push(F(["app",`${d}`]));const p=[].concat([...a,...o,...c]).join(le),g=[...a.filter(m=>m.startsWith("aws-sdk-")),...c].join(le);return t.runtime!=="browser"?(g&&(i[j]=i[j]?`${i[pe]} ${g}`:g),i[pe]=p):i[j]=p,e({...n,request:r})},F=t=>{const e=t[0].split(L).map(o=>o.replace(xs,ge)).join(L),s=t[1]?.replace(_s,ge),n=e.indexOf(L),r=e.substring(0,n);let i=e.substring(n+1);return r==="api"&&(i=i.toLowerCase()),[r,i,s].filter(o=>o&&o.length>0).reduce((o,a,u)=>{switch(u){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},vs={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Os=t=>({applyToStack:e=>{e.add(ks(t),vs)}}),Ds=async(t,e,s)=>({operation:ct(e).operation,region:await ve(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Ts(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:t.region},propertiesExtractor:(e,s)=>({signingProperties:{config:e,context:s}})}}function z(t){return{schemeId:"smithy.api#noAuth"}}const Ns=t=>{const e=[];switch(t.operation){case"GetCredentialsForIdentity":{e.push(z());break}case"GetId":{e.push(z());break}case"GetOpenIdToken":{e.push(z());break}case"UnlinkIdentity":{e.push(z());break}default:e.push(Ts(t))}return e},Ms=t=>{const e=os(t);return Object.assign(e,{authSchemePreference:ve(t.authSchemePreference??[])})},Us=t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),Ue={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},$s="3.968.0",Fs={version:$s},zs=({serviceId:t,clientVersion:e})=>async s=>{const n=typeof window<"u"?window.navigator:void 0,r=n?.userAgent??"",i=n?.userAgentData?.platform??fe.os(r)??"other",o=void 0,a=n?.userAgentData?.brands??[],u=a[a.length-1],c=u?.brand??fe.browser(r)??"unknown",d=u?.version??"unknown",p=[["aws-sdk-js",e],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${c}_${d}`]];t&&p.push([`api/${t}`,e]);const g=await s?.userAgentAppId?.();return g&&p.push([`app/${g}`]),p},fe={os(t){if(/iPhone|iPad|iPod/.test(t))return"iOS";if(/Macintosh|Mac OS X/.test(t))return"macOS";if(/Windows NT/.test(t))return"Windows";if(/Android/.test(t))return"Android";if(/Linux/.test(t))return"Linux"},browser(t){if(/EdgiOS|EdgA|Edg\//.test(t))return"Microsoft Edge";if(/Firefox\//.test(t))return"Firefox";if(/Chrome\//.test(t))return"Chrome";if(/Safari\//.test(t))return"Safari"}},$e="required",h="fn",S="argv",D="ref",me=!0,he="isSet",$="booleanEquals",O="error",b="endpoint",_="tree",q="PartitionResult",V="getAttr",T="stringEquals",Se={[$e]:!1,type:"string"},ye={[$e]:!0,default:!1,type:"boolean"},Ee={[D]:"Endpoint"},Fe={[h]:$,[S]:[{[D]:"UseFIPS"},!0]},ze={[h]:$,[S]:[{[D]:"UseDualStack"},!0]},f={},N={[D]:"Region"},we={[h]:V,[S]:[{[D]:q},"supportsFIPS"]},je={[D]:q},Ce={[h]:$,[S]:[!0,{[h]:V,[S]:[je,"supportsDualStack"]}]},Ie=[Fe],be=[ze],Ae=[N],js={parameters:{Region:Se,UseDualStack:ye,UseFIPS:ye,Endpoint:Se},rules:[{conditions:[{[h]:he,[S]:[Ee]}],rules:[{conditions:Ie,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:O},{conditions:be,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:O},{endpoint:{url:Ee,properties:f,headers:f},type:b}],type:_},{conditions:[{[h]:he,[S]:Ae}],rules:[{conditions:[{[h]:"aws.partition",[S]:Ae,assign:q}],rules:[{conditions:[Fe,ze],rules:[{conditions:[{[h]:$,[S]:[me,we]},Ce],rules:[{conditions:[{[h]:T,[S]:[N,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:f,headers:f},type:b},{conditions:[{[h]:T,[S]:[N,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:f,headers:f},type:b},{conditions:[{[h]:T,[S]:[N,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:f,headers:f},type:b},{conditions:[{[h]:T,[S]:[N,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:f,headers:f},type:b},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:f,headers:f},type:b}],type:_},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:O}],type:_},{conditions:Ie,rules:[{conditions:[{[h]:$,[S]:[we,me]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:f,headers:f},type:b}],type:_},{error:"FIPS is enabled but this partition does not support FIPS",type:O}],type:_},{conditions:be,rules:[{conditions:[Ce],rules:[{conditions:[{[h]:T,[S]:["aws",{[h]:V,[S]:[je,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:f,headers:f},type:b},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:f,headers:f},type:b}],type:_},{error:"DualStack is enabled but this partition does not support DualStack",type:O}],type:_},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:f,headers:f},type:b}],type:_}],type:_},{error:"Invalid Configuration: Missing Region",type:O}]},Ls=js,Hs=new ut({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Gs=(t,e={})=>Hs.get(t,()=>dt(Ls,{endpointParams:t,logger:e.logger}));Pe.aws=Ne;const Bs=t=>({apiVersion:"2014-06-30",base64Decoder:t?.base64Decoder??_e,base64Encoder:t?.base64Encoder??H,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??Gs,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??Ns,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new is},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new gt}],logger:t?.logger??new lt,protocol:t?.protocol??Is,protocolSettings:t?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:t?.serviceId??"Cognito Identity",urlParser:t?.urlParser??pt,utf8Decoder:t?.utf8Decoder??Qe,utf8Encoder:t?.utf8Encoder??xe}),qs=t=>{const e=ft(t),s=()=>e().then(It),n=Bs(t);return{...n,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??Et,credentialDefaultProvider:t?.credentialDefaultProvider??(r=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:t?.defaultUserAgentProvider??zs({serviceId:n.serviceId,clientVersion:Fs.version}),maxAttempts:t?.maxAttempts??yt,region:t?.region??St("Region is missing"),requestHandler:Ye.create(t?.requestHandler??s),retryMode:t?.retryMode??(async()=>(await s()).retryMode||ht),sha256:t?.sha256??mt,streamCollector:t?.streamCollector??Xe,useDualstackEndpoint:t?.useDualstackEndpoint??(()=>Promise.resolve(Ct)),useFipsEndpoint:t?.useFipsEndpoint??(()=>Promise.resolve(wt))}},Vs=t=>({setRegion(e){t.region=e},region(){return t.region}}),Js=t=>({region:t.region()}),Ws=t=>{const e=t.httpAuthSchemes;let s=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(r){const i=e.findIndex(o=>o.schemeId===r.schemeId);i===-1?e.push(r):e.splice(i,1,r)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(r){s=r},httpAuthSchemeProvider(){return s},setCredentials(r){n=r},credentials(){return n}}},Ks=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),Qs=(t,e)=>{const s=Object.assign(Vs(t),bt(t),At(t),Ws(t));return e.forEach(n=>n.configure(s)),Object.assign(t,Js(s),xt(s),_t(s),Ks(s))};class dr extends Pt{config;constructor(...[e]){const s=qs(e||{});super(s),this.initConfig=s;const n=Us(s),r=Kt(n),i=Rt(r),o=kt(i),a=o,u=vt(a),c=Ms(u),d=Qs(c,e?.extensions||[]);this.config=d,this.middlewareStack.use(Ot(this.config)),this.middlewareStack.use(Os(this.config)),this.middlewareStack.use(Dt(this.config)),this.middlewareStack.use(Tt(this.config)),this.middlewareStack.use(jt(this.config)),this.middlewareStack.use(Gt(this.config)),this.middlewareStack.use(Vt(this.config)),this.middlewareStack.use(Nt(this.config,{httpAuthSchemeParametersProvider:Ds,identityProviderConfigProvider:async p=>new Ut({"aws.auth#sigv4":p.credentials})})),this.middlewareStack.use(Mt(this.config))}destroy(){super.destroy()}}class E extends $t{constructor(e){super(e),Object.setPrototypeOf(this,E.prototype)}}class J extends E{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,J.prototype)}}class W extends E{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,W.prototype)}}class K extends E{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,K.prototype)}}class Q extends E{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,Q.prototype)}}class X extends E{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,X.prototype)}}class Y extends E{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,Y.prototype)}}class Z extends E{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Z.prototype)}}class ee extends E{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,ee.prototype)}}class te extends E{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,te.prototype)}}class se extends E{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,se.prototype)}}class ne extends E{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,ne.prototype)}}const Xs="AccountId",Ys="AccessKeyId",Le="Credentials",Zs="ConcurrentModificationException",en="CustomRoleArn",tn="DeveloperUserAlreadyRegisteredException",sn="Expiration",nn="ExternalServiceException",rn="GetCredentialsForIdentity",on="GetCredentialsForIdentityInput",an="GetCredentialsForIdentityResponse",cn="GetId",un="GetIdInput",dn="GetIdResponse",pn="InternalErrorException",re="IdentityId",ln="InvalidIdentityPoolConfigurationException",gn="InvalidParameterException",fn="IdentityPoolId",mn="IdentityProviderToken",He="Logins",hn="LimitExceededException",Sn="LoginsMap",yn="NotAuthorizedException",En="ResourceConflictException",wn="ResourceNotFoundException",Cn="SecretKey",In="SecretKeyString",bn="SessionToken",An="TooManyRequestsException",A="client",w="error",x="httpError",C="message",xn="server",Ge="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",l="com.amazonaws.cognitoidentity";var _n=[0,l,mn,8,0],Pn=[0,l,In,8,0],Rn=[-3,l,Zs,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(Rn,ne);var kn=[3,l,Le,0,[Ys,Cn,bn,sn],[0,[()=>Pn,0],0,4]],vn=[-3,l,tn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(vn,se);var On=[-3,l,nn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(On,ee);var Dn=[3,l,on,0,[re,He,en],[0,[()=>Be,0],0]],Tn=[3,l,an,0,[re,Le],[0,[()=>kn,0]]],Nn=[3,l,un,0,[Xs,fn,He],[0,0,[()=>Be,0]]],Mn=[3,l,dn,0,[re],[0]],Un=[-3,l,pn,{[w]:xn},[C],[0]];y.for(l).registerError(Un,J);var $n=[-3,l,ln,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError($n,te);var Fn=[-3,l,gn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(Fn,W);var zn=[-3,l,hn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(zn,K);var jn=[-3,l,yn,{[w]:A,[x]:403},[C],[0]];y.for(l).registerError(jn,Q);var Ln=[-3,l,En,{[w]:A,[x]:409},[C],[0]];y.for(l).registerError(Ln,X);var Hn=[-3,l,wn,{[w]:A,[x]:404},[C],[0]];y.for(l).registerError(Hn,Z);var Gn=[-3,l,An,{[w]:A,[x]:429},[C],[0]];y.for(l).registerError(Gn,Y);var Bn=[-3,Ge,"CognitoIdentityServiceException",0,[],[]];y.for(Ge).registerError(Bn,E);var Be=[2,l,Sn,0,[0,0],[()=>_n,0]],qn=[9,l,rn,0,()=>Dn,()=>Tn],Vn=[9,l,cn,0,()=>Nn,()=>Mn];class pr extends Oe.classBuilder().ep(Ue).m(function(e,s,n,r){return[De(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(qn).build(){}class lr extends Oe.classBuilder().ep(Ue).m(function(e,s,n,r){return[De(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(Vn).build(){}export{dr as CognitoIdentityClient,pr as GetCredentialsForIdentityCommand,lr as GetIdCommand};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Y as gt,N as D,k as Oe,L as ft,h as $e,i as ht,b as St,c as Me,S as pe,m as yt,d as wt,e as Et,T,f as me,v as bt,R as At,l as Pt,j as ge,n as Ue,o as Tt,E as Ct,r as Rt,p as _t,q as It,s as kt,t as xt,u as Dt,D as vt,w as Nt,x as Ot,y as $t,z as Mt,A as Ut,B as Ft,F as Lt,G as zt,H as jt,I as Ht,a as Wt,J as Vt,K as Bt,M as Kt,O as qt,P as Gt,Q as Qt,U as Xt,V as Jt,W as Yt,X as Zt,C as es,g as ts}from"./resolveDefaultsModeConfig-Dw2VgoA0.js";import{d as q,t as G,H as Q,n as L,c as ss,a as Fe,i as rs,f as ns,s as is,F as os}from"./normalizeProvider-BrOPyH3l.js";function fe(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const X="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",J="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",Y="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",Le="(\\d?\\d)",ze="(\\d{4})",as=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),cs=new RegExp(`^${X}, ${Le} ${J} ${ze} ${Y} GMT$`),ds=new RegExp(`^${X}, ${Le}-${J}-(\\d\\d) ${Y} GMT$`),us=new RegExp(`^${X} ${J} ( [1-9]|\\d\\d) ${Y} ${ze}$`),ls=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ps=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},ms=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=as.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,s,r,n,i,o,a,,d,c]=t;k(r,1,12),k(n,1,31),k(i,0,23),k(o,0,59),k(a,0,60);const u=new Date(Date.UTC(Number(s),Number(r)-1,Number(n),Number(i),Number(o),Number(a),Number(d)?Math.round(parseFloat(`0.${d}`)*1e3):0));if(u.setUTCFullYear(Number(s)),c.toUpperCase()!="Z"){const[,l,m,S]=/([+-])(\d\d):(\d\d)/.exec(c)||[void 0,"+",0,0],A=l==="-"?1:-1;u.setTime(u.getTime()+A*(Number(m)*60*60*1e3+Number(S)*60*1e3))}return u},gs=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,s,r,n,i,o,a,d;if((d=cs.exec(e))?[,t,s,r,n,i,o,a]=d:(d=ds.exec(e))?([,t,s,r,n,i,o,a]=d,r=(Number(r)+1900).toString()):(d=us.exec(e))&&([,s,t,n,i,o,a,r]=d),r&&o){const c=Date.UTC(Number(r),ls.indexOf(s),Number(t),Number(n),Number(i),Number(o),a?Math.round(parseFloat(`0.${a}`)*1e3):0);k(t,1,31),k(n,0,23),k(i,0,59),k(o,0,60);const u=new Date(c);return u.setUTCFullYear(Number(r)),u}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function k(e,t,s){const r=Number(e);if(r<t||r>s)throw new Error(`Value ${r} out of range [${t}, ${s}]`)}const fs=e=>{const t=e.length,s=[];let r=!1,n,i=0;for(let o=0;o<t;++o){const a=e[o];switch(a){case'"':n!=="\\"&&(r=!r);break;case",":r||(s.push(e.slice(i,o)),i=o+1);break}n=a}return s.push(e.slice(i)),s.map(o=>{o=o.trim();const a=o.length;return a<2?o:(o[0]==='"'&&o[a-1]==='"'&&(o=o.slice(1,a-1)),o.replace(/\\"/g,'"'))})};class hs extends gt{settings;constructor(t){super(),this.settings=t}read(t,s){const r=D.of(t);if(r.isListSchema())return fs(s).map(n=>this.read(r.getValueSchema(),n));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??q)(s);if(r.isTimestampSchema())switch(Oe(r,this.settings)){case 5:return ms(s);case 6:return gs(s);case 7:return ps(s);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",s),new Date(s)}if(r.isStringSchema()){const n=r.getMergedTraits().mediaType;let i=s;if(n)return r.getMergedTraits().httpHeader&&(i=this.base64ToUtf8(i)),(n==="application/json"||n.endsWith("+json"))&&(i=ft.from(i)),i}return r.isNumericSchema()?Number(s):r.isBigIntegerSchema()?BigInt(s):r.isBigDecimalSchema()?new $e(s,"bigDecimal"):r.isBooleanSchema()?String(s).toLowerCase()==="true":s}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??G)((this.serdeContext?.base64Decoder??q)(t))}}const je=e=>{const t="#text";for(const s in e)e.hasOwnProperty(s)&&e[s][t]!==void 0?e[s]=e[s][t]:typeof e[s]=="object"&&e[s]!==null&&(e[s]=je(e[s]));return e};const Ss=e=>t=>async s=>{if(!Q.isInstance(s.request))return t(s);const{request:r}=s,{handlerProtocol:n=""}=e.requestHandler.metadata||{};if(n.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let i=r.hostname;r.port!=null&&(i+=`:${r.port}`),r.headers.host=i}return t(s)},ys={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},ws=e=>({applyToStack:t=>{t.add(Ss(e),ys)}}),Es=()=>(e,t)=>async s=>{try{const r=await e(s),{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:d,overrideOutputFilterSensitiveLog:c}=a,u=d??t.inputFilterSensitiveLog,l=c??t.outputFilterSensitiveLog,{$metadata:m,...S}=r.output;return o?.info?.({clientName:n,commandName:i,input:u(s.input),output:l(S),metadata:m}),r}catch(r){const{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:d}=a,c=d??t.inputFilterSensitiveLog;throw o?.error?.({clientName:n,commandName:i,input:c(s.input),error:r,metadata:r.$metadata}),r}},bs={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},As=e=>({applyToStack:t=>{t.add(Es(),bs)}}),Ps={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Ts=()=>e=>async t=>e(t),Cs=e=>({applyToStack:t=>{t.add(Ts(),Ps)}}),Rs=void 0;function _s(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function Is(e){const t=L(e.userAgentAppId??Rs),{customUserAgent:s}=e;return Object.assign(e,{customUserAgent:typeof s=="string"?[[s]]:s,userAgentAppId:async()=>{const r=await t();if(!_s(r)){const n=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof r!="string"?n?.warn("userAgentAppId must be a string or undefined."):r.length>50&&n?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}const He=(e,t=!1)=>{if(t){for(const s of e.split("."))if(!He(s))return!1;return!0}return!(!ht(e)||e.length<3||e.length>63||e!==e.toLowerCase()||St(e))},he=":",ks="/",xs=e=>{const t=e.split(he);if(t.length<6)return null;const[s,r,n,i,o,...a]=t;if(s!=="arn"||r===""||n===""||a.join(he)==="")return null;const d=a.map(c=>c.split(ks)).flat();return{partition:r,service:n,region:i,accountId:o,resourceId:d}},Ds=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws 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)"},"mx-central-1":{description:"Mexico (Central)"},"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-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"EU (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso 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:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{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-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],vs={partitions:Ds};let Ns=vs;const Os=e=>{const{partitions:t}=Ns;for(const r of t){const{regions:n,outputs:i}=r;for(const[o,a]of Object.entries(n))if(o===e)return{...i,...a}}for(const r of t){const{regionRegex:n,outputs:i}=r;if(new RegExp(n).test(e))return{...i}}const s=t.find(r=>r.id==="aws");if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}},We={isVirtualHostableS3Bucket:He,parseArn:xs,partition:Os};Me.aws=We;function $s(e,t,s){return e.$source||(e.$source={}),e.$source[t]=s,e}function R(e,t,s){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=s}const Se=e=>ss.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Ve=e=>new Date(Date.now()+e),Ms=(e,t)=>Math.abs(Ve(t).getTime()-e)>=3e5,ye=(e,t)=>{const s=Date.parse(e);return Ms(s,t)?s-Date.now():t},z=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},Us=async e=>{const t=z("context",e.context),s=z("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=await z("signer",s.signer)(r),o=e?.signingRegion,a=e?.signingRegionSet,d=e?.signingName;return{config:s,signer:i,signingRegion:o,signingRegionSet:a,signingName:d}};class Fs{async sign(t,s,r){if(!Q.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await Us(r),{config:i,signer:o}=n;let{signingRegion:a,signingName:d}=n;const c=r.context;if(c?.authSchemes?.length??!1){const[l,m]=c.authSchemes;l?.name==="sigv4a"&&m?.name==="sigv4"&&(a=m?.signingRegion??a,d=m?.signingName??d)}return await o.sign(t,{signingDate:Ve(i.systemClockOffset),signingRegion:a,signingService:d})}errorHandler(t){return s=>{const r=s.ServerTime??Se(s.$response);if(r){const n=z("config",t.config),i=n.systemClockOffset;n.systemClockOffset=ye(r,n.systemClockOffset),n.systemClockOffset!==i&&s.$metadata&&(s.$metadata.clockSkewCorrected=!0)}throw s}}successHandler(t,s){const r=Se(t);if(r){const n=z("config",s.config);n.systemClockOffset=ye(r,n.systemClockOffset)}}}const Ls=e=>{let t=e.credentials,s=!!e.credentials,r;Object.defineProperty(e,"credentials",{set(c){c&&c!==t&&c!==r&&(s=!0),t=c;const u=zs(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),l=js(e,u);if(s&&!l.attributed){const m=typeof t=="object"&&t!==null;r=async S=>{const C=await l(S);return m&&(!C.$source||Object.keys(C.$source).length===0)?$s(C,"CREDENTIALS_CODE","e"):C},r.memoized=l.memoized,r.configBound=l.configBound,r.attributed=!0}else r=l},get(){return r},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:n=!0,systemClockOffset:i=e.systemClockOffset||0,sha256:o}=e;let a;return e.signer?a=L(e.signer):e.regionInfoProvider?a=()=>L(e.region)().then(async c=>[await e.regionInfoProvider(c,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},c]).then(([c,u])=>{const{signingRegion:l,signingService:m}=c;e.signingRegion=e.signingRegion||l||u,e.signingName=e.signingName||m||e.serviceId;const S={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:n},A=e.signerConstructor||pe;return new A(S)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await L(e.region)(),properties:{}},c);const u=c.signingRegion,l=c.signingName;e.signingRegion=e.signingRegion||u,e.signingName=e.signingName||l||e.serviceId;const m={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:n},S=e.signerConstructor||pe;return new S(m)},Object.assign(e,{systemClockOffset:i,signingEscapePath:n,signer:a})};function zs(e,{credentials:t,credentialDefaultProvider:s}){let r;return t?t?.memoized?r=t:r=yt(t,Et,wt):s?r=L(s(Object.assign({},e,{parentClientConfig:e}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function js(e,t){if(t.configBound)return t;const s=async r=>t({...r,callerClientConfig:e});return s.memoized=t.memoized,s.configBound=!0,s}class Hs{queryCompat;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,s){const r=s.getMemberSchemas(),n=Object.values(r).find(i=>!!i.getMergedTraits().httpPayload);if(n){const i=n.getMergedTraits().mediaType;return i||(n.isStringSchema()?"text/plain":n.isBlobSchema()?"application/octet-stream":t)}else if(!s.isUnitSchema()&&Object.values(r).find(o=>{const{httpQuery:a,httpQueryParams:d,httpHeader:c,httpLabel:u,httpPrefixHeaders:l}=o.getMergedTraits();return!a&&!d&&!c&&!u&&l===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,s,r,n,i,o){let a=s,d=t;t.includes("#")&&([a,d]=t.split("#"));const c={$metadata:i,$fault:r.statusCode<500?"client":"server"},u=T.for(a);try{return{errorSchema:o?.(u,d)??u.getSchema(t),errorMetadata:c}}catch{n.message=n.message??n.Message??"UnknownError";const m=T.for("smithy.ts.sdk.synthetic."+a),S=m.getBaseException();if(S){const A=m.getErrorCtor(S)??Error;throw this.decorateServiceException(Object.assign(new A({name:d}),c),n)}throw this.decorateServiceException(Object.assign(new Error(d),c),n)}}decorateServiceException(t,s={}){if(this.queryCompat){const r=t.Message??s.Message,n=me(t,s);r&&(n.message=r),n.Error={...n.Error,Type:n.Error.Type,Code:n.Error.Code,Message:n.Error.message??n.Error.Message??r};const i=n.$metadata.requestId;return i&&(n.RequestId=i),n}return me(t,s)}setQueryCompatError(t,s){const r=s.headers?.["x-amzn-query-error"];if(t!==void 0&&r!=null){const[n,i]=r.split(";"),o=Object.entries(t),a={Code:n,Type:i};Object.assign(t,a);for(const[d,c]of o)a[d==="message"?"Message":d]=c;delete a.__type,t.Error=a}}queryCompatOutput(t,s){t.Error&&(s.Error=t.Error),t.Type&&(s.Type=t.Type),t.Code&&(s.Code=t.Code)}findQueryCompatibleError(t,s){try{return t.getSchema(s)}catch{return t.find(n=>D.of(n).getMergedTraits().awsQueryError?.[0]===s)}}}class Be{serdeContext;setSerdeContext(t){this.serdeContext=t}}function*Ws(e,t){if(e.isUnitSchema())return;const s=e.getSchema();for(let r=0;r<s[4].length;++r){const n=s[4][r],i=s[5][r],o=new D([i,0],n);!(n in t)&&!o.isIdempotencyToken()||(yield[n,o])}}class Vs{from;to;keys;constructor(t,s){this.from=t,this.to=s,this.keys=new Set(Object.keys(this.from).filter(r=>r!=="__type"))}mark(t){this.keys.delete(t)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const t=this.keys.values().next().value,s=this.from[t];this.to.$unknown=[t,s]}}}let H;function Bs(e){H||(H=new DOMParser);const t=H.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const s=r=>{if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return r.textContent;if(r.nodeType===Node.ELEMENT_NODE){const n=r;if(n.attributes.length===0&&n.childNodes.length===0)return"";const i={},o=Array.from(n.attributes);for(const d of o)i[`${d.name}`]=d.value;const a=Array.from(n.childNodes);for(const d of a){const c=s(d);if(c!=null){const u=d.nodeName;if(a.length===1&&o.length===0&&u==="#text")return c;i[u]?Array.isArray(i[u])?i[u].push(c):i[u]=[i[u],c]:i[u]=c}else if(a.length===1&&o.length===0)return n.textContent}return i}return null};return{[t.documentElement.nodeName]:s(t.documentElement)}}class Ks extends Be{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new hs(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,s,r){const n=D.of(t),i=n.getMemberSchemas();if(n.isStructSchema()&&n.isMemberSchema()&&!!Object.values(i).find(c=>!!c.getMemberTraits().eventPayload)){const c={},u=Object.keys(i)[0];return i[u].isBlobSchema()?c[u]=s:c[u]=this.read(i[u],s),c}const a=(this.serdeContext?.utf8Encoder??G)(s),d=this.parseXml(a);return this.readSchema(t,r?d[r]:d)}readSchema(t,s){const r=D.of(t);if(r.isUnitSchema())return;const n=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(s))return this.readSchema(r,[s]);if(s==null)return s;if(typeof s=="object"){const i=!!n.sparse,o=!!n.xmlFlattened;if(r.isListSchema()){const d=r.getValueSchema(),c=[],u=d.getMergedTraits().xmlName??"member",l=o?s:(s[0]??s)[u],m=Array.isArray(l)?l:[l];for(const S of m)(S!=null||i)&&c.push(this.readSchema(d,S));return c}const a={};if(r.isMapSchema()){const d=r.getKeySchema(),c=r.getValueSchema();let u;o?u=Array.isArray(s)?s:[s]:u=Array.isArray(s.entry)?s.entry:[s.entry];const l=d.getMergedTraits().xmlName??"key",m=c.getMergedTraits().xmlName??"value";for(const S of u){const A=S[l],C=S[m];(C!=null||i)&&(a[A]=this.readSchema(c,C))}return a}if(r.isStructSchema()){const d=r.isUnionSchema();let c;d&&(c=new Vs(s,a));for(const[u,l]of r.structIterator()){const m=l.getMergedTraits(),S=m.httpPayload?m.xmlName??l.getName():l.getMemberTraits().xmlName??u;d&&c.mark(S),s[S]!=null&&(a[u]=this.readSchema(l,s[S]))}return d&&c.writeUnknown(),a}if(r.isDocumentSchema())return s;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,s)}parseXml(t){if(t.length){let s;try{s=Bs(t)}catch(o){throw o&&typeof o=="object"&&Object.defineProperty(o,"$responseBodyText",{value:t}),o}const r="#text",n=Object.keys(s)[0],i=s[n];return i[r]&&(i[n]=i[r],delete i[r]),je(i)}return{}}}class qs extends Be{settings;buffer;constructor(t){super(),this.settings=t}write(t,s,r=""){this.buffer===void 0&&(this.buffer="");const n=D.of(t);if(r&&!r.endsWith(".")&&(r+="."),n.isBlobSchema())(typeof s=="string"||s instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??Fe)(s)));else if(n.isBooleanSchema()||n.isNumericSchema()||n.isStringSchema())s!=null?(this.writeKey(r),this.writeValue(String(s))):n.isIdempotencyToken()&&(this.writeKey(r),this.writeValue(bt()));else if(n.isBigIntegerSchema())s!=null&&(this.writeKey(r),this.writeValue(String(s)));else if(n.isBigDecimalSchema())s!=null&&(this.writeKey(r),this.writeValue(s instanceof $e?s.string:String(s)));else if(n.isTimestampSchema()){if(s instanceof Date)switch(this.writeKey(r),Oe(n,this.settings)){case 5:this.writeValue(s.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(rs(s));break;case 7:this.writeValue(String(s.getTime()/1e3));break}}else if(n.isDocumentSchema())Array.isArray(s)?this.write(79,s,r):s instanceof Date?this.write(4,s,r):s instanceof Uint8Array?this.write(21,s,r):s&&typeof s=="object"?this.write(143,s,r):(this.writeKey(r),this.writeValue(String(s)));else if(n.isListSchema()){if(Array.isArray(s))if(s.length===0)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const i=n.getValueSchema(),o=this.settings.flattenLists||n.getMergedTraits().xmlFlattened;let a=1;for(const d of s){if(d==null)continue;const c=this.getKey("member",i.getMergedTraits().xmlName),u=o?`${r}${a}`:`${r}${c}.${a}`;this.write(i,d,u),++a}}}else if(n.isMapSchema()){if(s&&typeof s=="object"){const i=n.getKeySchema(),o=n.getValueSchema(),a=n.getMergedTraits().xmlFlattened;let d=1;for(const[c,u]of Object.entries(s)){if(u==null)continue;const l=this.getKey("key",i.getMergedTraits().xmlName),m=a?`${r}${d}.${l}`:`${r}entry.${d}.${l}`,S=this.getKey("value",o.getMergedTraits().xmlName),A=a?`${r}${d}.${S}`:`${r}entry.${d}.${S}`;this.write(i,c,m),this.write(o,u,A),++d}}}else if(n.isStructSchema()){if(s&&typeof s=="object"){let i=!1;for(const[o,a]of Ws(n,s)){if(s[o]==null&&!a.isIdempotencyToken())continue;const d=this.getKey(o,a.getMergedTraits().xmlName),c=`${r}${d}`;this.write(a,s[o],c),i=!0}if(!i&&n.isUnionSchema()){const{$unknown:o}=s;if(Array.isArray(o)){const[a,d]=o,c=`${r}${a}`;this.write(15,d,c)}}}}else if(!n.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${n.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const t=this.buffer;return delete this.buffer,t}getKey(t,s){const r=s??t;return this.settings.capitalizeKeys?r[0].toUpperCase()+r.slice(1):r}writeKey(t){t.endsWith(".")&&(t=t.slice(0,t.length-1)),this.buffer+=`&${fe(t)}=`}writeValue(t){this.buffer+=fe(t)}}class Gs extends At{options;serializer;deserializer;mixin=new Hs;constructor(t){super({defaultNamespace:t.defaultNamespace}),this.options=t;const s={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace,serializeEmptyLists:!0};this.serializer=new qs(s),this.deserializer=new Ks(s)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(t){this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(t,s,r){const n=await super.serializeRequest(t,s,r);n.path.endsWith("/")||(n.path+="/"),Object.assign(n.headers,{"content-type":"application/x-www-form-urlencoded"}),(Pt(t.input)==="unit"||!n.body)&&(n.body="");const i=t.name.split("#")[1]??t.name;return n.body=`Action=${i}&Version=${this.options.version}`+n.body,n.body.endsWith("&")&&(n.body=n.body.slice(-1)),n}async deserializeResponse(t,s,r){const n=this.deserializer,i=D.of(t.output),o={};if(r.statusCode>=300){const l=await ge(r.body,s);l.byteLength>0&&Object.assign(o,await n.read(15,l)),await this.handleError(t,s,r,o,this.deserializeMetadata(r))}for(const l in r.headers){const m=r.headers[l];delete r.headers[l],r.headers[l.toLowerCase()]=m}const a=t.name.split("#")[1]??t.name,d=i.isStructSchema()&&this.useNestedResult()?a+"Result":void 0,c=await ge(r.body,s);return c.byteLength>0&&Object.assign(o,await n.read(i,c,d)),{$metadata:this.deserializeMetadata(r),...o}}useNestedResult(){return!0}async handleError(t,s,r,n,i){const o=this.loadQueryErrorCode(r,n)??"Unknown",a=this.loadQueryError(n),d=this.loadQueryErrorMessage(n);a.message=d,a.Error={Type:a.Type,Code:a.Code,Message:d};const{errorSchema:c,errorMetadata:u}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,r,a,i,this.mixin.findQueryCompatibleError),l=D.of(c),m=T.for(c[1]).getErrorCtor(c)??Error,S=new m(d),A={Type:a.Error.Type,Code:a.Error.Code,Error:a.Error};for(const[C,ue]of l.structIterator()){const le=ue.getMergedTraits().xmlName??C,mt=a[le]??n[le];A[C]=this.deserializer.readSchema(ue,mt)}throw this.mixin.decorateServiceException(Object.assign(S,u,{$fault:l.getMergedTraits().error,message:d},A),n)}loadQueryErrorCode(t,s){const r=(s.Errors?.[0]?.Error??s.Errors?.Error??s.Error)?.Code;if(r!==void 0)return r;if(t.statusCode==404)return"NotFound"}loadQueryError(t){return t.Errors?.[0]?.Error??t.Errors?.Error??t.Error}loadQueryErrorMessage(t){const s=this.loadQueryError(t);return s?.message??s?.Message??t.message??t.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}const Qs=/\d{12}\.ddb/;async function Xs(e,t,s){if(s.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&R(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const i=await t.retryStrategy();typeof i.acquireInitialRetryToken=="function"?i.constructor?.name?.includes("Adaptive")?R(e,"RETRY_MODE_ADAPTIVE","F"):R(e,"RETRY_MODE_STANDARD","E"):R(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const i=e.endpointV2;switch(String(i?.url?.hostname).match(Qs)&&R(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":R(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":R(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":R(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const n=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){const i=n;i.accountId&&R(e,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(i.$source??{}))R(e,o,a)}}const we="user-agent",W="x-amz-user-agent",Ee=" ",V="/",Js=/[^!$%&'*+\-.^_`|~\w]/g,Ys=/[^!$%&'*+\-.^_`|~\w#]/g,be="-",Zs=1024;function er(e){let t="";for(const s in e){const r=e[s];if(t.length+r.length+1<=Zs){t.length?t+=","+r:t+=r;continue}break}return t}const tr=e=>(t,s)=>async r=>{const{request:n}=r;if(!Q.isInstance(n))return t(r);const{headers:i}=n,o=s?.userAgent?.map(j)||[],a=(await e.defaultUserAgentProvider()).map(j);await Xs(s,e,r);const d=s;a.push(`m/${er(Object.assign({},s.__smithy_context?.features,d.__aws_sdk_context?.features))}`);const c=e?.customUserAgent?.map(j)||[],u=await e.userAgentAppId();u&&a.push(j(["app",`${u}`]));const l=[].concat([...a,...o,...c]).join(Ee),m=[...a.filter(S=>S.startsWith("aws-sdk-")),...c].join(Ee);return e.runtime!=="browser"?(m&&(i[W]=i[W]?`${i[we]} ${m}`:m),i[we]=l):i[W]=l,t({...r,request:n})},j=e=>{const t=e[0].split(V).map(o=>o.replace(Js,be)).join(V),s=e[1]?.replace(Ys,be),r=t.indexOf(V),n=t.substring(0,r);let i=t.substring(r+1);return n==="api"&&(i=i.toLowerCase()),[n,i,s].filter(o=>o&&o.length>0).reduce((o,a,d)=>{switch(d){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},sr={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},rr=e=>({applyToStack:t=>{t.add(tr(e),sr)}}),nr=async(e,t,s)=>({operation:Tt(t).operation,region:await Ue(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function ir(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function or(e){return{schemeId:"smithy.api#noAuth"}}const ar=e=>{const t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(or());break}default:t.push(ir(e))}return t},cr=e=>Object.assign(e,{stsClientCtor:st}),dr=e=>{const t=cr(e),s=Ls(t);return Object.assign(s,{authSchemePreference:Ue(e.authSchemePreference??[])})},ur=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),lr={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"}},pr="3.968.0",mr={version:pr},gr=({serviceId:e,clientVersion:t})=>async s=>{const r=typeof window<"u"?window.navigator:void 0,n=r?.userAgent??"",i=r?.userAgentData?.platform??Ae.os(n)??"other",o=void 0,a=r?.userAgentData?.brands??[],d=a[a.length-1],c=d?.brand??Ae.browser(n)??"unknown",u=d?.version??"unknown",l=[["aws-sdk-js",t],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${c}_${u}`]];e&&l.push([`api/${e}`,t]);const m=await s?.userAgentAppId?.();return m&&l.push([`app/${m}`]),l},Ae={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux"},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari"}},Ke="required",p="type",g="fn",f="argv",v="ref",Pe=!1,B=!0,x="booleanEquals",w="stringEquals",qe="sigv4",Ge="sts",Qe="us-east-1",y="endpoint",Te="https://sts.{Region}.{PartitionResult#dnsSuffix}",_="tree",F="error",Z="getAttr",Ce={[Ke]:!1,[p]:"string"},K={[Ke]:!0,default:!1,[p]:"boolean"},Xe={[v]:"Endpoint"},Re={[g]:"isSet",[f]:[{[v]:"Region"}]},E={[v]:"Region"},_e={[g]:"aws.partition",[f]:[E],assign:"PartitionResult"},Je={[v]:"UseFIPS"},Ye={[v]:"UseDualStack"},b={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:qe,signingName:Ge,signingRegion:Qe}]},headers:{}},P={},Ie={conditions:[{[g]:w,[f]:[E,"aws-global"]}],[y]:b,[p]:y},Ze={[g]:x,[f]:[Je,!0]},et={[g]:x,[f]:[Ye,!0]},ke={[g]:Z,[f]:[{[v]:"PartitionResult"},"supportsFIPS"]},tt={[v]:"PartitionResult"},xe={[g]:x,[f]:[!0,{[g]:Z,[f]:[tt,"supportsDualStack"]}]},De=[{[g]:"isSet",[f]:[Xe]}],ve=[Ze],Ne=[et],fr={parameters:{Region:Ce,UseDualStack:K,UseFIPS:K,Endpoint:Ce,UseGlobalEndpoint:K},rules:[{conditions:[{[g]:x,[f]:[{[v]:"UseGlobalEndpoint"},B]},{[g]:"not",[f]:De},Re,_e,{[g]:x,[f]:[Je,Pe]},{[g]:x,[f]:[Ye,Pe]}],rules:[{conditions:[{[g]:w,[f]:[E,"ap-northeast-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"ap-south-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"ap-southeast-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"ap-southeast-2"]}],endpoint:b,[p]:y},Ie,{conditions:[{[g]:w,[f]:[E,"ca-central-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"eu-central-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"eu-north-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"eu-west-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"eu-west-2"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"eu-west-3"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"sa-east-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,Qe]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"us-east-2"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"us-west-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"us-west-2"]}],endpoint:b,[p]:y},{endpoint:{url:Te,properties:{authSchemes:[{name:qe,signingName:Ge,signingRegion:"{Region}"}]},headers:P},[p]:y}],[p]:_},{conditions:De,rules:[{conditions:ve,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[p]:F},{conditions:Ne,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[p]:F},{endpoint:{url:Xe,properties:P,headers:P},[p]:y}],[p]:_},{conditions:[Re],rules:[{conditions:[_e],rules:[{conditions:[Ze,et],rules:[{conditions:[{[g]:x,[f]:[B,ke]},xe],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:P,headers:P},[p]:y}],[p]:_},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[p]:F}],[p]:_},{conditions:ve,rules:[{conditions:[{[g]:x,[f]:[ke,B]}],rules:[{conditions:[{[g]:w,[f]:[{[g]:Z,[f]:[tt,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:P,headers:P},[p]:y},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:P,headers:P},[p]:y}],[p]:_},{error:"FIPS is enabled but this partition does not support FIPS",[p]:F}],[p]:_},{conditions:Ne,rules:[{conditions:[xe],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:P,headers:P},[p]:y}],[p]:_},{error:"DualStack is enabled but this partition does not support DualStack",[p]:F}],[p]:_},Ie,{endpoint:{url:Te,properties:P,headers:P},[p]:y}],[p]:_}],[p]:_},{error:"Invalid Configuration: Missing Region",[p]:F}]},hr=fr,Sr=new Ct({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),yr=(e,t={})=>Sr.get(e,()=>Rt(hr,{endpointParams:e,logger:t.logger}));Me.aws=We;const wr=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??q,base64Encoder:e?.base64Encoder??Fe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??yr,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ar,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Fs},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new kt}],logger:e?.logger??new It,protocol:e?.protocol??Gs,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??_t,utf8Decoder:e?.utf8Decoder??ns,utf8Encoder:e?.utf8Encoder??G}),Er=e=>{const t=xt(e),s=()=>t().then(Ft),r=wr(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??$t,credentialDefaultProvider:e?.credentialDefaultProvider??(n=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??gr({serviceId:r.serviceId,clientVersion:mr.version}),maxAttempts:e?.maxAttempts??Ot,region:e?.region??Nt("Region is missing"),requestHandler:os.create(e?.requestHandler??s),retryMode:e?.retryMode??(async()=>(await s()).retryMode||vt),sha256:e?.sha256??Dt,streamCollector:e?.streamCollector??is,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ut)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Mt))}},br=e=>({setRegion(t){e.region=t},region(){return e.region}}),Ar=e=>({region:e.region()}),Pr=e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(n){const i=t.findIndex(o=>o.schemeId===n.schemeId);i===-1?t.push(n):t.splice(i,1,n)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(n){s=n},httpAuthSchemeProvider(){return s},setCredentials(n){r=n},credentials(){return r}}},Tr=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Cr=(e,t)=>{const s=Object.assign(br(e),Lt(e),zt(e),Pr(e));return t.forEach(r=>r.configure(s)),Object.assign(e,Ar(s),jt(s),Ht(s),Tr(s))};class st extends Wt{config;constructor(...[t]){const s=Er(t||{});super(s),this.initConfig=s;const r=ur(s),n=Is(r),i=Vt(n),o=Bt(i),a=o,d=Kt(a),c=dr(d),u=Cr(c,t?.extensions||[]);this.config=u,this.middlewareStack.use(qt(this.config)),this.middlewareStack.use(rr(this.config)),this.middlewareStack.use(Gt(this.config)),this.middlewareStack.use(Qt(this.config)),this.middlewareStack.use(ws(this.config)),this.middlewareStack.use(As(this.config)),this.middlewareStack.use(Cs(this.config)),this.middlewareStack.use(Xt(this.config,{httpAuthSchemeParametersProvider:nr,identityProviderConfigProvider:async l=>new Yt({"aws.auth#sigv4":l.credentials})})),this.middlewareStack.use(Jt(this.config))}destroy(){super.destroy()}}class I extends Zt{constructor(t){super(t),Object.setPrototypeOf(this,I.prototype)}}class ee extends I{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,ee.prototype)}}class te extends I{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,te.prototype)}}class se extends I{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,se.prototype)}}class re extends I{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,re.prototype)}}class ne extends I{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,ne.prototype)}}class ie extends I{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,ie.prototype)}}class oe extends I{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,oe.prototype)}}const Rr="Arn",_r="AccessKeyId",Ir="AssumeRole",kr="AssumedRoleId",xr="AssumeRoleRequest",Dr="AssumeRoleResponse",ae="AssumedRoleUser",vr="AssumeRoleWithWebIdentity",Nr="AssumeRoleWithWebIdentityRequest",Or="AssumeRoleWithWebIdentityResponse",$r="Audience",ce="Credentials",Mr="ContextAssertion",rt="DurationSeconds",Ur="Expiration",Fr="ExternalId",Lr="ExpiredTokenException",zr="IDPCommunicationErrorException",jr="IDPRejectedClaimException",Hr="InvalidIdentityTokenException",Wr="Key",Vr="MalformedPolicyDocumentException",nt="Policy",it="PolicyArns",Br="ProviderArn",Kr="ProvidedContexts",qr="ProvidedContextsListType",Gr="ProvidedContext",Qr="PolicyDescriptorType",Xr="ProviderId",ot="PackedPolicySize",Jr="PackedPolicyTooLargeException",Yr="Provider",at="RoleArn",Zr="RegionDisabledException",ct="RoleSessionName",en="SecretAccessKey",tn="SubjectFromWebIdentityToken",de="SourceIdentity",sn="SerialNumber",rn="SessionToken",nn="Tags",on="TokenCode",an="TransitiveTagKeys",cn="Tag",dn="Value",un="WebIdentityToken",ln="arn",pn="accessKeySecretType",N="awsQueryError",O="client",mn="clientTokenType",$="error",M="httpError",U="message",gn="policyDescriptorListType",dt="smithy.ts.sdk.synthetic.com.amazonaws.sts",fn="tagListType",h="com.amazonaws.sts";var hn=[0,h,pn,8,0],Sn=[0,h,mn,8,0],ut=[3,h,ae,0,[kr,Rr],[0,0]],yn=[3,h,xr,0,[at,ct,it,nt,rt,nn,an,Fr,sn,on,de,Kr],[0,0,()=>pt,0,1,()=>On,64,0,0,0,0,()=>Nn]],wn=[3,h,Dr,0,[ce,ae,ot,de],[[()=>lt,0],()=>ut,1,0]],En=[3,h,Nr,0,[at,ct,un,Xr,it,nt,rt],[0,0,[()=>Sn,0],0,()=>pt,0,1]],bn=[3,h,Or,0,[ce,tn,ae,ot,Yr,$r,de],[[()=>lt,0],0,()=>ut,1,0,0,0]],lt=[3,h,ce,0,[_r,en,rn,Ur],[0,[()=>hn,0],0,4]],An=[-3,h,Lr,{[N]:["ExpiredTokenException",400],[$]:O,[M]:400},[U],[0]];T.for(h).registerError(An,ee);var Pn=[-3,h,zr,{[N]:["IDPCommunicationError",400],[$]:O,[M]:400},[U],[0]];T.for(h).registerError(Pn,oe);var Tn=[-3,h,jr,{[N]:["IDPRejectedClaim",403],[$]:O,[M]:403},[U],[0]];T.for(h).registerError(Tn,ne);var Cn=[-3,h,Hr,{[N]:["InvalidIdentityToken",400],[$]:O,[M]:400},[U],[0]];T.for(h).registerError(Cn,ie);var Rn=[-3,h,Vr,{[N]:["MalformedPolicyDocument",400],[$]:O,[M]:400},[U],[0]];T.for(h).registerError(Rn,te);var _n=[-3,h,Jr,{[N]:["PackedPolicyTooLarge",400],[$]:O,[M]:400},[U],[0]];T.for(h).registerError(_n,se);var In=[3,h,Qr,0,[ln],[0]],kn=[3,h,Gr,0,[Br,Mr],[0,0]],xn=[-3,h,Zr,{[N]:["RegionDisabledException",403],[$]:O,[M]:403},[U],[0]];T.for(h).registerError(xn,re);var Dn=[3,h,cn,0,[Wr,dn],[0,0]],vn=[-3,dt,"STSServiceException",0,[],[]];T.for(dt).registerError(vn,I);var pt=[1,h,gn,0,()=>In],Nn=[1,h,qr,0,()=>kn],On=[1,h,fn,0,()=>Dn],$n=[9,h,Ir,0,()=>yn,()=>wn],Ln=[9,h,vr,0,()=>En,()=>bn];class Mn extends es.classBuilder().ep(lr).m(function(t,s,r,n){return[ts(r,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc($n).build(){}const zn=Object.freeze(Object.defineProperty({__proto__:null,AssumeRoleCommand:Mn,STSClient:st},Symbol.toStringTag,{value:"Module"}));export{Ln as A,lt as C,An as E,Pn as I,Rn as M,_n as P,xn as R,st as S,Dn as T,I as a,Mn as b,lr as c,ut as d,yn as e,wn as f,En as g,bn as h,Tn as i,Cn as j,In as k,kn as l,vn as m,$n as n,ee as o,te as p,se as q,re as r,$s as s,ne as t,ie as u,oe as v,zn as w};
|
|
1
|
+
import{Y as gt,N as D,k as Oe,L as ft,h as $e,i as ht,b as St,c as Me,S as pe,m as yt,d as wt,e as Et,T,f as me,v as bt,R as At,l as Pt,j as ge,n as Ue,o as Tt,E as Ct,r as Rt,p as _t,q as It,s as kt,t as xt,u as Dt,D as vt,w as Nt,x as Ot,y as $t,z as Mt,A as Ut,B as Ft,F as Lt,G as zt,H as jt,I as Ht,a as Wt,J as Vt,K as Bt,M as Kt,O as qt,P as Gt,Q as Qt,U as Xt,V as Jt,W as Yt,X as Zt,C as es,g as ts}from"./resolveDefaultsModeConfig-B9DEWYJ0.js";import{d as q,t as G,H as Q,n as L,c as ss,a as Fe,i as rs,f as ns,s as is,F as os}from"./normalizeProvider-BrOPyH3l.js";function fe(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const X="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",J="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",Y="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",Le="(\\d?\\d)",ze="(\\d{4})",as=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),cs=new RegExp(`^${X}, ${Le} ${J} ${ze} ${Y} GMT$`),ds=new RegExp(`^${X}, ${Le}-${J}-(\\d\\d) ${Y} GMT$`),us=new RegExp(`^${X} ${J} ( [1-9]|\\d\\d) ${Y} ${ze}$`),ls=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ps=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},ms=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=as.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,s,r,n,i,o,a,,d,c]=t;k(r,1,12),k(n,1,31),k(i,0,23),k(o,0,59),k(a,0,60);const u=new Date(Date.UTC(Number(s),Number(r)-1,Number(n),Number(i),Number(o),Number(a),Number(d)?Math.round(parseFloat(`0.${d}`)*1e3):0));if(u.setUTCFullYear(Number(s)),c.toUpperCase()!="Z"){const[,l,m,S]=/([+-])(\d\d):(\d\d)/.exec(c)||[void 0,"+",0,0],A=l==="-"?1:-1;u.setTime(u.getTime()+A*(Number(m)*60*60*1e3+Number(S)*60*1e3))}return u},gs=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,s,r,n,i,o,a,d;if((d=cs.exec(e))?[,t,s,r,n,i,o,a]=d:(d=ds.exec(e))?([,t,s,r,n,i,o,a]=d,r=(Number(r)+1900).toString()):(d=us.exec(e))&&([,s,t,n,i,o,a,r]=d),r&&o){const c=Date.UTC(Number(r),ls.indexOf(s),Number(t),Number(n),Number(i),Number(o),a?Math.round(parseFloat(`0.${a}`)*1e3):0);k(t,1,31),k(n,0,23),k(i,0,59),k(o,0,60);const u=new Date(c);return u.setUTCFullYear(Number(r)),u}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function k(e,t,s){const r=Number(e);if(r<t||r>s)throw new Error(`Value ${r} out of range [${t}, ${s}]`)}const fs=e=>{const t=e.length,s=[];let r=!1,n,i=0;for(let o=0;o<t;++o){const a=e[o];switch(a){case'"':n!=="\\"&&(r=!r);break;case",":r||(s.push(e.slice(i,o)),i=o+1);break}n=a}return s.push(e.slice(i)),s.map(o=>{o=o.trim();const a=o.length;return a<2?o:(o[0]==='"'&&o[a-1]==='"'&&(o=o.slice(1,a-1)),o.replace(/\\"/g,'"'))})};class hs extends gt{settings;constructor(t){super(),this.settings=t}read(t,s){const r=D.of(t);if(r.isListSchema())return fs(s).map(n=>this.read(r.getValueSchema(),n));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??q)(s);if(r.isTimestampSchema())switch(Oe(r,this.settings)){case 5:return ms(s);case 6:return gs(s);case 7:return ps(s);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",s),new Date(s)}if(r.isStringSchema()){const n=r.getMergedTraits().mediaType;let i=s;if(n)return r.getMergedTraits().httpHeader&&(i=this.base64ToUtf8(i)),(n==="application/json"||n.endsWith("+json"))&&(i=ft.from(i)),i}return r.isNumericSchema()?Number(s):r.isBigIntegerSchema()?BigInt(s):r.isBigDecimalSchema()?new $e(s,"bigDecimal"):r.isBooleanSchema()?String(s).toLowerCase()==="true":s}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??G)((this.serdeContext?.base64Decoder??q)(t))}}const je=e=>{const t="#text";for(const s in e)e.hasOwnProperty(s)&&e[s][t]!==void 0?e[s]=e[s][t]:typeof e[s]=="object"&&e[s]!==null&&(e[s]=je(e[s]));return e};const Ss=e=>t=>async s=>{if(!Q.isInstance(s.request))return t(s);const{request:r}=s,{handlerProtocol:n=""}=e.requestHandler.metadata||{};if(n.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let i=r.hostname;r.port!=null&&(i+=`:${r.port}`),r.headers.host=i}return t(s)},ys={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},ws=e=>({applyToStack:t=>{t.add(Ss(e),ys)}}),Es=()=>(e,t)=>async s=>{try{const r=await e(s),{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:d,overrideOutputFilterSensitiveLog:c}=a,u=d??t.inputFilterSensitiveLog,l=c??t.outputFilterSensitiveLog,{$metadata:m,...S}=r.output;return o?.info?.({clientName:n,commandName:i,input:u(s.input),output:l(S),metadata:m}),r}catch(r){const{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:d}=a,c=d??t.inputFilterSensitiveLog;throw o?.error?.({clientName:n,commandName:i,input:c(s.input),error:r,metadata:r.$metadata}),r}},bs={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},As=e=>({applyToStack:t=>{t.add(Es(),bs)}}),Ps={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Ts=()=>e=>async t=>e(t),Cs=e=>({applyToStack:t=>{t.add(Ts(),Ps)}}),Rs=void 0;function _s(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function Is(e){const t=L(e.userAgentAppId??Rs),{customUserAgent:s}=e;return Object.assign(e,{customUserAgent:typeof s=="string"?[[s]]:s,userAgentAppId:async()=>{const r=await t();if(!_s(r)){const n=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof r!="string"?n?.warn("userAgentAppId must be a string or undefined."):r.length>50&&n?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}const He=(e,t=!1)=>{if(t){for(const s of e.split("."))if(!He(s))return!1;return!0}return!(!ht(e)||e.length<3||e.length>63||e!==e.toLowerCase()||St(e))},he=":",ks="/",xs=e=>{const t=e.split(he);if(t.length<6)return null;const[s,r,n,i,o,...a]=t;if(s!=="arn"||r===""||n===""||a.join(he)==="")return null;const d=a.map(c=>c.split(ks)).flat();return{partition:r,service:n,region:i,accountId:o,resourceId:d}},Ds=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws 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)"},"mx-central-1":{description:"Mexico (Central)"},"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-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"EU (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso 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:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{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-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],vs={partitions:Ds};let Ns=vs;const Os=e=>{const{partitions:t}=Ns;for(const r of t){const{regions:n,outputs:i}=r;for(const[o,a]of Object.entries(n))if(o===e)return{...i,...a}}for(const r of t){const{regionRegex:n,outputs:i}=r;if(new RegExp(n).test(e))return{...i}}const s=t.find(r=>r.id==="aws");if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}},We={isVirtualHostableS3Bucket:He,parseArn:xs,partition:Os};Me.aws=We;function $s(e,t,s){return e.$source||(e.$source={}),e.$source[t]=s,e}function R(e,t,s){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=s}const Se=e=>ss.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Ve=e=>new Date(Date.now()+e),Ms=(e,t)=>Math.abs(Ve(t).getTime()-e)>=3e5,ye=(e,t)=>{const s=Date.parse(e);return Ms(s,t)?s-Date.now():t},z=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},Us=async e=>{const t=z("context",e.context),s=z("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=await z("signer",s.signer)(r),o=e?.signingRegion,a=e?.signingRegionSet,d=e?.signingName;return{config:s,signer:i,signingRegion:o,signingRegionSet:a,signingName:d}};class Fs{async sign(t,s,r){if(!Q.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await Us(r),{config:i,signer:o}=n;let{signingRegion:a,signingName:d}=n;const c=r.context;if(c?.authSchemes?.length??!1){const[l,m]=c.authSchemes;l?.name==="sigv4a"&&m?.name==="sigv4"&&(a=m?.signingRegion??a,d=m?.signingName??d)}return await o.sign(t,{signingDate:Ve(i.systemClockOffset),signingRegion:a,signingService:d})}errorHandler(t){return s=>{const r=s.ServerTime??Se(s.$response);if(r){const n=z("config",t.config),i=n.systemClockOffset;n.systemClockOffset=ye(r,n.systemClockOffset),n.systemClockOffset!==i&&s.$metadata&&(s.$metadata.clockSkewCorrected=!0)}throw s}}successHandler(t,s){const r=Se(t);if(r){const n=z("config",s.config);n.systemClockOffset=ye(r,n.systemClockOffset)}}}const Ls=e=>{let t=e.credentials,s=!!e.credentials,r;Object.defineProperty(e,"credentials",{set(c){c&&c!==t&&c!==r&&(s=!0),t=c;const u=zs(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),l=js(e,u);if(s&&!l.attributed){const m=typeof t=="object"&&t!==null;r=async S=>{const C=await l(S);return m&&(!C.$source||Object.keys(C.$source).length===0)?$s(C,"CREDENTIALS_CODE","e"):C},r.memoized=l.memoized,r.configBound=l.configBound,r.attributed=!0}else r=l},get(){return r},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:n=!0,systemClockOffset:i=e.systemClockOffset||0,sha256:o}=e;let a;return e.signer?a=L(e.signer):e.regionInfoProvider?a=()=>L(e.region)().then(async c=>[await e.regionInfoProvider(c,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},c]).then(([c,u])=>{const{signingRegion:l,signingService:m}=c;e.signingRegion=e.signingRegion||l||u,e.signingName=e.signingName||m||e.serviceId;const S={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:n},A=e.signerConstructor||pe;return new A(S)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await L(e.region)(),properties:{}},c);const u=c.signingRegion,l=c.signingName;e.signingRegion=e.signingRegion||u,e.signingName=e.signingName||l||e.serviceId;const m={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:n},S=e.signerConstructor||pe;return new S(m)},Object.assign(e,{systemClockOffset:i,signingEscapePath:n,signer:a})};function zs(e,{credentials:t,credentialDefaultProvider:s}){let r;return t?t?.memoized?r=t:r=yt(t,Et,wt):s?r=L(s(Object.assign({},e,{parentClientConfig:e}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function js(e,t){if(t.configBound)return t;const s=async r=>t({...r,callerClientConfig:e});return s.memoized=t.memoized,s.configBound=!0,s}class Hs{queryCompat;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,s){const r=s.getMemberSchemas(),n=Object.values(r).find(i=>!!i.getMergedTraits().httpPayload);if(n){const i=n.getMergedTraits().mediaType;return i||(n.isStringSchema()?"text/plain":n.isBlobSchema()?"application/octet-stream":t)}else if(!s.isUnitSchema()&&Object.values(r).find(o=>{const{httpQuery:a,httpQueryParams:d,httpHeader:c,httpLabel:u,httpPrefixHeaders:l}=o.getMergedTraits();return!a&&!d&&!c&&!u&&l===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,s,r,n,i,o){let a=s,d=t;t.includes("#")&&([a,d]=t.split("#"));const c={$metadata:i,$fault:r.statusCode<500?"client":"server"},u=T.for(a);try{return{errorSchema:o?.(u,d)??u.getSchema(t),errorMetadata:c}}catch{n.message=n.message??n.Message??"UnknownError";const m=T.for("smithy.ts.sdk.synthetic."+a),S=m.getBaseException();if(S){const A=m.getErrorCtor(S)??Error;throw this.decorateServiceException(Object.assign(new A({name:d}),c),n)}throw this.decorateServiceException(Object.assign(new Error(d),c),n)}}decorateServiceException(t,s={}){if(this.queryCompat){const r=t.Message??s.Message,n=me(t,s);r&&(n.message=r),n.Error={...n.Error,Type:n.Error.Type,Code:n.Error.Code,Message:n.Error.message??n.Error.Message??r};const i=n.$metadata.requestId;return i&&(n.RequestId=i),n}return me(t,s)}setQueryCompatError(t,s){const r=s.headers?.["x-amzn-query-error"];if(t!==void 0&&r!=null){const[n,i]=r.split(";"),o=Object.entries(t),a={Code:n,Type:i};Object.assign(t,a);for(const[d,c]of o)a[d==="message"?"Message":d]=c;delete a.__type,t.Error=a}}queryCompatOutput(t,s){t.Error&&(s.Error=t.Error),t.Type&&(s.Type=t.Type),t.Code&&(s.Code=t.Code)}findQueryCompatibleError(t,s){try{return t.getSchema(s)}catch{return t.find(n=>D.of(n).getMergedTraits().awsQueryError?.[0]===s)}}}class Be{serdeContext;setSerdeContext(t){this.serdeContext=t}}function*Ws(e,t){if(e.isUnitSchema())return;const s=e.getSchema();for(let r=0;r<s[4].length;++r){const n=s[4][r],i=s[5][r],o=new D([i,0],n);!(n in t)&&!o.isIdempotencyToken()||(yield[n,o])}}class Vs{from;to;keys;constructor(t,s){this.from=t,this.to=s,this.keys=new Set(Object.keys(this.from).filter(r=>r!=="__type"))}mark(t){this.keys.delete(t)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const t=this.keys.values().next().value,s=this.from[t];this.to.$unknown=[t,s]}}}let H;function Bs(e){H||(H=new DOMParser);const t=H.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const s=r=>{if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return r.textContent;if(r.nodeType===Node.ELEMENT_NODE){const n=r;if(n.attributes.length===0&&n.childNodes.length===0)return"";const i={},o=Array.from(n.attributes);for(const d of o)i[`${d.name}`]=d.value;const a=Array.from(n.childNodes);for(const d of a){const c=s(d);if(c!=null){const u=d.nodeName;if(a.length===1&&o.length===0&&u==="#text")return c;i[u]?Array.isArray(i[u])?i[u].push(c):i[u]=[i[u],c]:i[u]=c}else if(a.length===1&&o.length===0)return n.textContent}return i}return null};return{[t.documentElement.nodeName]:s(t.documentElement)}}class Ks extends Be{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new hs(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,s,r){const n=D.of(t),i=n.getMemberSchemas();if(n.isStructSchema()&&n.isMemberSchema()&&!!Object.values(i).find(c=>!!c.getMemberTraits().eventPayload)){const c={},u=Object.keys(i)[0];return i[u].isBlobSchema()?c[u]=s:c[u]=this.read(i[u],s),c}const a=(this.serdeContext?.utf8Encoder??G)(s),d=this.parseXml(a);return this.readSchema(t,r?d[r]:d)}readSchema(t,s){const r=D.of(t);if(r.isUnitSchema())return;const n=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(s))return this.readSchema(r,[s]);if(s==null)return s;if(typeof s=="object"){const i=!!n.sparse,o=!!n.xmlFlattened;if(r.isListSchema()){const d=r.getValueSchema(),c=[],u=d.getMergedTraits().xmlName??"member",l=o?s:(s[0]??s)[u],m=Array.isArray(l)?l:[l];for(const S of m)(S!=null||i)&&c.push(this.readSchema(d,S));return c}const a={};if(r.isMapSchema()){const d=r.getKeySchema(),c=r.getValueSchema();let u;o?u=Array.isArray(s)?s:[s]:u=Array.isArray(s.entry)?s.entry:[s.entry];const l=d.getMergedTraits().xmlName??"key",m=c.getMergedTraits().xmlName??"value";for(const S of u){const A=S[l],C=S[m];(C!=null||i)&&(a[A]=this.readSchema(c,C))}return a}if(r.isStructSchema()){const d=r.isUnionSchema();let c;d&&(c=new Vs(s,a));for(const[u,l]of r.structIterator()){const m=l.getMergedTraits(),S=m.httpPayload?m.xmlName??l.getName():l.getMemberTraits().xmlName??u;d&&c.mark(S),s[S]!=null&&(a[u]=this.readSchema(l,s[S]))}return d&&c.writeUnknown(),a}if(r.isDocumentSchema())return s;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,s)}parseXml(t){if(t.length){let s;try{s=Bs(t)}catch(o){throw o&&typeof o=="object"&&Object.defineProperty(o,"$responseBodyText",{value:t}),o}const r="#text",n=Object.keys(s)[0],i=s[n];return i[r]&&(i[n]=i[r],delete i[r]),je(i)}return{}}}class qs extends Be{settings;buffer;constructor(t){super(),this.settings=t}write(t,s,r=""){this.buffer===void 0&&(this.buffer="");const n=D.of(t);if(r&&!r.endsWith(".")&&(r+="."),n.isBlobSchema())(typeof s=="string"||s instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??Fe)(s)));else if(n.isBooleanSchema()||n.isNumericSchema()||n.isStringSchema())s!=null?(this.writeKey(r),this.writeValue(String(s))):n.isIdempotencyToken()&&(this.writeKey(r),this.writeValue(bt()));else if(n.isBigIntegerSchema())s!=null&&(this.writeKey(r),this.writeValue(String(s)));else if(n.isBigDecimalSchema())s!=null&&(this.writeKey(r),this.writeValue(s instanceof $e?s.string:String(s)));else if(n.isTimestampSchema()){if(s instanceof Date)switch(this.writeKey(r),Oe(n,this.settings)){case 5:this.writeValue(s.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(rs(s));break;case 7:this.writeValue(String(s.getTime()/1e3));break}}else if(n.isDocumentSchema())Array.isArray(s)?this.write(79,s,r):s instanceof Date?this.write(4,s,r):s instanceof Uint8Array?this.write(21,s,r):s&&typeof s=="object"?this.write(143,s,r):(this.writeKey(r),this.writeValue(String(s)));else if(n.isListSchema()){if(Array.isArray(s))if(s.length===0)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const i=n.getValueSchema(),o=this.settings.flattenLists||n.getMergedTraits().xmlFlattened;let a=1;for(const d of s){if(d==null)continue;const c=this.getKey("member",i.getMergedTraits().xmlName),u=o?`${r}${a}`:`${r}${c}.${a}`;this.write(i,d,u),++a}}}else if(n.isMapSchema()){if(s&&typeof s=="object"){const i=n.getKeySchema(),o=n.getValueSchema(),a=n.getMergedTraits().xmlFlattened;let d=1;for(const[c,u]of Object.entries(s)){if(u==null)continue;const l=this.getKey("key",i.getMergedTraits().xmlName),m=a?`${r}${d}.${l}`:`${r}entry.${d}.${l}`,S=this.getKey("value",o.getMergedTraits().xmlName),A=a?`${r}${d}.${S}`:`${r}entry.${d}.${S}`;this.write(i,c,m),this.write(o,u,A),++d}}}else if(n.isStructSchema()){if(s&&typeof s=="object"){let i=!1;for(const[o,a]of Ws(n,s)){if(s[o]==null&&!a.isIdempotencyToken())continue;const d=this.getKey(o,a.getMergedTraits().xmlName),c=`${r}${d}`;this.write(a,s[o],c),i=!0}if(!i&&n.isUnionSchema()){const{$unknown:o}=s;if(Array.isArray(o)){const[a,d]=o,c=`${r}${a}`;this.write(15,d,c)}}}}else if(!n.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${n.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const t=this.buffer;return delete this.buffer,t}getKey(t,s){const r=s??t;return this.settings.capitalizeKeys?r[0].toUpperCase()+r.slice(1):r}writeKey(t){t.endsWith(".")&&(t=t.slice(0,t.length-1)),this.buffer+=`&${fe(t)}=`}writeValue(t){this.buffer+=fe(t)}}class Gs extends At{options;serializer;deserializer;mixin=new Hs;constructor(t){super({defaultNamespace:t.defaultNamespace}),this.options=t;const s={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace,serializeEmptyLists:!0};this.serializer=new qs(s),this.deserializer=new Ks(s)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(t){this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(t,s,r){const n=await super.serializeRequest(t,s,r);n.path.endsWith("/")||(n.path+="/"),Object.assign(n.headers,{"content-type":"application/x-www-form-urlencoded"}),(Pt(t.input)==="unit"||!n.body)&&(n.body="");const i=t.name.split("#")[1]??t.name;return n.body=`Action=${i}&Version=${this.options.version}`+n.body,n.body.endsWith("&")&&(n.body=n.body.slice(-1)),n}async deserializeResponse(t,s,r){const n=this.deserializer,i=D.of(t.output),o={};if(r.statusCode>=300){const l=await ge(r.body,s);l.byteLength>0&&Object.assign(o,await n.read(15,l)),await this.handleError(t,s,r,o,this.deserializeMetadata(r))}for(const l in r.headers){const m=r.headers[l];delete r.headers[l],r.headers[l.toLowerCase()]=m}const a=t.name.split("#")[1]??t.name,d=i.isStructSchema()&&this.useNestedResult()?a+"Result":void 0,c=await ge(r.body,s);return c.byteLength>0&&Object.assign(o,await n.read(i,c,d)),{$metadata:this.deserializeMetadata(r),...o}}useNestedResult(){return!0}async handleError(t,s,r,n,i){const o=this.loadQueryErrorCode(r,n)??"Unknown",a=this.loadQueryError(n),d=this.loadQueryErrorMessage(n);a.message=d,a.Error={Type:a.Type,Code:a.Code,Message:d};const{errorSchema:c,errorMetadata:u}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,r,a,i,this.mixin.findQueryCompatibleError),l=D.of(c),m=T.for(c[1]).getErrorCtor(c)??Error,S=new m(d),A={Type:a.Error.Type,Code:a.Error.Code,Error:a.Error};for(const[C,ue]of l.structIterator()){const le=ue.getMergedTraits().xmlName??C,mt=a[le]??n[le];A[C]=this.deserializer.readSchema(ue,mt)}throw this.mixin.decorateServiceException(Object.assign(S,u,{$fault:l.getMergedTraits().error,message:d},A),n)}loadQueryErrorCode(t,s){const r=(s.Errors?.[0]?.Error??s.Errors?.Error??s.Error)?.Code;if(r!==void 0)return r;if(t.statusCode==404)return"NotFound"}loadQueryError(t){return t.Errors?.[0]?.Error??t.Errors?.Error??t.Error}loadQueryErrorMessage(t){const s=this.loadQueryError(t);return s?.message??s?.Message??t.message??t.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}const Qs=/\d{12}\.ddb/;async function Xs(e,t,s){if(s.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&R(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const i=await t.retryStrategy();typeof i.acquireInitialRetryToken=="function"?i.constructor?.name?.includes("Adaptive")?R(e,"RETRY_MODE_ADAPTIVE","F"):R(e,"RETRY_MODE_STANDARD","E"):R(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const i=e.endpointV2;switch(String(i?.url?.hostname).match(Qs)&&R(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":R(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":R(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":R(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const n=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){const i=n;i.accountId&&R(e,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(i.$source??{}))R(e,o,a)}}const we="user-agent",W="x-amz-user-agent",Ee=" ",V="/",Js=/[^!$%&'*+\-.^_`|~\w]/g,Ys=/[^!$%&'*+\-.^_`|~\w#]/g,be="-",Zs=1024;function er(e){let t="";for(const s in e){const r=e[s];if(t.length+r.length+1<=Zs){t.length?t+=","+r:t+=r;continue}break}return t}const tr=e=>(t,s)=>async r=>{const{request:n}=r;if(!Q.isInstance(n))return t(r);const{headers:i}=n,o=s?.userAgent?.map(j)||[],a=(await e.defaultUserAgentProvider()).map(j);await Xs(s,e,r);const d=s;a.push(`m/${er(Object.assign({},s.__smithy_context?.features,d.__aws_sdk_context?.features))}`);const c=e?.customUserAgent?.map(j)||[],u=await e.userAgentAppId();u&&a.push(j(["app",`${u}`]));const l=[].concat([...a,...o,...c]).join(Ee),m=[...a.filter(S=>S.startsWith("aws-sdk-")),...c].join(Ee);return e.runtime!=="browser"?(m&&(i[W]=i[W]?`${i[we]} ${m}`:m),i[we]=l):i[W]=l,t({...r,request:n})},j=e=>{const t=e[0].split(V).map(o=>o.replace(Js,be)).join(V),s=e[1]?.replace(Ys,be),r=t.indexOf(V),n=t.substring(0,r);let i=t.substring(r+1);return n==="api"&&(i=i.toLowerCase()),[n,i,s].filter(o=>o&&o.length>0).reduce((o,a,d)=>{switch(d){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},sr={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},rr=e=>({applyToStack:t=>{t.add(tr(e),sr)}}),nr=async(e,t,s)=>({operation:Tt(t).operation,region:await Ue(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function ir(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function or(e){return{schemeId:"smithy.api#noAuth"}}const ar=e=>{const t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(or());break}default:t.push(ir(e))}return t},cr=e=>Object.assign(e,{stsClientCtor:st}),dr=e=>{const t=cr(e),s=Ls(t);return Object.assign(s,{authSchemePreference:Ue(e.authSchemePreference??[])})},ur=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),lr={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"}},pr="3.968.0",mr={version:pr},gr=({serviceId:e,clientVersion:t})=>async s=>{const r=typeof window<"u"?window.navigator:void 0,n=r?.userAgent??"",i=r?.userAgentData?.platform??Ae.os(n)??"other",o=void 0,a=r?.userAgentData?.brands??[],d=a[a.length-1],c=d?.brand??Ae.browser(n)??"unknown",u=d?.version??"unknown",l=[["aws-sdk-js",t],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${c}_${u}`]];e&&l.push([`api/${e}`,t]);const m=await s?.userAgentAppId?.();return m&&l.push([`app/${m}`]),l},Ae={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux"},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari"}},Ke="required",p="type",g="fn",f="argv",v="ref",Pe=!1,B=!0,x="booleanEquals",w="stringEquals",qe="sigv4",Ge="sts",Qe="us-east-1",y="endpoint",Te="https://sts.{Region}.{PartitionResult#dnsSuffix}",_="tree",F="error",Z="getAttr",Ce={[Ke]:!1,[p]:"string"},K={[Ke]:!0,default:!1,[p]:"boolean"},Xe={[v]:"Endpoint"},Re={[g]:"isSet",[f]:[{[v]:"Region"}]},E={[v]:"Region"},_e={[g]:"aws.partition",[f]:[E],assign:"PartitionResult"},Je={[v]:"UseFIPS"},Ye={[v]:"UseDualStack"},b={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:qe,signingName:Ge,signingRegion:Qe}]},headers:{}},P={},Ie={conditions:[{[g]:w,[f]:[E,"aws-global"]}],[y]:b,[p]:y},Ze={[g]:x,[f]:[Je,!0]},et={[g]:x,[f]:[Ye,!0]},ke={[g]:Z,[f]:[{[v]:"PartitionResult"},"supportsFIPS"]},tt={[v]:"PartitionResult"},xe={[g]:x,[f]:[!0,{[g]:Z,[f]:[tt,"supportsDualStack"]}]},De=[{[g]:"isSet",[f]:[Xe]}],ve=[Ze],Ne=[et],fr={parameters:{Region:Ce,UseDualStack:K,UseFIPS:K,Endpoint:Ce,UseGlobalEndpoint:K},rules:[{conditions:[{[g]:x,[f]:[{[v]:"UseGlobalEndpoint"},B]},{[g]:"not",[f]:De},Re,_e,{[g]:x,[f]:[Je,Pe]},{[g]:x,[f]:[Ye,Pe]}],rules:[{conditions:[{[g]:w,[f]:[E,"ap-northeast-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"ap-south-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"ap-southeast-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"ap-southeast-2"]}],endpoint:b,[p]:y},Ie,{conditions:[{[g]:w,[f]:[E,"ca-central-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"eu-central-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"eu-north-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"eu-west-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"eu-west-2"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"eu-west-3"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"sa-east-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,Qe]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"us-east-2"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"us-west-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"us-west-2"]}],endpoint:b,[p]:y},{endpoint:{url:Te,properties:{authSchemes:[{name:qe,signingName:Ge,signingRegion:"{Region}"}]},headers:P},[p]:y}],[p]:_},{conditions:De,rules:[{conditions:ve,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[p]:F},{conditions:Ne,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[p]:F},{endpoint:{url:Xe,properties:P,headers:P},[p]:y}],[p]:_},{conditions:[Re],rules:[{conditions:[_e],rules:[{conditions:[Ze,et],rules:[{conditions:[{[g]:x,[f]:[B,ke]},xe],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:P,headers:P},[p]:y}],[p]:_},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[p]:F}],[p]:_},{conditions:ve,rules:[{conditions:[{[g]:x,[f]:[ke,B]}],rules:[{conditions:[{[g]:w,[f]:[{[g]:Z,[f]:[tt,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:P,headers:P},[p]:y},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:P,headers:P},[p]:y}],[p]:_},{error:"FIPS is enabled but this partition does not support FIPS",[p]:F}],[p]:_},{conditions:Ne,rules:[{conditions:[xe],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:P,headers:P},[p]:y}],[p]:_},{error:"DualStack is enabled but this partition does not support DualStack",[p]:F}],[p]:_},Ie,{endpoint:{url:Te,properties:P,headers:P},[p]:y}],[p]:_}],[p]:_},{error:"Invalid Configuration: Missing Region",[p]:F}]},hr=fr,Sr=new Ct({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),yr=(e,t={})=>Sr.get(e,()=>Rt(hr,{endpointParams:e,logger:t.logger}));Me.aws=We;const wr=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??q,base64Encoder:e?.base64Encoder??Fe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??yr,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ar,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Fs},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new kt}],logger:e?.logger??new It,protocol:e?.protocol??Gs,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??_t,utf8Decoder:e?.utf8Decoder??ns,utf8Encoder:e?.utf8Encoder??G}),Er=e=>{const t=xt(e),s=()=>t().then(Ft),r=wr(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??$t,credentialDefaultProvider:e?.credentialDefaultProvider??(n=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??gr({serviceId:r.serviceId,clientVersion:mr.version}),maxAttempts:e?.maxAttempts??Ot,region:e?.region??Nt("Region is missing"),requestHandler:os.create(e?.requestHandler??s),retryMode:e?.retryMode??(async()=>(await s()).retryMode||vt),sha256:e?.sha256??Dt,streamCollector:e?.streamCollector??is,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ut)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Mt))}},br=e=>({setRegion(t){e.region=t},region(){return e.region}}),Ar=e=>({region:e.region()}),Pr=e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(n){const i=t.findIndex(o=>o.schemeId===n.schemeId);i===-1?t.push(n):t.splice(i,1,n)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(n){s=n},httpAuthSchemeProvider(){return s},setCredentials(n){r=n},credentials(){return r}}},Tr=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Cr=(e,t)=>{const s=Object.assign(br(e),Lt(e),zt(e),Pr(e));return t.forEach(r=>r.configure(s)),Object.assign(e,Ar(s),jt(s),Ht(s),Tr(s))};class st extends Wt{config;constructor(...[t]){const s=Er(t||{});super(s),this.initConfig=s;const r=ur(s),n=Is(r),i=Vt(n),o=Bt(i),a=o,d=Kt(a),c=dr(d),u=Cr(c,t?.extensions||[]);this.config=u,this.middlewareStack.use(qt(this.config)),this.middlewareStack.use(rr(this.config)),this.middlewareStack.use(Gt(this.config)),this.middlewareStack.use(Qt(this.config)),this.middlewareStack.use(ws(this.config)),this.middlewareStack.use(As(this.config)),this.middlewareStack.use(Cs(this.config)),this.middlewareStack.use(Xt(this.config,{httpAuthSchemeParametersProvider:nr,identityProviderConfigProvider:async l=>new Yt({"aws.auth#sigv4":l.credentials})})),this.middlewareStack.use(Jt(this.config))}destroy(){super.destroy()}}class I extends Zt{constructor(t){super(t),Object.setPrototypeOf(this,I.prototype)}}class ee extends I{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,ee.prototype)}}class te extends I{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,te.prototype)}}class se extends I{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,se.prototype)}}class re extends I{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,re.prototype)}}class ne extends I{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,ne.prototype)}}class ie extends I{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,ie.prototype)}}class oe extends I{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,oe.prototype)}}const Rr="Arn",_r="AccessKeyId",Ir="AssumeRole",kr="AssumedRoleId",xr="AssumeRoleRequest",Dr="AssumeRoleResponse",ae="AssumedRoleUser",vr="AssumeRoleWithWebIdentity",Nr="AssumeRoleWithWebIdentityRequest",Or="AssumeRoleWithWebIdentityResponse",$r="Audience",ce="Credentials",Mr="ContextAssertion",rt="DurationSeconds",Ur="Expiration",Fr="ExternalId",Lr="ExpiredTokenException",zr="IDPCommunicationErrorException",jr="IDPRejectedClaimException",Hr="InvalidIdentityTokenException",Wr="Key",Vr="MalformedPolicyDocumentException",nt="Policy",it="PolicyArns",Br="ProviderArn",Kr="ProvidedContexts",qr="ProvidedContextsListType",Gr="ProvidedContext",Qr="PolicyDescriptorType",Xr="ProviderId",ot="PackedPolicySize",Jr="PackedPolicyTooLargeException",Yr="Provider",at="RoleArn",Zr="RegionDisabledException",ct="RoleSessionName",en="SecretAccessKey",tn="SubjectFromWebIdentityToken",de="SourceIdentity",sn="SerialNumber",rn="SessionToken",nn="Tags",on="TokenCode",an="TransitiveTagKeys",cn="Tag",dn="Value",un="WebIdentityToken",ln="arn",pn="accessKeySecretType",N="awsQueryError",O="client",mn="clientTokenType",$="error",M="httpError",U="message",gn="policyDescriptorListType",dt="smithy.ts.sdk.synthetic.com.amazonaws.sts",fn="tagListType",h="com.amazonaws.sts";var hn=[0,h,pn,8,0],Sn=[0,h,mn,8,0],ut=[3,h,ae,0,[kr,Rr],[0,0]],yn=[3,h,xr,0,[at,ct,it,nt,rt,nn,an,Fr,sn,on,de,Kr],[0,0,()=>pt,0,1,()=>On,64,0,0,0,0,()=>Nn]],wn=[3,h,Dr,0,[ce,ae,ot,de],[[()=>lt,0],()=>ut,1,0]],En=[3,h,Nr,0,[at,ct,un,Xr,it,nt,rt],[0,0,[()=>Sn,0],0,()=>pt,0,1]],bn=[3,h,Or,0,[ce,tn,ae,ot,Yr,$r,de],[[()=>lt,0],0,()=>ut,1,0,0,0]],lt=[3,h,ce,0,[_r,en,rn,Ur],[0,[()=>hn,0],0,4]],An=[-3,h,Lr,{[N]:["ExpiredTokenException",400],[$]:O,[M]:400},[U],[0]];T.for(h).registerError(An,ee);var Pn=[-3,h,zr,{[N]:["IDPCommunicationError",400],[$]:O,[M]:400},[U],[0]];T.for(h).registerError(Pn,oe);var Tn=[-3,h,jr,{[N]:["IDPRejectedClaim",403],[$]:O,[M]:403},[U],[0]];T.for(h).registerError(Tn,ne);var Cn=[-3,h,Hr,{[N]:["InvalidIdentityToken",400],[$]:O,[M]:400},[U],[0]];T.for(h).registerError(Cn,ie);var Rn=[-3,h,Vr,{[N]:["MalformedPolicyDocument",400],[$]:O,[M]:400},[U],[0]];T.for(h).registerError(Rn,te);var _n=[-3,h,Jr,{[N]:["PackedPolicyTooLarge",400],[$]:O,[M]:400},[U],[0]];T.for(h).registerError(_n,se);var In=[3,h,Qr,0,[ln],[0]],kn=[3,h,Gr,0,[Br,Mr],[0,0]],xn=[-3,h,Zr,{[N]:["RegionDisabledException",403],[$]:O,[M]:403},[U],[0]];T.for(h).registerError(xn,re);var Dn=[3,h,cn,0,[Wr,dn],[0,0]],vn=[-3,dt,"STSServiceException",0,[],[]];T.for(dt).registerError(vn,I);var pt=[1,h,gn,0,()=>In],Nn=[1,h,qr,0,()=>kn],On=[1,h,fn,0,()=>Dn],$n=[9,h,Ir,0,()=>yn,()=>wn],Ln=[9,h,vr,0,()=>En,()=>bn];class Mn extends es.classBuilder().ep(lr).m(function(t,s,r,n){return[ts(r,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc($n).build(){}const zn=Object.freeze(Object.defineProperty({__proto__:null,AssumeRoleCommand:Mn,STSClient:st},Symbol.toStringTag,{value:"Module"}));export{Ln as A,lt as C,An as E,Pn as I,Rn as M,_n as P,xn as R,st as S,Dn as T,I as a,Mn as b,lr as c,ut as d,yn as e,wn as f,En as g,bn as h,Tn as i,Cn as j,In as k,kn as l,vn as m,$n as n,ee as o,te as p,se as q,re as r,$s as s,ne as t,ie as u,oe as v,zn as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o}from"./index-
|
|
1
|
+
import{r as o}from"./index-7hDd_gG8.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./preload-helper-BlTxHScW.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-B7n8ZNar.js";export{o as default};
|