@stacksjs/buddy 0.70.9 → 0.70.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/chunk-1e89wpt6.js +2 -0
  2. package/dist/chunk-2htrvvzn.js +3 -0
  3. package/dist/chunk-2nrg08kz.js +2 -0
  4. package/dist/{chunk-bj7sb2gs.js → chunk-2pj0cr49.js} +1 -1
  5. package/dist/chunk-4v1a15ke.js +5 -0
  6. package/dist/{chunk-aqgpc9tg.js → chunk-68apz1e2.js} +1 -1
  7. package/dist/chunk-6v69415e.js +2 -0
  8. package/dist/chunk-8nb3z33p.js +2 -0
  9. package/dist/chunk-992fz6fq.js +3 -0
  10. package/dist/chunk-9j2yq17h.js +15 -0
  11. package/dist/chunk-9jthaaph.js +2 -0
  12. package/dist/chunk-am6xbcgg.js +2 -0
  13. package/dist/chunk-at17xh96.js +1 -0
  14. package/dist/{chunk-6444b3b6.js → chunk-cdr3xnz9.js} +1 -1
  15. package/dist/{chunk-h6ga49c2.js → chunk-cptthhq1.js} +2 -2
  16. package/dist/chunk-cqrmkpzz.js +8 -0
  17. package/dist/chunk-d9bheak7.js +35 -0
  18. package/dist/chunk-f0ftye71.js +3 -0
  19. package/dist/chunk-fvdx05dx.js +25 -0
  20. package/dist/{chunk-eyn01tkt.js → chunk-hjdz5p2e.js} +2 -2
  21. package/dist/{chunk-864kk6a7.js → chunk-ks9kq37e.js} +1 -1
  22. package/dist/chunk-m05w5c0s.js +2 -0
  23. package/dist/{chunk-m5phygyg.js → chunk-mvkb5fc3.js} +2 -2
  24. package/dist/chunk-nec9r4e3.js +240 -0
  25. package/dist/chunk-rewjb3gf.js +10 -0
  26. package/dist/{chunk-y7yphjhj.js → chunk-s6kch47s.js} +1 -1
  27. package/dist/{chunk-wjhmhcgy.js → chunk-sgrntkej.js} +2 -2
  28. package/dist/{chunk-vcke324z.js → chunk-whp9hjd8.js} +3 -3
  29. package/dist/chunk-x0ahr107.js +33 -0
  30. package/dist/chunk-x46hz7dc.js +10 -0
  31. package/dist/{chunk-sz5qrrg9.js → chunk-z4zm45jz.js} +1 -1
  32. package/dist/chunk-z8qfv6vv.js +5410 -0
  33. package/dist/chunk-zxq24dtw.js +2 -0
  34. package/dist/cli.js +1 -1
  35. package/dist/index.js +1 -1
  36. package/package.json +45 -45
  37. package/dist/chunk-0kx5e4np.js +0 -3
  38. package/dist/chunk-8nnfx0xe.js +0 -10
  39. package/dist/chunk-cdz7xgbk.js +0 -5
  40. package/dist/chunk-cs2tr6yd.js +0 -2
  41. package/dist/chunk-cx7bz59q.js +0 -3
  42. package/dist/chunk-dvnqfcah.js +0 -2
  43. package/dist/chunk-dz02fqrj.js +0 -1
  44. package/dist/chunk-ensrnv3v.js +0 -4699
  45. package/dist/chunk-f0sjawty.js +0 -3
  46. package/dist/chunk-gamj1826.js +0 -2
  47. package/dist/chunk-gser7yzj.js +0 -2
  48. package/dist/chunk-p2hmvsjh.js +0 -10
  49. package/dist/chunk-v040jj16.js +0 -2
  50. package/dist/chunk-xkpw06x6.js +0 -2
  51. package/dist/chunk-yqrgw3jk.js +0 -35
  52. package/dist/chunk-zyvsgnfm.js +0 -25
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ec as A,Kc as E}from"./chunk-at17xh96.js";import"./chunk-sgrntkej.js";import{Pc as K}from"./chunk-hjdz5p2e.js";import{Qc as T}from"./chunk-cptthhq1.js";import{Rc as w}from"./chunk-2pj0cr49.js";var o=w(T(),1);import{exec as y}from"node:child_process";import{promisify as I}from"node:util";var S=w(K(),1),x=(c,n,e)=>{if(n.Version!==1)throw Error(`Profile ${c} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${c} credential_process returned invalid credentials.`);if(n.Expiration){let i=new Date;if(new Date(n.Expiration)<i)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let s=n.AccountId;if(!s&&e?.[c]?.aws_account_id)s=e[c].aws_account_id;let t={accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...s&&{accountId:s}};return S.setCredentialFeature(t,"CREDENTIALS_PROCESS","w"),t};var _=async(c,n,e)=>{let s=n[c];if(n[c]){let t=s.credential_process;if(t!==void 0){let i=I(y);try{let{stdout:r}=await i(t),u;try{u=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return x(c,u,n)}catch(r){throw new o.CredentialsProviderError(r.message,{logger:e})}}else throw new o.CredentialsProviderError(`Profile ${c} did not contain credential_process.`,{logger:e})}else throw new o.CredentialsProviderError(`Profile ${c} could not be found in shared credentials file.`,{logger:e})};var F=(c={})=>async({callerClientConfig:n}={})=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let e=await E(c);return _(A({profile:c.profile??n?.profile}),e,c.logger)};export{F as fromProcess};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Gb as z,Hb as P}from"./chunk-mvkb5fc3.js";import"./chunk-at17xh96.js";import"./chunk-sgrntkej.js";import{Qc as D}from"./chunk-cptthhq1.js";import{Rc as _}from"./chunk-2pj0cr49.js";var m=_(D(),1);import{parse as o}from"node:url";var K=_(D(),1);import{Buffer as a}from"node:buffer";import{request as n}from"node:http";function u(c){return new Promise((I,x)=>{let T=n({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new K.ProviderError("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new K.ProviderError("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{let{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new K.ProviderError("Error response received from instance metadata service"),{statusCode:O})),T.destroy();let E=[];N.on("data",(y)=>{E.push(y)}),N.on("end",()=>{I(a.concat(E)),T.destroy()})}),T.end()})}var G=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",Q=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var uc=1000,Ec=0,X=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var f=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var v="AWS_CONTAINER_CREDENTIALS_FULL_URI",L="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",B="AWS_CONTAINER_AUTHORIZATION_TOKEN",Kc=(c={})=>{let{timeout:I,maxRetries:x}=X(c);return()=>f(async()=>{let T=await d({logger:c.logger}),N=JSON.parse(await s(I,T));if(!G(N))throw new m.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:c.logger});return Q(N)},x)},s=async(c,I)=>{if(process.env[B])I.headers={...I.headers,Authorization:process.env[B]};return(await u({...I,timeout:c})).toString()},g="169.254.170.2",l={localhost:!0,"127.0.0.1":!0},r={"http:":!0,"https:":!0},d=async({logger:c})=>{if(process.env[L])return{hostname:g,path:process.env[L]};if(process.env[v]){let I=o(process.env[v]);if(!I.hostname||!(I.hostname in l))throw new m.CredentialsProviderError(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in r))throw new m.CredentialsProviderError(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new m.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${L} or ${v} environment variable is set`,{tryNextLink:!1,logger:c})};var q=_(D(),1);var U=_(D(),1);class Z extends U.CredentialsProviderError{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Z.prototype)}}var A;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(A||(A={}));var t={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var S;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(S||(S={}));var e="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",i="ec2_metadata_service_endpoint_mode",F={environmentVariableSelector:(c)=>c[e],configFileSelector:(c)=>c[i],default:S.IPv4};var W=async()=>P(await cc()||await Ic()),cc=async()=>z(t)(),Ic=async()=>{let c=await z(F)();switch(c){case S.IPv4:return A.IPv4;case S.IPv6:return A.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(S)}`)}};var b=(c,I)=>{let x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(T)}.
3
+ For more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var V=(c,I={})=>{let x=I?.logger||console,T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=b(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=b(T,x);else throw O}return T=N,N}};var k="/latest/meta-data/iam/security-credentials/",Tc="/latest/api/token",H="AWS_EC2_METADATA_V1_DISABLED",R="ec2_metadata_v1_disabled",M="x-aws-ec2-metadata-token",oc=(c={})=>V(Nc(c),{logger:c.logger}),Nc=(c={})=>{let I=!1,{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=X(c),E=async(y,$)=>{if(I||$.headers?.[M]==null){let w=!1,h=!1,C=await z({environmentVariableSelector:(Y)=>{let j=Y[H];if(h=!!j&&j!=="false",j===void 0)throw new q.CredentialsProviderError(`${H} not set in env, checking config file next.`,{logger:c.logger});return h},configFileSelector:(Y)=>{let j=Y[R];return w=!!j&&j!=="false",w},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||C){let Y=[];if(c.ec2MetadataV1Disabled)Y.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(w)Y.push(`config file profile (${R})`);if(h)Y.push(`process environment variable (${H})`);throw new Z(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Y.join(", ")}].`)}}let p=(await f(async()=>{let w;try{w=await Oc($)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)).trim();return f(async()=>{let w;try{w=await yc(p,$,c)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)};return async()=>{let y=await W();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(O,{...y,timeout:N});else{let $;try{$=(await xc({...y,timeout:N})).toString()}catch(J){if(J?.statusCode===400)throw Object.assign(J,{message:"EC2 Metadata token request returned error"});else if(J.message==="TimeoutError"||[403,404,405].includes(J.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(O,{...y,timeout:N})}return E(O,{...y,headers:{[M]:$},timeout:N})}}},xc=async(c)=>u({...c,path:Tc,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Oc=async(c)=>(await u({...c,path:k})).toString(),yc=async(c,I,x)=>{let T=JSON.parse((await u({...I,path:k+c})).toString());if(!G(T))throw new q.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:x.logger});return Q(T)};export{X as providerConfigFromInit,u as httpRequest,W as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,Kc as fromContainerMetadata,A as Endpoint,L as ENV_CMDS_RELATIVE_URI,v as ENV_CMDS_FULL_URI,B as ENV_CMDS_AUTH_TOKEN,uc as DEFAULT_TIMEOUT,Ec as DEFAULT_MAX_RETRIES};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ia as kI,Ja as LI,Ka as WI,La as bd,Ma as fd,Na as YI,Oa as _l,Pa as JI,Qa as dI,Ra as id,Sa as d1,Ta as II,Ua as Vl,Va as PI,Wa as EI,Xa as SI,Ya as DI,Za as NI,_a as VI}from"./chunk-f0ftye71.js";import{lc as Bd,mc as il,nc as t,oc as lI,pc as A,qc as m}from"./chunk-fvdx05dx.js";import{sc as $l,vc as md,wc as Cd,zc as td}from"./chunk-rewjb3gf.js";import"./chunk-sgrntkej.js";import{Pc as bI}from"./chunk-hjdz5p2e.js";import"./chunk-cptthhq1.js";import{Tc as V}from"./chunk-2pj0cr49.js";var c=V((j1)=>{Object.defineProperty(j1,"__esModule",{value:!0});j1.resolveHttpAuthSchemeConfig=j1.resolveStsAuthConfig=j1.defaultSTSHttpAuthSchemeProvider=j1.defaultSTSHttpAuthSchemeParametersProvider=void 0;var kd=m(),$1=Bd(),Ld=O(),Wd=async(l,I,d)=>{return{operation:$1.getSmithyContext(I).operation,region:await $1.normalizeProvider(l.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};j1.defaultSTSHttpAuthSchemeParametersProvider=Wd;function Yd(l){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:l.region},propertiesExtractor:(I,d)=>({signingProperties:{config:I,context:d}})}}function Jd(l){return{schemeId:"smithy.api#noAuth"}}var Kd=(l)=>{let I=[];switch(l.operation){case"AssumeRoleWithWebIdentity":{I.push(Jd(l));break}default:I.push(Yd(l))}return I};j1.defaultSTSHttpAuthSchemeProvider=Kd;var Xd=(l)=>Object.assign(l,{stsClientCtor:Ld.STSClient});j1.resolveStsAuthConfig=Xd;var Qd=(l)=>{let I=j1.resolveStsAuthConfig(l),d=kd.resolveAwsSdkSigV4Config(I);return Object.assign(d,{})};j1.resolveHttpAuthSchemeConfig=Qd});var s=V((b1)=>{Object.defineProperty(b1,"__esModule",{value:!0});b1.commonParams=b1.resolveClientEndpointParameters=void 0;var jd=(l)=>{return Object.assign(l,{useDualstackEndpoint:l.useDualstackEndpoint??!1,useFipsEndpoint:l.useFipsEndpoint??!1,useGlobalEndpoint:l.useGlobalEndpoint??!1,defaultSigningName:"sts"})};b1.resolveClientEndpointParameters=jd;b1.commonParams={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var Fl=V((Dl)=>{Object.defineProperty(Dl,"__esModule",{value:!0});Dl.ruleSet=void 0;var n1="required",D="type",F="fn",q="argv",J="ref",y1=!1,o=!0,Y="booleanEquals",U="stringEquals",p1="sigv4",u1="sts",t1="us-east-1",r="endpoint",O1="https://sts.{Region}.{PartitionResult#dnsSuffix}",B="tree",X="error",p="getAttr",s1={[n1]:!1,[D]:"String"},n={[n1]:!0,default:!1,[D]:"Boolean"},ll={[J]:"Endpoint"},g1={[F]:"isSet",[q]:[{[J]:"Region"}]},G={[J]:"Region"},m1={[F]:"aws.partition",[q]:[G],assign:"PartitionResult"},dl={[J]:"UseFIPS"},Il={[J]:"UseDualStack"},M={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:p1,signingName:u1,signingRegion:t1}]},headers:{}},a={},C1={conditions:[{[F]:U,[q]:[G,"aws-global"]}],[r]:M,[D]:r},Pl={[F]:Y,[q]:[dl,!0]},El={[F]:Y,[q]:[Il,!0]},i1={[F]:p,[q]:[{[J]:"PartitionResult"},"supportsFIPS"]},Sl={[J]:"PartitionResult"},x1={[F]:Y,[q]:[!0,{[F]:p,[q]:[Sl,"supportsDualStack"]}]},e1=[{[F]:"isSet",[q]:[ll]}],c1=[Pl],o1=[El],zd={version:"1.0",parameters:{Region:s1,UseDualStack:n,UseFIPS:n,Endpoint:s1,UseGlobalEndpoint:n},rules:[{conditions:[{[F]:Y,[q]:[{[J]:"UseGlobalEndpoint"},o]},{[F]:"not",[q]:e1},g1,m1,{[F]:Y,[q]:[dl,y1]},{[F]:Y,[q]:[Il,y1]}],rules:[{conditions:[{[F]:U,[q]:[G,"ap-northeast-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"ap-south-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"ap-southeast-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"ap-southeast-2"]}],endpoint:M,[D]:r},C1,{conditions:[{[F]:U,[q]:[G,"ca-central-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"eu-central-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"eu-north-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"eu-west-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"eu-west-2"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"eu-west-3"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"sa-east-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,t1]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"us-east-2"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"us-west-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"us-west-2"]}],endpoint:M,[D]:r},{endpoint:{url:O1,properties:{authSchemes:[{name:p1,signingName:u1,signingRegion:"{Region}"}]},headers:a},[D]:r}],[D]:B},{conditions:e1,rules:[{conditions:c1,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[D]:X},{conditions:o1,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[D]:X},{endpoint:{url:ll,properties:a,headers:a},[D]:r}],[D]:B},{conditions:[g1],rules:[{conditions:[m1],rules:[{conditions:[Pl,El],rules:[{conditions:[{[F]:Y,[q]:[o,i1]},x1],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:a,headers:a},[D]:r}],[D]:B},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[D]:X}],[D]:B},{conditions:c1,rules:[{conditions:[{[F]:Y,[q]:[i1,o]}],rules:[{conditions:[{[F]:U,[q]:[{[F]:p,[q]:[Sl,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:a,headers:a},[D]:r},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:a,headers:a},[D]:r}],[D]:B},{error:"FIPS is enabled but this partition does not support FIPS",[D]:X}],[D]:B},{conditions:o1,rules:[{conditions:[x1],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:a,headers:a},[D]:r}],[D]:B},{error:"DualStack is enabled but this partition does not support DualStack",[D]:X}],[D]:B},C1,{endpoint:{url:O1,properties:a,headers:a},[D]:r}],[D]:B}],[D]:B},{error:"Invalid Configuration: Missing Region",[D]:X}]};Dl.ruleSet=zd});var wl=V((ql)=>{Object.defineProperty(ql,"__esModule",{value:!0});ql.defaultEndpointResolver=void 0;var yd=fd(),u=bd(),Od=Fl(),sd=new u.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),gd=(l,I={})=>{return sd.get(l,()=>u.resolveEndpoint(Od.ruleSet,{endpointParams:l,logger:I.logger}))};ql.defaultEndpointResolver=gd;u.customEndpointFunctions.aws=yd.awsEndpointFunctions});var Ml=V((Ul)=>{Object.defineProperty(Ul,"__esModule",{value:!0});Ul.getRuntimeConfig=void 0;var xd=m(),ed=t(),cd=A(),od=id(),rl=Cd(),Rl=md(),nd=c(),pd=wl(),ud=(l)=>{return{apiVersion:"2011-06-15",base64Decoder:l?.base64Decoder??rl.fromBase64,base64Encoder:l?.base64Encoder??rl.toBase64,disableHostPrefix:l?.disableHostPrefix??!1,endpointProvider:l?.endpointProvider??pd.defaultEndpointResolver,extensions:l?.extensions??[],httpAuthSchemeProvider:l?.httpAuthSchemeProvider??nd.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:l?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(I)=>I.getIdentityProvider("aws.auth#sigv4"),signer:new xd.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(I)=>I.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ed.NoAuthSigner}],logger:l?.logger??new cd.NoOpLogger,serviceId:l?.serviceId??"STS",urlParser:l?.urlParser??od.parseUrl,utf8Decoder:l?.utf8Decoder??Rl.fromUtf8,utf8Encoder:l?.utf8Encoder??Rl.toUtf8}};Ul.getRuntimeConfig=ud});var Ll=V((Bl)=>{Object.defineProperty(Bl,"__esModule",{value:!0});Bl.getRuntimeConfig=void 0;var FI=lI(),qI=FI.__importDefault(PI()),hl=m(),al=EI(),C=_l(),vI=t(),wI=SI(),Al=Vl(),Q=dI(),Tl=td(),rI=DI(),RI=II(),UI=Ml(),GI=A(),MI=NI(),hI=A(),aI=(l)=>{hI.emitWarningIfUnsupportedVersion(process.version);let I=MI.resolveDefaultsModeConfig(l),d=()=>I().then(GI.loadConfigsForDefaultMode),E=UI.getRuntimeConfig(l);hl.emitWarningIfUnsupportedVersion(process.version);let P={profile:l?.profile};return{...E,...l,runtime:"node",defaultsMode:I,bodyLengthChecker:l?.bodyLengthChecker??rI.calculateBodyLength,defaultUserAgentProvider:l?.defaultUserAgentProvider??al.createDefaultUserAgentProvider({serviceId:E.serviceId,clientVersion:qI.default.version}),httpAuthSchemes:l?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(v)=>v.getIdentityProvider("aws.auth#sigv4")||(async(N)=>await l.credentialDefaultProvider(N?.__config||{})()),signer:new hl.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(v)=>v.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new vI.NoAuthSigner}],maxAttempts:l?.maxAttempts??Q.loadConfig(Al.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,l),region:l?.region??Q.loadConfig(C.NODE_REGION_CONFIG_OPTIONS,{...C.NODE_REGION_CONFIG_FILE_OPTIONS,...P}),requestHandler:Tl.NodeHttpHandler.create(l?.requestHandler??d),retryMode:l?.retryMode??Q.loadConfig({...Al.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await d()).retryMode||RI.DEFAULT_RETRY_MODE},l),sha256:l?.sha256??wI.Hash.bind(null,"sha256"),streamCollector:l?.streamCollector??Tl.streamCollector,useDualstackEndpoint:l?.useDualstackEndpoint??Q.loadConfig(C.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,P),useFipsEndpoint:l?.useFipsEndpoint??Q.loadConfig(C.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,P),userAgentAppId:l?.userAgentAppId??Q.loadConfig(al.NODE_APP_ID_CONFIG_OPTIONS,P)}};Bl.getRuntimeConfig=aI});var Jl=V((Wl)=>{Object.defineProperty(Wl,"__esModule",{value:!0});Wl.resolveHttpAuthRuntimeConfig=Wl.getHttpAuthExtensionConfiguration=void 0;var AI=(l)=>{let{httpAuthSchemes:I,httpAuthSchemeProvider:d,credentials:E}=l;return{setHttpAuthScheme(P){let v=I.findIndex((N)=>N.schemeId===P.schemeId);if(v===-1)I.push(P);else I.splice(v,1,P)},httpAuthSchemes(){return I},setHttpAuthSchemeProvider(P){d=P},httpAuthSchemeProvider(){return d},setCredentials(P){E=P},credentials(){return E}}};Wl.getHttpAuthExtensionConfiguration=AI;var TI=(l)=>{return{httpAuthSchemes:l.httpAuthSchemes(),httpAuthSchemeProvider:l.httpAuthSchemeProvider(),credentials:l.credentials()}};Wl.resolveHttpAuthRuntimeConfig=TI});var zl=V((jl)=>{Object.defineProperty(jl,"__esModule",{value:!0});jl.resolveRuntimeExtensions=void 0;var Kl=VI(),Xl=$l(),Ql=A(),Zl=Jl(),BI=(l,I)=>{let d=Object.assign(Kl.getAwsRegionExtensionConfiguration(l),Ql.getDefaultExtensionConfiguration(l),Xl.getHttpHandlerExtensionConfiguration(l),Zl.getHttpAuthExtensionConfiguration(l));return I.forEach((E)=>E.configure(d)),Object.assign(l,Kl.resolveAwsRegionExtensionConfiguration(d),Ql.resolveDefaultRuntimeConfig(d),Xl.resolveHttpHandlerRuntimeConfig(d),Zl.resolveHttpAuthRuntimeConfig(d))};jl.resolveRuntimeExtensions=BI});var O=V((I1)=>{Object.defineProperty(I1,"__esModule",{value:!0});I1.STSClient=I1.__Client=void 0;var bl=kI(),KI=LI(),XI=WI(),fl=YI(),QI=_l(),l1=t(),ZI=JI(),$I=d1(),yl=Vl(),sl=A();Object.defineProperty(I1,"__Client",{enumerable:!0,get:function(){return sl.Client}});var Ol=c(),jI=s(),HI=Ll(),zI=zl();class gl extends sl.Client{config;constructor(...[l]){let I=HI.getRuntimeConfig(l||{});super(I);this.initConfig=I;let d=jI.resolveClientEndpointParameters(I),E=fl.resolveUserAgentConfig(d),P=yl.resolveRetryConfig(E),v=QI.resolveRegionConfig(P),N=bl.resolveHostHeaderConfig(v),h=$I.resolveEndpointConfig(N),T=Ol.resolveHttpAuthSchemeConfig(h),_=zI.resolveRuntimeExtensions(T,l?.extensions||[]);this.config=_,this.middlewareStack.use(fl.getUserAgentPlugin(this.config)),this.middlewareStack.use(yl.getRetryPlugin(this.config)),this.middlewareStack.use(ZI.getContentLengthPlugin(this.config)),this.middlewareStack.use(bl.getHostHeaderPlugin(this.config)),this.middlewareStack.use(KI.getLoggerPlugin(this.config)),this.middlewareStack.use(XI.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(l1.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Ol.defaultSTSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(K)=>new l1.DefaultIdentityProviderConfig({"aws.auth#sigv4":K.credentials})})),this.middlewareStack.use(l1.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}I1.STSClient=gl});var yP=V((nP,Z1)=>{var{defineProperty:i,getOwnPropertyDescriptor:fI,getOwnPropertyNames:yI}=Object,OI=Object.prototype.hasOwnProperty,S=(l,I)=>i(l,"name",{value:I,configurable:!0}),sI=(l,I)=>{for(var d in I)i(l,d,{get:I[d],enumerable:!0})},L1=(l,I,d,E)=>{if(I&&typeof I==="object"||typeof I==="function"){for(let P of yI(I))if(!OI.call(l,P)&&P!==d)i(l,P,{get:()=>I[P],enumerable:!(E=fI(I,P))||E.enumerable})}return l},gI=(l,I,d)=>(L1(l,I,"default"),d&&L1(d,I,"default")),mI=(l)=>L1(i({},"__esModule",{value:!0}),l),Y1={};sI(Y1,{AssumeRoleCommand:()=>X1,AssumeRoleResponseFilterSensitiveLog:()=>el,AssumeRoleWithWebIdentityCommand:()=>Q1,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>ld,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>dd,ClientInputEndpointParameters:()=>HP.ClientInputEndpointParameters,CredentialsFilterSensitiveLog:()=>J1,ExpiredTokenException:()=>cl,IDPCommunicationErrorException:()=>Id,IDPRejectedClaimException:()=>ul,InvalidIdentityTokenException:()=>tl,MalformedPolicyDocumentException:()=>ol,PackedPolicyTooLargeException:()=>nl,RegionDisabledException:()=>pl,STS:()=>Rd,STSServiceException:()=>L,decorateDefaultCredentialProvider:()=>fP,getDefaultRoleAssumer:()=>Ad,getDefaultRoleAssumerWithWebIdentity:()=>Td});Z1.exports=mI(Y1);gI(Y1,O(),Z1.exports);var CI=A(),iI=d1(),xI=il(),eI=A(),cI=s(),xl=A(),oI=A(),L=class l extends oI.ServiceException{static{S(this,"STSServiceException")}constructor(I){super(I);Object.setPrototypeOf(this,l.prototype)}},J1=S((l)=>({...l,...l.SecretAccessKey&&{SecretAccessKey:xl.SENSITIVE_STRING}}),"CredentialsFilterSensitiveLog"),el=S((l)=>({...l,...l.Credentials&&{Credentials:J1(l.Credentials)}}),"AssumeRoleResponseFilterSensitiveLog"),cl=class l extends L{static{S(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";constructor(I){super({name:"ExpiredTokenException",$fault:"client",...I});Object.setPrototypeOf(this,l.prototype)}},ol=class l extends L{static{S(this,"MalformedPolicyDocumentException")}name="MalformedPolicyDocumentException";$fault="client";constructor(I){super({name:"MalformedPolicyDocumentException",$fault:"client",...I});Object.setPrototypeOf(this,l.prototype)}},nl=class l extends L{static{S(this,"PackedPolicyTooLargeException")}name="PackedPolicyTooLargeException";$fault="client";constructor(I){super({name:"PackedPolicyTooLargeException",$fault:"client",...I});Object.setPrototypeOf(this,l.prototype)}},pl=class l extends L{static{S(this,"RegionDisabledException")}name="RegionDisabledException";$fault="client";constructor(I){super({name:"RegionDisabledException",$fault:"client",...I});Object.setPrototypeOf(this,l.prototype)}},ul=class l extends L{static{S(this,"IDPRejectedClaimException")}name="IDPRejectedClaimException";$fault="client";constructor(I){super({name:"IDPRejectedClaimException",$fault:"client",...I});Object.setPrototypeOf(this,l.prototype)}},tl=class l extends L{static{S(this,"InvalidIdentityTokenException")}name="InvalidIdentityTokenException";$fault="client";constructor(I){super({name:"InvalidIdentityTokenException",$fault:"client",...I});Object.setPrototypeOf(this,l.prototype)}},ld=S((l)=>({...l,...l.WebIdentityToken&&{WebIdentityToken:xl.SENSITIVE_STRING}}),"AssumeRoleWithWebIdentityRequestFilterSensitiveLog"),dd=S((l)=>({...l,...l.Credentials&&{Credentials:J1(l.Credentials)}}),"AssumeRoleWithWebIdentityResponseFilterSensitiveLog"),Id=class l extends L{static{S(this,"IDPCommunicationErrorException")}name="IDPCommunicationErrorException";$fault="client";constructor(I){super({name:"IDPCommunicationErrorException",$fault:"client",...I});Object.setPrototypeOf(this,l.prototype)}},K1=m(),nI=$l(),w=A(),pI=S(async(l,I)=>{let d=Fd,E;return E=rd({...FP(l,I),[vd]:WP,[wd]:qd}),Nd(I,d,"/",void 0,E)},"se_AssumeRoleCommand"),uI=S(async(l,I)=>{let d=Fd,E;return E=rd({...qP(l,I),[vd]:YP,[wd]:qd}),Nd(I,d,"/",void 0,E)},"se_AssumeRoleWithWebIdentityCommand"),tI=S(async(l,I)=>{if(l.statusCode>=300)return Pd(l,I);let d=await K1.parseXmlBody(l.body,I),E={};return E=MP(d.AssumeRoleResult,I),{$metadata:W(l),...E}},"de_AssumeRoleCommand"),lP=S(async(l,I)=>{if(l.statusCode>=300)return Pd(l,I);let d=await K1.parseXmlBody(l.body,I),E={};return E=hP(d.AssumeRoleWithWebIdentityResult,I),{$metadata:W(l),...E}},"de_AssumeRoleWithWebIdentityCommand"),Pd=S(async(l,I)=>{let d={...l,body:await K1.parseXmlErrorBody(l.body,I)},E=JP(l,d.body);switch(E){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await dP(d,I);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await SP(d,I);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await DP(d,I);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await NP(d,I);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await IP(d,I);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await PP(d,I);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await EP(d,I);default:let P=d.body;return LP({output:l,parsedBody:P.Error,errorCode:E})}},"de_CommandError"),dP=S(async(l,I)=>{let d=l.body,E=aP(d.Error,I),P=new cl({$metadata:W(l),...E});return w.decorateServiceException(P,d)},"de_ExpiredTokenExceptionRes"),IP=S(async(l,I)=>{let d=l.body,E=AP(d.Error,I),P=new Id({$metadata:W(l),...E});return w.decorateServiceException(P,d)},"de_IDPCommunicationErrorExceptionRes"),PP=S(async(l,I)=>{let d=l.body,E=TP(d.Error,I),P=new ul({$metadata:W(l),...E});return w.decorateServiceException(P,d)},"de_IDPRejectedClaimExceptionRes"),EP=S(async(l,I)=>{let d=l.body,E=_P(d.Error,I),P=new tl({$metadata:W(l),...E});return w.decorateServiceException(P,d)},"de_InvalidIdentityTokenExceptionRes"),SP=S(async(l,I)=>{let d=l.body,E=VP(d.Error,I),P=new ol({$metadata:W(l),...E});return w.decorateServiceException(P,d)},"de_MalformedPolicyDocumentExceptionRes"),DP=S(async(l,I)=>{let d=l.body,E=BP(d.Error,I),P=new nl({$metadata:W(l),...E});return w.decorateServiceException(P,d)},"de_PackedPolicyTooLargeExceptionRes"),NP=S(async(l,I)=>{let d=l.body,E=kP(d.Error,I),P=new pl({$metadata:W(l),...E});return w.decorateServiceException(P,d)},"de_RegionDisabledExceptionRes"),FP=S((l,I)=>{let d={};if(l[f]!=null)d[f]=l[f];if(l[y]!=null)d[y]=l[y];if(l[z]!=null){let E=Ed(l[z],I);if(l[z]?.length===0)d.PolicyArns=[];Object.entries(E).forEach(([P,v])=>{let N=`PolicyArns.${P}`;d[N]=v})}if(l[H]!=null)d[H]=l[H];if(l[j]!=null)d[j]=l[j];if(l[A1]!=null){let E=GP(l[A1],I);if(l[A1]?.length===0)d.Tags=[];Object.entries(E).forEach(([P,v])=>{let N=`Tags.${P}`;d[N]=v})}if(l[_1]!=null){let E=UP(l[_1],I);if(l[_1]?.length===0)d.TransitiveTagKeys=[];Object.entries(E).forEach(([P,v])=>{let N=`TransitiveTagKeys.${P}`;d[N]=v})}if(l[q1]!=null)d[q1]=l[q1];if(l[h1]!=null)d[h1]=l[h1];if(l[T1]!=null)d[T1]=l[T1];if(l[k]!=null)d[k]=l[k];if(l[r1]!=null){let E=rP(l[r1],I);if(l[r1]?.length===0)d.ProvidedContexts=[];Object.entries(E).forEach(([P,v])=>{let N=`ProvidedContexts.${P}`;d[N]=v})}return d},"se_AssumeRoleRequest"),qP=S((l,I)=>{let d={};if(l[f]!=null)d[f]=l[f];if(l[y]!=null)d[y]=l[y];if(l[B1]!=null)d[B1]=l[B1];if(l[R1]!=null)d[R1]=l[R1];if(l[z]!=null){let E=Ed(l[z],I);if(l[z]?.length===0)d.PolicyArns=[];Object.entries(E).forEach(([P,v])=>{let N=`PolicyArns.${P}`;d[N]=v})}if(l[H]!=null)d[H]=l[H];if(l[j]!=null)d[j]=l[j];return d},"se_AssumeRoleWithWebIdentityRequest"),Ed=S((l,I)=>{let d={},E=1;for(let P of l){if(P===null)continue;let v=vP(P,I);Object.entries(v).forEach(([N,h])=>{d[`member.${E}.${N}`]=h}),E++}return d},"se_policyDescriptorListType"),vP=S((l,I)=>{let d={};if(l[k1]!=null)d[k1]=l[k1];return d},"se_PolicyDescriptorType"),wP=S((l,I)=>{let d={};if(l[w1]!=null)d[w1]=l[w1];if(l[N1]!=null)d[N1]=l[N1];return d},"se_ProvidedContext"),rP=S((l,I)=>{let d={},E=1;for(let P of l){if(P===null)continue;let v=wP(P,I);Object.entries(v).forEach(([N,h])=>{d[`member.${E}.${N}`]=h}),E++}return d},"se_ProvidedContextsListType"),RP=S((l,I)=>{let d={};if(l[v1]!=null)d[v1]=l[v1];if(l[V1]!=null)d[V1]=l[V1];return d},"se_Tag"),UP=S((l,I)=>{let d={},E=1;for(let P of l){if(P===null)continue;d[`member.${E}`]=P,E++}return d},"se_tagKeyListType"),GP=S((l,I)=>{let d={},E=1;for(let P of l){if(P===null)continue;let v=RP(P,I);Object.entries(v).forEach(([N,h])=>{d[`member.${E}.${N}`]=h}),E++}return d},"se_tagListType"),Sd=S((l,I)=>{let d={};if(l[E1]!=null)d[E1]=w.expectString(l[E1]);if(l[S1]!=null)d[S1]=w.expectString(l[S1]);return d},"de_AssumedRoleUser"),MP=S((l,I)=>{let d={};if(l[$]!=null)d[$]=Dd(l[$],I);if(l[Z]!=null)d[Z]=Sd(l[Z],I);if(l[b]!=null)d[b]=w.strictParseInt32(l[b]);if(l[k]!=null)d[k]=w.expectString(l[k]);return d},"de_AssumeRoleResponse"),hP=S((l,I)=>{let d={};if(l[$]!=null)d[$]=Dd(l[$],I);if(l[M1]!=null)d[M1]=w.expectString(l[M1]);if(l[Z]!=null)d[Z]=Sd(l[Z],I);if(l[b]!=null)d[b]=w.strictParseInt32(l[b]);if(l[U1]!=null)d[U1]=w.expectString(l[U1]);if(l[D1]!=null)d[D1]=w.expectString(l[D1]);if(l[k]!=null)d[k]=w.expectString(l[k]);return d},"de_AssumeRoleWithWebIdentityResponse"),Dd=S((l,I)=>{let d={};if(l[P1]!=null)d[P1]=w.expectString(l[P1]);if(l[G1]!=null)d[G1]=w.expectString(l[G1]);if(l[a1]!=null)d[a1]=w.expectString(l[a1]);if(l[F1]!=null)d[F1]=w.expectNonNull(w.parseRfc3339DateTimeWithOffset(l[F1]));return d},"de_Credentials"),aP=S((l,I)=>{let d={};if(l[R]!=null)d[R]=w.expectString(l[R]);return d},"de_ExpiredTokenException"),AP=S((l,I)=>{let d={};if(l[R]!=null)d[R]=w.expectString(l[R]);return d},"de_IDPCommunicationErrorException"),TP=S((l,I)=>{let d={};if(l[R]!=null)d[R]=w.expectString(l[R]);return d},"de_IDPRejectedClaimException"),_P=S((l,I)=>{let d={};if(l[R]!=null)d[R]=w.expectString(l[R]);return d},"de_InvalidIdentityTokenException"),VP=S((l,I)=>{let d={};if(l[R]!=null)d[R]=w.expectString(l[R]);return d},"de_MalformedPolicyDocumentException"),BP=S((l,I)=>{let d={};if(l[R]!=null)d[R]=w.expectString(l[R]);return d},"de_PackedPolicyTooLargeException"),kP=S((l,I)=>{let d={};if(l[R]!=null)d[R]=w.expectString(l[R]);return d},"de_RegionDisabledException"),W=S((l)=>({httpStatusCode:l.statusCode,requestId:l.headers["x-amzn-requestid"]??l.headers["x-amzn-request-id"]??l.headers["x-amz-request-id"],extendedRequestId:l.headers["x-amz-id-2"],cfId:l.headers["x-amz-cf-id"]}),"deserializeMetadata"),LP=w.withBaseException(L),Nd=S(async(l,I,d,E,P)=>{let{hostname:v,protocol:N="https",port:h,path:T}=await l.endpoint(),_={protocol:N,hostname:v,port:h,method:"POST",path:T.endsWith("/")?T.slice(0,-1)+d:T+d,headers:I};if(E!==void 0)_.hostname=E;if(P!==void 0)_.body=P;return new nI.HttpRequest(_)},"buildHttpRpcRequest"),Fd={"content-type":"application/x-www-form-urlencoded"},qd="2011-06-15",vd="Action",P1="AccessKeyId",WP="AssumeRole",E1="AssumedRoleId",Z="AssumedRoleUser",YP="AssumeRoleWithWebIdentity",S1="Arn",D1="Audience",$="Credentials",N1="ContextAssertion",j="DurationSeconds",F1="Expiration",q1="ExternalId",v1="Key",H="Policy",z="PolicyArns",w1="ProviderArn",r1="ProvidedContexts",R1="ProviderId",b="PackedPolicySize",U1="Provider",f="RoleArn",y="RoleSessionName",G1="SecretAccessKey",M1="SubjectFromWebIdentityToken",k="SourceIdentity",h1="SerialNumber",a1="SessionToken",A1="Tags",T1="TokenCode",_1="TransitiveTagKeys",wd="Version",V1="Value",B1="WebIdentityToken",k1="arn",R="message",rd=S((l)=>Object.entries(l).map(([I,d])=>w.extendedEncodeURIComponent(I)+"="+w.extendedEncodeURIComponent(d)).join("&"),"buildFormUrlencodedString"),JP=S((l,I)=>{if(I.Error?.Code!==void 0)return I.Error.Code;if(l.statusCode==404)return"NotFound"},"loadQueryErrorCode"),X1=class extends eI.Command.classBuilder().ep(cI.commonParams).m(function(l,I,d,E){return[xI.getSerdePlugin(d,this.serialize,this.deserialize),iI.getEndpointPlugin(d,l.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,el).ser(pI).de(tI).build(){static{S(this,"AssumeRoleCommand")}},KP=d1(),XP=il(),QP=A(),ZP=s(),Q1=class extends QP.Command.classBuilder().ep(ZP.commonParams).m(function(l,I,d,E){return[XP.getSerdePlugin(d,this.serialize,this.deserialize),KP.getEndpointPlugin(d,l.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(ld,dd).ser(uI).de(lP).build(){static{S(this,"AssumeRoleWithWebIdentityCommand")}},$P=O(),jP={AssumeRoleCommand:X1,AssumeRoleWithWebIdentityCommand:Q1},Rd=class extends $P.STSClient{static{S(this,"STS")}};CI.createAggregatedClient(jP,Rd);var HP=s(),W1=bI(),Cl="us-east-1",Ud=S((l)=>{if(typeof l?.Arn==="string"){let I=l.Arn.split(":");if(I.length>4&&I[4]!=="")return I[4]}return},"getAccountIdFromAssumedRoleUser"),Gd=S(async(l,I,d)=>{let E=typeof l==="function"?await l():l,P=typeof I==="function"?await I():I;return d?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${E} (provider)`,`${P} (parent client)`,`${Cl} (STS default)`),E??P??Cl},"resolveRegion"),zP=S((l,I)=>{let d,E;return async(P,v)=>{if(E=P,!d){let{logger:K=l?.parentClientConfig?.logger,region:x,requestHandler:g=l?.parentClientConfig?.requestHandler,credentialProviderLogger:e}=l,_d=await Gd(x,l?.parentClientConfig?.region,e),Vd=!Md(g);d=new I({profile:l?.parentClientConfig?.profile,credentialDefaultProvider:S(()=>async()=>E,"credentialDefaultProvider"),region:_d,requestHandler:Vd?g:void 0,logger:K})}let{Credentials:N,AssumedRoleUser:h}=await d.send(new X1(v));if(!N||!N.AccessKeyId||!N.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${v.RoleArn}`);let T=Ud(h),_={accessKeyId:N.AccessKeyId,secretAccessKey:N.SecretAccessKey,sessionToken:N.SessionToken,expiration:N.Expiration,...N.CredentialScope&&{credentialScope:N.CredentialScope},...T&&{accountId:T}};return W1.setCredentialFeature(_,"CREDENTIALS_STS_ASSUME_ROLE","i"),_}},"getDefaultRoleAssumer"),bP=S((l,I)=>{let d;return async(E)=>{if(!d){let{logger:T=l?.parentClientConfig?.logger,region:_,requestHandler:K=l?.parentClientConfig?.requestHandler,credentialProviderLogger:x}=l,g=await Gd(_,l?.parentClientConfig?.region,x),e=!Md(K);d=new I({profile:l?.parentClientConfig?.profile,region:g,requestHandler:e?K:void 0,logger:T})}let{Credentials:P,AssumedRoleUser:v}=await d.send(new Q1(E));if(!P||!P.AccessKeyId||!P.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${E.RoleArn}`);let N=Ud(v),h={accessKeyId:P.AccessKeyId,secretAccessKey:P.SecretAccessKey,sessionToken:P.SessionToken,expiration:P.Expiration,...P.CredentialScope&&{credentialScope:P.CredentialScope},...N&&{accountId:N}};if(N)W1.setCredentialFeature(h,"RESOLVED_ACCOUNT_ID","T");return W1.setCredentialFeature(h,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),h}},"getDefaultRoleAssumerWithWebIdentity"),Md=S((l)=>{return l?.metadata?.handlerProtocol==="h2"},"isH2"),hd=O(),ad=S((l,I)=>{if(!I)return l;else return class d extends l{static{S(this,"CustomizableSTSClient")}constructor(E){super(E);for(let P of I)this.middlewareStack.use(P)}}},"getCustomizableStsClientCtor"),Ad=S((l={},I)=>zP(l,ad(hd.STSClient,I)),"getDefaultRoleAssumer"),Td=S((l={},I)=>bP(l,ad(hd.STSClient,I)),"getDefaultRoleAssumerWithWebIdentity"),fP=S((l)=>(I)=>l({roleAssumer:Ad(I),roleAssumerWithWebIdentity:Td(I),...I}),"decorateDefaultCredentialProvider")});export default yP();
@@ -1,2 +1,2 @@
1
1
  var j=Object.create;var{getPrototypeOf:k,defineProperty:e,getOwnPropertyNames:h,getOwnPropertyDescriptor:l}=Object,i=Object.prototype.hasOwnProperty;var m=(a,b,c)=>{c=a!=null?j(k(a)):{};let d=b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c;for(let f of h(a))if(!i.call(d,f))e(d,f,{get:()=>a[f],enumerable:!0});return d},g=new WeakMap,n=(a)=>{var b=g.get(a),c;if(b)return b;if(b=e({},"__esModule",{value:!0}),a&&typeof a==="object"||typeof a==="function")h(a).map((d)=>!i.call(b,d)&&e(b,d,{get:()=>a[d],enumerable:!(c=l(a,d))||c.enumerable}));return g.set(a,b),b},o=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var p=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0,configurable:!0,set:(d)=>b[c]=()=>d})};var q=(a,b)=>()=>(a&&(b=a(a=0)),b);var r=import.meta.require;
