@thunderclient/cli 1.18.0 → 1.20.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.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=114,exports.ids=[114],exports.modules={785:(e,r,o)=>{o.r(r),o.d(r,{fromProcess:()=>d});var t=o(58),n=o(57),s=o(30),i=o(9),c=o(66);const a=async(e,r,o)=>{const t=r[e];if(!r[e])throw new n.C1(`Profile ${e} could not be found in shared credentials file.`,{logger:o});{const a=t.credential_process;if(void 0===a)throw new n.C1(`Profile ${e} did not contain credential_process.`,{logger:o});{const t=(0,i.promisify)(s.exec);try{const{stdout:o}=await t(a);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 n={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,c.g)(n,"CREDENTIALS_PROCESS","w"),n})(e,n,r)}catch(e){throw new n.C1(e.message,{logger:o})}}}},d=(e={})=>async({callerClientConfig:r}={})=>{e.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const o=await(0,t.YU)(e);return a((0,t.Bz)({profile:e.profile??r?.profile}),o,e.logger)}}};
3
+ //# sourceMappingURL=114.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=330,exports.ids=[330],exports.modules={787:(e,t,a)=>{a.d(t,{ENV_CMDS_FULL_URI:()=>f,ENV_CMDS_RELATIVE_URI:()=>m,fromContainerMetadata:()=>h,fromInstanceMetadata:()=>$,getInstanceMetadataEndpoint:()=>T,httpRequest:()=>s});var n=a(57),r=a(4),o=a(29),i=a(23);function s(e){return new Promise(((t,a)=>{const r=(0,i.request)({method:"GET",...e,hostname:e.hostname?.replace(/^\[(.+)\]$/,"$1")});r.on("error",(e=>{a(Object.assign(new n.mZ("Unable to connect to instance metadata service"),e)),r.destroy()})),r.on("timeout",(()=>{a(new n.mZ("TimeoutError from instance metadata service")),r.destroy()})),r.on("response",(e=>{const{statusCode:i=400}=e;(i<200||300<=i)&&(a(Object.assign(new n.mZ("Error response received from instance metadata service"),{statusCode:i})),r.destroy());const s=[];e.on("data",(e=>{s.push(e)})),e.on("end",(()=>{t(o.Buffer.concat(s)),r.destroy()}))})),r.end()}))}const c=e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.AccessKeyId&&"string"==typeof e.SecretAccessKey&&"string"==typeof e.Token&&"string"==typeof e.Expiration,l=e=>({accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:new Date(e.Expiration),...e.AccountId&&{accountId:e.AccountId}}),d=({maxRetries:e=0,timeout:t=1e3})=>({maxRetries:e,timeout:t}),u=(e,t)=>{let a=e();for(let n=0;n<t;n++)a=a.catch(e);return a},f="AWS_CONTAINER_CREDENTIALS_FULL_URI",m="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",p="AWS_CONTAINER_AUTHORIZATION_TOKEN",h=(e={})=>{const{timeout:t,maxRetries:a}=d(e);return()=>u((async()=>{const a=await y({logger:e.logger}),r=JSON.parse(await w(t,a));if(!c(r))throw new n.C1("Invalid response received from instance metadata service.",{logger:e.logger});return l(r)}),a)},w=async(e,t)=>{process.env[p]&&(t.headers={...t.headers,Authorization:process.env[p]});return(await s({...t,timeout:e})).toString()},v={localhost:!0,"127.0.0.1":!0},g={"http:":!0,"https:":!0},y=async({logger:e})=>{if(process.env[m])return{hostname:"169.254.170.2",path:process.env[m]};if(process.env[f]){const t=(0,r.parse)(process.env[f]);if(!t.hostname||!(t.hostname in v))throw new n.C1(`${t.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:e});if(!t.protocol||!(t.protocol in g))throw new n.C1(`${t.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:e});return{...t,port:t.port?parseInt(t.port,10):void 0}}throw new n.C1(`The container metadata credential provider cannot be used unless the ${m} or ${f} environment variable is set`,{tryNextLink:!1,logger:e})};var E=a(56);class I extends n.C1{constructor(e,t=!0){super(e,t),this.tryNextLink=t,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,I.prototype)}}var A,S=a(59);!function(e){e.IPv4="http://169.254.169.254",e.IPv6="http://[fd00:ec2::254]"}(A||(A={}));const b={environmentVariableSelector:e=>e.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:e=>e.ec2_metadata_service_endpoint,default:void 0};var _;!function(e){e.IPv4="IPv4",e.IPv6="IPv6"}(_||(_={}));const x={environmentVariableSelector:e=>e.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE,configFileSelector:e=>e.ec2_metadata_service_endpoint_mode,default:_.IPv4},T=async()=>(0,S.D)(await N()||await R()),N=async()=>(0,E.Z)(b)(),R=async()=>{const e=await(0,E.Z)(x)();switch(e){case _.IPv4:return A.IPv4;case _.IPv6:return A.IPv6;default:throw new Error(`Unsupported endpoint mode: ${e}. Select from ${Object.values(_)}`)}},k=(e,t)=>{const a=300+Math.floor(300*Math.random()),n=new Date(Date.now()+1e3*a);t.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(n)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);const r=e.originalExpiration??e.expiration;return{...e,...r?{originalExpiration:r}:{},expiration:n}},D="/latest/meta-data/iam/security-credentials/",C="AWS_EC2_METADATA_V1_DISABLED",M="ec2_metadata_v1_disabled",O="x-aws-ec2-metadata-token",$=(e={})=>((e,t={})=>{const a=t?.logger||console;let n;return async()=>{let t;try{t=await e(),t.expiration&&t.expiration.getTime()<Date.now()&&(t=k(t,a))}catch(e){if(!n)throw e;a.warn("Credential renew failed: ",e),t=k(n,a)}return n=t,t}})(L(e),{logger:e.logger}),L=(e={})=>{let t=!1;const{logger:a,profile:r}=e,{timeout:o,maxRetries:i}=d(e),s=async(a,o)=>{if(t||null==o.headers?.[O]){let t=!1,a=!1;const o=await(0,E.Z)({environmentVariableSelector:t=>{const r=t[C];if(a=!!r&&"false"!==r,void 0===r)throw new n.C1(`${C} not set in env, checking config file next.`,{logger:e.logger});return a},configFileSelector:e=>{const a=e[M];return t=!!a&&"false"!==a,t},default:!1},{profile:r})();if(e.ec2MetadataV1Disabled||o){const n=[];throw e.ec2MetadataV1Disabled&&n.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"),t&&n.push(`config file profile (${M})`),a&&n.push(`process environment variable (${C})`),new I(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${n.join(", ")}].`)}}const i=(await u((async()=>{let e;try{e=await V(o)}catch(e){throw 401===e.statusCode&&(t=!1),e}return e}),a)).trim();return u((async()=>{let a;try{a=await W(i,o,e)}catch(e){throw 401===e.statusCode&&(t=!1),e}return a}),a)};return async()=>{const e=await T();if(t)return a?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),s(i,{...e,timeout:o});{let n;try{n=(await U({...e,timeout:o})).toString()}catch(n){if(400===n?.statusCode)throw Object.assign(n,{message:"EC2 Metadata token request returned error"});return("TimeoutError"===n.message||[403,404,405].includes(n.statusCode))&&(t=!0),a?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),s(i,{...e,timeout:o})}return s(i,{...e,headers:{[O]:n},timeout:o})}}},U=async e=>s({...e,path:"/latest/api/token",method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),V=async e=>(await s({...e,path:D})).toString(),W=async(e,t,a)=>{const r=JSON.parse((await s({...t,path:D+e})).toString());if(!c(r))throw new n.C1("Invalid response received from instance metadata service.",{logger:a.logger});return l(r)}}};
3
+ //# sourceMappingURL=330.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=476,exports.ids=[476],exports.modules={783:(e,s,o)=>{o.d(s,{fromSSO:()=>u});var t=o(57),n=o(58);var r=o(66);const i="To refresh this SSO session run 'aws sso login' with the corresponding profile.",a=async(e,s,t={})=>{const{CreateTokenCommand:n}=await o.e(622).then(o.bind(o,790)),r=await(async(e,s={})=>{const{SSOOIDCClient:t}=await o.e(622).then(o.bind(o,790));return new t(Object.assign({},s.clientConfig??{},{region:e??s.clientConfig?.region,logger:s.clientConfig?.logger??s.parentClientConfig?.logger}))})(s,t);return r.send(new n({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))},c=e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new t.Jh(`Token is expired. ${i}`,!1)},l=(e,s,o=!1)=>{if(void 0===s)throw new t.Jh(`Value not present for '${e}' in SSO Token${o?". Cannot refresh":""}. ${i}`,!1)};var f=o(6);const{writeFile:w}=f.promises,g=new Date(0),d=(e={})=>async({callerClientConfig:s}={})=>{const o={...e,parentClientConfig:{...s,...e.parentClientConfig}};o.logger?.debug("@aws-sdk/token-providers - fromSso");const r=await(0,n.YU)(o),f=(0,n.Bz)({profile:o.profile??s?.profile}),d=r[f];if(!d)throw new t.Jh(`Profile '${f}' could not be found in shared credentials file.`,!1);if(!d.sso_session)throw new t.Jh(`Profile '${f}' is missing required property 'sso_session'.`);const h=d.sso_session,S=(await(0,n.qw)(o))[h];if(!S)throw new t.Jh(`Sso session '${h}' could not be found in shared credentials file.`,!1);for(const e of["sso_start_url","sso_region"])if(!S[e])throw new t.Jh(`Sso session '${h}' is missing required property '${e}'.`,!1);S.sso_start_url;const u=S.sso_region;let p;try{p=await(0,n.vf)(h)}catch(e){throw new t.Jh(`The SSO session token associated with profile=${f} was not found or is invalid. ${i}`,!1)}l("accessToken",p.accessToken),l("expiresAt",p.expiresAt);const{accessToken:y,expiresAt:C}=p,k={token:y,expiration:new Date(C)};if(k.expiration.getTime()-Date.now()>3e5)return k;if(Date.now()-g.getTime()<3e4)return c(k),k;l("clientId",p.clientId,!0),l("clientSecret",p.clientSecret,!0),l("refreshToken",p.refreshToken,!0);try{g.setTime(Date.now());const e=await a(p,u,o);l("accessToken",e.accessToken),l("expiresIn",e.expiresIn);const s=new Date(Date.now()+1e3*e.expiresIn);try{await((e,s)=>{const o=(0,n.C9)(e),t=JSON.stringify(s,null,2);return w(o,t)})(h,{...p,accessToken:e.accessToken,expiresAt:s.toISOString(),refreshToken:e.refreshToken})}catch(e){}return{token:e.accessToken,expiration:s}}catch(e){return c(k),k}},h=!1,S=async({ssoStartUrl:e,ssoSession:s,ssoAccountId:i,ssoRegion:a,ssoRoleName:c,ssoClient:l,clientConfig:f,parentClientConfig:w,profile:g,logger:S})=>{let u;const p="To refresh this SSO session run aws sso login with the corresponding profile.";if(s)try{const e=await d({profile:g})();u={accessToken:e.token,expiresAt:new Date(e.expiration).toISOString()}}catch(e){throw new t.C1(e.message,{tryNextLink:h,logger:S})}else try{u=await(0,n.vf)(e)}catch(e){throw new t.C1(`The SSO session associated with this profile is invalid. ${p}`,{tryNextLink:h,logger:S})}if(new Date(u.expiresAt).getTime()-Date.now()<=0)throw new t.C1(`The SSO session associated with this profile has expired. ${p}`,{tryNextLink:h,logger:S});const{accessToken:y}=u,{SSOClient:C,GetRoleCredentialsCommand:k}=await o.e(736).then(o.bind(o,789)),_=l||new C(Object.assign({},f??{},{logger:f?.logger??w?.logger,region:f?.region??a}));let m;try{m=await _.send(new k({accountId:i,roleName:c,accessToken:y}))}catch(e){throw new t.C1(e,{tryNextLink:h,logger:S})}const{roleCredentials:{accessKeyId:T,secretAccessKey:x,sessionToken:O,expiration:N,credentialScope:$,accountId:I}={}}=m;if(!(T&&x&&O&&N))throw new t.C1("SSO returns an invalid temporary credential.",{tryNextLink:h,logger:S});const D={accessKeyId:T,secretAccessKey:x,sessionToken:O,expiration:new Date(N),...$&&{credentialScope:$},...I&&{accountId:I}};return s?(0,r.g)(D,"CREDENTIALS_SSO","s"):(0,r.g)(D,"CREDENTIALS_SSO_LEGACY","u"),D},u=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:o,ssoAccountId:r,ssoRegion:i,ssoRoleName:a,ssoSession:c}=e,{ssoClient:l}=e,f=(0,n.Bz)({profile:e.profile??s?.profile});if(o||r||i||a||c){if(o&&r&&i&&a)return S({ssoStartUrl:o,ssoSession:c,ssoAccountId:r,ssoRegion:i,ssoRoleName:a,ssoClient:l,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,profile:f});throw new t.C1('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger})}{const s=(await(0,n.YU)(e))[f];if(!s)throw new t.C1(`Profile ${f} was not found.`,{logger:e.logger});if(!(w=s)||"string"!=typeof w.sso_start_url&&"string"!=typeof w.sso_account_id&&"string"!=typeof w.sso_session&&"string"!=typeof w.sso_region&&"string"!=typeof w.sso_role_name)throw new t.C1(`Profile ${f} is not configured with SSO credentials.`,{logger:e.logger});if(s?.sso_session){const r=(await(0,n.qw)(e))[s.sso_session],a=` configurations in profile ${f} and sso-session ${s.sso_session}`;if(i&&i!==r.sso_region)throw new t.C1("Conflicting SSO region"+a,{tryNextLink:!1,logger:e.logger});if(o&&o!==r.sso_start_url)throw new t.C1("Conflicting SSO start_url"+a,{tryNextLink:!1,logger:e.logger});s.sso_region=r.sso_region,s.sso_start_url=r.sso_start_url}const{sso_start_url:r,sso_account_id:a,sso_region:c,sso_role_name:g,sso_session:d}=((e,s)=>{const{sso_start_url:o,sso_account_id:n,sso_region:r,sso_role_name:i}=e;if(!(o&&n&&r&&i))throw new t.C1(`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 S({ssoStartUrl:r,ssoSession:d,ssoAccountId:a,ssoRegion:c,ssoRoleName:g,ssoClient:l,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,profile:f})}var w}}};
3
+ //# sourceMappingURL=476.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=522,exports.ids=[522],exports.modules={786:(e,o,n)=>{n.r(o),n.d(o,{fromTokenFile:()=>c,fromWebToken:()=>t});var r=n(66),i=n(57),s=n(6);const t=e=>async o=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:r,roleSessionName:i,webIdentityToken:s,providerId:t,policyArns:d,policy:c,durationSeconds:a}=e;let{roleAssumerWithWebIdentity:l}=e;if(!l){const{getDefaultRoleAssumerWithWebIdentity:r}=await n.e(97).then(n.bind(n,792));l=r({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...o?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return l({RoleArn:r,RoleSessionName:i??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:s,ProviderId:t,PolicyArns:d,Policy:c,DurationSeconds:a})},d="AWS_WEB_IDENTITY_TOKEN_FILE",c=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const o=e?.webIdentityTokenFile??process.env[d],n=e?.roleArn??process.env.AWS_ROLE_ARN,c=e?.roleSessionName??process.env.AWS_ROLE_SESSION_NAME;if(!o||!n)throw new i.C1("Web identity configuration not specified",{logger:e.logger});const a=await t({...e,webIdentityToken:(0,s.readFileSync)(o,{encoding:"ascii"}),roleArn:n,roleSessionName:c})();return o===process.env[d]&&(0,r.g)(a,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h"),a}}};
3
+ //# sourceMappingURL=522.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=622,exports.ids=[622],exports.modules={790:(e,t,n)=>{n.d(t,{CreateTokenCommand:()=>Me,SSOOIDCClient:()=>de});var r=n(32),o=n(35),s=n(36),i=n(37),a=n(53),c=n(38),p=n(54),d=n(55),u=n(60),l=n(64),h=n(65),m=n(39);const x=async(e,t,n)=>({operation:(0,m.u)(t).operation,region:await(0,m.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const w=e=>{const t=[];if("CreateToken"===e.operation)t.push({schemeId:"smithy.api#noAuth"});else t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e));return t},E={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var y=n(791),f=n(74),S=n(68),v=n(70),g=n(56),I=n(47),b=n(71),P=n(61),k=n(72),O=n(59),$=n(43),C=n(46),D=n(51),A=n(52);const j="required",T="fn",_="argv",z="ref",R=!0,U="isSet",F="booleanEquals",q="error",G="endpoint",H="tree",V="PartitionResult",M="getAttr",B={[j]:!1,type:"String"},N={[j]:!0,default:!1,type:"Boolean"},J={[z]:"Endpoint"},L={[T]:F,[_]:[{[z]:"UseFIPS"},!0]},W={[T]:F,[_]:[{[z]:"UseDualStack"},!0]},K={},Q={[T]:M,[_]:[{[z]:V},"supportsFIPS"]},X={[z]:V},Y={[T]:F,[_]:[!0,{[T]:M,[_]:[X,"supportsDualStack"]}]},Z=[L],ee=[W],te=[{[z]:"Region"}],ne={version:"1.0",parameters:{Region:B,UseDualStack:N,UseFIPS:N,Endpoint:B},rules:[{conditions:[{[T]:U,[_]:[J]}],rules:[{conditions:Z,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:q},{conditions:ee,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:q},{endpoint:{url:J,properties:K,headers:K},type:G}],type:H},{conditions:[{[T]:U,[_]:te}],rules:[{conditions:[{[T]:"aws.partition",[_]:te,assign:V}],rules:[{conditions:[L,W],rules:[{conditions:[{[T]:F,[_]:[R,Q]},Y],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:K,headers:K},type:G}],type:H},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:q}],type:H},{conditions:Z,rules:[{conditions:[{[T]:F,[_]:[Q,R]}],rules:[{conditions:[{[T]:"stringEquals",[_]:[{[T]:M,[_]:[X,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:K,headers:K},type:G},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:K,headers:K},type:G}],type:H},{error:"FIPS is enabled but this partition does not support FIPS",type:q}],type:H},{conditions:ee,rules:[{conditions:[Y],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:K,headers:K},type:G}],type:H},{error:"DualStack is enabled but this partition does not support DualStack",type:q}],type:H},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:K,headers:K},type:G}],type:H}],type:H},{error:"Invalid Configuration: Missing Region",type:q}]},re=new A.kS({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),oe=(e,t={})=>re.get(e,(()=>(0,A.sO)(ne,{endpointParams:e,logger:t.logger})));A.mw.aws=D.UF;var se=n(73);const ie=e=>{(0,l.I9)(process.version);const t=(0,se.I)(e),n=()=>t().then(l.lT),r=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??$.E,base64Encoder:e?.base64Encoder??$.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??oe,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??w,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new k.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new c.mR}],logger:e?.logger??new l.N4,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??O.D,utf8Decoder:e?.utf8Decoder??C.ar,utf8Encoder:e?.utf8Encoder??C.Pq}))(e);(0,f.I)(process.version);const o={profile:e?.profile};return{...r,...e,runtime:"node",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??b.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,S.pf)({serviceId:r.serviceId,clientVersion:y.rE}),maxAttempts:e?.maxAttempts??(0,g.Z)(u.qs,e),region:e?.region??(0,g.Z)(a.GG,{...a.zH,...o}),requestHandler:I.$c.create(e?.requestHandler??n),retryMode:e?.retryMode??(0,g.Z)({...u.kN,default:async()=>(await n()).retryMode||P.L0},e),sha256:e?.sha256??v.V.bind(null,"sha256"),streamCollector:e?.streamCollector??I.kv,useDualstackEndpoint:e?.useDualstackEndpoint??(0,g.Z)(a.e$,o),useFipsEndpoint:e?.useFipsEndpoint??(0,g.Z)(a.Ko,o),userAgentAppId:e?.userAgentAppId??(0,g.Z)(S.hV,o)}};var ae=n(75),ce=n(33);const pe=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}};class de extends l.Kj{config;constructor(...[e]){const t=ie(e||{}),n=(m=t,{...m,useDualstackEndpoint:m.useDualstackEndpoint??!1,useFipsEndpoint:m.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"});var m;const w=(0,i.Dc)(n),E=(0,u.$z)(w),y=(0,a.TD)(E),f=(0,r.OV)(y),S=(0,d.Co)(f);var v;const g=((e,t)=>{const n={...(0,ae.Rq)(e),...(0,l.xA)(e),...(0,ce.eS)(e),...pe(e)};return t.forEach((e=>e.configure(n))),{...e,...(0,ae.$3)(n),...(0,l.uv)(n),...(0,ce.jt)(n),...(r=n,{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()})};var r})((v=S,{...(0,h.h)(v)}),e?.extensions||[]);super(g),this.config=g,this.middlewareStack.use((0,i.sM)(this.config)),this.middlewareStack.use((0,u.ey)(this.config)),this.middlewareStack.use((0,p.vK)(this.config)),this.middlewareStack.use((0,r.TC)(this.config)),this.middlewareStack.use((0,o.Y7)(this.config)),this.middlewareStack.use((0,s.n4)(this.config)),this.middlewareStack.use((0,c.wB)(this.config,{httpAuthSchemeParametersProvider:x,identityProviderConfigProvider:async e=>new c.h$({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,c.lW)(this.config))}destroy(){super.destroy()}}var ue=n(40);class le extends l.TJ{constructor(e){super(e),Object.setPrototypeOf(this,le.prototype)}}class he extends le{name="AccessDeniedException";$fault="client";error;error_description;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,he.prototype),this.error=e.error,this.error_description=e.error_description}}class me extends le{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e}),Object.setPrototypeOf(this,me.prototype),this.error=e.error,this.error_description=e.error_description}}const xe=e=>({...e,...e.clientSecret&&{clientSecret:l.$H},...e.refreshToken&&{refreshToken:l.$H},...e.codeVerifier&&{codeVerifier:l.$H}}),we=e=>({...e,...e.accessToken&&{accessToken:l.$H},...e.refreshToken&&{refreshToken:l.$H},...e.idToken&&{idToken:l.$H}});class Ee extends le{name="ExpiredTokenException";$fault="client";error;error_description;constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,Ee.prototype),this.error=e.error,this.error_description=e.error_description}}class ye extends le{name="InternalServerException";$fault="server";error;error_description;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,ye.prototype),this.error=e.error,this.error_description=e.error_description}}class fe extends le{name="InvalidClientException";$fault="client";error;error_description;constructor(e){super({name:"InvalidClientException",$fault:"client",...e}),Object.setPrototypeOf(this,fe.prototype),this.error=e.error,this.error_description=e.error_description}}class Se extends le{name="InvalidGrantException";$fault="client";error;error_description;constructor(e){super({name:"InvalidGrantException",$fault:"client",...e}),Object.setPrototypeOf(this,Se.prototype),this.error=e.error,this.error_description=e.error_description}}class ve extends le{name="InvalidRequestException";$fault="client";error;error_description;constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,ve.prototype),this.error=e.error,this.error_description=e.error_description}}class ge extends le{name="InvalidScopeException";$fault="client";error;error_description;constructor(e){super({name:"InvalidScopeException",$fault:"client",...e}),Object.setPrototypeOf(this,ge.prototype),this.error=e.error,this.error_description=e.error_description}}class Ie extends le{name="SlowDownException";$fault="client";error;error_description;constructor(e){super({name:"SlowDownException",$fault:"client",...e}),Object.setPrototypeOf(this,Ie.prototype),this.error=e.error,this.error_description=e.error_description}}class be extends le{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e}),Object.setPrototypeOf(this,be.prototype),this.error=e.error,this.error_description=e.error_description}}class Pe extends le{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,Pe.prototype),this.error=e.error,this.error_description=e.error_description}}var ke=n(76);const Oe=async(e,t)=>{const n=(0,c.lI)(e,t);let r;return n.bp("/token"),r=JSON.stringify((0,l.s)(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:e=>(0,l.Ss)(e)})),n.m("POST").h({"content-type":"application/json"}).b(r),n.build()},$e=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ce(e,t);const n=(0,l.Tj)({$metadata:Ve(e)}),r=(0,l.Y0)((0,l.Xk)(await(0,ke.Y2)(e.body,t)),"body"),o=(0,l.s)(r,{accessToken:l.lK,expiresIn:l.ET,idToken:l.lK,refreshToken:l.lK,tokenType:l.lK});return Object.assign(n,o),n},Ce=async(e,t)=>{const n={...e,body:await(0,ke.CG)(e.body,t)},r=(0,ke.cJ)(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Ae(n,t);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await je(n,t);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Te(n,t);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await _e(n,t);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await ze(n,t);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Re(n,t);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await Ue(n,t);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await Fe(n,t);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await qe(n,t);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await Ge(n,t);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await He(n,t);default:const o=n.body;return De({output:e,parsedBody:o,errorCode:r})}},De=(0,l.jr)(le),Ae=async(e,t)=>{const n=(0,l.Tj)({}),r=e.body,o=(0,l.s)(r,{error:l.lK,error_description:l.lK});Object.assign(n,o);const s=new he({$metadata:Ve(e),...n});return(0,l.Mw)(s,e.body)},je=async(e,t)=>{const n=(0,l.Tj)({}),r=e.body,o=(0,l.s)(r,{error:l.lK,error_description:l.lK});Object.assign(n,o);const s=new me({$metadata:Ve(e),...n});return(0,l.Mw)(s,e.body)},Te=async(e,t)=>{const n=(0,l.Tj)({}),r=e.body,o=(0,l.s)(r,{error:l.lK,error_description:l.lK});Object.assign(n,o);const s=new Ee({$metadata:Ve(e),...n});return(0,l.Mw)(s,e.body)},_e=async(e,t)=>{const n=(0,l.Tj)({}),r=e.body,o=(0,l.s)(r,{error:l.lK,error_description:l.lK});Object.assign(n,o);const s=new ye({$metadata:Ve(e),...n});return(0,l.Mw)(s,e.body)},ze=async(e,t)=>{const n=(0,l.Tj)({}),r=e.body,o=(0,l.s)(r,{error:l.lK,error_description:l.lK});Object.assign(n,o);const s=new fe({$metadata:Ve(e),...n});return(0,l.Mw)(s,e.body)},Re=async(e,t)=>{const n=(0,l.Tj)({}),r=e.body,o=(0,l.s)(r,{error:l.lK,error_description:l.lK});Object.assign(n,o);const s=new Se({$metadata:Ve(e),...n});return(0,l.Mw)(s,e.body)},Ue=async(e,t)=>{const n=(0,l.Tj)({}),r=e.body,o=(0,l.s)(r,{error:l.lK,error_description:l.lK});Object.assign(n,o);const s=new ve({$metadata:Ve(e),...n});return(0,l.Mw)(s,e.body)},Fe=async(e,t)=>{const n=(0,l.Tj)({}),r=e.body,o=(0,l.s)(r,{error:l.lK,error_description:l.lK});Object.assign(n,o);const s=new ge({$metadata:Ve(e),...n});return(0,l.Mw)(s,e.body)},qe=async(e,t)=>{const n=(0,l.Tj)({}),r=e.body,o=(0,l.s)(r,{error:l.lK,error_description:l.lK});Object.assign(n,o);const s=new Ie({$metadata:Ve(e),...n});return(0,l.Mw)(s,e.body)},Ge=async(e,t)=>{const n=(0,l.Tj)({}),r=e.body,o=(0,l.s)(r,{error:l.lK,error_description:l.lK});Object.assign(n,o);const s=new be({$metadata:Ve(e),...n});return(0,l.Mw)(s,e.body)},He=async(e,t)=>{const n=(0,l.Tj)({}),r=e.body,o=(0,l.s)(r,{error:l.lK,error_description:l.lK});Object.assign(n,o);const s=new Pe({$metadata:Ve(e),...n});return(0,l.Mw)(s,e.body)},Ve=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});class Me extends(l.uB.classBuilder().ep(E).m((function(e,t,n,r){return[(0,ue.TM)(n,this.serialize,this.deserialize),(0,d.rD)(n,e.getEndpointParameterInstructions())]})).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(xe,we).ser(Oe).de($e).build()){}const Be={CreateTokenCommand:Me};(0,l.J1)(Be,class extends de{})},791:e=>{e.exports={rE:"3.750.0"}}};
3
+ //# sourceMappingURL=622.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=736,exports.ids=[736],exports.modules={789:(e,t,s)=>{s.d(t,{GetRoleCredentialsCommand:()=>q,SSOClient:()=>ze});var n=s(55),o=s(40),r=s(64);const a={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class i extends r.TJ{constructor(e){super(e),Object.setPrototypeOf(this,i.prototype)}}class c extends i{name="InvalidRequestException";$fault="client";constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,c.prototype)}}class u extends i{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,u.prototype)}}class d extends i{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,d.prototype)}}class p extends i{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,p.prototype)}}const l=e=>({...e,...e.accessToken&&{accessToken:r.$H}}),h=e=>({...e,...e.secretAccessKey&&{secretAccessKey:r.$H},...e.sessionToken&&{sessionToken:r.$H}}),m=e=>({...e,...e.roleCredentials&&{roleCredentials:h(e.roleCredentials)}});var y=s(76),g=s(38);const f=async(e,t)=>{const s=(0,g.lI)(e,t),n=(0,r.Tj)({},r.eU,{[F]:e[k]});s.bp("/federation/credentials");const o=(0,r.Tj)({[D]:[,(0,r.Y0)(e[C],"roleName")],[A]:[,(0,r.Y0)(e[b],"accountId")]});return s.m("GET").h(n).q(o).b(undefined),s.build()},S=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return w(e,t);const s=(0,r.Tj)({$metadata:I(e)}),n=(0,r.Y0)((0,r.Xk)(await(0,y.Y2)(e.body,t)),"body"),o=(0,r.s)(n,{roleCredentials:r.Ss});return Object.assign(s,o),s},w=async(e,t)=>{const s={...e,body:await(0,y.CG)(e.body,t)},n=(0,y.cJ)(e,s.body);switch(n){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await x(s,t);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await P(s,t);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await E(s,t);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await R(s,t);default:const o=s.body;return v({output:e,parsedBody:o,errorCode:n})}},v=(0,r.jr)(i),x=async(e,t)=>{const s=(0,r.Tj)({}),n=e.body,o=(0,r.s)(n,{message:r.lK});Object.assign(s,o);const a=new c({$metadata:I(e),...s});return(0,r.Mw)(a,e.body)},P=async(e,t)=>{const s=(0,r.Tj)({}),n=e.body,o=(0,r.s)(n,{message:r.lK});Object.assign(s,o);const a=new u({$metadata:I(e),...s});return(0,r.Mw)(a,e.body)},E=async(e,t)=>{const s=(0,r.Tj)({}),n=e.body,o=(0,r.s)(n,{message:r.lK});Object.assign(s,o);const a=new d({$metadata:I(e),...s});return(0,r.Mw)(a,e.body)},R=async(e,t)=>{const s=(0,r.Tj)({}),n=e.body,o=(0,r.s)(n,{message:r.lK});Object.assign(s,o);const a=new p({$metadata:I(e),...s});return(0,r.Mw)(a,e.body)},I=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),b="accountId",k="accessToken",A="account_id",C="roleName",D="role_name",F="x-amz-sso_bearer_token";class q extends(r.uB.classBuilder().ep(a).m((function(e,t,s,r){return[(0,o.TM)(s,this.serialize,this.deserialize),(0,n.rD)(s,e.getEndpointParameterInstructions())]})).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(l,m).ser(f).de(S).build()){}var O=s(32),U=s(35),$=s(36),z=s(37),j=s(53),T=s(54),M=s(60),N=s(65),G=s(39);const H=async(e,t,s)=>({operation:(0,G.u)(t).operation,region:await(0,G.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const L=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},_="3.750.0";var B=s(74),V=s(68),K=s(70),W=s(56),J=s(47),Q=s(71),X=s(61),Y=s(72),Z=s(59),ee=s(43),te=s(46),se=s(51),ne=s(52);const oe="required",re="fn",ae="argv",ie="ref",ce=!0,ue="isSet",de="booleanEquals",pe="error",le="endpoint",he="tree",me="PartitionResult",ye="getAttr",ge={[oe]:!1,type:"String"},fe={[oe]:!0,default:!1,type:"Boolean"},Se={[ie]:"Endpoint"},we={[re]:de,[ae]:[{[ie]:"UseFIPS"},!0]},ve={[re]:de,[ae]:[{[ie]:"UseDualStack"},!0]},xe={},Pe={[re]:ye,[ae]:[{[ie]:me},"supportsFIPS"]},Ee={[ie]:me},Re={[re]:de,[ae]:[!0,{[re]:ye,[ae]:[Ee,"supportsDualStack"]}]},Ie=[we],be=[ve],ke=[{[ie]:"Region"}],Ae={version:"1.0",parameters:{Region:ge,UseDualStack:fe,UseFIPS:fe,Endpoint:ge},rules:[{conditions:[{[re]:ue,[ae]:[Se]}],rules:[{conditions:Ie,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:pe},{conditions:be,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:pe},{endpoint:{url:Se,properties:xe,headers:xe},type:le}],type:he},{conditions:[{[re]:ue,[ae]:ke}],rules:[{conditions:[{[re]:"aws.partition",[ae]:ke,assign:me}],rules:[{conditions:[we,ve],rules:[{conditions:[{[re]:de,[ae]:[ce,Pe]},Re],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:xe,headers:xe},type:le}],type:he},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:pe}],type:he},{conditions:Ie,rules:[{conditions:[{[re]:de,[ae]:[Pe,ce]}],rules:[{conditions:[{[re]:"stringEquals",[ae]:[{[re]:ye,[ae]:[Ee,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:xe,headers:xe},type:le},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:xe,headers:xe},type:le}],type:he},{error:"FIPS is enabled but this partition does not support FIPS",type:pe}],type:he},{conditions:be,rules:[{conditions:[Re],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:xe,headers:xe},type:le}],type:he},{error:"DualStack is enabled but this partition does not support DualStack",type:pe}],type:he},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:xe,headers:xe},type:le}],type:he}],type:he},{error:"Invalid Configuration: Missing Region",type:pe}]},Ce=new ne.kS({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),De=(e,t={})=>Ce.get(e,(()=>(0,ne.sO)(Ae,{endpointParams:e,logger:t.logger})));ne.mw.aws=se.UF;var Fe=s(73);const qe=e=>{(0,r.I9)(process.version);const t=(0,Fe.I)(e),s=()=>t().then(r.lT),n=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??ee.E,base64Encoder:e?.base64Encoder??ee.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??De,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??L,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Y.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new g.mR}],logger:e?.logger??new r.N4,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??Z.D,utf8Decoder:e?.utf8Decoder??te.ar,utf8Encoder:e?.utf8Encoder??te.Pq}))(e);(0,B.I)(process.version);const o={profile:e?.profile};return{...n,...e,runtime:"node",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Q.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,V.pf)({serviceId:n.serviceId,clientVersion:_}),maxAttempts:e?.maxAttempts??(0,W.Z)(M.qs,e),region:e?.region??(0,W.Z)(j.GG,{...j.zH,...o}),requestHandler:J.$c.create(e?.requestHandler??s),retryMode:e?.retryMode??(0,W.Z)({...M.kN,default:async()=>(await s()).retryMode||X.L0},e),sha256:e?.sha256??K.V.bind(null,"sha256"),streamCollector:e?.streamCollector??J.kv,useDualstackEndpoint:e?.useDualstackEndpoint??(0,W.Z)(j.e$,o),useFipsEndpoint:e?.useFipsEndpoint??(0,W.Z)(j.Ko,o),userAgentAppId:e?.userAgentAppId??(0,W.Z)(V.hV,o)}};var Oe=s(75),Ue=s(33);const $e=e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,n=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){n=e},credentials:()=>n}};class ze extends r.Kj{config;constructor(...[e]){const t=qe(e||{}),s=(o=t,{...o,useDualstackEndpoint:o.useDualstackEndpoint??!1,useFipsEndpoint:o.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"});var o;const a=(0,z.Dc)(s),i=(0,M.$z)(a),c=(0,j.TD)(i),u=(0,O.OV)(c),d=(0,n.Co)(u);var p;const l=((e,t)=>{const s={...(0,Oe.Rq)(e),...(0,r.xA)(e),...(0,Ue.eS)(e),...$e(e)};return t.forEach((e=>e.configure(s))),{...e,...(0,Oe.$3)(s),...(0,r.uv)(s),...(0,Ue.jt)(s),...(n=s,{httpAuthSchemes:n.httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()})};var n})((p=d,{...(0,N.h)(p)}),e?.extensions||[]);super(l),this.config=l,this.middlewareStack.use((0,z.sM)(this.config)),this.middlewareStack.use((0,M.ey)(this.config)),this.middlewareStack.use((0,T.vK)(this.config)),this.middlewareStack.use((0,O.TC)(this.config)),this.middlewareStack.use((0,U.Y7)(this.config)),this.middlewareStack.use((0,$.n4)(this.config)),this.middlewareStack.use((0,g.wB)(this.config,{httpAuthSchemeParametersProvider:H,identityProviderConfigProvider:async e=>new g.h$({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,g.lW)(this.config))}destroy(){super.destroy()}}}};
3
+ //# sourceMappingURL=736.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=770,exports.ids=[770],exports.modules={784:(e,r,t)=>{t.d(r,{fromIni:()=>u});var n=t(58),o=t(57),i=t(66);const s=e=>(0,i.g)(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p"),a=(e,{profile:r,logger:t})=>{const n="string"==typeof e.source_profile&&void 0===e.credential_source;return n&&t?.debug?.(` ${r} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`),n},c=(e,{profile:r,logger:t})=>{const n="string"==typeof e.credential_source&&void 0===e.source_profile;return n&&t?.debug?.(` ${r} isCredentialSourceProfile credential_source=${e.credential_source}`),n},l=async(e,r,a,c={})=>{a.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const l=r[e],{source_profile:d,region:p}=l;if(!a.roleAssumer){const{getDefaultRoleAssumer:e}=await t.e(97).then(t.bind(t,792));a.roleAssumer=e({...a.clientConfig,credentialProviderLogger:a.logger,parentClientConfig:{...a?.parentClientConfig,region:p??a?.parentClientConfig?.region}},a.clientPlugins)}if(d&&d in c)throw new o.C1(`Detected a cycle attempting to resolve credentials for profile ${(0,n.Bz)(a)}. Profiles visited: `+Object.keys(c).join(", "),{logger:a.logger});a.logger?.debug("@aws-sdk/credential-provider-ini - finding credential resolver using "+(d?`source_profile=[${d}]`:`profile=[${e}]`));const u=d?g(d,r,a,{...c,[d]:!0},f(r[d]??{})):(await((e,r,n)=>{const i={EcsContainer:async e=>{const{fromHttp:r}=await t.e(963).then(t.bind(t,788)),{fromContainerMetadata:i}=await t.e(330).then(t.bind(t,787));return n?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>(0,o.cy)(r(e??{}),i(e))().then(s)},Ec2InstanceMetadata:async e=>{n?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:r}=await t.e(330).then(t.bind(t,787));return async()=>r(e)().then(s)},Environment:async e=>{n?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:r}=await Promise.resolve().then(t.bind(t,67));return async()=>r(e)().then(s)}};if(e in i)return i[e];throw new o.C1(`Unsupported credential source in profile ${r}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:n})})(l.credential_source,e,a.logger)(a))();if(f(l))return u.then((e=>(0,i.g)(e,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o")));{const r={RoleArn:l.role_arn,RoleSessionName:l.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:l.external_id,DurationSeconds:parseInt(l.duration_seconds||"3600",10)},{mfa_serial:t}=l;if(t){if(!a.mfaCodeProvider)throw new o.C1(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:a.logger,tryNextLink:!1});r.SerialNumber=t,r.TokenCode=await a.mfaCodeProvider(t)}const n=await u;return a.roleAssumer(n,r).then((e=>(0,i.g)(e,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o")))}},f=e=>!e.role_arn&&!!e.credential_source,d=e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.aws_access_key_id&&"string"==typeof e.aws_secret_access_key&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,p=async(e,r)=>{r?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");const t={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return(0,i.g)(t,"CREDENTIALS_PROFILE","n")},g=async(e,r,n,s={},f=!1)=>{const g=r[e];if(Object.keys(s).length>0&&d(g))return p(g,n);if(f||((e,{profile:r="default",logger:t}={})=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.role_arn&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(a(e,{profile:r,logger:t})||c(e,{profile:r,logger:t})))(g,{profile:e,logger:n.logger}))return l(e,r,n,s);if(d(g))return p(g,n);if(u=g,Boolean(u)&&"object"==typeof u&&"string"==typeof u.web_identity_token_file&&"string"==typeof u.role_arn&&["undefined","string"].indexOf(typeof u.role_session_name)>-1)return(async(e,r)=>t.e(522).then(t.bind(t,786)).then((({fromTokenFile:t})=>t({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:r.roleAssumerWithWebIdentity,logger:r.logger,parentClientConfig:r.parentClientConfig})().then((e=>(0,i.g)(e,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q"))))))(g,n);var u;if((e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.credential_process)(g))return(async(e,r)=>t.e(114).then(t.bind(t,785)).then((({fromProcess:t})=>t({...e,profile:r})().then((e=>(0,i.g)(e,"CREDENTIALS_PROFILE_PROCESS","v"))))))(n,e);if((e=>e&&("string"==typeof e.sso_start_url||"string"==typeof e.sso_account_id||"string"==typeof e.sso_session||"string"==typeof e.sso_region||"string"==typeof e.sso_role_name))(g))return await(async(e,r,n={})=>{const{fromSSO:o}=await t.e(476).then(t.bind(t,783));return o({profile:e,logger:n.logger,parentClientConfig:n.parentClientConfig,clientConfig:n.clientConfig})().then((e=>r.sso_session?(0,i.g)(e,"CREDENTIALS_PROFILE_SSO","r"):(0,i.g)(e,"CREDENTIALS_PROFILE_SSO_LEGACY","t")))})(e,g,n);throw new o.C1(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:n.logger})},u=(e={})=>async({callerClientConfig:r}={})=>{const t={...e,parentClientConfig:{...r,...e.parentClientConfig}};t.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const o=await(0,n.YU)(t);return g((0,n.Bz)({profile:e.profile??r?.profile}),o,t)}}};
3
+ //# sourceMappingURL=770.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=963,exports.ids=[963],exports.modules={788:(e,t,r)=>{r.d(t,{fromHttp:()=>w});var o=r(66),n=r(47),s=r(57),i=r(26),a=r.n(i);var c=r(33),p=r(64),l=r(42);const w=(e={})=>{let t;e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");const r=e.awsContainerCredentialsRelativeUri??process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI,i=e.awsContainerCredentialsFullUri??process.env.AWS_CONTAINER_CREDENTIALS_FULL_URI,w=e.awsContainerAuthorizationToken??process.env.AWS_CONTAINER_AUTHORIZATION_TOKEN,h=e.awsContainerAuthorizationTokenFile??process.env.AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE,d="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger.warn:console.warn;if(r&&i&&(d("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),d("awsContainerCredentialsFullUri will take precedence.")),w&&h&&(d("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),d("awsContainerAuthorizationToken will take precedence.")),i)t=i;else{if(!r)throw new s.C1("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 u=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 s.C1("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})}})(u,e.logger);const f=new n.$c({requestTimeout:e.timeout??1e3,connectionTimeout:e.timeout??1e3});return g=async()=>{const t=function(e){return new c.Kd({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})}(u);w?t.headers.Authorization=w:h&&(t.headers.Authorization=(await a().readFile(h)).toString());try{return async function(e,t){const r=(0,l.c9)(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 s.C1("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,p.EI)(e.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let r={};try{r=JSON.parse(o)}catch(e){}throw Object.assign(new s.C1(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:r.Code,Message:r.Message})}throw new s.C1(`Server responded with status: ${e.statusCode}`,{logger:t})}((await f.handle(t)).response).then((e=>(0,o.g)(e,"CREDENTIALS_HTTP","z")))}catch(t){throw new s.C1(String(t),{logger:e.logger})}},T=e.maxRetries??3,y=e.timeout??1e3,async()=>{for(let e=0;e<T;++e)try{return await g()}catch(e){await new Promise((e=>setTimeout(e,y)))}return await g()};var g,T,y}}};
3
+ //# sourceMappingURL=963.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ exports.id=97,exports.ids=[97],exports.modules={792:(t,e,n)=>{"use strict";n.d(e,{getDefaultRoleAssumer:()=>xn,getDefaultRoleAssumerWithWebIdentity:()=>bn});var i=n(32),s=n(35),r=n(36),o=n(37),a=n(53),c=n(38),u=n(54),l=n(55),d=n(60),f=n(64),h=n(65),p=n(39);const g=async(t,e,n)=>({operation:(0,p.u)(e).operation,region:await(0,p.t)(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const m=t=>{const e=[];if("AssumeRoleWithWebIdentity"===t.operation)e.push({schemeId:"smithy.api#noAuth"});else e.push(function(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:t.region},propertiesExtractor:(t,e)=>({signingProperties:{config:t,context:e}})}}(t));return e},v=t=>{const e=(n=t,{...n,stsClientCtor:Et});var n;return{...(0,h.h)(e)}},w={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 x=n(791),b=n(74),y=n(72),E=n(68),I=n(70),P=n(56),A=n(47),S=n(71),T=n(61),$=n(59),R=n(43),D=n(46),C=n(51),O=n(52);const N="required",k="type",j="fn",F="argv",_="ref",U=!1,L=!0,W="booleanEquals",V="stringEquals",M="sigv4",q="us-east-1",z="endpoint",B="https://sts.{Region}.{PartitionResult#dnsSuffix}",K="tree",X="error",G="getAttr",H={[N]:!1,[k]:"String"},Y={[N]:!0,default:!1,[k]:"Boolean"},Z={[_]:"Endpoint"},J={[j]:"isSet",[F]:[{[_]:"Region"}]},Q={[_]:"Region"},tt={[j]:"aws.partition",[F]:[Q],assign:"PartitionResult"},et={[_]:"UseFIPS"},nt={[_]:"UseDualStack"},it={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:M,signingName:"sts",signingRegion:q}]},headers:{}},st={},rt={conditions:[{[j]:V,[F]:[Q,"aws-global"]}],[z]:it,[k]:z},ot={[j]:W,[F]:[et,!0]},at={[j]:W,[F]:[nt,!0]},ct={[j]:G,[F]:[{[_]:"PartitionResult"},"supportsFIPS"]},ut={[_]:"PartitionResult"},lt={[j]:W,[F]:[!0,{[j]:G,[F]:[ut,"supportsDualStack"]}]},dt=[{[j]:"isSet",[F]:[Z]}],ft=[ot],ht=[at],pt={version:"1.0",parameters:{Region:H,UseDualStack:Y,UseFIPS:Y,Endpoint:H,UseGlobalEndpoint:Y},rules:[{conditions:[{[j]:W,[F]:[{[_]:"UseGlobalEndpoint"},L]},{[j]:"not",[F]:dt},J,tt,{[j]:W,[F]:[et,U]},{[j]:W,[F]:[nt,U]}],rules:[{conditions:[{[j]:V,[F]:[Q,"ap-northeast-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"ap-south-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"ap-southeast-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"ap-southeast-2"]}],endpoint:it,[k]:z},rt,{conditions:[{[j]:V,[F]:[Q,"ca-central-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"eu-central-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"eu-north-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"eu-west-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"eu-west-2"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"eu-west-3"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"sa-east-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,q]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"us-east-2"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"us-west-1"]}],endpoint:it,[k]:z},{conditions:[{[j]:V,[F]:[Q,"us-west-2"]}],endpoint:it,[k]:z},{endpoint:{url:B,properties:{authSchemes:[{name:M,signingName:"sts",signingRegion:"{Region}"}]},headers:st},[k]:z}],[k]:K},{conditions:dt,rules:[{conditions:ft,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[k]:X},{conditions:ht,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[k]:X},{endpoint:{url:Z,properties:st,headers:st},[k]:z}],[k]:K},{conditions:[J],rules:[{conditions:[tt],rules:[{conditions:[ot,at],rules:[{conditions:[{[j]:W,[F]:[L,ct]},lt],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:st,headers:st},[k]:z}],[k]:K},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[k]:X}],[k]:K},{conditions:ft,rules:[{conditions:[{[j]:W,[F]:[ct,L]}],rules:[{conditions:[{[j]:V,[F]:[{[j]:G,[F]:[ut,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:st,headers:st},[k]:z},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:st,headers:st},[k]:z}],[k]:K},{error:"FIPS is enabled but this partition does not support FIPS",[k]:X}],[k]:K},{conditions:ht,rules:[{conditions:[lt],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:st,headers:st},[k]:z}],[k]:K},{error:"DualStack is enabled but this partition does not support DualStack",[k]:X}],[k]:K},rt,{endpoint:{url:B,properties:st,headers:st},[k]:z}],[k]:K}],[k]:K},{error:"Invalid Configuration: Missing Region",[k]:X}]},gt=new O.kS({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),mt=(t,e={})=>gt.get(t,(()=>(0,O.sO)(pt,{endpointParams:t,logger:e.logger})));O.mw.aws=C.UF;var vt=n(73);const wt=t=>{(0,f.I9)(process.version);const e=(0,vt.I)(t),n=()=>e().then(f.lT),i=(t=>({apiVersion:"2011-06-15",base64Decoder:t?.base64Decoder??R.E,base64Encoder:t?.base64Encoder??R.n,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??mt,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??m,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new y.f2},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new c.mR}],logger:t?.logger??new f.N4,serviceId:t?.serviceId??"STS",urlParser:t?.urlParser??$.D,utf8Decoder:t?.utf8Decoder??D.ar,utf8Encoder:t?.utf8Encoder??D.Pq}))(t);(0,b.I)(process.version);const s={profile:t?.profile};return{...i,...t,runtime:"node",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??S.n,defaultUserAgentProvider:t?.defaultUserAgentProvider??(0,E.pf)({serviceId:i.serviceId,clientVersion:x.rE}),httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4")||(async e=>await t.credentialDefaultProvider(e?.o||{})()),signer:new y.f2},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new c.mR}],maxAttempts:t?.maxAttempts??(0,P.Z)(d.qs,t),region:t?.region??(0,P.Z)(a.GG,{...a.zH,...s}),requestHandler:A.$c.create(t?.requestHandler??n),retryMode:t?.retryMode??(0,P.Z)({...d.kN,default:async()=>(await n()).retryMode||T.L0},t),sha256:t?.sha256??I.V.bind(null,"sha256"),streamCollector:t?.streamCollector??A.kv,useDualstackEndpoint:t?.useDualstackEndpoint??(0,P.Z)(a.e$,s),useFipsEndpoint:t?.useFipsEndpoint??(0,P.Z)(a.Ko,s),userAgentAppId:t?.userAgentAppId??(0,P.Z)(E.hV,s)}};var xt=n(75),bt=n(33);const yt=t=>{const e=t.httpAuthSchemes;let n=t.httpAuthSchemeProvider,i=t.credentials;return{setHttpAuthScheme(t){const n=e.findIndex((e=>e.schemeId===t.schemeId));-1===n?e.push(t):e.splice(n,1,t)},httpAuthSchemes:()=>e,setHttpAuthSchemeProvider(t){n=t},httpAuthSchemeProvider:()=>n,setCredentials(t){i=t},credentials:()=>i}};class Et extends f.Kj{config;constructor(...[t]){const e=wt(t||{}),n=(h=e,{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"});var h;const p=(0,o.Dc)(n),m=(0,d.$z)(p),w=(0,a.TD)(m),x=(0,i.OV)(w),b=(0,l.Co)(x),y=((t,e)=>{const n={...(0,xt.Rq)(t),...(0,f.xA)(t),...(0,bt.eS)(t),...yt(t)};return e.forEach((t=>t.configure(n))),{...t,...(0,xt.$3)(n),...(0,f.uv)(n),...(0,bt.jt)(n),...(i=n,{httpAuthSchemes:i.httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()})};var i})(v(b),t?.extensions||[]);super(y),this.config=y,this.middlewareStack.use((0,o.sM)(this.config)),this.middlewareStack.use((0,d.ey)(this.config)),this.middlewareStack.use((0,u.vK)(this.config)),this.middlewareStack.use((0,i.TC)(this.config)),this.middlewareStack.use((0,s.Y7)(this.config)),this.middlewareStack.use((0,r.n4)(this.config)),this.middlewareStack.use((0,c.wB)(this.config,{httpAuthSchemeParametersProvider:g,identityProviderConfigProvider:async t=>new c.h$({"aws.auth#sigv4":t.credentials})})),this.middlewareStack.use((0,c.lW)(this.config))}destroy(){super.destroy()}}var It=n(40);class Pt extends f.TJ{constructor(t){super(t),Object.setPrototypeOf(this,Pt.prototype)}}const At=t=>({...t,...t.SecretAccessKey&&{SecretAccessKey:f.$H}}),St=t=>({...t,...t.Credentials&&{Credentials:At(t.Credentials)}});class Tt extends Pt{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,Tt.prototype)}}class $t extends Pt{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,$t.prototype)}}class Rt extends Pt{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,Rt.prototype)}}class Dt extends Pt{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,Dt.prototype)}}class Ct extends Pt{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,Ct.prototype)}}class Ot extends Pt{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,Ot.prototype)}}const Nt=t=>({...t,...t.WebIdentityToken&&{WebIdentityToken:f.$H}}),kt=t=>({...t,...t.Credentials&&{Credentials:At(t.Credentials)}});class jt extends Pt{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,jt.prototype)}}var Ft=n(793),_t=n(77);const Ut=(t,e)=>(0,_t.w)(t,e).then((t=>{if(t.length){const e=new Ft.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(t,e)=>""===e.trim()&&e.includes("\n")?"":void 0});let n;e.addEntity("#xD","\r"),e.addEntity("#10","\n");try{n=e.parse(t,!0)}catch(e){throw e&&"object"==typeof e&&Object.defineProperty(e,"$responseBodyText",{value:t}),e}const i="#text",s=Object.keys(n)[0],r=n[s];return r[i]&&(r[s]=r[i],delete r[i]),(0,f.rm)(r)}return{}})),Lt=async(t,e)=>{const n=await Ut(t,e);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},Wt=async(t,e)=>{const n=ye;let i;return i=on({...Jt(t,e),[Ie]:Ae,[tn]:Ee}),be(e,n,"/",void 0,i)},Vt=async(t,e)=>{const n=ye;let i;return i=on({...Qt(t,e),[Ie]:$e,[tn]:Ee}),be(e,n,"/",void 0,i)},Mt=async(t,e)=>{if(t.statusCode>=300)return zt(t,e);const n=await Ut(t.body,e);let i={};i=ce(n.AssumeRoleResult,e);return{$metadata:we(t),...i}},qt=async(t,e)=>{if(t.statusCode>=300)return zt(t,e);const n=await Ut(t.body,e);let i={};i=ue(n.AssumeRoleWithWebIdentityResult,e);return{$metadata:we(t),...i}},zt=async(t,e)=>{const n={...t,body:await Lt(t.body,e)},i=an(t,n.body);switch(i){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Bt(n,e);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Ht(n,e);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Yt(n,e);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Zt(n,e);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Kt(n,e);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Xt(n,e);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Gt(n,e);default:const s=n.body;return xe({output:t,parsedBody:s.Error,errorCode:i})}},Bt=async(t,e)=>{const n=t.body,i=de(n.Error,e),s=new Tt({$metadata:we(t),...i});return(0,f.Mw)(s,n)},Kt=async(t,e)=>{const n=t.body,i=fe(n.Error,e),s=new jt({$metadata:we(t),...i});return(0,f.Mw)(s,n)},Xt=async(t,e)=>{const n=t.body,i=he(n.Error,e),s=new Ct({$metadata:we(t),...i});return(0,f.Mw)(s,n)},Gt=async(t,e)=>{const n=t.body,i=pe(n.Error,e),s=new Ot({$metadata:we(t),...i});return(0,f.Mw)(s,n)},Ht=async(t,e)=>{const n=t.body,i=ge(n.Error,e),s=new $t({$metadata:we(t),...i});return(0,f.Mw)(s,n)},Yt=async(t,e)=>{const n=t.body,i=me(n.Error,e),s=new Rt({$metadata:we(t),...i});return(0,f.Mw)(s,n)},Zt=async(t,e)=>{const n=t.body,i=ve(n.Error,e),s=new Dt({$metadata:we(t),...i});return(0,f.Mw)(s,n)},Jt=(t,e)=>{const n={};if(null!=t[ze]&&(n[ze]=t[ze]),null!=t[Be]&&(n[Be]=t[Be]),null!=t[Ue]){const i=te(t[Ue],e);0===t[Ue]?.length&&(n.PolicyArns=[]),Object.entries(i).forEach((([t,e])=>{n[`PolicyArns.${t}`]=e}))}if(null!=t[_e]&&(n[_e]=t[_e]),null!=t[Ne]&&(n[Ne]=t[Ne]),null!=t[Ze]){const i=oe(t[Ze],e);0===t[Ze]?.length&&(n.Tags=[]),Object.entries(i).forEach((([t,e])=>{n[`Tags.${t}`]=e}))}if(null!=t[Qe]){const i=re(t[Qe],e);0===t[Qe]?.length&&(n.TransitiveTagKeys=[]),Object.entries(i).forEach((([t,e])=>{n[`TransitiveTagKeys.${t}`]=e}))}if(null!=t[je]&&(n[je]=t[je]),null!=t[He]&&(n[He]=t[He]),null!=t[Je]&&(n[Je]=t[Je]),null!=t[Ge]&&(n[Ge]=t[Ge]),null!=t[We]){const i=ie(t[We],e);0===t[We]?.length&&(n.ProvidedContexts=[]),Object.entries(i).forEach((([t,e])=>{n[`ProvidedContexts.${t}`]=e}))}return n},Qt=(t,e)=>{const n={};if(null!=t[ze]&&(n[ze]=t[ze]),null!=t[Be]&&(n[Be]=t[Be]),null!=t[nn]&&(n[nn]=t[nn]),null!=t[Ve]&&(n[Ve]=t[Ve]),null!=t[Ue]){const i=te(t[Ue],e);0===t[Ue]?.length&&(n.PolicyArns=[]),Object.entries(i).forEach((([t,e])=>{n[`PolicyArns.${t}`]=e}))}return null!=t[_e]&&(n[_e]=t[_e]),null!=t[Ne]&&(n[Ne]=t[Ne]),n},te=(t,e)=>{const n={};let i=1;for(const s of t){if(null===s)continue;const t=ee(s,e);Object.entries(t).forEach((([t,e])=>{n[`member.${i}.${t}`]=e})),i++}return n},ee=(t,e)=>{const n={};return null!=t[sn]&&(n[sn]=t[sn]),n},ne=(t,e)=>{const n={};return null!=t[Le]&&(n[Le]=t[Le]),null!=t[Oe]&&(n[Oe]=t[Oe]),n},ie=(t,e)=>{const n={};let i=1;for(const e of t){if(null===e)continue;const t=ne(e);Object.entries(t).forEach((([t,e])=>{n[`member.${i}.${t}`]=e})),i++}return n},se=(t,e)=>{const n={};return null!=t[Fe]&&(n[Fe]=t[Fe]),null!=t[en]&&(n[en]=t[en]),n},re=(t,e)=>{const n={};let i=1;for(const e of t)null!==e&&(n[`member.${i}`]=e,i++);return n},oe=(t,e)=>{const n={};let i=1;for(const e of t){if(null===e)continue;const t=se(e);Object.entries(t).forEach((([t,e])=>{n[`member.${i}.${t}`]=e})),i++}return n},ae=(t,e)=>{const n={};return null!=t[Se]&&(n[Se]=(0,f.lK)(t[Se])),null!=t[Re]&&(n[Re]=(0,f.lK)(t[Re])),n},ce=(t,e)=>{const n={};return null!=t[Ce]&&(n[Ce]=le(t[Ce],e)),null!=t[Te]&&(n[Te]=ae(t[Te])),null!=t[Me]&&(n[Me]=(0,f.xW)(t[Me])),null!=t[Ge]&&(n[Ge]=(0,f.lK)(t[Ge])),n},ue=(t,e)=>{const n={};return null!=t[Ce]&&(n[Ce]=le(t[Ce],e)),null!=t[Xe]&&(n[Xe]=(0,f.lK)(t[Xe])),null!=t[Te]&&(n[Te]=ae(t[Te])),null!=t[Me]&&(n[Me]=(0,f.xW)(t[Me])),null!=t[qe]&&(n[qe]=(0,f.lK)(t[qe])),null!=t[De]&&(n[De]=(0,f.lK)(t[De])),null!=t[Ge]&&(n[Ge]=(0,f.lK)(t[Ge])),n},le=(t,e)=>{const n={};return null!=t[Pe]&&(n[Pe]=(0,f.lK)(t[Pe])),null!=t[Ke]&&(n[Ke]=(0,f.lK)(t[Ke])),null!=t[Ye]&&(n[Ye]=(0,f.lK)(t[Ye])),null!=t[ke]&&(n[ke]=(0,f.Y0)((0,f.t_)(t[ke]))),n},de=(t,e)=>{const n={};return null!=t[rn]&&(n[rn]=(0,f.lK)(t[rn])),n},fe=(t,e)=>{const n={};return null!=t[rn]&&(n[rn]=(0,f.lK)(t[rn])),n},he=(t,e)=>{const n={};return null!=t[rn]&&(n[rn]=(0,f.lK)(t[rn])),n},pe=(t,e)=>{const n={};return null!=t[rn]&&(n[rn]=(0,f.lK)(t[rn])),n},ge=(t,e)=>{const n={};return null!=t[rn]&&(n[rn]=(0,f.lK)(t[rn])),n},me=(t,e)=>{const n={};return null!=t[rn]&&(n[rn]=(0,f.lK)(t[rn])),n},ve=(t,e)=>{const n={};return null!=t[rn]&&(n[rn]=(0,f.lK)(t[rn])),n},we=t=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}),xe=(0,f.jr)(Pt),be=async(t,e,n,i,s)=>{const{hostname:r,protocol:o="https",port:a,path:c}=await t.endpoint(),u={protocol:o,hostname:r,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:e};return void 0!==i&&(u.hostname=i),void 0!==s&&(u.body=s),new bt.Kd(u)},ye={"content-type":"application/x-www-form-urlencoded"},Ee="2011-06-15",Ie="Action",Pe="AccessKeyId",Ae="AssumeRole",Se="AssumedRoleId",Te="AssumedRoleUser",$e="AssumeRoleWithWebIdentity",Re="Arn",De="Audience",Ce="Credentials",Oe="ContextAssertion",Ne="DurationSeconds",ke="Expiration",je="ExternalId",Fe="Key",_e="Policy",Ue="PolicyArns",Le="ProviderArn",We="ProvidedContexts",Ve="ProviderId",Me="PackedPolicySize",qe="Provider",ze="RoleArn",Be="RoleSessionName",Ke="SecretAccessKey",Xe="SubjectFromWebIdentityToken",Ge="SourceIdentity",He="SerialNumber",Ye="SessionToken",Ze="Tags",Je="TokenCode",Qe="TransitiveTagKeys",tn="Version",en="Value",nn="WebIdentityToken",sn="arn",rn="message",on=t=>Object.entries(t).map((([t,e])=>(0,f.$6)(t)+"="+(0,f.$6)(e))).join("&"),an=(t,e)=>void 0!==e.Error?.Code?e.Error.Code:404==t.statusCode?"NotFound":void 0;class cn extends(f.uB.classBuilder().ep(w).m((function(t,e,n,i){return[(0,It.TM)(n,this.serialize,this.deserialize),(0,l.rD)(n,t.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,St).ser(Wt).de(Mt).build()){}class un extends(f.uB.classBuilder().ep(w).m((function(t,e,n,i){return[(0,It.TM)(n,this.serialize,this.deserialize),(0,l.rD)(n,t.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(Nt,kt).ser(Vt).de(qt).build()){}const ln={AssumeRoleCommand:cn,AssumeRoleWithWebIdentityCommand:un};(0,f.J1)(ln,class extends Et{});var dn=n(66);const fn="us-east-1",hn=t=>{if("string"==typeof t?.Arn){const e=t.Arn.split(":");if(e.length>4&&""!==e[4])return e[4]}},pn=async(t,e,n)=>{const i="function"==typeof t?await t():t,s="function"==typeof e?await e():e;return n?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${i} (provider)`,`${s} (parent client)`,`${fn} (STS default)`),i??s??fn},gn=(t,e)=>{let n,i;return async(s,r)=>{if(i=s,!n){const{logger:s=t?.parentClientConfig?.logger,region:r,requestHandler:o=t?.parentClientConfig?.requestHandler,credentialProviderLogger:a}=t,c=await pn(r,t?.parentClientConfig?.region,a),u=!vn(o);n=new e({profile:t?.parentClientConfig?.profile,credentialDefaultProvider:()=>async()=>i,region:c,requestHandler:u?o:void 0,logger:s})}const{Credentials:o,AssumedRoleUser:a}=await n.send(new cn(r));if(!o||!o.AccessKeyId||!o.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${r.RoleArn}`);const c=hn(a),u={accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,sessionToken:o.SessionToken,expiration:o.Expiration,...o.CredentialScope&&{credentialScope:o.CredentialScope},...c&&{accountId:c}};return(0,dn.g)(u,"CREDENTIALS_STS_ASSUME_ROLE","i"),u}},mn=(t,e)=>{let n;return async i=>{if(!n){const{logger:i=t?.parentClientConfig?.logger,region:s,requestHandler:r=t?.parentClientConfig?.requestHandler,credentialProviderLogger:o}=t,a=await pn(s,t?.parentClientConfig?.region,o),c=!vn(r);n=new e({profile:t?.parentClientConfig?.profile,region:a,requestHandler:c?r:void 0,logger:i})}const{Credentials:s,AssumedRoleUser:r}=await n.send(new un(i));if(!s||!s.AccessKeyId||!s.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${i.RoleArn}`);const o=hn(r),a={accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.SessionToken,expiration:s.Expiration,...s.CredentialScope&&{credentialScope:s.CredentialScope},...o&&{accountId:o}};return o&&(0,dn.g)(a,"RESOLVED_ACCOUNT_ID","T"),(0,dn.g)(a,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),a}},vn=t=>"h2"===t?.metadata?.handlerProtocol,wn=(t,e)=>e?class extends t{constructor(t){super(t);for(const t of e)this.middlewareStack.use(t)}}:t,xn=(t={},e)=>gn(t,wn(Et,e)),bn=(t={},e)=>mn(t,wn(Et,e))},793:(t,e,n)=>{"use strict";const i=n(794),s=n(796),r=n(803);t.exports={XMLParser:s,XMLValidator:i,XMLBuilder:r}},795:(t,e)=>{"use strict";const n=":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",i="["+n+"]["+(n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",s=new RegExp("^"+i+"$");e.isExist=function(t){return void 0!==t},e.isEmptyObject=function(t){return 0===Object.keys(t).length},e.merge=function(t,e,n){if(e){const i=Object.keys(e),s=i.length;for(let r=0;r<s;r++)t[i[r]]="strict"===n?[e[i[r]]]:e[i[r]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(t){const e=s.exec(t);return!(null==e)},e.getAllMatches=function(t,e){const n=[];let i=e.exec(t);for(;i;){const s=[];s.startIndex=e.lastIndex-i[0].length;const r=i.length;for(let t=0;t<r;t++)s.push(i[t]);n.push(s),i=e.exec(t)}return n},e.nameRegexp=i},794:(t,e,n)=>{"use strict";const i=n(795),s={allowBooleanAttributes:!1,unpairedTags:[]};function r(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function o(t,e){const n=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const i=t.substr(n,e-n);if(e>5&&"xml"===i)return p("InvalidXml","XML declaration allowed only at the start of the document.",m(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function a(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e<t.length;e++)if("<"===t[e])n++;else if(">"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}e.validate=function(t,e){e=Object.assign({},s,e);const n=[];let c=!1,u=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let s=0;s<t.length;s++)if("<"===t[s]&&"?"===t[s+1]){if(s+=2,s=o(t,s),s.err)return s}else{if("<"!==t[s]){if(r(t[s]))continue;return p("InvalidChar","char '"+t[s]+"' is not expected.",m(t,s))}{let g=s;if(s++,"!"===t[s]){s=a(t,s);continue}{let v=!1;"/"===t[s]&&(v=!0,s++);let w="";for(;s<t.length&&">"!==t[s]&&" "!==t[s]&&"\t"!==t[s]&&"\n"!==t[s]&&"\r"!==t[s];s++)w+=t[s];if(w=w.trim(),"/"===w[w.length-1]&&(w=w.substring(0,w.length-1),s--),d=w,!i.isName(d)){let e;return e=0===w.trim().length?"Invalid space after '<'.":"Tag '"+w+"' is an invalid name.",p("InvalidTag",e,m(t,s))}const x=l(t,s);if(!1===x)return p("InvalidAttr","Attributes for '"+w+"' have open quote.",m(t,s));let b=x.value;if(s=x.index,"/"===b[b.length-1]){const n=s-b.length;b=b.substring(0,b.length-1);const i=f(b,e);if(!0!==i)return p(i.err.code,i.err.msg,m(t,n+i.err.line));c=!0}else if(v){if(!x.tagClosed)return p("InvalidTag","Closing tag '"+w+"' doesn't have proper closing.",m(t,s));if(b.trim().length>0)return p("InvalidTag","Closing tag '"+w+"' can't have attributes or invalid starting.",m(t,g));if(0===n.length)return p("InvalidTag","Closing tag '"+w+"' has not been opened.",m(t,g));{const e=n.pop();if(w!==e.tagName){let n=m(t,e.tagStartPos);return p("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+w+"'.",m(t,g))}0==n.length&&(u=!0)}}else{const i=f(b,e);if(!0!==i)return p(i.err.code,i.err.msg,m(t,s-b.length+i.err.line));if(!0===u)return p("InvalidXml","Multiple possible root nodes found.",m(t,s));-1!==e.unpairedTags.indexOf(w)||n.push({tagName:w,tagStartPos:g}),c=!0}for(s++;s<t.length;s++)if("<"===t[s]){if("!"===t[s+1]){s++,s=a(t,s);continue}if("?"!==t[s+1])break;if(s=o(t,++s),s.err)return s}else if("&"===t[s]){const e=h(t,s);if(-1==e)return p("InvalidChar","char '&' is not expected.",m(t,s));s=e}else if(!0===u&&!r(t[s]))return p("InvalidXml","Extra text at the end",m(t,s));"<"===t[s]&&s--}}}var d;return c?1==n.length?p("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",m(t,n[0].tagStartPos)):!(n.length>0)||p("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):p("InvalidXml","Start tag expected.",1)};const c='"',u="'";function l(t,e){let n="",i="",s=!1;for(;e<t.length;e++){if(t[e]===c||t[e]===u)""===i?i=t[e]:i!==t[e]||(i="");else if(">"===t[e]&&""===i){s=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:s}}const d=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function f(t,e){const n=i.getAllMatches(t,d),s={};for(let t=0;t<n.length;t++){if(0===n[t][1].length)return p("InvalidAttr","Attribute '"+n[t][2]+"' has no space in starting.",v(n[t]));if(void 0!==n[t][3]&&void 0===n[t][4])return p("InvalidAttr","Attribute '"+n[t][2]+"' is without value.",v(n[t]));if(void 0===n[t][3]&&!e.allowBooleanAttributes)return p("InvalidAttr","boolean attribute '"+n[t][2]+"' is not allowed.",v(n[t]));const i=n[t][2];if(!g(i))return p("InvalidAttr","Attribute '"+i+"' is an invalid name.",v(n[t]));if(s.hasOwnProperty(i))return p("InvalidAttr","Attribute '"+i+"' is repeated.",v(n[t]));s[i]=1}return!0}function h(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let n=/\d/;for("x"===t[e]&&(e++,n=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(n))break}return-1}(t,++e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\w/)&&n<20)){if(";"===t[e])break;return-1}return e}function p(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function g(t){return i.isName(t)}function m(t,e){const n=t.substring(0,e).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function v(t){return t.startIndex+t[1].length}},803:(t,e,n)=>{"use strict";const i=n(804),s={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function r(t){this.options=Object.assign({},s,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=c),this.processTextOrObjNode=o,this.options.format?(this.indentate=a,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function o(t,e,n){const i=this.j2x(t,n+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,n):this.buildObjectNode(i.val,e,i.attrStr,n)}function a(t){return this.options.indentBy.repeat(t)}function c(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}r.prototype.build=function(t){return this.options.preserveOrder?i(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},r.prototype.j2x=function(t,e){let n="",i="";for(let s in t)if(Object.prototype.hasOwnProperty.call(t,s))if(void 0===t[s])this.isAttribute(s)&&(i+="");else if(null===t[s])this.isAttribute(s)?i+="":"?"===s[0]?i+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+s+"/"+this.tagEndChar;else if(t[s]instanceof Date)i+=this.buildTextValNode(t[s],s,"",e);else if("object"!=typeof t[s]){const r=this.isAttribute(s);if(r)n+=this.buildAttrPairStr(r,""+t[s]);else if(s===this.options.textNodeName){let e=this.options.tagValueProcessor(s,""+t[s]);i+=this.replaceEntitiesValue(e)}else i+=this.buildTextValNode(t[s],s,"",e)}else if(Array.isArray(t[s])){const n=t[s].length;let r="",o="";for(let a=0;a<n;a++){const n=t[s][a];if(void 0===n);else if(null===n)"?"===s[0]?i+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+s+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){const t=this.j2x(n,e+1);r+=t.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(o+=t.attrStr)}else r+=this.processTextOrObjNode(n,s,e);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(s,n);t=this.replaceEntitiesValue(t),r+=t}else r+=this.buildTextValNode(n,s,"",e)}this.options.oneListGroup&&(r=this.buildObjectNode(r,s,o,e)),i+=r}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const e=Object.keys(t[s]),i=e.length;for(let r=0;r<i;r++)n+=this.buildAttrPairStr(e[r],""+t[s][e[r]])}else i+=this.processTextOrObjNode(t[s],s,e);return{attrStr:n,val:i}},r.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},r.prototype.buildObjectNode=function(t,e,n,i){if(""===t)return"?"===e[0]?this.indentate(i)+"<"+e+n+"?"+this.tagEndChar:this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar;{let s="</"+e+this.tagEndChar,r="";return"?"===e[0]&&(r="?",s=""),!n&&""!==n||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===r.length?this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(i)+"<"+e+n+r+this.tagEndChar+t+this.indentate(i)+s:this.indentate(i)+"<"+e+n+r+">"+t+s}},r.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},r.prototype.buildTextValNode=function(t,e,n,i){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(i)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(i)+"<"+e+n+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,t);return s=this.replaceEntitiesValue(s),""===s?this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+n+">"+s+"</"+e+this.tagEndChar}},r.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const n=this.options.entities[e];t=t.replace(n.regex,n.val)}return t},t.exports=r},804:t=>{function e(t,o,a,c){let u="",l=!1;for(let d=0;d<t.length;d++){const f=t[d],h=n(f);if(void 0===h)continue;let p="";if(p=0===a.length?h:`${a}.${h}`,h===o.textNodeName){let t=f[h];s(p,o)||(t=o.tagValueProcessor(h,t),t=r(t,o)),l&&(u+=c),u+=t,l=!1;continue}if(h===o.cdataPropName){l&&(u+=c),u+=`<![CDATA[${f[h][0][o.textNodeName]}]]>`,l=!1;continue}if(h===o.commentPropName){u+=c+`\x3c!--${f[h][0][o.textNodeName]}--\x3e`,l=!0;continue}if("?"===h[0]){const t=i(f[":@"],o),e="?xml"===h?"":c;let n=f[h][0][o.textNodeName];n=0!==n.length?" "+n:"",u+=e+`<${h}${n}${t}?>`,l=!0;continue}let g=c;""!==g&&(g+=o.indentBy);const m=c+`<${h}${i(f[":@"],o)}`,v=e(f[h],o,p,g);-1!==o.unpairedTags.indexOf(h)?o.suppressUnpairedNode?u+=m+">":u+=m+"/>":v&&0!==v.length||!o.suppressEmptyNode?v&&v.endsWith(">")?u+=m+`>${v}${c}</${h}>`:(u+=m+">",v&&""!==c&&(v.includes("/>")||v.includes("</"))?u+=c+o.indentBy+v+c:u+=v,u+=`</${h}>`):u+=m+"/>",l=!0}return u}function n(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];if(t.hasOwnProperty(i)&&":@"!==i)return i}}function i(t,e){let n="";if(t&&!e.ignoreAttributes)for(let i in t){if(!t.hasOwnProperty(i))continue;let s=e.attributeValueProcessor(i,t[i]);s=r(s,e),!0===s&&e.suppressBooleanAttributes?n+=` ${i.substr(e.attributeNamePrefix.length)}`:n+=` ${i.substr(e.attributeNamePrefix.length)}="${s}"`}return n}function s(t,e){let n=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let i in e.stopNodes)if(e.stopNodes[i]===t||e.stopNodes[i]==="*."+n)return!0;return!1}function r(t,e){if(t&&t.length>0&&e.processEntities)for(let n=0;n<e.entities.length;n++){const i=e.entities[n];t=t.replace(i.regex,i.val)}return t}t.exports=function(t,n){let i="";return n.format&&n.indentBy.length>0&&(i="\n"),e(t,n,"",i)}},800:(t,e,n)=>{const i=n(795);function s(t,e){let n="";for(;e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)n+=t[e];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const i=t[e++];let s="";for(;e<t.length&&t[e]!==i;e++)s+=t[e];return[n,s,e]}function r(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}function o(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"N"===t[e+3]&&"T"===t[e+4]&&"I"===t[e+5]&&"T"===t[e+6]&&"Y"===t[e+7]}function a(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"L"===t[e+3]&&"E"===t[e+4]&&"M"===t[e+5]&&"E"===t[e+6]&&"N"===t[e+7]&&"T"===t[e+8]}function c(t,e){return"!"===t[e+1]&&"A"===t[e+2]&&"T"===t[e+3]&&"T"===t[e+4]&&"L"===t[e+5]&&"I"===t[e+6]&&"S"===t[e+7]&&"T"===t[e+8]}function u(t,e){return"!"===t[e+1]&&"N"===t[e+2]&&"O"===t[e+3]&&"T"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"I"===t[e+7]&&"O"===t[e+8]&&"N"===t[e+9]}function l(t){if(i.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}t.exports=function(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let i=1,d=!1,f=!1,h="";for(;e<t.length;e++)if("<"!==t[e]||f)if(">"===t[e]){if(f?"-"===t[e-1]&&"-"===t[e-2]&&(f=!1,i--):i--,0===i)break}else"["===t[e]?d=!0:h+=t[e];else{if(d&&o(t,e))e+=7,[entityName,val,e]=s(t,e+1),-1===val.indexOf("&")&&(n[l(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(d&&a(t,e))e+=8;else if(d&&c(t,e))e+=8;else if(d&&u(t,e))e+=9;else{if(!r)throw new Error("Invalid DOCTYPE");f=!0}i++,h=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}},797:(t,e)=>{const n={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(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t}};e.buildOptions=function(t){return Object.assign({},n,t)},e.defaultOptions=n},798:(t,e,n)=>{"use strict";const i=n(795),s=n(799),r=n(800),o=n(801);function a(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];this.lastEntities[i]={regex:new RegExp("&"+i+";","g"),val:t[i]}}}function c(t,e,n,i,s,r,o){if(void 0!==t&&(this.options.trimValues&&!i&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,n,s,r);if(null==i)return t;if(typeof i!=typeof t||i!==t)return i;if(this.options.trimValues)return b(t,this.options.parseTagValue,this.options.numberParseOptions);return t.trim()===t?b(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function u(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function d(t,e,n){if(!this.options.ignoreAttributes&&"string"==typeof t){const n=i.getAllMatches(t,l),s=n.length,r={};for(let t=0;t<s;t++){const i=this.resolveNameSpace(n[t][1]);let s=n[t][4],o=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);const t=this.options.attributeValueProcessor(i,s,e);r[o]=null==t?s:typeof t!=typeof s||t!==s?t:b(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(r[o]=!0)}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=r,t}return r}}const f=function(t){t=t.replace(/\r\n?/g,"\n");const e=new s("!xml");let n=e,i="",o="";for(let a=0;a<t.length;a++){if("<"===t[a])if("/"===t[a+1]){const e=v(t,">",a,"Closing Tag is not closed.");let s=t.substring(a+2,e).trim();if(this.options.removeNSPrefix){const t=s.indexOf(":");-1!==t&&(s=s.substr(t+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),n&&(i=this.saveTextToParentTag(i,n,o));const r=o.substring(o.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: </${s}>`);let c=0;r&&-1!==this.options.unpairedTags.indexOf(r)?(c=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=o.lastIndexOf("."),o=o.substring(0,c),n=this.tagsNodeStack.pop(),i="",a=e}else if("?"===t[a+1]){let e=w(t,a,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,o),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new s(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,o,e.tagName)),this.addChild(n,t,o)}a=e.closeIndex+1}else if("!--"===t.substr(a+1,3)){const e=v(t,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const s=t.substring(a+4,e-2);i=this.saveTextToParentTag(i,n,o),n.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}a=e}else if("!D"===t.substr(a+1,2)){const e=r(t,a);this.docTypeEntities=e.entities,a=e.i}else if("!["===t.substr(a+1,2)){const e=v(t,"]]>",a,"CDATA is not closed.")-2,s=t.substring(a+9,e);i=this.saveTextToParentTag(i,n,o);let r=this.parseTextData(s,n.tagname,o,!0,!1,!0,!0);null==r&&(r=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]):n.add(this.options.textNodeName,r),a=e+2}else{let r=w(t,a,this.options.removeNSPrefix),c=r.tagName;const u=r.rawTagName;let l=r.tagExp,d=r.attrExpPresent,f=r.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,o,!1));const h=n;if(h&&-1!==this.options.unpairedTags.indexOf(h.tagname)&&(n=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),c!==e.tagname&&(o+=o?"."+c:c),this.isItStopNode(this.options.stopNodes,o,c)){let e="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),l=c):l=l.substr(0,l.length-1),a=r.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))a=r.closeIndex;else{const n=this.readStopNodeData(t,u,f+1);if(!n)throw new Error(`Unexpected end of ${u}`);a=n.i,e=n.tagContent}const i=new s(c);c!==l&&d&&(i[":@"]=this.buildAttributesMap(l,o,c)),e&&(e=this.parseTextData(e,c,o,!0,d,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,o)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),l=c):l=l.substr(0,l.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const t=new s(c);c!==l&&d&&(t[":@"]=this.buildAttributesMap(l,o,c)),this.addChild(n,t,o),o=o.substr(0,o.lastIndexOf("."))}else{const t=new s(c);this.tagsNodeStack.push(n),c!==l&&d&&(t[":@"]=this.buildAttributesMap(l,o,c)),this.addChild(n,t,o),n=t}i="",a=f}}else i+=t[a]}return e.child};function h(t,e,n){const i=this.options.updateTag(e.tagname,n,e[":@"]);!1===i||("string"==typeof i?(e.tagname=i,t.addChild(e)):t.addChild(e))}const p=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function g(t,e,n,i){return t&&(void 0===i&&(i=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function m(t,e,n){const i="*."+n;for(const n in t){const s=t[n];if(i===s||e===s)return!0}return!1}function v(t,e,n,i){const s=t.indexOf(e,n);if(-1===s)throw new Error(i);return s+e.length-1}function w(t,e,n,i=">"){const s=function(t,e,n=">"){let i,s="";for(let r=e;r<t.length;r++){let e=t[r];if(i)e===i&&(i="");else if('"'===e||"'"===e)i=e;else if(e===n[0]){if(!n[1])return{data:s,index:r};if(t[r+1]===n[1])return{data:s,index:r}}else"\t"===e&&(e=" ");s+=e}}(t,e+1,i);if(!s)return;let r=s.data;const o=s.index,a=r.search(/\s/);let c=r,u=!0;-1!==a&&(c=r.substring(0,a),r=r.substring(a+1).trimStart());const l=c;if(n){const t=c.indexOf(":");-1!==t&&(c=c.substr(t+1),u=c!==s.data.substr(t+1))}return{tagName:c,tagExp:r,closeIndex:o,attrExpPresent:u,rawTagName:l}}function x(t,e,n){const i=n;let s=1;for(;n<t.length;n++)if("<"===t[n])if("/"===t[n+1]){const r=v(t,">",n,`${e} is not closed`);if(t.substring(n+2,r).trim()===e&&(s--,0===s))return{tagContent:t.substring(i,n),i:r};n=r}else if("?"===t[n+1]){n=v(t,"?>",n+1,"StopNode is not closed.")}else if("!--"===t.substr(n+1,3)){n=v(t,"--\x3e",n+3,"StopNode is not closed.")}else if("!["===t.substr(n+1,2)){n=v(t,"]]>",n,"StopNode is not closed.")-2}else{const i=w(t,n,">");if(i){(i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&s++,n=i.closeIndex}}}function b(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&o(t,n)}return i.isExist(t)?t:""}t.exports=class{constructor(t){this.options=t,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:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=a,this.parseXml=f,this.parseTextData=c,this.resolveNameSpace=u,this.buildAttributesMap=d,this.isItStopNode=m,this.replaceEntitiesValue=p,this.readStopNodeData=x,this.saveTextToParentTag=g,this.addChild=h}}},796:(t,e,n)=>{const{buildOptions:i}=n(797),s=n(798),{prettify:r}=n(802),o=n(794);t.exports=class{constructor(t){this.externalEntities={},this.options=i(t)}parse(t,e){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const n=o.validate(t,e);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new s(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(t);return this.options.preserveOrder||void 0===i?i:r(i,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}}},802:(t,e)=>{"use strict";function n(t,e,o){let a;const c={};for(let u=0;u<t.length;u++){const l=t[u],d=i(l);let f="";if(f=void 0===o?d:o+"."+d,d===e.textNodeName)void 0===a?a=l[d]:a+=""+l[d];else{if(void 0===d)continue;if(l[d]){let t=n(l[d],e,f);const i=r(t,e);l[":@"]?s(t,l[":@"],f,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==c[d]&&c.hasOwnProperty(d)?(Array.isArray(c[d])||(c[d]=[c[d]]),c[d].push(t)):e.isArray(d,f,i)?c[d]=[t]:c[d]=t}}}return"string"==typeof a?a.length>0&&(c[e.textNodeName]=a):void 0!==a&&(c[e.textNodeName]=a),c}function i(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function s(t,e,n,i){if(e){const s=Object.keys(e),r=s.length;for(let o=0;o<r;o++){const r=s[o];i.isArray(r,n+"."+r,!0,!0)?t[r]=[e[r]]:t[r]=e[r]}}}function r(t,e){const{textNodeName:n}=e,i=Object.keys(t).length;return 0===i||!(1!==i||!t[n]&&"boolean"!=typeof t[n]&&0!==t[n])}e.prettify=function(t,e){return n(t,e)}},799:t=>{"use strict";t.exports=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}},801:t=>{const e=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,i={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};t.exports=function(t,s={}){if(s=Object.assign({},i,s),!t||"string"!=typeof t)return t;if("0"===t)return 0;let r=t.trim();if(void 0!==s.skipLike&&s.skipLike.test(r))return t;if(s.hex&&e.test(r))return function(t,e){if(parseInt)return parseInt(t,e);if(Number.parseInt)return Number.parseInt(t,e);if(window&&window.parseInt)return window.parseInt(t,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(r,16);if(-1!==r.search(/[eE]/)){const e=r.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(e){if(s.leadingZeros)r=(e[1]||"")+e[3];else if("0"!==e[2]||"."!==e[3][0])return t;return s.eNotation?Number(r):t}return t}{const e=n.exec(r);if(e){const n=e[1],i=e[2];let o=function(t){if(t&&-1!==t.indexOf("."))return"."===(t=t.replace(/0+$/,""))?t="0":"."===t[0]?t="0"+t:"."===t[t.length-1]&&(t=t.substr(0,t.length-1)),t;return t}(e[3]);if(!s.leadingZeros&&i.length>0&&n&&"."!==r[2])return t;if(!s.leadingZeros&&i.length>0&&!n&&"."!==r[1])return t;if(s.leadingZeros&&i===t)return 0;{const e=Number(r),a=""+e;return-1!==a.search(/[eE]/)?s.eNotation?e:t:-1!==r.indexOf(".")?"0"===a&&""===o||a===o||n&&a==="-"+o?e:t:i?o===a||n+o===a?e:t:r===a||r===n+a?e:t}}return t}}},791:t=>{"use strict";t.exports={rE:"3.750.0"}}};
3
+ //# sourceMappingURL=97.index.js.map