create-sailor 1.8.1 → 1.8.3

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 (63) hide show
  1. package/LICENSE +21 -676
  2. package/README.md +3 -3
  3. package/dist/aws-kms-3GX7ZOSJ.js +1 -0
  4. package/dist/chunk-FNDUJLS6.js +1 -0
  5. package/dist/chunk-HGJYEXMU.js +1 -0
  6. package/dist/chunk-HX3EZBGO.js +30 -0
  7. package/dist/chunk-JTXBZ2SU.js +1 -0
  8. package/dist/{chunk-M3QJPQWS.js → chunk-KRX2KWWT.js} +1 -1
  9. package/dist/chunk-OIQB5F6Y.js +1 -0
  10. package/dist/chunk-P2WEIQRQ.js +3 -0
  11. package/dist/chunk-RH2FFVSB.js +1 -0
  12. package/dist/chunk-STX7THHW.js +21 -0
  13. package/dist/chunk-TW5BOTVX.js +0 -0
  14. package/dist/chunk-VFREGXHN.js +1 -0
  15. package/dist/chunk-W5TBFCWY.js +4 -0
  16. package/dist/chunk-WJLTO7JW.js +0 -0
  17. package/dist/chunk-WU3IV4WF.js +1 -0
  18. package/dist/{credits-RR7B3C4K.js → credits-HWAYRMKF.js} +31 -31
  19. package/dist/{dist-NJH3URWV.js → dist-SFI2IGZ2.js} +2 -2
  20. package/dist/dist-UXDXDLES.js +1 -0
  21. package/dist/dist-es-B5M7V6O6.js +1 -0
  22. package/dist/{dist-es-DQDVBBVA.js → dist-es-FU66ZQS5.js} +1 -1
  23. package/dist/dist-es-KE65J6GC.js +1 -0
  24. package/dist/dist-es-PFLN3FTL.js +5 -0
  25. package/dist/dist-es-U3NYQORW.js +1 -0
  26. package/dist/dist-es-VG3XXJ7M.js +2 -0
  27. package/dist/dist-es-WAHVDQ3F.js +2 -0
  28. package/dist/event-streams-SGW54BDO.js +1 -0
  29. package/dist/index.js +180 -180
  30. package/dist/loadSso-WRXP2HXL.js +1 -0
  31. package/dist/signin-JB7STGTR.js +1 -0
  32. package/dist/sso-oidc-LTNOJMPI.js +1 -0
  33. package/dist/sts-RKUL4Q47.js +5 -0
  34. package/package.json +15 -15
  35. package/templates/LICENSE-SCAFFOLD.md +63 -0
  36. package/templates/docs/fumadocs/app/global.css +2 -2
  37. package/templates/workflows/inngest/welcome-email.ts +18 -2
  38. package/dist/aws-kms-W5N62I3Q.js +0 -1
  39. package/dist/chunk-224RJRPV.js +0 -5
  40. package/dist/chunk-2YUF6TO6.js +0 -2
  41. package/dist/chunk-44JV4JDH.js +0 -1
  42. package/dist/chunk-5LSLUC7O.js +0 -9
  43. package/dist/chunk-AAIUIEEA.js +0 -1
  44. package/dist/chunk-CHWVD37K.js +0 -1
  45. package/dist/chunk-DATQDZ23.js +0 -1
  46. package/dist/chunk-IY2KKEUD.js +0 -1
  47. package/dist/chunk-M2Z4KZL3.js +0 -20
  48. package/dist/chunk-U4BHGI6P.js +0 -1
  49. package/dist/chunk-WI7DO2VU.js +0 -1
  50. package/dist/chunk-YHGYZK4L.js +0 -1
  51. package/dist/dist-27O4E2DL.js +0 -1
  52. package/dist/dist-es-2W7PQEXN.js +0 -5
  53. package/dist/dist-es-CAS2CDUC.js +0 -2
  54. package/dist/dist-es-GO22VTF3.js +0 -1
  55. package/dist/dist-es-KKEGJGC4.js +0 -2
  56. package/dist/dist-es-LARTXLYL.js +0 -1
  57. package/dist/dist-es-O2XJNCOH.js +0 -1
  58. package/dist/loadSso-LSHML5XP.js +0 -1
  59. package/dist/signin-3DEIU5DH.js +0 -1
  60. package/dist/sso-oidc-5FB6AI4I.js +0 -1
  61. package/dist/sts-7GUSARTO.js +0 -6
  62. package/templates/LICENSE-INDEPENDENT.md +0 -93
  63. /package/dist/{chunk-3T4EOSMQ.js → chunk-SPHQRDN5.js} +0 -0
