gemi 0.4.37 → 0.4.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/chunk-00f16704831dd8b0.js +2 -0
  2. package/dist/chunk-11a75566ff74db17.js +6 -0
  3. package/dist/chunk-2672477bf396bad8.js +2 -0
  4. package/dist/chunk-28bb1e70f39736ee.js +2 -0
  5. package/dist/chunk-2a101fb25d52469b.js +2 -0
  6. package/dist/chunk-2a48e0098ccd4249.js +1 -1
  7. package/dist/chunk-38237d1b01b0db25.js +3 -0
  8. package/dist/chunk-3a9fcddbd219223b.js +3 -0
  9. package/dist/chunk-3c83d6762f7e56b3.js +2 -0
  10. package/dist/chunk-442a5b1ec74c72f8.js +2 -0
  11. package/dist/chunk-5128de1a65ba6ce1.js +2 -0
  12. package/dist/chunk-5190b38f06507ee1.js +18 -0
  13. package/dist/chunk-552bdaee8c03e091.js +1 -1
  14. package/dist/chunk-59e951812cb019e6.js +2 -0
  15. package/dist/chunk-5b54843712abde58.js +2 -0
  16. package/dist/chunk-5c2a5156f6bef0f5.js +2 -0
  17. package/dist/chunk-5defd55c3c97bdb2.js +2 -0
  18. package/dist/chunk-648dff766091372e.js +2 -0
  19. package/dist/chunk-682b01231754a121.js +1 -1
  20. package/dist/chunk-6afe097e13ebdf55.js +1 -1
  21. package/dist/chunk-733513f9c9e8b50f.js +2 -0
  22. package/dist/chunk-73c97da8ac4f1d30.js +1 -0
  23. package/dist/chunk-73c9d39f58a30fe2.js +6 -0
  24. package/dist/chunk-8b944ecefa1b832c.js +18 -0
  25. package/dist/chunk-8f547b919361fdf4.js +2 -0
  26. package/dist/chunk-9238196d4889d660.js +1 -0
  27. package/dist/chunk-92a55add20b5d7ac.js +9 -0
  28. package/dist/chunk-9f6199bc705fc395.js +18 -0
  29. package/dist/chunk-a02b2d564bdb603d.js +6 -0
  30. package/dist/chunk-a8310ad9bad32329.js +1 -1
  31. package/dist/chunk-aafdd9bfb5bde8bf.js +2 -0
  32. package/dist/chunk-ab79a2f0d89fbeae.js +1 -0
  33. package/dist/chunk-abd0b68c299eebfc.js +1 -1
  34. package/dist/chunk-b66a9e50afbac035.js +9 -0
  35. package/dist/chunk-bee6075c5738d87a.js +1 -1
  36. package/dist/chunk-bf4fa1d9864332a8.js +2 -0
  37. package/dist/chunk-c8b00b645df96ed5.js +1 -1
  38. package/dist/chunk-cb65fe402653c65e.js +1 -1
  39. package/dist/chunk-cce7de7e81895807.js +2 -0
  40. package/dist/chunk-d7457cb6aae3b29b.js +2 -0
  41. package/dist/chunk-dad55fcc32d05b69.js +2 -0
  42. package/dist/chunk-dd21f367f8029793.js +2 -0
  43. package/dist/chunk-ee4ff285d7f4ccdf.js +1 -1
  44. package/dist/client/index.d.ts +1 -1
  45. package/dist/client/index.d.ts.map +1 -1
  46. package/dist/client/types.d.ts +5 -2
  47. package/dist/client/types.d.ts.map +1 -1
  48. package/dist/http/ViewRouter.d.ts +1 -1
  49. package/dist/http/ViewRouter.d.ts.map +1 -1
  50. package/dist/http/index.js +1 -1
  51. package/dist/server/index.js +1 -1
  52. package/dist/storage/index.js +3 -3
  53. package/package.json +2 -2
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{x as c} from"./chunk-a5c18c07abe8fd9c.js";import{A as _e,D as ee,F as Ae,J as se,K as te,M as re,N as ae,Q as ie,R as le,X as ts,Y as k,ba as z,ca as Ve,da as h,ka as He,la as u,ma as Ne,na as pe,oa as ye,pa as $e,qa as Pe,sa as i,ta as y,va as fe,z as Fe} from"./chunk-3a9fcddbd219223b.js";import{$a as Te,Aa as We,Ea as B,Fa as _,Ga as $,Ha as Ke,Ia as V,Ja as N,Ka as f,La as Qe,Ma as me,Na as he,Oa as ue,Pa as we,Qa as Xe,Ra as Ye,Ta as rs,Ua as as,Va as Ze,Wa as be,Ya as xe,Za as je,_a as ve,bb as x,cb as ke,db as Re,eb as qe,fb as Ee,gb as Je,hb as Ue,xa as Le,ya as Ce,za as Me} from"./chunk-5190b38f06507ee1.js";import"./chunk-442a5b1ec74c72f8.js";import{jb as ps,kb as l} from"./chunk-ab79a2f0d89fbeae.js";import"./chunk-2672477bf396bad8.js";import"./chunk-73c97da8ac4f1d30.js";var p=c(B(),1);var P=c(x(),1);var cs=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}},b=function(e){return{schemeId:"smithy.api#noAuth"}},J=async(e,s,t)=>{return{operation:_(s).operation,region:await $(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},U=(e)=>{const s=[];switch(e.operation){case"GetRoleCredentials":{s.push(b(e));break}case"ListAccountRoles":{s.push(b(e));break}case"ListAccounts":{s.push(b(e));break}case"Logout":{s.push(b(e));break}default:s.push(cs(e))}return s},I=(e)=>{return{...P.resolveAwsSdkSigV4Config(e)}};var L=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},C={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var M={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.629.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.629.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.620.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.3.2","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.14","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.1.12","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.14","@smithy/util-defaults-mode-node":"^3.0.14","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var Se=c(x(),1);var ne=c(x(),1),de=c(B(),1);var oe=c(ps(),1);var W={["required"]:!1,type:"String"},A={["required"]:!0,default:!1,type:"Boolean"},K={["ref"]:"Endpoint"},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},H={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},d={},Q={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},O={["ref"]:"PartitionResult"},X={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[O,"supportsDualStack"]}]},Y=[T],Z=[H],j=[{["ref"]:"Region"}],ls={version:"1.0",parameters:{Region:W,UseDualStack:A,UseFIPS:A,Endpoint:W},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[K]}],rules:[{conditions:Y,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Z,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:K,properties:d,headers:d},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:j}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:j,assign:"PartitionResult"}],rules:[{conditions:[T,H],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Q]},X],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:Y,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Q,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[O,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:d,headers:d},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Z,rules:[{conditions:[X],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},G=ls;var g=(e,s={})=>{return N(G,{endpointParams:e,logger:s.logger})};V.aws=f;var ce=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??se,base64Encoder:e?.base64Encoder??ae,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??g,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??U,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new ne.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new de.NoAuthSigner}],logger:e?.logger??new ee,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??oe.parseUrl,utf8Decoder:e?.utf8Decoder??te,utf8Encoder:e?.utf8Encoder??re}};var ze=(e)=>{ye(process.version);const s=Ee(e),t=()=>s().then(pe),r=ce(e);return Se.emitWarningIfUnsupportedVersion(process.version),{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??qe,defaultUserAgentProvider:e?.defaultUserAgentProvider??ke({serviceId:r.serviceId,clientVersion:M.version}),maxAttempts:e?.maxAttempts??l(xe),region:e?.region??l(ue,we),requestHandler:ie.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...ve,default:async()=>(await t()).retryMode||be}),sha256:e?.sha256??Re.bind(null,"sha256"),streamCollector:e?.streamCollector??le,useDualstackEndpoint:e?.useDualstackEndpoint??l(me),useFipsEndpoint:e?.useFipsEndpoint??l(he)}};var De=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){const n=s.findIndex((D)=>D.schemeId===a.schemeId);if(n===-1)s.push(a);else s.splice(n,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},Be=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var v=(e)=>e,Ie=(e,s)=>{const t={...v(Je(e)),...v($e(e)),...v(Fe(e)),...v(De(e))};return s.forEach((r)=>r.configure(t)),{...e,...Ue(t),...Pe(t),..._e(t),...Be(t)}};class ys extends Ae{constructor(...[e]){const s=ze(e||{}),t=L(s),r=Ke(t),a=je(r),n=Xe(a),D=Le(n),ns=Ze(D),ds=I(ns),F=Ie(ds,e?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(Qe(this.config)),this.middlewareStack.use(Te(this.config)),this.middlewareStack.use(Ye(this.config)),this.middlewareStack.use(Ce(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:J,identityProviderConfigProvider:async(os)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":os.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class o extends He{constructor(e){super(e);Object.setPrototypeOf(this,o.prototype)}}class R extends o{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,R.prototype)}}class q extends o{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,q.prototype)}}class E extends o{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,E.prototype)}}class S extends o{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}var Oe=(e)=>({...e,...e.accessToken&&{accessToken:k}}),ms=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:k},...e.sessionToken&&{sessionToken:k}}),Ge=(e)=>({...e,...e.roleCredentials&&{roleCredentials:ms(e.roleCredentials)}});var m=c(x(),1),ge=c(B(),1);var es=async(e,s)=>{const t=ge.requestBuilder(e,s),r=i({},ks,{[Ds]:e[qs]});t.bp("/federation/credentials");const a=i({[zs]:[,z(e[Ss],"roleName")],[Es]:[,z(e[Rs],"accountId")]});let n;return t.m("GET").h(r).q(a).b(n),t.build()};var ss=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return hs(e,s);const t=i({$metadata:w(e)}),r=z(Ve(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:fe});return Object.assign(t,a),t};var hs=async(e,s)=>{const t={...e,body:await m.parseJsonErrorBody(e.body,s)},r=m.loadRestJsonErrorCode(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await ws(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await bs(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await xs(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await vs(t,s);default:const a=t.body;return us({output:e,parsedBody:a,errorCode:r})}},us=Ne(o),ws=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new R({$metadata:w(e),...t});return u(n,e.body)},bs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new q({$metadata:w(e),...t});return u(n,e.body)},xs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new E({$metadata:w(e),...t});return u(n,e.body)},vs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new S({$metadata:w(e),...t});return u(n,e.body)},w=(e)=>({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"]});var ks=(e)=>e!==void 0&&e!==null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),Rs="accountId",qs="accessToken",Es="account_id";var Ss="roleName",zs="role_name",Ds="x-amz-sso_bearer_token";class Bs extends ts.classBuilder().ep({...C}).m(function(e,s,t,r){return[rs(t,this.serialize,this.deserialize),as(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(Oe,Ge).ser(es).de(ss).build(){}export{ys as SSOClient,Bs as GetRoleCredentialsCommand};
@@ -0,0 +1,6 @@
1
+ // @bun
2
+ import"./chunk-a5c18c07abe8fd9c.js";import{B as i,P as I,S as y,ga as C} from"./chunk-7a318e738fec6c2b.js";import"./chunk-bbd36ce62b950ee5.js";import{sb as n} from"./chunk-100b76ab0ca3e14d.js";import u from"fs/promises";var T="169.254.170.2",x="169.254.170.23",P="[fd00:ec2::23]",d=(e,c)=>{if(e.protocol==="https:")return;if(e.hostname===T||e.hostname===x||e.hostname===P)return;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 a=e.hostname.split("."),r=(t)=>{const s=parseInt(t,10);return 0<=s&&s<=255};if(a[0]==="127"&&r(a[1])&&r(a[2])&&r(a[3])&&a.length===4)return}throw new n(`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:c})};function S(e){return new i({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((c,[a,r])=>{return c[a]=r,c},{}),fragment:e.hash})}async function g(e,c){const r=await y(e.body).transformToString();if(e.statusCode===200){const t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new n("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:c});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:C(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new n(`Server responded with status: ${e.statusCode}`,{logger:c}),{Code:t.Code,Message:t.Message})}throw new n(`Server responded with status: ${e.statusCode}`,{logger:c})}var w=(e,c,a)=>{return async()=>{for(let r=0;r<c;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,a))}return await e()}};var E="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",R="http://169.254.170.2",p="AWS_CONTAINER_CREDENTIALS_FULL_URI",A="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",O="AWS_CONTAINER_AUTHORIZATION_TOKEN",b=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let c;const a=e.awsContainerCredentialsRelativeUri??process.env[E],r=e.awsContainerCredentialsFullUri??process.env[p],t=e.awsContainerAuthorizationToken??process.env[O],s=e.awsContainerAuthorizationTokenFile??process.env[A],m=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(a&&r)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsFullUri will take precedence.");if(t&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationToken will take precedence.");if(r)c=r;else if(a)c=`${R}${a}`;else throw new n(`No HTTP credential provider host provided.
6
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});const h=new URL(c);d(h,e.logger);const K=new I({requestTimeout:e.timeout??1000,connectionTimeout:e.timeout??1000});return w(async()=>{const o=S(h);if(t)o.headers.Authorization=t;else if(s)o.headers.Authorization=(await u.readFile(s)).toString();try{const f=await K.handle(o);return g(f.response)}catch(f){throw new n(String(f),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000)};export{b as fromHttp};
@@ -0,0 +1,2 @@
1
+ import{y as D} from"./chunk-a5c18c07abe8fd9c.js";var C=D((h,A)=>{var{defineProperty:Q,getOwnPropertyDescriptor:M,getOwnPropertyNames:J}=Object,V=Object.prototype.hasOwnProperty,I=(j,b)=>Q(j,"name",{value:b,configurable:!0}),w=(j,b)=>{for(var F in b)Q(j,F,{get:b[F],enumerable:!0})},O=(j,b,F,B)=>{if(b&&typeof b==="object"||typeof b==="function"){for(let G of J(b))if(!V.call(j,G)&&G!==F)Q(j,G,{get:()=>b[G],enumerable:!(B=M(b,G))||B.enumerable})}return j},q=(j)=>O(Q({},"__esModule",{value:!0}),j),Y={};w(Y,{CredentialsProviderError:()=>L,ProviderError:()=>U,TokenProviderError:()=>S,chain:()=>T,fromStatic:()=>N,memoize:()=>R});A.exports=q(Y);var Z=class j extends Error{constructor(b,F=!0){var B;let G,H=!0;if(typeof F==="boolean")G=void 0,H=F;else if(F!=null&&typeof F==="object")G=F.logger,H=F.tryNextLink??!0;super(b);this.name="ProviderError",this.tryNextLink=H,Object.setPrototypeOf(this,j.prototype),(B=G==null?void 0:G.debug)==null||B.call(G,`@smithy/property-provider ${H?"->":"(!)"} ${b}`)}static from(b,F=!0){return Object.assign(new this(b.message,F),b)}};I(Z,"ProviderError");var U=Z,$=class j extends U{constructor(b,F=!0){super(b,F);this.name="CredentialsProviderError",Object.setPrototypeOf(this,j.prototype)}};I($,"CredentialsProviderError");var L=$,z=class j extends U{constructor(b,F=!0){super(b,F);this.name="TokenProviderError",Object.setPrototypeOf(this,j.prototype)}};I(z,"TokenProviderError");var S=z,T=I((...j)=>async()=>{if(j.length===0)throw new U("No providers in chain");let b;for(let F of j)try{return await F()}catch(B){if(b=B,B==null?void 0:B.tryNextLink)continue;throw B}throw b},"chain"),N=I((j)=>()=>Promise.resolve(j),"fromStatic"),R=I((j,b,F)=>{let B,G,H,W=!1;const X=I(async()=>{if(!G)G=j();try{B=await G,H=!0,W=!1}finally{G=void 0}return B},"coalesceProvider");if(b===void 0)return async(K)=>{if(!H||(K==null?void 0:K.forceRefresh))B=await X();return B};return async(K)=>{if(!H||(K==null?void 0:K.forceRefresh))B=await X();if(W)return B;if(F&&!F(B))return W=!0,B;if(b(B))return await X(),B;return B}},"memoize")});
2
+ export{C as lb};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{x as h} from"./chunk-a5c18c07abe8fd9c.js";import"./chunk-442a5b1ec74c72f8.js";import{lb as _} from"./chunk-2672477bf396bad8.js";import{ob as N,pb as W,qb as I,tb as v,ub as P} from"./chunk-73c97da8ac4f1d30.js";var T=h(_(),1);var H=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var u=h(_(),1);var K=300000,g="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var R={},b=async(e)=>{const{SSOOIDCClient:r}=await import("./chunk-5c2a5156f6bef0f5.js");if(R[e])return R[e];const s=new r({region:e});return R[e]=s,s};var G=async(e,r)=>{const{CreateTokenCommand:s}=await import("./chunk-5c2a5156f6bef0f5.js");return(await b(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var U=h(_(),1);var D=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new U.TokenProviderError(`Token is expired. ${g}`,!1)};var q=h(_(),1);var p=(e,r,s=!1)=>{if(typeof r==="undefined")throw new q.TokenProviderError(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${g}`,!1)};import{promises as B} from"fs";var{writeFile:Q}=B,j=(e,r)=>{const s=W(e),t=JSON.stringify(r,null,2);return Q(s,t)};var X=new Date(0),z=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");const r=await P(e),s=N(e),t=r[s];if(!t)throw new u.TokenProviderError(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new u.TokenProviderError(`Profile '${s}' is missing required property 'sso_session'.`);const i=t.sso_session,a=(await v(e))[i];if(!a)throw new u.TokenProviderError(`Sso session '${i}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!a[n])throw new u.TokenProviderError(`Sso session '${i}' is missing required property '${n}'.`,!1);const{sso_start_url:l,sso_region:f}=a;let o;try{o=await I(i)}catch(n){throw new u.TokenProviderError(`The SSO session token associated with profile=${s} was not found or is invalid. ${g}`,!1)}p("accessToken",o.accessToken),p("expiresAt",o.expiresAt);const{accessToken:E,expiresAt:x}=o,c={token:E,expiration:new Date(x)};if(c.expiration.getTime()-Date.now()>K)return c;if(Date.now()-X.getTime()<30000)return D(c),c;p("clientId",o.clientId,!0),p("clientSecret",o.clientSecret,!0),p("refreshToken",o.refreshToken,!0);try{X.setTime(Date.now());const n=await G(o,f);p("accessToken",n.accessToken),p("expiresIn",n.expiresIn);const w=new Date(Date.now()+n.expiresIn*1000);try{await j(i,{...o,accessToken:n.accessToken,expiresAt:w.toISOString(),refreshToken:n.refreshToken})}catch(C){}return{token:n.accessToken,expiration:w}}catch(n){return D(c),c}};var k=h(_(),1);var y=!1,A=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:S,clientConfig:a,profile:l,logger:f})=>{let o;const E="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{const d=await z({profile:l})();o={accessToken:d.token,expiresAt:new Date(d.expiration).toISOString()}}catch(d){throw new k.CredentialsProviderError(d.message,{tryNextLink:y,logger:f})}else try{o=await I(e)}catch(d){throw new k.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:f})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new k.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:f});const{accessToken:x}=o,{SSOClient:c,GetRoleCredentialsCommand:n}=await import("./chunk-00f16704831dd8b0.js"),w=S||new c(Object.assign({},a??{},{region:a?.region??t}));let C;try{C=await w.send(new n({accountId:s,roleName:i,accessToken:x}))}catch(d){throw new k.CredentialsProviderError(d,{tryNextLink:y,logger:f})}const{roleCredentials:{accessKeyId:m,secretAccessKey:O,sessionToken:$,expiration:F,credentialScope:L,accountId:M}={}}=C;if(!m||!O||!$||!F)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:y,logger:f});return{accessKeyId:m,secretAccessKey:O,sessionToken:$,expiration:new Date(F),...L&&{credentialScope:L},...M&&{accountId:M}}};var J=h(_(),1),V=(e,r)=>{const{sso_start_url:s,sso_account_id:t,sso_region:i,sso_role_name:S}=e;if(!s||!t||!i||!S)throw new J.CredentialsProviderError('Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", '+`"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:r});return e};var Ee=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoSession:S}=e,{ssoClient:a}=e,l=N(e);if(!r&&!s&&!t&&!i&&!S){const o=(await P(e))[l];if(!o)throw new T.CredentialsProviderError(`Profile ${l} was not found.`,{logger:e.logger});if(!H(o))throw new T.CredentialsProviderError(`Profile ${l} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){const m=(await v(e))[o.sso_session],O=` configurations in profile ${l} and sso-session ${o.sso_session}`;if(t&&t!==m.sso_region)throw new T.CredentialsProviderError("Conflicting SSO region"+O,{tryNextLink:!1,logger:e.logger});if(r&&r!==m.sso_start_url)throw new T.CredentialsProviderError("Conflicting SSO start_url"+O,{tryNextLink:!1,logger:e.logger});o.sso_region=m.sso_region,o.sso_start_url=m.sso_start_url}const{sso_start_url:E,sso_account_id:x,sso_region:c,sso_role_name:n,sso_session:w}=V(o,e.logger);return A({ssoStartUrl:E,ssoSession:w,ssoAccountId:x,ssoRegion:c,ssoRoleName:n,ssoClient:a,clientConfig:e.clientConfig,profile:l})}else if(!r||!s||!t||!i)throw new T.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return A({ssoStartUrl:r,ssoSession:S,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:a,clientConfig:e.clientConfig,profile:l})};export{V as validateSsoProfile,H as isSsoProfile,Ee as fromSSO};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{x as l} from"./chunk-a5c18c07abe8fd9c.js";import{lb as m} from"./chunk-2672477bf396bad8.js";var E=l(m(),1);import{readFileSync as S} from"fs";var t=(e)=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:o,roleSessionName:r,webIdentityToken:n,providerId:c,policyArns:i,policy:_,durationSeconds:N}=e;let{roleAssumerWithWebIdentity:s}=e;if(!s){const{getDefaultRoleAssumerWithWebIdentity:d}=await import("./chunk-648dff766091372e.js");s=d({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:e.parentClientConfig},e.clientPlugins)}return s({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:c,PolicyArns:i,Policy:_,DurationSeconds:N})};var p="AWS_WEB_IDENTITY_TOKEN_FILE",f="AWS_ROLE_ARN",T="AWS_ROLE_SESSION_NAME",I=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const o=e?.webIdentityTokenFile??process.env[p],r=e?.roleArn??process.env[f],n=e?.roleSessionName??process.env[T];if(!o||!r)throw new E.CredentialsProviderError("Web identity configuration not specified",{logger:e.logger});return t({...e,webIdentityToken:S(o,{encoding:"ascii"}),roleArn:r,roleSessionName:n})()};export{t as fromWebToken,I as fromTokenFile};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-a5c18c07abe8fd9c.js";import"./chunk-bbd36ce62b950ee5.js";import{kb as l,qb as S} from"./chunk-6943b50bd0a3ac84.js";import{sb as c,ub as m} from"./chunk-100b76ab0ca3e14d.js";var w=(e,s,r)=>{const i={EcsContainer:async(t)=>{const{fromHttp:n}=await import("./chunk-fc165cee61f6efe8.js"),{fromContainerMetadata:d}=await import("./chunk-e3ef81776c8f2d28.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),m(n(t??{}),d(t))},Ec2InstanceMetadata:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:n}=await import("./chunk-e3ef81776c8f2d28.js");return n(t)},Environment:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:n}=await import("./chunk-70bb003c03f21dad.js");return n(t)}};if(e in i)return i[e];else throw new c(`Unsupported credential source in profile ${s}. Got ${e}, `+"expected EcsContainer or Ec2InstanceMetadata or Environment.",{logger:r})};var y=(e,{profile:s="default",logger:r}={})=>{return Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(h(e,{profile:s,logger:r})||D(e,{profile:s,logger:r}))},h=(e,{profile:s,logger:r})=>{const i=typeof e.source_profile==="string"&&typeof e.credential_source==="undefined";if(i)r?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return i},D=(e,{profile:s,logger:r})=>{const i=typeof e.credential_source==="string"&&typeof e.source_profile==="undefined";if(i)r?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return i},C=async(e,s,r,i={})=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const t=s[e];if(!r.roleAssumer){const{getDefaultRoleAssumer:R}=await import("./chunk-ef1ebd10affe5726.js");r.roleAssumer=R({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:r?.parentClientConfig},r.clientPlugins)}const{source_profile:n}=t;if(n&&n in i)throw new c("Detected a cycle attempting to resolve credentials for profile"+` ${l(r)}. Profiles visited: `+Object.keys(i).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${n?`source_profile=[${n}]`:`profile=[${e}]`}`);const d=n?o(n,{...s,[n]:{...s[n],role_arn:t.role_arn??s[n].role_arn}},r,{...i,[n]:!0}):(await w(t.credential_source,e,r.logger)(r))(),u={RoleArn:t.role_arn,RoleSessionName:t.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:t.external_id,DurationSeconds:parseInt(t.duration_seconds||"3600",10)},{mfa_serial:f}=t;if(f){if(!r.mfaCodeProvider)throw new c(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});u.SerialNumber=f,u.TokenCode=await r.mfaCodeProvider(f)}const $=await d;return r.roleAssumer($,u)};var P=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",v=async(e,s)=>import("./chunk-9d2af1a704b857ee.js").then(({fromProcess:r})=>r({...e,profile:s})());var x=async(e,s={})=>{const{fromSSO:r}=await import("./chunk-682b01231754a121.js");return r({profile:e,logger:s.logger})()},b=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var _=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,a=(e,s)=>{return s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}})};var A=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,k=async(e,s)=>import("./chunk-c8b00b645df96ed5.js").then(({fromTokenFile:r})=>r({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})());var o=async(e,s,r,i={})=>{const t=s[e];if(Object.keys(i).length>0&&_(t))return a(t,r);if(y(t,{profile:e,logger:r.logger}))return C(e,s,r,i);if(_(t))return a(t,r);if(A(t))return k(t,r);if(P(t))return v(r,e);if(b(t))return await x(e,r);throw new c(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var H=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const s=await S(e);return o(l(e),s,e)};export{H as fromIni};
2
+ import"./chunk-a5c18c07abe8fd9c.js";import"./chunk-bbd36ce62b950ee5.js";import{kb as l,qb as S} from"./chunk-6943b50bd0a3ac84.js";import{sb as c,ub as m} from"./chunk-100b76ab0ca3e14d.js";var w=(e,s,r)=>{const i={EcsContainer:async(t)=>{const{fromHttp:n}=await import("./chunk-11a75566ff74db17.js"),{fromContainerMetadata:d}=await import("./chunk-e3ef81776c8f2d28.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),m(n(t??{}),d(t))},Ec2InstanceMetadata:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:n}=await import("./chunk-e3ef81776c8f2d28.js");return n(t)},Environment:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:n}=await import("./chunk-70bb003c03f21dad.js");return n(t)}};if(e in i)return i[e];else throw new c(`Unsupported credential source in profile ${s}. Got ${e}, `+"expected EcsContainer or Ec2InstanceMetadata or Environment.",{logger:r})};var y=(e,{profile:s="default",logger:r}={})=>{return Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(h(e,{profile:s,logger:r})||D(e,{profile:s,logger:r}))},h=(e,{profile:s,logger:r})=>{const i=typeof e.source_profile==="string"&&typeof e.credential_source==="undefined";if(i)r?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return i},D=(e,{profile:s,logger:r})=>{const i=typeof e.credential_source==="string"&&typeof e.source_profile==="undefined";if(i)r?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return i},C=async(e,s,r,i={})=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const t=s[e];if(!r.roleAssumer){const{getDefaultRoleAssumer:R}=await import("./chunk-59e951812cb019e6.js");r.roleAssumer=R({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:r?.parentClientConfig},r.clientPlugins)}const{source_profile:n}=t;if(n&&n in i)throw new c("Detected a cycle attempting to resolve credentials for profile"+` ${l(r)}. Profiles visited: `+Object.keys(i).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${n?`source_profile=[${n}]`:`profile=[${e}]`}`);const d=n?o(n,{...s,[n]:{...s[n],role_arn:t.role_arn??s[n].role_arn}},r,{...i,[n]:!0}):(await w(t.credential_source,e,r.logger)(r))(),u={RoleArn:t.role_arn,RoleSessionName:t.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:t.external_id,DurationSeconds:parseInt(t.duration_seconds||"3600",10)},{mfa_serial:f}=t;if(f){if(!r.mfaCodeProvider)throw new c(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});u.SerialNumber=f,u.TokenCode=await r.mfaCodeProvider(f)}const $=await d;return r.roleAssumer($,u)};var P=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",v=async(e,s)=>import("./chunk-9d2af1a704b857ee.js").then(({fromProcess:r})=>r({...e,profile:s})());var x=async(e,s={})=>{const{fromSSO:r}=await import("./chunk-682b01231754a121.js");return r({profile:e,logger:s.logger})()},b=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var _=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,a=(e,s)=>{return s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}})};var A=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,k=async(e,s)=>import("./chunk-c8b00b645df96ed5.js").then(({fromTokenFile:r})=>r({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})());var o=async(e,s,r,i={})=>{const t=s[e];if(Object.keys(i).length>0&&_(t))return a(t,r);if(y(t,{profile:e,logger:r.logger}))return C(e,s,r,i);if(_(t))return a(t,r);if(A(t))return k(t,r);if(P(t))return v(r,e);if(b(t))return await x(e,r);throw new c(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var H=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const s=await S(e);return o(l(e),s,e)};export{H as fromIni};
@@ -0,0 +1,3 @@
1
+ import{x as O,y as wt} from"./chunk-a5c18c07abe8fd9c.js";import{gb as j} from"./chunk-3bf6f8c8e8589e3d.js";var Me=wt((ho,Ue)=>{var Ie=function(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 G)t[r/2]=G[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t},ke=function(e){let t="";for(let r=0;r<e.byteLength;r++)t+=Ae[e[r]];return t},H=Object.defineProperty,xt=Object.getOwnPropertyDescriptor,bt=Object.getOwnPropertyNames,Et=Object.prototype.hasOwnProperty,Ce=(e,t)=>H(e,"name",{value:t,configurable:!0}),Tt=(e,t)=>{for(var r in t)H(e,r,{get:t[r],enumerable:!0})},St=(e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of bt(t))if(!Et.call(e,o)&&o!==r)H(e,o,{get:()=>t[o],enumerable:!(n=xt(t,o))||n.enumerable})}return e},Ct=(e)=>St(H({},"__esModule",{value:!0}),e),$e={};Tt($e,{fromHex:()=>Ie,toHex:()=>ke});Ue.exports=Ct($e);var Ae={},G={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();if(t.length===1)t=`0${t}`;Ae[e]=t,G[t]=e}Ce(Ie,"fromHex");Ce(ke,"toHex")});var C=(e,t)=>{const r=[];if(e)r.push(e);if(t)for(let n of t)r.push(n);return r},S=(e,t)=>{return`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`},A=()=>{let e=[],t=[],r=!1;const n=new Set,o=(a)=>a.sort((f,h)=>se[h.step]-se[f.step]||ie[h.priority||"normal"]-ie[f.priority||"normal"]),s=(a)=>{let f=!1;const h=(g)=>{const y=C(g.name,g.aliases);if(y.includes(a)){f=!0;for(let p of y)n.delete(p);return!1}return!0};return e=e.filter(h),t=t.filter(h),f},c=(a)=>{let f=!1;const h=(g)=>{if(g.middleware===a){f=!0;for(let y of C(g.name,g.aliases))n.delete(y);return!1}return!0};return e=e.filter(h),t=t.filter(h),f},i=(a)=>{return e.forEach((f)=>{a.add(f.middleware,{...f})}),t.forEach((f)=>{a.addRelativeTo(f.middleware,{...f})}),a.identifyOnResolve?.(w.identifyOnResolve()),a},d=(a)=>{const f=[];return a.before.forEach((h)=>{if(h.before.length===0&&h.after.length===0)f.push(h);else f.push(...d(h))}),f.push(a),a.after.reverse().forEach((h)=>{if(h.before.length===0&&h.after.length===0)f.push(h);else f.push(...d(h))}),f},l=(a=!1)=>{const f=[],h=[],g={};return e.forEach((p)=>{const u={...p,before:[],after:[]};for(let m of C(u.name,u.aliases))g[m]=u;f.push(u)}),t.forEach((p)=>{const u={...p,before:[],after:[]};for(let m of C(u.name,u.aliases))g[m]=u;h.push(u)}),h.forEach((p)=>{if(p.toMiddleware){const u=g[p.toMiddleware];if(u===void 0){if(a)return;throw new Error(`${p.toMiddleware} is not found when adding `+`${S(p.name,p.aliases)} `+`middleware ${p.relation} ${p.toMiddleware}`)}if(p.relation==="after")u.after.push(p);if(p.relation==="before")u.before.push(p)}}),o(f).map(d).reduce((p,u)=>{return p.push(...u),p},[])},w={add:(a,f={})=>{const{name:h,override:g,aliases:y}=f,p={step:"initialize",priority:"normal",middleware:a,...f},u=C(h,y);if(u.length>0){if(u.some((m)=>n.has(m))){if(!g)throw new Error(`Duplicate middleware name '${S(h,y)}'`);for(let m of u){const E=e.findIndex((N)=>N.name===m||N.aliases?.some((W)=>W===m));if(E===-1)continue;const x=e[E];if(x.step!==p.step||p.priority!==x.priority)throw new Error(`"${S(x.name,x.aliases)}" middleware with `+`${x.priority} priority in ${x.step} step cannot `+`be overridden by "${S(h,y)}" middleware with `+`${p.priority} priority in ${p.step} step.`);e.splice(E,1)}}for(let m of u)n.add(m)}e.push(p)},addRelativeTo:(a,f)=>{const{name:h,override:g,aliases:y}=f,p={middleware:a,...f},u=C(h,y);if(u.length>0){if(u.some((m)=>n.has(m))){if(!g)throw new Error(`Duplicate middleware name '${S(h,y)}'`);for(let m of u){const E=t.findIndex((N)=>N.name===m||N.aliases?.some((W)=>W===m));if(E===-1)continue;const x=t[E];if(x.toMiddleware!==p.toMiddleware||x.relation!==p.relation)throw new Error(`"${S(x.name,x.aliases)}" middleware `+`${x.relation} "${x.toMiddleware}" middleware cannot be overridden `+`by "${S(h,y)}" middleware ${p.relation} `+`"${p.toMiddleware}" middleware.`);t.splice(E,1)}}for(let m of u)n.add(m)}t.push(p)},clone:()=>i(A()),use:(a)=>{a.applyToStack(w)},remove:(a)=>{if(typeof a==="string")return s(a);else return c(a)},removeByTag:(a)=>{let f=!1;const h=(g)=>{const{tags:y,name:p,aliases:u}=g;if(y&&y.includes(a)){const m=C(p,u);for(let E of m)n.delete(E);return f=!0,!1}return!0};return e=e.filter(h),t=t.filter(h),f},concat:(a)=>{const f=i(A());return f.use(a),f.identifyOnResolve(r||f.identifyOnResolve()||(a.identifyOnResolve?.()??!1)),f},applyToStack:i,identify:()=>{return l(!0).map((a)=>{const f=a.step??a.relation+" "+a.toMiddleware;return S(a.name,a.aliases)+" - "+f})},identifyOnResolve(a){if(typeof a==="boolean")r=a;return r},resolve:(a,f)=>{for(let h of l().map((g)=>g.middleware).reverse())a=h(a,f);if(r)console.log(w.identify());return a}};return w},se={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},ie={high:3,normal:2,low:1};class tt{constructor(e){this.middlewareStack=A(),this.config=e}send(e,t,r){const n=typeof t!=="function"?t:void 0,o=typeof t==="function"?t:r,s=e.resolveMiddleware(this.middlewareStack,this.config,n);if(o)s(e).then((c)=>o(null,c.output),(c)=>o(c)).catch(()=>{});else return s(e).then((c)=>c.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}}var ce=O(j(),1);class ae{constructor(){this.middlewareStack=A()}static classBuilder(){return new fe}resolveMiddlewareWithContext(e,t,r,{middlewareFn:n,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,smithyContext:d,additionalContext:l,CommandCtor:w}){for(let y of n.bind(this)(w,e,t,r))this.middlewareStack.use(y);const a=e.concat(this.middlewareStack),{logger:f}=t,h={logger:f,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,[ce.SMITHY_CONTEXT_KEY]:{commandInstance:this,...d},...l},{requestHandler:g}=t;return a.resolve((y)=>g.handle(y.request,r||{}),h)}}class fe{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(e)=>e,this._outputFilterSensitiveLog=(e)=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,r={}){return this._smithyContext={service:e,operation:t,...r},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=(r)=>r,t=(r)=>r){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends ae{static getEndpointParameterInstructions(){return e._ep}constructor(...[r]){super();this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=r??{},e._init(this)}resolveMiddleware(r,n,o){return this.resolveMiddlewareWithContext(r,n,o,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}var ir=(e)=>{let t=e.httpHandler;return{setHttpHandler(r){t=r},httpHandler(){return t},updateHttpClientConfig(r,n){t.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return t.httpHandlerConfigs()}}},cr=(e)=>{return{httpHandler:e.httpHandler()}};var rt=O(j(),1);var nt=function(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})};class _{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new _({...e,headers:{...e.headers}});if(t.query)t.query=nt(t.query);return t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query==="object"&&typeof t.headers==="object"}clone(){return _.clone(this)}}class R{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return typeof t.statusCode==="number"&&typeof t.headers==="object"}}var P=(e)=>encodeURIComponent(e).replace(/[!'()*]/g,ot),ot=(e)=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function D(e){const t=[];for(let r of Object.keys(e).sort()){const n=e[r];if(r=P(r),Array.isArray(n))for(let o=0,s=n.length;o<s;o++)t.push(`${r}=${P(n[o])}`);else{let o=r;if(n||typeof n==="string")o+=`=${P(n)}`;t.push(o)}}return t.join("&")}import{Agent as me,request as ct} from"http";import{Agent as ye,request as at} from"https";var ue=["ECONNRESET","EPIPE","ETIMEDOUT"];var Y=(e)=>{const t={};for(let r of Object.keys(e)){const n=e[r];t[r]=Array.isArray(n)?n.join(","):n}return t};var de=(e,t,r=0)=>{if(!r)return;const n=setTimeout(()=>{e.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r);e.on("socket",(o)=>{if(o.connecting)o.on("connect",()=>{clearTimeout(n)});else clearTimeout(n)})};var le=(e,{keepAlive:t,keepAliveMsecs:r})=>{if(t!==!0)return;e.on("socket",(n)=>{n.setKeepAlive(t,r||0)})};var he=(e,t,r=0)=>{e.setTimeout(r,()=>{e.destroy(),t(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))})};import{Readable as st} from"stream";async function J(e,t,r=pe){const n=t.headers??{},o=n.Expect||n.expect;let s=-1,c=!1;if(o==="100-continue")await Promise.race([new Promise((i)=>{s=Number(setTimeout(i,Math.max(pe,r)))}),new Promise((i)=>{e.on("continue",()=>{clearTimeout(s),i()}),e.on("error",()=>{c=!0,clearTimeout(s),i()})})]);if(!c)it(e,t.body)}var it=function(e,t){if(t instanceof st){t.pipe(e);return}if(t){if(Buffer.isBuffer(t)||typeof t==="string"){e.end(t);return}const r=t;if(typeof r==="object"&&r.buffer&&typeof r.byteOffset==="number"&&typeof r.byteLength==="number"){e.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}e.end(Buffer.from(t));return}e.end()},pe=1000;class V{static create(e){if(typeof e?.handle==="function")return e;return new V(e)}static checkSocketUsage(e,t,r=console){const{sockets:n,requests:o,maxSockets:s}=e;if(typeof s!=="number"||s===Infinity)return t;const c=15000;if(Date.now()-c<t)return t;if(n&&o)for(let i in n){const d=n[i]?.length??0,l=o[i]?.length??0;if(d>=s&&l>=2*s)return r?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${d} and ${l} additional requests are enqueued.
2
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}constructor(e){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((t,r)=>{if(typeof e==="function")e().then((n)=>{t(this.resolveDefaultConfig(n))}).catch(r);else t(this.resolveDefaultConfig(e))})}resolveDefaultConfig(e){const{requestTimeout:t,connectionTimeout:r,socketTimeout:n,httpAgent:o,httpsAgent:s}=e||{};return{connectionTimeout:r,requestTimeout:t??n,httpAgent:(()=>{if(o instanceof me||typeof o?.destroy==="function")return o;return new me({keepAlive:!0,maxSockets:50,...o})})(),httpsAgent:(()=>{if(s instanceof ye||typeof s?.destroy==="function")return s;return new ye({keepAlive:!0,maxSockets:50,...s})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t}={}){if(!this.config)this.config=await this.configProvider;let r;return new Promise((n,o)=>{let s=void 0;const c=async(u)=>{await s,clearTimeout(r),n(u)},i=async(u)=>{await s,clearTimeout(r),o(u)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t?.aborted){const u=new Error("Request aborted");u.name="AbortError",i(u);return}const d=e.protocol==="https:",l=d?this.config.httpsAgent:this.config.httpAgent;r=setTimeout(()=>{this.socketWarningTimestamp=V.checkSocketUsage(l,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const w=D(e.query||{});let a=void 0;if(e.username!=null||e.password!=null){const u=e.username??"",m=e.password??"";a=`${u}:${m}`}let f=e.path;if(w)f+=`?${w}`;if(e.fragment)f+=`#${e.fragment}`;const h={headers:e.headers,host:e.hostname,method:e.method,path:f,port:e.port,agent:l,auth:a},y=(d?at:ct)(h,(u)=>{const m=new R({statusCode:u.statusCode||-1,reason:u.statusMessage,headers:Y(u.headers),body:u});c({response:m})});if(y.on("error",(u)=>{if(ue.includes(u.code))i(Object.assign(u,{name:"TimeoutError"}));else i(u)}),de(y,i,this.config.connectionTimeout),he(y,i,this.config.requestTimeout),t){const u=()=>{y.destroy();const m=new Error("Request aborted");m.name="AbortError",i(m)};if(typeof t.addEventListener==="function"){const m=t;m.addEventListener("abort",u,{once:!0}),y.once("close",()=>m.removeEventListener("abort",u))}else t.onabort=u}const p=h.agent;if(typeof p==="object"&&"keepAlive"in p)le(y,{keepAlive:p.keepAlive,keepAliveMsecs:p.keepAliveMsecs});s=J(y,e,this.config.requestTimeout).catch((u)=>{return clearTimeout(r),o(u)})})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[e]:t}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as ft} from"stream";class Z extends ft{constructor(){super(...arguments);this.bufferedBytes=[]}_write(e,t,r){this.bufferedBytes.push(e),r()}}async function dt(e){const t=[],r=e.getReader();let n=!1,o=0;while(!n){const{done:i,value:d}=await r.read();if(d)t.push(d),o+=d.length;n=i}const s=new Uint8Array(o);let c=0;for(let i of t)s.set(i,c),c+=i.length;return s}var ge=(e)=>{if(ut(e))return dt(e);return new Promise((t,r)=>{const n=new Z;e.pipe(n),e.on("error",(o)=>{n.end(),r(o)}),n.on("error",r),n.on("finish",function(){const o=new Uint8Array(Buffer.concat(this.bufferedBytes));t(o)})})},ut=(e)=>typeof ReadableStream==="function"&&e instanceof ReadableStream;var gn="***SensitiveInformation***";var xn=(e,t)=>{for(let r of Object.keys(e)){const n=e[r],o=async function(c,i,d){const l=new n(c);if(typeof i==="function")this.send(l,i);else if(typeof d==="function"){if(typeof i!=="object")throw new Error(`Expected http options but got ${typeof i}`);this.send(l,i||{},d)}else return this.send(l,i)},s=(r[0].toLowerCase()+r.slice(1)).replace(/Command$/,"");t.prototype[s]=o}};class we extends Error{constructor(e){super(e.message);Object.setPrototypeOf(this,we.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}var xe=(e,t={})=>{Object.entries(t).filter(([,n])=>n!==void 0).forEach(([n,o])=>{if(e[n]==null||e[n]==="")e[n]=o});const r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e};class lt{trace(){}debug(){}info(){}warn(){}error(){}}var be=(e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";import{Buffer as Q} from"buffer";var I=(e,t=0,r=e.byteLength-t)=>{if(!be(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return Q.from(e,t,r)},v=(e,t)=>{if(typeof e!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?Q.from(e,t):Q.from(e)};var ht=/^[A-Za-z0-9+/]*={0,2}$/,B=(e)=>{if(e.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!ht.exec(e))throw new TypeError("Invalid base64 string.");const t=v(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};var k=(e)=>{const t=v(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var Rn=(e)=>{if(typeof e==="string")return k(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)};var z=(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 I(e.buffer,e.byteOffset,e.byteLength).toString("utf8")};var q=(e)=>{let t;if(typeof e==="string")t=k(e);else t=e;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return I(t.buffer,t.byteOffset,t.byteLength).toString("base64")};function Ee(e,t="utf-8"){if(t==="base64")return q(e);return z(e)}function Te(e,t){if(t==="base64")return T.mutate(B(e));return T.mutate(k(e))}class T extends Uint8Array{static fromString(e,t="utf-8"){switch(typeof e){case"string":return Te(e,t);default:throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}}static mutate(e){return Object.setPrototypeOf(e,T.prototype),e}transformToString(e="utf-8"){return Ee(this,e)}}import{Readable as pt} from"stream";var Xn=(e,t)=>{const{base64Encoder:r,bodyLengthChecker:n,checksumAlgorithmFn:o,checksumLocationName:s,streamHasher:c}=t,i=r!==void 0&&o!==void 0&&s!==void 0&&c!==void 0,d=i?c(o,e):void 0,l=new pt({read:()=>{}});return e.on("data",(w)=>{const a=n(w)||0;l.push(`${a.toString(16)}\r\n`),l.push(w),l.push("\r\n")}),e.on("end",async()=>{if(l.push("0\r\n"),i){const w=r(await d);l.push(`${s}:${w}\r\n`),l.push("\r\n")}l.push(null)}),l};import{Readable as K} from"stream";import{TextDecoder as $t} from"util";async function mt(e){const t=await gt(e),r=B(t);return new Uint8Array(r)}async function yt(e){const t=[],r=e.getReader();let n=!1,o=0;while(!n){const{done:i,value:d}=await r.read();if(d)t.push(d),o+=d.length;n=i}const s=new Uint8Array(o);let c=0;for(let i of t)s.set(i,c),c+=i.length;return s}var gt=function(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??"",s=o.indexOf(","),c=s>-1?s+1:o.length;t(o.substring(c))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})},Se=(e)=>{if(typeof Blob==="function"&&e instanceof Blob)return mt(e);return yt(e)};var Pe=O(Me(),1);var $=(e)=>typeof ReadableStream==="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream);var Ne="The stream has already been transformed.",Fe=(e)=>{if(!Re(e)&&!$(e)){const o=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${o}`)}let t=!1;const r=async()=>{if(t)throw new Error(Ne);return t=!0,await Se(e)},n=(o)=>{if(typeof o.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return o.stream()};return Object.assign(e,{transformToByteArray:r,transformToString:async(o)=>{const s=await r();if(o==="base64")return q(s);else if(o==="hex")return Pe.toHex(s);else if(o===void 0||o==="utf8"||o==="utf-8")return z(s);else if(typeof TextDecoder==="function")return new TextDecoder(o).decode(s);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(Ne);if(t=!0,Re(e))return n(e);else if($(e))return e;else throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},Re=(e)=>typeof Blob==="function"&&e instanceof Blob;var Le="The stream has already been transformed.",$o=(e)=>{if(!(e instanceof K))try{return Fe(e)}catch(n){const o=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${o}`)}let t=!1;const r=async()=>{if(t)throw new Error(Le);return t=!0,await ge(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async(n)=>{const o=await r();if(n===void 0||Buffer.isEncoding(n))return I(o.buffer,o.byteOffset,o.byteLength).toString(n);else return new $t(n).decode(o)},transformToWebStream:()=>{if(t)throw new Error(Le);if(e.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof K.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return t=!0,K.toWeb(e)}})};import{PassThrough as De} from"stream";async function Oe(e){if(typeof e.stream==="function")e=e.stream();return e.tee()}async function No(e){if($(e))return Oe(e);const t=new De,r=new De;return e.pipe(t),e.pipe(r),[t,r]}import{Writable as At} from"stream";async function ve(e,t){let r=0;const n=[],o=e.getReader();let s=!1;while(!s){const{done:d,value:l}=await o.read();if(l)n.push(l),r+=l?.byteLength??0;if(r>=t)break;s=d}o.releaseLock();const c=new Uint8Array(Math.min(t,r));let i=0;for(let d of n){if(d.byteLength>c.byteLength-i){c.set(d.subarray(0,c.byteLength-i),i);break}else c.set(d,i);i+=d.length}return c}var Do=(e,t)=>{if($(e))return ve(e,t);return new Promise((r,n)=>{const o=new Be;o.limit=t,e.pipe(o),e.on("error",(s)=>{o.end(),n(s)}),o.on("error",n),o.on("finish",function(){const s=new Uint8Array(Buffer.concat(this.buffers));r(s)})})};class Be extends At{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write(e,t,r){if(this.buffers.push(e),this.bytesBuffered+=e.byteLength??0,this.bytesBuffered>=this.limit){const n=this.bytesBuffered-this.limit,o=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=o.subarray(0,o.byteLength-n),this.emit("finish")}r()}}var Jo=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return T.mutate(e);if(!e)return T.mutate(new Uint8Array);const r=t.streamCollector(e);return T.mutate(await r)};var Zo=(e)=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}};var It=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string"){const t=parseFloat(e);if(!Number.isNaN(t)){if(String(t)!==String(e))Je.warn(Ye(`Expected number but observed string: ${e}`));return t}}if(typeof e==="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)},kt=Math.ceil(340282346638528860000000000000000000000),ze=(e)=>{const t=It(e);if(t!==void 0&&!Number.isNaN(t)&&t!==Infinity&&t!==(-Infinity)){if(Math.abs(t)>kt)throw new TypeError(`Expected 32-bit float, got ${e}`)}return t},X=(e)=>{if(e===null||e===void 0)return;if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)};var qe=(e)=>ee(e,32),He=(e)=>ee(e,16),We=(e)=>ee(e,8),ee=(e,t)=>{const r=X(e);if(r!==void 0&&Ut(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},Ut=(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]}},Qo=(e,t)=>{if(e===null||e===void 0){if(t)throw new TypeError(`Expected a non-null value for ${t}`);throw new TypeError("Expected a non-null value")}return e},Go=(e)=>{if(e===null||e===void 0)return;if(typeof e==="object"&&!Array.isArray(e))return e;const t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},Ko=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string")return e;if(["boolean","number","bigint"].includes(typeof e))return Je.warn(Ye(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)};var je=(e)=>{if(typeof e=="string")return ze(F(e));return ze(e)},Mt=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,F=(e)=>{const t=e.match(Mt);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)};var Xo=(e)=>{if(typeof e==="string")return X(F(e));return X(e)};var es=(e)=>{if(typeof e==="string")return qe(F(e));return qe(e)},U=(e)=>{if(typeof e==="string")return He(F(e));return He(e)},_e=(e)=>{if(typeof e==="string")return We(F(e));return We(e)},Ye=(e)=>{return String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((t)=>!t.includes("stackTraceWarning")).join("\n")},Je={warn:console.warn};function os(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),o=e.getUTCDate(),s=e.getUTCHours(),c=e.getUTCMinutes(),i=e.getUTCSeconds(),d=o<10?`0${o}`:`${o}`,l=s<10?`0${s}`:`${s}`,w=c<10?`0${c}`:`${c}`,a=i<10?`0${i}`:`${i}`;return`${Nt[n]}, ${d} ${re[r]} ${t} ${l}:${w}:${a} GMT`}var Nt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],re=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Rt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),ss=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Rt.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,s,c,i,d,l]=t,w=U(M(n)),a=b(o,"month",1,12),f=b(s,"day",1,31);return L(w,a,f,{hours:c,minutes:i,seconds:d,fractionalMilliseconds:l})},Pt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),is=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Pt.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,s,c,i,d,l,w]=t,a=U(M(n)),f=b(o,"month",1,12),h=b(s,"day",1,31),g=L(a,f,h,{hours:c,minutes:i,seconds:d,fractionalMilliseconds:l});if(w.toUpperCase()!="Z")g.setTime(g.getTime()-jt(w));return g},Ft=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$/),Lt=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$/),Ot=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})$/),cs=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=Ft.exec(e);if(t){const[r,n,o,s,c,i,d,l]=t;return L(U(M(s)),te(o),b(n,"day",1,31),{hours:c,minutes:i,seconds:d,fractionalMilliseconds:l})}if(t=Lt.exec(e),t){const[r,n,o,s,c,i,d,l]=t;return Bt(L(Dt(s),te(o),b(n,"day",1,31),{hours:c,minutes:i,seconds:d,fractionalMilliseconds:l}))}if(t=Ot.exec(e),t){const[r,n,o,s,c,i,d,l]=t;return L(U(M(l)),te(n),b(o.trimLeft(),"day",1,31),{hours:s,minutes:c,seconds:i,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")};var L=(e,t,r,n)=>{const o=t-1;return qt(e,o,r),new Date(Date.UTC(e,o,r,b(n.hours,"hour",0,23),b(n.minutes,"minute",0,59),b(n.seconds,"seconds",0,60),Wt(n.fractionalMilliseconds)))},Dt=(e)=>{const t=(new Date()).getUTCFullYear(),r=Math.floor(t/100)*100+U(M(e));if(r<t)return r+100;return r},vt=1576800000000,Bt=(e)=>{if(e.getTime()-(new Date()).getTime()>vt)return new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()));return e},te=(e)=>{const t=re.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},zt=[31,28,31,30,31,30,31,31,30,31,30,31],qt=(e,t,r)=>{let n=zt[t];if(t===1&&Ht(e))n=29;if(r>n)throw new TypeError(`Invalid day for ${re[t]} in ${e}: ${r}`)},Ht=(e)=>{return e%4===0&&(e%100!==0||e%400===0)},b=(e,t,r,n)=>{const o=_e(M(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},Wt=(e)=>{if(e===null||e===void 0)return 0;return je("0."+e)*1000},jt=(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*1000},M=(e)=>{let t=0;while(t<e.length-1&&e.charAt(t)==="0")t++;if(t===0)return e;return e.slice(t)};var _t=({output:e,parsedBody:t,exceptionCtor:r,errorCode:n})=>{const o=Yt(e),s=o.httpStatusCode?o.httpStatusCode+"":void 0,c=new r({name:t?.code||t?.Code||n||s||"UnknownError",$fault:"client",$metadata:o});throw xe(c,t)},us=(e)=>{return({output:t,parsedBody:r,errorCode:n})=>{_t({output:t,parsedBody:r,exceptionCtor:e,errorCode:n})}},Yt=(e)=>({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"]});var ls=(e)=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var Ve=!1,ps=(e)=>{if(e&&!Ve&&parseInt(e.substring(1,e.indexOf(".")))<16)Ve=!0};var ne=O(j(),1);var Ze=(e)=>{const t=[];for(let r in ne.AlgorithmId){const n=ne.AlgorithmId[r];if(e[n]===void 0)continue;t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},Qe=(e)=>{const t={};return e.checksumAlgorithms().forEach((r)=>{t[r.algorithmId()]=r.checksumConstructor()}),t};var Ge=(e)=>{let t=e.retryStrategy;return{setRetryStrategy(r){t=r},retryStrategy(){return t}}},Ke=(e)=>{const t={};return t.retryStrategy=e.retryStrategy(),t};var bs=(e)=>{return{...Ze(e),...Ge(e)}};var Es=(e)=>{return{...Qe(e),...Ke(e)}};function Jt(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}var oe=function(){const e=Object.getPrototypeOf(this).constructor,r=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(r,e.prototype),r};oe.prototype=Object.create(String.prototype,{constructor:{value:oe,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(oe,String);function Vt(e,t,r){let n,o,s;if(typeof t==="undefined"&&typeof r==="undefined")n={},s=e;else if(n=e,typeof t==="function")return o=t,s=r,Zt(n,o,s);else s=t;for(let c of Object.keys(s)){if(!Array.isArray(s[c])){n[c]=s[c];continue}Xe(n,null,s,c)}return n}var Us=(e,t)=>{const r={};for(let n in t)Xe(r,e,t,n);return r},Zt=(e,t,r)=>{return Vt(e,Object.entries(r).reduce((n,[o,s])=>{if(Array.isArray(s))n[o]=s;else if(typeof s==="function")n[o]=[t,s()];else n[o]=[t,s];return n},{}))},Xe=(e,t,r,n)=>{if(t!==null){let c=r[n];if(typeof c==="function")c=[,c];const[i=Qt,d=Gt,l=n]=c;if(typeof i==="function"&&i(t[l])||typeof i!=="function"&&!!i)e[n]=d(t[l]);return}let[o,s]=r[n];if(typeof s==="function"){let c;const i=o===void 0&&(c=s())!=null,d=typeof o==="function"&&!!o(void 0)||typeof o!=="function"&&!!o;if(i)e[n]=c;else if(d)e[n]=s()}else{const c=o===void 0&&s!=null,i=typeof o==="function"&&!!o(s)||typeof o!=="function"&&!!o;if(c||i)e[n]=s}},Qt=(e)=>e!=null,Gt=(e)=>e;var Ps=(e)=>e.toISOString().replace(".000Z","Z");var et=(e)=>{if(e==null)return{};if(Array.isArray(e))return e.filter((t)=>t!=null).map(et);if(typeof e==="object"){const t={};for(let r of Object.keys(e)){if(e[r]==null)continue;t[r]=et(e[r])}return t}return e};export{ir as z,cr as A,_ as B,R as C,lt as D,tt as E,be as F,I as G,v as H,B as I,k as J,Rn as K,z as L,q as M,Xn as N,V as O,ge as P,Me as Q,$o as R,No as S,Do as T,Jo as U,ae as V,gn as W,xn as X,Zo as Y,X as Z,qe as _,Qo as $,Go as aa,Ko as ba,Xo as ca,es as da,os as ea,ss as fa,is as ga,cs as ha,we as ia,xe as ja,us as ka,ls as la,ps as ma,bs as na,Es as oa,Jt as pa,Vt as qa,Us as ra,Ps as sa,et as ta};
@@ -0,0 +1,3 @@
1
+ import{x as $,y as B} from"./chunk-a5c18c07abe8fd9c.js";import{ib as X} from"./chunk-442a5b1ec74c72f8.js";var K=B((Br,gt)=>{var{defineProperty:H,getOwnPropertyDescriptor:be,getOwnPropertyNames:Te}=Object,Se=Object.prototype.hasOwnProperty,b=(t,e)=>H(t,"name",{value:e,configurable:!0}),Ce=(t,e)=>{for(var r in e)H(t,r,{get:e[r],enumerable:!0})},Ee=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let o of Te(e))if(!Se.call(t,o)&&o!==r)H(t,o,{get:()=>e[o],enumerable:!(n=be(e,o))||n.enumerable})}return t},$e=(t)=>Ee(H({},"__esModule",{value:!0}),t),mt={};Ce(mt,{constructStack:()=>G});gt.exports=$e(mt);var A=b((t,e)=>{const r=[];if(t)r.push(t);if(e)for(let n of e)r.push(n);return r},"getAllAliases"),E=b((t,e)=>{return`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`},"getMiddlewareNameWithAliases"),G=b(()=>{let t=[],e=[],r=!1;const n=new Set,o=b((f)=>f.sort((p,u)=>dt[u.step]-dt[p.step]||lt[u.priority||"normal"]-lt[p.priority||"normal"]),"sort"),s=b((f)=>{let p=!1;const u=b((y)=>{const g=A(y.name,y.aliases);if(g.includes(f)){p=!0;for(let l of g)n.delete(l);return!1}return!0},"filterCb");return t=t.filter(u),e=e.filter(u),p},"removeByName"),c=b((f)=>{let p=!1;const u=b((y)=>{if(y.middleware===f){p=!0;for(let g of A(y.name,y.aliases))n.delete(g);return!1}return!0},"filterCb");return t=t.filter(u),e=e.filter(u),p},"removeByReference"),i=b((f)=>{var p;return t.forEach((u)=>{f.add(u.middleware,{...u})}),e.forEach((u)=>{f.addRelativeTo(u.middleware,{...u})}),(p=f.identifyOnResolve)==null||p.call(f,w.identifyOnResolve()),f},"cloneTo"),a=b((f)=>{const p=[];return f.before.forEach((u)=>{if(u.before.length===0&&u.after.length===0)p.push(u);else p.push(...a(u))}),p.push(f),f.after.reverse().forEach((u)=>{if(u.before.length===0&&u.after.length===0)p.push(u);else p.push(...a(u))}),p},"expandRelativeMiddlewareList"),d=b((f=!1)=>{const p=[],u=[],y={};return t.forEach((l)=>{const h={...l,before:[],after:[]};for(let m of A(h.name,h.aliases))y[m]=h;p.push(h)}),e.forEach((l)=>{const h={...l,before:[],after:[]};for(let m of A(h.name,h.aliases))y[m]=h;u.push(h)}),u.forEach((l)=>{if(l.toMiddleware){const h=y[l.toMiddleware];if(h===void 0){if(f)return;throw new Error(`${l.toMiddleware} is not found when adding ${E(l.name,l.aliases)} middleware ${l.relation} ${l.toMiddleware}`)}if(l.relation==="after")h.after.push(l);if(l.relation==="before")h.before.push(l)}}),o(p).map(a).reduce((l,h)=>{return l.push(...h),l},[])},"getMiddlewareList"),w={add:(f,p={})=>{const{name:u,override:y,aliases:g}=p,l={step:"initialize",priority:"normal",middleware:f,...p},h=A(u,g);if(h.length>0){if(h.some((m)=>n.has(m))){if(!y)throw new Error(`Duplicate middleware name '${E(u,g)}'`);for(let m of h){const S=t.findIndex((P)=>{var D;return P.name===m||((D=P.aliases)==null?void 0:D.some((Q)=>Q===m))});if(S===-1)continue;const x=t[S];if(x.step!==l.step||l.priority!==x.priority)throw new Error(`"${E(x.name,x.aliases)}" middleware with ${x.priority} priority in ${x.step} step cannot be overridden by "${E(u,g)}" middleware with ${l.priority} priority in ${l.step} step.`);t.splice(S,1)}}for(let m of h)n.add(m)}t.push(l)},addRelativeTo:(f,p)=>{const{name:u,override:y,aliases:g}=p,l={middleware:f,...p},h=A(u,g);if(h.length>0){if(h.some((m)=>n.has(m))){if(!y)throw new Error(`Duplicate middleware name '${E(u,g)}'`);for(let m of h){const S=e.findIndex((P)=>{var D;return P.name===m||((D=P.aliases)==null?void 0:D.some((Q)=>Q===m))});if(S===-1)continue;const x=e[S];if(x.toMiddleware!==l.toMiddleware||x.relation!==l.relation)throw new Error(`"${E(x.name,x.aliases)}" middleware ${x.relation} "${x.toMiddleware}" middleware cannot be overridden by "${E(u,g)}" middleware ${l.relation} "${l.toMiddleware}" middleware.`);e.splice(S,1)}}for(let m of h)n.add(m)}e.push(l)},clone:()=>i(G()),use:(f)=>{f.applyToStack(w)},remove:(f)=>{if(typeof f==="string")return s(f);else return c(f)},removeByTag:(f)=>{let p=!1;const u=b((y)=>{const{tags:g,name:l,aliases:h}=y;if(g&&g.includes(f)){const m=A(l,h);for(let S of m)n.delete(S);return p=!0,!1}return!0},"filterCb");return t=t.filter(u),e=e.filter(u),p},concat:(f)=>{var p;const u=i(G());return u.use(f),u.identifyOnResolve(r||u.identifyOnResolve()||(((p=f.identifyOnResolve)==null?void 0:p.call(f))??!1)),u},applyToStack:i,identify:()=>{return d(!0).map((f)=>{const p=f.step??f.relation+" "+f.toMiddleware;return E(f.name,f.aliases)+" - "+p})},identifyOnResolve(f){if(typeof f==="boolean")r=f;return r},resolve:(f,p)=>{for(let u of d().map((y)=>y.middleware).reverse())f=u(f,p);if(r)console.log(w.identify());return f}};return w},"constructStack"),dt={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},lt={high:3,normal:2,low:1}});var $t=B((cn,Et)=>{var{defineProperty:q,getOwnPropertyDescriptor:Fe,getOwnPropertyNames:Ne}=Object,ke=Object.prototype.hasOwnProperty,_=(t,e)=>q(t,"name",{value:e,configurable:!0}),Pe=(t,e)=>{for(var r in e)q(t,r,{get:e[r],enumerable:!0})},De=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let o of Ne(e))if(!ke.call(t,o)&&o!==r)q(t,o,{get:()=>e[o],enumerable:!(n=Fe(e,o))||n.enumerable})}return t},Le=(t)=>De(q({},"__esModule",{value:!0}),t),St={};Pe(St,{escapeUri:()=>Ct,escapeUriPath:()=>Re});Et.exports=Le(St);var Ct=_((t)=>encodeURIComponent(t).replace(/[!'()*]/g,Me),"escapeUri"),Me=_((t)=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Re=_((t)=>t.split("/").map(Ct).join("/"),"escapeUriPath")});var Ht=B((vn,Bt)=>{var{defineProperty:O,getOwnPropertyDescriptor:Je,getOwnPropertyNames:Ve}=Object,Ze=Object.prototype.hasOwnProperty,Qe=(t,e)=>O(t,"name",{value:e,configurable:!0}),Ge=(t,e)=>{for(var r in e)O(t,r,{get:e[r],enumerable:!0})},Ke=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let o of Ve(e))if(!Ze.call(t,o)&&o!==r)O(t,o,{get:()=>e[o],enumerable:!(n=Je(e,o))||n.enumerable})}return t},Xe=(t)=>Ke(O({},"__esModule",{value:!0}),t),Rt={};Ge(Rt,{isArrayBuffer:()=>ve});Bt.exports=Xe(Rt);var ve=Qe((t)=>typeof ArrayBuffer==="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]","isArrayBuffer")});var Gt=B((Yo,Qt)=>{var Vt=function(t){if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const e=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2){const n=t.slice(r,r+2).toLowerCase();if(n in st)e[r/2]=st[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return e},Zt=function(t){let e="";for(let r=0;r<t.byteLength;r++)e+=Jt[t[r]];return e},Z=Object.defineProperty,or=Object.getOwnPropertyDescriptor,sr=Object.getOwnPropertyNames,ir=Object.prototype.hasOwnProperty,Wt=(t,e)=>Z(t,"name",{value:e,configurable:!0}),cr=(t,e)=>{for(var r in e)Z(t,r,{get:e[r],enumerable:!0})},fr=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let o of sr(e))if(!ir.call(t,o)&&o!==r)Z(t,o,{get:()=>e[o],enumerable:!(n=or(e,o))||n.enumerable})}return t},ur=(t)=>fr(Z({},"__esModule",{value:!0}),t),zt={};cr(zt,{fromHex:()=>Vt,toHex:()=>Zt});Qt.exports=ur(zt);var Jt={},st={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();if(e.length===1)e=`0${e}`;Jt[t]=e,st[e]=t}Wt(Vt,"fromHex");Wt(Zt,"toHex")});var yt=$(K(),1);class Ae{constructor(t){this.middlewareStack=yt.constructStack(),this.config=t}send(t,e,r){const n=typeof e!=="function"?e:void 0,o=typeof e==="function"?e:r,s=t.resolveMiddleware(this.middlewareStack,this.config,n);if(o)s(t).then((c)=>o(null,c.output),(c)=>o(c)).catch(()=>{});else return s(t).then((c)=>c.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}}var wt=$(K(),1),xt=$(X(),1);class bt{constructor(){this.middlewareStack=wt.constructStack()}static classBuilder(){return new Tt}resolveMiddlewareWithContext(t,e,r,{middlewareFn:n,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,smithyContext:a,additionalContext:d,CommandCtor:w}){for(let g of n.bind(this)(w,t,e,r))this.middlewareStack.use(g);const f=t.concat(this.middlewareStack),{logger:p}=e,u={logger:p,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,[xt.SMITHY_CONTEXT_KEY]:{commandInstance:this,...a},...d},{requestHandler:y}=e;return f.resolve((g)=>y.handle(g.request,r||{}),u)}}class Tt{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(t)=>t,this._outputFilterSensitiveLog=(t)=>t,this._serializer=null,this._deserializer=null}init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,e,r={}){return this._smithyContext={service:t,operation:e,...r},this}c(t={}){return this._additionalContext=t,this}n(t,e){return this._clientName=t,this._commandName=e,this}f(t=(r)=>r,e=(r)=>r){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=e,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}build(){const t=this;let e;return e=class extends bt{static getEndpointParameterInstructions(){return t._ep}constructor(...[r]){super();this.serialize=t._serializer,this.deserialize=t._deserializer,this.input=r??{},t._init(this)}resolveMiddleware(r,n,o){return this.resolveMiddlewareWithContext(r,n,o,{CommandCtor:e,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog,outputFilterSensitiveLog:t._outputFilterSensitiveLog,smithyContext:t._smithyContext,additionalContext:t._additionalContext})}}}}var Yr=(t)=>{let e=t.httpHandler;return{setHttpHandler(r){e=r},httpHandler(){return e},updateHttpClientConfig(r,n){e.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return e.httpHandlerConfigs()}}},Or=(t)=>{return{httpHandler:t.httpHandler()}};var Ie=$(X(),1);var Ue=function(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return{...e,[r]:Array.isArray(n)?[...n]:n}},{})};class v{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 e=new v({...t,headers:{...t.headers}});if(e.query)e.query=Ue(e.query);return e}static isInstance(t){if(!t)return!1;const e=t;return"method"in e&&"protocol"in e&&"hostname"in e&&"path"in e&&typeof e.query==="object"&&typeof e.headers==="object"}clone(){return v.clone(this)}}class L{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 e=t;return typeof e.statusCode==="number"&&typeof e.headers==="object"}}var j=$($t(),1);function Y(t){const e=[];for(let r of Object.keys(t).sort()){const n=t[r];if(r=j.escapeUri(r),Array.isArray(n))for(let o=0,s=n.length;o<s;o++)e.push(`${r}=${j.escapeUri(n[o])}`);else{let o=r;if(n||typeof n==="string")o+=`=${j.escapeUri(n)}`;e.push(o)}}return e.join("&")}import{Agent as kt,request as qe} from"http";import{Agent as Pt,request as je} from"https";var At=["ECONNRESET","EPIPE","ETIMEDOUT"];var tt=(t)=>{const e={};for(let r of Object.keys(t)){const n=t[r];e[r]=Array.isArray(n)?n.join(","):n}return e};var It=(t,e,r=0)=>{if(!r)return;const n=setTimeout(()=>{t.destroy(),e(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r);t.on("socket",(o)=>{if(o.connecting)o.on("connect",()=>{clearTimeout(n)});else clearTimeout(n)})};var Ut=(t,{keepAlive:e,keepAliveMsecs:r})=>{if(e!==!0)return;t.on("socket",(n)=>{n.setKeepAlive(e,r||0)})};var Ft=(t,e,r=0)=>{t.setTimeout(r,()=>{t.destroy(),e(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))})};import{Readable as Be} from"stream";async function et(t,e,r=Nt){const n=e.headers??{},o=n.Expect||n.expect;let s=-1,c=!1;if(o==="100-continue")await Promise.race([new Promise((i)=>{s=Number(setTimeout(i,Math.max(Nt,r)))}),new Promise((i)=>{t.on("continue",()=>{clearTimeout(s),i()}),t.on("error",()=>{c=!0,clearTimeout(s),i()})})]);if(!c)He(t,e.body)}var He=function(t,e){if(e instanceof Be){e.pipe(t);return}if(e){if(Buffer.isBuffer(e)||typeof e==="string"){t.end(e);return}const r=e;if(typeof r==="object"&&r.buffer&&typeof r.byteOffset==="number"&&typeof r.byteLength==="number"){t.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}t.end(Buffer.from(e));return}t.end()},Nt=1000;class rt{static create(t){if(typeof t?.handle==="function")return t;return new rt(t)}static checkSocketUsage(t,e,r=console){const{sockets:n,requests:o,maxSockets:s}=t;if(typeof s!=="number"||s===Infinity)return e;const c=15000;if(Date.now()-c<e)return e;if(n&&o)for(let i in n){const a=n[i]?.length??0,d=o[i]?.length??0;if(a>=s&&d>=2*s)return r?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${a} and ${d} additional requests are enqueued.
2
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return e}constructor(t){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((e,r)=>{if(typeof t==="function")t().then((n)=>{e(this.resolveDefaultConfig(n))}).catch(r);else e(this.resolveDefaultConfig(t))})}resolveDefaultConfig(t){const{requestTimeout:e,connectionTimeout:r,socketTimeout:n,httpAgent:o,httpsAgent:s}=t||{};return{connectionTimeout:r,requestTimeout:e??n,httpAgent:(()=>{if(o instanceof kt||typeof o?.destroy==="function")return o;return new kt({keepAlive:!0,maxSockets:50,...o})})(),httpsAgent:(()=>{if(s instanceof Pt||typeof s?.destroy==="function")return s;return new Pt({keepAlive:!0,maxSockets:50,...s})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(t,{abortSignal:e}={}){if(!this.config)this.config=await this.configProvider;let r;return new Promise((n,o)=>{let s=void 0;const c=async(h)=>{await s,clearTimeout(r),n(h)},i=async(h)=>{await s,clearTimeout(r),o(h)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(e?.aborted){const h=new Error("Request aborted");h.name="AbortError",i(h);return}const a=t.protocol==="https:",d=a?this.config.httpsAgent:this.config.httpAgent;r=setTimeout(()=>{this.socketWarningTimestamp=rt.checkSocketUsage(d,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const w=Y(t.query||{});let f=void 0;if(t.username!=null||t.password!=null){const h=t.username??"",m=t.password??"";f=`${h}:${m}`}let p=t.path;if(w)p+=`?${w}`;if(t.fragment)p+=`#${t.fragment}`;const u={headers:t.headers,host:t.hostname,method:t.method,path:p,port:t.port,agent:d,auth:f},g=(a?je:qe)(u,(h)=>{const m=new L({statusCode:h.statusCode||-1,reason:h.statusMessage,headers:tt(h.headers),body:h});c({response:m})});if(g.on("error",(h)=>{if(At.includes(h.code))i(Object.assign(h,{name:"TimeoutError"}));else i(h)}),It(g,i,this.config.connectionTimeout),Ft(g,i,this.config.requestTimeout),e){const h=()=>{g.destroy();const m=new Error("Request aborted");m.name="AbortError",i(m)};if(typeof e.addEventListener==="function"){const m=e;m.addEventListener("abort",h,{once:!0}),g.once("close",()=>m.removeEventListener("abort",h))}else e.onabort=h}const l=u.agent;if(typeof l==="object"&&"keepAlive"in l)Ut(g,{keepAlive:l.keepAlive,keepAliveMsecs:l.keepAliveMsecs});s=et(g,t,this.config.requestTimeout).catch((h)=>{return clearTimeout(r),o(h)})})}updateHttpClientConfig(t,e){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[t]:e}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as Ye} from"stream";class nt extends Ye{constructor(){super(...arguments);this.bufferedBytes=[]}_write(t,e,r){this.bufferedBytes.push(t),r()}}async function We(t){const e=[],r=t.getReader();let n=!1,o=0;while(!n){const{done:i,value:a}=await r.read();if(a)e.push(a),o+=a.length;n=i}const s=new Uint8Array(o);let c=0;for(let i of e)s.set(i,c),c+=i.length;return s}var Dt=(t)=>{if(Oe(t))return We(t);return new Promise((e,r)=>{const n=new nt;t.pipe(n),t.on("error",(o)=>{n.end(),r(o)}),n.on("error",r),n.on("finish",function(){const o=new Uint8Array(Buffer.concat(this.bufferedBytes));e(o)})})},Oe=(t)=>typeof ReadableStream==="function"&&t instanceof ReadableStream;var Vn="***SensitiveInformation***";var Qn=(t,e)=>{for(let r of Object.keys(t)){const n=t[r],o=async function(c,i,a){const d=new n(c);if(typeof i==="function")this.send(d,i);else if(typeof a==="function"){if(typeof i!=="object")throw new Error(`Expected http options but got ${typeof i}`);this.send(d,i||{},a)}else return this.send(d,i)},s=(r[0].toLowerCase()+r.slice(1)).replace(/Command$/,"");e.prototype[s]=o}};class Lt extends Error{constructor(t){super(t.message);Object.setPrototypeOf(this,Lt.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}}var Mt=(t,e={})=>{Object.entries(e).filter(([,n])=>n!==void 0).forEach(([n,o])=>{if(t[n]==null||t[n]==="")t[n]=o});const r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t};class ze{trace(){}debug(){}info(){}warn(){}error(){}}var qt=$(Ht(),1);import{Buffer as ot} from"buffer";var U=(t,e=0,r=t.byteLength-e)=>{if(!qt.isArrayBuffer(t))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof t} (${t})`);return ot.from(t,e,r)},W=(t,e)=>{if(typeof t!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof t} (${t})`);return e?ot.from(t,e):ot.from(t)};var _e=/^[A-Za-z0-9+/]*={0,2}$/,z=(t)=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!_e.exec(t))throw new TypeError("Invalid base64 string.");const e=W(t,"base64");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)};var F=(t)=>{const e=W(t,"utf8");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var io=(t)=>{if(typeof t==="string")return F(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(t)};var J=(t)=>{if(typeof t==="string")return t;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return U(t.buffer,t.byteOffset,t.byteLength).toString("utf8")};var V=(t)=>{let e;if(typeof t==="string")e=F(t);else e=t;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return U(e.buffer,e.byteOffset,e.byteLength).toString("base64")};function jt(t,e="utf-8"){if(e==="base64")return V(t);return J(t)}function Yt(t,e){if(e==="base64")return C.mutate(z(t));return C.mutate(F(t))}class C extends Uint8Array{static fromString(t,e="utf-8"){switch(typeof t){case"string":return Yt(t,e);default:throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}}static mutate(t){return Object.setPrototypeOf(t,C.prototype),t}transformToString(t="utf-8"){return jt(this,t)}}import{Readable as tr} from"stream";var Uo=(t,e)=>{const{base64Encoder:r,bodyLengthChecker:n,checksumAlgorithmFn:o,checksumLocationName:s,streamHasher:c}=e,i=r!==void 0&&o!==void 0&&s!==void 0&&c!==void 0,a=i?c(o,t):void 0,d=new tr({read:()=>{}});return t.on("data",(w)=>{const f=n(w)||0;d.push(`${f.toString(16)}\r\n`),d.push(w),d.push("\r\n")}),t.on("end",async()=>{if(d.push("0\r\n"),i){const w=r(await a);d.push(`${s}:${w}\r\n`),d.push("\r\n")}d.push(null)}),d};import{Readable as it} from"stream";import{TextDecoder as hr} from"util";async function er(t){const e=await nr(t),r=z(e);return new Uint8Array(r)}async function rr(t){const e=[],r=t.getReader();let n=!1,o=0;while(!n){const{done:i,value:a}=await r.read();if(a)e.push(a),o+=a.length;n=i}const s=new Uint8Array(o);let c=0;for(let i of e)s.set(i,c),c+=i.length;return s}var nr=function(t){return new Promise((e,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const o=n.result??"",s=o.indexOf(","),c=s>-1?s+1:o.length;e(o.substring(c))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(t)})},Ot=(t)=>{if(typeof Blob==="function"&&t instanceof Blob)return er(t);return rr(t)};var vt=$(Gt(),1);var I=(t)=>typeof ReadableStream==="function"&&(t?.constructor?.name===ReadableStream.name||t instanceof ReadableStream);var Kt="The stream has already been transformed.",_t=(t)=>{if(!Xt(t)&&!I(t)){const o=t?.__proto__?.constructor?.name||t;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${o}`)}let e=!1;const r=async()=>{if(e)throw new Error(Kt);return e=!0,await Ot(t)},n=(o)=>{if(typeof o.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return o.stream()};return Object.assign(t,{transformToByteArray:r,transformToString:async(o)=>{const s=await r();if(o==="base64")return V(s);else if(o==="hex")return vt.toHex(s);else if(o===void 0||o==="utf8"||o==="utf-8")return J(s);else if(typeof TextDecoder==="function")return new TextDecoder(o).decode(s);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(e)throw new Error(Kt);if(e=!0,Xt(t))return n(t);else if(I(t))return t;else throw new Error(`Cannot transform payload to web stream, got ${t}`)}})},Xt=(t)=>typeof Blob==="function"&&t instanceof Blob;var te="The stream has already been transformed.",_o=(t)=>{if(!(t instanceof it))try{return _t(t)}catch(n){const o=t?.__proto__?.constructor?.name||t;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${o}`)}let e=!1;const r=async()=>{if(e)throw new Error(te);return e=!0,await Dt(t)};return Object.assign(t,{transformToByteArray:r,transformToString:async(n)=>{const o=await r();if(n===void 0||Buffer.isEncoding(n))return U(o.buffer,o.byteOffset,o.byteLength).toString(n);else return new hr(n).decode(o)},transformToWebStream:()=>{if(e)throw new Error(te);if(t.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof it.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return e=!0,it.toWeb(t)}})};import{PassThrough as re} from"stream";async function ee(t){if(typeof t.stream==="function")t=t.stream();return t.tee()}async function ss(t){if(I(t))return ee(t);const e=new re,r=new re;return t.pipe(e),t.pipe(r),[e,r]}import{Writable as ar} from"stream";async function ne(t,e){let r=0;const n=[],o=t.getReader();let s=!1;while(!s){const{done:a,value:d}=await o.read();if(d)n.push(d),r+=d?.byteLength??0;if(r>=e)break;s=a}o.releaseLock();const c=new Uint8Array(Math.min(e,r));let i=0;for(let a of n){if(a.byteLength>c.byteLength-i){c.set(a.subarray(0,c.byteLength-i),i);break}else c.set(a,i);i+=a.length}return c}var as=(t,e)=>{if(I(t))return ne(t,e);return new Promise((r,n)=>{const o=new oe;o.limit=e,t.pipe(o),t.on("error",(s)=>{o.end(),n(s)}),o.on("error",n),o.on("finish",function(){const s=new Uint8Array(Buffer.concat(this.buffers));r(s)})})};class oe extends ar{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write(t,e,r){if(this.buffers.push(t),this.bytesBuffered+=t.byteLength??0,this.bytesBuffered>=this.limit){const n=this.bytesBuffered-this.limit,o=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=o.subarray(0,o.byteLength-n),this.emit("finish")}r()}}var Ts=async(t=new Uint8Array,e)=>{if(t instanceof Uint8Array)return C.mutate(t);if(!t)return C.mutate(new Uint8Array);const r=e.streamCollector(t);return C.mutate(await r)};var Cs=(t)=>{switch(t){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${t}"`)}};var pr=(t)=>{if(t===null||t===void 0)return;if(typeof t==="string"){const e=parseFloat(t);if(!Number.isNaN(e)){if(String(e)!==String(t))pe.warn(ae(`Expected number but observed string: ${t}`));return e}}if(typeof t==="number")return t;throw new TypeError(`Expected number, got ${typeof t}: ${t}`)},dr=Math.ceil(340282346638528860000000000000000000000),se=(t)=>{const e=pr(t);if(e!==void 0&&!Number.isNaN(e)&&e!==Infinity&&e!==(-Infinity)){if(Math.abs(e)>dr)throw new TypeError(`Expected 32-bit float, got ${t}`)}return e},ct=(t)=>{if(t===null||t===void 0)return;if(Number.isInteger(t)&&!Number.isNaN(t))return t;throw new TypeError(`Expected integer, got ${typeof t}: ${t}`)};var ie=(t)=>ft(t,32),ce=(t)=>ft(t,16),fe=(t)=>ft(t,8),ft=(t,e)=>{const r=ct(t);if(r!==void 0&&lr(r,e)!==r)throw new TypeError(`Expected ${e}-bit integer, got ${t}`);return r},lr=(t,e)=>{switch(e){case 32:return Int32Array.of(t)[0];case 16:return Int16Array.of(t)[0];case 8:return Int8Array.of(t)[0]}},Es=(t,e)=>{if(t===null||t===void 0){if(e)throw new TypeError(`Expected a non-null value for ${e}`);throw new TypeError("Expected a non-null value")}return t},$s=(t)=>{if(t===null||t===void 0)return;if(typeof t==="object"&&!Array.isArray(t))return t;const e=Array.isArray(t)?"array":typeof t;throw new TypeError(`Expected object, got ${e}: ${t}`)},As=(t)=>{if(t===null||t===void 0)return;if(typeof t==="string")return t;if(["boolean","number","bigint"].includes(typeof t))return pe.warn(ae(`Expected string, got ${typeof t}: ${t}`)),String(t);throw new TypeError(`Expected string, got ${typeof t}: ${t}`)};var ue=(t)=>{if(typeof t=="string")return se(M(t));return se(t)},mr=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,M=(t)=>{const e=t.match(mr);if(e===null||e[0].length!==t.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(t)};var Is=(t)=>{if(typeof t==="string")return ct(M(t));return ct(t)};var Us=(t)=>{if(typeof t==="string")return ie(M(t));return ie(t)},N=(t)=>{if(typeof t==="string")return ce(M(t));return ce(t)},he=(t)=>{if(typeof t==="string")return fe(M(t));return fe(t)},ae=(t)=>{return String(new TypeError(t).stack||t).split("\n").slice(0,5).filter((e)=>!e.includes("stackTraceWarning")).join("\n")},pe={warn:console.warn};function Ps(t){const e=t.getUTCFullYear(),r=t.getUTCMonth(),n=t.getUTCDay(),o=t.getUTCDate(),s=t.getUTCHours(),c=t.getUTCMinutes(),i=t.getUTCSeconds(),a=o<10?`0${o}`:`${o}`,d=s<10?`0${s}`:`${s}`,w=c<10?`0${c}`:`${c}`,f=i<10?`0${i}`:`${i}`;return`${gr[n]}, ${a} ${ht[r]} ${e} ${d}:${w}:${f} GMT`}var gr=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ht=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yr=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Ds=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const e=yr.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,s,c,i,a,d]=e,w=N(k(n)),f=T(o,"month",1,12),p=T(s,"day",1,31);return R(w,f,p,{hours:c,minutes:i,seconds:a,fractionalMilliseconds:d})},wr=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Ls=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const e=wr.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,s,c,i,a,d,w]=e,f=N(k(n)),p=T(o,"month",1,12),u=T(s,"day",1,31),y=R(f,p,u,{hours:c,minutes:i,seconds:a,fractionalMilliseconds:d});if(w.toUpperCase()!="Z")y.setTime(y.getTime()-Fr(w));return y},xr=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$/),br=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$/),Tr=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})$/),Ms=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let e=xr.exec(t);if(e){const[r,n,o,s,c,i,a,d]=e;return R(N(k(s)),ut(o),T(n,"day",1,31),{hours:c,minutes:i,seconds:a,fractionalMilliseconds:d})}if(e=br.exec(t),e){const[r,n,o,s,c,i,a,d]=e;return Er(R(Sr(s),ut(o),T(n,"day",1,31),{hours:c,minutes:i,seconds:a,fractionalMilliseconds:d}))}if(e=Tr.exec(t),e){const[r,n,o,s,c,i,a,d]=e;return R(N(k(d)),ut(n),T(o.trimLeft(),"day",1,31),{hours:s,minutes:c,seconds:i,fractionalMilliseconds:a})}throw new TypeError("Invalid RFC-7231 date-time value")};var R=(t,e,r,n)=>{const o=e-1;return Ar(t,o,r),new Date(Date.UTC(t,o,r,T(n.hours,"hour",0,23),T(n.minutes,"minute",0,59),T(n.seconds,"seconds",0,60),Ur(n.fractionalMilliseconds)))},Sr=(t)=>{const e=(new Date()).getUTCFullYear(),r=Math.floor(e/100)*100+N(k(t));if(r<e)return r+100;return r},Cr=1576800000000,Er=(t)=>{if(t.getTime()-(new Date()).getTime()>Cr)return new Date(Date.UTC(t.getUTCFullYear()-100,t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()));return t},ut=(t)=>{const e=ht.indexOf(t);if(e<0)throw new TypeError(`Invalid month: ${t}`);return e+1},$r=[31,28,31,30,31,30,31,31,30,31,30,31],Ar=(t,e,r)=>{let n=$r[e];if(e===1&&Ir(t))n=29;if(r>n)throw new TypeError(`Invalid day for ${ht[e]} in ${t}: ${r}`)},Ir=(t)=>{return t%4===0&&(t%100!==0||t%400===0)},T=(t,e,r,n)=>{const o=he(k(t));if(o<r||o>n)throw new TypeError(`${e} must be between ${r} and ${n}, inclusive`);return o},Ur=(t)=>{if(t===null||t===void 0)return 0;return ue("0."+t)*1000},Fr=(t)=>{const e=t[0];let r=1;if(e=="+")r=1;else if(e=="-")r=-1;else throw new TypeError(`Offset direction, ${e}, must be "+" or "-"`);const n=Number(t.substring(1,3)),o=Number(t.substring(4,6));return r*(n*60+o)*60*1000},k=(t)=>{let e=0;while(e<t.length-1&&t.charAt(e)==="0")e++;if(e===0)return t;return t.slice(e)};var Nr=({output:t,parsedBody:e,exceptionCtor:r,errorCode:n})=>{const o=kr(t),s=o.httpStatusCode?o.httpStatusCode+"":void 0,c=new r({name:e?.code||e?.Code||n||s||"UnknownError",$fault:"client",$metadata:o});throw Mt(c,e)},Hs=(t)=>{return({output:e,parsedBody:r,errorCode:n})=>{Nr({output:e,parsedBody:r,exceptionCtor:t,errorCode:n})}},kr=(t)=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]});var js=(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:30000};default:return{}}};var de=!1,Os=(t)=>{if(t&&!de&&parseInt(t.substring(1,t.indexOf(".")))<16)de=!0};var at=$(X(),1);var le=(t)=>{const e=[];for(let r in at.AlgorithmId){const n=at.AlgorithmId[r];if(t[n]===void 0)continue;e.push({algorithmId:()=>n,checksumConstructor:()=>t[n]})}return{_checksumAlgorithms:e,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},me=(t)=>{const e={};return t.checksumAlgorithms().forEach((r)=>{e[r.algorithmId()]=r.checksumConstructor()}),e};var ge=(t)=>{let e=t.retryStrategy;return{setRetryStrategy(r){e=r},retryStrategy(){return e}}},ye=(t)=>{const e={};return e.retryStrategy=t.retryStrategy(),e};var Qs=(t)=>{return{...le(t),...ge(t)}};var Gs=(t)=>{return{...me(t),...ye(t)}};function Pr(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}var pt=function(){const t=Object.getPrototypeOf(this).constructor,r=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(r,t.prototype),r};pt.prototype=Object.create(String.prototype,{constructor:{value:pt,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(pt,String);function Dr(t,e,r){let n,o,s;if(typeof e==="undefined"&&typeof r==="undefined")n={},s=t;else if(n=t,typeof e==="function")return o=e,s=r,Lr(n,o,s);else s=e;for(let c of Object.keys(s)){if(!Array.isArray(s[c])){n[c]=s[c];continue}we(n,null,s,c)}return n}var ni=(t,e)=>{const r={};for(let n in e)we(r,t,e,n);return r},Lr=(t,e,r)=>{return Dr(t,Object.entries(r).reduce((n,[o,s])=>{if(Array.isArray(s))n[o]=s;else if(typeof s==="function")n[o]=[e,s()];else n[o]=[e,s];return n},{}))},we=(t,e,r,n)=>{if(e!==null){let c=r[n];if(typeof c==="function")c=[,c];const[i=Mr,a=Rr,d=n]=c;if(typeof i==="function"&&i(e[d])||typeof i!=="function"&&!!i)t[n]=a(e[d]);return}let[o,s]=r[n];if(typeof s==="function"){let c;const i=o===void 0&&(c=s())!=null,a=typeof o==="function"&&!!o(void 0)||typeof o!=="function"&&!!o;if(i)t[n]=c;else if(a)t[n]=s()}else{const c=o===void 0&&s!=null,i=typeof o==="function"&&!!o(s)||typeof o!=="function"&&!!o;if(c||i)t[n]=s}},Mr=(t)=>t!=null,Rr=(t)=>t;var ci=(t)=>t.toISOString().replace(".000Z","Z");var xe=(t)=>{if(t==null)return{};if(Array.isArray(t))return t.filter((e)=>e!=null).map(xe);if(typeof t==="object"){const e={};for(let r of Object.keys(t)){if(t[r]==null)continue;e[r]=xe(t[r])}return e}return t};export{Yr as z,Or as A,v as B,L as C,ze as D,K as E,Ae as F,Ht as G,U as H,W as I,z as J,F as K,io as L,J as M,V as N,Uo as O,$t as P,rt as Q,Dt as R,Gt as S,_o as T,ss as U,as as V,Ts as W,bt as X,Vn as Y,Qn as Z,Cs as _,ct as $,ie as aa,Es as ba,$s as ca,As as da,Is as ea,Us as fa,Ps as ga,Ds as ha,Ls as ia,Ms as ja,Lt as ka,Mt as la,Hs as ma,js as na,Os as oa,Qs as pa,Gs as qa,Pr as ra,Dr as sa,ni as ta,ci as ua,xe as va};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{x as _} from"./chunk-a5c18c07abe8fd9c.js";import"./chunk-442a5b1ec74c72f8.js";import{lb as y} from"./chunk-2672477bf396bad8.js";import{ob as K,ub as S} from"./chunk-73c97da8ac4f1d30.js";var o=_(y(),1);import{exec as A} from"child_process";import{promisify as T} from"util";var i=(c,n,s)=>{if(n.Version!==1)throw Error(`Profile ${c} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${c} credential_process returned invalid credentials.`);if(n.Expiration){const t=new Date;if(new Date(n.Expiration)<t)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let e=n.AccountId;if(!e&&s?.[c]?.aws_account_id)e=s[c].aws_account_id;return{accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...e&&{accountId:e}}};var x=async(c,n,s)=>{const e=n[c];if(n[c]){const t=e.credential_process;if(t!==void 0){const u=T(A);try{const{stdout:r}=await u(t);let w;try{w=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return i(c,w,n)}catch(r){throw new o.CredentialsProviderError(r.message,{logger:s})}}else throw new o.CredentialsProviderError(`Profile ${c} did not contain credential_process.`,{logger:s})}else throw new o.CredentialsProviderError(`Profile ${c} could not be found in shared credentials file.`,{logger:s})};var b=(c={})=>async()=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const n=await S(c);return x(K(c),n,c.logger)};export{b as fromProcess};
@@ -0,0 +1,2 @@
1
+ import{y as D} from"./chunk-a5c18c07abe8fd9c.js";var S=D((y,w)=>{var{defineProperty:G,getOwnPropertyDescriptor:v,getOwnPropertyNames:O}=Object,x=Object.prototype.hasOwnProperty,Q=(b,j)=>G(b,"name",{value:j,configurable:!0}),U=(b,j)=>{for(var z in j)G(b,z,{get:j[z],enumerable:!0})},K=(b,j,z,V)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let B of O(j))if(!x.call(b,B)&&B!==z)G(b,B,{get:()=>j[B],enumerable:!(V=v(j,B))||V.enumerable})}return b},q=(b)=>K(G({},"__esModule",{value:!0}),b),W={};U(W,{AlgorithmId:()=>J,EndpointURLScheme:()=>X,FieldPosition:()=>M,HttpApiKeyAuthLocation:()=>$,HttpAuthLocation:()=>Z,IniSectionType:()=>N,RequestHandlerProtocol:()=>Y,SMITHY_CONTEXT_KEY:()=>R,getDefaultClientConfiguration:()=>T,resolveDefaultRuntimeConfig:()=>k});w.exports=q(W);var Z=((b)=>{return b.HEADER="header",b.QUERY="query",b})(Z||{}),$=((b)=>{return b.HEADER="header",b.QUERY="query",b})($||{}),X=((b)=>{return b.HTTP="http",b.HTTPS="https",b})(X||{}),J=((b)=>{return b.MD5="md5",b.CRC32="crc32",b.CRC32C="crc32c",b.SHA1="sha1",b.SHA256="sha256",b})(J||{}),E=Q((b)=>{const j=[];if(b.sha256!==void 0)j.push({algorithmId:()=>"sha256",checksumConstructor:()=>b.sha256});if(b.md5!=null)j.push({algorithmId:()=>"md5",checksumConstructor:()=>b.md5});return{_checksumAlgorithms:j,addChecksumAlgorithm(z){this._checksumAlgorithms.push(z)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),F=Q((b)=>{const j={};return b.checksumAlgorithms().forEach((z)=>{j[z.algorithmId()]=z.checksumConstructor()}),j},"resolveChecksumRuntimeConfig"),T=Q((b)=>{return{...E(b)}},"getDefaultClientConfiguration"),k=Q((b)=>{return{...F(b)}},"resolveDefaultRuntimeConfig"),M=((b)=>{return b[b.HEADER=0]="HEADER",b[b.TRAILER=1]="TRAILER",b})(M||{}),R="__smithy_context",N=((b)=>{return b.PROFILE="profile",b.SSO_SESSION="sso-session",b.SERVICES="services",b})(N||{}),Y=((b)=>{return b.HTTP_0_9="http/0.9",b.HTTP_1_0="http/1.0",b.TDS_8_0="tds/8.0",b})(Y||{})});
2
+ export{S as ib};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-70bb003c03f21dad.js";import{x as w} from"./chunk-a5c18c07abe8fd9c.js";import{$ as b,A as ue,D as Te,E as yr,I as be,J as je,L as Fe,M as De,P as Ge,Q as Je,W as E,X as t,Y as Jr,_ as p,aa as j,ba as F,ca as h,ja as Er,ka as a,la as br,ma as Ve,na as We,oa as er,pa as rr,ra as d,sa as o,ua as I,z as Oe} from"./chunk-7a318e738fec6c2b.js";import{$a as Xe,Aa as Kr,Da as N,Ea as cr,Fa as $e,Ga as Ie,Ha as Re,Ia as tr,Ja as fe,Ka as Ae,La as Ke,Ma as Me,Na as ar,Oa as mr,Qa as S,Ra as $,Sa as wr,Ta as Be,Va as Le,Wa as kr,Xa as Qe,Ya as vr,_a as q,ab as Ye,bb as Ze,cb as He,db as sr,eb as ir,wa as hr,xa as nr,ya as or,za as dr} from"./chunk-9f6199bc705fc395.js";import"./chunk-bbd36ce62b950ee5.js";import{gb as Qr,hb as R} from"./chunk-5c3681fb029d7588.js";import{ib as pe} from"./chunk-552bdaee8c03e091.js";import"./chunk-6943b50bd0a3ac84.js";import"./chunk-100b76ab0ca3e14d.js";var P=w(N(),1);var re=w(q(),1),U=w(Kr(),1),Mr=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}},H=function(e){return{schemeId:"smithy.api#noAuth"}},se=async(e,s,r)=>{return{operation:U.getSmithyContext(s).operation,region:await U.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},ie=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(H(e));break}case"RegisterClient":{s.push(H(e));break}case"StartDeviceAuthorization":{s.push(H(e));break}default:s.push(Mr(e))}return s},le=(e)=>{return{...re.resolveAwsSdkSigV4Config(e)}};var he=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},v={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var ne={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.629.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.629.0","@aws-sdk/credential-provider-node":"3.629.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.620.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.3.2","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.14","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.1.12","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.14","@smithy/util-defaults-mode-node":"^3.0.14","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.629.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}};var Ne=w(q(),1);var qe=w(q(),1),Ue=w(N(),1);var xe=w(Qr(),1);var oe={["required"]:!1,type:"String"},de={["required"]:!0,default:!1,type:"Boolean"},ye={["ref"]:"Endpoint"},ke={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},ce={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Ee={["ref"]:"PartitionResult"},te={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Ee,"supportsDualStack"]}]},ae=[ke],me=[ve],we=[{["ref"]:"Region"}],Lr={version:"1.0",parameters:{Region:oe,UseDualStack:de,UseFIPS:de,Endpoint:oe},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ye]}],rules:[{conditions:ae,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:me,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ye,properties:m,headers:m},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:we}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:we,assign:"PartitionResult"}],rules:[{conditions:[ke,ve],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,ce]},te],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:ae,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[ce,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Ee,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:m,headers:m},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:me,rules:[{conditions:[te],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},Se=Lr;var Pe=(e,s={})=>{return Ie(Se,{endpointParams:e,logger:s.logger})};$e.aws=Re;var ze=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??be,base64Encoder:e?.base64Encoder??De,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Pe,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ie,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new qe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ue.NoAuthSigner}],logger:e?.logger??new Te,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??xe.parseUrl,utf8Decoder:e?.utf8Decoder??je,utf8Encoder:e?.utf8Encoder??Fe}};var _e=(e)=>{We(process.version);const s=He(e),r=()=>s().then(Ve),i=ze(e);return Ne.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Ze,credentialDefaultProvider:e?.credentialDefaultProvider??pe,defaultUserAgentProvider:e?.defaultUserAgentProvider??Xe({serviceId:i.serviceId,clientVersion:ne.version}),maxAttempts:e?.maxAttempts??R(Le),region:e?.region??R(Ke,Me),requestHandler:Ge.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Qe,default:async()=>(await r()).retryMode||Be}),sha256:e?.sha256??Ye.bind(null,"sha256"),streamCollector:e?.streamCollector??Je,useDualstackEndpoint:e?.useDualstackEndpoint??R(fe),useFipsEndpoint:e?.useFipsEndpoint??R(Ae)}};var Ce=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){const n=s.findIndex((T)=>T.schemeId===l.schemeId);if(n===-1)s.push(l);else s.splice(n,1,l)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(l){r=l},httpAuthSchemeProvider(){return r},setCredentials(l){i=l},credentials(){return i}}},ge=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var x=(e)=>e,lr=(e,s)=>{const r={...x(sr(e)),...x(er(e)),...x(Oe(e)),...x(Ce(e))};return s.forEach((i)=>i.configure(r)),{...e,...ir(r),...rr(r),...ue(r),...ge(r)}};class _ extends yr{constructor(...[e]){const s=_e(e||{}),r=he(s),i=cr(r),l=kr(i),n=ar(l),T=hr(n),Wr=wr(T),fr=le(Wr),ee=lr(fr,e?.extensions||[]);super(ee);this.config=ee,this.middlewareStack.use(tr(this.config)),this.middlewareStack.use(vr(this.config)),this.middlewareStack.use(mr(this.config)),this.middlewareStack.use(nr(this.config)),this.middlewareStack.use(or(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:se,identityProviderConfigProvider:async(Ar)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Ar.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class y extends Er{constructor(e){super(e);Object.setPrototypeOf(this,y.prototype)}}class z extends y{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends y{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends y{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends y{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends y{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends y{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends y{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends y{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends y{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends y{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends y{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description}}class Q extends y{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class X extends y{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}class Y extends y{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,Y.prototype),this.error=e.error,this.error_description=e.error_description}}var Sr=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),$r=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Ir=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Rr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Pr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),Tr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var k=w(q(),1),D=w(N(),1);var jr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Fr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=d({[ls]:[,"t"]});let n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(T)=>I(T),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},Dr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/client/register");let l;return l=JSON.stringify(o(e,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(n)=>I(n),issuerUrl:[],redirectUris:(n)=>I(n),scopes:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},qr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/device_authorization");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],startUrl:[]})),r.m("POST").h(i).b(l),r.build()},Ur=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:c(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},xr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:c(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,issuedTokenType:h,refreshToken:h,scope:I,tokenType:h});return Object.assign(r,l),r},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:c(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:p,clientSecret:h,clientSecretExpiresAt:p,tokenEndpoint:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:c(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:b,interval:b,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},Z=async(e,s)=>{const r={...e,body:await k.parseJsonErrorBody(e.body,s)},i=k.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Yr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Zr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Hr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Nr(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await _r(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Cr(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await Or(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await es(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await rs(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await ss(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await is(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await ur(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await pr(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await gr(r,s);default:const l=r.body;return Xr({output:e,parsedBody:l,errorCode:i})}},Xr=br(y),Yr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new z({$metadata:c(e),...r});return a(n,e.body)},Zr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new G({$metadata:c(e),...r});return a(n,e.body)},Hr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new J({$metadata:c(e),...r});return a(n,e.body)},Nr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new V({$metadata:c(e),...r});return a(n,e.body)},_r=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new W({$metadata:c(e),...r});return a(n,e.body)},pr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new X({$metadata:c(e),...r});return a(n,e.body)},Cr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new f({$metadata:c(e),...r});return a(n,e.body)},gr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new Y({$metadata:c(e),...r});return a(n,e.body)},Or=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new A({$metadata:c(e),...r});return a(n,e.body)},ur=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);const n=new Q({$metadata:c(e),...r});return a(n,e.body)},es=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new K({$metadata:c(e),...r});return a(n,e.body)},rs=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new M({$metadata:c(e),...r});return a(n,e.body)},ss=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new B({$metadata:c(e),...r});return a(n,e.body)},is=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new L({$metadata:c(e),...r});return a(n,e.body)},c=(e)=>({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"]});var ls="aws_iam";class C extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(Sr,$r).ser(jr).de(Ur).build(){}class g extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Ir,Rr).ser(Fr).de(xr).build(){}class O extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,Pr).ser(Dr).de(zr).build(){}class u extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(Tr,void 0).ser(qr).de(Gr).build(){}var hs={CreateTokenCommand:C,CreateTokenWithIAMCommand:g,RegisterClientCommand:O,StartDeviceAuthorizationCommand:u};class Vr extends _{}Jr(hs,Vr);export{yr as __Client,L as UnsupportedGrantTypeException,B as UnauthorizedClientException,Tr as StartDeviceAuthorizationRequestFilterSensitiveLog,u as StartDeviceAuthorizationCommand,M as SlowDownException,y as SSOOIDCServiceException,_ as SSOOIDCClient,Vr as SSOOIDC,Pr as RegisterClientResponseFilterSensitiveLog,O as RegisterClientCommand,K as InvalidScopeException,Q as InvalidRequestRegionException,A as InvalidRequestException,Y as InvalidRedirectUriException,f as InvalidGrantException,X as InvalidClientMetadataException,W as InvalidClientException,V as InternalServerException,J as ExpiredTokenException,Rr as CreateTokenWithIAMResponseFilterSensitiveLog,Ir as CreateTokenWithIAMRequestFilterSensitiveLog,g as CreateTokenWithIAMCommand,$r as CreateTokenResponseFilterSensitiveLog,Sr as CreateTokenRequestFilterSensitiveLog,C as CreateTokenCommand,G as AuthorizationPendingException,z as AccessDeniedException,E as $Command};