@kya-os/mcp-i 1.7.13 → 1.9.0

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 (51) hide show
  1. package/dist/114.js +1 -0
  2. package/dist/139.js +1 -0
  3. package/dist/200.js +1 -0
  4. package/dist/202.js +1 -0
  5. package/dist/238.js +1 -0
  6. package/dist/263.js +1 -0
  7. package/dist/294.js +1 -0
  8. package/dist/295.js +1 -1
  9. package/dist/374.js +1 -0
  10. package/dist/529.js +1 -0
  11. package/dist/627.js +1 -0
  12. package/dist/644.js +1 -0
  13. package/dist/669.js +1 -0
  14. package/dist/857.js +1 -0
  15. package/dist/866.js +1 -1
  16. package/dist/{941.js → 966.js} +1 -1
  17. package/dist/997.js +1 -0
  18. package/dist/providers/node-providers.d.ts +1 -1
  19. package/dist/providers/node-providers.js +2 -2
  20. package/dist/runtime/adapter-express.js +6 -6
  21. package/dist/runtime/adapter-nextjs.js +6 -6
  22. package/dist/runtime/auth-handshake.d.ts +4 -159
  23. package/dist/runtime/auth-handshake.js +8 -249
  24. package/dist/runtime/http.js +6 -6
  25. package/dist/runtime/mcpi-runtime.d.ts +4 -0
  26. package/dist/runtime/mcpi-runtime.js +58 -43
  27. package/dist/runtime/outbound-delegation.d.ts +34 -0
  28. package/dist/runtime/outbound-delegation.js +134 -0
  29. package/dist/runtime/proof.d.ts +13 -88
  30. package/dist/runtime/proof.js +11 -225
  31. package/dist/runtime/request-context.d.ts +41 -0
  32. package/dist/runtime/request-context.js +48 -0
  33. package/dist/runtime/session.d.ts +13 -104
  34. package/dist/runtime/session.js +31 -267
  35. package/dist/runtime/stdio.js +6 -6
  36. package/dist/runtime/utils/tools.js +17 -3
  37. package/package.json +18 -18
  38. package/dist/207.js +0 -1
  39. package/dist/25.js +0 -1
  40. package/dist/360.js +0 -1
  41. package/dist/387.js +0 -1
  42. package/dist/406.js +0 -1
  43. package/dist/448.js +0 -1
  44. package/dist/478.js +0 -1
  45. package/dist/575.js +0 -1
  46. package/dist/67.js +0 -1
  47. package/dist/743.js +0 -1
  48. package/dist/784.js +0 -1
  49. package/dist/844.js +0 -1
  50. package/dist/936.js +0 -1
  51. package/dist/988.js +0 -1
