gemi 0.4.38 → 0.4.41

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 (67) hide show
  1. package/dist/chunk-05fa767ab29abb0f.js +2 -0
  2. package/dist/chunk-11a75566ff74db17.js +6 -0
  3. package/dist/chunk-187a09f46e2b36e5.js +2 -0
  4. package/dist/chunk-21fe96d1a3bb5a27.js +2 -0
  5. package/dist/chunk-26a5c9db5d17f5e7.js +3 -0
  6. package/dist/chunk-2a48e0098ccd4249.js +1 -1
  7. package/dist/chunk-38237d1b01b0db25.js +3 -0
  8. package/dist/chunk-4d19e16340534ed0.js +1 -1
  9. package/dist/chunk-4eeee2f82b1fa8bb.js +2 -0
  10. package/dist/chunk-5128de1a65ba6ce1.js +2 -0
  11. package/dist/chunk-552bdaee8c03e091.js +1 -1
  12. package/dist/chunk-59e951812cb019e6.js +2 -0
  13. package/dist/chunk-5b54843712abde58.js +2 -0
  14. package/dist/chunk-5defd55c3c97bdb2.js +2 -0
  15. package/dist/chunk-60f3b8242209ac3e.js +18 -0
  16. package/dist/chunk-625025af819f55f5.js +2 -0
  17. package/dist/chunk-6259cd13f53334df.js +2 -0
  18. package/dist/chunk-66ab377654806d08.js +2 -0
  19. package/dist/chunk-682b01231754a121.js +1 -1
  20. package/dist/chunk-6afe097e13ebdf55.js +1 -1
  21. package/dist/chunk-722f2aeae58daaa3.js +18 -0
  22. package/dist/chunk-733513f9c9e8b50f.js +2 -0
  23. package/dist/chunk-7ea1baca4032004f.js +2 -0
  24. package/dist/chunk-8af626a703659719.js +18 -0
  25. package/dist/chunk-8b944ecefa1b832c.js +18 -0
  26. package/dist/chunk-8f547b919361fdf4.js +2 -0
  27. package/dist/chunk-9238196d4889d660.js +1 -0
  28. package/dist/chunk-955e2bfcdb7a7e71.js +2 -0
  29. package/dist/chunk-9f6199bc705fc395.js +18 -0
  30. package/dist/chunk-a02b2d564bdb603d.js +6 -0
  31. package/dist/chunk-a719a1f305964521.js +1 -1
  32. package/dist/chunk-a8310ad9bad32329.js +1 -1
  33. package/dist/chunk-aafdd9bfb5bde8bf.js +2 -0
  34. package/dist/chunk-abd0b68c299eebfc.js +1 -1
  35. package/dist/chunk-b66a9e50afbac035.js +9 -0
  36. package/dist/chunk-b9e4546aaa58319c.js +2 -0
  37. package/dist/chunk-bd2888a454e50cfd.js +1 -0
  38. package/dist/chunk-bee6075c5738d87a.js +1 -1
  39. package/dist/chunk-c8b00b645df96ed5.js +1 -1
  40. package/dist/chunk-cb65fe402653c65e.js +1 -1
  41. package/dist/chunk-dd21f367f8029793.js +2 -0
  42. package/dist/chunk-ddef8961cbf08a05.js +6 -0
  43. package/dist/chunk-ee4ff285d7f4ccdf.js +1 -1
  44. package/dist/chunk-f2dca6305fcba70b.js +1 -1
  45. package/dist/chunk-f99bdfc336b2ac57.js +1 -1
  46. package/dist/client/ClientRouterContext.d.ts +2 -11
  47. package/dist/client/ClientRouterContext.d.ts.map +1 -1
  48. package/dist/client/Link.d.ts +13 -0
  49. package/dist/client/Link.d.ts.map +1 -0
  50. package/dist/client/QueryManager.d.ts.map +1 -1
  51. package/dist/client/index.d.ts +5 -2
  52. package/dist/client/index.d.ts.map +1 -1
  53. package/dist/client/index.js +104 -93
  54. package/dist/client/types.d.ts +13 -2
  55. package/dist/client/types.d.ts.map +1 -1
  56. package/dist/client/useRouter.d.ts +15 -0
  57. package/dist/client/useRouter.d.ts.map +1 -0
  58. package/dist/client/useSearchParams.d.ts +2 -0
  59. package/dist/client/useSearchParams.d.ts.map +1 -0
  60. package/dist/http/ViewRouter.d.ts +1 -1
  61. package/dist/http/ViewRouter.d.ts.map +1 -1
  62. package/dist/http/index.js +1 -1
  63. package/dist/server/index.js +1 -1
  64. package/dist/storage/index.js +10 -1
  65. package/dist/utils/applyParams.d.ts +2 -0
  66. package/dist/utils/applyParams.d.ts.map +1 -0
  67. package/package.json +2 -2
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-aafdd9bfb5bde8bf.js";import{x as w} from"./chunk-a5c18c07abe8fd9c.js";import{$ as b,A as er,D as be,E as cr,I as je,J as Fe,L as De,M as qe,O as Je,P as Ve,V as E,W as t,X as Kr,Z as _,_ as T,aa as j,ba as h,ia as Sr,ja as a,ka as jr,la as We,ma as fe,na as rr,oa as sr,qa as d,ra as o,ta as $,z as ue} from"./chunk-38237d1b01b0db25.js";import{$a as D,Ca as Y,Da as H,Ea as ee,Fa as re,Ga as tr,Ha as Ie,Ia as Re,Ja as Pe,Ka as ar,La as Ae,Ma as Ke,Na as Me,Oa as Be,Pa as mr,Qa as wr,Sa as S,Ta as kr,Ua as Le,Wa as Qe,Xa as vr,Ya as Xe,Za as Er,ab as Ye,bb as Ze,cb as He,db as Ne,eb as ir,fb as lr,va as nr,wa as or,xa as dr,ya as yr} from"./chunk-722f2aeae58daaa3.js";import"./chunk-3bf6f8c8e8589e3d.js";import{hb as I,ib as Ue} from"./chunk-a8310ad9bad32329.js";import"./chunk-2f7aac67f16768a5.js";import{pb as Ce} from"./chunk-b66a9e50afbac035.js";import"./chunk-9238196d4889d660.js";var R=w(H(),1);var se=w(D(),1);var Xr=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}},Z=function(e){return{schemeId:"smithy.api#noAuth"}},ie=async(e,s,r)=>{return{operation:ee(s).operation,region:await re(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},le=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(Z(e));break}case"RegisterClient":{s.push(Z(e));break}case"StartDeviceAuthorization":{s.push(Z(e));break}default:s.push(Xr(e))}return s},he=(e)=>{return{...se.resolveAwsSdkSigV4Config(e)}};var ne=(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 oe={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 _e=w(D(),1);var xe=w(D(),1),ze=w(H(),1);var de={["required"]:!1,type:"String"},ye={["required"]:!0,default:!1,type:"Boolean"},ce={["ref"]:"Endpoint"},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},Ee={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},te={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Se={["ref"]:"PartitionResult"},ae={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Se,"supportsDualStack"]}]},me=[ve],we=[Ee],ke=[{["ref"]:"Region"}],Zr={version:"1.0",parameters:{Region:de,UseDualStack:ye,UseFIPS:ye,Endpoint:de},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ce]}],rules:[{conditions:me,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:we,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ce,properties:m,headers:m},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ke}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ke,assign:"PartitionResult"}],rules:[{conditions:[ve,Ee],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,te]},ae],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:me,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[te,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Se,"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:we,rules:[{conditions:[ae],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"}]},$e=Zr;var Te=(e,s={})=>{return Re($e,{endpointParams:e,logger:s.logger})};Ie.aws=Pe;var Ge=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??je,base64Encoder:e?.base64Encoder??qe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Te,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new xe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ze.NoAuthSigner}],logger:e?.logger??new be,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??Ue,utf8Decoder:e?.utf8Decoder??Fe,utf8Encoder:e?.utf8Encoder??De}};var pe=(e)=>{fe(process.version);const s=Ne(e),r=()=>s().then(We),i=Ge(e);return _e.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??He,credentialDefaultProvider:e?.credentialDefaultProvider??Ce,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ye({serviceId:i.serviceId,clientVersion:oe.version}),maxAttempts:e?.maxAttempts??I(Qe),region:e?.region??I(Me,Be),requestHandler:Je.create(e?.requestHandler??r),retryMode:e?.retryMode??I({...Xe,default:async()=>(await r()).retryMode||Le}),sha256:e?.sha256??Ze.bind(null,"sha256"),streamCollector:e?.streamCollector??Ve,useDualstackEndpoint:e?.useDualstackEndpoint??I(Ae),useFipsEndpoint:e?.useFipsEndpoint??I(Ke)}};var ge=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){const n=s.findIndex((P)=>P.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}}},Oe=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var q=(e)=>e,hr=(e,s)=>{const r={...q(ir(e)),...q(rr(e)),...q(ue(e)),...q(ge(e))};return s.forEach((i)=>i.configure(r)),{...e,...lr(r),...sr(r),...er(r),...Oe(r)}};class N extends cr{constructor(...[e]){const s=pe(e||{}),r=ne(s),i=tr(r),l=vr(i),n=mr(l),P=nr(n),Br=kr(P),Lr=he(Br),u=hr(Lr,e?.extensions||[]);super(u);this.config=u,this.middlewareStack.use(ar(this.config)),this.middlewareStack.use(Er(this.config)),this.middlewareStack.use(wr(this.config)),this.middlewareStack.use(or(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(yr(this.config)),this.middlewareStack.use(R.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ie,identityProviderConfigProvider:async(Qr)=>new R.DefaultIdentityProviderConfig({"aws.auth#sigv4":Qr.credentials})})),this.middlewareStack.use(R.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var Vr=w(Y(),1);class y extends Sr{constructor(e){super(e);Object.setPrototypeOf(this,y.prototype)}}class U extends y{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,U.prototype),this.error=e.error,this.error_description=e.error_description}}class x extends y{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.error=e.error,this.error_description=e.error_description}}class z extends y{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",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:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends y{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",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:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends y{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",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:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",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:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",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:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",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:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",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:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class L extends y{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",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:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}var $r=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),Ir=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Rr=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Pr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Tr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),br=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var k=w(D(),1),F=w(H(),1);var Fr=async(e,s)=>{const r=F.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)=>$(n)})),r.m("POST").h(i).b(l),r.build()},Dr=async(e,s)=>{const r=F.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=d({[os]:[,"t"]});let n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(P)=>$(P),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},qr=async(e,s)=>{const r=F.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)=>$(n),issuerUrl:[],redirectUris:(n)=>$(n),scopes:(n)=>$(n)})),r.m("POST").h(i).b(l),r.build()},Ur=async(e,s)=>{const r=F.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()},xr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return X(e,s);const r=d({$metadata:c(e)}),i=b(j(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:T,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return X(e,s);const r=d({$metadata:c(e)}),i=b(j(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:T,idToken:h,issuedTokenType:h,refreshToken:h,scope:$,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return X(e,s);const r=d({$metadata:c(e)}),i=b(j(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:_,clientSecret:h,clientSecretExpiresAt:_,tokenEndpoint:h});return Object.assign(r,l),r},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return X(e,s);const r=d({$metadata:c(e)}),i=b(j(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:T,interval:T,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},X=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 Nr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await _r(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await pr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Cr(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await gr(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await ur(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await rs(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await is(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await ls(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await hs(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await ns(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await ss(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await Or(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await es(r,s);default:const l=r.body;return Hr({output:e,parsedBody:l,errorCode:i})}},Hr=jr(y),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 U({$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 x({$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 z({$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 G({$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 J({$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 L({$metadata:c(e),...r});return a(n,e.body)},ur=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)},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 Q({$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 W({$metadata:c(e),...r});return a(n,e.body)},ss=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 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 f({$metadata:c(e),...r});return a(n,e.body)},ls=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)},hs=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)},ns=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)},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 os="aws_iam";class p extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[Vr.getSerdePlugin(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f($r,Ir).ser(Fr).de(xr).build(){}var Wr=w(Y(),1);class C extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[Wr.getSerdePlugin(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Rr,Pr).ser(Dr).de(zr).build(){}var fr=w(Y(),1);class g extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[fr.getSerdePlugin(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,Tr).ser(qr).de(Gr).build(){}var Ar=w(Y(),1);class O extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[Ar.getSerdePlugin(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(br,void 0).ser(Ur).de(Jr).build(){}var ds={CreateTokenCommand:p,CreateTokenWithIAMCommand:C,RegisterClientCommand:g,StartDeviceAuthorizationCommand:O};class Mr extends N{}Kr(ds,Mr);export{cr as __Client,M as UnsupportedGrantTypeException,K as UnauthorizedClientException,br as StartDeviceAuthorizationRequestFilterSensitiveLog,O as StartDeviceAuthorizationCommand,A as SlowDownException,y as SSOOIDCServiceException,N as SSOOIDCClient,Mr as SSOOIDC,Tr as RegisterClientResponseFilterSensitiveLog,g as RegisterClientCommand,f as InvalidScopeException,B as InvalidRequestRegionException,W as InvalidRequestException,Q as InvalidRedirectUriException,V as InvalidGrantException,L as InvalidClientMetadataException,J as InvalidClientException,G as InternalServerException,z as ExpiredTokenException,Pr as CreateTokenWithIAMResponseFilterSensitiveLog,Rr as CreateTokenWithIAMRequestFilterSensitiveLog,C as CreateTokenWithIAMCommand,Ir as CreateTokenResponseFilterSensitiveLog,$r as CreateTokenRequestFilterSensitiveLog,p as CreateTokenCommand,x as AuthorizationPendingException,U as AccessDeniedException,E as $Command};
@@ -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
+ // @bun
2
+ import"./chunk-aafdd9bfb5bde8bf.js";import{x as $} from"./chunk-a5c18c07abe8fd9c.js";import{$ as b,A as er,D as be,E as cr,I as je,J as Fe,L as De,M as qe,P as Je,Q as Ve,W as v,X as t,Y as Vr,_,aa as j,ba as F,ca as h,ja as Sr,ka as a,la as jr,ma as We,na as fe,oa as rr,pa as sr,ra as d,sa as o,ua as I,z as ue} from"./chunk-26a5c9db5d17f5e7.js";import{$a as q,Aa as ee,Ba as re,Ea as H,Fa as tr,Ga as Ie,Ha as Re,Ia as Pe,Ja as ar,Ka as Ae,La as Ke,Ma as Me,Na as Be,Oa as mr,Pa as wr,Ra as E,Sa as S,Ta as kr,Ua as Le,Wa as Qe,Xa as vr,Ya as Xe,Za as Er,ab as Ye,bb as Ze,cb as He,db as Ne,eb as ir,fb as lr,wa as nr,xa as or,ya as dr,za as yr} from"./chunk-8af626a703659719.js";import"./chunk-3bf6f8c8e8589e3d.js";import{hb as R,ib as Ue} from"./chunk-a8310ad9bad32329.js";import"./chunk-2f7aac67f16768a5.js";import{pb as Ce} from"./chunk-b66a9e50afbac035.js";import"./chunk-9238196d4889d660.js";var P=$(H(),1);var se=$(q(),1);var Mr=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}},Z=function(e){return{schemeId:"smithy.api#noAuth"}},ie=async(e,s,r)=>{return{operation:ee(s).operation,region:await re(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},le=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(Z(e));break}case"RegisterClient":{s.push(Z(e));break}case"StartDeviceAuthorization":{s.push(Z(e));break}default:s.push(Mr(e))}return s},he=(e)=>{return{...se.resolveAwsSdkSigV4Config(e)}};var ne=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},k={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var oe={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 _e=$(q(),1);var xe=$(q(),1),ze=$(H(),1);var de={["required"]:!1,type:"String"},ye={["required"]:!0,default:!1,type:"Boolean"},ce={["ref"]:"Endpoint"},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},Ee={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},te={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Se={["ref"]:"PartitionResult"},ae={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Se,"supportsDualStack"]}]},me=[ve],we=[Ee],ke=[{["ref"]:"Region"}],Lr={version:"1.0",parameters:{Region:de,UseDualStack:ye,UseFIPS:ye,Endpoint:de},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ce]}],rules:[{conditions:me,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:we,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ce,properties:m,headers:m},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ke}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ke,assign:"PartitionResult"}],rules:[{conditions:[ve,Ee],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,te]},ae],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:me,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[te,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Se,"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:we,rules:[{conditions:[ae],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"}]},$e=Lr;var Te=(e,s={})=>{return Re($e,{endpointParams:e,logger:s.logger})};Ie.aws=Pe;var Ge=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??je,base64Encoder:e?.base64Encoder??qe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Te,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new xe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ze.NoAuthSigner}],logger:e?.logger??new be,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??Ue,utf8Decoder:e?.utf8Decoder??Fe,utf8Encoder:e?.utf8Encoder??De}};var pe=(e)=>{fe(process.version);const s=Ne(e),r=()=>s().then(We),i=Ge(e);return _e.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??He,credentialDefaultProvider:e?.credentialDefaultProvider??Ce,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ye({serviceId:i.serviceId,clientVersion:oe.version}),maxAttempts:e?.maxAttempts??R(Qe),region:e?.region??R(Me,Be),requestHandler:Je.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Xe,default:async()=>(await r()).retryMode||Le}),sha256:e?.sha256??Ze.bind(null,"sha256"),streamCollector:e?.streamCollector??Ve,useDualstackEndpoint:e?.useDualstackEndpoint??R(Ae),useFipsEndpoint:e?.useFipsEndpoint??R(Ke)}};var ge=(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}}},Oe=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var U=(e)=>e,hr=(e,s)=>{const r={...U(ir(e)),...U(rr(e)),...U(ue(e)),...U(ge(e))};return s.forEach((i)=>i.configure(r)),{...e,...lr(r),...sr(r),...er(r),...Oe(r)}};class N extends cr{constructor(...[e]){const s=pe(e||{}),r=ne(s),i=tr(r),l=vr(i),n=mr(l),T=nr(n),fr=kr(T),Ar=he(fr),u=hr(Ar,e?.extensions||[]);super(u);this.config=u,this.middlewareStack.use(ar(this.config)),this.middlewareStack.use(Er(this.config)),this.middlewareStack.use(wr(this.config)),this.middlewareStack.use(or(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(yr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ie,identityProviderConfigProvider:async(Kr)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Kr.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class y extends Sr{constructor(e){super(e);Object.setPrototypeOf(this,y.prototype)}}class x extends y{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.error=e.error,this.error_description=e.error_description}}class z extends y{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",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:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",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:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends y{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends y{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",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:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",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:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",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:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",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:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",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:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",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:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class Q extends y{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}class X extends y{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}var $r=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),Ir=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Rr=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Pr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Tr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),br=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var w=$(q(),1),D=$(H(),1);var Fr=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()},Dr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=d({[is]:[,"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()},qr=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()},Ur=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()},xr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.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},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:_,clientSecret:h,clientSecretExpiresAt:_,tokenEndpoint:h});return Object.assign(r,l),r},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.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},Y=async(e,s)=>{const r={...e,body:await w.parseJsonErrorBody(e.body,s)},i=w.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Xr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Yr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Zr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Hr(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await Nr(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await pr(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await gr(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await ur(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await es(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await rs(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await ss(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await Or(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await _r(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await Cr(r,s);default:const l=r.body;return Qr({output:e,parsedBody:l,errorCode:i})}},Qr=jr(y),Xr=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)},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 Q({$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 W({$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 X({$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 f({$metadata:c(e),...r});return a(n,e.body)},Or=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 L({$metadata:c(e),...r});return a(n,e.body)},ur=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)},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)},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 is="aws_iam";class p extends v.classBuilder().ep({...k}).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f($r,Ir).ser(Fr).de(xr).build(){}class C extends v.classBuilder().ep({...k}).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Rr,Pr).ser(Dr).de(zr).build(){}class g extends v.classBuilder().ep({...k}).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,Tr).ser(qr).de(Gr).build(){}class O extends v.classBuilder().ep({...k}).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(br,void 0).ser(Ur).de(Jr).build(){}var ls={CreateTokenCommand:p,CreateTokenWithIAMCommand:C,RegisterClientCommand:g,StartDeviceAuthorizationCommand:O};class Wr extends N{}Vr(ls,Wr);export{cr as __Client,B as UnsupportedGrantTypeException,M as UnauthorizedClientException,br as StartDeviceAuthorizationRequestFilterSensitiveLog,O as StartDeviceAuthorizationCommand,K as SlowDownException,y as SSOOIDCServiceException,N as SSOOIDCClient,Wr as SSOOIDC,Tr as RegisterClientResponseFilterSensitiveLog,g as RegisterClientCommand,A as InvalidScopeException,L as InvalidRequestRegionException,f as InvalidRequestException,X as InvalidRedirectUriException,W as InvalidGrantException,Q as InvalidClientMetadataException,V as InvalidClientException,J as InternalServerException,G as ExpiredTokenException,Pr as CreateTokenWithIAMResponseFilterSensitiveLog,Rr as CreateTokenWithIAMRequestFilterSensitiveLog,C as CreateTokenWithIAMCommand,Ir as CreateTokenResponseFilterSensitiveLog,$r as CreateTokenRequestFilterSensitiveLog,p as CreateTokenCommand,z as AuthorizationPendingException,x as AccessDeniedException,v as $Command};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-aafdd9bfb5bde8bf.js";import{x as b} from"./chunk-a5c18c07abe8fd9c.js";import{A as I0,B as T0,D as Wl,E as B0,I as Tl,J as Al,L as Rl,M as Ll,P as _l,Q as bl,W as K,X as Ih,Y as u0,aa as A0,ca as S,ea as u,ha as R0,ja as U0,ka as T,la as L0,ma as fl,na as Cl,oa as H0,pa as S0,qa as ch,z as G0} from"./chunk-26a5c9db5d17f5e7.js";import{$a as dh,Aa as dl,Ba as wl,Ea as yh,Fa as q0,Ga as vl,Ha as Ml,Ia as zl,Ja as y0,Ka as Ol,La as gl,Ma as xl,Na as il,Oa as Q0,Pa as X0,Ra as F,Sa as B,Ta as Y0,Ua as cl,Wa as el,Xa as Z0,Ya as pl,Za as $0,ab as nl,bb as ol,cb as ul,db as tl,eb as m0,fb as J0,wa as E0,xa as k0,ya as K0,za as F0} from"./chunk-8af626a703659719.js";import"./chunk-3bf6f8c8e8589e3d.js";import{hb as f,ib as jl} from"./chunk-a8310ad9bad32329.js";import"./chunk-2f7aac67f16768a5.js";import{pb as Qh} from"./chunk-b66a9e50afbac035.js";import"./chunk-9238196d4889d660.js";var C=b(yh(),1);var Gl=b(dh(),1);var md=function(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(d,l)=>({signingProperties:{config:d,context:l}})}},ll=function(h){return{schemeId:"smithy.api#noAuth"}},Il=async(h,d,l)=>{return{operation:dl(d).operation,region:await wl(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Hl=(h)=>{const d=[];switch(h.operation){case"AssumeRoleWithSAML":{d.push(ll(h));break}case"AssumeRoleWithWebIdentity":{d.push(ll(h));break}default:d.push(md(h))}return d},Jd=(h)=>({...h,stsClientCtor:A}),Sl=(h)=>{const d=Jd(h);return{...Gl.resolveAwsSdkSigV4Config(d)}};var ml=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},D={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Jl={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.629.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"yarn test:unit","test:unit":"jest"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.629.0","@aws-sdk/core":"3.629.0","@aws-sdk/credential-provider-node":"3.629.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.620.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.3.2","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.14","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.1.12","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.14","@smithy/util-defaults-mode-node":"^3.0.14","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}};var wh=b(dh(),1);var h0=b(yh(),1);var al=b(dh(),1),rl=b(yh(),1);var Dl={["required"]:!1,["type"]:"String"},qh={["required"]:!0,default:!1,["type"]:"Boolean"},Xl={["ref"]:"Endpoint"},El={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},J={["ref"]:"Region"},kl={["fn"]:"aws.partition",["argv"]:[J],assign:"PartitionResult"},Yl={["ref"]:"UseFIPS"},Zl={["ref"]:"UseDualStack"},E={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},X={},Kl={conditions:[{["fn"]:"stringEquals",["argv"]:[J,"aws-global"]}],["endpoint"]:E,["type"]:"endpoint"},$l={["fn"]:"booleanEquals",["argv"]:[Yl,!0]},Ul={["fn"]:"booleanEquals",["argv"]:[Zl,!0]},Fl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Vl={["ref"]:"PartitionResult"},Bl={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Vl,"supportsDualStack"]}]},ql=[{["fn"]:"isSet",["argv"]:[Xl]}],yl=[$l],Ql=[Ul],Ed={version:"1.0",parameters:{Region:Dl,UseDualStack:qh,UseFIPS:qh,Endpoint:Dl,UseGlobalEndpoint:qh},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:ql},El,kl,{["fn"]:"booleanEquals",["argv"]:[Yl,!1]},{["fn"]:"booleanEquals",["argv"]:[Zl,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-northeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-south-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-2"]}],endpoint:E,["type"]:"endpoint"},Kl,{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ca-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-north-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-3"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"sa-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-2"]}],endpoint:E,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:ql,rules:[{conditions:yl,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:Ql,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:Xl,properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[El],rules:[{conditions:[kl],rules:[{conditions:[$l,Ul],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Fl]},Bl],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:yl,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Fl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Vl,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:X,headers:X},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:Ql,rules:[{conditions:[Bl],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},Kl,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},Pl=Ed;var Nl=(h,d={})=>{return Ml(Pl,{endpointParams:h,logger:d.logger})};vl.aws=zl;var sl=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??Tl,base64Encoder:h?.base64Encoder??Ll,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??Nl,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??Hl,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(d)=>d.getIdentityProvider("aws.auth#sigv4"),signer:new al.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(d)=>d.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new rl.NoAuthSigner}],logger:h?.logger??new Wl,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??jl,utf8Decoder:h?.utf8Decoder??Al,utf8Encoder:h?.utf8Encoder??Rl}};var l0=(h)=>{Cl(process.version);const d=tl(h),l=()=>d().then(fl),w=sl(h);return wh.emitWarningIfUnsupportedVersion(process.version),{...w,...h,runtime:"node",defaultsMode:d,bodyLengthChecker:h?.bodyLengthChecker??ul,credentialDefaultProvider:h?.credentialDefaultProvider??Qh,defaultUserAgentProvider:h?.defaultUserAgentProvider??nl({serviceId:w.serviceId,clientVersion:Jl.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(G)=>G.getIdentityProvider("aws.auth#sigv4")||(async(H)=>await Qh(H?.__config||{})()),signer:new wh.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(G)=>G.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new h0.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(el),region:h?.region??f(xl,il),requestHandler:_l.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...pl,default:async()=>(await l()).retryMode||cl}),sha256:h?.sha256??ol.bind(null,"sha256"),streamCollector:h?.streamCollector??bl,useDualstackEndpoint:h?.useDualstackEndpoint??f(Ol),useFipsEndpoint:h?.useFipsEndpoint??f(gl)}};var d0=(h)=>{const d=h.httpAuthSchemes;let{httpAuthSchemeProvider:l,credentials:w}=h;return{setHttpAuthScheme(G){const H=d.findIndex((I)=>I.schemeId===G.schemeId);if(H===-1)d.push(G);else d.splice(H,1,G)},httpAuthSchemes(){return d},setHttpAuthSchemeProvider(G){l=G},httpAuthSchemeProvider(){return l},setCredentials(G){w=G},credentials(){return w}}},w0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var Gh=(h)=>h,D0=(h,d)=>{const l={...Gh(m0(h)),...Gh(H0(h)),...Gh(G0(h)),...Gh(d0(h))};return d.forEach((w)=>w.configure(l)),{...h,...J0(l),...S0(l),...I0(l),...w0(l)}};class A extends B0{constructor(...[h]){const d=l0(h||{}),l=ml(d),w=q0(l),G=Z0(w),H=Q0(G),I=E0(H),Q=Y0(I),v=Sl(Q),M=D0(v,h?.extensions||[]);super(M);this.config=M,this.middlewareStack.use(y0(this.config)),this.middlewareStack.use($0(this.config)),this.middlewareStack.use(X0(this.config)),this.middlewareStack.use(k0(this.config)),this.middlewareStack.use(K0(this.config)),this.middlewareStack.use(F0(this.config)),this.middlewareStack.use(C.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Il,identityProviderConfigProvider:async(n)=>new C.DefaultIdentityProviderConfig({"aws.auth#sigv4":n.credentials})})),this.middlewareStack.use(C.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class Y extends U0{constructor(h){super(h);Object.setPrototypeOf(this,Y.prototype)}}class Hh extends Y{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,Hh.prototype)}}class Sh extends Y{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,Sh.prototype)}}class mh extends Y{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,mh.prototype)}}class Jh extends Y{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends Y{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class Eh extends Y{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}class kh extends Y{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,kh.prototype)}}class Kh extends Y{constructor(h){super({name:"InvalidAuthorizationMessageException",$fault:"client",...h});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Kh.prototype)}}var o=(h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:Ih}}),V0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),P0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:Ih}}),v0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),M0=(h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:Ih}}),z0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),N0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),W0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}});var P=b(dh(),1);var j0=async(h,d)=>{const l=j;let w;return w=_({...Yd(h,d),[r]:od,[s]:a}),L(d,l,"/",void 0,w)},a0=async(h,d)=>{const l=j;let w;return w=_({...Zd(h,d),[r]:ud,[s]:a}),L(d,l,"/",void 0,w)},r0=async(h,d)=>{const l=j;let w;return w=_({...$d(h,d),[r]:td,[s]:a}),L(d,l,"/",void 0,w)},s0=async(h,d)=>{const l=j;let w;return w=_({...Ud(h,d),[r]:hw,[s]:a}),L(d,l,"/",void 0,w)},_0=async(h,d)=>{const l=j;let w;return w=_({...Vd(h,d),[r]:lw,[s]:a}),L(d,l,"/",void 0,w)},b0=async(h,d)=>{const l=j;let w;return w=_({...Pd(h,d),[r]:dw,[s]:a}),L(d,l,"/",void 0,w)},f0=async(h,d)=>{const l=j;let w;return w=_({...vd(h,d),[r]:ww,[s]:a}),L(d,l,"/",void 0,w)},C0=async(h,d)=>{const l=j;let w;return w=_({...Md(h,d),[r]:Gw,[s]:a}),L(d,l,"/",void 0,w)},O0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Rd(l.AssumeRoleResult,d),{$metadata:k(h),...w}},g0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Ld(l.AssumeRoleWithSAMLResult,d),{$metadata:k(h),...w}},x0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=jd(l.AssumeRoleWithWebIdentityResult,d),{$metadata:k(h),...w}},i0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=ad(l.DecodeAuthorizationMessageResult,d),{$metadata:k(h),...w}},c0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=_d(l.GetAccessKeyInfoResult,d),{$metadata:k(h),...w}},e0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=bd(l.GetCallerIdentityResult,d),{$metadata:k(h),...w}},p0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=fd(l.GetFederationTokenResult,d),{$metadata:k(h),...w}},n0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Cd(l.GetSessionTokenResult,d),{$metadata:k(h),...w}},R=async(h,d)=>{const l={...h,body:await P.parseXmlErrorBody(h.body,d)},w=Iw(h,l.body);switch(w){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await kd(l,d);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await yd(l,d);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Qd(l,d);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Xd(l,d);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Fd(l,d);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await qd(l,d);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Kd(l,d);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Bd(l,d);default:const G=l.body;return nd({output:h,parsedBody:G.Error,errorCode:w})}},kd=async(h,d)=>{const l=h.body,w=rd(l.Error,d),G=new Hh({$metadata:k(h),...w});return T(G,l)},Kd=async(h,d)=>{const l=h.body,w=Od(l.Error,d),G=new kh({$metadata:k(h),...w});return T(G,l)},Fd=async(h,d)=>{const l=h.body,w=gd(l.Error,d),G=new Dh({$metadata:k(h),...w});return T(G,l)},Bd=async(h,d)=>{const l=h.body,w=xd(l.Error,d),G=new Kh({$metadata:k(h),...w});return T(G,l)},qd=async(h,d)=>{const l=h.body,w=id(l.Error,d),G=new Eh({$metadata:k(h),...w});return T(G,l)},yd=async(h,d)=>{const l=h.body,w=cd(l.Error,d),G=new Sh({$metadata:k(h),...w});return T(G,l)},Qd=async(h,d)=>{const l=h.body,w=ed(l.Error,d),G=new mh({$metadata:k(h),...w});return T(G,l)},Xd=async(h,d)=>{const l=h.body,w=pd(l.Error,d),G=new Jh({$metadata:k(h),...w});return T(G,l)},Yd=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[$]!=null){const w=Fh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const w=o0(h[e],d);if(h[e]?.length===0)l.Tags=[];Object.entries(w).forEach(([G,H])=>{const I=`Tags.${G}`;l[I]=H})}if(h[Ch]!=null){const w=Ad(h[Ch],d);if(h[Ch]?.length===0)l.TransitiveTagKeys=[];Object.entries(w).forEach(([G,H])=>{const I=`TransitiveTagKeys.${G}`;l[I]=H})}if(h[Uh]!=null)l[Uh]=h[Uh];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];if(h[V]!=null)l[V]=h[V];if(h[Rh]!=null){const w=Wd(h[Rh],d);if(h[Rh]?.length===0)l.ProvidedContexts=[];Object.entries(w).forEach(([G,H])=>{const I=`ProvidedContexts.${G}`;l[I]=H})}return l},Zd=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[Th]!=null)l[Th]=h[Th];if(h[sh]!=null)l[sh]=h[sh];if(h[$]!=null){const w=Fh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},$d=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[xh]!=null)l[xh]=h[xh];if(h[Lh]!=null)l[Lh]=h[Lh];if(h[$]!=null){const w=Fh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},Ud=(h,d)=>{const l={};if(h[Vh]!=null)l[Vh]=h[Vh];return l},Vd=(h,d)=>{const l={};if(h[O]!=null)l[O]=h[O];return l},Pd=(h,d)=>{return{}},vd=(h,d)=>{const l={};if(h[Nh]!=null)l[Nh]=h[Nh];if(h[Z]!=null)l[Z]=h[Z];if(h[$]!=null){const w=Fh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const w=o0(h[e],d);if(h[e]?.length===0)l.Tags=[];Object.entries(w).forEach(([G,H])=>{const I=`Tags.${G}`;l[I]=H})}return l},Md=(h,d)=>{const l={};if(h[y]!=null)l[y]=h[y];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];return l},Fh=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=zd(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},zd=(h,d)=>{const l={};if(h[ih]!=null)l[ih]=h[ih];return l},Nd=(h,d)=>{const l={};if(h[Ah]!=null)l[Ah]=h[Ah];if(h[Yh]!=null)l[Yh]=h[Yh];return l},Wd=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=Nd(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},Td=(h,d)=>{const l={};if(h[zh]!=null)l[zh]=h[zh];if(h[gh]!=null)l[gh]=h[gh];return l},Ad=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;l[`member.${w}`]=G,w++}return l},o0=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=Td(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},eh=(h,d)=>{const l={};if(h[Xh]!=null)l[Xh]=S(h[Xh]);if(h[N]!=null)l[N]=S(h[N]);return l},Rd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[z]!=null)l[z]=eh(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[V]!=null)l[V]=S(h[V]);return l},Ld=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[z]!=null)l[z]=eh(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[ah]!=null)l[ah]=S(h[ah]);if(h[bh]!=null)l[bh]=S(h[bh]);if(h[Mh]!=null)l[Mh]=S(h[Mh]);if(h[x]!=null)l[x]=S(h[x]);if(h[Wh]!=null)l[Wh]=S(h[Wh]);if(h[V]!=null)l[V]=S(h[V]);return l},jd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[_h]!=null)l[_h]=S(h[_h]);if(h[z]!=null)l[z]=eh(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[jh]!=null)l[jh]=S(h[jh]);if(h[x]!=null)l[x]=S(h[x]);if(h[V]!=null)l[V]=S(h[V]);return l},t=(h,d)=>{const l={};if(h[O]!=null)l[O]=S(h[O]);if(h[rh]!=null)l[rh]=S(h[rh]);if(h[fh]!=null)l[fh]=S(h[fh]);if(h[$h]!=null)l[$h]=A0(R0(h[$h]));return l},ad=(h,d)=>{const l={};if(h[Zh]!=null)l[Zh]=S(h[Zh]);return l},rd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},sd=(h,d)=>{const l={};if(h[vh]!=null)l[vh]=S(h[vh]);if(h[N]!=null)l[N]=S(h[N]);return l},_d=(h,d)=>{const l={};if(h[g]!=null)l[g]=S(h[g]);return l},bd=(h,d)=>{const l={};if(h[Oh]!=null)l[Oh]=S(h[Oh]);if(h[g]!=null)l[g]=S(h[g]);if(h[N]!=null)l[N]=S(h[N]);return l},fd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[Ph]!=null)l[Ph]=sd(h[Ph],d);if(h[U]!=null)l[U]=u(h[U]);return l},Cd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);return l},Od=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},gd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},xd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},id=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},cd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},ed=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},pd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},k=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var nd=L0(Y),L=async(h,d,l,w,G)=>{const{hostname:H,protocol:I="https",port:Q,path:v}=await h.endpoint(),M={protocol:I,hostname:H,port:Q,method:"POST",path:v.endsWith("/")?v.slice(0,-1)+l:v+l,headers:d};if(w!==void 0)M.hostname=w;if(G!==void 0)M.body=G;return new T0(M)},j={"content-type":"application/x-www-form-urlencoded"},a="2011-06-15",r="Action",O="AccessKeyId",od="AssumeRole",Xh="AssumedRoleId",z="AssumedRoleUser",ud="AssumeRoleWithSAML",td="AssumeRoleWithWebIdentity",g="Account",N="Arn",x="Audience",q="Credentials",Yh="ContextAssertion",hw="DecodeAuthorizationMessage",Zh="DecodedMessage",y="DurationSeconds",$h="Expiration",Uh="ExternalId",Vh="EncodedMessage",Ph="FederatedUser",vh="FederatedUserId",lw="GetAccessKeyInfo",dw="GetCallerIdentity",ww="GetFederationToken",Gw="GetSessionToken",Mh="Issuer",zh="Key",Nh="Name",Wh="NameQualifier",Z="Policy",$="PolicyArns",Th="PrincipalArn",Ah="ProviderArn",Rh="ProvidedContexts",Lh="ProviderId",U="PackedPolicySize",jh="Provider",W="RoleArn",i="RoleSessionName",ah="Subject",rh="SecretAccessKey",sh="SAMLAssertion",_h="SubjectFromWebIdentityToken",V="SourceIdentity",c="SerialNumber",bh="SubjectType",fh="SessionToken",e="Tags",p="TokenCode",Ch="TransitiveTagKeys",Oh="UserId",s="Version",gh="Value",xh="WebIdentityToken",ih="arn",m="message",_=(h)=>Object.entries(h).map(([d,l])=>ch(d)+"="+ch(l)).join("&"),Iw=(h,d)=>{if(d.Error?.Code!==void 0)return d.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,V0).ser(j0).de(O0).build(){}class ph extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(P0,v0).ser(a0).de(g0).build(){}class lh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(M0,z0).ser(r0).de(x0).build(){}class nh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(s0).de(i0).build(){}class oh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(_0).de(c0).build(){}class uh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(b0).de(e0).build(){}class th extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,N0).ser(f0).de(p0).build(){}class hl extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,W0).ser(C0).de(n0).build(){}var Hw={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:ph,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:nh,GetAccessKeyInfoCommand:oh,GetCallerIdentityCommand:uh,GetFederationTokenCommand:th,GetSessionTokenCommand:hl};class t0 extends A{}u0(Hw,t0);var hd="us-east-1",ld=(h)=>{if(typeof h?.Arn==="string"){const d=h.Arn.split(":");if(d.length>4&&d[4]!=="")return d[4]}return},dd=async(h,d,l)=>{const w=typeof h==="function"?await h():h,G=typeof d==="function"?await d():d;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${w} (provider)`,`${G} (parent client)`,`${hd} (STS default)`),w??G??hd},wd=(h,d)=>{let l,w;return async(G,H)=>{if(w=G,!l){const{logger:M=h?.parentClientConfig?.logger,region:n,requestHandler:Bh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:Hd}=h,Sd=await dd(n,h?.parentClientConfig?.region,Hd);l=new d({credentialDefaultProvider:()=>async()=>w,region:Sd,requestHandler:Bh,logger:M})}const{Credentials:I,AssumedRoleUser:Q}=await l.send(new hh(H));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${H.RoleArn}`);const v=ld(Q);return{accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...v&&{accountId:v}}}},Gd=(h,d)=>{let l;return async(w)=>{if(!l){const{logger:Q=h?.parentClientConfig?.logger,region:v,requestHandler:M=h?.parentClientConfig?.requestHandler,credentialProviderLogger:n}=h,Bh=await dd(v,h?.parentClientConfig?.region,n);l=new d({region:Bh,requestHandler:M,logger:Q})}const{Credentials:G,AssumedRoleUser:H}=await l.send(new lh(w));if(!G||!G.AccessKeyId||!G.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${w.RoleArn}`);const I=ld(H);return{accessKeyId:G.AccessKeyId,secretAccessKey:G.SecretAccessKey,sessionToken:G.SessionToken,expiration:G.Expiration,...G.CredentialScope&&{credentialScope:G.CredentialScope},...I&&{accountId:I}}}};var Id=(h,d)=>{if(!d)return h;else return class l extends h{constructor(w){super(w);for(let G of d)this.middlewareStack.use(G)}}},Sw=(h={},d)=>wd(h,Id(A,d)),mw=(h={},d)=>Gd(h,Id(A,d)),RG=(h)=>(d)=>h({roleAssumer:Sw(d),roleAssumerWithWebIdentity:mw(d),...d});export{mw as getDefaultRoleAssumerWithWebIdentity,Sw as getDefaultRoleAssumer,RG as decorateDefaultCredentialProvider,B0 as __Client,Y as STSServiceException,A as STSClient,t0 as STS,Jh as RegionDisabledException,mh as PackedPolicyTooLargeException,Sh as MalformedPolicyDocumentException,Eh as InvalidIdentityTokenException,Kh as InvalidAuthorizationMessageException,Dh as IDPRejectedClaimException,kh as IDPCommunicationErrorException,W0 as GetSessionTokenResponseFilterSensitiveLog,hl as GetSessionTokenCommand,N0 as GetFederationTokenResponseFilterSensitiveLog,th as GetFederationTokenCommand,uh as GetCallerIdentityCommand,oh as GetAccessKeyInfoCommand,Hh as ExpiredTokenException,nh as DecodeAuthorizationMessageCommand,o as CredentialsFilterSensitiveLog,z0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,M0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,v0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,P0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,ph as AssumeRoleWithSAMLCommand,V0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,K as $Command};
@@ -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,P as O,V as P,ge as Q,Me as R,$o as S,No as T,Do as U,Jo as V,ae as W,gn as X,xn as Y,Zo as Z,X as _,qe as $,Qo as aa,Go as ba,Ko as ca,Xo as da,es as ea,os as fa,ss as ga,is as ha,cs as ia,we as ja,xe as ka,us as la,ls as ma,ps as na,bs as oa,Es as pa,Jt as qa,Vt as ra,Us as sa,Ps as ta,et as ua};
@@ -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};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{x as _} from"./chunk-a5c18c07abe8fd9c.js";import"./chunk-3bf6f8c8e8589e3d.js";import{jb as a} from"./chunk-2ec287222364c6b6.js";import{mb as l,sb as h} from"./chunk-c62b5c4cec67029c.js";var R=_(a(),1);var m=_(a(),1);var c=_(a(),1),C=(e,s,r)=>{const i={EcsContainer:async(t)=>{const{fromHttp:n}=await import("./chunk-9bd00e182ac2f8a6.js"),{fromContainerMetadata:d}=await import("./chunk-159f5b922269aef1.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),c.chain(n(t??{}),d(t))},Ec2InstanceMetadata:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:n}=await import("./chunk-159f5b922269aef1.js");return n(t)},Environment:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:n}=await import("./chunk-50b440397d41ab5a.js");return n(t)}};if(e in i)return i[e];else throw new c.CredentialsProviderError(`Unsupported credential source in profile ${s}. Got ${e}, `+"expected EcsContainer or Ec2InstanceMetadata or Environment.",{logger:r})};var P=(e,{profile:s="default",logger:r}={})=>{return Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(j(e,{profile:s,logger:r})||O(e,{profile:s,logger:r}))},j=(e,{profile:s,logger:r})=>{const i=typeof e.source_profile==="string"&&typeof e.credential_source==="undefined";if(i)r?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return i},O=(e,{profile:s,logger:r})=>{const i=typeof e.credential_source==="string"&&typeof e.source_profile==="undefined";if(i)r?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return i},v=async(e,s,r,i={})=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const t=s[e];if(!r.roleAssumer){const{getDefaultRoleAssumer:I}=await import("./chunk-6921ba2fa2e1adea.js");r.roleAssumer=I({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:r?.parentClientConfig},r.clientPlugins)}const{source_profile:n}=t;if(n&&n in i)throw new m.CredentialsProviderError("Detected a cycle attempting to resolve credentials for profile"+` ${l(r)}. Profiles visited: `+Object.keys(i).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${n?`source_profile=[${n}]`:`profile=[${e}]`}`);const d=n?o(n,{...s,[n]:{...s[n],role_arn:t.role_arn??s[n].role_arn}},r,{...i,[n]:!0}):(await C(t.credential_source,e,r.logger)(r))(),u={RoleArn:t.role_arn,RoleSessionName:t.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:t.external_id,DurationSeconds:parseInt(t.duration_seconds||"3600",10)},{mfa_serial:f}=t;if(f){if(!r.mfaCodeProvider)throw new m.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});u.SerialNumber=f,u.TokenCode=await r.mfaCodeProvider(f)}const D=await d;return r.roleAssumer(D,u)};var x=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",b=async(e,s)=>import("./chunk-79f7d7d90c4fb51a.js").then(({fromProcess:r})=>r({...e,profile:s})());var A=async(e,s={})=>{const{fromSSO:r}=await import("./chunk-f2dca6305fcba70b.js");return r({profile:e,logger:s.logger})()},k=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var w=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,y=(e,s)=>{return s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}})};var S=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,$=async(e,s)=>import("./chunk-a719a1f305964521.js").then(({fromTokenFile:r})=>r({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})());var o=async(e,s,r,i={})=>{const t=s[e];if(Object.keys(i).length>0&&w(t))return y(t,r);if(P(t,{profile:e,logger:r.logger}))return v(e,s,r,i);if(w(t))return y(t,r);if(S(t))return $(t,r);if(x(t))return b(r,e);if(k(t))return await A(e,r);throw new R.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var H=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const s=await h(e);return o(l(e),s,e)};export{H as fromIni};
2
+ import{x as _} from"./chunk-a5c18c07abe8fd9c.js";import"./chunk-3bf6f8c8e8589e3d.js";import{jb as a} from"./chunk-2ec287222364c6b6.js";import{mb as l,sb as h} from"./chunk-c62b5c4cec67029c.js";var R=_(a(),1);var m=_(a(),1);var c=_(a(),1),C=(e,s,r)=>{const i={EcsContainer:async(t)=>{const{fromHttp:n}=await import("./chunk-9bd00e182ac2f8a6.js"),{fromContainerMetadata:d}=await import("./chunk-b9e4546aaa58319c.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),c.chain(n(t??{}),d(t))},Ec2InstanceMetadata:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:n}=await import("./chunk-b9e4546aaa58319c.js");return n(t)},Environment:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:n}=await import("./chunk-50b440397d41ab5a.js");return n(t)}};if(e in i)return i[e];else throw new c.CredentialsProviderError(`Unsupported credential source in profile ${s}. Got ${e}, `+"expected EcsContainer or Ec2InstanceMetadata or Environment.",{logger:r})};var P=(e,{profile:s="default",logger:r}={})=>{return Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(j(e,{profile:s,logger:r})||O(e,{profile:s,logger:r}))},j=(e,{profile:s,logger:r})=>{const i=typeof e.source_profile==="string"&&typeof e.credential_source==="undefined";if(i)r?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return i},O=(e,{profile:s,logger:r})=>{const i=typeof e.credential_source==="string"&&typeof e.source_profile==="undefined";if(i)r?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return i},v=async(e,s,r,i={})=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const t=s[e];if(!r.roleAssumer){const{getDefaultRoleAssumer:I}=await import("./chunk-625025af819f55f5.js");r.roleAssumer=I({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:r?.parentClientConfig},r.clientPlugins)}const{source_profile:n}=t;if(n&&n in i)throw new m.CredentialsProviderError("Detected a cycle attempting to resolve credentials for profile"+` ${l(r)}. Profiles visited: `+Object.keys(i).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${n?`source_profile=[${n}]`:`profile=[${e}]`}`);const d=n?o(n,{...s,[n]:{...s[n],role_arn:t.role_arn??s[n].role_arn}},r,{...i,[n]:!0}):(await C(t.credential_source,e,r.logger)(r))(),u={RoleArn:t.role_arn,RoleSessionName:t.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:t.external_id,DurationSeconds:parseInt(t.duration_seconds||"3600",10)},{mfa_serial:f}=t;if(f){if(!r.mfaCodeProvider)throw new m.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});u.SerialNumber=f,u.TokenCode=await r.mfaCodeProvider(f)}const D=await d;return r.roleAssumer(D,u)};var x=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",b=async(e,s)=>import("./chunk-79f7d7d90c4fb51a.js").then(({fromProcess:r})=>r({...e,profile:s})());var A=async(e,s={})=>{const{fromSSO:r}=await import("./chunk-f2dca6305fcba70b.js");return r({profile:e,logger:s.logger})()},k=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var w=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,y=(e,s)=>{return s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}})};var S=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,$=async(e,s)=>import("./chunk-a719a1f305964521.js").then(({fromTokenFile:r})=>r({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})());var o=async(e,s,r,i={})=>{const t=s[e];if(Object.keys(i).length>0&&w(t))return y(t,r);if(P(t,{profile:e,logger:r.logger}))return v(e,s,r,i);if(w(t))return y(t,r);if(S(t))return $(t,r);if(x(t))return b(r,e);if(k(t))return await A(e,r);throw new R.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var H=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const s=await h(e);return o(l(e),s,e)};export{H as fromIni};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{x as c} from"./chunk-a5c18c07abe8fd9c.js";import{$ as z,A as _e,D as ee,E as Ae,I as se,J as te,L as re,M as ae,O as ie,P as le,V as ts,W as k,aa as Ve,ba as h,ia as He,ja as u,ka as Ne,la as pe,ma as ye,na as $e,oa as Pe,qa as i,ra as y,ta as fe,z as Fe} from"./chunk-38237d1b01b0db25.js";import{$a as x,Ca as Ds,Da as B,Ea as _,Fa as $,Ga as Ke,Ha as V,Ia as N,Ja as f,Ka as Qe,La as me,Ma as he,Na as ue,Oa as we,Pa as Xe,Qa as Ye,Sa as rs,Ta as Ze,Ua as be,Wa as xe,Xa as je,Ya as ve,Za as Te,ab as ke,bb as Re,cb as qe,db as Ee,eb as Je,fb as Ue,va as Le,wa as Ce,xa as Me,ya as We} from"./chunk-722f2aeae58daaa3.js";import"./chunk-3bf6f8c8e8589e3d.js";import{hb as l,ib as ne} from"./chunk-a8310ad9bad32329.js";import"./chunk-2f7aac67f16768a5.js";import"./chunk-9238196d4889d660.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 de=c(x(),1),oe=c(B(),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 de.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new oe.NoAuthSigner}],logger:e?.logger??new ee,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??ne,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 ps 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()}}var as=c(Ds(),1);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}}),ys=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:k},...e.sessionToken&&{sessionToken:k}}),Ge=(e)=>({...e,...e.roleCredentials&&{roleCredentials:ys(e.roleCredentials)}});var m=c(x(),1),ge=c(B(),1);var es=async(e,s)=>{const t=ge.requestBuilder(e,s),r=i({},vs,{[zs]:e[Rs]});t.bp("/federation/credentials");const a=i({[Ss]:[,z(e[Es],"roleName")],[qs]:[,z(e[ks],"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 ms(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 ms=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 us(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await ws(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await bs(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await xs(t,s);default:const a=t.body;return hs({output:e,parsedBody:a,errorCode:r})}},hs=Ne(o),us=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)},ws=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)},bs=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)},xs=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 vs=(e)=>e!==void 0&&e!==null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),ks="accountId",Rs="accessToken",qs="account_id";var Es="roleName",Ss="role_name",zs="x-amz-sso_bearer_token";class Bs extends ts.classBuilder().ep({...C}).m(function(e,s,t,r){return[as.getSerdePlugin(t,this.serialize,this.deserialize),rs(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(Oe,Ge).ser(es).de(ss).build(){}export{ps as SSOClient,Bs as GetRoleCredentialsCommand};
@@ -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};