@agentlang/lstudio 0.4.3 → 0.4.6
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/{_commonjs-dynamic-modules-B7n8ZNar.js → _commonjs-dynamic-modules-DkOKMH7F.js} +1 -1
- package/assets/{fs-ChhVtk1t.js → fs-Dc1AXE1h.js} +1 -1
- package/assets/index-B5cYUcHg.js +1 -0
- package/assets/{index-BHDiPh0o.js → index-BFv-M3PX.js} +1 -1
- package/assets/index-BXMy9UIl.js +1 -0
- package/assets/index-BitrXVkV.js +1 -0
- package/assets/{index-CyvIs3-e.js → index-BsMGh1HZ.js} +1 -1
- package/assets/{index-D4z_hbl0-DmHSo54Y.js → index-D4z_hbl0-Bi2lyYpC.js} +1 -1
- package/assets/index-D5i6vPoY.js +1 -0
- package/assets/{index-LKjSxjRA-C7aA0iuy.js → index-DTNuphFO-Bf5Ad1xs.js} +8 -8
- package/assets/index-DYeSZrx6.css +1 -0
- package/assets/index-DYmn2gQ6-CnjFa625.js +1 -0
- package/assets/{index-C2HY8erm.js → index-DbVrN0uV.js} +1 -1
- package/assets/{index-COgCIiI2.js → index-IWX-nwYi.js} +1335 -858
- package/assets/index.browser-D5Xow_MQ.js +6 -0
- package/assets/{loadCognitoIdentity-Bzy5QwC3.js → loadCognitoIdentity-DytZoWyS.js} +1 -1
- package/assets/loadSts-C6zXLlvL.js +1 -0
- package/assets/{normalizeProvider-BrOPyH3l.js → normalizeProvider-CtDY37Q6.js} +1 -1
- package/assets/{replService-I2k8pNsF.js → replService-jI2rdTkj.js} +1 -1
- package/assets/resolveDefaultsModeConfig-Bx7XDpng.js +15 -0
- package/assets/{util-DFW6B0xP.js → util-BYzfkJTL.js} +2 -2
- package/assets/{winston-1qzyIKCb-DXWSfIDX.js → winston-1qzyIKCb-DGNx4OWn.js} +1 -1
- package/assets/{winston-C6UE2bNp.js → winston-BpiA2JJl.js} +1 -1
- package/assets/{winston-CtxF18qc-fKA71K9u.js → winston-CtxF18qc-itw4XSal.js} +1 -1
- package/assets/{winston-6q4HtYRM.js → winston-D4mJsFB6.js} +2 -2
- package/index.html +3 -3
- package/package.json +1 -1
- package/assets/index-3_2F9LQx.js +0 -1
- package/assets/index-BVSKv1jw-BvgeZRdK.js +0 -1
- package/assets/index-CuvfCO6A.js +0 -1
- package/assets/index-DUt_LuNz.js +0 -1
- package/assets/index-OdGGJiBD.css +0 -1
- package/assets/index.browser-D_cb-Dkf.js +0 -6
- package/assets/loadSts-DRBqs5CO.js +0 -1
- package/assets/resolveDefaultsModeConfig-_DjURcTg.js +0 -15
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/loadCognitoIdentity-DytZoWyS.js","assets/normalizeProvider-CtDY37Q6.js","assets/resolveDefaultsModeConfig-Bx7XDpng.js","assets/preload-helper-BlTxHScW.js","assets/index-IWX-nwYi.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-DkOKMH7F.js","assets/index-DYeSZrx6.css","assets/loadSts-C6zXLlvL.js","assets/index-B5cYUcHg.js","assets/index-D5i6vPoY.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as I}from"./preload-helper-BlTxHScW.js";import{t as O,a as N,b as x,s as D,H as K,p as H,F as j,n as q}from"./normalizeProvider-CtDY37Q6.js";class A extends Error{name="ProviderError";tryNextLink;constructor(t,o=!0){let n,r=!0;typeof o=="boolean"?(n=void 0,r=o):o!=null&&typeof o=="object"&&(n=o.logger,r=o.tryNextLink??!0),super(t),this.tryNextLink=r,Object.setPrototypeOf(this,A.prototype),n?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${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 n=e[o];return typeof n=="string"?t.push([o,n]):t.push(n().then(r=>[o,r])),t},[])).then(t=>t.reduce((o,[n,r])=>(o[n]=r,o),{}))}function k(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:o,CognitoIdentityClient:n}=await I(async()=>{const{GetCredentialsForIdentityCommand:c,CognitoIdentityClient:f}=await import("./loadCognitoIdentity-DytZoWyS.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])),r=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 n(Object.assign({},e.clientConfig??{},{region:r("region"),profile:r("profile"),userAgentAppId:r("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 n=o.get(t);return new Promise(r=>{n.onerror=()=>r(null),n.onsuccess=()=>r(n.result?n.result.value:null)})}).catch(()=>null)}removeItem(t){return this.withObjectStore("readwrite",o=>{const n=o.delete(t);return new Promise((r,s)=>{n.onerror=()=>s(n.error),n.onsuccess=()=>r()})})}setItem(t,o){return this.withObjectStore("readwrite",n=>{const r=n.put({id:t,value:o});return new Promise((s,i)=>{r.onerror=()=>i(r.error),r.onsuccess=()=>s()})})}getDb(){const t=self.indexedDB.open(this.dbName,1);return new Promise((o,n)=>{t.onsuccess=()=>{o(t.result)},t.onerror=()=>{n(t.error)},t.onblocked=()=>{n(new Error("Unable to access DB"))},t.onupgradeneeded=()=>{const r=t.result;r.onerror=()=>{n(new Error("Failed to create object store"))},r.createObjectStore(b,{keyPath:"id"})}})}withObjectStore(t,o){return this.getDb().then(n=>{const r=n.transaction(b,t);return r.oncomplete=()=>n.close(),new Promise((s,i)=>{r.onerror=()=>i(r.error),s(o(r.objectStore(b)))}).catch(s=>{throw n.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:n,customRoleArn:r,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:h}=await I(async()=>{const{GetIdCommand:g,CognitoIdentityClient:P}=await import("./loadCognitoIdentity-DytZoWyS.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])),y=g=>n?.[g]??c?.[g]??w?.callerClientConfig?.[g],C=o??new h(Object.assign({},n??{},{region:y("region"),profile:y("profile"),userAgentAppId:y("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:r,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("."),n=r=>{const s=parseInt(r,10);return 0<=s&&s<=255};if(o[0]==="127"&&n(o[1])&&n(o[2])&&n(o[3])&&o.length===4)return}throw new l(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
3
|
+
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
4
|
+
- ECS container host 169.254.170.2
|
|
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 r=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${r}`)}let t=!1;const o=async()=>{if(t)throw new Error(R);return t=!0,await D(e)},n=r=>{if(typeof r.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 r.stream()};return Object.assign(e,{transformToByteArray:o,transformToString:async r=>{const s=await o();if(r==="base64")return O(s);if(r==="hex")return N(s);if(r===void 0||r==="utf8"||r==="utf-8")return x(s);if(typeof TextDecoder=="function")return new TextDecoder(r).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 n(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,n])=>(t[o]=n,t),{}),fragment:e.hash})}async function ee(e,t){const n=await X(e.body).transformToString();if(e.statusCode===200){const r=JSON.parse(n);if(typeof r.AccessKeyId!="string"||typeof r.SecretAccessKey!="string"||typeof r.Token!="string"||typeof r.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:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.Token,expiration:H(r.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let r={};try{r=JSON.parse(n)}catch{}throw Object.assign(new l(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:r.Code,Message:r.Message})}throw new l(`Server responded with status: ${e.statusCode}`,{logger:t})}const te=(e,t,o)=>async()=>{for(let n=0;n<t;++n)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 n=new URL(t);Q(n,e.logger);const r=new j;return te(async()=>{const s=Z(n);e.authorizationToken&&(s.headers.Authorization=e.authorizationToken);const i=await r.handle(s);return ee(i.response)},e.maxRetries??3,e.timeout??1e3)},re="us-east-1",le=(e,t,o)=>{let n;return async(r={})=>{const{callerClientConfig:s}=r,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-C6zXLlvL.js");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,20]));if(!n){const w=typeof t=="function"?t():void 0,m=[e.masterCredentials,e.clientConfig?.credentials,void s?.credentials,s?.credentialDefaultProvider?.(),w];let h="STS client default credentials";if(m[0])h="options.masterCredentials";else if(m[1])h="options.clientConfig.credentials";else{if(m[2])throw h="caller client's credentials",new Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");m[3]?h="caller client's credentialDefaultProvider":m[4]&&(h="AWS SDK default credentials")}const y=[e.clientConfig?.region,s?.region,await o?.({profile:i}),re];let C="default partition's default region";y[0]?C="options.clientConfig.region":y[1]?C="caller client's region":y[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(y))()}, ${h}, ${g}.`),n=new f({userAgentAppId:s?.userAgentAppId,...e.clientConfig,credentials:S(m),logger:d,profile:i,region:S(y),requestHandler:S(p)})}if(e.clientPlugins)for(const w of e.clientPlugins)n.middlewareStack.use(w);const{Credentials:a}=await n.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},ne=e=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:o,roleSessionName:n,webIdentityToken:r,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-D5i6vPoY.js");return{getDefaultRoleAssumerWithWebIdentity:a}},__vite__mapDeps([21,20,1,2,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:n??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:r,ProviderId:s,PolicyArns:i,Policy:d,DurationSeconds:u})},de=e=>ne({...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 N,c as qe,t as _e,d as xe,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 rt,T as E,f as oe,N as k,h as R,j as nt,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 yt,x as St,y as Et,z as wt,A as Ct,B as It,F as bt,G as At,H as _t,I as xt,a as Pt,J as Rt,K as kt,M as vt,O as Ot,P as Dt,Q as Tt,U as Mt,V as Nt,W as Ut,X as $t,C as Oe,g as De}from"./resolveDefaultsModeConfig-_DjURcTg.js";import"./preload-helper-BlTxHScW.js";import"./index-COgCIiI2.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:r}=s,{handlerProtocol:n=""}=t.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 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 r=await t(s),{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??e.inputFilterSensitiveLog,l=u??e.outputFilterSensitiveLog,{$metadata:p,...f}=r.output;return o?.info?.({clientName:n,commandName:i,input:d(s.input),output:l(f),metadata:p}),r}catch(r){const{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:c}=a,u=c??e.inputFilterSensitiveLog;throw o?.error?.({clientName:n,commandName:i,input:u(s.input),error:r,metadata:r.$metadata}),r}},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=N(t.userAgentAppId??Jt),{customUserAgent:s}=t;return Object.assign(t,{customUserAgent:typeof s=="string"?[[s]]:s,userAgentAppId:async()=>{const r=await e();if(!Wt(r)){const n=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?console:t.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 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,r,n,i,o,...a]=e;if(s!=="arn"||r===""||n===""||a.join(ae)==="")return null;const c=a.map(u=>u.split(Qt)).flat();return{partition:r,service:n,region:i,accountId:o,resourceId:c}},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:"AWS European Sovereign Cloud (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 r of e){const{regions:n,outputs:i}=r;for(const[o,a]of Object.entries(n))if(o===t)return{...i,...a}}for(const r of e){const{regionRegex:n,outputs:i}=r;if(new RegExp(n).test(t))return{...i}}const s=e.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}},Me={isVirtualHostableS3Bucket:Te,parseArn:Xt,partition:ts};Pe.aws=Me;function ss(t,e,s){return t.$source||(t.$source={}),t.$source[e]=s,t}function b(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,Ne=t=>new Date(Date.now()+t),rs=(t,e)=>Math.abs(Ne(e).getTime()-t)>=3e5,ue=(t,e)=>{const s=Date.parse(t);return rs(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},ns=async t=>{const e=U("context",t.context),s=U("config",t.config),r=e.endpointV2?.properties?.authSchemes?.[0],i=await U("signer",s.signer)(r),o=t?.signingRegion,a=t?.signingRegionSet,c=t?.signingName;return{config:s,signer:i,signingRegion:o,signingRegionSet:a,signingName:c}};class is{async sign(e,s,r){if(!G.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await ns(r),{config:i,signer:o}=n;let{signingRegion:a,signingName:c}=n;const u=r.context;if(u?.authSchemes?.length??!1){const[l,p]=u.authSchemes;l?.name==="sigv4a"&&p?.name==="sigv4"&&(a=p?.signingRegion??a,c=p?.signingName??c)}return await o.sign(e,{signingDate:Ne(i.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(e){return s=>{const r=s.ServerTime??ce(s.$response);if(r){const n=U("config",e.config),i=n.systemClockOffset;n.systemClockOffset=ue(r,n.systemClockOffset),n.systemClockOffset!==i&&s.$metadata&&(s.$metadata.clockSkewCorrected=!0)}throw s}}successHandler(e,s){const r=ce(e);if(r){const n=U("config",s.config);n.systemClockOffset=ue(r,n.systemClockOffset)}}}const os=t=>{let e=t.credentials,s=!!t.credentials,r;Object.defineProperty(t,"credentials",{set(u){u&&u!==e&&u!==r&&(s=!0),e=u;const d=as(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),l=cs(t,d);if(s&&!l.attributed){const p=typeof e=="object"&&e!==null;r=async f=>{const v=await l(f);return p&&(!v.$source||Object.keys(v.$source).length===0)?ss(v,"CREDENTIALS_CODE","e"):v},r.memoized=l.memoized,r.configBound=l.configBound,r.attributed=!0}else r=l},get(){return r},enumerable:!0,configurable:!0}),t.credentials=e;const{signingEscapePath:n=!0,systemClockOffset:i=t.systemClockOffset||0,sha256:o}=t;let a;return t.signer?a=N(t.signer):t.regionInfoProvider?a=()=>N(t.region)().then(async u=>[await t.regionInfoProvider(u,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},u]).then(([u,d])=>{const{signingRegion:l,signingService:p}=u;t.signingRegion=t.signingRegion||l||d,t.signingName=t.signingName||p||t.serviceId;const f={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:n},h=t.signerConstructor||ie;return new h(f)}):a=async u=>{u=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await N(t.region)(),properties:{}},u);const d=u.signingRegion,l=u.signingName;t.signingRegion=t.signingRegion||d,t.signingName=t.signingName||l||t.serviceId;const p={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:n},f=t.signerConstructor||ie;return new f(p)},Object.assign(t,{systemClockOffset:i,signingEscapePath:n,signer:a})};function as(t,{credentials:e,credentialDefaultProvider:s}){let r;return e?e?.memoized?r=e:r=tt(e,rt,st):s?r=N(s(Object.assign({},t,{parentClientConfig:t}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function cs(t,e){if(e.configBound)return e;const s=async r=>e({...r,callerClientConfig:t});return s.memoized=e.memoized,s.configBound=!0,s}class us{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,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":e)}else if(!s.isUnitSchema()&&Object.values(r).find(o=>{const{httpQuery:a,httpQueryParams:c,httpHeader:u,httpLabel:d,httpPrefixHeaders:l}=o.getMergedTraits();return!a&&!c&&!u&&!d&&l===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,s,r,n,i,o){let a=s,c=e;e.includes("#")&&([a,c]=e.split("#"));const u={$metadata:i,$fault:r.statusCode<500?"client":"server"},d=E.for(a);try{return{errorSchema:o?.(d,c)??d.getSchema(e),errorMetadata:u}}catch{n.message=n.message??n.Message??"UnknownError";const p=E.for("smithy.ts.sdk.synthetic."+a),f=p.getBaseException();if(f){const h=p.getErrorCtor(f)??Error;throw this.decorateServiceException(Object.assign(new h({name:c}),u),n)}throw this.decorateServiceException(Object.assign(new Error(c),u),n)}}decorateServiceException(e,s={}){if(this.queryCompat){const r=e.Message??s.Message,n=oe(e,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 oe(e,s)}setQueryCompatError(e,s){const r=s.headers?.["x-amzn-query-error"];if(e!==void 0&&r!=null){const[n,i]=r.split(";"),o=Object.entries(e),a={Code:n,Type:i};Object.assign(e,a);for(const[c,u]of o)a[c==="message"?"Message":c]=u;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(n=>k.of(n).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 r=0;r<s[4].length;++r){const n=s[4][r],i=s[5][r],o=new k([i,0],n);!(n in e)&&!o.isIdempotencyToken()||(yield[n,o])}}function*ps(t,e,s){if(t.isUnitSchema())return;const r=t.getSchema();let n=Object.keys(e).filter(i=>i!=="__type").length;for(let i=0;i<r[4].length&&n!==0;++i){const o=r[4][i],a=r[5][i],c=new k([a,0],o);let u=o;s&&(u=c.getMergedTraits()[s]??o),u in e&&(yield[o,c],n-=1)}}class ls{from;to;keys;constructor(e,s){this.from=e,this.to=s,this.keys=new Set(Object.keys(this.from).filter(r=>r!=="__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 r=s.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||r!==String(e)))return r.includes(".")?new R(r,"bigDecimal"):BigInt(r)}return e}const fs=(t,e)=>nt(t,e).then(s=>(e?.utf8Encoder??_e)(s)),ms=(t,e)=>fs(t,e).then(s=>{if(s.length)try{return JSON.parse(s)}catch(r){throw r?.name==="SyntaxError"&&Object.defineProperty(r,"$responseBodyText",{value:s}),r}return{}}),hs=(t,e)=>{const s=(i,o)=>Object.keys(i).find(a=>a.toLowerCase()===o.toLowerCase()),r=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},n=s(t.headers,"x-amzn-errortype");if(n!==void 0)return r(t.headers[n]);if(e&&typeof e=="object"){const i=s(e,"code");if(i&&e[i]!==void 0)return r(e[i]);if(e.__type!==void 0)return r(e.__type)}};class ys 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 r=s!==null&&typeof s=="object",n=k.of(e);if(r){if(n.isStructSchema()){const o=s,a=n.isUnionSchema(),c={};let u;const{jsonName:d}=this.settings;d&&(u={});let l;a&&(l=new ls(o,c));for(const[p,f]of ps(n,o,d?"jsonName":!1)){let h=p;d&&(h=f.getMergedTraits().jsonName??h,u[h]=p),a&&l.mark(h),o[h]!=null&&(c[p]=this._read(f,o[h]))}if(a)l.writeUnknown();else if(typeof o.__type=="string")for(const[p,f]of Object.entries(o)){const h=d?u[p]??p:p;h in c||(c[h]=f)}return c}if(Array.isArray(s)&&n.isListSchema()){const o=n.getValueSchema(),a=[],c=!!n.getMergedTraits().sparse;for(const u of s)(c||u!=null)&&a.push(this._read(o,u));return a}if(n.isMapSchema()){const o=n.getValueSchema(),a={},c=!!n.getMergedTraits().sparse;for(const[u,d]of Object.entries(s))(c||d!=null)&&(a[u]=this._read(o,d));return a}}if(n.isBlobSchema()&&typeof s=="string")return xe(s);const i=n.getMergedTraits().mediaType;if(n.isStringSchema()&&typeof s=="string"&&i)return i==="application/json"||i.endsWith("+json")?Re.from(s):s;if(n.isTimestampSchema()&&s!=null)switch(ke(n,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(n.isBigIntegerSchema()&&(typeof s=="number"||typeof s=="string"))return BigInt(s);if(n.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(n.isNumericSchema()&&typeof s=="string"){switch(s){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return s}if(n.isDocumentSchema())if(r){const o=Array.isArray(s)?[]:{};for(const[a,c]of Object.entries(s))c instanceof R?o[a]=c:o[a]=this._read(n,c);return o}else return structuredClone(s);return s}}const de="Ν";class Ss{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 r=`${de+"nv"+this.counter++}_`+s.string;return this.values.set(`"${r}"`,s.string),r}if(typeof s=="bigint"){const r=s.toString(),n=`${de+"b"+this.counter++}_`+r;return this.values.set(`"${n}"`,r),n}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,r]of this.values)e=e.replace(s,r);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 r=new Ss;return r.replaceInJson(JSON.stringify(this.buffer,r.createReplacer(),0))}return this.buffer}_write(e,s,r){const n=s!==null&&typeof s=="object",i=k.of(e);if(n){if(i.isStructSchema()){const o=s,a={},{jsonName:c}=this.settings;let u;c&&(u={});for(const[d,l]of ds(i,o)){const p=this._write(l,o[d],i);if(p!==void 0){let f=d;c&&(f=l.getMergedTraits().jsonName??d,u[d]=f),a[f]=p}}if(i.isUnionSchema()&&Object.keys(a).length===0){const{$unknown:d}=o;if(Array.isArray(d)){const[l,p]=d;a[l]=this._write(15,p)}}else if(typeof o.__type=="string")for(const[d,l]of Object.entries(o)){const p=c?u[d]??d:d;p in a||(a[p]=this._write(15,l))}return a}if(Array.isArray(s)&&i.isListSchema()){const o=i.getValueSchema(),a=[],c=!!i.getMergedTraits().sparse;for(const u of s)(c||u!=null)&&a.push(this._write(o,u));return a}if(i.isMapSchema()){const o=i.getValueSchema(),a={},c=!!i.getMergedTraits().sparse;for(const[u,d]of Object.entries(s))(c||d!=null)&&(a[u]=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&&r?.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(n){const o=Array.isArray(s)?[]:{};for(const[a,c]of Object.entries(s))c instanceof R?(this.useReplacer=!0,o[a]=c):o[a]=this._write(i,c);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 ys(this.settings);return e.setSerdeContext(this.serdeContext),e}}class Cs extends ot{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n}){super({defaultNamespace:e}),this.serviceTarget=s,this.codec=n??new ws({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!r,this.mixin=new us(this.awsQueryCompatible)}async serializeRequest(e,s,r){const n=await super.serializeRequest(e,s,r);return n.path.endsWith("/")||(n.path+="/"),Object.assign(n.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(n.headers["x-amzn-query-mode"]="true"),(at(e.input)==="unit"||!n.body)&&(n.body="{}"),n}getPayloadCodec(){return this.codec}async handleError(e,s,r,n,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(n,r);const o=hs(r,n)??"Unknown",{errorSchema:a,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,r,n,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),u=k.of(a),d=n.message??n.Message??"Unknown",l=E.for(a[1]).getErrorCtor(a)??Error,p=new l(d),f={};for(const[h,v]of u.structIterator())n[h]!=null&&(f[h]=this.codec.createDeserializer().readObject(v,n[h]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(n,f),this.mixin.decorateServiceException(Object.assign(p,c,{$fault:u.getMergedTraits().error,message:d},f),n)}}class Is extends Cs{constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n}){super({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n})}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"&&b(t,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const i=await e.retryStrategy();typeof i.acquireInitialRetryToken=="function"?i.constructor?.name?.includes("Adaptive")?b(t,"RETRY_MODE_ADAPTIVE","F"):b(t,"RETRY_MODE_STANDARD","E"):b(t,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const i=t.endpointV2;switch(String(i?.url?.hostname).match(bs)&&b(t,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":b(t,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":b(t,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":b(t,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const n=t.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){const i=n;i.accountId&&b(t,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(i.$source??{}))b(t,o,a)}}const pe="user-agent",j="x-amz-user-agent",le=" ",L="/",_s=/[^!$%&'*+\-.^_`|~\w]/g,xs=/[^!$%&'*+\-.^_`|~\w#]/g,ge="-",Ps=1024;function Rs(t){let e="";for(const s in t){const r=t[s];if(e.length+r.length+1<=Ps){e.length?e+=","+r:e+=r;continue}break}return e}const ks=t=>(e,s)=>async r=>{const{request:n}=r;if(!G.isInstance(n))return e(r);const{headers:i}=n,o=s?.userAgent?.map(F)||[],a=(await t.defaultUserAgentProvider()).map(F);await As(s,t,r);const c=s;a.push(`m/${Rs(Object.assign({},s.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=t?.customUserAgent?.map(F)||[],d=await t.userAgentAppId();d&&a.push(F(["app",`${d}`]));const l=[].concat([...a,...o,...u]).join(le),p=[...a.filter(f=>f.startsWith("aws-sdk-")),...u].join(le);return t.runtime!=="browser"?(p&&(i[j]=i[j]?`${i[pe]} ${p}`:p),i[pe]=l):i[j]=l,e({...r,request:n})},F=t=>{const e=t[0].split(L).map(o=>o.replace(_s,ge)).join(L),s=t[1]?.replace(xs,ge),r=e.indexOf(L),n=e.substring(0,r);let i=e.substring(r+1);return n==="api"&&(i=i.toLowerCase()),[n,i,s].filter(o=>o&&o.length>0).reduce((o,a,c)=>{switch(c){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 Ms=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},Ns=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.971.0",Fs={version:$s},zs=({serviceId:t,clientVersion:e})=>async s=>{const r=typeof window<"u"?window.navigator:void 0,n=r?.userAgent??"",i=r?.userAgentData?.platform??fe.os(n)??"other",o=void 0,a=r?.userAgentData?.brands??[],c=a[a.length-1],u=c?.brand??fe.browser(n)??"unknown",d=c?.version??"unknown",l=[["aws-sdk-js",e],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${u}_${d}`]];t&&l.push([`api/${t}`,e]);const p=await s?.userAgentAppId?.();return p&&l.push([`app/${p}`]),l},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",y="fn",S="argv",D="ref",me=!0,he="isSet",$="booleanEquals",O="error",A="endpoint",P="tree",q="PartitionResult",V="getAttr",T="stringEquals",ye={[$e]:!1,type:"string"},Se={[$e]:!0,default:!1,type:"boolean"},Ee={[D]:"Endpoint"},Fe={[y]:$,[S]:[{[D]:"UseFIPS"},!0]},ze={[y]:$,[S]:[{[D]:"UseDualStack"},!0]},m={},M={[D]:"Region"},we={[y]:V,[S]:[{[D]:q},"supportsFIPS"]},je={[D]:q},Ce={[y]:$,[S]:[!0,{[y]:V,[S]:[je,"supportsDualStack"]}]},Ie=[Fe],be=[ze],Ae=[M],js={parameters:{Region:ye,UseDualStack:Se,UseFIPS:Se,Endpoint:ye},rules:[{conditions:[{[y]: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:m,headers:m},type:A}],type:P},{conditions:[{[y]:he,[S]:Ae}],rules:[{conditions:[{[y]:"aws.partition",[S]:Ae,assign:q}],rules:[{conditions:[Fe,ze],rules:[{conditions:[{[y]:$,[S]:[me,we]},Ce],rules:[{conditions:[{[y]:T,[S]:[M,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:m,headers:m},type:A},{conditions:[{[y]:T,[S]:[M,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:m,headers:m},type:A},{conditions:[{[y]:T,[S]:[M,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:m,headers:m},type:A},{conditions:[{[y]:T,[S]:[M,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:m,headers:m},type:A},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:A}],type:P},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:O}],type:P},{conditions:Ie,rules:[{conditions:[{[y]:$,[S]:[we,me]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:A}],type:P},{error:"FIPS is enabled but this partition does not support FIPS",type:O}],type:P},{conditions:be,rules:[{conditions:[Ce],rules:[{conditions:[{[y]:T,[S]:["aws",{[y]:V,[S]:[je,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:m,headers:m},type:A},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:A}],type:P},{error:"DualStack is enabled but this partition does not support DualStack",type:O}],type:P},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:A}],type:P}],type:P},{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=Me;const Bs=t=>({apiVersion:"2014-06-30",base64Decoder:t?.base64Decoder??xe,base64Encoder:t?.base64Encoder??H,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??Gs,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??Ms,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??_e}),qs=t=>{const e=ft(t),s=()=>e().then(It),r=Bs(t);return{...r,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??Et,credentialDefaultProvider:t?.credentialDefaultProvider??(n=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:t?.defaultUserAgentProvider??zs({serviceId:r.serviceId,clientVersion:Fs.version}),maxAttempts:t?.maxAttempts??St,region:t?.region??yt("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,r=t.credentials;return{setHttpAuthScheme(n){const i=e.findIndex(o=>o.schemeId===n.schemeId);i===-1?e.push(n):e.splice(i,1,n)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(n){s=n},httpAuthSchemeProvider(){return s},setCredentials(n){r=n},credentials(){return r}}},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(r=>r.configure(s)),Object.assign(t,Js(s),_t(s),xt(s),Ks(s))};class dn extends Pt{config;constructor(...[e]){const s=qs(e||{});super(s),this.initConfig=s;const r=Us(s),n=Kt(r),i=Rt(n),o=kt(i),a=o,c=vt(a),u=Ns(c),d=Qs(u,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(Mt(this.config,{httpAuthSchemeParametersProvider:Ds,identityProviderConfigProvider:async l=>new Ut({"aws.auth#sigv4":l.credentials})})),this.middlewareStack.use(Nt(this.config))}destroy(){super.destroy()}}class w extends $t{constructor(e){super(e),Object.setPrototypeOf(this,w.prototype)}}class J extends w{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,J.prototype)}}class W extends w{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,W.prototype)}}class K extends w{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,K.prototype)}}class Q extends w{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,Q.prototype)}}class X extends w{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,X.prototype)}}class Y extends w{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,Y.prototype)}}class Z extends w{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Z.prototype)}}class ee extends w{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,ee.prototype)}}class te extends w{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,te.prototype)}}class se extends w{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,se.prototype)}}class re extends w{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,re.prototype)}}const Xs="AccountId",Ys="AccessKeyId",Le="Credentials",Zs="ConcurrentModificationException",er="CustomRoleArn",tr="DeveloperUserAlreadyRegisteredException",sr="Expiration",rr="ExternalServiceException",nr="GetCredentialsForIdentity",ir="GetCredentialsForIdentityInput",or="GetCredentialsForIdentityResponse",ar="GetId",cr="GetIdInput",ur="GetIdResponse",dr="InternalErrorException",ne="IdentityId",pr="InvalidIdentityPoolConfigurationException",lr="InvalidParameterException",gr="IdentityPoolId",fr="IdentityProviderToken",He="Logins",mr="LimitExceededException",hr="LoginsMap",yr="NotAuthorizedException",Sr="ResourceConflictException",Er="ResourceNotFoundException",wr="SecretKey",Cr="SecretKeyString",Ir="SessionToken",br="TooManyRequestsException",_="client",C="error",x="httpError",I="message",Ar="server",Ge="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",g="com.amazonaws.cognitoidentity";var _r=[0,g,fr,8,0],xr=[0,g,Cr,8,0],Pr=[-3,g,Zs,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(Pr,re);var Rr=[3,g,Le,0,[Ys,wr,Ir,sr],[0,[()=>xr,0],0,4]],kr=[-3,g,tr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(kr,se);var vr=[-3,g,rr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(vr,ee);var Or=[3,g,ir,0,[ne,He,er],[0,[()=>Be,0],0],1],Dr=[3,g,or,0,[ne,Le],[0,[()=>Rr,0]]],Tr=[3,g,cr,0,[gr,Xs,He],[0,0,[()=>Be,0]],1],Mr=[3,g,ur,0,[ne],[0]],Nr=[-3,g,dr,{[C]:Ar},[I],[0]];E.for(g).registerError(Nr,J);var Ur=[-3,g,pr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(Ur,te);var $r=[-3,g,lr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError($r,W);var Fr=[-3,g,mr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(Fr,K);var zr=[-3,g,yr,{[C]:_,[x]:403},[I],[0]];E.for(g).registerError(zr,Q);var jr=[-3,g,Sr,{[C]:_,[x]:409},[I],[0]];E.for(g).registerError(jr,X);var Lr=[-3,g,Er,{[C]:_,[x]:404},[I],[0]];E.for(g).registerError(Lr,Z);var Hr=[-3,g,br,{[C]:_,[x]:429},[I],[0]];E.for(g).registerError(Hr,Y);var Gr=[-3,Ge,"CognitoIdentityServiceException",0,[],[]];E.for(Ge).registerError(Gr,w);var Be=[2,g,hr,0,[0,0],[()=>_r,0]],Br=[9,g,nr,0,()=>Or,()=>Dr],qr=[9,g,ar,0,()=>Tr,()=>Mr];class pn extends Oe.classBuilder().ep(Ue).m(function(e,s,r,n){return[De(r,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(Br).build(){}class ln extends Oe.classBuilder().ep(Ue).m(function(e,s,r,n){return[De(r,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(qr).build(){}export{dn as CognitoIdentityClient,pn as GetCredentialsForIdentityCommand,ln as GetIdCommand};
|
|
1
|
+
import{H as G,n as N,c as qe,b as _e,f as xe,d as Ve,e as Je,g as We,t as H,h as Ke,i as Qe,s as Xe,F as Ye}from"./normalizeProvider-CtDY37Q6.js";import{i as Ze,a as et,c as Pe,S as ie,m as tt,d as st,b as rt,T as E,e as oe,N as k,f as R,g as nt,L as Re,h as ke,v as it,R as ot,j as at,n as ve,k as ct,E as ut,r as dt,p as pt,l as lt,o as gt,q as ft,s as mt,D as ht,t as yt,u as St,w as Et,x as wt,y as Ct,z as It,A as bt,B as At,C as _t,F as xt,G as Pt,H as Rt,I as kt,J as vt,K as Ot,M as Dt,O as Tt,P as Mt,Q as Nt,U as Ut,V as $t,W as Oe,X as De}from"./resolveDefaultsModeConfig-Bx7XDpng.js";import"./preload-helper-BlTxHScW.js";import"./index-IWX-nwYi.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-DkOKMH7F.js";const Ft=t=>e=>async s=>{if(!G.isInstance(s.request))return e(s);const{request:r}=s,{handlerProtocol:n=""}=t.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 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 r=await t(s),{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??e.inputFilterSensitiveLog,l=u??e.outputFilterSensitiveLog,{$metadata:p,...f}=r.output;return o?.info?.({clientName:n,commandName:i,input:d(s.input),output:l(f),metadata:p}),r}catch(r){const{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:c}=a,u=c??e.inputFilterSensitiveLog;throw o?.error?.({clientName:n,commandName:i,input:u(s.input),error:r,metadata:r.$metadata}),r}},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=N(t.userAgentAppId??Jt),{customUserAgent:s}=t;return Object.assign(t,{customUserAgent:typeof s=="string"?[[s]]:s,userAgentAppId:async()=>{const r=await e();if(!Wt(r)){const n=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?console:t.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 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,r,n,i,o,...a]=e;if(s!=="arn"||r===""||n===""||a.join(ae)==="")return null;const c=a.map(u=>u.split(Qt)).flat();return{partition:r,service:n,region:i,accountId:o,resourceId:c}},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:"AWS European Sovereign Cloud (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 r of e){const{regions:n,outputs:i}=r;for(const[o,a]of Object.entries(n))if(o===t)return{...i,...a}}for(const r of e){const{regionRegex:n,outputs:i}=r;if(new RegExp(n).test(t))return{...i}}const s=e.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}},Me={isVirtualHostableS3Bucket:Te,parseArn:Xt,partition:ts};Pe.aws=Me;function ss(t,e,s){return t.$source||(t.$source={}),t.$source[e]=s,t}function b(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,Ne=t=>new Date(Date.now()+t),rs=(t,e)=>Math.abs(Ne(e).getTime()-t)>=3e5,ue=(t,e)=>{const s=Date.parse(t);return rs(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},ns=async t=>{const e=U("context",t.context),s=U("config",t.config),r=e.endpointV2?.properties?.authSchemes?.[0],i=await U("signer",s.signer)(r),o=t?.signingRegion,a=t?.signingRegionSet,c=t?.signingName;return{config:s,signer:i,signingRegion:o,signingRegionSet:a,signingName:c}};class is{async sign(e,s,r){if(!G.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await ns(r),{config:i,signer:o}=n;let{signingRegion:a,signingName:c}=n;const u=r.context;if(u?.authSchemes?.length??!1){const[l,p]=u.authSchemes;l?.name==="sigv4a"&&p?.name==="sigv4"&&(a=p?.signingRegion??a,c=p?.signingName??c)}return await o.sign(e,{signingDate:Ne(i.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(e){return s=>{const r=s.ServerTime??ce(s.$response);if(r){const n=U("config",e.config),i=n.systemClockOffset;n.systemClockOffset=ue(r,n.systemClockOffset),n.systemClockOffset!==i&&s.$metadata&&(s.$metadata.clockSkewCorrected=!0)}throw s}}successHandler(e,s){const r=ce(e);if(r){const n=U("config",s.config);n.systemClockOffset=ue(r,n.systemClockOffset)}}}const os=t=>{let e=t.credentials,s=!!t.credentials,r;Object.defineProperty(t,"credentials",{set(u){u&&u!==e&&u!==r&&(s=!0),e=u;const d=as(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),l=cs(t,d);if(s&&!l.attributed){const p=typeof e=="object"&&e!==null;r=async f=>{const v=await l(f);return p&&(!v.$source||Object.keys(v.$source).length===0)?ss(v,"CREDENTIALS_CODE","e"):v},r.memoized=l.memoized,r.configBound=l.configBound,r.attributed=!0}else r=l},get(){return r},enumerable:!0,configurable:!0}),t.credentials=e;const{signingEscapePath:n=!0,systemClockOffset:i=t.systemClockOffset||0,sha256:o}=t;let a;return t.signer?a=N(t.signer):t.regionInfoProvider?a=()=>N(t.region)().then(async u=>[await t.regionInfoProvider(u,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},u]).then(([u,d])=>{const{signingRegion:l,signingService:p}=u;t.signingRegion=t.signingRegion||l||d,t.signingName=t.signingName||p||t.serviceId;const f={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:n},h=t.signerConstructor||ie;return new h(f)}):a=async u=>{u=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await N(t.region)(),properties:{}},u);const d=u.signingRegion,l=u.signingName;t.signingRegion=t.signingRegion||d,t.signingName=t.signingName||l||t.serviceId;const p={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:n},f=t.signerConstructor||ie;return new f(p)},Object.assign(t,{systemClockOffset:i,signingEscapePath:n,signer:a})};function as(t,{credentials:e,credentialDefaultProvider:s}){let r;return e?e?.memoized?r=e:r=tt(e,rt,st):s?r=N(s(Object.assign({},t,{parentClientConfig:t}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function cs(t,e){if(e.configBound)return e;const s=async r=>e({...r,callerClientConfig:t});return s.memoized=e.memoized,s.configBound=!0,s}class us{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,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":e)}else if(!s.isUnitSchema()&&Object.values(r).find(o=>{const{httpQuery:a,httpQueryParams:c,httpHeader:u,httpLabel:d,httpPrefixHeaders:l}=o.getMergedTraits();return!a&&!c&&!u&&!d&&l===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,s,r,n,i,o){let a=s,c=e;e.includes("#")&&([a,c]=e.split("#"));const u={$metadata:i,$fault:r.statusCode<500?"client":"server"},d=E.for(a);try{return{errorSchema:o?.(d,c)??d.getSchema(e),errorMetadata:u}}catch{n.message=n.message??n.Message??"UnknownError";const p=E.for("smithy.ts.sdk.synthetic."+a),f=p.getBaseException();if(f){const h=p.getErrorCtor(f)??Error;throw this.decorateServiceException(Object.assign(new h({name:c}),u),n)}throw this.decorateServiceException(Object.assign(new Error(c),u),n)}}decorateServiceException(e,s={}){if(this.queryCompat){const r=e.Message??s.Message,n=oe(e,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 oe(e,s)}setQueryCompatError(e,s){const r=s.headers?.["x-amzn-query-error"];if(e!==void 0&&r!=null){const[n,i]=r.split(";"),o=Object.entries(e),a={Code:n,Type:i};Object.assign(e,a);for(const[c,u]of o)a[c==="message"?"Message":c]=u;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(n=>k.of(n).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 r=0;r<s[4].length;++r){const n=s[4][r],i=s[5][r],o=new k([i,0],n);!(n in e)&&!o.isIdempotencyToken()||(yield[n,o])}}function*ps(t,e,s){if(t.isUnitSchema())return;const r=t.getSchema();let n=Object.keys(e).filter(i=>i!=="__type").length;for(let i=0;i<r[4].length&&n!==0;++i){const o=r[4][i],a=r[5][i],c=new k([a,0],o);let u=o;s&&(u=c.getMergedTraits()[s]??o),u in e&&(yield[o,c],n-=1)}}class ls{from;to;keys;constructor(e,s){this.from=e,this.to=s,this.keys=new Set(Object.keys(this.from).filter(r=>r!=="__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 r=s.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||r!==String(e)))return r.includes(".")?new R(r,"bigDecimal"):BigInt(r)}return e}const fs=(t,e)=>nt(t,e).then(s=>(e?.utf8Encoder??_e)(s)),ms=(t,e)=>fs(t,e).then(s=>{if(s.length)try{return JSON.parse(s)}catch(r){throw r?.name==="SyntaxError"&&Object.defineProperty(r,"$responseBodyText",{value:s}),r}return{}}),hs=(t,e)=>{const s=(i,o)=>Object.keys(i).find(a=>a.toLowerCase()===o.toLowerCase()),r=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},n=s(t.headers,"x-amzn-errortype");if(n!==void 0)return r(t.headers[n]);if(e&&typeof e=="object"){const i=s(e,"code");if(i&&e[i]!==void 0)return r(e[i]);if(e.__type!==void 0)return r(e.__type)}};class ys 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 r=s!==null&&typeof s=="object",n=k.of(e);if(r){if(n.isStructSchema()){const o=s,a=n.isUnionSchema(),c={};let u;const{jsonName:d}=this.settings;d&&(u={});let l;a&&(l=new ls(o,c));for(const[p,f]of ps(n,o,d?"jsonName":!1)){let h=p;d&&(h=f.getMergedTraits().jsonName??h,u[h]=p),a&&l.mark(h),o[h]!=null&&(c[p]=this._read(f,o[h]))}if(a)l.writeUnknown();else if(typeof o.__type=="string")for(const[p,f]of Object.entries(o)){const h=d?u[p]??p:p;h in c||(c[h]=f)}return c}if(Array.isArray(s)&&n.isListSchema()){const o=n.getValueSchema(),a=[],c=!!n.getMergedTraits().sparse;for(const u of s)(c||u!=null)&&a.push(this._read(o,u));return a}if(n.isMapSchema()){const o=n.getValueSchema(),a={},c=!!n.getMergedTraits().sparse;for(const[u,d]of Object.entries(s))(c||d!=null)&&(a[u]=this._read(o,d));return a}}if(n.isBlobSchema()&&typeof s=="string")return xe(s);const i=n.getMergedTraits().mediaType;if(n.isStringSchema()&&typeof s=="string"&&i)return i==="application/json"||i.endsWith("+json")?Re.from(s):s;if(n.isTimestampSchema()&&s!=null)switch(ke(n,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(n.isBigIntegerSchema()&&(typeof s=="number"||typeof s=="string"))return BigInt(s);if(n.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(n.isNumericSchema()&&typeof s=="string"){switch(s){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return s}if(n.isDocumentSchema())if(r){const o=Array.isArray(s)?[]:{};for(const[a,c]of Object.entries(s))c instanceof R?o[a]=c:o[a]=this._read(n,c);return o}else return structuredClone(s);return s}}const de="Ν";class Ss{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 r=`${de+"nv"+this.counter++}_`+s.string;return this.values.set(`"${r}"`,s.string),r}if(typeof s=="bigint"){const r=s.toString(),n=`${de+"b"+this.counter++}_`+r;return this.values.set(`"${n}"`,r),n}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,r]of this.values)e=e.replace(s,r);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 r=new Ss;return r.replaceInJson(JSON.stringify(this.buffer,r.createReplacer(),0))}return this.buffer}_write(e,s,r){const n=s!==null&&typeof s=="object",i=k.of(e);if(n){if(i.isStructSchema()){const o=s,a={},{jsonName:c}=this.settings;let u;c&&(u={});for(const[d,l]of ds(i,o)){const p=this._write(l,o[d],i);if(p!==void 0){let f=d;c&&(f=l.getMergedTraits().jsonName??d,u[d]=f),a[f]=p}}if(i.isUnionSchema()&&Object.keys(a).length===0){const{$unknown:d}=o;if(Array.isArray(d)){const[l,p]=d;a[l]=this._write(15,p)}}else if(typeof o.__type=="string")for(const[d,l]of Object.entries(o)){const p=c?u[d]??d:d;p in a||(a[p]=this._write(15,l))}return a}if(Array.isArray(s)&&i.isListSchema()){const o=i.getValueSchema(),a=[],c=!!i.getMergedTraits().sparse;for(const u of s)(c||u!=null)&&a.push(this._write(o,u));return a}if(i.isMapSchema()){const o=i.getValueSchema(),a={},c=!!i.getMergedTraits().sparse;for(const[u,d]of Object.entries(s))(c||d!=null)&&(a[u]=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&&r?.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(n){const o=Array.isArray(s)?[]:{};for(const[a,c]of Object.entries(s))c instanceof R?(this.useReplacer=!0,o[a]=c):o[a]=this._write(i,c);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 ys(this.settings);return e.setSerdeContext(this.serdeContext),e}}class Cs extends ot{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n}){super({defaultNamespace:e}),this.serviceTarget=s,this.codec=n??new ws({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!r,this.mixin=new us(this.awsQueryCompatible)}async serializeRequest(e,s,r){const n=await super.serializeRequest(e,s,r);return n.path.endsWith("/")||(n.path+="/"),Object.assign(n.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(n.headers["x-amzn-query-mode"]="true"),(at(e.input)==="unit"||!n.body)&&(n.body="{}"),n}getPayloadCodec(){return this.codec}async handleError(e,s,r,n,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(n,r);const o=hs(r,n)??"Unknown",{errorSchema:a,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,r,n,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),u=k.of(a),d=n.message??n.Message??"Unknown",l=E.for(a[1]).getErrorCtor(a)??Error,p=new l(d),f={};for(const[h,v]of u.structIterator())n[h]!=null&&(f[h]=this.codec.createDeserializer().readObject(v,n[h]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(n,f),this.mixin.decorateServiceException(Object.assign(p,c,{$fault:u.getMergedTraits().error,message:d},f),n)}}class Is extends Cs{constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n}){super({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n})}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"&&b(t,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const i=await e.retryStrategy();typeof i.acquireInitialRetryToken=="function"?i.constructor?.name?.includes("Adaptive")?b(t,"RETRY_MODE_ADAPTIVE","F"):b(t,"RETRY_MODE_STANDARD","E"):b(t,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const i=t.endpointV2;switch(String(i?.url?.hostname).match(bs)&&b(t,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":b(t,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":b(t,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":b(t,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const n=t.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){const i=n;i.accountId&&b(t,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(i.$source??{}))b(t,o,a)}}const pe="user-agent",j="x-amz-user-agent",le=" ",L="/",_s=/[^!$%&'*+\-.^_`|~\w]/g,xs=/[^!$%&'*+\-.^_`|~\w#]/g,ge="-",Ps=1024;function Rs(t){let e="";for(const s in t){const r=t[s];if(e.length+r.length+1<=Ps){e.length?e+=","+r:e+=r;continue}break}return e}const ks=t=>(e,s)=>async r=>{const{request:n}=r;if(!G.isInstance(n))return e(r);const{headers:i}=n,o=s?.userAgent?.map(F)||[],a=(await t.defaultUserAgentProvider()).map(F);await As(s,t,r);const c=s;a.push(`m/${Rs(Object.assign({},s.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=t?.customUserAgent?.map(F)||[],d=await t.userAgentAppId();d&&a.push(F(["app",`${d}`]));const l=[].concat([...a,...o,...u]).join(le),p=[...a.filter(f=>f.startsWith("aws-sdk-")),...u].join(le);return t.runtime!=="browser"?(p&&(i[j]=i[j]?`${i[pe]} ${p}`:p),i[pe]=l):i[j]=l,e({...r,request:n})},F=t=>{const e=t[0].split(L).map(o=>o.replace(_s,ge)).join(L),s=t[1]?.replace(xs,ge),r=e.indexOf(L),n=e.substring(0,r);let i=e.substring(r+1);return n==="api"&&(i=i.toLowerCase()),[n,i,s].filter(o=>o&&o.length>0).reduce((o,a,c)=>{switch(c){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 Ms=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},Ns=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.974.0",Fs={version:$s},zs=({serviceId:t,clientVersion:e})=>async s=>{const r=typeof window<"u"?window.navigator:void 0,n=r?.userAgent??"",i=r?.userAgentData?.platform??fe.os(n)??"other",o=void 0,a=r?.userAgentData?.brands??[],c=a[a.length-1],u=c?.brand??fe.browser(n)??"unknown",d=c?.version??"unknown",l=[["aws-sdk-js",e],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${u}_${d}`]];t&&l.push([`api/${t}`,e]);const p=await s?.userAgentAppId?.();return p&&l.push([`app/${p}`]),l},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",y="fn",S="argv",D="ref",me=!0,he="isSet",$="booleanEquals",O="error",A="endpoint",P="tree",q="PartitionResult",V="getAttr",T="stringEquals",ye={[$e]:!1,type:"string"},Se={[$e]:!0,default:!1,type:"boolean"},Ee={[D]:"Endpoint"},Fe={[y]:$,[S]:[{[D]:"UseFIPS"},!0]},ze={[y]:$,[S]:[{[D]:"UseDualStack"},!0]},m={},M={[D]:"Region"},we={[y]:V,[S]:[{[D]:q},"supportsFIPS"]},je={[D]:q},Ce={[y]:$,[S]:[!0,{[y]:V,[S]:[je,"supportsDualStack"]}]},Ie=[Fe],be=[ze],Ae=[M],js={parameters:{Region:ye,UseDualStack:Se,UseFIPS:Se,Endpoint:ye},rules:[{conditions:[{[y]: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:m,headers:m},type:A}],type:P},{conditions:[{[y]:he,[S]:Ae}],rules:[{conditions:[{[y]:"aws.partition",[S]:Ae,assign:q}],rules:[{conditions:[Fe,ze],rules:[{conditions:[{[y]:$,[S]:[me,we]},Ce],rules:[{conditions:[{[y]:T,[S]:[M,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:m,headers:m},type:A},{conditions:[{[y]:T,[S]:[M,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:m,headers:m},type:A},{conditions:[{[y]:T,[S]:[M,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:m,headers:m},type:A},{conditions:[{[y]:T,[S]:[M,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:m,headers:m},type:A},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:A}],type:P},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:O}],type:P},{conditions:Ie,rules:[{conditions:[{[y]:$,[S]:[we,me]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:A}],type:P},{error:"FIPS is enabled but this partition does not support FIPS",type:O}],type:P},{conditions:be,rules:[{conditions:[Ce],rules:[{conditions:[{[y]:T,[S]:["aws",{[y]:V,[S]:[je,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:m,headers:m},type:A},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:A}],type:P},{error:"DualStack is enabled but this partition does not support DualStack",type:O}],type:P},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:A}],type:P}],type:P},{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=Me;const Bs=t=>({apiVersion:"2014-06-30",base64Decoder:t?.base64Decoder??xe,base64Encoder:t?.base64Encoder??H,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??Gs,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??Ms,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??_e}),qs=t=>{const e=ft(t),s=()=>e().then(It),r=Bs(t);return{...r,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??Et,credentialDefaultProvider:t?.credentialDefaultProvider??(n=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:t?.defaultUserAgentProvider??zs({serviceId:r.serviceId,clientVersion:Fs.version}),maxAttempts:t?.maxAttempts??St,region:t?.region??yt("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,r=t.credentials;return{setHttpAuthScheme(n){const i=e.findIndex(o=>o.schemeId===n.schemeId);i===-1?e.push(n):e.splice(i,1,n)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(n){s=n},httpAuthSchemeProvider(){return s},setCredentials(n){r=n},credentials(){return r}}},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(r=>r.configure(s)),Object.assign(t,Js(s),_t(s),xt(s),Ks(s))};class dn extends Pt{config;constructor(...[e]){const s=qs(e||{});super(s),this.initConfig=s;const r=Us(s),n=Kt(r),i=Rt(n),o=kt(i),a=o,c=vt(a),u=Ns(c),d=Qs(u,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(Mt(this.config,{httpAuthSchemeParametersProvider:Ds,identityProviderConfigProvider:async l=>new Ut({"aws.auth#sigv4":l.credentials})})),this.middlewareStack.use(Nt(this.config))}destroy(){super.destroy()}}class w extends $t{constructor(e){super(e),Object.setPrototypeOf(this,w.prototype)}}class J extends w{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,J.prototype)}}class W extends w{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,W.prototype)}}class K extends w{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,K.prototype)}}class Q extends w{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,Q.prototype)}}class X extends w{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,X.prototype)}}class Y extends w{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,Y.prototype)}}class Z extends w{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Z.prototype)}}class ee extends w{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,ee.prototype)}}class te extends w{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,te.prototype)}}class se extends w{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,se.prototype)}}class re extends w{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,re.prototype)}}const Xs="AccountId",Ys="AccessKeyId",Le="Credentials",Zs="ConcurrentModificationException",er="CustomRoleArn",tr="DeveloperUserAlreadyRegisteredException",sr="Expiration",rr="ExternalServiceException",nr="GetCredentialsForIdentity",ir="GetCredentialsForIdentityInput",or="GetCredentialsForIdentityResponse",ar="GetId",cr="GetIdInput",ur="GetIdResponse",dr="InternalErrorException",ne="IdentityId",pr="InvalidIdentityPoolConfigurationException",lr="InvalidParameterException",gr="IdentityPoolId",fr="IdentityProviderToken",He="Logins",mr="LimitExceededException",hr="LoginsMap",yr="NotAuthorizedException",Sr="ResourceConflictException",Er="ResourceNotFoundException",wr="SecretKey",Cr="SecretKeyString",Ir="SessionToken",br="TooManyRequestsException",_="client",C="error",x="httpError",I="message",Ar="server",Ge="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",g="com.amazonaws.cognitoidentity";var _r=[0,g,fr,8,0],xr=[0,g,Cr,8,0],Pr=[-3,g,Zs,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(Pr,re);var Rr=[3,g,Le,0,[Ys,wr,Ir,sr],[0,[()=>xr,0],0,4]],kr=[-3,g,tr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(kr,se);var vr=[-3,g,rr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(vr,ee);var Or=[3,g,ir,0,[ne,He,er],[0,[()=>Be,0],0],1],Dr=[3,g,or,0,[ne,Le],[0,[()=>Rr,0]]],Tr=[3,g,cr,0,[gr,Xs,He],[0,0,[()=>Be,0]],1],Mr=[3,g,ur,0,[ne],[0]],Nr=[-3,g,dr,{[C]:Ar},[I],[0]];E.for(g).registerError(Nr,J);var Ur=[-3,g,pr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(Ur,te);var $r=[-3,g,lr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError($r,W);var Fr=[-3,g,mr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(Fr,K);var zr=[-3,g,yr,{[C]:_,[x]:403},[I],[0]];E.for(g).registerError(zr,Q);var jr=[-3,g,Sr,{[C]:_,[x]:409},[I],[0]];E.for(g).registerError(jr,X);var Lr=[-3,g,Er,{[C]:_,[x]:404},[I],[0]];E.for(g).registerError(Lr,Z);var Hr=[-3,g,br,{[C]:_,[x]:429},[I],[0]];E.for(g).registerError(Hr,Y);var Gr=[-3,Ge,"CognitoIdentityServiceException",0,[],[]];E.for(Ge).registerError(Gr,w);var Be=[2,g,hr,0,[0,0],[()=>_r,0]],Br=[9,g,nr,0,()=>Or,()=>Dr],qr=[9,g,ar,0,()=>Tr,()=>Mr];class pn extends Oe.classBuilder().ep(Ue).m(function(e,s,r,n){return[De(r,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(Br).build(){}class ln extends Oe.classBuilder().ep(Ue).m(function(e,s,r,n){return[De(r,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(qr).build(){}export{dn as CognitoIdentityClient,pn as GetCredentialsForIdentityCommand,ln as GetIdCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as W,k as ge,E as he,r as Pe,c as Ee,p as Se,l as fe,o as ve,q as ye,s as Ae,D as xe,t as Re,u as _e,w as Ce,x as De,y as Ie,z as Te,A as be,B as ke,C as we,F as Ue,G as $e,H as Oe,I as He,J as Fe,K as Le,M as je,O as Me,P as Ne,Q as Ke,U as ze,V as Ve,T as E,W as qe,X as Ge}from"./resolveDefaultsModeConfig-Bx7XDpng.js";import{r as Be,a as We,A as Qe,b as Je,c as Xe,g as Ye,d as Ze,e as et,f as tt,h as ot,i as st,j as nt,k as it}from"./index-B5cYUcHg.js";import{b as rt,i as at,t as ct,f as dt,s as lt,F as ut}from"./normalizeProvider-CtDY37Q6.js";import"./preload-helper-BlTxHScW.js";import"./index-IWX-nwYi.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-DkOKMH7F.js";const pt=async(e,t,a)=>({operation:ge(t).operation,region:await W(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function mt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,a)=>({signingProperties:{config:t,context:a}})}}function gt(e){return{schemeId:"smithy.api#noAuth"}}const ht=e=>{const t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(gt());break}default:t.push(mt(e))}return t},Pt=e=>Object.assign(e,{stsClientCtor:kt}),Et=e=>{const t=Pt(e),a=Be(t);return Object.assign(a,{authSchemePreference:W(e.authSchemePreference??[])})},St=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),ft={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"}},vt="3.975.0",yt={version:vt},Q="required",o="type",s="fn",n="argv",S="ref",F=!1,D=!0,P="booleanEquals",c="stringEquals",J="sigv4",X="sts",Y="us-east-1",r="endpoint",L="https://sts.{Region}.{PartitionResult#dnsSuffix}",g="tree",R="error",T="getAttr",j={[Q]:!1,[o]:"string"},I={[Q]:!0,default:!1,[o]:"boolean"},Z={[S]:"Endpoint"},M={[s]:"isSet",[n]:[{[S]:"Region"}]},d={[S]:"Region"},N={[s]:"aws.partition",[n]:[d],assign:"PartitionResult"},ee={[S]:"UseFIPS"},te={[S]:"UseDualStack"},l={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:J,signingName:X,signingRegion:Y}]},headers:{}},u={},K={conditions:[{[s]:c,[n]:[d,"aws-global"]}],[r]:l,[o]:r},oe={[s]:P,[n]:[ee,!0]},se={[s]:P,[n]:[te,!0]},z={[s]:T,[n]:[{[S]:"PartitionResult"},"supportsFIPS"]},ne={[S]:"PartitionResult"},V={[s]:P,[n]:[!0,{[s]:T,[n]:[ne,"supportsDualStack"]}]},q=[{[s]:"isSet",[n]:[Z]}],G=[oe],B=[se],At={parameters:{Region:j,UseDualStack:I,UseFIPS:I,Endpoint:j,UseGlobalEndpoint:I},rules:[{conditions:[{[s]:P,[n]:[{[S]:"UseGlobalEndpoint"},D]},{[s]:"not",[n]:q},M,N,{[s]:P,[n]:[ee,F]},{[s]:P,[n]:[te,F]}],rules:[{conditions:[{[s]:c,[n]:[d,"ap-northeast-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"ap-south-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"ap-southeast-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"ap-southeast-2"]}],endpoint:l,[o]:r},K,{conditions:[{[s]:c,[n]:[d,"ca-central-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"eu-central-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"eu-north-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"eu-west-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"eu-west-2"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"eu-west-3"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"sa-east-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,Y]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"us-east-2"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"us-west-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"us-west-2"]}],endpoint:l,[o]:r},{endpoint:{url:L,properties:{authSchemes:[{name:J,signingName:X,signingRegion:"{Region}"}]},headers:u},[o]:r}],[o]:g},{conditions:q,rules:[{conditions:G,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[o]:R},{conditions:B,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[o]:R},{endpoint:{url:Z,properties:u,headers:u},[o]:r}],[o]:g},{conditions:[M],rules:[{conditions:[N],rules:[{conditions:[oe,se],rules:[{conditions:[{[s]:P,[n]:[D,z]},V],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:u,headers:u},[o]:r}],[o]:g},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[o]:R}],[o]:g},{conditions:G,rules:[{conditions:[{[s]:P,[n]:[z,D]}],rules:[{conditions:[{[s]:c,[n]:[{[s]:T,[n]:[ne,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:u,headers:u},[o]:r},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:u,headers:u},[o]:r}],[o]:g},{error:"FIPS is enabled but this partition does not support FIPS",[o]:R}],[o]:g},{conditions:B,rules:[{conditions:[V],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:u,headers:u},[o]:r}],[o]:g},{error:"DualStack is enabled but this partition does not support DualStack",[o]:R}],[o]:g},K,{endpoint:{url:L,properties:u,headers:u},[o]:r}],[o]:g}],[o]:g},{error:"Invalid Configuration: Missing Region",[o]:R}]},xt=At,Rt=new he({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),_t=(e,t={})=>Rt.get(e,()=>Pe(xt,{endpointParams:e,logger:t.logger}));Ee.aws=We;const Ct=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??dt,base64Encoder:e?.base64Encoder??ct,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??_t,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ht,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Je},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ve}],logger:e?.logger??new fe,protocol:e?.protocol??Qe,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??Se,utf8Decoder:e?.utf8Decoder??at,utf8Encoder:e?.utf8Encoder??rt}),Dt=e=>{const t=ye(e),a=()=>t().then(Te),p=Ct(e);return{...p,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Ce,credentialDefaultProvider:e?.credentialDefaultProvider??(m=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Xe({serviceId:p.serviceId,clientVersion:yt.version}),maxAttempts:e?.maxAttempts??_e,region:e?.region??Re("Region is missing"),requestHandler:ut.create(e?.requestHandler??a),retryMode:e?.retryMode??(async()=>(await a()).retryMode||xe),sha256:e?.sha256??Ae,streamCollector:e?.streamCollector??lt,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ie)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(De))}},It=e=>{const t=e.httpAuthSchemes;let a=e.httpAuthSchemeProvider,p=e.credentials;return{setHttpAuthScheme(m){const _=t.findIndex(C=>C.schemeId===m.schemeId);_===-1?t.push(m):t.splice(_,1,m)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(m){a=m},httpAuthSchemeProvider(){return a},setCredentials(m){p=m},credentials(){return p}}},Tt=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),bt=(e,t)=>{const a=Object.assign(Ye(e),be(e),ke(e),It(e));return t.forEach(p=>p.configure(a)),Object.assign(e,Ze(a),we(a),Ue(a),Tt(a))};class kt extends $e{config;constructor(...[t]){const a=Dt(t||{});super(a),this.initConfig=a;const p=St(a),m=et(p),_=Oe(m),C=He(_),de=it(C),le=Fe(de),ue=Et(le),pe=bt(ue,t?.extensions||[]);this.config=pe,this.middlewareStack.use(Le(this.config)),this.middlewareStack.use(tt(this.config)),this.middlewareStack.use(je(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(ot(this.config)),this.middlewareStack.use(st(this.config)),this.middlewareStack.use(nt(this.config)),this.middlewareStack.use(Ne(this.config,{httpAuthSchemeParametersProvider:pt,identityProviderConfigProvider:async me=>new ze({"aws.auth#sigv4":me.credentials})})),this.middlewareStack.use(Ke(this.config))}destroy(){super.destroy()}}class h extends Ve{constructor(t){super(t),Object.setPrototypeOf(this,h.prototype)}}class b extends h{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,b.prototype)}}class k extends h{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,k.prototype)}}class w extends h{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,w.prototype)}}class U extends h{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,U.prototype)}}class $ extends h{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,$.prototype)}}class O extends h{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,O.prototype)}}class H extends h{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,H.prototype)}}const wt="Arn",Ut="AccessKeyId",$t="AssumeRole",Ot="AssumedRoleId",Ht="AssumeRoleRequest",Ft="AssumeRoleResponse",ie="AssumedRoleUser",re="Credentials",Lt="ContextAssertion",jt="DurationSeconds",Mt="Expiration",Nt="ExternalId",Kt="ExpiredTokenException",zt="IDPCommunicationErrorException",Vt="IDPRejectedClaimException",qt="InvalidIdentityTokenException",Gt="Key",Bt="MalformedPolicyDocumentException",Wt="Policy",Qt="PolicyArns",Jt="ProviderArn",Xt="ProvidedContexts",Yt="ProvidedContextsListType",Zt="ProvidedContext",eo="PolicyDescriptorType",to="PackedPolicySize",oo="PackedPolicyTooLargeException",so="RoleArn",no="RegionDisabledException",io="RoleSessionName",ro="SecretAccessKey",ae="SourceIdentity",ao="SerialNumber",co="SessionToken",lo="Tags",uo="TokenCode",po="TransitiveTagKeys",mo="Tag",go="Value",ho="arn",Po="accessKeySecretType",f="awsQueryError",v="client",y="error",A="httpError",x="message",Eo="policyDescriptorListType",ce="smithy.ts.sdk.synthetic.com.amazonaws.sts",So="tagListType",i="com.amazonaws.sts";var fo=[0,i,Po,8,0],vo=[3,i,ie,0,[Ot,wt],[0,0],2],yo=[3,i,Ht,0,[so,io,Qt,Wt,jt,lo,po,Nt,ao,uo,ae,Xt],[0,0,()=>Oo,0,1,()=>Fo,64,0,0,0,0,()=>Ho],2],Ao=[3,i,Ft,0,[re,ie,to,ae],[[()=>xo,0],()=>vo,1,0]],xo=[3,i,re,0,[Ut,ro,co,Mt],[0,[()=>fo,0],0,4],4],Ro=[-3,i,Kt,{[f]:["ExpiredTokenException",400],[y]:v,[A]:400},[x],[0]];E.for(i).registerError(Ro,b);var _o=[-3,i,zt,{[f]:["IDPCommunicationError",400],[y]:v,[A]:400},[x],[0]];E.for(i).registerError(_o,H);var Co=[-3,i,Vt,{[f]:["IDPRejectedClaim",403],[y]:v,[A]:403},[x],[0]];E.for(i).registerError(Co,$);var Do=[-3,i,qt,{[f]:["InvalidIdentityToken",400],[y]:v,[A]:400},[x],[0]];E.for(i).registerError(Do,O);var Io=[-3,i,Bt,{[f]:["MalformedPolicyDocument",400],[y]:v,[A]:400},[x],[0]];E.for(i).registerError(Io,k);var To=[-3,i,oo,{[f]:["PackedPolicyTooLarge",400],[y]:v,[A]:400},[x],[0]];E.for(i).registerError(To,w);var bo=[3,i,eo,0,[ho],[0]],ko=[3,i,Zt,0,[Jt,Lt],[0,0]],wo=[-3,i,no,{[f]:["RegionDisabledException",403],[y]:v,[A]:403},[x],[0]];E.for(i).registerError(wo,U);var Uo=[3,i,mo,0,[Gt,go],[0,0],2],$o=[-3,ce,"STSServiceException",0,[],[]];E.for(ce).registerError($o,h);var Oo=[1,i,Eo,0,()=>bo],Ho=[1,i,Yt,0,()=>ko],Fo=[1,i,So,0,()=>Uo],Lo=[9,i,$t,0,()=>yo,()=>Ao];class ss extends qe.classBuilder().ep(ft).m(function(t,a,p,m){return[Ge(p,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(Lo).build(){}export{ss as AssumeRoleCommand,kt as STSClient};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
class U{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const r=new U({...t,headers:{...t.headers}});return r.query&&(r.query=V(r.query)),r}static isInstance(t){if(!t)return!1;const r=t;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){return U.clone(this)}}function V(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}class B{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const r=t;return typeof r.statusCode=="number"&&typeof r.headers=="object"}}const M=e=>encodeURIComponent(e).replace(/[!'()*]/g,X),X=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function z(e){const t=[];for(let r of Object.keys(e).sort()){const n=e[r];if(r=M(r),Array.isArray(n))for(let o=0,i=n.length;o<i;o++)t.push(`${r}=${M(n[o])}`);else{let o=r;(n||typeof n=="string")&&(o+=`=${M(n)}`),t.push(o)}}return t.join("&")}function P(e,t){return new Request(e,t)}function Z(e=0){return new Promise((t,r)=>{e&&setTimeout(()=>{const n=new Error(`Request did not complete within ${e} ms`);n.name="TimeoutError",r(n)},e)})}const I={supported:void 0};class J{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new J(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(r=>r||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),I.supported===void 0&&(I.supported=typeof Request<"u"&&"keepalive"in P("https://[::1]"))}destroy(){}async handle(t,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const o=n??this.config.requestTimeout,i=this.config.keepAlive===!0,c=this.config.credentials;if(r?.aborted){const u=new Error("Request aborted");return u.name="AbortError",Promise.reject(u)}let a=t.path;const d=z(t.query||{});d&&(a+=`?${d}`),t.fragment&&(a+=`#${t.fragment}`);let s="";if(t.username!=null||t.password!=null){const u=t.username??"",T=t.password??"";s=`${u}:${T}@`}const{port:f,method:y}=t,w=`${t.protocol}//${s}${t.hostname}${f?`:${f}`:""}${a}`,C=y==="GET"||y==="HEAD"?void 0:t.body,h={body:C,headers:new Headers(t.headers),method:y,credentials:c};this.config?.cache&&(h.cache=this.config.cache),C&&(h.duplex="half"),typeof AbortController<"u"&&(h.signal=r),I.supported&&(h.keepalive=i),typeof this.config.requestInit=="function"&&Object.assign(h,this.config.requestInit(t));let O=()=>{};const G=P(w,h),L=[fetch(G).then(u=>{const T=u.headers,g={};for(const x of T.entries())g[x[0]]=x[1];return u.body!=null?{response:new B({headers:g,reason:u.statusText,statusCode:u.status,body:u.body})}:u.blob().then(x=>({response:new B({headers:g,reason:u.statusText,statusCode:u.status,body:x})}))}),Z(o)];return r&&L.push(new Promise((u,T)=>{const g=()=>{const m=new Error("Request aborted");m.name="AbortError",T(m)};if(typeof r.addEventListener=="function"){const m=r;m.addEventListener("abort",g,{once:!0}),O=()=>m.removeEventListener("abort",g)}else r.onabort=g})),Promise.race(L).finally(O)}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[t]=r,n))}httpHandlerConfigs(){return this.config??{}}}const Y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k=Object.entries(Y).reduce((e,[t,r])=>(e[r]=Number(t),e),{}),Q=Y.split(""),p=6,E=8,K=63,v=e=>{let t=e.length/4*3;e.slice(-2)==="=="?t-=2:e.slice(-1)==="="&&t--;const r=new ArrayBuffer(t),n=new DataView(r);for(let o=0;o<e.length;o+=4){let i=0,c=0;for(let s=o,f=o+3;s<=f;s++)if(e[s]!=="="){if(!(e[s]in k))throw new TypeError(`Invalid character ${e[s]} in base64 string.`);i|=k[e[s]]<<(f-s)*p,c+=p}else i>>=p;const a=o/4*3;i>>=c%E;const d=Math.floor(c/E);for(let s=0;s<d;s++){const f=(d-s-1)*E;n.setUint8(a+s,(i&255<<f)>>f)}}return new Uint8Array(r)},ee=e=>new TextEncoder().encode(e),Me=e=>{if(typeof e=="string")return e;if(typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function Ie(e){let t;typeof e=="string"?t=ee(e):t=e;const r=typeof t=="object"&&typeof t.length=="number",n=typeof t=="object"&&typeof t.byteOffset=="number"&&typeof t.byteLength=="number";if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let o="";for(let i=0;i<t.length;i+=3){let c=0,a=0;for(let s=i,f=Math.min(i+3,t.length);s<f;s++)c|=t[s]<<(f-s-1)*E,a+=E;const d=Math.ceil(a/p);c<<=d*p-a;for(let s=1;s<=d;s++){const f=(d-s)*p;o+=Q[(c&K<<f)>>f]}o+="==".slice(0,4-d)}return o}const Re=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):te(e):re(e);async function te(e){const t=await ne(e),r=v(t);return new Uint8Array(r)}async function re(e){const t=[],r=e.getReader();let n=!1,o=0;for(;!n;){const{done:a,value:d}=await r.read();d&&(t.push(d),o+=d.length),n=a}const i=new Uint8Array(o);let c=0;for(const a of t)i.set(a,c),c+=a.length;return i}function ne(e){return new Promise((t,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const o=n.result??"",i=o.indexOf(","),c=i>-1?i+1:o.length;t(o.substring(c))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})}const W={},D={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),W[e]=t,D[t]=e}function Ue(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){const n=e.slice(r,r+2).toLowerCase();if(n in D)t[r/2]=D[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}function De(e){let t="";for(let r=0;r<e.byteLength;r++)t+=W[e[r]];return t}const F=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&he.warn(ue(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},oe=Math.ceil(2**127*(2-2**-23)),H=e=>{const t=F(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>oe)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},se=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},j=e=>q(e,16),_=e=>q(e,8),q=(e,t)=>{const r=se(e);if(r!==void 0&&ie(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},ie=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},ce=e=>F(typeof e=="string"?A(e):e),ae=e=>H(typeof e=="string"?A(e):e),de=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,A=e=>{const t=e.match(de);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},$=e=>j(typeof e=="string"?A(e):e),fe=e=>_(typeof e=="string"?A(e):e),ue=e=>String(new TypeError(e).stack||e).split(`
|
|
2
2
|
`).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
|
|
3
|
-
`),he={warn:console.warn},le=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Fe(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),o=e.getUTCDate(),i=e.getUTCHours(),c=e.getUTCMinutes(),a=e.getUTCSeconds(),d=o<10?`0${o}`:`${o}`,s=i<10?`0${i}`:`${i}`,f=c<10?`0${c}`:`${c}`,y=a<10?`0${a}`:`${a}`;return`${le[n]}, ${d} ${N[r]} ${t} ${s}:${f}:${y} GMT`}const ye=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Ne=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=ye.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,i,c,a,d,s]=t,f=$(b(n)),y=l(o,"month",1,12),w=l(i,"day",1,31);return S(f,y,w,{hours:c,minutes:a,seconds:d,fractionalMilliseconds:s})},ge=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Oe=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=ge.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,i,c,a,d,s,f]=t,y=$(b(n)),w=l(o,"month",1,12),C=l(i,"day",1,31),h=S(y,w,C,{hours:c,minutes:a,seconds:d,fractionalMilliseconds:s});return f.toUpperCase()!="Z"&&h.setTime(h.getTime()-Ae(f)),h},me=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),pe=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),be=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),Le=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=me.exec(e);if(t){const[r,n,o,i,c,a,d,s]=t;return S($(b(i)),R(o),l(n,"day",1,31),{hours:c,minutes:a,seconds:d,fractionalMilliseconds:s})}if(t=pe.exec(e),t){const[r,n,o,i,c,a,d,s]=t;return Ee(S(we(i),R(o),l(n,"day",1,31),{hours:c,minutes:a,seconds:d,fractionalMilliseconds:s}))}if(t=be.exec(e),t){const[r,n,o,i,c,a,d,s]=t;return S($(b(s)),R(n),l(o.trimLeft(),"day",1,31),{hours:i,minutes:c,seconds:a,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")},Be=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=ce(e);else if(typeof e=="object"&&e.tag===1)t=e.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1e3))},S=(e,t,r,n)=>{const o=t-1;return $e(e,o,r),new Date(Date.UTC(e,o,r,l(n.hours,"hour",0,23),l(n.minutes,"minute",0,59),l(n.seconds,"seconds",0,60),xe(n.fractionalMilliseconds)))},we=e=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+$(b(e));return r<t?r+100:r},Te=50*365*24*60*60*1e3,Ee=e=>e.getTime()-new Date().getTime()>Te?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,R=e=>{const t=N.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Se=[31,28,31,30,31,30,31,31,30,31,30,31],$e=(e,t,r)=>{let n=Se[t];if(t===1&&Ce(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${N[t]} in ${e}: ${r}`)},Ce=e=>e%4===0&&(e%100!==0||e%400===0),l=(e,t,r,n)=>{const o=fe(b(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},xe=e=>e==null?0:ae("0."+e)*1e3,Ae=e=>{const t=e[0];let r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const n=Number(e.substring(1,3)),o=Number(e.substring(4,6));return r*(n*60+o)*60*1e3},b=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},Pe=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t};export{J as F,U as H,
|
|
3
|
+
`),he={warn:console.warn},le=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Fe(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),o=e.getUTCDate(),i=e.getUTCHours(),c=e.getUTCMinutes(),a=e.getUTCSeconds(),d=o<10?`0${o}`:`${o}`,s=i<10?`0${i}`:`${i}`,f=c<10?`0${c}`:`${c}`,y=a<10?`0${a}`:`${a}`;return`${le[n]}, ${d} ${N[r]} ${t} ${s}:${f}:${y} GMT`}const ye=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Ne=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=ye.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,i,c,a,d,s]=t,f=$(b(n)),y=l(o,"month",1,12),w=l(i,"day",1,31);return S(f,y,w,{hours:c,minutes:a,seconds:d,fractionalMilliseconds:s})},ge=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Oe=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=ge.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,i,c,a,d,s,f]=t,y=$(b(n)),w=l(o,"month",1,12),C=l(i,"day",1,31),h=S(y,w,C,{hours:c,minutes:a,seconds:d,fractionalMilliseconds:s});return f.toUpperCase()!="Z"&&h.setTime(h.getTime()-Ae(f)),h},me=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),pe=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),be=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),Le=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=me.exec(e);if(t){const[r,n,o,i,c,a,d,s]=t;return S($(b(i)),R(o),l(n,"day",1,31),{hours:c,minutes:a,seconds:d,fractionalMilliseconds:s})}if(t=pe.exec(e),t){const[r,n,o,i,c,a,d,s]=t;return Ee(S(we(i),R(o),l(n,"day",1,31),{hours:c,minutes:a,seconds:d,fractionalMilliseconds:s}))}if(t=be.exec(e),t){const[r,n,o,i,c,a,d,s]=t;return S($(b(s)),R(n),l(o.trimLeft(),"day",1,31),{hours:i,minutes:c,seconds:a,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")},Be=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=ce(e);else if(typeof e=="object"&&e.tag===1)t=e.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1e3))},S=(e,t,r,n)=>{const o=t-1;return $e(e,o,r),new Date(Date.UTC(e,o,r,l(n.hours,"hour",0,23),l(n.minutes,"minute",0,59),l(n.seconds,"seconds",0,60),xe(n.fractionalMilliseconds)))},we=e=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+$(b(e));return r<t?r+100:r},Te=50*365*24*60*60*1e3,Ee=e=>e.getTime()-new Date().getTime()>Te?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,R=e=>{const t=N.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Se=[31,28,31,30,31,30,31,31,30,31,30,31],$e=(e,t,r)=>{let n=Se[t];if(t===1&&Ce(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${N[t]} in ${e}: ${r}`)},Ce=e=>e%4===0&&(e%100!==0||e%400===0),l=(e,t,r,n)=>{const o=fe(b(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},xe=e=>e==null?0:ae("0."+e)*1e3,Ae=e=>{const t=e[0];let r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const n=Number(e.substring(1,3)),o=Number(e.substring(4,6));return r*(n*60+o)*60*1e3},b=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},Pe=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t};export{J as F,U as H,De as a,Me as b,B as c,Be as d,Le as e,v as f,Oe as g,Fe as h,ee as i,Ue as j,M as k,Pe as n,Ne as p,Re as s,Ie as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{l as o}from"./index-IWX-nwYi.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-DkOKMH7F.js";export{o as default};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BitrXVkV.js","assets/normalizeProvider-CtDY37Q6.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as K,f as ut,t as ht,b as dt,c as pe,H as P,a as M,j as lt,k as V}from"./normalizeProvider-CtDY37Q6.js";import{_ as ft}from"./preload-helper-BlTxHScW.js";import{_ as mt,m as pt}from"./index-IWX-nwYi.js";const yt=(t,e,r)=>{let s,n,i,a=!1;const u=async()=>{n||(n=t());try{s=await n,i=!0,a=!1}finally{n=void 0}return s};return async o=>((!i||o?.forceRefresh)&&(s=await u()),s)},Fs=t=>({setHttpHandler(e){t.httpHandler=e},httpHandler(){return t.httpHandler},updateHttpClientConfig(e,r){t.httpHandler?.updateHttpClientConfig(e,r)},httpHandlerConfigs(){return t.httpHandler.httpHandlerConfigs()}}),js=t=>({httpHandler:t.httpHandler()});var U;(function(t){t.HTTP="http",t.HTTPS="https"})(U||(U={}));var X;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(X||(X={}));const ce="__smithy_context",z=t=>typeof t=="string"?K(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),I=(t,e)=>{const r=[];if(t&&r.push(t),e)for(const s of e)r.push(s);return r},C=(t,e)=>`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,J=()=>{let t=[],e=[],r=!1;const s=new Set,n=c=>c.sort((h,l)=>Re[l.step]-Re[h.step]||Ee[l.priority||"normal"]-Ee[h.priority||"normal"]),i=c=>{let h=!1;const l=p=>{const y=I(p.name,p.aliases);if(y.includes(c)){h=!0;for(const f of y)s.delete(f);return!1}return!0};return t=t.filter(l),e=e.filter(l),h},a=c=>{let h=!1;const l=p=>{if(p.middleware===c){h=!0;for(const y of I(p.name,p.aliases))s.delete(y);return!1}return!0};return t=t.filter(l),e=e.filter(l),h},u=c=>(t.forEach(h=>{c.add(h.middleware,{...h})}),e.forEach(h=>{c.addRelativeTo(h.middleware,{...h})}),c.identifyOnResolve?.(m.identifyOnResolve()),c),o=c=>{const h=[];return c.before.forEach(l=>{l.before.length===0&&l.after.length===0?h.push(l):h.push(...o(l))}),h.push(c),c.after.reverse().forEach(l=>{l.before.length===0&&l.after.length===0?h.push(l):h.push(...o(l))}),h},d=(c=!1)=>{const h=[],l=[],p={};return t.forEach(f=>{const g={...f,before:[],after:[]};for(const w of I(g.name,g.aliases))p[w]=g;h.push(g)}),e.forEach(f=>{const g={...f,before:[],after:[]};for(const w of I(g.name,g.aliases))p[w]=g;l.push(g)}),l.forEach(f=>{if(f.toMiddleware){const g=p[f.toMiddleware];if(g===void 0){if(c)return;throw new Error(`${f.toMiddleware} is not found when adding ${C(f.name,f.aliases)} middleware ${f.relation} ${f.toMiddleware}`)}f.relation==="after"&&g.after.push(f),f.relation==="before"&&g.before.push(f)}}),n(h).map(o).reduce((f,g)=>(f.push(...g),f),[])},m={add:(c,h={})=>{const{name:l,override:p,aliases:y}=h,f={step:"initialize",priority:"normal",middleware:c,...h},g=I(l,y);if(g.length>0){if(g.some(w=>s.has(w))){if(!p)throw new Error(`Duplicate middleware name '${C(l,y)}'`);for(const w of g){const v=t.findIndex(D=>D.name===w||D.aliases?.some(Y=>Y===w));if(v===-1)continue;const b=t[v];if(b.step!==f.step||f.priority!==b.priority)throw new Error(`"${C(b.name,b.aliases)}" middleware with ${b.priority} priority in ${b.step} step cannot be overridden by "${C(l,y)}" middleware with ${f.priority} priority in ${f.step} step.`);t.splice(v,1)}}for(const w of g)s.add(w)}t.push(f)},addRelativeTo:(c,h)=>{const{name:l,override:p,aliases:y}=h,f={middleware:c,...h},g=I(l,y);if(g.length>0){if(g.some(w=>s.has(w))){if(!p)throw new Error(`Duplicate middleware name '${C(l,y)}'`);for(const w of g){const v=e.findIndex(D=>D.name===w||D.aliases?.some(Y=>Y===w));if(v===-1)continue;const b=e[v];if(b.toMiddleware!==f.toMiddleware||b.relation!==f.relation)throw new Error(`"${C(b.name,b.aliases)}" middleware ${b.relation} "${b.toMiddleware}" middleware cannot be overridden by "${C(l,y)}" middleware ${f.relation} "${f.toMiddleware}" middleware.`);e.splice(v,1)}}for(const w of g)s.add(w)}e.push(f)},clone:()=>u(J()),use:c=>{c.applyToStack(m)},remove:c=>typeof c=="string"?i(c):a(c),removeByTag:c=>{let h=!1;const l=p=>{const{tags:y,name:f,aliases:g}=p;if(y&&y.includes(c)){const w=I(f,g);for(const v of w)s.delete(v);return h=!0,!1}return!0};return t=t.filter(l),e=e.filter(l),h},concat:c=>{const h=u(J());return h.use(c),h.identifyOnResolve(r||h.identifyOnResolve()||(c.identifyOnResolve?.()??!1)),h},applyToStack:u,identify:()=>d(!0).map(c=>{const h=c.step??c.relation+" "+c.toMiddleware;return C(c.name,c.aliases)+" - "+h}),identifyOnResolve(c){return typeof c=="boolean"&&(r=c),r},resolve:(c,h)=>{for(const l of d().map(p=>p.middleware).reverse())c=l(c,h);return r&&console.log(m.identify()),c}};return m},Re={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Ee={high:3,normal:2,low:1};class qs{config;middlewareStack=J();initConfig;handlers;constructor(e){this.config=e;const{protocol:r,protocolSettings:s}=e;s&&typeof r=="function"&&(e.protocol=new r(s))}send(e,r,s){const n=typeof r!="function"?r:void 0,i=typeof r=="function"?r:s,a=n===void 0&&this.config.cacheMiddleware===!0;let u;if(a){this.handlers||(this.handlers=new WeakMap);const o=this.handlers;o.has(e.constructor)?u=o.get(e.constructor):(u=e.resolveMiddleware(this.middlewareStack,this.config,n),o.set(e.constructor,u))}else delete this.handlers,u=e.resolveMiddleware(this.middlewareStack,this.config,n);if(i)u(e).then(o=>i(null,o.output),o=>i(o)).catch(()=>{});else return u(e).then(o=>o.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class $ extends Uint8Array{static fromString(e,r="utf-8"){if(typeof e=="string")return r==="base64"?$.mutate(ut(e)):$.mutate(K(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,$.prototype),e}transformToString(e="utf-8"){return e==="base64"?ht(this):dt(this)}}const Te=async(t=new Uint8Array,e)=>{if(t instanceof Uint8Array)return $.mutate(t);if(!t)return $.mutate(new Uint8Array);const r=e.streamCollector(t);return $.mutate(await r)},Z=t=>typeof t=="function"?t():t,j=t=>t[ce]||(t[ce]={}),O=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},Ue=(t,e,r,s,n)=>({name:e,namespace:t,traits:r,input:s,output:n}),gt=t=>(e,r)=>async s=>{const{response:n}=await e(s),{operationSchema:i}=j(r),[,a,u,o,d,m]=i??[];try{const c=await t.protocol.deserializeResponse(Ue(a,u,o,d,m),{...t,...r},n);return{response:n,output:c}}catch(c){if(Object.defineProperty(c,"$response",{value:n,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in c)){const h="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{c.message+=`
|
|
3
|
+
`+h}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(h):r.logger?.warn?.(h)}typeof c.$responseBodyText<"u"&&c.$response&&(c.$response.body=c.$responseBodyText);try{if(pe.isInstance(n)){const{headers:l={}}=n,p=Object.entries(l);c.$metadata={httpStatusCode:n.statusCode,requestId:ee(/^x-[\w-]+-request-?id$/,p),extendedRequestId:ee(/^x-[\w-]+-id-2$/,p),cfId:ee(/^x-[\w-]+-cf-id$/,p)}}}catch{}}throw c}},ee=(t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1],wt=t=>(e,r)=>async s=>{const{operationSchema:n}=j(r),[,i,a,u,o,d]=n??[],m=r.endpointV2?.url&&t.urlParser?async()=>t.urlParser(r.endpointV2.url):t.endpoint,c=await t.protocol.serializeRequest(Ue(i,a,u,o,d),s.input,{...t,...r,endpoint:m});return e({...s,request:c})},St={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},bt={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Vs(t){return{applyToStack:e=>{e.add(wt(t),bt),e.add(gt(t),St),t.protocol.setSerdeContext(t)}}}function L(t){if(typeof t=="object")return t;t=t|0;const e={};let r=0;for(const s of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(t>>r++&1)===1&&(e[s]=1);return e}const ve={it:Symbol.for("@smithy/nor-struct-it")};class T{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=T.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,r){this.ref=e,this.memberName=r;const s=[];let n=e,i=e;for(this._isMemberSchema=!1;te(n);)s.push(n[1]),n=n[0],i=Z(n),this._isMemberSchema=!0;if(s.length>0){this.memberTraits={};for(let a=s.length-1;a>=0;--a){const u=s[a];Object.assign(this.memberTraits,L(u))}}else this.memberTraits=0;if(i instanceof T){const a=this.memberTraits;Object.assign(this,i),this.memberTraits=Object.assign({},a,i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??i.memberName;return}if(this.schema=Z(i),Rt(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(i),this.traits=0),this._isMemberSchema&&!r)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){const r=this.prototype.isPrototypeOf(e);return!r&&typeof e=="object"&&e!==null?e.symbol===this.symbol:r}static of(e){const r=Z(e);if(r instanceof T)return r;if(te(r)){const[s,n]=r;if(s instanceof T)return Object.assign(s.getMergedTraits(),L(n)),s;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}return new T(r)}getSchema(){const e=this.schema;return e[0]===0?e[4]:e}getName(e=!1){const{name:r}=this;return!e&&r&&r.includes("#")?r.split("#")[1]:r||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const e=this.getSchema();return typeof e=="number"?e>=64&&e<128:e[0]===1}isMapSchema(){const e=this.getSchema();return typeof e=="number"?e>=128&&e<=255:e[0]===2}isStructSchema(){const r=this.getSchema()[0];return r===3||r===-3||r===4}isUnionSchema(){return this.getSchema()[0]===4}isBlobSchema(){const e=this.getSchema();return e===21||e===42}isTimestampSchema(){const e=this.getSchema();return typeof e=="number"&&e>=4&&e<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:e}=this.getMergedTraits();return!!e||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return L(this.memberTraits)}getOwnTraits(){return L(this.traits)}getKeySchema(){const[e,r]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!r)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const s=this.getSchema(),n=e?15:s[4]??0;return k([n,0],"key")}getValueSchema(){const e=this.getSchema(),[r,s,n]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],i=typeof e=="number"?63&e:e&&typeof e=="object"&&(s||n)?e[3+e[0]]:r?15:void 0;if(i!=null)return k([i,0],s?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){const r=this.getSchema();if(this.isStructSchema()&&r[4].includes(e)){const s=r[4].indexOf(e),n=r[5][s];return k(te(n)?n:[n,0],e)}if(this.isDocumentSchema())return k([15,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${e}.`)}getMemberSchemas(){const e={};try{for(const[r,s]of this.structIterator())e[r]=s}catch{}return e}getEventStreamMember(){if(this.isStructSchema()){for(const[e,r]of this.structIterator())if(r.isStreaming()&&r.isStructSchema())return e}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const e=this.getSchema(),r=e[4].length;let s=e[ve.it];if(s&&r===s.length){yield*s;return}s=Array(r);for(let n=0;n<r;++n){const i=e[4][n],a=k([e[5][n],0],i);yield s[n]=[i,a]}e[ve.it]=s}}function k(t,e){if(t instanceof T)return Object.assign(t,{memberName:e,_isMemberSchema:!0});const r=T;return new r(t,e)}const te=t=>Array.isArray(t)&&t.length===2,Rt=t=>Array.isArray(t)&&t.length>=5;class A{namespace;schemas;exceptions;static registries=new Map;constructor(e,r=new Map,s=new Map){this.namespace=e,this.schemas=r,this.exceptions=s}static for(e){return A.registries.has(e)||A.registries.set(e,new A(e)),A.registries.get(e)}register(e,r){const s=this.normalizeShapeId(e);A.for(s.split("#")[0]).schemas.set(s,r)}getSchema(e){const r=this.normalizeShapeId(e);if(!this.schemas.has(r))throw new Error(`@smithy/core/schema - schema not found for ${r}`);return this.schemas.get(r)}registerError(e,r){const s=e,n=A.for(s[1]);n.schemas.set(s[1]+"#"+s[2],s),n.exceptions.set(s,r)}getErrorCtor(e){const r=e;return A.for(r[1]).exceptions.get(r)}getBaseException(){for(const e of this.exceptions.keys())if(Array.isArray(e)){const[,r,s]=e,n=r+"#"+s;if(n.startsWith("smithy.ts.sdk.synthetic.")&&n.endsWith("ServiceException"))return e}}find(e){return[...this.schemas.values()].find(e)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}}const Ce=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),S=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0")),Et=()=>{if(Ce)return Ce();const t=new Uint8Array(16);return crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128,S[t[0]]+S[t[1]]+S[t[2]]+S[t[3]]+"-"+S[t[4]]+S[t[5]]+"-"+S[t[6]]+S[t[7]]+"-"+S[t[8]]+S[t[9]]+"-"+S[t[10]]+S[t[11]]+S[t[12]]+S[t[13]]+S[t[14]]+S[t[15]]},N=function(e){return Object.assign(new String(e),{deserializeJSON(){return JSON.parse(String(e))},toString(){return String(e)},toJSON(){return String(e)}})};N.from=t=>t&&typeof t=="object"&&(t instanceof N||"deserializeJSON"in t)?t:typeof t=="string"||Object.getPrototypeOf(t)===String.prototype?N(String(t)):N(JSON.stringify(t));N.fromObject=N.from;const Ae=/^-?\d*(\.\d+)?$/;class ze{string;type;constructor(e,r){if(this.string=e,this.type=r,!Ae.test(e))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](e){if(!e||typeof e!="object")return!1;const r=e;return ze.prototype.isPrototypeOf(e)||r.type==="bigDecimal"&&Ae.test(r.string)}}class Tt{serdeContext;setSerdeContext(e){this.serdeContext=e}}class vt extends Tt{options;constructor(e){super(),this.options=e}getRequestType(){return P}getResponseType(){return pe}setSerdeContext(e){this.serdeContext=e,this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(e)}updateServiceEndpoint(e,r){if("url"in r){e.protocol=r.url.protocol,e.hostname=r.url.hostname,e.port=r.url.port?Number(r.url.port):void 0,e.path=r.url.pathname,e.fragment=r.url.hash||void 0,e.username=r.url.username||void 0,e.password=r.url.password||void 0,e.query||(e.query={});for(const[s,n]of r.url.searchParams.entries())e.query[s]=n;return e}else return e.protocol=r.protocol,e.hostname=r.hostname,e.port=r.port?Number(r.port):void 0,e.path=r.path,e.query={...r.query},e}setHostPrefix(e,r,s){if(this.serdeContext?.disableHostPrefix)return;const n=T.of(r.input),i=L(r.traits??{});if(i.endpoint){let a=i.endpoint?.[0];if(typeof a=="string"){const u=[...n.structIterator()].filter(([,o])=>o.getMergedTraits().hostLabel);for(const[o]of u){const d=s[o];if(typeof d!="string")throw new Error(`@smithy/core/schema - ${o} in input must be a string as hostLabel.`);a=a.replace(`{${o}}`,d)}e.hostname=a+e.hostname}}}deserializeMetadata(e){return{httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:e,requestSchema:r,initialRequest:s}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:r,initialRequest:s})}async deserializeEventStream({response:e,responseSchema:r,initialResponseContainer:s}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:r,initialResponseContainer:s})}async loadEventStreamCapability(){const{EventStreamSerde:e}=await ft(async()=>{const{EventStreamSerde:r}=await import("./index-BitrXVkV.js");return{EventStreamSerde:r}},__vite__mapDeps([0,1]));return new e({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(e,r,s,n,i){return[]}getEventStreamMarshaller(){const e=this.serdeContext;if(!e.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}}class Ws extends vt{async serializeRequest(e,r,s){const n=this.serializer,i={},a={},u=await s.endpoint(),o=T.of(e?.input),d=o.getSchema();let m;const c=new P({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:i,headers:a,body:void 0});u&&(this.updateServiceEndpoint(c,u),this.setHostPrefix(c,e,r));const h={...r};if(r){const l=o.getEventStreamMember();if(l){if(h[l]){const p={};for(const[y,f]of o.structIterator())y!==l&&h[y]&&(n.write(f,h[y]),p[y]=n.flush());m=await this.serializeEventStream({eventStream:h[l],requestSchema:o,initialRequest:p})}}else n.write(d,h),m=n.flush()}return c.headers=a,c.query=i,c.body=m,c.method="POST",c}async deserializeResponse(e,r,s){const n=this.deserializer,i=T.of(e.output),a={};if(s.statusCode>=300){const o=await Te(s.body,r);throw o.byteLength>0&&Object.assign(a,await n.read(15,o)),await this.handleError(e,r,s,a,this.deserializeMetadata(s)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const o in s.headers){const d=s.headers[o];delete s.headers[o],s.headers[o.toLowerCase()]=d}const u=i.getEventStreamMember();if(u)a[u]=await this.deserializeEventStream({response:s,responseSchema:i,initialResponseContainer:a});else{const o=await Te(s.body,r);o.byteLength>0&&Object.assign(a,await n.read(i,o))}return a.$metadata=this.deserializeMetadata(s),a}}function Gs(t,e){if(e.timestampFormat.useTrait&&t.isTimestampSchema()&&(t.getSchema()===5||t.getSchema()===6||t.getSchema()===7))return t.getSchema();const{httpLabel:r,httpPrefixHeaders:s,httpHeader:n,httpQuery:i}=t.getMergedTraits();return(e.httpBindings?typeof s=="string"||n?6:i||r?5:void 0:void 0)??e.timestampFormat.default}const re="***SensitiveInformation***";function ue(t,e){if(e==null)return e;const r=T.of(t);if(r.getMergedTraits().sensitive)return re;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return re}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return re}else if(r.isStructSchema()&&typeof e=="object"){const s=e,n={};for(const[i,a]of r.structIterator())s[i]!=null&&(n[i]=ue(a,s[i]));return n}return e}class Ct{middlewareStack=J();schema;static classBuilder(){return new At}resolveMiddlewareWithContext(e,r,s,{middlewareFn:n,clientName:i,commandName:a,inputFilterSensitiveLog:u,outputFilterSensitiveLog:o,smithyContext:d,additionalContext:m,CommandCtor:c}){for(const f of n.bind(this)(c,e,r,s))this.middlewareStack.use(f);const h=e.concat(this.middlewareStack),{logger:l}=r,p={logger:l,clientName:i,commandName:a,inputFilterSensitiveLog:u,outputFilterSensitiveLog:o,[ce]:{commandInstance:this,...d},...m},{requestHandler:y}=r;return h.resolve(f=>y.handle(f.request,s||{}),p)}}class At{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,r,s={}){return this._smithyContext={service:e,operation:r,...s},this}c(e={}){return this._additionalContext=e,this}n(e,r){return this._clientName=e,this._commandName=r,this}f(e=s=>s,r=s=>s){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=r,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let r;return r=class extends Ct{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[s]){super(),this.input=s??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(s,n,i){const a=e._operationSchema,u=a?.[4]??a?.input,o=a?.[5]??a?.output;return this.resolveMiddlewareWithContext(s,n,i,{CommandCtor:r,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(a?ue.bind(null,u):d=>d),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(a?ue.bind(null,o):d=>d),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}class H extends Error{$fault;$response;$retryable;$metadata;constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const r=e;return H.prototype.isPrototypeOf(r)||!!r.$fault&&!!r.$metadata&&(r.$fault==="client"||r.$fault==="server")}static[Symbol.hasInstance](e){if(!e)return!1;const r=e;return this===H?H.isInstance(e):H.isInstance(e)?r.name&&this.name?this.prototype.isPrototypeOf(e)||r.name===this.name:this.prototype.isPrototypeOf(e):!1}}const Ks=(t,e={})=>{Object.entries(e).filter(([,s])=>s!==void 0).forEach(([s,n])=>{(t[s]==null||t[s]==="")&&(t[s]=n)});const r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t},Xs=t=>{switch(t){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},xt=t=>{const e=[];for(const r in X){const s=X[r];t[s]!==void 0&&e.push({algorithmId:()=>s,checksumConstructor:()=>t[s]})}return{addChecksumAlgorithm(r){e.push(r)},checksumAlgorithms(){return e}}},It=t=>{const e={};return t.checksumAlgorithms().forEach(r=>{e[r.algorithmId()]=r.checksumConstructor()}),e},Mt=t=>({setRetryStrategy(e){t.retryStrategy=e},retryStrategy(){return t.retryStrategy}}),$t=t=>{const e={};return e.retryStrategy=t.retryStrategy(),e},Js=t=>Object.assign(xt(t),Mt(t)),Qs=t=>Object.assign(It(t),$t(t));class Ot{trace(){}debug(){}info(){}warn(){}error(){}}const Pt=(t,e)=>{if(!e||e.length===0)return t;const r=[];for(const s of e)for(const n of t)n.schemeId.split("#")[1]===s&&r.push(n);for(const s of t)r.find(({schemeId:n})=>n===s.schemeId)||r.push(s);return r};function Nt(t){const e=new Map;for(const r of t)e.set(r.schemeId,r);return e}const _t=(t,e)=>(r,s)=>async n=>{const i=t.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(t,s,n.input)),a=t.authSchemePreference?await t.authSchemePreference():[],u=Pt(i,a),o=Nt(t.httpAuthSchemes),d=j(s),m=[];for(const c of u){const h=o.get(c.schemeId);if(!h){m.push(`HttpAuthScheme \`${c.schemeId}\` was not enabled for this service.`);continue}const l=h.identityProvider(await e.identityProviderConfigProvider(t));if(!l){m.push(`HttpAuthScheme \`${c.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:p={},signingProperties:y={}}=c.propertiesExtractor?.(t,s)||{};c.identityProperties=Object.assign(c.identityProperties||{},p),c.signingProperties=Object.assign(c.signingProperties||{},y),d.selectedHttpAuthScheme={httpAuthOption:c,identity:await l(c.identityProperties),signer:h.signer};break}if(!d.selectedHttpAuthScheme)throw new Error(m.join(`
|
|
4
|
+
`));return r(n)},Dt={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},Ys=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:s=>{s.addRelativeTo(_t(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),Dt)}}),kt={name:"serializerMiddleware"},Lt=t=>e=>{throw e},Ht=(t,e)=>{},Ut=t=>(e,r)=>async s=>{if(!P.isInstance(s.request))return e(s);const i=j(r).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:a={}},identity:u,signer:o}=i,d=await e({...s,request:await o.sign(s.request,u,a)}).catch((o.errorHandler||Lt)(a));return(o.successHandler||Ht)(d.response,a),d},zt={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Zs=t=>({applyToStack:e=>{e.addRelativeTo(Ut(),zt)}});function Bt(t,e,r){t.__smithy_context?t.__smithy_context.features||(t.__smithy_context.features={}):t.__smithy_context={features:{}},t.__smithy_context.features[e]=r}class en{authSchemes=new Map;constructor(e){for(const[r,s]of Object.entries(e))s!==void 0&&this.authSchemes.set(r,s)}getIdentityProvider(e){return this.authSchemes.get(e)}}class tn{async sign(e,r,s){return e}}const Ft=t=>function(r){return qt(r)&&r.expiration.getTime()-Date.now()<t},jt=3e5,rn=Ft(jt),qt=t=>t.expiration!==void 0,sn=(t,e,r)=>{if(t===void 0)return;const s=typeof t!="function"?async()=>Promise.resolve(t):t;let n,i,a,u=!1;const o=async d=>{i||(i=s(d));try{n=await i,a=!0,u=!1}finally{i=void 0}return n};return e===void 0?async d=>((!a||d?.forceRefresh)&&(n=await o(d)),n):async d=>((!a||d?.forceRefresh)&&(n=await o(d)),u?n:r(n)?(e(n)&&await o(d),n):(u=!0,n))};class nn{capacity;data=new Map;parameters=[];constructor({size:e,params:r}){this.capacity=e??50,r&&(this.parameters=r)}get(e,r){const s=this.hash(e);if(s===!1)return r();if(!this.data.has(s)){if(this.data.size>this.capacity+10){const n=this.data.keys();let i=0;for(;;){const{value:a,done:u}=n.next();if(this.data.delete(a),u||++i>10)break}}this.data.set(s,r())}return this.data.get(s)}size(){return this.data.size}hash(e){let r="";const{parameters:s}=this;if(s.length===0)return!1;for(const n of s){const i=String(e[n]??"");if(i.includes("|;"))return!1;r+=i+"|;"}return r}}const Vt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),Wt=t=>Vt.test(t)||t.startsWith("[")&&t.endsWith("]"),Gt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),ye=(t,e=!1)=>{if(!e)return Gt.test(t);const r=t.split(".");for(const s of r)if(!ye(s))return!1;return!0},xe={},B="endpoints";function x(t){return typeof t!="object"||t==null?t:"ref"in t?`$${x(t.ref)}`:"fn"in t?`${t.fn}(${(t.argv||[]).map(x).join(", ")})`:JSON.stringify(t,null,2)}class R extends Error{constructor(e){super(e),this.name="EndpointError"}}const Kt=(t,e)=>t===e,Xt=t=>{const e=t.split("."),r=[];for(const s of e){const n=s.indexOf("[");if(n!==-1){if(s.indexOf("]")!==s.length-1)throw new R(`Path: '${t}' does not end with ']'`);const i=s.slice(n+1,-1);if(Number.isNaN(parseInt(i)))throw new R(`Invalid array index: '${i}' in path: '${t}'`);n!==0&&r.push(s.slice(0,n)),r.push(i)}else r.push(s)}return r},Be=(t,e)=>Xt(e).reduce((r,s)=>{if(typeof r!="object")throw new R(`Index '${s}' in '${e}' not found in '${JSON.stringify(t)}'`);return Array.isArray(r)?r[parseInt(s)]:r[s]},t),Jt=t=>t!=null,Qt=t=>!t,se={[U.HTTP]:80,[U.HTTPS]:443},Yt=t=>{const e=(()=>{try{if(t instanceof URL)return t;if(typeof t=="object"&&"hostname"in t){const{hostname:h,port:l,protocol:p="",path:y="",query:f={}}=t,g=new URL(`${p}//${h}${l?`:${l}`:""}${y}`);return g.search=Object.entries(f).map(([w,v])=>`${w}=${v}`).join("&"),g}return new URL(t)}catch{return null}})();if(!e)return console.error(`Unable to parse ${JSON.stringify(t)} as a whatwg URL.`),null;const r=e.href,{host:s,hostname:n,pathname:i,protocol:a,search:u}=e;if(u)return null;const o=a.slice(0,-1);if(!Object.values(U).includes(o))return null;const d=Wt(n),m=r.includes(`${s}:${se[o]}`)||typeof t=="string"&&t.includes(`${s}:${se[o]}`),c=`${s}${m?`:${se[o]}`:""}`;return{scheme:o,authority:c,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:d}},Zt=(t,e)=>t===e,er=(t,e,r,s)=>e>=r||t.length<r?null:s?t.substring(t.length-r,t.length-e):t.substring(e,r),tr=t=>encodeURIComponent(t).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),rr={booleanEquals:Kt,getAttr:Be,isSet:Jt,isValidHostLabel:ye,not:Qt,parseURL:Yt,stringEquals:Zt,substring:er,uriEncode:tr},Fe=(t,e)=>{const r=[],s={...e.endpointParams,...e.referenceRecord};let n=0;for(;n<t.length;){const i=t.indexOf("{",n);if(i===-1){r.push(t.slice(n));break}r.push(t.slice(n,i));const a=t.indexOf("}",i);if(a===-1){r.push(t.slice(i));break}t[i+1]==="{"&&t[a+1]==="}"&&(r.push(t.slice(i+1,a)),n=a+2);const u=t.substring(i+1,a);if(u.includes("#")){const[o,d]=u.split("#");r.push(Be(s[o],d))}else r.push(s[u]);n=a+1}return r.join("")},sr=({ref:t},e)=>({...e.endpointParams,...e.referenceRecord})[t],Q=(t,e,r)=>{if(typeof t=="string")return Fe(t,r);if(t.fn)return qe.callFunction(t,r);if(t.ref)return sr(t,r);throw new R(`'${e}': ${String(t)} is not a string, function or reference.`)},je=({fn:t,argv:e},r)=>{const s=e.map(i=>["boolean","number"].includes(typeof i)?i:qe.evaluateExpression(i,"arg",r)),n=t.split(".");return n[0]in xe&&n[1]!=null?xe[n[0]][n[1]](...s):rr[t](...s)},qe={evaluateExpression:Q,callFunction:je},nr=({assign:t,...e},r)=>{if(t&&t in r.referenceRecord)throw new R(`'${t}' is already defined in Reference Record.`);const s=je(e,r);return r.logger?.debug?.(`${B} evaluateCondition: ${x(e)} = ${x(s)}`),{result:s===""?!0:!!s,...t!=null&&{toAssign:{name:t,value:s}}}},ge=(t=[],e)=>{const r={};for(const s of t){const{result:n,toAssign:i}=nr(s,{...e,referenceRecord:{...e.referenceRecord,...r}});if(!n)return{result:n};i&&(r[i.name]=i.value,e.logger?.debug?.(`${B} assign: ${i.name} := ${x(i.value)}`))}return{result:!0,referenceRecord:r}},ir=(t,e)=>Object.entries(t).reduce((r,[s,n])=>({...r,[s]:n.map(i=>{const a=Q(i,"Header value entry",e);if(typeof a!="string")throw new R(`Header '${s}' value '${a}' is not a string`);return a})}),{}),Ve=(t,e)=>Object.entries(t).reduce((r,[s,n])=>({...r,[s]:Ge.getEndpointProperty(n,e)}),{}),We=(t,e)=>{if(Array.isArray(t))return t.map(r=>We(r,e));switch(typeof t){case"string":return Fe(t,e);case"object":if(t===null)throw new R(`Unexpected endpoint property: ${t}`);return Ge.getEndpointProperties(t,e);case"boolean":return t;default:throw new R(`Unexpected endpoint property type: ${typeof t}`)}},Ge={getEndpointProperty:We,getEndpointProperties:Ve},ar=(t,e)=>{const r=Q(t,"Endpoint URL",e);if(typeof r=="string")try{return new URL(r)}catch(s){throw console.error(`Failed to construct URL with ${r}`,s),s}throw new R(`Endpoint URL must be a string, got ${typeof r}`)},or=(t,e)=>{const{conditions:r,endpoint:s}=t,{result:n,referenceRecord:i}=ge(r,e);if(!n)return;const a={...e,referenceRecord:{...e.referenceRecord,...i}},{url:u,properties:o,headers:d}=s;return e.logger?.debug?.(`${B} Resolving endpoint from template: ${x(s)}`),{...d!=null&&{headers:ir(d,a)},...o!=null&&{properties:Ve(o,a)},url:ar(u,a)}},cr=(t,e)=>{const{conditions:r,error:s}=t,{result:n,referenceRecord:i}=ge(r,e);if(n)throw new R(Q(s,"Error",{...e,referenceRecord:{...e.referenceRecord,...i}}))},Ke=(t,e)=>{for(const r of t)if(r.type==="endpoint"){const s=or(r,e);if(s)return s}else if(r.type==="error")cr(r,e);else if(r.type==="tree"){const s=Xe.evaluateTreeRule(r,e);if(s)return s}else throw new R(`Unknown endpoint rule: ${r}`);throw new R("Rules evaluation failed")},ur=(t,e)=>{const{conditions:r,rules:s}=t,{result:n,referenceRecord:i}=ge(r,e);if(n)return Xe.evaluateRules(s,{...e,referenceRecord:{...e.referenceRecord,...i}})},Xe={evaluateRules:Ke,evaluateTreeRule:ur},an=(t,e)=>{const{endpointParams:r,logger:s}=e,{parameters:n,rules:i}=t;e.logger?.debug?.(`${B} Initial EndpointParams: ${x(r)}`);const a=Object.entries(n).filter(([,d])=>d.default!=null).map(([d,m])=>[d,m.default]);if(a.length>0)for(const[d,m]of a)r[d]=r[d]??m;const u=Object.entries(n).filter(([,d])=>d.required).map(([d])=>d);for(const d of u)if(r[d]==null)throw new R(`Missing required parameter: '${d}'`);const o=Ke(i,{endpointParams:r,logger:s,referenceRecord:{}});return e.logger?.debug?.(`${B} Resolved endpoint: ${x(o)}`),o};function hr(t){const e={};if(t=t.replace(/^\?/,""),t)for(const r of t.split("&")){let[s,n=null]=r.split("=");s=decodeURIComponent(s),n&&(n=decodeURIComponent(n)),s in e?Array.isArray(e[s])?e[s].push(n):e[s]=[e[s],n]:e[s]=n}return e}const he=t=>{if(typeof t=="string")return he(new URL(t));const{hostname:e,pathname:r,port:s,protocol:n,search:i}=t;let a;return i&&(a=hr(i)),{hostname:e,port:s?parseInt(s):void 0,protocol:n,path:r,query:a}},dr="X-Amz-Algorithm",lr="X-Amz-Credential",Je="X-Amz-Date",fr="X-Amz-SignedHeaders",mr="X-Amz-Expires",Qe="X-Amz-Signature",Ye="X-Amz-Security-Token",Ze="authorization",et=Je.toLowerCase(),pr="date",yr=[Ze,et,pr],gr=Qe.toLowerCase(),de="x-amz-content-sha256",wr=Ye.toLowerCase(),Sr={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},br=/^proxy-/,Rr=/^sec-/,ne="AWS4-HMAC-SHA256",Er="AWS4-HMAC-SHA256-PAYLOAD",Tr="UNSIGNED-PAYLOAD",vr=50,tt="aws4_request",Cr=3600*24*7,q={},ie=[],ae=(t,e,r)=>`${t}/${e}/${r}/${tt}`,Ar=async(t,e,r,s,n)=>{const i=await Ie(t,e.secretAccessKey,e.accessKeyId),a=`${r}:${s}:${n}:${M(i)}:${e.sessionToken}`;if(a in q)return q[a];for(ie.push(a);ie.length>vr;)delete q[ie.shift()];let u=`AWS4${e.secretAccessKey}`;for(const o of[r,s,n,tt])u=await Ie(t,u,o);return q[a]=u},Ie=(t,e,r)=>{const s=new t(e);return s.update(z(r)),s.digest()},Me=({headers:t},e,r)=>{const s={};for(const n of Object.keys(t).sort()){if(t[n]==null)continue;const i=n.toLowerCase();(i in Sr||e?.has(i)||br.test(i)||Rr.test(i))&&(!r||r&&!r.has(i))||(s[i]=t[n].trim().replace(/\s+/g," "))}return s},xr=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]",oe=async({headers:t,body:e},r)=>{for(const s of Object.keys(t))if(s.toLowerCase()===de)return t[s];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||xr(e)){const s=new r;return s.update(z(e)),M(await s.digest())}return Tr};class Ir{format(e){const r=[];for(const i of Object.keys(e)){const a=K(i);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(e[i]))}const s=new Uint8Array(r.reduce((i,a)=>i+a.byteLength,0));let n=0;for(const i of r)s.set(i,n),n+=i.byteLength;return s}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,e.value,!1),new Uint8Array(r.buffer);case"integer":const s=new DataView(new ArrayBuffer(5));return s.setUint8(0,4),s.setInt32(1,e.value,!1),new Uint8Array(s.buffer);case"long":const n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const a=new Uint8Array(i.buffer);return a.set(e.value,3),a;case"string":const u=K(e.value),o=new DataView(new ArrayBuffer(3+u.byteLength));o.setUint8(0,7),o.setUint16(1,u.byteLength,!1);const d=new Uint8Array(o.buffer);return d.set(u,3),d;case"timestamp":const m=new Uint8Array(9);return m[0]=8,m.set(we.fromNumber(e.value.valueOf()).bytes,1),m;case"uuid":if(!Mr.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const c=new Uint8Array(17);return c[0]=9,c.set(lt(e.value.replace(/\-/g,"")),1),c}}}var $e;(function(t){t[t.boolTrue=0]="boolTrue",t[t.boolFalse=1]="boolFalse",t[t.byte=2]="byte",t[t.short=3]="short",t[t.integer=4]="integer",t[t.long=5]="long",t[t.byteArray=6]="byteArray",t[t.string=7]="string",t[t.timestamp=8]="timestamp",t[t.uuid=9]="uuid"})($e||($e={}));const Mr=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class we{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let s=7,n=Math.abs(Math.round(e));s>-1&&n>0;s--,n/=256)r[s]=n;return e<0&&Oe(r),new we(r)}valueOf(){const e=this.bytes.slice(0),r=e[0]&128;return r&&Oe(e),parseInt(M(e),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function Oe(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const $r=(t,e)=>{t=t.toLowerCase();for(const r of Object.keys(e))if(t===r.toLowerCase())return!0;return!1},Or=(t,e={})=>{const{headers:r,query:s={}}=P.clone(t);for(const n of Object.keys(r)){const i=n.toLowerCase();(i.slice(0,6)==="x-amz-"&&!e.unhoistableHeaders?.has(i)||e.hoistableHeaders?.has(i))&&(s[n]=r[n],delete r[n])}return{...t,headers:r,query:s}},Pe=t=>{t=P.clone(t);for(const e of Object.keys(t.headers))yr.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t},Pr=({query:t={}})=>{const e=[],r={};for(const s of Object.keys(t)){if(s.toLowerCase()===gr)continue;const n=V(s);e.push(n);const i=t[s];typeof i=="string"?r[n]=`${n}=${V(i)}`:Array.isArray(i)&&(r[n]=i.slice(0).reduce((a,u)=>a.concat([`${n}=${V(u)}`]),[]).sort().join("&"))}return e.sort().map(s=>r[s]).filter(s=>s).join("&")},Nr=t=>_r(t).toISOString().replace(/\.\d{3}Z$/,"Z"),_r=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class Dr{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:r,region:s,service:n,sha256:i,uriEscapePath:a=!0}){this.service=n,this.sha256=i,this.uriEscapePath=a,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=O(s),this.credentialProvider=O(r)}createCanonicalRequest(e,r,s){const n=Object.keys(r).sort();return`${e.method}
|
|
5
|
+
${this.getCanonicalPath(e)}
|
|
6
|
+
${Pr(e)}
|
|
7
|
+
${n.map(i=>`${i}:${r[i]}`).join(`
|
|
8
|
+
`)}
|
|
9
|
+
|
|
10
|
+
${n.join(";")}
|
|
11
|
+
${s}`}async createStringToSign(e,r,s,n){const i=new this.sha256;i.update(z(s));const a=await i.digest();return`${n}
|
|
12
|
+
${e}
|
|
13
|
+
${r}
|
|
14
|
+
${M(a)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const r=[];for(const i of e.split("/"))i?.length!==0&&i!=="."&&(i===".."?r.pop():r.push(i));const s=`${e?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&e?.endsWith("/")?"/":""}`;return V(s).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(e){const r=Nr(e).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class on extends Dr{headerFormatter=new Ir;constructor({applyChecksum:e,credentials:r,region:s,service:n,sha256:i,uriEscapePath:a=!0}){super({applyChecksum:e,credentials:r,region:s,service:n,sha256:i,uriEscapePath:a})}async presign(e,r={}){const{signingDate:s=new Date,expiresIn:n=3600,unsignableHeaders:i,unhoistableHeaders:a,signableHeaders:u,hoistableHeaders:o,signingRegion:d,signingService:m}=r,c=await this.credentialProvider();this.validateResolvedCredentials(c);const h=d??await this.regionProvider(),{longDate:l,shortDate:p}=this.formatDate(s);if(n>Cr)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const y=ae(p,h,m??this.service),f=Or(Pe(e),{unhoistableHeaders:a,hoistableHeaders:o});c.sessionToken&&(f.query[Ye]=c.sessionToken),f.query[dr]=ne,f.query[lr]=`${c.accessKeyId}/${y}`,f.query[Je]=l,f.query[mr]=n.toString(10);const g=Me(f,i,u);return f.query[fr]=this.getCanonicalHeaderList(g),f.query[Qe]=await this.getSignature(l,y,this.getSigningKey(c,h,p,m),this.createCanonicalRequest(f,g,await oe(e,this.sha256))),f}async sign(e,r){return typeof e=="string"?this.signString(e,r):e.headers&&e.payload?this.signEvent(e,r):e.message?this.signMessage(e,r):this.signRequest(e,r)}async signEvent({headers:e,payload:r},{signingDate:s=new Date,priorSignature:n,signingRegion:i,signingService:a}){const u=i??await this.regionProvider(),{shortDate:o,longDate:d}=this.formatDate(s),m=ae(o,u,a??this.service),c=await oe({headers:{},body:r},this.sha256),h=new this.sha256;h.update(e);const l=M(await h.digest()),p=[Er,d,m,n,l,c].join(`
|
|
15
|
+
`);return this.signString(p,{signingDate:s,signingRegion:u,signingService:a})}async signMessage(e,{signingDate:r=new Date,signingRegion:s,signingService:n}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:r,signingRegion:s,signingService:n,priorSignature:e.priorSignature}).then(a=>({message:e.message,signature:a}))}async signString(e,{signingDate:r=new Date,signingRegion:s,signingService:n}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const a=s??await this.regionProvider(),{shortDate:u}=this.formatDate(r),o=new this.sha256(await this.getSigningKey(i,a,u,n));return o.update(z(e)),M(await o.digest())}async signRequest(e,{signingDate:r=new Date,signableHeaders:s,unsignableHeaders:n,signingRegion:i,signingService:a}={}){const u=await this.credentialProvider();this.validateResolvedCredentials(u);const o=i??await this.regionProvider(),d=Pe(e),{longDate:m,shortDate:c}=this.formatDate(r),h=ae(c,o,a??this.service);d.headers[et]=m,u.sessionToken&&(d.headers[wr]=u.sessionToken);const l=await oe(d,this.sha256);!$r(de,d.headers)&&this.applyChecksum&&(d.headers[de]=l);const p=Me(d,n,s),y=await this.getSignature(m,h,this.getSigningKey(u,o,c,a),this.createCanonicalRequest(d,p,l));return d.headers[Ze]=`${ne} Credential=${u.accessKeyId}/${h}, SignedHeaders=${this.getCanonicalHeaderList(p)}, Signature=${y}`,d}async getSignature(e,r,s,n){const i=await this.createStringToSign(e,r,n,ne),a=new this.sha256(await s);return a.update(z(i)),M(await a.digest())}getSigningKey(e,r,s,n){return Ar(this.sha256,e,s,r,n||this.service)}}const Ne=typeof TextEncoder=="function"?new TextEncoder:null,cn=t=>{if(typeof t=="string"){if(Ne)return Ne.encode(t).byteLength;let e=t.length;for(let r=e-1;r>=0;r--){const s=t.charCodeAt(r);s>127&&s<=2047?e++:s>2047&&s<=65535&&(e+=2),s>=56320&&s<=57343&&r--}return e}else{if(typeof t.byteLength=="number")return t.byteLength;if(typeof t.size=="number")return t.size}throw new Error(`Body Length computation failed for ${t}`)},un=!1,hn=!1,_e=new Set,kr=(t,e=ye)=>{if(!_e.has(t)&&!e(t))if(t==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${t}" is not a valid hostname component.`);else _e.add(t)},rt=t=>typeof t=="string"&&(t.startsWith("fips-")||t.endsWith("-fips")),Lr=t=>rt(t)?["fips-aws-global","aws-fips"].includes(t)?"us-east-1":t.replace(/fips-(dkr-|prod-)?|-fips/,""):t,dn=t=>{const{region:e,useFipsEndpoint:r}=t;if(!e)throw new Error("Region is missing");return Object.assign(t,{region:async()=>{const s=typeof e=="function"?await e():e,n=Lr(s);return kr(n),n},useFipsEndpoint:async()=>{const s=typeof e=="string"?e:await e();return rt(s)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},De="content-length";function Hr(t){return e=>async r=>{const s=r.request;if(P.isInstance(s)){const{body:n,headers:i}=s;if(n&&Object.keys(i).map(a=>a.toLowerCase()).indexOf(De)===-1)try{const a=t(n);s.headers={...s.headers,[De]:String(a)}}catch{}}return e({...r,request:s})}}const Ur={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},ln=t=>({applyToStack:e=>{e.add(Hr(t.bodyLengthChecker),Ur)}}),zr=async t=>{const e=t?.Bucket||"";if(typeof t.Bucket=="string"&&(t.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Vr(e)){if(t.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!qr(e)||e.indexOf(".")!==-1&&!String(t.Endpoint).startsWith("http:")||e.toLowerCase()!==e||e.length<3)&&(t.ForcePathStyle=!0);return t.DisableMultiRegionAccessPoints&&(t.disableMultiRegionAccessPoints=!0,t.DisableMRAP=!0),t},Br=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Fr=/(\d+\.){3}\d+/,jr=/\.\./,qr=t=>Br.test(t)&&!Fr.test(t)&&!jr.test(t),Vr=t=>{const[e,r,s,,,n]=t.split(":"),i=e==="arn"&&t.split(":").length>=6,a=!!(i&&r&&s&&n);if(i&&!a)throw new Error(`Invalid ARN: ${t} was an invalid ARN.`);return a},Wr=(t,e,r,s=!1)=>{const n=async()=>{let i;return s?i=r.clientContextParams?.[t]??r[t]??r[e]:i=r[t]??r[e],typeof i=="function"?i():i};return t==="credentialScope"||e==="CredentialScope"?async()=>{const i=typeof r.credentials=="function"?await r.credentials():r.credentials;return i?.credentialScope??i?.CredentialScope}:t==="accountId"||e==="AccountId"?async()=>{const i=typeof r.credentials=="function"?await r.credentials():r.credentials;return i?.accountId??i?.AccountId}:t==="endpoint"||e==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;const i=await n();if(i&&typeof i=="object"){if("url"in i)return i.url.href;if("hostname"in i){const{protocol:a,hostname:u,port:o,path:d}=i;return`${a}//${u}${o?":"+o:""}${d}`}}return i}:n},st=async t=>{},nt=t=>typeof t=="object"?"url"in t?he(t.url):t:he(t),Gr=async(t,e,r,s)=>{if(!r.isCustomEndpoint){let a;r.serviceConfiguredEndpoint?a=await r.serviceConfiguredEndpoint():a=await st(r.serviceId),a&&(r.endpoint=()=>Promise.resolve(nt(a)),r.isCustomEndpoint=!0)}const n=await Kr(t,e,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(n,s)},Kr=async(t,e,r)=>{const s={},n=e?.getEndpointParameterInstructions?.()||{};for(const[i,a]of Object.entries(n))switch(a.type){case"staticContextParams":s[i]=a.value;break;case"contextParams":s[i]=t[a.name];break;case"clientContextParams":case"builtInParams":s[i]=await Wr(a.name,i,r,a.type!=="builtInParams")();break;case"operationContextParams":s[i]=a.get(t);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(n).length===0&&Object.assign(s,r),String(r.serviceId).toLowerCase()==="s3"&&await zr(s),s},Xr=({config:t,instructions:e})=>(r,s)=>async n=>{t.isCustomEndpoint&&Bt(s,"ENDPOINT_OVERRIDE","N");const i=await Gr(n.input,{getEndpointParameterInstructions(){return e}},{...t},s);s.endpointV2=i,s.authSchemes=i.properties?.authSchemes;const a=s.authSchemes?.[0];if(a){s.signing_region=a.signingRegion,s.signing_service=a.signingName;const o=j(s)?.selectedHttpAuthScheme?.httpAuthOption;o&&(o.signingProperties=Object.assign(o.signingProperties||{},{signing_region:a.signingRegion,signingRegion:a.signingRegion,signing_service:a.signingName,signingName:a.signingName,signingRegionSet:a.signingRegionSet},a.properties))}return r({...n})},Jr={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:kt.name},fn=(t,e)=>({applyToStack:r=>{r.addRelativeTo(Xr({config:t,instructions:e}),Jr)}}),mn=t=>{const e=t.tls??!0,{endpoint:r,useDualstackEndpoint:s,useFipsEndpoint:n}=t,i=r!=null?async()=>nt(await O(r)()):void 0,u=Object.assign(t,{endpoint:i,tls:e,isCustomEndpoint:!!r,useDualstackEndpoint:O(s??!1),useFipsEndpoint:O(n??!1)});let o;return u.serviceConfiguredEndpoint=async()=>(t.serviceId&&!o&&(o=st(t.serviceId)),o),u};var _;(function(t){t.STANDARD="standard",t.ADAPTIVE="adaptive"})(_||(_={}));const le=3,pn=_.STANDARD,Qr=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Yr=["TimeoutError","RequestTimeout","RequestTimeoutException"],Zr=[500,502,503,504],es=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],ts=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],rs=t=>t?.$retryable!==void 0,ss=t=>t.$metadata?.clockSkewCorrected,ns=t=>{const e=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return t&&t instanceof TypeError?e.has(t.message):!1},it=t=>t.$metadata?.httpStatusCode===429||Qr.includes(t.name)||t.$retryable?.throttling==!0,Se=(t,e=0)=>rs(t)||ss(t)||Yr.includes(t.name)||es.includes(t?.code||"")||ts.includes(t?.code||"")||Zr.includes(t.$metadata?.httpStatusCode||0)||ns(t)||t.cause!==void 0&&e<=10&&Se(t.cause,e+1),is=t=>{if(t.$metadata?.httpStatusCode!==void 0){const e=t.$metadata.httpStatusCode;return 500<=e&&e<=599&&!Se(t)}return!1};class be{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=!1;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(e){this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const r=this.getCurrentTimeInSeconds();this.lastThrottleTime=r,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const r=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(s=>be.setTimeoutFn(s,r))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}const r=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+r),this.lastTimestamp=e}updateClientSendingRate(e){let r;if(this.updateMeasuredRate(),it(e)){const n=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=n,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(n),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const s=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(s)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),r=Math.floor(e*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){const s=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(s*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(e){return parseFloat(e.toFixed(8))}}const fe=100,at=20*1e3,as=500,ke=500,os=5,cs=10,us=1,hs="amz-sdk-invocation-id",ds="amz-sdk-request",ls=()=>{let t=fe;return{computeNextBackoffDelay:s=>Math.floor(Math.min(at,Math.random()*2**s*t)),setDelayBase:s=>{t=s}}},Le=({retryDelay:t,retryCount:e,retryCost:r})=>({getRetryCount:()=>e,getRetryDelay:()=>Math.min(at,t),getRetryCost:()=>r});class ot{maxAttempts;mode=_.STANDARD;capacity=ke;retryBackoffStrategy=ls();maxAttemptsProvider;constructor(e){this.maxAttempts=e,this.maxAttemptsProvider=typeof e=="function"?e:async()=>e}async acquireInitialRetryToken(e){return Le({retryDelay:fe,retryCount:0})}async refreshRetryTokenForRetry(e,r){const s=await this.getMaxAttempts();if(this.shouldRetry(e,r,s)){const n=r.errorType;this.retryBackoffStrategy.setDelayBase(n==="THROTTLING"?as:fe);const i=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),a=r.retryAfterHint?Math.max(r.retryAfterHint.getTime()-Date.now()||0,i):i,u=this.getCapacityCost(n);return this.capacity-=u,Le({retryDelay:a,retryCount:e.getRetryCount()+1,retryCost:u})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(ke,this.capacity+(e.getRetryCost()??us))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${le}`),le}}shouldRetry(e,r,s){return e.getRetryCount()+1<s&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(e){return e==="TRANSIENT"?cs:os}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class fs{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=_.ADAPTIVE;constructor(e,r){this.maxAttemptsProvider=e;const{rateLimiter:s}=r??{};this.rateLimiter=s??new be,this.standardRetryStrategy=new ot(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,r){return this.rateLimiter.updateClientSendingRate(r),this.standardRetryStrategy.refreshRetryTokenForRetry(e,r)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const ms=t=>t instanceof Error?t:t instanceof Object?Object.assign(new Error,t):typeof t=="string"?new Error(t):new Error(`AWS SDK error wrapper for ${t}`),yn=t=>{const{retryStrategy:e,retryMode:r,maxAttempts:s}=t,n=O(s??le);return Object.assign(t,{maxAttempts:n,retryStrategy:async()=>e||(await O(r)()===_.ADAPTIVE?new fs(n):new ot(n))})},ps=t=>t?.body instanceof ReadableStream,ys=t=>(e,r)=>async s=>{let n=await t.retryStrategy();const i=await t.maxAttempts();if(gs(n)){n=n;let a=await n.acquireInitialRetryToken(r.partition_id),u=new Error,o=0,d=0;const{request:m}=s,c=P.isInstance(m);for(c&&(m.headers[hs]=Et());;)try{c&&(m.headers[ds]=`attempt=${o+1}; max=${i}`);const{response:h,output:l}=await e(s);return n.recordSuccess(a),l.$metadata.attempts=o+1,l.$metadata.totalRetryDelay=d,{response:h,output:l}}catch(h){const l=ws(h);if(u=ms(h),c&&ps(m))throw(r.logger instanceof Ot?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),u;try{a=await n.refreshRetryTokenForRetry(a,l)}catch{throw u.$metadata||(u.$metadata={}),u.$metadata.attempts=o+1,u.$metadata.totalRetryDelay=d,u}o=a.getRetryCount();const p=a.getRetryDelay();d+=p,await new Promise(y=>setTimeout(y,p))}}else return n=n,n?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",n.mode]]),n.retry(e,s)},gs=t=>typeof t.acquireInitialRetryToken<"u"&&typeof t.refreshRetryTokenForRetry<"u"&&typeof t.recordSuccess<"u",ws=t=>{const e={error:t,errorType:Ss(t)},r=Rs(t.$response);return r&&(e.retryAfterHint=r),e},Ss=t=>it(t)?"THROTTLING":Se(t)?"TRANSIENT":is(t)?"SERVER_ERROR":"CLIENT_ERROR",bs={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},gn=t=>({applyToStack:e=>{e.add(ys(t),bs)}}),Rs=t=>{if(!pe.isInstance(t))return;const e=Object.keys(t.headers).find(i=>i.toLowerCase()==="retry-after");if(!e)return;const r=t.headers[e],s=Number(r);return Number.isNaN(s)?new Date(r):new Date(s*1e3)},Es=t=>new TextEncoder().encode(t);var Ts=typeof Buffer<"u"&&Buffer.from?function(t){return Buffer.from(t,"utf8")}:Es;function F(t){return t instanceof Uint8Array?t:typeof t=="string"?Ts(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function me(t){return typeof t=="string"?t.length===0:t.byteLength===0}var ct={name:"SHA-256"},He={name:"HMAC",hash:ct},vs=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Cs={};function W(){return typeof window<"u"?window:typeof self<"u"?self:Cs}var As=(function(){function t(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return t.prototype.update=function(e){if(!me(e)){var r=F(e),s=new Uint8Array(this.toHash.byteLength+r.byteLength);s.set(this.toHash,0),s.set(r,this.toHash.byteLength),this.toHash=s}},t.prototype.digest=function(){var e=this;return this.key?this.key.then(function(r){return W().crypto.subtle.sign(He,r,e.toHash).then(function(s){return new Uint8Array(s)})}):me(this.toHash)?Promise.resolve(vs):Promise.resolve().then(function(){return W().crypto.subtle.digest(ct,e.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},t.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(r,s){W().crypto.subtle.importKey("raw",F(e.secret),He,!1,["sign"]).then(r,s)}),this.key.catch(function(){}))},t})(),E=64,xs=32,Is=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ms=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],$s=Math.pow(2,53)-1,G=(function(){function t(){this.state=Int32Array.from(Ms),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return t.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var r=0,s=e.byteLength;if(this.bytesHashed+=s,this.bytesHashed*8>$s)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;s>0;)this.buffer[this.bufferLength++]=e[r++],s--,this.bufferLength===E&&(this.hashBuffer(),this.bufferLength=0)},t.prototype.digest=function(){if(!this.finished){var e=this.bytesHashed*8,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),s=this.bufferLength;if(r.setUint8(this.bufferLength++,128),s%E>=E-8){for(var n=this.bufferLength;n<E;n++)r.setUint8(n,0);this.hashBuffer(),this.bufferLength=0}for(var n=this.bufferLength;n<E-8;n++)r.setUint8(n,0);r.setUint32(E-8,Math.floor(e/4294967296),!0),r.setUint32(E-4,e),this.hashBuffer(),this.finished=!0}for(var i=new Uint8Array(xs),n=0;n<8;n++)i[n*4]=this.state[n]>>>24&255,i[n*4+1]=this.state[n]>>>16&255,i[n*4+2]=this.state[n]>>>8&255,i[n*4+3]=this.state[n]>>>0&255;return i},t.prototype.hashBuffer=function(){for(var e=this,r=e.buffer,s=e.state,n=s[0],i=s[1],a=s[2],u=s[3],o=s[4],d=s[5],m=s[6],c=s[7],h=0;h<E;h++){if(h<16)this.temp[h]=(r[h*4]&255)<<24|(r[h*4+1]&255)<<16|(r[h*4+2]&255)<<8|r[h*4+3]&255;else{var l=this.temp[h-2],p=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10;l=this.temp[h-15];var y=(l>>>7|l<<25)^(l>>>18|l<<14)^l>>>3;this.temp[h]=(p+this.temp[h-7]|0)+(y+this.temp[h-16]|0)}var f=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&d^~o&m)|0)+(c+(Is[h]+this.temp[h]|0)|0)|0,g=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&a^i&a)|0;c=m,m=d,d=o,o=u+f|0,u=a,a=i,i=n,n=f+g|0}s[0]+=n,s[1]+=i,s[2]+=a,s[3]+=u,s[4]+=o,s[5]+=d,s[6]+=m,s[7]+=c},t})(),Os=(function(){function t(e){this.secret=e,this.hash=new G,this.reset()}return t.prototype.update=function(e){if(!(me(e)||this.error))try{this.hash.update(F(e))}catch(r){this.error=r}},t.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},t.prototype.digest=function(){return mt(this,void 0,void 0,function(){return pt(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new G,this.secret){this.outer=new G;var e=Ps(this.secret),r=new Uint8Array(E);r.set(e);for(var s=0;s<E;s++)e[s]^=54,r[s]^=92;this.hash.update(e),this.outer.update(r);for(var s=0;s<e.byteLength;s++)e[s]=0}},t})();function Ps(t){var e=F(t);if(e.byteLength>E){var r=new G;r.update(e),e=r.digest()}var s=new Uint8Array(E);return s.set(e),s}var Ns=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function _s(t){if(Ds(t)&&typeof t.crypto.subtle=="object"){var e=t.crypto.subtle;return ks(e)}return!1}function Ds(t){if(typeof t=="object"&&typeof t.crypto=="object"){var e=t.crypto.getRandomValues;return typeof e=="function"}return!1}function ks(t){return t&&Ns.every(function(e){return typeof t[e]=="function"})}var wn=(function(){function t(e){_s(W())?this.hash=new As(e):this.hash=new Os(e)}return t.prototype.update=function(e,r){this.hash.update(F(e))},t.prototype.digest=function(){return this.hash.digest()},t.prototype.reset=function(){this.hash.reset()},t})();const Sn=t=>()=>Promise.reject(t),Ls=["in-region","cross-region","mobile","standard","legacy"],bn=({defaultsMode:t}={})=>yt(async()=>{const e=typeof t=="function"?await t():t;switch(e?.toLowerCase()){case"auto":return Promise.resolve(Hs()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(e?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Ls.join(", ")}, got ${e}`)}}),Hs=()=>{const t=window?.navigator;if(t?.connection){const{effectiveType:e,rtt:r,downlink:s}=t?.connection;if(typeof e=="string"&&e!=="4g"||Number(r)>100||Number(s)<10)return!0}return t?.userAgentData?.mobile||typeof t?.maxTouchPoints=="number"&&t?.maxTouchPoints>1};export{Js as A,Fs as B,Qs as C,pn as D,nn as E,js as F,qs as G,yn as H,dn as I,mn as J,Vs as K,N as L,gn as M,T as N,ln as O,Ys as P,Zs as Q,Ws as R,on as S,A as T,en as U,H as V,Ct as W,fn as X,Tt as Y,Wt as a,rn as b,xe as c,qt as d,Ks as e,ze as f,Te as g,Gs as h,ye as i,Z as j,j as k,Ot as l,sn as m,O as n,tn as o,he as p,bn as q,an as r,wn as s,Sn as t,le as u,Et as v,cn as w,hn as x,un as y,Xs as z};
|