gemi 0.4.64 → 0.4.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/App.d.ts.map +1 -1
- package/dist/app/index.js +64 -64
- package/dist/auth/AuthenticationServiceProvider.d.ts.map +1 -1
- package/dist/bin/index.js +7 -6
- package/dist/chunk-02118fc60206588d.js +2 -0
- package/dist/chunk-03c8e645c994d40a.js +1 -1
- package/dist/chunk-0de36a7e51fbd11b.js +9 -0
- package/dist/chunk-0e125593337a68aa.js +18 -0
- package/dist/chunk-136896e8038083a1.js +2 -0
- package/dist/chunk-14e60554a2e78f4a.js +2 -0
- package/dist/chunk-1900e90c372bb1d6.js +1 -1
- package/dist/chunk-1b3b7c2c9ae041ca.js +2 -0
- package/dist/chunk-1d6e287ca9c14fef.js +1 -1
- package/dist/chunk-21b1f7ac5f75cd26.js +2 -0
- package/dist/chunk-25dd80c6d9144f89.js +1 -1
- package/dist/chunk-285299d784985340.js +3 -0
- package/dist/chunk-2a0e8565f874d787.js +18 -0
- package/dist/chunk-2a5b4dfab2e26e21.js +1 -0
- package/dist/chunk-30f854fb2ba73268.js +2 -0
- package/dist/chunk-361f806684fe532e.js +6 -0
- package/dist/chunk-3f1eaa4b49aa9a15.js +3 -0
- package/dist/chunk-42aa6e3d42149620.js +1 -1
- package/dist/chunk-432bbd1d38ff3b52.js +2 -0
- package/dist/chunk-543013123141745c.js +1 -1
- package/dist/chunk-5fd67245740e3908.js +1 -1
- package/dist/chunk-65cd4d128b79bd93.js +2 -0
- package/dist/chunk-699957e6eb705a81.js +2 -0
- package/dist/chunk-6c345dba15e1c3f2.js +2 -0
- package/dist/chunk-6f78f2a54491595d.js +2 -0
- package/dist/chunk-733688c7851fffd1.js +2 -0
- package/dist/chunk-7898dd7609f163e8.js +2 -0
- package/dist/chunk-78ab7bcbe6104c5f.js +2 -0
- package/dist/chunk-7dfb17814922ade0.js +2 -0
- package/dist/chunk-82f72dfc6e27be04.js +1 -0
- package/dist/chunk-8884e59809021f5f.js +2 -0
- package/dist/chunk-8b40d6a498f8bf81.js +2 -0
- package/dist/chunk-8c8c8fd3646b76a1.js +2 -0
- package/dist/chunk-a004fce37a0f5a65.js +2 -0
- package/dist/chunk-a14516ac5e6f78aa.js +1 -0
- package/dist/chunk-a1efc60864e65ef2.js +1 -0
- package/dist/chunk-a35eb04f0c7c9944.js +2 -0
- package/dist/chunk-a4b231bf6d911e01.js +2 -0
- package/dist/chunk-a885dc5561caa8e0.js +3 -0
- package/dist/chunk-b13cfa16a8a18324.js +3 -0
- package/dist/chunk-b3e27ec4b56a20ac.js +2 -0
- package/dist/chunk-b7c4dc1136fcaeb7.js +2 -0
- package/dist/chunk-bdc34785363e3f34.js +2 -0
- package/dist/chunk-bffb8d677e1424a9.js +6 -0
- package/dist/chunk-c609d06153ed09ce.js +1 -1
- package/dist/chunk-c6d988f5928a4df1.js +1 -1
- package/dist/chunk-c7e2acfd5087fb30.js +2 -0
- package/dist/chunk-cf7dde2ab1be3a3c.js +1 -0
- package/dist/chunk-cf8b1c7a4e9fc32d.js +18 -0
- package/dist/chunk-d03b02d5f8128f13.js +2 -0
- package/dist/chunk-d27588325ae2c0f3.js +2 -0
- package/dist/chunk-d37757ffee07b05f.js +6 -0
- package/dist/chunk-d3b4a3c778c23705.js +2 -0
- package/dist/chunk-d3e039d010842a3f.js +2 -0
- package/dist/chunk-d7c78cd1ab7dc7ed.js +2 -0
- package/dist/chunk-d850d83873a89e2b.js +18 -0
- package/dist/chunk-d93a6531661d56b5.js +9 -0
- package/dist/chunk-d950bbcb684a11ef.js +2 -0
- package/dist/chunk-dac0e2ef13060d02.js +1 -0
- package/dist/chunk-dac9276e506d125d.js +2 -0
- package/dist/chunk-db2270bbca7854fe.js +2 -0
- package/dist/chunk-e06fbc8e70a88f07.js +2 -0
- package/dist/chunk-e8159722d49ad044.js +1 -1
- package/dist/chunk-ed589d4e4c575de7.js +1 -1
- package/dist/chunk-eea1d6f60a6875d5.js +2 -0
- package/dist/chunk-eeb3b193701aec43.js +1 -0
- package/dist/chunk-f1dfc76a05462dde.js +2 -0
- package/dist/chunk-f25e3644c98f64a7.js +2 -0
- package/dist/chunk-f404a785b581d029.js +2 -0
- package/dist/chunk-f5a531a49e7591bd.js +2 -0
- package/dist/chunk-f69bcbd7998553cb.js +2 -0
- package/dist/chunk-f8ad65b3a07ce3c4.js +6 -0
- package/dist/chunk-ff1bbce70d726bc6.js +9 -0
- package/dist/client/ClientRouterContext.d.ts +0 -1
- package/dist/client/ClientRouterContext.d.ts.map +1 -1
- package/dist/client/HttpReload.d.ts +2 -0
- package/dist/client/HttpReload.d.ts.map +1 -0
- package/dist/client/Mutation.d.ts +5 -5
- package/dist/client/Mutation.d.ts.map +1 -1
- package/dist/client/ProgressManager.d.ts +1 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +186 -158
- package/dist/client/types.d.ts +7 -6
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/useMutation.d.ts +11 -2
- package/dist/client/useMutation.d.ts.map +1 -1
- package/dist/client/useNavigate.d.ts.map +1 -1
- package/dist/client/useParams.d.ts +2 -0
- package/dist/client/useParams.d.ts.map +1 -0
- package/dist/facades/Redirect.d.ts +2 -1
- package/dist/facades/Redirect.d.ts.map +1 -1
- package/dist/facades/index.js +1 -1
- package/dist/http/ApiRouter.d.ts.map +1 -1
- package/dist/http/HttpRequest.d.ts +1 -1
- package/dist/http/HttpRequest.d.ts.map +1 -1
- package/dist/http/I18nServiceContainer.d.ts +2 -5
- package/dist/http/I18nServiceContainer.d.ts.map +1 -1
- package/dist/http/ViewRouter.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/server/index.js +3 -3
- package/dist/storage/index.js +1 -10
- package/dist/utils/type.d.ts +1 -1
- package/dist/utils/type.d.ts.map +1 -1
- package/dist/vite/index-M61-SALR.mjs +20030 -0
- package/dist/vite/index.mjs +4 -0
- package/dist/vite/typescript-puyfmcra.mjs +14089 -0
- package/package.json +7 -10
- package/dist/vite/index.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-78ab7bcbe6104c5f.js";import{y as $} from"./chunk-7ce930fe69575c87.js";import"./chunk-d7c78cd1ab7dc7ed.js";import{Ba as I,F as ue,G as er,J as be,K as cr,O as je,P as Fe,R as De,S as qe,V as Je,W as Ve,ba as v,ca as t,da as Vr,fa as _,ga as b,ha as j,ia as F,ja as h,qa as Sr,ra as a,sa as jr,ta as We,ua as fe,va as rr,wa as sr,ya as d,za as o} from"./chunk-a885dc5561caa8e0.js";import{$a as Le,Da as nr,Ea as or,Fa as dr,Ga as yr,Ha as ee,Ia as re,La as H,Ma as tr,Na as Ie,Oa as Re,Pa as Pe,Qa as ar,Ra as Ae,Sa as Ke,Ta as Me,Ua as Be,Va as mr,Wa as wr,Ya as E,Za as S,_a as kr,bb as Qe,cb as vr,db as Xe,eb as Er,fb as q,gb as Ye,hb as Ze,ib as He,jb as Ne,kb as ir,lb as lr} from"./chunk-d850d83873a89e2b.js";import"./chunk-65cd4d128b79bd93.js";import{ob as R,pb as Ue} from"./chunk-30f854fb2ba73268.js";import{qb as Ce} from"./chunk-d93a6531661d56b5.js";import"./chunk-a1efc60864e65ef2.js";import"./chunk-a14516ac5e6f78aa.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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-7ce930fe69575c87.js";import"./chunk-
|
|
2
|
+
import"./chunk-7ce930fe69575c87.js";import"./chunk-c7e2acfd5087fb30.js";import{mb as v,nb as B} from"./chunk-ed589d4e4c575de7.js";import{ob as z,pb as y} from"./chunk-2db6c9bb69bb27aa.js";import"./chunk-82f72dfc6e27be04.js";import{parse as p} from"url";import{Buffer as M} from"buffer";import{request as k} from"http";function u(c){return new Promise((I,x)=>{const T=k({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new z("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new z("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{const{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new z("Error response received from instance metadata service"),{statusCode:O})),T.destroy();const E=[];N.on("data",(w)=>{E.push(w)}),N.on("end",()=>{I(M.concat(E)),T.destroy()})}),T.end()})}var K=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",_=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var hc=1000,Yc=0,D=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var m=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var Q="AWS_CONTAINER_CREDENTIALS_FULL_URI",X="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b="AWS_CONTAINER_AUTHORIZATION_TOKEN",mc=(c={})=>{const{timeout:I,maxRetries:x}=D(c);return()=>m(async()=>{const T=await s({logger:c.logger}),N=JSON.parse(await C(I,T));if(!K(N))throw new y("Invalid response received from instance metadata service.",{logger:c.logger});return _(N)},x)},C=async(c,I)=>{if(process.env[b])I.headers={...I.headers,Authorization:process.env[b]};return(await u({...I,timeout:c})).toString()},a="169.254.170.2",n={localhost:!0,"127.0.0.1":!0},o={"http:":!0,"https:":!0},s=async({logger:c})=>{if(process.env[X])return{hostname:a,path:process.env[X]};if(process.env[Q]){const I=p(process.env[Q]);if(!I.hostname||!(I.hostname in n))throw new y(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in o))throw new y(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new y("The container metadata credential provider cannot be used unless"+` the ${X} or ${Q} environment`+" variable is set",{tryNextLink:!1,logger:c})};class G extends y{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,G.prototype)}}var A;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(A||(A={}));var H={environmentVariableSelector:(c)=>c["AWS_EC2_METADATA_SERVICE_ENDPOINT"],configFileSelector:(c)=>c["ec2_metadata_service_endpoint"],default:void 0};var f;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(f||(f={}));var g="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",l="ec2_metadata_service_endpoint_mode",q={environmentVariableSelector:(c)=>c[g],configFileSelector:(c)=>c[l],default:f.IPv4};var Z=async()=>B(await r()||await d()),r=async()=>v(H)(),d=async()=>{const c=await v(q)();switch(c){case f.IPv4:return A.IPv4;case f.IPv6:return A.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}.`+` Select from ${Object.values(f)}`)}};var L=(c,I)=>{const x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn("Attempting credential expiration extension due to a credential service availability issue. A refresh of these "+`credentials will be attempted after ${new Date(T)}.\nFor more information, please visit: `+"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html");const N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var U=(c,I={})=>{const x=I?.logger||console;let T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=L(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=L(T,x);else throw O}return T=N,N}};var P="/latest/meta-data/iam/security-credentials/",e="/latest/api/token",W="AWS_EC2_METADATA_V1_DISABLED",t="ec2_metadata_v1_disabled",F="x-aws-ec2-metadata-token",oc=(c={})=>U(i(c),{logger:c.logger}),i=(c={})=>{let I=!1;const{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=D(c),E=async(w,$)=>{if(I||$.headers?.[F]==null){let h=!1,Y=!1;const R=await v({environmentVariableSelector:(S)=>{const j=S[W];if(Y=!!j&&j!=="false",j===void 0)throw new y(`${W} not set in env, checking config file next.`,{logger:c.logger});return Y},configFileSelector:(S)=>{const j=S[t];return h=!!j&&j!=="false",h},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||R){const S=[];if(c.ec2MetadataV1Disabled)S.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(h)S.push(`config file profile (${t})`);if(Y)S.push(`process environment variable (${W})`);throw new G(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${S.join(", ")}].`)}}const V=(await m(async()=>{let h;try{h=await Ic($)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)).trim();return m(async()=>{let h;try{h=await Tc(V,$,c)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)};return async()=>{const w=await Z();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(O,{...w,timeout:N});else{let $;try{$=(await cc({...w,timeout:N})).toString()}catch(J){if(J?.statusCode===400)throw Object.assign(J,{message:"EC2 Metadata token request returned error"});else if(J.message==="TimeoutError"||[403,404,405].includes(J.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(O,{...w,timeout:N})}return E(O,{...w,headers:{[F]:$},timeout:N})}}},cc=async(c)=>u({...c,path:e,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Ic=async(c)=>(await u({...c,path:P})).toString(),Tc=async(c,I,x)=>{const T=JSON.parse((await u({...I,path:P+c})).toString());if(!K(T))throw new y("Invalid response received from instance metadata service.",{logger:x.logger});return _(T)};export{D as providerConfigFromInit,u as httpRequest,Z as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,mc as fromContainerMetadata,A as Endpoint,X as ENV_CMDS_RELATIVE_URI,Q as ENV_CMDS_FULL_URI,b as ENV_CMDS_AUTH_TOKEN,hc as DEFAULT_TIMEOUT,Yc as DEFAULT_MAX_RETRIES};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{y as A,z as Q} from"./chunk-7ce930fe69575c87.js";import{nb as K} from"./chunk-14e60554a2e78f4a.js";var G=Q(($r,mt)=>{var{defineProperty:R,getOwnPropertyDescriptor:ge,getOwnPropertyNames:ye}=Object,we=Object.prototype.hasOwnProperty,b=(t,e)=>R(t,"name",{value:e,configurable:!0}),xe=(t,e)=>{for(var r in e)R(t,r,{get:e[r],enumerable:!0})},be=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let o of ye(e))if(!we.call(t,o)&&o!==r)R(t,o,{get:()=>e[o],enumerable:!(n=ge(e,o))||n.enumerable})}return t},Te=(t)=>be(R({},"__esModule",{value:!0}),t),lt={};xe(lt,{constructStack:()=>Z});mt.exports=Te(lt);var $=b((t,e)=>{const r=[];if(t)r.push(t);if(e)for(let n of e)r.push(n);return r},"getAllAliases"),E=b((t,e)=>{return`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`},"getMiddlewareNameWithAliases"),Z=b(()=>{let t=[],e=[],r=!1;const n=new Set,o=b((f)=>f.sort((p,u)=>pt[u.step]-pt[p.step]||dt[u.priority||"normal"]-dt[p.priority||"normal"]),"sort"),s=b((f)=>{let p=!1;const u=b((y)=>{const g=$(y.name,y.aliases);if(g.includes(f)){p=!0;for(let l of g)n.delete(l);return!1}return!0},"filterCb");return t=t.filter(u),e=e.filter(u),p},"removeByName"),c=b((f)=>{let p=!1;const u=b((y)=>{if(y.middleware===f){p=!0;for(let g of $(y.name,y.aliases))n.delete(g);return!1}return!0},"filterCb");return t=t.filter(u),e=e.filter(u),p},"removeByReference"),i=b((f)=>{var p;return t.forEach((u)=>{f.add(u.middleware,{...u})}),e.forEach((u)=>{f.addRelativeTo(u.middleware,{...u})}),(p=f.identifyOnResolve)==null||p.call(f,w.identifyOnResolve()),f},"cloneTo"),a=b((f)=>{const p=[];return f.before.forEach((u)=>{if(u.before.length===0&&u.after.length===0)p.push(u);else p.push(...a(u))}),p.push(f),f.after.reverse().forEach((u)=>{if(u.before.length===0&&u.after.length===0)p.push(u);else p.push(...a(u))}),p},"expandRelativeMiddlewareList"),d=b((f=!1)=>{const p=[],u=[],y={};return t.forEach((l)=>{const h={...l,before:[],after:[]};for(let m of $(h.name,h.aliases))y[m]=h;p.push(h)}),e.forEach((l)=>{const h={...l,before:[],after:[]};for(let m of $(h.name,h.aliases))y[m]=h;u.push(h)}),u.forEach((l)=>{if(l.toMiddleware){const h=y[l.toMiddleware];if(h===void 0){if(f)return;throw new Error(`${l.toMiddleware} is not found when adding ${E(l.name,l.aliases)} middleware ${l.relation} ${l.toMiddleware}`)}if(l.relation==="after")h.after.push(l);if(l.relation==="before")h.before.push(l)}}),o(p).map(a).reduce((l,h)=>{return l.push(...h),l},[])},"getMiddlewareList"),w={add:(f,p={})=>{const{name:u,override:y,aliases:g}=p,l={step:"initialize",priority:"normal",middleware:f,...p},h=$(u,g);if(h.length>0){if(h.some((m)=>n.has(m))){if(!y)throw new Error(`Duplicate middleware name '${E(u,g)}'`);for(let m of h){const S=t.findIndex((N)=>{var D;return N.name===m||((D=N.aliases)==null?void 0:D.some((V)=>V===m))});if(S===-1)continue;const x=t[S];if(x.step!==l.step||l.priority!==x.priority)throw new Error(`"${E(x.name,x.aliases)}" middleware with ${x.priority} priority in ${x.step} step cannot be overridden by "${E(u,g)}" middleware with ${l.priority} priority in ${l.step} step.`);t.splice(S,1)}}for(let m of h)n.add(m)}t.push(l)},addRelativeTo:(f,p)=>{const{name:u,override:y,aliases:g}=p,l={middleware:f,...p},h=$(u,g);if(h.length>0){if(h.some((m)=>n.has(m))){if(!y)throw new Error(`Duplicate middleware name '${E(u,g)}'`);for(let m of h){const S=e.findIndex((N)=>{var D;return N.name===m||((D=N.aliases)==null?void 0:D.some((V)=>V===m))});if(S===-1)continue;const x=e[S];if(x.toMiddleware!==l.toMiddleware||x.relation!==l.relation)throw new Error(`"${E(x.name,x.aliases)}" middleware ${x.relation} "${x.toMiddleware}" middleware cannot be overridden by "${E(u,g)}" middleware ${l.relation} "${l.toMiddleware}" middleware.`);e.splice(S,1)}}for(let m of h)n.add(m)}e.push(l)},clone:()=>i(Z()),use:(f)=>{f.applyToStack(w)},remove:(f)=>{if(typeof f==="string")return s(f);else return c(f)},removeByTag:(f)=>{let p=!1;const u=b((y)=>{const{tags:g,name:l,aliases:h}=y;if(g&&g.includes(f)){const m=$(l,h);for(let S of m)n.delete(S);return p=!0,!1}return!0},"filterCb");return t=t.filter(u),e=e.filter(u),p},concat:(f)=>{var p;const u=i(Z());return u.use(f),u.identifyOnResolve(r||u.identifyOnResolve()||(((p=f.identifyOnResolve)==null?void 0:p.call(f))??!1)),u},applyToStack:i,identify:()=>{return d(!0).map((f)=>{const p=f.step??f.relation+" "+f.toMiddleware;return E(f.name,f.aliases)+" - "+p})},identifyOnResolve(f){if(typeof f==="boolean")r=f;return r},resolve:(f,p)=>{for(let u of d().map((y)=>y.middleware).reverse())f=u(f,p);if(r)console.log(w.identify());return f}};return w},"constructStack"),pt={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},dt={high:3,normal:2,low:1}});var Et=Q((Qr,Ct)=>{var{defineProperty:H,getOwnPropertyDescriptor:$e,getOwnPropertyNames:Ae}=Object,Ie=Object.prototype.hasOwnProperty,v=(t,e)=>H(t,"name",{value:e,configurable:!0}),Ue=(t,e)=>{for(var r in e)H(t,r,{get:e[r],enumerable:!0})},Fe=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let o of Ae(e))if(!Ie.call(t,o)&&o!==r)H(t,o,{get:()=>e[o],enumerable:!(n=$e(e,o))||n.enumerable})}return t},Pe=(t)=>Fe(H({},"__esModule",{value:!0}),t),Tt={};Ue(Tt,{escapeUri:()=>St,escapeUriPath:()=>Ne});Ct.exports=Pe(Tt);var St=v((t)=>encodeURIComponent(t).replace(/[!'()*]/g,ke),"escapeUri"),ke=v((t)=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Ne=v((t)=>t.split("/").map(St).join("/"),"escapeUriPath")});var zt=Q((Po,Wt)=>{var Yt=function(t){if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const e=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2){const n=t.slice(r,r+2).toLowerCase();if(n in ot)e[r/2]=ot[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return e},Jt=function(t){let e="";for(let r=0;r<t.byteLength;r++)e+=Ot[t[r]];return e},z=Object.defineProperty,Ve=Object.getOwnPropertyDescriptor,Ze=Object.getOwnPropertyNames,Qe=Object.prototype.hasOwnProperty,qt=(t,e)=>z(t,"name",{value:e,configurable:!0}),Ge=(t,e)=>{for(var r in e)z(t,r,{get:e[r],enumerable:!0})},Ke=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let o of Ze(e))if(!Qe.call(t,o)&&o!==r)z(t,o,{get:()=>e[o],enumerable:!(n=Ve(e,o))||n.enumerable})}return t},Xe=(t)=>Ke(z({},"__esModule",{value:!0}),t),jt={};Ge(jt,{fromHex:()=>Yt,toHex:()=>Jt});Wt.exports=Xe(jt);var Ot={},ot={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();if(e.length===1)e=`0${e}`;Ot[t]=e,ot[e]=t}qt(Yt,"fromHex");qt(Jt,"toHex")});var gt=A(G(),1);class Se{constructor(t){this.middlewareStack=gt.constructStack(),this.config=t}send(t,e,r){const n=typeof e!=="function"?e:void 0,o=typeof e==="function"?e:r,s=t.resolveMiddleware(this.middlewareStack,this.config,n);if(o)s(t).then((c)=>o(null,c.output),(c)=>o(c)).catch(()=>{});else return s(t).then((c)=>c.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}}var yt=A(G(),1),wt=A(K(),1);class xt{constructor(){this.middlewareStack=yt.constructStack()}static classBuilder(){return new bt}resolveMiddlewareWithContext(t,e,r,{middlewareFn:n,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,smithyContext:a,additionalContext:d,CommandCtor:w}){for(let g of n.bind(this)(w,t,e,r))this.middlewareStack.use(g);const f=t.concat(this.middlewareStack),{logger:p}=e,u={logger:p,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,[wt.SMITHY_CONTEXT_KEY]:{commandInstance:this,...a},...d},{requestHandler:y}=e;return f.resolve((g)=>y.handle(g.request,r||{}),u)}}class bt{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(t)=>t,this._outputFilterSensitiveLog=(t)=>t,this._serializer=null,this._deserializer=null}init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,e,r={}){return this._smithyContext={service:t,operation:e,...r},this}c(t={}){return this._additionalContext=t,this}n(t,e){return this._clientName=t,this._commandName=e,this}f(t=(r)=>r,e=(r)=>r){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=e,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}build(){const t=this;let e;return e=class extends xt{static getEndpointParameterInstructions(){return t._ep}constructor(...[r]){super();this.serialize=t._serializer,this.deserialize=t._deserializer,this.input=r??{},t._init(this)}resolveMiddleware(r,n,o){return this.resolveMiddlewareWithContext(r,n,o,{CommandCtor:e,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog,outputFilterSensitiveLog:t._outputFilterSensitiveLog,smithyContext:t._smithyContext,additionalContext:t._additionalContext})}}}}var Fr=(t)=>{let e=t.httpHandler;return{setHttpHandler(r){e=r},httpHandler(){return e},updateHttpClientConfig(r,n){e.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return e.httpHandlerConfigs()}}},Pr=(t)=>{return{httpHandler:t.httpHandler()}};var Ce=A(K(),1);var Ee=function(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return{...e,[r]:Array.isArray(n)?[...n]:n}},{})};class X{constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const e=new X({...t,headers:{...t.headers}});if(e.query)e.query=Ee(e.query);return e}static isInstance(t){if(!t)return!1;const e=t;return"method"in e&&"protocol"in e&&"hostname"in e&&"path"in e&&typeof e.query==="object"&&typeof e.headers==="object"}clone(){return X.clone(this)}}class L{constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const e=t;return typeof e.statusCode==="number"&&typeof e.headers==="object"}}var q=A(Et(),1);function j(t){const e=[];for(let r of Object.keys(t).sort()){const n=t[r];if(r=q.escapeUri(r),Array.isArray(n))for(let o=0,s=n.length;o<s;o++)e.push(`${r}=${q.escapeUri(n[o])}`);else{let o=r;if(n||typeof n==="string")o+=`=${q.escapeUri(n)}`;e.push(o)}}return e.join("&")}import{Agent as Pt,request as Me} from"http";import{Agent as kt,request as Be} from"https";var $t=["ECONNRESET","EPIPE","ETIMEDOUT"];var _=(t)=>{const e={};for(let r of Object.keys(t)){const n=t[r];e[r]=Array.isArray(n)?n.join(","):n}return e};var At=(t,e,r=0)=>{if(!r)return;const n=setTimeout(()=>{t.destroy(),e(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r);t.on("socket",(o)=>{if(o.connecting)o.on("connect",()=>{clearTimeout(n)});else clearTimeout(n)})};var It=(t,{keepAlive:e,keepAliveMsecs:r})=>{if(e!==!0)return;t.on("socket",(n)=>{n.setKeepAlive(e,r||0)})};var Ut=(t,e,r=0)=>{t.setTimeout(r,()=>{t.destroy(),e(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))})};import{Readable as De} from"stream";async function tt(t,e,r=Ft){const n=e.headers??{},o=n.Expect||n.expect;let s=-1,c=!1;if(o==="100-continue")await Promise.race([new Promise((i)=>{s=Number(setTimeout(i,Math.max(Ft,r)))}),new Promise((i)=>{t.on("continue",()=>{clearTimeout(s),i()}),t.on("error",()=>{c=!0,clearTimeout(s),i()})})]);if(!c)Le(t,e.body)}var Le=function(t,e){if(e instanceof De){e.pipe(t);return}if(e){if(Buffer.isBuffer(e)||typeof e==="string"){t.end(e);return}const r=e;if(typeof r==="object"&&r.buffer&&typeof r.byteOffset==="number"&&typeof r.byteLength==="number"){t.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}t.end(Buffer.from(e));return}t.end()},Ft=1000;class et{static create(t){if(typeof t?.handle==="function")return t;return new et(t)}static checkSocketUsage(t,e,r=console){const{sockets:n,requests:o,maxSockets:s}=t;if(typeof s!=="number"||s===Infinity)return e;const c=15000;if(Date.now()-c<e)return e;if(n&&o)for(let i in n){const a=n[i]?.length??0,d=o[i]?.length??0;if(a>=s&&d>=2*s)return r?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${a} and ${d} additional requests are enqueued.
|
|
2
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return e}constructor(t){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((e,r)=>{if(typeof t==="function")t().then((n)=>{e(this.resolveDefaultConfig(n))}).catch(r);else e(this.resolveDefaultConfig(t))})}resolveDefaultConfig(t){const{requestTimeout:e,connectionTimeout:r,socketTimeout:n,httpAgent:o,httpsAgent:s}=t||{};return{connectionTimeout:r,requestTimeout:e??n,httpAgent:(()=>{if(o instanceof Pt||typeof o?.destroy==="function")return o;return new Pt({keepAlive:!0,maxSockets:50,...o})})(),httpsAgent:(()=>{if(s instanceof kt||typeof s?.destroy==="function")return s;return new kt({keepAlive:!0,maxSockets:50,...s})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(t,{abortSignal:e}={}){if(!this.config)this.config=await this.configProvider;let r;return new Promise((n,o)=>{let s=void 0;const c=async(h)=>{await s,clearTimeout(r),n(h)},i=async(h)=>{await s,clearTimeout(r),o(h)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(e?.aborted){const h=new Error("Request aborted");h.name="AbortError",i(h);return}const a=t.protocol==="https:",d=a?this.config.httpsAgent:this.config.httpAgent;r=setTimeout(()=>{this.socketWarningTimestamp=et.checkSocketUsage(d,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const w=j(t.query||{});let f=void 0;if(t.username!=null||t.password!=null){const h=t.username??"",m=t.password??"";f=`${h}:${m}`}let p=t.path;if(w)p+=`?${w}`;if(t.fragment)p+=`#${t.fragment}`;const u={headers:t.headers,host:t.hostname,method:t.method,path:p,port:t.port,agent:d,auth:f},g=(a?Be:Me)(u,(h)=>{const m=new L({statusCode:h.statusCode||-1,reason:h.statusMessage,headers:_(h.headers),body:h});c({response:m})});if(g.on("error",(h)=>{if($t.includes(h.code))i(Object.assign(h,{name:"TimeoutError"}));else i(h)}),At(g,i,this.config.connectionTimeout),Ut(g,i,this.config.requestTimeout),e){const h=()=>{g.destroy();const m=new Error("Request aborted");m.name="AbortError",i(m)};if(typeof e.addEventListener==="function"){const m=e;m.addEventListener("abort",h,{once:!0}),g.once("close",()=>m.removeEventListener("abort",h))}else e.onabort=h}const l=u.agent;if(typeof l==="object"&&"keepAlive"in l)It(g,{keepAlive:l.keepAlive,keepAliveMsecs:l.keepAliveMsecs});s=tt(g,t,this.config.requestTimeout).catch((h)=>{return clearTimeout(r),o(h)})})}updateHttpClientConfig(t,e){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[t]:e}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as Re} from"stream";class rt extends Re{constructor(){super(...arguments);this.bufferedBytes=[]}_write(t,e,r){this.bufferedBytes.push(t),r()}}async function qe(t){const e=[],r=t.getReader();let n=!1,o=0;while(!n){const{done:i,value:a}=await r.read();if(a)e.push(a),o+=a.length;n=i}const s=new Uint8Array(o);let c=0;for(let i of e)s.set(i,c),c+=i.length;return s}var Nt=(t)=>{if(He(t))return qe(t);return new Promise((e,r)=>{const n=new rt;t.pipe(n),t.on("error",(o)=>{n.end(),r(o)}),n.on("error",r),n.on("finish",function(){const o=new Uint8Array(Buffer.concat(this.bufferedBytes));e(o)})})},He=(t)=>typeof ReadableStream==="function"&&t instanceof ReadableStream;var Ln="***SensitiveInformation***";var Bn=(t,e)=>{for(let r of Object.keys(t)){const n=t[r],o=async function(c,i,a){const d=new n(c);if(typeof i==="function")this.send(d,i);else if(typeof a==="function"){if(typeof i!=="object")throw new Error(`Expected http options but got ${typeof i}`);this.send(d,i||{},a)}else return this.send(d,i)},s=(r[0].toLowerCase()+r.slice(1)).replace(/Command$/,"");e.prototype[s]=o}};class Dt extends Error{constructor(t){super(t.message);Object.setPrototypeOf(this,Dt.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}}var Lt=(t,e={})=>{Object.entries(e).filter(([,n])=>n!==void 0).forEach(([n,o])=>{if(t[n]==null||t[n]==="")t[n]=o});const r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t};class je{trace(){}debug(){}info(){}warn(){}error(){}}var Mt=(t)=>typeof ArrayBuffer==="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]";import{Buffer as nt} from"buffer";var U=(t,e=0,r=t.byteLength-e)=>{if(!Mt(t))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof t} (${t})`);return nt.from(t,e,r)},O=(t,e)=>{if(typeof t!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof t} (${t})`);return e?nt.from(t,e):nt.from(t)};var Oe=/^[A-Za-z0-9+/]*={0,2}$/,Y=(t)=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Oe.exec(t))throw new TypeError("Invalid base64 string.");const e=O(t,"base64");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)};var F=(t)=>{const e=O(t,"utf8");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var Gn=(t)=>{if(typeof t==="string")return F(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(t)};var J=(t)=>{if(typeof t==="string")return t;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return U(t.buffer,t.byteOffset,t.byteLength).toString("utf8")};var W=(t)=>{let e;if(typeof t==="string")e=F(t);else e=t;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return U(e.buffer,e.byteOffset,e.byteLength).toString("base64")};function Bt(t,e="utf-8"){if(e==="base64")return W(t);return J(t)}function Rt(t,e){if(e==="base64")return C.mutate(Y(t));return C.mutate(F(t))}class C extends Uint8Array{static fromString(t,e="utf-8"){switch(typeof t){case"string":return Rt(t,e);default:throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}}static mutate(t){return Object.setPrototypeOf(t,C.prototype),t}transformToString(t="utf-8"){return Bt(this,t)}}import{Readable as Ye} from"stream";var yo=(t,e)=>{const{base64Encoder:r,bodyLengthChecker:n,checksumAlgorithmFn:o,checksumLocationName:s,streamHasher:c}=e,i=r!==void 0&&o!==void 0&&s!==void 0&&c!==void 0,a=i?c(o,t):void 0,d=new Ye({read:()=>{}});return t.on("data",(w)=>{const f=n(w)||0;d.push(`${f.toString(16)}\r\n`),d.push(w),d.push("\r\n")}),t.on("end",async()=>{if(d.push("0\r\n"),i){const w=r(await a);d.push(`${s}:${w}\r\n`),d.push("\r\n")}d.push(null)}),d};import{Readable as st} from"stream";import{TextDecoder as ve} from"util";async function Je(t){const e=await ze(t),r=Y(e);return new Uint8Array(r)}async function We(t){const e=[],r=t.getReader();let n=!1,o=0;while(!n){const{done:i,value:a}=await r.read();if(a)e.push(a),o+=a.length;n=i}const s=new Uint8Array(o);let c=0;for(let i of e)s.set(i,c),c+=i.length;return s}var ze=function(t){return new Promise((e,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const o=n.result??"",s=o.indexOf(","),c=s>-1?s+1:o.length;e(o.substring(c))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(t)})},Ht=(t)=>{if(typeof Blob==="function"&&t instanceof Blob)return Je(t);return We(t)};var Qt=A(zt(),1);var I=(t)=>typeof ReadableStream==="function"&&(t?.constructor?.name===ReadableStream.name||t instanceof ReadableStream);var Vt="The stream has already been transformed.",Gt=(t)=>{if(!Zt(t)&&!I(t)){const o=t?.__proto__?.constructor?.name||t;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${o}`)}let e=!1;const r=async()=>{if(e)throw new Error(Vt);return e=!0,await Ht(t)},n=(o)=>{if(typeof o.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return o.stream()};return Object.assign(t,{transformToByteArray:r,transformToString:async(o)=>{const s=await r();if(o==="base64")return W(s);else if(o==="hex")return Qt.toHex(s);else if(o===void 0||o==="utf8"||o==="utf-8")return J(s);else if(typeof TextDecoder==="function")return new TextDecoder(o).decode(s);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(e)throw new Error(Vt);if(e=!0,Zt(t))return n(t);else if(I(t))return t;else throw new Error(`Cannot transform payload to web stream, got ${t}`)}})},Zt=(t)=>typeof Blob==="function"&&t instanceof Blob;var Kt="The stream has already been transformed.",Yo=(t)=>{if(!(t instanceof st))try{return Gt(t)}catch(n){const o=t?.__proto__?.constructor?.name||t;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${o}`)}let e=!1;const r=async()=>{if(e)throw new Error(Kt);return e=!0,await Nt(t)};return Object.assign(t,{transformToByteArray:r,transformToString:async(n)=>{const o=await r();if(n===void 0||Buffer.isEncoding(n))return U(o.buffer,o.byteOffset,o.byteLength).toString(n);else return new ve(n).decode(o)},transformToWebStream:()=>{if(e)throw new Error(Kt);if(t.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof st.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return e=!0,st.toWeb(t)}})};import{PassThrough as vt} from"stream";async function Xt(t){if(typeof t.stream==="function")t=t.stream();return t.tee()}async function Qo(t){if(I(t))return Xt(t);const e=new vt,r=new vt;return t.pipe(e),t.pipe(r),[e,r]}import{Writable as _e} from"stream";async function _t(t,e){let r=0;const n=[],o=t.getReader();let s=!1;while(!s){const{done:a,value:d}=await o.read();if(d)n.push(d),r+=d?.byteLength??0;if(r>=e)break;s=a}o.releaseLock();const c=new Uint8Array(Math.min(e,r));let i=0;for(let a of n){if(a.byteLength>c.byteLength-i){c.set(a.subarray(0,c.byteLength-i),i);break}else c.set(a,i);i+=a.length}return c}var ts=(t,e)=>{if(I(t))return _t(t,e);return new Promise((r,n)=>{const o=new te;o.limit=e,t.pipe(o),t.on("error",(s)=>{o.end(),n(s)}),o.on("error",n),o.on("finish",function(){const s=new Uint8Array(Buffer.concat(this.buffers));r(s)})})};class te extends _e{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write(t,e,r){if(this.buffers.push(t),this.bytesBuffered+=t.byteLength??0,this.bytesBuffered>=this.limit){const n=this.bytesBuffered-this.limit,o=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=o.subarray(0,o.byteLength-n),this.emit("finish")}r()}}var hs=async(t=new Uint8Array,e)=>{if(t instanceof Uint8Array)return C.mutate(t);if(!t)return C.mutate(new Uint8Array);const r=e.streamCollector(t);return C.mutate(await r)};var ps=(t)=>{switch(t){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${t}"`)}};var tr=(t)=>{if(t===null||t===void 0)return;if(typeof t==="string"){const e=parseFloat(t);if(!Number.isNaN(e)){if(String(e)!==String(t))fe.warn(ce(`Expected number but observed string: ${t}`));return e}}if(typeof t==="number")return t;throw new TypeError(`Expected number, got ${typeof t}: ${t}`)},er=Math.ceil(340282346638528860000000000000000000000),ee=(t)=>{const e=tr(t);if(e!==void 0&&!Number.isNaN(e)&&e!==Infinity&&e!==(-Infinity)){if(Math.abs(e)>er)throw new TypeError(`Expected 32-bit float, got ${t}`)}return e},it=(t)=>{if(t===null||t===void 0)return;if(Number.isInteger(t)&&!Number.isNaN(t))return t;throw new TypeError(`Expected integer, got ${typeof t}: ${t}`)};var re=(t)=>ct(t,32),ne=(t)=>ct(t,16),oe=(t)=>ct(t,8),ct=(t,e)=>{const r=it(t);if(r!==void 0&&rr(r,e)!==r)throw new TypeError(`Expected ${e}-bit integer, got ${t}`);return r},rr=(t,e)=>{switch(e){case 32:return Int32Array.of(t)[0];case 16:return Int16Array.of(t)[0];case 8:return Int8Array.of(t)[0]}},ds=(t,e)=>{if(t===null||t===void 0){if(e)throw new TypeError(`Expected a non-null value for ${e}`);throw new TypeError("Expected a non-null value")}return t},ls=(t)=>{if(t===null||t===void 0)return;if(typeof t==="object"&&!Array.isArray(t))return t;const e=Array.isArray(t)?"array":typeof t;throw new TypeError(`Expected object, got ${e}: ${t}`)},ms=(t)=>{if(t===null||t===void 0)return;if(typeof t==="string")return t;if(["boolean","number","bigint"].includes(typeof t))return fe.warn(ce(`Expected string, got ${typeof t}: ${t}`)),String(t);throw new TypeError(`Expected string, got ${typeof t}: ${t}`)};var se=(t)=>{if(typeof t=="string")return ee(M(t));return ee(t)},nr=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,M=(t)=>{const e=t.match(nr);if(e===null||e[0].length!==t.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(t)};var gs=(t)=>{if(typeof t==="string")return it(M(t));return it(t)};var ys=(t)=>{if(typeof t==="string")return re(M(t));return re(t)},P=(t)=>{if(typeof t==="string")return ne(M(t));return ne(t)},ie=(t)=>{if(typeof t==="string")return oe(M(t));return oe(t)},ce=(t)=>{return String(new TypeError(t).stack||t).split("\n").slice(0,5).filter((e)=>!e.includes("stackTraceWarning")).join("\n")},fe={warn:console.warn};function Ts(t){const e=t.getUTCFullYear(),r=t.getUTCMonth(),n=t.getUTCDay(),o=t.getUTCDate(),s=t.getUTCHours(),c=t.getUTCMinutes(),i=t.getUTCSeconds(),a=o<10?`0${o}`:`${o}`,d=s<10?`0${s}`:`${s}`,w=c<10?`0${c}`:`${c}`,f=i<10?`0${i}`:`${i}`;return`${or[n]}, ${a} ${ut[r]} ${e} ${d}:${w}:${f} GMT`}var or=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ut=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],sr=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Ss=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const e=sr.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,s,c,i,a,d]=e,w=P(k(n)),f=T(o,"month",1,12),p=T(s,"day",1,31);return B(w,f,p,{hours:c,minutes:i,seconds:a,fractionalMilliseconds:d})},ir=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Cs=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const e=ir.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,s,c,i,a,d,w]=e,f=P(k(n)),p=T(o,"month",1,12),u=T(s,"day",1,31),y=B(f,p,u,{hours:c,minutes:i,seconds:a,fractionalMilliseconds:d});if(w.toUpperCase()!="Z")y.setTime(y.getTime()-yr(w));return y},cr=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$/),fr=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$/),ur=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})$/),Es=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let e=cr.exec(t);if(e){const[r,n,o,s,c,i,a,d]=e;return B(P(k(s)),ft(o),T(n,"day",1,31),{hours:c,minutes:i,seconds:a,fractionalMilliseconds:d})}if(e=fr.exec(t),e){const[r,n,o,s,c,i,a,d]=e;return pr(B(hr(s),ft(o),T(n,"day",1,31),{hours:c,minutes:i,seconds:a,fractionalMilliseconds:d}))}if(e=ur.exec(t),e){const[r,n,o,s,c,i,a,d]=e;return B(P(k(d)),ft(n),T(o.trimLeft(),"day",1,31),{hours:s,minutes:c,seconds:i,fractionalMilliseconds:a})}throw new TypeError("Invalid RFC-7231 date-time value")};var B=(t,e,r,n)=>{const o=e-1;return lr(t,o,r),new Date(Date.UTC(t,o,r,T(n.hours,"hour",0,23),T(n.minutes,"minute",0,59),T(n.seconds,"seconds",0,60),gr(n.fractionalMilliseconds)))},hr=(t)=>{const e=(new Date()).getUTCFullYear(),r=Math.floor(e/100)*100+P(k(t));if(r<e)return r+100;return r},ar=1576800000000,pr=(t)=>{if(t.getTime()-(new Date()).getTime()>ar)return new Date(Date.UTC(t.getUTCFullYear()-100,t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()));return t},ft=(t)=>{const e=ut.indexOf(t);if(e<0)throw new TypeError(`Invalid month: ${t}`);return e+1},dr=[31,28,31,30,31,30,31,31,30,31,30,31],lr=(t,e,r)=>{let n=dr[e];if(e===1&&mr(t))n=29;if(r>n)throw new TypeError(`Invalid day for ${ut[e]} in ${t}: ${r}`)},mr=(t)=>{return t%4===0&&(t%100!==0||t%400===0)},T=(t,e,r,n)=>{const o=ie(k(t));if(o<r||o>n)throw new TypeError(`${e} must be between ${r} and ${n}, inclusive`);return o},gr=(t)=>{if(t===null||t===void 0)return 0;return se("0."+t)*1000},yr=(t)=>{const e=t[0];let r=1;if(e=="+")r=1;else if(e=="-")r=-1;else throw new TypeError(`Offset direction, ${e}, must be "+" or "-"`);const n=Number(t.substring(1,3)),o=Number(t.substring(4,6));return r*(n*60+o)*60*1000},k=(t)=>{let e=0;while(e<t.length-1&&t.charAt(e)==="0")e++;if(e===0)return t;return t.slice(e)};var wr=({output:t,parsedBody:e,exceptionCtor:r,errorCode:n})=>{const o=xr(t),s=o.httpStatusCode?o.httpStatusCode+"":void 0,c=new r({name:e?.code||e?.Code||n||s||"UnknownError",$fault:"client",$metadata:o});throw Lt(c,e)},Is=(t)=>{return({output:e,parsedBody:r,errorCode:n})=>{wr({output:e,parsedBody:r,exceptionCtor:t,errorCode:n})}},xr=(t)=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]});var Fs=(t)=>{switch(t){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var ue=!1,ks=(t)=>{if(t&&!ue&&parseInt(t.substring(1,t.indexOf(".")))<16)ue=!0};var ht=A(K(),1);var he=(t)=>{const e=[];for(let r in ht.AlgorithmId){const n=ht.AlgorithmId[r];if(t[n]===void 0)continue;e.push({algorithmId:()=>n,checksumConstructor:()=>t[n]})}return{_checksumAlgorithms:e,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},ae=(t)=>{const e={};return t.checksumAlgorithms().forEach((r)=>{e[r.algorithmId()]=r.checksumConstructor()}),e};var pe=(t)=>{let e=t.retryStrategy;return{setRetryStrategy(r){e=r},retryStrategy(){return e}}},de=(t)=>{const e={};return e.retryStrategy=t.retryStrategy(),e};var Rs=(t)=>{return{...he(t),...pe(t)}};var Hs=(t)=>{return{...ae(t),...de(t)}};function br(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}var at=function(){const t=Object.getPrototypeOf(this).constructor,r=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(r,t.prototype),r};at.prototype=Object.create(String.prototype,{constructor:{value:at,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(at,String);function Tr(t,e,r){let n,o,s;if(typeof e==="undefined"&&typeof r==="undefined")n={},s=t;else if(n=t,typeof e==="function")return o=e,s=r,Sr(n,o,s);else s=e;for(let c of Object.keys(s)){if(!Array.isArray(s[c])){n[c]=s[c];continue}le(n,null,s,c)}return n}var Vs=(t,e)=>{const r={};for(let n in e)le(r,t,e,n);return r},Sr=(t,e,r)=>{return Tr(t,Object.entries(r).reduce((n,[o,s])=>{if(Array.isArray(s))n[o]=s;else if(typeof s==="function")n[o]=[e,s()];else n[o]=[e,s];return n},{}))},le=(t,e,r,n)=>{if(e!==null){let c=r[n];if(typeof c==="function")c=[,c];const[i=Cr,a=Er,d=n]=c;if(typeof i==="function"&&i(e[d])||typeof i!=="function"&&!!i)t[n]=a(e[d]);return}let[o,s]=r[n];if(typeof s==="function"){let c;const i=o===void 0&&(c=s())!=null,a=typeof o==="function"&&!!o(void 0)||typeof o!=="function"&&!!o;if(i)t[n]=c;else if(a)t[n]=s()}else{const c=o===void 0&&s!=null,i=typeof o==="function"&&!!o(s)||typeof o!=="function"&&!!o;if(c||i)t[n]=s}},Cr=(t)=>t!=null,Er=(t)=>t;var Ks=(t)=>t.toISOString().replace(".000Z","Z");var me=(t)=>{if(t==null)return{};if(Array.isArray(t))return t.filter((e)=>e!=null).map(me);if(typeof t==="object"){const e={};for(let r of Object.keys(t)){if(t[r]==null)continue;e[r]=me(t[r])}return e}return t};export{Fr as F,Pr as G,X as H,L as I,je as J,G as K,Se as L,Mt as M,U as N,O,Y as P,F as Q,Gn as R,J as S,W as T,yo as U,Et as V,et as W,Nt as X,zt as Y,Yo as Z,Qo as _,ts as $,hs as aa,xt as ba,Ln as ca,Bn as da,ps as ea,it as fa,re as ga,ds as ha,ls as ia,ms as ja,gs as ka,ys as la,Ts as ma,Ss as na,Cs as oa,Es as pa,Dt as qa,Lt as ra,Is as sa,Fs as ta,ks as ua,Rs as va,Hs as wa,br as xa,Tr as ya,Vs as za,Ks as Aa,me as Ba};
|