package/dist/114.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";exports.id=114,exports.ids=[114],exports.modules={2114:(e,t,s)=>{s.d(t,{GetRoleCredentialsCommand:()=>z,SSOClient:()=>pt});var r=s(66686),o=s(22869);const n={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var i=s(51453),a=s(6723);class c extends a.T{constructor(e){super(e),Object.setPrototypeOf(this,c.prototype)}}class p extends c{name="InvalidRequestException";$fault="client";constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,p.prototype)}}class d extends c{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,d.prototype)}}class u extends c{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,u.prototype)}}class l extends c{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,l.prototype)}}const h="client",g="error",m="http",f="httpError",y="httpHeader",S="httpQuery",v="message",P="smithy.ts.sdk.synthetic.com.amazonaws.sso",E="com.amazonaws.sso",x=i.O.for(P);var I=[-3,P,"SSOServiceException",0,[],[]];x.registerError(I,c);const k=i.O.for(E);var R=[-3,E,"InvalidRequestException",{[g]:h,[f]:400},[v],[0]];k.registerError(R,p);var b=[-3,E,"ResourceNotFoundException",{[g]:h,[f]:404},[v],[0]];k.registerError(b,d);var w=[-3,E,"TooManyRequestsException",{[g]:h,[f]:429},[v],[0]];k.registerError(w,u);var A=[-3,E,"UnauthorizedException",{[g]:h,[f]:401},[v],[0]];k.registerError(A,l);const C=[x,k];var D=[0,E,"AccessTokenType",8,0],O=[0,E,"SecretAccessKeyType",8,0],F=[0,E,"SessionTokenType",8,0],T=[3,E,"GetRoleCredentialsRequest",0,["roleName","accountId","accessToken"],[[0,{[S]:"role_name"}],[0,{[S]:"account_id"}],[()=>D,{[y]:"x-amz-sso_bearer_token"}]],3],q=[3,E,"GetRoleCredentialsResponse",0,["roleCredentials"],[[()=>U,0]]],U=[3,E,"RoleCredentials",0,["accessKeyId","secretAccessKey","sessionToken","expiration"],[0,[()=>O,0],[()=>F,0],1]],$=[9,E,"GetRoleCredentials",{[m]:["GET","/federation/credentials",200]},()=>T,()=>q];class z extends(o.u.classBuilder().ep(n).m(function(e,t,s,o){return[(0,r.r)(s,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc($).build()){}var j=s(97040),G=s(74534),M=s(70775),H=s(86693),N=s(66575),Z=s(94615),K=s(45326),L=s(9575),V=s(68249),_=s(75279),B=s(10860),W=s(39412),Y=s(72084),Q=s(10773),J=s(9942),X=s(63089),ee=s(45547),te=s(81974);const se=async(e,t,s)=>({operation:(0,ee.u)(t).operation,region:await(0,te.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),re=e=>{const t=[];switch(e.operation){case"GetRoleCredentials":case"ListAccountRoles":case"ListAccounts":case"Logout":t.push({schemeId:"smithy.api#noAuth"});break;default:t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e))}return t};var oe=s(10706),ne=s(56232),ie=s(60803),ae=s(52005),ce=s(96901),pe=s(24661),de=s(46109),ue=s(5012),le=s(7387),he=s(24176),ge=s(64327),me=s(34338),fe=s(57815),ye=s(55425),Se=s(99816),ve=s(48828),Pe=s(70868),Ee=s(80843),xe=s(14433),Ie=s(3761),ke=s(67933),Re=s(12544),be=s(39181),we=s(40935),Ae=s(2914),Ce=s(53037),De=s(48105),Oe=s(1034),Fe=s(7856);const Te="required",qe="fn",Ue="argv",$e="ref",ze=!0,je="isSet",Ge="booleanEquals",Me="error",He="endpoint",Ne="tree",Ze="PartitionResult",Ke="getAttr",Le={[Te]:!1,type:"string"},Ve={[Te]:!0,default:!1,type:"boolean"},_e={[$e]:"Endpoint"},Be={[qe]:Ge,[Ue]:[{[$e]:"UseFIPS"},!0]},We={[qe]:Ge,[Ue]:[{[$e]:"UseDualStack"},!0]},Ye={},Qe={[qe]:Ke,[Ue]:[{[$e]:Ze},"supportsFIPS"]},Je={[$e]:Ze},Xe={[qe]:Ge,[Ue]:[!0,{[qe]:Ke,[Ue]:[Je,"supportsDualStack"]}]},et=[Be],tt=[We],st=[{[$e]:"Region"}],rt={version:"1.0",parameters:{Region:Le,UseDualStack:Ve,UseFIPS:Ve,Endpoint:Le},rules:[{conditions:[{[qe]:je,[Ue]:[_e]}],rules:[{conditions:et,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Me},{conditions:tt,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Me},{endpoint:{url:_e,properties:Ye,headers:Ye},type:He}],type:Ne},{conditions:[{[qe]:je,[Ue]:st}],rules:[{conditions:[{[qe]:"aws.partition",[Ue]:st,assign:Ze}],rules:[{conditions:[Be,We],rules:[{conditions:[{[qe]:Ge,[Ue]:[ze,Qe]},Xe],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ye,headers:Ye},type:He}],type:Ne},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Me}],type:Ne},{conditions:et,rules:[{conditions:[{[qe]:Ge,[Ue]:[Qe,ze]}],rules:[{conditions:[{[qe]:"stringEquals",[Ue]:[{[qe]:Ke,[Ue]:[Je,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:Ye,headers:Ye},type:He},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ye,headers:Ye},type:He}],type:Ne},{error:"FIPS is enabled but this partition does not support FIPS",type:Me}],type:Ne},{conditions:tt,rules:[{conditions:[Xe],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ye,headers:Ye},type:He}],type:Ne},{error:"DualStack is enabled but this partition does not support DualStack",type:Me}],type:Ne},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:Ye,headers:Ye},type:He}],type:Ne}],type:Ne},{error:"Invalid Configuration: Missing Region",type:Me}]},ot=new De.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),nt=(e,t={})=>ot.get(e,()=>(0,Oe.s)(rt,{endpointParams:e,logger:t.logger}));Fe.m.aws=Ce.UF;var it=s(93673),at=s(78646),ct=s(18081);class pt extends J.K{config;constructor(...[e]){const t=(e=>{(0,me.I)(process.version);const t=(0,Se.I)(e),s=()=>t().then(fe.l),r=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Re.E,base64Encoder:e?.base64Encoder??be.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??nt,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??re,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Pe.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new xe.m}],logger:e?.logger??new Ie.N,protocol:e?.protocol??Ee.Y,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:C,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??ke.D,utf8Decoder:e?.utf8Decoder??we.a,utf8Encoder:e?.utf8Encoder??Ae.P}))(e);(0,oe.I)(process.version);const o={profile:e?.profile,logger:r.logger};return{...r,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,le.Z)(ne.$,o),bodyLengthChecker:e?.bodyLengthChecker??ye.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,ie.pf)({serviceId:r.serviceId,clientVersion:"3.990.0"}),maxAttempts:e?.maxAttempts??(0,le.Z)(Y.qs,e),region:e?.region??(0,le.Z)(ce.GG,{...ce.zH,...o}),requestHandler:he.$.create(e?.requestHandler??s),retryMode:e?.retryMode??(0,le.Z)({...Y.kN,default:async()=>(await s()).retryMode||ve.L0},e),sha256:e?.sha256??ue.V.bind(null,"sha256"),streamCollector:e?.streamCollector??ge.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,le.Z)(pe.e$,o),useFipsEndpoint:e?.useFipsEndpoint??(0,le.Z)(de.Ko,o),userAgentAppId:e?.userAgentAppId??(0,le.Z)(ae.hV,o)}})(e||{});super(t),this.initConfig=t;const s=(r=t,Object.assign(r,{useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}));var r;const o=(0,H.D)(s),n=(0,Y.$z)(o),i=(0,Z.T)(n),a=(0,j.OV)(i),c=((e,t)=>{const s=Object.assign((0,it.R)(e),(0,ct.xA)(e),(0,at.e)(e),(e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const s=t.findIndex(t=>t.schemeId===e.schemeId);-1===s?t.push(e):t.splice(s,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){s=e},httpAuthSchemeProvider:()=>s,setCredentials(e){r=e},credentials:()=>r}})(e));return t.forEach(e=>e.configure(s)),Object.assign(e,(0,it.$)(s),(0,ct.uv)(s),(0,at.j)(s),{httpAuthSchemes:(r=s).httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()});var r})((e=>{const t=(0,X.h)(e);return Object.assign(t,{authSchemePreference:(0,te.t)(e.authSchemePreference??[])})})((0,W.C)(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use((0,_.wq)(this.config)),this.middlewareStack.use((0,N.sM)(this.config)),this.middlewareStack.use((0,Q.ey)(this.config)),this.middlewareStack.use((0,B.vK)(this.config)),this.middlewareStack.use((0,j.TC)(this.config)),this.middlewareStack.use((0,G.Y7)(this.config)),this.middlewareStack.use((0,M.n)(this.config)),this.middlewareStack.use((0,K.w)(this.config,{httpAuthSchemeParametersProvider:se,identityProviderConfigProvider:async e=>new L.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,V.l)(this.config))}destroy(){super.destroy()}}}};
package/dist/139.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";exports.id=139,exports.ids=[139],exports.modules={2840:(e,t,r)=>{r.d(t,{k:()=>x});var s=r(50469),i=r(69700);const a="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",n="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",o="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",c="(\\d?\\d)",d="(\\d{4})",l=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),u=new RegExp(`^${a}, ${c} ${n} ${d} ${o} GMT$`),h=new RegExp(`^${a}, ${c}-${n}-(\\d\\d) ${o} GMT$`),f=new RegExp(`^${a} ${n} ( [1-9]|\\d\\d) ${o} ${d}$`),p=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function m(e,t,r){const s=Number(e);if(s<t||s>r)throw new Error(`Value ${s} out of range [${t}, ${r}]`)}var g=r(84651),w=r(70764),b=r(12544),y=r(2914),S=r(63282),T=r(26144);class x extends S.f{settings;constructor(e){super(),this.settings=e}read(e,t){const r=s.l.of(e);if(r.isListSchema())return(0,i.G)(t).map(e=>this.read(r.getValueSchema(),e));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??b.E)(t);if(r.isTimestampSchema())switch((0,T.V)(r,this.settings)){case 5:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC3339 timestamps must be strings");const t=l.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,r,s,i,a,n,o,,c,d]=t;m(s,1,12),m(i,1,31),m(a,0,23),m(n,0,59),m(o,0,60);const u=new Date(Date.UTC(Number(r),Number(s)-1,Number(i),Number(a),Number(n),Number(o),Number(c)?Math.round(1e3*parseFloat(`0.${c}`)):0));if(u.setUTCFullYear(Number(r)),"Z"!=d.toUpperCase()){const[,e,t,r]=/([+-])(\d\d):(\d\d)/.exec(d)||[void 0,"+",0,0],s="-"===e?1:-1;u.setTime(u.getTime()+s*(60*Number(t)*60*1e3+60*Number(r)*1e3))}return u})(t);case 6:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC7231 timestamps must be strings.");let t,r,s,i,a,n,o,c;if((c=u.exec(e))?[,t,r,s,i,a,n,o]=c:(c=h.exec(e))?([,t,r,s,i,a,n,o]=c,s=(Number(s)+1900).toString()):(c=f.exec(e))&&([,r,t,i,a,n,o,s]=c),s&&n){const e=Date.UTC(Number(s),p.indexOf(r),Number(t),Number(i),Number(a),Number(n),o?Math.round(1e3*parseFloat(`0.${o}`)):0);m(t,1,31),m(i,0,23),m(a,0,59),m(n,0,60);const c=new Date(e);return c.setUTCFullYear(Number(s)),c}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)})(t);case 7:return(e=>{if(null==e)return;let t=NaN;if("number"==typeof e)t=e;else if("string"==typeof e){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else"object"==typeof e&&1===e.tag&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(1e3*t))})(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}if(r.isStringSchema()){const e=r.getMergedTraits().mediaType;let s=t;if(e)return r.getMergedTraits().httpHeader&&(s=this.base64ToUtf8(s)),("application/json"===e||e.endsWith("+json"))&&(s=g.A.from(s)),s}return r.isNumericSchema()?Number(t):r.isBigIntegerSchema()?BigInt(t):r.isBigDecimalSchema()?new w.D(t,"bigDecimal"):r.isBooleanSchema()?"true"===String(t).toLowerCase():t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??y.P)((this.serdeContext?.base64Decoder??b.E)(e))}}},14433:(e,t,r)=>{r.d(t,{m:()=>s});class s{async sign(e,t,r){return e}}},30259:(e,t,r)=>{function s(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}r.d(t,{$:()=>s})},44128:(e,t,r)=>{r.d(t,{c:()=>m});var s=r(64327),i=r(25272),a=r(2203),n=r(12544);var o=r(39181),c=r(92278),d=r(2914);const l=e=>"function"==typeof ReadableStream&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),u="The stream has already been transformed.",h=e=>{if(!f(e)&&!l(e))throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${e?.__proto__?.constructor?.name||e}`);let t=!1;const r=async()=>{if(t)throw new Error(u);return t=!0,await(async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,r)=>{const s=new FileReader;s.onloadend=()=>{if(2!==s.readyState)return r(new Error("Reader aborted too early"));const e=s.result??"",i=e.indexOf(","),a=i>-1?i+1:e.length;t(e.substring(a))},s.onabort=()=>r(new Error("Read aborted")),s.onerror=()=>r(s.error),s.readAsDataURL(e)})}(e),r=(0,n.E)(t);return new Uint8Array(r)}(e):async function(e){const t=[],r=e.getReader();let s=!1,i=0;for(;!s;){const{done:e,value:a}=await r.read();a&&(t.push(a),i+=a.length),s=e}const a=new Uint8Array(i);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}(e))(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async e=>{const t=await r();if("base64"===e)return(0,o.n)(t);if("hex"===e)return(0,c.n)(t);if(void 0===e||"utf8"===e||"utf-8"===e)return(0,d.P)(t);if("function"==typeof TextDecoder)return new TextDecoder(e).decode(t);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(u);if(t=!0,f(e))return(e=>{if("function"!=typeof e.stream)throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return e.stream()})(e);if(l(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},f=e=>"function"==typeof Blob&&e instanceof Blob,p="The stream has already been transformed.",m=e=>{if(!(e instanceof a.Readable))try{return h(e)}catch(t){throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${e?.__proto__?.constructor?.name||e}`)}let t=!1;const r=async()=>{if(t)throw new Error(p);return t=!0,await(0,s.k)(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async e=>{const t=await r();return void 0===e||Buffer.isEncoding(e)?(0,i.Q)(t.buffer,t.byteOffset,t.byteLength).toString(e):new TextDecoder(e).decode(t)},transformToWebStream:()=>{if(t)throw new Error(p);if(null!==e.readableFlowing)throw new Error("The stream has been consumed by other callbacks.");if("function"!=typeof a.Readable.toWeb)throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return t=!0,a.Readable.toWeb(e)}})}},69700:(e,t,r)=>{r.d(t,{G:()=>s});const s=e=>{const t=e.length,r=[];let s,i=!1,a=0;for(let n=0;n<t;++n){const t=e[n];switch(t){case'"':"\\"!==s&&(i=!i);break;case",":i||(r.push(e.slice(a,n)),a=n+1)}s=t}return r.push(e.slice(a)),r.map(e=>{const t=(e=e.trim()).length;return t<2?e:('"'===e[0]&&'"'===e[t-1]&&(e=e.slice(1,t-1)),e.replace(/\\"/g,'"'))})}},80843:(e,t,r)=>{r.d(t,{Y:()=>N});var s=r(50469),i=r(76460);function a(e,t,r){if(r<=0||!Number.isInteger(r))throw new Error("Invalid number of delimiters ("+r+") for splitEvery.");const s=e.split(t);if(1===r)return s;const i=[];let a="";for(let e=0;e<s.length;e++)""===a?a=s[e]:a+=t+s[e],(e+1)%r===0&&(i.push(a),a="");return""!==a&&i.push(a),i}var n=r(69700),o=r(81781),c=r(44128),d=r(78607),l=r(30259),u=r(98314);class h extends u.t{async serializeRequest(e,t,r){const a={...t??{}},n=this.serializer,c={},d={},u=await r.endpoint(),h=s.l.of(e?.input),f=h.getSchema();let p,m=!1;const g=new o.K({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:c,headers:d,body:void 0});if(u){this.updateServiceEndpoint(g,u),this.setHostPrefix(g,e,a);const t=(0,i.c)(e.traits);if(t.http){g.method=t.http[0];const[e,r]=t.http[1].split("?");"/"==g.path?g.path=e:g.path+=e;const s=new URLSearchParams(r??"");Object.assign(c,Object.fromEntries(s))}}for(const[e,t]of h.structIterator()){const r=t.getMergedTraits()??{},s=a[e];if(null!=s||t.isIdempotencyToken())if(r.httpPayload)t.isStreaming()?t.isStructSchema()?a[e]&&(p=await this.serializeEventStream({eventStream:a[e],requestSchema:h})):p=s:(n.write(t,s),p=n.flush()),delete a[e];else if(r.httpLabel){n.write(t,s);const r=n.flush();g.path.includes(`{${e}+}`)?g.path=g.path.replace(`{${e}+}`,r.split("/").map(l.$).join("/")):g.path.includes(`{${e}}`)&&(g.path=g.path.replace(`{${e}}`,(0,l.$)(r))),delete a[e]}else if(r.httpHeader)n.write(t,s),d[r.httpHeader.toLowerCase()]=String(n.flush()),delete a[e];else if("string"==typeof r.httpPrefixHeaders){for(const[e,i]of Object.entries(s)){const s=r.httpPrefixHeaders+e;n.write([t.getValueSchema(),{httpHeader:s}],i),d[s.toLowerCase()]=n.flush()}delete a[e]}else r.httpQuery||r.httpQueryParams?(this.serializeQuery(t,s,c),delete a[e]):m=!0;else if(r.httpLabel&&(g.path.includes(`{${e}+}`)||g.path.includes(`{${e}}`)))throw new Error(`No value provided for input HTTP label: ${e}.`)}return m&&a&&(n.write(f,a),p=n.flush()),g.headers=d,g.query=c,g.body=p,g}serializeQuery(e,t,r){const s=this.serializer,i=e.getMergedTraits();if(i.httpQueryParams){for(const[s,a]of Object.entries(t))if(!(s in r)){const t=e.getValueSchema();Object.assign(t.getMergedTraits(),{...i,httpQuery:s,httpQueryParams:void 0}),this.serializeQuery(t,a,r)}}else if(e.isListSchema()){const a=!!e.getMergedTraits().sparse,n=[];for(const r of t){s.write([e.getValueSchema(),i],r);const t=s.flush();(a||void 0!==t)&&n.push(t)}r[i.httpQuery]=n}else s.write([e,i],t),r[i.httpQuery]=s.flush()}async deserializeResponse(e,t,r){const i=this.deserializer,a=s.l.of(e.output),n={};if(r.statusCode>=300){const s=await(0,d.P)(r.body,t);throw s.byteLength>0&&Object.assign(n,await i.read(15,s)),await this.handleError(e,t,r,n,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const e in r.headers){const t=r.headers[e];delete r.headers[e],r.headers[e.toLowerCase()]=t}const o=await this.deserializeHttpMessage(a,t,r,n);if(o.length){const e=await(0,d.P)(r.body,t);if(e.byteLength>0){const t=await i.read(a,e);for(const e of o)null!=t[e]&&(n[e]=t[e])}}else o.discardResponseBody&&await(0,d.P)(r.body,t);return n.$metadata=this.deserializeMetadata(r),n}async deserializeHttpMessage(e,t,r,i,o){let l;l=i instanceof Set?o:i;let u=!0;const h=this.deserializer,f=s.l.of(e),p=[];for(const[e,s]of f.structIterator()){const i=s.getMemberTraits();if(i.httpPayload){if(u=!1,s.isStreaming()){const t=s.isStructSchema();l[e]=t?await this.deserializeEventStream({response:r,responseSchema:f}):(0,c.c)(r.body)}else if(r.body){const i=await(0,d.P)(r.body,t);i.byteLength>0&&(l[e]=await h.read(s,i))}}else if(i.httpHeader){const t=String(i.httpHeader).toLowerCase(),o=r.headers[t];if(null!=o)if(s.isListSchema()){const r=s.getValueSchema();let i;r.getMergedTraits().httpHeader=t,i=r.isTimestampSchema()&&4===r.getSchema()?a(o,",",2):(0,n.G)(o);const c=[];for(const e of i)c.push(await h.read(r,e.trim()));l[e]=c}else l[e]=await h.read(s,o)}else if(void 0!==i.httpPrefixHeaders){l[e]={};for(const[t,a]of Object.entries(r.headers))if(t.startsWith(i.httpPrefixHeaders)){const r=s.getValueSchema();r.getMergedTraits().httpHeader=t,l[e][t.slice(i.httpPrefixHeaders.length)]=await h.read(r,a)}}else i.httpResponseCode?l[e]=r.statusCode:p.push(e)}return p.discardResponseBody=u,p}}var f=r(10015);function p(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}var m=r(84651),g=r(34708),w=r(39181),b=r(63282),y=r(26144);class S extends b.f{settings;stringBuffer="";constructor(e){super(),this.settings=e}write(e,t){const r=s.l.of(e);switch(typeof t){case"object":if(null===t)return void(this.stringBuffer="null");if(r.isTimestampSchema()){if(!(t instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${t} when schema expected Date in ${r.getName(!0)}`);switch((0,y.V)(r,this.settings)){case 5:this.stringBuffer=t.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=(0,f.JV)(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(r.isBlobSchema()&&"byteLength"in t)return void(this.stringBuffer=(this.serdeContext?.base64Encoder??w.n)(t));if(r.isListSchema()&&Array.isArray(t)){let e="";for(const s of t){this.write([r.getValueSchema(),r.getMergedTraits()],s);const t=this.flush();""!==e&&(e+=", "),e+=r.getValueSchema().isTimestampSchema()?t:p(t)}return void(this.stringBuffer=e)}this.stringBuffer=JSON.stringify(t,null,2);break;case"string":const e=r.getMergedTraits().mediaType;let s=t;if(e&&(("application/json"===e||e.endsWith("+json"))&&(s=m.A.from(s)),r.getMergedTraits().httpHeader))return void(this.stringBuffer=(this.serdeContext?.base64Encoder??w.n)(s.toString()));this.stringBuffer=t;break;default:r.isIdempotencyToken()?this.stringBuffer=(0,g.v4)():this.stringBuffer=String(t)}}flush(){const e=this.stringBuffer;return this.stringBuffer="",e}}class T{codecSerializer;stringSerializer;buffer;constructor(e,t,r=new S(t)){this.codecSerializer=e,this.stringSerializer=r}setSerdeContext(e){this.codecSerializer.setSerdeContext(e),this.stringSerializer.setSerdeContext(e)}write(e,t){const r=s.l.of(e),i=r.getMergedTraits();return i.httpHeader||i.httpLabel||i.httpQuery?(this.stringSerializer.write(r,t),void(this.buffer=this.stringSerializer.flush())):this.codecSerializer.write(r,t)}flush(){if(void 0!==this.buffer){const e=this.buffer;return this.buffer=void 0,e}return this.codecSerializer.flush()}}var x=r(2914),v=r(40935),E=r(2840);class z extends b.f{codecDeserializer;stringDeserializer;constructor(e,t){super(),this.codecDeserializer=e,this.stringDeserializer=new E.k(t)}setSerdeContext(e){this.stringDeserializer.setSerdeContext(e),this.codecDeserializer.setSerdeContext(e),this.serdeContext=e}read(e,t){const r=s.l.of(e),i=r.getMergedTraits(),a=this.serdeContext?.utf8Encoder??x.P;if(i.httpHeader||i.httpResponseCode)return this.stringDeserializer.read(r,a(t));if(i.httpPayload){if(r.isBlobSchema()){const e=this.serdeContext?.utf8Decoder??v.a;return"string"==typeof t?e(t):t}if(r.isStringSchema())return"byteLength"in t?a(t):t}return this.codecDeserializer.read(r,t)}}var C=r(51453),$=r(27696),B=r(60262),M=r(66230);class N extends h{serializer;deserializer;codec;mixin=new $.U;constructor({defaultNamespace:e}){super({defaultNamespace:e});const t={timestampFormat:{useTrait:!0,default:7},httpBindings:!0,jsonName:!0};this.codec=new B.V(t),this.serializer=new T(this.codec.createSerializer(),t),this.deserializer=new z(this.codec.createDeserializer(),t)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(e){this.codec.setSerdeContext(e),super.setSerdeContext(e)}async serializeRequest(e,t,r){const i=await super.serializeRequest(e,t,r),a=s.l.of(e.input);if(!i.headers["content-type"]){const e=this.mixin.resolveRestContentType(this.getDefaultContentType(),a);e&&(i.headers["content-type"]=e)}return null==i.body&&i.headers["content-type"]===this.getDefaultContentType()&&(i.body="{}"),i}async deserializeResponse(e,t,r){const i=await super.deserializeResponse(e,t,r),a=s.l.of(e.output);for(const[e,t]of a.structIterator())t.getMemberTraits().httpPayload&&!(e in i)&&(i[e]=null);return i}async handleError(e,t,r,i,a){const n=(0,M.cJ)(r,i)??"Unknown",{errorSchema:o,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(n,this.options.defaultNamespace,r,i,a),d=s.l.of(o),l=i.message??i.Message??"Unknown",u=new(C.O.for(o[1]).getErrorCtor(o)??Error)(l);await this.deserializeHttpMessage(o,t,r,i);const h={};for(const[e,t]of d.structIterator()){const r=t.getMergedTraits().jsonName??e;h[e]=this.codec.createDeserializer().readObject(t,i[r])}throw this.mixin.decorateServiceException(Object.assign(u,c,{$fault:d.getMergedTraits().error,message:l},h),i)}getDefaultContentType(){return"application/json"}}}};
package/dist/200.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";exports.id=200,exports.ids=[200],exports.modules={2840:(e,t,r)=>{r.d(t,{k:()=>S});var n=r(50469),s=r(69700);const i="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",o="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",a="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",l="(\\d?\\d)",c="(\\d{4})",d=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),u=new RegExp(`^${i}, ${l} ${o} ${c} ${a} GMT$`),p=new RegExp(`^${i}, ${l}-${o}-(\\d\\d) ${a} GMT$`),h=new RegExp(`^${i} ${o} ( [1-9]|\\d\\d) ${a} ${c}$`),g=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function f(e,t,r){const n=Number(e);if(n<t||n>r)throw new Error(`Value ${n} out of range [${t}, ${r}]`)}var m=r(84651),x=r(70764),E=r(12544),y=r(2914),b=r(63282),w=r(26144);class S extends b.f{settings;constructor(e){super(),this.settings=e}read(e,t){const r=n.l.of(e);if(r.isListSchema())return(0,s.G)(t).map(e=>this.read(r.getValueSchema(),e));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??E.E)(t);if(r.isTimestampSchema())switch((0,w.V)(r,this.settings)){case 5:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC3339 timestamps must be strings");const t=d.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,r,n,s,i,o,a,,l,c]=t;f(n,1,12),f(s,1,31),f(i,0,23),f(o,0,59),f(a,0,60);const u=new Date(Date.UTC(Number(r),Number(n)-1,Number(s),Number(i),Number(o),Number(a),Number(l)?Math.round(1e3*parseFloat(`0.${l}`)):0));if(u.setUTCFullYear(Number(r)),"Z"!=c.toUpperCase()){const[,e,t,r]=/([+-])(\d\d):(\d\d)/.exec(c)||[void 0,"+",0,0],n="-"===e?1:-1;u.setTime(u.getTime()+n*(60*Number(t)*60*1e3+60*Number(r)*1e3))}return u})(t);case 6:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC7231 timestamps must be strings.");let t,r,n,s,i,o,a,l;if((l=u.exec(e))?[,t,r,n,s,i,o,a]=l:(l=p.exec(e))?([,t,r,n,s,i,o,a]=l,n=(Number(n)+1900).toString()):(l=h.exec(e))&&([,r,t,s,i,o,a,n]=l),n&&o){const e=Date.UTC(Number(n),g.indexOf(r),Number(t),Number(s),Number(i),Number(o),a?Math.round(1e3*parseFloat(`0.${a}`)):0);f(t,1,31),f(s,0,23),f(i,0,59),f(o,0,60);const l=new Date(e);return l.setUTCFullYear(Number(n)),l}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)})(t);case 7:return(e=>{if(null==e)return;let t=NaN;if("number"==typeof e)t=e;else if("string"==typeof e){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else"object"==typeof e&&1===e.tag&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(1e3*t))})(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}if(r.isStringSchema()){const e=r.getMergedTraits().mediaType;let n=t;if(e)return r.getMergedTraits().httpHeader&&(n=this.base64ToUtf8(n)),("application/json"===e||e.endsWith("+json"))&&(n=m.A.from(n)),n}return r.isNumericSchema()?Number(t):r.isBigIntegerSchema()?BigInt(t):r.isBigDecimalSchema()?new x.D(t,"bigDecimal"):r.isBooleanSchema()?"true"===String(t).toLowerCase():t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??y.P)((this.serdeContext?.base64Decoder??E.E)(e))}}},6200:(e,t,r)=>{r.d(t,{getDefaultRoleAssumer:()=>hn,getDefaultRoleAssumerWithWebIdentity:()=>gn});var n=r(3748),s=r(96901),i=r(7387);const o=!1;var a=r(66686),l=r(22869);const c={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 d=r(51453),u=r(6723);class p extends u.T{constructor(e){super(e),Object.setPrototypeOf(this,p.prototype)}}class h extends p{name="ExpiredTokenException";$fault="client";constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,h.prototype)}}class g extends p{name="MalformedPolicyDocumentException";$fault="client";constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e}),Object.setPrototypeOf(this,g.prototype)}}class f extends p{name="PackedPolicyTooLargeException";$fault="client";constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e}),Object.setPrototypeOf(this,f.prototype)}}class m extends p{name="RegionDisabledException";$fault="client";constructor(e){super({name:"RegionDisabledException",$fault:"client",...e}),Object.setPrototypeOf(this,m.prototype)}}class x extends p{name="IDPRejectedClaimException";$fault="client";constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e}),Object.setPrototypeOf(this,x.prototype)}}class E extends p{name="InvalidIdentityTokenException";$fault="client";constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,E.prototype)}}class y extends p{name="IDPCommunicationErrorException";$fault="client";constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,y.prototype)}}const b="AssumedRoleUser",w="Credentials",S="DurationSeconds",v="Policy",T="PolicyArns",N="PackedPolicySize",I="RoleArn",A="RoleSessionName",P="SourceIdentity",C="awsQueryError",D="client",$="error",k="httpError",O="message",R="smithy.ts.sdk.synthetic.com.amazonaws.sts",M="com.amazonaws.sts",F=d.O.for(R);var V=[-3,R,"STSServiceException",0,[],[]];F.registerError(V,p);const U=d.O.for(M);var L=[-3,M,"ExpiredTokenException",{[C]:["ExpiredTokenException",400],[$]:D,[k]:400},[O],[0]];U.registerError(L,h);var j=[-3,M,"IDPCommunicationErrorException",{[C]:["IDPCommunicationError",400],[$]:D,[k]:400},[O],[0]];U.registerError(j,y);var z=[-3,M,"IDPRejectedClaimException",{[C]:["IDPRejectedClaim",403],[$]:D,[k]:403},[O],[0]];U.registerError(z,x);var _=[-3,M,"InvalidIdentityTokenException",{[C]:["InvalidIdentityToken",400],[$]:D,[k]:400},[O],[0]];U.registerError(_,E);var K=[-3,M,"MalformedPolicyDocumentException",{[C]:["MalformedPolicyDocument",400],[$]:D,[k]:400},[O],[0]];U.registerError(K,g);var W=[-3,M,"PackedPolicyTooLargeException",{[C]:["PackedPolicyTooLarge",400],[$]:D,[k]:400},[O],[0]];U.registerError(W,f);var B=[-3,M,"RegionDisabledException",{[C]:["RegionDisabledException",403],[$]:D,[k]:403},[O],[0]];U.registerError(B,m);const q=[F,U];var G=[0,M,"accessKeySecretType",8,0],Q=[0,M,"clientTokenType",8,0],Y=[3,M,b,0,["AssumedRoleId","Arn"],[0,0],2],Z=[3,M,"AssumeRoleRequest",0,[I,A,T,v,S,"Tags","TransitiveTagKeys","ExternalId","SerialNumber","TokenCode",P,"ProvidedContexts"],[0,0,()=>se,0,1,()=>oe,64,0,0,0,0,()=>ie],2],H=[3,M,"AssumeRoleResponse",0,[w,b,N,P],[[()=>ee,0],()=>Y,1,0]],X=[3,M,"AssumeRoleWithWebIdentityRequest",0,[I,A,"WebIdentityToken","ProviderId",T,v,S],[0,0,[()=>Q,0],0,()=>se,0,1],3],J=[3,M,"AssumeRoleWithWebIdentityResponse",0,[w,"SubjectFromWebIdentityToken",b,N,"Provider","Audience",P],[[()=>ee,0],0,()=>Y,1,0,0,0]],ee=[3,M,w,0,["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],[0,[()=>G,0],0,4],4],te=[3,M,"PolicyDescriptorType",0,["arn"],[0]],re=[3,M,"ProvidedContext",0,["ProviderArn","ContextAssertion"],[0,0]],ne=[3,M,"Tag",0,["Key","Value"],[0,0],2],se=[1,M,"policyDescriptorListType",0,()=>te],ie=[1,M,"ProvidedContextsListType",0,()=>re],oe=[1,M,"tagListType",0,()=>ne],ae=[9,M,"AssumeRole",0,()=>Z,()=>H],le=[9,M,"AssumeRoleWithWebIdentity",0,()=>X,()=>J];class ce extends(l.u.classBuilder().ep(c).m(function(e,t,r,n){return[(0,a.r)(r,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(ae).build()){}class de extends(l.u.classBuilder().ep(c).m(function(e,t,r,n){return[(0,a.r)(r,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(le).build()){}const ue=e=>{if("string"==typeof e?.Arn){const t=e.Arn.split(":");if(t.length>4&&""!==t[4])return t[4]}},pe=async(e,t,r,n={})=>{const a="function"==typeof e?await e():e,l="function"==typeof t?await t():t;let c="";const d=a??l??(c=await function(e={}){return(0,i.Z)({...s.GG,default:async()=>(o||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")},{...s.zH,...e})}(n)());return r?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${a} (credential provider clientConfig)`,`${l} (contextual client)`,`${c} (STS default: AWS_REGION, profile region, or us-east-1)`),d},he=e=>"h2"===e?.metadata?.handlerProtocol;var ge=r(97040),fe=r(74534),me=r(70775),xe=r(86693),Ee=r(66575),ye=r(94615),be=r(45326),we=r(9575),Se=r(68249),ve=r(75279),Te=r(10860),Ne=r(39412),Ie=r(72084),Ae=r(10773),Pe=r(9942),Ce=r(63089),De=r(45547),$e=r(81974);const ke=async(e,t,r)=>({operation:(0,De.u)(t).operation,region:await(0,$e.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),Oe=e=>{const t=[];return"AssumeRoleWithWebIdentity"===e.operation?t.push({schemeId:"smithy.api#noAuth"}):t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t};var Re=r(90966),Me=r(10706),Fe=r(56232),Ve=r(70868),Ue=r(60803),Le=r(52005),je=r(24661),ze=r(46109),_e=r(14433),Ke=r(5012),We=r(24176),Be=r(64327),qe=r(34338),Ge=r(57815),Qe=r(55425),Ye=r(99816),Ze=r(48828),He=r(63139),Xe=r(78607),Je=r(59772),et=r(50469),tt=r(27696);const rt={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(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e},captureMetaData:!1};function nt(e){return"boolean"==typeof e?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,allowedTags:null,tagFilter:null}:"object"==typeof e&&null!==e?{enabled:!1!==e.enabled,maxEntitySize:e.maxEntitySize??1e4,maxExpansionDepth:e.maxExpansionDepth??10,maxTotalExpansions:e.maxTotalExpansions??1e3,maxExpandedLength:e.maxExpandedLength??1e5,allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null}:nt(!0)}const st=function(e){const t=Object.assign({},rt,e);return t.processEntities=nt(t.processEntities),t},it=":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",ot=new RegExp("^["+it+"]["+it+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function at(e,t){const r=[];let n=t.exec(e);for(;n;){const s=[];s.startIndex=t.lastIndex-n[0].length;const i=n.length;for(let e=0;e<i;e++)s.push(n[e]);r.push(s),n=t.exec(e)}return r}const lt=function(e){return!(null==ot.exec(e))};let ct;ct="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class dt{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e,t){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),void 0!==t&&(this.child[this.child.length-1][ct]={startIndex:t})}static getMetaDataSymbol(){return ct}}class ut{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let n=1,s=!1,i=!1,o="";for(;t<e.length;t++)if("<"!==e[t]||i)if(">"===e[t]){if(i?"-"===e[t-1]&&"-"===e[t-2]&&(i=!1,n--):n--,0===n)break}else"["===e[t]?s=!0:o+=e[t];else{if(s&&ht(e,"!ENTITY",t)){let n,s;if(t+=7,[n,s,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),-1===s.indexOf("&")){const e=n.replace(/[.\-+*:]/g,"\\.");r[n]={regx:RegExp(`&${e};`,"g"),val:s}}}else if(s&&ht(e,"!ELEMENT",t)){t+=8;const{index:r}=this.readElementExp(e,t+1);t=r}else if(s&&ht(e,"!ATTLIST",t))t+=8;else if(s&&ht(e,"!NOTATION",t)){t+=9;const{index:r}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=r}else{if(!ht(e,"!--",t))throw new Error("Invalid DOCTYPE");i=!0}n++,o=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}}readEntityExp(e,t){t=pt(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t])&&'"'!==e[t]&&"'"!==e[t];)r+=e[t],t++;if(gt(r),t=pt(e,t),!this.suppressValidationErr){if("SYSTEM"===e.substring(t,t+6).toUpperCase())throw new Error("External entities are not supported");if("%"===e[t])throw new Error("Parameter entities are not supported")}let n="";if([t,n]=this.readIdentifierVal(e,t,"entity"),!1!==this.options.enabled&&this.options.maxEntitySize&&n.length>this.options.maxEntitySize)throw new Error(`Entity "${r}" size (${n.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[r,n,--t]}readNotationExp(e,t){t=pt(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;!this.suppressValidationErr&&gt(r),t=pt(e,t);const n=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&"SYSTEM"!==n&&"PUBLIC"!==n)throw new Error(`Expected SYSTEM or PUBLIC, found "${n}"`);t+=n.length,t=pt(e,t);let s=null,i=null;if("PUBLIC"===n)[t,s]=this.readIdentifierVal(e,t,"publicIdentifier"),'"'!==e[t=pt(e,t)]&&"'"!==e[t]||([t,i]=this.readIdentifierVal(e,t,"systemIdentifier"));else if("SYSTEM"===n&&([t,i]=this.readIdentifierVal(e,t,"systemIdentifier"),!this.suppressValidationErr&&!i))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:r,publicIdentifier:s,systemIdentifier:i,index:--t}}readIdentifierVal(e,t,r){let n="";const s=e[t];if('"'!==s&&"'"!==s)throw new Error(`Expected quoted string, found "${s}"`);for(t++;t<e.length&&e[t]!==s;)n+=e[t],t++;if(e[t]!==s)throw new Error(`Unterminated ${r} value`);return[++t,n]}readElementExp(e,t){t=pt(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;if(!this.suppressValidationErr&&!lt(r))throw new Error(`Invalid element name: "${r}"`);let n="";if("E"===e[t=pt(e,t)]&&ht(e,"MPTY",t))t+=4;else if("A"===e[t]&&ht(e,"NY",t))t+=2;else if("("===e[t]){for(t++;t<e.length&&")"!==e[t];)n+=e[t],t++;if(")"!==e[t])throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:r,contentModel:n.trim(),index:t}}readAttlistExp(e,t){t=pt(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;gt(r),t=pt(e,t);let n="";for(;t<e.length&&!/\s/.test(e[t]);)n+=e[t],t++;if(!gt(n))throw new Error(`Invalid attribute name: "${n}"`);t=pt(e,t);let s="";if("NOTATION"===e.substring(t,t+8).toUpperCase()){if(s="NOTATION","("!==e[t=pt(e,t+=8)])throw new Error(`Expected '(', found "${e[t]}"`);t++;let r=[];for(;t<e.length&&")"!==e[t];){let n="";for(;t<e.length&&"|"!==e[t]&&")"!==e[t];)n+=e[t],t++;if(n=n.trim(),!gt(n))throw new Error(`Invalid notation name: "${n}"`);r.push(n),"|"===e[t]&&(t++,t=pt(e,t))}if(")"!==e[t])throw new Error("Unterminated list of notations");t++,s+=" ("+r.join("|")+")"}else{for(;t<e.length&&!/\s/.test(e[t]);)s+=e[t],t++;const r=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!r.includes(s.toUpperCase()))throw new Error(`Invalid attribute type: "${s}"`)}t=pt(e,t);let i="";return"#REQUIRED"===e.substring(t,t+8).toUpperCase()?(i="#REQUIRED",t+=8):"#IMPLIED"===e.substring(t,t+7).toUpperCase()?(i="#IMPLIED",t+=7):[t,i]=this.readIdentifierVal(e,t,"ATTLIST"),{elementName:r,attributeName:n,attributeType:s,defaultValue:i,index:t}}}const pt=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function ht(e,t,r){for(let n=0;n<t.length;n++)if(t[n]!==e[r+n+1])return!1;return!0}function gt(e){if(lt(e))return e;throw new Error(`Invalid entity name ${e}`)}const ft=/^[-+]?0x[a-fA-F0-9]+$/,mt=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,xt={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const Et=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;class yt{constructor(e){var t;if(this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>Rt(t,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>Rt(t,16,"&#x")}},this.addExternalEntities=bt,this.parseXml=Nt,this.parseTextData=wt,this.resolveNameSpace=St,this.buildAttributesMap=Tt,this.isItStopNode=Ct,this.replaceEntitiesValue=At,this.readStopNodeData=kt,this.saveTextToParentTag=Pt,this.addChild=It,this.ignoreAttributesFn="function"==typeof(t=this.options.ignoreAttributes)?t:Array.isArray(t)?e=>{for(const r of t){if("string"==typeof r&&e===r)return!0;if(r instanceof RegExp&&r.test(e))return!0}}:()=>!1,this.entityExpansionCount=0,this.currentExpandedLength=0,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let e=0;e<this.options.stopNodes.length;e++){const t=this.options.stopNodes[e];"string"==typeof t&&(t.startsWith("*.")?this.stopNodesWildcard.add(t.substring(2)):this.stopNodesExact.add(t))}}}}function bt(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r],s=n.replace(/[.\-+*:]/g,"\\.");this.lastEntities[n]={regex:new RegExp("&"+s+";","g"),val:e[n]}}}function wt(e,t,r,n,s,i,o){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e,t,r));const n=this.options.tagValueProcessor(t,e,r,s,i);return null==n?e:typeof n!=typeof e||n!==e?n:this.options.trimValues||e.trim()===e?Ot(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function St(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}const vt=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Tt(e,t,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){const n=at(e,vt),s=n.length,i={};for(let e=0;e<s;e++){const s=this.resolveNameSpace(n[e][1]);if(this.ignoreAttributesFn(s,t))continue;let o=n[e][4],a=this.options.attributeNamePrefix+s;if(s.length)if(this.options.transformAttributeName&&(a=this.options.transformAttributeName(a)),"__proto__"===a&&(a="#__proto__"),void 0!==o){this.options.trimValues&&(o=o.trim()),o=this.replaceEntitiesValue(o,r,t);const e=this.options.attributeValueProcessor(s,o,t);i[a]=null==e?o:typeof e!=typeof o||e!==o?e:Ot(o,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[a]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=i,e}return i}}const Nt=function(e){e=e.replace(/\r\n?/g,"\n");const t=new dt("!xml");let r=t,n="",s="";this.entityExpansionCount=0,this.currentExpandedLength=0;const i=new ut(this.options.processEntities);for(let o=0;o<e.length;o++)if("<"===e[o])if("/"===e[o+1]){const t=Dt(e,">",o,"Closing Tag is not closed.");let i=e.substring(o+2,t).trim();if(this.options.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),r&&(n=this.saveTextToParentTag(n,r,s));const a=s.substring(s.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=s.lastIndexOf("."),s=s.substring(0,l),r=this.tagsNodeStack.pop(),n="",o=t}else if("?"===e[o+1]){let t=$t(e,o,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,s),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new dt(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,s,t.tagName)),this.addChild(r,e,s,o)}o=t.closeIndex+1}else if("!--"===e.substr(o+1,3)){const t=Dt(e,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const i=e.substring(o+4,t-2);n=this.saveTextToParentTag(n,r,s),r.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}o=t}else if("!D"===e.substr(o+1,2)){const t=i.readDocType(e,o);this.docTypeEntities=t.entities,o=t.i}else if("!["===e.substr(o+1,2)){const t=Dt(e,"]]>",o,"CDATA is not closed.")-2,i=e.substring(o+9,t);n=this.saveTextToParentTag(n,r,s);let a=this.parseTextData(i,r.tagname,s,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):r.add(this.options.textNodeName,a),o=t+2}else{let i=$t(e,o,this.options.removeNSPrefix),a=i.tagName;const l=i.rawTagName;let c=i.tagExp,d=i.attrExpPresent,u=i.closeIndex;if(this.options.transformTagName){const e=this.options.transformTagName(a);c===a&&(c=e),a=e}r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,s,!1));const p=r;p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(r=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),a!==t.tagname&&(s+=s?"."+a:a);const h=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,s,a)){let t="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),c=a):c=c.substr(0,c.length-1),o=i.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))o=i.closeIndex;else{const r=this.readStopNodeData(e,l,u+1);if(!r)throw new Error(`Unexpected end of ${l}`);o=r.i,t=r.tagContent}const n=new dt(a);a!==c&&d&&(n[":@"]=this.buildAttributesMap(c,s,a)),t&&(t=this.parseTextData(t,a,s,!0,d,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),n.add(this.options.textNodeName,t),this.addChild(r,n,s,h)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){if("/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),c=a):c=c.substr(0,c.length-1),this.options.transformTagName){const e=this.options.transformTagName(a);c===a&&(c=e),a=e}const e=new dt(a);a!==c&&d&&(e[":@"]=this.buildAttributesMap(c,s,a)),this.addChild(r,e,s,h),s=s.substr(0,s.lastIndexOf("."))}else{const e=new dt(a);this.tagsNodeStack.push(r),a!==c&&d&&(e[":@"]=this.buildAttributesMap(c,s,a)),this.addChild(r,e,s,h),r=e}n="",o=u}}else n+=e[o];return t.child};function It(e,t,r,n){this.options.captureMetaData||(n=void 0);const s=this.options.updateTag(t.tagname,r,t[":@"]);!1===s||("string"==typeof s?(t.tagname=s,e.addChild(t,n)):e.addChild(t,n))}const At=function(e,t,r){if(-1===e.indexOf("&"))return e;const n=this.options.processEntities;if(!n.enabled)return e;if(n.allowedTags&&!n.allowedTags.includes(t))return e;if(n.tagFilter&&!n.tagFilter(t,r))return e;for(let t in this.docTypeEntities){const r=this.docTypeEntities[t],s=e.match(r.regx);if(s){if(this.entityExpansionCount+=s.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n.maxTotalExpansions}`);const t=e.length;if(e=e.replace(r.regx,r.val),n.maxExpandedLength&&(this.currentExpandedLength+=e.length-t,this.currentExpandedLength>n.maxExpandedLength))throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${n.maxExpandedLength}`)}}if(-1===e.indexOf("&"))return e;for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(-1===e.indexOf("&"))return e;if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}return e.replace(this.ampEntity.regex,this.ampEntity.val)};function Pt(e,t,r,n){return e&&(void 0===n&&(n=0===t.child.length),void 0!==(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function Ct(e,t,r,n){return!(!t||!t.has(n))||!(!e||!e.has(r))}function Dt(e,t,r,n){const s=e.indexOf(t,r);if(-1===s)throw new Error(n);return s+t.length-1}function $t(e,t,r,n=">"){const s=function(e,t,r=">"){let n,s="";for(let i=t;i<e.length;i++){let t=e[i];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:s,index:i};if(e[i+1]===r[1])return{data:s,index:i}}else"\t"===t&&(t=" ");s+=t}}(e,t+1,n);if(!s)return;let i=s.data;const o=s.index,a=i.search(/\s/);let l=i,c=!0;-1!==a&&(l=i.substring(0,a),i=i.substring(a+1).trimStart());const d=l;if(r){const e=l.indexOf(":");-1!==e&&(l=l.substr(e+1),c=l!==s.data.substr(e+1))}return{tagName:l,tagExp:i,closeIndex:o,attrExpPresent:c,rawTagName:d}}function kt(e,t,r){const n=r;let s=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){const i=Dt(e,">",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(s--,0===s))return{tagContent:e.substring(n,r),i};r=i}else if("?"===e[r+1])r=Dt(e,"?>",r+1,"StopNode is not closed.");else if("!--"===e.substr(r+1,3))r=Dt(e,"--\x3e",r+3,"StopNode is not closed.");else if("!["===e.substr(r+1,2))r=Dt(e,"]]>",r,"StopNode is not closed.")-2;else{const n=$t(e,r,">");n&&((n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&s++,r=n.closeIndex)}}function Ot(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&function(e,t={}){if(t=Object.assign({},xt,t),!e||"string"!=typeof e)return e;let r=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(r))return e;if("0"===e)return 0;if(t.hex&&ft.test(r))return function(e){if(parseInt)return parseInt(e,16);if(Number.parseInt)return Number.parseInt(e,16);if(window&&window.parseInt)return window.parseInt(e,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(r);if(r.includes("e")||r.includes("E"))return function(e,t,r){if(!r.eNotation)return e;const n=t.match(Et);if(n){let s=n[1]||"";const i=-1===n[3].indexOf("e")?"E":"e",o=n[2],a=s?e[o.length+1]===i:e[o.length]===i;return o.length>1&&a?e:1!==o.length||!n[3].startsWith(`.${i}`)&&n[3][0]!==i?r.leadingZeros&&!a?(t=(n[1]||"")+n[3],Number(t)):e:Number(t)}return e}(e,r,t);{const s=mt.exec(r);if(s){const i=s[1]||"",o=s[2];let a=(n=s[3])&&-1!==n.indexOf(".")?("."===(n=n.replace(/0+$/,""))?n="0":"."===n[0]?n="0"+n:"."===n[n.length-1]&&(n=n.substring(0,n.length-1)),n):n;const l=i?"."===e[o.length+1]:"."===e[o.length];if(!t.leadingZeros&&(o.length>1||1===o.length&&!l))return e;{const n=Number(r),s=String(n);if(0===n)return n;if(-1!==s.search(/[eE]/))return t.eNotation?n:e;if(-1!==r.indexOf("."))return"0"===s||s===a||s===`${i}${a}`?n:e;let l=o?a:r;return o?l===s||i+l===s?n:e:l===s||l===i+s?n:e}}return e}var n}(e,r)}return function(e){return void 0!==e}(e)?e:""}function Rt(e,t,r){const n=Number.parseInt(e,t);return n>=0&&n<=1114111?String.fromCodePoint(n):r+e+";"}const Mt=dt.getMetaDataSymbol();function Ft(e,t){return Vt(e,t)}function Vt(e,t,r){let n;const s={};for(let i=0;i<e.length;i++){const o=e[i],a=Ut(o);let l="";if(l=void 0===r?a:r+"."+a,a===t.textNodeName)void 0===n?n=o[a]:n+=""+o[a];else{if(void 0===a)continue;if(o[a]){let e=Vt(o[a],t,l);const r=jt(e,t);void 0!==o[Mt]&&(e[Mt]=o[Mt]),o[":@"]?Lt(e,o[":@"],l,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==s[a]&&s.hasOwnProperty(a)?(Array.isArray(s[a])||(s[a]=[s[a]]),s[a].push(e)):t.isArray(a,l,r)?s[a]=[e]:s[a]=e}}}return"string"==typeof n?n.length>0&&(s[t.textNodeName]=n):void 0!==n&&(s[t.textNodeName]=n),s}function Ut(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function Lt(e,t,r,n){if(t){const s=Object.keys(t),i=s.length;for(let o=0;o<i;o++){const i=s[o];n.isArray(i,r+"."+i,!0,!0)?e[i]=[t[i]]:e[i]=t[i]}}}function jt(e,t){const{textNodeName:r}=t,n=Object.keys(e).length;return 0===n||!(1!==n||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}const zt={allowBooleanAttributes:!1,unpairedTags:[]};function _t(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function Kt(e,t){const r=t;for(;t<e.length;t++)if("?"==e[t]||" "==e[t]){const n=e.substr(r,t-r);if(t>5&&"xml"===n)return Yt("InvalidXml","XML declaration allowed only at the start of the document.",Xt(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}continue}return t}function Wt(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}function Bt(e,t){let r="",n="",s=!1;for(;t<e.length;t++){if('"'===e[t]||"'"===e[t])""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){s=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:s}}const qt=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function Gt(e,t){const r=at(e,qt),n={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return Yt("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",Jt(r[e]));if(void 0!==r[e][3]&&void 0===r[e][4])return Yt("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",Jt(r[e]));if(void 0===r[e][3]&&!t.allowBooleanAttributes)return Yt("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",Jt(r[e]));const s=r[e][2];if(!Zt(s))return Yt("InvalidAttr","Attribute '"+s+"' is an invalid name.",Jt(r[e]));if(n.hasOwnProperty(s))return Yt("InvalidAttr","Attribute '"+s+"' is repeated.",Jt(r[e]));n[s]=1}return!0}function Qt(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function Yt(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function Zt(e){return lt(e)}function Ht(e){return lt(e)}function Xt(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function Jt(e){return e.startIndex+e[1].length}const er=new class{constructor(e){this.externalEntities={},this.options=st(e)}parse(e,t){if("string"!=typeof e&&e.toString)e=e.toString();else if("string"!=typeof e)throw new Error("XML data is accepted in String or Bytes[] form.");if(t){!0===t&&(t={});const r=function(e,t){t=Object.assign({},zt,t);const r=[];let n=!1,s=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i<e.length;i++)if("<"===e[i]&&"?"===e[i+1]){if(i+=2,i=Kt(e,i),i.err)return i}else{if("<"!==e[i]){if(_t(e[i]))continue;return Yt("InvalidChar","char '"+e[i]+"' is not expected.",Xt(e,i))}{let o=i;if(i++,"!"===e[i]){i=Wt(e,i);continue}{let a=!1;"/"===e[i]&&(a=!0,i++);let l="";for(;i<e.length&&">"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)l+=e[i];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),i--),!Ht(l)){let t;return t=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",Yt("InvalidTag",t,Xt(e,i))}const c=Bt(e,i);if(!1===c)return Yt("InvalidAttr","Attributes for '"+l+"' have open quote.",Xt(e,i));let d=c.value;if(i=c.index,"/"===d[d.length-1]){const r=i-d.length;d=d.substring(0,d.length-1);const s=Gt(d,t);if(!0!==s)return Yt(s.err.code,s.err.msg,Xt(e,r+s.err.line));n=!0}else if(a){if(!c.tagClosed)return Yt("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",Xt(e,i));if(d.trim().length>0)return Yt("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",Xt(e,o));if(0===r.length)return Yt("InvalidTag","Closing tag '"+l+"' has not been opened.",Xt(e,o));{const t=r.pop();if(l!==t.tagName){let r=Xt(e,t.tagStartPos);return Yt("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+l+"'.",Xt(e,o))}0==r.length&&(s=!0)}}else{const a=Gt(d,t);if(!0!==a)return Yt(a.err.code,a.err.msg,Xt(e,i-d.length+a.err.line));if(!0===s)return Yt("InvalidXml","Multiple possible root nodes found.",Xt(e,i));-1!==t.unpairedTags.indexOf(l)||r.push({tagName:l,tagStartPos:o}),n=!0}for(i++;i<e.length;i++)if("<"===e[i]){if("!"===e[i+1]){i++,i=Wt(e,i);continue}if("?"!==e[i+1])break;if(i=Kt(e,++i),i.err)return i}else if("&"===e[i]){const t=Qt(e,i);if(-1==t)return Yt("InvalidChar","char '&' is not expected.",Xt(e,i));i=t}else if(!0===s&&!_t(e[i]))return Yt("InvalidXml","Extra text at the end",Xt(e,i));"<"===e[i]&&i--}}}return n?1==r.length?Yt("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Xt(e,r[0].tagStartPos)):!(r.length>0)||Yt("InvalidXml","Invalid '"+JSON.stringify(r.map(e=>e.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):Yt("InvalidXml","Start tag expected.",1)}(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new yt(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||void 0===n?n:Ft(n,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))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 dt.getMetaDataSymbol()}}({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(e,t)=>""===t.trim()&&t.includes("\n")?"":void 0});er.addEntity("#xD","\r"),er.addEntity("#10","\n");var tr=r(2840);const rr=e=>{const t="#text";for(const r in e)e.hasOwnProperty(r)&&void 0!==e[r][t]?e[r]=e[r][t]:"object"==typeof e[r]&&null!==e[r]&&(e[r]=rr(e[r]));return e};var nr=r(2914),sr=r(75426),ir=r(98223);class or extends sr.B{settings;stringDeserializer;constructor(e){super(),this.settings=e,this.stringDeserializer=new tr.k(e)}setSerdeContext(e){this.serdeContext=e,this.stringDeserializer.setSerdeContext(e)}read(e,t,r){const n=et.l.of(e),s=n.getMemberSchemas();if(n.isStructSchema()&&n.isMemberSchema()&&Object.values(s).find(e=>!!e.getMemberTraits().eventPayload)){const e={},r=Object.keys(s)[0];return s[r].isBlobSchema()?e[r]=t:e[r]=this.read(s[r],t),e}const i=(this.serdeContext?.utf8Encoder??nr.P)(t),o=this.parseXml(i);return this.readSchema(e,r?o[r]:o)}readSchema(e,t){const r=et.l.of(e);if(r.isUnitSchema())return;const n=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(t))return this.readSchema(r,[t]);if(null==t)return t;if("object"==typeof t){const e=!!n.sparse,s=!!n.xmlFlattened;if(r.isListSchema()){const n=r.getValueSchema(),i=[],o=n.getMergedTraits().xmlName??"member",a=s?t:(t[0]??t)[o],l=Array.isArray(a)?a:[a];for(const t of l)(null!=t||e)&&i.push(this.readSchema(n,t));return i}const i={};if(r.isMapSchema()){const n=r.getKeySchema(),o=r.getValueSchema();let a;a=s?Array.isArray(t)?t:[t]:Array.isArray(t.entry)?t.entry:[t.entry];const l=n.getMergedTraits().xmlName??"key",c=o.getMergedTraits().xmlName??"value";for(const t of a){const r=t[l],n=t[c];(null!=n||e)&&(i[r]=this.readSchema(o,n))}return i}if(r.isStructSchema()){const e=r.isUnionSchema();let n;e&&(n=new ir.F(t,i));for(const[s,o]of r.structIterator()){const r=o.getMergedTraits(),a=r.httpPayload?r.xmlName??o.getName():o.getMemberTraits().xmlName??s;e&&n.mark(a),null!=t[a]&&(i[s]=this.readSchema(o,t[a]))}return e&&n.writeUnknown(),i}if(r.isDocumentSchema())return t;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,t)}parseXml(e){if(e.length){let r;try{t=e,r=er.parse(t,!0)}catch(t){throw t&&"object"==typeof t&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}const n="#text",s=Object.keys(r)[0],i=r[s];return i[n]&&(i[s]=i[n],delete i[n]),rr(i)}var t;return{}}}var ar=r(26144),lr=r(30259),cr=r(34708),dr=r(70764),ur=r(10015),pr=r(39181);class hr extends sr.B{settings;buffer;constructor(e){super(),this.settings=e}write(e,t,r=""){void 0===this.buffer&&(this.buffer="");const n=et.l.of(e);if(r&&!r.endsWith(".")&&(r+="."),n.isBlobSchema())("string"==typeof t||t instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??pr.n)(t)));else if(n.isBooleanSchema()||n.isNumericSchema()||n.isStringSchema())null!=t?(this.writeKey(r),this.writeValue(String(t))):n.isIdempotencyToken()&&(this.writeKey(r),this.writeValue((0,cr.v4)()));else if(n.isBigIntegerSchema())null!=t&&(this.writeKey(r),this.writeValue(String(t)));else if(n.isBigDecimalSchema())null!=t&&(this.writeKey(r),this.writeValue(t instanceof dr.D?t.string:String(t)));else if(n.isTimestampSchema()){if(t instanceof Date)switch(this.writeKey(r),(0,ar.V)(n,this.settings)){case 5:this.writeValue(t.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue((0,ur.JV)(t));break;case 7:this.writeValue(String(t.getTime()/1e3))}}else if(n.isDocumentSchema())Array.isArray(t)?this.write(79,t,r):t instanceof Date?this.write(4,t,r):t instanceof Uint8Array?this.write(21,t,r):t&&"object"==typeof t?this.write(143,t,r):(this.writeKey(r),this.writeValue(String(t)));else if(n.isListSchema()){if(Array.isArray(t))if(0===t.length)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const e=n.getValueSchema(),s=this.settings.flattenLists||n.getMergedTraits().xmlFlattened;let i=1;for(const n of t){if(null==n)continue;const t=e.getMergedTraits(),o=this.getKey("member",t.xmlName,t.ec2QueryName),a=s?`${r}${i}`:`${r}${o}.${i}`;this.write(e,n,a),++i}}}else if(n.isMapSchema()){if(t&&"object"==typeof t){const e=n.getKeySchema(),s=n.getValueSchema(),i=n.getMergedTraits().xmlFlattened;let o=1;for(const[n,a]of Object.entries(t)){if(null==a)continue;const t=e.getMergedTraits(),l=this.getKey("key",t.xmlName,t.ec2QueryName),c=i?`${r}${o}.${l}`:`${r}entry.${o}.${l}`,d=s.getMergedTraits(),u=this.getKey("value",d.xmlName,d.ec2QueryName),p=i?`${r}${o}.${u}`:`${r}entry.${o}.${u}`;this.write(e,n,c),this.write(s,a,p),++o}}}else if(n.isStructSchema()){if(t&&"object"==typeof t){let e=!1;for(const[s,i]of n.structIterator()){if(null==t[s]&&!i.isIdempotencyToken())continue;const n=i.getMergedTraits(),o=`${r}${this.getKey(s,n.xmlName,n.ec2QueryName,"struct")}`;this.write(i,t[s],o),e=!0}if(!e&&n.isUnionSchema()){const{$unknown:e}=t;if(Array.isArray(e)){const[t,n]=e,s=`${r}${t}`;this.write(15,n,s)}}}}else if(!n.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${n.getName(!0)}`)}flush(){if(void 0===this.buffer)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const e=this.buffer;return delete this.buffer,e}getKey(e,t,r,n){const{ec2:s,capitalizeKeys:i}=this.settings;if(s&&r)return r;const o=t??e;return i&&"struct"===n?o[0].toUpperCase()+o.slice(1):o}writeKey(e){e.endsWith(".")&&(e=e.slice(0,e.length-1)),this.buffer+=`&${(0,lr.$)(e)}=`}writeValue(e){this.buffer+=(0,lr.$)(e)}}class gr extends He.M{options;serializer;deserializer;mixin=new tt.U;constructor(e){super({defaultNamespace:e.defaultNamespace}),this.options=e;const t={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace,serializeEmptyLists:!0};this.serializer=new hr(t),this.deserializer=new or(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,r){const n=await super.serializeRequest(e,t,r);n.path.endsWith("/")||(n.path+="/"),Object.assign(n.headers,{"content-type":"application/x-www-form-urlencoded"}),"unit"!==(0,Je.L)(e.input)&&n.body||(n.body="");const s=e.name.split("#")[1]??e.name;return n.body=`Action=${s}&Version=${this.options.version}`+n.body,n.body.endsWith("&")&&(n.body=n.body.slice(-1)),n}async deserializeResponse(e,t,r){const n=this.deserializer,s=et.l.of(e.output),i={};if(r.statusCode>=300){const s=await(0,Xe.P)(r.body,t);s.byteLength>0&&Object.assign(i,await n.read(15,s)),await this.handleError(e,t,r,i,this.deserializeMetadata(r))}for(const e in r.headers){const t=r.headers[e];delete r.headers[e],r.headers[e.toLowerCase()]=t}const o=e.name.split("#")[1]??e.name,a=s.isStructSchema()&&this.useNestedResult()?o+"Result":void 0,l=await(0,Xe.P)(r.body,t);return l.byteLength>0&&Object.assign(i,await n.read(s,l,a)),{$metadata:this.deserializeMetadata(r),...i}}useNestedResult(){return!0}async handleError(e,t,r,n,s){const i=this.loadQueryErrorCode(r,n)??"Unknown",o=this.loadQueryError(n),a=this.loadQueryErrorMessage(n);o.message=a,o.Error={Type:o.Type,Code:o.Code,Message:a};const{errorSchema:l,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(i,this.options.defaultNamespace,r,o,s,this.mixin.findQueryCompatibleError),u=et.l.of(l),p=new(d.O.for(l[1]).getErrorCtor(l)??Error)(a),h={Type:o.Error.Type,Code:o.Error.Code,Error:o.Error};for(const[e,t]of u.structIterator()){const r=t.getMergedTraits().xmlName??e,s=o[r]??n[r];h[e]=this.deserializer.readSchema(t,s)}throw this.mixin.decorateServiceException(Object.assign(p,c,{$fault:u.getMergedTraits().error,message:a},h),n)}loadQueryErrorCode(e,t){const r=(t.Errors?.[0]?.Error??t.Errors?.Error??t.Error)?.Code;return void 0!==r?r:404==e.statusCode?"NotFound":void 0}loadQueryError(e){return e.Errors?.[0]?.Error??e.Errors?.Error??e.Error}loadQueryErrorMessage(e){const t=this.loadQueryError(e);return t?.message??t?.Message??e.message??e.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}var fr=r(3761),mr=r(67933),xr=r(12544),Er=r(40935),yr=r(53037),br=r(48105),wr=r(1034),Sr=r(7856);const vr="required",Tr="type",Nr="fn",Ir="argv",Ar="ref",Pr=!1,Cr=!0,Dr="booleanEquals",$r="stringEquals",kr="sigv4",Or="us-east-1",Rr="endpoint",Mr="https://sts.{Region}.{PartitionResult#dnsSuffix}",Fr="tree",Vr="error",Ur="getAttr",Lr={[vr]:!1,[Tr]:"string"},jr={[vr]:!0,default:!1,[Tr]:"boolean"},zr={[Ar]:"Endpoint"},_r={[Nr]:"isSet",[Ir]:[{[Ar]:"Region"}]},Kr={[Ar]:"Region"},Wr={[Nr]:"aws.partition",[Ir]:[Kr],assign:"PartitionResult"},Br={[Ar]:"UseFIPS"},qr={[Ar]:"UseDualStack"},Gr={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:kr,signingName:"sts",signingRegion:Or}]},headers:{}},Qr={},Yr={conditions:[{[Nr]:$r,[Ir]:[Kr,"aws-global"]}],[Rr]:Gr,[Tr]:Rr},Zr={[Nr]:Dr,[Ir]:[Br,!0]},Hr={[Nr]:Dr,[Ir]:[qr,!0]},Xr={[Nr]:Ur,[Ir]:[{[Ar]:"PartitionResult"},"supportsFIPS"]},Jr={[Ar]:"PartitionResult"},en={[Nr]:Dr,[Ir]:[!0,{[Nr]:Ur,[Ir]:[Jr,"supportsDualStack"]}]},tn=[{[Nr]:"isSet",[Ir]:[zr]}],rn=[Zr],nn=[Hr],sn={version:"1.0",parameters:{Region:Lr,UseDualStack:jr,UseFIPS:jr,Endpoint:Lr,UseGlobalEndpoint:jr},rules:[{conditions:[{[Nr]:Dr,[Ir]:[{[Ar]:"UseGlobalEndpoint"},Cr]},{[Nr]:"not",[Ir]:tn},_r,Wr,{[Nr]:Dr,[Ir]:[Br,Pr]},{[Nr]:Dr,[Ir]:[qr,Pr]}],rules:[{conditions:[{[Nr]:$r,[Ir]:[Kr,"ap-northeast-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"ap-south-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"ap-southeast-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"ap-southeast-2"]}],endpoint:Gr,[Tr]:Rr},Yr,{conditions:[{[Nr]:$r,[Ir]:[Kr,"ca-central-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"eu-central-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"eu-north-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"eu-west-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"eu-west-2"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"eu-west-3"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"sa-east-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,Or]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"us-east-2"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"us-west-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"us-west-2"]}],endpoint:Gr,[Tr]:Rr},{endpoint:{url:Mr,properties:{authSchemes:[{name:kr,signingName:"sts",signingRegion:"{Region}"}]},headers:Qr},[Tr]:Rr}],[Tr]:Fr},{conditions:tn,rules:[{conditions:rn,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[Tr]:Vr},{conditions:nn,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[Tr]:Vr},{endpoint:{url:zr,properties:Qr,headers:Qr},[Tr]:Rr}],[Tr]:Fr},{conditions:[_r],rules:[{conditions:[Wr],rules:[{conditions:[Zr,Hr],rules:[{conditions:[{[Nr]:Dr,[Ir]:[Cr,Xr]},en],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Qr,headers:Qr},[Tr]:Rr}],[Tr]:Fr},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[Tr]:Vr}],[Tr]:Fr},{conditions:rn,rules:[{conditions:[{[Nr]:Dr,[Ir]:[Xr,Cr]}],rules:[{conditions:[{[Nr]:$r,[Ir]:[{[Nr]:Ur,[Ir]:[Jr,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Qr,headers:Qr},[Tr]:Rr},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Qr,headers:Qr},[Tr]:Rr}],[Tr]:Fr},{error:"FIPS is enabled but this partition does not support FIPS",[Tr]:Vr}],[Tr]:Fr},{conditions:nn,rules:[{conditions:[en],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Qr,headers:Qr},[Tr]:Rr}],[Tr]:Fr},{error:"DualStack is enabled but this partition does not support DualStack",[Tr]:Vr}],[Tr]:Fr},Yr,{endpoint:{url:Mr,properties:Qr,headers:Qr},[Tr]:Rr}],[Tr]:Fr}],[Tr]:Fr},{error:"Invalid Configuration: Missing Region",[Tr]:Vr}]},on=new br.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),an=(e,t={})=>on.get(e,()=>(0,wr.s)(sn,{endpointParams:e,logger:t.logger}));Sr.m.aws=yr.UF;var ln=r(93673),cn=r(78646),dn=r(18081);class un extends Pe.K{config;constructor(...[e]){const t=(e=>{(0,qe.I)(process.version);const t=(0,Ye.I)(e),r=()=>t().then(Ge.l),n=(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??xr.E,base64Encoder:e?.base64Encoder??pr.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??an,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Oe,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Ve.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new _e.m}],logger:e?.logger??new fr.N,protocol:e?.protocol??gr,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:q,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??mr.D,utf8Decoder:e?.utf8Decoder??Er.a,utf8Encoder:e?.utf8Encoder??nr.P}))(e);(0,Me.I)(process.version);const o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,i.Z)(Fe.$,o),bodyLengthChecker:e?.bodyLengthChecker??Qe.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Ue.pf)({serviceId:n.serviceId,clientVersion:Re.rE}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4")||(async t=>await e.credentialDefaultProvider(t?.__config||{})()),signer:new Ve.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new _e.m}],maxAttempts:e?.maxAttempts??(0,i.Z)(Ie.qs,e),region:e?.region??(0,i.Z)(s.GG,{...s.zH,...o}),requestHandler:We.$.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,i.Z)({...Ie.kN,default:async()=>(await r()).retryMode||Ze.L0},e),sha256:e?.sha256??Ke.V.bind(null,"sha256"),streamCollector:e?.streamCollector??Be.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,i.Z)(je.e$,o),useFipsEndpoint:e?.useFipsEndpoint??(0,i.Z)(ze.Ko,o),userAgentAppId:e?.userAgentAppId??(0,i.Z)(Le.hV,o)}})(e||{});super(t),this.initConfig=t;const r=(n=t,Object.assign(n,{useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,useGlobalEndpoint:n.useGlobalEndpoint??!1,defaultSigningName:"sts"}));var n;const o=(0,xe.D)(r),a=(0,Ie.$z)(o),l=(0,ye.T)(a),c=(0,ge.OV)(l),d=((e,t)=>{const r=Object.assign((0,ln.R)(e),(0,dn.xA)(e),(0,cn.e)(e),(e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(e){const r=t.findIndex(t=>t.schemeId===e.schemeId);-1===r?t.push(e):t.splice(r,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){r=e},httpAuthSchemeProvider:()=>r,setCredentials(e){n=e},credentials:()=>n}})(e));return t.forEach(e=>e.configure(r)),Object.assign(e,(0,ln.$)(r),(0,dn.uv)(r),(0,cn.j)(r),{httpAuthSchemes:(n=r).httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()});var n})((e=>{const t=(r=e,Object.assign(r,{stsClientCtor:un}));var r;const n=(0,Ce.h)(t);return Object.assign(n,{authSchemePreference:(0,$e.t)(e.authSchemePreference??[])})})((0,Ne.C)(c)),e?.extensions||[]);this.config=d,this.middlewareStack.use((0,ve.wq)(this.config)),this.middlewareStack.use((0,Ee.sM)(this.config)),this.middlewareStack.use((0,Ae.ey)(this.config)),this.middlewareStack.use((0,Te.vK)(this.config)),this.middlewareStack.use((0,ge.TC)(this.config)),this.middlewareStack.use((0,fe.Y7)(this.config)),this.middlewareStack.use((0,me.n)(this.config)),this.middlewareStack.use((0,be.w)(this.config,{httpAuthSchemeParametersProvider:ke,identityProviderConfigProvider:async e=>new we.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,Se.l)(this.config))}destroy(){super.destroy()}}const pn=(e,t)=>t?class extends e{constructor(e){super(e);for(const e of t)this.middlewareStack.use(e)}}:e,hn=(e={},t)=>((e,t)=>{let r,s;return async(i,o)=>{if(s=i,!r){const{logger:n=e?.parentClientConfig?.logger,profile:i=e?.parentClientConfig?.profile,region:o,requestHandler:a=e?.parentClientConfig?.requestHandler,credentialProviderLogger:l,userAgentAppId:c=e?.parentClientConfig?.userAgentAppId}=e,d=await pe(o,e?.parentClientConfig?.region,l,{logger:n,profile:i}),u=!he(a);r=new t({...e,userAgentAppId:c,profile:i,credentialDefaultProvider:()=>async()=>s,region:d,requestHandler:u?a:void 0,logger:n})}const{Credentials:a,AssumedRoleUser:l}=await r.send(new ce(o));if(!a||!a.AccessKeyId||!a.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${o.RoleArn}`);const c=ue(l),d={accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,sessionToken:a.SessionToken,expiration:a.Expiration,...a.CredentialScope&&{credentialScope:a.CredentialScope},...c&&{accountId:c}};return(0,n.g)(d,"CREDENTIALS_STS_ASSUME_ROLE","i"),d}})(e,pn(un,t)),gn=(e={},t)=>((e,t)=>{let r;return async s=>{if(!r){const{logger:n=e?.parentClientConfig?.logger,profile:s=e?.parentClientConfig?.profile,region:i,requestHandler:o=e?.parentClientConfig?.requestHandler,credentialProviderLogger:a,userAgentAppId:l=e?.parentClientConfig?.userAgentAppId}=e,c=await pe(i,e?.parentClientConfig?.region,a,{logger:n,profile:s}),d=!he(o);r=new t({...e,userAgentAppId:l,profile:s,region:c,requestHandler:d?o:void 0,logger:n})}const{Credentials:i,AssumedRoleUser:o}=await r.send(new de(s));if(!i||!i.AccessKeyId||!i.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${s.RoleArn}`);const a=ue(o),l={accessKeyId:i.AccessKeyId,secretAccessKey:i.SecretAccessKey,sessionToken:i.SessionToken,expiration:i.Expiration,...i.CredentialScope&&{credentialScope:i.CredentialScope},...a&&{accountId:a}};return a&&(0,n.g)(l,"RESOLVED_ACCOUNT_ID","T"),(0,n.g)(l,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),l}})(e,pn(un,t))},14433:(e,t,r)=>{r.d(t,{m:()=>n});class n{async sign(e,t,r){return e}}},30259:(e,t,r)=>{function n(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}r.d(t,{$:()=>n})},69700:(e,t,r)=>{r.d(t,{G:()=>n});const n=e=>{const t=e.length,r=[];let n,s=!1,i=0;for(let o=0;o<t;++o){const t=e[o];switch(t){case'"':"\\"!==n&&(s=!s);break;case",":s||(r.push(e.slice(i,o)),i=o+1)}n=t}return r.push(e.slice(i)),r.map(e=>{const t=(e=e.trim()).length;return t<2?e:('"'===e[0]&&'"'===e[t-1]&&(e=e.slice(1,t-1)),e.replace(/\\"/g,'"'))})}},90966:e=>{e.exports={rE:"3.990.0"}}};
package/dist/202.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";exports.id=202,exports.ids=[202],exports.modules={9202:(e,r,t)=>{t.d(r,{CreateTokenCommand:()=>Or,SSOOIDCClient:()=>Pr});var o=t(97040),i=t(74534),n=t(70775),s=t(86693),c=t(66575),a=t(94615),p=t(45326),d=t(9575),u=t(68249),l=t(75279),h=t(10860),g=t(39412),m=t(72084),f=t(10773),S=t(9942),v=t(63089),y=t(45547),E=t(81974);const x=async(e,r,t)=>({operation:(0,y.u)(r).operation,region:await(0,E.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),P=e=>{const r=[];return"CreateToken"===e.operation?r.push({schemeId:"smithy.api#noAuth"}):r.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(e,r)=>({signingProperties:{config:e,context:r}})}}(e)),r},I={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var k=t(90966),O=t(10706),b=t(56232),w=t(60803),C=t(52005),A=t(96901),D=t(24661),_=t(46109),T=t(5012),$=t(7387),R=t(24176),U=t(64327),j=t(34338),F=t(57815),z=t(55425),q=t(99816),G=t(48828),H=t(70868),V=t(80843),Z=t(14433),M=t(3761),N=t(67933),K=t(12544),L=t(39181),W=t(40935),Y=t(2914),B=t(53037),J=t(48105),Q=t(1034),X=t(7856);const ee="required",re="fn",te="argv",oe="ref",ie=!0,ne="isSet",se="booleanEquals",ce="error",ae="endpoint",pe="tree",de="PartitionResult",ue="getAttr",le={[ee]:!1,type:"string"},he={[ee]:!0,default:!1,type:"boolean"},ge={[oe]:"Endpoint"},me={[re]:se,[te]:[{[oe]:"UseFIPS"},!0]},fe={[re]:se,[te]:[{[oe]:"UseDualStack"},!0]},Se={},ve={[re]:ue,[te]:[{[oe]:de},"supportsFIPS"]},ye={[oe]:de},Ee={[re]:se,[te]:[!0,{[re]:ue,[te]:[ye,"supportsDualStack"]}]},xe=[me],Pe=[fe],Ie=[{[oe]:"Region"}],ke={version:"1.0",parameters:{Region:le,UseDualStack:he,UseFIPS:he,Endpoint:le},rules:[{conditions:[{[re]:ne,[te]:[ge]}],rules:[{conditions:xe,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:ce},{conditions:Pe,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:ce},{endpoint:{url:ge,properties:Se,headers:Se},type:ae}],type:pe},{conditions:[{[re]:ne,[te]:Ie}],rules:[{conditions:[{[re]:"aws.partition",[te]:Ie,assign:de}],rules:[{conditions:[me,fe],rules:[{conditions:[{[re]:se,[te]:[ie,ve]},Ee],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Se,headers:Se},type:ae}],type:pe},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:ce}],type:pe},{conditions:xe,rules:[{conditions:[{[re]:se,[te]:[ve,ie]}],rules:[{conditions:[{[re]:"stringEquals",[te]:[{[re]:ue,[te]:[ye,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:Se,headers:Se},type:ae},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Se,headers:Se},type:ae}],type:pe},{error:"FIPS is enabled but this partition does not support FIPS",type:ce}],type:pe},{conditions:Pe,rules:[{conditions:[Ee],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Se,headers:Se},type:ae}],type:pe},{error:"DualStack is enabled but this partition does not support DualStack",type:ce}],type:pe},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:Se,headers:Se},type:ae}],type:pe}],type:pe},{error:"Invalid Configuration: Missing Region",type:ce}]},Oe=new J.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),be=(e,r={})=>Oe.get(e,()=>(0,Q.s)(ke,{endpointParams:e,logger:r.logger}));X.m.aws=B.UF;var we=t(51453),Ce=t(6723);class Ae extends Ce.T{constructor(e){super(e),Object.setPrototypeOf(this,Ae.prototype)}}class De extends Ae{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,De.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class _e extends Ae{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e}),Object.setPrototypeOf(this,_e.prototype),this.error=e.error,this.error_description=e.error_description}}class Te extends Ae{name="ExpiredTokenException";$fault="client";error;error_description;constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,Te.prototype),this.error=e.error,this.error_description=e.error_description}}class $e extends Ae{name="InternalServerException";$fault="server";error;error_description;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,$e.prototype),this.error=e.error,this.error_description=e.error_description}}class Re extends Ae{name="InvalidClientException";$fault="client";error;error_description;constructor(e){super({name:"InvalidClientException",$fault:"client",...e}),Object.setPrototypeOf(this,Re.prototype),this.error=e.error,this.error_description=e.error_description}}class Ue extends Ae{name="InvalidGrantException";$fault="client";error;error_description;constructor(e){super({name:"InvalidGrantException",$fault:"client",...e}),Object.setPrototypeOf(this,Ue.prototype),this.error=e.error,this.error_description=e.error_description}}class je extends Ae{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,je.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class Fe extends Ae{name="InvalidScopeException";$fault="client";error;error_description;constructor(e){super({name:"InvalidScopeException",$fault:"client",...e}),Object.setPrototypeOf(this,Fe.prototype),this.error=e.error,this.error_description=e.error_description}}class ze extends Ae{name="SlowDownException";$fault="client";error;error_description;constructor(e){super({name:"SlowDownException",$fault:"client",...e}),Object.setPrototypeOf(this,ze.prototype),this.error=e.error,this.error_description=e.error_description}}class qe extends Ae{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e}),Object.setPrototypeOf(this,qe.prototype),this.error=e.error,this.error_description=e.error_description}}class Ge extends Ae{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,Ge.prototype),this.error=e.error,this.error_description=e.error_description}}const He="client",Ve="error",Ze="error_description",Me="http",Ne="httpError",Ke="reason",Le="refreshToken",We="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",Ye="com.amazonaws.ssooidc",Be=we.O.for(We);var Je=[-3,We,"SSOOIDCServiceException",0,[],[]];Be.registerError(Je,Ae);const Qe=we.O.for(Ye);var Xe=[-3,Ye,"AccessDeniedException",{[Ve]:He,[Ne]:400},[Ve,Ke,Ze],[0,0,0]];Qe.registerError(Xe,De);var er=[-3,Ye,"AuthorizationPendingException",{[Ve]:He,[Ne]:400},[Ve,Ze],[0,0]];Qe.registerError(er,_e);var rr=[-3,Ye,"ExpiredTokenException",{[Ve]:He,[Ne]:400},[Ve,Ze],[0,0]];Qe.registerError(rr,Te);var tr=[-3,Ye,"InternalServerException",{[Ve]:"server",[Ne]:500},[Ve,Ze],[0,0]];Qe.registerError(tr,$e);var or=[-3,Ye,"InvalidClientException",{[Ve]:He,[Ne]:401},[Ve,Ze],[0,0]];Qe.registerError(or,Re);var ir=[-3,Ye,"InvalidGrantException",{[Ve]:He,[Ne]:400},[Ve,Ze],[0,0]];Qe.registerError(ir,Ue);var nr=[-3,Ye,"InvalidRequestException",{[Ve]:He,[Ne]:400},[Ve,Ke,Ze],[0,0,0]];Qe.registerError(nr,je);var sr=[-3,Ye,"InvalidScopeException",{[Ve]:He,[Ne]:400},[Ve,Ze],[0,0]];Qe.registerError(sr,Fe);var cr=[-3,Ye,"SlowDownException",{[Ve]:He,[Ne]:400},[Ve,Ze],[0,0]];Qe.registerError(cr,ze);var ar=[-3,Ye,"UnauthorizedClientException",{[Ve]:He,[Ne]:400},[Ve,Ze],[0,0]];Qe.registerError(ar,qe);var pr=[-3,Ye,"UnsupportedGrantTypeException",{[Ve]:He,[Ne]:400},[Ve,Ze],[0,0]];Qe.registerError(pr,Ge);const dr=[Be,Qe];var ur=[0,Ye,"AccessToken",8,0],lr=[0,Ye,"ClientSecret",8,0],hr=[0,Ye,"CodeVerifier",8,0],gr=[0,Ye,"IdToken",8,0],mr=[0,Ye,"RefreshToken",8,0],fr=[3,Ye,"CreateTokenRequest",0,["clientId","clientSecret","grantType","deviceCode","code",Le,"scope","redirectUri","codeVerifier"],[0,[()=>lr,0],0,0,0,[()=>mr,0],64,0,[()=>hr,0]],3],Sr=[3,Ye,"CreateTokenResponse",0,["accessToken","tokenType","expiresIn",Le,"idToken"],[[()=>ur,0],0,1,[()=>mr,0],[()=>gr,0]]],vr=[9,Ye,"CreateToken",{[Me]:["POST","/token",200]},()=>fr,()=>Sr];var yr=t(93673),Er=t(78646),xr=t(18081);class Pr extends S.K{config;constructor(...[e]){const r=(e=>{(0,j.I)(process.version);const r=(0,q.I)(e),t=()=>r().then(F.l),o=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??K.E,base64Encoder:e?.base64Encoder??L.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??be,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??P,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new H.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Z.m}],logger:e?.logger??new M.N,protocol:e?.protocol??V.Y,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:dr,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??N.D,utf8Decoder:e?.utf8Decoder??W.a,utf8Encoder:e?.utf8Encoder??Y.P}))(e);(0,O.I)(process.version);const i={profile:e?.profile,logger:o.logger};return{...o,...e,runtime:"node",defaultsMode:r,authSchemePreference:e?.authSchemePreference??(0,$.Z)(b.$,i),bodyLengthChecker:e?.bodyLengthChecker??z.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,w.pf)({serviceId:o.serviceId,clientVersion:k.rE}),maxAttempts:e?.maxAttempts??(0,$.Z)(m.qs,e),region:e?.region??(0,$.Z)(A.GG,{...A.zH,...i}),requestHandler:R.$.create(e?.requestHandler??t),retryMode:e?.retryMode??(0,$.Z)({...m.kN,default:async()=>(await t()).retryMode||G.L0},e),sha256:e?.sha256??T.V.bind(null,"sha256"),streamCollector:e?.streamCollector??U.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,$.Z)(D.e$,i),useFipsEndpoint:e?.useFipsEndpoint??(0,$.Z)(_.Ko,i),userAgentAppId:e?.userAgentAppId??(0,$.Z)(C.hV,i)}})(e||{});super(r),this.initConfig=r;const t=(S=r,Object.assign(S,{useDualstackEndpoint:S.useDualstackEndpoint??!1,useFipsEndpoint:S.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}));var S;const y=(0,s.D)(t),I=(0,m.$z)(y),B=(0,a.T)(I),J=(0,o.OV)(B),Q=((e,r)=>{const t=Object.assign((0,yr.R)(e),(0,xr.xA)(e),(0,Er.e)(e),(e=>{const r=e.httpAuthSchemes;let t=e.httpAuthSchemeProvider,o=e.credentials;return{setHttpAuthScheme(e){const t=r.findIndex(r=>r.schemeId===e.schemeId);-1===t?r.push(e):r.splice(t,1,e)},httpAuthSchemes:()=>r,setHttpAuthSchemeProvider(e){t=e},httpAuthSchemeProvider:()=>t,setCredentials(e){o=e},credentials:()=>o}})(e));return r.forEach(e=>e.configure(t)),Object.assign(e,(0,yr.$)(t),(0,xr.uv)(t),(0,Er.j)(t),{httpAuthSchemes:(o=t).httpAuthSchemes(),httpAuthSchemeProvider:o.httpAuthSchemeProvider(),credentials:o.credentials()});var o})((e=>{const r=(0,v.h)(e);return Object.assign(r,{authSchemePreference:(0,E.t)(e.authSchemePreference??[])})})((0,g.C)(J)),e?.extensions||[]);this.config=Q,this.middlewareStack.use((0,l.wq)(this.config)),this.middlewareStack.use((0,c.sM)(this.config)),this.middlewareStack.use((0,f.ey)(this.config)),this.middlewareStack.use((0,h.vK)(this.config)),this.middlewareStack.use((0,o.TC)(this.config)),this.middlewareStack.use((0,i.Y7)(this.config)),this.middlewareStack.use((0,n.n)(this.config)),this.middlewareStack.use((0,p.w)(this.config,{httpAuthSchemeParametersProvider:x,identityProviderConfigProvider:async e=>new d.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,u.l)(this.config))}destroy(){super.destroy()}}var Ir=t(66686),kr=t(22869);class Or extends(kr.u.classBuilder().ep(I).m(function(e,r,t,o){return[(0,Ir.r)(t,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(vr).build()){}},90966:e=>{e.exports={rE:"3.990.0"}}};
package/dist/238.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";exports.id=238,exports.ids=[238,857],exports.modules={1238:(e,s,o)=>{o.d(s,{fromSSO:()=>v});var n=o(43281),t=o(98229),i=o(32410),r=o(40768),a=o(90814),c=o(46086);const l=e=>Object.entries(e).filter(([e])=>e.startsWith(a.I.SSO_SESSION+c.Q)).reduce((e,[s,o])=>({...e,[s.substring(s.indexOf(c.Q)+1)]:o}),{});var g=o(41844),f=o(35789);const p=()=>({}),d=async(e={})=>(0,f.TA)(e.configFilepath??(0,r.g)()).then(g.A).then(l).catch(p);var h=o(3748),w=o(68413);class u extends w.m{name="TokenProviderError";constructor(e,s=!0){super(e,s),Object.setPrototypeOf(this,u.prototype)}}var C=o(78405);const S="To refresh this SSO session run 'aws sso login' with the corresponding profile.",_=e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new u(`Token is expired. ${S}`,!1)},k=(e,s,o=!1)=>{if(void 0===s)throw new u(`Value not present for '${e}' in SSO Token${o?". Cannot refresh":""}. ${S}`,!1)};var m=o(28226),y=o(79896);const{writeFile:T}=y.promises,x=new Date(0),O=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");const n=await(0,i.Y)(e),r=(0,t.Bz)({profile:e.profile??s?.profile}),a=n[r];if(!a)throw new u(`Profile '${r}' could not be found in shared credentials file.`,!1);if(!a.sso_session)throw new u(`Profile '${r}' is missing required property 'sso_session'.`);const c=a.sso_session,l=(await d(e))[c];if(!l)throw new u(`Sso session '${c}' could not be found in shared credentials file.`,!1);for(const e of["sso_start_url","sso_region"])if(!l[e])throw new u(`Sso session '${c}' is missing required property '${e}'.`,!1);l.sso_start_url;const g=l.sso_region;let f;try{f=await(0,C.v)(c)}catch(e){throw new u(`The SSO session token associated with profile=${r} was not found or is invalid. ${S}`,!1)}k("accessToken",f.accessToken),k("expiresAt",f.expiresAt);const{accessToken:p,expiresAt:h}=f,w={token:p,expiration:new Date(h)};if(w.expiration.getTime()-Date.now()>3e5)return w;if(Date.now()-x.getTime()<3e4)return _(w),w;k("clientId",f.clientId,!0),k("clientSecret",f.clientSecret,!0),k("refreshToken",f.refreshToken,!0);try{x.setTime(Date.now());const n=await(async(e,s,n={},t)=>{const{CreateTokenCommand:i}=await Promise.all([o.e(139),o.e(202)]).then(o.bind(o,9202)),r=await(async(e,s={},n)=>{const{SSOOIDCClient:t}=await Promise.all([o.e(139),o.e(202)]).then(o.bind(o,9202)),i=e=>s.clientConfig?.[e]??s.parentClientConfig?.[e]??n?.[e];return new t(Object.assign({},s.clientConfig??{},{region:e??s.clientConfig?.region,logger:i("logger"),userAgentAppId:i("userAgentAppId")}))})(s,n,t);return r.send(new i({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))})(f,g,e,s);k("accessToken",n.accessToken),k("expiresIn",n.expiresIn);const t=new Date(Date.now()+1e3*n.expiresIn);try{await((e,s)=>{const o=(0,m.C)(e),n=JSON.stringify(s,null,2);return T(o,n)})(c,{...f,accessToken:n.accessToken,expiresAt:t.toISOString(),refreshToken:n.refreshToken})}catch(e){}return{token:n.accessToken,expiration:t}}catch(e){return _(w),w}},I=!1,A=async({ssoStartUrl:e,ssoSession:s,ssoAccountId:t,ssoRegion:i,ssoRoleName:r,ssoClient:a,clientConfig:c,parentClientConfig:l,callerClientConfig:g,profile:f,filepath:p,configFilepath:d,ignoreCache:w,logger:u})=>{let S;const _="To refresh this SSO session run aws sso login with the corresponding profile.";if(s)try{const e=await O({profile:f,filepath:p,configFilepath:d,ignoreCache:w})();S={accessToken:e.token,expiresAt:new Date(e.expiration).toISOString()}}catch(e){throw new n.C(e.message,{tryNextLink:I,logger:u})}else try{S=await(0,C.v)(e)}catch(e){throw new n.C(`The SSO session associated with this profile is invalid. ${_}`,{tryNextLink:I,logger:u})}if(new Date(S.expiresAt).getTime()-Date.now()<=0)throw new n.C(`The SSO session associated with this profile has expired. ${_}`,{tryNextLink:I,logger:u});const{accessToken:k}=S,{SSOClient:m,GetRoleCredentialsCommand:y}=await Promise.all([o.e(139),o.e(114)]).then(o.bind(o,2114)),T=a||new m(Object.assign({},c??{},{logger:c?.logger??g?.logger??l?.logger,region:c?.region??i,userAgentAppId:c?.userAgentAppId??g?.userAgentAppId??l?.userAgentAppId}));let x;try{x=await T.send(new y({accountId:t,roleName:r,accessToken:k}))}catch(e){throw new n.C(e,{tryNextLink:I,logger:u})}const{roleCredentials:{accessKeyId:A,secretAccessKey:v,sessionToken:N,expiration:$,credentialScope:R,accountId:b}={}}=x;if(!(A&&v&&N&&$))throw new n.C("SSO returns an invalid temporary credential.",{tryNextLink:I,logger:u});const D={accessKeyId:A,secretAccessKey:v,sessionToken:N,expiration:new Date($),...R&&{credentialScope:R},...b&&{accountId:b}};return s?(0,h.g)(D,"CREDENTIALS_SSO","s"):(0,h.g)(D,"CREDENTIALS_SSO_LEGACY","u"),D},v=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:o,ssoAccountId:r,ssoRegion:a,ssoRoleName:c,ssoSession:l}=e,{ssoClient:g}=e,f=(0,t.Bz)({profile:e.profile??s?.profile});if(o||r||a||c||l){if(o&&r&&a&&c)return A({ssoStartUrl:o,ssoSession:l,ssoAccountId:r,ssoRegion:a,ssoRoleName:c,ssoClient:g,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:f,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger});throw new n.C('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger})}{const s=(await(0,i.Y)(e))[f];if(!s)throw new n.C(`Profile ${f} was not found.`,{logger:e.logger});if(!(p=s)||"string"!=typeof p.sso_start_url&&"string"!=typeof p.sso_account_id&&"string"!=typeof p.sso_session&&"string"!=typeof p.sso_region&&"string"!=typeof p.sso_role_name)throw new n.C(`Profile ${f} is not configured with SSO credentials.`,{logger:e.logger});if(s?.sso_session){const t=(await d(e))[s.sso_session],i=` configurations in profile ${f} and sso-session ${s.sso_session}`;if(a&&a!==t.sso_region)throw new n.C("Conflicting SSO region"+i,{tryNextLink:!1,logger:e.logger});if(o&&o!==t.sso_start_url)throw new n.C("Conflicting SSO start_url"+i,{tryNextLink:!1,logger:e.logger});s.sso_region=t.sso_region,s.sso_start_url=t.sso_start_url}const{sso_start_url:t,sso_account_id:r,sso_region:c,sso_role_name:l,sso_session:h}=((e,s)=>{const{sso_start_url:o,sso_account_id:t,sso_region:i,sso_role_name:r}=e;if(!(o&&t&&i&&r))throw new n.C(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:s});return e})(s,e.logger);return A({ssoStartUrl:t,ssoSession:h,ssoAccountId:r,ssoRegion:c,ssoRoleName:l,ssoClient:g,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:f,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}var p}},28226:(e,s,o)=>{o.d(s,{C:()=>r});var n=o(76982),t=o(16928),i=o(14581);const r=e=>{const s=(0,n.createHash)("sha1").update(e).digest("hex");return(0,t.join)((0,i.R)(),".aws","sso","cache",`${s}.json`)}},32410:(e,s,o)=>{o.d(s,{Y:()=>t});var n=o(13770);const t=async e=>{const s=await(0,n.p)(e);return((...e)=>{const s={};for(const o of e)for(const[e,n]of Object.entries(o))void 0!==s[e]?Object.assign(s[e],n):s[e]=n;return s})(s.configFile,s.credentialsFile)}},78405:(e,s,o)=>{o.d(s,{a:()=>i,v:()=>r});var n=o(91943),t=o(28226);const i={},r=async e=>{if(i[e])return i[e];const s=(0,t.C)(e),o=await(0,n.readFile)(s,"utf8");return JSON.parse(o)}}};
package/dist/263.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";exports.id=263,exports.ids=[263,644],exports.modules={28226:(e,r,o)=>{o.d(r,{C:()=>c});var t=o(76982),s=o(16928),n=o(14581);const c=e=>{const r=(0,t.createHash)("sha1").update(e).digest("hex");return(0,s.join)((0,n.R)(),".aws","sso","cache",`${r}.json`)}},32410:(e,r,o)=>{o.d(r,{Y:()=>s});var t=o(13770);const s=async e=>{const r=await(0,t.p)(e);return((...e)=>{const r={};for(const o of e)for(const[e,t]of Object.entries(o))void 0!==r[e]?Object.assign(r[e],t):r[e]=t;return r})(r.configFile,r.credentialsFile)}},70737:(e,r,o)=>{o.d(r,{Z:()=>n});var t=o(78405),s=o(35789);const n={getFileRecord:()=>s.Jj,interceptFile(e,r){s.Jj[e]=Promise.resolve(r)},getTokenRecord:()=>t.a,interceptToken(e,r){t.a[e]=r}}},78263:(e,r,o)=>{o.d(r,{fromProcess:()=>l});var t=o(32410),s=o(98229),n=o(43281),c=o(70737),i=o(35317),a=o(39023),d=o(3748);const l=(e={})=>async({callerClientConfig:r}={})=>{e.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const o=await(0,t.Y)(e);return(async(e,r,o)=>{const t=r[e];if(!r[e])throw new n.C(`Profile ${e} could not be found in shared credentials file.`,{logger:o});{const s=t.credential_process;if(void 0===s)throw new n.C(`Profile ${e} did not contain credential_process.`,{logger:o});{const t=(0,a.promisify)(c.Z?.getTokenRecord?.().exec??i.exec);try{const{stdout:o}=await t(s);let n;try{n=JSON.parse(o.trim())}catch{throw Error(`Profile ${e} credential_process returned invalid JSON.`)}return((e,r,o)=>{if(1!==r.Version)throw Error(`Profile ${e} credential_process did not return Version 1.`);if(void 0===r.AccessKeyId||void 0===r.SecretAccessKey)throw Error(`Profile ${e} credential_process returned invalid credentials.`);if(r.Expiration){const o=new Date;if(new Date(r.Expiration)<o)throw Error(`Profile ${e} credential_process returned expired credentials.`)}let t=r.AccountId;!t&&o?.[e]?.aws_account_id&&(t=o[e].aws_account_id);const s={accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,...r.SessionToken&&{sessionToken:r.SessionToken},...r.Expiration&&{expiration:new Date(r.Expiration)},...r.CredentialScope&&{credentialScope:r.CredentialScope},...t&&{accountId:t}};return(0,d.g)(s,"CREDENTIALS_PROCESS","w"),s})(e,n,r)}catch(e){throw new n.C(e.message,{logger:o})}}}})((0,s.Bz)({profile:e.profile??r?.profile}),o,e.logger)}},78405:(e,r,o)=>{o.d(r,{a:()=>n,v:()=>c});var t=o(91943),s=o(28226);const n={},c=async e=>{if(n[e])return n[e];const r=(0,s.C)(e),o=await(0,t.readFile)(r,"utf8");return JSON.parse(o)}}};
package/dist/294.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";exports.id=294,exports.ids=[294],exports.modules={44128:(e,t,r)=>{r.d(t,{c:()=>p});var o=r(64327),n=r(25272),a=r(2203),s=r(12544);var i=r(39181),c=r(92278),l=r(2914);const d=e=>"function"==typeof ReadableStream&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),u="The stream has already been transformed.",f=e=>{if(!h(e)&&!d(e))throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${e?.__proto__?.constructor?.name||e}`);let t=!1;const r=async()=>{if(t)throw new Error(u);return t=!0,await(async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,r)=>{const o=new FileReader;o.onloadend=()=>{if(2!==o.readyState)return r(new Error("Reader aborted too early"));const e=o.result??"",n=e.indexOf(","),a=n>-1?n+1:e.length;t(e.substring(a))},o.onabort=()=>r(new Error("Read aborted")),o.onerror=()=>r(o.error),o.readAsDataURL(e)})}(e),r=(0,s.E)(t);return new Uint8Array(r)}(e):async function(e){const t=[],r=e.getReader();let o=!1,n=0;for(;!o;){const{done:e,value:a}=await r.read();a&&(t.push(a),n+=a.length),o=e}const a=new Uint8Array(n);let s=0;for(const e of t)a.set(e,s),s+=e.length;return a}(e))(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async e=>{const t=await r();if("base64"===e)return(0,i.n)(t);if("hex"===e)return(0,c.n)(t);if(void 0===e||"utf8"===e||"utf-8"===e)return(0,l.P)(t);if("function"==typeof TextDecoder)return new TextDecoder(e).decode(t);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(u);if(t=!0,h(e))return(e=>{if("function"!=typeof e.stream)throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return e.stream()})(e);if(d(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},h=e=>"function"==typeof Blob&&e instanceof Blob,w="The stream has already been transformed.",p=e=>{if(!(e instanceof a.Readable))try{return f(e)}catch(t){throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${e?.__proto__?.constructor?.name||e}`)}let t=!1;const r=async()=>{if(t)throw new Error(w);return t=!0,await(0,o.k)(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async e=>{const t=await r();return void 0===e||Buffer.isEncoding(e)?(0,n.Q)(t.buffer,t.byteOffset,t.byteLength).toString(e):new TextDecoder(e).decode(t)},transformToWebStream:()=>{if(t)throw new Error(w);if(null!==e.readableFlowing)throw new Error("The stream has been consumed by other callbacks.");if("function"!=typeof a.Readable.toWeb)throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return t=!0,a.Readable.toWeb(e)}})}},77294:(e,t,r)=>{r.d(t,{fromHttp:()=>u});var o=r(3748),n=r(24176),a=r(43281),s=r(91943),i=r.n(s),c=r(81781),l=r(10015),d=r(44128);const u=(e={})=>{let t;e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");const r=e.awsContainerCredentialsRelativeUri??process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI,s=e.awsContainerCredentialsFullUri??process.env.AWS_CONTAINER_CREDENTIALS_FULL_URI,u=e.awsContainerAuthorizationToken??process.env.AWS_CONTAINER_AUTHORIZATION_TOKEN,f=e.awsContainerAuthorizationTokenFile??process.env.AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE,h="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?.warn?e.logger.warn.bind(e.logger):console.warn;if(r&&s&&(h("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),h("awsContainerCredentialsFullUri will take precedence.")),u&&f&&(h("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),h("awsContainerAuthorizationToken will take precedence.")),s)t=s;else{if(!r)throw new a.C("No HTTP credential provider host provided.\nSet AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.",{logger:e.logger});t=`http://169.254.170.2${r}`}const w=new URL(t);((e,t)=>{if("https:"!==e.protocol&&"169.254.170.2"!==e.hostname&&"169.254.170.23"!==e.hostname&&"[fd00:ec2::23]"!==e.hostname){if(e.hostname.includes("[")){if("[::1]"===e.hostname||"[0000:0000:0000:0000:0000:0000:0000:0001]"===e.hostname)return}else{if("localhost"===e.hostname)return;const t=e.hostname.split("."),r=e=>{const t=parseInt(e,10);return 0<=t&&t<=255};if("127"===t[0]&&r(t[1])&&r(t[2])&&r(t[3])&&4===t.length)return}throw new a.C("URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]",{logger:t})}})(w,e.logger);const p=n.$.create({requestTimeout:e.timeout??1e3,connectionTimeout:e.timeout??1e3});return m=async()=>{const t=function(e){return new c.K({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((e,[t,r])=>(e[t]=r,e),{}),fragment:e.hash})}(w);u?t.headers.Authorization=u:f&&(t.headers.Authorization=(await i().readFile(f)).toString());try{return async function(e,t){const r=(0,d.c)(e.body),o=await r.transformToString();if(200===e.statusCode){const e=JSON.parse(o);if("string"!=typeof e.AccessKeyId||"string"!=typeof e.SecretAccessKey||"string"!=typeof e.Token||"string"!=typeof e.Expiration)throw new a.C("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:t});return{accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:(0,l.EI)(e.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let r={};try{r=JSON.parse(o)}catch(e){}throw Object.assign(new a.C(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:r.Code,Message:r.Message})}throw new a.C(`Server responded with status: ${e.statusCode}`,{logger:t})}((await p.handle(t)).response).then(e=>(0,o.g)(e,"CREDENTIALS_HTTP","z"))}catch(t){throw new a.C(String(t),{logger:e.logger})}},g=e.maxRetries??3,y=e.timeout??1e3,async()=>{for(let e=0;e<g;++e)try{return await m()}catch(e){await new Promise(e=>setTimeout(e,y))}return await m()};var m,g,y}}};