@@ -0,0 +1 @@
1
+ import{a as _e}from"./chunk-RH2FFVSB.js";import{a as H,b as re,c as se,d as ne,e as ie,f as pe,g as he,h as fe,i as ge,m as Re,n as ye,o as Ce,p as Ae,q as Oe,r as Te,s as Ne,t as we,u as ke,v as be}from"./chunk-STX7THHW.js";import{g as ae,l as ce,o as ue,p as de,q as le,r as me,t as Se,u as xe,y as Ie,z as De}from"./chunk-VFREGXHN.js";import{d as ve,e as Ee}from"./chunk-XB6R2VIU.js";import{b as u,c as w,d as D,e as j,f as L,g as K,h as V,j as B,k as W,n as Q,o as Y,p as J}from"./chunk-OIQB5F6Y.js";import"./chunk-JTXBZ2SU.js";import{a as Pe}from"./chunk-P2WEIQRQ.js";import"./chunk-WJLTO7JW.js";import"./chunk-TW5BOTVX.js";import"./chunk-SPHQRDN5.js";import{d as k,e as C,f as b,g as F,i as U,k as G,l as $,m as q,n as M,p as z}from"./chunk-FNDUJLS6.js";import{c as A,n as Z,o as ee,p as te,s as oe}from"./chunk-HGJYEXMU.js";import{w as X}from"./chunk-W5TBFCWY.js";import"./chunk-IYWUY3VA.js";var He=async(e,t,o)=>({operation:k(t).operation,region:await C(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function gt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(t,o)=>({signingProperties:{config:t,context:o}})}}function St(e){return{schemeId:"smithy.api#noAuth"}}var Fe=e=>{let t=[];return e.operation==="GetRoleCredentials"?t.push(St(e)):t.push(gt(e)),t},Ue=e=>{let t=ge(e);return Object.assign(t,{authSchemePreference:C(e.authSchemePreference??[])})};var Ge=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}),$e={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Qe="required";var i="argv";var qe="isSet",m="booleanEquals",d="error",l="endpoint",p="tree",I="PartitionResult",O="getAttr",Me={[Qe]:!1,type:"string"},ze={[Qe]:!0,default:!1,type:"boolean"},je={ref:"Endpoint"},Ye={fn:m,[i]:[{ref:"UseFIPS"},!0]},Je={fn:m,[i]:[{ref:"UseDualStack"},!0]},n={},Le={fn:O,[i]:[{ref:I},"supportsFIPS"]},Xe={ref:I},Ke={fn:m,[i]:[!0,{fn:O,[i]:[Xe,"supportsDualStack"]}]},Ve=[Ye],Be=[Je],We=[{ref:"Region"}],vt={version:"1.0",parameters:{Region:Me,UseDualStack:ze,UseFIPS:ze,Endpoint:Me},rules:[{conditions:[{fn:qe,[i]:[je]}],rules:[{conditions:Ve,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:Be,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:je,properties:n,headers:n},type:l}],type:p},{conditions:[{fn:qe,[i]:We}],rules:[{conditions:[{fn:"aws.partition",[i]:We,assign:I}],rules:[{conditions:[Ye,Je],rules:[{conditions:[{fn:m,[i]:[!0,Le]},Ke],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:l}],type:p},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:p},{conditions:Ve,rules:[{conditions:[{fn:m,[i]:[Le,!0]}],rules:[{conditions:[{fn:"stringEquals",[i]:[{fn:O,[i]:[Xe,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:n,headers:n},type:l},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:l}],type:p},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:p},{conditions:Be,rules:[{conditions:[Ke],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:l}],type:p},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:p},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:l}],type:p}],type:p},{error:"Invalid Configuration: Missing Region",type:d}]},Ze=vt;var Et=new B({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),et=(e,t={})=>Et.get(e,()=>Q(Ze,{endpointParams:e,logger:t.logger}));W.aws=ae;var c=class e extends U{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var g=class e extends c{name="InvalidRequestException";$fault="client";constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},S=class e extends c{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},v=class e extends c{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},E=class e extends c{name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};var xt="AccessTokenType",_t="GetRoleCredentials",Pt="GetRoleCredentialsRequest",Rt="GetRoleCredentialsResponse",yt="InvalidRequestException",Ct="RoleCredentials",At="ResourceNotFoundException",It="SecretAccessKeyType",Ot="SessionTokenType",Tt="TooManyRequestsException",Nt="UnauthorizedException",wt="accountId",Dt="accessKeyId",kt="accessToken",bt="account_id",x="client",_="error",Ht="expiration",Ft="http",P="httpError",Ut="httpHeader",tt="httpQuery",R="message",Gt="roleCredentials",$t="roleName",qt="role_name",ot="smithy.ts.sdk.synthetic.com.amazonaws.sso",Mt="secretAccessKey",zt="sessionToken",jt="x-amz-sso_bearer_token",a="com.amazonaws.sso",rt=A.for(ot),Lt=[-3,ot,"SSOServiceException",0,[],[]];rt.registerError(Lt,c);var h=A.for(a),Kt=[-3,a,yt,{[_]:x,[P]:400},[R],[0]];h.registerError(Kt,g);var Vt=[-3,a,At,{[_]:x,[P]:404},[R],[0]];h.registerError(Vt,S);var Bt=[-3,a,Tt,{[_]:x,[P]:429},[R],[0]];h.registerError(Bt,v);var Wt=[-3,a,Nt,{[_]:x,[P]:401},[R],[0]];h.registerError(Wt,E);var st=[rt,h],Qt=[0,a,xt,8,0],Yt=[0,a,It,8,0],Jt=[0,a,Ot,8,0],Xt=[3,a,Pt,0,[$t,wt,kt],[[0,{[tt]:qt}],[0,{[tt]:bt}],[()=>Qt,{[Ut]:jt}]],3],Zt=[3,a,Rt,0,[Gt],[[()=>eo,0]]],eo=[3,a,Ct,0,[Dt,Mt,zt,Ht],[0,[()=>Yt,0],[()=>Jt,0],1]],nt=[9,a,_t,{[Ft]:["GET","/federation/credentials",200]},()=>Xt,()=>Zt];var it=e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Se,base64Encoder:e?.base64Encoder??xe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??et,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Fe,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new he},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ie}],logger:e?.logger??new z,protocol:e?.protocol??_e,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:st,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??oe,utf8Decoder:e?.utf8Decoder??ve,utf8Encoder:e?.utf8Encoder??Ee});var at=e=>{$(process.version);let t=V(e),o=()=>t().then(G),s=it(e);pe(process.version);let r={profile:e?.profile,logger:s.logger};return{...s,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??u(fe,r),bodyLengthChecker:e?.bodyLengthChecker??De,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ne({serviceId:s.serviceId,clientVersion:Te.version}),maxAttempts:e?.maxAttempts??u(ue,e),region:e?.region??u(j,{...L,...r}),requestHandler:Pe.create(e?.requestHandler??o),retryMode:e?.retryMode??u({...le,default:async()=>(await o()).retryMode||ce},e),sha256:e?.sha256??X.bind(null,"sha256"),streamCollector:e?.streamCollector??Re,useDualstackEndpoint:e?.useDualstackEndpoint??u(w,r),useFipsEndpoint:e?.useFipsEndpoint??u(D,r),userAgentAppId:e?.userAgentAppId??u(we,r)}};var pt=e=>{let t=e.httpAuthSchemes,o=e.httpAuthSchemeProvider,s=e.credentials;return{setHttpAuthScheme(r){let f=t.findIndex(y=>y.schemeId===r.schemeId);f===-1?t.push(r):t.splice(f,1,r)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(r){o=r},httpAuthSchemeProvider(){return o},setCredentials(r){s=r},credentials(){return s}}},ct=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});var ut=(e,t)=>{let o=Object.assign(ke(e),q(e),Z(e),pt(e));return t.forEach(s=>s.configure(o)),Object.assign(e,be(o),M(o),ee(o),ct(o))};var T=class extends b{config;constructor(...[t]){let o=at(t||{});super(o),this.initConfig=o;let s=Ge(o),r=Ie(s),f=de(r),y=K(f),dt=y,lt=Y(dt),mt=Ue(lt),ht=ut(mt,t?.extensions||[]);this.config=ht,this.middlewareStack.use(H(this.config)),this.middlewareStack.use(Oe(this.config)),this.middlewareStack.use(me(this.config)),this.middlewareStack.use(te(this.config)),this.middlewareStack.use(ye(this.config)),this.middlewareStack.use(Ce(this.config)),this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(re(this.config,{httpAuthSchemeParametersProvider:He,identityProviderConfigProvider:async ft=>new ne({"aws.auth#sigv4":ft.credentials})})),this.middlewareStack.use(se(this.config))}destroy(){super.destroy()}};var N=class extends F.classBuilder().ep($e).m(function(t,o,s,r){return[J(s,t.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc(nt).build(){};export{N as GetRoleCredentialsCommand,T as SSOClient};
@@ -0,0 +1 @@
1
+ import{a as ke}from"./chunk-RH2FFVSB.js";import{a as j,b as de,c as le,d as he,e as ge,f as Ee,g as Pe,h as Ie,i as Ce,m as Ne,n as we,o as He,p as be,q as Fe,r as $e,s as Me,t as Ve,u as Le,v as je}from"./chunk-STX7THHW.js";import{g as fe,l as Se,o as ve,p as _e,q as xe,r as Ae,t as Re,u as Te,y as Ue,z as qe}from"./chunk-VFREGXHN.js";import{d as ye,e as Oe}from"./chunk-XB6R2VIU.js";import{b as m,c as M,d as V,e as J,f as Z,g as ee,h as te,j as re,k as oe,n as ne,o as se,p as ie}from"./chunk-OIQB5F6Y.js";import"./chunk-JTXBZ2SU.js";import{a as De}from"./chunk-P2WEIQRQ.js";import"./chunk-WJLTO7JW.js";import"./chunk-TW5BOTVX.js";import"./chunk-SPHQRDN5.js";import{d as q,e as k,f as L,g as B,h as G,i as z,k as K,l as X,m as Q,n as W,p as Y}from"./chunk-FNDUJLS6.js";import{c as D,n as pe,o as ce,p as ue,s as me}from"./chunk-HGJYEXMU.js";import{w as ae}from"./chunk-W5TBFCWY.js";import"./chunk-IYWUY3VA.js";var Be=async(e,t,r)=>({operation:q(t).operation,region:await k(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Dt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Nt(e){return{schemeId:"smithy.api#noAuth"}}var Ge=e=>{let t=[];return e.operation==="CreateOAuth2Token"?t.push(Nt(e)):t.push(Dt(e)),t},ze=e=>{let t=Ce(e);return Object.assign(t,{authSchemePreference:k(e.authSchemePreference??[])})};var Ke=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"signin"}),Xe={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var rt="required";var s="argv";var Qe="isSet",h="booleanEquals",g="error",d="endpoint",c="tree",_="PartitionResult",N="stringEquals",We={[rt]:!0,default:!1,type:"boolean"},Ye={[rt]:!1,type:"string"},Je={ref:"Endpoint"},w={fn:h,[s]:[{ref:"UseFIPS"},!0]},H={fn:h,[s]:[{ref:"UseDualStack"},!0]},n={},b={fn:"getAttr",[s]:[{ref:_},"name"]},S={fn:h,[s]:[{ref:"UseFIPS"},!1]},v={fn:h,[s]:[{ref:"UseDualStack"},!1]},Ze={fn:"getAttr",[s]:[{ref:_},"supportsFIPS"]},et={fn:h,[s]:[!0,{fn:"getAttr",[s]:[{ref:_},"supportsDualStack"]}]},tt=[{ref:"Region"}],wt={version:"1.0",parameters:{UseDualStack:We,UseFIPS:We,Endpoint:Ye,Region:Ye},rules:[{conditions:[{fn:Qe,[s]:[Je]}],rules:[{conditions:[w],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:g},{rules:[{conditions:[H],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:g},{endpoint:{url:Je,properties:n,headers:n},type:d}],type:c}],type:c},{rules:[{conditions:[{fn:Qe,[s]:tt}],rules:[{conditions:[{fn:"aws.partition",[s]:tt,assign:_}],rules:[{conditions:[{fn:N,[s]:[b,"aws"]},S,v],endpoint:{url:"https://{Region}.signin.aws.amazon.com",properties:n,headers:n},type:d},{conditions:[{fn:N,[s]:[b,"aws-cn"]},S,v],endpoint:{url:"https://{Region}.signin.amazonaws.cn",properties:n,headers:n},type:d},{conditions:[{fn:N,[s]:[b,"aws-us-gov"]},S,v],endpoint:{url:"https://{Region}.signin.amazonaws-us-gov.com",properties:n,headers:n},type:d},{conditions:[w,H],rules:[{conditions:[{fn:h,[s]:[!0,Ze]},et],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:d}],type:c},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:g}],type:c},{conditions:[w,v],rules:[{conditions:[{fn:h,[s]:[Ze,!0]}],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:d}],type:c},{error:"FIPS is enabled but this partition does not support FIPS",type:g}],type:c},{conditions:[S,H],rules:[{conditions:[et],rules:[{endpoint:{url:"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:d}],type:c},{error:"DualStack is enabled but this partition does not support DualStack",type:g}],type:c},{endpoint:{url:"https://signin.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:d}],type:c}],type:c},{error:"Invalid Configuration: Missing Region",type:g}],type:c}]},ot=wt;var Ht=new re({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),nt=(e,t={})=>Ht.get(e,()=>ne(ot,{endpointParams:e,logger:t.logger}));oe.aws=fe;var u=class e extends z{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var x=class e extends u{name="AccessDeniedException";$fault="client";error;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},A=class e extends u{name="InternalServerException";$fault="server";error;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},P=class e extends u{name="TooManyRequestsError";$fault="client";error;constructor(t){super({name:"TooManyRequestsError",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},I=class e extends u{name="ValidationException";$fault="client";error;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}};var bt="AccessDeniedException",Ut="AccessToken",Ft="CreateOAuth2Token",$t="CreateOAuth2TokenRequest",Mt="CreateOAuth2TokenRequestBody",Vt="CreateOAuth2TokenResponseBody",qt="CreateOAuth2TokenResponse",Lt="InternalServerException",jt="RefreshToken",Bt="TooManyRequestsError",Gt="ValidationException",st="accessKeyId",it="accessToken",U="client",at="clientId",pt="codeVerifier",zt="code",l="error",ct="expiresIn",ut="grantType",Kt="http",F="httpError",mt="idToken",i="jsonName",R="message",C="refreshToken",dt="redirectUri",ft="smithy.ts.sdk.synthetic.com.amazonaws.signin",lt="secretAccessKey",ht="sessionToken",Xt="server",Qt="tokenInput",Wt="tokenOutput",gt="tokenType",p="com.amazonaws.signin",Et=D.for(ft),Yt=[-3,ft,"SigninServiceException",0,[],[]];Et.registerError(Yt,u);var f=D.for(p),Jt=[-3,p,bt,{[l]:U},[l,R],[0,0],2];f.registerError(Jt,x);var Zt=[-3,p,Lt,{[l]:Xt,[F]:500},[l,R],[0,0],2];f.registerError(Zt,A);var er=[-3,p,Bt,{[l]:U,[F]:429},[l,R],[0,0],2];f.registerError(er,P);var tr=[-3,p,Gt,{[l]:U,[F]:400},[l,R],[0,0],2];f.registerError(tr,I);var St=[Et,f],vt=[0,p,jt,8,0],rr=[3,p,Ut,8,[st,lt,ht],[[0,{[i]:st}],[0,{[i]:lt}],[0,{[i]:ht}]],3],or=[3,p,$t,0,[Qt],[[()=>nr,16]],1],nr=[3,p,Mt,0,[at,ut,zt,dt,pt,C],[[0,{[i]:at}],[0,{[i]:ut}],0,[0,{[i]:dt}],[0,{[i]:pt}],[()=>vt,{[i]:C}]],2],sr=[3,p,qt,0,[Wt],[[()=>ir,16]],1],ir=[3,p,Vt,0,[it,gt,ct,C,mt],[[()=>rr,{[i]:it}],[0,{[i]:gt}],[1,{[i]:ct}],[()=>vt,{[i]:C}],[0,{[i]:mt}]],4],_t=[9,p,Ft,{[Kt]:["POST","/v1/token",200]},()=>or,()=>sr];var xt=e=>({apiVersion:"2023-01-01",base64Decoder:e?.base64Decoder??Re,base64Encoder:e?.base64Encoder??Te,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??nt,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Ge,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Pe},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ge}],logger:e?.logger??new Y,protocol:e?.protocol??ke,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:St,version:"2023-01-01",serviceTarget:"Signin"},serviceId:e?.serviceId??"Signin",urlParser:e?.urlParser??me,utf8Decoder:e?.utf8Decoder??ye,utf8Encoder:e?.utf8Encoder??Oe});var At=e=>{X(process.version);let t=te(e),r=()=>t().then(K),a=xt(e);Ee(process.version);let o={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??m(Ie,o),bodyLengthChecker:e?.bodyLengthChecker??qe,defaultUserAgentProvider:e?.defaultUserAgentProvider??Me({serviceId:a.serviceId,clientVersion:$e.version}),maxAttempts:e?.maxAttempts??m(ve,e),region:e?.region??m(J,{...Z,...o}),requestHandler:De.create(e?.requestHandler??r),retryMode:e?.retryMode??m({...xe,default:async()=>(await r()).retryMode||Se},e),sha256:e?.sha256??ae.bind(null,"sha256"),streamCollector:e?.streamCollector??Ne,useDualstackEndpoint:e?.useDualstackEndpoint??m(M,o),useFipsEndpoint:e?.useFipsEndpoint??m(V,o),userAgentAppId:e?.userAgentAppId??m(Ve,o)}};var Pt=e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,a=e.credentials;return{setHttpAuthScheme(o){let E=t.findIndex(T=>T.schemeId===o.schemeId);E===-1?t.push(o):t.splice(E,1,o)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(o){r=o},httpAuthSchemeProvider(){return r},setCredentials(o){a=o},credentials(){return a}}},It=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});var Ct=(e,t)=>{let r=Object.assign(Le(e),Q(e),pe(e),Pt(e));return t.forEach(a=>a.configure(r)),Object.assign(e,je(r),W(r),ce(r),It(r))};var y=class extends L{config;constructor(...[t]){let r=At(t||{});super(r),this.initConfig=r;let a=Ke(r),o=Ue(a),E=_e(o),T=ee(E),Rt=T,yt=se(Rt),Ot=ze(yt),Tt=Ct(Ot,t?.extensions||[]);this.config=Tt,this.middlewareStack.use(j(this.config)),this.middlewareStack.use(Fe(this.config)),this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(ue(this.config)),this.middlewareStack.use(we(this.config)),this.middlewareStack.use(He(this.config)),this.middlewareStack.use(be(this.config)),this.middlewareStack.use(de(this.config,{httpAuthSchemeParametersProvider:Be,identityProviderConfigProvider:async kt=>new he({"aws.auth#sigv4":kt.credentials})})),this.middlewareStack.use(le(this.config))}destroy(){super.destroy()}};var O=class extends B.classBuilder().ep(Xe).m(function(t,r,a,o){return[ie(a,t.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(_t).build(){};var ar={CreateOAuth2TokenCommand:O},$=class extends y{};G(ar,$);var ko={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",SERVER_ERROR:"server_error",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"};export{B as $Command,x as AccessDeniedException,Jt as AccessDeniedException$,rr as AccessToken$,_t as CreateOAuth2Token$,O as CreateOAuth2TokenCommand,or as CreateOAuth2TokenRequest$,nr as CreateOAuth2TokenRequestBody$,sr as CreateOAuth2TokenResponse$,ir as CreateOAuth2TokenResponseBody$,A as InternalServerException,Zt as InternalServerException$,ko as OAuth2ErrorCode,$ as Signin,y as SigninClient,u as SigninServiceException,Yt as SigninServiceException$,P as TooManyRequestsError,er as TooManyRequestsError$,I as ValidationException,tr as ValidationException$,L as __Client,St as errorTypeRegistries};
@@ -0,0 +1 @@
1
+ import{a as Re}from"./chunk-RH2FFVSB.js";import{a as V,b as le,c as me,d as he,e as fe,f as Ee,g as Pe,h as Ce,i as Oe,m as we,n as be,o as Ne,p as $e,q as He,r as Fe,s as Me,t as Ge,u as Ke,v as Ve}from"./chunk-STX7THHW.js";import{g as ge,l as xe,o as Se,p as _e,q as ve,r as Ie,t as ye,u as Te,y as Ue,z as je}from"./chunk-VFREGXHN.js";import{d as Ae,e as De}from"./chunk-XB6R2VIU.js";import{b as f,c as M,d as G,e as Q,f as Z,g as ee,h as te,j as re,k as oe,n as ne,o as ie,p as se}from"./chunk-OIQB5F6Y.js";import"./chunk-JTXBZ2SU.js";import{a as ke}from"./chunk-P2WEIQRQ.js";import"./chunk-WJLTO7JW.js";import"./chunk-TW5BOTVX.js";import"./chunk-SPHQRDN5.js";import{d as j,e as N,f as K,g as q,h as z,i as L,k as B,l as Y,m as W,n as J,p as X}from"./chunk-FNDUJLS6.js";import{c as $,n as ce,o as ae,p as de,s as ue}from"./chunk-HGJYEXMU.js";import{w as pe}from"./chunk-W5TBFCWY.js";import"./chunk-IYWUY3VA.js";var qe=async(e,t,n)=>({operation:j(t).operation,region:await N(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function At(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function Dt(e){return{schemeId:"smithy.api#noAuth"}}var ze=e=>{let t=[];return e.operation==="CreateToken"?t.push(Dt(e)):t.push(At(e)),t},Le=e=>{let t=Oe(e);return Object.assign(t,{authSchemePreference:N(e.authSchemePreference??[])})};var Be=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}),Ye={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var nt="required";var a="argv";var We="isSet",x="booleanEquals",g="error",E="endpoint",h="tree",U="PartitionResult",H="getAttr",Je={[nt]:!1,type:"string"},Xe={[nt]:!0,default:!1,type:"boolean"},Qe={ref:"Endpoint"},it={fn:x,[a]:[{ref:"UseFIPS"},!0]},st={fn:x,[a]:[{ref:"UseDualStack"},!0]},c={},Ze={fn:H,[a]:[{ref:U},"supportsFIPS"]},pt={ref:U},et={fn:x,[a]:[!0,{fn:H,[a]:[pt,"supportsDualStack"]}]},tt=[it],rt=[st],ot=[{ref:"Region"}],Tt={version:"1.0",parameters:{Region:Je,UseDualStack:Xe,UseFIPS:Xe,Endpoint:Je},rules:[{conditions:[{fn:We,[a]:[Qe]}],rules:[{conditions:tt,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:g},{conditions:rt,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:g},{endpoint:{url:Qe,properties:c,headers:c},type:E}],type:h},{conditions:[{fn:We,[a]:ot}],rules:[{conditions:[{fn:"aws.partition",[a]:ot,assign:U}],rules:[{conditions:[it,st],rules:[{conditions:[{fn:x,[a]:[!0,Ze]},et],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:c,headers:c},type:E}],type:h},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:g}],type:h},{conditions:tt,rules:[{conditions:[{fn:x,[a]:[Ze,!0]}],rules:[{conditions:[{fn:"stringEquals",[a]:[{fn:H,[a]:[pt,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:c,headers:c},type:E},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:c,headers:c},type:E}],type:h},{error:"FIPS is enabled but this partition does not support FIPS",type:g}],type:h},{conditions:rt,rules:[{conditions:[et],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:c,headers:c},type:E}],type:h},{error:"DualStack is enabled but this partition does not support DualStack",type:g}],type:h},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:c,headers:c},type:E}],type:h}],type:h},{error:"Invalid Configuration: Missing Region",type:g}]},ct=Tt;var Rt=new re({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),at=(e,t={})=>Rt.get(e,()=>ne(ct,{endpointParams:e,logger:t.logger}));oe.aws=ge;var i=class e extends L{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var _=class e extends i{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.reason=t.reason,this.error_description=t.error_description}},v=class e extends i{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(t){super({name:"AuthorizationPendingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},I=class e extends i{name="ExpiredTokenException";$fault="client";error;error_description;constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},P=class e extends i{name="InternalServerException";$fault="server";error;error_description;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},C=class e extends i{name="InvalidClientException";$fault="client";error;error_description;constructor(t){super({name:"InvalidClientException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},O=class e extends i{name="InvalidGrantException";$fault="client";error;error_description;constructor(t){super({name:"InvalidGrantException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},y=class e extends i{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.reason=t.reason,this.error_description=t.error_description}},A=class e extends i{name="InvalidScopeException";$fault="client";error;error_description;constructor(t){super({name:"InvalidScopeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},D=class e extends i{name="SlowDownException";$fault="client";error;error_description;constructor(t){super({name:"SlowDownException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},T=class e extends i{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(t){super({name:"UnauthorizedClientException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},R=class e extends i{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(t){super({name:"UnsupportedGrantTypeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}};var kt="AccessDeniedException",wt="AuthorizationPendingException",bt="AccessToken",Nt="ClientSecret",$t="CreateToken",Ut="CreateTokenRequest",Ht="CreateTokenResponse",Ft="CodeVerifier",Mt="ExpiredTokenException",Gt="InvalidClientException",jt="InvalidGrantException",Kt="InvalidRequestException",Vt="InternalServerException",qt="InvalidScopeException",zt="IdToken",Lt="RefreshToken",Bt="SlowDownException",Yt="UnauthorizedClientException",Wt="UnsupportedGrantTypeException",Jt="accessToken",m="client",Xt="clientId",Qt="clientSecret",Zt="codeVerifier",er="code",tr="deviceCode",r="error",rr="expiresIn",u="error_description",or="grantType",nr="http",l="httpError",ir="idToken",dt="reason",ut="refreshToken",sr="redirectUri",lt="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",pr="scope",cr="server",ar="tokenType",o="com.amazonaws.ssooidc",mt=$.for(lt),dr=[-3,lt,"SSOOIDCServiceException",0,[],[]];mt.registerError(dr,i);var d=$.for(o),ur=[-3,o,kt,{[r]:m,[l]:400},[r,dt,u],[0,0,0]];d.registerError(ur,_);var lr=[-3,o,wt,{[r]:m,[l]:400},[r,u],[0,0]];d.registerError(lr,v);var mr=[-3,o,Mt,{[r]:m,[l]:400},[r,u],[0,0]];d.registerError(mr,I);var hr=[-3,o,Vt,{[r]:cr,[l]:500},[r,u],[0,0]];d.registerError(hr,P);var fr=[-3,o,Gt,{[r]:m,[l]:401},[r,u],[0,0]];d.registerError(fr,C);var gr=[-3,o,jt,{[r]:m,[l]:400},[r,u],[0,0]];d.registerError(gr,O);var Er=[-3,o,Kt,{[r]:m,[l]:400},[r,dt,u],[0,0,0]];d.registerError(Er,y);var xr=[-3,o,qt,{[r]:m,[l]:400},[r,u],[0,0]];d.registerError(xr,A);var Sr=[-3,o,Bt,{[r]:m,[l]:400},[r,u],[0,0]];d.registerError(Sr,D);var _r=[-3,o,Yt,{[r]:m,[l]:400},[r,u],[0,0]];d.registerError(_r,T);var vr=[-3,o,Wt,{[r]:m,[l]:400},[r,u],[0,0]];d.registerError(vr,R);var ht=[mt,d],Ir=[0,o,bt,8,0],Pr=[0,o,Nt,8,0],Cr=[0,o,Ft,8,0],Or=[0,o,zt,8,0],ft=[0,o,Lt,8,0],yr=[3,o,Ut,0,[Xt,Qt,or,tr,er,ut,pr,sr,Zt],[0,[()=>Pr,0],0,0,0,[()=>ft,0],64,0,[()=>Cr,0]],3],Ar=[3,o,Ht,0,[Jt,ar,rr,ut,ir],[[()=>Ir,0],0,1,[()=>ft,0],[()=>Or,0]]];var gt=[9,o,$t,{[nr]:["POST","/token",200]},()=>yr,()=>Ar];var Et=e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??ye,base64Encoder:e?.base64Encoder??Te,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??at,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ze,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Pe},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new fe}],logger:e?.logger??new X,protocol:e?.protocol??Re,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:ht,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??ue,utf8Decoder:e?.utf8Decoder??Ae,utf8Encoder:e?.utf8Encoder??De});var xt=e=>{Y(process.version);let t=te(e),n=()=>t().then(B),p=Et(e);Ee(process.version);let s={profile:e?.profile,logger:p.logger};return{...p,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??f(Ce,s),bodyLengthChecker:e?.bodyLengthChecker??je,defaultUserAgentProvider:e?.defaultUserAgentProvider??Me({serviceId:p.serviceId,clientVersion:Fe.version}),maxAttempts:e?.maxAttempts??f(Se,e),region:e?.region??f(Q,{...Z,...s}),requestHandler:ke.create(e?.requestHandler??n),retryMode:e?.retryMode??f({...ve,default:async()=>(await n()).retryMode||xe},e),sha256:e?.sha256??pe.bind(null,"sha256"),streamCollector:e?.streamCollector??we,useDualstackEndpoint:e?.useDualstackEndpoint??f(M,s),useFipsEndpoint:e?.useFipsEndpoint??f(G,s),userAgentAppId:e?.userAgentAppId??f(Ge,s)}};var St=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,p=e.credentials;return{setHttpAuthScheme(s){let S=t.findIndex(b=>b.schemeId===s.schemeId);S===-1?t.push(s):t.splice(S,1,s)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(s){n=s},httpAuthSchemeProvider(){return n},setCredentials(s){p=s},credentials(){return p}}},_t=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});var vt=(e,t)=>{let n=Object.assign(Ke(e),W(e),ce(e),St(e));return t.forEach(p=>p.configure(n)),Object.assign(e,Ve(n),J(n),ae(n),_t(n))};var k=class extends K{config;constructor(...[t]){let n=xt(t||{});super(n),this.initConfig=n;let p=Be(n),s=Ue(p),S=_e(s),b=ee(S),It=b,Pt=ie(It),Ct=Le(Pt),Ot=vt(Ct,t?.extensions||[]);this.config=Ot,this.middlewareStack.use(V(this.config)),this.middlewareStack.use(He(this.config)),this.middlewareStack.use(Ie(this.config)),this.middlewareStack.use(de(this.config)),this.middlewareStack.use(be(this.config)),this.middlewareStack.use(Ne(this.config)),this.middlewareStack.use($e(this.config)),this.middlewareStack.use(le(this.config,{httpAuthSchemeParametersProvider:qe,identityProviderConfigProvider:async yt=>new he({"aws.auth#sigv4":yt.credentials})})),this.middlewareStack.use(me(this.config))}destroy(){super.destroy()}};var w=class extends q.classBuilder().ep(Ye).m(function(t,n,p,s){return[se(p,t.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(gt).build(){};var Dr={CreateTokenCommand:w},F=class extends k{};z(Dr,F);var Xo={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},Qo={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"};export{q as $Command,_ as AccessDeniedException,ur as AccessDeniedException$,Xo as AccessDeniedExceptionReason,v as AuthorizationPendingException,lr as AuthorizationPendingException$,gt as CreateToken$,w as CreateTokenCommand,yr as CreateTokenRequest$,Ar as CreateTokenResponse$,I as ExpiredTokenException,mr as ExpiredTokenException$,P as InternalServerException,hr as InternalServerException$,C as InvalidClientException,fr as InvalidClientException$,O as InvalidGrantException,gr as InvalidGrantException$,y as InvalidRequestException,Er as InvalidRequestException$,Qo as InvalidRequestExceptionReason,A as InvalidScopeException,xr as InvalidScopeException$,F as SSOOIDC,k as SSOOIDCClient,i as SSOOIDCServiceException,dr as SSOOIDCServiceException$,D as SlowDownException,Sr as SlowDownException$,T as UnauthorizedClientException,_r as UnauthorizedClientException$,R as UnsupportedGrantTypeException,vr as UnsupportedGrantTypeException$,K as __Client,ht as errorTypeRegistries};
@@ -0,0 +1,5 @@
1
+ import{a as At,b as Gt,c as Dt,d as Xt,e as me,f as Qt,g as ye,h as nr,i as sr,j as ir,k as Ee,l as cr,m as ur,n as dr,o as hr,p as pr,q as mr,r as gr,s as yr,t as Er,u as wr,v as Sr}from"./chunk-STX7THHW.js";import{g as Yt,l as Jt,o as Zt,p as er,q as tr,r as rr,t as or,u as we,y as fr,z as br}from"./chunk-VFREGXHN.js";import{d as ar,e as be}from"./chunk-XB6R2VIU.js";import{b as M,c as Et,d as bt,e as he,f as pe,g as kt,h as Lt,j as Ot,k as Mt,n as $t,o as Ft,p as fe}from"./chunk-OIQB5F6Y.js";import"./chunk-JTXBZ2SU.js";import{a as lr}from"./chunk-P2WEIQRQ.js";import"./chunk-WJLTO7JW.js";import"./chunk-TW5BOTVX.js";import{a as ge}from"./chunk-SPHQRDN5.js";import{d as wt,e as je,f as St,g as de,h as _t,i as Ct,k as Nt,l as Tt,m as vt,n as It,o as Pt,p as Rt}from"./chunk-FNDUJLS6.js";import{a as xt,b as V,c as qe,d as We,e as ze,i as Ht,j as jt,k as qt,n as Wt,o as zt,p as Bt,s as Kt}from"./chunk-HGJYEXMU.js";import{A as Ut,a as gt,m as yt,w as Vt}from"./chunk-W5TBFCWY.js";import"./chunk-IYWUY3VA.js";var xr=async(r,e,t)=>({operation:wt(e).operation,region:await je(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Zn(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:r.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function es(r){return{schemeId:"smithy.api#noAuth"}}var Ar=r=>{let e=[];return r.operation==="AssumeRoleWithWebIdentity"?e.push(es(r)):e.push(Zn(r)),e},ts=r=>Object.assign(r,{stsClientCtor:F}),_r=r=>{let e=ts(r),t=sr(e);return Object.assign(t,{authSchemePreference:je(r.authSchemePreference??[])})};var Cr=r=>Object.assign(r,{useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,useGlobalEndpoint:r.useGlobalEndpoint??!1,defaultSigningName:"sts"}),Se={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 Nr=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",rs=Nr+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ns="["+Nr+"]["+rs+"]*",ss=new RegExp("^"+ns+"$");function xe(r,e){let t=[],n=e.exec(r);for(;n;){let s=[];s.startIndex=e.lastIndex-n[0].length;let i=n.length;for(let a=0;a<i;a++)s.push(n[a]);t.push(s),n=e.exec(r)}return t}var Be=function(r){let e=ss.exec(r);return!(e===null||typeof e>"u")};function Tr(r){return typeof r<"u"}var se=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],Ae=["__proto__","constructor","prototype"];var is={allowBooleanAttributes:!1,unpairedTags:[]};function kr(r,e){e=Object.assign({},is,e);let t=[],n=!1,s=!1;r[0]==="\uFEFF"&&(r=r.substr(1));for(let i=0;i<r.length;i++)if(r[i]==="<"&&r[i+1]==="?"){if(i+=2,i=Ir(r,i),i.err)return i}else if(r[i]==="<"){let a=i;if(i++,r[i]==="!"){i=Pr(r,i);continue}else{let o=!1;r[i]==="/"&&(o=!0,i++);let c="";for(;i<r.length&&r[i]!==">"&&r[i]!==" "&&r[i]!==" "&&r[i]!==`
2
+ `&&r[i]!=="\r";i++)c+=r[i];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),i--),!ps(c)){let d;return c.trim().length===0?d="Invalid space after '<'.":d="Tag '"+c+"' is an invalid name.",S("InvalidTag",d,C(r,i))}let u=cs(r,i);if(u===!1)return S("InvalidAttr","Attributes for '"+c+"' have open quote.",C(r,i));let l=u.value;if(i=u.index,l[l.length-1]==="/"){let d=i-l.length;l=l.substring(0,l.length-1);let h=Rr(l,e);if(h===!0)n=!0;else return S(h.err.code,h.err.msg,C(r,d+h.err.line))}else if(o)if(u.tagClosed){if(l.trim().length>0)return S("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",C(r,a));if(t.length===0)return S("InvalidTag","Closing tag '"+c+"' has not been opened.",C(r,a));{let d=t.pop();if(c!==d.tagName){let h=C(r,d.tagStartPos);return S("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+h.line+", col "+h.col+") instead of closing tag '"+c+"'.",C(r,a))}t.length==0&&(s=!0)}}else return S("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",C(r,i));else{let d=Rr(l,e);if(d!==!0)return S(d.err.code,d.err.msg,C(r,i-l.length+d.err.line));if(s===!0)return S("InvalidXml","Multiple possible root nodes found.",C(r,i));e.unpairedTags.indexOf(c)!==-1||t.push({tagName:c,tagStartPos:a}),n=!0}for(i++;i<r.length;i++)if(r[i]==="<")if(r[i+1]==="!"){i++,i=Pr(r,i);continue}else if(r[i+1]==="?"){if(i=Ir(r,++i),i.err)return i}else break;else if(r[i]==="&"){let d=ds(r,i);if(d==-1)return S("InvalidChar","char '&' is not expected.",C(r,i));i=d}else if(s===!0&&!vr(r[i]))return S("InvalidXml","Extra text at the end",C(r,i));r[i]==="<"&&i--}}else{if(vr(r[i]))continue;return S("InvalidChar","char '"+r[i]+"' is not expected.",C(r,i))}if(n){if(t.length==1)return S("InvalidTag","Unclosed tag '"+t[0].tagName+"'.",C(r,t[0].tagStartPos));if(t.length>0)return S("InvalidXml","Invalid '"+JSON.stringify(t.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return S("InvalidXml","Start tag expected.",1);return!0}function vr(r){return r===" "||r===" "||r===`
3
+ `||r==="\r"}function Ir(r,e){let t=e;for(;e<r.length;e++)if(r[e]=="?"||r[e]==" "){let n=r.substr(t,e-t);if(e>5&&n==="xml")return S("InvalidXml","XML declaration allowed only at the start of the document.",C(r,e));if(r[e]=="?"&&r[e+1]==">"){e++;break}else continue}return e}function Pr(r,e){if(r.length>e+5&&r[e+1]==="-"&&r[e+2]==="-"){for(e+=3;e<r.length;e++)if(r[e]==="-"&&r[e+1]==="-"&&r[e+2]===">"){e+=2;break}}else if(r.length>e+8&&r[e+1]==="D"&&r[e+2]==="O"&&r[e+3]==="C"&&r[e+4]==="T"&&r[e+5]==="Y"&&r[e+6]==="P"&&r[e+7]==="E"){let t=1;for(e+=8;e<r.length;e++)if(r[e]==="<")t++;else if(r[e]===">"&&(t--,t===0))break}else if(r.length>e+9&&r[e+1]==="["&&r[e+2]==="C"&&r[e+3]==="D"&&r[e+4]==="A"&&r[e+5]==="T"&&r[e+6]==="A"&&r[e+7]==="["){for(e+=8;e<r.length;e++)if(r[e]==="]"&&r[e+1]==="]"&&r[e+2]===">"){e+=2;break}}return e}var os='"',as="'";function cs(r,e){let t="",n="",s=!1;for(;e<r.length;e++){if(r[e]===os||r[e]===as)n===""?n=r[e]:n!==r[e]||(n="");else if(r[e]===">"&&n===""){s=!0;break}t+=r[e]}return n!==""?!1:{value:t,index:e,tagClosed:s}}var ls=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Rr(r,e){let t=xe(r,ls),n={};for(let s=0;s<t.length;s++){if(t[s][1].length===0)return S("InvalidAttr","Attribute '"+t[s][2]+"' has no space in starting.",ie(t[s]));if(t[s][3]!==void 0&&t[s][4]===void 0)return S("InvalidAttr","Attribute '"+t[s][2]+"' is without value.",ie(t[s]));if(t[s][3]===void 0&&!e.allowBooleanAttributes)return S("InvalidAttr","boolean attribute '"+t[s][2]+"' is not allowed.",ie(t[s]));let i=t[s][2];if(!hs(i))return S("InvalidAttr","Attribute '"+i+"' is an invalid name.",ie(t[s]));if(!Object.prototype.hasOwnProperty.call(n,i))n[i]=1;else return S("InvalidAttr","Attribute '"+i+"' is repeated.",ie(t[s]))}return!0}function us(r,e){let t=/\d/;for(r[e]==="x"&&(e++,t=/[\da-fA-F]/);e<r.length;e++){if(r[e]===";")return e;if(!r[e].match(t))break}return-1}function ds(r,e){if(e++,r[e]===";")return-1;if(r[e]==="#")return e++,us(r,e);let t=0;for(;e<r.length;e++,t++)if(!(r[e].match(/\w/)&&t<20)){if(r[e]===";")break;return-1}return e}function S(r,e,t){return{err:{code:r,msg:e,line:t.line||t,col:t.col}}}function hs(r){return Be(r)}function ps(r){return Be(r)}function C(r,e){let t=r.substring(0,e).split(/\r?\n/);return{line:t.length,col:t[t.length-1].length+1}}function ie(r){return r.startIndex+r[1].length}var Lr={amp:"&",AMP:"&",lt:"<",LT:"<",gt:">",GT:">",quot:'"',QUOT:'"',apos:"'",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",lsquor:"\u201A",rsquor:"\u2019",ldquor:"\u201E",bdquo:"\u201E",comma:",",period:".",colon:":",semi:";",excl:"!",quest:"?",num:"#",dollar:"$",percent:"%",amp:"&",ast:"*",commat:"@",lowbar:"_",verbar:"|",vert:"|",sol:"/",bsol:"\\",lbrace:"{",rbrace:"}",lbrack:"[",rbrack:"]",lpar:"(",rpar:")",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",COPY:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",REG:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",half:"\xBD",frac34:"\xBE",iquest:"\xBF",times:"\xD7",div:"\xF7",divide:"\xF7"},Or={Agrave:"\xC0",agrave:"\xE0",Aacute:"\xC1",aacute:"\xE1",Acirc:"\xC2",acirc:"\xE2",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",Aring:"\xC5",aring:"\xE5",AElig:"\xC6",aelig:"\xE6",Ccedil:"\xC7",ccedil:"\xE7",Egrave:"\xC8",egrave:"\xE8",Eacute:"\xC9",eacute:"\xE9",Ecirc:"\xCA",ecirc:"\xEA",Euml:"\xCB",euml:"\xEB",Igrave:"\xCC",igrave:"\xEC",Iacute:"\xCD",iacute:"\xED",Icirc:"\xCE",icirc:"\xEE",Iuml:"\xCF",iuml:"\xEF",ETH:"\xD0",eth:"\xF0",Ntilde:"\xD1",ntilde:"\xF1",Ograve:"\xD2",ograve:"\xF2",Oacute:"\xD3",oacute:"\xF3",Ocirc:"\xD4",ocirc:"\xF4",Otilde:"\xD5",otilde:"\xF5",Ouml:"\xD6",ouml:"\xF6",Oslash:"\xD8",oslash:"\xF8",Ugrave:"\xD9",ugrave:"\xF9",Uacute:"\xDA",uacute:"\xFA",Ucirc:"\xDB",ucirc:"\xFB",Uuml:"\xDC",uuml:"\xFC",Yacute:"\xDD",yacute:"\xFD",THORN:"\xDE",thorn:"\xFE",szlig:"\xDF",yuml:"\xFF",Yuml:"\u0178"},Mr={Amacr:"\u0100",amacr:"\u0101",Abreve:"\u0102",abreve:"\u0103",Aogon:"\u0104",aogon:"\u0105",Cacute:"\u0106",cacute:"\u0107",Ccirc:"\u0108",ccirc:"\u0109",Cdot:"\u010A",cdot:"\u010B",Ccaron:"\u010C",ccaron:"\u010D",Dcaron:"\u010E",dcaron:"\u010F",Dstrok:"\u0110",dstrok:"\u0111",Emacr:"\u0112",emacr:"\u0113",Ecaron:"\u011A",ecaron:"\u011B",Edot:"\u0116",edot:"\u0117",Eogon:"\u0118",eogon:"\u0119",Gcirc:"\u011C",gcirc:"\u011D",Gbreve:"\u011E",gbreve:"\u011F",Gdot:"\u0120",gdot:"\u0121",Gcedil:"\u0122",Hcirc:"\u0124",hcirc:"\u0125",Hstrok:"\u0126",hstrok:"\u0127",Itilde:"\u0128",itilde:"\u0129",Imacr:"\u012A",imacr:"\u012B",Iogon:"\u012E",iogon:"\u012F",Idot:"\u0130",IJlig:"\u0132",ijlig:"\u0133",Jcirc:"\u0134",jcirc:"\u0135",Kcedil:"\u0136",kcedil:"\u0137",kgreen:"\u0138",Lacute:"\u0139",lacute:"\u013A",Lcedil:"\u013B",lcedil:"\u013C",Lcaron:"\u013D",lcaron:"\u013E",Lmidot:"\u013F",lmidot:"\u0140",Lstrok:"\u0141",lstrok:"\u0142",Nacute:"\u0143",nacute:"\u0144",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ENG:"\u014A",eng:"\u014B",Omacr:"\u014C",omacr:"\u014D",Odblac:"\u0150",odblac:"\u0151",OElig:"\u0152",oelig:"\u0153",Racute:"\u0154",racute:"\u0155",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",Sacute:"\u015A",sacute:"\u015B",Scirc:"\u015C",scirc:"\u015D",Scedil:"\u015E",scedil:"\u015F",Scaron:"\u0160",scaron:"\u0161",Tcedil:"\u0162",tcedil:"\u0163",Tcaron:"\u0164",tcaron:"\u0165",Tstrok:"\u0166",tstrok:"\u0167",Utilde:"\u0168",utilde:"\u0169",Umacr:"\u016A",umacr:"\u016B",Ubreve:"\u016C",ubreve:"\u016D",Uring:"\u016E",uring:"\u016F",Udblac:"\u0170",udblac:"\u0171",Uogon:"\u0172",uogon:"\u0173",Wcirc:"\u0174",wcirc:"\u0175",Ycirc:"\u0176",ycirc:"\u0177",Zacute:"\u0179",zacute:"\u017A",Zdot:"\u017B",zdot:"\u017C",Zcaron:"\u017D",zcaron:"\u017E"},$r={Alpha:"\u0391",alpha:"\u03B1",Beta:"\u0392",beta:"\u03B2",Gamma:"\u0393",gamma:"\u03B3",Delta:"\u0394",delta:"\u03B4",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",varepsilon:"\u03F5",Zeta:"\u0396",zeta:"\u03B6",Eta:"\u0397",eta:"\u03B7",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",vartheta:"\u03D1",Iota:"\u0399",iota:"\u03B9",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",varkappa:"\u03F0",Lambda:"\u039B",lambda:"\u03BB",Mu:"\u039C",mu:"\u03BC",Nu:"\u039D",nu:"\u03BD",Xi:"\u039E",xi:"\u03BE",Omicron:"\u039F",omicron:"\u03BF",Pi:"\u03A0",pi:"\u03C0",piv:"\u03D6",varpi:"\u03D6",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",varrho:"\u03F1",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",varsigma:"\u03C2",Tau:"\u03A4",tau:"\u03C4",Upsilon:"\u03A5",upsilon:"\u03C5",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",varphi:"\u03D5",Chi:"\u03A7",chi:"\u03C7",Psi:"\u03A8",psi:"\u03C8",Omega:"\u03A9",omega:"\u03C9",ohm:"\u03A9",Gammad:"\u03DC",gammad:"\u03DD",digamma:"\u03DD"},Fr={Afr:"\u{1D504}",afr:"\u{1D51E}",Acy:"\u0410",acy:"\u0430",Bcy:"\u0411",bcy:"\u0431",Vcy:"\u0412",vcy:"\u0432",Gcy:"\u0413",gcy:"\u0433",Dcy:"\u0414",dcy:"\u0434",IEcy:"\u0415",iecy:"\u0435",IOcy:"\u0401",iocy:"\u0451",ZHcy:"\u0416",zhcy:"\u0436",Zcy:"\u0417",zcy:"\u0437",Icy:"\u0418",icy:"\u0438",Jcy:"\u0419",jcy:"\u0439",Kcy:"\u041A",kcy:"\u043A",Lcy:"\u041B",lcy:"\u043B",Mcy:"\u041C",mcy:"\u043C",Ncy:"\u041D",ncy:"\u043D",Ocy:"\u041E",ocy:"\u043E",Pcy:"\u041F",pcy:"\u043F",Rcy:"\u0420",rcy:"\u0440",Scy:"\u0421",scy:"\u0441",Tcy:"\u0422",tcy:"\u0442",Ucy:"\u0423",ucy:"\u0443",Fcy:"\u0424",fcy:"\u0444",KHcy:"\u0425",khcy:"\u0445",TScy:"\u0426",tscy:"\u0446",CHcy:"\u0427",chcy:"\u0447",SHcy:"\u0428",shcy:"\u0448",SHCHcy:"\u0429",shchcy:"\u0449",HARDcy:"\u042A",hardcy:"\u044A",Ycy:"\u042B",ycy:"\u044B",SOFTcy:"\u042C",softcy:"\u044C",Ecy:"\u042D",ecy:"\u044D",YUcy:"\u042E",yucy:"\u044E",YAcy:"\u042F",yacy:"\u044F",DJcy:"\u0402",djcy:"\u0452",GJcy:"\u0403",gjcy:"\u0453",Jukcy:"\u0404",jukcy:"\u0454",DScy:"\u0405",dscy:"\u0455",Iukcy:"\u0406",iukcy:"\u0456",YIcy:"\u0407",yicy:"\u0457",Jsercy:"\u0408",jsercy:"\u0458",LJcy:"\u0409",ljcy:"\u0459",NJcy:"\u040A",njcy:"\u045A",TSHcy:"\u040B",tshcy:"\u045B",KJcy:"\u040C",kjcy:"\u045C",Ubrcy:"\u040E",ubrcy:"\u045E",DZcy:"\u040F",dzcy:"\u045F"},Vr={plus:"+",minus:"\u2212",mnplus:"\u2213",mp:"\u2213",pm:"\xB1",times:"\xD7",div:"\xF7",divide:"\xF7",sdot:"\u22C5",star:"\u2606",starf:"\u2605",bigstar:"\u2605",lowast:"\u2217",ast:"*",midast:"*",compfn:"\u2218",smallcircle:"\u2218",bullet:"\u2022",bull:"\u2022",nbsp:"\xA0",hellip:"\u2026",mldr:"\u2026",prime:"\u2032",Prime:"\u2033",tprime:"\u2034",bprime:"\u2035",backprime:"\u2035",minus:"\u2212",minusd:"\u2238",dotminus:"\u2238",plusdo:"\u2214",dotplus:"\u2214",plusmn:"\xB1",minusplus:"\u2213",mnplus:"\u2213",mp:"\u2213",setminus:"\u2216",smallsetminus:"\u2216",Backslash:"\u2216",setmn:"\u2216",ssetmn:"\u2216",lowbar:"_",verbar:"|",vert:"|",VerticalLine:"|",colon:":",Colon:"\u2237",Proportion:"\u2237",ratio:"\u2236",equals:"=",ne:"\u2260",nequiv:"\u2262",equiv:"\u2261",Congruent:"\u2261",sim:"\u223C",thicksim:"\u223C",thksim:"\u223C",sime:"\u2243",simeq:"\u2243",TildeEqual:"\u2243",asymp:"\u2248",approx:"\u2248",thickapprox:"\u2248",thkap:"\u2248",TildeTilde:"\u2248",ncong:"\u2247",cong:"\u2245",TildeFullEqual:"\u2245",asympeq:"\u224D",CupCap:"\u224D",bump:"\u224E",Bumpeq:"\u224E",HumpDownHump:"\u224E",bumpe:"\u224F",bumpeq:"\u224F",HumpEqual:"\u224F",dotminus:"\u2238",minusd:"\u2238",plusdo:"\u2214",dotplus:"\u2214",le:"\u2264",LessEqual:"\u2264",ge:"\u2265",GreaterEqual:"\u2265",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",greater:">",less:"<"},Ur={alefsym:"\u2135",aleph:"\u2135",beth:"\u2136",gimel:"\u2137",daleth:"\u2138",forall:"\u2200",ForAll:"\u2200",part:"\u2202",PartialD:"\u2202",exist:"\u2203",Exists:"\u2203",nexist:"\u2204",nexists:"\u2204",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",varnothing:"\u2205",nabla:"\u2207",Del:"\u2207",isin:"\u2208",isinv:"\u2208",in:"\u2208",Element:"\u2208",notin:"\u2209",notinva:"\u2209",ni:"\u220B",niv:"\u220B",SuchThat:"\u220B",ReverseElement:"\u220B",notni:"\u220C",notniva:"\u220C",prod:"\u220F",Product:"\u220F",coprod:"\u2210",Coproduct:"\u2210",sum:"\u2211",Sum:"\u2211",minus:"\u2212",mp:"\u2213",plusdo:"\u2214",dotplus:"\u2214",setminus:"\u2216",lowast:"\u2217",radic:"\u221A",Sqrt:"\u221A",prop:"\u221D",propto:"\u221D",Proportional:"\u221D",varpropto:"\u221D",infin:"\u221E",infintie:"\u29DD",ang:"\u2220",angle:"\u2220",angmsd:"\u2221",measuredangle:"\u2221",angsph:"\u2222",mid:"\u2223",VerticalBar:"\u2223",nmid:"\u2224",nsmid:"\u2224",npar:"\u2226",parallel:"\u2225",spar:"\u2225",nparallel:"\u2226",nspar:"\u2226",and:"\u2227",wedge:"\u2227",or:"\u2228",vee:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",Integral:"\u222B",conint:"\u222E",ContourIntegral:"\u222E",Conint:"\u222F",DoubleContourIntegral:"\u222F",Cconint:"\u2230",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",becaus:"\u2235",because:"\u2235",Because:"\u2235",ratio:"\u2236",Proportion:"\u2237",minusd:"\u2238",dotminus:"\u2238",mDDot:"\u223A",homtht:"\u223B",sim:"\u223C",bsimg:"\u223D",backsim:"\u223D",ac:"\u223E",mstpos:"\u223E",acd:"\u223F",VerticalTilde:"\u2240",wr:"\u2240",wreath:"\u2240",nsime:"\u2244",nsimeq:"\u2244",nsimeq:"\u2244",ncong:"\u2247",simne:"\u2246",ncongdot:"\u2A6D\u0338",ngsim:"\u2275",nsim:"\u2241",napprox:"\u2249",nap:"\u2249",ngeq:"\u2271",nge:"\u2271",nleq:"\u2270",nle:"\u2270",ngtr:"\u226F",ngt:"\u226F",nless:"\u226E",nlt:"\u226E",nprec:"\u2280",npr:"\u2280",nsucc:"\u2281",nsc:"\u2281"},Hr={larr:"\u2190",leftarrow:"\u2190",LeftArrow:"\u2190",uarr:"\u2191",uparrow:"\u2191",UpArrow:"\u2191",rarr:"\u2192",rightarrow:"\u2192",RightArrow:"\u2192",darr:"\u2193",downarrow:"\u2193",DownArrow:"\u2193",harr:"\u2194",leftrightarrow:"\u2194",LeftRightArrow:"\u2194",varr:"\u2195",updownarrow:"\u2195",UpDownArrow:"\u2195",nwarr:"\u2196",nwarrow:"\u2196",UpperLeftArrow:"\u2196",nearr:"\u2197",nearrow:"\u2197",UpperRightArrow:"\u2197",searr:"\u2198",searrow:"\u2198",LowerRightArrow:"\u2198",swarr:"\u2199",swarrow:"\u2199",LowerLeftArrow:"\u2199",lArr:"\u21D0",Leftarrow:"\u21D0",uArr:"\u21D1",Uparrow:"\u21D1",rArr:"\u21D2",Rightarrow:"\u21D2",dArr:"\u21D3",Downarrow:"\u21D3",hArr:"\u21D4",Leftrightarrow:"\u21D4",iff:"\u21D4",vArr:"\u21D5",Updownarrow:"\u21D5",lAarr:"\u21DA",Lleftarrow:"\u21DA",rAarr:"\u21DB",Rrightarrow:"\u21DB",lrarr:"\u21C6",leftrightarrows:"\u21C6",rlarr:"\u21C4",rightleftarrows:"\u21C4",lrhar:"\u21CB",leftrightharpoons:"\u21CB",ReverseEquilibrium:"\u21CB",rlhar:"\u21CC",rightleftharpoons:"\u21CC",Equilibrium:"\u21CC",udarr:"\u21C5",UpArrowDownArrow:"\u21C5",duarr:"\u21F5",DownArrowUpArrow:"\u21F5",llarr:"\u21C7",leftleftarrows:"\u21C7",rrarr:"\u21C9",rightrightarrows:"\u21C9",ddarr:"\u21CA",downdownarrows:"\u21CA",har:"\u21BD",lhard:"\u21BD",leftharpoondown:"\u21BD",lharu:"\u21BC",leftharpoonup:"\u21BC",rhard:"\u21C1",rightharpoondown:"\u21C1",rharu:"\u21C0",rightharpoonup:"\u21C0",lsh:"\u21B0",Lsh:"\u21B0",rsh:"\u21B1",Rsh:"\u21B1",ldsh:"\u21B2",rdsh:"\u21B3",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",mapstoleft:"\u21A4",mapstoup:"\u21A5",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",crarr:"\u21B5",nwarrow:"\u2196",nearrow:"\u2197",searrow:"\u2198",swarrow:"\u2199",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nrightarrow:"\u219B",nrarr:"\u219B",larrtl:"\u21A2",rarrtl:"\u21A3",leftarrowtail:"\u21A2",rightarrowtail:"\u21A3",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Larr:"\u219E",Rarr:"\u21A0",larrhk:"\u21A9",rarrhk:"\u21AA",larrlp:"\u21AB",looparrowleft:"\u21AB",rarrlp:"\u21AC",looparrowright:"\u21AC",harrw:"\u21AD",leftrightsquigarrow:"\u21AD",nrarrw:"\u219D\u0338",rarrw:"\u219D",rightsquigarrow:"\u219D",larrbfs:"\u291F",rarrbfs:"\u2920",nvHarr:"\u2904",nvlArr:"\u2902",nvrArr:"\u2903",larrfs:"\u291D",rarrfs:"\u291E",Map:"\u2905",larrsim:"\u2973",rarrsim:"\u2974",harrcir:"\u2948",Uarrocir:"\u2949",lurdshar:"\u294A",ldrdhar:"\u2967",ldrushar:"\u294B",rdldhar:"\u2969",lrhard:"\u296D",rlhar:"\u21CC",uharr:"\u21BE",uharl:"\u21BF",dharr:"\u21C2",dharl:"\u21C3",Uarr:"\u219F",Darr:"\u21A1",zigrarr:"\u21DD",nwArr:"\u21D6",neArr:"\u21D7",seArr:"\u21D8",swArr:"\u21D9",nharr:"\u21AE",nhArr:"\u21CE",nlarr:"\u219A",nlArr:"\u21CD",nrarr:"\u219B",nrArr:"\u21CF",larrb:"\u21E4",LeftArrowBar:"\u21E4",rarrb:"\u21E5",RightArrowBar:"\u21E5"},jr={square:"\u25A1",Square:"\u25A1",squ:"\u25A1",squf:"\u25AA",squarf:"\u25AA",blacksquar:"\u25AA",blacksquare:"\u25AA",FilledVerySmallSquare:"\u25AA",blk34:"\u2593",blk12:"\u2592",blk14:"\u2591",block:"\u2588",srect:"\u25AD",rect:"\u25AD",sdot:"\u22C5",sdotb:"\u22A1",dotsquare:"\u22A1",triangle:"\u25B5",tri:"\u25B5",trine:"\u25B5",utri:"\u25B5",triangledown:"\u25BF",dtri:"\u25BF",tridown:"\u25BF",triangleleft:"\u25C3",ltri:"\u25C3",triangleright:"\u25B9",rtri:"\u25B9",blacktriangle:"\u25B4",utrif:"\u25B4",blacktriangledown:"\u25BE",dtrif:"\u25BE",blacktriangleleft:"\u25C2",ltrif:"\u25C2",blacktriangleright:"\u25B8",rtrif:"\u25B8",loz:"\u25CA",lozenge:"\u25CA",blacklozenge:"\u29EB",lozf:"\u29EB",bigcirc:"\u25EF",xcirc:"\u25EF",circ:"\u02C6",Circle:"\u25CB",cir:"\u25CB",o:"\u25CB",bullet:"\u2022",bull:"\u2022",hellip:"\u2026",mldr:"\u2026",nldr:"\u2025",boxh:"\u2500",HorizontalLine:"\u2500",boxv:"\u2502",boxdr:"\u250C",boxdl:"\u2510",boxur:"\u2514",boxul:"\u2518",boxvr:"\u251C",boxvl:"\u2524",boxhd:"\u252C",boxhu:"\u2534",boxvh:"\u253C",boxH:"\u2550",boxV:"\u2551",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxDl:"\u2555",boxdL:"\u2556",boxDL:"\u2557",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxUl:"\u255C",boxuL:"\u255B",boxUL:"\u255D",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",boxVl:"\u2562",boxvL:"\u2561",boxVL:"\u2563",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C"},qr={excl:"!",iexcl:"\xA1",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",nbsp:"\xA0",comma:",",period:".",colon:":",semi:";",vert:"|",Verbar:"\u2016",verbar:"|",dblac:"\u02DD",circ:"\u02C6",caron:"\u02C7",breve:"\u02D8",dot:"\u02D9",ring:"\u02DA",ogon:"\u02DB",tilde:"\u02DC",DiacriticalGrave:"`",DiacriticalAcute:"\xB4",DiacriticalTilde:"\u02DC",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",grave:"`",acute:"\xB4"},_e={cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",euro:"\u20AC",dollar:"$",euro:"\u20AC",fnof:"\u0192",inr:"\u20B9",af:"\u060B",birr:"\u1265\u122D",peso:"\u20B1",rub:"\u20BD",won:"\u20A9",yuan:"\xA5",cedil:"\xB8"},Wr={frac12:"\xBD",half:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044"},zr={trade:"\u2122",TRADE:"\u2122",telrec:"\u2315",target:"\u2316",ulcorn:"\u231C",ulcorner:"\u231C",urcorn:"\u231D",urcorner:"\u231D",dlcorn:"\u231E",llcorner:"\u231E",drcorn:"\u231F",lrcorner:"\u231F",intercal:"\u22BA",intcal:"\u22BA",oplus:"\u2295",CirclePlus:"\u2295",ominus:"\u2296",CircleMinus:"\u2296",otimes:"\u2297",CircleTimes:"\u2297",osol:"\u2298",odot:"\u2299",CircleDot:"\u2299",oast:"\u229B",circledast:"\u229B",odash:"\u229D",circleddash:"\u229D",ocirc:"\u229A",circledcirc:"\u229A",boxplus:"\u229E",plusb:"\u229E",boxminus:"\u229F",minusb:"\u229F",boxtimes:"\u22A0",timesb:"\u22A0",boxdot:"\u22A1",sdotb:"\u22A1",veebar:"\u22BB",vee:"\u2228",barvee:"\u22BD",and:"\u2227",wedge:"\u2227",Cap:"\u22D2",Cup:"\u22D3",Fork:"\u22D4",pitchfork:"\u22D4",epar:"\u22D5",ltlarr:"\u2976",nvap:"\u224D\u20D2",nvsim:"\u223C\u20D2",nvge:"\u2265\u20D2",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvgt:">\u20D2",nvltrie:"\u22B4\u20D2",nvrtrie:"\u22B5\u20D2",Vdash:"\u22A9",dashv:"\u22A3",vDash:"\u22A8",Vdash:"\u22A9",Vvdash:"\u22AA",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF"},fs={...Lr,...Or,...Mr,...$r,...Fr,...Vr,...Ur,...Hr,...jr,...qr,..._e,...Wr,...zr},oe={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},Ke={nbsp:"\xA0",copy:"\xA9",reg:"\xAE",trade:"\u2122",mdash:"\u2014",ndash:"\u2013",hellip:"\u2026",laquo:"\xAB",raquo:"\xBB",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",bull:"\u2022",para:"\xB6",sect:"\xA7",deg:"\xB0",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE"};var ms=new Set("!?\\\\/[]$%{}^&*()<>|+");function Br(r){if(r[0]==="#")throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${r}"`);for(let e of r)if(ms.has(e))throw new Error(`[EntityReplacer] Invalid character '${e}' in entity name: "${r}"`);return r}function Ge(...r){let e=Object.create(null);for(let t of r)if(t)for(let n of Object.keys(t)){let s=t[n];if(typeof s=="string")e[n]=s;else if(s&&typeof s=="object"&&s.val!==void 0){let i=s.val;typeof i=="string"&&(e[n]=i)}}return e}var j="external",Ce="base",De="all";function gs(r){return!r||r===j?new Set([j]):r===De?new Set([De]):r===Ce?new Set([Ce]):Array.isArray(r)?new Set(r):new Set([j])}var v=Object.freeze({allow:0,leave:1,remove:2,throw:3}),ys=new Set([9,10,13]);function Es(r){if(!r)return{xmlVersion:1,onLevel:v.allow,nullLevel:v.remove};let e=r.xmlVersion===1.1?1.1:1,t=v[r.onNCR]??v.allow,n=v[r.nullNCR]??v.remove,s=Math.max(n,v.remove);return{xmlVersion:e,onLevel:t,nullLevel:s}}var Y=class{constructor(e={}){this._limit=e.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof e.postCheck=="function"?e.postCheck:n=>n,this._limitTiers=gs(this._limit.applyLimitsTo??j),this._numericAllowed=e.numericAllowed??!0,this._baseMap=Ge(oe,e.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(e.remove&&Array.isArray(e.remove)?e.remove:[]),this._leaveSet=new Set(e.leave&&Array.isArray(e.leave)?e.leave:[]);let t=Es(e.ncr);this._ncrXmlVersion=t.xmlVersion,this._ncrOnLevel=t.onLevel,this._ncrNullLevel=t.nullLevel}setExternalEntities(e){if(e)for(let t of Object.keys(e))Br(t);this._externalMap=Ge(e)}addExternalEntity(e,t){Br(e),typeof t=="string"&&t.indexOf("&")===-1&&(this._externalMap[e]=t)}addInputEntities(e){this._totalExpansions=0,this._expandedLength=0,this._inputMap=Ge(e)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(e){this._ncrXmlVersion=e===1.1?1.1:1}decode(e){if(typeof e!="string"||e.length===0)return e;let t=e,n=[],s=e.length,i=0,a=0,o=this._maxTotalExpansions>0,c=this._maxExpandedLength>0,u=o||c;for(;a<s;){if(e.charCodeAt(a)!==38){a++;continue}let d=a+1;for(;d<s&&e.charCodeAt(d)!==59&&d-a<=32;)d++;if(d>=s||e.charCodeAt(d)!==59){a++;continue}let h=e.slice(a+1,d);if(h.length===0){a++;continue}let p,g;if(this._removeSet.has(h))p="",g===void 0&&(g=j);else if(this._leaveSet.has(h)){a++;continue}else if(h.charCodeAt(0)===35){let f=this._resolveNCR(h);if(f===void 0){a++;continue}p=f,g=Ce}else{let f=this._resolveName(h);p=f?.value,g=f?.tier}if(p===void 0){a++;continue}if(a>i&&n.push(e.slice(i,a)),n.push(p),i=d+1,a=i,u&&this._tierCounts(g)){if(o&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(c){let f=p.length-(h.length+2);if(f>0&&(this._expandedLength+=f,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}i<s&&n.push(e.slice(i));let l=n.length===0?e:n.join("");return this._postCheck(l,t)}_tierCounts(e){return this._limitTiers.has(De)?!0:this._limitTiers.has(e)}_resolveName(e){if(e in this._inputMap)return{value:this._inputMap[e],tier:j};if(e in this._externalMap)return{value:this._externalMap[e],tier:j};if(e in this._baseMap)return{value:this._baseMap[e],tier:Ce}}_classifyNCR(e){return e===0?this._ncrNullLevel:e>=55296&&e<=57343||this._ncrXmlVersion===1&&e>=1&&e<=31&&!ys.has(e)?v.remove:-1}_applyNCRAction(e,t,n){switch(e){case v.allow:return String.fromCodePoint(n);case v.remove:return"";case v.leave:return;case v.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${t}; (U+${n.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(n)}}_resolveNCR(e){let t=e.charCodeAt(1),n;if(t===120||t===88?n=parseInt(e.slice(2),16):n=parseInt(e.slice(1),10),Number.isNaN(n)||n<0||n>1114111)return;let s=this._classifyNCR(n);if(!this._numericAllowed&&s<v.remove)return;let i=s===-1?this._ncrOnLevel:Math.max(this._ncrOnLevel,s);return this._applyNCRAction(i,e,n)}};var Kr=r=>se.includes(r)?"__"+r:r,bs={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(r,e){return e},attributeValueProcessor:function(r,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(r,e,t){return r},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:Kr};function ws(r,e){if(typeof r!="string")return;let t=r.toLowerCase();if(se.some(n=>t===n.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${r}" is a reserved JavaScript keyword that could cause prototype pollution`);if(Ae.some(n=>t===n.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${r}" is a reserved JavaScript keyword that could cause prototype pollution`)}function Gr(r,e){return typeof r=="boolean"?{enabled:r,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:"all"}:typeof r=="object"&&r!==null?{enabled:r.enabled!==!1,maxEntitySize:Math.max(1,r.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,r.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,r.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,r.maxExpandedLength??1e5),maxEntityCount:Math.max(1,r.maxEntityCount??1e3),allowedTags:r.allowedTags??null,tagFilter:r.tagFilter??null,appliesTo:r.appliesTo??"all"}:Gr(!0)}var Dr=function(r){let e=Object.assign({},bs,r),t=[{value:e.attributeNamePrefix,name:"attributeNamePrefix"},{value:e.attributesGroupName,name:"attributesGroupName"},{value:e.textNodeName,name:"textNodeName"},{value:e.cdataPropName,name:"cdataPropName"},{value:e.commentPropName,name:"commentPropName"}];for(let{value:n,name:s}of t)n&&ws(n,s);return e.onDangerousProperty===null&&(e.onDangerousProperty=Kr),e.processEntities=Gr(e.processEntities,e.htmlEntities),e.unpairedTagsSet=new Set(e.unpairedTags),e.stopNodes&&Array.isArray(e.stopNodes)&&(e.stopNodes=e.stopNodes.map(n=>typeof n=="string"&&n.startsWith("*.")?".."+n.substring(2):n)),e};var Ne;typeof Symbol!="function"?Ne="@@xmlMetadata":Ne=Symbol("XML Node Metadata");var I=class{constructor(e){this.tagname=e,this.child=[],this[":@"]=Object.create(null)}add(e,t){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e,t){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),t!==void 0&&(this.child[this.child.length-1][Ne]={startIndex:t})}static getMetaDataSymbol(){return Ne}};var Xr=":A-Za-z_\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u0486\u0488-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",Ss=Xr+"\\-\\.\\d\xB7\u0300-\u036F\u203F-\u2040",Yr=":A-Za-z_\xC0-\u02FF\u0370-\u037D\u037F-\u0486\u0488-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",xs=Yr+"\\-\\.\\d\xB7\u0300-\u036F\u0487\u203F-\u2040",Qr=(r,e,t="")=>{let n=r.replace(":",""),s=e.replace(":",""),i=`[${n}][${s}]*`;return{name:new RegExp(`^[${r}][${e}]*$`,t),ncName:new RegExp(`^${i}$`,t),qName:new RegExp(`^${i}(?::${i})?$`,t),nmToken:new RegExp(`^[${e}]+$`,t),nmTokens:new RegExp(`^[${e}]+(?:\\s+[${e}]+)*$`,t)}},As=Qr(Xr,Ss),_s=Qr(Yr,xs,"u"),Cs=(r="1.0")=>r==="1.1"?_s:As;var Xe=(r,{xmlVersion:e="1.0"}={})=>Cs(e).qName.test(r);var ce=class{constructor(e,t){this.suppressValidationErr=!e,this.options=e,this.xmlVersion=t||1}setXmlVersion(e=1){this.xmlVersion=e}readDocType(e,t){let n=Object.create(null),s=0;if(e[t+3]==="O"&&e[t+4]==="C"&&e[t+5]==="T"&&e[t+6]==="Y"&&e[t+7]==="P"&&e[t+8]==="E"){t=t+9;let i=1,a=!1,o=!1,c="";for(;t<e.length;t++)if(e[t]==="<"&&!o){if(a&&q(e,"!ENTITY",t)){t+=7;let u,l;if([u,l,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),l.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&s>=this.options.maxEntityCount)throw new Error(`Entity count (${s+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);n[u]=l,s++}}else if(a&&q(e,"!ELEMENT",t)){t+=8;let{index:u}=this.readElementExp(e,t+1);t=u}else if(a&&q(e,"!ATTLIST",t))t+=8;else if(a&&q(e,"!NOTATION",t)){t+=9;let{index:u}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=u}else if(q(e,"!--",t))o=!0;else throw new Error("Invalid DOCTYPE");i++,c=""}else if(e[t]===">"){if(o?e[t-1]==="-"&&e[t-2]==="-"&&(o=!1,i--):i--,i===0)break}else e[t]==="["?a=!0:c+=e[t];if(i!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:n,i:t}}readEntityExp(e,t){t=P(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t])&&e[t]!=='"'&&e[t]!=="'";)t++;let s=e.substring(n,t);if(ae(s,{xmlVersion:this.xmlVersion}),t=P(e,t),!this.suppressValidationErr){if(e.substring(t,t+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(e[t]==="%")throw new Error("Parameter entities are not supported")}let i="";if([t,i]=this.readIdentifierVal(e,t,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize!=null&&i.length>this.options.maxEntitySize)throw new Error(`Entity "${s}" size (${i.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return t--,[s,i,t]}readNotationExp(e,t){t=P(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let s=e.substring(n,t);!this.suppressValidationErr&&ae(s,{xmlVersion:this.xmlVersion}),t=P(e,t);let i=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&i!=="SYSTEM"&&i!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);t+=i.length,t=P(e,t);let a=null,o=null;if(i==="PUBLIC")[t,a]=this.readIdentifierVal(e,t,"publicIdentifier"),t=P(e,t),(e[t]==='"'||e[t]==="'")&&([t,o]=this.readIdentifierVal(e,t,"systemIdentifier"));else if(i==="SYSTEM"&&([t,o]=this.readIdentifierVal(e,t,"systemIdentifier"),!this.suppressValidationErr&&!o))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:s,publicIdentifier:a,systemIdentifier:o,index:--t}}readIdentifierVal(e,t,n){let s="",i=e[t];if(i!=='"'&&i!=="'")throw new Error(`Expected quoted string, found "${i}"`);t++;let a=t;for(;t<e.length&&e[t]!==i;)t++;if(s=e.substring(a,t),e[t]!==i)throw new Error(`Unterminated ${n} value`);return t++,[t,s]}readElementExp(e,t){t=P(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let s=e.substring(n,t);if(!this.suppressValidationErr&&!Xe(s,{xmlVersion:this.xmlVersion}))throw new Error(`Invalid element name: "${s}"`);t=P(e,t);let i="";if(e[t]==="E"&&q(e,"MPTY",t))t+=4;else if(e[t]==="A"&&q(e,"NY",t))t+=2;else if(e[t]==="("){t++;let a=t;for(;t<e.length&&e[t]!==")";)t++;if(i=e.substring(a,t),e[t]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:s,contentModel:i.trim(),index:t}}readAttlistExp(e,t){t=P(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let s=e.substring(n,t);for(ae(s,{xmlVersion:this.xmlVersion}),t=P(e,t),n=t;t<e.length&&!/\s/.test(e[t]);)t++;let i=e.substring(n,t);if(!ae(i,{xmlVersion:this.xmlVersion}))throw new Error(`Invalid attribute name: "${i}"`);t=P(e,t);let a="";if(e.substring(t,t+8).toUpperCase()==="NOTATION"){if(a="NOTATION",t+=8,t=P(e,t),e[t]!=="(")throw new Error(`Expected '(', found "${e[t]}"`);t++;let c=[];for(;t<e.length&&e[t]!==")";){let u=t;for(;t<e.length&&e[t]!=="|"&&e[t]!==")";)t++;let l=e.substring(u,t);if(l=l.trim(),!ae(l,{xmlVersion:this.xmlVersion}))throw new Error(`Invalid notation name: "${l}"`);c.push(l),e[t]==="|"&&(t++,t=P(e,t))}if(e[t]!==")")throw new Error("Unterminated list of notations");t++,a+=" ("+c.join("|")+")"}else{let c=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;a+=e.substring(c,t);let u=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!u.includes(a.toUpperCase()))throw new Error(`Invalid attribute type: "${a}"`)}t=P(e,t);let o="";return e.substring(t,t+8).toUpperCase()==="#REQUIRED"?(o="#REQUIRED",t+=8):e.substring(t,t+7).toUpperCase()==="#IMPLIED"?(o="#IMPLIED",t+=7):[t,o]=this.readIdentifierVal(e,t,"ATTLIST"),{elementName:s,attributeName:i,attributeType:a,defaultValue:o,index:t}}},P=(r,e)=>{for(;e<r.length&&/\s/.test(r[e]);)e++;return e};function q(r,e,t){for(let n=0;n<e.length;n++)if(e[n]!==r[t+n+1])return!1;return!0}function ae(r,e){if(Xe(r,{xmlVersion:e}))return r;throw new Error(`Invalid entity name ${r}`)}var Ns=/^[-+]?0x[a-fA-F0-9]+$/,Ts=/^0b[01]+$/,vs=/^0o[0-7]+$/,Is=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Ps={hex:!0,binary:!1,octal:!1,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"};function Qe(r,e={}){if(e=Object.assign({},Ps,e),!r||typeof r!="string")return r;let t=r.trim();if(t.length===0)return r;if(e.skipLike!==void 0&&e.skipLike.test(t))return r;if(t==="0")return 0;if(e.hex&&Ns.test(t))return Ye(t,16);if(e.binary&&Ts.test(t))return Ye(t,2);if(e.octal&&vs.test(t))return Ye(t,8);if(isFinite(t)){if(t.includes("e")||t.includes("E"))return ks(r,t,e);{let n=Is.exec(t);if(n){let s=n[1]||"",i=n[2],a=Ls(n[3]),o=s?r[i.length+1]===".":r[i.length]===".";if(!e.leadingZeros&&(i.length>1||i.length===1&&!o))return r;{let c=Number(t),u=String(c);if(c===0)return c;if(u.search(/[eE]/)!==-1)return e.eNotation?c:r;if(t.indexOf(".")!==-1)return u==="0"||u===a||u===`${s}${a}`?c:r;let l=i?a:t;return i?l===u||s+l===u?c:r:l===u||l===s+u?c:r}}else return r}}else return Os(r,Number(t),e)}var Rs=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function ks(r,e,t){if(!t.eNotation)return r;let n=e.match(Rs);if(n){let s=n[1]||"",i=n[3].indexOf("e")===-1?"E":"e",a=n[2],o=s?r[a.length+1]===i:r[a.length]===i;return a.length>1&&o?r:a.length===1&&(n[3].startsWith(`.${i}`)||n[3][0]===i)?Number(e):a.length>0?t.leadingZeros&&!o?(e=(n[1]||"")+n[3],Number(e)):r:Number(e)}else return r}function Ls(r){return r&&r.indexOf(".")!==-1&&(r=r.replace(/0+$/,""),r==="."?r="0":r[0]==="."?r="0"+r:r[r.length-1]==="."&&(r=r.substring(0,r.length-1))),r}function Ye(r,e){let t=r.trim();if((e===2||e===8)&&(r=t.substring(2)),parseInt)return parseInt(r,e);if(Number.parseInt)return Number.parseInt(r,e);if(window&&window.parseInt)return window.parseInt(r,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Os(r,e,t){let n=e===1/0;switch(t.infinity.toLowerCase()){case"null":return null;case"infinity":return e;case"string":return n?"Infinity":"-Infinity";default:return r}}function Je(r){return typeof r=="function"?r:Array.isArray(r)?e=>{for(let t of r)if(typeof t=="string"&&e===t||t instanceof RegExp&&t.test(e))return!0}:()=>!1}var W=class{constructor(e,t={},n){this.pattern=e,this.separator=t.separator||".",this.segments=this._parse(e),this.data=n,this._hasDeepWildcard=this.segments.some(s=>s.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(s=>s.attrName!==void 0),this._hasPositionSelector=this.segments.some(s=>s.position!==void 0)}_parse(e){let t=[],n=0,s="";for(;n<e.length;)e[n]===this.separator?n+1<e.length&&e[n+1]===this.separator?(s.trim()&&(t.push(this._parseSegment(s.trim())),s=""),t.push({type:"deep-wildcard"}),n+=2):(s.trim()&&t.push(this._parseSegment(s.trim())),s="",n++):(s+=e[n],n++);return s.trim()&&t.push(this._parseSegment(s.trim())),t}_parseSegment(e){let t={type:"tag"},n=null,s=e,i=e.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(i&&(s=i[1]+i[3],i[2])){let l=i[2].slice(1,-1);l&&(n=l)}let a,o=s;if(s.includes("::")){let l=s.indexOf("::");if(a=s.substring(0,l).trim(),o=s.substring(l+2).trim(),!a)throw new Error(`Invalid namespace in pattern: ${e}`)}let c,u=null;if(o.includes(":")){let l=o.lastIndexOf(":"),d=o.substring(0,l).trim(),h=o.substring(l+1).trim();["first","last","odd","even"].includes(h)||/^nth\(\d+\)$/.test(h)?(c=d,u=h):c=o}else c=o;if(!c)throw new Error(`Invalid segment pattern: ${e}`);if(t.tag=c,a&&(t.namespace=a),n)if(n.includes("=")){let l=n.indexOf("=");t.attrName=n.substring(0,l).trim(),t.attrValue=n.substring(l+1).trim()}else t.attrName=n.trim();if(u){let l=u.match(/^nth\((\d+)\)$/);l?(t.position="nth",t.positionValue=parseInt(l[1],10)):t.position=u}return t}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}};var Q=class{constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._patterns=new Set,this._sealed=!1}add(e){if(this._sealed)throw new TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");if(this._patterns.has(e.pattern))return this;if(this._patterns.add(e.pattern),e.hasDeepWildcard())return this._deepWildcards.push(e),this;let t=e.length,s=e.segments[e.segments.length-1]?.tag;if(!s||s==="*")this._wildcardByDepth.has(t)||this._wildcardByDepth.set(t,[]),this._wildcardByDepth.get(t).push(e);else{let i=`${t}:${s}`;this._byDepthAndTag.has(i)||this._byDepthAndTag.set(i,[]),this._byDepthAndTag.get(i).push(e)}return this}addAll(e){for(let t of e)this.add(t);return this}has(e){return this._patterns.has(e.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(e){return this.findMatch(e)!==null}findMatch(e){let t=e.getDepth(),n=e.getCurrentTag(),s=`${t}:${n}`,i=this._byDepthAndTag.get(s);if(i){for(let o=0;o<i.length;o++)if(e.matches(i[o]))return i[o]}let a=this._wildcardByDepth.get(t);if(a){for(let o=0;o<a.length;o++)if(e.matches(a[o]))return a[o]}for(let o=0;o<this._deepWildcards.length;o++)if(e.matches(this._deepWildcards[o]))return this._deepWildcards[o];return null}};var Ze=class{constructor(e){this._matcher=e}get separator(){return this._matcher.separator}getCurrentTag(){let e=this._matcher.path;return e.length>0?e[e.length-1].tag:void 0}getCurrentNamespace(){let e=this._matcher.path;return e.length>0?e[e.length-1].namespace:void 0}getAttrValue(e){let t=this._matcher.path;if(t.length!==0)return t[t.length-1].values?.[e]}hasAttr(e){let t=this._matcher.path;if(t.length===0)return!1;let n=t[t.length-1];return n.values!==void 0&&e in n.values}getPosition(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].position??0}getCounter(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(e,t=!0){return this._matcher.toString(e,t)}toArray(){return this._matcher.path.map(e=>e.tag)}matches(e){return this._matcher.matches(e)}matchesAny(e){return e.matchesAny(this._matcher)}},J=class{constructor(e={}){this.separator=e.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new Ze(this)}push(e,t=null,n=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);let s=this.path.length;this.siblingStacks[s]||(this.siblingStacks[s]=new Map);let i=this.siblingStacks[s],a=n?`${n}:${e}`:e,o=i.get(a)||0,c=0;for(let l of i.values())c+=l;i.set(a,o+1);let u={tag:e,position:c,counter:o};n!=null&&(u.namespace=n),t!=null&&(u.values=t),this.path.push(u)}pop(){if(this.path.length===0)return;this._pathStringCache=null;let e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){let t=this.path[this.path.length-1];e!=null&&(t.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(this.path.length!==0)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;let t=this.path[this.path.length-1];return t.values!==void 0&&e in t.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,t=!0){let n=e||this.separator;if(n===this.separator&&t===!0){if(this._pathStringCache!==null)return this._pathStringCache;let i=this.path.map(a=>a.namespace?`${a.namespace}:${a.tag}`:a.tag).join(n);return this._pathStringCache=i,i}return this.path.map(i=>t&&i.namespace?`${i.namespace}:${i.tag}`:i.tag).join(n)}toArray(){return this.path.map(e=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(e){let t=e.segments;return t.length===0?!1:e.hasDeepWildcard()?this._matchWithDeepWildcard(t):this._matchSimple(t)}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let t=0;t<e.length;t++)if(!this._matchSegment(e[t],this.path[t],t===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(e){let t=this.path.length-1,n=e.length-1;for(;n>=0&&t>=0;){let s=e[n];if(s.type==="deep-wildcard"){if(n--,n<0)return!0;let i=e[n],a=!1;for(let o=t;o>=0;o--)if(this._matchSegment(i,this.path[o],o===this.path.length-1)){t=o-1,n--,a=!0;break}if(!a)return!1}else{if(!this._matchSegment(s,this.path[t],t===this.path.length-1))return!1;t--,n--}}return n<0}_matchSegment(e,t,n){if(e.tag!=="*"&&e.tag!==t.tag||e.namespace!==void 0&&e.namespace!=="*"&&e.namespace!==t.namespace||e.attrName!==void 0&&(!n||!t.values||!(e.attrName in t.values)||e.attrValue!==void 0&&String(t.values[e.attrName])!==String(e.attrValue)))return!1;if(e.position!==void 0){if(!n)return!1;let s=t.counter??0;if(e.position==="first"&&s!==0)return!1;if(e.position==="odd"&&s%2!==1)return!1;if(e.position==="even"&&s%2!==0)return!1;if(e.position==="nth"&&s!==e.positionValue)return!1}return!0}matchesAny(e){return e.matchesAny(this)}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this._pathStringCache=null,this.path=e.path.map(t=>({...t})),this.siblingStacks=e.siblingStacks.map(t=>new Map(t))}readOnly(){return this._view}};function Ms(r,e){if(!r)return{};let t=e.attributesGroupName?r[e.attributesGroupName]:r;if(!t)return{};let n={};for(let s in t)if(s.startsWith(e.attributeNamePrefix)){let i=s.substring(e.attributeNamePrefix.length);n[i]=t[s]}else n[s]=t[s];return n}function $s(r){if(!r||typeof r!="string")return;let e=r.indexOf(":");if(e!==-1&&e>0){let t=r.substring(0,e);if(t!=="xmlns")return t}}var le=class{constructor(e,t){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=js,this.parseTextData=Fs,this.resolveNameSpace=Vs,this.buildAttributesMap=Hs,this.isItStopNode=Bs,this.replaceEntitiesValue=Ws,this.readStopNodeData=Ds,this.saveTextToParentTag=zs,this.addChild=qs,this.ignoreAttributesFn=Je(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0;let n={...oe};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities=="object"?n=this.options.htmlEntities:this.options.htmlEntities===!0&&(n={...Ke,..._e}),this.entityDecoder=new Y({namedEntities:{...n,...t},numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo}})),this.matcher=new J,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new Q;let s=this.options.stopNodes;if(s&&s.length>0){for(let i=0;i<s.length;i++){let a=s[i];typeof a=="string"?this.stopNodeExpressionsSet.add(new W(a)):a instanceof W&&this.stopNodeExpressionsSet.add(a)}this.stopNodeExpressionsSet.seal()}}};function Fs(r,e,t,n,s,i,a){let o=this.options;if(r!==void 0&&(o.trimValues&&!n&&(r=r.trim()),r.length>0)){a||(r=this.replaceEntitiesValue(r,e,t));let c=o.jPath?t.toString():t,u=o.tagValueProcessor(e,r,c,s,i);return u==null?r:typeof u!=typeof r||u!==r?u:o.trimValues||r.trim()===r?rt(r,o.parseTagValue,o.numberParseOptions):r}}function Vs(r){if(this.options.removeNSPrefix){let e=r.split(":"),t=r.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(r=t+e[1])}return r}var Us=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Hs(r,e,t,n=!1){let s=this.options;if(n===!0||s.ignoreAttributes!==!0&&typeof r=="string"){let i=xe(r,Us),a=i.length,o={},c=new Array(a),u=!1,l={};for(let p=0;p<a;p++){let g=this.resolveNameSpace(i[p][1]),f=i[p][4];if(g.length&&f!==void 0){let w=f;s.trimValues&&(w=w.trim()),w=this.replaceEntitiesValue(w,t,this.readonlyMatcher),c[p]=w,l[g]=w,u=!0}}u&&typeof e=="object"&&e.updateCurrent&&e.updateCurrent(l);let d=s.jPath?e.toString():this.readonlyMatcher,h=!1;for(let p=0;p<a;p++){let g=this.resolveNameSpace(i[p][1]);if(this.ignoreAttributesFn(g,d))continue;let f=s.attributeNamePrefix+g;if(g.length)if(s.transformAttributeName&&(f=s.transformAttributeName(f)),f=Jr(f,s),i[p][4]!==void 0){let w=c[p],N=s.attributeValueProcessor(g,w,d);N==null?o[f]=w:typeof N!=typeof w||N!==w?o[f]=N:o[f]=rt(w,s.parseAttributeValue,s.numberParseOptions),h=!0}else s.allowBooleanAttributes&&(o[f]=!0,h=!0)}if(!h)return;if(s.attributesGroupName&&!s.preserveOrder){let p={};return p[s.attributesGroupName]=o,p}return o}}var js=function(r){r=r.replace(/\r\n?/g,`
4
+ `);let e=new I("!xml"),t=e,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let s=this.options,i=new ce(s.processEntities),a=r.length;for(let o=0;o<a;o++)if(r[o]==="<"){let u=r.charCodeAt(o+1);if(u===47){let l=Z(r,">",o,"Closing Tag is not closed."),d=r.substring(o+2,l).trim();if(s.removeNSPrefix){let p=d.indexOf(":");p!==-1&&(d=d.substr(p+1))}d=et(s.transformTagName,d,"",s).tagName,t&&(n=this.saveTextToParentTag(n,t,this.readonlyMatcher));let h=this.matcher.getCurrentTag();if(d&&s.unpairedTagsSet.has(d))throw new Error(`Unpaired tag can not be used as closing tag: </${d}>`);h&&s.unpairedTagsSet.has(h)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,t=this.tagsNodeStack.pop(),n="",o=l}else if(u===63){let l=tt(r,o,!1,"?>");if(!l)throw new Error("Pi Tag is not closed.");n=this.saveTextToParentTag(n,t,this.readonlyMatcher);let d=this.buildAttributesMap(l.tagExp,this.matcher,l.tagName,!0);if(d){let h=d[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(h)||1),i.setXmlVersion(Number(h)||1)}if(!(s.ignoreDeclaration&&l.tagName==="?xml"||s.ignorePiTags)){let h=new I(l.tagName);h.add(s.textNodeName,""),l.tagName!==l.tagExp&&l.attrExpPresent&&s.ignoreAttributes!==!0&&(h[":@"]=d),this.addChild(t,h,this.readonlyMatcher,o)}o=l.closeIndex+1}else if(u===33&&r.charCodeAt(o+2)===45&&r.charCodeAt(o+3)===45){let l=Z(r,"-->",o+4,"Comment is not closed.");if(s.commentPropName){let d=r.substring(o+4,l-2);n=this.saveTextToParentTag(n,t,this.readonlyMatcher),t.add(s.commentPropName,[{[s.textNodeName]:d}])}o=l}else if(u===33&&r.charCodeAt(o+2)===68){let l=i.readDocType(r,o);this.entityDecoder.addInputEntities(l.entities),o=l.i}else if(u===33&&r.charCodeAt(o+2)===91){let l=Z(r,"]]>",o,"CDATA is not closed.")-2,d=r.substring(o+9,l);n=this.saveTextToParentTag(n,t,this.readonlyMatcher);let h=this.parseTextData(d,t.tagname,this.readonlyMatcher,!0,!1,!0,!0);h==null&&(h=""),s.cdataPropName?t.add(s.cdataPropName,[{[s.textNodeName]:d}]):t.add(s.textNodeName,h),o=l+2}else{let l=tt(r,o,s.removeNSPrefix);if(!l){let T=r.substring(Math.max(0,o-50),Math.min(a,o+50));throw new Error(`readTagExp returned undefined at position ${o}. Context: "${T}"`)}let d=l.tagName,h=l.rawTagName,p=l.tagExp,g=l.attrExpPresent,f=l.closeIndex;if({tagName:d,tagExp:p}=et(s.transformTagName,d,p,s),s.strictReservedNames&&(d===s.commentPropName||d===s.cdataPropName||d===s.textNodeName||d===s.attributesGroupName))throw new Error(`Invalid tag name: ${d}`);t&&n&&t.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,t,this.readonlyMatcher,!1));let w=t;w&&s.unpairedTagsSet.has(w.tagname)&&(t=this.tagsNodeStack.pop(),this.matcher.pop());let N=!1;p.length>0&&p.lastIndexOf("/")===p.length-1&&(N=!0,d[d.length-1]==="/"?(d=d.substr(0,d.length-1),p=d):p=p.substr(0,p.length-1),g=d!==p);let k=null,Jn={},mt;mt=$s(h),d!==e.tagname&&this.matcher.push(d,{},mt),d!==p&&g&&(k=this.buildAttributesMap(p,this.matcher,d),k&&(Jn=Ms(k,s))),d!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let ue=o;if(this.isCurrentNodeStopNode){let T="";if(N)o=l.closeIndex;else if(s.unpairedTagsSet.has(d))o=l.closeIndex;else{let He=this.readStopNodeData(r,h,f+1);if(!He)throw new Error(`Unexpected end of ${h}`);o=He.i,T=He.tagContent}let Ue=new I(d);k&&(Ue[":@"]=k),Ue.add(s.textNodeName,T),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(t,Ue,this.readonlyMatcher,ue)}else{if(N){({tagName:d,tagExp:p}=et(s.transformTagName,d,p,s));let T=new I(d);k&&(T[":@"]=k),this.addChild(t,T,this.readonlyMatcher,ue),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(s.unpairedTagsSet.has(d)){let T=new I(d);k&&(T[":@"]=k),this.addChild(t,T,this.readonlyMatcher,ue),this.matcher.pop(),this.isCurrentNodeStopNode=!1,o=l.closeIndex;continue}else{let T=new I(d);if(this.tagsNodeStack.length>s.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(t),k&&(T[":@"]=k),this.addChild(t,T,this.readonlyMatcher,ue),t=T}n="",o=f}}}else n+=r[o];return e.child};function qs(r,e,t,n){this.options.captureMetaData||(n=void 0);let s=this.options.jPath?t.toString():t,i=this.options.updateTag(e.tagname,s,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),r.addChild(e,n))}function Ws(r,e,t){let n=this.options.processEntities;if(!n||!n.enabled)return r;if(n.allowedTags){let s=this.options.jPath?t.toString():t;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(e):n.allowedTags(e,s)))return r}if(n.tagFilter){let s=this.options.jPath?t.toString():t;if(!n.tagFilter(e,s))return r}return this.entityDecoder.decode(r)}function zs(r,e,t,n){return r&&(n===void 0&&(n=e.child.length===0),r=this.parseTextData(r,e.tagname,t,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,n),r!==void 0&&r!==""&&e.add(this.options.textNodeName,r),r=""),r}function Bs(){return this.stopNodeExpressionsSet.size===0?!1:this.matcher.matchesAny(this.stopNodeExpressionsSet)}function Ks(r,e,t=">"){let n=0,s=r.length,i=t.charCodeAt(0),a=t.length>1?t.charCodeAt(1):-1,o="",c=e;for(let u=e;u<s;u++){let l=r.charCodeAt(u);if(n)l===n&&(n=0);else if(l===34||l===39)n=l;else if(l===i)if(a!==-1){if(r.charCodeAt(u+1)===a)return o+=r.substring(c,u),{data:o,index:u}}else return o+=r.substring(c,u),{data:o,index:u};else l===9&&!n&&(o+=r.substring(c,u)+" ",c=u+1)}}function Z(r,e,t,n){let s=r.indexOf(e,t);if(s===-1)throw new Error(n);return s+e.length-1}function Gs(r,e,t,n){let s=r.indexOf(e,t);if(s===-1)throw new Error(n);return s}function tt(r,e,t,n=">"){let s=Ks(r,e+1,n);if(!s)return;let i=s.data,a=s.index,o=i.search(/\s/),c=i,u=!0;o!==-1&&(c=i.substring(0,o),i=i.substring(o+1).trimStart());let l=c;if(t){let d=c.indexOf(":");d!==-1&&(c=c.substr(d+1),u=c!==s.data.substr(d+1))}return{tagName:c,tagExp:i,closeIndex:a,attrExpPresent:u,rawTagName:l}}function Ds(r,e,t){let n=t,s=1,i=r.length;for(;t<i;t++)if(r[t]==="<"){let a=r.charCodeAt(t+1);if(a===47){let o=Gs(r,">",t,`${e} is not closed`);if(r.substring(t+2,o).trim()===e&&(s--,s===0))return{tagContent:r.substring(n,t),i:o};t=o}else if(a===63)t=Z(r,"?>",t+1,"StopNode is not closed.");else if(a===33&&r.charCodeAt(t+2)===45&&r.charCodeAt(t+3)===45)t=Z(r,"-->",t+3,"StopNode is not closed.");else if(a===33&&r.charCodeAt(t+2)===91)t=Z(r,"]]>",t,"StopNode is not closed.")-2;else{let o=tt(r,t,!1);o&&((o&&o.tagName)===e&&o.tagExp[o.tagExp.length-1]!=="/"&&s++,t=o.closeIndex)}}}function rt(r,e,t){if(e&&typeof r=="string"){let n=r.trim();return n==="true"?!0:n==="false"?!1:Qe(r,t)}else return Tr(r)?r:""}function et(r,e,t,n){if(r){let s=r(e);t===e&&(t=s),e=s}return e=Jr(e,n),{tagName:e,tagExp:t}}function Jr(r,e){if(Ae.includes(r))throw new Error(`[SECURITY] Invalid name: "${r}" is a reserved JavaScript keyword that could cause prototype pollution`);return se.includes(r)?e.onDangerousProperty(r):r}var nt=I.getMetaDataSymbol();function Xs(r,e){if(!r||typeof r!="object")return{};if(!e)return r;let t={};for(let n in r)if(n.startsWith(e)){let s=n.substring(e.length);t[s]=r[n]}else t[n]=r[n];return t}function st(r,e,t,n){return Zr(r,e,t,n)}function Zr(r,e,t,n){let s,i={};for(let a=0;a<r.length;a++){let o=r[a],c=Ys(o);if(c!==void 0&&c!==e.textNodeName){let u=Xs(o[":@"]||{},e.attributeNamePrefix);t.push(c,u)}if(c===e.textNodeName)s===void 0?s=o[c]:s+=""+o[c];else{if(c===void 0)continue;if(o[c]){let u=Zr(o[c],e,t,n),l=Js(u,e);if(Object.keys(u).length===0&&e.alwaysCreateTextNode&&(u[e.textNodeName]=""),o[":@"]?Qs(u,o[":@"],n,e):Object.keys(u).length===1&&u[e.textNodeName]!==void 0&&!e.alwaysCreateTextNode?u=u[e.textNodeName]:Object.keys(u).length===0&&(e.alwaysCreateTextNode?u[e.textNodeName]="":u=""),o[nt]!==void 0&&typeof u=="object"&&u!==null&&(u[nt]=o[nt]),i[c]!==void 0&&Object.prototype.hasOwnProperty.call(i,c))Array.isArray(i[c])||(i[c]=[i[c]]),i[c].push(u);else{let d=e.jPath?n.toString():n;e.isArray(c,d,l)?i[c]=[u]:i[c]=u}c!==void 0&&c!==e.textNodeName&&t.pop()}}}return typeof s=="string"?s.length>0&&(i[e.textNodeName]=s):s!==void 0&&(i[e.textNodeName]=s),i}function Ys(r){let e=Object.keys(r);for(let t=0;t<e.length;t++){let n=e[t];if(n!==":@")return n}}function Qs(r,e,t,n){if(e){let s=Object.keys(e),i=s.length;for(let a=0;a<i;a++){let o=s[a],c=o.startsWith(n.attributeNamePrefix)?o.substring(n.attributeNamePrefix.length):o,u=n.jPath?t.toString()+"."+c:t;n.isArray(o,u,!0,!0)?r[o]=[e[o]]:r[o]=e[o]}}}function Js(r,e){let{textNodeName:t}=e,n=Object.keys(r).length;return!!(n===0||n===1&&(r[t]||typeof r[t]=="boolean"||r[t]===0))}var ee=class{constructor(e){this.externalEntities={},this.options=Dr(e)}parse(e,t){if(typeof e!="string"&&e.toString)e=e.toString();else if(typeof e!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(t){t===!0&&(t={});let i=kr(e,t);if(i!==!0)throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`)}let n=new le(this.options,this.externalEntities),s=n.parseXml(e);return this.options.preserveOrder||s===void 0?s:st(s,this.options,n.matcher,n.readonlyMatcher)}addEntity(e,t){if(t.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(e.indexOf("&")!==-1||e.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(t==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}static getMetaDataSymbol(){return I.getMetaDataSymbol()}};var at={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},tn={nbsp:"\xA0",copy:"\xA9",reg:"\xAE",trade:"\u2122",mdash:"\u2014",ndash:"\u2013",hellip:"\u2026",laquo:"\xAB",raquo:"\xBB",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",bull:"\u2022",para:"\xB6",sect:"\xA7",deg:"\xB0",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE"},rn={cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",euro:"\u20AC",dollar:"$",fnof:"\u0192",inr:"\u20B9",af:"\u060B",birr:"\u1265\u122D",peso:"\u20B1",rub:"\u20BD",won:"\u20A9",yuan:"\xA5",cedil:"\xB8"},Zs=new Set("!?\\/[]$%{}^&*()<>|+");function en(r){if(r[0]==="#")throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${r}"`);for(let e of r)if(Zs.has(e))throw new Error(`[EntityReplacer] Invalid character '${e}' in entity name: "${r}"`);return r}function it(...r){let e=Object.create(null);for(let t of r)if(t)for(let n of Object.keys(t)){let s=t[n];if(typeof s=="string")e[n]=s;else if(s&&typeof s=="object"&&s.val!==void 0){let i=s.val;typeof i=="string"&&(e[n]=i)}}return e}var z="external",Te="base",ot="all";function ei(r){return!r||r===z?new Set([z]):r===ot?new Set([ot]):r===Te?new Set([Te]):Array.isArray(r)?new Set(r):new Set([z])}var R=Object.freeze({allow:0,leave:1,remove:2,throw:3}),ti=new Set([9,10,13]);function ri(r){if(!r)return{xmlVersion:1,onLevel:R.allow,nullLevel:R.remove};let e=r.xmlVersion===1.1?1.1:1,t=R[r.onNCR??"allow"]??R.allow,n=R[r.nullNCR??"remove"]??R.remove,s=Math.max(n,R.remove);return{xmlVersion:e,onLevel:t,nullLevel:s}}var nn=class{_limit;_maxTotalExpansions;_maxExpandedLength;_postCheck;_limitTiers;_numericAllowed;_baseMap;_externalMap;_inputMap;_totalExpansions;_expandedLength;_removeSet;_leaveSet;_ncrXmlVersion;_ncrOnLevel;_ncrNullLevel;constructor(e={}){this._limit=e.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof e.postCheck=="function"?e.postCheck:n=>n,this._limitTiers=ei(this._limit.applyLimitsTo??z),this._numericAllowed=e.numericAllowed??!0,this._baseMap=it(at,e.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(e.remove&&Array.isArray(e.remove)?e.remove:[]),this._leaveSet=new Set(e.leave&&Array.isArray(e.leave)?e.leave:[]);let t=ri(e.ncr);this._ncrXmlVersion=t.xmlVersion,this._ncrOnLevel=t.onLevel,this._ncrNullLevel=t.nullLevel}setExternalEntities(e){if(e)for(let t of Object.keys(e))en(t);this._externalMap=it(e)}addExternalEntity(e,t){en(e),typeof t=="string"&&t.indexOf("&")===-1&&(this._externalMap[e]=t)}addInputEntities(e){this._totalExpansions=0,this._expandedLength=0,this._inputMap=it(e)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(e){this._ncrXmlVersion=e==="1.1"||e===1.1?1.1:1}decode(e){if(typeof e!="string"||e.length===0)return e;let t=e,n=[],s=e.length,i=0,a=0,o=this._maxTotalExpansions>0,c=this._maxExpandedLength>0,u=o||c;for(;a<s;){if(e.charCodeAt(a)!==38){a++;continue}let d=a+1;for(;d<s&&e.charCodeAt(d)!==59&&d-a<=32;)d++;if(d>=s||e.charCodeAt(d)!==59){a++;continue}let h=e.slice(a+1,d);if(h.length===0){a++;continue}let p,g;if(this._removeSet.has(h))p="",g===void 0&&(g=z);else if(this._leaveSet.has(h)){a++;continue}else if(h.charCodeAt(0)===35){let f=this._resolveNCR(h);if(f===void 0){a++;continue}p=f,g=Te}else{let f=this._resolveName(h);p=f?.value,g=f?.tier}if(p===void 0){a++;continue}if(a>i&&n.push(e.slice(i,a)),n.push(p),i=d+1,a=i,u&&this._tierCounts(g)){if(o&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(c){let f=p.length-(h.length+2);if(f>0&&(this._expandedLength+=f,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}i<s&&n.push(e.slice(i));let l=n.length===0?e:n.join("");return this._postCheck(l,t)}_tierCounts(e){return this._limitTiers.has(ot)?!0:this._limitTiers.has(e)}_resolveName(e){if(e in this._inputMap)return{value:this._inputMap[e],tier:z};if(e in this._externalMap)return{value:this._externalMap[e],tier:z};if(e in this._baseMap)return{value:this._baseMap[e],tier:Te}}_classifyNCR(e){return e===0?this._ncrNullLevel:e>=55296&&e<=57343||this._ncrXmlVersion===1&&e>=1&&e<=31&&!ti.has(e)?R.remove:-1}_applyNCRAction(e,t,n){switch(e){case R.allow:return String.fromCodePoint(n);case R.remove:return"";case R.leave:return;case R.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${t}; (U+${n.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(n)}}_resolveNCR(e){let t=e.charCodeAt(1),n;if(t===120||t===88?n=parseInt(e.slice(2),16):n=parseInt(e.slice(1),10),Number.isNaN(n)||n<0||n>1114111)return;let s=this._classifyNCR(n);if(!this._numericAllowed&&s<R.remove)return;let i=s===-1?this._ncrOnLevel:Math.max(this._ncrOnLevel,s);return this._applyNCRAction(i,e,n)}};var ve=new nn({namedEntities:{...at,...tn,...rn},numericAllowed:!0,limit:{maxTotalExpansions:1/0},ncr:{xmlVersion:1.1}}),ni=new ee({attributeNamePrefix:"",processEntities:{enabled:!0,maxTotalExpansions:1/0},htmlEntities:!0,entityDecoder:{setExternalEntities:r=>{ve.setExternalEntities(r)},addInputEntities:r=>{ve.addInputEntities(r)},reset:()=>{ve.reset()},decode:r=>ve.decode(r),setXmlVersion:r=>{}},ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(r,e)=>e.trim()===""&&e.includes(`
5
+ `)?"":void 0,maxNestedTags:1/0});function ct(r){return ni.parse(r,!0)}var Ie=class extends Ee{settings;stringDeserializer;constructor(e){super(),this.settings=e,this.stringDeserializer=new qt(e)}setSerdeContext(e){this.serdeContext=e,this.stringDeserializer.setSerdeContext(e)}read(e,t,n){let s=V.of(e),i=s.getMemberSchemas();if(s.isStructSchema()&&s.isMemberSchema()&&!!Object.values(i).find(u=>!!u.getMemberTraits().eventPayload)){let u={},l=Object.keys(i)[0];return i[l].isBlobSchema()?u[l]=t:u[l]=this.read(i[l],t),u}let o=(this.serdeContext?.utf8Encoder??be)(t),c=this.parseXml(o);return this.readSchema(e,n?c[n]:c)}readSchema(e,t){let n=V.of(e);if(n.isUnitSchema())return;let s=n.getMergedTraits();if(n.isListSchema()&&!Array.isArray(t))return this.readSchema(n,[t]);if(t==null)return t;if(typeof t=="object"){let i=!!s.xmlFlattened;if(n.isListSchema()){let o=n.getValueSchema(),c=[],u=o.getMergedTraits().xmlName??"member",l=i?t:(t[0]??t)[u];if(l==null)return c;let d=Array.isArray(l)?l:[l];for(let h of d)c.push(this.readSchema(o,h));return c}let a={};if(n.isMapSchema()){let o=n.getKeySchema(),c=n.getValueSchema(),u;i?u=Array.isArray(t)?t:[t]:u=Array.isArray(t.entry)?t.entry:[t.entry];let l=o.getMergedTraits().xmlName??"key",d=c.getMergedTraits().xmlName??"value";for(let h of u){let p=h[l],g=h[d];a[p]=this.readSchema(c,g)}return a}if(n.isStructSchema()){let o=n.isUnionSchema(),c;o&&(c=new cr(t,a));for(let[u,l]of n.structIterator()){let d=l.getMergedTraits(),h=d.httpPayload?d.xmlName??l.getName():l.getMemberTraits().xmlName??u;o&&c.mark(h),t[h]!=null&&(a[u]=this.readSchema(l,t[h]))}return o&&c.writeUnknown(),a}if(n.isDocumentSchema())return t;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${n.getName(!0)}`)}return n.isListSchema()?[]:n.isMapSchema()||n.isStructSchema()?{}:this.stringDeserializer.read(n,t)}parseXml(e){if(e.length){let t;try{t=ct(e)}catch(a){throw a&&typeof a=="object"&&Object.defineProperty(a,"$responseBodyText",{value:e}),a}let n="#text",s=Object.keys(t)[0],i=t[s];return i[n]&&(i[s]=i[n],delete i[n]),Pt(i)}return{}}};var Pe=class extends Ee{settings;buffer;constructor(e){super(),this.settings=e}write(e,t,n=""){this.buffer===void 0&&(this.buffer="");let s=V.of(e);if(n&&!n.endsWith(".")&&(n+="."),s.isBlobSchema())(typeof t=="string"||t instanceof Uint8Array)&&(this.writeKey(n),this.writeValue((this.serdeContext?.base64Encoder??we)(t)));else if(s.isBooleanSchema()||s.isNumericSchema()||s.isStringSchema())t!=null?(this.writeKey(n),this.writeValue(String(t))):s.isIdempotencyToken()&&(this.writeKey(n),this.writeValue(Ut()));else if(s.isBigIntegerSchema())t!=null&&(this.writeKey(n),this.writeValue(String(t)));else if(s.isBigDecimalSchema())t!=null&&(this.writeKey(n),this.writeValue(t instanceof yt?t.string:String(t)));else if(s.isTimestampSchema()){if(t instanceof Date)switch(this.writeKey(n),jt(s,this.settings)){case 5:this.writeValue(t.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(gt(t));break;case 7:this.writeValue(String(t.getTime()/1e3));break}}else if(s.isDocumentSchema())Array.isArray(t)?this.write(79,t,n):t instanceof Date?this.write(4,t,n):t instanceof Uint8Array?this.write(21,t,n):t&&typeof t=="object"?this.write(143,t,n):(this.writeKey(n),this.writeValue(String(t)));else if(s.isListSchema()){if(Array.isArray(t))if(t.length===0)this.settings.serializeEmptyLists&&(this.writeKey(n),this.writeValue(""));else{let i=s.getValueSchema(),a=this.settings.flattenLists||s.getMergedTraits().xmlFlattened,o=1;for(let c of t){if(c==null)continue;let u=i.getMergedTraits(),l=this.getKey("member",u.xmlName,u.ec2QueryName),d=a?`${n}${o}`:`${n}${l}.${o}`;this.write(i,c,d),++o}}}else if(s.isMapSchema()){if(t&&typeof t=="object"){let i=s.getKeySchema(),a=s.getValueSchema(),o=s.getMergedTraits().xmlFlattened,c=1;for(let u in t){let l=t[u];if(l==null)continue;let d=i.getMergedTraits(),h=this.getKey("key",d.xmlName,d.ec2QueryName),p=o?`${n}${c}.${h}`:`${n}entry.${c}.${h}`,g=a.getMergedTraits(),f=this.getKey("value",g.xmlName,g.ec2QueryName),w=o?`${n}${c}.${f}`:`${n}entry.${c}.${f}`;this.write(i,u,p),this.write(a,l,w),++c}}}else if(s.isStructSchema()){if(t&&typeof t=="object"){let i=!1;for(let[a,o]of s.structIterator()){if(t[a]==null&&!o.isIdempotencyToken())continue;let c=o.getMergedTraits(),u=this.getKey(a,c.xmlName,c.ec2QueryName,"struct"),l=`${n}${u}`;this.write(o,t[a],l),i=!0}if(!i&&s.isUnionSchema()){let{$unknown:a}=t;if(Array.isArray(a)){let[o,c]=a,u=`${n}${o}`;this.write(15,c,u)}}}}else if(!s.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${s.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");let e=this.buffer;return delete this.buffer,e}getKey(e,t,n,s){let{ec2:i,capitalizeKeys:a}=this.settings;if(i&&n)return n;let o=t??e;return a&&s==="struct"?o[0].toUpperCase()+o.slice(1):o}writeKey(e){e.endsWith(".")&&(e=e.slice(0,e.length-1)),this.buffer+=`&${ze(e)}=`}writeValue(e){this.buffer+=ze(e)}};var Re=class extends Ht{options;serializer;deserializer;mixin=new ir;constructor(e){super({defaultNamespace:e.defaultNamespace,errorTypeRegistries:e.errorTypeRegistries}),this.options=e;let t={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace,serializeEmptyLists:!0};this.serializer=new Pe(t),this.deserializer=new Ie(t)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(e){this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(e,t,n){let s=await super.serializeRequest(e,t,n);s.path.endsWith("/")||(s.path+="/"),s.headers["content-type"]="application/x-www-form-urlencoded",(xt(e.input)==="unit"||!s.body)&&(s.body="");let i=e.name.split("#")[1]??e.name;return s.body=`Action=${i}&Version=${this.options.version}`+s.body,s.body.endsWith("&")&&(s.body=s.body.slice(-1)),s}async deserializeResponse(e,t,n){let s=this.deserializer,i=V.of(e.output),a={};if(n.statusCode>=300){let l=await We(n.body,t);l.byteLength>0&&Object.assign(a,await s.read(15,l)),await this.handleError(e,t,n,a,this.deserializeMetadata(n))}for(let l in n.headers){let d=n.headers[l];delete n.headers[l],n.headers[l.toLowerCase()]=d}let o=e.name.split("#")[1]??e.name,c=i.isStructSchema()&&this.useNestedResult()?o+"Result":void 0,u=await We(n.body,t);return u.byteLength>0&&Object.assign(a,await s.read(i,u,c)),a.$metadata=this.deserializeMetadata(n),a}useNestedResult(){return!0}async handleError(e,t,n,s,i){let a=this.loadQueryErrorCode(n,s)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace);let o=this.loadQueryError(s)??{},c=this.loadQueryErrorMessage(s);o.message=c,o.Error={Type:o.Type,Code:o.Code,Message:c};let{errorSchema:u,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,n,o,i,this.mixin.findQueryCompatibleError),d=V.of(u),h=this.compositeErrorRegistry.getErrorCtor(u)??Error,p=new h(c),g={Type:o.Error.Type,Code:o.Error.Code,Error:o.Error};for(let[f,w]of d.structIterator()){let N=w.getMergedTraits().xmlName??f,k=o[N]??s[N];g[f]=this.deserializer.readSchema(w,k)}throw this.mixin.decorateServiceException(Object.assign(p,l,{$fault:d.getMergedTraits().error,message:c},g),s)}loadQueryErrorCode(e,t){let n=(t.Errors?.[0]?.Error??t.Errors?.Error??t.Error)?.Code;if(n!==void 0)return n;if(e.statusCode==404)return"NotFound"}loadQueryError(e){return e.Errors?.[0]?.Error??e.Errors?.Error??e.Error}loadQueryErrorMessage(e){let t=this.loadQueryError(e);return t?.message??t?.Message??e.message??e.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}};var mn="required",m="type";var y="argv";var U="booleanEquals",x="stringEquals",gn="sigv4";var yn="us-east-1",E="endpoint",sn="https://sts.{Region}.{PartitionResult#dnsSuffix}",$="tree",te="error",ut="getAttr",on={[mn]:!1,[m]:"string"},lt={[mn]:!0,default:!1,[m]:"boolean"},En={ref:"Endpoint"},an={fn:"isSet",[y]:[{ref:"Region"}]},A={ref:"Region"},cn={fn:"aws.partition",[y]:[A],assign:"PartitionResult"},bn={ref:"UseFIPS"},wn={ref:"UseDualStack"},_={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:gn,signingName:"sts",signingRegion:yn}]},headers:{}},L={},ln={conditions:[{fn:x,[y]:[A,"aws-global"]}],[E]:_,[m]:E},Sn={fn:U,[y]:[bn,!0]},xn={fn:U,[y]:[wn,!0]},un={fn:ut,[y]:[{ref:"PartitionResult"},"supportsFIPS"]},An={ref:"PartitionResult"},dn={fn:U,[y]:[!0,{fn:ut,[y]:[An,"supportsDualStack"]}]},hn=[{fn:"isSet",[y]:[En]}],pn=[Sn],fn=[xn],si={version:"1.0",parameters:{Region:on,UseDualStack:lt,UseFIPS:lt,Endpoint:on,UseGlobalEndpoint:lt},rules:[{conditions:[{fn:U,[y]:[{ref:"UseGlobalEndpoint"},!0]},{fn:"not",[y]:hn},an,cn,{fn:U,[y]:[bn,!1]},{fn:U,[y]:[wn,!1]}],rules:[{conditions:[{fn:x,[y]:[A,"ap-northeast-1"]}],endpoint:_,[m]:E},{conditions:[{fn:x,[y]:[A,"ap-south-1"]}],endpoint:_,[m]:E},{conditions:[{fn:x,[y]:[A,"ap-southeast-1"]}],endpoint:_,[m]:E},{conditions:[{fn:x,[y]:[A,"ap-southeast-2"]}],endpoint:_,[m]:E},ln,{conditions:[{fn:x,[y]:[A,"ca-central-1"]}],endpoint:_,[m]:E},{conditions:[{fn:x,[y]:[A,"eu-central-1"]}],endpoint:_,[m]:E},{conditions:[{fn:x,[y]:[A,"eu-north-1"]}],endpoint:_,[m]:E},{conditions:[{fn:x,[y]:[A,"eu-west-1"]}],endpoint:_,[m]:E},{conditions:[{fn:x,[y]:[A,"eu-west-2"]}],endpoint:_,[m]:E},{conditions:[{fn:x,[y]:[A,"eu-west-3"]}],endpoint:_,[m]:E},{conditions:[{fn:x,[y]:[A,"sa-east-1"]}],endpoint:_,[m]:E},{conditions:[{fn:x,[y]:[A,yn]}],endpoint:_,[m]:E},{conditions:[{fn:x,[y]:[A,"us-east-2"]}],endpoint:_,[m]:E},{conditions:[{fn:x,[y]:[A,"us-west-1"]}],endpoint:_,[m]:E},{conditions:[{fn:x,[y]:[A,"us-west-2"]}],endpoint:_,[m]:E},{endpoint:{url:sn,properties:{authSchemes:[{name:gn,signingName:"sts",signingRegion:"{Region}"}]},headers:L},[m]:E}],[m]:$},{conditions:hn,rules:[{conditions:pn,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[m]:te},{conditions:fn,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[m]:te},{endpoint:{url:En,properties:L,headers:L},[m]:E}],[m]:$},{conditions:[an],rules:[{conditions:[cn],rules:[{conditions:[Sn,xn],rules:[{conditions:[{fn:U,[y]:[!0,un]},dn],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:L,headers:L},[m]:E}],[m]:$},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[m]:te}],[m]:$},{conditions:pn,rules:[{conditions:[{fn:U,[y]:[un,!0]}],rules:[{conditions:[{fn:x,[y]:[{fn:ut,[y]:[An,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:L,headers:L},[m]:E},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:L,headers:L},[m]:E}],[m]:$},{error:"FIPS is enabled but this partition does not support FIPS",[m]:te}],[m]:$},{conditions:fn,rules:[{conditions:[dn],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:L,headers:L},[m]:E}],[m]:$},{error:"DualStack is enabled but this partition does not support DualStack",[m]:te}],[m]:$},ln,{endpoint:{url:sn,properties:L,headers:L},[m]:E}],[m]:$}],[m]:$},{error:"Invalid Configuration: Missing Region",[m]:te}]},_n=si;var ii=new Ot({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Cn=(r,e={})=>ii.get(r,()=>$t(_n,{endpointParams:r,logger:e.logger}));Mt.aws=Yt;var O=class r extends Ct{constructor(e){super(e),Object.setPrototypeOf(this,r.prototype)}};var ke=class r extends O{name="ExpiredTokenException";$fault="client";constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,r.prototype)}},Le=class r extends O{name="MalformedPolicyDocumentException";$fault="client";constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e}),Object.setPrototypeOf(this,r.prototype)}},Oe=class r extends O{name="PackedPolicyTooLargeException";$fault="client";constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e}),Object.setPrototypeOf(this,r.prototype)}},Me=class r extends O{name="RegionDisabledException";$fault="client";constructor(e){super({name:"RegionDisabledException",$fault:"client",...e}),Object.setPrototypeOf(this,r.prototype)}},$e=class r extends O{name="IDPRejectedClaimException";$fault="client";constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e}),Object.setPrototypeOf(this,r.prototype)}},Fe=class r extends O{name="InvalidIdentityTokenException";$fault="client";constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,r.prototype)}},Ve=class r extends O{name="IDPCommunicationErrorException";$fault="client";constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,r.prototype)}};var oi="Arn",ai="AccessKeyId",ci="AssumeRole",li="AssumedRoleId",ui="AssumeRoleRequest",di="AssumeRoleResponse",dt="AssumedRoleUser",hi="AssumeRoleWithWebIdentity",pi="AssumeRoleWithWebIdentityRequest",fi="AssumeRoleWithWebIdentityResponse",mi="Audience",ht="Credentials",gi="ContextAssertion",Nn="DurationSeconds",yi="Expiration",Ei="ExternalId",bi="ExpiredTokenException",wi="IDPCommunicationErrorException",Si="IDPRejectedClaimException",xi="InvalidIdentityTokenException",Ai="Key",_i="MalformedPolicyDocumentException",Tn="Policy",vn="PolicyArns",Ci="ProviderArn",Ni="ProvidedContexts",Ti="ProvidedContextsListType",vi="ProvidedContext",Ii="PolicyDescriptorType",Pi="ProviderId",In="PackedPolicySize",Ri="PackedPolicyTooLargeException",ki="Provider",Pn="RoleArn",Li="RegionDisabledException",Rn="RoleSessionName",Oi="SecretAccessKey",Mi="SubjectFromWebIdentityToken",pt="SourceIdentity",$i="SerialNumber",Fi="SessionToken",Vi="Tags",Ui="TokenCode",Hi="TransitiveTagKeys",ji="Tag",qi="Value",Wi="WebIdentityToken",zi="arn",Bi="accessKeySecretType",B="awsQueryError",K="client",Ki="clientTokenType",G="error",D="httpError",X="message",Gi="policyDescriptorListType",kn="smithy.ts.sdk.synthetic.com.amazonaws.sts",Di="tagListType",b="com.amazonaws.sts",Ln=qe.for(kn),Xi=[-3,kn,"STSServiceException",0,[],[]];Ln.registerError(Xi,O);var H=qe.for(b),Yi=[-3,b,bi,{[B]:["ExpiredTokenException",400],[G]:K,[D]:400},[X],[0]];H.registerError(Yi,ke);var Qi=[-3,b,wi,{[B]:["IDPCommunicationError",400],[G]:K,[D]:400},[X],[0]];H.registerError(Qi,Ve);var Ji=[-3,b,Si,{[B]:["IDPRejectedClaim",403],[G]:K,[D]:403},[X],[0]];H.registerError(Ji,$e);var Zi=[-3,b,xi,{[B]:["InvalidIdentityToken",400],[G]:K,[D]:400},[X],[0]];H.registerError(Zi,Fe);var eo=[-3,b,_i,{[B]:["MalformedPolicyDocument",400],[G]:K,[D]:400},[X],[0]];H.registerError(eo,Le);var to=[-3,b,Ri,{[B]:["PackedPolicyTooLarge",400],[G]:K,[D]:400},[X],[0]];H.registerError(to,Oe);var ro=[-3,b,Li,{[B]:["RegionDisabledException",403],[G]:K,[D]:403},[X],[0]];H.registerError(ro,Me);var On=[Ln,H],no=[0,b,Bi,8,0],so=[0,b,Ki,8,0],Mn=[3,b,dt,0,[li,oi],[0,0],2],io=[3,b,ui,0,[Pn,Rn,vn,Tn,Nn,Vi,Hi,Ei,$i,Ui,pt,Ni],[0,0,()=>Fn,0,1,()=>fo,64,0,0,0,0,()=>po],2],oo=[3,b,di,0,[ht,dt,In,pt],[[()=>$n,0],()=>Mn,1,0]],ao=[3,b,pi,0,[Pn,Rn,Wi,Pi,vn,Tn,Nn],[0,0,[()=>so,0],0,()=>Fn,0,1],3],co=[3,b,fi,0,[ht,Mi,dt,In,ki,mi,pt],[[()=>$n,0],0,()=>Mn,1,0,0,0]],$n=[3,b,ht,0,[ai,Oi,Fi,yi],[0,[()=>no,0],0,4],4],lo=[3,b,Ii,0,[zi],[0]],uo=[3,b,vi,0,[Ci,gi],[0,0]],ho=[3,b,ji,0,[Ai,qi],[0,0],2],Fn=[1,b,Gi,0,()=>lo],po=[1,b,Ti,0,()=>uo];var fo=[1,b,Di,0,()=>ho],Vn=[9,b,ci,0,()=>io,()=>oo],Un=[9,b,hi,0,()=>ao,()=>co];var Hn=r=>({apiVersion:"2011-06-15",base64Decoder:r?.base64Decoder??or,base64Encoder:r?.base64Encoder??we,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??Cn,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??Ar,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new ye},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new me}],logger:r?.logger??new Rt,protocol:r?.protocol??Re,protocolSettings:r?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:On,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:r?.serviceId??"STS",urlParser:r?.urlParser??Kt,utf8Decoder:r?.utf8Decoder??ar,utf8Encoder:r?.utf8Encoder??be});var jn=r=>{Tt(process.version);let e=Lt(r),t=()=>e().then(Nt),n=Hn(r);Qt(process.version);let s={profile:r?.profile,logger:n.logger};return{...n,...r,runtime:"node",defaultsMode:e,authSchemePreference:r?.authSchemePreference??M(nr,s),bodyLengthChecker:r?.bodyLengthChecker??br,defaultUserAgentProvider:r?.defaultUserAgentProvider??yr({serviceId:n.serviceId,clientVersion:gr.version}),httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i=>i.getIdentityProvider("aws.auth#sigv4")||(async a=>await r.credentialDefaultProvider(a?.__config||{})()),signer:new ye},{schemeId:"smithy.api#noAuth",identityProvider:i=>i.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new me}],maxAttempts:r?.maxAttempts??M(Zt,r),region:r?.region??M(he,{...pe,...s}),requestHandler:lr.create(r?.requestHandler??t),retryMode:r?.retryMode??M({...tr,default:async()=>(await t()).retryMode||Jt},r),sha256:r?.sha256??Vt.bind(null,"sha256"),streamCollector:r?.streamCollector??ur,useDualstackEndpoint:r?.useDualstackEndpoint??M(Et,s),useFipsEndpoint:r?.useFipsEndpoint??M(bt,s),userAgentAppId:r?.userAgentAppId??M(Er,s)}};function qn(r={}){return M({...he,async default(){return mo.silence||console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly."),"us-east-1"}},{...pe,...r})}var mo={silence:!1};var Wn=r=>{let e=r.httpAuthSchemes,t=r.httpAuthSchemeProvider,n=r.credentials;return{setHttpAuthScheme(s){let i=e.findIndex(a=>a.schemeId===s.schemeId);i===-1?e.push(s):e.splice(i,1,s)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(s){t=s},httpAuthSchemeProvider(){return t},setCredentials(s){n=s},credentials(){return n}}},zn=r=>({httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()});var Bn=(r,e)=>{let t=Object.assign(wr(r),vt(r),Wt(r),Wn(r));return e.forEach(n=>n.configure(t)),Object.assign(r,Sr(t),It(t),zt(t),zn(t))};var F=class extends St{config;constructor(...[e]){let t=jn(e||{});super(t),this.initConfig=t;let n=Cr(t),s=fr(n),i=er(s),a=kt(i),o=a,c=Ft(o),u=_r(c),l=Bn(u,e?.extensions||[]);this.config=l,this.middlewareStack.use(At(this.config)),this.middlewareStack.use(mr(this.config)),this.middlewareStack.use(rr(this.config)),this.middlewareStack.use(Bt(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(hr(this.config)),this.middlewareStack.use(pr(this.config)),this.middlewareStack.use(Gt(this.config,{httpAuthSchemeParametersProvider:xr,identityProviderConfigProvider:async d=>new Xt({"aws.auth#sigv4":d.credentials})})),this.middlewareStack.use(Dt(this.config))}destroy(){super.destroy()}};var re=class extends de.classBuilder().ep(Se).m(function(e,t,n,s){return[fe(n,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(Vn).build(){};var ne=class extends de.classBuilder().ep(Se).m(function(e,t,n,s){return[fe(n,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(Un).build(){};var go={AssumeRoleCommand:re,AssumeRoleWithWebIdentityCommand:ne},ft=class extends F{};_t(go,ft);var Kn=r=>{if(typeof r?.Arn=="string"){let e=r.Arn.split(":");if(e.length>4&&e[4]!=="")return e[4]}},Gn=async(r,e,t,n={})=>{let s=typeof r=="function"?await r():r,i=typeof e=="function"?await e():e,a="",o=s??i??(a=await qn(n)());return t?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${s} (credential provider clientConfig)`,`${i} (contextual client)`,`${a} (STS default: AWS_REGION, profile region, or us-east-1)`),o},Dn=(r,e)=>{let t,n;return async(s,i)=>{if(n=s,!t){let{logger:l=r?.parentClientConfig?.logger,profile:d=r?.parentClientConfig?.profile,region:h,requestHandler:p=r?.parentClientConfig?.requestHandler,credentialProviderLogger:g,userAgentAppId:f=r?.parentClientConfig?.userAgentAppId}=r,w=await Gn(h,r?.parentClientConfig?.region,g,{logger:l,profile:d}),N=!Yn(p);t=new e({...r,userAgentAppId:f,profile:d,credentialDefaultProvider:()=>async()=>n,region:w,requestHandler:N?p:void 0,logger:l})}let{Credentials:a,AssumedRoleUser:o}=await t.send(new re(i));if(!a||!a.AccessKeyId||!a.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${i.RoleArn}`);let c=Kn(o),u={accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,sessionToken:a.SessionToken,expiration:a.Expiration,...a.CredentialScope&&{credentialScope:a.CredentialScope},...c&&{accountId:c}};return ge(u,"CREDENTIALS_STS_ASSUME_ROLE","i"),u}},Xn=(r,e)=>{let t;return async n=>{if(!t){let{logger:c=r?.parentClientConfig?.logger,profile:u=r?.parentClientConfig?.profile,region:l,requestHandler:d=r?.parentClientConfig?.requestHandler,credentialProviderLogger:h,userAgentAppId:p=r?.parentClientConfig?.userAgentAppId}=r,g=await Gn(l,r?.parentClientConfig?.region,h,{logger:c,profile:u}),f=!Yn(d);t=new e({...r,userAgentAppId:p,profile:u,region:g,requestHandler:f?d:void 0,logger:c})}let{Credentials:s,AssumedRoleUser:i}=await t.send(new ne(n));if(!s||!s.AccessKeyId||!s.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${n.RoleArn}`);let a=Kn(i),o={accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.SessionToken,expiration:s.Expiration,...s.CredentialScope&&{credentialScope:s.CredentialScope},...a&&{accountId:a}};return a&&ge(o,"RESOLVED_ACCOUNT_ID","T"),ge(o,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),o}};var Yn=r=>r?.metadata?.handlerProtocol==="h2";var Qn=(r,e)=>e?class extends r{constructor(n){super(n);for(let s of e)this.middlewareStack.use(s)}}:r,yo=(r={},e)=>Dn(r,Qn(F,e)),Eo=(r={},e)=>Xn(r,Qn(F,e)),_l=r=>e=>r({roleAssumer:yo(e),roleAssumerWithWebIdentity:Eo(e),...e});export{de as $Command,Vn as AssumeRole$,re as AssumeRoleCommand,io as AssumeRoleRequest$,oo as AssumeRoleResponse$,Un as AssumeRoleWithWebIdentity$,ne as AssumeRoleWithWebIdentityCommand,ao as AssumeRoleWithWebIdentityRequest$,co as AssumeRoleWithWebIdentityResponse$,Mn as AssumedRoleUser$,$n as Credentials$,ke as ExpiredTokenException,Yi as ExpiredTokenException$,Ve as IDPCommunicationErrorException,Qi as IDPCommunicationErrorException$,$e as IDPRejectedClaimException,Ji as IDPRejectedClaimException$,Fe as InvalidIdentityTokenException,Zi as InvalidIdentityTokenException$,Le as MalformedPolicyDocumentException,eo as MalformedPolicyDocumentException$,Oe as PackedPolicyTooLargeException,to as PackedPolicyTooLargeException$,lo as PolicyDescriptorType$,uo as ProvidedContext$,Me as RegionDisabledException,ro as RegionDisabledException$,ft as STS,F as STSClient,O as STSServiceException,Xi as STSServiceException$,ho as Tag$,St as __Client,_l as decorateDefaultCredentialProvider,On as errorTypeRegistries,yo as getDefaultRoleAssumer,Eo as getDefaultRoleAssumerWithWebIdentity};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sailor",
3
- "version": "1.8.1",
3
+ "version": "1.8.3",
4
4
  "description": "Governed AI-native SaaS scaffolder for Nebutra Sailor. Bootstrap a production-ready Next.js + Hono + Prisma monorepo with multi-tenant foundations, region-aware defaults, and AI integrations.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -13,14 +13,6 @@
13
13
  "README.md",
14
14
  "LICENSE"
15
15
  ],
16
- "scripts": {
17
- "dev": "tsup --watch",
18
- "build": "tsup",
19
- "prepublishOnly": "pnpm run build",
20
- "start": "node dist/index.js",
21
- "test": "vitest run",
22
- "test:watch": "vitest"
23
- },
24
16
  "dependencies": {
25
17
  "@clack/prompts": "^1.5.0",
26
18
  "@mrleebo/prisma-ast": "^0.16.0",
@@ -29,14 +21,15 @@
29
21
  "gradient-string": "^3.0.0",
30
22
  "ignore": "^7.0.5",
31
23
  "picocolors": "^1.1.0",
32
- "update-notifier": "^7.3.1"
24
+ "update-notifier": "^7.3.1",
25
+ "@nebutra/brand": "0.1.1"
33
26
  },
34
27
  "devDependencies": {
35
- "@types/node": "catalog:",
28
+ "@types/node": "^25.9.1",
36
29
  "@types/update-notifier": "^6.0.8",
37
- "tsup": "catalog:",
38
- "typescript": "catalog:",
39
- "vitest": "catalog:"
30
+ "tsup": "^8.5.1",
31
+ "typescript": "^5.9.3",
32
+ "vitest": "^4.1.4"
40
33
  },
41
34
  "engines": {
42
35
  "node": ">=20.9.0"
@@ -80,5 +73,12 @@
80
73
  "publishConfig": {
81
74
  "access": "public",
82
75
  "registry": "https://registry.npmjs.org/"
76
+ },
77
+ "scripts": {
78
+ "dev": "tsup --watch",
79
+ "build": "tsup",
80
+ "start": "node dist/index.js",
81
+ "test": "vitest run",
82
+ "test:watch": "vitest"
83
83
  }
84
- }
84
+ }
@@ -0,0 +1,63 @@
1
+ # License
2
+
3
+ This project was scaffolded with the official
4
+ [`create-sailor`](https://www.npmjs.com/package/create-sailor) CLI.
5
+
6
+ **The Nebutra-Sailor code in this project is licensed to you under the MIT
7
+ License, reproduced below. You may build and ship a commercial product on it,
8
+ keep your source closed, and owe nothing.**
9
+
10
+ There is no fee, no licence key, no registration, no revenue threshold, no
11
+ headcount threshold, and no attribution requirement.
12
+
13
+ > Earlier versions of this file described a "Nebutra-Sailor Independent
14
+ > Developer License" limited to ≤ 1 FTE and < $1M ARR, with a paid tier above
15
+ > that. Those tiers were retired on 2026-07-26 and no longer apply to anything.
16
+ > See <https://github.com/Nebutra/Nebutra-Sailor/blob/main/docs/legal/license-history.md>.
17
+
18
+ ---
19
+
20
+ ## MIT License
21
+
22
+ Copyright (c) 2026 Wuxi Nebutra Intelligence Technology Co., Ltd.
23
+
24
+ Permission is hereby granted, free of charge, to any person obtaining a copy
25
+ of this software and associated documentation files (the "Software"), to deal
26
+ in the Software without restriction, including without limitation the rights
27
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
28
+ copies of the Software, and to permit persons to whom the Software is
29
+ furnished to do so, subject to the following conditions:
30
+
31
+ The above copyright notice and this permission notice shall be included in all
32
+ copies or substantial portions of the Software.
33
+
34
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
37
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
38
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
39
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
40
+ SOFTWARE.
41
+
42
+ ---
43
+
44
+ ## Your own code
45
+
46
+ This licence covers the Nebutra-Sailor scaffold. **Code you write in this
47
+ project is yours** — replace this file with your own licence whenever you like.
48
+ Nothing here constrains that choice.
49
+
50
+ ## The upstream repository
51
+
52
+ The [Nebutra-Sailor monorepo](https://github.com/Nebutra/Nebutra-Sailor) is
53
+ licensed under **FSL-1.1-ALv2**, which converts to Apache-2.0 two years after
54
+ each release. That licence permits every use except selling a substitute for
55
+ Sailor itself. It does not apply to this scaffolded project, which is MIT as
56
+ stated above.
57
+
58
+ ## Optional paid tiers
59
+
60
+ Nothing is gated behind them. They sell support, response SLAs,
61
+ indemnification, compliance paperwork, and trademark / white-label rights —
62
+ not permission to use the software. See
63
+ <https://github.com/Nebutra/Nebutra-Sailor/blob/main/LICENSE-COMMERCIAL.md>.
@@ -5,6 +5,6 @@
5
5
  /* Pull in Nebutra design tokens (brand colors, semantic scales, gradients). */
6
6
  @import "@nebutra/tokens/styles.css";
7
7
 
8
- /* Tell Tailwind v4 to scan @nebutra/ui source so its utility classes compile. */
9
- @source "../node_modules/@nebutra/ui/src/**/*.{ts,tsx}";
8
+ /* Package-owned Tailwind source scan for @nebutra/ui CVA classes. */
9
+ @import "@nebutra/ui/styles/sources.css";
10
10
  @source "../node_modules/fumadocs-ui/dist/**/*.js";
@@ -1,3 +1,15 @@
1
+ /**
2
+ * Sample Inngest welcome-email function for scaffolds.
3
+ *
4
+ * Production path: swap the step body for `@nebutra/email` once the
5
+ * generated project has a real email provider env (RESEND_API_KEY etc.):
6
+ *
7
+ * import { sendEmail } from "@nebutra/email";
8
+ * await sendEmail({ to: event.data.email, template: "welcome", ... });
9
+ *
10
+ * Until then this is intentionally sample-only — returns the intended
11
+ * recipient so the workflow is testable without sending mail.
12
+ */
1
13
  import { Inngest } from "inngest";
2
14
 
3
15
  export const inngest = new Inngest({ id: "{PRODUCT_NAME}" });
@@ -7,8 +19,12 @@ export const welcomeEmail = inngest.createFunction(
7
19
  { event: "user/created" },
8
20
  async ({ event, step }) => {
9
21
  await step.run("send-welcome", async () => {
10
- // TODO: dispatch via @nebutra/email
11
- return { to: event.data.email };
22
+ // Sample-only: do not send until @nebutra/email + provider keys are wired.
23
+ return {
24
+ to: event.data.email,
25
+ status: "sample-only",
26
+ hint: "Replace with sendEmail() from @nebutra/email",
27
+ };
12
28
  });
13
29
  },
14
30
  );
@@ -1 +0,0 @@
1
- import{a}from"./chunk-5LSLUC7O.js";import"./chunk-QSLKOXQ6.js";import"./chunk-ZIBRKYXP.js";import"./chunk-YHGYZK4L.js";import"./chunk-M3QJPQWS.js";import"./chunk-DATQDZ23.js";import"./chunk-M2Z4KZL3.js";import"./chunk-IY2KKEUD.js";import"./chunk-ZCWB3HFB.js";import"./chunk-WI7DO2VU.js";import"./chunk-224RJRPV.js";import"./chunk-CHWVD37K.js";import"./chunk-XB6R2VIU.js";import"./chunk-3T4EOSMQ.js";import"./chunk-TX7AAHER.js";import"./chunk-IYWUY3VA.js";export{a as AWSKMSProvider};
@@ -1,5 +0,0 @@
1
- import{b as H,c as W,d as J}from"./chunk-XB6R2VIU.js";var $=class{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;let r=t;return typeof r.statusCode=="number"&&typeof r.headers=="object"}};var I=e=>encodeURIComponent(e).replace(/[!'()*]/g,ue),ue=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function Y(e){let t=[];for(let r of Object.keys(e).sort()){let o=e[r];if(r=I(r),Array.isArray(o))for(let n=0,i=o.length;n<i;n++)t.push(`${r}=${I(o[n])}`);else{let n=r;(o||typeof o=="string")&&(n+=`=${I(o)}`),t.push(n)}}return t.join("&")}import{Agent as O,request as ge}from"https";function D(e){let t=e&&typeof e=="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){let n=new Error("Request aborted");return n.name="AbortError",n.cause=t,n}let o=new Error(String(t));return o.name="AbortError",o}let r=new Error("Request aborted");return r.name="AbortError",r}var K=["ECONNRESET","EPIPE","ETIMEDOUT"];var V=e=>{let t={};for(let r of Object.keys(e)){let o=e[r];t[r]=Array.isArray(o)?o.join(","):o}return t};var u={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)};var X=1e3,z=(e,t,r=0)=>{if(!r)return-1;let o=n=>{let i=u.setTimeout(()=>{e.destroy(),t(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${r} ms.`),{name:"TimeoutError"}))},r-n),s=c=>{c?.connecting?c.on("connect",()=>{u.clearTimeout(i)}):u.clearTimeout(i)};e.socket?s(e.socket):e.on("socket",s)};return r<2e3?(o(0),0):u.setTimeout(o.bind(null,X),X)};var G=(e,t,r=0,o,n)=>r?u.setTimeout(()=>{let i=`@smithy/node-http-handler - [${o?"ERROR":"WARN"}] a request has exceeded the configured ${r} ms requestTimeout.`;if(o){let s=Object.assign(new Error(i),{name:"TimeoutError",code:"ETIMEDOUT"});e.destroy(s),t(s)}else i+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",n?.warn?.(i)},r):-1;var pe=3e3,Z=(e,{keepAlive:t,keepAliveMsecs:r},o=pe)=>{if(t!==!0)return-1;let n=()=>{e.socket?e.socket.setKeepAlive(t,r||0):e.on("socket",i=>{i.setKeepAlive(t,r||0)})};return o===0?(n(),0):u.setTimeout(n,o)};var Q=3e3,q=(e,t,r=0)=>{let o=n=>{let i=r-n,s=()=>{e.destroy(),t(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${r} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};e.socket?(e.socket.setTimeout(i,s),e.on("close",()=>e.socket?.removeListener("timeout",s))):e.setTimeout(i,s)};return 0<r&&r<6e3?(o(0),0):u.setTimeout(o.bind(null,r===0?0:Q),Q)};import{Readable as me}from"stream";var v=6e3;async function ee(e,t,r=v,o=!1){let n=t.headers??{},i=n.Expect||n.expect,s=-1,c=!0;!o&&i==="100-continue"&&(c=await Promise.race([new Promise(f=>{s=Number(u.setTimeout(()=>f(!0),Math.max(v,r)))}),new Promise(f=>{e.on("continue",()=>{u.clearTimeout(s),f(!0)}),e.on("response",()=>{u.clearTimeout(s),f(!1)}),e.on("error",()=>{u.clearTimeout(s),f(!1)})})])),c&&he(e,t.body)}function he(e,t){if(t instanceof me){t.pipe(e);return}if(t){let r=Buffer.isBuffer(t);if(r||typeof t=="string"){r&&t.byteLength===0?e.end():e.end(t);return}let n=t;if(typeof n=="object"&&n.buffer&&typeof n.byteOffset=="number"&&typeof n.byteLength=="number"){e.end(Buffer.from(n.buffer,n.byteOffset,n.byteLength));return}e.end(Buffer.from(t));return}e.end()}var C,te,re=class e{config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(t){return typeof t?.handle=="function"?t:new e(t)}static checkSocketUsage(t,r,o=console){let{sockets:n,requests:i,maxSockets:s}=t;if(typeof s!="number"||s===1/0||Date.now()-15e3<r)return r;if(n&&i)for(let f in n){let a=n[f]?.length??0,m=i[f]?.length??0;if(a>=s&&m>=2*s)return o?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${a} and ${m} additional requests are enqueued.
2
- See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return r}constructor(t){this.configProvider=new Promise((r,o)=>{typeof t=="function"?t().then(n=>{r(this.resolveDefaultConfig(n))}).catch(o):r(this.resolveDefaultConfig(t))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(t,{abortSignal:r,requestTimeout:o}={}){this.config||(this.config=await this.configProvider);let n=this.config,i=t.protocol==="https:";return!i&&!this.config.httpAgent&&(this.config.httpAgent=await this.config.httpAgentProvider()),new Promise((s,c)=>{let f,a=[],m=async d=>{await f,a.forEach(u.clearTimeout),s(d)},p=async d=>{await f,a.forEach(u.clearTimeout),c(d)};if(r?.aborted){let d=D(r);p(d);return}let g=t.headers??{},x=(g.Expect??g.expect)==="100-continue",T=i?n.httpsAgent:n.httpAgent;x&&!this.externalAgent&&(T=new(i?O:C)({keepAlive:!1,maxSockets:1/0})),a.push(u.setTimeout(()=>{this.socketWarningTimestamp=e.checkSocketUsage(T,this.socketWarningTimestamp,n.logger)},n.socketAcquisitionWarningTimeout??(n.requestTimeout??2e3)+(n.connectionTimeout??1e3)));let P=Y(t.query||{}),L;if(t.username!=null||t.password!=null){let d=t.username??"",y=t.password??"";L=`${d}:${y}`}let M=t.path;P&&(M+=`?${P}`),t.fragment&&(M+=`#${t.fragment}`);let b=t.hostname??"";b[0]==="["&&b.endsWith("]")?b=t.hostname.slice(1,-1):b=t.hostname;let B={headers:t.headers,host:b,method:t.method,path:M,port:t.port,agent:T,auth:L},l=(i?ge:te)(B,d=>{let y=new $({statusCode:d.statusCode||-1,reason:d.statusMessage,headers:V(d.headers),body:d});m({response:y})});if(l.on("error",d=>{K.includes(d.code)?p(Object.assign(d,{name:"TimeoutError"})):p(d)}),r){let d=()=>{l.destroy();let y=D(r);p(y)};if(typeof r.addEventListener=="function"){let y=r;y.addEventListener("abort",d,{once:!0}),l.once("close",()=>y.removeEventListener("abort",d))}else r.onabort=d}let j=o??n.requestTimeout;a.push(z(l,p,n.connectionTimeout)),a.push(G(l,p,j,n.throwOnRequestTimeout,n.logger??console)),a.push(q(l,p,n.socketTimeout));let A=B.agent;typeof A=="object"&&"keepAlive"in A&&a.push(Z(l,{keepAlive:A.keepAlive,keepAliveMsecs:A.keepAliveMsecs})),f=ee(l,t,j,this.externalAgent).catch(d=>(a.forEach(u.clearTimeout),c(d)))})}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(o=>({...o,[t]:r}))}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(t){let{requestTimeout:r,connectionTimeout:o,socketTimeout:n,socketAcquisitionWarningTimeout:i,httpAgent:s,httpsAgent:c,throwOnRequestTimeout:f,logger:a}=t||{},m=!0,p=50;return{connectionTimeout:o,requestTimeout:r,socketTimeout:n,socketAcquisitionWarningTimeout:i,throwOnRequestTimeout:f,httpAgentProvider:async()=>{let{Agent:g,request:x}=await import("http");return te=x,C=g,s instanceof C||typeof s?.destroy=="function"?(this.externalAgent=!0,s):new C({keepAlive:m,maxSockets:p,...s})},httpsAgent:c instanceof O||typeof c?.destroy=="function"?(this.externalAgent=!0,c):new O({keepAlive:m,maxSockets:p,...c}),logger:a}}};import{Writable as le}from"stream";var R=class extends le{bufferedBytes=[];_write(t,r,o){this.bufferedBytes.push(t),o()}};var bt=e=>ye(e)?Te(e):new Promise((t,r)=>{let o=new R;e.pipe(o),e.on("error",n=>{o.end(),r(n)}),o.on("error",r),o.on("finish",function(){let n=new Uint8Array(Buffer.concat(this.bufferedBytes));t(n)})}),ye=e=>typeof ReadableStream=="function"&&e instanceof ReadableStream;async function Te(e){let t=[],r=e.getReader(),o=!1,n=0;for(;!o;){let{done:c,value:f}=await r.read();f&&(t.push(f),n+=f.length),o=c}let i=new Uint8Array(n),s=0;for(let c of t)i.set(c,s),s+=c.length;return i}var k=e=>{if(e!=null){if(typeof e=="string"){let t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&Ae.warn(Se(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},Ee=Math.ceil(34028234663852886e22),ne=e=>{let t=k(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>Ee)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},we=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}};var oe=e=>ie(e,16),se=e=>ie(e,8),ie=(e,t)=>{let r=we(e);if(r!==void 0&&xe(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},xe=(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]}};var ce=e=>k(typeof e=="string"?N(e):e);var fe=e=>ne(typeof e=="string"?N(e):e),be=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,N=e=>{let t=e.match(be);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)};var E=e=>oe(typeof e=="string"?N(e):e),ae=e=>se(typeof e=="string"?N(e):e),Se=e=>String(new TypeError(e).stack||e).split(`
4
- `).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
5
- `),Ae={warn:console.warn};var $e=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],F=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function It(e){let t=e.getUTCFullYear(),r=e.getUTCMonth(),o=e.getUTCDay(),n=e.getUTCDate(),i=e.getUTCHours(),s=e.getUTCMinutes(),c=e.getUTCSeconds(),f=n<10?`0${n}`:`${n}`,a=i<10?`0${i}`:`${i}`,m=s<10?`0${s}`:`${s}`,p=c<10?`0${c}`:`${c}`;return`${$e[o]}, ${f} ${F[r]} ${t} ${a}:${m}:${p} GMT`}var Ie=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Ct=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=Ie.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,o,n,i,s,c,f,a]=t,m=E(w(o)),p=h(n,"month",1,12),g=h(i,"day",1,31);return S(m,p,g,{hours:s,minutes:c,seconds:f,fractionalMilliseconds:a})},Ce=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Rt=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=Ce.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,o,n,i,s,c,f,a,m]=t,p=E(w(o)),g=h(n,"month",1,12),x=h(i,"day",1,31),T=S(p,g,x,{hours:s,minutes:c,seconds:f,fractionalMilliseconds:a});return m.toUpperCase()!="Z"&&T.setTime(T.getTime()-Le(m)),T},Re=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$/),Ne=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$/),Me=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})$/),Nt=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=Re.exec(e);if(t){let[r,o,n,i,s,c,f,a]=t;return S(E(w(i)),U(n),h(o,"day",1,31),{hours:s,minutes:c,seconds:f,fractionalMilliseconds:a})}if(t=Ne.exec(e),t){let[r,o,n,i,s,c,f,a]=t;return ke(S(De(i),U(n),h(o,"day",1,31),{hours:s,minutes:c,seconds:f,fractionalMilliseconds:a}))}if(t=Me.exec(e),t){let[r,o,n,i,s,c,f,a]=t;return S(E(w(a)),U(o),h(n.trimLeft(),"day",1,31),{hours:i,minutes:s,seconds:c,fractionalMilliseconds:f})}throw new TypeError("Invalid RFC-7231 date-time value")},Mt=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=ce(e);else if(typeof e=="object"&&e.tag===1)t=e.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1e3))},S=(e,t,r,o)=>{let n=t-1;return Fe(e,n,r),new Date(Date.UTC(e,n,r,h(o.hours,"hour",0,23),h(o.minutes,"minute",0,59),h(o.seconds,"seconds",0,60),Pe(o.fractionalMilliseconds)))},De=e=>{let t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+E(w(e));return r<t?r+100:r},Oe=50*365*24*60*60*1e3,ke=e=>e.getTime()-new Date().getTime()>Oe?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,U=e=>{let t=F.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Ue=[31,28,31,30,31,30,31,31,30,31,30,31],Fe=(e,t,r)=>{let o=Ue[t];if(t===1&&_e(e)&&(o=29),r>o)throw new TypeError(`Invalid day for ${F[t]} in ${e}: ${r}`)},_e=e=>e%4===0&&(e%100!==0||e%400===0),h=(e,t,r,o)=>{let n=ae(w(e));if(n<r||n>o)throw new TypeError(`${t} must be between ${r} and ${o}, inclusive`);return n},Pe=e=>e==null?0:fe("0."+e)*1e3,Le=e=>{let t=e[0],r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);let o=Number(e.substring(1,3)),n=Number(e.substring(4,6));return r*(o*60+n)*60*1e3},w=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)};var Be=/^[A-Za-z0-9+/]*={0,2}$/,kt=e=>{if(e.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Be.exec(e))throw new TypeError("Invalid base64 string.");let t=W(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};var Pt=e=>{let t;if(typeof e=="string"?t=J(e):t=e,typeof t!="object"||typeof t.byteOffset!="number"||typeof t.byteLength!="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return H(t.buffer,t.byteOffset,t.byteLength).toString("base64")};var de={},_={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),de[e]=t,_[t]=e}function Bt(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){let o=e.slice(r,r+2).toLowerCase();if(o in _)t[r/2]=_[o];else throw new Error(`Cannot decode unrecognized sequence ${o} as hexadecimal`)}return t}function jt(e){let t="";for(let r=0;r<e.byteLength;r++)t+=de[e[r]];return t}export{$ as a,kt as b,Pt as c,I as d,re as e,bt as f,Bt as g,jt as h,It as i,Ct as j,Rt as k,Nt as l,Mt as m};
@@ -1,2 +0,0 @@
1
- import{b as d,c as b,f as p,h as y}from"./chunk-224RJRPV.js";import{b as u,e as m}from"./chunk-XB6R2VIU.js";import{Readable as c}from"stream";var w=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):E(e):x(e);async function E(e){let o=await T(e),n=d(o);return new Uint8Array(n)}async function x(e){let o=[],n=e.getReader(),t=!1,r=0;for(;!t;){let{done:f,value:i}=await n.read();i&&(o.push(i),r+=i.length),t=f}let a=new Uint8Array(r),s=0;for(let f of o)a.set(f,s),s+=f.length;return a}function T(e){return new Promise((o,n)=>{let t=new FileReader;t.onloadend=()=>{if(t.readyState!==2)return n(new Error("Reader aborted too early"));let r=t.result??"",a=r.indexOf(","),s=a>-1?a+1:r.length;o(r.substring(s))},t.onabort=()=>n(new Error("Read aborted")),t.onerror=()=>n(t.error),t.readAsDataURL(e)})}var l=e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream);var h="The stream has already been transformed.",S=e=>{if(!B(e)&&!l(e)){let r=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${r}`)}let o=!1,n=async()=>{if(o)throw new Error(h);return o=!0,await w(e)},t=r=>{if(typeof r.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
2
- If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return r.stream()};return Object.assign(e,{transformToByteArray:n,transformToString:async r=>{let a=await n();if(r==="base64")return b(a);if(r==="hex")return y(a);if(r===void 0||r==="utf8"||r==="utf-8")return m(a);if(typeof TextDecoder=="function")return new TextDecoder(r).decode(a);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(o)throw new Error(h);if(o=!0,B(e))return t(e);if(l(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},B=e=>typeof Blob=="function"&&e instanceof Blob;var R="The stream has already been transformed.",I=e=>{if(!(e instanceof c))try{return S(e)}catch{let r=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${r}`)}let o=!1,n=async()=>{if(o)throw new Error(R);return o=!0,await p(e)};return Object.assign(e,{transformToByteArray:n,transformToString:async t=>{let r=await n();return t===void 0||Buffer.isEncoding(t)?u(r.buffer,r.byteOffset,r.byteLength).toString(t):new TextDecoder(t).decode(r)},transformToWebStream:()=>{if(o)throw new Error(R);if(e.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof c.toWeb!="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return o=!0,c.toWeb(e)}})};export{I as a};
@@ -1 +0,0 @@
1
- import{a as H,b as q,c as O}from"./chunk-U4BHGI6P.js";import{a as J,b as F}from"./chunk-DATQDZ23.js";import{N as U,j as z,m as I,n as g,p as $,q as Q,s as T,t as V,u as v}from"./chunk-M2Z4KZL3.js";import{a as D}from"./chunk-2YUF6TO6.js";import{c as B,i as j}from"./chunk-224RJRPV.js";import{a as N}from"./chunk-CHWVD37K.js";import{d as R,e as k}from"./chunk-XB6R2VIU.js";function W(b){return(b.includes(",")||b.includes('"'))&&(b=`"${b.replace(/"/g,'\\"')}"`),b}function Z(b,i,t){if(t<=0||!Number.isInteger(t))throw new Error("Invalid number of delimiters ("+t+") for splitEvery.");let e=b.split(i);if(t===1)return e;let r=[],o="";for(let s=0;s<e.length;s++)o===""?o=e[s]:o+=i+e[s],(s+1)%t===0&&(r.push(o),o="");return o!==""&&r.push(o),r}var x=class extends V{async serializeRequest(i,t,e){let r={...t??{}},o=this.serializer,s={},h={},c=await e.endpoint(),d=g.of(i?.input),S=[],p=[],y=!1,m,n=new N({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:s,headers:h,body:void 0});if(c){this.updateServiceEndpoint(n,c),this.setHostPrefix(n,i,r);let a=I(i.traits);if(a.http){n.method=a.http[0];let[f,l]=a.http[1].split("?");n.path=="/"?n.path=f:n.path+=f;let u=new URLSearchParams(l??"");Object.assign(s,Object.fromEntries(u))}}for(let[a,f]of d.structIterator()){let l=f.getMergedTraits()??{},u=r[a];if(u==null&&!f.isIdempotencyToken()){if(l.httpLabel&&(n.path.includes(`{${a}+}`)||n.path.includes(`{${a}}`)))throw new Error(`No value provided for input HTTP label: ${a}.`);continue}if(l.httpPayload)f.isStreaming()?f.isStructSchema()?r[a]&&(m=await this.serializeEventStream({eventStream:r[a],requestSchema:d})):m=u:(o.write(f,u),m=o.flush()),delete r[a];else if(l.httpLabel){o.write(f,u);let w=o.flush();n.path.includes(`{${a}+}`)?n.path=n.path.replace(`{${a}+}`,w.split("/").map(H).join("/")):n.path.includes(`{${a}}`)&&(n.path=n.path.replace(`{${a}}`,H(w))),delete r[a]}else if(l.httpHeader)o.write(f,u),h[l.httpHeader.toLowerCase()]=String(o.flush()),delete r[a];else if(typeof l.httpPrefixHeaders=="string"){for(let[w,P]of Object.entries(u)){let L=l.httpPrefixHeaders+w;o.write([f.getValueSchema(),{httpHeader:L}],P),h[L.toLowerCase()]=o.flush()}delete r[a]}else l.httpQuery||l.httpQueryParams?(this.serializeQuery(f,u,s),delete r[a]):(y=!0,S.push(a),p.push(f))}if(y&&r){let[a,f]=(d.getName(!0)??"#Unknown").split("#"),l=d.getSchema()[6],u=[3,a,f,d.getMergedTraits(),S,p,void 0];l?u[6]=l:u.pop(),o.write(u,r),m=o.flush()}return n.headers=h,n.query=s,n.body=m,n}serializeQuery(i,t,e){let r=this.serializer,o=i.getMergedTraits();if(o.httpQueryParams){for(let[s,h]of Object.entries(t))if(!(s in e)){let c=i.getValueSchema();Object.assign(c.getMergedTraits(),{...o,httpQuery:s,httpQueryParams:void 0}),this.serializeQuery(c,h,e)}return}if(i.isListSchema()){let s=!!i.getMergedTraits().sparse,h=[];for(let c of t){r.write([i.getValueSchema(),o],c);let d=r.flush();(s||d!==void 0)&&h.push(d)}e[o.httpQuery]=h}else r.write([i,o],t),e[o.httpQuery]=r.flush()}async deserializeResponse(i,t,e){let r=this.deserializer,o=g.of(i.output),s={};if(e.statusCode>=300){let c=await z(e.body,t);throw c.byteLength>0&&Object.assign(s,await r.read(15,c)),await this.handleError(i,t,e,s,this.deserializeMetadata(e)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(let c in e.headers){let d=e.headers[c];delete e.headers[c],e.headers[c.toLowerCase()]=d}let h=await this.deserializeHttpMessage(o,t,e,s);if(h.length){let c=await z(e.body,t);if(c.byteLength>0){let d=await r.read(o,c);for(let S of h)d[S]!=null&&(s[S]=d[S])}}else h.discardResponseBody&&await z(e.body,t);return s.$metadata=this.deserializeMetadata(e),s}async deserializeHttpMessage(i,t,e,r,o){let s;r instanceof Set?s=o:s=r;let h=!0,c=this.deserializer,d=g.of(i),S=[];for(let[p,y]of d.structIterator()){let m=y.getMemberTraits();if(m.httpPayload){if(h=!1,y.isStreaming())y.isStructSchema()?s[p]=await this.deserializeEventStream({response:e,responseSchema:d}):s[p]=D(e.body);else if(e.body){let a=await z(e.body,t);a.byteLength>0&&(s[p]=await c.read(y,a))}}else if(m.httpHeader){let n=String(m.httpHeader).toLowerCase(),a=e.headers[n];if(a!=null)if(y.isListSchema()){let f=y.getValueSchema();f.getMergedTraits().httpHeader=n;let l;f.isTimestampSchema()&&f.getSchema()===4?l=Z(a,",",2):l=q(a);let u=[];for(let w of l)u.push(await c.read(f,w.trim()));s[p]=u}else s[p]=await c.read(y,a)}else if(m.httpPrefixHeaders!==void 0){s[p]={};for(let[n,a]of Object.entries(e.headers))if(n.startsWith(m.httpPrefixHeaders)){let f=y.getValueSchema();f.getMergedTraits().httpHeader=n,s[p][n.slice(m.httpPrefixHeaders.length)]=await c.read(f,a)}}else m.httpResponseCode?s[p]=e.statusCode:S.push(p)}return S.discardResponseBody=h,S}};var M=class extends T{codecDeserializer;stringDeserializer;constructor(i,t){super(),this.codecDeserializer=i,this.stringDeserializer=new O(t)}setSerdeContext(i){this.stringDeserializer.setSerdeContext(i),this.codecDeserializer.setSerdeContext(i),this.serdeContext=i}read(i,t){let e=g.of(i),r=e.getMergedTraits(),o=this.serdeContext?.utf8Encoder??k;if(r.httpHeader||r.httpResponseCode)return this.stringDeserializer.read(e,o(t));if(r.httpPayload){if(e.isBlobSchema()){let s=this.serdeContext?.utf8Decoder??R;return typeof t=="string"?s(t):t}else if(e.isStringSchema())return"byteLength"in t?o(t):t}return this.codecDeserializer.read(e,t)}};var E=class extends T{settings;stringBuffer="";constructor(i){super(),this.settings=i}write(i,t){let e=g.of(i);switch(typeof t){case"object":if(t===null){this.stringBuffer="null";return}if(e.isTimestampSchema()){if(!(t instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${t} when schema expected Date in ${e.getName(!0)}`);switch(v(e,this.settings)){case 5:this.stringBuffer=t.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=j(t);break;case 7:this.stringBuffer=String(t.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",t),this.stringBuffer=String(t.getTime()/1e3)}return}if(e.isBlobSchema()&&"byteLength"in t){this.stringBuffer=(this.serdeContext?.base64Encoder??B)(t);return}if(e.isListSchema()&&Array.isArray(t)){let s="";for(let h of t){this.write([e.getValueSchema(),e.getMergedTraits()],h);let c=this.flush(),d=e.getValueSchema().isTimestampSchema()?c:W(c);s!==""&&(s+=", "),s+=d}this.stringBuffer=s;return}this.stringBuffer=JSON.stringify(t,null,2);break;case"string":let r=e.getMergedTraits().mediaType,o=t;if(r&&((r==="application/json"||r.endsWith("+json"))&&(o=Q.from(o)),e.getMergedTraits().httpHeader)){this.stringBuffer=(this.serdeContext?.base64Encoder??B)(o.toString());return}this.stringBuffer=t;break;default:e.isIdempotencyToken()?this.stringBuffer=$():this.stringBuffer=String(t)}}flush(){let i=this.stringBuffer;return this.stringBuffer="",i}};var C=class{codecSerializer;stringSerializer;buffer;constructor(i,t,e=new E(t)){this.codecSerializer=i,this.stringSerializer=e}setSerdeContext(i){this.codecSerializer.setSerdeContext(i),this.stringSerializer.setSerdeContext(i)}write(i,t){let e=g.of(i),r=e.getMergedTraits();if(r.httpHeader||r.httpLabel||r.httpQuery){this.stringSerializer.write(e,t),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(e,t)}flush(){if(this.buffer!==void 0){let i=this.buffer;return this.buffer=void 0,i}return this.codecSerializer.flush()}};var A=class extends x{serializer;deserializer;codec;mixin=new U;constructor({defaultNamespace:i,errorTypeRegistries:t}){super({defaultNamespace:i,errorTypeRegistries:t});let e={timestampFormat:{useTrait:!0,default:7},httpBindings:!0,jsonName:!0};this.codec=new F(e),this.serializer=new C(this.codec.createSerializer(),e),this.deserializer=new M(this.codec.createDeserializer(),e)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(i){this.codec.setSerdeContext(i),super.setSerdeContext(i)}async serializeRequest(i,t,e){let r=await super.serializeRequest(i,t,e),o=g.of(i.input);if(!r.headers["content-type"]){let s=this.mixin.resolveRestContentType(this.getDefaultContentType(),o);s&&(r.headers["content-type"]=s)}return r.body==null&&r.headers["content-type"]===this.getDefaultContentType()&&(r.body="{}"),r}async deserializeResponse(i,t,e){let r=await super.deserializeResponse(i,t,e),o=g.of(i.output);for(let[s,h]of o.structIterator())h.getMemberTraits().httpPayload&&!(s in r)&&(r[s]=null);return r}async handleError(i,t,e,r,o){let s=J(e,r)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,s,this.options.defaultNamespace);let{errorSchema:h,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(s,this.options.defaultNamespace,e,r,o),d=g.of(h),S=r.message??r.Message??"UnknownError",p=this.compositeErrorRegistry.getErrorCtor(h)??Error,y=new p(S);await this.deserializeHttpMessage(h,t,e,r);let m={};for(let[n,a]of d.structIterator()){let f=a.getMergedTraits().jsonName??n;m[n]=this.codec.createDeserializer().readObject(a,r[f])}throw this.mixin.decorateServiceException(Object.assign(y,c,{$fault:d.getMergedTraits().error,message:S},m),r)}getDefaultContentType(){return"application/json"}};export{A as a};