2
- export{m as Ic,n as Jc,o as Kc,p as Lc,q as Mc,r as Nc};
2
+ export{m as Rc,n as Sc,o as Tc,p as Uc,q as Vc,r as Wc};
@@ -0,0 +1,5 @@
1
+ import{Cc as D,yc as be}from"./chunk-rewjb3gf.js";import{Lc as O}from"./chunk-sgrntkej.js";import{Rc as b}from"./chunk-2pj0cr49.js";var C=(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)=>q[d.step]-q[f.step]||V[d.priority||"normal"]-V[f.priority||"normal"]),s=(a)=>{let f=!1,d=(m)=>{let g=C(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 C(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?.(E.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},x=(a=!1)=>{let f=[],d=[],m={};return e.forEach((l)=>{let h={...l,before:[],after:[]};for(let u of C(h.name,h.aliases))m[u]=h;f.push(h)}),t.forEach((l)=>{let h={...l,before:[],after:[]};for(let u of C(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},[])},E={add:(a,f={})=>{let{name:d,override:m,aliases:g}=f,l={step:"initialize",priority:"normal",middleware:a,...f},h=C(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((N)=>N.name===u||N.aliases?.some((P)=>P===u));if(y===-1)continue;let T=e[y];if(T.step!==l.step||l.priority!==T.priority)throw new Error(`"${S(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.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=C(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((N)=>N.name===u||N.aliases?.some((P)=>P===u));if(y===-1)continue;let T=t[y];if(T.toMiddleware!==l.toMiddleware||T.relation!==l.relation)throw new Error(`"${S(T.name,T.aliases)}" middleware ${T.relation} "${T.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(E)},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=C(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 x(!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 x().map((m)=>m.middleware).reverse())a=d(a,f);if(r)console.log(E.identify());return a}};return E},q={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},V={high:3,normal:2,low:1};class $e{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}}var G=b(O(),1);class Q{constructor(){this.middlewareStack=M()}static classBuilder(){return new Z}resolveMiddlewareWithContext(e,t,r,{middlewareFn:n,clientName:o,commandName:s,inputFilterSensitiveLog:i,outputFilterSensitiveLog:c,smithyContext:p,additionalContext:x,CommandCtor:E}){for(let g of n.bind(this)(E,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,[G.SMITHY_CONTEXT_KEY]:{commandInstance:this,...p},...x},{requestHandler:m}=t;return a.resolve((g)=>m.handle(g.request,r||{}),d)}}class Z{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 Q{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 Me=b(D(),1);var pt="***SensitiveInformation***";var wt=(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}`)},te=(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}`)},Ie=Math.ceil(340282346638528860000000000000000000000),X=(e)=>{let t=te(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0){if(Math.abs(t)>Ie)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 K=(e)=>U(e,32),v=(e)=>U(e,16),ee=(e)=>U(e,8),U=(e,t)=>{let r=Ne(e);if(r!==void 0&&Ae(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},Ae=(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]}},xt=(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 re=(e)=>{if(typeof e=="string")return X(k(e));return X(e)},_e=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,k=(e)=>{let t=e.match(_e);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},St=(e)=>{if(typeof e=="string")return Re(e);return te(e)};var Re=(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 bt=(e)=>{if(typeof e==="string")return K(k(e));return K(e)},L=(e)=>{if(typeof e==="string")return v(k(e));return v(e)},ne=(e)=>{if(typeof e==="string")return ee(k(e));return ee(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 ke=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var Fe=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),It=(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,x]=t,E=L(z(n)),a=$(o,"month",1,12),f=$(s,"day",1,31);return oe(E,a,f,{hours:i,minutes:c,seconds:p,fractionalMilliseconds:x})},Pe=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=Pe.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,s,i,c,p,x,E]=t,a=L(z(n)),f=$(o,"month",1,12),d=$(s,"day",1,31),m=oe(a,f,d,{hours:i,minutes:c,seconds:p,fractionalMilliseconds:x});if(E.toUpperCase()!="Z")m.setTime(m.getTime()-ze(E));return m},At=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$/),_t=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$/),Rt=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 oe=(e,t,r,n)=>{let o=t-1;return De(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),Le(n.fractionalMilliseconds)))};var Oe=[31,28,31,30,31,30,31,31,30,31,30,31],De=(e,t,r)=>{let n=Oe[t];if(t===1&&Ue(e))n=29;if(r>n)throw new TypeError(`Invalid day for ${ke[t]} in ${e}: ${r}`)},Ue=(e)=>{return e%4===0&&(e%100!==0||e%400===0)},$=(e,t,r,n)=>{let o=ne(z(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},Le=(e)=>{if(e===null||e===void 0)return 0;return re("0."+e)*1000},ze=(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},z=(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 se=(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 He=({output:e,parsedBody:t,exceptionCtor:r,errorCode:n})=>{let o=Be(e),s=o.httpStatusCode?o.httpStatusCode+"":void 0,i=new r({name:t?.code||t?.Code||n||s||"UnknownError",$fault:"client",$metadata:o});throw se(i,t)},Ot=(e)=>{return({output:t,parsedBody:r,errorCode:n})=>{He({output:t,parsedBody:r,exceptionCtor:e,errorCode:n})}},Be=(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 Ut=(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 ie=!1,zt=(e)=>{if(e&&!ie&&parseInt(e.substring(1,e.indexOf(".")))<16)ie=!0};var We=b(D(),1);var H=b(O(),1);var ce=(e)=>{let t=[];for(let r in H.AlgorithmId){let n=H.AlgorithmId[r];if(e[n]===void 0)continue;t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}return{addChecksumAlgorithm(r){t.push(r)},checksumAlgorithms(){return t}}},ae=(e)=>{let t={};return e.checksumAlgorithms().forEach((r)=>{t[r.algorithmId()]=r.checksumConstructor()}),t};var fe=(e)=>{return{setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}},de=(e)=>{let t={};return t.retryStrategy=e.retryStrategy(),t};var qt=(e)=>{return Object.assign(ce(e),fe(e))};var Vt=(e)=>{return Object.assign(ae(e),de(e))};var Xt=(e)=>Array.isArray(e)?e:[e];var er=(e)=>{return e!=null};var I=function e(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};I.from=(e)=>{if(e&&typeof e==="object"&&(e instanceof I||("deserializeJSON"in e)))return e;else if(typeof e==="string"||Object.getPrototypeOf(e)===String.prototype)return I(String(e));return I(JSON.stringify(e))};I.fromObject=I.from;class Je{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}ue(n,null,s,i)}return n}var or=(e,t)=>{let r={};for(let n in t)ue(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},{}))},ue=(e,t,r,n)=>{if(t!==null){let i=r[n];if(typeof i==="function")i=[,i];let[c=qe,p=Ve,x=n]=i;if(typeof c==="function"&&c(t[x])||typeof c!=="function"&&!!c)e[n]=p(t[x]);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}},qe=(e)=>e!=null,Ve=(e)=>e;var Ge=b(D(),1);var le=(e)=>{if(e==null)return{};if(Array.isArray(e))return e.filter((t)=>t!=null).map(le);if(typeof e==="object"){let t={};for(let r of Object.keys(e)){if(e[r]==null)continue;t[r]=le(e[r])}return t}return e};var Lr=(e)=>{return{setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,r){e.httpHandler?.updateHttpClientConfig(t,r)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}},zr=(e)=>{return{httpHandler:e.httpHandler()}};var Qe=b(O(),1);class B{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){let t=new B({...e,headers:{...e.headers}});if(t.query)t.query=Ze(t.query);return t}static isInstance(e){if(!e)return!1;let t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query==="object"&&typeof t.headers==="object"}clone(){return B.clone(this)}}function Ze(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}class F{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;let t=e;return typeof t.statusCode==="number"&&typeof t.headers==="object"}}var Ce=b(be(),1);import{Agent as Te,request as et}from"node:http";import{Agent as Se,request as tt}from"node:https";var he=["ECONNRESET","EPIPE","ETIMEDOUT"];var W=(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 me=1000,pe=(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,me),me)};var Xe=3000,ge=(e,{keepAlive:t,keepAliveMsecs:r},n=Xe)=>{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 ye=3000,we=(e,t,r=xe)=>{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:ye),ye)};import{Readable as Ke}from"node:stream";var Ee=6000;async function J(e,t,r=Ee){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(Ee,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)ve(e,t.body)}function ve(e,t){if(t instanceof Ke){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 xe=0;class j{static create(e){if(typeof e?.handle==="function")return e;return new j(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,x=o[c]?.length??0;if(p>=s&&x>=2*s)return r?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${p} and ${x} 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 Te||typeof s?.destroy==="function")return s;return new Te({keepAlive:!0,maxSockets:50,...s})})(),httpsAgent:(()=>{if(i instanceof Se||typeof i?.destroy==="function")return i;return new Se({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:",x=p?this.config.httpsAgent:this.config.httpAgent;s.push(w.setTimeout(()=>{this.socketWarningTimestamp=j.checkSocketUsage(x,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let E=Ce.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(E)f+=`?${E}`;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:x,auth:a},l=(p?tt:et)(m,(u)=>{let y=new F({statusCode:u.statusCode||-1,reason:u.statusMessage,headers:W(u.headers),body:u});i({response:y})});if(l.on("error",(u)=>{if(he.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(pe(l,c,this.config.connectionTimeout)),s.push(we(l,c,this.config.requestTimeout));let h=m.agent;if(typeof h==="object"&&"keepAlive"in h)s.push(ge(l,{keepAlive:h.keepAlive,keepAliveMsecs:h.keepAliveMsecs}));o=J(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 rt=b(be(),1);import{Writable as nt}from"node:stream";class Y extends nt{constructor(){super(...arguments);this.bufferedBytes=[]}_write(e,t,r){this.bufferedBytes.push(e),r()}}var Bn=(e)=>{if(ot(e))return st(e);return new Promise((t,r)=>{let n=new Y;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)})})},ot=(e)=>typeof ReadableStream==="function"&&e instanceof ReadableStream;async function st(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{Lr as Ib,zr as Jb,B as Kb,F as Lb,$e as Mb,Q as Nb,pt as Ob,wt as Pb,K as Qb,xt as Rb,Et as Sb,Tt as Tb,St as Ub,bt as Vb,It as Wb,Nt as Xb,A as Yb,se as Zb,Ot as _b,Ut as $b,zt as ac,qt as bc,Vt as cc,Xt as dc,er as ec,Je as fc,je as gc,or as hc,le as ic,j as jc,Bn as kc};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Gc as A}from"./chunk-eyn01tkt.js";import{Hc as C}from"./chunk-h6ga49c2.js";import{Ic as _}from"./chunk-bj7sb2gs.js";var S=_(A(),1),p=_(C(),1),N="AWS_ACCESS_KEY_ID",a="AWS_SECRET_ACCESS_KEY",i="AWS_SESSION_TOKEN",I="AWS_CREDENTIAL_EXPIRATION",d="AWS_CREDENTIAL_SCOPE",v="AWS_ACCOUNT_ID",T=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let o=process.env[N],r=process.env[a],n=process.env[i],s=process.env[I],t=process.env[d],E=process.env[v];if(o&&r){let c={accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...E&&{accountId:E}};return S.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new p.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};export{T as fromEnv,i as ENV_SESSION,a as ENV_SECRET,N as ENV_KEY,I as ENV_EXPIRATION,d as ENV_CREDENTIAL_SCOPE,v as ENV_ACCOUNT_ID};export{N as Dc,a as Ec,T as Fc};
2
+ import{Pc as A}from"./chunk-hjdz5p2e.js";import{Qc as C}from"./chunk-cptthhq1.js";import{Rc as _}from"./chunk-2pj0cr49.js";var S=_(A(),1),p=_(C(),1),N="AWS_ACCESS_KEY_ID",a="AWS_SECRET_ACCESS_KEY",i="AWS_SESSION_TOKEN",I="AWS_CREDENTIAL_EXPIRATION",d="AWS_CREDENTIAL_SCOPE",v="AWS_ACCOUNT_ID",T=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let o=process.env[N],r=process.env[a],n=process.env[i],s=process.env[I],t=process.env[d],E=process.env[v];if(o&&r){let c={accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...E&&{accountId:E}};return S.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new p.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};export{T as fromEnv,i as ENV_SESSION,a as ENV_SECRET,N as ENV_KEY,I as ENV_EXPIRATION,d as ENV_CREDENTIAL_SCOPE,v as ENV_ACCOUNT_ID};export{N as Mc,a as Nc,T as Oc};
@@ -0,0 +1,2 @@
1
+ var y=/^(?:( )+|\t+)/;function b(t,n){let e=new Map,o=0,s,i;for(let c of t.split(/\n/g)){if(!c)continue;let a,u,p,d,r,l=c.match(y);if(l===null)o=0,s="";else{if(a=l[0].length,u=l[1]?"space":"tab",n&&u==="space"&&a===1)continue;u!==s&&(o=0),s=u,p=1,d=0;let f=a-o;if(o=a,f===0)p=0,d=1;else{let h=f>0?f:-f;i=g(u,h)}r=e.get(i),r=r===void 0?[1,0]:[r[0]+p,r[1]+d],e.set(i,r)}}return e}function g(t,n){return(t==="space"?"s":"t")+String(n)}function w(t){let n=t[0]==="s"?"space":"tab",e=Number(t.slice(1));return{type:n,amount:e}}function v(t){let n,e=0,o=0;for(let[s,[i,c]]of t)(i>e||i===e&&c>o)&&(e=i,o=c,n=s);return n}function x(t,n){return(t==="space"?" ":"\t").repeat(n)}function S(t){if(typeof t!="string")throw new TypeError("Expected a string");let n=b(t,!0);n.size===0&&(n=b(t,!1));let e=v(n),o,s=0,i="";return e!==void 0&&({type:o,amount:s}=w(e),i=x(o,s)),{amount:s,type:o,indent:i}}var m=Symbol.for("__confbox_fmt__"),_=/^(\s+)/,j=/(\s+)$/;function E(t,n={}){let e=n.indent===void 0&&n.preserveIndentation!==!1&&t.slice(0,n?.sampleSize||1024),o=n.preserveWhitespace===!1?void 0:{start:_.exec(t)?.[0]||"",end:j.exec(t)?.[0]||""};return{sample:e,whiteSpace:o}}function z(t,n,e){!n||typeof n!="object"||Object.defineProperty(n,m,{enumerable:!1,configurable:!0,writable:!0,value:E(t,e)})}function I(t,n){if(!t||typeof t!="object"||!(m in t))return{indent:n?.indent,whitespace:{start:"",end:""}};let e=t[m];return{indent:n?.indent||S(e.sample||"").indent,whitespace:e.whiteSpace||{start:"",end:""}}}
2
+ export{z as Ga,I as Ha};
@@ -0,0 +1,2 @@
1
+ import{Gb as $,Hb as le}from"./chunk-mvkb5fc3.js";import{Kb as m,Lb as Se,fc as wt}from"./chunk-4v1a15ke.js";import{nc as ye,qc as nr,rc as wr}from"./chunk-fvdx05dx.js";import{tc as kr,vc as Gr}from"./chunk-rewjb3gf.js";import{Hc as de}from"./chunk-at17xh96.js";import{Lc as ve}from"./chunk-sgrntkej.js";import{Qc as Hr}from"./chunk-cptthhq1.js";import{Rc as _,Wc as Xr}from"./chunk-2pj0cr49.js";function Qr(e){return e}var Vt=(e)=>(t)=>async(r)=>{if(!m.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},eo=(e)=>({applyToStack:(t)=>{t.add(Vt(e),Bt)}});var Wt=()=>(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:l,...d}=o.output;return i?.info?.({clientName:n,commandName:s,input:u(r.input),output:x(d),metadata:l}),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}},Yt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},ro=(e)=>({applyToStack:(t)=>{t.add(Wt(),Yt)}});var te="X-Amzn-Trace-Id",zt="AWS_LAMBDA_FUNCTION_NAME",jt="_X_AMZN_TRACE_ID",Xt=(e)=>(t)=>async(r)=>{let{request:o}=r;if(!m.isInstance(o)||e.runtime!=="node")return t(r);let n=Object.keys(o.headers??{}).find((c)=>c.toLowerCase()===te.toLowerCase())??te;if(o.headers.hasOwnProperty(n))return t(r);let s=process.env[zt],i=process.env[jt],a=(c)=>typeof c==="string"&&c.length>0;if(a(s)&&a(i))o.headers[te]=i;return t({...r,request:o})},Ht={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},ao=(e)=>({applyToStack:(t)=>{t.add(Xt(e),Ht)}});var De=_(ye(),1),re=void 0;function qt(e){if(e===void 0)return!0;return typeof e==="string"&&e.length<=50}function po(e){let t=De.normalizeProvider(e.userAgentAppId??re),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r==="string"?[[r]]:r,userAgentAppId:async()=>{let o=await t();if(!qt(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 Zt{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 Jt=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)=>Jt.test(e)||e.startsWith("[")&&e.endsWith("]");var Kt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),v=(e,t=!1)=>{if(!t)return Kt.test(e);let r=e.split(".");for(let o of r)if(!v(o))return!1;return!0};var M={};var S="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 Ce=(e,t)=>e===t;var Pe=(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 G=(e,t)=>Pe(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 be=(e)=>e!=null;var Ue=(e)=>!e;var V=_(ve(),1);var oe={[V.EndpointURLScheme.HTTP]:80,[V.EndpointURLScheme.HTTPS]:443},Me=(e)=>{let t=(()=>{try{if(e instanceof URL)return e;if(typeof e==="object"&&"hostname"in e){let{hostname:l,port:d,protocol:N="",path:k="",query:Ft={}}=e,Ne=new URL(`${N}//${l}${d?`:${d}`:""}${k}`);return Ne.search=Object.entries(Ft).map(([kt,Gt])=>`${kt}=${Gt}`).join("&"),Ne}return new URL(e)}catch(l){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(V.EndpointURLScheme).includes(c))return null;let p=U(n),u=r.includes(`${o}:${oe[c]}`)||typeof e==="string"&&e.includes(`${o}:${oe[c]}`),x=`${o}${u?`:${oe[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:Ce,getAttr:G,isSet:be,isValidHostLabel:v,not:Ue,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(G(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 T=(e,t,r)=>{if(typeof e==="string")return B(e,r);else if(e.fn)return W(e,r);else if(e.ref)return Ge(e,r);throw new f(`'${t}': ${String(e)} is not a string, function or reference.`)};var W=({fn:e,argv:t},r)=>{let o=t.map((s)=>["boolean","number"].includes(typeof s)?s:T(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=W(t,r);return r.logger?.debug?.(`${S} 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?.(`${S} assign: ${s.name} := ${E(s.value)}`)}return{result:!0,referenceRecord:r}};var Be=(e,t)=>Object.entries(e).reduce((r,[o,n])=>({...r,[o]:n.map((s)=>{let i=T(s,"Header value entry",t);if(typeof i!=="string")throw new f(`Header '${o}' value '${i}' is not a string`);return i})}),{});var ne=(e,t)=>{if(Array.isArray(e))return e.map((r)=>ne(r,t));switch(typeof e){case"string":return B(e,t);case"object":if(e===null)throw new f(`Unexpected endpoint property: ${e}`);return Y(e,t);case"boolean":return e;default:throw new f(`Unexpected endpoint property type: ${typeof e}`)}};var Y=(e,t)=>Object.entries(e).reduce((r,[o,n])=>({...r,[o]:ne(n,t)}),{});var We=(e,t)=>{let r=T(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?.(`${S} Resolving endpoint from template: ${E(o)}`),{...p!=null&&{headers:Be(p,i)},...c!=null&&{properties:Y(c,i)},url:We(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(T(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 z(o,{...t,referenceRecord:{...t.referenceRecord,...s}})};var z=(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 Qt=(e,t)=>{let{endpointParams:r,logger:o}=t,{parameters:n,rules:s}=e;t.logger?.debug?.(`${S} 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=z(s,{endpointParams:r,logger:o,referenceRecord:{}});return t.logger?.debug?.(`${S} Resolved endpoint: ${E(c)}`),c};var se=(e,t=!1)=>{if(t){for(let r of e.split("."))if(!se(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 tr=He,rr="",qe=(e)=>{let{partitions:t}=tr;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=()=>rr;var or={isVirtualHostableS3Bucket:se,parseArn:Xe,partition:qe};M.aws=or;var R=_(nr(),1),sr=/\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(sr))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 ie="user-agent",j="x-amz-user-agent",ae=" ",X="/",Ke=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Qe=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,ce="-";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 ir=(e)=>(t,r)=>async(o)=>{let{request:n}=o;if(!m.isInstance(n))return t(o);let{headers:s}=n,i=r?.userAgent?.map(H)||[],a=(await e.defaultUserAgentProvider()).map(H);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(H)||[],u=await e.userAgentAppId();if(u)a.push(H([`app/${u}`]));let x=Ze(),l=(x?[x]:[]).concat([...a,...i,...p]).join(ae),d=[...a.filter((N)=>N.startsWith("aws-sdk-")),...p].join(ae);if(e.runtime!=="browser"){if(d)s[j]=s[j]?`${s[ie]} ${d}`:d;s[ie]=l}else s[j]=l;return t({...o,request:n})},H=(e)=>{let t=e[0].split(X).map((i)=>i.replace(Ke,ce)).join(X),r=e[1]?.replace(Qe,ce),o=t.indexOf(X),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}`}},"")},ar={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Zs=(e)=>({applyToStack:(t)=>{t.add(ir(e),ar)}});var q=(e)=>typeof e==="string"&&(e.startsWith("fips-")||e.endsWith("-fips"));var pe=(e)=>q(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 pe(t);let o=await t();return pe(o)},useFipsEndpoint:async()=>{let o=typeof t==="string"?t:await t();if(q(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 O;(function(e){e.ENV="env",e.CONFIG="shared config entry"})(O||(O={}));var cr="AWS_USE_DUALSTACK_ENDPOINT",pr="use_dualstack_endpoint";var gi={environmentVariableSelector:(e)=>D(e,cr,O.ENV),configFileSelector:(e)=>D(e,pr,O.CONFIG),default:!1};var fr="AWS_USE_FIPS_ENDPOINT",ur="use_fips_endpoint";var _i={environmentVariableSelector:(e)=>D(e,fr,O.ENV),configFileSelector:(e)=>D(e,ur,O.CONFIG),default:!1};var fe=_(ve(),1),tt=(e)=>e[fe.SMITHY_CONTEXT_KEY]||(e[fe.SMITHY_CONTEXT_KEY]={});var A=(e)=>{if(typeof e==="function")return e;let t=Promise.resolve(e);return()=>t};var rt={environmentVariableSelector:(e)=>e.AWS_REGION,configFileSelector:(e)=>e.region,default:()=>{throw new Error("Region is missing")}},Fi={preferredFile:"credentials"};var ot="content-length";function dr(e){return(t)=>async(r)=>{let o=r.request;if(m.isInstance(o)){let{body:n,headers:s}=o;if(n&&Object.keys(s).map((i)=>i.toLowerCase()).indexOf(ot)===-1)try{let i=e(n);o.headers={...o.headers,[ot]:String(i)}}catch(i){}}return t({...r,request:o})}}var lr={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},ua=(e)=>({applyToStack:(t)=>{t.add(dr(e.bodyLengthChecker),lr)}});var nt=(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 st=(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 mr={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},ue={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Ra(e,t,r){return{applyToStack:(o)=>{o.add(nt(e,r),mr),o.add(st(e,t),ue)}}}var dt=_(ye(),1);var it=async(e)=>{let t=e?.Bucket||"";if(typeof e.Bucket==="string")e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(_r(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!xr(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},Er=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,gr=/(\d+\.){3}\d+/,Rr=/\.\./;var xr=(e)=>Er.test(e)&&!gr.test(e)&&!Rr.test(e),_r=(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 at=(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 ct="AWS_ENDPOINT_URL",pt="endpoint_url",ft=(e)=>({environmentVariableSelector:(t)=>{let r=e.split(" ").map((s)=>s.toUpperCase()),o=t[[ct,...r].join("_")];if(o)return o;let n=t[ct];if(n)return n;return},configFileSelector:(t,r)=>{if(r&&t.services){let n=r[["services",t.services].join(de)];if(n){let s=e.split(" ").map((a)=>a.toLowerCase()),i=n[[s.join("_"),pt].join(de)];if(i)return i}}let o=t[pt];if(o)return o;return},default:void 0});var Z=async(e)=>$(ft(e??""))();var J=(e)=>{if(typeof e==="object"){if("url"in e)return le(e.url);return e}return le(e)};var ut=async(e,t,r,o)=>{if(!r.endpoint){let i;if(r.serviceConfiguredEndpoint)i=await r.serviceConfiguredEndpoint();else i=await Z(r.serviceId);if(i)r.endpoint=()=>Promise.resolve(J(i))}let n=await hr(e,t,r);if(typeof r.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(n,o)},hr=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 at(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 it(o);return o};var lt=({config:e,instructions:t})=>{return(r,o)=>async(n)=>{if(e.endpoint)dt.setFeature(o,"ENDPOINT_OVERRIDE","N");let s=await ut(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=tt(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 Sr={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:ue.name},Ya=(e,t)=>({applyToStack:(r)=>{r.addRelativeTo(lt({config:e,instructions:t}),Sr)}});var qa=(e)=>{let t=e.tls??!0,{endpoint:r,useDualstackEndpoint:o,useFipsEndpoint:n}=e,s=r!=null?async()=>J(await A(r)()):void 0,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:A(o??!1),useFipsEndpoint:A(n??!1)}),c=void 0;return a.serviceConfiguredEndpoint=async()=>{if(e.serviceId&&!c)c=Z(e.serviceId);return c},a};var g;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(g||(g={}));var w=3,mt=g.STANDARD;var Et=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],gt=["TimeoutError","RequestTimeout","RequestTimeoutException"],Rt=[500,502,503,504],xt=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var Ar=(e)=>e.$metadata?.clockSkewCorrected,C=(e)=>e.$metadata?.httpStatusCode===429||Et.includes(e.name)||e.$retryable?.throttling==!0,L=(e,t=0)=>Ar(e)||gt.includes(e.name)||xt.includes(e?.code||"")||Rt.includes(e.$metadata?.httpStatusCode||0)||e.cause!==void 0&&t<=10&&L(e.cause,t+1),_t=(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 I=100,F=20000,me=500,K=500,Ee=5,ge=10,Re=1,Q="amz-sdk-invocation-id",ee="amz-sdk-request";var ht=()=>{let e=I;return{computeNextBackoffDelay:(o)=>{return Math.floor(Math.min(F,Math.random()*2**o*e))},setDelayBase:(o)=>{e=o}}};var xe=({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=K,this.retryBackoffStrategy=ht(),this.maxAttemptsProvider=typeof e==="function"?e:async()=>e}async acquireInitialRetryToken(e){return xe({retryDelay:I,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"?me:I);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,xe({retryDelay:s,retryCount:e.getRetryCount()+1,retryCost:i})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(K,this.capacity+(e.getRetryCost()??Re))}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 ${w}`),w}}shouldRetry(e,t,r){return e.getRetryCount()+1<r&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return e==="TRANSIENT"?ge:Ee}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class _e{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 St="AWS_MAX_ATTEMPTS",At="max_attempts",Gc={environmentVariableSelector:(e)=>{let t=e[St];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Environment variable ${St} mast be a number, got "${t}"`);return r},configFileSelector:(e)=>{let t=e[At];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Shared config file entry ${At} mast be a number, got "${t}"`);return r},default:w},Vc=(e)=>{let{retryStrategy:t,retryMode:r,maxAttempts:o}=e,n=A(o??w);return Object.assign(e,{maxAttempts:n,retryStrategy:async()=>{if(t)return t;if(await A(r)()===g.ADAPTIVE)return new _e(n);return new b(n)}})},Tr="AWS_RETRY_MODE",Or="retry_mode",Bc={environmentVariableSelector:(e)=>e[Tr],configFileSelector:(e)=>e[Or],default:mt};var h=_(wr(),1),Yc=h.default.v1,zc=h.default.v3,Tt=h.default.v4,jc=h.default.v5,Xc=h.default.NIL,Hc=h.default.version,qc=h.default.validate,Zc=h.default.stringify,Jc=h.default.parse;import{Readable as Ir}from"node:stream";var Ot=(e)=>e?.body instanceof Ir||typeof ReadableStream!=="undefined"&&e?.body instanceof ReadableStream;var he=(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 Nr=(e)=>(t,r)=>async(o)=>{let n=await e.retryStrategy(),s=await e.maxAttempts();if(yr(n)){n=n;let i=await n.acquireInitialRetryToken(r.partition_id),a=new Error,c=0,p=0,{request:u}=o,x=m.isInstance(u);if(x)u.headers[Q]=Tt();while(!0)try{if(x)u.headers[ee]=`attempt=${c+1}; max=${s}`;let{response:l,output:d}=await t(o);return n.recordSuccess(i),d.$metadata.attempts=c+1,d.$metadata.totalRetryDelay=p,{response:l,output:d}}catch(l){let d=Dr(l);if(a=he(l),x&&Ot(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,d)}catch(k){if(!a.$metadata)a.$metadata={};throw a.$metadata.attempts=c+1,a.$metadata.totalRetryDelay=p,a}c=i.getRetryCount();let N=i.getRetryDelay();p+=N,await new Promise((k)=>setTimeout(k,N))}}else{if(n=n,n?.mode)r.userAgent=[...r.userAgent||[],["cfg/retry-mode",n.mode]];return n.retry(t,o)}},yr=(e)=>typeof e.acquireInitialRetryToken!=="undefined"&&typeof e.refreshRetryTokenForRetry!=="undefined"&&typeof e.recordSuccess!=="undefined",Dr=(e)=>{let t={error:e,errorType:Cr(e)},r=br(e.$response);if(r)t.retryAfterHint=r;return t},Cr=(e)=>{if(C(e))return"THROTTLING";if(L(e))return"TRANSIENT";if(_t(e))return"SERVER_ERROR";return"CLIENT_ERROR"},Pr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},pp=(e)=>({applyToStack:(t)=>{t.add(Nr(e),Pr)}}),br=(e)=>{if(!Se.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)};import{platform as Ur,release as vr}from"node:os";import{env as Nt,versions as Mr}from"node:process";var Ae={isCrtAvailable:!1};var It=()=>{if(Ae.isCrtAvailable)return["md/crt-avail"];return null};var Jp=({serviceId:e,clientVersion:t})=>{return async(r)=>{let o=[["aws-sdk-js",t],["ua","2.1"],[`os/${Ur()}`,vr()],["lang/js"],["md/nodejs",`${Mr.node}`]],n=It();if(n)o.push(n);if(e)o.push([`api/${e}`,t]);if(Nt.AWS_EXECUTION_ENV)o.push([`exec-env/${Nt.AWS_EXECUTION_ENV}`]);let s=await r?.userAgentAppId?.();return s?[...o,[`app/${s}`]]:[...o]}};var $r="AWS_SDK_UA_APP_ID",Lr="sdk_ua_app_id",Fr="sdk-ua-app-id",tf={environmentVariableSelector:(e)=>e[$r],configFileSelector:(e)=>e[Lr]??e[Fr],default:re};var yt=_(kr(),1);import{Buffer as Te}from"node:buffer";var Oe=(e,t=0,r=e.byteLength-t)=>{if(!yt.isArrayBuffer(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return Te.from(e,t,r)},Dt=(e,t)=>{if(typeof e!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?Te.from(e,t):Te.from(e)};var Pt=_(Gr(),1);import{Buffer as Vr}from"node:buffer";import{createHash as Br,createHmac as Wr}from"node:crypto";class Yr{constructor(e,t){this.algorithmIdentifier=e,this.secret=t,this.reset()}update(e,t){this.hash.update(Pt.toUint8Array(Ct(e,t)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?Wr(this.algorithmIdentifier,Ct(this.secret)):Br(this.algorithmIdentifier)}}function Ct(e,t){if(Vr.isBuffer(e))return e;if(typeof e==="string")return Dt(e,t);if(ArrayBuffer.isView(e))return Oe(e.buffer,e.byteOffset,e.byteLength);return Oe(e)}import{fstatSync as zr,lstatSync as jr}from"node:fs";var mf=(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 jr(e.path).size;else if(typeof e.fd==="number")return zr(e.fd).size;throw new Error(`Body Length computation failed for ${e}`)};var Lt=_(Hr(),1);var bt="AWS_EXECUTION_ENV",we="AWS_REGION",Ie="AWS_DEFAULT_REGION",Ut="AWS_EC2_METADATA_DISABLED",vt=["in-region","cross-region","mobile","standard","legacy"],Mt="/latest/meta-data/placement/region";var $t={environmentVariableSelector:(e)=>{return e.AWS_DEFAULTS_MODE},configFileSelector:(e)=>{return e.defaults_mode},default:"legacy"};var Of=({region:e=$(rt),defaultsMode:t=$($t)}={})=>Lt.memoize(async()=>{let r=typeof t==="function"?await t():t;switch(r?.toLowerCase()){case"auto":return qr(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 ${vt.join(", ")}, got ${r}`)}}),qr=async(e)=>{if(e){let t=typeof e==="function"?await e():e,r=await Zr();if(!r)return"standard";if(t===r)return"in-region";else return"cross-region"}return"standard"},Zr=async()=>{if(process.env[bt]&&(process.env[we]||process.env[Ie]))return process.env[we]??process.env[Ie];if(!process.env[Ut])try{let{getInstanceMetadataEndpoint:e,httpRequest:t}=await import("./chunk-2htrvvzn.js"),r=await e();return(await t({...r,path:Mt})).toString()}catch(e){}};var yf=(e)=>{return{setRegion(t){e.region=t},region(){return e.region}}},Df=(e)=>{return{region:e.region()}};export{Qr as $a,eo as ab,ro as bb,ao as cb,po as db,Zt as eb,M as fb,Qt as gb,or as hb,Zs as ib,gi as jb,_i as kb,tt as lb,A as mb,rt as nb,Fi as ob,ii as pb,ua as qb,Ra as rb,Ya as sb,qa as tb,mt as ub,Gc as vb,Vc as wb,Bc as xb,pp as yb,Jp as zb,tf as Ab,Yr as Bb,mf as Cb,Of as Db,yf as Eb,Df as Fb};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Ec as I,Fc as z,Gc as R,Jc as v,Kc as A}from"./chunk-at17xh96.js";import"./chunk-sgrntkej.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-m05w5c0s.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-m05w5c0s.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-9jthaaph.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,15 @@
1
+ // @bun
2
+ import{Ga as R,Ha as X}from"./chunk-6v69415e.js";import"./chunk-2pj0cr49.js";function G(E){return E&&E.__esModule&&Object.prototype.hasOwnProperty.call(E,"default")?E.default:E}var O={},M;function Y(){return M||(M=1,O.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,O.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,O.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/),O}var _,T;function K(){if(T)return _;T=1;let E=Y();return _={isSpaceSeparator(r){return typeof r=="string"&&E.Space_Separator.test(r)},isIdStartChar(r){return typeof r=="string"&&(r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="$"||r==="_"||E.ID_Start.test(r))},isIdContinueChar(r){return typeof r=="string"&&(r>="a"&&r<="z"||r>="A"&&r<="Z"||r>="0"&&r<="9"||r==="$"||r==="_"||r==="\u200C"||r==="\u200D"||E.ID_Continue.test(r))},isDigit(r){return typeof r=="string"&&/[0-9]/.test(r)},isHexDigit(r){return typeof r=="string"&&/[0-9A-Fa-f]/.test(r)}},_}var k,Z;function uu(){if(Z)return k;Z=1;let E=K(),r,n,B,m,f,p,o,d,y;k=function(e,i){r=String(e),n="start",B=[],m=0,f=1,p=0,o=void 0,d=void 0,y=void 0;do o=a(),U[n]();while(o.type!=="eof");return typeof i=="function"?v({"":y},"",i):y};function v(e,i,b){let h=e[i];if(h!=null&&typeof h=="object")if(Array.isArray(h))for(let N=0;N<h.length;N++){let P=String(N),z=v(h,P,b);z===void 0?delete h[P]:Object.defineProperty(h,P,{value:z,writable:!0,enumerable:!0,configurable:!0})}else for(let N in h){let P=v(h,N,b);P===void 0?delete h[N]:Object.defineProperty(h,N,{value:P,writable:!0,enumerable:!0,configurable:!0})}return b.call(e,i,h)}let A,t,S,g,D;function a(){for(A="default",t="",S=!1,g=1;;){D=F();let e=l[A]();if(e)return e}}function F(){if(r[m])return String.fromCodePoint(r.codePointAt(m))}function u(){let e=F();return e===`
3
+ `?(f++,p=0):e?p+=e.length:p++,e&&(m+=e.length),e}let l={default(){switch(D){case"\t":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
4
+ `:case"\r":case"\u2028":case"\u2029":u();return;case"/":u(),A="comment";return;case void 0:return u(),C("eof")}if(E.isSpaceSeparator(D)){u();return}return l[n]()},comment(){switch(D){case"*":u(),A="multiLineComment";return;case"/":u(),A="singleLineComment";return}throw s(u())},multiLineComment(){switch(D){case"*":u(),A="multiLineCommentAsterisk";return;case void 0:throw s(u())}u()},multiLineCommentAsterisk(){switch(D){case"*":u();return;case"/":u(),A="default";return;case void 0:throw s(u())}u(),A="multiLineComment"},singleLineComment(){switch(D){case`
5
+ `:case"\r":case"\u2028":case"\u2029":u(),A="default";return;case void 0:return u(),C("eof")}u()},value(){switch(D){case"{":case"[":return C("punctuator",u());case"n":return u(),c("ull"),C("null",null);case"t":return u(),c("rue"),C("boolean",!0);case"f":return u(),c("alse"),C("boolean",!1);case"-":case"+":u()==="-"&&(g=-1),A="sign";return;case".":t=u(),A="decimalPointLeading";return;case"0":t=u(),A="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":t=u(),A="decimalInteger";return;case"I":return u(),c("nfinity"),C("numeric",1/0);case"N":return u(),c("aN"),C("numeric",NaN);case'"':case"'":S=u()==='"',t="",A="string";return}throw s(u())},identifierNameStartEscape(){if(D!=="u")throw s(u());u();let e=$();switch(e){case"$":case"_":break;default:if(!E.isIdStartChar(e))throw L();break}t+=e,A="identifierName"},identifierName(){switch(D){case"$":case"_":case"\u200C":case"\u200D":t+=u();return;case"\\":u(),A="identifierNameEscape";return}if(E.isIdContinueChar(D)){t+=u();return}return C("identifier",t)},identifierNameEscape(){if(D!=="u")throw s(u());u();let e=$();switch(e){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!E.isIdContinueChar(e))throw L();break}t+=e,A="identifierName"},sign(){switch(D){case".":t=u(),A="decimalPointLeading";return;case"0":t=u(),A="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":t=u(),A="decimalInteger";return;case"I":return u(),c("nfinity"),C("numeric",g*(1/0));case"N":return u(),c("aN"),C("numeric",NaN)}throw s(u())},zero(){switch(D){case".":t+=u(),A="decimalPoint";return;case"e":case"E":t+=u(),A="decimalExponent";return;case"x":case"X":t+=u(),A="hexadecimal";return}return C("numeric",g*0)},decimalInteger(){switch(D){case".":t+=u(),A="decimalPoint";return;case"e":case"E":t+=u(),A="decimalExponent";return}if(E.isDigit(D)){t+=u();return}return C("numeric",g*Number(t))},decimalPointLeading(){if(E.isDigit(D)){t+=u(),A="decimalFraction";return}throw s(u())},decimalPoint(){switch(D){case"e":case"E":t+=u(),A="decimalExponent";return}if(E.isDigit(D)){t+=u(),A="decimalFraction";return}return C("numeric",g*Number(t))},decimalFraction(){switch(D){case"e":case"E":t+=u(),A="decimalExponent";return}if(E.isDigit(D)){t+=u();return}return C("numeric",g*Number(t))},decimalExponent(){switch(D){case"+":case"-":t+=u(),A="decimalExponentSign";return}if(E.isDigit(D)){t+=u(),A="decimalExponentInteger";return}throw s(u())},decimalExponentSign(){if(E.isDigit(D)){t+=u(),A="decimalExponentInteger";return}throw s(u())},decimalExponentInteger(){if(E.isDigit(D)){t+=u();return}return C("numeric",g*Number(t))},hexadecimal(){if(E.isHexDigit(D)){t+=u(),A="hexadecimalInteger";return}throw s(u())},hexadecimalInteger(){if(E.isHexDigit(D)){t+=u();return}return C("numeric",g*Number(t))},string(){switch(D){case"\\":u(),t+=w();return;case'"':if(S)return u(),C("string",t);t+=u();return;case"'":if(!S)return u(),C("string",t);t+=u();return;case`
6
+ `:case"\r":throw s(u());case"\u2028":case"\u2029":W(D);break;case void 0:throw s(u())}t+=u()},start(){switch(D){case"{":case"[":return C("punctuator",u())}A="value"},beforePropertyName(){switch(D){case"$":case"_":t=u(),A="identifierName";return;case"\\":u(),A="identifierNameStartEscape";return;case"}":return C("punctuator",u());case'"':case"'":S=u()==='"',A="string";return}if(E.isIdStartChar(D)){t+=u(),A="identifierName";return}throw s(u())},afterPropertyName(){if(D===":")return C("punctuator",u());throw s(u())},beforePropertyValue(){A="value"},afterPropertyValue(){switch(D){case",":case"}":return C("punctuator",u())}throw s(u())},beforeArrayValue(){if(D==="]")return C("punctuator",u());A="value"},afterArrayValue(){switch(D){case",":case"]":return C("punctuator",u())}throw s(u())},end(){throw s(u())}};function C(e,i){return{type:e,value:i,line:f,column:p}}function c(e){for(let i of e){if(F()!==i)throw s(u());u()}}function w(){switch(F()){case"b":return u(),"\b";case"f":return u(),"\f";case"n":return u(),`
7
+ `;case"r":return u(),"\r";case"t":return u(),"\t";case"v":return u(),"\v";case"0":if(u(),E.isDigit(F()))throw s(u());return"\x00";case"x":return u(),Q();case"u":return u(),$();case`
8
+ `:case"\u2028":case"\u2029":return u(),"";case"\r":return u(),F()===`
9
+ `&&u(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw s(u());case void 0:throw s(u())}return u()}function Q(){let e="",i=F();if(!E.isHexDigit(i)||(e+=u(),i=F(),!E.isHexDigit(i)))throw s(u());return e+=u(),String.fromCodePoint(parseInt(e,16))}function $(){let e="",i=4;for(;i-- >0;){let b=F();if(!E.isHexDigit(b))throw s(u());e+=u()}return String.fromCodePoint(parseInt(e,16))}let U={start(){if(o.type==="eof")throw x();V()},beforePropertyName(){switch(o.type){case"identifier":case"string":d=o.value,n="afterPropertyName";return;case"punctuator":I();return;case"eof":throw x()}},afterPropertyName(){if(o.type==="eof")throw x();n="beforePropertyValue"},beforePropertyValue(){if(o.type==="eof")throw x();V()},beforeArrayValue(){if(o.type==="eof")throw x();if(o.type==="punctuator"&&o.value==="]"){I();return}V()},afterPropertyValue(){if(o.type==="eof")throw x();switch(o.value){case",":n="beforePropertyName";return;case"}":I()}},afterArrayValue(){if(o.type==="eof")throw x();switch(o.value){case",":n="beforeArrayValue";return;case"]":I()}},end(){}};function V(){let e;switch(o.type){case"punctuator":switch(o.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=o.value;break}if(y===void 0)y=e;else{let i=B[B.length-1];Array.isArray(i)?i.push(e):Object.defineProperty(i,d,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")B.push(e),Array.isArray(e)?n="beforeArrayValue":n="beforePropertyName";else{let i=B[B.length-1];i==null?n="end":Array.isArray(i)?n="afterArrayValue":n="afterPropertyValue"}}function I(){B.pop();let e=B[B.length-1];e==null?n="end":Array.isArray(e)?n="afterArrayValue":n="afterPropertyValue"}function s(e){return j(e===void 0?`JSON5: invalid end of input at ${f}:${p}`:`JSON5: invalid character '${H(e)}' at ${f}:${p}`)}function x(){return j(`JSON5: invalid end of input at ${f}:${p}`)}function L(){return p-=5,j(`JSON5: invalid identifier character at ${f}:${p}`)}function W(e){console.warn(`JSON5: '${H(e)}' in strings is not valid ECMAScript; consider escaping`)}function H(e){let i={"'":"\\'",'"':"\\\"","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\x00":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(i[e])return i[e];if(e<" "){let b=e.charCodeAt(0).toString(16);return"\\x"+("00"+b).substring(b.length)}return e}function j(e){let i=new SyntaxError(e);return i.lineNumber=f,i.columnNumber=p,i}return k}var Du=uu(),eu=G(Du),J,q;function Fu(){if(q)return J;q=1;let E=K();return J=function(r,n,B){let m=[],f="",p,o,d="",y;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&(B=n.space,y=n.quote,n=n.replacer),typeof n=="function")o=n;else if(Array.isArray(n)){p=[];for(let D of n){let a;typeof D=="string"?a=D:(typeof D=="number"||D instanceof String||D instanceof Number)&&(a=String(D)),a!==void 0&&p.indexOf(a)<0&&p.push(a)}}return B instanceof Number?B=Number(B):B instanceof String&&(B=String(B)),typeof B=="number"?B>0&&(B=Math.min(10,Math.floor(B)),d=" ".substr(0,B)):typeof B=="string"&&(d=B.substr(0,10)),v("",{"":r});function v(D,a){let F=a[D];switch(F!=null&&(typeof F.toJSON5=="function"?F=F.toJSON5(D):typeof F.toJSON=="function"&&(F=F.toJSON(D))),o&&(F=o.call(a,D,F)),F instanceof Number?F=Number(F):F instanceof String?F=String(F):F instanceof Boolean&&(F=F.valueOf()),F){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof F=="string")return A(F);if(typeof F=="number")return String(F);if(typeof F=="object")return Array.isArray(F)?g(F):t(F)}function A(D){let a={"'":0.1,'"':0.2},F={"'":"\\'",'"':"\\\"","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\x00":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},u="";for(let C=0;C<D.length;C++){let c=D[C];switch(c){case"'":case'"':a[c]++,u+=c;continue;case"\x00":if(E.isDigit(D[C+1])){u+="\\x00";continue}}if(F[c]){u+=F[c];continue}if(c<" "){let w=c.charCodeAt(0).toString(16);u+="\\x"+("00"+w).substring(w.length);continue}u+=c}let l=y||Object.keys(a).reduce((C,c)=>a[C]<a[c]?C:c);return u=u.replace(new RegExp(l,"g"),F[l]),l+u+l}function t(D){if(m.indexOf(D)>=0)throw TypeError("Converting circular structure to JSON5");m.push(D);let a=f;f=f+d;let F=p||Object.keys(D),u=[];for(let C of F){let c=v(C,D);if(c!==void 0){let w=S(C)+":";d!==""&&(w+=" "),w+=c,u.push(w)}}let l;if(u.length===0)l="{}";else{let C;if(d==="")C=u.join(","),l="{"+C+"}";else{let c=`,
10
+ `+f;C=u.join(c),l=`{
11
+ `+f+C+`,
12
+ `+a+"}"}}return m.pop(),f=a,l}function S(D){if(D.length===0)return A(D);let a=String.fromCodePoint(D.codePointAt(0));if(!E.isIdStartChar(a))return A(D);for(let F=a.length;F<D.length;F++)if(!E.isIdContinueChar(String.fromCodePoint(D.codePointAt(F))))return A(D);return D}function g(D){if(m.indexOf(D)>=0)throw TypeError("Converting circular structure to JSON5");m.push(D);let a=f;f=f+d;let F=[];for(let l=0;l<D.length;l++){let C=v(String(l),D);F.push(C!==void 0?C:"null")}let u;if(F.length===0)u="[]";else if(d==="")u="["+F.join(",")+"]";else{let l=`,
13
+ `+f,C=F.join(l);u=`[
14
+ `+f+C+`,
15
+ `+a+"]"}return m.pop(),f=a,u}},J}var Cu=Fu(),Au=G(Cu);function ru(E,r){let n=eu(E,r?.reviver);return R(E,n,r),n}function Eu(E,r){let n=X(E,r),B=Au(E,r?.replacer,n.indent);return n.whitespace.start+B+n.whitespace.end}export{Eu as stringifyJSON5,ru as parseJSON5};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$a as Pe,Ab as xe,Bb as ve,Cb as ke,Db as Re,Eb as $e,Fb as Je,ab as _e,bb as Le,cb as Me,db as We,eb as V,fb as N,gb as g,hb as f,ib as Ae,jb as ne,kb as oe,lb as U,mb as $,nb as ce,ob as ie,pb as Ke,qb as Qe,rb as ts,sb as as,tb as Xe,ub as le,vb as pe,wb as Ye,xb as ye,yb as Ce,zb as be}from"./chunk-8nb3z33p.js";import{Gb as l,Hb as se}from"./chunk-mvkb5fc3.js";import{$b as me,Ib as De,Jb as Be,Mb as Ze,Nb as rs,Ob as R,Rb as D,Sb as Oe,Tb as h,Yb as Te,Zb as u,_b as Ve,ac as he,bc as Fe,cc as Ue,ec as Ne,fc as te,gc as i,hc as y,ic as ge,jc as ue,kc as we}from"./chunk-4v1a15ke.js";import{nc as F,qc as x}from"./chunk-fvdx05dx.js";import{vc as hs,wc as us}from"./chunk-rewjb3gf.js";import"./chunk-at17xh96.js";import"./chunk-sgrntkej.js";import"./chunk-hjdz5p2e.js";import"./chunk-cptthhq1.js";import{Rc as o}from"./chunk-2pj0cr49.js";var p=o(F(),1);var J=o(x(),1);var I=async(e,s,t)=>{return{operation:U(s).operation,region:await $(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function ls(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}}function b(e){return{schemeId:"smithy.api#noAuth"}}var P=(e)=>{let s=[];switch(e.operation){case"GetRoleCredentials":{s.push(b(e));break}case"ListAccountRoles":{s.push(b(e));break}case"ListAccounts":{s.push(b(e));break}case"Logout":{s.push(b(e));break}default:s.push(ls(e))}return s},_=(e)=>{let s=J.resolveAwsSdkSigV4Config(e);return Object.assign(s,{})};var L=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"})},M={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var W={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.775.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.775.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var Ee=o(x(),1);var ae=o(x(),1),re=o(F(),1);var v=o(us(),1),k=o(hs(),1);var A={["required"]:!1,type:"String"},K={["required"]:!0,default:!1,type:"Boolean"},Q={["ref"]:"Endpoint"},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},H={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},n={},X={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},G={["ref"]:"PartitionResult"},Y={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[G,"supportsDualStack"]}]},Z=[T],C=[H],j=[{["ref"]:"Region"}],ys={version:"1.0",parameters:{Region:A,UseDualStack:K,UseFIPS:K,Endpoint:A},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[Q]}],rules:[{conditions:Z,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:C,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:Q,properties:n,headers:n},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:j}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:j,assign:"PartitionResult"}],rules:[{conditions:[T,H],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,X]},Y],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:Z,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[X,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[G,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:n,headers:n},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:C,rules:[{conditions:[Y],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},O=ys;var ms=new V({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ee=(e,s={})=>{return ms.get(e,()=>g(O,{endpointParams:e,logger:s.logger}))};N.aws=f;var de=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??v.fromBase64,base64Encoder:e?.base64Encoder??v.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ee,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??P,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new ae.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new re.NoAuthSigner}],logger:e?.logger??new te,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??se,utf8Decoder:e?.utf8Decoder??k.fromUtf8,utf8Encoder:e?.utf8Encoder??k.toUtf8}};var qe=(e)=>{he(process.version);let s=Re(e),t=()=>s().then(me),r=de(e);Ee.emitWarningIfUnsupportedVersion(process.version);let a={profile:e?.profile};return{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??ke,defaultUserAgentProvider:e?.defaultUserAgentProvider??be({serviceId:r.serviceId,clientVersion:W.version}),maxAttempts:e?.maxAttempts??l(pe,e),region:e?.region??l(ce,{...ie,...a}),requestHandler:ue.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...ye,default:async()=>(await t()).retryMode||le},e),sha256:e?.sha256??ve.bind(null,"sha256"),streamCollector:e?.streamCollector??we,useDualstackEndpoint:e?.useDualstackEndpoint??l(ne,a),useFipsEndpoint:e?.useFipsEndpoint??l(oe,a),userAgentAppId:e?.userAgentAppId??l(xe,a)}};var Se=(e)=>{let{httpAuthSchemes:s,httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){let d=s.findIndex((B)=>B.schemeId===a.schemeId);if(d===-1)s.push(a);else s.splice(d,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},ze=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var Ie=(e,s)=>{let t=Object.assign($e(e),Fe(e),De(e),Se(e));return s.forEach((r)=>r.configure(t)),Object.assign(e,Je(t),Ue(t),Be(t),ze(t))};class je extends Ze{config;constructor(...[e]){let s=qe(e||{});super(s);this.initConfig=s;let t=L(s),r=We(t),a=Ye(r),d=Ke(a),B=Pe(d),ns=Xe(B),os=_(ns),cs=Ie(os,e?.extensions||[]);this.config=cs,this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(Ce(this.config)),this.middlewareStack.use(Qe(this.config)),this.middlewareStack.use(_e(this.config)),this.middlewareStack.use(Le(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:I,identityProviderConfigProvider:async(is)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":is.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class c extends Te{constructor(e){super(e);Object.setPrototypeOf(this,c.prototype)}}class E extends c{name="InvalidRequestException";$fault="client";constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});Object.setPrototypeOf(this,E.prototype)}}class q extends c{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,q.prototype)}}class S extends c{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});Object.setPrototypeOf(this,S.prototype)}}class z extends c{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});Object.setPrototypeOf(this,z.prototype)}}var He=(e)=>({...e,...e.accessToken&&{accessToken:R}}),ws=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:R},...e.sessionToken&&{sessionToken:R}}),Ge=(e)=>({...e,...e.roleCredentials&&{roleCredentials:ws(e.roleCredentials)}});var m=o(x(),1),fe=o(F(),1);var es=async(e,s)=>{let t=fe.requestBuilder(e,s),r=i({},Ne,{[Fs]:e[Ss]});t.bp("/federation/credentials");let a=i({[Bs]:[,D(e[Ds],"roleName")],[zs]:[,D(e[qs],"accountId")]}),d;return t.m("GET").h(r).q(a).b(d),t.build()};var ss=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return bs(e,s);let t=i({$metadata:w(e)}),r=D(Oe(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:ge});return Object.assign(t,a),t};var bs=async(e,s)=>{let t={...e,body:await m.parseJsonErrorBody(e.body,s)},r=m.loadRestJsonErrorCode(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await vs(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await ks(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Rs(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await Es(t,s);default:let a=t.body;return xs({output:e,parsedBody:a,errorCode:r})}},xs=Ve(c),vs=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new E({$metadata:w(e),...t});return u(d,e.body)},ks=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new q({$metadata:w(e),...t});return u(d,e.body)},Rs=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new S({$metadata:w(e),...t});return u(d,e.body)},Es=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new z({$metadata:w(e),...t});return u(d,e.body)},w=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var qs="accountId",Ss="accessToken",zs="account_id";var Ds="roleName",Bs="role_name",Fs="x-amz-sso_bearer_token";class ds extends rs.classBuilder().ep(M).m(function(e,s,t,r){return[ts(t,this.serialize,this.deserialize),as(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(He,Ge).ser(es).de(ss).build(){}export{je as SSOClient,ds as GetRoleCredentialsCommand};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ea as r,Fa as s}from"./chunk-cqrmkpzz.js";import"./chunk-6v69415e.js";import"./chunk-2pj0cr49.js";export{s as stringifyJSONC,r as parseJSONC};
@@ -0,0 +1 @@
1
+ import{Lc as S}from"./chunk-sgrntkej.js";import{Rc as x}from"./chunk-2pj0cr49.js";var q="AWS_PROFILE";var B=(o)=>o.profile||process.env.AWS_PROFILE||"default";import{join as b}from"node:path";import{homedir as N}from"node:os";import{sep as L}from"node:path";var d={},w=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},f=()=>{let{HOME:o,USERPROFILE:e,HOMEPATH:t,HOMEDRIVE:r=`C:${L}`}=process.env;if(o)return o;if(e)return e;if(t)return`${r}${t}`;let i=w();if(!d[i])d[i]=N();return d[i]};var v="AWS_CONFIG_FILE",g=()=>process.env[v]||b(f(),".aws","config");var D=x(S(),1);import{join as I}from"node:path";var h=x(S(),1);var O=(o)=>Object.entries(o).filter(([e])=>{let t=e.indexOf(c);if(t===-1)return!1;return Object.values(h.IniSectionType).includes(e.substring(0,t))}).reduce((e,[t,r])=>{let i=t.indexOf(c),s=t.substring(0,i)===h.IniSectionType.PROFILE?t.substring(i+1):t;return e[s]=r,e},{...o.default&&{default:o.default}});import{join as j}from"node:path";var y="AWS_SHARED_CREDENTIALS_FILE",_=()=>process.env[y]||j(f(),".aws","credentials");var C=x(S(),1);var $=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,G=["__proto__","profile __proto__"],a=(o)=>{let e={},t,r;for(let i of o.split(/\r?\n/)){let s=i.split(/(^|\s)[;#]/)[0].trim();if(s[0]==="["&&s[s.length-1]==="]"){t=void 0,r=void 0;let n=s.substring(1,s.length-1),m=$.exec(n);if(m){let[,p,,F]=m;if(Object.values(C.IniSectionType).includes(p))t=[p,F].join(c)}else t=n;if(G.includes(n))throw new Error(`Found invalid profile name "${n}"`)}else if(t){let n=s.indexOf("=");if(![0,-1].includes(n)){let[m,p]=[s.substring(0,n).trim(),s.substring(n+1).trim()];if(p==="")r=m;else{if(r&&i.trimStart()===i)r=void 0;e[t]=e[t]||{};let F=r?[r,m].join(c):m;e[t][F]=p}}}}return e};import{promises as W}from"node:fs";var{readFile:K}=W,E={},l=(o,e)=>{if(!E[o]||e?.ignoreCache)E[o]=K(o,"utf8");return E[o]};var P=()=>({}),c=".",R=async(o={})=>{let{filepath:e=_(),configFilepath:t=g()}=o,r=f(),i="~/",s=e;if(e.startsWith("~/"))s=I(r,e.slice(2));let u=t;if(t.startsWith("~/"))u=I(r,t.slice(2));let n=await Promise.all([l(u,{ignoreCache:o.ignoreCache}).then(a).then(O).catch(P),l(s,{ignoreCache:o.ignoreCache}).then(a).catch(P)]);return{configFile:n[0],credentialsFile:n[1]}};var T=(o)=>Object.entries(o).filter(([e])=>e.startsWith(D.IniSectionType.SSO_SESSION+c)).reduce((e,[t,r])=>({...e,[t.substring(t.indexOf(c)+1)]:r}),{});var V=()=>({}),Pe=async(o={})=>l(o.configFilepath??g()).then(a).then(T).catch(V);var A=(...o)=>{let e={};for(let t of o)for(let[r,i]of Object.entries(t))if(e[r]!==void 0)Object.assign(e[r],i);else e[r]=i;return e};var He=async(o)=>{let e=await R(o);return A(e.configFile,e.credentialsFile)};import{createHash as U}from"node:crypto";import{join as X}from"node:path";var H=(o)=>{let t=U("sha1").update(o).digest("hex");return X(f(),".aws","sso","cache",`${t}.json`)};import{promises as k}from"node:fs";var{readFile:M}=k,$e=async(o)=>{let e=H(o),t=await M(e,"utf8");return JSON.parse(t)};export{q as Dc,B as Ec,H as Fc,$e as Gc,c as Hc,R as Ic,Pe as Jc,He as Kc};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Bc as v,vc as E}from"./chunk-dz02fqrj.js";import"./chunk-wjhmhcgy.js";import{Gc as O}from"./chunk-eyn01tkt.js";import{Hc as $}from"./chunk-h6ga49c2.js";import{Ic as k,Nc as C}from"./chunk-bj7sb2gs.js";var u=k($(),1);var q=k(O(),1),z=k($(),1);var U=k(O(),1),j=k($(),1),V=(y,w,_)=>{let I={EcsContainer:async(b)=>{let{fromHttp:x}=await import("./chunk-y7yphjhj.js"),{fromContainerMetadata:A}=await import("./chunk-cx7bz59q.js");return _?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>j.chain(x(b??{}),A(b))().then(R)},Ec2InstanceMetadata:async(b)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:x}=await import("./chunk-cx7bz59q.js");return async()=>x(b)().then(R)},Environment:async(b)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:x}=await import("./chunk-aqgpc9tg.js");return async()=>x(b)().then(R)}};if(y in I)return I[y];else throw new j.CredentialsProviderError(`Unsupported credential source in profile ${w}. Got ${y}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:_})},R=(y)=>U.setCredentialFeature(y,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var X=(y,{profile:w="default",logger:_}={})=>{return Boolean(y)&&typeof y==="object"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1&&["undefined","string"].indexOf(typeof y.external_id)>-1&&["undefined","string"].indexOf(typeof y.mfa_serial)>-1&&(d(y,{profile:w,logger:_})||n(y,{profile:w,logger:_}))},d=(y,{profile:w,logger:_})=>{let I=typeof y.source_profile==="string"&&typeof y.credential_source==="undefined";if(I)_?.debug?.(` ${w} isAssumeRoleWithSourceProfile source_profile=${y.source_profile}`);return I},n=(y,{profile:w,logger:_})=>{let I=typeof y.credential_source==="string"&&typeof y.source_profile==="undefined";if(I)_?.debug?.(` ${w} isCredentialSourceProfile credential_source=${y.credential_source}`);return I},Y=async(y,w,_,I={})=>{_.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let b=w[y],{source_profile:x,region:A}=b;if(!_.roleAssumer){let{getDefaultRoleAssumer:K}=await import("./chunk-dvnqfcah.js");_.roleAssumer=K({..._.clientConfig,credentialProviderLogger:_.logger,parentClientConfig:{..._?.parentClientConfig,region:A??_?.parentClientConfig?.region}},_.clientPlugins)}if(x&&x in I)throw new z.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${E(_)}. Profiles visited: `+Object.keys(I).join(", "),{logger:_.logger});_.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${x?`source_profile=[${x}]`:`profile=[${y}]`}`);let T=x?L(x,w,_,{...I,[x]:!0},W(w[x]??{})):(await V(b.credential_source,y,_.logger)(_))();if(W(b))return T.then((K)=>q.setCredentialFeature(K,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let K={RoleArn:b.role_arn,RoleSessionName:b.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:b.external_id,DurationSeconds:parseInt(b.duration_seconds||"3600",10)},{mfa_serial:B}=b;if(B){if(!_.mfaCodeProvider)throw new z.CredentialsProviderError(`Profile ${y} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:_.logger,tryNextLink:!1});K.SerialNumber=B,K.TokenCode=await _.mfaCodeProvider(B)}let P=await T;return _.roleAssumer(P,K).then((N)=>q.setCredentialFeature(N,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},W=(y)=>{return!y.role_arn&&!!y.credential_source};var Z=k(O(),1),H=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.credential_process==="string",c=async(y,w)=>import("./chunk-gser7yzj.js").then(({fromProcess:_})=>_({...y,profile:w})().then((I)=>Z.setCredentialFeature(I,"CREDENTIALS_PROFILE_PROCESS","v")));var G=k(O(),1),S=async(y,w,_={})=>{let{fromSSO:I}=await import("./chunk-f0sjawty.js");return I({profile:y,logger:_.logger,parentClientConfig:_.parentClientConfig,clientConfig:_.clientConfig})().then((b)=>{if(w.sso_session)return G.setCredentialFeature(b,"CREDENTIALS_PROFILE_SSO","r");else return G.setCredentialFeature(b,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},F=(y)=>y&&(typeof y.sso_start_url==="string"||typeof y.sso_account_id==="string"||typeof y.sso_session==="string"||typeof y.sso_region==="string"||typeof y.sso_role_name==="string");var M=k(O(),1),J=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.aws_access_key_id==="string"&&typeof y.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof y.aws_session_token)>-1&&["undefined","string"].indexOf(typeof y.aws_account_id)>-1,Q=async(y,w)=>{w?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let _={accessKeyId:y.aws_access_key_id,secretAccessKey:y.aws_secret_access_key,sessionToken:y.aws_session_token,...y.aws_credential_scope&&{credentialScope:y.aws_credential_scope},...y.aws_account_id&&{accountId:y.aws_account_id}};return M.setCredentialFeature(_,"CREDENTIALS_PROFILE","n")};var h=k(O(),1),D=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.web_identity_token_file==="string"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1,m=async(y,w)=>import("./chunk-xkpw06x6.js").then(({fromTokenFile:_})=>_({webIdentityTokenFile:y.web_identity_token_file,roleArn:y.role_arn,roleSessionName:y.role_session_name,roleAssumerWithWebIdentity:w.roleAssumerWithWebIdentity,logger:w.logger,parentClientConfig:w.parentClientConfig})().then((I)=>h.setCredentialFeature(I,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var L=async(y,w,_,I={},b=!1)=>{let x=w[y];if(Object.keys(I).length>0&&J(x))return Q(x,_);if(b||X(x,{profile:y,logger:_.logger}))return Y(y,w,_,I);if(J(x))return Q(x,_);if(D(x))return m(x,_);if(H(x))return c(_,y);if(F(x))return await S(y,x,_);throw new u.CredentialsProviderError(`Could not resolve credentials using profile: [${y}] in configuration/credentials file(s).`,{logger:_.logger})};var ky=(y={})=>async({callerClientConfig:w}={})=>{let _={...y,parentClientConfig:{...w,...y.parentClientConfig}};_.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let I=await v(_);return L(E({profile:y.profile??w?.profile}),I,_)};export{ky as fromIni};
2
+ import{Ec as E,Kc as v}from"./chunk-at17xh96.js";import"./chunk-sgrntkej.js";import{Pc as O}from"./chunk-hjdz5p2e.js";import{Qc as $}from"./chunk-cptthhq1.js";import{Rc as k,Wc as C}from"./chunk-2pj0cr49.js";var u=k($(),1);var q=k(O(),1),z=k($(),1);var U=k(O(),1),j=k($(),1),V=(y,w,_)=>{let I={EcsContainer:async(b)=>{let{fromHttp:x}=await import("./chunk-s6kch47s.js"),{fromContainerMetadata:A}=await import("./chunk-2htrvvzn.js");return _?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>j.chain(x(b??{}),A(b))().then(R)},Ec2InstanceMetadata:async(b)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:x}=await import("./chunk-2htrvvzn.js");return async()=>x(b)().then(R)},Environment:async(b)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:x}=await import("./chunk-68apz1e2.js");return async()=>x(b)().then(R)}};if(y in I)return I[y];else throw new j.CredentialsProviderError(`Unsupported credential source in profile ${w}. Got ${y}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:_})},R=(y)=>U.setCredentialFeature(y,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var X=(y,{profile:w="default",logger:_}={})=>{return Boolean(y)&&typeof y==="object"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1&&["undefined","string"].indexOf(typeof y.external_id)>-1&&["undefined","string"].indexOf(typeof y.mfa_serial)>-1&&(d(y,{profile:w,logger:_})||n(y,{profile:w,logger:_}))},d=(y,{profile:w,logger:_})=>{let I=typeof y.source_profile==="string"&&typeof y.credential_source==="undefined";if(I)_?.debug?.(` ${w} isAssumeRoleWithSourceProfile source_profile=${y.source_profile}`);return I},n=(y,{profile:w,logger:_})=>{let I=typeof y.credential_source==="string"&&typeof y.source_profile==="undefined";if(I)_?.debug?.(` ${w} isCredentialSourceProfile credential_source=${y.credential_source}`);return I},Y=async(y,w,_,I={})=>{_.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let b=w[y],{source_profile:x,region:A}=b;if(!_.roleAssumer){let{getDefaultRoleAssumer:K}=await import("./chunk-2nrg08kz.js");_.roleAssumer=K({..._.clientConfig,credentialProviderLogger:_.logger,parentClientConfig:{..._?.parentClientConfig,region:A??_?.parentClientConfig?.region}},_.clientPlugins)}if(x&&x in I)throw new z.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${E(_)}. Profiles visited: `+Object.keys(I).join(", "),{logger:_.logger});_.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${x?`source_profile=[${x}]`:`profile=[${y}]`}`);let T=x?L(x,w,_,{...I,[x]:!0},W(w[x]??{})):(await V(b.credential_source,y,_.logger)(_))();if(W(b))return T.then((K)=>q.setCredentialFeature(K,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let K={RoleArn:b.role_arn,RoleSessionName:b.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:b.external_id,DurationSeconds:parseInt(b.duration_seconds||"3600",10)},{mfa_serial:B}=b;if(B){if(!_.mfaCodeProvider)throw new z.CredentialsProviderError(`Profile ${y} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:_.logger,tryNextLink:!1});K.SerialNumber=B,K.TokenCode=await _.mfaCodeProvider(B)}let P=await T;return _.roleAssumer(P,K).then((N)=>q.setCredentialFeature(N,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},W=(y)=>{return!y.role_arn&&!!y.credential_source};var Z=k(O(),1),H=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.credential_process==="string",c=async(y,w)=>import("./chunk-1e89wpt6.js").then(({fromProcess:_})=>_({...y,profile:w})().then((I)=>Z.setCredentialFeature(I,"CREDENTIALS_PROFILE_PROCESS","v")));var G=k(O(),1),S=async(y,w,_={})=>{let{fromSSO:I}=await import("./chunk-992fz6fq.js");return I({profile:y,logger:_.logger,parentClientConfig:_.parentClientConfig,clientConfig:_.clientConfig})().then((b)=>{if(w.sso_session)return G.setCredentialFeature(b,"CREDENTIALS_PROFILE_SSO","r");else return G.setCredentialFeature(b,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},F=(y)=>y&&(typeof y.sso_start_url==="string"||typeof y.sso_account_id==="string"||typeof y.sso_session==="string"||typeof y.sso_region==="string"||typeof y.sso_role_name==="string");var M=k(O(),1),J=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.aws_access_key_id==="string"&&typeof y.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof y.aws_session_token)>-1&&["undefined","string"].indexOf(typeof y.aws_account_id)>-1,Q=async(y,w)=>{w?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let _={accessKeyId:y.aws_access_key_id,secretAccessKey:y.aws_secret_access_key,sessionToken:y.aws_session_token,...y.aws_credential_scope&&{credentialScope:y.aws_credential_scope},...y.aws_account_id&&{accountId:y.aws_account_id}};return M.setCredentialFeature(_,"CREDENTIALS_PROFILE","n")};var h=k(O(),1),D=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.web_identity_token_file==="string"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1,m=async(y,w)=>import("./chunk-zxq24dtw.js").then(({fromTokenFile:_})=>_({webIdentityTokenFile:y.web_identity_token_file,roleArn:y.role_arn,roleSessionName:y.role_session_name,roleAssumerWithWebIdentity:w.roleAssumerWithWebIdentity,logger:w.logger,parentClientConfig:w.parentClientConfig})().then((I)=>h.setCredentialFeature(I,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var L=async(y,w,_,I={},b=!1)=>{let x=w[y];if(Object.keys(I).length>0&&J(x))return Q(x,_);if(b||X(x,{profile:y,logger:_.logger}))return Y(y,w,_,I);if(J(x))return Q(x,_);if(D(x))return m(x,_);if(H(x))return c(_,y);if(F(x))return await S(y,x,_);throw new u.CredentialsProviderError(`Could not resolve credentials using profile: [${y}] in configuration/credentials file(s).`,{logger:_.logger})};var ky=(y={})=>async({callerClientConfig:w}={})=>{let _={...y,parentClientConfig:{...w,...y.parentClientConfig}};_.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let I=await v(_);return L(E({profile:y.profile??w?.profile}),I,_)};export{ky as fromIni};
@@ -1,2 +1,2 @@
1
- import{Kc as $}from"./chunk-bj7sb2gs.js";var S=$((N,Z)=>{var{defineProperty:I,getOwnPropertyDescriptor:z,getOwnPropertyNames:A}=Object,D=Object.prototype.hasOwnProperty,H=(j,b)=>I(j,"name",{value:b,configurable:!0}),M=(j,b)=>{for(var F in b)I(j,F,{get:b[F],enumerable:!0})},J=(j,b,F,B)=>{if(b&&typeof b==="object"||typeof b==="function"){for(let G of A(b))if(!D.call(j,G)&&G!==F)I(j,G,{get:()=>b[G],enumerable:!(B=z(b,G))||B.enumerable})}return j},T=(j)=>J(I({},"__esModule",{value:!0}),j),Y={};M(Y,{CredentialsProviderError:()=>V,ProviderError:()=>K,TokenProviderError:()=>w,chain:()=>O,fromStatic:()=>q,memoize:()=>L});Z.exports=T(Y);var K=class j extends Error{constructor(b,F=!0){let B,G=!0;if(typeof F==="boolean")B=void 0,G=F;else if(F!=null&&typeof F==="object")B=F.logger,G=F.tryNextLink??!0;super(b);this.name="ProviderError",this.tryNextLink=G,Object.setPrototypeOf(this,j.prototype),B?.debug?.(`@smithy/property-provider ${G?"->":"(!)"} ${b}`)}static{H(this,"ProviderError")}static from(b,F=!0){return Object.assign(new this(b.message,F),b)}},V=class j extends K{constructor(b,F=!0){super(b,F);this.name="CredentialsProviderError",Object.setPrototypeOf(this,j.prototype)}static{H(this,"CredentialsProviderError")}},w=class j extends K{constructor(b,F=!0){super(b,F);this.name="TokenProviderError",Object.setPrototypeOf(this,j.prototype)}static{H(this,"TokenProviderError")}},O=H((...j)=>async()=>{if(j.length===0)throw new K("No providers in chain");let b;for(let F of j)try{return await F()}catch(B){if(b=B,B?.tryNextLink)continue;throw B}throw b},"chain"),q=H((j)=>()=>Promise.resolve(j),"fromStatic"),L=H((j,b,F)=>{let B,G,Q,U=!1,W=H(async()=>{if(!G)G=j();try{B=await G,Q=!0,U=!1}finally{G=void 0}return B},"coalesceProvider");if(b===void 0)return async(X)=>{if(!Q||X?.forceRefresh)B=await W();return B};return async(X)=>{if(!Q||X?.forceRefresh)B=await W();if(U)return B;if(F&&!F(B))return U=!0,B;if(b(B))return await W(),B;return B}},"memoize")});
2
- export{S as Hc};
1
+ import{Tc as $}from"./chunk-2pj0cr49.js";var S=$((N,Z)=>{var{defineProperty:I,getOwnPropertyDescriptor:z,getOwnPropertyNames:A}=Object,D=Object.prototype.hasOwnProperty,H=(j,b)=>I(j,"name",{value:b,configurable:!0}),M=(j,b)=>{for(var F in b)I(j,F,{get:b[F],enumerable:!0})},J=(j,b,F,B)=>{if(b&&typeof b==="object"||typeof b==="function"){for(let G of A(b))if(!D.call(j,G)&&G!==F)I(j,G,{get:()=>b[G],enumerable:!(B=z(b,G))||B.enumerable})}return j},T=(j)=>J(I({},"__esModule",{value:!0}),j),Y={};M(Y,{CredentialsProviderError:()=>V,ProviderError:()=>K,TokenProviderError:()=>w,chain:()=>O,fromStatic:()=>q,memoize:()=>L});Z.exports=T(Y);var K=class j extends Error{constructor(b,F=!0){let B,G=!0;if(typeof F==="boolean")B=void 0,G=F;else if(F!=null&&typeof F==="object")B=F.logger,G=F.tryNextLink??!0;super(b);this.name="ProviderError",this.tryNextLink=G,Object.setPrototypeOf(this,j.prototype),B?.debug?.(`@smithy/property-provider ${G?"->":"(!)"} ${b}`)}static{H(this,"ProviderError")}static from(b,F=!0){return Object.assign(new this(b.message,F),b)}},V=class j extends K{constructor(b,F=!0){super(b,F);this.name="CredentialsProviderError",Object.setPrototypeOf(this,j.prototype)}static{H(this,"CredentialsProviderError")}},w=class j extends K{constructor(b,F=!0){super(b,F);this.name="TokenProviderError",Object.setPrototypeOf(this,j.prototype)}static{H(this,"TokenProviderError")}},O=H((...j)=>async()=>{if(j.length===0)throw new K("No providers in chain");let b;for(let F of j)try{return await F()}catch(B){if(b=B,B?.tryNextLink)continue;throw B}throw b},"chain"),q=H((j)=>()=>Promise.resolve(j),"fromStatic"),L=H((j,b,F)=>{let B,G,Q,U=!1,W=H(async()=>{if(!G)G=j();try{B=await G,Q=!0,U=!1}finally{G=void 0}return B},"coalesceProvider");if(b===void 0)return async(X)=>{if(!Q||X?.forceRefresh)B=await W();return B};return async(X)=>{if(!Q||X?.forceRefresh)B=await W();if(U)return B;if(F&&!F(B))return U=!0,B;if(b(B))return await W(),B;return B}},"memoize")});
2
+ export{S as Qc};
@@ -0,0 +1,8 @@
1
+ import{Ga as N,Ha as D}from"./chunk-6v69415e.js";function z(e,a=!1){let l=e.length,r=0,c="",f=0,s=16,d=0,T=0,p=0,E=0,g=0;function x(t,k){let h=0,u=0;for(;h<t;){let o=e.charCodeAt(r);if(o>=48&&o<=57)u=u*16+o-48;else if(o>=65&&o<=70)u=u*16+o-65+10;else if(o>=97&&o<=102)u=u*16+o-97+10;else break;r++,h++}return h<t&&(u=-1),u}function B(t){r=t,c="",f=0,s=16,g=0}function S(){let t=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&m(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&m(e.charCodeAt(r)))for(r++;r<e.length&&m(e.charCodeAt(r));)r++;else return g=3,e.substring(t,r);let k=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&m(e.charCodeAt(r))){for(r++;r<e.length&&m(e.charCodeAt(r));)r++;k=r}else g=3;return e.substring(t,k)}function y(){let t="",k=r;for(;;){if(r>=l){t+=e.substring(k,r),g=2;break}let h=e.charCodeAt(r);if(h===34){t+=e.substring(k,r),r++;break}if(h===92){if(t+=e.substring(k,r),r++,r>=l){g=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+=`
2
+ `;break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:let u=x(4);u>=0?t+=String.fromCharCode(u):g=4;break;default:g=5}k=r;continue}if(h>=0&&h<=31)if(O(h)){t+=e.substring(k,r),g=2;break}else g=6;r++}return t}function C(){if(c="",g=0,f=r,T=d,E=p,r>=l)return f=l,s=17;let t=e.charCodeAt(r);if(I(t)){do r++,c+=String.fromCharCode(t),t=e.charCodeAt(r);while(I(t));return s=15}if(O(t))return r++,c+=String.fromCharCode(t),t===13&&e.charCodeAt(r)===10&&(r++,c+=`
3
+ `),d++,p=r,s=14;switch(t){case 123:return r++,s=1;case 125:return r++,s=2;case 91:return r++,s=3;case 93:return r++,s=4;case 58:return r++,s=6;case 44:return r++,s=5;case 34:return r++,c=y(),s=10;case 47:let k=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<l&&!O(e.charCodeAt(r));)r++;return c=e.substring(k,r),s=12}if(e.charCodeAt(r+1)===42){r+=2;let h=l-1,u=!1;for(;r<h;){let o=e.charCodeAt(r);if(o===42&&e.charCodeAt(r+1)===47){r+=2,u=!0;break}r++,O(o)&&(o===13&&e.charCodeAt(r)===10&&r++,d++,p=r)}return u||(r++,g=1),c=e.substring(k,r),s=13}return c+=String.fromCharCode(t),r++,s=16;case 45:if(c+=String.fromCharCode(t),r++,r===l||!m(e.charCodeAt(r)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return c+=S(),s=11;default:for(;r<l&&A(t);)r++,t=e.charCodeAt(r);if(f!==r){switch(c=e.substring(f,r),c){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return c+=String.fromCharCode(t),r++,s=16}}function A(t){if(I(t)||O(t))return!1;switch(t){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function L(){let t;do t=C();while(t>=12&&t<=15);return t}return{setPosition:B,getPosition:()=>r,scan:a?L:C,getToken:()=>s,getTokenValue:()=>c,getTokenOffset:()=>f,getTokenLength:()=>r-f,getTokenStartLine:()=>T,getTokenStartCharacter:()=>f-E,getTokenError:()=>g}}function I(e){return e===32||e===9}function O(e){return e===10||e===13}function m(e){return e>=48&&e<=57}var V;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(V||(V={})),new Array(20).fill(0).map((e,a)=>" ".repeat(a));var b=200;new Array(b).fill(0).map((e,a)=>`
4
+ `+" ".repeat(a)),new Array(b).fill(0).map((e,a)=>"\r"+" ".repeat(a)),new Array(b).fill(0).map((e,a)=>`\r
5
+ `+" ".repeat(a)),new Array(b).fill(0).map((e,a)=>`
6
+ `+"\t".repeat(a)),new Array(b).fill(0).map((e,a)=>"\r"+"\t".repeat(a)),new Array(b).fill(0).map((e,a)=>`\r
7
+ `+"\t".repeat(a));var w;(function(e){e.DEFAULT={allowTrailingComma:!1}})(w||(w={}));function G(e,a=[],l=w.DEFAULT){let r=null,c=[],f=[];function s(d){Array.isArray(c)?c.push(d):r!==null&&(c[r]=d)}return H(e,{onObjectBegin:()=>{let d={};s(d),f.push(c),c=d,r=null},onObjectProperty:(d)=>{r=d},onObjectEnd:()=>{c=f.pop()},onArrayBegin:()=>{let d=[];s(d),f.push(c),c=d,r=null},onArrayEnd:()=>{c=f.pop()},onLiteralValue:s,onError:(d,T,p)=>{a.push({error:d,offset:T,length:p})}},l),c[0]}function H(e,a,l=w.DEFAULT){let r=z(e,!1),c=[],f=0;function s(i){return i?()=>f===0&&i(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function d(i){return i?(n)=>f===0&&i(n,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function T(i){return i?(n)=>f===0&&i(n,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>c.slice()):()=>!0}function p(i){return i?()=>{f>0?f++:i(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>c.slice())===!1&&(f=1)}:()=>!0}function E(i){return i?()=>{f>0&&f--,f===0&&i(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let g=p(a.onObjectBegin),x=T(a.onObjectProperty),B=E(a.onObjectEnd),S=p(a.onArrayBegin),y=E(a.onArrayEnd),C=T(a.onLiteralValue),A=d(a.onSeparator),L=s(a.onComment),t=d(a.onError),k=l&&l.disallowComments,h=l&&l.allowTrailingComma;function u(){for(;;){let i=r.scan();switch(r.getTokenError()){case 4:o(14);break;case 5:o(15);break;case 3:o(13);break;case 1:k||o(11);break;case 2:o(12);break;case 6:o(16);break}switch(i){case 12:case 13:k?o(10):L();break;case 16:o(1);break;case 15:case 14:break;default:return i}}}function o(i,n=[],F=[]){if(t(i),n.length+F.length>0){let v=r.getToken();for(;v!==17;){if(n.indexOf(v)!==-1){u();break}else if(F.indexOf(v)!==-1)break;v=u()}}}function _(i){let n=r.getTokenValue();return i?C(n):(x(n),c.push(n)),u(),!0}function J(){switch(r.getToken()){case 11:let i=r.getTokenValue(),n=Number(i);isNaN(n)&&(o(2),n=0),C(n);break;case 7:C(null);break;case 8:C(!0);break;case 9:C(!1);break;default:return!1}return u(),!0}function Q(){return r.getToken()!==10?(o(3,[],[2,5]),!1):(_(!1),r.getToken()===6?(A(":"),u(),U()||o(4,[],[2,5])):o(5,[],[2,5]),c.pop(),!0)}function R(){g(),u();let i=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(i||o(4,[],[]),A(","),u(),r.getToken()===2&&h)break}else i&&o(6,[],[]);Q()||o(4,[],[2,5]),i=!0}return B(),r.getToken()!==2?o(7,[2],[]):u(),!0}function q(){S(),u();let i=!0,n=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(n||o(4,[],[]),A(","),u(),r.getToken()===4&&h)break}else n&&o(6,[],[]);i?(c.push(0),i=!1):c[c.length-1]++,U()||o(4,[],[4,5]),n=!0}return y(),i||c.pop(),r.getToken()!==4?o(8,[4],[]):u(),!0}function U(){switch(r.getToken()){case 3:return q();case 1:return R();case 10:return _(!0);default:return J()}}return u(),r.getToken()===17?l.allowEmptyContent?!0:(o(4,[],[]),!1):U()?(r.getToken()!==17&&o(9,[],[]),!0):(o(4,[],[]),!1)}var j;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(j||(j={}));var K;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(K||(K={}));var M=G,P;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(P||(P={}));function Y(e,a){let l=JSON.parse(e,a?.reviver);return N(e,l,a),l}function W(e,a){let l=D(e,a),r=JSON.stringify(e,a?.replacer,l.indent);return l.whitespace.start+r+l.whitespace.end}function Z(e,a){let l=M(e,a?.errors,a);return N(e,l,a),l}function $(e,a){return W(e,a)}
8
+ export{Y as Da,Z as Ea,$ as Fa};