@stacksjs/buddy 0.70.19 → 0.70.21
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/{chunk-wchdk5rr.js → chunk-29rpwqgr.js} +1 -1
- package/dist/chunk-2ddgyqnt.js +2 -0
- package/dist/{chunk-g1f16je5.js → chunk-2pj0cr49.js} +1 -1
- package/dist/chunk-68apz1e2.js +2 -0
- package/dist/chunk-7v1e78ya.js +2 -0
- package/dist/chunk-88nz529r.js +2 -0
- package/dist/chunk-90stqnfr.js +6 -0
- package/dist/{chunk-v649k10a.js → chunk-9j2yq17h.js} +1 -1
- package/dist/{chunk-n549129b.js → chunk-am6xbcgg.js} +1 -1
- package/dist/chunk-cptthhq1.js +2 -0
- package/dist/chunk-czbsbg0s.js +2 -0
- package/dist/{chunk-y0kfnrfm.js → chunk-d9bheak7.js} +2 -2
- package/dist/chunk-dcgjjy48.js +3 -0
- package/dist/chunk-dmewpnnj.js +2 -0
- package/dist/chunk-fk8jrqrt.js +3 -0
- package/dist/{chunk-zs3ndhp8.js → chunk-hjdz5p2e.js} +2 -2
- package/dist/chunk-j2vy37bj.js +25 -0
- package/dist/{chunk-0evg5jp6.js → chunk-ks9kq37e.js} +1 -1
- package/dist/{chunk-jgcb2h70.js → chunk-nec9r4e3.js} +1 -1
- package/dist/chunk-p4y8yzm3.js +2 -0
- package/dist/{chunk-3jjq84ww.js → chunk-qgs8ygf0.js} +159 -159
- package/dist/{chunk-v07vvpcr.js → chunk-qwdsyzdj.js} +1 -1
- package/dist/chunk-ran3mnve.js +2 -0
- package/dist/chunk-tndmgyk5.js +3 -0
- package/dist/chunk-tr3hrxn5.js +2 -0
- package/dist/chunk-vm9jcwg8.js +5 -0
- package/dist/{chunk-6tfy93kv.js → chunk-whp9hjd8.js} +1 -1
- package/dist/{chunk-d2kb25t6.js → chunk-x0ahr107.js} +1 -1
- package/dist/{chunk-rcdezkfx.js → chunk-x46hz7dc.js} +1 -1
- package/dist/{chunk-aydc3pns.js → chunk-xn1pvpj0.js} +2 -2
- package/dist/{chunk-76q55r9x.js → chunk-z4zm45jz.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-0g26g7ka.js +0 -2
- package/dist/chunk-2qmcf9vp.js +0 -3
- package/dist/chunk-3gg1gwg5.js +0 -25
- package/dist/chunk-7cmkzkmc.js +0 -2
- package/dist/chunk-b1s03qnq.js +0 -2
- package/dist/chunk-ga357601.js +0 -2
- package/dist/chunk-kxq03s4j.js +0 -2
- package/dist/chunk-p8rsk0jk.js +0 -2
- package/dist/chunk-s60z5tm3.js +0 -2
- package/dist/chunk-t1e7ryas.js +0 -2
- package/dist/chunk-w2b5c4s1.js +0 -3
- package/dist/chunk-wy8d4q00.js +0 -6
- package/dist/chunk-x0j2dg1x.js +0 -3
- package/dist/chunk-xe04sf1b.js +0 -2
- package/dist/chunk-xv24dwhq.js +0 -1
- package/dist/chunk-y8ps0h71.js +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
var f="__smithy_context";var t;(function(r){r.HEADER="header",r.QUERY="query"})(t||(t={}));var e;(function(r){r.HEADER="header",r.QUERY="query"})(e||(e={}));var p;(function(r){r.HTTP="http",r.HTTPS="https"})(p||(p={}));var o;(function(r){r.MD5="md5",r.CRC32="crc32",r.CRC32C="crc32c",r.SHA1="sha1",r.SHA256="sha256"})(o||(o={}));var x;(function(r){r[r.HEADER=0]="HEADER",r[r.TRAILER=1]="TRAILER"})(x||(x={}));var m;(function(r){r.PROFILE="profile",r.SSO_SESSION="sso-session",r.SERVICES="services"})(m||(m={}));var c;(function(r){r.HTTP_0_9="http/0.9",r.HTTP_1_0="http/1.0",r.TDS_8_0="tds/8.0"})(c||(c={}));export{p as
|
|
1
|
+
var f="__smithy_context";var t;(function(r){r.HEADER="header",r.QUERY="query"})(t||(t={}));var e;(function(r){r.HEADER="header",r.QUERY="query"})(e||(e={}));var p;(function(r){r.HTTP="http",r.HTTPS="https"})(p||(p={}));var o;(function(r){r.MD5="md5",r.CRC32="crc32",r.CRC32C="crc32c",r.SHA1="sha1",r.SHA256="sha256"})(o||(o={}));var x;(function(r){r[r.HEADER=0]="HEADER",r[r.TRAILER=1]="TRAILER"})(x||(x={}));var m;(function(r){r.PROFILE="profile",r.SSO_SESSION="sso-session",r.SERVICES="services"})(m||(m={}));var c;(function(r){r.HTTP_0_9="http/0.9",r.HTTP_1_0="http/1.0",r.TDS_8_0="tds/8.0"})(c||(c={}));export{p as Ic,o as Jc,f as Kc,m as Lc};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ia as gr,Ja as jr,Ka as nr,La as ir,Ma as Ir,Na as ar,Oa as Se,Pa as fr,Qa as kr,Ra as Nr,Sa as we,Ta as wr,Ua as Ne,Va as Cr,Wa as Ar,Xa as Gr,Ya as Hr,Za as Lr,_a as mr}from"./chunk-dcgjjy48.js";import{hc as Oe,ic as hr,jc as B,kc as Tr,lc as E,mc as w}from"./chunk-j2vy37bj.js";import{pc as $r,sc as Pr,tc as Sr,wc as Mr}from"./chunk-xn1pvpj0.js";import"./chunk-hjdz5p2e.js";import"./chunk-cptthhq1.js";import{Tc as d}from"./chunk-2pj0cr49.js";var H=d((X)=>{Object.defineProperty(X,"__esModule",{value:!0});X.resolveHttpAuthSchemeConfig=X.defaultSSOOIDCHttpAuthSchemeProvider=X.defaultSSOOIDCHttpAuthSchemeParametersProvider=void 0;var xe=w(),K=Oe(),ce=async(e,r,l)=>{return{operation:K.getSmithyContext(r).operation,region:await K.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};X.defaultSSOOIDCHttpAuthSchemeParametersProvider=ce;function oe(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(r,l)=>({signingProperties:{config:r,context:l}})}}function ue(e){return{schemeId:"smithy.api#noAuth"}}var pe=(e)=>{let r=[];switch(e.operation){case"CreateToken":{r.push(ue(e));break}default:r.push(oe(e))}return r};X.defaultSSOOIDCHttpAuthSchemeProvider=pe;var te=(e)=>{let r=xe.resolveAwsSdkSigV4Config(e);return Object.assign(r,{})};X.resolveHttpAuthSchemeConfig=te});var p=d((o)=>{Object.defineProperty(o,"__esModule",{value:!0});o.ruleSet=void 0;var m="required",S="fn",N="argv",U="ref",J=!0,Q="isSet",k="booleanEquals",F="error",_="endpoint",s="tree",L="PartitionResult",V="getAttr",Z={[m]:!1,type:"String"},$={[m]:!0,default:!1,type:"Boolean"},h={[U]:"Endpoint"},O={[S]:k,[N]:[{[U]:"UseFIPS"},!0]},x={[S]:k,[N]:[{[U]:"UseDualStack"},!0]},P={},g={[S]:V,[N]:[{[U]:L},"supportsFIPS"]},c={[U]:L},j={[S]:k,[N]:[!0,{[S]:V,[N]:[c,"supportsDualStack"]}]},n=[O],a=[x],f=[{[U]:"Region"}],lr={version:"1.0",parameters:{Region:Z,UseDualStack:$,UseFIPS:$,Endpoint:Z},rules:[{conditions:[{[S]:Q,[N]:[h]}],rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:F},{conditions:a,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:F},{endpoint:{url:h,properties:P,headers:P},type:_}],type:s},{conditions:[{[S]:Q,[N]:f}],rules:[{conditions:[{[S]:"aws.partition",[N]:f,assign:L}],rules:[{conditions:[O,x],rules:[{conditions:[{[S]:k,[N]:[J,g]},j],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:P,headers:P},type:_}],type:s},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:F}],type:s},{conditions:n,rules:[{conditions:[{[S]:k,[N]:[g,J]}],rules:[{conditions:[{[S]:"stringEquals",[N]:[{[S]:V,[N]:[c,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:P,headers:P},type:_},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:P,headers:P},type:_}],type:s},{error:"FIPS is enabled but this partition does not support FIPS",type:F}],type:s},{conditions:a,rules:[{conditions:[j],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:P,headers:P},type:_}],type:s},{error:"DualStack is enabled but this partition does not support DualStack",type:F}],type:s},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:P,headers:P},type:_}],type:s}],type:s},{error:"Invalid Configuration: Missing Region",type:F}]};o.ruleSet=lr});var re=d((t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.defaultEndpointResolver=void 0;var vr=Ir(),b=ir(),Dr=p(),qr=new b.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),yr=(e,r={})=>{return qr.get(e,()=>b.resolveEndpoint(Dr.ruleSet,{endpointParams:e,logger:r.logger}))};t.defaultEndpointResolver=yr;b.customEndpointFunctions.aws=vr.awsEndpointFunctions});var De=d((Ie)=>{Object.defineProperty(Ie,"__esModule",{value:!0});Ie.getRuntimeConfig=void 0;var Rr=w(),Er=B(),sr=E(),dr=Nr(),le=Sr(),ie=Pr(),Fr=H(),_r=re(),Ur=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??le.fromBase64,base64Encoder:e?.base64Encoder??le.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??_r.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Fr.defaultSSOOIDCHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(r)=>r.getIdentityProvider("aws.auth#sigv4"),signer:new Rr.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(r)=>r.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Er.NoAuthSigner}],logger:e?.logger??new sr.NoOpLogger,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??dr.parseUrl,utf8Decoder:e?.utf8Decoder??ie.fromUtf8,utf8Encoder:e?.utf8Encoder??ie.toUtf8}};Ie.getRuntimeConfig=Ur});var se=d((Re)=>{Object.defineProperty(Re,"__esModule",{value:!0});Re.getRuntimeConfig=void 0;var Vr=Tr(),br=Vr.__importDefault(Cr()),Br=w(),qe=Ar(),C=Se(),Wr=Gr(),ye=Ne(),M=kr(),Pe=Mr(),Yr=Hr(),Kr=wr(),Xr=De(),zr=E(),Jr=Lr(),Qr=E(),Zr=(e)=>{Qr.emitWarningIfUnsupportedVersion(process.version);let r=Jr.resolveDefaultsModeConfig(e),l=()=>r().then(zr.loadConfigsForDefaultMode),v=Xr.getRuntimeConfig(e);Br.emitWarningIfUnsupportedVersion(process.version);let I={profile:e?.profile};return{...v,...e,runtime:"node",defaultsMode:r,bodyLengthChecker:e?.bodyLengthChecker??Yr.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??qe.createDefaultUserAgentProvider({serviceId:v.serviceId,clientVersion:br.default.version}),maxAttempts:e?.maxAttempts??M.loadConfig(ye.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??M.loadConfig(C.NODE_REGION_CONFIG_OPTIONS,{...C.NODE_REGION_CONFIG_FILE_OPTIONS,...I}),requestHandler:Pe.NodeHttpHandler.create(e?.requestHandler??l),retryMode:e?.retryMode??M.loadConfig({...ye.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await l()).retryMode||Kr.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Wr.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??Pe.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??M.loadConfig(C.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,I),useFipsEndpoint:e?.useFipsEndpoint??M.loadConfig(C.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,I),userAgentAppId:e?.userAgentAppId??M.loadConfig(qe.NODE_APP_ID_CONFIG_OPTIONS,I)}};Re.getRuntimeConfig=Zr});var Wl=d((Ql,je)=>{var{defineProperty:A,getOwnPropertyDescriptor:Or,getOwnPropertyNames:xr}=Object,cr=Object.prototype.hasOwnProperty,D=(e,r)=>A(e,"name",{value:r,configurable:!0}),or=(e,r)=>{for(var l in r)A(e,l,{get:r[l],enumerable:!0})},ur=(e,r,l,v)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let I of xr(r))if(!cr.call(e,I)&&I!==l)A(e,I,{get:()=>r[I],enumerable:!(v=Or(r,I))||v.enumerable})}return e},pr=(e)=>ur(A({},"__esModule",{value:!0}),e),Ce={};or(Ce,{$Command:()=>He.Command,AccessDeniedException:()=>Le,AuthorizationPendingException:()=>Ve,CreateTokenCommand:()=>he,CreateTokenRequestFilterSensitiveLog:()=>be,CreateTokenResponseFilterSensitiveLog:()=>Be,ExpiredTokenException:()=>We,InternalServerException:()=>Ye,InvalidClientException:()=>Ke,InvalidGrantException:()=>Xe,InvalidRequestException:()=>ze,InvalidScopeException:()=>Je,SSOOIDC:()=>ge,SSOOIDCClient:()=>Ge,SSOOIDCServiceException:()=>y,SlowDownException:()=>Qe,UnauthorizedClientException:()=>Ze,UnsupportedGrantTypeException:()=>$e,__Client:()=>Ae.Client});je.exports=pr(Ce);var de=gr(),tr=jr(),el=nr(),Fe=ar(),rl=Se(),W=B(),ll=fr(),il=we(),_e=Ne(),Ae=E(),Ue=H(),Il=D((e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},"resolveClientEndpointParameters"),vl={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Dl=se(),Me=mr(),Te=$r(),ke=E(),ql=D((e)=>{let{httpAuthSchemes:r,httpAuthSchemeProvider:l,credentials:v}=e;return{setHttpAuthScheme(I){let q=r.findIndex((G)=>G.schemeId===I.schemeId);if(q===-1)r.push(I);else r.splice(q,1,I)},httpAuthSchemes(){return r},setHttpAuthSchemeProvider(I){l=I},httpAuthSchemeProvider(){return l},setCredentials(I){v=I},credentials(){return v}}},"getHttpAuthExtensionConfiguration"),yl=D((e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},"resolveHttpAuthRuntimeConfig"),Pl=D((e,r)=>{let l=Object.assign(Me.getAwsRegionExtensionConfiguration(e),ke.getDefaultExtensionConfiguration(e),Te.getHttpHandlerExtensionConfiguration(e),ql(e));return r.forEach((v)=>v.configure(l)),Object.assign(e,Me.resolveAwsRegionExtensionConfiguration(l),ke.resolveDefaultRuntimeConfig(l),Te.resolveHttpHandlerRuntimeConfig(l),yl(l))},"resolveRuntimeExtensions"),Ge=class extends Ae.Client{static{D(this,"SSOOIDCClient")}config;constructor(...[e]){let r=Dl.getRuntimeConfig(e||{});super(r);this.initConfig=r;let l=Il(r),v=Fe.resolveUserAgentConfig(l),I=_e.resolveRetryConfig(v),q=rl.resolveRegionConfig(I),G=de.resolveHostHeaderConfig(q),ne=il.resolveEndpointConfig(G),ae=Ue.resolveHttpAuthSchemeConfig(ne),fe=Pl(ae,e?.extensions||[]);this.config=fe,this.middlewareStack.use(Fe.getUserAgentPlugin(this.config)),this.middlewareStack.use(_e.getRetryPlugin(this.config)),this.middlewareStack.use(ll.getContentLengthPlugin(this.config)),this.middlewareStack.use(de.getHostHeaderPlugin(this.config)),this.middlewareStack.use(tr.getLoggerPlugin(this.config)),this.middlewareStack.use(el.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(W.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Ue.defaultSSOOIDCHttpAuthSchemeParametersProvider,identityProviderConfigProvider:D(async(me)=>new W.DefaultIdentityProviderConfig({"aws.auth#sigv4":me.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(W.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},Sl=E(),Nl=we(),Rl=hr(),He=E(),T=E(),El=E(),y=class e extends El.ServiceException{static{D(this,"SSOOIDCServiceException")}constructor(r){super(r);Object.setPrototypeOf(this,e.prototype)}},Le=class e extends y{static{D(this,"AccessDeniedException")}name="AccessDeniedException";$fault="client";error;error_description;constructor(r){super({name:"AccessDeniedException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Ve=class e extends y{static{D(this,"AuthorizationPendingException")}name="AuthorizationPendingException";$fault="client";error;error_description;constructor(r){super({name:"AuthorizationPendingException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},be=D((e)=>({...e,...e.clientSecret&&{clientSecret:T.SENSITIVE_STRING},...e.refreshToken&&{refreshToken:T.SENSITIVE_STRING},...e.codeVerifier&&{codeVerifier:T.SENSITIVE_STRING}}),"CreateTokenRequestFilterSensitiveLog"),Be=D((e)=>({...e,...e.accessToken&&{accessToken:T.SENSITIVE_STRING},...e.refreshToken&&{refreshToken:T.SENSITIVE_STRING},...e.idToken&&{idToken:T.SENSITIVE_STRING}}),"CreateTokenResponseFilterSensitiveLog"),We=class e extends y{static{D(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";error;error_description;constructor(r){super({name:"ExpiredTokenException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Ye=class e extends y{static{D(this,"InternalServerException")}name="InternalServerException";$fault="server";error;error_description;constructor(r){super({name:"InternalServerException",$fault:"server",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Ke=class e extends y{static{D(this,"InvalidClientException")}name="InvalidClientException";$fault="client";error;error_description;constructor(r){super({name:"InvalidClientException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Xe=class e extends y{static{D(this,"InvalidGrantException")}name="InvalidGrantException";$fault="client";error;error_description;constructor(r){super({name:"InvalidGrantException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},ze=class e extends y{static{D(this,"InvalidRequestException")}name="InvalidRequestException";$fault="client";error;error_description;constructor(r){super({name:"InvalidRequestException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Je=class e extends y{static{D(this,"InvalidScopeException")}name="InvalidScopeException";$fault="client";error;error_description;constructor(r){super({name:"InvalidScopeException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Qe=class e extends y{static{D(this,"SlowDownException")}name="SlowDownException";$fault="client";error;error_description;constructor(r){super({name:"SlowDownException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Ze=class e extends y{static{D(this,"UnauthorizedClientException")}name="UnauthorizedClientException";$fault="client";error;error_description;constructor(r){super({name:"UnauthorizedClientException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},$e=class e extends y{static{D(this,"UnsupportedGrantTypeException")}name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(r){super({name:"UnsupportedGrantTypeException",$fault:"client",...r});Object.setPrototypeOf(this,e.prototype),this.error=r.error,this.error_description=r.error_description}},Y=w(),sl=B(),i=E(),dl=D(async(e,r)=>{let l=sl.requestBuilder(e,r),v={"content-type":"application/json"};l.bp("/token");let I;return I=JSON.stringify(i.take(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:D((q)=>i._json(q),"scope")})),l.m("POST").h(v).b(I),l.build()},"se_CreateTokenCommand"),Fl=D(async(e,r)=>{if(e.statusCode!==200&&e.statusCode>=300)return _l(e,r);let l=i.map({$metadata:R(e)}),v=i.expectNonNull(i.expectObject(await Y.parseJsonBody(e.body,r)),"body"),I=i.take(v,{accessToken:i.expectString,expiresIn:i.expectInt32,idToken:i.expectString,refreshToken:i.expectString,tokenType:i.expectString});return Object.assign(l,I),l},"de_CreateTokenCommand"),_l=D(async(e,r)=>{let l={...e,body:await Y.parseJsonErrorBody(e.body,r)},v=Y.loadRestJsonErrorCode(e,l.body);switch(v){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Ml(l,r);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Tl(l,r);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await kl(l,r);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await wl(l,r);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await Cl(l,r);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Al(l,r);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await Gl(l,r);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await Hl(l,r);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await Ll(l,r);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await Vl(l,r);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await bl(l,r);default:let I=l.body;return Ul({output:e,parsedBody:I,errorCode:v})}},"de_CommandError"),Ul=i.withBaseException(y),Ml=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Le({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_AccessDeniedExceptionRes"),Tl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Ve({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_AuthorizationPendingExceptionRes"),kl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new We({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_ExpiredTokenExceptionRes"),wl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Ye({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_InternalServerExceptionRes"),Cl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Ke({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_InvalidClientExceptionRes"),Al=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Xe({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_InvalidGrantExceptionRes"),Gl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new ze({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_InvalidRequestExceptionRes"),Hl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Je({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_InvalidScopeExceptionRes"),Ll=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Qe({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_SlowDownExceptionRes"),Vl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new Ze({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_UnauthorizedClientExceptionRes"),bl=D(async(e,r)=>{let l=i.map({}),v=e.body,I=i.take(v,{error:i.expectString,error_description:i.expectString});Object.assign(l,I);let q=new $e({$metadata:R(e),...l});return i.decorateServiceException(q,e.body)},"de_UnsupportedGrantTypeExceptionRes"),R=D((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"]}),"deserializeMetadata"),he=class extends He.Command.classBuilder().ep(vl).m(function(e,r,l,v){return[Rl.getSerdePlugin(l,this.serialize,this.deserialize),Nl.getEndpointPlugin(l,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(be,Be).ser(dl).de(Fl).build(){static{D(this,"CreateTokenCommand")}},Bl={CreateTokenCommand:he},ge=class extends Ge{static{D(this,"SSOOIDC")}};Sl.createAggregatedClient(Bl,ge)});export default Wl();
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Bc as I,Cc as z,Dc as R,Gc as v,Hc as A}from"./chunk-29rpwqgr.js";import"./chunk-qwdsyzdj.js";import{Pc as oe}from"./chunk-hjdz5p2e.js";import{Qc as u}from"./chunk-cptthhq1.js";import{Rc as S,Wc as D}from"./chunk-2pj0cr49.js";var T=S(u(),1);var H=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var F=S(oe(),1);var x=S(u(),1);var U=300000,h="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var q=async(e,s={})=>{let{SSOOIDCClient:o}=await import("./chunk-ran3mnve.js");return new o(Object.assign({},s.clientConfig??{},{region:e??s.clientConfig?.region,logger:s.clientConfig?.logger??s.parentClientConfig?.logger}))};var W=async(e,s,o={})=>{let{CreateTokenCommand:i}=await import("./chunk-ran3mnve.js");return(await q(s,o)).send(new i({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var j=S(u(),1);var $=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new j.TokenProviderError(`Token is expired. ${h}`,!1)};var X=S(u(),1);var g=(e,s,o=!1)=>{if(typeof s==="undefined")throw new X.TokenProviderError(`Value not present for '${e}' in SSO Token${o?". Cannot refresh":""}. ${h}`,!1)};import{promises as Z}from"node:fs";var{writeFile:ee}=Z,J=(e,s)=>{let o=z(e),i=JSON.stringify(s,null,2);return ee(o,i)};var V=new Date(0),Y=(e={})=>async({callerClientConfig:s}={})=>{let o={...e,parentClientConfig:{...s,...e.parentClientConfig}};o.logger?.debug("@aws-sdk/token-providers - fromSso");let i=await A(o),r=I({profile:o.profile??s?.profile}),f=i[r];if(!f)throw new x.TokenProviderError(`Profile '${r}' could not be found in shared credentials file.`,!1);else if(!f.sso_session)throw new x.TokenProviderError(`Profile '${r}' is missing required property 'sso_session'.`);let l=f.sso_session,a=(await v(o))[l];if(!a)throw new x.TokenProviderError(`Sso session '${l}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!a[n])throw new x.TokenProviderError(`Sso session '${l}' is missing required property '${n}'.`,!1);let{sso_start_url:w,sso_region:t}=a,c;try{c=await R(l)}catch(n){throw new x.TokenProviderError(`The SSO session token associated with profile=${r} was not found or is invalid. ${h}`,!1)}g("accessToken",c.accessToken),g("expiresAt",c.expiresAt);let{accessToken:E,expiresAt:O}=c,p={token:E,expiration:new Date(O)};if(p.expiration.getTime()-Date.now()>U)return p;if(Date.now()-V.getTime()<30000)return $(p),p;g("clientId",c.clientId,!0),g("clientSecret",c.clientSecret,!0),g("refreshToken",c.refreshToken,!0);try{V.setTime(Date.now());let n=await W(c,t,o);g("accessToken",n.accessToken),g("expiresIn",n.expiresIn);let _=new Date(Date.now()+n.expiresIn*1000);try{await J(l,{...c,accessToken:n.accessToken,expiresAt:_.toISOString(),refreshToken:n.refreshToken})}catch(m){}return{token:n.accessToken,expiration:_}}catch(n){return $(p),p}};var k=S(u(),1);var N=!1,L=async({ssoStartUrl:e,ssoSession:s,ssoAccountId:o,ssoRegion:i,ssoRoleName:r,ssoClient:f,clientConfig:l,parentClientConfig:y,profile:a,logger:w})=>{let t,c="To refresh this SSO session run aws sso login with the corresponding profile.";if(s)try{let d=await Y({profile:a})();t={accessToken:d.token,expiresAt:new Date(d.expiration).toISOString()}}catch(d){throw new k.CredentialsProviderError(d.message,{tryNextLink:N,logger:w})}else try{t=await R(e)}catch(d){throw new k.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:N,logger:w})}if(new Date(t.expiresAt).getTime()-Date.now()<=0)throw new k.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:N,logger:w});let{accessToken:E}=t,{SSOClient:O,GetRoleCredentialsCommand:p}=await import("./chunk-p4y8yzm3.js"),n=f||new O(Object.assign({},l??{},{logger:l?.logger??y?.logger,region:l?.region??i})),_;try{_=await n.send(new p({accountId:o,roleName:r,accessToken:E}))}catch(d){throw new k.CredentialsProviderError(d,{tryNextLink:N,logger:w})}let{roleCredentials:{accessKeyId:m,secretAccessKey:C,sessionToken:M,expiration:G,credentialScope:K,accountId:b}={}}=_;if(!m||!C||!M||!G)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:N,logger:w});let P={accessKeyId:m,secretAccessKey:C,sessionToken:M,expiration:new Date(G),...K&&{credentialScope:K},...b&&{accountId:b}};if(s)F.setCredentialFeature(P,"CREDENTIALS_SSO","s");else F.setCredentialFeature(P,"CREDENTIALS_SSO_LEGACY","u");return P};var B=S(u(),1),Q=(e,s)=>{let{sso_start_url:o,sso_account_id:i,sso_region:r,sso_role_name:f}=e;if(!o||!i||!r||!f)throw new B.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}
|
|
3
|
+
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:s});return e};var Re=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:o,ssoAccountId:i,ssoRegion:r,ssoRoleName:f,ssoSession:l}=e,{ssoClient:y}=e,a=I({profile:e.profile??s?.profile});if(!o&&!i&&!r&&!f&&!l){let t=(await A(e))[a];if(!t)throw new T.CredentialsProviderError(`Profile ${a} was not found.`,{logger:e.logger});if(!H(t))throw new T.CredentialsProviderError(`Profile ${a} is not configured with SSO credentials.`,{logger:e.logger});if(t?.sso_session){let m=(await v(e))[t.sso_session],C=` configurations in profile ${a} and sso-session ${t.sso_session}`;if(r&&r!==m.sso_region)throw new T.CredentialsProviderError("Conflicting SSO region"+C,{tryNextLink:!1,logger:e.logger});if(o&&o!==m.sso_start_url)throw new T.CredentialsProviderError("Conflicting SSO start_url"+C,{tryNextLink:!1,logger:e.logger});t.sso_region=m.sso_region,t.sso_start_url=m.sso_start_url}let{sso_start_url:c,sso_account_id:E,sso_region:O,sso_role_name:p,sso_session:n}=Q(t,e.logger);return L({ssoStartUrl:c,ssoSession:n,ssoAccountId:E,ssoRegion:O,ssoRoleName:p,ssoClient:y,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,profile:a})}else if(!o||!i||!r||!f)throw new T.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return L({ssoStartUrl:o,ssoSession:l,ssoAccountId:i,ssoRegion:r,ssoRoleName:f,ssoClient:y,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,profile:a})};export{Q as validateSsoProfile,H as isSsoProfile,Re as fromSSO};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Gb as $,Hb as Ee}from"./chunk-2ddgyqnt.js";import{bc as wt}from"./chunk-vm9jcwg8.js";import{jc as De,mc as sr,nc as Nr}from"./chunk-j2vy37bj.js";import{pc as O,rc as Vr,sc as Wr}from"./chunk-xn1pvpj0.js";import{Ec as me}from"./chunk-29rpwqgr.js";import{Ic as W,Kc as de}from"./chunk-qwdsyzdj.js";import{Qc as Zr}from"./chunk-cptthhq1.js";import{Rc as d,Wc as qr}from"./chunk-2pj0cr49.js";var we=d(O(),1);function eo(e){return e}var Wt=(e)=>(t)=>async(r)=>{if(!we.HttpRequest.isInstance(r.request))return t(r);let{request:o}=r,{handlerProtocol:n=""}=e.requestHandler.metadata||{};if(n.indexOf("h2")>=0&&!o.headers[":authority"])delete o.headers.host,o.headers[":authority"]=o.hostname+(o.port?":"+o.port:"");else if(!o.headers.host){let s=o.hostname;if(o.port!=null)s+=`:${o.port}`;o.headers.host=s}return t(r)},Bt={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},to=(e)=>({applyToStack:(t)=>{t.add(Wt(e),Bt)}});var Yt=()=>(e,t)=>async(r)=>{try{let o=await e(r),{clientName:n,commandName:s,logger:i,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:p}=a,u=c??t.inputFilterSensitiveLog,x=p??t.outputFilterSensitiveLog,{$metadata:m,...l}=o.output;return i?.info?.({clientName:n,commandName:s,input:u(r.input),output:x(l),metadata:m}),o}catch(o){let{clientName:n,commandName:s,logger:i,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c}=a,p=c??t.inputFilterSensitiveLog;throw i?.error?.({clientName:n,commandName:s,input:p(r.input),error:o,metadata:o.$metadata}),o}},zt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},oo=(e)=>({applyToStack:(t)=>{t.add(Yt(),zt)}});var ye=d(O(),1),oe="X-Amzn-Trace-Id",jt="AWS_LAMBDA_FUNCTION_NAME",Xt="_X_AMZN_TRACE_ID",Ht=(e)=>(t)=>async(r)=>{let{request:o}=r;if(!ye.HttpRequest.isInstance(o)||e.runtime!=="node")return t(r);let n=Object.keys(o.headers??{}).find((c)=>c.toLowerCase()===oe.toLowerCase())??oe;if(o.headers.hasOwnProperty(n))return t(r);let s=process.env[jt],i=process.env[Xt],a=(c)=>typeof c==="string"&&c.length>0;if(a(s)&&a(i))o.headers[oe]=i;return t({...r,request:o})},qt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},ao=(e)=>({applyToStack:(t)=>{t.add(Ht(e),qt)}});var Ce=d(De(),1),ne=void 0;function Zt(e){if(e===void 0)return!0;return typeof e==="string"&&e.length<=50}function po(e){let t=Ce.normalizeProvider(e.userAgentAppId??ne),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r==="string"?[[r]]:r,userAgentAppId:async()=>{let o=await t();if(!Zt(o)){let n=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;if(typeof o!=="string")n?.warn("userAgentAppId must be a string or undefined.");else if(o.length>50)n?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return o}})}class Jt{constructor({size:e,params:t}){if(this.data=new Map,this.parameters=[],this.capacity=e??50,t)this.parameters=t}get(e,t){let r=this.hash(e);if(r===!1)return t();if(!this.data.has(r)){if(this.data.size>this.capacity+10){let o=this.data.keys(),n=0;while(!0){let{value:s,done:i}=o.next();if(this.data.delete(s),i||++n>10)break}}this.data.set(r,t())}return this.data.get(r)}size(){return this.data.size}hash(e){let t="",{parameters:r}=this;if(r.length===0)return!1;for(let o of r){let n=String(e[o]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}var Kt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),U=(e)=>Kt.test(e)||e.startsWith("[")&&e.endsWith("]");var Qt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),v=(e,t=!1)=>{if(!t)return Qt.test(e);let r=e.split(".");for(let o of r)if(!v(o))return!1;return!0};var M={};var h="endpoints";function E(e){if(typeof e!=="object"||e==null)return e;if("ref"in e)return`$${E(e.ref)}`;if("fn"in e)return`${e.fn}(${(e.argv||[]).map(E).join(", ")})`;return JSON.stringify(e,null,2)}class f extends Error{constructor(e){super(e);this.name="EndpointError"}}var Pe=(e,t)=>e===t;var be=(e)=>{let t=e.split("."),r=[];for(let o of t){let n=o.indexOf("[");if(n!==-1){if(o.indexOf("]")!==o.length-1)throw new f(`Path: '${e}' does not end with ']'`);let s=o.slice(n+1,-1);if(Number.isNaN(parseInt(s)))throw new f(`Invalid array index: '${s}' in path: '${e}'`);if(n!==0)r.push(o.slice(0,n));r.push(s)}else r.push(o)}return r};var V=(e,t)=>be(t).reduce((r,o)=>{if(typeof r!=="object")throw new f(`Index '${o}' in '${t}' not found in '${JSON.stringify(e)}'`);else if(Array.isArray(r))return r[parseInt(o)];return r[o]},e);var Ue=(e)=>e!=null;var ve=(e)=>!e;var se={[W.HTTP]:80,[W.HTTPS]:443},Me=(e)=>{let t=(()=>{try{if(e instanceof URL)return e;if(typeof e==="object"&&"hostname"in e){let{hostname:m,port:l,protocol:w="",path:G="",query:kt={}}=e,Ne=new URL(`${w}//${m}${l?`:${l}`:""}${G}`);return Ne.search=Object.entries(kt).map(([Gt,Vt])=>`${Gt}=${Vt}`).join("&"),Ne}return new URL(e)}catch(m){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;let r=t.href,{host:o,hostname:n,pathname:s,protocol:i,search:a}=t;if(a)return null;let c=i.slice(0,-1);if(!Object.values(W).includes(c))return null;let p=U(n),u=r.includes(`${o}:${se[c]}`)||typeof e==="string"&&e.includes(`${o}:${se[c]}`),x=`${o}${u?`:${se[c]}`:""}`;return{scheme:c,authority:x,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:p}};var $e=(e,t)=>e===t;var Le=(e,t,r,o)=>{if(t>=r||e.length<r)return null;if(!o)return e.substring(t,r);return e.substring(e.length-r,e.length-t)};var Fe=(e)=>encodeURIComponent(e).replace(/[!*'()]/g,(t)=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`);var ke={booleanEquals:Pe,getAttr:V,isSet:Ue,isValidHostLabel:v,not:ve,parseURL:Me,stringEquals:$e,substring:Le,uriEncode:Fe};var B=(e,t)=>{let r=[],o={...t.endpointParams,...t.referenceRecord},n=0;while(n<e.length){let s=e.indexOf("{",n);if(s===-1){r.push(e.slice(n));break}r.push(e.slice(n,s));let i=e.indexOf("}",s);if(i===-1){r.push(e.slice(s));break}if(e[s+1]==="{"&&e[i+1]==="}")r.push(e.slice(s+1,i)),n=i+2;let a=e.substring(s+1,i);if(a.includes("#")){let[c,p]=a.split("#");r.push(V(o[c],p))}else r.push(o[a]);n=i+1}return r.join("")};var Ge=({ref:e},t)=>{return{...t.endpointParams,...t.referenceRecord}[e]};var A=(e,t,r)=>{if(typeof e==="string")return B(e,r);else if(e.fn)return Y(e,r);else if(e.ref)return Ge(e,r);throw new f(`'${t}': ${String(e)} is not a string, function or reference.`)};var Y=({fn:e,argv:t},r)=>{let o=t.map((s)=>["boolean","number"].includes(typeof s)?s:A(s,"arg",r)),n=e.split(".");if(n[0]in M&&n[1]!=null)return M[n[0]][n[1]](...o);return ke[e](...o)};var Ve=({assign:e,...t},r)=>{if(e&&e in r.referenceRecord)throw new f(`'${e}' is already defined in Reference Record.`);let o=Y(t,r);return r.logger?.debug?.(`${h} evaluateCondition: ${E(t)} = ${E(o)}`),{result:o===""?!0:!!o,...e!=null&&{toAssign:{name:e,value:o}}}};var y=(e=[],t)=>{let r={};for(let o of e){let{result:n,toAssign:s}=Ve(o,{...t,referenceRecord:{...t.referenceRecord,...r}});if(!n)return{result:n};if(s)r[s.name]=s.value,t.logger?.debug?.(`${h} assign: ${s.name} := ${E(s.value)}`)}return{result:!0,referenceRecord:r}};var We=(e,t)=>Object.entries(e).reduce((r,[o,n])=>({...r,[o]:n.map((s)=>{let i=A(s,"Header value entry",t);if(typeof i!=="string")throw new f(`Header '${o}' value '${i}' is not a string`);return i})}),{});var ie=(e,t)=>{if(Array.isArray(e))return e.map((r)=>ie(r,t));switch(typeof e){case"string":return B(e,t);case"object":if(e===null)throw new f(`Unexpected endpoint property: ${e}`);return z(e,t);case"boolean":return e;default:throw new f(`Unexpected endpoint property type: ${typeof e}`)}};var z=(e,t)=>Object.entries(e).reduce((r,[o,n])=>({...r,[o]:ie(n,t)}),{});var Be=(e,t)=>{let r=A(e,"Endpoint URL",t);if(typeof r==="string")try{return new URL(r)}catch(o){throw console.error(`Failed to construct URL with ${r}`,o),o}throw new f(`Endpoint URL must be a string, got ${typeof r}`)};var Ye=(e,t)=>{let{conditions:r,endpoint:o}=e,{result:n,referenceRecord:s}=y(r,t);if(!n)return;let i={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:p}=o;return t.logger?.debug?.(`${h} Resolving endpoint from template: ${E(o)}`),{...p!=null&&{headers:We(p,i)},...c!=null&&{properties:z(c,i)},url:Be(a,i)}};var ze=(e,t)=>{let{conditions:r,error:o}=e,{result:n,referenceRecord:s}=y(r,t);if(!n)return;throw new f(A(o,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))};var je=(e,t)=>{let{conditions:r,rules:o}=e,{result:n,referenceRecord:s}=y(r,t);if(!n)return;return j(o,{...t,referenceRecord:{...t.referenceRecord,...s}})};var j=(e,t)=>{for(let r of e)if(r.type==="endpoint"){let o=Ye(r,t);if(o)return o}else if(r.type==="error")ze(r,t);else if(r.type==="tree"){let o=je(r,t);if(o)return o}else throw new f(`Unknown endpoint rule: ${r}`);throw new f("Rules evaluation failed")};var er=(e,t)=>{let{endpointParams:r,logger:o}=t,{parameters:n,rules:s}=e;t.logger?.debug?.(`${h} Initial EndpointParams: ${E(r)}`);let i=Object.entries(n).filter(([,p])=>p.default!=null).map(([p,u])=>[p,u.default]);if(i.length>0)for(let[p,u]of i)r[p]=r[p]??u;let a=Object.entries(n).filter(([,p])=>p.required).map(([p])=>p);for(let p of a)if(r[p]==null)throw new f(`Missing required parameter: '${p}'`);let c=j(s,{endpointParams:r,logger:o,referenceRecord:{}});return t.logger?.debug?.(`${h} Resolved endpoint: ${E(c)}`),c};var ae=(e,t=!1)=>{if(t){for(let r of e.split("."))if(!ae(r))return!1;return!0}if(!v(e))return!1;if(e.length<3||e.length>63)return!1;if(e!==e.toLowerCase())return!1;if(U(e))return!1;return!0};var Xe=(e)=>{let t=e.split(":");if(t.length<6)return null;let[r,o,n,s,i,...a]=t;if(r!=="arn"||o===""||n===""||a.join(":")==="")return null;let c=a.map((p)=>p.split("/")).flat();return{partition:o,service:n,region:s,accountId:i,resourceId:c}};var He={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"};var rr=He,or="",qe=(e)=>{let{partitions:t}=rr;for(let o of t){let{regions:n,outputs:s}=o;for(let[i,a]of Object.entries(n))if(i===e)return{...s,...a}}for(let o of t){let{regionRegex:n,outputs:s}=o;if(new RegExp(n).test(e))return{...s}}let r=t.find((o)=>o.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}};var Ze=()=>or;var nr={isVirtualHostableS3Bucket:ae,parseArn:Xe,partition:qe};M.aws=nr;var tt=d(O(),1);var R=d(sr(),1),ir=/\d{12}\.ddb/;async function Je(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")R.setFeature(e,"PROTOCOL_RPC_V2_CBOR","M");if(typeof t.retryStrategy==="function"){let s=await t.retryStrategy();if(typeof s.acquireInitialRetryToken==="function")if(s.constructor?.name?.includes("Adaptive"))R.setFeature(e,"RETRY_MODE_ADAPTIVE","F");else R.setFeature(e,"RETRY_MODE_STANDARD","E");else R.setFeature(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode==="function"){let s=e.endpointV2;if(String(s?.url?.hostname).match(ir))R.setFeature(e,"ACCOUNT_ID_ENDPOINT","O");switch(await t.accountIdEndpointMode?.()){case"disabled":R.setFeature(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":R.setFeature(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":R.setFeature(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let n=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){let s=n;if(s.accountId)R.setFeature(e,"RESOLVED_ACCOUNT_ID","T");for(let[i,a]of Object.entries(s.$source??{}))R.setFeature(e,i,a)}}var ce="user-agent",X="x-amz-user-agent",pe=" ",H="/",Ke=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Qe=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,fe="-";function et(e){let t="";for(let r in e){let o=e[r];if(t.length+o.length+1<=1024){if(t.length)t+=","+o;else t+=o;continue}break}return t}var ar=(e)=>(t,r)=>async(o)=>{let{request:n}=o;if(!tt.HttpRequest.isInstance(n))return t(o);let{headers:s}=n,i=r?.userAgent?.map(q)||[],a=(await e.defaultUserAgentProvider()).map(q);await Je(r,e,o);let c=r;a.push(`m/${et(Object.assign({},r.__smithy_context?.features,c.__aws_sdk_context?.features))}`);let p=e?.customUserAgent?.map(q)||[],u=await e.userAgentAppId();if(u)a.push(q([`app/${u}`]));let x=Ze(),m=(x?[x]:[]).concat([...a,...i,...p]).join(pe),l=[...a.filter((w)=>w.startsWith("aws-sdk-")),...p].join(pe);if(e.runtime!=="browser"){if(l)s[X]=s[X]?`${s[ce]} ${l}`:l;s[ce]=m}else s[X]=m;return t({...o,request:n})},q=(e)=>{let t=e[0].split(H).map((i)=>i.replace(Ke,fe)).join(H),r=e[1]?.replace(Qe,fe),o=t.indexOf(H),n=t.substring(0,o),s=t.substring(o+1);if(n==="api")s=s.toLowerCase();return[n,s,r].filter((i)=>i&&i.length>0).reduce((i,a,c)=>{switch(c){case 0:return a;case 1:return`${i}/${a}`;default:return`${i}#${a}`}},"")},cr={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Zs=(e)=>({applyToStack:(t)=>{t.add(ar(e),cr)}});var Z=(e)=>typeof e==="string"&&(e.startsWith("fips-")||e.endsWith("-fips"));var ue=(e)=>Z(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;var ii=(e)=>{let{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if(typeof t==="string")return ue(t);let o=await t();return ue(o)},useFipsEndpoint:async()=>{let o=typeof t==="string"?t:await t();if(Z(o))return!0;return typeof r!=="function"?Promise.resolve(!!r):r()}})};var D=(e,t,r)=>{if(!(t in e))return;if(e[t]==="true")return!0;if(e[t]==="false")return!1;throw new Error(`Cannot load ${r} "${t}". Expected "true" or "false", got ${e[t]}.`)};var T;(function(e){e.ENV="env",e.CONFIG="shared config entry"})(T||(T={}));var pr="AWS_USE_DUALSTACK_ENDPOINT",fr="use_dualstack_endpoint";var gi={environmentVariableSelector:(e)=>D(e,pr,T.ENV),configFileSelector:(e)=>D(e,fr,T.CONFIG),default:!1};var ur="AWS_USE_FIPS_ENDPOINT",dr="use_fips_endpoint";var _i={environmentVariableSelector:(e)=>D(e,ur,T.ENV),configFileSelector:(e)=>D(e,dr,T.CONFIG),default:!1};var rt=(e)=>e[de]||(e[de]={});var S=(e)=>{if(typeof e==="function")return e;let t=Promise.resolve(e);return()=>t};var ot={environmentVariableSelector:(e)=>e.AWS_REGION,configFileSelector:(e)=>e.region,default:()=>{throw new Error("Region is missing")}},ki={preferredFile:"credentials"};var st=d(O(),1),nt="content-length";function lr(e){return(t)=>async(r)=>{let o=r.request;if(st.HttpRequest.isInstance(o)){let{body:n,headers:s}=o;if(n&&Object.keys(s).map((i)=>i.toLowerCase()).indexOf(nt)===-1)try{let i=e(n);o.headers={...o.headers,[nt]:String(i)}}catch(i){}}return t({...r,request:o})}}var mr={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},ua=(e)=>({applyToStack:(t)=>{t.add(lr(e.bodyLengthChecker),mr)}});var it=(e,t)=>(r,o)=>async(n)=>{let{response:s}=await r(n);try{let i=await t(s,e);return{response:s,output:i}}catch(i){if(Object.defineProperty(i,"$response",{value:s}),!("$metadata"in i)){try{i.message+=`
|
|
2
|
+
Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(c){if(!o.logger||o.logger?.constructor?.name==="NoOpLogger")console.warn("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.");else o.logger?.warn?.("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.")}if(typeof i.$responseBodyText!=="undefined"){if(i.$response)i.$response.body=i.$responseBodyText}}throw i}};var at=(e,t)=>(r,o)=>async(n)=>{let s=o.endpointV2?.url&&e.urlParser?async()=>e.urlParser(o.endpointV2.url):e.endpoint;if(!s)throw new Error("No valid endpoint provider available.");let i=await t(n.input,{...e,endpoint:s});return r({...n,request:i})};var Er={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},le={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Ra(e,t,r){return{applyToStack:(o)=>{o.add(it(e,r),Er),o.add(at(e,t),le)}}}var mt=d(De(),1);var ct=async(e)=>{let t=e?.Bucket||"";if(typeof e.Bucket==="string")e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(hr(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!_r(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)e.ForcePathStyle=!0;if(e.DisableMultiRegionAccessPoints)e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0;return e},gr=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Rr=/(\d+\.){3}\d+/,xr=/\.\./;var _r=(e)=>gr.test(e)&&!Rr.test(e)&&!xr.test(e),hr=(e)=>{let[t,r,o,,,n]=e.split(":"),s=t==="arn"&&e.split(":").length>=6,i=Boolean(s&&r&&o&&n);if(s&&!i)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return i};var pt=(e,t,r)=>{let o=async()=>{let n=r[e]??r[t];if(typeof n==="function")return n();return n};if(e==="credentialScope"||t==="CredentialScope")return async()=>{let n=typeof r.credentials==="function"?await r.credentials():r.credentials;return n?.credentialScope??n?.CredentialScope};if(e==="accountId"||t==="AccountId")return async()=>{let n=typeof r.credentials==="function"?await r.credentials():r.credentials;return n?.accountId??n?.AccountId};if(e==="endpoint"||t==="endpoint")return async()=>{let n=await o();if(n&&typeof n==="object"){if("url"in n)return n.url.href;if("hostname"in n){let{protocol:s,hostname:i,port:a,path:c}=n;return`${s}//${i}${a?":"+a:""}${c}`}}return n};return o};var ft="AWS_ENDPOINT_URL",ut="endpoint_url",dt=(e)=>({environmentVariableSelector:(t)=>{let r=e.split(" ").map((s)=>s.toUpperCase()),o=t[[ft,...r].join("_")];if(o)return o;let n=t[ft];if(n)return n;return},configFileSelector:(t,r)=>{if(r&&t.services){let n=r[["services",t.services].join(me)];if(n){let s=e.split(" ").map((a)=>a.toLowerCase()),i=n[[s.join("_"),ut].join(me)];if(i)return i}}let o=t[ut];if(o)return o;return},default:void 0});var J=async(e)=>$(dt(e??""))();var K=(e)=>{if(typeof e==="object"){if("url"in e)return Ee(e.url);return e}return Ee(e)};var lt=async(e,t,r,o)=>{if(!r.endpoint){let i;if(r.serviceConfiguredEndpoint)i=await r.serviceConfiguredEndpoint();else i=await J(r.serviceId);if(i)r.endpoint=()=>Promise.resolve(K(i))}let n=await Sr(e,t,r);if(typeof r.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(n,o)},Sr=async(e,t,r)=>{let o={},n=t?.getEndpointParameterInstructions?.()||{};for(let[s,i]of Object.entries(n))switch(i.type){case"staticContextParams":o[s]=i.value;break;case"contextParams":o[s]=e[i.name];break;case"clientContextParams":case"builtInParams":o[s]=await pt(i.name,s,r)();break;case"operationContextParams":o[s]=i.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(i))}if(Object.keys(n).length===0)Object.assign(o,r);if(String(r.serviceId).toLowerCase()==="s3")await ct(o);return o};var Et=({config:e,instructions:t})=>{return(r,o)=>async(n)=>{if(e.endpoint)mt.setFeature(o,"ENDPOINT_OVERRIDE","N");let s=await lt(n.input,{getEndpointParameterInstructions(){return t}},{...e},o);o.endpointV2=s,o.authSchemes=s.properties?.authSchemes;let i=o.authSchemes?.[0];if(i){o.signing_region=i.signingRegion,o.signing_service=i.signingName;let c=rt(o)?.selectedHttpAuthScheme?.httpAuthOption;if(c)c.signingProperties=Object.assign(c.signingProperties||{},{signing_region:i.signingRegion,signingRegion:i.signingRegion,signing_service:i.signingName,signingName:i.signingName,signingRegionSet:i.signingRegionSet},i.properties)}return r({...n})}};var Ar={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:le.name},Ya=(e,t)=>({applyToStack:(r)=>{r.addRelativeTo(Et({config:e,instructions:t}),Ar)}});var qa=(e)=>{let t=e.tls??!0,{endpoint:r,useDualstackEndpoint:o,useFipsEndpoint:n}=e,s=r!=null?async()=>K(await S(r)()):void 0,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:S(o??!1),useFipsEndpoint:S(n??!1)}),c=void 0;return a.serviceConfiguredEndpoint=async()=>{if(e.serviceId&&!c)c=J(e.serviceId);return c},a};var g;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(g||(g={}));var I=3,gt=g.STANDARD;var Rt=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],xt=["TimeoutError","RequestTimeout","RequestTimeoutException"],_t=[500,502,503,504],ht=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var Tr=(e)=>e.$metadata?.clockSkewCorrected,C=(e)=>e.$metadata?.httpStatusCode===429||Rt.includes(e.name)||e.$retryable?.throttling==!0,L=(e,t=0)=>Tr(e)||xt.includes(e.name)||ht.includes(e?.code||"")||_t.includes(e.$metadata?.httpStatusCode||0)||e.cause!==void 0&&t<=10&&L(e.cause,t+1),St=(e)=>{if(e.$metadata?.httpStatusCode!==void 0){let t=e.$metadata.httpStatusCode;if(500<=t&&t<=599&&!L(e))return!0;return!1}return!1};class P{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??0.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??0.5,this.scaleConstant=e?.scaleConstant??0.4,this.smooth=e?.smooth??0.8;let t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(!this.enabled)return;if(this.refillTokenBucket(),e>this.currentCapacity){let t=(e-this.currentCapacity)/this.fillRate*1000;await new Promise((r)=>P.setTimeoutFn(r,t))}this.currentCapacity=this.currentCapacity-e}refillTokenBucket(){let e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}let t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),C(e)){let o=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=o,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(o),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());let r=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let e=this.getCurrentTimeInSeconds(),t=Math.floor(e*2)/2;if(this.requestCount++,t>this.lastTxRateBucket){let r=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(r*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}P.setTimeoutFn=setTimeout;var N=100,F=20000,ge=500,Q=500,Re=5,xe=10,_e=1,ee="amz-sdk-invocation-id",te="amz-sdk-request";var At=()=>{let e=N;return{computeNextBackoffDelay:(o)=>{return Math.floor(Math.min(F,Math.random()*2**o*e))},setDelayBase:(o)=>{e=o}}};var he=({retryDelay:e,retryCount:t,retryCost:r})=>{return{getRetryCount:()=>t,getRetryDelay:()=>Math.min(F,e),getRetryCost:()=>r}};class b{constructor(e){this.maxAttempts=e,this.mode=g.STANDARD,this.capacity=Q,this.retryBackoffStrategy=At(),this.maxAttemptsProvider=typeof e==="function"?e:async()=>e}async acquireInitialRetryToken(e){return he({retryDelay:N,retryCount:0})}async refreshRetryTokenForRetry(e,t){let r=await this.getMaxAttempts();if(this.shouldRetry(e,t,r)){let o=t.errorType;this.retryBackoffStrategy.setDelayBase(o==="THROTTLING"?ge:N);let n=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),s=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,n):n,i=this.getCapacityCost(o);return this.capacity-=i,he({retryDelay:s,retryCount:e.getRetryCount()+1,retryCost:i})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(Q,this.capacity+(e.getRetryCost()??_e))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn(`Max attempts provider could not resolve. Using default of ${I}`),I}}shouldRetry(e,t,r){return e.getRetryCount()+1<r&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return e==="TRANSIENT"?xe:Re}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class Se{constructor(e,t){this.maxAttemptsProvider=e,this.mode=g.ADAPTIVE;let{rateLimiter:r}=t??{};this.rateLimiter=r??new P,this.standardRetryStrategy=new b(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}var Tt="AWS_MAX_ATTEMPTS",Ot="max_attempts",Gc={environmentVariableSelector:(e)=>{let t=e[Tt];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Environment variable ${Tt} mast be a number, got "${t}"`);return r},configFileSelector:(e)=>{let t=e[Ot];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Shared config file entry ${Ot} mast be a number, got "${t}"`);return r},default:I},Vc=(e)=>{let{retryStrategy:t,retryMode:r,maxAttempts:o}=e,n=S(o??I);return Object.assign(e,{maxAttempts:n,retryStrategy:async()=>{if(t)return t;if(await S(r)()===g.ADAPTIVE)return new Se(n);return new b(n)}})},Or="AWS_RETRY_MODE",Ir="retry_mode",Wc={environmentVariableSelector:(e)=>e[Or],configFileSelector:(e)=>e[Ir],default:gt};var re=d(O(),1);var _=d(Nr(),1),Yc=_.default.v1,zc=_.default.v3,It=_.default.v4,jc=_.default.v5,Xc=_.default.NIL,Hc=_.default.version,qc=_.default.validate,Zc=_.default.stringify,Jc=_.default.parse;import{Readable as wr}from"node:stream";var Nt=(e)=>e?.body instanceof wr||typeof ReadableStream!=="undefined"&&e?.body instanceof ReadableStream;var Ae=(e)=>{if(e instanceof Error)return e;if(e instanceof Object)return Object.assign(new Error,e);if(typeof e==="string")return new Error(e);return new Error(`AWS SDK error wrapper for ${e}`)};var yr=(e)=>(t,r)=>async(o)=>{let n=await e.retryStrategy(),s=await e.maxAttempts();if(Dr(n)){n=n;let i=await n.acquireInitialRetryToken(r.partition_id),a=new Error,c=0,p=0,{request:u}=o,x=re.HttpRequest.isInstance(u);if(x)u.headers[ee]=It();while(!0)try{if(x)u.headers[te]=`attempt=${c+1}; max=${s}`;let{response:m,output:l}=await t(o);return n.recordSuccess(i),l.$metadata.attempts=c+1,l.$metadata.totalRetryDelay=p,{response:m,output:l}}catch(m){let l=Cr(m);if(a=Ae(m),x&&Nt(u))throw(r.logger instanceof wt?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),a;try{i=await n.refreshRetryTokenForRetry(i,l)}catch(G){if(!a.$metadata)a.$metadata={};throw a.$metadata.attempts=c+1,a.$metadata.totalRetryDelay=p,a}c=i.getRetryCount();let w=i.getRetryDelay();p+=w,await new Promise((G)=>setTimeout(G,w))}}else{if(n=n,n?.mode)r.userAgent=[...r.userAgent||[],["cfg/retry-mode",n.mode]];return n.retry(t,o)}},Dr=(e)=>typeof e.acquireInitialRetryToken!=="undefined"&&typeof e.refreshRetryTokenForRetry!=="undefined"&&typeof e.recordSuccess!=="undefined",Cr=(e)=>{let t={error:e,errorType:Pr(e)},r=Ur(e.$response);if(r)t.retryAfterHint=r;return t},Pr=(e)=>{if(C(e))return"THROTTLING";if(L(e))return"TRANSIENT";if(St(e))return"SERVER_ERROR";return"CLIENT_ERROR"},br={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},cp=(e)=>({applyToStack:(t)=>{t.add(yr(e),br)}}),Ur=(e)=>{if(!re.HttpResponse.isInstance(e))return;let t=Object.keys(e.headers).find((s)=>s.toLowerCase()==="retry-after");if(!t)return;let r=e.headers[t],o=Number(r);if(!Number.isNaN(o))return new Date(o*1000);return new Date(r)};var yt=d(O(),1);var vr=d(O(),1);import{platform as Mr,release as $r}from"node:os";import{env as Ct,versions as Lr}from"node:process";var Te={isCrtAvailable:!1};var Dt=()=>{if(Te.isCrtAvailable)return["md/crt-avail"];return null};var Hp=({serviceId:e,clientVersion:t})=>{return async(r)=>{let o=[["aws-sdk-js",t],["ua","2.1"],[`os/${Mr()}`,$r()],["lang/js"],["md/nodejs",`${Lr.node}`]],n=Dt();if(n)o.push(n);if(e)o.push([`api/${e}`,t]);if(Ct.AWS_EXECUTION_ENV)o.push([`exec-env/${Ct.AWS_EXECUTION_ENV}`]);let s=await r?.userAgentAppId?.();return s?[...o,[`app/${s}`]]:[...o]}};var Fr="AWS_SDK_UA_APP_ID",kr="sdk_ua_app_id",Gr="sdk-ua-app-id",Kp={environmentVariableSelector:(e)=>e[Fr],configFileSelector:(e)=>e[kr]??e[Gr],default:ne};var k=d(Vr(),1),bt=d(Wr(),1);import{Buffer as Br}from"node:buffer";import{createHash as Yr,createHmac as zr}from"node:crypto";class jr{constructor(e,t){this.algorithmIdentifier=e,this.secret=t,this.reset()}update(e,t){this.hash.update(bt.toUint8Array(Pt(e,t)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?zr(this.algorithmIdentifier,Pt(this.secret)):Yr(this.algorithmIdentifier)}}function Pt(e,t){if(Br.isBuffer(e))return e;if(typeof e==="string")return k.fromString(e,t);if(ArrayBuffer.isView(e))return k.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength);return k.fromArrayBuffer(e)}import{fstatSync as Xr,lstatSync as Hr}from"node:fs";var cf=(e)=>{if(!e)return 0;if(typeof e==="string")return Buffer.byteLength(e);else if(typeof e.byteLength==="number")return e.byteLength;else if(typeof e.size==="number")return e.size;else if(typeof e.start==="number"&&typeof e.end==="number")return e.end+1-e.start;else if(typeof e.path==="string"||Buffer.isBuffer(e.path))return Hr(e.path).size;else if(typeof e.fd==="number")return Xr(e.fd).size;throw new Error(`Body Length computation failed for ${e}`)};var Ft=d(Zr(),1);var Ut="AWS_EXECUTION_ENV",Oe="AWS_REGION",Ie="AWS_DEFAULT_REGION",vt="AWS_EC2_METADATA_DISABLED",Mt=["in-region","cross-region","mobile","standard","legacy"],$t="/latest/meta-data/placement/region";var Lt={environmentVariableSelector:(e)=>{return e.AWS_DEFAULTS_MODE},configFileSelector:(e)=>{return e.defaults_mode},default:"legacy"};var xf=({region:e=$(ot),defaultsMode:t=$(Lt)}={})=>Ft.memoize(async()=>{let r=typeof t==="function"?await t():t;switch(r?.toLowerCase()){case"auto":return Jr(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(r?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Mt.join(", ")}, got ${r}`)}}),Jr=async(e)=>{if(e){let t=typeof e==="function"?await e():e,r=await Kr();if(!r)return"standard";if(t===r)return"in-region";else return"cross-region"}return"standard"},Kr=async()=>{if(process.env[Ut]&&(process.env[Oe]||process.env[Ie]))return process.env[Oe]??process.env[Ie];if(!process.env[vt])try{let{getInstanceMetadataEndpoint:e,httpRequest:t}=await import("./chunk-fk8jrqrt.js"),r=await e();return(await t({...r,path:$t})).toString()}catch(e){}};var Af=(e)=>{return{setRegion(t){e.region=t},region(){return e.region}}},Tf=(e)=>{return{region:e.region()}};export{eo as $a,to as ab,oo as bb,ao as cb,po as db,Jt as eb,M as fb,er as gb,nr as hb,Zs as ib,gi as jb,_i as kb,rt as lb,S as mb,ot as nb,ki as ob,ii as pb,ua as qb,Ra as rb,Ya as sb,qa as tb,gt as ub,Gc as vb,Vc as wb,Wc as xb,cp as yb,Hp as zb,Kp as Ab,jr as Bb,cf as Cb,xf as Db,Af as Eb,Tf as Fb};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{pc as Te,vc as xe,zc as P}from"./chunk-xn1pvpj0.js";import{Jc as L,Kc as V}from"./chunk-qwdsyzdj.js";import{Rc as C}from"./chunk-2pj0cr49.js";var b=(e,t)=>{let 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(",")})`:""}`},M=()=>{let e=[],t=[],r=!1,n=new Set,o=(a)=>a.sort((f,d)=>J[d.step]-J[f.step]||Y[d.priority||"normal"]-Y[f.priority||"normal"]),s=(a)=>{let f=!1,d=(m)=>{let g=b(m.name,m.aliases);if(g.includes(a)){f=!0;for(let l of g)n.delete(l);return!1}return!0};return e=e.filter(d),t=t.filter(d),f},i=(a)=>{let f=!1,d=(m)=>{if(m.middleware===a){f=!0;for(let g of b(m.name,m.aliases))n.delete(g);return!1}return!0};return e=e.filter(d),t=t.filter(d),f},c=(a)=>{return e.forEach((f)=>{a.add(f.middleware,{...f})}),t.forEach((f)=>{a.addRelativeTo(f.middleware,{...f})}),a.identifyOnResolve?.(T.identifyOnResolve()),a},p=(a)=>{let f=[];return a.before.forEach((d)=>{if(d.before.length===0&&d.after.length===0)f.push(d);else f.push(...p(d))}),f.push(a),a.after.reverse().forEach((d)=>{if(d.before.length===0&&d.after.length===0)f.push(d);else f.push(...p(d))}),f},E=(a=!1)=>{let f=[],d=[],m={};return e.forEach((l)=>{let h={...l,before:[],after:[]};for(let u of b(h.name,h.aliases))m[u]=h;f.push(h)}),t.forEach((l)=>{let h={...l,before:[],after:[]};for(let u of b(h.name,h.aliases))m[u]=h;d.push(h)}),d.forEach((l)=>{if(l.toMiddleware){let h=m[l.toMiddleware];if(h===void 0){if(a)return;throw new Error(`${l.toMiddleware} is not found when adding ${S(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(f).map(p).reduce((l,h)=>{return l.push(...h),l},[])},T={add:(a,f={})=>{let{name:d,override:m,aliases:g}=f,l={step:"initialize",priority:"normal",middleware:a,...f},h=b(d,g);if(h.length>0){if(h.some((u)=>n.has(u))){if(!m)throw new Error(`Duplicate middleware name '${S(d,g)}'`);for(let u of h){let y=e.findIndex((I)=>I.name===u||I.aliases?.some((F)=>F===u));if(y===-1)continue;let x=e[y];if(x.step!==l.step||l.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(d,g)}" middleware with ${l.priority} priority in ${l.step} step.`);e.splice(y,1)}}for(let u of h)n.add(u)}e.push(l)},addRelativeTo:(a,f)=>{let{name:d,override:m,aliases:g}=f,l={middleware:a,...f},h=b(d,g);if(h.length>0){if(h.some((u)=>n.has(u))){if(!m)throw new Error(`Duplicate middleware name '${S(d,g)}'`);for(let u of h){let y=t.findIndex((I)=>I.name===u||I.aliases?.some((F)=>F===u));if(y===-1)continue;let x=t[y];if(x.toMiddleware!==l.toMiddleware||x.relation!==l.relation)throw new Error(`"${S(x.name,x.aliases)}" middleware ${x.relation} "${x.toMiddleware}" middleware cannot be overridden by "${S(d,g)}" middleware ${l.relation} "${l.toMiddleware}" middleware.`);t.splice(y,1)}}for(let u of h)n.add(u)}t.push(l)},clone:()=>c(M()),use:(a)=>{a.applyToStack(T)},remove:(a)=>{if(typeof a==="string")return s(a);else return i(a)},removeByTag:(a)=>{let f=!1,d=(m)=>{let{tags:g,name:l,aliases:h}=m;if(g&&g.includes(a)){let u=b(l,h);for(let y of u)n.delete(y);return f=!0,!1}return!0};return e=e.filter(d),t=t.filter(d),f},concat:(a)=>{let f=c(M());return f.use(a),f.identifyOnResolve(r||f.identifyOnResolve()||(a.identifyOnResolve?.()??!1)),f},applyToStack:c,identify:()=>{return E(!0).map((a)=>{let 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 d of E().map((m)=>m.middleware).reverse())a=d(a,f);if(r)console.log(T.identify());return a}};return T},J={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Y={high:3,normal:2,low:1};class Ce{constructor(e){this.config=e,this.middlewareStack=M()}send(e,t,r){let n=typeof t!=="function"?t:void 0,o=typeof t==="function"?t:r,s=n===void 0&&this.config.cacheMiddleware===!0,i;if(s){if(!this.handlers)this.handlers=new WeakMap;let c=this.handlers;if(c.has(e.constructor))i=c.get(e.constructor);else i=e.resolveMiddleware(this.middlewareStack,this.config,n),c.set(e.constructor,i)}else delete this.handlers,i=e.resolveMiddleware(this.middlewareStack,this.config,n);if(o)i(e).then((c)=>o(null,c.output),(c)=>o(c)).catch(()=>{});else return i(e).then((c)=>c.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class j{constructor(){this.middlewareStack=M()}static classBuilder(){return new q}resolveMiddlewareWithContext(e,t,r,{middlewareFn:n,clientName:o,commandName:s,inputFilterSensitiveLog:i,outputFilterSensitiveLog:c,smithyContext:p,additionalContext:E,CommandCtor:T}){for(let g of n.bind(this)(T,e,t,r))this.middlewareStack.use(g);let a=e.concat(this.middlewareStack),{logger:f}=t,d={logger:f,clientName:o,commandName:s,inputFilterSensitiveLog:i,outputFilterSensitiveLog:c,[V]:{commandInstance:this,...p},...E},{requestHandler:m}=t;return a.resolve((g)=>m.handle(g.request,r||{}),d)}}class q{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(){let e=this,t;return t=class extends j{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 $e=C(P(),1);var mt="***SensitiveInformation***";var yt=(e)=>{if(e===null||e===void 0)return;if(typeof e==="number"){if(e===0||e===1)R.warn(_(`Expected boolean, got ${typeof e}: ${e}`));if(e===0)return!1;if(e===1)return!0}if(typeof e==="string"){let t=e.toLowerCase();if(t==="false"||t==="true")R.warn(_(`Expected boolean, got ${typeof e}: ${e}`));if(t==="false")return!1;if(t==="true")return!0}if(typeof e==="boolean")return e;throw new TypeError(`Expected boolean, got ${typeof e}: ${e}`)},K=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string"){let t=parseFloat(e);if(!Number.isNaN(t)){if(String(t)!==String(e))R.warn(_(`Expected number but observed string: ${e}`));return t}}if(typeof e==="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)},Me=Math.ceil(340282346638528860000000000000000000000),Z=(e)=>{let t=K(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0){if(Math.abs(t)>Me)throw new TypeError(`Expected 32-bit float, got ${e}`)}return t},Ne=(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 G=(e)=>O(e,32),Q=(e)=>O(e,16),X=(e)=>O(e,8),O=(e,t)=>{let r=Ne(e);if(r!==void 0&&Ie(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},Ie=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},wt=(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},Et=(e)=>{if(e===null||e===void 0)return;if(typeof e==="object"&&!Array.isArray(e))return e;let t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},Tt=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string")return e;if(["boolean","number","bigint"].includes(typeof e))return R.warn(_(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)};var v=(e)=>{if(typeof e=="string")return Z(k(e));return Z(e)},Ae=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,k=(e)=>{let t=e.match(Ae);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},xt=(e)=>{if(typeof e=="string")return _e(e);return K(e)};var _e=(e)=>{switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${e}`)}};var St=(e)=>{if(typeof e==="string")return G(k(e));return G(e)},D=(e)=>{if(typeof e==="string")return Q(k(e));return Q(e)},ee=(e)=>{if(typeof e==="string")return X(k(e));return X(e)},_=(e)=>{return String(new TypeError(e).stack||e).split(`
|
|
2
|
+
`).slice(0,5).filter((t)=>!t.includes("stackTraceWarning")).join(`
|
|
3
|
+
`)},R={warn:console.warn};var Re=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var ke=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Mt=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=ke.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,s,i,c,p,E]=t,T=D(U(n)),a=$(o,"month",1,12),f=$(s,"day",1,31);return te(T,a,f,{hours:i,minutes:c,seconds:p,fractionalMilliseconds:E})},Fe=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Nt=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=Fe.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,s,i,c,p,E,T]=t,a=D(U(n)),f=$(o,"month",1,12),d=$(s,"day",1,31),m=te(a,f,d,{hours:i,minutes:c,seconds:p,fractionalMilliseconds:E});if(T.toUpperCase()!="Z")m.setTime(m.getTime()-Le(T));return m},It=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$/),At=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$/),_t=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})$/);var te=(e,t,r,n)=>{let o=t-1;return Oe(e,o,r),new Date(Date.UTC(e,o,r,$(n.hours,"hour",0,23),$(n.minutes,"minute",0,59),$(n.seconds,"seconds",0,60),Ue(n.fractionalMilliseconds)))};var Pe=[31,28,31,30,31,30,31,31,30,31,30,31],Oe=(e,t,r)=>{let n=Pe[t];if(t===1&&De(e))n=29;if(r>n)throw new TypeError(`Invalid day for ${Re[t]} in ${e}: ${r}`)},De=(e)=>{return e%4===0&&(e%100!==0||e%400===0)},$=(e,t,r,n)=>{let o=ee(U(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},Ue=(e)=>{if(e===null||e===void 0)return 0;return v("0."+e)*1000},Le=(e)=>{let t=e[0],r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);let n=Number(e.substring(1,3)),o=Number(e.substring(4,6));return r*(n*60+o)*60*1000},U=(e)=>{let t=0;while(t<e.length-1&&e.charAt(t)==="0")t++;if(t===0)return e;return e.slice(t)};class A extends Error{constructor(e){super(e.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;let t=e;return A.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&(t.$fault==="client"||t.$fault==="server")}static[Symbol.hasInstance](e){if(!e)return!1;let t=e;if(this===A)return A.isInstance(e);if(A.isInstance(e)){if(t.name&&this.name)return this.prototype.isPrototypeOf(e)||t.name===this.name;return this.prototype.isPrototypeOf(e)}return!1}}var re=(e,t={})=>{Object.entries(t).filter(([,n])=>n!==void 0).forEach(([n,o])=>{if(e[n]==null||e[n]==="")e[n]=o});let r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e};var ze=({output:e,parsedBody:t,exceptionCtor:r,errorCode:n})=>{let o=He(e),s=o.httpStatusCode?o.httpStatusCode+"":void 0,i=new r({name:t?.code||t?.Code||n||s||"UnknownError",$fault:"client",$metadata:o});throw re(i,t)},Pt=(e)=>{return({output:t,parsedBody:r,errorCode:n})=>{ze({output:t,parsedBody:r,exceptionCtor:e,errorCode:n})}},He=(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 Dt=(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 ne=!1,Lt=(e)=>{if(e&&!ne&&parseInt(e.substring(1,e.indexOf(".")))<16)ne=!0};var Be=C(P(),1);var oe=(e)=>{let t=[];for(let r in L){let n=L[r];if(e[n]===void 0)continue;t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}return{addChecksumAlgorithm(r){t.push(r)},checksumAlgorithms(){return t}}},se=(e)=>{let t={};return e.checksumAlgorithms().forEach((r)=>{t[r.algorithmId()]=r.checksumConstructor()}),t};var ie=(e)=>{return{setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}},ce=(e)=>{let t={};return t.retryStrategy=e.retryStrategy(),t};var jt=(e)=>{return Object.assign(oe(e),ie(e))};var qt=(e)=>{return Object.assign(se(e),ce(e))};var Xt=(e)=>Array.isArray(e)?e:[e];var er=(e)=>{return e!=null};var N=function e(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};N.from=(e)=>{if(e&&typeof e==="object"&&(e instanceof N||("deserializeJSON"in e)))return e;else if(typeof e==="string"||Object.getPrototypeOf(e)===String.prototype)return N(String(e));return N(JSON.stringify(e))};N.fromObject=N.from;class We{trace(){}debug(){}info(){}warn(){}error(){}}function Je(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,Ye(n,o,s);else s=t;for(let i of Object.keys(s)){if(!Array.isArray(s[i])){n[i]=s[i];continue}ae(n,null,s,i)}return n}var or=(e,t)=>{let r={};for(let n in t)ae(r,e,t,n);return r},Ye=(e,t,r)=>{return Je(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},{}))},ae=(e,t,r,n)=>{if(t!==null){let i=r[n];if(typeof i==="function")i=[,i];let[c=Ve,p=je,E=n]=i;if(typeof c==="function"&&c(t[E])||typeof c!=="function"&&!!c)e[n]=p(t[E]);return}let[o,s]=r[n];if(typeof s==="function"){let i,c=o===void 0&&(i=s())!=null,p=typeof o==="function"&&!!o(void 0)||typeof o!=="function"&&!!o;if(c)e[n]=i;else if(p)e[n]=s()}else{let i=o===void 0&&s!=null,c=typeof o==="function"&&!!o(s)||typeof o!=="function"&&!!o;if(i||c)e[n]=s}},Ve=(e)=>e!=null,je=(e)=>e;var qe=C(P(),1);var fe=(e)=>{if(e==null)return{};if(Array.isArray(e))return e.filter((t)=>t!=null).map(fe);if(typeof e==="object"){let t={};for(let r of Object.keys(e)){if(e[r]==null)continue;t[r]=fe(e[r])}return t}return e};var Se=C(Te(),1),be=C(xe(),1);import{Agent as we,request as Xe}from"node:http";import{Agent as Ee,request as Ke}from"node:https";var de=["ECONNRESET","EPIPE","ETIMEDOUT"];var z=(e)=>{let t={};for(let r of Object.keys(e)){let n=e[r];t[r]=Array.isArray(n)?n.join(","):n}return t};var w={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:(e)=>clearTimeout(e)};var ue=1000,le=(e,t,r=0)=>{if(!r)return-1;let n=(o)=>{let s=w.setTimeout(()=>{e.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r-o),i=(c)=>{if(c?.connecting)c.on("connect",()=>{w.clearTimeout(s)});else w.clearTimeout(s)};if(e.socket)i(e.socket);else e.on("socket",i)};if(r<2000)return n(0),0;return w.setTimeout(n.bind(null,ue),ue)};var Ze=3000,he=(e,{keepAlive:t,keepAliveMsecs:r},n=Ze)=>{if(t!==!0)return-1;let o=()=>{if(e.socket)e.socket.setKeepAlive(t,r||0);else e.on("socket",(s)=>{s.setKeepAlive(t,r||0)})};if(n===0)return o(),0;return w.setTimeout(o,n)};var me=3000,pe=(e,t,r=ge)=>{let n=(o)=>{let s=r-o,i=()=>{e.destroy(),t(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))};if(e.socket)e.socket.setTimeout(s,i),e.on("close",()=>e.socket?.removeListener("timeout",i));else e.setTimeout(s,i)};if(0<r&&r<6000)return n(0),0;return w.setTimeout(n.bind(null,r===0?0:me),me)};import{Readable as Ge}from"node:stream";var ye=6000;async function H(e,t,r=ye){let n=t.headers??{},o=n.Expect||n.expect,s=-1,i=!0;if(o==="100-continue")i=await Promise.race([new Promise((c)=>{s=Number(w.setTimeout(()=>c(!0),Math.max(ye,r)))}),new Promise((c)=>{e.on("continue",()=>{w.clearTimeout(s),c(!0)}),e.on("response",()=>{w.clearTimeout(s),c(!1)}),e.on("error",()=>{w.clearTimeout(s),c(!1)})})]);if(i)Qe(e,t.body)}function Qe(e,t){if(t instanceof Ge){t.pipe(e);return}if(t){if(Buffer.isBuffer(t)||typeof t==="string"){e.end(t);return}let 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()}var ge=0;class B{static create(e){if(typeof e?.handle==="function")return e;return new B(e)}static checkSocketUsage(e,t,r=console){let{sockets:n,requests:o,maxSockets:s}=e;if(typeof s!=="number"||s===1/0)return t;let i=15000;if(Date.now()-i<t)return t;if(n&&o)for(let c in n){let p=n[c]?.length??0,E=o[c]?.length??0;if(p>=s&&E>=2*s)return r?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${p} and ${E} additional requests are enqueued.
|
|
4
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
5
|
+
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){let{requestTimeout:t,connectionTimeout:r,socketTimeout:n,socketAcquisitionWarningTimeout:o,httpAgent:s,httpsAgent:i}=e||{},c=!0,p=50;return{connectionTimeout:r,requestTimeout:t??n,socketAcquisitionWarningTimeout:o,httpAgent:(()=>{if(s instanceof we||typeof s?.destroy==="function")return s;return new we({keepAlive:!0,maxSockets:50,...s})})(),httpsAgent:(()=>{if(i instanceof Ee||typeof i?.destroy==="function")return i;return new Ee({keepAlive:!0,maxSockets:50,...i})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t}={}){if(!this.config)this.config=await this.configProvider;return new Promise((r,n)=>{let o=void 0,s=[],i=async(u)=>{await o,s.forEach(w.clearTimeout),r(u)},c=async(u)=>{await o,s.forEach(w.clearTimeout),n(u)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t?.aborted){let u=new Error("Request aborted");u.name="AbortError",c(u);return}let p=e.protocol==="https:",E=p?this.config.httpsAgent:this.config.httpAgent;s.push(w.setTimeout(()=>{this.socketWarningTimestamp=B.checkSocketUsage(E,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let T=be.buildQueryString(e.query||{}),a=void 0;if(e.username!=null||e.password!=null){let u=e.username??"",y=e.password??"";a=`${u}:${y}`}let f=e.path;if(T)f+=`?${T}`;if(e.fragment)f+=`#${e.fragment}`;let d=e.hostname??"";if(d[0]==="["&&d.endsWith("]"))d=e.hostname.slice(1,-1);else d=e.hostname;let m={headers:e.headers,host:d,method:e.method,path:f,port:e.port,agent:E,auth:a},l=(p?Ke:Xe)(m,(u)=>{let y=new Se.HttpResponse({statusCode:u.statusCode||-1,reason:u.statusMessage,headers:z(u.headers),body:u});i({response:y})});if(l.on("error",(u)=>{if(de.includes(u.code))c(Object.assign(u,{name:"TimeoutError"}));else c(u)}),t){let u=()=>{l.destroy();let y=new Error("Request aborted");y.name="AbortError",c(y)};if(typeof t.addEventListener==="function"){let y=t;y.addEventListener("abort",u,{once:!0}),l.once("close",()=>y.removeEventListener("abort",u))}else t.onabort=u}s.push(le(l,c,this.config.connectionTimeout)),s.push(pe(l,c,this.config.requestTimeout));let h=m.agent;if(typeof h==="object"&&"keepAlive"in h)s.push(he(l,{keepAlive:h.keepAlive,keepAliveMsecs:h.keepAliveMsecs}));o=H(l,e,this.config.requestTimeout).catch((u)=>{return s.forEach(w.clearTimeout),n(u)})})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[e]:t}})}httpHandlerConfigs(){return this.config??{}}}var ve=C(Te(),1),et=C(xe(),1);import{Writable as tt}from"node:stream";class W extends tt{constructor(){super(...arguments);this.bufferedBytes=[]}_write(e,t,r){this.bufferedBytes.push(e),r()}}var Tn=(e)=>{if(rt(e))return nt(e);return new Promise((t,r)=>{let n=new W;e.pipe(n),e.on("error",(o)=>{n.end(),r(o)}),n.on("error",r),n.on("finish",function(){let o=new Uint8Array(Buffer.concat(this.bufferedBytes));t(o)})})},rt=(e)=>typeof ReadableStream==="function"&&e instanceof ReadableStream;async function nt(e){let t=[],r=e.getReader(),n=!1,o=0;while(!n){let{done:c,value:p}=await r.read();if(p)t.push(p),o+=p.length;n=c}let s=new Uint8Array(o),i=0;for(let c of t)s.set(c,i),i+=c.length;return s}export{Ce as Ib,j as Jb,mt as Kb,yt as Lb,G as Mb,wt as Nb,Et as Ob,Tt as Pb,xt as Qb,St as Rb,Mt as Sb,Nt as Tb,A as Ub,re as Vb,Pt as Wb,Dt as Xb,Lt as Yb,jt as Zb,qt as _b,Xt as $b,er as ac,We as bc,Je as cc,or as dc,fe as ec,B as fc,Tn as gc};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Yc as QZ,_c as ZZ}from"./chunk-g1f16je5.js";var U_=ZZ((BO,N_)=>{var B_,d0,i0,o0,n0,r0,U0,m1,C0,s0,M_,a0,w0,t0,e0,_1,e,J_,z1,Z1,OZ;t0=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]?|[^\/[\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu;w0=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;d0=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu;_1=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y;a0=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y;e=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y;Z1=/[\t\v\f\ufeff\p{Zs}]+/yu;C0=/\r?\n|[\r\u2028\u2029]/y;s0=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y;e0=/\/\/.*/y;B_=/^#!.*/;o0=/[<>.:={}]|\/(?![\/*])/y;i0=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu;n0=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y;r0=/[^<>{}]+/y;z1=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;J_=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;U0=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;m1=/^(?:return|throw|yield)$/;M_=RegExp(C0.source);N_.exports=OZ=function*(_,{jsx:z=!1}={}){var Z,O,Q,j,H,$,K,W,Y,G,V,q,C,B;if({length:$}=_,j=0,H="",B=[{tag:"JS"}],Z=[],V=0,q=!1,K=B_.exec(_))yield{type:"HashbangComment",value:K[0]},j=K[0].length;while(j<$){switch(W=B[B.length-1],W.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(_[j]==="/"&&(z1.test(H)||U0.test(H))){if(t0.lastIndex=j,K=t0.exec(_)){j=t0.lastIndex,H=K[0],q=!0,yield{type:"RegularExpressionLiteral",value:K[0],closed:K[1]!==void 0&&K[1]!=="\\"};continue}}if(w0.lastIndex=j,K=w0.exec(_)){switch(C=K[0],Y=w0.lastIndex,G=C,C){case"(":if(H==="?NonExpressionParenKeyword")B.push({tag:"JSNonExpressionParen",nesting:V});V++,q=!1;break;case")":if(V--,q=!0,W.tag==="JSNonExpressionParen"&&V===W.nesting)B.pop(),G="?NonExpressionParenEnd",q=!1;break;case"{":w0.lastIndex=0,Q=!J_.test(H)&&(z1.test(H)||U0.test(H)),Z.push(Q),q=!1;break;case"}":switch(W.tag){case"InterpolationInTemplate":if(Z.length===W.nesting){if(e.lastIndex=j,K=e.exec(_),j=e.lastIndex,H=K[0],K[1]==="${")H="?InterpolationInTemplate",q=!1,yield{type:"TemplateMiddle",value:K[0]};else B.pop(),q=!0,yield{type:"TemplateTail",value:K[0],closed:K[1]==="`"};continue}break;case"InterpolationInJSX":if(Z.length===W.nesting){B.pop(),j+=1,H="}",yield{type:"JSXPunctuator",value:"}"};continue}}q=Z.pop(),G=q?"?ExpressionBraceEnd":"}";break;case"]":q=!0;break;case"++":case"--":G=q?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(z&&(z1.test(H)||U0.test(H))){B.push({tag:"JSXTag"}),j+=1,H="<",yield{type:"JSXPunctuator",value:C};continue}q=!1;break;default:q=!1}j=Y,H=G,yield{type:"Punctuator",value:C};continue}if(d0.lastIndex=j,K=d0.exec(_)){switch(j=d0.lastIndex,G=K[0],K[0]){case"for":case"if":case"while":case"with":if(H!=="."&&H!=="?.")G="?NonExpressionParenKeyword"}H=G,q=!U0.test(K[0]),yield{type:K[1]==="#"?"PrivateIdentifier":"IdentifierName",value:K[0]};continue}if(_1.lastIndex=j,K=_1.exec(_)){j=_1.lastIndex,H=K[0],q=!0,yield{type:"StringLiteral",value:K[0],closed:K[2]!==void 0};continue}if(a0.lastIndex=j,K=a0.exec(_)){j=a0.lastIndex,H=K[0],q=!0,yield{type:"NumericLiteral",value:K[0]};continue}if(e.lastIndex=j,K=e.exec(_)){if(j=e.lastIndex,H=K[0],K[1]==="${")H="?InterpolationInTemplate",B.push({tag:"InterpolationInTemplate",nesting:Z.length}),q=!1,yield{type:"TemplateHead",value:K[0]};else q=!0,yield{type:"NoSubstitutionTemplate",value:K[0],closed:K[1]==="`"};continue}break;case"JSXTag":case"JSXTagEnd":if(o0.lastIndex=j,K=o0.exec(_)){switch(j=o0.lastIndex,G=K[0],K[0]){case"<":B.push({tag:"JSXTag"});break;case">":if(B.pop(),H==="/"||W.tag==="JSXTagEnd")G="?JSX",q=!0;else B.push({tag:"JSXChildren"});break;case"{":B.push({tag:"InterpolationInJSX",nesting:Z.length}),G="?InterpolationInJSX",q=!1;break;case"/":if(H==="<"){if(B.pop(),B[B.length-1].tag==="JSXChildren")B.pop();B.push({tag:"JSXTagEnd"})}}H=G,yield{type:"JSXPunctuator",value:K[0]};continue}if(i0.lastIndex=j,K=i0.exec(_)){j=i0.lastIndex,H=K[0],yield{type:"JSXIdentifier",value:K[0]};continue}if(n0.lastIndex=j,K=n0.exec(_)){j=n0.lastIndex,H=K[0],yield{type:"JSXString",value:K[0],closed:K[2]!==void 0};continue}break;case"JSXChildren":if(r0.lastIndex=j,K=r0.exec(_)){j=r0.lastIndex,H=K[0],yield{type:"JSXText",value:K[0]};continue}switch(_[j]){case"<":B.push({tag:"JSXTag"}),j++,H="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":B.push({tag:"InterpolationInJSX",nesting:Z.length}),j++,H="?InterpolationInJSX",q=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(Z1.lastIndex=j,K=Z1.exec(_)){j=Z1.lastIndex,yield{type:"WhiteSpace",value:K[0]};continue}if(C0.lastIndex=j,K=C0.exec(_)){if(j=C0.lastIndex,q=!1,m1.test(H))H="?NoLineTerminatorHere";yield{type:"LineTerminatorSequence",value:K[0]};continue}if(s0.lastIndex=j,K=s0.exec(_)){if(j=s0.lastIndex,M_.test(K[0])){if(q=!1,m1.test(H))H="?NoLineTerminatorHere"}yield{type:"MultiLineComment",value:K[0],closed:K[1]!==void 0};continue}if(e0.lastIndex=j,K=e0.exec(_)){j=e0.lastIndex,q=!1,yield{type:"SingleLineComment",value:K[0]};continue}O=String.fromCodePoint(_.codePointAt(j)),j+=O.length,H=O,q=!1,yield{type:W.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:O}}return}});var D_=/^[A-Za-z]:\//;function K0(_=""){if(!_)return _;return _.replace(/\\/g,"/").replace(D_,(z)=>z.toUpperCase())}var v_=/^[/\\]{2}/,y_=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,i1=/^[A-Za-z]:$/,d1=/^\/([A-Za-z]:)?$/,S_=/.(\.[^./]+|\.)$/,f_=/^[/\\]|^[a-zA-Z]:[/\\]/;var o1=function(_){if(_.length===0)return".";_=K0(_);let z=_.match(v_),Z=l(_),O=_[_.length-1]==="/";if(_=j1(_,!Z),_.length===0){if(Z)return"/";return O?"./":"."}if(O)_+="/";if(i1.test(_))_+="/";if(z){if(!Z)return`//./${_}`;return`//${_}`}return Z&&!l(_)?`/${_}`:_},I_=function(..._){let z="";for(let Z of _){if(!Z)continue;if(z.length>0){let O=z[z.length-1]==="/",Q=Z[0]==="/";if(O&&Q)z+=Z.slice(1);else z+=O||Q?Z:`/${Z}`}else z+=Z}return o1(z)};function b_(){if(typeof process!=="undefined"&&typeof process.cwd==="function")return process.cwd().replace(/\\/g,"/");return"/"}var $0=function(..._){_=_.map((O)=>K0(O));let z="",Z=!1;for(let O=_.length-1;O>=-1&&!Z;O--){let Q=O>=0?_[O]:b_();if(!Q||Q.length===0)continue;z=`${Q}/${z}`,Z=l(Q)}if(z=j1(z,!Z),Z&&!l(z))return`/${z}`;return z.length>0?z:"."};function j1(_,z){let Z="",O=0,Q=-1,j=0,H=null;for(let $=0;$<=_.length;++$){if($<_.length)H=_[$];else if(H==="/")break;else H="/";if(H==="/"){if(Q===$-1||j===1);else if(j===2){if(Z.length<2||O!==2||Z[Z.length-1]!=="."||Z[Z.length-2]!=="."){if(Z.length>2){let K=Z.lastIndexOf("/");if(K===-1)Z="",O=0;else Z=Z.slice(0,K),O=Z.length-1-Z.lastIndexOf("/");Q=$,j=0;continue}else if(Z.length>0){Z="",O=0,Q=$,j=0;continue}}if(z)Z+=Z.length>0?"/..":"..",O=2}else{if(Z.length>0)Z+=`/${_.slice(Q+1,$)}`;else Z=_.slice(Q+1,$);O=$-Q-1}Q=$,j=0}else if(H==="."&&j!==-1)++j;else j=-1}return Z}var l=function(_){return y_.test(_)};var n1=function(_){if(_==="..")return"";let z=S_.exec(K0(_));return z&&z[1]||""},H1=function(_,z){let Z=$0(_).replace(d1,"$1").split("/"),O=$0(z).replace(d1,"$1").split("/");if(O[0][1]===":"&&Z[0][1]===":"&&Z[0]!==O[0])return O.join("/");let Q=[...Z];for(let j of Q){if(O[0]!==j)break;Z.shift(),O.shift()}return[...Z.map(()=>".."),...O].join("/")},r1=function(_){let z=K0(_).replace(/\/$/,"").split("/").slice(0,-1);if(z.length===1&&i1.test(z[0]))z[0]+="/";return z.join("/")||(l(_)?"/":".")};var s1=function(_,z){let Z=K0(_).split("/"),O="";for(let Q=Z.length-1;Q>=0;Q--){let j=Z[Q];if(j){O=j;break}}return z&&O.endsWith(z)?O.slice(0,-z.length):O},k_=function(_){let z=f_.exec(_)?.[0]?.replace(/\\/g,"/")||"",Z=s1(_),O=n1(Z);return{root:z,dir:r1(_),base:Z,ext:O,name:Z.slice(0,Z.length-O.length)}};var x_=/\d/,h_=["-","_","/","."];function g_(_=""){if(x_.test(_))return;return _!==_.toLowerCase()}function a1(_,z){let Z=z??h_,O=[];if(!_||typeof _!=="string")return O;let Q="",j,H;for(let $ of _){let K=Z.includes($);if(K===!0){O.push(Q),Q="",j=void 0;continue}let W=g_($);if(H===!1){if(j===!1&&W===!0){O.push(Q),Q=$,j=W;continue}if(j===!0&&W===!1&&Q.length>1){let Y=Q.at(-1);O.push(Q.slice(0,Math.max(0,Q.length-1))),Q=Y+$,j=W;continue}}Q+=$,j=W,H=K}return O.push(Q),O}function u_(_){return _?_[0].toUpperCase()+_.slice(1):""}function m_(_){return _?_[0].toLowerCase()+_.slice(1):""}function l_(_,z){return _?(Array.isArray(_)?_:a1(_)).map((Z)=>u_(z?.normalize?Z.toLowerCase():Z)).join(""):""}function R1(_,z){return m_(l_(_||"",z))}function T0(_,z){return _?(Array.isArray(_)?_:a1(_)).map((Z)=>Z.toLowerCase()).join(z??"-"):""}var _2=new Uint8Array(64),p_=new Uint8Array(128);for(let _=0;_<64;_++){let z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(_);_2[_]=z,p_[z]=_}function W0(_,z,Z){let O=z-Z;O=O<0?-O<<1|1:O<<1;do{let Q=O&31;if(O>>>=5,O>0)Q|=32;_.write(_2[Q])}while(O>0);return z}var t1=16384,e1=typeof TextDecoder!=="undefined"?new TextDecoder:typeof Buffer!=="undefined"?{decode(_){return Buffer.from(_.buffer,_.byteOffset,_.byteLength).toString()}}:{decode(_){let z="";for(let Z=0;Z<_.length;Z++)z+=String.fromCharCode(_[Z]);return z}};class z2{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(t1)}write(_){let{buffer:z}=this;if(z[this.pos++]=_,this.pos===t1)this.out+=e1.decode(z),this.pos=0}flush(){let{buffer:_,out:z,pos:Z}=this;return Z>0?z+e1.decode(_.subarray(0,Z)):z}}function Z2(_){let z=new z2,Z=0,O=0,Q=0,j=0;for(let H=0;H<_.length;H++){let $=_[H];if(H>0)z.write(59);if($.length===0)continue;let K=0;for(let W=0;W<$.length;W++){let Y=$[W];if(W>0)z.write(44);if(K=W0(z,Y[0],K),Y.length===1)continue;if(Z=W0(z,Y[1],Z),O=W0(z,Y[2],O),Q=W0(z,Y[3],Q),Y.length===4)continue;j=W0(z,Y[4],j)}}return z.flush()}class E0{constructor(_){this.bits=_ instanceof E0?_.bits.slice():[]}add(_){this.bits[_>>5]|=1<<(_&31)}has(_){return!!(this.bits[_>>5]&1<<(_&31))}}class G0{constructor(_,z,Z){this.start=_,this.end=z,this.original=Z,this.intro="",this.outro="",this.content=Z,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(_){this.outro+=_}appendRight(_){this.intro=this.intro+_}clone(){let _=new G0(this.start,this.end,this.original);return _.intro=this.intro,_.outro=this.outro,_.content=this.content,_.storeName=this.storeName,_.edited=this.edited,_}contains(_){return this.start<_&&_<this.end}eachNext(_){let z=this;while(z)_(z),z=z.next}eachPrevious(_){let z=this;while(z)_(z),z=z.previous}edit(_,z,Z){if(this.content=_,!Z)this.intro="",this.outro="";return this.storeName=z,this.edited=!0,this}prependLeft(_){this.outro=_+this.outro}prependRight(_){this.intro=_+this.intro}reset(){if(this.intro="",this.outro="",this.edited)this.content=this.original,this.storeName=!1,this.edited=!1}split(_){let z=_-this.start,Z=this.original.slice(0,z),O=this.original.slice(z);this.original=Z;let Q=new G0(_,this.end,O);if(Q.outro=this.outro,this.outro="",this.end=_,this.edited)Q.edit("",!1),this.content="";else this.content=Z;if(Q.next=this.next,Q.next)Q.next.previous=Q;return Q.previous=this,this.next=Q,Q}toString(){return this.intro+this.content+this.outro}trimEnd(_){if(this.outro=this.outro.replace(_,""),this.outro.length)return!0;let z=this.content.replace(_,"");if(z.length){if(z!==this.content){if(this.split(this.start+z.length).edit("",void 0,!0),this.edited)this.edit(z,this.storeName,!0)}return!0}else if(this.edit("",void 0,!0),this.intro=this.intro.replace(_,""),this.intro.length)return!0}trimStart(_){if(this.intro=this.intro.replace(_,""),this.intro.length)return!0;let z=this.content.replace(_,"");if(z.length){if(z!==this.content){let Z=this.split(this.end-z.length);if(this.edited)Z.edit(z,this.storeName,!0);this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(_,""),this.outro.length)return!0}}function c_(){if(typeof globalThis!=="undefined"&&typeof globalThis.btoa==="function")return(_)=>globalThis.btoa(unescape(encodeURIComponent(_)));else if(typeof Buffer==="function")return(_)=>Buffer.from(_,"utf-8").toString("base64");else return()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var d_=c_();class Q2{constructor(_){if(this.version=3,this.file=_.file,this.sources=_.sources,this.sourcesContent=_.sourcesContent,this.names=_.names,this.mappings=Z2(_.mappings),typeof _.x_google_ignoreList!=="undefined")this.x_google_ignoreList=_.x_google_ignoreList;if(typeof _.debugId!=="undefined")this.debugId=_.debugId}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+d_(this.toString())}}function i_(_){let z=_.split(`
|
|
1
|
+
import{Rc as QZ,Tc as ZZ}from"./chunk-2pj0cr49.js";var U_=ZZ((BO,N_)=>{var B_,d0,i0,o0,n0,r0,U0,m1,C0,s0,M_,a0,w0,t0,e0,_1,e,J_,z1,Z1,OZ;t0=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]?|[^\/[\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu;w0=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;d0=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu;_1=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y;a0=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y;e=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y;Z1=/[\t\v\f\ufeff\p{Zs}]+/yu;C0=/\r?\n|[\r\u2028\u2029]/y;s0=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y;e0=/\/\/.*/y;B_=/^#!.*/;o0=/[<>.:={}]|\/(?![\/*])/y;i0=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu;n0=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y;r0=/[^<>{}]+/y;z1=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;J_=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;U0=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;m1=/^(?:return|throw|yield)$/;M_=RegExp(C0.source);N_.exports=OZ=function*(_,{jsx:z=!1}={}){var Z,O,Q,j,H,$,K,W,Y,G,V,q,C,B;if({length:$}=_,j=0,H="",B=[{tag:"JS"}],Z=[],V=0,q=!1,K=B_.exec(_))yield{type:"HashbangComment",value:K[0]},j=K[0].length;while(j<$){switch(W=B[B.length-1],W.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(_[j]==="/"&&(z1.test(H)||U0.test(H))){if(t0.lastIndex=j,K=t0.exec(_)){j=t0.lastIndex,H=K[0],q=!0,yield{type:"RegularExpressionLiteral",value:K[0],closed:K[1]!==void 0&&K[1]!=="\\"};continue}}if(w0.lastIndex=j,K=w0.exec(_)){switch(C=K[0],Y=w0.lastIndex,G=C,C){case"(":if(H==="?NonExpressionParenKeyword")B.push({tag:"JSNonExpressionParen",nesting:V});V++,q=!1;break;case")":if(V--,q=!0,W.tag==="JSNonExpressionParen"&&V===W.nesting)B.pop(),G="?NonExpressionParenEnd",q=!1;break;case"{":w0.lastIndex=0,Q=!J_.test(H)&&(z1.test(H)||U0.test(H)),Z.push(Q),q=!1;break;case"}":switch(W.tag){case"InterpolationInTemplate":if(Z.length===W.nesting){if(e.lastIndex=j,K=e.exec(_),j=e.lastIndex,H=K[0],K[1]==="${")H="?InterpolationInTemplate",q=!1,yield{type:"TemplateMiddle",value:K[0]};else B.pop(),q=!0,yield{type:"TemplateTail",value:K[0],closed:K[1]==="`"};continue}break;case"InterpolationInJSX":if(Z.length===W.nesting){B.pop(),j+=1,H="}",yield{type:"JSXPunctuator",value:"}"};continue}}q=Z.pop(),G=q?"?ExpressionBraceEnd":"}";break;case"]":q=!0;break;case"++":case"--":G=q?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(z&&(z1.test(H)||U0.test(H))){B.push({tag:"JSXTag"}),j+=1,H="<",yield{type:"JSXPunctuator",value:C};continue}q=!1;break;default:q=!1}j=Y,H=G,yield{type:"Punctuator",value:C};continue}if(d0.lastIndex=j,K=d0.exec(_)){switch(j=d0.lastIndex,G=K[0],K[0]){case"for":case"if":case"while":case"with":if(H!=="."&&H!=="?.")G="?NonExpressionParenKeyword"}H=G,q=!U0.test(K[0]),yield{type:K[1]==="#"?"PrivateIdentifier":"IdentifierName",value:K[0]};continue}if(_1.lastIndex=j,K=_1.exec(_)){j=_1.lastIndex,H=K[0],q=!0,yield{type:"StringLiteral",value:K[0],closed:K[2]!==void 0};continue}if(a0.lastIndex=j,K=a0.exec(_)){j=a0.lastIndex,H=K[0],q=!0,yield{type:"NumericLiteral",value:K[0]};continue}if(e.lastIndex=j,K=e.exec(_)){if(j=e.lastIndex,H=K[0],K[1]==="${")H="?InterpolationInTemplate",B.push({tag:"InterpolationInTemplate",nesting:Z.length}),q=!1,yield{type:"TemplateHead",value:K[0]};else q=!0,yield{type:"NoSubstitutionTemplate",value:K[0],closed:K[1]==="`"};continue}break;case"JSXTag":case"JSXTagEnd":if(o0.lastIndex=j,K=o0.exec(_)){switch(j=o0.lastIndex,G=K[0],K[0]){case"<":B.push({tag:"JSXTag"});break;case">":if(B.pop(),H==="/"||W.tag==="JSXTagEnd")G="?JSX",q=!0;else B.push({tag:"JSXChildren"});break;case"{":B.push({tag:"InterpolationInJSX",nesting:Z.length}),G="?InterpolationInJSX",q=!1;break;case"/":if(H==="<"){if(B.pop(),B[B.length-1].tag==="JSXChildren")B.pop();B.push({tag:"JSXTagEnd"})}}H=G,yield{type:"JSXPunctuator",value:K[0]};continue}if(i0.lastIndex=j,K=i0.exec(_)){j=i0.lastIndex,H=K[0],yield{type:"JSXIdentifier",value:K[0]};continue}if(n0.lastIndex=j,K=n0.exec(_)){j=n0.lastIndex,H=K[0],yield{type:"JSXString",value:K[0],closed:K[2]!==void 0};continue}break;case"JSXChildren":if(r0.lastIndex=j,K=r0.exec(_)){j=r0.lastIndex,H=K[0],yield{type:"JSXText",value:K[0]};continue}switch(_[j]){case"<":B.push({tag:"JSXTag"}),j++,H="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":B.push({tag:"InterpolationInJSX",nesting:Z.length}),j++,H="?InterpolationInJSX",q=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(Z1.lastIndex=j,K=Z1.exec(_)){j=Z1.lastIndex,yield{type:"WhiteSpace",value:K[0]};continue}if(C0.lastIndex=j,K=C0.exec(_)){if(j=C0.lastIndex,q=!1,m1.test(H))H="?NoLineTerminatorHere";yield{type:"LineTerminatorSequence",value:K[0]};continue}if(s0.lastIndex=j,K=s0.exec(_)){if(j=s0.lastIndex,M_.test(K[0])){if(q=!1,m1.test(H))H="?NoLineTerminatorHere"}yield{type:"MultiLineComment",value:K[0],closed:K[1]!==void 0};continue}if(e0.lastIndex=j,K=e0.exec(_)){j=e0.lastIndex,q=!1,yield{type:"SingleLineComment",value:K[0]};continue}O=String.fromCodePoint(_.codePointAt(j)),j+=O.length,H=O,q=!1,yield{type:W.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:O}}return}});var D_=/^[A-Za-z]:\//;function K0(_=""){if(!_)return _;return _.replace(/\\/g,"/").replace(D_,(z)=>z.toUpperCase())}var v_=/^[/\\]{2}/,y_=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,i1=/^[A-Za-z]:$/,d1=/^\/([A-Za-z]:)?$/,S_=/.(\.[^./]+|\.)$/,f_=/^[/\\]|^[a-zA-Z]:[/\\]/;var o1=function(_){if(_.length===0)return".";_=K0(_);let z=_.match(v_),Z=l(_),O=_[_.length-1]==="/";if(_=j1(_,!Z),_.length===0){if(Z)return"/";return O?"./":"."}if(O)_+="/";if(i1.test(_))_+="/";if(z){if(!Z)return`//./${_}`;return`//${_}`}return Z&&!l(_)?`/${_}`:_},I_=function(..._){let z="";for(let Z of _){if(!Z)continue;if(z.length>0){let O=z[z.length-1]==="/",Q=Z[0]==="/";if(O&&Q)z+=Z.slice(1);else z+=O||Q?Z:`/${Z}`}else z+=Z}return o1(z)};function b_(){if(typeof process!=="undefined"&&typeof process.cwd==="function")return process.cwd().replace(/\\/g,"/");return"/"}var $0=function(..._){_=_.map((O)=>K0(O));let z="",Z=!1;for(let O=_.length-1;O>=-1&&!Z;O--){let Q=O>=0?_[O]:b_();if(!Q||Q.length===0)continue;z=`${Q}/${z}`,Z=l(Q)}if(z=j1(z,!Z),Z&&!l(z))return`/${z}`;return z.length>0?z:"."};function j1(_,z){let Z="",O=0,Q=-1,j=0,H=null;for(let $=0;$<=_.length;++$){if($<_.length)H=_[$];else if(H==="/")break;else H="/";if(H==="/"){if(Q===$-1||j===1);else if(j===2){if(Z.length<2||O!==2||Z[Z.length-1]!=="."||Z[Z.length-2]!=="."){if(Z.length>2){let K=Z.lastIndexOf("/");if(K===-1)Z="",O=0;else Z=Z.slice(0,K),O=Z.length-1-Z.lastIndexOf("/");Q=$,j=0;continue}else if(Z.length>0){Z="",O=0,Q=$,j=0;continue}}if(z)Z+=Z.length>0?"/..":"..",O=2}else{if(Z.length>0)Z+=`/${_.slice(Q+1,$)}`;else Z=_.slice(Q+1,$);O=$-Q-1}Q=$,j=0}else if(H==="."&&j!==-1)++j;else j=-1}return Z}var l=function(_){return y_.test(_)};var n1=function(_){if(_==="..")return"";let z=S_.exec(K0(_));return z&&z[1]||""},H1=function(_,z){let Z=$0(_).replace(d1,"$1").split("/"),O=$0(z).replace(d1,"$1").split("/");if(O[0][1]===":"&&Z[0][1]===":"&&Z[0]!==O[0])return O.join("/");let Q=[...Z];for(let j of Q){if(O[0]!==j)break;Z.shift(),O.shift()}return[...Z.map(()=>".."),...O].join("/")},r1=function(_){let z=K0(_).replace(/\/$/,"").split("/").slice(0,-1);if(z.length===1&&i1.test(z[0]))z[0]+="/";return z.join("/")||(l(_)?"/":".")};var s1=function(_,z){let Z=K0(_).split("/"),O="";for(let Q=Z.length-1;Q>=0;Q--){let j=Z[Q];if(j){O=j;break}}return z&&O.endsWith(z)?O.slice(0,-z.length):O},k_=function(_){let z=f_.exec(_)?.[0]?.replace(/\\/g,"/")||"",Z=s1(_),O=n1(Z);return{root:z,dir:r1(_),base:Z,ext:O,name:Z.slice(0,Z.length-O.length)}};var x_=/\d/,h_=["-","_","/","."];function g_(_=""){if(x_.test(_))return;return _!==_.toLowerCase()}function a1(_,z){let Z=z??h_,O=[];if(!_||typeof _!=="string")return O;let Q="",j,H;for(let $ of _){let K=Z.includes($);if(K===!0){O.push(Q),Q="",j=void 0;continue}let W=g_($);if(H===!1){if(j===!1&&W===!0){O.push(Q),Q=$,j=W;continue}if(j===!0&&W===!1&&Q.length>1){let Y=Q.at(-1);O.push(Q.slice(0,Math.max(0,Q.length-1))),Q=Y+$,j=W;continue}}Q+=$,j=W,H=K}return O.push(Q),O}function u_(_){return _?_[0].toUpperCase()+_.slice(1):""}function m_(_){return _?_[0].toLowerCase()+_.slice(1):""}function l_(_,z){return _?(Array.isArray(_)?_:a1(_)).map((Z)=>u_(z?.normalize?Z.toLowerCase():Z)).join(""):""}function R1(_,z){return m_(l_(_||"",z))}function T0(_,z){return _?(Array.isArray(_)?_:a1(_)).map((Z)=>Z.toLowerCase()).join(z??"-"):""}var _2=new Uint8Array(64),p_=new Uint8Array(128);for(let _=0;_<64;_++){let z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(_);_2[_]=z,p_[z]=_}function W0(_,z,Z){let O=z-Z;O=O<0?-O<<1|1:O<<1;do{let Q=O&31;if(O>>>=5,O>0)Q|=32;_.write(_2[Q])}while(O>0);return z}var t1=16384,e1=typeof TextDecoder!=="undefined"?new TextDecoder:typeof Buffer!=="undefined"?{decode(_){return Buffer.from(_.buffer,_.byteOffset,_.byteLength).toString()}}:{decode(_){let z="";for(let Z=0;Z<_.length;Z++)z+=String.fromCharCode(_[Z]);return z}};class z2{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(t1)}write(_){let{buffer:z}=this;if(z[this.pos++]=_,this.pos===t1)this.out+=e1.decode(z),this.pos=0}flush(){let{buffer:_,out:z,pos:Z}=this;return Z>0?z+e1.decode(_.subarray(0,Z)):z}}function Z2(_){let z=new z2,Z=0,O=0,Q=0,j=0;for(let H=0;H<_.length;H++){let $=_[H];if(H>0)z.write(59);if($.length===0)continue;let K=0;for(let W=0;W<$.length;W++){let Y=$[W];if(W>0)z.write(44);if(K=W0(z,Y[0],K),Y.length===1)continue;if(Z=W0(z,Y[1],Z),O=W0(z,Y[2],O),Q=W0(z,Y[3],Q),Y.length===4)continue;j=W0(z,Y[4],j)}}return z.flush()}class E0{constructor(_){this.bits=_ instanceof E0?_.bits.slice():[]}add(_){this.bits[_>>5]|=1<<(_&31)}has(_){return!!(this.bits[_>>5]&1<<(_&31))}}class G0{constructor(_,z,Z){this.start=_,this.end=z,this.original=Z,this.intro="",this.outro="",this.content=Z,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(_){this.outro+=_}appendRight(_){this.intro=this.intro+_}clone(){let _=new G0(this.start,this.end,this.original);return _.intro=this.intro,_.outro=this.outro,_.content=this.content,_.storeName=this.storeName,_.edited=this.edited,_}contains(_){return this.start<_&&_<this.end}eachNext(_){let z=this;while(z)_(z),z=z.next}eachPrevious(_){let z=this;while(z)_(z),z=z.previous}edit(_,z,Z){if(this.content=_,!Z)this.intro="",this.outro="";return this.storeName=z,this.edited=!0,this}prependLeft(_){this.outro=_+this.outro}prependRight(_){this.intro=_+this.intro}reset(){if(this.intro="",this.outro="",this.edited)this.content=this.original,this.storeName=!1,this.edited=!1}split(_){let z=_-this.start,Z=this.original.slice(0,z),O=this.original.slice(z);this.original=Z;let Q=new G0(_,this.end,O);if(Q.outro=this.outro,this.outro="",this.end=_,this.edited)Q.edit("",!1),this.content="";else this.content=Z;if(Q.next=this.next,Q.next)Q.next.previous=Q;return Q.previous=this,this.next=Q,Q}toString(){return this.intro+this.content+this.outro}trimEnd(_){if(this.outro=this.outro.replace(_,""),this.outro.length)return!0;let z=this.content.replace(_,"");if(z.length){if(z!==this.content){if(this.split(this.start+z.length).edit("",void 0,!0),this.edited)this.edit(z,this.storeName,!0)}return!0}else if(this.edit("",void 0,!0),this.intro=this.intro.replace(_,""),this.intro.length)return!0}trimStart(_){if(this.intro=this.intro.replace(_,""),this.intro.length)return!0;let z=this.content.replace(_,"");if(z.length){if(z!==this.content){let Z=this.split(this.end-z.length);if(this.edited)Z.edit(z,this.storeName,!0);this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(_,""),this.outro.length)return!0}}function c_(){if(typeof globalThis!=="undefined"&&typeof globalThis.btoa==="function")return(_)=>globalThis.btoa(unescape(encodeURIComponent(_)));else if(typeof Buffer==="function")return(_)=>Buffer.from(_,"utf-8").toString("base64");else return()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var d_=c_();class Q2{constructor(_){if(this.version=3,this.file=_.file,this.sources=_.sources,this.sourcesContent=_.sourcesContent,this.names=_.names,this.mappings=Z2(_.mappings),typeof _.x_google_ignoreList!=="undefined")this.x_google_ignoreList=_.x_google_ignoreList;if(typeof _.debugId!=="undefined")this.debugId=_.debugId}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+d_(this.toString())}}function i_(_){let z=_.split(`
|
|
2
2
|
`),Z=z.filter((j)=>/^\t+/.test(j)),O=z.filter((j)=>/^ {2,}/.test(j));if(Z.length===0&&O.length===0)return null;if(Z.length>=O.length)return"\t";let Q=O.reduce((j,H)=>{let $=/^ +/.exec(H)[0].length;return Math.min($,j)},1/0);return new Array(Q+1).join(" ")}function o_(_,z){let Z=_.split(/[/\\]/),O=z.split(/[/\\]/);Z.pop();while(Z[0]===O[0])Z.shift(),O.shift();if(Z.length){let Q=Z.length;while(Q--)Z[Q]=".."}return Z.concat(O).join("/")}var n_=Object.prototype.toString;function r_(_){return n_.call(_)==="[object Object]"}function O2(_){let z=_.split(`
|
|
3
3
|
`),Z=[];for(let O=0,Q=0;O<z.length;O++)Z.push(Q),Q+=z[O].length+1;return function O(Q){let j=0,H=Z.length;while(j<H){let W=j+H>>1;if(Q<Z[W])H=W;else j=W+1}let $=j-1,K=Q-Z[$];return{line:$,column:K}}}var s_=/\w/;class j2{constructor(_){this.hires=_,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(_,z,Z,O){if(z.length){let Q=z.length-1,j=z.indexOf(`
|
|
4
4
|
`,0),H=-1;while(j>=0&&Q>j){let K=[this.generatedCodeColumn,_,Z.line,Z.column];if(O>=0)K.push(O);this.rawSegments.push(K),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,H=j,j=z.indexOf(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ga as I2,Ha as O2}from"./chunk-6v69415e.js";import"./chunk-
|
|
2
|
+
import{Ga as I2,Ha as O2}from"./chunk-6v69415e.js";import"./chunk-2pj0cr49.js";/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function E2(z){return typeof z>"u"||z===null}function c2(z){return typeof z=="object"&&z!==null}function f2(z){return Array.isArray(z)?z:E2(z)?[]:[z]}function u2(z,J){var Q,X,V,$;if(J)for($=Object.keys(J),Q=0,X=$.length;Q<X;Q+=1)V=$[Q],z[V]=J[V];return z}function o2(z,J){var Q="",X;for(X=0;X<J;X+=1)Q+=z;return Q}function l2(z){return z===0&&Number.NEGATIVE_INFINITY===1/z}var r2=E2,i2=c2,n2=f2,e2=o2,z3=l2,J3=u2,D={isNothing:r2,isObject:i2,toArray:n2,repeat:e2,isNegativeZero:z3,extend:J3};function T2(z,J){var Q="",X=z.reason||"(unknown reason)";return z.mark?(z.mark.name&&(Q+='in "'+z.mark.name+'" '),Q+="("+(z.mark.line+1)+":"+(z.mark.column+1)+")",!J&&z.mark.snippet&&(Q+=`
|
|
3
3
|
|
|
4
4
|
`+z.mark.snippet),X+" "+Q):X}function v(z,J){Error.call(this),this.name="YAMLException",this.reason=z,this.mark=J,this.message=T2(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}v.prototype=Object.create(Error.prototype),v.prototype.constructor=v,v.prototype.toString=function(z){return this.name+": "+T2(this,z)};var O=v;function l(z,J,Q,X,V){var $="",Z="",q=Math.floor(V/2)-1;return X-J>q&&($=" ... ",J=X-q+$.length),Q-X>q&&(Z=" ...",Q=X+q-Z.length),{str:$+z.slice(J,Q).replace(/\t/g,"\u2192")+Z,pos:X-J+$.length}}function r(z,J){return D.repeat(" ",J-z.length)+z}function Q3(z,J){if(J=Object.create(J||null),!z.buffer)return null;J.maxLength||(J.maxLength=79),typeof J.indent!="number"&&(J.indent=1),typeof J.linesBefore!="number"&&(J.linesBefore=3),typeof J.linesAfter!="number"&&(J.linesAfter=2);for(var Q=/\r?\n|\r|\0/g,X=[0],V=[],$,Z=-1;$=Q.exec(z.buffer);)V.push($.index),X.push($.index+$[0].length),z.position<=$.index&&Z<0&&(Z=X.length-2);Z<0&&(Z=X.length-1);var q="",G,K,H=Math.min(z.line+J.linesAfter,V.length).toString().length,W=J.maxLength-(J.indent+H+3);for(G=1;G<=J.linesBefore&&!(Z-G<0);G++)K=l(z.buffer,X[Z-G],V[Z-G],z.position-(X[Z]-X[Z-G]),W),q=D.repeat(" ",J.indent)+r((z.line-G+1).toString(),H)+" | "+K.str+`
|
|
5
5
|
`+q;for(K=l(z.buffer,X[Z],V[Z],z.position,W),q+=D.repeat(" ",J.indent)+r((z.line+1).toString(),H)+" | "+K.str+`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Rc as sJ,Tc as X,Wc as Q}from"./chunk-2pj0cr49.js";var u=X((SE)=>{SE.fromCallback=function(q){return Object.defineProperty(function(...n){if(typeof n[n.length-1]==="function")q.apply(this,n);else return new Promise((E,y)=>{n.push((J,O)=>J!=null?y(J):E(O)),q.apply(this,n)})},"name",{value:q.name})};SE.fromPromise=function(q){return Object.defineProperty(function(...n){let E=n[n.length-1];if(typeof E!=="function")return q.apply(this,n);else n.pop(),q.apply(this,n).then((y)=>E(null,y),E)},"name",{value:q.name})}});var hq=X((UO,iq)=>{var f=Q("node:constants"),iE=process.cwd,Pq=null,hE=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!Pq)Pq=iE.call(process);return Pq};try{process.cwd()}catch(q){}if(typeof process.chdir==="function"){if(Aq=process.chdir,process.chdir=function(q){Pq=null,Aq.call(process,q)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,Aq)}var Aq;iq.exports=lE;function lE(q){if(f.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))n(q);if(!q.lutimes)E(q);if(q.chown=O(q.chown),q.fchown=O(q.fchown),q.lchown=O(q.lchown),q.chmod=y(q.chmod),q.fchmod=y(q.fchmod),q.lchmod=y(q.lchmod),q.chownSync=_(q.chownSync),q.fchownSync=_(q.fchownSync),q.lchownSync=_(q.lchownSync),q.chmodSync=J(q.chmodSync),q.fchmodSync=J(q.fchmodSync),q.lchmodSync=J(q.lchmodSync),q.stat=U(q.stat),q.fstat=U(q.fstat),q.lstat=U(q.lstat),q.statSync=j(q.statSync),q.fstatSync=j(q.fstatSync),q.lstatSync=j(q.lstatSync),q.chmod&&!q.lchmod)q.lchmod=function(V,A,L){if(L)process.nextTick(L)},q.lchmodSync=function(){};if(q.chown&&!q.lchown)q.lchown=function(V,A,L,K){if(K)process.nextTick(K)},q.lchownSync=function(){};if(hE==="win32")q.rename=typeof q.rename!=="function"?q.rename:function(V){function A(L,K,P){var N=Date.now(),C=0;V(L,K,function R(h){if(h&&(h.code==="EACCES"||h.code==="EPERM"||h.code==="EBUSY")&&Date.now()-N<60000){if(setTimeout(function(){q.stat(K,function(m,Jq){if(m&&m.code==="ENOENT")V(L,K,R);else P(h)})},C),C<100)C+=10;return}if(P)P(h)})}if(Object.setPrototypeOf)Object.setPrototypeOf(A,V);return A}(q.rename);q.read=typeof q.read!=="function"?q.read:function(V){function A(L,K,P,N,C,R){var h;if(R&&typeof R==="function"){var m=0;h=function(Jq,gq,bq){if(Jq&&Jq.code==="EAGAIN"&&m<10)return m++,V.call(q,L,K,P,N,C,h);R.apply(this,arguments)}}return V.call(q,L,K,P,N,C,h)}if(Object.setPrototypeOf)Object.setPrototypeOf(A,V);return A}(q.read),q.readSync=typeof q.readSync!=="function"?q.readSync:function(V){return function(A,L,K,P,N){var C=0;while(!0)try{return V.call(q,A,L,K,P,N)}catch(R){if(R.code==="EAGAIN"&&C<10){C++;continue}throw R}}}(q.readSync);function n(V){V.lchmod=function(A,L,K){V.open(A,f.O_WRONLY|f.O_SYMLINK,L,function(P,N){if(P){if(K)K(P);return}V.fchmod(N,L,function(C){V.close(N,function(R){if(K)K(C||R)})})})},V.lchmodSync=function(A,L){var K=V.openSync(A,f.O_WRONLY|f.O_SYMLINK,L),P=!0,N;try{N=V.fchmodSync(K,L),P=!1}finally{if(P)try{V.closeSync(K)}catch(C){}else V.closeSync(K)}return N}}function E(V){if(f.hasOwnProperty("O_SYMLINK")&&V.futimes)V.lutimes=function(A,L,K,P){V.open(A,f.O_SYMLINK,function(N,C){if(N){if(P)P(N);return}V.futimes(C,L,K,function(R){V.close(C,function(h){if(P)P(R||h)})})})},V.lutimesSync=function(A,L,K){var P=V.openSync(A,f.O_SYMLINK),N,C=!0;try{N=V.futimesSync(P,L,K),C=!1}finally{if(C)try{V.closeSync(P)}catch(R){}else V.closeSync(P)}return N};else if(V.futimes)V.lutimes=function(A,L,K,P){if(P)process.nextTick(P)},V.lutimesSync=function(){}}function y(V){if(!V)return V;return function(A,L,K){return V.call(q,A,L,function(P){if($(P))P=null;if(K)K.apply(this,arguments)})}}function J(V){if(!V)return V;return function(A,L){try{return V.call(q,A,L)}catch(K){if(!$(K))throw K}}}function O(V){if(!V)return V;return function(A,L,K,P){return V.call(q,A,L,K,function(N){if($(N))N=null;if(P)P.apply(this,arguments)})}}function _(V){if(!V)return V;return function(A,L,K){try{return V.call(q,A,L,K)}catch(P){if(!$(P))throw P}}}function U(V){if(!V)return V;return function(A,L,K){if(typeof L==="function")K=L,L=null;function P(N,C){if(C){if(C.uid<0)C.uid+=4294967296;if(C.gid<0)C.gid+=4294967296}if(K)K.apply(this,arguments)}return L?V.call(q,A,L,P):V.call(q,A,P)}}function j(V){if(!V)return V;return function(A,L){var K=L?V.call(q,A,L):V.call(q,A);if(K){if(K.uid<0)K.uid+=4294967296;if(K.gid<0)K.gid+=4294967296}return K}}function $(V){if(!V)return!0;if(V.code==="ENOSYS")return!0;var A=!process.getuid||process.getuid()!==0;if(A){if(V.code==="EINVAL"||V.code==="EPERM")return!0}return!1}}});var cq=X((zO,pq)=>{var lq=Q("node:stream").Stream;pq.exports=pE;function pE(q){return{ReadStream:n,WriteStream:E};function n(y,J){if(!(this instanceof n))return new n(y,J);lq.call(this);var O=this;this.path=y,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,J=J||{};var _=Object.keys(J);for(var U=0,j=_.length;U<j;U++){var $=_[U];this[$]=J[$]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){O._read()});return}q.open(this.path,this.flags,this.mode,function(V,A){if(V){O.emit("error",V),O.readable=!1;return}O.fd=A,O.emit("open",A),O._read()})}function E(y,J){if(!(this instanceof E))return new E(y,J);lq.call(this),this.path=y,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,J=J||{};var O=Object.keys(J);for(var _=0,U=O.length;_<U;_++){var j=O[_];this[j]=J[j]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=q.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var fq=X((LO,oq)=>{oq.exports=oE;var cE=Object.getPrototypeOf||function(q){return q.__proto__};function oE(q){if(q===null||typeof q!=="object")return q;if(q instanceof Object)var n={__proto__:cE(q)};else var n=Object.create(null);return Object.getOwnPropertyNames(q).forEach(function(E){Object.defineProperty(n,E,Object.getOwnPropertyDescriptor(q,E))}),n}});var qq=X((PO,Iq)=>{var B=Q("node:fs"),fE=hq(),dE=cq(),rE=fq(),Gq=Q("node:util"),F,Yq;if(typeof Symbol==="function"&&typeof Symbol.for==="function")F=Symbol.for("graceful-fs.queue"),Yq=Symbol.for("graceful-fs.previous");else F="___graceful-fs.queue",Yq="___graceful-fs.previous";function aE(){}function rq(q,n){Object.defineProperty(q,F,{get:function(){return n}})}var e=aE;if(Gq.debuglog)e=Gq.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))e=function(){var q=Gq.format.apply(Gq,arguments);q="GFS4: "+q.split(/\n/).join(`
|
|
3
3
|
GFS4: `),console.error(q)};if(!B[F]){if(wq=global[F]||[],rq(B,wq),B.close=function(q){function n(E,y){return q.call(B,E,function(J){if(!J)dq();if(typeof y==="function")y.apply(this,arguments)})}return Object.defineProperty(n,Yq,{value:q}),n}(B.close),B.closeSync=function(q){function n(E){q.apply(B,arguments),dq()}return Object.defineProperty(n,Yq,{value:q}),n}(B.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){e(B[F]),Q("node:assert").equal(B[F].length,0)})}var wq;if(!global[F])rq(global,B[F]);Iq.exports=Bq(rE(B));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!B.__patched)Iq.exports=Bq(B),B.__patched=!0;function Bq(q){fE(q),q.gracefulify=Bq,q.createReadStream=gq,q.createWriteStream=bq;var n=q.readFile;q.readFile=E;function E(z,Z,Y){if(typeof Z==="function")Y=Z,Z=null;return M(z,Z,Y);function M(T,I,w,D){return n(T,I,function(H){if(H&&(H.code==="EMFILE"||H.code==="ENFILE"))s([M,[T,I,w],H,D||Date.now(),Date.now()]);else if(typeof w==="function")w.apply(this,arguments)})}}var y=q.writeFile;q.writeFile=J;function J(z,Z,Y,M){if(typeof Y==="function")M=Y,Y=null;return T(z,Z,Y,M);function T(I,w,D,H,k){return y(I,w,D,function(x){if(x&&(x.code==="EMFILE"||x.code==="ENFILE"))s([T,[I,w,D,H],x,k||Date.now(),Date.now()]);else if(typeof H==="function")H.apply(this,arguments)})}}var O=q.appendFile;if(O)q.appendFile=_;function _(z,Z,Y,M){if(typeof Y==="function")M=Y,Y=null;return T(z,Z,Y,M);function T(I,w,D,H,k){return O(I,w,D,function(x){if(x&&(x.code==="EMFILE"||x.code==="ENFILE"))s([T,[I,w,D,H],x,k||Date.now(),Date.now()]);else if(typeof H==="function")H.apply(this,arguments)})}}var U=q.copyFile;if(U)q.copyFile=j;function j(z,Z,Y,M){if(typeof Y==="function")M=Y,Y=0;return T(z,Z,Y,M);function T(I,w,D,H,k){return U(I,w,D,function(x){if(x&&(x.code==="EMFILE"||x.code==="ENFILE"))s([T,[I,w,D,H],x,k||Date.now(),Date.now()]);else if(typeof H==="function")H.apply(this,arguments)})}}var $=q.readdir;q.readdir=A;var V=/^v[0-5]\./;function A(z,Z,Y){if(typeof Z==="function")Y=Z,Z=null;var M=V.test(process.version)?function I(w,D,H,k){return $(w,T(w,D,H,k))}:function I(w,D,H,k){return $(w,D,T(w,D,H,k))};return M(z,Z,Y);function T(I,w,D,H){return function(k,x){if(k&&(k.code==="EMFILE"||k.code==="ENFILE"))s([M,[I,w,D],k,H||Date.now(),Date.now()]);else{if(x&&x.sort)x.sort();if(typeof D==="function")D.call(this,k,x)}}}}if(process.version.substr(0,4)==="v0.8"){var L=dE(q);R=L.ReadStream,m=L.WriteStream}var K=q.ReadStream;if(K)R.prototype=Object.create(K.prototype),R.prototype.open=h;var P=q.WriteStream;if(P)m.prototype=Object.create(P.prototype),m.prototype.open=Jq;Object.defineProperty(q,"ReadStream",{get:function(){return R},set:function(z){R=z},enumerable:!0,configurable:!0}),Object.defineProperty(q,"WriteStream",{get:function(){return m},set:function(z){m=z},enumerable:!0,configurable:!0});var N=R;Object.defineProperty(q,"FileReadStream",{get:function(){return N},set:function(z){N=z},enumerable:!0,configurable:!0});var C=m;Object.defineProperty(q,"FileWriteStream",{get:function(){return C},set:function(z){C=z},enumerable:!0,configurable:!0});function R(z,Z){if(this instanceof R)return K.apply(this,arguments),this;else return R.apply(Object.create(R.prototype),arguments)}function h(){var z=this;Rq(z.path,z.flags,z.mode,function(Z,Y){if(Z){if(z.autoClose)z.destroy();z.emit("error",Z)}else z.fd=Y,z.emit("open",Y),z.read()})}function m(z,Z){if(this instanceof m)return P.apply(this,arguments),this;else return m.apply(Object.create(m.prototype),arguments)}function Jq(){var z=this;Rq(z.path,z.flags,z.mode,function(Z,Y){if(Z)z.destroy(),z.emit("error",Z);else z.fd=Y,z.emit("open",Y)})}function gq(z,Z){return new q.ReadStream(z,Z)}function bq(z,Z){return new q.WriteStream(z,Z)}var mE=q.open;q.open=Rq;function Rq(z,Z,Y,M){if(typeof Y==="function")M=Y,Y=null;return T(z,Z,Y,M);function T(I,w,D,H,k){return mE(I,w,D,function(x,VO){if(x&&(x.code==="EMFILE"||x.code==="ENFILE"))s([T,[I,w,D,H],x,k||Date.now(),Date.now()]);else if(typeof H==="function")H.apply(this,arguments)})}}return q}function s(q){e("ENQUEUE",q[0].name,q[1]),B[F].push(q),Dq()}var Xq;function dq(){var q=Date.now();for(var n=0;n<B[F].length;++n)if(B[F][n].length>2)B[F][n][3]=q,B[F][n][4]=q;Dq()}function Dq(){if(clearTimeout(Xq),Xq=void 0,B[F].length===0)return;var q=B[F].shift(),n=q[0],E=q[1],y=q[2],J=q[3],O=q[4];if(J===void 0)e("RETRY",n.name,E),n.apply(null,E);else if(Date.now()-J>=60000){e("TIMEOUT",n.name,E);var _=E.pop();if(typeof _==="function")_.call(null,y)}else{var U=Date.now()-O,j=Math.max(O-J,1),$=Math.min(j*1.2,100);if(U>=$)e("RETRY",n.name,E),n.apply(null,E.concat([J]));else B[F].push(q)}if(Xq===void 0)Xq=setTimeout(Dq,0)}});var g=X((uq)=>{var aq=u().fromCallback,S=qq(),eE=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter((q)=>{return typeof S[q]==="function"});Object.assign(uq,S);eE.forEach((q)=>{uq[q]=aq(S[q])});uq.exists=function(q,n){if(typeof n==="function")return S.exists(q,n);return new Promise((E)=>{return S.exists(q,E)})};uq.read=function(q,n,E,y,J,O){if(typeof O==="function")return S.read(q,n,E,y,J,O);return new Promise((_,U)=>{S.read(q,n,E,y,J,(j,$,V)=>{if(j)return U(j);_({bytesRead:$,buffer:V})})})};uq.write=function(q,n,...E){if(typeof E[E.length-1]==="function")return S.write(q,n,...E);return new Promise((y,J)=>{S.write(q,n,...E,(O,_,U)=>{if(O)return J(O);y({bytesWritten:_,buffer:U})})})};uq.readv=function(q,n,...E){if(typeof E[E.length-1]==="function")return S.readv(q,n,...E);return new Promise((y,J)=>{S.readv(q,n,...E,(O,_,U)=>{if(O)return J(O);y({bytesRead:_,buffers:U})})})};uq.writev=function(q,n,...E){if(typeof E[E.length-1]==="function")return S.writev(q,n,...E);return new Promise((y,J)=>{S.writev(q,n,...E,(O,_,U)=>{if(O)return J(O);y({bytesWritten:_,buffers:U})})})};if(typeof S.realpath.native==="function")uq.realpath.native=aq(S.realpath.native);else process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var tq=X((Jy,eq)=>{var yy=Q("node:path");Jy.checkPath=function q(n){if(process.platform==="win32"){if(/[<>:"|?*]/.test(n.replace(yy.parse(n).root,""))){let y=new Error(`Path contains invalid characters: ${n}`);throw y.code="EINVAL",y}}}});var En=X((_y,Qq)=>{var sq=g(),{checkPath:qn}=tq(),nn=(q)=>{let n={mode:511};if(typeof q==="number")return q;return{...n,...q}.mode};_y.makeDir=async(q,n)=>{return qn(q),sq.mkdir(q,{mode:nn(n),recursive:!0})};_y.makeDirSync=(q,n)=>{return qn(q),sq.mkdirSync(q,{mode:nn(n),recursive:!0})}});var l=X((XO,yn)=>{var Uy=u().fromPromise,{makeDir:zy,makeDirSync:Wq}=En(),Mq=Uy(zy);yn.exports={mkdirs:Mq,mkdirsSync:Wq,mkdirp:Mq,mkdirpSync:Wq,ensureDir:Mq,ensureDirSync:Wq}});var d=X((YO,On)=>{var Ly=u().fromPromise,Jn=g();function Py(q){return Jn.access(q).then(()=>!0).catch(()=>!1)}On.exports={pathExists:Ly(Py),pathExistsSync:Jn.existsSync}});var Tq=X((ZO,_n)=>{var nq=g(),Ay=u().fromPromise;async function Gy(q,n,E){let y=await nq.open(q,"r+"),J=null;try{await nq.futimes(y,n,E)}finally{try{await nq.close(y)}catch(O){J=O}}if(J)throw J}function Xy(q,n,E){let y=nq.openSync(q,"r+");return nq.futimesSync(y,n,E),nq.closeSync(y)}_n.exports={utimesMillis:Ay(Gy),utimesMillisSync:Xy}});var t=X((CO,zn)=>{var Eq=g(),W=Q("node:path"),Vn=u().fromPromise;function Yy(q,n,E){let y=E.dereference?(J)=>Eq.stat(J,{bigint:!0}):(J)=>Eq.lstat(J,{bigint:!0});return Promise.all([y(q),y(n).catch((J)=>{if(J.code==="ENOENT")return null;throw J})]).then(([J,O])=>({srcStat:J,destStat:O}))}function Zy(q,n,E){let y,J=E.dereference?(_)=>Eq.statSync(_,{bigint:!0}):(_)=>Eq.lstatSync(_,{bigint:!0}),O=J(q);try{y=J(n)}catch(_){if(_.code==="ENOENT")return{srcStat:O,destStat:null};throw _}return{srcStat:O,destStat:y}}async function Cy(q,n,E,y){let{srcStat:J,destStat:O}=await Yy(q,n,y);if(O){if(Oq(J,O)){let _=W.basename(q),U=W.basename(n);if(E==="move"&&_!==U&&_.toLowerCase()===U.toLowerCase())return{srcStat:J,destStat:O,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(J.isDirectory()&&!O.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${q}'.`);if(!J.isDirectory()&&O.isDirectory())throw new Error(`Cannot overwrite directory '${n}' with non-directory '${q}'.`)}if(J.isDirectory()&&kq(q,n))throw new Error(Zq(q,n,E));return{srcStat:J,destStat:O}}function Hy(q,n,E,y){let{srcStat:J,destStat:O}=Zy(q,n,y);if(O){if(Oq(J,O)){let _=W.basename(q),U=W.basename(n);if(E==="move"&&_!==U&&_.toLowerCase()===U.toLowerCase())return{srcStat:J,destStat:O,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(J.isDirectory()&&!O.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${q}'.`);if(!J.isDirectory()&&O.isDirectory())throw new Error(`Cannot overwrite directory '${n}' with non-directory '${q}'.`)}if(J.isDirectory()&&kq(q,n))throw new Error(Zq(q,n,E));return{srcStat:J,destStat:O}}async function Kn(q,n,E,y){let J=W.resolve(W.dirname(q)),O=W.resolve(W.dirname(E));if(O===J||O===W.parse(O).root)return;let _;try{_=await Eq.stat(O,{bigint:!0})}catch(U){if(U.code==="ENOENT")return;throw U}if(Oq(n,_))throw new Error(Zq(q,E,y));return Kn(q,n,O,y)}function Un(q,n,E,y){let J=W.resolve(W.dirname(q)),O=W.resolve(W.dirname(E));if(O===J||O===W.parse(O).root)return;let _;try{_=Eq.statSync(O,{bigint:!0})}catch(U){if(U.code==="ENOENT")return;throw U}if(Oq(n,_))throw new Error(Zq(q,E,y));return Un(q,n,O,y)}function Oq(q,n){return n.ino&&n.dev&&n.ino===q.ino&&n.dev===q.dev}function kq(q,n){let E=W.resolve(q).split(W.sep).filter((J)=>J),y=W.resolve(n).split(W.sep).filter((J)=>J);return E.every((J,O)=>y[O]===J)}function Zq(q,n,E){return`Cannot ${E} '${q}' to a subdirectory of itself, '${n}'.`}zn.exports={checkPaths:Vn(Cy),checkPathsSync:Hy,checkParentPaths:Vn(Kn),checkParentPathsSync:Un,isSrcSubdir:kq,areIdentical:Oq}});var Xn=X((HO,Gn)=>{var v=g(),_q=Q("node:path"),{mkdirs:Ny}=l(),{pathExists:xy}=d(),{utimesMillis:jy}=Tq(),Vq=t();async function Ry(q,n,E={}){if(typeof E==="function")E={filter:E};if(E.clobber="clobber"in E?!!E.clobber:!0,E.overwrite="overwrite"in E?!!E.overwrite:E.clobber,E.preserveTimestamps&&process.arch==="ia32")process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
4
4
|
|
|
5
5
|
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:y,destStat:J}=await Vq.checkPaths(q,n,"copy",E);if(await Vq.checkParentPaths(q,y,n,"copy"),!await Pn(q,n,E))return;let _=_q.dirname(n);if(!await xy(_))await Ny(_);await An(J,q,n,E)}async function Pn(q,n,E){if(!E.filter)return!0;return E.filter(q,n)}async function An(q,n,E,y){let O=await(y.dereference?v.stat:v.lstat)(n);if(O.isDirectory())return Iy(O,q,n,E,y);if(O.isFile()||O.isCharacterDevice()||O.isBlockDevice())return wy(O,q,n,E,y);if(O.isSymbolicLink())return uy(q,n,E,y);if(O.isSocket())throw new Error(`Cannot copy a socket file: ${n}`);if(O.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${n}`);throw new Error(`Unknown file: ${n}`)}async function wy(q,n,E,y,J){if(!n)return Ln(q,E,y,J);if(J.overwrite)return await v.unlink(y),Ln(q,E,y,J);if(J.errorOnExist)throw new Error(`'${y}' already exists`)}async function Ln(q,n,E,y){if(await v.copyFile(n,E),y.preserveTimestamps){if(By(q.mode))await Dy(E,q.mode);let J=await v.stat(n);await jy(E,J.atime,J.mtime)}return v.chmod(E,q.mode)}function By(q){return(q&128)===0}function Dy(q,n){return v.chmod(q,n|128)}async function Iy(q,n,E,y,J){if(!n)await v.mkdir(y);let O=[];for await(let _ of await v.opendir(E)){let U=_q.join(E,_.name),j=_q.join(y,_.name);O.push(Pn(U,j,J).then(($)=>{if($)return Vq.checkPaths(U,j,"copy",J).then(({destStat:V})=>{return An(V,U,j,J)})}))}if(await Promise.all(O),!n)await v.chmod(y,q.mode)}async function uy(q,n,E,y){let J=await v.readlink(n);if(y.dereference)J=_q.resolve(process.cwd(),J);if(!q)return v.symlink(J,E);let O=null;try{O=await v.readlink(E)}catch(_){if(_.code==="EINVAL"||_.code==="UNKNOWN")return v.symlink(J,E);throw _}if(y.dereference)O=_q.resolve(process.cwd(),O);if(Vq.isSrcSubdir(J,O))throw new Error(`Cannot copy '${J}' to a subdirectory of itself, '${O}'.`);if(Vq.isSrcSubdir(O,J))throw new Error(`Cannot overwrite '${O}' with '${J}'.`);return await v.unlink(E),v.symlink(J,E)}Gn.exports=Ry});var Nn=X((NO,Hn)=>{var b=qq(),Kq=Q("node:path"),Qy=l().mkdirsSync,Wy=Tq().utimesMillisSync,Uq=t();function My(q,n,E){if(typeof E==="function")E={filter:E};if(E=E||{},E.clobber="clobber"in E?!!E.clobber:!0,E.overwrite="overwrite"in E?!!E.overwrite:E.clobber,E.preserveTimestamps&&process.arch==="ia32")process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_c as U,bd as h}from"./chunk-g1f16je5.js";var E0=U((Zw,k0)=>{var{defineProperty:u,getOwnPropertyDescriptor:o6,getOwnPropertyNames:e6}=Object,$4=Object.prototype.hasOwnProperty,l=($,w)=>u($,"name",{value:w,configurable:!0}),w4=($,w)=>{for(var z in w)u($,z,{get:w[z],enumerable:!0})},z4=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of e6(w))if(!$4.call($,Z)&&Z!==z)u($,Z,{get:()=>w[Z],enumerable:!(Y=o6(w,Z))||Y.enumerable})}return $},Z4=($)=>z4(u({},"__esModule",{value:!0}),$),h0={};w4(h0,{AlgorithmId:()=>x0,EndpointURLScheme:()=>I0,FieldPosition:()=>A0,HttpApiKeyAuthLocation:()=>O0,HttpAuthLocation:()=>b0,IniSectionType:()=>S0,RequestHandlerProtocol:()=>T0,SMITHY_CONTEXT_KEY:()=>B4,getDefaultClientConfiguration:()=>X4,resolveDefaultRuntimeConfig:()=>G4});k0.exports=Z4(h0);var b0=(($)=>{return $.HEADER="header",$.QUERY="query",$})(b0||{}),O0=(($)=>{return $.HEADER="header",$.QUERY="query",$})(O0||{}),I0=(($)=>{return $.HTTP="http",$.HTTPS="https",$})(I0||{}),x0=(($)=>{return $.MD5="md5",$.CRC32="crc32",$.CRC32C="crc32c",$.SHA1="sha1",$.SHA256="sha256",$})(x0||{}),Y4=l(($)=>{let w=[];if($.sha256!==void 0)w.push({algorithmId:()=>"sha256",checksumConstructor:()=>$.sha256});if($.md5!=null)w.push({algorithmId:()=>"md5",checksumConstructor:()=>$.md5});return{addChecksumAlgorithm(z){w.push(z)},checksumAlgorithms(){return w}}},"getChecksumConfiguration"),Q4=l(($)=>{let w={};return $.checksumAlgorithms().forEach((z)=>{w[z.algorithmId()]=z.checksumConstructor()}),w},"resolveChecksumRuntimeConfig"),X4=l(($)=>{return Y4($)},"getDefaultClientConfiguration"),G4=l(($)=>{return Q4($)},"resolveDefaultRuntimeConfig"),A0=(($)=>{return $[$.HEADER=0]="HEADER",$[$.TRAILER=1]="TRAILER",$})(A0||{}),B4="__smithy_context",S0=(($)=>{return $.PROFILE="profile",$.SSO_SESSION="sso-session",$.SERVICES="services",$})(S0||{}),T0=(($)=>{return $.HTTP_0_9="http/0.9",$.HTTP_1_0="http/1.0",$.TDS_8_0="tds/8.0",$})(T0||{})});var _=U((Yw,g0)=>{var{defineProperty:d,getOwnPropertyDescriptor:K4,getOwnPropertyNames:V4}=Object,W4=Object.prototype.hasOwnProperty,k=($,w)=>d($,"name",{value:w,configurable:!0}),U4=($,w)=>{for(var z in w)d($,z,{get:w[z],enumerable:!0})},L4=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of V4(w))if(!W4.call($,Z)&&Z!==z)d($,Z,{get:()=>w[Z],enumerable:!(Y=K4(w,Z))||Y.enumerable})}return $},J4=($)=>L4(d({},"__esModule",{value:!0}),$),y0={};U4(y0,{Field:()=>D4,Fields:()=>v4,HttpRequest:()=>N4,HttpResponse:()=>C4,IHttpRequest:()=>f0.HttpRequest,getHttpHandlerExtensionConfiguration:()=>j4,isValidHostname:()=>q0,resolveHttpHandlerRuntimeConfig:()=>F4});g0.exports=J4(y0);var j4=k(($)=>{return{setHttpHandler(w){$.httpHandler=w},httpHandler(){return $.httpHandler},updateHttpClientConfig(w,z){$.httpHandler?.updateHttpClientConfig(w,z)},httpHandlerConfigs(){return $.httpHandler.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),F4=k(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),f0=E0(),D4=class{static{k(this,"Field")}constructor({name:$,kind:w=f0.FieldPosition.HEADER,values:z=[]}){this.name=$,this.kind=w,this.values=z}add($){this.values.push($)}set($){this.values=$}remove($){this.values=this.values.filter((w)=>w!==$)}toString(){return this.values.map(($)=>$.includes(",")||$.includes(" ")?`"${$}"`:$).join(", ")}get(){return this.values}},v4=class{constructor({fields:$=[],encoding:w="utf-8"}){this.entries={},$.forEach(this.setField.bind(this)),this.encoding=w}static{k(this,"Fields")}setField($){this.entries[$.name.toLowerCase()]=$}getField($){return this.entries[$.toLowerCase()]}removeField($){delete this.entries[$.toLowerCase()]}getByType($){return Object.values(this.entries).filter((w)=>w.kind===$)}},N4=class ${static{k(this,"HttpRequest")}constructor(w){this.method=w.method||"GET",this.hostname=w.hostname||"localhost",this.port=w.port,this.query=w.query||{},this.headers=w.headers||{},this.body=w.body,this.protocol=w.protocol?w.protocol.slice(-1)!==":"?`${w.protocol}:`:w.protocol:"https:",this.path=w.path?w.path.charAt(0)!=="/"?`/${w.path}`:w.path:"/",this.username=w.username,this.password=w.password,this.fragment=w.fragment}static clone(w){let z=new $({...w,headers:{...w.headers}});if(z.query)z.query=P0(z.query);return z}static isInstance(w){if(!w)return!1;let z=w;return"method"in z&&"protocol"in z&&"hostname"in z&&"path"in z&&typeof z.query==="object"&&typeof z.headers==="object"}clone(){return $.clone(this)}};function P0($){return Object.keys($).reduce((w,z)=>{let Y=$[z];return{...w,[z]:Array.isArray(Y)?[...Y]:Y}},{})}k(P0,"cloneQuery");var C4=class{static{k(this,"HttpResponse")}constructor($){this.statusCode=$.statusCode,this.reason=$.reason,this.headers=$.headers||{},this.body=$.body}static isInstance($){if(!$)return!1;let w=$;return typeof w.statusCode==="number"&&typeof w.headers==="object"}};function q0($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)}k(q0,"isValidHostname")});var d0=U((Bw,l0)=>{var{defineProperty:p,getOwnPropertyDescriptor:M4,getOwnPropertyNames:R4}=Object,H4=Object.prototype.hasOwnProperty,Z0=($,w)=>p($,"name",{value:w,configurable:!0}),h4=($,w)=>{for(var z in w)p($,z,{get:w[z],enumerable:!0})},b4=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of R4(w))if(!H4.call($,Z)&&Z!==z)p($,Z,{get:()=>w[Z],enumerable:!(Y=M4(w,Z))||Y.enumerable})}return $},O4=($)=>b4(p({},"__esModule",{value:!0}),$),c0={};h4(c0,{escapeUri:()=>u0,escapeUriPath:()=>x4});l0.exports=O4(c0);var u0=Z0(($)=>encodeURIComponent($).replace(/[!'()*]/g,I4),"escapeUri"),I4=Z0(($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),x4=Z0(($)=>$.split("/").map(u0).join("/"),"escapeUriPath")});var Q0=U((Kw,i0)=>{var{defineProperty:i,getOwnPropertyDescriptor:A4,getOwnPropertyNames:S4}=Object,T4=Object.prototype.hasOwnProperty,k4=($,w)=>i($,"name",{value:w,configurable:!0}),E4=($,w)=>{for(var z in w)i($,z,{get:w[z],enumerable:!0})},y4=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of S4(w))if(!T4.call($,Z)&&Z!==z)i($,Z,{get:()=>w[Z],enumerable:!(Y=A4(w,Z))||Y.enumerable})}return $},f4=($)=>y4(i({},"__esModule",{value:!0}),$),_0={};E4(_0,{buildQueryString:()=>p0});i0.exports=f4(_0);var Y0=d0();function p0($){let w=[];for(let z of Object.keys($).sort()){let Y=$[z];if(z=Y0.escapeUri(z),Array.isArray(Y))for(let Z=0,G=Y.length;Z<G;Z++)w.push(`${z}=${Y0.escapeUri(Y[Z])}`);else{let Z=z;if(Y||typeof Y==="string")Z+=`=${Y0.escapeUri(Y)}`;w.push(Z)}}return w.join("&")}k4(p0,"buildQueryString")});var X1=U((Vw,Q1)=>{var{create:P4,defineProperty:g,getOwnPropertyDescriptor:q4,getOwnPropertyNames:g4,getPrototypeOf:c4}=Object,u4=Object.prototype.hasOwnProperty,L=($,w)=>g($,"name",{value:w,configurable:!0}),l4=($,w)=>{for(var z in w)g($,z,{get:w[z],enumerable:!0})},r0=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of g4(w))if(!u4.call($,Z)&&Z!==z)g($,Z,{get:()=>w[Z],enumerable:!(Y=q4(w,Z))||Y.enumerable})}return $},d4=($,w,z)=>(z=$!=null?P4(c4($)):{},r0(w||!$||!$.__esModule?g(z,"default",{value:$,enumerable:!0}):z,$)),_4=($)=>r0(g({},"__esModule",{value:!0}),$),t0={};l4(t0,{DEFAULT_REQUEST_TIMEOUT:()=>Z1,NodeHttp2Handler:()=>e4,NodeHttpHandler:()=>s4,streamCollector:()=>w$});Q1.exports=_4(t0);var o0=_(),e0=Q0(),X0=h("node:http"),G0=h("node:https"),p4=["ECONNRESET","EPIPE","ETIMEDOUT"],$1=L(($)=>{let w={};for(let z of Object.keys($)){let Y=$[z];w[z]=Array.isArray(Y)?Y.join(","):Y}return w},"getTransformedHeaders"),M={setTimeout:($,w)=>setTimeout($,w),clearTimeout:($)=>clearTimeout($)},a0=1000,i4=L(($,w,z=0)=>{if(!z)return-1;let Y=L((Z)=>{let G=M.setTimeout(()=>{$.destroy(),w(Object.assign(new Error(`Socket timed out without establishing a connection within ${z} ms`),{name:"TimeoutError"}))},z-Z),Q=L((X)=>{if(X?.connecting)X.on("connect",()=>{M.clearTimeout(G)});else M.clearTimeout(G)},"doWithSocket");if($.socket)Q($.socket);else $.on("socket",Q)},"registerTimeout");if(z<2000)return Y(0),0;return M.setTimeout(Y.bind(null,a0),a0)},"setConnectionTimeout"),a4=3000,m4=L(($,{keepAlive:w,keepAliveMsecs:z},Y=a4)=>{if(w!==!0)return-1;let Z=L(()=>{if($.socket)$.socket.setKeepAlive(w,z||0);else $.on("socket",(G)=>{G.setKeepAlive(w,z||0)})},"registerListener");if(Y===0)return Z(),0;return M.setTimeout(Z,Y)},"setSocketKeepAlive"),m0=3000,n4=L(($,w,z=Z1)=>{let Y=L((Z)=>{let G=z-Z,Q=L(()=>{$.destroy(),w(Object.assign(new Error(`Connection timed out after ${z} ms`),{name:"TimeoutError"}))},"onTimeout");if($.socket)$.socket.setTimeout(G,Q),$.on("close",()=>$.socket?.removeListener("timeout",Q));else $.setTimeout(G,Q)},"registerTimeout");if(0<z&&z<6000)return Y(0),0;return M.setTimeout(Y.bind(null,z===0?0:m0),m0)},"setSocketTimeout"),w1=h("node:stream"),n0=6000;async function B0($,w,z=n0){let Y=w.headers??{},Z=Y.Expect||Y.expect,G=-1,Q=!0;if(Z==="100-continue")Q=await Promise.race([new Promise((X)=>{G=Number(M.setTimeout(()=>X(!0),Math.max(n0,z)))}),new Promise((X)=>{$.on("continue",()=>{M.clearTimeout(G),X(!0)}),$.on("response",()=>{M.clearTimeout(G),X(!1)}),$.on("error",()=>{M.clearTimeout(G),X(!1)})})]);if(Q)z1($,w.body)}L(B0,"writeRequestBody");function z1($,w){if(w instanceof w1.Readable){w.pipe($);return}if(w){if(Buffer.isBuffer(w)||typeof w==="string"){$.end(w);return}let z=w;if(typeof z==="object"&&z.buffer&&typeof z.byteOffset==="number"&&typeof z.byteLength==="number"){$.end(Buffer.from(z.buffer,z.byteOffset,z.byteLength));return}$.end(Buffer.from(w));return}$.end()}L(z1,"writeBody");var Z1=0,s4=class ${constructor(w){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((z,Y)=>{if(typeof w==="function")w().then((Z)=>{z(this.resolveDefaultConfig(Z))}).catch(Y);else z(this.resolveDefaultConfig(w))})}static{L(this,"NodeHttpHandler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}static checkSocketUsage(w,z,Y=console){let{sockets:Z,requests:G,maxSockets:Q}=w;if(typeof Q!=="number"||Q===1/0)return z;let X=15000;if(Date.now()-X<z)return z;if(Z&&G)for(let B in Z){let K=Z[B]?.length??0,W=G[B]?.length??0;if(K>=Q&&W>=2*Q)return Y?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${K} and ${W} additional requests are enqueued.
|
|
1
|
+
import{Tc as U,Wc as h}from"./chunk-2pj0cr49.js";var E0=U((Zw,k0)=>{var{defineProperty:u,getOwnPropertyDescriptor:o6,getOwnPropertyNames:e6}=Object,$4=Object.prototype.hasOwnProperty,l=($,w)=>u($,"name",{value:w,configurable:!0}),w4=($,w)=>{for(var z in w)u($,z,{get:w[z],enumerable:!0})},z4=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of e6(w))if(!$4.call($,Z)&&Z!==z)u($,Z,{get:()=>w[Z],enumerable:!(Y=o6(w,Z))||Y.enumerable})}return $},Z4=($)=>z4(u({},"__esModule",{value:!0}),$),h0={};w4(h0,{AlgorithmId:()=>x0,EndpointURLScheme:()=>I0,FieldPosition:()=>A0,HttpApiKeyAuthLocation:()=>O0,HttpAuthLocation:()=>b0,IniSectionType:()=>S0,RequestHandlerProtocol:()=>T0,SMITHY_CONTEXT_KEY:()=>B4,getDefaultClientConfiguration:()=>X4,resolveDefaultRuntimeConfig:()=>G4});k0.exports=Z4(h0);var b0=(($)=>{return $.HEADER="header",$.QUERY="query",$})(b0||{}),O0=(($)=>{return $.HEADER="header",$.QUERY="query",$})(O0||{}),I0=(($)=>{return $.HTTP="http",$.HTTPS="https",$})(I0||{}),x0=(($)=>{return $.MD5="md5",$.CRC32="crc32",$.CRC32C="crc32c",$.SHA1="sha1",$.SHA256="sha256",$})(x0||{}),Y4=l(($)=>{let w=[];if($.sha256!==void 0)w.push({algorithmId:()=>"sha256",checksumConstructor:()=>$.sha256});if($.md5!=null)w.push({algorithmId:()=>"md5",checksumConstructor:()=>$.md5});return{addChecksumAlgorithm(z){w.push(z)},checksumAlgorithms(){return w}}},"getChecksumConfiguration"),Q4=l(($)=>{let w={};return $.checksumAlgorithms().forEach((z)=>{w[z.algorithmId()]=z.checksumConstructor()}),w},"resolveChecksumRuntimeConfig"),X4=l(($)=>{return Y4($)},"getDefaultClientConfiguration"),G4=l(($)=>{return Q4($)},"resolveDefaultRuntimeConfig"),A0=(($)=>{return $[$.HEADER=0]="HEADER",$[$.TRAILER=1]="TRAILER",$})(A0||{}),B4="__smithy_context",S0=(($)=>{return $.PROFILE="profile",$.SSO_SESSION="sso-session",$.SERVICES="services",$})(S0||{}),T0=(($)=>{return $.HTTP_0_9="http/0.9",$.HTTP_1_0="http/1.0",$.TDS_8_0="tds/8.0",$})(T0||{})});var _=U((Yw,g0)=>{var{defineProperty:d,getOwnPropertyDescriptor:K4,getOwnPropertyNames:V4}=Object,W4=Object.prototype.hasOwnProperty,k=($,w)=>d($,"name",{value:w,configurable:!0}),U4=($,w)=>{for(var z in w)d($,z,{get:w[z],enumerable:!0})},L4=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of V4(w))if(!W4.call($,Z)&&Z!==z)d($,Z,{get:()=>w[Z],enumerable:!(Y=K4(w,Z))||Y.enumerable})}return $},J4=($)=>L4(d({},"__esModule",{value:!0}),$),y0={};U4(y0,{Field:()=>D4,Fields:()=>v4,HttpRequest:()=>N4,HttpResponse:()=>C4,IHttpRequest:()=>f0.HttpRequest,getHttpHandlerExtensionConfiguration:()=>j4,isValidHostname:()=>q0,resolveHttpHandlerRuntimeConfig:()=>F4});g0.exports=J4(y0);var j4=k(($)=>{return{setHttpHandler(w){$.httpHandler=w},httpHandler(){return $.httpHandler},updateHttpClientConfig(w,z){$.httpHandler?.updateHttpClientConfig(w,z)},httpHandlerConfigs(){return $.httpHandler.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),F4=k(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),f0=E0(),D4=class{static{k(this,"Field")}constructor({name:$,kind:w=f0.FieldPosition.HEADER,values:z=[]}){this.name=$,this.kind=w,this.values=z}add($){this.values.push($)}set($){this.values=$}remove($){this.values=this.values.filter((w)=>w!==$)}toString(){return this.values.map(($)=>$.includes(",")||$.includes(" ")?`"${$}"`:$).join(", ")}get(){return this.values}},v4=class{constructor({fields:$=[],encoding:w="utf-8"}){this.entries={},$.forEach(this.setField.bind(this)),this.encoding=w}static{k(this,"Fields")}setField($){this.entries[$.name.toLowerCase()]=$}getField($){return this.entries[$.toLowerCase()]}removeField($){delete this.entries[$.toLowerCase()]}getByType($){return Object.values(this.entries).filter((w)=>w.kind===$)}},N4=class ${static{k(this,"HttpRequest")}constructor(w){this.method=w.method||"GET",this.hostname=w.hostname||"localhost",this.port=w.port,this.query=w.query||{},this.headers=w.headers||{},this.body=w.body,this.protocol=w.protocol?w.protocol.slice(-1)!==":"?`${w.protocol}:`:w.protocol:"https:",this.path=w.path?w.path.charAt(0)!=="/"?`/${w.path}`:w.path:"/",this.username=w.username,this.password=w.password,this.fragment=w.fragment}static clone(w){let z=new $({...w,headers:{...w.headers}});if(z.query)z.query=P0(z.query);return z}static isInstance(w){if(!w)return!1;let z=w;return"method"in z&&"protocol"in z&&"hostname"in z&&"path"in z&&typeof z.query==="object"&&typeof z.headers==="object"}clone(){return $.clone(this)}};function P0($){return Object.keys($).reduce((w,z)=>{let Y=$[z];return{...w,[z]:Array.isArray(Y)?[...Y]:Y}},{})}k(P0,"cloneQuery");var C4=class{static{k(this,"HttpResponse")}constructor($){this.statusCode=$.statusCode,this.reason=$.reason,this.headers=$.headers||{},this.body=$.body}static isInstance($){if(!$)return!1;let w=$;return typeof w.statusCode==="number"&&typeof w.headers==="object"}};function q0($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)}k(q0,"isValidHostname")});var d0=U((Bw,l0)=>{var{defineProperty:p,getOwnPropertyDescriptor:M4,getOwnPropertyNames:R4}=Object,H4=Object.prototype.hasOwnProperty,Z0=($,w)=>p($,"name",{value:w,configurable:!0}),h4=($,w)=>{for(var z in w)p($,z,{get:w[z],enumerable:!0})},b4=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of R4(w))if(!H4.call($,Z)&&Z!==z)p($,Z,{get:()=>w[Z],enumerable:!(Y=M4(w,Z))||Y.enumerable})}return $},O4=($)=>b4(p({},"__esModule",{value:!0}),$),c0={};h4(c0,{escapeUri:()=>u0,escapeUriPath:()=>x4});l0.exports=O4(c0);var u0=Z0(($)=>encodeURIComponent($).replace(/[!'()*]/g,I4),"escapeUri"),I4=Z0(($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),x4=Z0(($)=>$.split("/").map(u0).join("/"),"escapeUriPath")});var Q0=U((Kw,i0)=>{var{defineProperty:i,getOwnPropertyDescriptor:A4,getOwnPropertyNames:S4}=Object,T4=Object.prototype.hasOwnProperty,k4=($,w)=>i($,"name",{value:w,configurable:!0}),E4=($,w)=>{for(var z in w)i($,z,{get:w[z],enumerable:!0})},y4=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of S4(w))if(!T4.call($,Z)&&Z!==z)i($,Z,{get:()=>w[Z],enumerable:!(Y=A4(w,Z))||Y.enumerable})}return $},f4=($)=>y4(i({},"__esModule",{value:!0}),$),_0={};E4(_0,{buildQueryString:()=>p0});i0.exports=f4(_0);var Y0=d0();function p0($){let w=[];for(let z of Object.keys($).sort()){let Y=$[z];if(z=Y0.escapeUri(z),Array.isArray(Y))for(let Z=0,G=Y.length;Z<G;Z++)w.push(`${z}=${Y0.escapeUri(Y[Z])}`);else{let Z=z;if(Y||typeof Y==="string")Z+=`=${Y0.escapeUri(Y)}`;w.push(Z)}}return w.join("&")}k4(p0,"buildQueryString")});var X1=U((Vw,Q1)=>{var{create:P4,defineProperty:g,getOwnPropertyDescriptor:q4,getOwnPropertyNames:g4,getPrototypeOf:c4}=Object,u4=Object.prototype.hasOwnProperty,L=($,w)=>g($,"name",{value:w,configurable:!0}),l4=($,w)=>{for(var z in w)g($,z,{get:w[z],enumerable:!0})},r0=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of g4(w))if(!u4.call($,Z)&&Z!==z)g($,Z,{get:()=>w[Z],enumerable:!(Y=q4(w,Z))||Y.enumerable})}return $},d4=($,w,z)=>(z=$!=null?P4(c4($)):{},r0(w||!$||!$.__esModule?g(z,"default",{value:$,enumerable:!0}):z,$)),_4=($)=>r0(g({},"__esModule",{value:!0}),$),t0={};l4(t0,{DEFAULT_REQUEST_TIMEOUT:()=>Z1,NodeHttp2Handler:()=>e4,NodeHttpHandler:()=>s4,streamCollector:()=>w$});Q1.exports=_4(t0);var o0=_(),e0=Q0(),X0=h("node:http"),G0=h("node:https"),p4=["ECONNRESET","EPIPE","ETIMEDOUT"],$1=L(($)=>{let w={};for(let z of Object.keys($)){let Y=$[z];w[z]=Array.isArray(Y)?Y.join(","):Y}return w},"getTransformedHeaders"),M={setTimeout:($,w)=>setTimeout($,w),clearTimeout:($)=>clearTimeout($)},a0=1000,i4=L(($,w,z=0)=>{if(!z)return-1;let Y=L((Z)=>{let G=M.setTimeout(()=>{$.destroy(),w(Object.assign(new Error(`Socket timed out without establishing a connection within ${z} ms`),{name:"TimeoutError"}))},z-Z),Q=L((X)=>{if(X?.connecting)X.on("connect",()=>{M.clearTimeout(G)});else M.clearTimeout(G)},"doWithSocket");if($.socket)Q($.socket);else $.on("socket",Q)},"registerTimeout");if(z<2000)return Y(0),0;return M.setTimeout(Y.bind(null,a0),a0)},"setConnectionTimeout"),a4=3000,m4=L(($,{keepAlive:w,keepAliveMsecs:z},Y=a4)=>{if(w!==!0)return-1;let Z=L(()=>{if($.socket)$.socket.setKeepAlive(w,z||0);else $.on("socket",(G)=>{G.setKeepAlive(w,z||0)})},"registerListener");if(Y===0)return Z(),0;return M.setTimeout(Z,Y)},"setSocketKeepAlive"),m0=3000,n4=L(($,w,z=Z1)=>{let Y=L((Z)=>{let G=z-Z,Q=L(()=>{$.destroy(),w(Object.assign(new Error(`Connection timed out after ${z} ms`),{name:"TimeoutError"}))},"onTimeout");if($.socket)$.socket.setTimeout(G,Q),$.on("close",()=>$.socket?.removeListener("timeout",Q));else $.setTimeout(G,Q)},"registerTimeout");if(0<z&&z<6000)return Y(0),0;return M.setTimeout(Y.bind(null,z===0?0:m0),m0)},"setSocketTimeout"),w1=h("node:stream"),n0=6000;async function B0($,w,z=n0){let Y=w.headers??{},Z=Y.Expect||Y.expect,G=-1,Q=!0;if(Z==="100-continue")Q=await Promise.race([new Promise((X)=>{G=Number(M.setTimeout(()=>X(!0),Math.max(n0,z)))}),new Promise((X)=>{$.on("continue",()=>{M.clearTimeout(G),X(!0)}),$.on("response",()=>{M.clearTimeout(G),X(!1)}),$.on("error",()=>{M.clearTimeout(G),X(!1)})})]);if(Q)z1($,w.body)}L(B0,"writeRequestBody");function z1($,w){if(w instanceof w1.Readable){w.pipe($);return}if(w){if(Buffer.isBuffer(w)||typeof w==="string"){$.end(w);return}let z=w;if(typeof z==="object"&&z.buffer&&typeof z.byteOffset==="number"&&typeof z.byteLength==="number"){$.end(Buffer.from(z.buffer,z.byteOffset,z.byteLength));return}$.end(Buffer.from(w));return}$.end()}L(z1,"writeBody");var Z1=0,s4=class ${constructor(w){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((z,Y)=>{if(typeof w==="function")w().then((Z)=>{z(this.resolveDefaultConfig(Z))}).catch(Y);else z(this.resolveDefaultConfig(w))})}static{L(this,"NodeHttpHandler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}static checkSocketUsage(w,z,Y=console){let{sockets:Z,requests:G,maxSockets:Q}=w;if(typeof Q!=="number"||Q===1/0)return z;let X=15000;if(Date.now()-X<z)return z;if(Z&&G)for(let B in Z){let K=Z[B]?.length??0,W=G[B]?.length??0;if(K>=Q&&W>=2*Q)return Y?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${K} and ${W} additional requests are enqueued.
|
|
2
2
|
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
3
|
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return z}resolveDefaultConfig(w){let{requestTimeout:z,connectionTimeout:Y,socketTimeout:Z,socketAcquisitionWarningTimeout:G,httpAgent:Q,httpsAgent:X}=w||{},B=!0,K=50;return{connectionTimeout:Y,requestTimeout:z??Z,socketAcquisitionWarningTimeout:G,httpAgent:(()=>{if(Q instanceof X0.Agent||typeof Q?.destroy==="function")return Q;return new X0.Agent({keepAlive:!0,maxSockets:50,...Q})})(),httpsAgent:(()=>{if(X instanceof G0.Agent||typeof X?.destroy==="function")return X;return new G0.Agent({keepAlive:!0,maxSockets:50,...X})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(w,{abortSignal:z}={}){if(!this.config)this.config=await this.configProvider;return new Promise((Y,Z)=>{let G=void 0,Q=[],X=L(async(V)=>{await G,Q.forEach(M.clearTimeout),Y(V)},"resolve"),B=L(async(V)=>{await G,Q.forEach(M.clearTimeout),Z(V)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(z?.aborted){let V=new Error("Request aborted");V.name="AbortError",B(V);return}let K=w.protocol==="https:",W=K?this.config.httpsAgent:this.config.httpAgent;Q.push(M.setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(W,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let N=e0.buildQueryString(w.query||{}),v=void 0;if(w.username!=null||w.password!=null){let V=w.username??"",j=w.password??"";v=`${V}:${j}`}let D=w.path;if(N)D+=`?${N}`;if(w.fragment)D+=`#${w.fragment}`;let C=w.hostname??"";if(C[0]==="["&&C.endsWith("]"))C=w.hostname.slice(1,-1);else C=w.hostname;let S={headers:w.headers,host:C,method:w.method,path:D,port:w.port,agent:W,auth:v},J=(K?G0.request:X0.request)(S,(V)=>{let j=new o0.HttpResponse({statusCode:V.statusCode||-1,reason:V.statusMessage,headers:$1(V.headers),body:V});X({response:j})});if(J.on("error",(V)=>{if(p4.includes(V.code))B(Object.assign(V,{name:"TimeoutError"}));else B(V)}),z){let V=L(()=>{J.destroy();let j=new Error("Request aborted");j.name="AbortError",B(j)},"onAbort");if(typeof z.addEventListener==="function"){let j=z;j.addEventListener("abort",V,{once:!0}),J.once("close",()=>j.removeEventListener("abort",V))}else z.onabort=V}Q.push(i4(J,B,this.config.connectionTimeout)),Q.push(n4(J,B,this.config.requestTimeout));let R=S.agent;if(typeof R==="object"&&"keepAlive"in R)Q.push(m4(J,{keepAlive:R.keepAlive,keepAliveMsecs:R.keepAliveMsecs}));G=B0(J,w,this.config.requestTimeout).catch((V)=>{return Q.forEach(M.clearTimeout),Z(V)})})}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((Y)=>{return{...Y,[w]:z}})}httpHandlerConfigs(){return this.config??{}}},s0=h("node:http2"),r4=d4(h("node:http2")),t4=class{constructor($){this.sessions=[],this.sessions=$??[]}static{L(this,"NodeHttp2ConnectionPool")}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast($){this.sessions.push($)}contains($){return this.sessions.includes($)}remove($){this.sessions=this.sessions.filter((w)=>w!==$)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy($){for(let w of this.sessions)if(w===$){if(!w.destroyed)w.destroy()}}},o4=class{constructor($){if(this.sessionCache=new Map,this.config=$,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}static{L(this,"NodeHttp2ConnectionManager")}lease($,w){let z=this.getUrlString($),Y=this.sessionCache.get(z);if(Y){let X=Y.poll();if(X&&!this.config.disableConcurrency)return X}let Z=r4.default.connect(z);if(this.config.maxConcurrency)Z.settings({maxConcurrentStreams:this.config.maxConcurrency},(X)=>{if(X)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+$.destination.toString())});Z.unref();let G=L(()=>{Z.destroy(),this.deleteSession(z,Z)},"destroySessionCb");if(Z.on("goaway",G),Z.on("error",G),Z.on("frameError",G),Z.on("close",()=>this.deleteSession(z,Z)),w.requestTimeout)Z.setTimeout(w.requestTimeout,G);let Q=this.sessionCache.get(z)||new t4;return Q.offerLast(Z),this.sessionCache.set(z,Q),Z}deleteSession($,w){let z=this.sessionCache.get($);if(!z)return;if(!z.contains(w))return;z.remove(w),this.sessionCache.set($,z)}release($,w){let z=this.getUrlString($);this.sessionCache.get(z)?.offerLast(w)}destroy(){for(let[$,w]of this.sessionCache){for(let z of w){if(!z.destroyed)z.destroy();w.remove(z)}this.sessionCache.delete($)}}setMaxConcurrentStreams($){if($&&$<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=$}setDisableConcurrentStreams($){this.config.disableConcurrency=$}getUrlString($){return $.destination.toString()}},e4=class ${constructor(w){this.metadata={handlerProtocol:"h2"},this.connectionManager=new o4({}),this.configProvider=new Promise((z,Y)=>{if(typeof w==="function")w().then((Z)=>{z(Z||{})}).catch(Y);else z(w||{})})}static{L(this,"NodeHttp2Handler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}destroy(){this.connectionManager.destroy()}async handle(w,{abortSignal:z}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}let{requestTimeout:Y,disableConcurrentStreams:Z}=this.config;return new Promise((G,Q)=>{let X=!1,B=void 0,K=L(async(F)=>{await B,G(F)},"resolve"),W=L(async(F)=>{await B,Q(F)},"reject");if(z?.aborted){X=!0;let F=new Error("Request aborted");F.name="AbortError",W(F);return}let{hostname:N,method:v,port:D,protocol:C,query:S}=w,T="";if(w.username!=null||w.password!=null){let F=w.username??"",b=w.password??"";T=`${F}:${b}@`}let J=`${C}//${T}${N}${D?`:${D}`:""}`,R={destination:new URL(J)},V=this.connectionManager.lease(R,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:Z||!1}),j=L((F)=>{if(Z)this.destroySession(V);X=!0,W(F)},"rejectWithDestroy"),f=e0.buildQueryString(S||{}),z0=w.path;if(f)z0+=`?${f}`;if(w.fragment)z0+=`#${w.fragment}`;let H=V.request({...w.headers,[s0.constants.HTTP2_HEADER_PATH]:z0,[s0.constants.HTTP2_HEADER_METHOD]:v});if(V.ref(),H.on("response",(F)=>{let b=new o0.HttpResponse({statusCode:F[":status"]||-1,headers:$1(F),body:H});if(X=!0,K({response:b}),Z)V.close(),this.connectionManager.deleteSession(J,V)}),Y)H.setTimeout(Y,()=>{H.close();let F=new Error(`Stream timed out because of no activity for ${Y} ms`);F.name="TimeoutError",j(F)});if(z){let F=L(()=>{H.close();let b=new Error("Request aborted");b.name="AbortError",j(b)},"onAbort");if(typeof z.addEventListener==="function"){let b=z;b.addEventListener("abort",F,{once:!0}),H.once("close",()=>b.removeEventListener("abort",F))}else z.onabort=F}H.on("frameError",(F,b,t6)=>{j(new Error(`Frame type id ${F} in stream id ${t6} has failed with code ${b}.`))}),H.on("error",j),H.on("aborted",()=>{j(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${H.rstCode}.`))}),H.on("close",()=>{if(V.unref(),Z)V.destroy();if(!X)j(new Error("Unexpected error: http2 request did not get a response"))}),B=B0(H,w,Y)})}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((Y)=>{return{...Y,[w]:z}})}httpHandlerConfigs(){return this.config??{}}destroySession(w){if(!w.destroyed)w.destroy()}},$$=class extends w1.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}static{L(this,"Collector")}_write($,w,z){this.bufferedBytes.push($),z()}},w$=L(($)=>{if(z$($))return Y1($);return new Promise((w,z)=>{let Y=new $$;$.pipe(Y),$.on("error",(Z)=>{Y.end(),z(Z)}),Y.on("error",z),Y.on("finish",function(){let Z=new Uint8Array(Buffer.concat(this.bufferedBytes));w(Z)})})},"streamCollector"),z$=L(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");async function Y1($){let w=[],z=$.getReader(),Y=!1,Z=0;while(!Y){let{done:X,value:B}=await z.read();if(B)w.push(B),Z+=B.length;Y=X}let G=new Uint8Array(Z),Q=0;for(let X of w)G.set(X,Q),Q+=X.length;return G}L(Y1,"collectReadableStream")});var K1=U((Jw,B1)=>{var{defineProperty:a,getOwnPropertyDescriptor:Z$,getOwnPropertyNames:Y$}=Object,Q$=Object.prototype.hasOwnProperty,X$=($,w)=>a($,"name",{value:w,configurable:!0}),G$=($,w)=>{for(var z in w)a($,z,{get:w[z],enumerable:!0})},B$=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of Y$(w))if(!Q$.call($,Z)&&Z!==z)a($,Z,{get:()=>w[Z],enumerable:!(Y=Z$(w,Z))||Y.enumerable})}return $},K$=($)=>B$(a({},"__esModule",{value:!0}),$),G1={};G$(G1,{isArrayBuffer:()=>V$});B1.exports=K$(G1);var V$=X$(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var c=U((jw,U1)=>{var{defineProperty:m,getOwnPropertyDescriptor:W$,getOwnPropertyNames:U$}=Object,L$=Object.prototype.hasOwnProperty,V1=($,w)=>m($,"name",{value:w,configurable:!0}),J$=($,w)=>{for(var z in w)m($,z,{get:w[z],enumerable:!0})},j$=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of U$(w))if(!L$.call($,Z)&&Z!==z)m($,Z,{get:()=>w[Z],enumerable:!(Y=W$(w,Z))||Y.enumerable})}return $},F$=($)=>j$(m({},"__esModule",{value:!0}),$),W1={};J$(W1,{fromArrayBuffer:()=>v$,fromString:()=>N$});U1.exports=F$(W1);var D$=K1(),K0=h("node:buffer"),v$=V1(($,w=0,z=$.byteLength-w)=>{if(!D$.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return K0.Buffer.from($,w,z)},"fromArrayBuffer"),N$=V1(($,w)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return w?K0.Buffer.from($,w):K0.Buffer.from($)},"fromString")});var j1=U((L1)=>{Object.defineProperty(L1,"__esModule",{value:!0});L1.fromBase64=void 0;var C$=c(),M$=/^[A-Za-z0-9+/]*={0,2}$/,R$=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!M$.exec($))throw new TypeError("Invalid base64 string.");let w=C$.fromString($,"base64");return new Uint8Array(w.buffer,w.byteOffset,w.byteLength)};L1.fromBase64=R$});var s=U((Dw,N1)=>{var{defineProperty:n,getOwnPropertyDescriptor:H$,getOwnPropertyNames:h$}=Object,b$=Object.prototype.hasOwnProperty,V0=($,w)=>n($,"name",{value:w,configurable:!0}),O$=($,w)=>{for(var z in w)n($,z,{get:w[z],enumerable:!0})},I$=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of h$(w))if(!b$.call($,Z)&&Z!==z)n($,Z,{get:()=>w[Z],enumerable:!(Y=H$(w,Z))||Y.enumerable})}return $},x$=($)=>I$(n({},"__esModule",{value:!0}),$),F1={};O$(F1,{fromUtf8:()=>v1,toUint8Array:()=>A$,toUtf8:()=>S$});N1.exports=x$(F1);var D1=c(),v1=V0(($)=>{let w=D1.fromString($,"utf8");return new Uint8Array(w.buffer,w.byteOffset,w.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),A$=V0(($)=>{if(typeof $==="string")return v1($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),S$=V0(($)=>{if(typeof $==="string")return $;if(typeof $!=="object"||typeof $.byteOffset!=="number"||typeof $.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return D1.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var R1=U((C1)=>{Object.defineProperty(C1,"__esModule",{value:!0});C1.toBase64=void 0;var T$=c(),k$=s(),E$=($)=>{let w;if(typeof $==="string")w=k$.fromUtf8($);else w=$;if(typeof w!=="object"||typeof w.byteOffset!=="number"||typeof w.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return T$.fromArrayBuffer(w.buffer,w.byteOffset,w.byteLength).toString("base64")};C1.toBase64=E$});var P=U((Nw,r)=>{var{defineProperty:H1,getOwnPropertyDescriptor:y$,getOwnPropertyNames:f$}=Object,P$=Object.prototype.hasOwnProperty,W0=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of f$(w))if(!P$.call($,Z)&&Z!==z)H1($,Z,{get:()=>w[Z],enumerable:!(Y=y$(w,Z))||Y.enumerable})}return $},h1=($,w,z)=>(W0($,w,"default"),z&&W0(z,w,"default")),q$=($)=>W0(H1({},"__esModule",{value:!0}),$),U0={};r.exports=q$(U0);h1(U0,j1(),r.exports);h1(U0,R1(),r.exports)});var L0=U((O1)=>{Object.defineProperty(O1,"__esModule",{value:!0});O1.ChecksumStream=void 0;var g$=P(),c$=h("node:stream");class b1 extends c$.Duplex{constructor({expectedChecksum:$,checksum:w,source:z,checksumSourceLocation:Y,base64Encoder:Z}){var G,Q;super();if(typeof z.pipe==="function")this.source=z;else throw new Error(`@smithy/util-stream: unsupported source type ${(Q=(G=z===null||z===void 0?void 0:z.constructor)===null||G===void 0?void 0:G.name)!==null&&Q!==void 0?Q:z} in ChecksumStream.`);this.base64Encoder=Z!==null&&Z!==void 0?Z:g$.toBase64,this.expectedChecksum=$,this.checksum=w,this.checksumSourceLocation=Y,this.source.pipe(this)}_read($){}_write($,w,z){try{this.checksum.update($),this.push($)}catch(Y){return z(Y)}return z()}async _final($){try{let w=await this.checksum.digest(),z=this.base64Encoder(w);if(this.expectedChecksum!==z)return $(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${z}" in response header "${this.checksumSourceLocation}".`))}catch(w){return $(w)}return this.push(null),$()}}O1.ChecksumStream=b1});var E=U((x1)=>{Object.defineProperty(x1,"__esModule",{value:!0});x1.isBlob=x1.isReadableStream=void 0;var u$=($)=>{var w;return typeof ReadableStream==="function"&&(((w=$===null||$===void 0?void 0:$.constructor)===null||w===void 0?void 0:w.name)===ReadableStream.name||$ instanceof ReadableStream)};x1.isReadableStream=u$;var l$=($)=>{var w;return typeof Blob==="function"&&(((w=$===null||$===void 0?void 0:$.constructor)===null||w===void 0?void 0:w.name)===Blob.name||$ instanceof Blob)};x1.isBlob=l$});var E1=U((T1)=>{Object.defineProperty(T1,"__esModule",{value:!0});T1.ChecksumStream=void 0;var _$=typeof ReadableStream==="function"?ReadableStream:function(){};class S1 extends _${}T1.ChecksumStream=S1});var P1=U((y1)=>{Object.defineProperty(y1,"__esModule",{value:!0});y1.createChecksumStream=void 0;var p$=P(),i$=E(),a$=E1(),m$=({expectedChecksum:$,checksum:w,source:z,checksumSourceLocation:Y,base64Encoder:Z})=>{var G,Q;if(!i$.isReadableStream(z))throw new Error(`@smithy/util-stream: unsupported source type ${(Q=(G=z===null||z===void 0?void 0:z.constructor)===null||G===void 0?void 0:G.name)!==null&&Q!==void 0?Q:z} in ChecksumStream.`);let X=Z!==null&&Z!==void 0?Z:p$.toBase64;if(typeof TransformStream!=="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let B=new TransformStream({start(){},async transform(W,N){w.update(W),N.enqueue(W)},async flush(W){let N=await w.digest(),v=X(N);if($!==v){let D=new Error(`Checksum mismatch: expected "${$}" but received "${v}" in response header "${Y}".`);W.error(D)}else W.terminate()}});z.pipeThrough(B);let K=B.readable;return Object.setPrototypeOf(K,a$.ChecksumStream.prototype),K};y1.createChecksumStream=m$});var c1=U((q1)=>{Object.defineProperty(q1,"__esModule",{value:!0});q1.createChecksumStream=void 0;var n$=E(),s$=L0(),r$=P1();function t$($){if(typeof ReadableStream==="function"&&n$.isReadableStream($.source))return r$.createChecksumStream($);return new s$.ChecksumStream($)}q1.createChecksumStream=t$});var J0=U((l1)=>{Object.defineProperty(l1,"__esModule",{value:!0});l1.ByteArrayCollector=void 0;class u1{constructor($){this.allocByteArray=$,this.byteLength=0,this.byteArrays=[]}push($){this.byteArrays.push($),this.byteLength+=$.byteLength}flush(){if(this.byteArrays.length===1){let z=this.byteArrays[0];return this.reset(),z}let $=this.allocByteArray(this.byteLength),w=0;for(let z=0;z<this.byteArrays.length;++z){let Y=this.byteArrays[z];$.set(Y,w),w+=Y.byteLength}return this.reset(),$}reset(){this.byteArrays=[],this.byteLength=0}}l1.ByteArrayCollector=u1});var n1=U((a1)=>{Object.defineProperty(a1,"__esModule",{value:!0});a1.modeOf=a1.sizeOf=a1.flush=a1.merge=a1.createBufferedReadable=a1.createBufferedReadableStream=void 0;var o$=J0();function _1($,w,z){let Y=$.getReader(),Z=!1,G=0,Q=["",new o$.ByteArrayCollector((K)=>new Uint8Array(K))],X=-1,B=async(K)=>{let{value:W,done:N}=await Y.read(),v=W;if(N){if(X!==-1){let D=t(Q,X);if(q(D)>0)K.enqueue(D)}K.close()}else{let D=i1(v,!1);if(X!==D){if(X>=0)K.enqueue(t(Q,X));X=D}if(X===-1){K.enqueue(v);return}let C=q(v);G+=C;let S=q(Q[X]);if(C>=w&&S===0)K.enqueue(v);else{let T=p1(Q,X,v);if(!Z&&G>w*2)Z=!0,z===null||z===void 0||z.warn(`@smithy/util-stream - stream chunk size ${C} is below threshold of ${w}, automatically buffering.`);if(T>=w)K.enqueue(t(Q,X));else await B(K)}}};return new ReadableStream({pull:B})}a1.createBufferedReadableStream=_1;a1.createBufferedReadable=_1;function p1($,w,z){switch(w){case 0:return $[0]+=z,q($[0]);case 1:case 2:return $[w].push(z),q($[w])}}a1.merge=p1;function t($,w){switch(w){case 0:let z=$[0];return $[0]="",z;case 1:case 2:return $[w].flush()}throw new Error(`@smithy/util-stream - invalid index ${w} given to flush()`)}a1.flush=t;function q($){var w,z;return(z=(w=$===null||$===void 0?void 0:$.byteLength)!==null&&w!==void 0?w:$===null||$===void 0?void 0:$.length)!==null&&z!==void 0?z:0}a1.sizeOf=q;function i1($,w=!0){if(w&&typeof Buffer!=="undefined"&&$ instanceof Buffer)return 2;if($ instanceof Uint8Array)return 1;if(typeof $==="string")return 0;return-1}a1.modeOf=i1});var o1=U((r1)=>{Object.defineProperty(r1,"__esModule",{value:!0});r1.createBufferedReadable=void 0;var Y8=h("node:stream"),s1=J0(),A=n1(),Q8=E();function X8($,w,z){if(Q8.isReadableStream($))return A.createBufferedReadableStream($,w,z);let Y=new Y8.Readable({read(){}}),Z=!1,G=0,Q=["",new s1.ByteArrayCollector((B)=>new Uint8Array(B)),new s1.ByteArrayCollector((B)=>Buffer.from(new Uint8Array(B)))],X=-1;return $.on("data",(B)=>{let K=A.modeOf(B,!0);if(X!==K){if(X>=0)Y.push(A.flush(Q,X));X=K}if(X===-1){Y.push(B);return}let W=A.sizeOf(B);G+=W;let N=A.sizeOf(Q[X]);if(W>=w&&N===0)Y.push(B);else{let v=A.merge(Q,X,B);if(!Z&&G>w*2)Z=!0,z===null||z===void 0||z.warn(`@smithy/util-stream - stream chunk size ${W} is below threshold of ${w}, automatically buffering.`);if(v>=w)Y.push(A.flush(Q,X))}}),$.on("end",()=>{if(X!==-1){let B=A.flush(Q,X);if(A.sizeOf(B)>0)Y.push(B)}Y.push(null)}),Y}r1.createBufferedReadable=X8});var w6=U((e1)=>{Object.defineProperty(e1,"__esModule",{value:!0});e1.getAwsChunkedEncodingStream=void 0;var G8=h("node:stream"),B8=($,w)=>{let{base64Encoder:z,bodyLengthChecker:Y,checksumAlgorithmFn:Z,checksumLocationName:G,streamHasher:Q}=w,X=z!==void 0&&Z!==void 0&&G!==void 0&&Q!==void 0,B=X?Q(Z,$):void 0,K=new G8.Readable({read:()=>{}});return $.on("data",(W)=>{let N=Y(W)||0;K.push(`${N.toString(16)}\r
|
|
4
4
|
`),K.push(W),K.push(`\r
|
|
@@ -7,4 +7,4 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
7
7
|
`),K.push(`\r
|
|
8
8
|
`)}K.push(null)}),K};e1.getAwsChunkedEncodingStream=B8});var Y6=U((z6)=>{Object.defineProperty(z6,"__esModule",{value:!0});z6.headStream=void 0;async function K8($,w){var z;let Y=0,Z=[],G=$.getReader(),Q=!1;while(!Q){let{done:K,value:W}=await G.read();if(W)Z.push(W),Y+=(z=W===null||W===void 0?void 0:W.byteLength)!==null&&z!==void 0?z:0;if(Y>=w)break;Q=K}G.releaseLock();let X=new Uint8Array(Math.min(w,Y)),B=0;for(let K of Z){if(K.byteLength>X.byteLength-B){X.set(K.subarray(0,X.byteLength-B),B);break}else X.set(K,B);B+=K.length}return X}z6.headStream=K8});var B6=U((X6)=>{Object.defineProperty(X6,"__esModule",{value:!0});X6.headStream=void 0;var V8=h("node:stream"),W8=Y6(),U8=E(),L8=($,w)=>{if(U8.isReadableStream($))return W8.headStream($,w);return new Promise((z,Y)=>{let Z=new Q6;Z.limit=w,$.pipe(Z),$.on("error",(G)=>{Z.end(),Y(G)}),Z.on("error",Y),Z.on("finish",function(){let G=new Uint8Array(Buffer.concat(this.buffers));z(G)})})};X6.headStream=L8;class Q6 extends V8.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write($,w,z){var Y;if(this.buffers.push($),this.bytesBuffered+=(Y=$.byteLength)!==null&&Y!==void 0?Y:0,this.bytesBuffered>=this.limit){let Z=this.bytesBuffered-this.limit,G=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=G.subarray(0,G.byteLength-Z),this.emit("finish")}z()}}});var F6=U((Tw,j6)=>{var{defineProperty:e,getOwnPropertyDescriptor:J8,getOwnPropertyNames:j8}=Object,F8=Object.prototype.hasOwnProperty,O=($,w)=>e($,"name",{value:w,configurable:!0}),D8=($,w)=>{for(var z in w)e($,z,{get:w[z],enumerable:!0})},v8=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of j8(w))if(!F8.call($,Z)&&Z!==z)e($,Z,{get:()=>w[Z],enumerable:!(Y=J8(w,Z))||Y.enumerable})}return $},N8=($)=>v8(e({},"__esModule",{value:!0}),$),V6={};D8(V6,{FetchHttpHandler:()=>M8,keepAliveSupport:()=>o,streamCollector:()=>H8});j6.exports=N8(V6);var K6=_(),C8=Q0();function j0($,w){return new Request($,w)}O(j0,"createRequest");function W6($=0){return new Promise((w,z)=>{if($)setTimeout(()=>{let Y=new Error(`Request did not complete within ${$} ms`);Y.name="TimeoutError",z(Y)},$)})}O(W6,"requestTimeout");var o={supported:void 0},M8=class ${static{O(this,"FetchHttpHandler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}constructor(w){if(typeof w==="function")this.configProvider=w().then((z)=>z||{});else this.config=w??{},this.configProvider=Promise.resolve(this.config);if(o.supported===void 0)o.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in j0("https://[::1]"))}destroy(){}async handle(w,{abortSignal:z}={}){if(!this.config)this.config=await this.configProvider;let Y=this.config.requestTimeout,Z=this.config.keepAlive===!0,G=this.config.credentials;if(z?.aborted){let J=new Error("Request aborted");return J.name="AbortError",Promise.reject(J)}let Q=w.path,X=C8.buildQueryString(w.query||{});if(X)Q+=`?${X}`;if(w.fragment)Q+=`#${w.fragment}`;let B="";if(w.username!=null||w.password!=null){let J=w.username??"",R=w.password??"";B=`${J}:${R}@`}let{port:K,method:W}=w,N=`${w.protocol}//${B}${w.hostname}${K?`:${K}`:""}${Q}`,v=W==="GET"||W==="HEAD"?void 0:w.body,D={body:v,headers:new Headers(w.headers),method:W,credentials:G};if(this.config?.cache)D.cache=this.config.cache;if(v)D.duplex="half";if(typeof AbortController!=="undefined")D.signal=z;if(o.supported)D.keepalive=Z;if(typeof this.config.requestInit==="function")Object.assign(D,this.config.requestInit(w));let C=O(()=>{},"removeSignalEventListener"),S=j0(N,D),T=[fetch(S).then((J)=>{let R=J.headers,V={};for(let f of R.entries())V[f[0]]=f[1];if(J.body==null)return J.blob().then((f)=>({response:new K6.HttpResponse({headers:V,reason:J.statusText,statusCode:J.status,body:f})}));return{response:new K6.HttpResponse({headers:V,reason:J.statusText,statusCode:J.status,body:J.body})}}),W6(Y)];if(z)T.push(new Promise((J,R)=>{let V=O(()=>{let j=new Error("Request aborted");j.name="AbortError",R(j)},"onAbort");if(typeof z.addEventListener==="function"){let j=z;j.addEventListener("abort",V,{once:!0}),C=O(()=>j.removeEventListener("abort",V),"removeSignalEventListener")}else z.onabort=V}));return Promise.race(T).finally(C)}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((Y)=>{return Y[w]=z,Y})}httpHandlerConfigs(){return this.config??{}}},R8=P(),H8=O(async($)=>{if(typeof Blob==="function"&&$ instanceof Blob||$.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await $.arrayBuffer());return U6($)}return L6($)},"streamCollector");async function U6($){let w=await J6($),z=R8.fromBase64(w);return new Uint8Array(z)}O(U6,"collectBlob");async function L6($){let w=[],z=$.getReader(),Y=!1,Z=0;while(!Y){let{done:X,value:B}=await z.read();if(B)w.push(B),Z+=B.length;Y=X}let G=new Uint8Array(Z),Q=0;for(let X of w)G.set(X,Q),Q+=X.length;return G}O(L6,"collectStream");function J6($){return new Promise((w,z)=>{let Y=new FileReader;Y.onloadend=()=>{if(Y.readyState!==2)return z(new Error("Reader aborted too early"));let Z=Y.result??"",G=Z.indexOf(","),Q=G>-1?G+1:Z.length;w(Z.substring(Q))},Y.onabort=()=>z(new Error("Read aborted")),Y.onerror=()=>z(Y.error),Y.readAsDataURL($)})}O(J6,"readToBase64")});var H6=U((kw,R6)=>{var{defineProperty:$0,getOwnPropertyDescriptor:h8,getOwnPropertyNames:b8}=Object,O8=Object.prototype.hasOwnProperty,D6=($,w)=>$0($,"name",{value:w,configurable:!0}),I8=($,w)=>{for(var z in w)$0($,z,{get:w[z],enumerable:!0})},x8=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of b8(w))if(!O8.call($,Z)&&Z!==z)$0($,Z,{get:()=>w[Z],enumerable:!(Y=h8(w,Z))||Y.enumerable})}return $},A8=($)=>x8($0({},"__esModule",{value:!0}),$),v6={};I8(v6,{fromHex:()=>C6,toHex:()=>M6});R6.exports=A8(v6);var N6={},F0={};for(let $=0;$<256;$++){let w=$.toString(16).toLowerCase();if(w.length===1)w=`0${w}`;N6[$]=w,F0[w]=$}function C6($){if($.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let w=new Uint8Array($.length/2);for(let z=0;z<$.length;z+=2){let Y=$.slice(z,z+2).toLowerCase();if(Y in F0)w[z/2]=F0[Y];else throw new Error(`Cannot decode unrecognized sequence ${Y} as hexadecimal`)}return w}D6(C6,"fromHex");function M6($){let w="";for(let z=0;z<$.byteLength;z++)w+=N6[$[z]];return w}D6(M6,"toHex")});var A6=U((I6)=>{Object.defineProperty(I6,"__esModule",{value:!0});I6.sdkStreamMixin=void 0;var S8=F6(),T8=P(),k8=H6(),E8=s(),h6=E(),b6="The stream has already been transformed.",y8=($)=>{var w,z;if(!O6($)&&!h6.isReadableStream($)){let Q=((z=(w=$===null||$===void 0?void 0:$.__proto__)===null||w===void 0?void 0:w.constructor)===null||z===void 0?void 0:z.name)||$;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${Q}`)}let Y=!1,Z=async()=>{if(Y)throw new Error(b6);return Y=!0,await S8.streamCollector($)},G=(Q)=>{if(typeof Q.stream!=="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
|
|
9
9
|
If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return Q.stream()};return Object.assign($,{transformToByteArray:Z,transformToString:async(Q)=>{let X=await Z();if(Q==="base64")return T8.toBase64(X);else if(Q==="hex")return k8.toHex(X);else if(Q===void 0||Q==="utf8"||Q==="utf-8")return E8.toUtf8(X);else if(typeof TextDecoder==="function")return new TextDecoder(Q).decode(X);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(Y)throw new Error(b6);if(Y=!0,O6($))return G($);else if(h6.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};I6.sdkStreamMixin=y8;var O6=($)=>typeof Blob==="function"&&$ instanceof Blob});var E6=U((T6)=>{Object.defineProperty(T6,"__esModule",{value:!0});T6.sdkStreamMixin=void 0;var f8=X1(),P8=c(),D0=h("node:stream"),q8=A6(),S6="The stream has already been transformed.",g8=($)=>{var w,z;if(!($ instanceof D0.Readable))try{return q8.sdkStreamMixin($)}catch(G){let Q=((z=(w=$===null||$===void 0?void 0:$.__proto__)===null||w===void 0?void 0:w.constructor)===null||z===void 0?void 0:z.name)||$;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${Q}`)}let Y=!1,Z=async()=>{if(Y)throw new Error(S6);return Y=!0,await f8.streamCollector($)};return Object.assign($,{transformToByteArray:Z,transformToString:async(G)=>{let Q=await Z();if(G===void 0||Buffer.isEncoding(G))return P8.fromArrayBuffer(Q.buffer,Q.byteOffset,Q.byteLength).toString(G);else return new TextDecoder(G).decode(Q)},transformToWebStream:()=>{if(Y)throw new Error(S6);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof D0.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return Y=!0,D0.Readable.toWeb($)}})};T6.sdkStreamMixin=g8});var P6=U((y6)=>{Object.defineProperty(y6,"__esModule",{value:!0});y6.splitStream=void 0;async function c8($){if(typeof $.stream==="function")$=$.stream();return $.tee()}y6.splitStream=c8});var l6=U((c6)=>{Object.defineProperty(c6,"__esModule",{value:!0});c6.splitStream=void 0;var q6=h("node:stream"),u8=P6(),g6=E();async function l8($){if(g6.isReadableStream($)||g6.isBlob($))return u8.splitStream($);let w=new q6.PassThrough,z=new q6.PassThrough;return $.pipe(w),$.pipe(z),[w,z]}c6.splitStream=l8});var a6=U((qw,x)=>{var{defineProperty:w0,getOwnPropertyDescriptor:d8,getOwnPropertyNames:_8}=Object,p8=Object.prototype.hasOwnProperty,C0=($,w)=>w0($,"name",{value:w,configurable:!0}),i8=($,w)=>{for(var z in w)w0($,z,{get:w[z],enumerable:!0})},v0=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of _8(w))if(!p8.call($,Z)&&Z!==z)w0($,Z,{get:()=>w[Z],enumerable:!(Y=d8(w,Z))||Y.enumerable})}return $},y=($,w,z)=>(v0($,w,"default"),z&&v0(z,w,"default")),a8=($)=>v0(w0({},"__esModule",{value:!0}),$),I={};i8(I,{Uint8ArrayBlobAdapter:()=>N0});x.exports=a8(I);var d6=P(),_6=s();function p6($,w="utf-8"){if(w==="base64")return d6.toBase64($);return _6.toUtf8($)}C0(p6,"transformToString");function i6($,w){if(w==="base64")return N0.mutate(d6.fromBase64($));return N0.mutate(_6.fromUtf8($))}C0(i6,"transformFromString");var N0=class $ extends Uint8Array{static{C0(this,"Uint8ArrayBlobAdapter")}static fromString(w,z="utf-8"){switch(typeof w){case"string":return i6(w,z);default:throw new Error(`Unsupported conversion from ${typeof w} to Uint8ArrayBlobAdapter.`)}}static mutate(w){return Object.setPrototypeOf(w,$.prototype),w}transformToString(w="utf-8"){return p6(this,w)}};y(I,L0(),x.exports);y(I,c1(),x.exports);y(I,o1(),x.exports);y(I,w6(),x.exports);y(I,B6(),x.exports);y(I,E6(),x.exports);y(I,l6(),x.exports);y(I,E(),x.exports)});var zw=U((gw,r6)=>{var{defineProperty:H0,getOwnPropertyDescriptor:m8,getOwnPropertyNames:n8}=Object,s8=Object.prototype.hasOwnProperty,r8=($,w)=>{for(var z in w)H0($,z,{get:w[z],enumerable:!0})},t8=($,w,z,Y)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of n8(w))if(!s8.call($,Z)&&Z!==z)H0($,Z,{get:()=>w[Z],enumerable:!(Y=m8(w,Z))||Y.enumerable})}return $},o8=($)=>t8(H0({},"__esModule",{value:!0}),$),m6={};r8(m6,{RequestBuilder:()=>s6,collectBody:()=>e8,extendedEncodeURIComponent:()=>R0,requestBuilder:()=>ww,resolvedPath:()=>n6});r6.exports=o8(m6);var M0=a6(),e8=async($=new Uint8Array,w)=>{if($ instanceof Uint8Array)return M0.Uint8ArrayBlobAdapter.mutate($);if(!$)return M0.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let z=w.streamCollector($);return M0.Uint8ArrayBlobAdapter.mutate(await z)};function R0($){return encodeURIComponent($).replace(/[!'()*]/g,function(w){return"%"+w.charCodeAt(0).toString(16).toUpperCase()})}var $w=_(),n6=($,w,z,Y,Z,G)=>{if(w!=null&&w[z]!==void 0){let Q=Y();if(Q.length<=0)throw new Error("Empty value provided for input HTTP label: "+z+".");$=$.replace(Z,G?Q.split("/").map((X)=>R0(X)).join("/"):R0(Q))}else throw new Error("No value provided for input HTTP label: "+z+".");return $};function ww($,w){return new s6($,w)}var s6=class{constructor($,w){this.input=$,this.context=w,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:$,protocol:w="https",port:z,path:Y}=await this.context.endpoint();this.path=Y;for(let Z of this.resolvePathStack)Z(this.path);return new $w.HttpRequest({protocol:w,hostname:this.hostname||$,port:z,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn($){return this.hostname=$,this}bp($){return this.resolvePathStack.push((w)=>{this.path=`${w?.endsWith("/")?w.slice(0,-1):w||""}`+$}),this}p($,w,z,Y){return this.resolvePathStack.push((Z)=>{this.path=n6(Z,this.input,$,w,z,Y)}),this}h($){return this.headers=$,this}q($){return this.query=$,this}b($){return this.body=$,this}m($){return this.method=$,this}}});
|
|
10
|
-
export{E0 as
|
|
10
|
+
export{E0 as oc,_ as pc,K1 as qc,c as rc,s as sc,P as tc,d0 as uc,Q0 as vc,X1 as wc,H6 as xc,a6 as yc,zw as zc};
|