@tachybase/plugin-auth-dingtalk 1.3.24 → 1.3.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/externalVersion.js +3 -3
- package/dist/node_modules/@alicloud/dingtalk/dist/index.js +10 -2
- package/dist/node_modules/@alicloud/dingtalk/package.json +1 -1
- package/dist/node_modules/@alicloud/openapi-client/dist/client.js +10 -2
- package/dist/node_modules/@alicloud/openapi-client/package.json +1 -1
- package/dist/node_modules/@alicloud/tea-util/dist/client.d.ts +1 -44
- package/dist/node_modules/@alicloud/tea-util/dist/client.js +10 -1
- package/dist/node_modules/@alicloud/tea-util/package.json +1 -1
- package/dist/node_modules/@alicloud/tea-util/src/client.ts +5 -88
- package/package.json +7 -7
- package/dist/node_modules/@alicloud/tea-util/ChangeLog.txt +0 -20
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
(function(){var e={4209:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(205));const s=n(r(5356));class BearerTokenCredential extends i.default{constructor(e){if(!e){throw new Error("Missing required bearerToken option in config for bearer")}const t=new s.default({type:"bearer"});super(t);this.bearerToken=e}}t["default"]=BearerTokenCredential},113:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.CLIProfileCredentialsProvider=t.ProfileCredentialsProvider=t.EnvironmentVariableCredentialsProvider=t.URICredentialsProvider=t.ECSRAMRoleCredentialsProvider=t.OIDCRoleArnCredentialsProvider=t.RAMRoleARNCredentialsProvider=t.StaticSTSCredentialsProvider=t.StaticAKCredentialsProvider=t.DefaultCredentialsProvider=t.Config=t.CredentialModel=void 0;const i=n(r(1593));const s=n(r(4209));const o=n(r(5356));t.Config=o.default;const a=n(r(6885));t.CredentialModel=a.default;const u=n(r(842));t.StaticAKCredentialsProvider=u.default;const c=n(r(1532));t.StaticSTSCredentialsProvider=c.default;const l=n(r(7236));t.RAMRoleARNCredentialsProvider=l.default;const d=n(r(2323));t.OIDCRoleArnCredentialsProvider=d.default;const f=n(r(2098));t.ECSRAMRoleCredentialsProvider=f.default;const h=n(r(2312));t.DefaultCredentialsProvider=h.default;const p=n(r(2199));t.URICredentialsProvider=p.default;const y=n(r(2169));t.CLIProfileCredentialsProvider=y.default;const m=n(r(5256));t.ProfileCredentialsProvider=m.default;const g=n(r(4194));t.EnvironmentVariableCredentialsProvider=g.default;class InnerCredentialsClient{constructor(e,t){this.type=e;this.provider=t}async getAccessKeyId(){const e=await this.provider.getCredentials();return e.accessKeyId}async getAccessKeySecret(){const e=await this.provider.getCredentials();return e.accessKeySecret}async getSecurityToken(){const e=await this.provider.getCredentials();return e.securityToken}getBearerToken(){return}getType(){return this.type}async getCredential(){const e=await this.provider.getCredentials();return new a.default({accessKeyId:e.accessKeyId,accessKeySecret:e.accessKeySecret,securityToken:e.securityToken,bearerToken:undefined,type:this.getType(),providerName:e.providerName})}}function isCredentialsProviderClass(e){if(!e){return false}return typeof e.getCredentials==="function"&&typeof e.getProviderName==="function"}class Credential{constructor(e=null,t=null){if(isCredentialsProviderClass(t)){this.load(null,t)}else{this.load(e,null)}}getAccessKeyId(){return this.credential.getAccessKeyId()}getAccessKeySecret(){return this.credential.getAccessKeySecret()}getSecurityToken(){return this.credential.getSecurityToken()}getBearerToken(){return this.credential.getBearerToken()}getType(){return this.credential.getType()}getCredential(){return this.credential.getCredential()}load(e,t){if(t){this.credential=new InnerCredentialsClient(t.getProviderName(),t);return}if(!e){this.credential=new InnerCredentialsClient("default",h.default.builder().build());return}if(!e.type){throw new Error("Missing required type option")}switch(e.type){case"access_key":this.credential=new InnerCredentialsClient("access_key",u.default.builder().withAccessKeyId(e.accessKeyId).withAccessKeySecret(e.accessKeySecret).build());break;case"sts":this.credential=new InnerCredentialsClient("sts",c.default.builder().withAccessKeyId(e.accessKeyId).withAccessKeySecret(e.accessKeySecret).withSecurityToken(e.securityToken).build());break;case"ecs_ram_role":this.credential=new InnerCredentialsClient("ecs_ram_role",f.default.builder().withRoleName(e.roleName).withDisableIMDSv1(e.disableIMDSv1).withAsyncCredentialUpdateEnabled(e.asyncCredentialUpdateEnabled).withReadTimeout(e.timeout).withConnectTimeout(e.connectTimeout).build());break;case"ram_role_arn":{let t;if(e.securityToken){t=c.default.builder().withAccessKeyId(e.accessKeyId).withAccessKeySecret(e.accessKeySecret).withSecurityToken(e.securityToken).build()}else{t=u.default.builder().withAccessKeyId(e.accessKeyId).withAccessKeySecret(e.accessKeySecret).build()}this.credential=new InnerCredentialsClient("ram_role_arn",l.default.builder().withCredentialsProvider(t).withRoleArn(e.roleArn).withPolicy(e.policy).withDurationSeconds(e.roleSessionExpiration).withRoleSessionName(e.roleSessionName).withReadTimeout(e.timeout).withConnectTimeout(e.connectTimeout).withEnableVpc(e.enableVpc).withStsEndpoint(e.stsEndpoint).withStsRegionId(e.stsRegionId).withExternalId(e.externalId).build())}break;case"oidc_role_arn":this.credential=new InnerCredentialsClient("oidc_role_arn",d.default.builder().withRoleArn(e.roleArn).withOIDCProviderArn(e.oidcProviderArn).withOIDCTokenFilePath(e.oidcTokenFilePath).withRoleSessionName(e.roleSessionName).withPolicy(e.policy).withDurationSeconds(e.roleSessionExpiration).withStsEndpoint(e.stsEndpoint).withStsRegionId(e.stsRegionId).withEnableVpc(e.enableVpc).withReadTimeout(e.timeout).withConnectTimeout(e.connectTimeout).build());break;case"rsa_key_pair":this.credential=new i.default(e.publicKeyId,e.privateKeyFile);break;case"bearer":this.credential=new s.default(e.bearerToken);break;case"credentials_uri":this.credential=new InnerCredentialsClient("credentials_uri",p.default.builder().withCredentialsURI(e.credentialsURI).withReadTimeout(e.timeout).withConnectTimeout(e.connectTimeout).build());break;default:throw new Error("Invalid type option, support: access_key, sts, ecs_ram_role, ram_role_arn, rsa_key_pair, credentials_uri")}}}t["default"]=Credential},5356:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const o=s(r(4828));class Config extends o.Model{static names(){return{accessKeyId:"accessKeyId",accessKeySecret:"accessKeySecret",securityToken:"securityToken",bearerToken:"bearerToken",durationSeconds:"durationSeconds",roleArn:"roleArn",policy:"policy",roleSessionExpiration:"roleSessionExpiration",roleSessionName:"roleSessionName",externalId:"externalId",stsEndpoint:"stsEndpoint",stsRegionId:"stsRegionId",enableVpc:"enableVpc",timeout:"readTimeout",connectTimeout:"connectTimeout",publicKeyId:"publicKeyId",privateKeyFile:"privateKeyFile",roleName:"roleName",enableIMDSv2:"enableIMDSv2",disableIMDSv1:"disableIMDSv1",asyncCredentialUpdateEnabled:"asyncCredentialUpdateEnabled",metadataTokenDuration:"metadataTokenDuration",credentialsURI:"credentialsURI",oidcProviderArn:"oidcProviderArn",oidcTokenFilePath:"oidcTokenFilePath",type:"type"}}static types(){return{accessKeyId:"string",accessKeySecret:"string",securityToken:"string",bearerToken:"string",durationSeconds:"number",roleArn:"string",policy:"string",roleSessionExpiration:"number",roleSessionName:"string",externalId:"string",stsEndpoint:"string",stsRegionId:"string",enableVpc:"string",timeout:"number",connectTimeout:"number",publicKeyId:"string",privateKeyFile:"string",roleName:"string",enableIMDSv2:"boolean",disableIMDSv1:"boolean",asyncCredentialUpdateEnabled:"boolean",metadataTokenDuration:"number",credentialsURI:"string",oidcProviderArn:"string",oidcTokenFilePath:"string",type:"string"}}constructor(e){super(e)}}t["default"]=Config},6885:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const o=s(r(4828));class CredentialModel extends o.Model{static names(){return{accessKeyId:"accessKeyId",accessKeySecret:"accessKeySecret",securityToken:"securityToken",bearerToken:"bearerToken",type:"type",providerName:"providerName"}}static types(){return{accessKeyId:"string",accessKeySecret:"string",securityToken:"string",bearerToken:"string",type:"string",providerName:"string"}}constructor(e){super(e)}}t["default"]=CredentialModel},2554:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CredentialsBuilder=void 0;class Credentials{constructor(e){this.accessKeyId=e.accessKeyId;this.accessKeySecret=e.accessKeySecret;this.securityToken=e.securityToken;this.providerName=e.providerName}static builder(){return new CredentialsBuilder}}t["default"]=Credentials;class CredentialsBuilder{withAccessKeyId(e){this.accessKeyId=e;return this}withAccessKeySecret(e){this.accessKeySecret=e;return this}withSecurityToken(e){this.securityToken=e;return this}withProviderName(e){this.providerName=e;return this}build(){return new Credentials(this)}}t.CredentialsBuilder=CredentialsBuilder},205:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(6885));class DefaultCredential{constructor(e){this.accessKeyId=e.accessKeyId||"";this.accessKeySecret=e.accessKeySecret||"";this.securityToken=e.securityToken||"";this.bearerToken=e.bearerToken||"";this.type=e.type||""}async getAccessKeyId(){return this.accessKeyId}async getAccessKeySecret(){return this.accessKeySecret}async getSecurityToken(){return this.securityToken}getBearerToken(){return this.bearerToken}getType(){return this.type}async getCredential(){return new i.default({accessKeyId:this.accessKeyId,accessKeySecret:this.accessKeySecret,securityToken:this.securityToken,bearerToken:this.bearerToken,type:this.type})}}t["default"]=DefaultCredential},2169:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getProfile=t.getConfiguration=void 0;const i=r(9896);const s=r(9023);const o=n(r(6928));const a=n(r(857));const u=n(r(2554));const c=n(r(842));const l=n(r(1532));const d=n(r(7236));const f=n(r(2323));const h=n(r(2098));const p=(0,s.promisify)(i.readFile);class CLIProfileCredentialsProviderBuilder{build(){if(!this.profileName){this.profileName=process.env.ALIBABA_CLOUD_PROFILE}if(process.env.ALIBABA_CLOUD_CLI_PROFILE_DISABLED&&process.env.ALIBABA_CLOUD_CLI_PROFILE_DISABLED.toLowerCase()==="true"){throw new Error("the CLI profile is disabled")}return new CLIProfileCredentialsProvider(this)}withProfileName(e){this.profileName=e;return this}}class Configuration{}async function getConfiguration(e){let t;try{t=await p(e,"utf8")}catch(t){throw new Error(`reading aliyun cli config from '${e}' failed.`)}let r;try{r=JSON.parse(t)}catch(r){throw new Error(`parse aliyun cli config from '${e}' failed: ${t}`)}if(!r||!r.profiles||r.profiles.length===0){throw new Error(`no any configured profiles in '${e}'`)}return r}t.getConfiguration=getConfiguration;function getProfile(e,t){for(const r of e.profiles){if(r.name===t){return r}}throw new Error(`unable to get profile with '${t}'`)}t.getProfile=getProfile;class CLIProfileCredentialsProvider{static builder(){return new CLIProfileCredentialsProviderBuilder}constructor(e){this.homedir=a.default.homedir();this.profileName=e.profileName}getCredentialsProvider(e,t){const r=getProfile(e,t);switch(r.mode){case"AK":return c.default.builder().withAccessKeyId(r.access_key_id).withAccessKeySecret(r.access_key_secret).build();case"StsToken":return l.default.builder().withAccessKeyId(r.access_key_id).withAccessKeySecret(r.access_key_secret).withSecurityToken(r.sts_token).build();case"RamRoleArn":{const e=c.default.builder().withAccessKeyId(r.access_key_id).withAccessKeySecret(r.access_key_secret).build();return d.default.builder().withCredentialsProvider(e).withRoleArn(r.ram_role_arn).withRoleSessionName(r.ram_session_name).withDurationSeconds(r.expired_seconds).withStsRegionId(r.sts_region).withStsEndpoint(r.sts_endpoint).withEnableVpc(r.enable_vpc).build()}case"EcsRamRole":return h.default.builder().withRoleName(r.ram_role_name).build();case"OIDC":return f.default.builder().withOIDCTokenFilePath(r.oidc_token_file).withOIDCProviderArn(r.oidc_provider_arn).withRoleArn(r.ram_role_arn).withStsRegionId(r.sts_region).withDurationSeconds(r.expired_seconds).withRoleSessionName(r.ram_session_name).withDurationSeconds(r.duration_seconds).withEnableVpc(r.enable_vpc).build();case"ChainableRamRoleArn":{const t=this.getCredentialsProvider(e,r.source_profile);return d.default.builder().withCredentialsProvider(t).withRoleArn(r.ram_role_arn).withRoleSessionName(r.ram_session_name).withDurationSeconds(r.expired_seconds).withStsRegionId(r.sts_region).build()}default:throw new Error(`unsupported profile mode '${r.mode}'`)}}async getCredentials(){if(!this.innerProvider){if(!this.homedir){throw new Error("cannot found home dir")}const e=o.default.join(this.homedir,".aliyun/config.json");const t=await getConfiguration(e);const r=this.profileName||t.current;this.innerProvider=this.getCredentialsProvider(t,r)}const e=await this.innerProvider.getCredentials();return u.default.builder().withAccessKeyId(e.accessKeyId).withAccessKeySecret(e.accessKeySecret).withSecurityToken(e.securityToken).withProviderName(`${this.getProviderName()}/${this.innerProvider.getProviderName()}`).build()}getProviderName(){return"cli_profile"}}t["default"]=CLIProfileCredentialsProvider},2312:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(2554));const s=n(r(2169));const o=n(r(2098));const a=n(r(4194));const u=n(r(2323));const c=n(r(2199));const l=n(r(5256));class DefaultCredentialsProvider{static builder(){return new DefaultCredentialsProviderBuilder}constructor(e){this.providers=[];try{const e=a.default.builder().build();this.providers.push(e)}catch(e){}try{const e=u.default.builder().build();this.providers.push(e)}catch(e){}try{const e=s.default.builder().build();this.providers.push(e)}catch(e){}try{const e=l.default.builder().build();this.providers.push(e)}catch(e){}try{const e=o.default.builder().withRoleName(process.env.ALIBABA_CLOUD_ECS_METADATA).build();this.providers.push(e)}catch(e){}try{const e=c.default.builder().withCredentialsURI(process.env.ALIBABA_CLOUD_CREDENTIALS_URI).build();this.providers.push(e)}catch(e){}}async getCredentials(){if(this.lastUsedProvider){const e=await this.lastUsedProvider.getCredentials();return i.default.builder().withAccessKeyId(e.accessKeyId).withAccessKeySecret(e.accessKeySecret).withSecurityToken(e.securityToken).withProviderName(`${this.getProviderName()}/${this.lastUsedProvider.getProviderName()}`).build()}const e=[];for(const t of this.providers){this.lastUsedProvider=t;let r;try{r=await t.getCredentials()}catch(t){e.push(t);continue}if(r){return i.default.builder().withAccessKeyId(r.accessKeyId).withAccessKeySecret(r.accessKeySecret).withSecurityToken(r.securityToken).withProviderName(`${this.getProviderName()}/${this.lastUsedProvider.getProviderName()}`).build()}}throw new Error(`unable to get credentials from any of the providers in the chain: ${e.map((e=>e.message)).join(", ")}`)}getProviderName(){return"default"}}t["default"]=DefaultCredentialsProvider;class DefaultCredentialsProviderBuilder{build(){return new DefaultCredentialsProvider(this)}}},2098:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(7977);const i=r(3261);const s=60*60;const o=21600;class ECSRAMRoleCredentialsProvider extends i.SessionCredentialProvider{static builder(){return new ECSRAMRoleCredentialsProviderBuilder}constructor(e){super(i.STALE_TIME,s);this.doRequest=n.doRequest;this.refresher=this.getCredentialsInternal;this.roleName=e.roleName;this.disableIMDSv1=e.disableIMDSv1;this.readTimeout=e.readTimeout;this.connectTimeout=e.connectTimeout;this.checker=null;this.shouldRefreshCred=false;if(e.asyncCredentialUpdateEnabled){this.checker=this.checkCredentialsUpdateAsynchronously()}}checkCredentialsUpdateAsynchronously(){return setTimeout((async()=>{try{if(this.shouldRefreshCred){await this.getCredentials()}}catch(e){console.error("CheckCredentialsUpdateAsynchronously Error:",e)}finally{this.checker=this.checkCredentialsUpdateAsynchronously()}}),1e3*60)}close(){if(this.checker!=null){clearTimeout(this.checker);this.checker=null}}async getMetadataToken(){const e=n.Request.builder().withMethod("PUT").withProtocol("http").withHost("100.100.100.200").withPath("/latest/api/token").withHeaders({"x-aliyun-ecs-metadata-token-ttl-seconds":`${o}`}).withReadTimeout(this.readTimeout||1e3).withConnectTimeout(this.connectTimeout||1e3).build();try{const t=await this.doRequest(e);if(t.statusCode!==200){throw new Error(`get metadata token failed with ${t.statusCode}`)}return t.body.toString("utf8")}catch(e){if(this.disableIMDSv1){throw e}return null}}async getRoleName(){const e=n.Request.builder().withMethod("GET").withProtocol("http").withHost("100.100.100.200").withPath("/latest/meta-data/ram/security-credentials/").withReadTimeout(this.readTimeout||1e3).withConnectTimeout(this.connectTimeout||1e3);const t=await this.getMetadataToken();if(t!==null){e.withHeaders({"x-aliyun-ecs-metadata-token":t})}const r=e.build();const i=await this.doRequest(r);if(i.statusCode!==200){throw new Error(`get role name failed: ${r.method} ${r.toRequestURL()} ${i.statusCode}`)}return i.body.toString().trim()}async getCredentialsInternal(){let e=this.roleName;if(!e){e=await this.getRoleName()}const t=n.Request.builder().withMethod("GET").withProtocol("http").withHost("100.100.100.200").withPath(`/latest/meta-data/ram/security-credentials/${e}`).withReadTimeout(this.readTimeout||1e3).withConnectTimeout(this.connectTimeout||1e3);const r=await this.getMetadataToken();if(r!==null){t.withHeaders({"x-aliyun-ecs-metadata-token":r})}const s=t.build();const o=await this.doRequest(s);if(o.statusCode!==200){throw new Error(`get sts token failed, httpStatus: ${o.statusCode}, message = ${o.body.toString()}`)}let a;try{a=JSON.parse(o.body.toString())}catch(e){throw new Error(`get sts token failed, json parse failed: ${e.message}`)}if(!a||!a.AccessKeyId||!a.AccessKeySecret||!a.SecurityToken){throw new Error("get sts token failed")}if(a.Code!=="Success"){throw new Error("refresh Ecs sts token err, Code is not Success")}this.shouldRefreshCred=true;return new i.Session(a.AccessKeyId,a.AccessKeySecret,a.SecurityToken,a.Expiration)}getProviderName(){return"ecs_ram_role"}}t["default"]=ECSRAMRoleCredentialsProvider;class ECSRAMRoleCredentialsProviderBuilder{constructor(){this.disableIMDSv1=false;this.asyncCredentialUpdateEnabled=false}withRoleName(e){this.roleName=e;return this}withDisableIMDSv1(e){this.disableIMDSv1=e;return this}withReadTimeout(e){this.readTimeout=e;return this}withConnectTimeout(e){this.connectTimeout=e;return this}withAsyncCredentialUpdateEnabled(e){this.asyncCredentialUpdateEnabled=e;return this}build(){if(process.env.ALIBABA_CLOUD_ECS_METADATA_DISABLED&&process.env.ALIBABA_CLOUD_ECS_METADATA_DISABLED.toLowerCase()==="true"){throw new Error("IMDS credentials is disabled")}if(!this.roleName){this.roleName=process.env.ALIBABA_CLOUD_ECS_METADATA}if(process.env.ALIBABA_CLOUD_IMDSV1_DISABLED&&process.env.ALIBABA_CLOUD_IMDSV1_DISABLED.toLowerCase()==="true"){this.disableIMDSv1=true}return new ECSRAMRoleCredentialsProvider(this)}}},4194:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(2554));class EnvironmentVariableCredentialsProvider{static builder(){return new EnvironmentVariableCredentialsProviderBuilder}async getCredentials(){const e=process.env.ALIBABA_CLOUD_ACCESS_KEY_ID;if(!e){throw new Error("unable to get credentials from enviroment variables, Access key ID must be specified via environment variable (ALIBABA_CLOUD_ACCESS_KEY_ID)")}const t=process.env.ALIBABA_CLOUD_ACCESS_KEY_SECRET;if(!t){throw new Error("unable to get credentials from enviroment variables, Access key secret must be specified via environment variable (ALIBABA_CLOUD_ACCESS_KEY_SECRET)")}const r=process.env.ALIBABA_CLOUD_SECURITY_TOKEN;return i.default.builder().withAccessKeyId(e).withAccessKeySecret(t).withSecurityToken(r).withProviderName(this.getProviderName()).build()}getProviderName(){return"env"}constructor(e){}}t["default"]=EnvironmentVariableCredentialsProvider;class EnvironmentVariableCredentialsProviderBuilder{build(){return new EnvironmentVariableCredentialsProvider(this)}}},7977:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.doRequest=t.Response=t.RequestBuilder=t.Request=void 0;const i=n(r(3312));class Request{static builder(){return new RequestBuilder}constructor(e){this.method=e.method;this.protocol=e.protocol;this.host=e.host;this.path=e.path;this.queries=e.queries;this.headers=e.headers;this.bodyForm=e.bodyForm;this.bodyBytes=e.bodyBytes;this.url=e.url;this.readTimeout=e.readTimeout;this.connectTimeout=e.connectTimeout}toRequestURL(){if(this.url){return this.url}let e=`${this.protocol}://${this.host}${this.path}`;if(this.queries&&Object.keys(this.queries).length>0){e+=`?`+querystringify(this.queries)}return e}}t.Request=Request;class RequestBuilder{build(){if(!this.protocol){this.protocol="https"}if(!this.path){this.path="/"}if(!this.headers){this.headers={}}if(!this.queries){this.queries={}}return new Request(this)}withMethod(e){this.method=e;return this}withProtocol(e){this.protocol=e;return this}withHost(e){this.host=e;return this}withPath(e){this.path=e;return this}withQueries(e){this.queries=e;return this}withHeaders(e){this.headers=e;return this}withBodyForm(e){this.bodyForm=e;return this}withURL(e){this.url=e;return this}withReadTimeout(e){this.readTimeout=e;return this}withConnectTimeout(e){this.connectTimeout=e;return this}}t.RequestBuilder=RequestBuilder;class Response{static builder(){return new ResponseBuilder}constructor(e){this.statusCode=e.statusCode;this.headers=e.headers;this.body=e.body}}t.Response=Response;class ResponseBuilder{withStatusCode(e){this.statusCode=e;return this}withHeaders(e){this.headers=e;return this}withBody(e){this.body=e;return this}constructor(){this.headers={}}build(){return new Response(this)}}function querystringify(e){const t=[];for(const[r,n]of Object.entries(e)){t.push(r+"="+encodeURIComponent(n))}return t.join("&")}async function doRequest(e){const t=e.toRequestURL();let r;if(e.bodyForm&&Object.keys(e.bodyForm).length>0){r=querystringify(e.bodyForm);if(!e.headers["Content-Type"]){e.headers["Content-Type"]="application/x-www-form-urlencoded"}}const n=await i.default.request(t,{method:e.method,data:r,headers:e.headers,readTimeout:e.readTimeout,connectTimeout:e.connectTimeout});const s=await i.default.read(n,"");return Response.builder().withStatusCode(n.statusCode).withHeaders(n.headers).withBody(s).build()}t.doRequest=doRequest},2323:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const o=r(9896);const a=r(9023);const u=r(3261);const c=s(r(8844));const l=r(7977);const d=(0,a.promisify)(o.readFile);class OIDCRoleArnCredentialsProviderBuilder{withOIDCProviderArn(e){this.oidcProviderArn=e;return this}withOIDCTokenFilePath(e){this.oidcTokenFilePath=e;return this}withRoleArn(e){this.roleArn=e;return this}withRoleSessionName(e){this.roleSessionName=e;return this}withDurationSeconds(e){this.durationSeconds=e;return this}withStsEndpoint(e){this.stsEndpoint=e;return this}withStsRegionId(e){this.stsRegionId=e;return this}withPolicy(e){this.policy=e;return this}withEnableVpc(e){this.enableVpc=e;return this}withReadTimeout(e){this.readTimeout=e;return this}withConnectTimeout(e){this.connectTimeout=e;return this}build(){if(!this.oidcProviderArn){this.oidcProviderArn=process.env.ALIBABA_CLOUD_OIDC_PROVIDER_ARN}if(!this.oidcTokenFilePath){this.oidcTokenFilePath=process.env.ALIBABA_CLOUD_OIDC_TOKEN_FILE}if(!this.roleSessionName){this.roleSessionName=process.env.ALIBABA_CLOUD_ROLE_SESSION_NAME}if(!this.durationSeconds){this.durationSeconds=3600}if(!this.roleArn){this.roleArn=process.env.ALIBABA_CLOUD_ROLE_ARN}if(!this.roleArn){throw new Error("roleArn does not exist and env ALIBABA_CLOUD_ROLE_ARN is null.")}if(!this.oidcProviderArn){throw new Error("oidcProviderArn does not exist and env ALIBABA_CLOUD_OIDC_PROVIDER_ARN is null.")}if(!this.oidcTokenFilePath){throw new Error("oidcTokenFilePath is not exists and env ALIBABA_CLOUD_OIDC_TOKEN_FILE is null.")}if(!this.roleSessionName){this.roleSessionName="credentials-nodejs-"+Date.now()}if(this.durationSeconds<900){throw new Error("session duration should be in the range of 900s - max session duration")}if(!this.stsRegionId){this.stsRegionId=process.env.ALIBABA_CLOUD_STS_REGION}if(!this.enableVpc){this.enableVpc=process.env.ALIBABA_CLOUD_VPC_ENDPOINT_ENABLED&&process.env.ALIBABA_CLOUD_VPC_ENDPOINT_ENABLED.toLowerCase()==="true"||false}if(!this.stsEndpoint){if(this.stsRegionId){if(this.enableVpc){this.stsEndpoint=`sts-vpc.${this.stsRegionId}.aliyuncs.com`}else{this.stsEndpoint=`sts.${this.stsRegionId}.aliyuncs.com`}}else{this.stsEndpoint="sts.aliyuncs.com"}}return new OIDCRoleArnCredentialsProvider(this)}}class OIDCRoleArnCredentialsProvider extends u.SessionCredentialProvider{static builder(){return new OIDCRoleArnCredentialsProviderBuilder}constructor(e){super(u.STALE_TIME);this.doRequest=l.doRequest;this.refresher=this.getCredentialsInternal;this.roleArn=e.roleArn;this.oidcProviderArn=e.oidcProviderArn;this.oidcTokenFilePath=e.oidcTokenFilePath;this.policy=e.policy;this.durationSeconds=e.durationSeconds;this.roleSessionName=e.roleSessionName;this.stsEndpoint=e.stsEndpoint;this.readTimeout=e.readTimeout;this.connectTimeout=e.connectTimeout;this.doRequest=l.doRequest}getProviderName(){return"oidc_role_arn"}async getCredentialsInternal(){const e=await d(this.oidcTokenFilePath,"utf8");const t=l.Request.builder().withMethod("POST").withProtocol("https").withHost(this.stsEndpoint).withReadTimeout(this.readTimeout||1e4).withConnectTimeout(this.connectTimeout||5e3);const r=Object.create(null);r["Version"]="2015-04-01";r["Action"]="AssumeRoleWithOIDC";r["Format"]="JSON";r["Timestamp"]=c.timestamp();t.withQueries(r);const n=Object.create(null);n["OIDCProviderArn"]=this.oidcProviderArn;n["OIDCToken"]=e;n["RoleArn"]=this.roleArn;if(this.policy){n["Policy"]=this.policy}n["RoleSessionName"]=this.roleSessionName;n["DurationSeconds"]=`${this.durationSeconds}`;t.withBodyForm(n);const i=Object.create(null);i["Content-Type"]="application/x-www-form-urlencoded";t.withHeaders(i);const s=t.build();const o=await this.doRequest(s);if(o.statusCode!==200){throw new Error(`get sts token failed with OIDC: ${o.body.toString("utf8")}`)}let a;try{a=JSON.parse(o.body.toString("utf8"))}catch(e){throw new Error(`get sts token failed with OIDC, unmarshal fail: ${o.body.toString("utf8")}`)}if(!a||!a.Credentials){throw new Error(`get sts token failed with OIDC`)}const{AccessKeyId:f,AccessKeySecret:h,SecurityToken:p,Expiration:y}=a.Credentials;if(!f||!h||!p){throw new Error("get sts token failed with OIDC")}return new u.Session(f,h,p,y)}}t["default"]=OIDCRoleArnCredentialsProvider},5256:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(6928));const s=n(r(857));const o=n(r(2554));const a=r(8844);const u=n(r(842));const c=n(r(2098));const l=n(r(7236));class ProfileCredentialsProvider{async getCredentials(){if(!this.innerProvider){let e=process.env.ALIBABA_CLOUD_CREDENTIALS_FILE;if(!e){if(!this.homedir){throw new Error("cannot found home dir")}e=i.default.join(this.homedir,".alibabacloud/credentials")}const t=await(0,a.loadIni)(e);this.innerProvider=this.getCredentialsProvider(t)}const e=await this.innerProvider.getCredentials();return o.default.builder().withAccessKeyId(e.accessKeyId).withAccessKeySecret(e.accessKeySecret).withSecurityToken(e.securityToken).withProviderName(`${this.getProviderName()}/${this.innerProvider.getProviderName()}`).build()}getCredentialsProvider(e){const t=e[this.profileName]||{};if(!t.type){throw new Error(`Can not find credential type for "${this.profileName}"`)}switch(t.type){case"access_key":return u.default.builder().withAccessKeyId(t.access_key_id).withAccessKeySecret(t.access_key_secret).build();case"ecs_ram_role":return c.default.builder().withRoleName(t.role_name).build();case"ram_role_arn":{const e=u.default.builder().withAccessKeyId(t.access_key_id).withAccessKeySecret(t.access_key_secret).build();return l.default.builder().withCredentialsProvider(e).withRoleArn(t.role_arn).withRoleSessionName(t.role_session_name).withPolicy(t.policy).build()}default:throw new Error("Invalid type option, support: access_key, ecs_ram_role, ram_role_arn")}}getProviderName(){return"profile"}static builder(){return new ProfileCredentialsProviderBuilder}constructor(e){this.homedir=s.default.homedir();this.profileName=e.profileName}}t["default"]=ProfileCredentialsProvider;class ProfileCredentialsProviderBuilder{withProfileName(e){this.profileName=e;return this}build(){if(!this.profileName){this.profileName=process.env.ALIBABA_CLOUD_PROFILE||"default"}return new ProfileCredentialsProvider(this)}}},7236:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=s(r(1406));const u=o(r(6449));const c=s(r(8844));const l=r(7977);const d=r(3261);const f=(0,u.default)("sign");class RAMRoleARNCredentialsProviderBuilder{build(){if(!this.credentialsProvider){throw new Error("must specify a previous credentials provider to asssume role")}if(!(this.roleArn=this.roleArn||process.env.ALIBABA_CLOUD_ROLE_ARN))throw new Error("the RoleArn is empty");if(!this.roleSessionName){this.roleSessionName=process.env.ALIBABA_CLOUD_ROLE_SESSION_NAME||"credentials-nodejs-"+Date.now()}if(!this.stsRegionId){this.stsRegionId=process.env.ALIBABA_CLOUD_STS_REGION}if(!this.enableVpc){this.enableVpc=process.env.ALIBABA_CLOUD_VPC_ENDPOINT_ENABLED&&process.env.ALIBABA_CLOUD_VPC_ENDPOINT_ENABLED.toLowerCase()==="true"||false}if(!this.durationSeconds){this.durationSeconds=3600}if(this.durationSeconds<900){throw new Error("session duration should be in the range of 900s - max session duration")}if(!this.stsEndpoint){if(this.stsRegionId){if(this.enableVpc){this.stsEndpoint=`sts-vpc.${this.stsRegionId}.aliyuncs.com`}else{this.stsEndpoint=`sts.${this.stsRegionId}.aliyuncs.com`}}else{this.stsEndpoint="sts.aliyuncs.com"}}return new RAMRoleARNCredentialsProvider(this)}withCredentialsProvider(e){this.credentialsProvider=e;return this}withRoleArn(e){this.roleArn=e;return this}withStsRegionId(e){this.stsRegionId=e;return this}withStsEndpoint(e){this.stsEndpoint=e;return this}withRoleSessionName(e){this.roleSessionName=e;return this}withPolicy(e){this.policy=e;return this}withExternalId(e){this.externalId=e;return this}withDurationSeconds(e){this.durationSeconds=e;return this}withEnableVpc(e){this.enableVpc=e;return this}withReadTimeout(e){this.readTimeout=e;return this}withConnectTimeout(e){this.connectTimeout=e;return this}}function encode(e){const t=encodeURIComponent(e);return t.replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}class RAMRoleARNCredentialsProvider extends d.SessionCredentialProvider{static builder(){return new RAMRoleARNCredentialsProviderBuilder}constructor(e){super(d.STALE_TIME);this.doRequest=l.doRequest;this.refresher=this.getCredentialsInternal;this.credentialsProvider=e.credentialsProvider;this.stsEndpoint=e.stsEndpoint;this.roleSessionName=e.roleSessionName;this.policy=e.policy;this.durationSeconds=e.durationSeconds;this.roleArn=e.roleArn;this.externalId=e.externalId;this.readTimeout=e.readTimeout;this.connectTimeout=e.connectTimeout}async getCredentialsInternal(){const e=await this.credentialsProvider.getCredentials();const t="POST";const r=l.Request.builder().withMethod(t).withProtocol("https").withHost(this.stsEndpoint).withReadTimeout(this.readTimeout||1e4).withConnectTimeout(this.connectTimeout||5e3);const n=Object.create(null);n["Version"]="2015-04-01";n["Action"]="AssumeRole";n["Format"]="JSON";n["Timestamp"]=c.timestamp();n["SignatureMethod"]="HMAC-SHA1";n["SignatureVersion"]="1.0";n["SignatureNonce"]=a.makeNonce();n["AccessKeyId"]=e.accessKeyId;if(e.securityToken){n["SecurityToken"]=e.securityToken}const i=Object.create(null);i["RoleArn"]=this.roleArn;if(this.policy){i["Policy"]=this.policy}if(this.externalId){i["ExternalId"]=this.externalId}i["RoleSessionName"]=this.roleSessionName;i["DurationSeconds"]=`${this.durationSeconds}`;r.withBodyForm(i);const s=Object.create(null);for(const[e,t]of Object.entries(n)){s[e]=t}for(const[e,t]of Object.entries(i)){s[e]=t}const o=Object.keys(s).sort();const u=`${t}&${encode("/")}&${encode(o.map((e=>`${encode(e)}=${encode(s[e])}`)).join("&"))}`;f("stringToSign[Client]:");f(u);const h=e.accessKeySecret+"&";const p=a.sha1(u,h,"base64");n["Signature"]=p;r.withQueries(n);const y=Object.create(null);y["Content-Type"]="application/x-www-form-urlencoded";y["x-acs-credentials-provider"]=e.providerName;r.withHeaders(y);const m=r.build();const g=await this.doRequest(m);if(g.statusCode!=200){if(g.headers["content-type"]&&g.headers["content-type"].startsWith("application/json")){const e=JSON.parse(g.body.toString("utf8"));const t=e.Message.slice("Specified signature is not matched with our calculation. server string to sign is:".length);f("stringToSign[Server]:");f(u);if(e.Code==="SignatureDoesNotMatch"&&t===u){throw new Error(`the access key secret is invalid`)}}throw new Error(`refresh session token failed: ${g.body.toString("utf8")}`)}let b;try{b=JSON.parse(g.body.toString("utf8"))}catch(e){throw new Error(`refresh RoleArn sts token err, unmarshal fail: ${g.body.toString("utf8")}`)}if(!b||!b.Credentials){throw new Error(`refresh RoleArn sts token err, fail to get credentials`)}if(!b.Credentials.AccessKeyId||!b.Credentials.AccessKeySecret||!b.Credentials.SecurityToken){throw new Error("refresh RoleArn sts token err, fail to get credentials")}const{AccessKeyId:w,AccessKeySecret:v,SecurityToken:T,Expiration:C}=b.Credentials;return new d.Session(w,v,T,C)}getProviderName(){return`ram_role_arn/${this.credentialsProvider.getProviderName()}`}}t["default"]=RAMRoleARNCredentialsProvider},3261:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.SessionCredentialProvider=t.Session=t.STALE_TIME=void 0;const i=r(4420);const s=r(8844);const o=n(r(2554));t.STALE_TIME=15*60;class Session{constructor(e,t,r,n){this.accessKeyId=e;this.accessKeySecret=t;this.securityToken=r;this.expiration=n}}t.Session=Session;class SessionCredentialProvider{constructor(e=0,r=0){this.staleTime=e||t.STALE_TIME;if(r){this.prefetchTime=r;this.prefetchTimestamp=Date.now()+r*1e3}this.refreshFaliure=0}async getCredentials(){this.session=await this.getSession();return o.default.builder().withAccessKeyId(this.session.accessKeyId).withAccessKeySecret(this.session.accessKeySecret).withSecurityToken(this.session.securityToken).withProviderName(this.getProviderName()).build()}refreshTimestamp(){this.staleTimestamp=this.expirationTimestamp-this.staleTime;if(this.prefetchTimestamp){this.prefetchTimestamp=(Date.now()+this.prefetchTime*1e3)/1e3}}maxStaleFailureJitter(){const e=1<<this.refreshFaliure-1;return e>10?e:10}jitterTime(e,t,r){const n=r-t;const i=Math.abs(Math.floor(Math.random()*n));return e+t+i}async refreshSession(){try{const e=await this.refresher();const t=Date.now()/1e3;const r=this.staleTimestamp>t;const n=this.session;this.expirationTimestamp=(0,i.parseUTC)(e.expiration)/1e3;this.session=e;this.refreshFaliure=0;this.refreshTimestamp();if(this.staleTimestamp>t){return}if(t<this.staleTimestamp+this.staleTime){this.expirationTimestamp=t+this.staleTime}if(t>this.staleTimestamp+this.staleTime){if(r){this.session=n;this.expirationTimestamp=(0,i.parseUTC)(n.expiration)/1e3;this.refreshTimestamp();return}const e=50+(0,s.getRandomInt)(20);this.expirationTimestamp=t+e+this.staleTime}}catch(e){if(!this.session){throw e}const t=Date.now()/1e3;if(t<this.staleTimestamp){return}this.refreshFaliure++;this.expirationTimestamp=this.jitterTime(t,1,this.maxStaleFailureJitter())+this.staleTime}}async getSession(){if(this.needUpdateCredential()||this.shouldPrefetchCredential()){await this.refreshSession();this.refreshTimestamp()}return this.session}needUpdateCredential(){if(!this.session||!this.expirationTimestamp){return true}return Date.now()/1e3>=this.staleTimestamp}shouldPrefetchCredential(){if(!this.prefetchTimestamp){return false}return this.expirationTimestamp-Date.now()/1e3<=this.prefetchTime}getProviderName(){return"session"}}t.SessionCredentialProvider=SessionCredentialProvider},842:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.StaticAKCredentialsProviderBuilder=void 0;const i=n(r(2554));class StaticAKCredentialsProviderBuilder{withAccessKeyId(e){this.accessKeyId=e;return this}withAccessKeySecret(e){this.accessKeySecret=e;return this}build(){if(!this.accessKeyId){this.accessKeyId=process.env["ALIBABA_CLOUD_ACCESS_KEY_ID"]}if(!this.accessKeyId){throw new Error("the access key id is empty")}if(!this.accessKeySecret){this.accessKeySecret=process.env["ALIBABA_CLOUD_ACCESS_KEY_SECRET"]}if(!this.accessKeySecret){throw new Error("the access key secret is empty")}return new StaticAKCredentialsProvider(this)}}t.StaticAKCredentialsProviderBuilder=StaticAKCredentialsProviderBuilder;class StaticAKCredentialsProvider{static builder(){return new StaticAKCredentialsProviderBuilder}constructor(e){this.accessKeyId=e.accessKeyId;this.accessKeySecret=e.accessKeySecret}getProviderName(){return"static_ak"}async getCredentials(){const e=i.default.builder().withAccessKeyId(this.accessKeyId).withAccessKeySecret(this.accessKeySecret).withProviderName("static_ak").build();return e}}t["default"]=StaticAKCredentialsProvider},1532:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.StaticSTSCredentialsProviderBuilder=void 0;const i=n(r(2554));class StaticSTSCredentialsProviderBuilder{withAccessKeyId(e){this.accessKeyId=e;return this}withAccessKeySecret(e){this.accessKeySecret=e;return this}withSecurityToken(e){this.securityToken=e;return this}build(){if(!this.accessKeyId){this.accessKeyId=process.env["ALIBABA_CLOUD_ACCESS_KEY_ID"]}if(!this.accessKeyId){throw new Error("the access key id is empty")}if(!this.accessKeySecret){this.accessKeySecret=process.env["ALIBABA_CLOUD_ACCESS_KEY_SECRET"]}if(!this.accessKeySecret){throw new Error("the access key secret is empty")}if(!this.securityToken){this.securityToken=process.env["ALIBABA_CLOUD_SECURITY_TOKEN"]}if(!this.securityToken){throw new Error("the security token is empty")}return new StaticSTSCredentialsProvider(this)}}t.StaticSTSCredentialsProviderBuilder=StaticSTSCredentialsProviderBuilder;class StaticSTSCredentialsProvider{static builder(){return new StaticSTSCredentialsProviderBuilder}constructor(e){this.accessKeyId=e.accessKeyId;this.accessKeySecret=e.accessKeySecret;this.securityToken=e.securityToken}getProviderName(){return"static_sts"}async getCredentials(){return i.default.builder().withAccessKeyId(this.accessKeyId).withAccessKeySecret(this.accessKeySecret).withSecurityToken(this.securityToken).withProviderName(this.getProviderName()).build()}}t["default"]=StaticSTSCredentialsProvider},4420:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.parseUTC=void 0;function parseUTC(e){if(!e){throw new Error("invalid UTC format time string")}if(e.length===20){if(e[4]!=="-"||e[7]!=="-"||e[10]!=="T"||e[13]!==":"||e[16]!==":"||e[19]!=="Z"){throw new Error("invalid UTC format date string")}}else if(e.length===24){if(e[4]!=="-"||e[7]!=="-"||e[10]!=="T"||e[13]!==":"||e[16]!==":"||e[19]!=="."||e[23]!=="Z"){throw new Error("invalid UTC format date string")}}else{throw new Error("invalid UTC format time string")}const t=e.slice(0,4);const r=Number.parseInt(t,10);if(isNaN(r)){throw new Error("invalid year string")}const n=e.slice(5,7);const i=Number.parseInt(n,10);if(isNaN(i)){throw new Error("invalid month string")}if(i<1||i>12){throw new Error("invalid month value")}const s=e.slice(8,10);const o=Number.parseInt(s,10);if(isNaN(o)){throw new Error("invalid date string")}if(o<1||o>31){throw new Error("invalid date value")}const a=e.slice(11,13);const u=Number.parseInt(a,10);if(isNaN(u)){throw new Error("invalid hours string")}if(u<0||u>24){throw new Error("invalid hours value")}const c=e.slice(14,16);const l=Number.parseInt(c,10);if(isNaN(l)){throw new Error("invalid minutes string")}if(l<0||l>60){throw new Error("invalid minutes value")}const d=e.slice(17,19);const f=Number.parseInt(d,10);if(isNaN(f)){throw new Error("invalid seconds string")}if(f<0||f>60){throw new Error("invalid seconds value")}if(e.length===24){const t=e.slice(20,23);const n=Number.parseInt(t,10);if(isNaN(n)){throw new Error("invalid ms string")}return Date.UTC(r,i-1,o,u,l,f,n)}return Date.UTC(r,i-1,o,u,l,f)}t.parseUTC=parseUTC},2199:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.URICredentialsProviderBuilder=void 0;const n=r(3261);const i=r(7977);class URICredentialsProvider extends n.SessionCredentialProvider{static builder(){return new URICredentialsProviderBuilder}constructor(e){super(n.STALE_TIME);this.doRequest=i.doRequest;this.refresher=this.getCredentialsUri;this.credentialsURI=e.credentialsURI;this.readTimeout=e.readTimeout;this.connectTimeout=e.connectTimeout}getProviderName(){return"credential_uri"}async getCredentialsUri(){const e=i.Request.builder().withMethod("GET").withURL(this.credentialsURI).withReadTimeout(this.readTimeout||1e4).withConnectTimeout(this.connectTimeout||5e3);const t=e.build();const r=await this.doRequest(t);if(r.statusCode!==200){throw new Error(`get sts token failed, httpStatus: ${r.statusCode}, message = ${r.body.toString("utf8")}.`)}let s;try{s=JSON.parse(r.body.toString("utf8"))}catch(e){throw new Error(`get sts token failed, json parse failed: ${e.message}, result: ${r.body.toString("utf8")}.`)}if(!s||!s.AccessKeyId||!s.AccessKeySecret||!s.SecurityToken){throw new Error(`error retrieving credentials from credentialsURI result: ${JSON.stringify(s)}.`)}return new n.Session(s.AccessKeyId,s.AccessKeySecret,s.SecurityToken,s.Expiration)}}t["default"]=URICredentialsProvider;class URICredentialsProviderBuilder{withCredentialsURI(e){this.credentialsURI=e;return this}withReadTimeout(e){this.readTimeout=e;return this}withConnectTimeout(e){this.connectTimeout=e;return this}build(){if(!this.credentialsURI){this.credentialsURI=process.env.ALIBABA_CLOUD_CREDENTIALS_URI}return new URICredentialsProvider(this)}}t.URICredentialsProviderBuilder=URICredentialsProviderBuilder},1593:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=o(r(9896));const u=o(r(8522));const c=s(r(8844));const l=r(6013);const d=o(r(5356));const f="http://100.100.100.200/latest/meta-data/ram/security-credentials/";class RsaKeyPairCredential extends u.default{constructor(e,t){if(!e){throw new Error("Missing required publicKeyId option in config for rsa_key_pair")}if(!t){throw new Error("Missing required privateKeyFile option in config for rsa_key_pair")}if(!a.default.existsSync(t)){throw new Error(`privateKeyFile ${t} cannot be empty`)}const r=new d.default({type:"rsa_key_pair"});super(r);this.privateKey=c.parseFile(t);this.publicKeyId=e}async updateCredential(){const e=f+this.roleName;const t=await(0,l.request)(e,{accessKeyId:this.publicKeyId,action:"GenerateSessionAccessKey",durationSeconds:3600,signatureMethod:"SHA256withRSA",signatureType:"PRIVATEKEY"},{},this.privateKey);this.sessionCredential=t.Credentials}}t["default"]=RsaKeyPairCredential},8522:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=o(r(205));const u=s(r(8844));const c=o(r(5356));const l=o(r(6885));class SessionCredential extends a.default{constructor(e){const t=new c.default({type:e.type,accessKeyId:e.accessKeyId,accessKeySecret:e.accessKeySecret,securityToken:e.securityToken});super(t);this.sessionCredential=null;this.durationSeconds=e.durationSeconds||3600}async updateCredential(){throw new Error("need implemented in sub-class")}async ensureCredential(){const e=this.needUpdateCredential();if(e){await this.updateCredential()}}async getAccessKeyId(){await this.ensureCredential();return this.sessionCredential.AccessKeyId}async getAccessKeySecret(){await this.ensureCredential();return this.sessionCredential.AccessKeySecret}async getSecurityToken(){await this.ensureCredential();return this.sessionCredential.SecurityToken}needUpdateCredential(){if(!this.sessionCredential||!this.sessionCredential.Expiration||!this.sessionCredential.AccessKeyId||!this.sessionCredential.AccessKeySecret||!this.sessionCredential.SecurityToken){return true}const e=u.timestamp(new Date,this.durationSeconds*.05*1e3);if(this.sessionCredential.Expiration<e){return true}return false}async getCredential(){await this.ensureCredential();return new l.default({accessKeyId:this.sessionCredential.AccessKeyId,accessKeySecret:this.sessionCredential.AccessKeySecret,securityToken:this.sessionCredential.SecurityToken,bearerToken:this.bearerToken,type:this.type})}}t["default"]=SessionCredential},4457:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.DEFAULT_CLIENT=t.DEFAULT_UA=void 0;const a=s(r(857));const u=o(r(9343));t.DEFAULT_UA=`AlibabaCloud (${a.platform()}; ${a.arch()}) `+`Node.js/${process.version} Core/${u.default.version}`;t.DEFAULT_CLIENT=`Node.js(${process.version}), ${u.default.name}: ${u.default.version}`},6013:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.request=void 0;const a=o(r(3312));const u=s(r(1406));const c=s(r(4457));const l=s(r(8844));const d=new Set([200,"200","OK","Success"]);function firstLetterUpper(e){return e.slice(0,1).toUpperCase()+e.slice(1)}function formatParams(e){const t=Object.keys(e);const r={};for(const n of t){r[firstLetterUpper(n)]=e[n]}return r}function encode(e){const t=encodeURIComponent(e);return t.replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function replaceRepeatList(e,t,r){for(let n=0;n<r.length;n++){const i=r[n];if(i&&typeof i==="object"){const r=Object.keys(i);for(const s of r){e[`${t}.${n+1}.${s}`]=i[s]}}else{e[`${t}.${n+1}`]=i}}}function flatParams(e){const t={};const r=Object.keys(e);for(const n of r){const r=e[n];if(Array.isArray(r)){replaceRepeatList(t,n,r)}else{t[n]=r}}return t}function normalize(e){const t=[];const r=flatParams(e);const n=Object.keys(r).sort();for(const e of n){const n=r[e];t.push([encode(e),encode(n)])}return t}function canonicalize(e){const t=[];for(const[r,n]of e){t.push(r+"="+n)}return t.join("&")}function _buildParams(){const e={Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureNonce:u.makeNonce(),SignatureVersion:"1.0",Timestamp:l.timestamp(),Version:"2015-04-01",RegionId:"cn-hangzhou"};return e}async function request(e,t={},r={},n){let i=Object.assign({headers:{"x-sdk-client":c.DEFAULT_CLIENT,"user-agent":c.DEFAULT_UA}},r);if(i.formatParams!==false){t=formatParams(t)}t=Object.assign(Object.assign({},_buildParams()),t);const s=(r.method||"GET").toUpperCase();const o=normalize(t);if(!i.anonymous){const e=canonicalize(o);const t=`${s}&${encode("/")}&${encode(e)}`;const r=n+"&";const i=u.sha1(t,r,"base64");o.push(["Signature",encode(i)])}const l=r.method==="POST"?`${e}/`:`${e}/?${canonicalize(o)}`;if(r.method==="POST"){r.headers=r.headers||{};r.headers["content-type"]="application/x-www-form-urlencoded";r.data=canonicalize(o)}const f=await a.default.request(l,r);const h=await a.default.read(f,"utf8");const p=JSON.parse(h);if(p.Code&&!d.has(p.Code)){const e=new Error(`${p.Message}`);e.name=p.Code+"Error";e.data=p;e.code=p.Code;e.url=l;throw e}return p}t.request=request},8844:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getRandomInt=t.loadIni=t.parseFile=t.timestamp=void 0;const a=s(r(6482));const u=s(r(1406));const c=o(r(9896));const l=r(9023);const d=(0,l.promisify)(c.default.readFile);const f=(0,l.promisify)(c.default.access);function timestamp(e,t){let r=new Date(e);if(!e||isNaN(r.getTime())){r=new Date}if(t){r.setTime(r.getTime()+t)}const n=r.getUTCFullYear();const i=u.pad2(r.getUTCMonth()+1);const s=u.pad2(r.getUTCDate());const o=u.pad2(r.getUTCHours());const a=u.pad2(r.getUTCMinutes());const c=u.pad2(r.getUTCSeconds());return`${n}-${i}-${s}T${o}:${a}:${c}Z`}t.timestamp=timestamp;function parseFile(e,t=false){try{c.default.accessSync(e,c.default.constants.R_OK)}catch(e){if(t){return null}throw new Error("Has no read permission to credentials file")}return a.parse(c.default.readFileSync(e,"utf-8"))}t.parseFile=parseFile;async function loadIni(e){await f(e,c.default.constants.R_OK);const t=await d(e,"utf-8");return a.parse(t)}t.loadIni=loadIni;function getRandomInt(e){return Math.floor(Math.random()*(e+1))}t.getRandomInt=getRandomInt},8414:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.InterceptorContextResponse=t.InterceptorContextConfiguration=t.InterceptorContextRequest=t.AttributeMap=t.InterceptorContext=void 0;const a=o(r(113));const u=s(r(4828));class InterceptorContext extends u.Model{constructor(e){super(e)}static names(){return{request:"request",configuration:"configuration",response:"response"}}static types(){return{request:InterceptorContextRequest,configuration:InterceptorContextConfiguration,response:InterceptorContextResponse}}}t.InterceptorContext=InterceptorContext;class AttributeMap extends u.Model{constructor(e){super(e)}static names(){return{attributes:"attributes",key:"key"}}static types(){return{attributes:{type:"map",keyType:"string",valueType:"any"},key:{type:"map",keyType:"string",valueType:"string"}}}}t.AttributeMap=AttributeMap;class InterceptorContextRequest extends u.Model{constructor(e){super(e)}static names(){return{headers:"headers",query:"query",body:"body",stream:"stream",hostMap:"hostMap",pathname:"pathname",productId:"productId",action:"action",version:"version",protocol:"protocol",method:"method",authType:"authType",bodyType:"bodyType",reqBodyType:"reqBodyType",style:"style",credential:"credential",signatureVersion:"signatureVersion",signatureAlgorithm:"signatureAlgorithm",userAgent:"userAgent"}}static types(){return{headers:{type:"map",keyType:"string",valueType:"string"},query:{type:"map",keyType:"string",valueType:"string"},body:"any",stream:"Readable",hostMap:{type:"map",keyType:"string",valueType:"string"},pathname:"string",productId:"string",action:"string",version:"string",protocol:"string",method:"string",authType:"string",bodyType:"string",reqBodyType:"string",style:"string",credential:a.default,signatureVersion:"string",signatureAlgorithm:"string",userAgent:"string"}}}t.InterceptorContextRequest=InterceptorContextRequest;class InterceptorContextConfiguration extends u.Model{constructor(e){super(e)}static names(){return{regionId:"regionId",endpoint:"endpoint",endpointRule:"endpointRule",endpointMap:"endpointMap",endpointType:"endpointType",network:"network",suffix:"suffix"}}static types(){return{regionId:"string",endpoint:"string",endpointRule:"string",endpointMap:{type:"map",keyType:"string",valueType:"string"},endpointType:"string",network:"string",suffix:"string"}}}t.InterceptorContextConfiguration=InterceptorContextConfiguration;class InterceptorContextResponse extends u.Model{constructor(e){super(e)}static names(){return{statusCode:"statusCode",headers:"headers",body:"body",deserializedBody:"deserializedBody"}}static types(){return{statusCode:"number",headers:{type:"map",keyType:"string",valueType:"string"},body:"Readable",deserializedBody:"any"}}}t.InterceptorContextResponse=InterceptorContextResponse;class Client{constructor(){}}t["default"]=Client},5462:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),s=0;s<r.length;s++)if(r[s]!=="default")n(t,e,r[s]);i(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Params=t.OpenApiRequest=t.Config=t.GlobalParameters=void 0;const a=o(r(9252));const u=s(r(113)),c=u;const l=o(r(6199));const d=s(r(8414));const f=o(r(1927));const h=s(r(4828));class GlobalParameters extends h.Model{static names(){return{headers:"headers",queries:"queries"}}static types(){return{headers:{type:"map",keyType:"string",valueType:"string"},queries:{type:"map",keyType:"string",valueType:"string"}}}constructor(e){super(e)}}t.GlobalParameters=GlobalParameters;class Config extends h.Model{static names(){return{accessKeyId:"accessKeyId",accessKeySecret:"accessKeySecret",securityToken:"securityToken",bearerToken:"bearerToken",protocol:"protocol",method:"method",regionId:"regionId",readTimeout:"readTimeout",connectTimeout:"connectTimeout",httpProxy:"httpProxy",httpsProxy:"httpsProxy",credential:"credential",endpoint:"endpoint",noProxy:"noProxy",maxIdleConns:"maxIdleConns",network:"network",userAgent:"userAgent",suffix:"suffix",socks5Proxy:"socks5Proxy",socks5NetWork:"socks5NetWork",endpointType:"endpointType",openPlatformEndpoint:"openPlatformEndpoint",type:"type",signatureVersion:"signatureVersion",signatureAlgorithm:"signatureAlgorithm",globalParameters:"globalParameters",key:"key",cert:"cert",ca:"ca",disableHttp2:"disableHttp2",tlsMinVersion:"tlsMinVersion"}}static types(){return{accessKeyId:"string",accessKeySecret:"string",securityToken:"string",bearerToken:"string",protocol:"string",method:"string",regionId:"string",readTimeout:"number",connectTimeout:"number",httpProxy:"string",httpsProxy:"string",credential:u.default,endpoint:"string",noProxy:"string",maxIdleConns:"number",network:"string",userAgent:"string",suffix:"string",socks5Proxy:"string",socks5NetWork:"string",endpointType:"string",openPlatformEndpoint:"string",type:"string",signatureVersion:"string",signatureAlgorithm:"string",globalParameters:GlobalParameters,key:"string",cert:"string",ca:"string",disableHttp2:"boolean",tlsMinVersion:"string"}}constructor(e){super(e)}}t.Config=Config;class OpenApiRequest extends h.Model{static names(){return{headers:"headers",query:"query",body:"body",stream:"stream",hostMap:"hostMap",endpointOverride:"endpointOverride"}}static types(){return{headers:{type:"map",keyType:"string",valueType:"string"},query:{type:"map",keyType:"string",valueType:"string"},body:"any",stream:"Readable",hostMap:{type:"map",keyType:"string",valueType:"string"},endpointOverride:"string"}}constructor(e){super(e)}}t.OpenApiRequest=OpenApiRequest;class Params extends h.Model{static names(){return{action:"action",version:"version",protocol:"protocol",pathname:"pathname",method:"method",authType:"authType",bodyType:"bodyType",reqBodyType:"reqBodyType",style:"style"}}static types(){return{action:"string",version:"string",protocol:"string",pathname:"string",method:"string",authType:"string",bodyType:"string",reqBodyType:"string",style:"string"}}constructor(e){super(e)}}t.Params=Params;class Client{constructor(e){if(a.default.isUnset(e)){throw h.newError({code:"ParameterMissing",message:"'config' can not be unset"})}if(!a.default.empty(e.accessKeyId)&&!a.default.empty(e.accessKeySecret)){if(!a.default.empty(e.securityToken)){e.type="sts"}else{e.type="access_key"}let t=new c.Config({accessKeyId:e.accessKeyId,type:e.type,accessKeySecret:e.accessKeySecret});t.securityToken=e.securityToken;this._credential=new u.default(t)}else if(!a.default.empty(e.bearerToken)){let t=new c.Config({type:"bearer",bearerToken:e.bearerToken});this._credential=new u.default(t)}else if(!a.default.isUnset(e.credential)){this._credential=e.credential}this._endpoint=e.endpoint;this._endpointType=e.endpointType;this._network=e.network;this._suffix=e.suffix;this._protocol=e.protocol;this._method=e.method;this._regionId=e.regionId;this._userAgent=e.userAgent;this._readTimeout=e.readTimeout;this._connectTimeout=e.connectTimeout;this._httpProxy=e.httpProxy;this._httpsProxy=e.httpsProxy;this._noProxy=e.noProxy;this._socks5Proxy=e.socks5Proxy;this._socks5NetWork=e.socks5NetWork;this._maxIdleConns=e.maxIdleConns;this._signatureVersion=e.signatureVersion;this._signatureAlgorithm=e.signatureAlgorithm;this._globalParameters=e.globalParameters;this._key=e.key;this._cert=e.cert;this._ca=e.ca;this._disableHttp2=e.disableHttp2;this._tlsMinVersion=e.tlsMinVersion}async doRPCRequest(e,t,r,n,i,s,o,u){let c={timeouted:"retry",key:a.default.defaultString(u.key,this._key),cert:a.default.defaultString(u.cert,this._cert),ca:a.default.defaultString(u.ca,this._ca),readTimeout:a.default.defaultNumber(u.readTimeout,this._readTimeout),connectTimeout:a.default.defaultNumber(u.connectTimeout,this._connectTimeout),httpProxy:a.default.defaultString(u.httpProxy,this._httpProxy),httpsProxy:a.default.defaultString(u.httpsProxy,this._httpsProxy),noProxy:a.default.defaultString(u.noProxy,this._noProxy),socks5Proxy:a.default.defaultString(u.socks5Proxy,this._socks5Proxy),socks5NetWork:a.default.defaultString(u.socks5NetWork,this._socks5NetWork),maxIdleConns:a.default.defaultNumber(u.maxIdleConns,this._maxIdleConns),retry:{retryable:u.autoretry,maxAttempts:a.default.defaultNumber(u.maxAttempts,3)},backoff:{policy:a.default.defaultString(u.backoffPolicy,"no"),period:a.default.defaultNumber(u.backoffPeriod,1)},ignoreSSL:u.ignoreSSL,tlsMinVersion:this._tlsMinVersion};let d=null;let f=Date.now();let p=0;while(h.allowRetry(c["retry"],p,f)){if(p>0){let e=h.getBackoffTime(c["backoff"],p);if(e>0){await h.sleep(e)}}p=p+1;try{let f=new h.Request;f.protocol=a.default.defaultString(this._protocol,r);f.method=n;f.pathname="/";let p={};let y={};if(!a.default.isUnset(this._globalParameters)){let e=this._globalParameters;if(!a.default.isUnset(e.queries)){p=e.queries}if(!a.default.isUnset(e.headers)){y=e.headers}}let m={};let g={};if(!a.default.isUnset(u.extendsParameters)){let e=u.extendsParameters;if(!a.default.isUnset(e.headers)){m=e.headers}if(!a.default.isUnset(e.queries)){g=e.queries}}f.query=Object.assign(Object.assign(Object.assign({Action:e,Format:"json",Version:t,Timestamp:l.default.getTimestamp(),SignatureNonce:a.default.getNonce()},p),g),o.query);let b=this.getRpcHeaders();if(a.default.isUnset(b)){f.headers=Object.assign(Object.assign(Object.assign({host:this._endpoint,"x-acs-version":t,"x-acs-action":e,"user-agent":this.getUserAgent()},y),m),o.headers)}else{f.headers=Object.assign(Object.assign(Object.assign(Object.assign({host:this._endpoint,"x-acs-version":t,"x-acs-action":e,"user-agent":this.getUserAgent()},y),m),o.headers),b)}if(!a.default.isUnset(o.body)){let e=a.default.assertAsMap(o.body);let t=a.default.anyifyMapValue(l.default.query(e));f.body=new h.BytesReadable(a.default.toFormString(t));f.headers["content-type"]="application/x-www-form-urlencoded"}if(!a.default.equalString(i,"Anonymous")){if(a.default.isUnset(this._credential)){throw h.newError({code:`InvalidCredentials`,message:`Please set up the credentials correctly. If you are setting them through environment variables, please ensure that ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set correctly. See https://help.aliyun.com/zh/sdk/developer-reference/configure-the-alibaba-cloud-accesskey-environment-variable-on-linux-macos-and-windows-systems for more details.`})}let e=await this._credential.getCredential();if(!a.default.empty(e.providerName)){f.headers["x-acs-credentials-provider"]=e.providerName}let t=e.type;if(a.default.equalString(t,"bearer")){let t=e.bearerToken;f.query["BearerToken"]=t;f.query["SignatureType"]="BEARERTOKEN"}else if(a.default.equalString(t,"id_token")){let t=e.securityToken;f.headers["x-acs-zero-trust-idtoken"]=t}else{let t=e.accessKeyId;let r=e.accessKeySecret;let n=e.securityToken;if(!a.default.empty(n)){f.query["SecurityToken"]=n}f.query["SignatureMethod"]="HMAC-SHA1";f.query["SignatureVersion"]="1.0";f.query["AccessKeyId"]=t;let i=null;if(!a.default.isUnset(o.body)){i=a.default.assertAsMap(o.body)}let s=Object.assign(Object.assign({},f.query),l.default.query(i));f.query["Signature"]=l.default.getRPCSignature(s,f.method,r)}}d=f;let w=await h.doAction(f,c);if(a.default.is4xx(w.statusCode)||a.default.is5xx(w.statusCode)){let e=await a.default.readAsJSON(w.body);let t=a.default.assertAsMap(e);let r=Client.defaultAny(t["RequestId"],t["requestId"]);t["statusCode"]=w.statusCode;throw h.newError({code:`${Client.defaultAny(t["Code"],t["code"])}`,message:`code: ${w.statusCode}, ${Client.defaultAny(t["Message"],t["message"])} request id: ${r}`,data:t,description:`${Client.defaultAny(t["Description"],t["description"])}`,accessDeniedDetail:Client.defaultAny(t["AccessDeniedDetail"],t["accessDeniedDetail"])})}if(a.default.equalString(s,"binary")){let e={body:w.body,headers:w.headers,statusCode:w.statusCode};return e}else if(a.default.equalString(s,"byte")){let e=await a.default.readAsBytes(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(s,"string")){let e=await a.default.readAsString(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(s,"json")){let e=await a.default.readAsJSON(w.body);let t=a.default.assertAsMap(e);return{body:t,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(s,"array")){let e=await a.default.readAsJSON(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else{return{headers:w.headers,statusCode:w.statusCode}}}catch(e){if(h.isRetryable(e)){continue}throw e}}throw h.newUnretryableError(d)}async doROARequest(e,t,r,n,i,s,o,u,c){let d={timeouted:"retry",key:a.default.defaultString(c.key,this._key),cert:a.default.defaultString(c.cert,this._cert),ca:a.default.defaultString(c.ca,this._ca),readTimeout:a.default.defaultNumber(c.readTimeout,this._readTimeout),connectTimeout:a.default.defaultNumber(c.connectTimeout,this._connectTimeout),httpProxy:a.default.defaultString(c.httpProxy,this._httpProxy),httpsProxy:a.default.defaultString(c.httpsProxy,this._httpsProxy),noProxy:a.default.defaultString(c.noProxy,this._noProxy),socks5Proxy:a.default.defaultString(c.socks5Proxy,this._socks5Proxy),socks5NetWork:a.default.defaultString(c.socks5NetWork,this._socks5NetWork),maxIdleConns:a.default.defaultNumber(c.maxIdleConns,this._maxIdleConns),retry:{retryable:c.autoretry,maxAttempts:a.default.defaultNumber(c.maxAttempts,3)},backoff:{policy:a.default.defaultString(c.backoffPolicy,"no"),period:a.default.defaultNumber(c.backoffPeriod,1)},ignoreSSL:c.ignoreSSL,tlsMinVersion:this._tlsMinVersion};let f=null;let p=Date.now();let y=0;while(h.allowRetry(d["retry"],y,p)){if(y>0){let e=h.getBackoffTime(d["backoff"],y);if(e>0){await h.sleep(e)}}y=y+1;try{let p=new h.Request;p.protocol=a.default.defaultString(this._protocol,r);p.method=n;p.pathname=s;let y={};let m={};if(!a.default.isUnset(this._globalParameters)){let e=this._globalParameters;if(!a.default.isUnset(e.queries)){y=e.queries}if(!a.default.isUnset(e.headers)){m=e.headers}}let g={};let b={};if(!a.default.isUnset(c.extendsParameters)){let e=c.extendsParameters;if(!a.default.isUnset(e.headers)){g=e.headers}if(!a.default.isUnset(e.queries)){b=e.queries}}p.headers=Object.assign(Object.assign(Object.assign({date:a.default.getDateUTCString(),host:this._endpoint,accept:"application/json","x-acs-signature-nonce":a.default.getNonce(),"x-acs-signature-method":"HMAC-SHA1","x-acs-signature-version":"1.0","x-acs-version":t,"x-acs-action":e,"user-agent":a.default.getUserAgent(this._userAgent)},m),g),u.headers);if(!a.default.isUnset(u.body)){p.body=new h.BytesReadable(a.default.toJSONString(u.body));p.headers["content-type"]="application/json; charset=utf-8"}p.query=Object.assign(Object.assign({},y),b);if(!a.default.isUnset(u.query)){p.query=Object.assign(Object.assign({},p.query),u.query)}if(!a.default.equalString(i,"Anonymous")){if(a.default.isUnset(this._credential)){throw h.newError({code:`InvalidCredentials`,message:`Please set up the credentials correctly. If you are setting them through environment variables, please ensure that ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set correctly. See https://help.aliyun.com/zh/sdk/developer-reference/configure-the-alibaba-cloud-accesskey-environment-variable-on-linux-macos-and-windows-systems for more details.`})}let e=await this._credential.getCredential();if(!a.default.empty(e.providerName)){p.headers["x-acs-credentials-provider"]=e.providerName}let t=e.type;if(a.default.equalString(t,"bearer")){let t=e.bearerToken;p.headers["x-acs-bearer-token"]=t;p.headers["x-acs-signature-type"]="BEARERTOKEN"}else if(a.default.equalString(t,"id_token")){let t=e.securityToken;p.headers["x-acs-zero-trust-idtoken"]=t}else{let t=e.accessKeyId;let r=e.accessKeySecret;let n=e.securityToken;if(!a.default.empty(n)){p.headers["x-acs-accesskey-id"]=t;p.headers["x-acs-security-token"]=n}let i=l.default.getStringToSign(p);p.headers["authorization"]=`acs ${t}:${l.default.getROASignature(i,r)}`}}f=p;let w=await h.doAction(p,d);if(a.default.equalNumber(w.statusCode,204)){return{headers:w.headers}}if(a.default.is4xx(w.statusCode)||a.default.is5xx(w.statusCode)){let e=await a.default.readAsJSON(w.body);let t=a.default.assertAsMap(e);let r=Client.defaultAny(t["RequestId"],t["requestId"]);r=Client.defaultAny(r,t["requestid"]);t["statusCode"]=w.statusCode;throw h.newError({code:`${Client.defaultAny(t["Code"],t["code"])}`,message:`code: ${w.statusCode}, ${Client.defaultAny(t["Message"],t["message"])} request id: ${r}`,data:t,description:`${Client.defaultAny(t["Description"],t["description"])}`,accessDeniedDetail:Client.defaultAny(t["AccessDeniedDetail"],t["accessDeniedDetail"])})}if(a.default.equalString(o,"binary")){let e={body:w.body,headers:w.headers,statusCode:w.statusCode};return e}else if(a.default.equalString(o,"byte")){let e=await a.default.readAsBytes(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(o,"string")){let e=await a.default.readAsString(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(o,"json")){let e=await a.default.readAsJSON(w.body);let t=a.default.assertAsMap(e);return{body:t,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(o,"array")){let e=await a.default.readAsJSON(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else{return{headers:w.headers,statusCode:w.statusCode}}}catch(e){if(h.isRetryable(e)){continue}throw e}}throw h.newUnretryableError(f)}async doROARequestWithForm(e,t,r,n,i,s,o,u,c){let d={timeouted:"retry",key:a.default.defaultString(c.key,this._key),cert:a.default.defaultString(c.cert,this._cert),ca:a.default.defaultString(c.ca,this._ca),readTimeout:a.default.defaultNumber(c.readTimeout,this._readTimeout),connectTimeout:a.default.defaultNumber(c.connectTimeout,this._connectTimeout),httpProxy:a.default.defaultString(c.httpProxy,this._httpProxy),httpsProxy:a.default.defaultString(c.httpsProxy,this._httpsProxy),noProxy:a.default.defaultString(c.noProxy,this._noProxy),socks5Proxy:a.default.defaultString(c.socks5Proxy,this._socks5Proxy),socks5NetWork:a.default.defaultString(c.socks5NetWork,this._socks5NetWork),maxIdleConns:a.default.defaultNumber(c.maxIdleConns,this._maxIdleConns),retry:{retryable:c.autoretry,maxAttempts:a.default.defaultNumber(c.maxAttempts,3)},backoff:{policy:a.default.defaultString(c.backoffPolicy,"no"),period:a.default.defaultNumber(c.backoffPeriod,1)},ignoreSSL:c.ignoreSSL,tlsMinVersion:this._tlsMinVersion};let f=null;let p=Date.now();let y=0;while(h.allowRetry(d["retry"],y,p)){if(y>0){let e=h.getBackoffTime(d["backoff"],y);if(e>0){await h.sleep(e)}}y=y+1;try{let p=new h.Request;p.protocol=a.default.defaultString(this._protocol,r);p.method=n;p.pathname=s;let y={};let m={};if(!a.default.isUnset(this._globalParameters)){let e=this._globalParameters;if(!a.default.isUnset(e.queries)){y=e.queries}if(!a.default.isUnset(e.headers)){m=e.headers}}let g={};let b={};if(!a.default.isUnset(c.extendsParameters)){let e=c.extendsParameters;if(!a.default.isUnset(e.headers)){g=e.headers}if(!a.default.isUnset(e.queries)){b=e.queries}}p.headers=Object.assign(Object.assign(Object.assign({date:a.default.getDateUTCString(),host:this._endpoint,accept:"application/json","x-acs-signature-nonce":a.default.getNonce(),"x-acs-signature-method":"HMAC-SHA1","x-acs-signature-version":"1.0","x-acs-version":t,"x-acs-action":e,"user-agent":a.default.getUserAgent(this._userAgent)},m),g),u.headers);if(!a.default.isUnset(u.body)){let e=a.default.assertAsMap(u.body);p.body=new h.BytesReadable(l.default.toForm(e));p.headers["content-type"]="application/x-www-form-urlencoded"}p.query=Object.assign(Object.assign({},y),b);if(!a.default.isUnset(u.query)){p.query=Object.assign(Object.assign({},p.query),u.query)}if(!a.default.equalString(i,"Anonymous")){if(a.default.isUnset(this._credential)){throw h.newError({code:`InvalidCredentials`,message:`Please set up the credentials correctly. If you are setting them through environment variables, please ensure that ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set correctly. See https://help.aliyun.com/zh/sdk/developer-reference/configure-the-alibaba-cloud-accesskey-environment-variable-on-linux-macos-and-windows-systems for more details.`})}let e=await this._credential.getCredential();if(!a.default.empty(e.providerName)){p.headers["x-acs-credentials-provider"]=e.providerName}let t=e.type;if(a.default.equalString(t,"bearer")){let t=e.bearerToken;p.headers["x-acs-bearer-token"]=t;p.headers["x-acs-signature-type"]="BEARERTOKEN"}else if(a.default.equalString(t,"id_token")){let t=e.securityToken;p.headers["x-acs-zero-trust-idtoken"]=t}else{let t=e.accessKeyId;let r=e.accessKeySecret;let n=e.securityToken;if(!a.default.empty(n)){p.headers["x-acs-accesskey-id"]=t;p.headers["x-acs-security-token"]=n}let i=l.default.getStringToSign(p);p.headers["authorization"]=`acs ${t}:${l.default.getROASignature(i,r)}`}}f=p;let w=await h.doAction(p,d);if(a.default.equalNumber(w.statusCode,204)){return{headers:w.headers}}if(a.default.is4xx(w.statusCode)||a.default.is5xx(w.statusCode)){let e=await a.default.readAsJSON(w.body);let t=a.default.assertAsMap(e);t["statusCode"]=w.statusCode;throw h.newError({code:`${Client.defaultAny(t["Code"],t["code"])}`,message:`code: ${w.statusCode}, ${Client.defaultAny(t["Message"],t["message"])} request id: ${Client.defaultAny(t["RequestId"],t["requestId"])}`,data:t,description:`${Client.defaultAny(t["Description"],t["description"])}`,accessDeniedDetail:Client.defaultAny(t["AccessDeniedDetail"],t["accessDeniedDetail"])})}if(a.default.equalString(o,"binary")){let e={body:w.body,headers:w.headers,statusCode:w.statusCode};return e}else if(a.default.equalString(o,"byte")){let e=await a.default.readAsBytes(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(o,"string")){let e=await a.default.readAsString(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(o,"json")){let e=await a.default.readAsJSON(w.body);let t=a.default.assertAsMap(e);return{body:t,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(o,"array")){let e=await a.default.readAsJSON(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else{return{headers:w.headers,statusCode:w.statusCode}}}catch(e){if(h.isRetryable(e)){continue}throw e}}throw h.newUnretryableError(f)}async doRequest(e,t,r){let n={timeouted:"retry",key:a.default.defaultString(r.key,this._key),cert:a.default.defaultString(r.cert,this._cert),ca:a.default.defaultString(r.ca,this._ca),readTimeout:a.default.defaultNumber(r.readTimeout,this._readTimeout),connectTimeout:a.default.defaultNumber(r.connectTimeout,this._connectTimeout),httpProxy:a.default.defaultString(r.httpProxy,this._httpProxy),httpsProxy:a.default.defaultString(r.httpsProxy,this._httpsProxy),noProxy:a.default.defaultString(r.noProxy,this._noProxy),socks5Proxy:a.default.defaultString(r.socks5Proxy,this._socks5Proxy),socks5NetWork:a.default.defaultString(r.socks5NetWork,this._socks5NetWork),maxIdleConns:a.default.defaultNumber(r.maxIdleConns,this._maxIdleConns),retry:{retryable:r.autoretry,maxAttempts:a.default.defaultNumber(r.maxAttempts,3)},backoff:{policy:a.default.defaultString(r.backoffPolicy,"no"),period:a.default.defaultNumber(r.backoffPeriod,1)},ignoreSSL:r.ignoreSSL,tlsMinVersion:this._tlsMinVersion};let i=null;let s=Date.now();let o=0;while(h.allowRetry(n["retry"],o,s)){if(o>0){let e=h.getBackoffTime(n["backoff"],o);if(e>0){await h.sleep(e)}}o=o+1;try{let s=new h.Request;s.protocol=a.default.defaultString(this._protocol,e.protocol);s.method=e.method;s.pathname=e.pathname;let o={};let u={};if(!a.default.isUnset(this._globalParameters)){let e=this._globalParameters;if(!a.default.isUnset(e.queries)){o=e.queries}if(!a.default.isUnset(e.headers)){u=e.headers}}let c={};let d={};if(!a.default.isUnset(r.extendsParameters)){let e=r.extendsParameters;if(!a.default.isUnset(e.headers)){c=e.headers}if(!a.default.isUnset(e.queries)){d=e.queries}}s.query=Object.assign(Object.assign(Object.assign({},o),d),t.query);s.headers=Object.assign(Object.assign(Object.assign({host:this._endpoint,"x-acs-version":e.version,"x-acs-action":e.action,"user-agent":this.getUserAgent(),"x-acs-date":l.default.getTimestamp(),"x-acs-signature-nonce":a.default.getNonce(),accept:"application/json"},u),c),t.headers);if(a.default.equalString(e.style,"RPC")){let e=this.getRpcHeaders();if(!a.default.isUnset(e)){s.headers=Object.assign(Object.assign({},s.headers),e)}}let p=a.default.defaultString(this._signatureAlgorithm,"ACS3-HMAC-SHA256");let y=l.default.hexEncode(l.default.hash(a.default.toBytes(""),p));if(!a.default.isUnset(t.stream)){let e=await a.default.readAsBytes(t.stream);y=l.default.hexEncode(l.default.hash(e,p));s.body=new h.BytesReadable(e);s.headers["content-type"]="application/octet-stream"}else{if(!a.default.isUnset(t.body)){if(a.default.equalString(e.reqBodyType,"byte")){let e=a.default.assertAsBytes(t.body);y=l.default.hexEncode(l.default.hash(e,p));s.body=new h.BytesReadable(e)}else if(a.default.equalString(e.reqBodyType,"json")){let e=a.default.toJSONString(t.body);y=l.default.hexEncode(l.default.hash(a.default.toBytes(e),p));s.body=new h.BytesReadable(e);s.headers["content-type"]="application/json; charset=utf-8"}else{let e=a.default.assertAsMap(t.body);let r=l.default.toForm(e);y=l.default.hexEncode(l.default.hash(a.default.toBytes(r),p));s.body=new h.BytesReadable(r);s.headers["content-type"]="application/x-www-form-urlencoded"}}}s.headers["x-acs-content-sha256"]=y;if(!a.default.equalString(e.authType,"Anonymous")){if(a.default.isUnset(this._credential)){throw h.newError({code:`InvalidCredentials`,message:`Please set up the credentials correctly. If you are setting them through environment variables, please ensure that ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set correctly. See https://help.aliyun.com/zh/sdk/developer-reference/configure-the-alibaba-cloud-accesskey-environment-variable-on-linux-macos-and-windows-systems for more details.`})}let t=await this._credential.getCredential();if(!a.default.empty(t.providerName)){s.headers["x-acs-credentials-provider"]=t.providerName}let r=t.type;if(a.default.equalString(r,"bearer")){let r=t.bearerToken;s.headers["x-acs-bearer-token"]=r;if(a.default.equalString(e.style,"RPC")){s.query["SignatureType"]="BEARERTOKEN"}else{s.headers["x-acs-signature-type"]="BEARERTOKEN"}}else if(a.default.equalString(r,"id_token")){let e=t.securityToken;s.headers["x-acs-zero-trust-idtoken"]=e}else{let e=t.accessKeyId;let r=t.accessKeySecret;let n=t.securityToken;if(!a.default.empty(n)){s.headers["x-acs-accesskey-id"]=e;s.headers["x-acs-security-token"]=n}s.headers["Authorization"]=l.default.getAuthorization(s,p,y,e,r)}}i=s;let m=await h.doAction(s,n);if(a.default.is4xx(m.statusCode)||a.default.is5xx(m.statusCode)){let e={};if(!a.default.isUnset(m.headers["content-type"])&&a.default.equalString(m.headers["content-type"],"text/xml;charset=utf-8")){let t=await a.default.readAsString(m.body);let r=f.default.parseXml(t,null);e=a.default.assertAsMap(r["Error"])}else{let t=await a.default.readAsJSON(m.body);e=a.default.assertAsMap(t)}e["statusCode"]=m.statusCode;throw h.newError({code:`${Client.defaultAny(e["Code"],e["code"])}`,message:`code: ${m.statusCode}, ${Client.defaultAny(e["Message"],e["message"])} request id: ${Client.defaultAny(e["RequestId"],e["requestId"])}`,data:e,description:`${Client.defaultAny(e["Description"],e["description"])}`,accessDeniedDetail:Client.defaultAny(e["AccessDeniedDetail"],e["accessDeniedDetail"])})}if(a.default.equalString(e.bodyType,"binary")){let e={body:m.body,headers:m.headers,statusCode:m.statusCode};return e}else if(a.default.equalString(e.bodyType,"byte")){let e=await a.default.readAsBytes(m.body);return{body:e,headers:m.headers,statusCode:m.statusCode}}else if(a.default.equalString(e.bodyType,"string")){let e=await a.default.readAsString(m.body);return{body:e,headers:m.headers,statusCode:m.statusCode}}else if(a.default.equalString(e.bodyType,"json")){let e=await a.default.readAsJSON(m.body);let t=a.default.assertAsMap(e);return{body:t,headers:m.headers,statusCode:m.statusCode}}else if(a.default.equalString(e.bodyType,"array")){let e=await a.default.readAsJSON(m.body);return{body:e,headers:m.headers,statusCode:m.statusCode}}else{let e=await a.default.readAsString(m.body);return{body:e,headers:m.headers,statusCode:m.statusCode}}}catch(e){if(h.isRetryable(e)){continue}throw e}}throw h.newUnretryableError(i)}async execute(e,t,r){let n={timeouted:"retry",key:a.default.defaultString(r.key,this._key),cert:a.default.defaultString(r.cert,this._cert),ca:a.default.defaultString(r.ca,this._ca),readTimeout:a.default.defaultNumber(r.readTimeout,this._readTimeout),connectTimeout:a.default.defaultNumber(r.connectTimeout,this._connectTimeout),httpProxy:a.default.defaultString(r.httpProxy,this._httpProxy),httpsProxy:a.default.defaultString(r.httpsProxy,this._httpsProxy),noProxy:a.default.defaultString(r.noProxy,this._noProxy),socks5Proxy:a.default.defaultString(r.socks5Proxy,this._socks5Proxy),socks5NetWork:a.default.defaultString(r.socks5NetWork,this._socks5NetWork),maxIdleConns:a.default.defaultNumber(r.maxIdleConns,this._maxIdleConns),retry:{retryable:r.autoretry,maxAttempts:a.default.defaultNumber(r.maxAttempts,3)},backoff:{policy:a.default.defaultString(r.backoffPolicy,"no"),period:a.default.defaultNumber(r.backoffPeriod,1)},ignoreSSL:r.ignoreSSL,disableHttp2:Client.defaultAny(this._disableHttp2,false),tlsMinVersion:this._tlsMinVersion};let i=null;let s=Date.now();let o=0;while(h.allowRetry(n["retry"],o,s)){if(o>0){let e=h.getBackoffTime(n["backoff"],o);if(e>0){await h.sleep(e)}}o=o+1;try{let s=new h.Request;let o=this.getRpcHeaders();let u={};let c={};if(!a.default.isUnset(this._globalParameters)){let e=this._globalParameters;if(!a.default.isUnset(e.queries)){u=e.queries}if(!a.default.isUnset(e.headers)){c=e.headers}}let l={};let f={};if(!a.default.isUnset(r.extendsParameters)){let e=r.extendsParameters;if(!a.default.isUnset(e.headers)){l=e.headers}if(!a.default.isUnset(e.queries)){f=e.queries}}let p=new d.InterceptorContextRequest({headers:Object.assign(Object.assign(Object.assign(Object.assign({},c),l),t.headers),o),query:Object.assign(Object.assign(Object.assign({},u),f),t.query),body:t.body,stream:t.stream,hostMap:t.hostMap,pathname:e.pathname,productId:this._productId,action:e.action,version:e.version,protocol:a.default.defaultString(this._protocol,e.protocol),method:a.default.defaultString(this._method,e.method),authType:e.authType,bodyType:e.bodyType,reqBodyType:e.reqBodyType,style:e.style,credential:this._credential,signatureVersion:this._signatureVersion,signatureAlgorithm:this._signatureAlgorithm,userAgent:this.getUserAgent()});let y=new d.InterceptorContextConfiguration({regionId:this._regionId,endpoint:a.default.defaultString(t.endpointOverride,this._endpoint),endpointRule:this._endpointRule,endpointMap:this._endpointMap,endpointType:this._endpointType,network:this._network,suffix:this._suffix});let m=new d.InterceptorContext({});m.request=p;m.configuration=y;let g=new d.AttributeMap({});if(!a.default.isUnset(this._attributeMap)){g=this._attributeMap}await this._spi.modifyConfiguration(m,g);await this._spi.modifyRequest(m,g);s.protocol=m.request.protocol;s.method=m.request.method;s.pathname=m.request.pathname;s.query=m.request.query;s.body=m.request.stream;s.headers=m.request.headers;i=s;let b=await h.doAction(s,n);let w=new d.InterceptorContextResponse({statusCode:b.statusCode,headers:b.headers,body:b.body});m.response=w;await this._spi.modifyResponse(m,g);return{headers:m.response.headers,statusCode:m.response.statusCode,body:m.response.deserializedBody}}catch(e){if(h.isRetryable(e)){continue}throw e}}throw h.newUnretryableError(i)}async callApi(e,t,r){if(a.default.isUnset(e)){throw h.newError({code:"ParameterMissing",message:"'params' can not be unset"})}if(a.default.isUnset(this._signatureVersion)||!a.default.equalString(this._signatureVersion,"v4")){if(a.default.isUnset(this._signatureAlgorithm)||!a.default.equalString(this._signatureAlgorithm,"v2")){return await this.doRequest(e,t,r)}else if(a.default.equalString(e.style,"ROA")&&a.default.equalString(e.reqBodyType,"json")){return await this.doROARequest(e.action,e.version,e.protocol,e.method,e.authType,e.pathname,e.bodyType,t,r)}else if(a.default.equalString(e.style,"ROA")){return await this.doROARequestWithForm(e.action,e.version,e.protocol,e.method,e.authType,e.pathname,e.bodyType,t,r)}else{return await this.doRPCRequest(e.action,e.version,e.protocol,e.method,e.authType,e.bodyType,t,r)}}else{return await this.execute(e,t,r)}}getUserAgent(){let e=a.default.getUserAgent(this._userAgent);return e}async getAccessKeyId(){if(a.default.isUnset(this._credential)){return""}let e=await this._credential.getAccessKeyId();return e}async getAccessKeySecret(){if(a.default.isUnset(this._credential)){return""}let e=await this._credential.getAccessKeySecret();return e}async getSecurityToken(){if(a.default.isUnset(this._credential)){return""}let e=await this._credential.getSecurityToken();return e}async getBearerToken(){if(a.default.isUnset(this._credential)){return""}let e=this._credential.getBearerToken();return e}async getType(){if(a.default.isUnset(this._credential)){return""}let e=this._credential.getType();return e}static defaultAny(e,t){if(a.default.isUnset(e)){return t}return e}checkConfig(e){if(a.default.empty(this._endpointRule)&&a.default.empty(e.endpoint)){throw h.newError({code:"ParameterMissing",message:"'config.endpoint' can not be empty"})}}setGatewayClient(e){this._spi=e}setRpcHeaders(e){this._headers=e}getRpcHeaders(){let e=this._headers;this._headers=null;return e}}t["default"]=Client},6199:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=s(r(4828));const u=o(r(9252));const c=o(r(1406));const l=o(r(3480));const d=o(r(6982));const f="-----BEGIN PRIVATE KEY-----\n";const h="\n-----END PRIVATE KEY-----";function replaceRepeatList(e,t,r){if(r){r=r+"."}for(var n=0;n<t.length;n++){var i=t[n];let s=r+(n+1);if(typeof i==="undefined"||i==null){continue}if(Array.isArray(i)){replaceRepeatList(e,i,s)}else if(i instanceof Object){flatMap(e,i,s)}else{e[s]=i.toString()}}}function flatMap(e,t,r=""){if(r){r=r+"."}t=toMap(t);let n=Object.keys(t);for(let i=0;i<n.length;i++){let s=n[i];let o=t[s];s=r+s;if(typeof o==="undefined"||o==null){continue}if(Array.isArray(o)){replaceRepeatList(e,o,s)}else if(o instanceof Object){flatMap(e,o,s)}else{e[s]=o.toString()}}return e}function filter(e){return e.replace(/[\t\n\r\f]/g," ")}function getCanonicalizedHeaders(e){const t="x-acs-";const r=Object.keys(e);const n=[];for(let e=0;e<r.length;e++){const i=r[e];if(i.startsWith(t)){n.push(i)}}n.sort();var i="";for(let t=0;t<n.length;t++){const r=n[t];i+=`${r}:${filter(e[r]).trim()}\n`}return i}function getCanonicalizedResource(e,t){const r=!t?[]:Object.keys(t).sort();if(r.length===0){return e}var n=[];for(var i=0;i<r.length;i++){const e=r[i];n.push(`${e}=${t[e]}`)}return`${e}?${n.join("&")}`}function getAuthorizationQueryString(e){let t=[];const r=!e?[]:Object.keys(e).sort();for(let n=0;n<r.length;n++){const i=r[n];let s=i+"=";if(typeof e[i]!=="undefined"&&e[i]!==null){s=s+encode(e[i])}t.push(s)}return t.join("&")}function getAuthorizationHeaders(e){let t="";let r={};const n=!e?[]:Object.keys(e);for(let t=0;t<n.length;t++){const i=n[t];const s=n[t].toLowerCase();if(s.startsWith("x-acs-")||s==="host"||s==="content-type"){if(r[s]){r[s].push((e[i]||"").trim())}else{r[s]=[(e[i]||"").trim()]}}}var i=Object.keys(r).sort();for(let e=0;e<i.length;e++){const n=i[e];let s=r[n].sort();t+=`${n}:${s.join(",")}\n`}return{canonicalheaders:t,hsKeys:i}}function encode(e){var t=encodeURIComponent(e);return t.replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function normalize(e){var t=[];var r={};flatMap(r,e);var n=Object.keys(r).sort();for(let e=0;e<n.length;e++){var i=n[e];var s=r[i];t.push([encode(i),encode(s)])}return t}function canonicalize(e){var t=[];for(var r=0;r<e.length;r++){var[n,i]=e[r];t.push(n+"="+i)}return t.join("&")}function isModelClass(e){if(!e){return false}return typeof e.types==="function"&&typeof e.names==="function"}function isObjectOrArray(e){return Array.isArray(e)||e instanceof Object&&typeof e!=="function"}function toMap(e){if(!isObjectOrArray(e)){return null}else if(e instanceof a.Model){return a.toMap(e)}else if(e&&e.toMap&&typeof e.toMap==="function"){return e.toMap()}else if(Array.isArray(e)){const t=[];e.forEach((e=>{if(isObjectOrArray(e)){t.push(toMap(e))}else{t.push(e)}}));return t}else if(e instanceof Object){const t={};Object.entries(e).forEach((([e,r])=>{if(isObjectOrArray(r)){t[e]=toMap(r)}else{t[e]=r}}));return t}}class Client{static convert(e,t){if(!t){return}let r=Object.assign({},e);let n=t.constructor;let i=n.types();for(let e of Object.keys(n.names())){if(r[e]!==null&&r[e]!==undefined){if(isModelClass(i[e])){t[e]=new i[e](t[e]);Client.convert(r[e],t[e])}else if(i[e]&&i[e].type==="array"){t[e]=r[e].map((function(t){if(isModelClass(i[e].itemType)){var r=new i[e].itemType({});Client.convert(t,r);return r}return t}))}else if(i[e]&&i[e].type==="map"){t[e]={};Object.keys(r[e]).map((function(n){if(isModelClass(i[e].valueType)){var s=new i[e].valueType({});Client.convert(r[e][n],s);t[e][n]=s}else{t[e][n]=r[e][n]}}))}else{t[e]=r[e]}}}}static getStringToSign(e){const t=e.method;const r=e.headers["accept"];const n=e.headers["content-md5"]||"";const i=e.headers["content-type"]||"";const s=e.headers["date"]||"";const o=`${t}\n${r}\n${n}\n${i}\n${s}\n`;const a=getCanonicalizedHeaders(e.headers);const u=getCanonicalizedResource(e.pathname,e.query);return`${o}${a}${u}`}static getROASignature(e,t){const r=Buffer.from(e,"utf8");return c.default.sha1(r,t,"base64")}static toForm(e){if(!e){return""}let t={};flatMap(t,e);return u.default.toFormString(t)}static getTimestamp(){let e=new Date;let t=e.getUTCFullYear();let r=c.default.pad2(e.getUTCMonth()+1);let n=c.default.pad2(e.getUTCDate());let i=c.default.pad2(e.getUTCHours());let s=c.default.pad2(e.getUTCMinutes());let o=c.default.pad2(e.getUTCSeconds());return`${t}-${r}-${n}T${i}:${s}:${o}Z`}static query(e){if(!e){return{}}let t={};flatMap(t,e);return t}static getRPCSignature(e,t,r){var n=normalize(e);var i=canonicalize(n);var s=`${t}&${encode("/")}&${encode(i)}`;const o=r+"&";return c.default.sha1(s,o,"base64")}static arrayToStringWithSpecifiedStyle(e,t,r){if(!e){return""}if(r==="repeatList"){let r={};replaceRepeatList(r,e,t);return l.default.stringify(r,"&&")}else if(r==="json"){return JSON.stringify(toMap(e))}else if(r==="simple"){return e.join(",")}else if(r==="spaceDelimited"){return e.join(" ")}else if(r==="pipeDelimited"){return e.join("|")}else{return""}}static parseToMap(e){return toMap(e)}static getEndpoint(e,t,r){if(r=="internal"){let t=e.split(".");t[0]+="-internal";e=t.join(".")}if(t&&r=="accelerate"){return"oss-accelerate.aliyuncs.com"}return e}static hexEncode(e){return e.toString("hex")}static hash(e,t){if(t==="ACS3-HMAC-SHA256"||t==="ACS3-RSA-SHA256"){const t=d.default.createHash("sha256");t.update(e);return t.digest()}else if(t=="ACS3-HMAC-SM3"){const t=d.default.createHash("sm3");t.update(e);return t.digest()}}static signatureMethod(e,t,r){if(r==="ACS3-HMAC-SHA256"){const r=d.default.createHmac("sha256",e);r.update(t);return r.digest()}else if(r==="ACS3-HMAC-SM3"){const r=d.default.createHmac("sm3",e);r.update(t);return r.digest()}else if(r==="ACS3-RSA-SHA256"){if(!e.startsWith(f)){e=f+e}if(!e.endsWith(h)){e=e+h}var n=d.default.createSign("RSA-SHA256");n.update(t);var i=n.sign({key:e,padding:d.default.constants.RSA_PKCS1_PADDING});return i}}static getAuthorization(e,t,r,n,i){const s=(e.pathname||"").replace("+","%20").replace("*","%2A").replace("%7E","~");const o=e.method;const a=getAuthorizationQueryString(e.query);const u=getAuthorizationHeaders(e.headers);const c=u["canonicalheaders"];const l=u["hsKeys"];const d=o+"\n"+s+"\n"+a+"\n"+c+"\n"+l.join(";")+"\n"+r;let f=Buffer.from(d);const h=t+"\n"+Client.hexEncode(Client.hash(f,t));const p=Client.hexEncode(Client.signatureMethod(i,h,t));const y=`${t} Credential=${n},SignedHeaders=${l.join(";")},Signature=${p}`;return y}static getEncodePath(e){if(typeof e==="undefined"||e===null){return""}let t=e.split("/");for(let e=0;e<t.length;e++){t[e]=encode(t[e])}return t.join("/")}static getEncodeParam(e){if(typeof e==="undefined"||e===null){return""}return encode(e)}}t["default"]=Client},4828:function(e,t,r){"use strict";var n=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(t.hasOwnProperty(r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();var i=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var u=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function verb(e){return function(t){return step([e,t])}}function step(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(s=o[0]&2?i["return"]:o[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;if(i=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;i=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){r.label=o[1];break}if(o[0]===6&&r.label<s[1]){r.label=s[1];s=o;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(o);break}if(s[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];i=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.isRetryable=t.retryError=t.newUnretryableError=t.getBackoffTime=t.allowRetry=t.sleep=t.cast=t.Model=t.toMap=t.newError=t.doAction=t.Response=t.Request=t.BytesReadable=void 0;var c=o(r(3480));var l=r(8611);var d=r(5692);var f=r(2203);var h=o(r(3312));var p=r(7016);var y=function(e){n(BytesReadable,e);function BytesReadable(t){var r=e.call(this)||this;if(typeof t==="string"){r.value=Buffer.from(t)}else if(Buffer.isBuffer(t)){r.value=t}return r}BytesReadable.prototype._read=function(){this.push(this.value);this.push(null)};return BytesReadable}(f.Readable);t.BytesReadable=y;var m=function(){function Request(){this.headers={};this.query={}}return Request}();t.Request=m;var g=function(){function Response(e){this.statusCode=e.statusCode;this.statusMessage=e.statusMessage;this.headers=this.convertHeaders(e.headers);this.body=e}Response.prototype.convertHeaders=function(e){var t={};var r=Object.keys(e);for(var n=0;n<r.length;n++){var i=r[n];t[i]=e[i]}return t};Response.prototype.readBytes=function(){return a(this,void 0,void 0,(function(){var e;return u(this,(function(t){switch(t.label){case 0:return[4,h.read(this.body,"")];case 1:e=t.sent();return[2,e]}}))}))};return Response}();t.Response=g;function buildURL(e){var t=e.protocol+"://"+e.headers["host"];if(e.port){t+=":"+e.port}t+=""+e.pathname;var r=p.parse(t);if(e.query&&Object.keys(e.query).length>0){if(r.query){t+="&"+c.stringify(e.query)}else{t+="?"+c.stringify(e.query)}}return t}function isModelClass(e){if(!e){return false}return typeof e.types==="function"&&typeof e.names==="function"}function doAction(e,t){if(t===void 0){t=null}return a(this,void 0,void 0,(function(){var r,n,i,s,o;return u(this,(function(a){switch(a.label){case 0:r=buildURL(e);n=(e.method||"GET").toUpperCase();i={method:n,headers:e.headers};if(n!=="GET"&&n!=="HEAD"){i.data=e.body}if(t){if(typeof t.timeout!=="undefined"){i.timeout=Number(t.timeout)}if(typeof t.readTimeout!=="undefined"){i.readTimeout=Number(t.readTimeout)}if(typeof t.connectTimeout!=="undefined"){i.connectTimeout=Number(t.connectTimeout)}if(typeof t.ignoreSSL!=="undefined"){i.rejectUnauthorized=!t.ignoreSSL}if(typeof t.key!=="undefined"){i.key=String(t.key)}if(typeof t.cert!=="undefined"){i.cert=String(t.cert)}if(typeof t.ca!=="undefined"){i.ca=String(t.ca)}s={keepAlive:true};if(typeof t.keepAlive!=="undefined"){s.keepAlive=t.keepAlive;if(e.protocol&&e.protocol.toLowerCase()==="https"){i.agent=new d.Agent(s)}else{i.agent=new l.Agent(s)}}}return[4,h.request(r,i)];case 1:o=a.sent();return[2,new g(o)]}}))}))}t.doAction=doAction;var b=function(e){n(ResponseError,e);function ResponseError(t){var r=e.call(this,t.code+": "+t.message)||this;r.code=t.code;r.data=t.data;r.description=t.description;r.accessDeniedDetail=t.accessDeniedDetail;if(r.data&&r.data.statusCode){r.statusCode=Number(r.data.statusCode)}return r}return ResponseError}(Error);function newError(e){return new b(e)}t.newError=newError;function getValue(e,t){if(typeof e==="string"){return t}if(e.type==="array"){if(!Array.isArray(t)){throw new Error("expect: array, actual: "+typeof t)}return t.map((function(t){return getValue(e.itemType,t)}))}if(typeof e==="function"){if(isModelClass(e)){return new e(t)}return t}return t}function toMap(e){if(e===void 0){e=undefined}if(typeof e==="undefined"||e==null){return null}if(e instanceof w){return e.toMap()}if(typeof e.toMap==="function"){return e.toMap()}if(Array.isArray(e)){return e.map((function(e){return toMap(e)}))}return e}t.toMap=toMap;var w=function(){function Model(e){var t=this;if(e==null){return}var r=this.constructor;var n=r.names();var i=r.types();Object.keys(n).forEach((function(r){var n=e[r];if(n===undefined||n===null){return}var s=i[r];t[r]=getValue(s,n)}))}Model.prototype.toMap=function(){var e=this;var t={};var r=this.constructor;var n=r.names();Object.keys(n).forEach((function(r){var i=n[r];var s=e[r];if(typeof s==="undefined"||s==null){return}t[i]=toMap(s)}));return t};return Model}();t.Model=w;function cast(e,t){if(!e){throw new Error("can not cast to Map")}if(typeof e!=="object"){throw new Error("can not cast to Map")}var r=e;var n=t.constructor;var i=n.names();var s=n.types();Object.keys(i).forEach((function(e){var n=i[e];var o=r[n];var a=s[e];if(typeof o==="undefined"||o==null){return}if(typeof a==="string"){if(a==="Readable"||a==="map"||a==="Buffer"||a==="any"||typeof o===a){t[e]=o;return}if(a==="string"&&(typeof o==="number"||typeof o==="boolean")){t[e]=o.toString();return}if(a==="boolean"){if(o===1||o===0){t[e]=!!o;return}if(o==="true"||o==="false"){t[e]=o==="true";return}}if(a==="number"&&typeof o==="string"){if(o.match(/^\d*$/)){t[e]=parseInt(o);return}if(o.match(/^[\.\d]*$/)){t[e]=parseFloat(o);return}}throw new Error("type of "+e+" is mismatch, expect "+a+", but "+typeof o)}else if(a.type==="map"){if(!(o instanceof Object)){throw new Error("type of "+e+" is mismatch, expect object, but "+typeof o)}t[e]=o}else if(a.type==="array"){if(!Array.isArray(o)){throw new Error("type of "+e+" is mismatch, expect array, but "+typeof o)}if(typeof a.itemType==="function"){t[e]=o.map((function(e){if(isModelClass(a.itemType)){return cast(e,new a.itemType({}))}return e}))}else{t[e]=o}}else if(typeof a==="function"){if(!(o instanceof Object)){throw new Error("type of "+e+" is mismatch, expect object, but "+typeof o)}if(isModelClass(a)){t[e]=cast(o,new a({}));return}t[e]=o}else{}}));return t}t.cast=cast;function sleep(e){return new Promise((function(t){setTimeout(t,e)}))}t.sleep=sleep;function allowRetry(e,t,r){if(t===0){return true}if(e.retryable!==true){return false}if(e.policy==="never"){return false}if(e.policy==="always"){return true}if(e.policy==="simple"){return t<e["maxAttempts"]}if(e.policy==="timeout"){return Date.now()-r<e.timeout}if(e.maxAttempts&&typeof e.maxAttempts==="number"){return e.maxAttempts>=t}return false}t.allowRetry=allowRetry;function getBackoffTime(e,t){if(t===0){return 0}if(e.policy==="no"){return 0}if(e.policy==="fixed"){return e.period}if(e.policy==="random"){var r=e["minPeriod"];var n=e["maxPeriod"];return r+(n-r)*Math.random()}if(e.policy==="exponential"){var i=e.initial;var s=e.multiplier;var o=i*Math.pow(1+s,t-1);var n=e.max;return Math.min(o,n)}if(e.policy==="exponential_random"){var i=e.initial;var s=e.multiplier;var o=i*Math.pow(1+s,t-1);var n=e.max;return Math.min(o*(.5+Math.random()),n)}return 0}t.getBackoffTime=getBackoffTime;var v=function(e){n(UnretryableError,e);function UnretryableError(t){var r=e.call(this,t)||this;r.name="UnretryableError";return r}return UnretryableError}(Error);function newUnretryableError(e){var t=new v("");t.data={lastRequest:e};return t}t.newUnretryableError=newUnretryableError;var T=function(e){n(RetryError,e);function RetryError(t){var r=e.call(this,t)||this;r.name="RetryError";return r}return RetryError}(Error);function retryError(e,t){var r=new T("");r.data={request:e,response:t};return r}t.retryError=retryError;function isRetryable(e){if(typeof e==="undefined"||e===null){return false}return e.name==="RetryError"}t.isRetryable=isRetryable},9252:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.RuntimeOptions=t.ExtendsParameters=void 0;const a=r(2203);const u=s(r(4828));const c=s(r(1406));const l=o(r(3480));const d=r(857);const f=`AlibabaCloud (${d.platform()}; ${d.arch()}) Node.js/${process.version} Core/1.0.1 TeaDSL/1`;class ExtendsParameters extends u.Model{constructor(e){super(e)}static names(){return{headers:"headers",queries:"queries"}}static types(){return{headers:{type:"map",keyType:"string",valueType:"string"},queries:{type:"map",keyType:"string",valueType:"string"}}}}t.ExtendsParameters=ExtendsParameters;class RuntimeOptions extends u.Model{constructor(e){super(e)}static names(){return{autoretry:"autoretry",ignoreSSL:"ignoreSSL",key:"key",cert:"cert",ca:"ca",maxAttempts:"max_attempts",backoffPolicy:"backoff_policy",backoffPeriod:"backoff_period",readTimeout:"readTimeout",connectTimeout:"connectTimeout",httpProxy:"httpProxy",httpsProxy:"httpsProxy",noProxy:"noProxy",maxIdleConns:"maxIdleConns",keepAlive:"keepAlive",extendsParameters:"extendsParameters"}}static types(){return{autoretry:"boolean",ignoreSSL:"boolean",key:"string",cert:"string",ca:"string",maxAttempts:"number",backoffPolicy:"string",backoffPeriod:"number",readTimeout:"number",connectTimeout:"number",httpProxy:"string",httpsProxy:"string",noProxy:"string",maxIdleConns:"number",keepAlive:"boolean",extendsParameters:ExtendsParameters}}}t.RuntimeOptions=RuntimeOptions;function read(e){return new Promise(((t,r)=>{let n,i,s;var cleanup=function(){e.removeListener("error",i);e.removeListener("data",n);e.removeListener("end",s)};var o=[];var a=0;n=function(e){o.push(e);a+=e.length};i=function(e){cleanup();r(e)};s=function(){cleanup();t(Buffer.concat(o,a))};e.on("error",i);e.on("data",n);e.on("end",s)}))}class Client{static toString(e){return e.toString()}static parseJSON(e){return JSON.parse(e)}static async readAsBytes(e){return await read(e)}static async readAsString(e){let t=await Client.readAsBytes(e);return Client.toString(t)}static async readAsJSON(e){return Client.parseJSON(await Client.readAsString(e))}static getNonce(){return c.makeNonce()}static getDateUTCString(){const e=new Date;return e.toUTCString()}static defaultString(e,t){return e||t}static defaultNumber(e,t){return e||t}static toFormString(e){return l.default.stringify(e)}static toJSONString(e){if(typeof e==="string"){return e}return JSON.stringify(e)}static toBytes(e){return Buffer.from(e)}static empty(e){return!e}static equalString(e,t){return e===t}static equalNumber(e,t){return e===t}static isUnset(e){if(typeof e==="undefined"){return true}if(e===null){return true}return false}static stringifyMapValue(e){if(!e){return e}const t={};for(const[r,n]of Object.entries(e)){if(typeof n==="undefined"||n===null){continue}t[r]=String(n)}return t}static anyifyMapValue(e){return e}static assertAsBoolean(e){if(typeof e==="boolean"){return e}throw new Error(`The value is not a boolean`)}static assertAsString(e){if(typeof e==="string"){return e}throw new Error(`The value is not a string`)}static assertAsNumber(e){if(typeof e==="number"){return e}throw new Error(`The value is not a number`)}static assertAsInteger(e){if(Number.isInteger(e)){return e}throw new Error(`The value is not a int number`)}static assertAsMap(e){if(e&&typeof e==="object"&&!Array.isArray(e)){return e}throw new Error(`The value is not a object`)}static assertAsArray(e){if(Array.isArray(e)){return e}throw new Error(`The value is not array`)}static assertAsBytes(e){if(Buffer.isBuffer(e)){return e}throw new Error(`The value is not bytes`)}static getUserAgent(e){if(!e||!e.length){return f}return f+" "+e}static is2xx(e){return e>=200&&e<300}static is3xx(e){return e>=300&&e<400}static is4xx(e){return e>=400&&e<500}static is5xx(e){return e>=500&&e<600}static validateModel(e){}static toMap(e){return u.toMap(e)}static async sleep(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}static toArray(e){if(!(e instanceof Array)){return null}let t=[];e.forEach((e=>{if(!e){return}t.push(u.toMap(e))}));return t}static assertAsReadable(e){if(e instanceof a.Readable){return e}throw new Error(`The value is not a readable`)}}t["default"]=Client},1927:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(3362);class Client{static parseXml(e,t){let r=this._parseXML(e);if(t!==null&&typeof t!=="undefined"){r=this._xmlCast(r,t)}return r}static toXML(e){const t=new n.Builder;return t.buildObject(e)}static _parseXML(e){let t=new n.Parser({explicitArray:false});let r={};t.parseString(e,(function(e,t){r.err=e;r.output=t}));if(r.err){throw r.err}return r.output}static _xmlCast(e,t){e=e||{};let r={};let n=t;let i=n.names();let s=n.types();Object.keys(i).forEach((t=>{let n=i[t];let o=e[n];let a=s[t];switch(a){case"boolean":if(!o){r[n]=false;return}r[n]=o==="false"?false:true;return;case"number":if(o!=0&&!o){r[n]=NaN;return}r[n]=+o;return;case"string":if(!o){r[n]="";return}r[n]=o.toString();return;default:if(a.type==="array"){if(!o){r[n]=[];return}if(!Array.isArray(o)){o=[o]}if(typeof a.itemType==="function"){r[n]=o.map((e=>this._xmlCast(e,a.itemType)))}else{r[n]=o}}else if(typeof a==="function"){if(!o){o={}}r[n]=this._xmlCast(o,a)}else{r[n]=o}}}));return r}}t["default"]=Client},5313:function(e,t,r){t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.storage=localstorage();t.destroy=(()=>{let e=false;return()=>{if(!e){e=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}let e;return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0;let i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{if(e==="%%"){return}n++;if(e==="%c"){i=n}}));t.splice(i,0,r)}t.log=console.debug||console.log||(()=>{});function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=r(5384)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},5384:function(e,t,r){function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=r(2134);createDebug.destroy=destroy;Object.keys(e).forEach((t=>{createDebug[t]=e[t]}));createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let t=0;for(let r=0;r<e.length;r++){t=(t<<5)-t+e.charCodeAt(r);t|=0}return createDebug.colors[Math.abs(t)%createDebug.colors.length]}createDebug.selectColor=selectColor;function createDebug(e){let t;let r=null;let n;let i;function debug(...e){if(!debug.enabled){return}const r=debug;const n=Number(new Date);const i=n-(t||n);r.diff=i;r.prev=t;r.curr=n;t=n;e[0]=createDebug.coerce(e[0]);if(typeof e[0]!=="string"){e.unshift("%O")}let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,n)=>{if(t==="%%"){return"%"}s++;const i=createDebug.formatters[n];if(typeof i==="function"){const n=e[s];t=i.call(r,n);e.splice(s,1);s--}return t}));createDebug.formatArgs.call(r,e);const o=r.log||createDebug.log;o.apply(r,e)}debug.namespace=e;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(e);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(r!==null){return r}if(n!==createDebug.namespaces){n=createDebug.namespaces;i=createDebug.enabled(e)}return i},set:e=>{r=e}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(e,t){const r=createDebug(this.namespace+(typeof t==="undefined"?":":t)+e);r.log=this.log;return r}function enable(e){createDebug.save(e);createDebug.namespaces=e;createDebug.names=[];createDebug.skips=[];const t=(typeof e==="string"?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of t){if(e[0]==="-"){createDebug.skips.push(e.slice(1))}else{createDebug.names.push(e)}}}function matchesTemplate(e,t){let r=0;let n=0;let i=-1;let s=0;while(r<e.length){if(n<t.length&&(t[n]===e[r]||t[n]==="*")){if(t[n]==="*"){i=n;s=r;n++}else{r++;n++}}else if(i!==-1){n=i+1;s++;r=s}else{return false}}while(n<t.length&&t[n]==="*"){n++}return n===t.length}function disable(){const e=[...createDebug.names,...createDebug.skips.map((e=>"-"+e))].join(",");createDebug.enable("");return e}function enabled(e){for(const t of createDebug.skips){if(matchesTemplate(e,t)){return false}}for(const t of createDebug.names){if(matchesTemplate(e,t)){return true}}return false}function coerce(e){if(e instanceof Error){return e.stack||e.message}return e}function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}createDebug.enable(createDebug.load());return createDebug}e.exports=setup},6449:function(e,t,r){if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=r(5313)}else{e.exports=r(249)}},249:function(e,t,r){const n=r(2018);const i=r(9023);t.init=init;t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");t.colors=[6,2,3,4,5,1];try{const e=r(5414);if(e&&(e.stderr||e).level>=2){t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];if(/^(yes|on|true|enabled)$/i.test(n)){n=true}else if(/^(no|off|false|disabled)$/i.test(n)){n=false}else if(n==="null"){n=null}else{n=Number(n)}e[r]=n;return e}),{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)}function formatArgs(t){const{namespace:r,useColors:n}=this;if(n){const n=this.color;const i="[3"+(n<8?n:"8;5;"+n);const s=` ${i};1m${r} [0m`;t[0]=s+t[0].split("\n").join("\n"+s);t.push(i+"m+"+e.exports.humanize(this.diff)+"[0m")}else{t[0]=getDate()+r+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(i.formatWithOptions(t.inspectOpts,...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n<r.length;n++){e.inspectOpts[r[n]]=t.inspectOpts[r[n]]}}e.exports=r(5384)(t);const{formatters:s}=e.exports;s.o=function(e){this.inspectOpts.colors=this.useColors;return i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")};s.O=function(e){this.inspectOpts.colors=this.useColors;return i.inspect(e,this.inspectOpts)}},2871:function(e){"use strict";e.exports=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":e.length===1?"-":"--";const n=t.indexOf(r+e);const i=t.indexOf("--");return n!==-1&&(i===-1?true:n<i)}},3312:function(e,t,r){"use strict";const n=r(3106);const i=r(8611);const s=r(5692);const o=r(7016).parse;const a=r(7016).format;const u=r(6449)("httpx:body");const c=r(6449)("httpx:header");const l=new i.Agent({keepAlive:true});const d=new s.Agent({keepAlive:true});const f=3e3;const h=Symbol("TIMER::READ_TIMER");const p=Symbol("TIMER::READ_TIME_OUT");const y=Symbol("TIMER::READ_TIMER_START_AT");function decompress(e){switch(e.headers["content-encoding"]){case"gzip":return e.pipe(n.createGunzip());case"deflate":return e.pipe(n.createInflate());default:return e}}var append=function(e,t,r){e.name=t+e.name;e.message=`${r}. ${e.message}`;return e};const isNumber=function(e){return e!==null&&!isNaN(e)};t.request=function(e,t){t||(t={});const r=typeof e==="string"?o(e):e;let n,m;if(isNumber(t.readTimeout)||isNumber(t.connectTimeout)){n=isNumber(t.readTimeout)?Number(t.readTimeout):f;m=isNumber(t.connectTimeout)?Number(t.connectTimeout):f}else if(isNumber(t.timeout)){n=m=Number(t.timeout)}else{n=m=f}const g=r.protocol==="https:";const b=(t.method||"GET").toUpperCase();const w=g?d:l;const v=t.agent||w;var T={host:r.hostname||"localhost",path:r.path||"/",method:b,port:r.port||(r.protocol==="https:"?443:80),agent:v,headers:t.headers||{},key:t.key||"",cert:t.cert||"",ca:t.ca||"",timeout:m};if(g&&typeof t.rejectUnauthorized!=="undefined"){T.rejectUnauthorized=t.rejectUnauthorized}if(t.compression){T.headers["accept-encoding"]="gzip,deflate"}const C=g?s:i;if(typeof t.beforeRequest==="function"){T=t.beforeRequest(T)}return new Promise(((i,s)=>{const o=C.request(T);const l=t.data;var fulfilled=e=>{if(c.enabled){const t=e.req._header;t.split("\r\n").forEach((e=>{c("> %s",e)}));c("< HTTP/%s %s %s",e.httpVersion,e.statusCode,e.statusMessage);Object.keys(e.headers).forEach((t=>{c("< %s: %s",t,e.headers[t])}))}i(e)};var rejected=e=>{e.message+=`${b} ${a(r)} failed.`;if(o.socket&&o.socket[h]){clearTimeout(o.socket[h])}s(e)};var abort=e=>{o.abort();rejected(e)};const startResponseTimer=function(e){const t=setTimeout((()=>{if(e[h]){clearTimeout(e[h]);e[h]=null}var t=new Error;var r=`ReadTimeout(${n})`;abort(append(t,"RequestTimeout",r))}),n);e[p]=n;e[h]=t;e[y]=Date.now();t.unref()};if(!l||"string"===typeof l||l instanceof Buffer){if(u.enabled){if(!l){u("<no request body>")}else if("string"===typeof l){u(l)}else{u(`Buffer <ignored>, Buffer length: ${l.length}`)}}o.end(l)}else if("function"===typeof l.pipe){l.pipe(o);if(u.enabled){u("<request body is a stream>")}l.once("error",(e=>{abort(append(e,"HttpX","Stream occor error"))}))}o.on("timeout",(()=>{var t=new Error;t.name="RequestTimeoutError";t.message=`ConnectTimeout: Connect ${e} failed.`;o.destroy();s(t)}));o.on("response",fulfilled);o.on("error",rejected);o.once("socket",(function(e){if(e.readyState==="opening"){e.once("connect",(function(){startResponseTimer(e)}))}else{startResponseTimer(e)}}))}))};t.read=function(e,t){const r=decompress(e);return new Promise(((n,i)=>{const s=e.socket||e.client;const makeReadTimeoutError=()=>{const t=e.req;var r=new Error;r.name="RequestTimeoutError";r.message=`ReadTimeout: ${s[p]}. ${t.method} ${t.path} failed.`;return r};let o;const a=s[h];if(!a){i(makeReadTimeoutError());return}const c=s[p]-(Date.now()-s[y]);clearTimeout(a);if(c<=0){i(makeReadTimeoutError());return}o=setTimeout((function(){i(makeReadTimeoutError())}),c);var l,d,f;var cleanup=function(){r.removeListener("error",l);r.removeListener("data",d);r.removeListener("end",f);if(o){clearTimeout(o)}};const m=[];var g=0;d=function(e){m.push(e);g+=e.length};l=function(e){cleanup();i(e)};f=function(){cleanup();var e=Buffer.concat(m,g);u("");if(t){const r=e.toString(t);u(r);return n(r)}if(u.enabled){u(e.toString())}n(e)};r.on("error",l);r.on("data",d);r.on("end",f)}))};function readyToRead(e){return new Promise(((t,r)=>{var n,i,s;var cleanup=function(){e.removeListener("error",s);e.removeListener("end",i);e.removeListener("readable",n)};n=function(){cleanup();t(false)};i=function(){cleanup();t(true)};s=function(e){cleanup();r(e)};e.once("readable",n);e.once("end",i);e.once("error",s)}))}class Event{constructor(e,t,r,n){this.id=e;this.event=t;this.data=r;this.retry=n}}t.Event=Event;const m="data:";const g="event:";const b="id:";const w="retry:";function isDigitsOnly(e){for(let t=0;t<e.length;t++){const r=e.charAt(t);if(r<"0"||r>"9"){return false}}return e.length>0}function tryGetEvents(e,t){const r=e+t;let n=0;const i=[];for(let e=0;e<r.length-1;e++){const t=r[e];const s=r[e+1];if(t==="\n"&&s==="\n"){const t=r.substring(n,e);const s=t.split("\n");const o=new Event;s.forEach((e=>{if(e.startsWith(m)){o.data=e.substring(m.length).trim()}else if(e.startsWith(g)){o.event=e.substring(g.length).trim()}else if(e.startsWith(b)){o.id=e.substring(b.length).trim()}else if(e.startsWith(w)){const t=e.substring(w.length).trim();if(isDigitsOnly(t)){o.retry=parseInt(t,10)}}else if(e.startsWith(":")){}}));i.push(o);n=e+2}}const s=r.substring(n);return[i,s]}t.readAsSSE=async function*(e){const t=decompress(e);const r=e.socket||e.client;clearTimeout(r[h]);let n="";while(true){const e=await readyToRead(t);if(e){return}let r;while(null!==(r=t.read())){const[e,t]=tryGetEvents(n,r.toString());n=t;if(e&&e.length>0){for(const t of e){yield t}}}}}},6482:function(e,t){t.parse=t.decode=decode;t.stringify=t.encode=encode;t.safe=safe;t.unsafe=unsafe;var r=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(e,t){var n=[];var i="";if(typeof t==="string"){t={section:t,whitespace:false}}else{t=t||{};t.whitespace=t.whitespace===true}var s=t.whitespace?" = ":"=";Object.keys(e).forEach((function(t,o,a){var u=e[t];if(u&&Array.isArray(u)){u.forEach((function(e){i+=safe(t+"[]")+s+safe(e)+"\n"}))}else if(u&&typeof u==="object")n.push(t);else i+=safe(t)+s+safe(u)+r}));if(t.section&&i.length)i="["+safe(t.section)+"]"+r+i;n.forEach((function(n,s,o){var a=dotSplit(n).join("\\.");var u=(t.section?t.section+".":"")+a;var c=encode(e[n],{section:u,whitespace:t.whitespace});if(i.length&&c.length)i+=r;i+=c}));return i}function dotSplit(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function decode(e){var t={};var r=t;var n=null;var i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var s=e.split(/[\r\n]+/g);s.forEach((function(e,s,o){if(!e||e.match(/^\s*[;#]/))return;var a=e.match(i);if(!a)return;if(a[1]!==undefined){n=unsafe(a[1]);if(n==="__proto__"){r={};return}r=t[n]=t[n]||{};return}var u=unsafe(a[2]);if(u==="__proto__")return;var c=a[3]?unsafe(a[4]):true;switch(c){case"true":case"false":case"null":c=JSON.parse(c)}if(u.length>2&&u.slice(-2)==="[]"){u=u.substring(0,u.length-2);if(u==="__proto__")return;if(!r[u])r[u]=[];else if(!Array.isArray(r[u]))r[u]=[r[u]]}if(Array.isArray(r[u]))r[u].push(c);else r[u]=c}));Object.keys(t).filter((function(e,r,n){if(!t[e]||typeof t[e]!=="object"||Array.isArray(t[e]))return false;var i=dotSplit(e);var s=t;var o=i.pop();var a=o.replace(/\\\./g,".");i.forEach((function(e,t,r){if(e==="__proto__")return;if(!s[e]||typeof s[e]!=="object")s[e]={};s=s[e]}));if(s===t&&a===o)return false;s[a]=t[e];return true})).forEach((function(e,r,n){delete t[e]}));return t}function isQuoted(e){return e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'"}function safe(e){return typeof e!=="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&isQuoted(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#")}function unsafe(e,t){e=(e||"").trim();if(isQuoted(e)){if(e.charAt(0)==="'")e=e.substr(1,e.length-2);try{e=JSON.parse(e)}catch(e){}}else{var r=false;var n="";for(var i=0,s=e.length;i<s;i++){var o=e.charAt(i);if(r){if("\\;#".indexOf(o)!==-1)n+=o;else n+="\\"+o;r=false}else if(";#".indexOf(o)!==-1)break;else if(o==="\\")r=true;else n+=o}if(r)n+="\\";return n.trim()}return e}},1406:function(e,t,r){"use strict";const n=r(9896);const i=r(857);const s=r(6982);t.loadJSONSync=function(e){var t=n.readFileSync(e,"utf8");if(t.charCodeAt(0)===65279){t=t.slice(1)}try{return JSON.parse(t)}catch(t){t.message=e+": "+t.message;throw t}};t.encode=function(e,t){if(typeof e!=="string"){e=""+e}return Buffer.from(e,t)};t.makeHasher=function(e){return function(t,r){var n=s.createHash(e);n.update(t);return n.digest(r)}};t.createHash=t.makeHasher;t.md5=t.makeHasher("md5");t.createHmac=function(e){return function(t,r,n){return s.createHmac(e,r).update(t).digest(n)}};t.sha1=t.createHmac("sha1");t.random=function(e,t){return Math.floor(e+Math.random()*(t-e))};t.makeNonce=function(){var e=0;var r;const n=i.hostname();const s=process.pid;return function(){var i=Math.floor(Math.random()*1e12);if(i===r){e++}else{e=0}r=i;var o=`${n}${s}${i}${e}`;return t.md5(o,"hex")}}();t.pad2=function(e){if(e<10){return"0"+e}return""+e};t.pad3=function(e){if(e<10){return"00"+e}else if(e<100){return"0"+e}return""+e};t.getYYYYMMDD=function(e){var r=e.getFullYear();var n=t.pad2(e.getMonth()+1);var i=t.pad2(e.getDate());return""+r+n+i};t.sleep=function(e){return new Promise((t=>{setTimeout(t,e)}))};t.getIPv4=function(){var e=i.networkInterfaces();var t=Object.keys(e);for(var r=0;r<t.length;r++){var n=t[r];var s=e[n];for(var o=0;o<s.length;o++){var a=s[o];if(!a.internal&&a.family==="IPv4"){return a.address}}}return""};t.getMac=function(){var e=i.networkInterfaces();var t=Object.keys(e);for(var r=0;r<t.length;r++){var n=t[r];var s=e[n];for(var o=0;o<s.length;o++){var a=s[o];if(!a.internal&&a.family==="IPv4"){return a.mac}}}return"00:00:00:00:00:00"};t.readAll=function(e){return new Promise(((t,r)=>{var n,i,s;var cleanup=function(t){e.removeListener("error",n);e.removeListener("data",i);e.removeListener("end",s)};var o=[];var a=0;i=function(e){o.push(e);a+=e.length};n=function(e){cleanup();r(e)};s=function(){cleanup();t(Buffer.concat(o,a))};e.on("error",n);e.on("data",i);e.on("end",s)}))};class SimpleCryptoHelper{constructor(e,t,r){this.algorithm=e;this.key=t;this.iv=r}encrypt(e,t,r){const n=s.createCipheriv(this.algorithm,this.key,this.iv);let i=n.update(e,t,r);i+=n.final(r);return i}decrypt(e,t,r){const n=s.createDecipheriv(this.algorithm,this.key,this.iv);let i=n.update(e,t,r);i+=n.final(r);return i}}const o=new SimpleCryptoHelper("aes-192-cbc",Buffer.from("keykeykeykeykeykeykeykey"),Buffer.from("abcdefghijklmnop"));t.encrypt=function(e,t,r){return o.encrypt(e,t,r)};t.decrypt=function(e,t,r){return o.decrypt(e,t,r)}},2134:function(e){var t=1e3;var r=t*60;var n=r*60;var i=n*24;var s=i*7;var o=i*365.25;e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0){return parse(e)}else if(r==="number"&&isFinite(e)){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a){return}var u=parseFloat(a[1]);var c=(a[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*r;case"seconds":case"second":case"secs":case"sec":case"s":return u*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return undefined}}function fmtShort(e){var s=Math.abs(e);if(s>=i){return Math.round(e/i)+"d"}if(s>=n){return Math.round(e/n)+"h"}if(s>=r){return Math.round(e/r)+"m"}if(s>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var s=Math.abs(e);if(s>=i){return plural(e,s,i,"day")}if(s>=n){return plural(e,s,n,"hour")}if(s>=r){return plural(e,s,r,"minute")}if(s>=t){return plural(e,s,t,"second")}return e+" ms"}function plural(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}},6426:function(e,t,r){(function(e){e.parser=function(e,t){return new SAXParser(e,t)};e.SAXParser=SAXParser;e.SAXStream=SAXStream;e.createStream=createStream;e.MAX_BUFFER_LENGTH=64*1024;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function SAXParser(t,r){if(!(this instanceof SAXParser)){return new SAXParser(t,r)}var n=this;clearBuffers(n);n.q=n.c="";n.bufferCheckPosition=e.MAX_BUFFER_LENGTH;n.opt=r||{};n.opt.lowercase=n.opt.lowercase||n.opt.lowercasetags;n.looseCase=n.opt.lowercase?"toLowerCase":"toUpperCase";n.tags=[];n.closed=n.closedRoot=n.sawRoot=false;n.tag=n.error=null;n.strict=!!t;n.noscript=!!(t||n.opt.noscript);n.state=p.BEGIN;n.strictEntities=n.opt.strictEntities;n.ENTITIES=n.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES);n.attribList=[];if(n.opt.xmlns){n.ns=Object.create(c)}if(n.opt.unquotedAttributeValues===undefined){n.opt.unquotedAttributeValues=!t}n.trackPosition=n.opt.position!==false;if(n.trackPosition){n.position=n.line=n.column=0}emit(n,"onready")}if(!Object.create){Object.create=function(e){function F(){}F.prototype=e;var t=new F;return t}}if(!Object.keys){Object.keys=function(e){var t=[];for(var r in e)if(e.hasOwnProperty(r))t.push(r);return t}}function checkBufferLength(r){var n=Math.max(e.MAX_BUFFER_LENGTH,10);var i=0;for(var s=0,o=t.length;s<o;s++){var a=r[t[s]].length;if(a>n){switch(t[s]){case"textNode":closeText(r);break;case"cdata":emitNode(r,"oncdata",r.cdata);r.cdata="";break;case"script":emitNode(r,"onscript",r.script);r.script="";break;default:error(r,"Max buffer length exceeded: "+t[s])}}i=Math.max(i,a)}var u=e.MAX_BUFFER_LENGTH-i;r.bufferCheckPosition=u+r.position}function clearBuffers(e){for(var r=0,n=t.length;r<n;r++){e[t[r]]=""}}function flushBuffers(e){closeText(e);if(e.cdata!==""){emitNode(e,"oncdata",e.cdata);e.cdata=""}if(e.script!==""){emitNode(e,"onscript",e.script);e.script=""}}SAXParser.prototype={end:function(){end(this)},write:write,resume:function(){this.error=null;return this},close:function(){return this.write(null)},flush:function(){flushBuffers(this)}};var n;try{n=r(2203).Stream}catch(e){n=function(){}}if(!n)n=function(){};var i=e.EVENTS.filter((function(e){return e!=="error"&&e!=="end"}));function createStream(e,t){return new SAXStream(e,t)}function SAXStream(e,t){if(!(this instanceof SAXStream)){return new SAXStream(e,t)}n.apply(this);this._parser=new SAXParser(e,t);this.writable=true;this.readable=true;var r=this;this._parser.onend=function(){r.emit("end")};this._parser.onerror=function(e){r.emit("error",e);r._parser.error=null};this._decoder=null;i.forEach((function(e){Object.defineProperty(r,"on"+e,{get:function(){return r._parser["on"+e]},set:function(t){if(!t){r.removeAllListeners(e);r._parser["on"+e]=t;return t}r.on(e,t)},enumerable:true,configurable:false})}))}SAXStream.prototype=Object.create(n.prototype,{constructor:{value:SAXStream}});SAXStream.prototype.write=function(e){if(typeof Buffer==="function"&&typeof Buffer.isBuffer==="function"&&Buffer.isBuffer(e)){if(!this._decoder){var t=r(3193).StringDecoder;this._decoder=new t("utf8")}e=this._decoder.write(e)}this._parser.write(e.toString());this.emit("data",e);return true};SAXStream.prototype.end=function(e){if(e&&e.length){this.write(e)}this._parser.end();return true};SAXStream.prototype.on=function(e,t){var r=this;if(!r._parser["on"+e]&&i.indexOf(e)!==-1){r._parser["on"+e]=function(){var t=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e);r.emit.apply(r,t)}}return n.prototype.on.call(r,e,t)};var s="[CDATA[";var o="DOCTYPE";var a="http://www.w3.org/XML/1998/namespace";var u="http://www.w3.org/2000/xmlns/";var c={xml:a,xmlns:u};var l=/[:_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]/;var d=/[:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;var f=/[#:_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]/;var h=/[#:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function isWhitespace(e){return e===" "||e==="\n"||e==="\r"||e==="\t"}function isQuote(e){return e==='"'||e==="'"}function isAttribEnd(e){return e===">"||isWhitespace(e)}function isMatch(e,t){return e.test(t)}function notMatch(e,t){return!isMatch(e,t)}var p=0;e.STATE={BEGIN:p++,BEGIN_WHITESPACE:p++,TEXT:p++,TEXT_ENTITY:p++,OPEN_WAKA:p++,SGML_DECL:p++,SGML_DECL_QUOTED:p++,DOCTYPE:p++,DOCTYPE_QUOTED:p++,DOCTYPE_DTD:p++,DOCTYPE_DTD_QUOTED:p++,COMMENT_STARTING:p++,COMMENT:p++,COMMENT_ENDING:p++,COMMENT_ENDED:p++,CDATA:p++,CDATA_ENDING:p++,CDATA_ENDING_2:p++,PROC_INST:p++,PROC_INST_BODY:p++,PROC_INST_ENDING:p++,OPEN_TAG:p++,OPEN_TAG_SLASH:p++,ATTRIB:p++,ATTRIB_NAME:p++,ATTRIB_NAME_SAW_WHITE:p++,ATTRIB_VALUE:p++,ATTRIB_VALUE_QUOTED:p++,ATTRIB_VALUE_CLOSED:p++,ATTRIB_VALUE_UNQUOTED:p++,ATTRIB_VALUE_ENTITY_Q:p++,ATTRIB_VALUE_ENTITY_U:p++,CLOSE_TAG:p++,CLOSE_TAG_SAW_WHITE:p++,SCRIPT:p++,SCRIPT_ENDING:p++};e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"};e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830};Object.keys(e.ENTITIES).forEach((function(t){var r=e.ENTITIES[t];var n=typeof r==="number"?String.fromCharCode(r):r;e.ENTITIES[t]=n}));for(var y in e.STATE){e.STATE[e.STATE[y]]=y}p=e.STATE;function emit(e,t,r){e[t]&&e[t](r)}function emitNode(e,t,r){if(e.textNode)closeText(e);emit(e,t,r)}function closeText(e){e.textNode=textopts(e.opt,e.textNode);if(e.textNode)emit(e,"ontext",e.textNode);e.textNode=""}function textopts(e,t){if(e.trim)t=t.trim();if(e.normalize)t=t.replace(/\s+/g," ");return t}function error(e,t){closeText(e);if(e.trackPosition){t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c}t=new Error(t);e.error=t;emit(e,"onerror",t);return e}function end(e){if(e.sawRoot&&!e.closedRoot)strictFail(e,"Unclosed root tag");if(e.state!==p.BEGIN&&e.state!==p.BEGIN_WHITESPACE&&e.state!==p.TEXT){error(e,"Unexpected end")}closeText(e);e.c="";e.closed=true;emit(e,"onend");SAXParser.call(e,e.strict,e.opt);return e}function strictFail(e,t){if(typeof e!=="object"||!(e instanceof SAXParser)){throw new Error("bad call to strictFail")}if(e.strict){error(e,t)}}function newTag(e){if(!e.strict)e.tagName=e.tagName[e.looseCase]();var t=e.tags[e.tags.length-1]||e;var r=e.tag={name:e.tagName,attributes:{}};if(e.opt.xmlns){r.ns=t.ns}e.attribList.length=0;emitNode(e,"onopentagstart",r)}function qname(e,t){var r=e.indexOf(":");var n=r<0?["",e]:e.split(":");var i=n[0];var s=n[1];if(t&&e==="xmlns"){i="xmlns";s=""}return{prefix:i,local:s}}function attrib(e){if(!e.strict){e.attribName=e.attribName[e.looseCase]()}if(e.attribList.indexOf(e.attribName)!==-1||e.tag.attributes.hasOwnProperty(e.attribName)){e.attribName=e.attribValue="";return}if(e.opt.xmlns){var t=qname(e.attribName,true);var r=t.prefix;var n=t.local;if(r==="xmlns"){if(n==="xml"&&e.attribValue!==a){strictFail(e,"xml: prefix must be bound to "+a+"\n"+"Actual: "+e.attribValue)}else if(n==="xmlns"&&e.attribValue!==u){strictFail(e,"xmlns: prefix must be bound to "+u+"\n"+"Actual: "+e.attribValue)}else{var i=e.tag;var s=e.tags[e.tags.length-1]||e;if(i.ns===s.ns){i.ns=Object.create(s.ns)}i.ns[n]=e.attribValue}}e.attribList.push([e.attribName,e.attribValue])}else{e.tag.attributes[e.attribName]=e.attribValue;emitNode(e,"onattribute",{name:e.attribName,value:e.attribValue})}e.attribName=e.attribValue=""}function openTag(e,t){if(e.opt.xmlns){var r=e.tag;var n=qname(e.tagName);r.prefix=n.prefix;r.local=n.local;r.uri=r.ns[n.prefix]||"";if(r.prefix&&!r.uri){strictFail(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName));r.uri=n.prefix}var i=e.tags[e.tags.length-1]||e;if(r.ns&&i.ns!==r.ns){Object.keys(r.ns).forEach((function(t){emitNode(e,"onopennamespace",{prefix:t,uri:r.ns[t]})}))}for(var s=0,o=e.attribList.length;s<o;s++){var a=e.attribList[s];var u=a[0];var c=a[1];var l=qname(u,true);var d=l.prefix;var f=l.local;var h=d===""?"":r.ns[d]||"";var y={name:u,value:c,prefix:d,local:f,uri:h};if(d&&d!=="xmlns"&&!h){strictFail(e,"Unbound namespace prefix: "+JSON.stringify(d));y.uri=d}e.tag.attributes[u]=y;emitNode(e,"onattribute",y)}e.attribList.length=0}e.tag.isSelfClosing=!!t;e.sawRoot=true;e.tags.push(e.tag);emitNode(e,"onopentag",e.tag);if(!t){if(!e.noscript&&e.tagName.toLowerCase()==="script"){e.state=p.SCRIPT}else{e.state=p.TEXT}e.tag=null;e.tagName=""}e.attribName=e.attribValue="";e.attribList.length=0}function closeTag(e){if(!e.tagName){strictFail(e,"Weird empty close tag.");e.textNode+="</>";e.state=p.TEXT;return}if(e.script){if(e.tagName!=="script"){e.script+="</"+e.tagName+">";e.tagName="";e.state=p.SCRIPT;return}emitNode(e,"onscript",e.script);e.script=""}var t=e.tags.length;var r=e.tagName;if(!e.strict){r=r[e.looseCase]()}var n=r;while(t--){var i=e.tags[t];if(i.name!==n){strictFail(e,"Unexpected close tag")}else{break}}if(t<0){strictFail(e,"Unmatched closing tag: "+e.tagName);e.textNode+="</"+e.tagName+">";e.state=p.TEXT;return}e.tagName=r;var s=e.tags.length;while(s-- >t){var o=e.tag=e.tags.pop();e.tagName=e.tag.name;emitNode(e,"onclosetag",e.tagName);var a={};for(var u in o.ns){a[u]=o.ns[u]}var c=e.tags[e.tags.length-1]||e;if(e.opt.xmlns&&o.ns!==c.ns){Object.keys(o.ns).forEach((function(t){var r=o.ns[t];emitNode(e,"onclosenamespace",{prefix:t,uri:r})}))}}if(t===0)e.closedRoot=true;e.tagName=e.attribValue=e.attribName="";e.attribList.length=0;e.state=p.TEXT}function parseEntity(e){var t=e.entity;var r=t.toLowerCase();var n;var i="";if(e.ENTITIES[t]){return e.ENTITIES[t]}if(e.ENTITIES[r]){return e.ENTITIES[r]}t=r;if(t.charAt(0)==="#"){if(t.charAt(1)==="x"){t=t.slice(2);n=parseInt(t,16);i=n.toString(16)}else{t=t.slice(1);n=parseInt(t,10);i=n.toString(10)}}t=t.replace(/^0+/,"");if(isNaN(n)||i.toLowerCase()!==t){strictFail(e,"Invalid character entity");return"&"+e.entity+";"}return String.fromCodePoint(n)}function beginWhiteSpace(e,t){if(t==="<"){e.state=p.OPEN_WAKA;e.startTagPosition=e.position}else if(!isWhitespace(t)){strictFail(e,"Non-whitespace before first tag.");e.textNode=t;e.state=p.TEXT}}function charAt(e,t){var r="";if(t<e.length){r=e.charAt(t)}return r}function write(t){var r=this;if(this.error){throw this.error}if(r.closed){return error(r,"Cannot write after close. Assign an onready handler.")}if(t===null){return end(r)}if(typeof t==="object"){t=t.toString()}var n=0;var i="";while(true){i=charAt(t,n++);r.c=i;if(!i){break}if(r.trackPosition){r.position++;if(i==="\n"){r.line++;r.column=0}else{r.column++}}switch(r.state){case p.BEGIN:r.state=p.BEGIN_WHITESPACE;if(i==="\ufeff"){continue}beginWhiteSpace(r,i);continue;case p.BEGIN_WHITESPACE:beginWhiteSpace(r,i);continue;case p.TEXT:if(r.sawRoot&&!r.closedRoot){var a=n-1;while(i&&i!=="<"&&i!=="&"){i=charAt(t,n++);if(i&&r.trackPosition){r.position++;if(i==="\n"){r.line++;r.column=0}else{r.column++}}}r.textNode+=t.substring(a,n-1)}if(i==="<"&&!(r.sawRoot&&r.closedRoot&&!r.strict)){r.state=p.OPEN_WAKA;r.startTagPosition=r.position}else{if(!isWhitespace(i)&&(!r.sawRoot||r.closedRoot)){strictFail(r,"Text data outside of root node.")}if(i==="&"){r.state=p.TEXT_ENTITY}else{r.textNode+=i}}continue;case p.SCRIPT:if(i==="<"){r.state=p.SCRIPT_ENDING}else{r.script+=i}continue;case p.SCRIPT_ENDING:if(i==="/"){r.state=p.CLOSE_TAG}else{r.script+="<"+i;r.state=p.SCRIPT}continue;case p.OPEN_WAKA:if(i==="!"){r.state=p.SGML_DECL;r.sgmlDecl=""}else if(isWhitespace(i)){}else if(isMatch(l,i)){r.state=p.OPEN_TAG;r.tagName=i}else if(i==="/"){r.state=p.CLOSE_TAG;r.tagName=""}else if(i==="?"){r.state=p.PROC_INST;r.procInstName=r.procInstBody=""}else{strictFail(r,"Unencoded <");if(r.startTagPosition+1<r.position){var u=r.position-r.startTagPosition;i=new Array(u).join(" ")+i}r.textNode+="<"+i;r.state=p.TEXT}continue;case p.SGML_DECL:if(r.sgmlDecl+i==="--"){r.state=p.COMMENT;r.comment="";r.sgmlDecl="";continue}if(r.doctype&&r.doctype!==true&&r.sgmlDecl){r.state=p.DOCTYPE_DTD;r.doctype+="<!"+r.sgmlDecl+i;r.sgmlDecl=""}else if((r.sgmlDecl+i).toUpperCase()===s){emitNode(r,"onopencdata");r.state=p.CDATA;r.sgmlDecl="";r.cdata=""}else if((r.sgmlDecl+i).toUpperCase()===o){r.state=p.DOCTYPE;if(r.doctype||r.sawRoot){strictFail(r,"Inappropriately located doctype declaration")}r.doctype="";r.sgmlDecl=""}else if(i===">"){emitNode(r,"onsgmldeclaration",r.sgmlDecl);r.sgmlDecl="";r.state=p.TEXT}else if(isQuote(i)){r.state=p.SGML_DECL_QUOTED;r.sgmlDecl+=i}else{r.sgmlDecl+=i}continue;case p.SGML_DECL_QUOTED:if(i===r.q){r.state=p.SGML_DECL;r.q=""}r.sgmlDecl+=i;continue;case p.DOCTYPE:if(i===">"){r.state=p.TEXT;emitNode(r,"ondoctype",r.doctype);r.doctype=true}else{r.doctype+=i;if(i==="["){r.state=p.DOCTYPE_DTD}else if(isQuote(i)){r.state=p.DOCTYPE_QUOTED;r.q=i}}continue;case p.DOCTYPE_QUOTED:r.doctype+=i;if(i===r.q){r.q="";r.state=p.DOCTYPE}continue;case p.DOCTYPE_DTD:if(i==="]"){r.doctype+=i;r.state=p.DOCTYPE}else if(i==="<"){r.state=p.OPEN_WAKA;r.startTagPosition=r.position}else if(isQuote(i)){r.doctype+=i;r.state=p.DOCTYPE_DTD_QUOTED;r.q=i}else{r.doctype+=i}continue;case p.DOCTYPE_DTD_QUOTED:r.doctype+=i;if(i===r.q){r.state=p.DOCTYPE_DTD;r.q=""}continue;case p.COMMENT:if(i==="-"){r.state=p.COMMENT_ENDING}else{r.comment+=i}continue;case p.COMMENT_ENDING:if(i==="-"){r.state=p.COMMENT_ENDED;r.comment=textopts(r.opt,r.comment);if(r.comment){emitNode(r,"oncomment",r.comment)}r.comment=""}else{r.comment+="-"+i;r.state=p.COMMENT}continue;case p.COMMENT_ENDED:if(i!==">"){strictFail(r,"Malformed comment");r.comment+="--"+i;r.state=p.COMMENT}else if(r.doctype&&r.doctype!==true){r.state=p.DOCTYPE_DTD}else{r.state=p.TEXT}continue;case p.CDATA:if(i==="]"){r.state=p.CDATA_ENDING}else{r.cdata+=i}continue;case p.CDATA_ENDING:if(i==="]"){r.state=p.CDATA_ENDING_2}else{r.cdata+="]"+i;r.state=p.CDATA}continue;case p.CDATA_ENDING_2:if(i===">"){if(r.cdata){emitNode(r,"oncdata",r.cdata)}emitNode(r,"onclosecdata");r.cdata="";r.state=p.TEXT}else if(i==="]"){r.cdata+="]"}else{r.cdata+="]]"+i;r.state=p.CDATA}continue;case p.PROC_INST:if(i==="?"){r.state=p.PROC_INST_ENDING}else if(isWhitespace(i)){r.state=p.PROC_INST_BODY}else{r.procInstName+=i}continue;case p.PROC_INST_BODY:if(!r.procInstBody&&isWhitespace(i)){continue}else if(i==="?"){r.state=p.PROC_INST_ENDING}else{r.procInstBody+=i}continue;case p.PROC_INST_ENDING:if(i===">"){emitNode(r,"onprocessinginstruction",{name:r.procInstName,body:r.procInstBody});r.procInstName=r.procInstBody="";r.state=p.TEXT}else{r.procInstBody+="?"+i;r.state=p.PROC_INST_BODY}continue;case p.OPEN_TAG:if(isMatch(d,i)){r.tagName+=i}else{newTag(r);if(i===">"){openTag(r)}else if(i==="/"){r.state=p.OPEN_TAG_SLASH}else{if(!isWhitespace(i)){strictFail(r,"Invalid character in tag name")}r.state=p.ATTRIB}}continue;case p.OPEN_TAG_SLASH:if(i===">"){openTag(r,true);closeTag(r)}else{strictFail(r,"Forward-slash in opening tag not followed by >");r.state=p.ATTRIB}continue;case p.ATTRIB:if(isWhitespace(i)){continue}else if(i===">"){openTag(r)}else if(i==="/"){r.state=p.OPEN_TAG_SLASH}else if(isMatch(l,i)){r.attribName=i;r.attribValue="";r.state=p.ATTRIB_NAME}else{strictFail(r,"Invalid attribute name")}continue;case p.ATTRIB_NAME:if(i==="="){r.state=p.ATTRIB_VALUE}else if(i===">"){strictFail(r,"Attribute without value");r.attribValue=r.attribName;attrib(r);openTag(r)}else if(isWhitespace(i)){r.state=p.ATTRIB_NAME_SAW_WHITE}else if(isMatch(d,i)){r.attribName+=i}else{strictFail(r,"Invalid attribute name")}continue;case p.ATTRIB_NAME_SAW_WHITE:if(i==="="){r.state=p.ATTRIB_VALUE}else if(isWhitespace(i)){continue}else{strictFail(r,"Attribute without value");r.tag.attributes[r.attribName]="";r.attribValue="";emitNode(r,"onattribute",{name:r.attribName,value:""});r.attribName="";if(i===">"){openTag(r)}else if(isMatch(l,i)){r.attribName=i;r.state=p.ATTRIB_NAME}else{strictFail(r,"Invalid attribute name");r.state=p.ATTRIB}}continue;case p.ATTRIB_VALUE:if(isWhitespace(i)){continue}else if(isQuote(i)){r.q=i;r.state=p.ATTRIB_VALUE_QUOTED}else{if(!r.opt.unquotedAttributeValues){error(r,"Unquoted attribute value")}r.state=p.ATTRIB_VALUE_UNQUOTED;r.attribValue=i}continue;case p.ATTRIB_VALUE_QUOTED:if(i!==r.q){if(i==="&"){r.state=p.ATTRIB_VALUE_ENTITY_Q}else{r.attribValue+=i}continue}attrib(r);r.q="";r.state=p.ATTRIB_VALUE_CLOSED;continue;case p.ATTRIB_VALUE_CLOSED:if(isWhitespace(i)){r.state=p.ATTRIB}else if(i===">"){openTag(r)}else if(i==="/"){r.state=p.OPEN_TAG_SLASH}else if(isMatch(l,i)){strictFail(r,"No whitespace between attributes");r.attribName=i;r.attribValue="";r.state=p.ATTRIB_NAME}else{strictFail(r,"Invalid attribute name")}continue;case p.ATTRIB_VALUE_UNQUOTED:if(!isAttribEnd(i)){if(i==="&"){r.state=p.ATTRIB_VALUE_ENTITY_U}else{r.attribValue+=i}continue}attrib(r);if(i===">"){openTag(r)}else{r.state=p.ATTRIB}continue;case p.CLOSE_TAG:if(!r.tagName){if(isWhitespace(i)){continue}else if(notMatch(l,i)){if(r.script){r.script+="</"+i;r.state=p.SCRIPT}else{strictFail(r,"Invalid tagname in closing tag.")}}else{r.tagName=i}}else if(i===">"){closeTag(r)}else if(isMatch(d,i)){r.tagName+=i}else if(r.script){r.script+="</"+r.tagName;r.tagName="";r.state=p.SCRIPT}else{if(!isWhitespace(i)){strictFail(r,"Invalid tagname in closing tag")}r.state=p.CLOSE_TAG_SAW_WHITE}continue;case p.CLOSE_TAG_SAW_WHITE:if(isWhitespace(i)){continue}if(i===">"){closeTag(r)}else{strictFail(r,"Invalid characters in closing tag")}continue;case p.TEXT_ENTITY:case p.ATTRIB_VALUE_ENTITY_Q:case p.ATTRIB_VALUE_ENTITY_U:var c;var y;switch(r.state){case p.TEXT_ENTITY:c=p.TEXT;y="textNode";break;case p.ATTRIB_VALUE_ENTITY_Q:c=p.ATTRIB_VALUE_QUOTED;y="attribValue";break;case p.ATTRIB_VALUE_ENTITY_U:c=p.ATTRIB_VALUE_UNQUOTED;y="attribValue";break}if(i===";"){var m=parseEntity(r);if(r.opt.unparsedEntities&&!Object.values(e.XML_ENTITIES).includes(m)){r.entity="";r.state=c;r.write(m)}else{r[y]+=m;r.entity="";r.state=c}}else if(isMatch(r.entity.length?h:f,i)){r.entity+=i}else{strictFail(r,"Invalid character in entity name");r[y]+="&"+r.entity+i;r.entity="";r.state=c}continue;default:{throw new Error(r,"Unknown state: "+r.state)}}}if(r.position>=r.bufferCheckPosition){checkBufferLength(r)}return r}
|
|
2
|
-
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint){(function(){var e=String.fromCharCode;var t=Math.floor;var fromCodePoint=function(){var r=16384;var n=[];var i;var s;var o=-1;var a=arguments.length;if(!a){return""}var u="";while(++o<a){var c=Number(arguments[o]);if(!isFinite(c)||c<0||c>1114111||t(c)!==c){throw RangeError("Invalid code point: "+c)}if(c<=65535){n.push(c)}else{c-=65536;i=(c>>10)+55296;s=c%1024+56320;n.push(i,s)}if(o+1===a||n.length>r){u+=e.apply(null,n);n.length=0}}return u};if(Object.defineProperty){Object.defineProperty(String,"fromCodePoint",{value:fromCodePoint,configurable:true,writable:true})}else{String.fromCodePoint=fromCodePoint}})()}})(false?0:t)},5414:function(e,t,r){"use strict";const n=r(857);const i=r(2871);const s=process.env;let o;if(i("no-color")||i("no-colors")||i("color=false")){o=false}else if(i("color")||i("colors")||i("color=true")||i("color=always")){o=true}if("FORCE_COLOR"in s){o=s.FORCE_COLOR.length===0||parseInt(s.FORCE_COLOR,10)!==0}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e){if(o===false){return 0}if(i("color=16m")||i("color=full")||i("color=truecolor")){return 3}if(i("color=256")){return 2}if(e&&!e.isTTY&&o!==true){return 0}const t=o?1:0;if(process.platform==="win32"){const e=n.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in s){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in s))||s.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in s){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0}if(s.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in s){const e=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(s.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)){return 1}if("COLORTERM"in s){return 1}if(s.TERM==="dumb"){return t}return t}function getSupportLevel(e){const t=supportsColor(e);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},452:function(e,t){(function(){"use strict";t.stripBOM=function(e){if(e[0]==="\ufeff"){return e.substring(1)}else{return e}}}).call(this)},8937:function(e,t,r){(function(){"use strict";var e,n,i,s,o,a={}.hasOwnProperty;e=r(1203);n=r(5706).defaults;s=function(e){return typeof e==="string"&&(e.indexOf("&")>=0||e.indexOf(">")>=0||e.indexOf("<")>=0)};o=function(e){return"<![CDATA["+i(e)+"]]>"};i=function(e){return e.replace("]]>","]]]]><![CDATA[>")};t.Builder=function(){function Builder(e){var t,r,i;this.options={};r=n["0.2"];for(t in r){if(!a.call(r,t))continue;i=r[t];this.options[t]=i}for(t in e){if(!a.call(e,t))continue;i=e[t];this.options[t]=i}}Builder.prototype.buildObject=function(t){var r,i,u,c,l;r=this.options.attrkey;i=this.options.charkey;if(Object.keys(t).length===1&&this.options.rootName===n["0.2"].rootName){l=Object.keys(t)[0];t=t[l]}else{l=this.options.rootName}u=function(e){return function(t,n){var c,l,d,f,h,p;if(typeof n!=="object"){if(e.options.cdata&&s(n)){t.raw(o(n))}else{t.txt(n)}}else if(Array.isArray(n)){for(f in n){if(!a.call(n,f))continue;l=n[f];for(h in l){d=l[h];t=u(t.ele(h),d).up()}}}else{for(h in n){if(!a.call(n,h))continue;l=n[h];if(h===r){if(typeof l==="object"){for(c in l){p=l[c];t=t.att(c,p)}}}else if(h===i){if(e.options.cdata&&s(l)){t=t.raw(o(l))}else{t=t.txt(l)}}else if(Array.isArray(l)){for(f in l){if(!a.call(l,f))continue;d=l[f];if(typeof d==="string"){if(e.options.cdata&&s(d)){t=t.ele(h).raw(o(d)).up()}else{t=t.ele(h,d).up()}}else{t=u(t.ele(h),d).up()}}}else if(typeof l==="object"){t=u(t.ele(h),l).up()}else{if(typeof l==="string"&&e.options.cdata&&s(l)){t=t.ele(h).raw(o(l)).up()}else{if(l==null){l=""}t=t.ele(h,l.toString()).up()}}}}return t}}(this);c=e.create(l,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars});return u(c,t).end(this.options.renderOpts)};return Builder}()}).call(this)},5706:function(e,t){(function(){t.defaults={.1:{explicitCharkey:false,trim:true,normalize:true,normalizeTags:false,attrkey:"@",charkey:"#",explicitArray:false,ignoreAttrs:false,mergeAttrs:false,explicitRoot:false,validator:null,xmlns:false,explicitChildren:false,childkey:"@@",charsAsChildren:false,includeWhiteChars:false,async:false,strict:true,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:false,trim:false,normalize:false,normalizeTags:false,attrkey:"$",charkey:"_",explicitArray:true,ignoreAttrs:false,mergeAttrs:false,explicitRoot:true,validator:null,xmlns:false,explicitChildren:false,preserveChildrenOrder:false,childkey:"$$",charsAsChildren:false,includeWhiteChars:false,async:false,strict:true,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:true},doctype:null,renderOpts:{pretty:true,indent:" ",newline:"\n"},headless:false,chunkSize:1e4,emptyTag:"",cdata:false}}}).call(this)},6343:function(e,t,r){(function(){"use strict";var e,n,i,s,o,a,u,c,l,bind=function(e,t){return function(){return e.apply(t,arguments)}},extend=function(e,t){for(var r in t){if(d.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},d={}.hasOwnProperty;c=r(6426);s=r(4434);e=r(452);u=r(9193);l=r(3557).setImmediate;n=r(5706).defaults;o=function(e){return typeof e==="object"&&e!=null&&Object.keys(e).length===0};a=function(e,t,r){var n,i,s;for(n=0,i=e.length;n<i;n++){s=e[n];t=s(t,r)}return t};i=function(e,t,r){var n;n=Object.create(null);n.value=r;n.writable=true;n.enumerable=true;n.configurable=true;return Object.defineProperty(e,t,n)};t.Parser=function(r){extend(Parser,r);function Parser(e){this.parseStringPromise=bind(this.parseStringPromise,this);this.parseString=bind(this.parseString,this);this.reset=bind(this.reset,this);this.assignOrPush=bind(this.assignOrPush,this);this.processAsync=bind(this.processAsync,this);var r,i,s;if(!(this instanceof t.Parser)){return new t.Parser(e)}this.options={};i=n["0.2"];for(r in i){if(!d.call(i,r))continue;s=i[r];this.options[r]=s}for(r in e){if(!d.call(e,r))continue;s=e[r];this.options[r]=s}if(this.options.xmlns){this.options.xmlnskey=this.options.attrkey+"ns"}if(this.options.normalizeTags){if(!this.options.tagNameProcessors){this.options.tagNameProcessors=[]}this.options.tagNameProcessors.unshift(u.normalize)}this.reset()}Parser.prototype.processAsync=function(){var e,t;try{if(this.remaining.length<=this.options.chunkSize){e=this.remaining;this.remaining="";this.saxParser=this.saxParser.write(e);return this.saxParser.close()}else{e=this.remaining.substr(0,this.options.chunkSize);this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length);this.saxParser=this.saxParser.write(e);return l(this.processAsync)}}catch(e){t=e;if(!this.saxParser.errThrown){this.saxParser.errThrown=true;return this.emit(t)}}};Parser.prototype.assignOrPush=function(e,t,r){if(!(t in e)){if(!this.options.explicitArray){return i(e,t,r)}else{return i(e,t,[r])}}else{if(!(e[t]instanceof Array)){i(e,t,[e[t]])}return e[t].push(r)}};Parser.prototype.reset=function(){var e,t,r,n;this.removeAllListeners();this.saxParser=c.parser(this.options.strict,{trim:false,normalize:false,xmlns:this.options.xmlns});this.saxParser.errThrown=false;this.saxParser.onerror=function(e){return function(t){e.saxParser.resume();if(!e.saxParser.errThrown){e.saxParser.errThrown=true;return e.emit("error",t)}}}(this);this.saxParser.onend=function(e){return function(){if(!e.saxParser.ended){e.saxParser.ended=true;return e.emit("end",e.resultObject)}}}(this);this.saxParser.ended=false;this.EXPLICIT_CHARKEY=this.options.explicitCharkey;this.resultObject=null;n=[];e=this.options.attrkey;t=this.options.charkey;this.saxParser.onopentag=function(r){return function(s){var o,u,c,l,f;c={};c[t]="";if(!r.options.ignoreAttrs){f=s.attributes;for(o in f){if(!d.call(f,o))continue;if(!(e in c)&&!r.options.mergeAttrs){c[e]={}}u=r.options.attrValueProcessors?a(r.options.attrValueProcessors,s.attributes[o],o):s.attributes[o];l=r.options.attrNameProcessors?a(r.options.attrNameProcessors,o):o;if(r.options.mergeAttrs){r.assignOrPush(c,l,u)}else{i(c[e],l,u)}}}c["#name"]=r.options.tagNameProcessors?a(r.options.tagNameProcessors,s.name):s.name;if(r.options.xmlns){c[r.options.xmlnskey]={uri:s.uri,local:s.local}}return n.push(c)}}(this);this.saxParser.onclosetag=function(e){return function(){var r,s,u,c,l,f,h,p,y,m;f=n.pop();l=f["#name"];if(!e.options.explicitChildren||!e.options.preserveChildrenOrder){delete f["#name"]}if(f.cdata===true){r=f.cdata;delete f.cdata}y=n[n.length-1];if(f[t].match(/^\s*$/)&&!r){s=f[t];delete f[t]}else{if(e.options.trim){f[t]=f[t].trim()}if(e.options.normalize){f[t]=f[t].replace(/\s{2,}/g," ").trim()}f[t]=e.options.valueProcessors?a(e.options.valueProcessors,f[t],l):f[t];if(Object.keys(f).length===1&&t in f&&!e.EXPLICIT_CHARKEY){f=f[t]}}if(o(f)){if(typeof e.options.emptyTag==="function"){f=e.options.emptyTag()}else{f=e.options.emptyTag!==""?e.options.emptyTag:s}}if(e.options.validator!=null){m="/"+function(){var e,t,r;r=[];for(e=0,t=n.length;e<t;e++){c=n[e];r.push(c["#name"])}return r}().concat(l).join("/");(function(){var t;try{return f=e.options.validator(m,y&&y[l],f)}catch(r){t=r;return e.emit("error",t)}})()}if(e.options.explicitChildren&&!e.options.mergeAttrs&&typeof f==="object"){if(!e.options.preserveChildrenOrder){c={};if(e.options.attrkey in f){c[e.options.attrkey]=f[e.options.attrkey];delete f[e.options.attrkey]}if(!e.options.charsAsChildren&&e.options.charkey in f){c[e.options.charkey]=f[e.options.charkey];delete f[e.options.charkey]}if(Object.getOwnPropertyNames(f).length>0){c[e.options.childkey]=f}f=c}else if(y){y[e.options.childkey]=y[e.options.childkey]||[];h={};for(u in f){if(!d.call(f,u))continue;i(h,u,f[u])}y[e.options.childkey].push(h);delete f["#name"];if(Object.keys(f).length===1&&t in f&&!e.EXPLICIT_CHARKEY){f=f[t]}}}if(n.length>0){return e.assignOrPush(y,l,f)}else{if(e.options.explicitRoot){p=f;f={};i(f,l,p)}e.resultObject=f;e.saxParser.ended=true;return e.emit("end",e.resultObject)}}}(this);r=function(e){return function(r){var i,s;s=n[n.length-1];if(s){s[t]+=r;if(e.options.explicitChildren&&e.options.preserveChildrenOrder&&e.options.charsAsChildren&&(e.options.includeWhiteChars||r.replace(/\\n/g,"").trim()!=="")){s[e.options.childkey]=s[e.options.childkey]||[];i={"#name":"__text__"};i[t]=r;if(e.options.normalize){i[t]=i[t].replace(/\s{2,}/g," ").trim()}s[e.options.childkey].push(i)}return s}}}(this);this.saxParser.ontext=r;return this.saxParser.oncdata=function(e){return function(e){var t;t=r(e);if(t){return t.cdata=true}}}(this)};Parser.prototype.parseString=function(t,r){var n;if(r!=null&&typeof r==="function"){this.on("end",(function(e){this.reset();return r(null,e)}));this.on("error",(function(e){this.reset();return r(e)}))}try{t=t.toString();if(t.trim()===""){this.emit("end",null);return true}t=e.stripBOM(t);if(this.options.async){this.remaining=t;l(this.processAsync);return this.saxParser}return this.saxParser.write(t).close()}catch(e){n=e;if(!(this.saxParser.errThrown||this.saxParser.ended)){this.emit("error",n);return this.saxParser.errThrown=true}else if(this.saxParser.ended){throw n}}};Parser.prototype.parseStringPromise=function(e){return new Promise(function(t){return function(r,n){return t.parseString(e,(function(e,t){if(e){return n(e)}else{return r(t)}}))}}(this))};return Parser}(s);t.parseString=function(e,r,n){var i,s,o;if(n!=null){if(typeof n==="function"){i=n}if(typeof r==="object"){s=r}}else{if(typeof r==="function"){i=r}s={}}o=new t.Parser(s);return o.parseString(e,i)};t.parseStringPromise=function(e,r){var n,i;if(typeof r==="object"){n=r}i=new t.Parser(n);return i.parseStringPromise(e)}}).call(this)},9193:function(e,t){(function(){"use strict";var e;e=new RegExp(/(?!xmlns)^.*:/);t.normalize=function(e){return e.toLowerCase()};t.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)};t.stripPrefix=function(t){return t.replace(e,"")};t.parseNumbers=function(e){if(!isNaN(e)){e=e%1===0?parseInt(e,10):parseFloat(e)}return e};t.parseBooleans=function(e){if(/^(?:true|false)$/i.test(e)){e=e.toLowerCase()==="true"}return e}}).call(this)},3362:function(e,t,r){(function(){"use strict";var e,n,i,s,extend=function(e,t){for(var r in t){if(o.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},o={}.hasOwnProperty;n=r(5706);e=r(8937);i=r(6343);s=r(9193);t.defaults=n.defaults;t.processors=s;t.ValidationError=function(e){extend(ValidationError,e);function ValidationError(e){this.message=e}return ValidationError}(Error);t.Builder=e.Builder;t.Parser=i.Parser;t.parseString=i.parseString;t.parseStringPromise=i.parseStringPromise}).call(this)},5921:function(e){(function(){e.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},1259:function(e){(function(){e.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},7871:function(e){(function(){var t,r,n,i,s,o,a,u=[].slice,c={}.hasOwnProperty;t=function(){var e,t,r,n,i,o;o=arguments[0],i=2<=arguments.length?u.call(arguments,1):[];if(s(Object.assign)){Object.assign.apply(null,arguments)}else{for(e=0,r=i.length;e<r;e++){n=i[e];if(n!=null){for(t in n){if(!c.call(n,t))continue;o[t]=n[t]}}}}return o};s=function(e){return!!e&&Object.prototype.toString.call(e)==="[object Function]"};o=function(e){var t;return!!e&&((t=typeof e)==="function"||t==="object")};n=function(e){if(s(Array.isArray)){return Array.isArray(e)}else{return Object.prototype.toString.call(e)==="[object Array]"}};i=function(e){var t;if(n(e)){return!e.length}else{for(t in e){if(!c.call(e,t))continue;return false}return true}};a=function(e){var t,r;return o(e)&&(r=Object.getPrototypeOf(e))&&(t=r.constructor)&&typeof t==="function"&&t instanceof t&&Function.prototype.toString.call(t)===Function.prototype.toString.call(Object)};r=function(e){if(s(e.valueOf)){return e.valueOf()}else{return e}};e.exports.assign=t;e.exports.isFunction=s;e.exports.isObject=o;e.exports.isArray=n;e.exports.isEmpty=i;e.exports.isPlainObject=a;e.exports.getValue=r}).call(this)},5471:function(e){(function(){e.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},5696:function(e,t,r){(function(){var t,n,i;t=r(1259);i=r(7730);e.exports=n=function(){function XMLAttribute(e,r,n){this.parent=e;if(this.parent){this.options=this.parent.options;this.stringify=this.parent.stringify}if(r==null){throw new Error("Missing attribute name. "+this.debugInfo(r))}this.name=this.stringify.name(r);this.value=this.stringify.attValue(n);this.type=t.Attribute;this.isId=false;this.schemaTypeInfo=null}Object.defineProperty(XMLAttribute.prototype,"nodeType",{get:function(){return this.type}});Object.defineProperty(XMLAttribute.prototype,"ownerElement",{get:function(){return this.parent}});Object.defineProperty(XMLAttribute.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}});Object.defineProperty(XMLAttribute.prototype,"namespaceURI",{get:function(){return""}});Object.defineProperty(XMLAttribute.prototype,"prefix",{get:function(){return""}});Object.defineProperty(XMLAttribute.prototype,"localName",{get:function(){return this.name}});Object.defineProperty(XMLAttribute.prototype,"specified",{get:function(){return true}});XMLAttribute.prototype.clone=function(){return Object.create(this)};XMLAttribute.prototype.toString=function(e){return this.options.writer.attribute(this,this.options.writer.filterOptions(e))};XMLAttribute.prototype.debugInfo=function(e){e=e||this.name;if(e==null){return"parent: <"+this.parent.name+">"}else{return"attribute: {"+e+"}, parent: <"+this.parent.name+">"}};XMLAttribute.prototype.isEqualNode=function(e){if(e.namespaceURI!==this.namespaceURI){return false}if(e.prefix!==this.prefix){return false}if(e.localName!==this.localName){return false}if(e.value!==this.value){return false}return true};return XMLAttribute}()}).call(this)},3705:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;t=r(1259);i=r(8363);e.exports=n=function(e){extend(XMLCData,e);function XMLCData(e,r){XMLCData.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing CDATA text. "+this.debugInfo())}this.name="#cdata-section";this.type=t.CData;this.value=this.stringify.cdata(r)}XMLCData.prototype.clone=function(){return Object.create(this)};XMLCData.prototype.toString=function(e){return this.options.writer.cdata(this,this.options.writer.filterOptions(e))};return XMLCData}(i)}).call(this)},8363:function(e,t,r){(function(){var t,n,extend=function(e,t){for(var r in t){if(i.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},i={}.hasOwnProperty;n=r(7730);e.exports=t=function(e){extend(XMLCharacterData,e);function XMLCharacterData(e){XMLCharacterData.__super__.constructor.call(this,e);this.value=""}Object.defineProperty(XMLCharacterData.prototype,"data",{get:function(){return this.value},set:function(e){return this.value=e||""}});Object.defineProperty(XMLCharacterData.prototype,"length",{get:function(){return this.value.length}});Object.defineProperty(XMLCharacterData.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}});XMLCharacterData.prototype.clone=function(){return Object.create(this)};XMLCharacterData.prototype.substringData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.appendData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.insertData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.deleteData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.replaceData=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.isEqualNode=function(e){if(!XMLCharacterData.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)){return false}if(e.data!==this.data){return false}return true};return XMLCharacterData}(n)}).call(this)},9677:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;t=r(1259);n=r(8363);e.exports=i=function(e){extend(XMLComment,e);function XMLComment(e,r){XMLComment.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing comment text. "+this.debugInfo())}this.name="#comment";this.type=t.Comment;this.value=this.stringify.comment(r)}XMLComment.prototype.clone=function(){return Object.create(this)};XMLComment.prototype.toString=function(e){return this.options.writer.comment(this,this.options.writer.filterOptions(e))};return XMLComment}(n)}).call(this)},6463:function(e,t,r){(function(){var t,n,i;n=r(4426);i=r(4545);e.exports=t=function(){function XMLDOMConfiguration(){var e;this.defaultParams={"canonical-form":false,"cdata-sections":false,comments:false,"datatype-normalization":false,"element-content-whitespace":true,entities:true,"error-handler":new n,infoset:true,"validate-if-schema":false,namespaces:true,"namespace-declarations":true,"normalize-characters":false,"schema-location":"","schema-type":"","split-cdata-sections":true,validate:false,"well-formed":true};this.params=e=Object.create(this.defaultParams)}Object.defineProperty(XMLDOMConfiguration.prototype,"parameterNames",{get:function(){return new i(Object.keys(this.defaultParams))}});XMLDOMConfiguration.prototype.getParameter=function(e){if(this.params.hasOwnProperty(e)){return this.params[e]}else{return null}};XMLDOMConfiguration.prototype.canSetParameter=function(e,t){return true};XMLDOMConfiguration.prototype.setParameter=function(e,t){if(t!=null){return this.params[e]=t}else{return delete this.params[e]}};return XMLDOMConfiguration}()}).call(this)},4426:function(e){(function(){var t;e.exports=t=function(){function XMLDOMErrorHandler(){}XMLDOMErrorHandler.prototype.handleError=function(e){throw new Error(e)};return XMLDOMErrorHandler}()}).call(this)},1926:function(e){(function(){var t;e.exports=t=function(){function XMLDOMImplementation(){}XMLDOMImplementation.prototype.hasFeature=function(e,t){return true};XMLDOMImplementation.prototype.createDocumentType=function(e,t,r){throw new Error("This DOM method is not implemented.")};XMLDOMImplementation.prototype.createDocument=function(e,t,r){throw new Error("This DOM method is not implemented.")};XMLDOMImplementation.prototype.createHTMLDocument=function(e){throw new Error("This DOM method is not implemented.")};XMLDOMImplementation.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented.")};return XMLDOMImplementation}()}).call(this)},4545:function(e){(function(){var t;e.exports=t=function(){function XMLDOMStringList(e){this.arr=e||[]}Object.defineProperty(XMLDOMStringList.prototype,"length",{get:function(){return this.arr.length}});XMLDOMStringList.prototype.item=function(e){return this.arr[e]||null};XMLDOMStringList.prototype.contains=function(e){return this.arr.indexOf(e)!==-1};return XMLDOMStringList}()}).call(this)},5145:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;i=r(7730);t=r(1259);e.exports=n=function(e){extend(XMLDTDAttList,e);function XMLDTDAttList(e,r,n,i,s,o){XMLDTDAttList.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(n==null){throw new Error("Missing DTD attribute name. "+this.debugInfo(r))}if(!i){throw new Error("Missing DTD attribute type. "+this.debugInfo(r))}if(!s){throw new Error("Missing DTD attribute default. "+this.debugInfo(r))}if(s.indexOf("#")!==0){s="#"+s}if(!s.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)){throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(r))}if(o&&!s.match(/^(#FIXED|#DEFAULT)$/)){throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(r))}this.elementName=this.stringify.name(r);this.type=t.AttributeDeclaration;this.attributeName=this.stringify.name(n);this.attributeType=this.stringify.dtdAttType(i);if(o){this.defaultValue=this.stringify.dtdAttDefault(o)}this.defaultValueType=s}XMLDTDAttList.prototype.toString=function(e){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(e))};return XMLDTDAttList}(i)}).call(this)},362:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;i=r(7730);t=r(1259);e.exports=n=function(e){extend(XMLDTDElement,e);function XMLDTDElement(e,r,n){XMLDTDElement.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(!n){n="(#PCDATA)"}if(Array.isArray(n)){n="("+n.join(",")+")"}this.name=this.stringify.name(r);this.type=t.ElementDeclaration;this.value=this.stringify.dtdElementValue(n)}XMLDTDElement.prototype.toString=function(e){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(e))};return XMLDTDElement}(i)}).call(this)},7847:function(e,t,r){(function(){var t,n,i,s,extend=function(e,t){for(var r in t){if(o.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},o={}.hasOwnProperty;s=r(7871).isObject;i=r(7730);t=r(1259);e.exports=n=function(e){extend(XMLDTDEntity,e);function XMLDTDEntity(e,r,n,i){XMLDTDEntity.__super__.constructor.call(this,e);if(n==null){throw new Error("Missing DTD entity name. "+this.debugInfo(n))}if(i==null){throw new Error("Missing DTD entity value. "+this.debugInfo(n))}this.pe=!!r;this.name=this.stringify.name(n);this.type=t.EntityDeclaration;if(!s(i)){this.value=this.stringify.dtdEntityValue(i);this.internal=true}else{if(!i.pubID&&!i.sysID){throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(n))}if(i.pubID&&!i.sysID){throw new Error("System identifier is required for a public external entity. "+this.debugInfo(n))}this.internal=false;if(i.pubID!=null){this.pubID=this.stringify.dtdPubID(i.pubID)}if(i.sysID!=null){this.sysID=this.stringify.dtdSysID(i.sysID)}if(i.nData!=null){this.nData=this.stringify.dtdNData(i.nData)}if(this.pe&&this.nData){throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(n))}}}Object.defineProperty(XMLDTDEntity.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDTDEntity.prototype,"systemId",{get:function(){return this.sysID}});Object.defineProperty(XMLDTDEntity.prototype,"notationName",{get:function(){return this.nData||null}});Object.defineProperty(XMLDTDEntity.prototype,"inputEncoding",{get:function(){return null}});Object.defineProperty(XMLDTDEntity.prototype,"xmlEncoding",{get:function(){return null}});Object.defineProperty(XMLDTDEntity.prototype,"xmlVersion",{get:function(){return null}});XMLDTDEntity.prototype.toString=function(e){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(e))};return XMLDTDEntity}(i)}).call(this)},5678:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;i=r(7730);t=r(1259);e.exports=n=function(e){extend(XMLDTDNotation,e);function XMLDTDNotation(e,r,n){XMLDTDNotation.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing DTD notation name. "+this.debugInfo(r))}if(!n.pubID&&!n.sysID){throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(r))}this.name=this.stringify.name(r);this.type=t.NotationDeclaration;if(n.pubID!=null){this.pubID=this.stringify.dtdPubID(n.pubID)}if(n.sysID!=null){this.sysID=this.stringify.dtdSysID(n.sysID)}}Object.defineProperty(XMLDTDNotation.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDTDNotation.prototype,"systemId",{get:function(){return this.sysID}});XMLDTDNotation.prototype.toString=function(e){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(e))};return XMLDTDNotation}(i)}).call(this)},4684:function(e,t,r){(function(){var t,n,i,s,extend=function(e,t){for(var r in t){if(o.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},o={}.hasOwnProperty;s=r(7871).isObject;i=r(7730);t=r(1259);e.exports=n=function(e){extend(XMLDeclaration,e);function XMLDeclaration(e,r,n,i){var o;XMLDeclaration.__super__.constructor.call(this,e);if(s(r)){o=r,r=o.version,n=o.encoding,i=o.standalone}if(!r){r="1.0"}this.type=t.Declaration;this.version=this.stringify.xmlVersion(r);if(n!=null){this.encoding=this.stringify.xmlEncoding(n)}if(i!=null){this.standalone=this.stringify.xmlStandalone(i)}}XMLDeclaration.prototype.toString=function(e){return this.options.writer.declaration(this,this.options.writer.filterOptions(e))};return XMLDeclaration}(i)}).call(this)},5522:function(e,t,r){(function(){var t,n,i,s,o,a,u,c,l,extend=function(e,t){for(var r in t){if(d.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},d={}.hasOwnProperty;l=r(7871).isObject;c=r(7730);t=r(1259);n=r(5145);s=r(7847);i=r(362);o=r(5678);u=r(2359);e.exports=a=function(e){extend(XMLDocType,e);function XMLDocType(e,r,n){var i,s,o,a,u,c;XMLDocType.__super__.constructor.call(this,e);this.type=t.DocType;if(e.children){a=e.children;for(s=0,o=a.length;s<o;s++){i=a[s];if(i.type===t.Element){this.name=i.name;break}}}this.documentObject=e;if(l(r)){u=r,r=u.pubID,n=u.sysID}if(n==null){c=[r,n],n=c[0],r=c[1]}if(r!=null){this.pubID=this.stringify.dtdPubID(r)}if(n!=null){this.sysID=this.stringify.dtdSysID(n)}}Object.defineProperty(XMLDocType.prototype,"entities",{get:function(){var e,r,n,i,s;i={};s=this.children;for(r=0,n=s.length;r<n;r++){e=s[r];if(e.type===t.EntityDeclaration&&!e.pe){i[e.name]=e}}return new u(i)}});Object.defineProperty(XMLDocType.prototype,"notations",{get:function(){var e,r,n,i,s;i={};s=this.children;for(r=0,n=s.length;r<n;r++){e=s[r];if(e.type===t.NotationDeclaration){i[e.name]=e}}return new u(i)}});Object.defineProperty(XMLDocType.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDocType.prototype,"systemId",{get:function(){return this.sysID}});Object.defineProperty(XMLDocType.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});XMLDocType.prototype.element=function(e,t){var r;r=new i(this,e,t);this.children.push(r);return this};XMLDocType.prototype.attList=function(e,t,r,i,s){var o;o=new n(this,e,t,r,i,s);this.children.push(o);return this};XMLDocType.prototype.entity=function(e,t){var r;r=new s(this,false,e,t);this.children.push(r);return this};XMLDocType.prototype.pEntity=function(e,t){var r;r=new s(this,true,e,t);this.children.push(r);return this};XMLDocType.prototype.notation=function(e,t){var r;r=new o(this,e,t);this.children.push(r);return this};XMLDocType.prototype.toString=function(e){return this.options.writer.docType(this,this.options.writer.filterOptions(e))};XMLDocType.prototype.ele=function(e,t){return this.element(e,t)};XMLDocType.prototype.att=function(e,t,r,n,i){return this.attList(e,t,r,n,i)};XMLDocType.prototype.ent=function(e,t){return this.entity(e,t)};XMLDocType.prototype.pent=function(e,t){return this.pEntity(e,t)};XMLDocType.prototype.not=function(e,t){return this.notation(e,t)};XMLDocType.prototype.up=function(){return this.root()||this.documentObject};XMLDocType.prototype.isEqualNode=function(e){if(!XMLDocType.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)){return false}if(e.name!==this.name){return false}if(e.publicId!==this.publicId){return false}if(e.systemId!==this.systemId){return false}return true};return XMLDocType}(c)}).call(this)},6047:function(e,t,r){(function(){var t,n,i,s,o,a,u,c,extend=function(e,t){for(var r in t){if(l.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},l={}.hasOwnProperty;c=r(7871).isPlainObject;i=r(1926);n=r(6463);o=r(7730);t=r(1259);u=r(5178);a=r(160);e.exports=s=function(e){extend(XMLDocument,e);function XMLDocument(e){XMLDocument.__super__.constructor.call(this,null);this.name="#document";this.type=t.Document;this.documentURI=null;this.domConfig=new n;e||(e={});if(!e.writer){e.writer=new a}this.options=e;this.stringify=new u(e)}Object.defineProperty(XMLDocument.prototype,"implementation",{value:new i});Object.defineProperty(XMLDocument.prototype,"doctype",{get:function(){var e,r,n,i;i=this.children;for(r=0,n=i.length;r<n;r++){e=i[r];if(e.type===t.DocType){return e}}return null}});Object.defineProperty(XMLDocument.prototype,"documentElement",{get:function(){return this.rootObject||null}});Object.defineProperty(XMLDocument.prototype,"inputEncoding",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"strictErrorChecking",{get:function(){return false}});Object.defineProperty(XMLDocument.prototype,"xmlEncoding",{get:function(){if(this.children.length!==0&&this.children[0].type===t.Declaration){return this.children[0].encoding}else{return null}}});Object.defineProperty(XMLDocument.prototype,"xmlStandalone",{get:function(){if(this.children.length!==0&&this.children[0].type===t.Declaration){return this.children[0].standalone==="yes"}else{return false}}});Object.defineProperty(XMLDocument.prototype,"xmlVersion",{get:function(){if(this.children.length!==0&&this.children[0].type===t.Declaration){return this.children[0].version}else{return"1.0"}}});Object.defineProperty(XMLDocument.prototype,"URL",{get:function(){return this.documentURI}});Object.defineProperty(XMLDocument.prototype,"origin",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"compatMode",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"characterSet",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"contentType",{get:function(){return null}});XMLDocument.prototype.end=function(e){var t;t={};if(!e){e=this.options.writer}else if(c(e)){t=e;e=this.options.writer}return e.document(this,e.filterOptions(t))};XMLDocument.prototype.toString=function(e){return this.options.writer.document(this,this.options.writer.filterOptions(e))};XMLDocument.prototype.createElement=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createTextNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createComment=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createCDATASection=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createProcessingInstruction=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createAttribute=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createEntityReference=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.importNode=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createElementNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementById=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.adoptNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.renameNode=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementsByClassName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createEvent=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createNodeIterator=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createTreeWalker=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};return XMLDocument}(o)}).call(this)},6698:function(e,t,r){(function(){var t,n,i,s,o,a,u,c,l,d,f,h,p,y,m,g,b,w,v,T,C,_,A,D,E={}.hasOwnProperty;D=r(7871),_=D.isObject,C=D.isFunction,A=D.isPlainObject,T=D.getValue;t=r(1259);h=r(6047);y=r(2520);s=r(3705);o=r(9677);g=r(8382);v=r(7389);m=r(7777);d=r(4684);f=r(5522);a=r(5145);c=r(7847);u=r(362);l=r(5678);i=r(5696);w=r(5178);b=r(160);n=r(5471);e.exports=p=function(){function XMLDocumentCB(e,r,n){var i;this.name="?xml";this.type=t.Document;e||(e={});i={};if(!e.writer){e.writer=new b}else if(A(e.writer)){i=e.writer;e.writer=new b}this.options=e;this.writer=e.writer;this.writerOptions=this.writer.filterOptions(i);this.stringify=new w(e);this.onDataCallback=r||function(){};this.onEndCallback=n||function(){};this.currentNode=null;this.currentLevel=-1;this.openTags={};this.documentStarted=false;this.documentCompleted=false;this.root=null}XMLDocumentCB.prototype.createChildNode=function(e){var r,n,i,s,o,a,u,c;switch(e.type){case t.CData:this.cdata(e.value);break;case t.Comment:this.comment(e.value);break;case t.Element:i={};u=e.attribs;for(n in u){if(!E.call(u,n))continue;r=u[n];i[n]=r.value}this.node(e.name,i);break;case t.Dummy:this.dummy();break;case t.Raw:this.raw(e.value);break;case t.Text:this.text(e.value);break;case t.ProcessingInstruction:this.instruction(e.target,e.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+e.constructor.name)}c=e.children;for(o=0,a=c.length;o<a;o++){s=c[o];this.createChildNode(s);if(s.type===t.Element){this.up()}}return this};XMLDocumentCB.prototype.dummy=function(){return this};XMLDocumentCB.prototype.node=function(e,t,r){var n;if(e==null){throw new Error("Missing node name.")}if(this.root&&this.currentLevel===-1){throw new Error("Document can only have one root node. "+this.debugInfo(e))}this.openCurrent();e=T(e);if(t==null){t={}}t=T(t);if(!_(t)){n=[t,r],r=n[0],t=n[1]}this.currentNode=new y(this,e,t);this.currentNode.children=false;this.currentLevel++;this.openTags[this.currentLevel]=this.currentNode;if(r!=null){this.text(r)}return this};XMLDocumentCB.prototype.element=function(e,r,n){var i,s,o,a,u,c;if(this.currentNode&&this.currentNode.type===t.DocType){this.dtdElement.apply(this,arguments)}else{if(Array.isArray(e)||_(e)||C(e)){a=this.options.noValidation;this.options.noValidation=true;c=new h(this.options).element("TEMP_ROOT");c.element(e);this.options.noValidation=a;u=c.children;for(s=0,o=u.length;s<o;s++){i=u[s];this.createChildNode(i);if(i.type===t.Element){this.up()}}}else{this.node(e,r,n)}}return this};XMLDocumentCB.prototype.attribute=function(e,t){var r,n;if(!this.currentNode||this.currentNode.children){throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(e))}if(e!=null){e=T(e)}if(_(e)){for(r in e){if(!E.call(e,r))continue;n=e[r];this.attribute(r,n)}}else{if(C(t)){t=t.apply()}if(this.options.keepNullAttributes&&t==null){this.currentNode.attribs[e]=new i(this,e,"")}else if(t!=null){this.currentNode.attribs[e]=new i(this,e,t)}}return this};XMLDocumentCB.prototype.text=function(e){var t;this.openCurrent();t=new v(this,e);this.onData(this.writer.text(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.cdata=function(e){var t;this.openCurrent();t=new s(this,e);this.onData(this.writer.cdata(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.comment=function(e){var t;this.openCurrent();t=new o(this,e);this.onData(this.writer.comment(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.raw=function(e){var t;this.openCurrent();t=new g(this,e);this.onData(this.writer.raw(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.instruction=function(e,t){var r,n,i,s,o;this.openCurrent();if(e!=null){e=T(e)}if(t!=null){t=T(t)}if(Array.isArray(e)){for(r=0,s=e.length;r<s;r++){n=e[r];this.instruction(n)}}else if(_(e)){for(n in e){if(!E.call(e,n))continue;i=e[n];this.instruction(n,i)}}else{if(C(t)){t=t.apply()}o=new m(this,e,t);this.onData(this.writer.processingInstruction(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1)}return this};XMLDocumentCB.prototype.declaration=function(e,t,r){var n;this.openCurrent();if(this.documentStarted){throw new Error("declaration() must be the first node.")}n=new d(this,e,t,r);this.onData(this.writer.declaration(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.doctype=function(e,t,r){this.openCurrent();if(e==null){throw new Error("Missing root node name.")}if(this.root){throw new Error("dtd() must come before the root node.")}this.currentNode=new f(this,t,r);this.currentNode.rootNodeName=e;this.currentNode.children=false;this.currentLevel++;this.openTags[this.currentLevel]=this.currentNode;return this};XMLDocumentCB.prototype.dtdElement=function(e,t){var r;this.openCurrent();r=new u(this,e,t);this.onData(this.writer.dtdElement(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.attList=function(e,t,r,n,i){var s;this.openCurrent();s=new a(this,e,t,r,n,i);this.onData(this.writer.dtdAttList(s,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.entity=function(e,t){var r;this.openCurrent();r=new c(this,false,e,t);this.onData(this.writer.dtdEntity(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.pEntity=function(e,t){var r;this.openCurrent();r=new c(this,true,e,t);this.onData(this.writer.dtdEntity(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.notation=function(e,t){var r;this.openCurrent();r=new l(this,e,t);this.onData(this.writer.dtdNotation(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.up=function(){if(this.currentLevel<0){throw new Error("The document node has no parent.")}if(this.currentNode){if(this.currentNode.children){this.closeNode(this.currentNode)}else{this.openNode(this.currentNode)}this.currentNode=null}else{this.closeNode(this.openTags[this.currentLevel])}delete this.openTags[this.currentLevel];this.currentLevel--;return this};XMLDocumentCB.prototype.end=function(){while(this.currentLevel>=0){this.up()}return this.onEnd()};XMLDocumentCB.prototype.openCurrent=function(){if(this.currentNode){this.currentNode.children=true;return this.openNode(this.currentNode)}};XMLDocumentCB.prototype.openNode=function(e){var r,i,s,o;if(!e.isOpen){if(!this.root&&this.currentLevel===0&&e.type===t.Element){this.root=e}i="";if(e.type===t.Element){this.writerOptions.state=n.OpenTag;i=this.writer.indent(e,this.writerOptions,this.currentLevel)+"<"+e.name;o=e.attribs;for(s in o){if(!E.call(o,s))continue;r=o[s];i+=this.writer.attribute(r,this.writerOptions,this.currentLevel)}i+=(e.children?">":"/>")+this.writer.endline(e,this.writerOptions,this.currentLevel);this.writerOptions.state=n.InsideTag}else{this.writerOptions.state=n.OpenTag;i=this.writer.indent(e,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+e.rootNodeName;if(e.pubID&&e.sysID){i+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'}else if(e.sysID){i+=' SYSTEM "'+e.sysID+'"'}if(e.children){i+=" [";this.writerOptions.state=n.InsideTag}else{this.writerOptions.state=n.CloseTag;i+=">"}i+=this.writer.endline(e,this.writerOptions,this.currentLevel)}this.onData(i,this.currentLevel);return e.isOpen=true}};XMLDocumentCB.prototype.closeNode=function(e){var r;if(!e.isClosed){r="";this.writerOptions.state=n.CloseTag;if(e.type===t.Element){r=this.writer.indent(e,this.writerOptions,this.currentLevel)+"</"+e.name+">"+this.writer.endline(e,this.writerOptions,this.currentLevel)}else{r=this.writer.indent(e,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(e,this.writerOptions,this.currentLevel)}this.writerOptions.state=n.None;this.onData(r,this.currentLevel);return e.isClosed=true}};XMLDocumentCB.prototype.onData=function(e,t){this.documentStarted=true;return this.onDataCallback(e,t+1)};XMLDocumentCB.prototype.onEnd=function(){this.documentCompleted=true;return this.onEndCallback()};XMLDocumentCB.prototype.debugInfo=function(e){if(e==null){return""}else{return"node: <"+e+">"}};XMLDocumentCB.prototype.ele=function(){return this.element.apply(this,arguments)};XMLDocumentCB.prototype.nod=function(e,t,r){return this.node(e,t,r)};XMLDocumentCB.prototype.txt=function(e){return this.text(e)};XMLDocumentCB.prototype.dat=function(e){return this.cdata(e)};XMLDocumentCB.prototype.com=function(e){return this.comment(e)};XMLDocumentCB.prototype.ins=function(e,t){return this.instruction(e,t)};XMLDocumentCB.prototype.dec=function(e,t,r){return this.declaration(e,t,r)};XMLDocumentCB.prototype.dtd=function(e,t,r){return this.doctype(e,t,r)};XMLDocumentCB.prototype.e=function(e,t,r){return this.element(e,t,r)};XMLDocumentCB.prototype.n=function(e,t,r){return this.node(e,t,r)};XMLDocumentCB.prototype.t=function(e){return this.text(e)};XMLDocumentCB.prototype.d=function(e){return this.cdata(e)};XMLDocumentCB.prototype.c=function(e){return this.comment(e)};XMLDocumentCB.prototype.r=function(e){return this.raw(e)};XMLDocumentCB.prototype.i=function(e,t){return this.instruction(e,t)};XMLDocumentCB.prototype.att=function(){if(this.currentNode&&this.currentNode.type===t.DocType){return this.attList.apply(this,arguments)}else{return this.attribute.apply(this,arguments)}};XMLDocumentCB.prototype.a=function(){if(this.currentNode&&this.currentNode.type===t.DocType){return this.attList.apply(this,arguments)}else{return this.attribute.apply(this,arguments)}};XMLDocumentCB.prototype.ent=function(e,t){return this.entity(e,t)};XMLDocumentCB.prototype.pent=function(e,t){return this.pEntity(e,t)};XMLDocumentCB.prototype.not=function(e,t){return this.notation(e,t)};return XMLDocumentCB}()}).call(this)},6916:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;i=r(7730);t=r(1259);e.exports=n=function(e){extend(XMLDummy,e);function XMLDummy(e){XMLDummy.__super__.constructor.call(this,e);this.type=t.Dummy}XMLDummy.prototype.clone=function(){return Object.create(this)};XMLDummy.prototype.toString=function(e){return""};return XMLDummy}(i)}).call(this)},2520:function(e,t,r){(function(){var t,n,i,s,o,a,u,c,l,extend=function(e,t){for(var r in t){if(d.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},d={}.hasOwnProperty;l=r(7871),c=l.isObject,u=l.isFunction,a=l.getValue;o=r(7730);t=r(1259);n=r(5696);s=r(2359);e.exports=i=function(e){extend(XMLElement,e);function XMLElement(e,r,n){var i,s,o,a;XMLElement.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing element name. "+this.debugInfo())}this.name=this.stringify.name(r);this.type=t.Element;this.attribs={};this.schemaTypeInfo=null;if(n!=null){this.attribute(n)}if(e.type===t.Document){this.isRoot=true;this.documentObject=e;e.rootObject=this;if(e.children){a=e.children;for(s=0,o=a.length;s<o;s++){i=a[s];if(i.type===t.DocType){i.name=this.name;break}}}}}Object.defineProperty(XMLElement.prototype,"tagName",{get:function(){return this.name}});Object.defineProperty(XMLElement.prototype,"namespaceURI",{get:function(){return""}});Object.defineProperty(XMLElement.prototype,"prefix",{get:function(){return""}});Object.defineProperty(XMLElement.prototype,"localName",{get:function(){return this.name}});Object.defineProperty(XMLElement.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"attributes",{get:function(){if(!this.attributeMap||!this.attributeMap.nodes){this.attributeMap=new s(this.attribs)}return this.attributeMap}});XMLElement.prototype.clone=function(){var e,t,r,n;r=Object.create(this);if(r.isRoot){r.documentObject=null}r.attribs={};n=this.attribs;for(t in n){if(!d.call(n,t))continue;e=n[t];r.attribs[t]=e.clone()}r.children=[];this.children.forEach((function(e){var t;t=e.clone();t.parent=r;return r.children.push(t)}));return r};XMLElement.prototype.attribute=function(e,t){var r,i;if(e!=null){e=a(e)}if(c(e)){for(r in e){if(!d.call(e,r))continue;i=e[r];this.attribute(r,i)}}else{if(u(t)){t=t.apply()}if(this.options.keepNullAttributes&&t==null){this.attribs[e]=new n(this,e,"")}else if(t!=null){this.attribs[e]=new n(this,e,t)}}return this};XMLElement.prototype.removeAttribute=function(e){var t,r,n;if(e==null){throw new Error("Missing attribute name. "+this.debugInfo())}e=a(e);if(Array.isArray(e)){for(r=0,n=e.length;r<n;r++){t=e[r];delete this.attribs[t]}}else{delete this.attribs[e]}return this};XMLElement.prototype.toString=function(e){return this.options.writer.element(this,this.options.writer.filterOptions(e))};XMLElement.prototype.att=function(e,t){return this.attribute(e,t)};XMLElement.prototype.a=function(e,t){return this.attribute(e,t)};XMLElement.prototype.getAttribute=function(e){if(this.attribs.hasOwnProperty(e)){return this.attribs[e].value}else{return null}};XMLElement.prototype.setAttribute=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getAttributeNode=function(e){if(this.attribs.hasOwnProperty(e)){return this.attribs[e]}else{return null}};XMLElement.prototype.setAttributeNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.removeAttributeNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setAttributeNS=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.removeAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getAttributeNodeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setAttributeNodeNS=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.hasAttribute=function(e){return this.attribs.hasOwnProperty(e)};XMLElement.prototype.hasAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setIdAttribute=function(e,t){if(this.attribs.hasOwnProperty(e)){return this.attribs[e].isId}else{return t}};XMLElement.prototype.setIdAttributeNS=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setIdAttributeNode=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByClassName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.isEqualNode=function(e){var t,r,n;if(!XMLElement.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)){return false}if(e.namespaceURI!==this.namespaceURI){return false}if(e.prefix!==this.prefix){return false}if(e.localName!==this.localName){return false}if(e.attribs.length!==this.attribs.length){return false}for(t=r=0,n=this.attribs.length-1;0<=n?r<=n:r>=n;t=0<=n?++r:--r){if(!this.attribs[t].isEqualNode(e.attribs[t])){return false}}return true};return XMLElement}(o)}).call(this)},2359:function(e){(function(){var t;e.exports=t=function(){function XMLNamedNodeMap(e){this.nodes=e}Object.defineProperty(XMLNamedNodeMap.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}});XMLNamedNodeMap.prototype.clone=function(){return this.nodes=null};XMLNamedNodeMap.prototype.getNamedItem=function(e){return this.nodes[e]};XMLNamedNodeMap.prototype.setNamedItem=function(e){var t;t=this.nodes[e.nodeName];this.nodes[e.nodeName]=e;return t||null};XMLNamedNodeMap.prototype.removeNamedItem=function(e){var t;t=this.nodes[e];delete this.nodes[e];return t||null};XMLNamedNodeMap.prototype.item=function(e){return this.nodes[Object.keys(this.nodes)[e]]||null};XMLNamedNodeMap.prototype.getNamedItemNS=function(e,t){throw new Error("This DOM method is not implemented.")};XMLNamedNodeMap.prototype.setNamedItemNS=function(e){throw new Error("This DOM method is not implemented.")};XMLNamedNodeMap.prototype.removeNamedItemNS=function(e,t){throw new Error("This DOM method is not implemented.")};return XMLNamedNodeMap}()}).call(this)},7730:function(e,t,r){(function(){var t,n,i,s,o,a,u,c,l,d,f,h,p,y,m,g,b,w,v,T={}.hasOwnProperty;v=r(7871),w=v.isObject,b=v.isFunction,g=v.isEmpty,m=v.getValue;c=null;i=null;s=null;o=null;a=null;p=null;y=null;h=null;u=null;n=null;f=null;l=null;t=null;e.exports=d=function(){function XMLNode(e){this.parent=e;if(this.parent){this.options=this.parent.options;this.stringify=this.parent.stringify}this.value=null;this.children=[];this.baseURI=null;if(!c){c=r(2520);i=r(3705);s=r(9677);o=r(4684);a=r(5522);p=r(8382);y=r(7389);h=r(7777);u=r(6916);n=r(1259);f=r(2374);l=r(2359);t=r(5921)}}Object.defineProperty(XMLNode.prototype,"nodeName",{get:function(){return this.name}});Object.defineProperty(XMLNode.prototype,"nodeType",{get:function(){return this.type}});Object.defineProperty(XMLNode.prototype,"nodeValue",{get:function(){return this.value}});Object.defineProperty(XMLNode.prototype,"parentNode",{get:function(){return this.parent}});Object.defineProperty(XMLNode.prototype,"childNodes",{get:function(){if(!this.childNodeList||!this.childNodeList.nodes){this.childNodeList=new f(this.children)}return this.childNodeList}});Object.defineProperty(XMLNode.prototype,"firstChild",{get:function(){return this.children[0]||null}});Object.defineProperty(XMLNode.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}});Object.defineProperty(XMLNode.prototype,"previousSibling",{get:function(){var e;e=this.parent.children.indexOf(this);return this.parent.children[e-1]||null}});Object.defineProperty(XMLNode.prototype,"nextSibling",{get:function(){var e;e=this.parent.children.indexOf(this);return this.parent.children[e+1]||null}});Object.defineProperty(XMLNode.prototype,"ownerDocument",{get:function(){return this.document()||null}});Object.defineProperty(XMLNode.prototype,"textContent",{get:function(){var e,t,r,i,s;if(this.nodeType===n.Element||this.nodeType===n.DocumentFragment){s="";i=this.children;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.textContent){s+=e.textContent}}return s}else{return null}},set:function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())}});XMLNode.prototype.setParent=function(e){var t,r,n,i,s;this.parent=e;if(e){this.options=e.options;this.stringify=e.stringify}i=this.children;s=[];for(r=0,n=i.length;r<n;r++){t=i[r];s.push(t.setParent(this))}return s};XMLNode.prototype.element=function(e,t,r){var n,i,s,o,a,u,c,l,d,f,h;u=null;if(t===null&&r==null){d=[{},null],t=d[0],r=d[1]}if(t==null){t={}}t=m(t);if(!w(t)){f=[t,r],r=f[0],t=f[1]}if(e!=null){e=m(e)}if(Array.isArray(e)){for(s=0,c=e.length;s<c;s++){i=e[s];u=this.element(i)}}else if(b(e)){u=this.element(e.apply())}else if(w(e)){for(a in e){if(!T.call(e,a))continue;h=e[a];if(b(h)){h=h.apply()}if(!this.options.ignoreDecorators&&this.stringify.convertAttKey&&a.indexOf(this.stringify.convertAttKey)===0){u=this.attribute(a.substr(this.stringify.convertAttKey.length),h)}else if(!this.options.separateArrayItems&&Array.isArray(h)&&g(h)){u=this.dummy()}else if(w(h)&&g(h)){u=this.element(a)}else if(!this.options.keepNullNodes&&h==null){u=this.dummy()}else if(!this.options.separateArrayItems&&Array.isArray(h)){for(o=0,l=h.length;o<l;o++){i=h[o];n={};n[a]=i;u=this.element(n)}}else if(w(h)){if(!this.options.ignoreDecorators&&this.stringify.convertTextKey&&a.indexOf(this.stringify.convertTextKey)===0){u=this.element(h)}else{u=this.element(a);u.element(h)}}else{u=this.element(a,h)}}}else if(!this.options.keepNullNodes&&r===null){u=this.dummy()}else{if(!this.options.ignoreDecorators&&this.stringify.convertTextKey&&e.indexOf(this.stringify.convertTextKey)===0){u=this.text(r)}else if(!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&e.indexOf(this.stringify.convertCDataKey)===0){u=this.cdata(r)}else if(!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&e.indexOf(this.stringify.convertCommentKey)===0){u=this.comment(r)}else if(!this.options.ignoreDecorators&&this.stringify.convertRawKey&&e.indexOf(this.stringify.convertRawKey)===0){u=this.raw(r)}else if(!this.options.ignoreDecorators&&this.stringify.convertPIKey&&e.indexOf(this.stringify.convertPIKey)===0){u=this.instruction(e.substr(this.stringify.convertPIKey.length),r)}else{u=this.node(e,t,r)}}if(u==null){throw new Error("Could not create any elements with: "+e+". "+this.debugInfo())}return u};XMLNode.prototype.insertBefore=function(e,t,r){var n,i,s,o,a;if(e!=null?e.type:void 0){s=e;o=t;s.setParent(this);if(o){i=children.indexOf(o);a=children.splice(i);children.push(s);Array.prototype.push.apply(children,a)}else{children.push(s)}return s}else{if(this.isRoot){throw new Error("Cannot insert elements at root level. "+this.debugInfo(e))}i=this.parent.children.indexOf(this);a=this.parent.children.splice(i);n=this.parent.element(e,t,r);Array.prototype.push.apply(this.parent.children,a);return n}};XMLNode.prototype.insertAfter=function(e,t,r){var n,i,s;if(this.isRoot){throw new Error("Cannot insert elements at root level. "+this.debugInfo(e))}i=this.parent.children.indexOf(this);s=this.parent.children.splice(i+1);n=this.parent.element(e,t,r);Array.prototype.push.apply(this.parent.children,s);return n};XMLNode.prototype.remove=function(){var e,t;if(this.isRoot){throw new Error("Cannot remove the root element. "+this.debugInfo())}e=this.parent.children.indexOf(this);[].splice.apply(this.parent.children,[e,e-e+1].concat(t=[])),t;return this.parent};XMLNode.prototype.node=function(e,t,r){var n,i;if(e!=null){e=m(e)}t||(t={});t=m(t);if(!w(t)){i=[t,r],r=i[0],t=i[1]}n=new c(this,e,t);if(r!=null){n.text(r)}this.children.push(n);return n};XMLNode.prototype.text=function(e){var t;if(w(e)){this.element(e)}t=new y(this,e);this.children.push(t);return this};XMLNode.prototype.cdata=function(e){var t;t=new i(this,e);this.children.push(t);return this};XMLNode.prototype.comment=function(e){var t;t=new s(this,e);this.children.push(t);return this};XMLNode.prototype.commentBefore=function(e){var t,r,n;r=this.parent.children.indexOf(this);n=this.parent.children.splice(r);t=this.parent.comment(e);Array.prototype.push.apply(this.parent.children,n);return this};XMLNode.prototype.commentAfter=function(e){var t,r,n;r=this.parent.children.indexOf(this);n=this.parent.children.splice(r+1);t=this.parent.comment(e);Array.prototype.push.apply(this.parent.children,n);return this};XMLNode.prototype.raw=function(e){var t;t=new p(this,e);this.children.push(t);return this};XMLNode.prototype.dummy=function(){var e;e=new u(this);return e};XMLNode.prototype.instruction=function(e,t){var r,n,i,s,o;if(e!=null){e=m(e)}if(t!=null){t=m(t)}if(Array.isArray(e)){for(s=0,o=e.length;s<o;s++){r=e[s];this.instruction(r)}}else if(w(e)){for(r in e){if(!T.call(e,r))continue;n=e[r];this.instruction(r,n)}}else{if(b(t)){t=t.apply()}i=new h(this,e,t);this.children.push(i)}return this};XMLNode.prototype.instructionBefore=function(e,t){var r,n,i;n=this.parent.children.indexOf(this);i=this.parent.children.splice(n);r=this.parent.instruction(e,t);Array.prototype.push.apply(this.parent.children,i);return this};XMLNode.prototype.instructionAfter=function(e,t){var r,n,i;n=this.parent.children.indexOf(this);i=this.parent.children.splice(n+1);r=this.parent.instruction(e,t);Array.prototype.push.apply(this.parent.children,i);return this};XMLNode.prototype.declaration=function(e,t,r){var i,s;i=this.document();s=new o(i,e,t,r);if(i.children.length===0){i.children.unshift(s)}else if(i.children[0].type===n.Declaration){i.children[0]=s}else{i.children.unshift(s)}return i.root()||i};XMLNode.prototype.dtd=function(e,t){var r,i,s,o,u,c,l,d,f,h;i=this.document();s=new a(i,e,t);f=i.children;for(o=u=0,l=f.length;u<l;o=++u){r=f[o];if(r.type===n.DocType){i.children[o]=s;return s}}h=i.children;for(o=c=0,d=h.length;c<d;o=++c){r=h[o];if(r.isRoot){i.children.splice(o,0,s);return s}}i.children.push(s);return s};XMLNode.prototype.up=function(){if(this.isRoot){throw new Error("The root node has no parent. Use doc() if you need to get the document object.")}return this.parent};XMLNode.prototype.root=function(){var e;e=this;while(e){if(e.type===n.Document){return e.rootObject}else if(e.isRoot){return e}else{e=e.parent}}};XMLNode.prototype.document=function(){var e;e=this;while(e){if(e.type===n.Document){return e}else{e=e.parent}}};XMLNode.prototype.end=function(e){return this.document().end(e)};XMLNode.prototype.prev=function(){var e;e=this.parent.children.indexOf(this);if(e<1){throw new Error("Already at the first node. "+this.debugInfo())}return this.parent.children[e-1]};XMLNode.prototype.next=function(){var e;e=this.parent.children.indexOf(this);if(e===-1||e===this.parent.children.length-1){throw new Error("Already at the last node. "+this.debugInfo())}return this.parent.children[e+1]};XMLNode.prototype.importDocument=function(e){var t;t=e.root().clone();t.parent=this;t.isRoot=false;this.children.push(t);return this};XMLNode.prototype.debugInfo=function(e){var t,r;e=e||this.name;if(e==null&&!((t=this.parent)!=null?t.name:void 0)){return""}else if(e==null){return"parent: <"+this.parent.name+">"}else if(!((r=this.parent)!=null?r.name:void 0)){return"node: <"+e+">"}else{return"node: <"+e+">, parent: <"+this.parent.name+">"}};XMLNode.prototype.ele=function(e,t,r){return this.element(e,t,r)};XMLNode.prototype.nod=function(e,t,r){return this.node(e,t,r)};XMLNode.prototype.txt=function(e){return this.text(e)};XMLNode.prototype.dat=function(e){return this.cdata(e)};XMLNode.prototype.com=function(e){return this.comment(e)};XMLNode.prototype.ins=function(e,t){return this.instruction(e,t)};XMLNode.prototype.doc=function(){return this.document()};XMLNode.prototype.dec=function(e,t,r){return this.declaration(e,t,r)};XMLNode.prototype.e=function(e,t,r){return this.element(e,t,r)};XMLNode.prototype.n=function(e,t,r){return this.node(e,t,r)};XMLNode.prototype.t=function(e){return this.text(e)};XMLNode.prototype.d=function(e){return this.cdata(e)};XMLNode.prototype.c=function(e){return this.comment(e)};XMLNode.prototype.r=function(e){return this.raw(e)};XMLNode.prototype.i=function(e,t){return this.instruction(e,t)};XMLNode.prototype.u=function(){return this.up()};XMLNode.prototype.importXMLBuilder=function(e){return this.importDocument(e)};XMLNode.prototype.replaceChild=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.removeChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.appendChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.hasChildNodes=function(){return this.children.length!==0};XMLNode.prototype.cloneNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.isSupported=function(e,t){return true};XMLNode.prototype.hasAttributes=function(){return this.attribs.length!==0};XMLNode.prototype.compareDocumentPosition=function(e){var r,n;r=this;if(r===e){return 0}else if(this.document()!==e.document()){n=t.Disconnected|t.ImplementationSpecific;if(Math.random()<.5){n|=t.Preceding}else{n|=t.Following}return n}else if(r.isAncestor(e)){return t.Contains|t.Preceding}else if(r.isDescendant(e)){return t.Contains|t.Following}else if(r.isPreceding(e)){return t.Preceding}else{return t.Following}};XMLNode.prototype.isSameNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.lookupPrefix=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.isDefaultNamespace=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.lookupNamespaceURI=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.isEqualNode=function(e){var t,r,n;if(e.nodeType!==this.nodeType){return false}if(e.children.length!==this.children.length){return false}for(t=r=0,n=this.children.length-1;0<=n?r<=n:r>=n;t=0<=n?++r:--r){if(!this.children[t].isEqualNode(e.children[t])){return false}}return true};XMLNode.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.setUserData=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.getUserData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.contains=function(e){if(!e){return false}return e===this||this.isDescendant(e)};XMLNode.prototype.isDescendant=function(e){var t,r,n,i,s;s=this.children;for(n=0,i=s.length;n<i;n++){t=s[n];if(e===t){return true}r=t.isDescendant(e);if(r){return true}}return false};XMLNode.prototype.isAncestor=function(e){return e.isDescendant(this)};XMLNode.prototype.isPreceding=function(e){var t,r;t=this.treePosition(e);r=this.treePosition(this);if(t===-1||r===-1){return false}else{return t<r}};XMLNode.prototype.isFollowing=function(e){var t,r;t=this.treePosition(e);r=this.treePosition(this);if(t===-1||r===-1){return false}else{return t>r}};XMLNode.prototype.treePosition=function(e){var t,r;r=0;t=false;this.foreachTreeNode(this.document(),(function(n){r++;if(!t&&n===e){return t=true}}));if(t){return r}else{return-1}};XMLNode.prototype.foreachTreeNode=function(e,t){var r,n,i,s,o;e||(e=this.document());s=e.children;for(n=0,i=s.length;n<i;n++){r=s[n];if(o=t(r)){return o}else{o=this.foreachTreeNode(r,t);if(o){return o}}}};return XMLNode}()}).call(this)},2374:function(e){(function(){var t;e.exports=t=function(){function XMLNodeList(e){this.nodes=e}Object.defineProperty(XMLNodeList.prototype,"length",{get:function(){return this.nodes.length||0}});XMLNodeList.prototype.clone=function(){return this.nodes=null};XMLNodeList.prototype.item=function(e){return this.nodes[e]||null};return XMLNodeList}()}).call(this)},7777:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;t=r(1259);n=r(8363);e.exports=i=function(e){extend(XMLProcessingInstruction,e);function XMLProcessingInstruction(e,r,n){XMLProcessingInstruction.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing instruction target. "+this.debugInfo())}this.type=t.ProcessingInstruction;this.target=this.stringify.insTarget(r);this.name=this.target;if(n){this.value=this.stringify.insValue(n)}}XMLProcessingInstruction.prototype.clone=function(){return Object.create(this)};XMLProcessingInstruction.prototype.toString=function(e){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(e))};XMLProcessingInstruction.prototype.isEqualNode=function(e){if(!XMLProcessingInstruction.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)){return false}if(e.target!==this.target){return false}return true};return XMLProcessingInstruction}(n)}).call(this)},8382:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;t=r(1259);n=r(7730);e.exports=i=function(e){extend(XMLRaw,e);function XMLRaw(e,r){XMLRaw.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing raw text. "+this.debugInfo())}this.type=t.Raw;this.value=this.stringify.raw(r)}XMLRaw.prototype.clone=function(){return Object.create(this)};XMLRaw.prototype.toString=function(e){return this.options.writer.raw(this,this.options.writer.filterOptions(e))};return XMLRaw}(n)}).call(this)},5345:function(e,t,r){(function(){var t,n,i,s,extend=function(e,t){for(var r in t){if(o.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},o={}.hasOwnProperty;t=r(1259);s=r(6664);n=r(5471);e.exports=i=function(e){extend(XMLStreamWriter,e);function XMLStreamWriter(e,t){this.stream=e;XMLStreamWriter.__super__.constructor.call(this,t)}XMLStreamWriter.prototype.endline=function(e,t,r){if(e.isLastRootNode&&t.state===n.CloseTag){return""}else{return XMLStreamWriter.__super__.endline.call(this,e,t,r)}};XMLStreamWriter.prototype.document=function(e,t){var r,n,i,s,o,a,u,c,l;u=e.children;for(n=i=0,o=u.length;i<o;n=++i){r=u[n];r.isLastRootNode=n===e.children.length-1}t=this.filterOptions(t);c=e.children;l=[];for(s=0,a=c.length;s<a;s++){r=c[s];l.push(this.writeChildNode(r,t,0))}return l};XMLStreamWriter.prototype.attribute=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.attribute.call(this,e,t,r))};XMLStreamWriter.prototype.cdata=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.cdata.call(this,e,t,r))};XMLStreamWriter.prototype.comment=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.comment.call(this,e,t,r))};XMLStreamWriter.prototype.declaration=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.declaration.call(this,e,t,r))};XMLStreamWriter.prototype.docType=function(e,t,r){var i,s,o,a;r||(r=0);this.openNode(e,t,r);t.state=n.OpenTag;this.stream.write(this.indent(e,t,r));this.stream.write("<!DOCTYPE "+e.root().name);if(e.pubID&&e.sysID){this.stream.write(' PUBLIC "'+e.pubID+'" "'+e.sysID+'"')}else if(e.sysID){this.stream.write(' SYSTEM "'+e.sysID+'"')}if(e.children.length>0){this.stream.write(" [");this.stream.write(this.endline(e,t,r));t.state=n.InsideTag;a=e.children;for(s=0,o=a.length;s<o;s++){i=a[s];this.writeChildNode(i,t,r+1)}t.state=n.CloseTag;this.stream.write("]")}t.state=n.CloseTag;this.stream.write(t.spaceBeforeSlash+">");this.stream.write(this.endline(e,t,r));t.state=n.None;return this.closeNode(e,t,r)};XMLStreamWriter.prototype.element=function(e,r,i){var s,a,u,c,l,d,f,h,p,y;i||(i=0);this.openNode(e,r,i);r.state=n.OpenTag;this.stream.write(this.indent(e,r,i)+"<"+e.name);p=e.attribs;for(f in p){if(!o.call(p,f))continue;s=p[f];this.attribute(s,r,i)}u=e.children.length;c=u===0?null:e.children[0];if(u===0||e.children.every((function(e){return(e.type===t.Text||e.type===t.Raw)&&e.value===""}))){if(r.allowEmpty){this.stream.write(">");r.state=n.CloseTag;this.stream.write("</"+e.name+">")}else{r.state=n.CloseTag;this.stream.write(r.spaceBeforeSlash+"/>")}}else if(r.pretty&&u===1&&(c.type===t.Text||c.type===t.Raw)&&c.value!=null){this.stream.write(">");r.state=n.InsideTag;r.suppressPrettyCount++;h=true;this.writeChildNode(c,r,i+1);r.suppressPrettyCount--;h=false;r.state=n.CloseTag;this.stream.write("</"+e.name+">")}else{this.stream.write(">"+this.endline(e,r,i));r.state=n.InsideTag;y=e.children;for(l=0,d=y.length;l<d;l++){a=y[l];this.writeChildNode(a,r,i+1)}r.state=n.CloseTag;this.stream.write(this.indent(e,r,i)+"</"+e.name+">")}this.stream.write(this.endline(e,r,i));r.state=n.None;return this.closeNode(e,r,i)};XMLStreamWriter.prototype.processingInstruction=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.processingInstruction.call(this,e,t,r))};XMLStreamWriter.prototype.raw=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.raw.call(this,e,t,r))};XMLStreamWriter.prototype.text=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.text.call(this,e,t,r))};XMLStreamWriter.prototype.dtdAttList=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.dtdAttList.call(this,e,t,r))};XMLStreamWriter.prototype.dtdElement=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.dtdElement.call(this,e,t,r))};XMLStreamWriter.prototype.dtdEntity=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.dtdEntity.call(this,e,t,r))};XMLStreamWriter.prototype.dtdNotation=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.dtdNotation.call(this,e,t,r))};return XMLStreamWriter}(s)}).call(this)},160:function(e,t,r){(function(){var t,n,extend=function(e,t){for(var r in t){if(i.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},i={}.hasOwnProperty;n=r(6664);e.exports=t=function(e){extend(XMLStringWriter,e);function XMLStringWriter(e){XMLStringWriter.__super__.constructor.call(this,e)}XMLStringWriter.prototype.document=function(e,t){var r,n,i,s,o;t=this.filterOptions(t);s="";o=e.children;for(n=0,i=o.length;n<i;n++){r=o[n];s+=this.writeChildNode(r,t,0)}if(t.pretty&&s.slice(-t.newline.length)===t.newline){s=s.slice(0,-t.newline.length)}return s};return XMLStringWriter}(n)}).call(this)},5178:function(e){(function(){var t,bind=function(e,t){return function(){return e.apply(t,arguments)}},r={}.hasOwnProperty;e.exports=t=function(){function XMLStringifier(e){this.assertLegalName=bind(this.assertLegalName,this);this.assertLegalChar=bind(this.assertLegalChar,this);var t,n,i;e||(e={});this.options=e;if(!this.options.version){this.options.version="1.0"}n=e.stringify||{};for(t in n){if(!r.call(n,t))continue;i=n[t];this[t]=i}}XMLStringifier.prototype.name=function(e){if(this.options.noValidation){return e}return this.assertLegalName(""+e||"")};XMLStringifier.prototype.text=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(this.textEscape(""+e||""))};XMLStringifier.prototype.cdata=function(e){if(this.options.noValidation){return e}e=""+e||"";e=e.replace("]]>","]]]]><![CDATA[>");return this.assertLegalChar(e)};XMLStringifier.prototype.comment=function(e){if(this.options.noValidation){return e}e=""+e||"";if(e.match(/--/)){throw new Error("Comment text cannot contain double-hypen: "+e)}return this.assertLegalChar(e)};XMLStringifier.prototype.raw=function(e){if(this.options.noValidation){return e}return""+e||""};XMLStringifier.prototype.attValue=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(this.attEscape(e=""+e||""))};XMLStringifier.prototype.insTarget=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(""+e||"")};XMLStringifier.prototype.insValue=function(e){if(this.options.noValidation){return e}e=""+e||"";if(e.match(/\?>/)){throw new Error("Invalid processing instruction value: "+e)}return this.assertLegalChar(e)};XMLStringifier.prototype.xmlVersion=function(e){if(this.options.noValidation){return e}e=""+e||"";if(!e.match(/1\.[0-9]+/)){throw new Error("Invalid version number: "+e)}return e};XMLStringifier.prototype.xmlEncoding=function(e){if(this.options.noValidation){return e}e=""+e||"";if(!e.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)){throw new Error("Invalid encoding: "+e)}return this.assertLegalChar(e)};XMLStringifier.prototype.xmlStandalone=function(e){if(this.options.noValidation){return e}if(e){return"yes"}else{return"no"}};XMLStringifier.prototype.dtdPubID=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(""+e||"")};XMLStringifier.prototype.dtdSysID=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(""+e||"")};XMLStringifier.prototype.dtdElementValue=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(""+e||"")};XMLStringifier.prototype.dtdAttType=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(""+e||"")};XMLStringifier.prototype.dtdAttDefault=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(""+e||"")};XMLStringifier.prototype.dtdEntityValue=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(""+e||"")};XMLStringifier.prototype.dtdNData=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(""+e||"")};XMLStringifier.prototype.convertAttKey="@";XMLStringifier.prototype.convertPIKey="?";XMLStringifier.prototype.convertTextKey="#text";XMLStringifier.prototype.convertCDataKey="#cdata";XMLStringifier.prototype.convertCommentKey="#comment";XMLStringifier.prototype.convertRawKey="#raw";XMLStringifier.prototype.assertLegalChar=function(e){var t,r;if(this.options.noValidation){return e}t="";if(this.options.version==="1.0"){t=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(r=e.match(t)){throw new Error("Invalid character in string: "+e+" at index "+r.index)}}else if(this.options.version==="1.1"){t=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(r=e.match(t)){throw new Error("Invalid character in string: "+e+" at index "+r.index)}}return e};XMLStringifier.prototype.assertLegalName=function(e){var t;if(this.options.noValidation){return e}this.assertLegalChar(e);t=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/;if(!e.match(t)){throw new Error("Invalid character in name")}return e};XMLStringifier.prototype.textEscape=function(e){var t;if(this.options.noValidation){return e}t=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return e.replace(t,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")};XMLStringifier.prototype.attEscape=function(e){var t;if(this.options.noValidation){return e}t=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return e.replace(t,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")};return XMLStringifier}()}).call(this)},7389:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;t=r(1259);n=r(8363);e.exports=i=function(e){extend(XMLText,e);function XMLText(e,r){XMLText.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing element text. "+this.debugInfo())}this.name="#text";this.type=t.Text;this.value=this.stringify.text(r)}Object.defineProperty(XMLText.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLText.prototype,"wholeText",{get:function(){var e,t,r;r="";t=this.previousSibling;while(t){r=t.data+r;t=t.previousSibling}r+=this.data;e=this.nextSibling;while(e){r=r+e.data;e=e.nextSibling}return r}});XMLText.prototype.clone=function(){return Object.create(this)};XMLText.prototype.toString=function(e){return this.options.writer.text(this,this.options.writer.filterOptions(e))};XMLText.prototype.splitText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLText.prototype.replaceWholeText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};return XMLText}(n)}).call(this)},6664:function(e,t,r){(function(){var t,n,i,s,o,a,u,c,l,d,f,h,p,y,m,g,b,w={}.hasOwnProperty;b=r(7871).assign;t=r(1259);l=r(4684);d=r(5522);i=r(3705);s=r(9677);h=r(2520);y=r(8382);m=r(7389);p=r(7777);f=r(6916);o=r(5145);a=r(362);u=r(7847);c=r(5678);n=r(5471);e.exports=g=function(){function XMLWriterBase(e){var t,r,n;e||(e={});this.options=e;r=e.writer||{};for(t in r){if(!w.call(r,t))continue;n=r[t];this["_"+t]=this[t];this[t]=n}}XMLWriterBase.prototype.filterOptions=function(e){var t,r,i,s,o,a,u,c;e||(e={});e=b({},this.options,e);t={writer:this};t.pretty=e.pretty||false;t.allowEmpty=e.allowEmpty||false;t.indent=(r=e.indent)!=null?r:" ";t.newline=(i=e.newline)!=null?i:"\n";t.offset=(s=e.offset)!=null?s:0;t.dontPrettyTextNodes=(o=(a=e.dontPrettyTextNodes)!=null?a:e.dontprettytextnodes)!=null?o:0;t.spaceBeforeSlash=(u=(c=e.spaceBeforeSlash)!=null?c:e.spacebeforeslash)!=null?u:"";if(t.spaceBeforeSlash===true){t.spaceBeforeSlash=" "}t.suppressPrettyCount=0;t.user={};t.state=n.None;return t};XMLWriterBase.prototype.indent=function(e,t,r){var n;if(!t.pretty||t.suppressPrettyCount){return""}else if(t.pretty){n=(r||0)+t.offset+1;if(n>0){return new Array(n).join(t.indent)}}return""};XMLWriterBase.prototype.endline=function(e,t,r){if(!t.pretty||t.suppressPrettyCount){return""}else{return t.newline}};XMLWriterBase.prototype.attribute=function(e,t,r){var n;this.openAttribute(e,t,r);n=" "+e.name+'="'+e.value+'"';this.closeAttribute(e,t,r);return n};XMLWriterBase.prototype.cdata=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r)+"<![CDATA[";t.state=n.InsideTag;i+=e.value;t.state=n.CloseTag;i+="]]>"+this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.comment=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r)+"\x3c!-- ";t.state=n.InsideTag;i+=e.value;t.state=n.CloseTag;i+=" --\x3e"+this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.declaration=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r)+"<?xml";t.state=n.InsideTag;i+=' version="'+e.version+'"';if(e.encoding!=null){i+=' encoding="'+e.encoding+'"'}if(e.standalone!=null){i+=' standalone="'+e.standalone+'"'}t.state=n.CloseTag;i+=t.spaceBeforeSlash+"?>";i+=this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.docType=function(e,t,r){var i,s,o,a,u;r||(r=0);this.openNode(e,t,r);t.state=n.OpenTag;a=this.indent(e,t,r);a+="<!DOCTYPE "+e.root().name;if(e.pubID&&e.sysID){a+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'}else if(e.sysID){a+=' SYSTEM "'+e.sysID+'"'}if(e.children.length>0){a+=" [";a+=this.endline(e,t,r);t.state=n.InsideTag;u=e.children;for(s=0,o=u.length;s<o;s++){i=u[s];a+=this.writeChildNode(i,t,r+1)}t.state=n.CloseTag;a+="]"}t.state=n.CloseTag;a+=t.spaceBeforeSlash+">";a+=this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return a};XMLWriterBase.prototype.element=function(e,r,i){var s,o,a,u,c,l,d,f,h,p,y,m,g,b;i||(i=0);p=false;y="";this.openNode(e,r,i);r.state=n.OpenTag;y+=this.indent(e,r,i)+"<"+e.name;m=e.attribs;for(h in m){if(!w.call(m,h))continue;s=m[h];y+=this.attribute(s,r,i)}a=e.children.length;u=a===0?null:e.children[0];if(a===0||e.children.every((function(e){return(e.type===t.Text||e.type===t.Raw)&&e.value===""}))){if(r.allowEmpty){y+=">";r.state=n.CloseTag;y+="</"+e.name+">"+this.endline(e,r,i)}else{r.state=n.CloseTag;y+=r.spaceBeforeSlash+"/>"+this.endline(e,r,i)}}else if(r.pretty&&a===1&&(u.type===t.Text||u.type===t.Raw)&&u.value!=null){y+=">";r.state=n.InsideTag;r.suppressPrettyCount++;p=true;y+=this.writeChildNode(u,r,i+1);r.suppressPrettyCount--;p=false;r.state=n.CloseTag;y+="</"+e.name+">"+this.endline(e,r,i)}else{if(r.dontPrettyTextNodes){g=e.children;for(c=0,d=g.length;c<d;c++){o=g[c];if((o.type===t.Text||o.type===t.Raw)&&o.value!=null){r.suppressPrettyCount++;p=true;break}}}y+=">"+this.endline(e,r,i);r.state=n.InsideTag;b=e.children;for(l=0,f=b.length;l<f;l++){o=b[l];y+=this.writeChildNode(o,r,i+1)}r.state=n.CloseTag;y+=this.indent(e,r,i)+"</"+e.name+">";if(p){r.suppressPrettyCount--}y+=this.endline(e,r,i);r.state=n.None}this.closeNode(e,r,i);return y};XMLWriterBase.prototype.writeChildNode=function(e,r,n){switch(e.type){case t.CData:return this.cdata(e,r,n);case t.Comment:return this.comment(e,r,n);case t.Element:return this.element(e,r,n);case t.Raw:return this.raw(e,r,n);case t.Text:return this.text(e,r,n);case t.ProcessingInstruction:return this.processingInstruction(e,r,n);case t.Dummy:return"";case t.Declaration:return this.declaration(e,r,n);case t.DocType:return this.docType(e,r,n);case t.AttributeDeclaration:return this.dtdAttList(e,r,n);case t.ElementDeclaration:return this.dtdElement(e,r,n);case t.EntityDeclaration:return this.dtdEntity(e,r,n);case t.NotationDeclaration:return this.dtdNotation(e,r,n);default:throw new Error("Unknown XML node type: "+e.constructor.name)}};XMLWriterBase.prototype.processingInstruction=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r)+"<?";t.state=n.InsideTag;i+=e.target;if(e.value){i+=" "+e.value}t.state=n.CloseTag;i+=t.spaceBeforeSlash+"?>";i+=this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.raw=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r);t.state=n.InsideTag;i+=e.value;t.state=n.CloseTag;i+=this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.text=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r);t.state=n.InsideTag;i+=e.value;t.state=n.CloseTag;i+=this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.dtdAttList=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r)+"<!ATTLIST";t.state=n.InsideTag;i+=" "+e.elementName+" "+e.attributeName+" "+e.attributeType;if(e.defaultValueType!=="#DEFAULT"){i+=" "+e.defaultValueType}if(e.defaultValue){i+=' "'+e.defaultValue+'"'}t.state=n.CloseTag;i+=t.spaceBeforeSlash+">"+this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.dtdElement=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r)+"<!ELEMENT";t.state=n.InsideTag;i+=" "+e.name+" "+e.value;t.state=n.CloseTag;i+=t.spaceBeforeSlash+">"+this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.dtdEntity=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r)+"<!ENTITY";t.state=n.InsideTag;if(e.pe){i+=" %"}i+=" "+e.name;if(e.value){i+=' "'+e.value+'"'}else{if(e.pubID&&e.sysID){i+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'}else if(e.sysID){i+=' SYSTEM "'+e.sysID+'"'}if(e.nData){i+=" NDATA "+e.nData}}t.state=n.CloseTag;i+=t.spaceBeforeSlash+">"+this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.dtdNotation=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r)+"<!NOTATION";t.state=n.InsideTag;i+=" "+e.name;if(e.pubID&&e.sysID){i+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'}else if(e.pubID){i+=' PUBLIC "'+e.pubID+'"'}else if(e.sysID){i+=' SYSTEM "'+e.sysID+'"'}t.state=n.CloseTag;i+=t.spaceBeforeSlash+">"+this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.openNode=function(e,t,r){};XMLWriterBase.prototype.closeNode=function(e,t,r){};XMLWriterBase.prototype.openAttribute=function(e,t,r){};XMLWriterBase.prototype.closeAttribute=function(e,t,r){};return XMLWriterBase}()}).call(this)},1203:function(e,t,r){(function(){var t,n,i,s,o,a,u,c,l,d;d=r(7871),c=d.assign,l=d.isFunction;i=r(1926);s=r(6047);o=r(6698);u=r(160);a=r(5345);t=r(1259);n=r(5471);e.exports.create=function(e,t,r,n){var i,o;if(e==null){throw new Error("Root element needs a name.")}n=c({},t,r,n);i=new s(n);o=i.element(e);if(!n.headless){i.declaration(n);if(n.pubID!=null||n.sysID!=null){i.dtd(n)}}return o};e.exports.begin=function(e,t,r){var n;if(l(e)){n=[e,t],t=n[0],r=n[1];e={}}if(t){return new o(e,t,r)}else{return new s(e)}};e.exports.stringWriter=function(e){return new u(e)};e.exports.streamWriter=function(e,t){return new a(e,t)};e.exports.implementation=new i;e.exports.nodeType=t;e.exports.writerState=n}).call(this)},6982:function(e){"use strict";e.exports=require("crypto")},4434:function(e){"use strict";e.exports=require("events")},9896:function(e){"use strict";e.exports=require("fs")},8611:function(e){"use strict";e.exports=require("http")},5692:function(e){"use strict";e.exports=require("https")},857:function(e){"use strict";e.exports=require("os")},6928:function(e){"use strict";e.exports=require("path")},3480:function(e){"use strict";e.exports=require("querystring")},2203:function(e){"use strict";e.exports=require("stream")},3193:function(e){"use strict";e.exports=require("string_decoder")},3557:function(e){"use strict";e.exports=require("timers")},2018:function(e){"use strict";e.exports=require("tty")},7016:function(e){"use strict";e.exports=require("url")},9023:function(e){"use strict";e.exports=require("util")},3106:function(e){"use strict";e.exports=require("zlib")},9343:function(e){"use strict";e.exports=JSON.parse('{"name":"@alicloud/credentials","version":"2.4.4","description":"alibaba cloud node.js sdk credentials","main":"dist/src/client.js","scripts":{"prepublishOnly":"tsc","build":"tsc","lint":"eslint --fix ./src --ext .ts","test":"mocha -b -r ts-node/register test/**/*.test.ts test/*.test.ts --timeout 15000","test-dev":"nyc -e .ts -r=html -r=text -r=lcov mocha -b -r ts-node/register","cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","ci":"npm run cov","integration":"mocha -b -r ts-node/register -R spec integration/*.test.ts","clean":"rm -rf coverage"},"repository":{"type":"git","url":"git+https://github.com/aliyun/nodejs-credentials.git"},"keywords":["alibaba cloud","sdk","credentials"],"author":"Alibaba Cloud SDK","license":"MIT","devDependencies":{"@types/debug":"^4.1.12","@types/expect.js":"^0.3.29","@types/ini":"^1.3.30","@types/mocha":"^10.0.6","@types/node":"^20.11.10","@types/rewire":"^2.5.28","@typescript-eslint/eslint-plugin":"^6.18.1","@typescript-eslint/parser":"^6.18.1","eslint":"^8.56.0","expect.js":"^0.3.1","mm":"^2.4.1","mocha":"^10.1.0","nyc":"^15.1.0","rewire":"^7.0.0","ts-node":"^10.9.2","typescript":"^4.7.4"},"dependencies":{"@alicloud/tea-typescript":"^1.8.0","httpx":"^2.3.3","ini":"^1.3.5","kitx":"^2.0.0"},"bugs":{"url":"https://github.com/aliyun/nodejs-credentials/issues"},"homepage":"https://github.com/aliyun/nodejs-credentials#readme","files":["src","dist"]}')}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};var s=true;try{e[r].call(i.exports,i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(5462);module.exports=r})();
|
|
1
|
+
(function(){var e={4209:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(205));const s=n(r(5356));class BearerTokenCredential extends i.default{constructor(e){if(!e){throw new Error("Missing required bearerToken option in config for bearer")}const t=new s.default({type:"bearer"});super(t);this.bearerToken=e}}t["default"]=BearerTokenCredential},113:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.CLIProfileCredentialsProvider=t.ProfileCredentialsProvider=t.EnvironmentVariableCredentialsProvider=t.URICredentialsProvider=t.ECSRAMRoleCredentialsProvider=t.OIDCRoleArnCredentialsProvider=t.RAMRoleARNCredentialsProvider=t.StaticSTSCredentialsProvider=t.StaticAKCredentialsProvider=t.DefaultCredentialsProvider=t.Config=t.CredentialModel=void 0;const i=n(r(1593));const s=n(r(4209));const o=n(r(5356));t.Config=o.default;const a=n(r(6885));t.CredentialModel=a.default;const u=n(r(842));t.StaticAKCredentialsProvider=u.default;const c=n(r(1532));t.StaticSTSCredentialsProvider=c.default;const l=n(r(7236));t.RAMRoleARNCredentialsProvider=l.default;const d=n(r(2323));t.OIDCRoleArnCredentialsProvider=d.default;const f=n(r(2098));t.ECSRAMRoleCredentialsProvider=f.default;const h=n(r(2312));t.DefaultCredentialsProvider=h.default;const p=n(r(2199));t.URICredentialsProvider=p.default;const m=n(r(2169));t.CLIProfileCredentialsProvider=m.default;const y=n(r(5256));t.ProfileCredentialsProvider=y.default;const g=n(r(4194));t.EnvironmentVariableCredentialsProvider=g.default;class InnerCredentialsClient{constructor(e,t){this.type=e;this.provider=t}async getAccessKeyId(){const e=await this.provider.getCredentials();return e.accessKeyId}async getAccessKeySecret(){const e=await this.provider.getCredentials();return e.accessKeySecret}async getSecurityToken(){const e=await this.provider.getCredentials();return e.securityToken}getBearerToken(){return}getType(){return this.type}async getCredential(){const e=await this.provider.getCredentials();return new a.default({accessKeyId:e.accessKeyId,accessKeySecret:e.accessKeySecret,securityToken:e.securityToken,bearerToken:undefined,type:this.getType(),providerName:e.providerName})}}function isCredentialsProviderClass(e){if(!e){return false}return typeof e.getCredentials==="function"&&typeof e.getProviderName==="function"}class Credential{constructor(e=null,t=null){if(isCredentialsProviderClass(t)){this.load(null,t)}else{this.load(e,null)}}getAccessKeyId(){return this.credential.getAccessKeyId()}getAccessKeySecret(){return this.credential.getAccessKeySecret()}getSecurityToken(){return this.credential.getSecurityToken()}getBearerToken(){return this.credential.getBearerToken()}getType(){return this.credential.getType()}getCredential(){return this.credential.getCredential()}load(e,t){if(t){this.credential=new InnerCredentialsClient(t.getProviderName(),t);return}if(!e){this.credential=new InnerCredentialsClient("default",h.default.builder().build());return}if(!e.type){throw new Error("Missing required type option")}switch(e.type){case"access_key":this.credential=new InnerCredentialsClient("access_key",u.default.builder().withAccessKeyId(e.accessKeyId).withAccessKeySecret(e.accessKeySecret).build());break;case"sts":this.credential=new InnerCredentialsClient("sts",c.default.builder().withAccessKeyId(e.accessKeyId).withAccessKeySecret(e.accessKeySecret).withSecurityToken(e.securityToken).build());break;case"ecs_ram_role":this.credential=new InnerCredentialsClient("ecs_ram_role",f.default.builder().withRoleName(e.roleName).withDisableIMDSv1(e.disableIMDSv1).withAsyncCredentialUpdateEnabled(e.asyncCredentialUpdateEnabled).withReadTimeout(e.timeout).withConnectTimeout(e.connectTimeout).build());break;case"ram_role_arn":{let t;if(e.securityToken){t=c.default.builder().withAccessKeyId(e.accessKeyId).withAccessKeySecret(e.accessKeySecret).withSecurityToken(e.securityToken).build()}else{t=u.default.builder().withAccessKeyId(e.accessKeyId).withAccessKeySecret(e.accessKeySecret).build()}this.credential=new InnerCredentialsClient("ram_role_arn",l.default.builder().withCredentialsProvider(t).withRoleArn(e.roleArn).withPolicy(e.policy).withDurationSeconds(e.roleSessionExpiration).withRoleSessionName(e.roleSessionName).withReadTimeout(e.timeout).withConnectTimeout(e.connectTimeout).withEnableVpc(e.enableVpc).withStsEndpoint(e.stsEndpoint).withStsRegionId(e.stsRegionId).withExternalId(e.externalId).build())}break;case"oidc_role_arn":this.credential=new InnerCredentialsClient("oidc_role_arn",d.default.builder().withRoleArn(e.roleArn).withOIDCProviderArn(e.oidcProviderArn).withOIDCTokenFilePath(e.oidcTokenFilePath).withRoleSessionName(e.roleSessionName).withPolicy(e.policy).withDurationSeconds(e.roleSessionExpiration).withStsEndpoint(e.stsEndpoint).withStsRegionId(e.stsRegionId).withEnableVpc(e.enableVpc).withReadTimeout(e.timeout).withConnectTimeout(e.connectTimeout).build());break;case"rsa_key_pair":this.credential=new i.default(e.publicKeyId,e.privateKeyFile);break;case"bearer":this.credential=new s.default(e.bearerToken);break;case"credentials_uri":this.credential=new InnerCredentialsClient("credentials_uri",p.default.builder().withCredentialsURI(e.credentialsURI).withReadTimeout(e.timeout).withConnectTimeout(e.connectTimeout).build());break;default:throw new Error("Invalid type option, support: access_key, sts, ecs_ram_role, ram_role_arn, rsa_key_pair, credentials_uri")}}}t["default"]=Credential},5356:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const o=s(r(4828));class Config extends o.Model{static names(){return{accessKeyId:"accessKeyId",accessKeySecret:"accessKeySecret",securityToken:"securityToken",bearerToken:"bearerToken",durationSeconds:"durationSeconds",roleArn:"roleArn",policy:"policy",roleSessionExpiration:"roleSessionExpiration",roleSessionName:"roleSessionName",externalId:"externalId",stsEndpoint:"stsEndpoint",stsRegionId:"stsRegionId",enableVpc:"enableVpc",timeout:"readTimeout",connectTimeout:"connectTimeout",publicKeyId:"publicKeyId",privateKeyFile:"privateKeyFile",roleName:"roleName",enableIMDSv2:"enableIMDSv2",disableIMDSv1:"disableIMDSv1",asyncCredentialUpdateEnabled:"asyncCredentialUpdateEnabled",metadataTokenDuration:"metadataTokenDuration",credentialsURI:"credentialsURI",oidcProviderArn:"oidcProviderArn",oidcTokenFilePath:"oidcTokenFilePath",type:"type"}}static types(){return{accessKeyId:"string",accessKeySecret:"string",securityToken:"string",bearerToken:"string",durationSeconds:"number",roleArn:"string",policy:"string",roleSessionExpiration:"number",roleSessionName:"string",externalId:"string",stsEndpoint:"string",stsRegionId:"string",enableVpc:"string",timeout:"number",connectTimeout:"number",publicKeyId:"string",privateKeyFile:"string",roleName:"string",enableIMDSv2:"boolean",disableIMDSv1:"boolean",asyncCredentialUpdateEnabled:"boolean",metadataTokenDuration:"number",credentialsURI:"string",oidcProviderArn:"string",oidcTokenFilePath:"string",type:"string"}}constructor(e){super(e)}}t["default"]=Config},6885:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const o=s(r(4828));class CredentialModel extends o.Model{static names(){return{accessKeyId:"accessKeyId",accessKeySecret:"accessKeySecret",securityToken:"securityToken",bearerToken:"bearerToken",type:"type",providerName:"providerName"}}static types(){return{accessKeyId:"string",accessKeySecret:"string",securityToken:"string",bearerToken:"string",type:"string",providerName:"string"}}constructor(e){super(e)}}t["default"]=CredentialModel},2554:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CredentialsBuilder=void 0;class Credentials{constructor(e){this.accessKeyId=e.accessKeyId;this.accessKeySecret=e.accessKeySecret;this.securityToken=e.securityToken;this.providerName=e.providerName}static builder(){return new CredentialsBuilder}}t["default"]=Credentials;class CredentialsBuilder{withAccessKeyId(e){this.accessKeyId=e;return this}withAccessKeySecret(e){this.accessKeySecret=e;return this}withSecurityToken(e){this.securityToken=e;return this}withProviderName(e){this.providerName=e;return this}build(){return new Credentials(this)}}t.CredentialsBuilder=CredentialsBuilder},205:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(6885));class DefaultCredential{constructor(e){this.accessKeyId=e.accessKeyId||"";this.accessKeySecret=e.accessKeySecret||"";this.securityToken=e.securityToken||"";this.bearerToken=e.bearerToken||"";this.type=e.type||""}async getAccessKeyId(){return this.accessKeyId}async getAccessKeySecret(){return this.accessKeySecret}async getSecurityToken(){return this.securityToken}getBearerToken(){return this.bearerToken}getType(){return this.type}async getCredential(){return new i.default({accessKeyId:this.accessKeyId,accessKeySecret:this.accessKeySecret,securityToken:this.securityToken,bearerToken:this.bearerToken,type:this.type})}}t["default"]=DefaultCredential},2169:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getProfile=t.getConfiguration=void 0;const i=r(9896);const s=r(9023);const o=n(r(6928));const a=n(r(857));const u=n(r(2554));const c=n(r(842));const l=n(r(1532));const d=n(r(7236));const f=n(r(2323));const h=n(r(2098));const p=(0,s.promisify)(i.readFile);class CLIProfileCredentialsProviderBuilder{build(){if(!this.profileName){this.profileName=process.env.ALIBABA_CLOUD_PROFILE}if(process.env.ALIBABA_CLOUD_CLI_PROFILE_DISABLED&&process.env.ALIBABA_CLOUD_CLI_PROFILE_DISABLED.toLowerCase()==="true"){throw new Error("the CLI profile is disabled")}return new CLIProfileCredentialsProvider(this)}withProfileName(e){this.profileName=e;return this}}class Configuration{}async function getConfiguration(e){let t;try{t=await p(e,"utf8")}catch(t){throw new Error(`reading aliyun cli config from '${e}' failed.`)}let r;try{r=JSON.parse(t)}catch(r){throw new Error(`parse aliyun cli config from '${e}' failed: ${t}`)}if(!r||!r.profiles||r.profiles.length===0){throw new Error(`no any configured profiles in '${e}'`)}return r}t.getConfiguration=getConfiguration;function getProfile(e,t){for(const r of e.profiles){if(r.name===t){return r}}throw new Error(`unable to get profile with '${t}'`)}t.getProfile=getProfile;class CLIProfileCredentialsProvider{static builder(){return new CLIProfileCredentialsProviderBuilder}constructor(e){this.homedir=a.default.homedir();this.profileName=e.profileName}getCredentialsProvider(e,t){const r=getProfile(e,t);switch(r.mode){case"AK":return c.default.builder().withAccessKeyId(r.access_key_id).withAccessKeySecret(r.access_key_secret).build();case"StsToken":return l.default.builder().withAccessKeyId(r.access_key_id).withAccessKeySecret(r.access_key_secret).withSecurityToken(r.sts_token).build();case"RamRoleArn":{const e=c.default.builder().withAccessKeyId(r.access_key_id).withAccessKeySecret(r.access_key_secret).build();return d.default.builder().withCredentialsProvider(e).withRoleArn(r.ram_role_arn).withRoleSessionName(r.ram_session_name).withDurationSeconds(r.expired_seconds).withStsRegionId(r.sts_region).withStsEndpoint(r.sts_endpoint).withEnableVpc(r.enable_vpc).build()}case"EcsRamRole":return h.default.builder().withRoleName(r.ram_role_name).build();case"OIDC":return f.default.builder().withOIDCTokenFilePath(r.oidc_token_file).withOIDCProviderArn(r.oidc_provider_arn).withRoleArn(r.ram_role_arn).withStsRegionId(r.sts_region).withDurationSeconds(r.expired_seconds).withRoleSessionName(r.ram_session_name).withDurationSeconds(r.duration_seconds).withEnableVpc(r.enable_vpc).build();case"ChainableRamRoleArn":{const t=this.getCredentialsProvider(e,r.source_profile);return d.default.builder().withCredentialsProvider(t).withRoleArn(r.ram_role_arn).withRoleSessionName(r.ram_session_name).withDurationSeconds(r.expired_seconds).withStsRegionId(r.sts_region).build()}default:throw new Error(`unsupported profile mode '${r.mode}'`)}}async getCredentials(){if(!this.innerProvider){if(!this.homedir){throw new Error("cannot found home dir")}const e=o.default.join(this.homedir,".aliyun/config.json");const t=await getConfiguration(e);const r=this.profileName||t.current;this.innerProvider=this.getCredentialsProvider(t,r)}const e=await this.innerProvider.getCredentials();return u.default.builder().withAccessKeyId(e.accessKeyId).withAccessKeySecret(e.accessKeySecret).withSecurityToken(e.securityToken).withProviderName(`${this.getProviderName()}/${this.innerProvider.getProviderName()}`).build()}getProviderName(){return"cli_profile"}}t["default"]=CLIProfileCredentialsProvider},2312:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(2554));const s=n(r(2169));const o=n(r(2098));const a=n(r(4194));const u=n(r(2323));const c=n(r(2199));const l=n(r(5256));class DefaultCredentialsProvider{static builder(){return new DefaultCredentialsProviderBuilder}constructor(e){this.providers=[];try{const e=a.default.builder().build();this.providers.push(e)}catch(e){}try{const e=u.default.builder().build();this.providers.push(e)}catch(e){}try{const e=s.default.builder().build();this.providers.push(e)}catch(e){}try{const e=l.default.builder().build();this.providers.push(e)}catch(e){}try{const e=o.default.builder().withRoleName(process.env.ALIBABA_CLOUD_ECS_METADATA).build();this.providers.push(e)}catch(e){}try{const e=c.default.builder().withCredentialsURI(process.env.ALIBABA_CLOUD_CREDENTIALS_URI).build();this.providers.push(e)}catch(e){}}async getCredentials(){if(this.lastUsedProvider){const e=await this.lastUsedProvider.getCredentials();return i.default.builder().withAccessKeyId(e.accessKeyId).withAccessKeySecret(e.accessKeySecret).withSecurityToken(e.securityToken).withProviderName(`${this.getProviderName()}/${this.lastUsedProvider.getProviderName()}`).build()}const e=[];for(const t of this.providers){this.lastUsedProvider=t;let r;try{r=await t.getCredentials()}catch(t){e.push(t);continue}if(r){return i.default.builder().withAccessKeyId(r.accessKeyId).withAccessKeySecret(r.accessKeySecret).withSecurityToken(r.securityToken).withProviderName(`${this.getProviderName()}/${this.lastUsedProvider.getProviderName()}`).build()}}throw new Error(`unable to get credentials from any of the providers in the chain: ${e.map((e=>e.message)).join(", ")}`)}getProviderName(){return"default"}}t["default"]=DefaultCredentialsProvider;class DefaultCredentialsProviderBuilder{build(){return new DefaultCredentialsProvider(this)}}},2098:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(7977);const i=r(3261);const s=60*60;const o=21600;class ECSRAMRoleCredentialsProvider extends i.SessionCredentialProvider{static builder(){return new ECSRAMRoleCredentialsProviderBuilder}constructor(e){super(i.STALE_TIME,s);this.doRequest=n.doRequest;this.refresher=this.getCredentialsInternal;this.roleName=e.roleName;this.disableIMDSv1=e.disableIMDSv1;this.readTimeout=e.readTimeout;this.connectTimeout=e.connectTimeout;this.checker=null;this.shouldRefreshCred=false;if(e.asyncCredentialUpdateEnabled){this.checker=this.checkCredentialsUpdateAsynchronously()}}checkCredentialsUpdateAsynchronously(){return setTimeout((async()=>{try{if(this.shouldRefreshCred){await this.getCredentials()}}catch(e){console.error("CheckCredentialsUpdateAsynchronously Error:",e)}finally{this.checker=this.checkCredentialsUpdateAsynchronously()}}),1e3*60)}close(){if(this.checker!=null){clearTimeout(this.checker);this.checker=null}}async getMetadataToken(){const e=n.Request.builder().withMethod("PUT").withProtocol("http").withHost("100.100.100.200").withPath("/latest/api/token").withHeaders({"x-aliyun-ecs-metadata-token-ttl-seconds":`${o}`}).withReadTimeout(this.readTimeout||1e3).withConnectTimeout(this.connectTimeout||1e3).build();try{const t=await this.doRequest(e);if(t.statusCode!==200){throw new Error(`get metadata token failed with ${t.statusCode}`)}return t.body.toString("utf8")}catch(e){if(this.disableIMDSv1){throw e}return null}}async getRoleName(){const e=n.Request.builder().withMethod("GET").withProtocol("http").withHost("100.100.100.200").withPath("/latest/meta-data/ram/security-credentials/").withReadTimeout(this.readTimeout||1e3).withConnectTimeout(this.connectTimeout||1e3);const t=await this.getMetadataToken();if(t!==null){e.withHeaders({"x-aliyun-ecs-metadata-token":t})}const r=e.build();const i=await this.doRequest(r);if(i.statusCode!==200){throw new Error(`get role name failed: ${r.method} ${r.toRequestURL()} ${i.statusCode}`)}return i.body.toString().trim()}async getCredentialsInternal(){let e=this.roleName;if(!e){e=await this.getRoleName()}const t=n.Request.builder().withMethod("GET").withProtocol("http").withHost("100.100.100.200").withPath(`/latest/meta-data/ram/security-credentials/${e}`).withReadTimeout(this.readTimeout||1e3).withConnectTimeout(this.connectTimeout||1e3);const r=await this.getMetadataToken();if(r!==null){t.withHeaders({"x-aliyun-ecs-metadata-token":r})}const s=t.build();const o=await this.doRequest(s);if(o.statusCode!==200){throw new Error(`get sts token failed, httpStatus: ${o.statusCode}, message = ${o.body.toString()}`)}let a;try{a=JSON.parse(o.body.toString())}catch(e){throw new Error(`get sts token failed, json parse failed: ${e.message}`)}if(!a||!a.AccessKeyId||!a.AccessKeySecret||!a.SecurityToken){throw new Error("get sts token failed")}if(a.Code!=="Success"){throw new Error("refresh Ecs sts token err, Code is not Success")}this.shouldRefreshCred=true;return new i.Session(a.AccessKeyId,a.AccessKeySecret,a.SecurityToken,a.Expiration)}getProviderName(){return"ecs_ram_role"}}t["default"]=ECSRAMRoleCredentialsProvider;class ECSRAMRoleCredentialsProviderBuilder{constructor(){this.disableIMDSv1=false;this.asyncCredentialUpdateEnabled=false}withRoleName(e){this.roleName=e;return this}withDisableIMDSv1(e){this.disableIMDSv1=e;return this}withReadTimeout(e){this.readTimeout=e;return this}withConnectTimeout(e){this.connectTimeout=e;return this}withAsyncCredentialUpdateEnabled(e){this.asyncCredentialUpdateEnabled=e;return this}build(){if(process.env.ALIBABA_CLOUD_ECS_METADATA_DISABLED&&process.env.ALIBABA_CLOUD_ECS_METADATA_DISABLED.toLowerCase()==="true"){throw new Error("IMDS credentials is disabled")}if(!this.roleName){this.roleName=process.env.ALIBABA_CLOUD_ECS_METADATA}if(process.env.ALIBABA_CLOUD_IMDSV1_DISABLED&&process.env.ALIBABA_CLOUD_IMDSV1_DISABLED.toLowerCase()==="true"){this.disableIMDSv1=true}return new ECSRAMRoleCredentialsProvider(this)}}},4194:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(2554));class EnvironmentVariableCredentialsProvider{static builder(){return new EnvironmentVariableCredentialsProviderBuilder}async getCredentials(){const e=process.env.ALIBABA_CLOUD_ACCESS_KEY_ID;if(!e){throw new Error("unable to get credentials from enviroment variables, Access key ID must be specified via environment variable (ALIBABA_CLOUD_ACCESS_KEY_ID)")}const t=process.env.ALIBABA_CLOUD_ACCESS_KEY_SECRET;if(!t){throw new Error("unable to get credentials from enviroment variables, Access key secret must be specified via environment variable (ALIBABA_CLOUD_ACCESS_KEY_SECRET)")}const r=process.env.ALIBABA_CLOUD_SECURITY_TOKEN;return i.default.builder().withAccessKeyId(e).withAccessKeySecret(t).withSecurityToken(r).withProviderName(this.getProviderName()).build()}getProviderName(){return"env"}constructor(e){}}t["default"]=EnvironmentVariableCredentialsProvider;class EnvironmentVariableCredentialsProviderBuilder{build(){return new EnvironmentVariableCredentialsProvider(this)}}},7977:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.doRequest=t.Response=t.RequestBuilder=t.Request=void 0;const i=n(r(3312));class Request{static builder(){return new RequestBuilder}constructor(e){this.method=e.method;this.protocol=e.protocol;this.host=e.host;this.path=e.path;this.queries=e.queries;this.headers=e.headers;this.bodyForm=e.bodyForm;this.bodyBytes=e.bodyBytes;this.url=e.url;this.readTimeout=e.readTimeout;this.connectTimeout=e.connectTimeout}toRequestURL(){if(this.url){return this.url}let e=`${this.protocol}://${this.host}${this.path}`;if(this.queries&&Object.keys(this.queries).length>0){e+=`?`+querystringify(this.queries)}return e}}t.Request=Request;class RequestBuilder{build(){if(!this.protocol){this.protocol="https"}if(!this.path){this.path="/"}if(!this.headers){this.headers={}}if(!this.queries){this.queries={}}return new Request(this)}withMethod(e){this.method=e;return this}withProtocol(e){this.protocol=e;return this}withHost(e){this.host=e;return this}withPath(e){this.path=e;return this}withQueries(e){this.queries=e;return this}withHeaders(e){this.headers=e;return this}withBodyForm(e){this.bodyForm=e;return this}withURL(e){this.url=e;return this}withReadTimeout(e){this.readTimeout=e;return this}withConnectTimeout(e){this.connectTimeout=e;return this}}t.RequestBuilder=RequestBuilder;class Response{static builder(){return new ResponseBuilder}constructor(e){this.statusCode=e.statusCode;this.headers=e.headers;this.body=e.body}}t.Response=Response;class ResponseBuilder{withStatusCode(e){this.statusCode=e;return this}withHeaders(e){this.headers=e;return this}withBody(e){this.body=e;return this}constructor(){this.headers={}}build(){return new Response(this)}}function querystringify(e){const t=[];for(const[r,n]of Object.entries(e)){t.push(r+"="+encodeURIComponent(n))}return t.join("&")}async function doRequest(e){const t=e.toRequestURL();let r;if(e.bodyForm&&Object.keys(e.bodyForm).length>0){r=querystringify(e.bodyForm);if(!e.headers["Content-Type"]){e.headers["Content-Type"]="application/x-www-form-urlencoded"}}const n=await i.default.request(t,{method:e.method,data:r,headers:e.headers,readTimeout:e.readTimeout,connectTimeout:e.connectTimeout});const s=await i.default.read(n,"");return Response.builder().withStatusCode(n.statusCode).withHeaders(n.headers).withBody(s).build()}t.doRequest=doRequest},2323:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const o=r(9896);const a=r(9023);const u=r(3261);const c=s(r(8844));const l=r(7977);const d=(0,a.promisify)(o.readFile);class OIDCRoleArnCredentialsProviderBuilder{withOIDCProviderArn(e){this.oidcProviderArn=e;return this}withOIDCTokenFilePath(e){this.oidcTokenFilePath=e;return this}withRoleArn(e){this.roleArn=e;return this}withRoleSessionName(e){this.roleSessionName=e;return this}withDurationSeconds(e){this.durationSeconds=e;return this}withStsEndpoint(e){this.stsEndpoint=e;return this}withStsRegionId(e){this.stsRegionId=e;return this}withPolicy(e){this.policy=e;return this}withEnableVpc(e){this.enableVpc=e;return this}withReadTimeout(e){this.readTimeout=e;return this}withConnectTimeout(e){this.connectTimeout=e;return this}build(){if(!this.oidcProviderArn){this.oidcProviderArn=process.env.ALIBABA_CLOUD_OIDC_PROVIDER_ARN}if(!this.oidcTokenFilePath){this.oidcTokenFilePath=process.env.ALIBABA_CLOUD_OIDC_TOKEN_FILE}if(!this.roleSessionName){this.roleSessionName=process.env.ALIBABA_CLOUD_ROLE_SESSION_NAME}if(!this.durationSeconds){this.durationSeconds=3600}if(!this.roleArn){this.roleArn=process.env.ALIBABA_CLOUD_ROLE_ARN}if(!this.roleArn){throw new Error("roleArn does not exist and env ALIBABA_CLOUD_ROLE_ARN is null.")}if(!this.oidcProviderArn){throw new Error("oidcProviderArn does not exist and env ALIBABA_CLOUD_OIDC_PROVIDER_ARN is null.")}if(!this.oidcTokenFilePath){throw new Error("oidcTokenFilePath is not exists and env ALIBABA_CLOUD_OIDC_TOKEN_FILE is null.")}if(!this.roleSessionName){this.roleSessionName="credentials-nodejs-"+Date.now()}if(this.durationSeconds<900){throw new Error("session duration should be in the range of 900s - max session duration")}if(!this.stsRegionId){this.stsRegionId=process.env.ALIBABA_CLOUD_STS_REGION}if(!this.enableVpc){this.enableVpc=process.env.ALIBABA_CLOUD_VPC_ENDPOINT_ENABLED&&process.env.ALIBABA_CLOUD_VPC_ENDPOINT_ENABLED.toLowerCase()==="true"||false}if(!this.stsEndpoint){if(this.stsRegionId){if(this.enableVpc){this.stsEndpoint=`sts-vpc.${this.stsRegionId}.aliyuncs.com`}else{this.stsEndpoint=`sts.${this.stsRegionId}.aliyuncs.com`}}else{this.stsEndpoint="sts.aliyuncs.com"}}return new OIDCRoleArnCredentialsProvider(this)}}class OIDCRoleArnCredentialsProvider extends u.SessionCredentialProvider{static builder(){return new OIDCRoleArnCredentialsProviderBuilder}constructor(e){super(u.STALE_TIME);this.doRequest=l.doRequest;this.refresher=this.getCredentialsInternal;this.roleArn=e.roleArn;this.oidcProviderArn=e.oidcProviderArn;this.oidcTokenFilePath=e.oidcTokenFilePath;this.policy=e.policy;this.durationSeconds=e.durationSeconds;this.roleSessionName=e.roleSessionName;this.stsEndpoint=e.stsEndpoint;this.readTimeout=e.readTimeout;this.connectTimeout=e.connectTimeout;this.doRequest=l.doRequest}getProviderName(){return"oidc_role_arn"}async getCredentialsInternal(){const e=await d(this.oidcTokenFilePath,"utf8");const t=l.Request.builder().withMethod("POST").withProtocol("https").withHost(this.stsEndpoint).withReadTimeout(this.readTimeout||1e4).withConnectTimeout(this.connectTimeout||5e3);const r=Object.create(null);r["Version"]="2015-04-01";r["Action"]="AssumeRoleWithOIDC";r["Format"]="JSON";r["Timestamp"]=c.timestamp();t.withQueries(r);const n=Object.create(null);n["OIDCProviderArn"]=this.oidcProviderArn;n["OIDCToken"]=e;n["RoleArn"]=this.roleArn;if(this.policy){n["Policy"]=this.policy}n["RoleSessionName"]=this.roleSessionName;n["DurationSeconds"]=`${this.durationSeconds}`;t.withBodyForm(n);const i=Object.create(null);i["Content-Type"]="application/x-www-form-urlencoded";t.withHeaders(i);const s=t.build();const o=await this.doRequest(s);if(o.statusCode!==200){throw new Error(`get sts token failed with OIDC: ${o.body.toString("utf8")}`)}let a;try{a=JSON.parse(o.body.toString("utf8"))}catch(e){throw new Error(`get sts token failed with OIDC, unmarshal fail: ${o.body.toString("utf8")}`)}if(!a||!a.Credentials){throw new Error(`get sts token failed with OIDC`)}const{AccessKeyId:f,AccessKeySecret:h,SecurityToken:p,Expiration:m}=a.Credentials;if(!f||!h||!p){throw new Error("get sts token failed with OIDC")}return new u.Session(f,h,p,m)}}t["default"]=OIDCRoleArnCredentialsProvider},5256:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(6928));const s=n(r(857));const o=n(r(2554));const a=r(8844);const u=n(r(842));const c=n(r(2098));const l=n(r(7236));class ProfileCredentialsProvider{async getCredentials(){if(!this.innerProvider){let e=process.env.ALIBABA_CLOUD_CREDENTIALS_FILE;if(!e){if(!this.homedir){throw new Error("cannot found home dir")}e=i.default.join(this.homedir,".alibabacloud/credentials")}const t=await(0,a.loadIni)(e);this.innerProvider=this.getCredentialsProvider(t)}const e=await this.innerProvider.getCredentials();return o.default.builder().withAccessKeyId(e.accessKeyId).withAccessKeySecret(e.accessKeySecret).withSecurityToken(e.securityToken).withProviderName(`${this.getProviderName()}/${this.innerProvider.getProviderName()}`).build()}getCredentialsProvider(e){const t=e[this.profileName]||{};if(!t.type){throw new Error(`Can not find credential type for "${this.profileName}"`)}switch(t.type){case"access_key":return u.default.builder().withAccessKeyId(t.access_key_id).withAccessKeySecret(t.access_key_secret).build();case"ecs_ram_role":return c.default.builder().withRoleName(t.role_name).build();case"ram_role_arn":{const e=u.default.builder().withAccessKeyId(t.access_key_id).withAccessKeySecret(t.access_key_secret).build();return l.default.builder().withCredentialsProvider(e).withRoleArn(t.role_arn).withRoleSessionName(t.role_session_name).withPolicy(t.policy).build()}default:throw new Error("Invalid type option, support: access_key, ecs_ram_role, ram_role_arn")}}getProviderName(){return"profile"}static builder(){return new ProfileCredentialsProviderBuilder}constructor(e){this.homedir=s.default.homedir();this.profileName=e.profileName}}t["default"]=ProfileCredentialsProvider;class ProfileCredentialsProviderBuilder{withProfileName(e){this.profileName=e;return this}build(){if(!this.profileName){this.profileName=process.env.ALIBABA_CLOUD_PROFILE||"default"}return new ProfileCredentialsProvider(this)}}},7236:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=s(r(1406));const u=o(r(6449));const c=s(r(8844));const l=r(7977);const d=r(3261);const f=(0,u.default)("sign");class RAMRoleARNCredentialsProviderBuilder{build(){if(!this.credentialsProvider){throw new Error("must specify a previous credentials provider to asssume role")}if(!(this.roleArn=this.roleArn||process.env.ALIBABA_CLOUD_ROLE_ARN))throw new Error("the RoleArn is empty");if(!this.roleSessionName){this.roleSessionName=process.env.ALIBABA_CLOUD_ROLE_SESSION_NAME||"credentials-nodejs-"+Date.now()}if(!this.stsRegionId){this.stsRegionId=process.env.ALIBABA_CLOUD_STS_REGION}if(!this.enableVpc){this.enableVpc=process.env.ALIBABA_CLOUD_VPC_ENDPOINT_ENABLED&&process.env.ALIBABA_CLOUD_VPC_ENDPOINT_ENABLED.toLowerCase()==="true"||false}if(!this.durationSeconds){this.durationSeconds=3600}if(this.durationSeconds<900){throw new Error("session duration should be in the range of 900s - max session duration")}if(!this.stsEndpoint){if(this.stsRegionId){if(this.enableVpc){this.stsEndpoint=`sts-vpc.${this.stsRegionId}.aliyuncs.com`}else{this.stsEndpoint=`sts.${this.stsRegionId}.aliyuncs.com`}}else{this.stsEndpoint="sts.aliyuncs.com"}}return new RAMRoleARNCredentialsProvider(this)}withCredentialsProvider(e){this.credentialsProvider=e;return this}withRoleArn(e){this.roleArn=e;return this}withStsRegionId(e){this.stsRegionId=e;return this}withStsEndpoint(e){this.stsEndpoint=e;return this}withRoleSessionName(e){this.roleSessionName=e;return this}withPolicy(e){this.policy=e;return this}withExternalId(e){this.externalId=e;return this}withDurationSeconds(e){this.durationSeconds=e;return this}withEnableVpc(e){this.enableVpc=e;return this}withReadTimeout(e){this.readTimeout=e;return this}withConnectTimeout(e){this.connectTimeout=e;return this}}function encode(e){const t=encodeURIComponent(e);return t.replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}class RAMRoleARNCredentialsProvider extends d.SessionCredentialProvider{static builder(){return new RAMRoleARNCredentialsProviderBuilder}constructor(e){super(d.STALE_TIME);this.doRequest=l.doRequest;this.refresher=this.getCredentialsInternal;this.credentialsProvider=e.credentialsProvider;this.stsEndpoint=e.stsEndpoint;this.roleSessionName=e.roleSessionName;this.policy=e.policy;this.durationSeconds=e.durationSeconds;this.roleArn=e.roleArn;this.externalId=e.externalId;this.readTimeout=e.readTimeout;this.connectTimeout=e.connectTimeout}async getCredentialsInternal(){const e=await this.credentialsProvider.getCredentials();const t="POST";const r=l.Request.builder().withMethod(t).withProtocol("https").withHost(this.stsEndpoint).withReadTimeout(this.readTimeout||1e4).withConnectTimeout(this.connectTimeout||5e3);const n=Object.create(null);n["Version"]="2015-04-01";n["Action"]="AssumeRole";n["Format"]="JSON";n["Timestamp"]=c.timestamp();n["SignatureMethod"]="HMAC-SHA1";n["SignatureVersion"]="1.0";n["SignatureNonce"]=a.makeNonce();n["AccessKeyId"]=e.accessKeyId;if(e.securityToken){n["SecurityToken"]=e.securityToken}const i=Object.create(null);i["RoleArn"]=this.roleArn;if(this.policy){i["Policy"]=this.policy}if(this.externalId){i["ExternalId"]=this.externalId}i["RoleSessionName"]=this.roleSessionName;i["DurationSeconds"]=`${this.durationSeconds}`;r.withBodyForm(i);const s=Object.create(null);for(const[e,t]of Object.entries(n)){s[e]=t}for(const[e,t]of Object.entries(i)){s[e]=t}const o=Object.keys(s).sort();const u=`${t}&${encode("/")}&${encode(o.map((e=>`${encode(e)}=${encode(s[e])}`)).join("&"))}`;f("stringToSign[Client]:");f(u);const h=e.accessKeySecret+"&";const p=a.sha1(u,h,"base64");n["Signature"]=p;r.withQueries(n);const m=Object.create(null);m["Content-Type"]="application/x-www-form-urlencoded";m["x-acs-credentials-provider"]=e.providerName;r.withHeaders(m);const y=r.build();const g=await this.doRequest(y);if(g.statusCode!=200){if(g.headers["content-type"]&&g.headers["content-type"].startsWith("application/json")){const e=JSON.parse(g.body.toString("utf8"));const t=e.Message.slice("Specified signature is not matched with our calculation. server string to sign is:".length);f("stringToSign[Server]:");f(u);if(e.Code==="SignatureDoesNotMatch"&&t===u){throw new Error(`the access key secret is invalid`)}}throw new Error(`refresh session token failed: ${g.body.toString("utf8")}`)}let b;try{b=JSON.parse(g.body.toString("utf8"))}catch(e){throw new Error(`refresh RoleArn sts token err, unmarshal fail: ${g.body.toString("utf8")}`)}if(!b||!b.Credentials){throw new Error(`refresh RoleArn sts token err, fail to get credentials`)}if(!b.Credentials.AccessKeyId||!b.Credentials.AccessKeySecret||!b.Credentials.SecurityToken){throw new Error("refresh RoleArn sts token err, fail to get credentials")}const{AccessKeyId:w,AccessKeySecret:v,SecurityToken:_,Expiration:T}=b.Credentials;return new d.Session(w,v,_,T)}getProviderName(){return`ram_role_arn/${this.credentialsProvider.getProviderName()}`}}t["default"]=RAMRoleARNCredentialsProvider},3261:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.SessionCredentialProvider=t.Session=t.STALE_TIME=void 0;const i=r(4420);const s=r(8844);const o=n(r(2554));t.STALE_TIME=15*60;class Session{constructor(e,t,r,n){this.accessKeyId=e;this.accessKeySecret=t;this.securityToken=r;this.expiration=n}}t.Session=Session;class SessionCredentialProvider{constructor(e=0,r=0){this.staleTime=e||t.STALE_TIME;if(r){this.prefetchTime=r;this.prefetchTimestamp=Date.now()+r*1e3}this.refreshFaliure=0}async getCredentials(){this.session=await this.getSession();return o.default.builder().withAccessKeyId(this.session.accessKeyId).withAccessKeySecret(this.session.accessKeySecret).withSecurityToken(this.session.securityToken).withProviderName(this.getProviderName()).build()}refreshTimestamp(){this.staleTimestamp=this.expirationTimestamp-this.staleTime;if(this.prefetchTimestamp){this.prefetchTimestamp=(Date.now()+this.prefetchTime*1e3)/1e3}}maxStaleFailureJitter(){const e=1<<this.refreshFaliure-1;return e>10?e:10}jitterTime(e,t,r){const n=r-t;const i=Math.abs(Math.floor(Math.random()*n));return e+t+i}async refreshSession(){try{const e=await this.refresher();const t=Date.now()/1e3;const r=this.staleTimestamp>t;const n=this.session;this.expirationTimestamp=(0,i.parseUTC)(e.expiration)/1e3;this.session=e;this.refreshFaliure=0;this.refreshTimestamp();if(this.staleTimestamp>t){return}if(t<this.staleTimestamp+this.staleTime){this.expirationTimestamp=t+this.staleTime}if(t>this.staleTimestamp+this.staleTime){if(r){this.session=n;this.expirationTimestamp=(0,i.parseUTC)(n.expiration)/1e3;this.refreshTimestamp();return}const e=50+(0,s.getRandomInt)(20);this.expirationTimestamp=t+e+this.staleTime}}catch(e){if(!this.session){throw e}const t=Date.now()/1e3;if(t<this.staleTimestamp){return}this.refreshFaliure++;this.expirationTimestamp=this.jitterTime(t,1,this.maxStaleFailureJitter())+this.staleTime}}async getSession(){if(this.needUpdateCredential()||this.shouldPrefetchCredential()){await this.refreshSession();this.refreshTimestamp()}return this.session}needUpdateCredential(){if(!this.session||!this.expirationTimestamp){return true}return Date.now()/1e3>=this.staleTimestamp}shouldPrefetchCredential(){if(!this.prefetchTimestamp){return false}return this.expirationTimestamp-Date.now()/1e3<=this.prefetchTime}getProviderName(){return"session"}}t.SessionCredentialProvider=SessionCredentialProvider},842:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.StaticAKCredentialsProviderBuilder=void 0;const i=n(r(2554));class StaticAKCredentialsProviderBuilder{withAccessKeyId(e){this.accessKeyId=e;return this}withAccessKeySecret(e){this.accessKeySecret=e;return this}build(){if(!this.accessKeyId){this.accessKeyId=process.env["ALIBABA_CLOUD_ACCESS_KEY_ID"]}if(!this.accessKeyId){throw new Error("the access key id is empty")}if(!this.accessKeySecret){this.accessKeySecret=process.env["ALIBABA_CLOUD_ACCESS_KEY_SECRET"]}if(!this.accessKeySecret){throw new Error("the access key secret is empty")}return new StaticAKCredentialsProvider(this)}}t.StaticAKCredentialsProviderBuilder=StaticAKCredentialsProviderBuilder;class StaticAKCredentialsProvider{static builder(){return new StaticAKCredentialsProviderBuilder}constructor(e){this.accessKeyId=e.accessKeyId;this.accessKeySecret=e.accessKeySecret}getProviderName(){return"static_ak"}async getCredentials(){const e=i.default.builder().withAccessKeyId(this.accessKeyId).withAccessKeySecret(this.accessKeySecret).withProviderName("static_ak").build();return e}}t["default"]=StaticAKCredentialsProvider},1532:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.StaticSTSCredentialsProviderBuilder=void 0;const i=n(r(2554));class StaticSTSCredentialsProviderBuilder{withAccessKeyId(e){this.accessKeyId=e;return this}withAccessKeySecret(e){this.accessKeySecret=e;return this}withSecurityToken(e){this.securityToken=e;return this}build(){if(!this.accessKeyId){this.accessKeyId=process.env["ALIBABA_CLOUD_ACCESS_KEY_ID"]}if(!this.accessKeyId){throw new Error("the access key id is empty")}if(!this.accessKeySecret){this.accessKeySecret=process.env["ALIBABA_CLOUD_ACCESS_KEY_SECRET"]}if(!this.accessKeySecret){throw new Error("the access key secret is empty")}if(!this.securityToken){this.securityToken=process.env["ALIBABA_CLOUD_SECURITY_TOKEN"]}if(!this.securityToken){throw new Error("the security token is empty")}return new StaticSTSCredentialsProvider(this)}}t.StaticSTSCredentialsProviderBuilder=StaticSTSCredentialsProviderBuilder;class StaticSTSCredentialsProvider{static builder(){return new StaticSTSCredentialsProviderBuilder}constructor(e){this.accessKeyId=e.accessKeyId;this.accessKeySecret=e.accessKeySecret;this.securityToken=e.securityToken}getProviderName(){return"static_sts"}async getCredentials(){return i.default.builder().withAccessKeyId(this.accessKeyId).withAccessKeySecret(this.accessKeySecret).withSecurityToken(this.securityToken).withProviderName(this.getProviderName()).build()}}t["default"]=StaticSTSCredentialsProvider},4420:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.parseUTC=void 0;function parseUTC(e){if(!e){throw new Error("invalid UTC format time string")}if(e.length===20){if(e[4]!=="-"||e[7]!=="-"||e[10]!=="T"||e[13]!==":"||e[16]!==":"||e[19]!=="Z"){throw new Error("invalid UTC format date string")}}else if(e.length===24){if(e[4]!=="-"||e[7]!=="-"||e[10]!=="T"||e[13]!==":"||e[16]!==":"||e[19]!=="."||e[23]!=="Z"){throw new Error("invalid UTC format date string")}}else{throw new Error("invalid UTC format time string")}const t=e.slice(0,4);const r=Number.parseInt(t,10);if(isNaN(r)){throw new Error("invalid year string")}const n=e.slice(5,7);const i=Number.parseInt(n,10);if(isNaN(i)){throw new Error("invalid month string")}if(i<1||i>12){throw new Error("invalid month value")}const s=e.slice(8,10);const o=Number.parseInt(s,10);if(isNaN(o)){throw new Error("invalid date string")}if(o<1||o>31){throw new Error("invalid date value")}const a=e.slice(11,13);const u=Number.parseInt(a,10);if(isNaN(u)){throw new Error("invalid hours string")}if(u<0||u>24){throw new Error("invalid hours value")}const c=e.slice(14,16);const l=Number.parseInt(c,10);if(isNaN(l)){throw new Error("invalid minutes string")}if(l<0||l>60){throw new Error("invalid minutes value")}const d=e.slice(17,19);const f=Number.parseInt(d,10);if(isNaN(f)){throw new Error("invalid seconds string")}if(f<0||f>60){throw new Error("invalid seconds value")}if(e.length===24){const t=e.slice(20,23);const n=Number.parseInt(t,10);if(isNaN(n)){throw new Error("invalid ms string")}return Date.UTC(r,i-1,o,u,l,f,n)}return Date.UTC(r,i-1,o,u,l,f)}t.parseUTC=parseUTC},2199:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.URICredentialsProviderBuilder=void 0;const n=r(3261);const i=r(7977);class URICredentialsProvider extends n.SessionCredentialProvider{static builder(){return new URICredentialsProviderBuilder}constructor(e){super(n.STALE_TIME);this.doRequest=i.doRequest;this.refresher=this.getCredentialsUri;this.credentialsURI=e.credentialsURI;this.readTimeout=e.readTimeout;this.connectTimeout=e.connectTimeout}getProviderName(){return"credential_uri"}async getCredentialsUri(){const e=i.Request.builder().withMethod("GET").withURL(this.credentialsURI).withReadTimeout(this.readTimeout||1e4).withConnectTimeout(this.connectTimeout||5e3);const t=e.build();const r=await this.doRequest(t);if(r.statusCode!==200){throw new Error(`get sts token failed, httpStatus: ${r.statusCode}, message = ${r.body.toString("utf8")}.`)}let s;try{s=JSON.parse(r.body.toString("utf8"))}catch(e){throw new Error(`get sts token failed, json parse failed: ${e.message}, result: ${r.body.toString("utf8")}.`)}if(!s||!s.AccessKeyId||!s.AccessKeySecret||!s.SecurityToken){throw new Error(`error retrieving credentials from credentialsURI result: ${JSON.stringify(s)}.`)}return new n.Session(s.AccessKeyId,s.AccessKeySecret,s.SecurityToken,s.Expiration)}}t["default"]=URICredentialsProvider;class URICredentialsProviderBuilder{withCredentialsURI(e){this.credentialsURI=e;return this}withReadTimeout(e){this.readTimeout=e;return this}withConnectTimeout(e){this.connectTimeout=e;return this}build(){if(!this.credentialsURI){this.credentialsURI=process.env.ALIBABA_CLOUD_CREDENTIALS_URI}return new URICredentialsProvider(this)}}t.URICredentialsProviderBuilder=URICredentialsProviderBuilder},1593:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=o(r(9896));const u=o(r(8522));const c=s(r(8844));const l=r(6013);const d=o(r(5356));const f="http://100.100.100.200/latest/meta-data/ram/security-credentials/";class RsaKeyPairCredential extends u.default{constructor(e,t){if(!e){throw new Error("Missing required publicKeyId option in config for rsa_key_pair")}if(!t){throw new Error("Missing required privateKeyFile option in config for rsa_key_pair")}if(!a.default.existsSync(t)){throw new Error(`privateKeyFile ${t} cannot be empty`)}const r=new d.default({type:"rsa_key_pair"});super(r);this.privateKey=c.parseFile(t);this.publicKeyId=e}async updateCredential(){const e=f+this.roleName;const t=await(0,l.request)(e,{accessKeyId:this.publicKeyId,action:"GenerateSessionAccessKey",durationSeconds:3600,signatureMethod:"SHA256withRSA",signatureType:"PRIVATEKEY"},{},this.privateKey);this.sessionCredential=t.Credentials}}t["default"]=RsaKeyPairCredential},8522:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=o(r(205));const u=s(r(8844));const c=o(r(5356));const l=o(r(6885));class SessionCredential extends a.default{constructor(e){const t=new c.default({type:e.type,accessKeyId:e.accessKeyId,accessKeySecret:e.accessKeySecret,securityToken:e.securityToken});super(t);this.sessionCredential=null;this.durationSeconds=e.durationSeconds||3600}async updateCredential(){throw new Error("need implemented in sub-class")}async ensureCredential(){const e=this.needUpdateCredential();if(e){await this.updateCredential()}}async getAccessKeyId(){await this.ensureCredential();return this.sessionCredential.AccessKeyId}async getAccessKeySecret(){await this.ensureCredential();return this.sessionCredential.AccessKeySecret}async getSecurityToken(){await this.ensureCredential();return this.sessionCredential.SecurityToken}needUpdateCredential(){if(!this.sessionCredential||!this.sessionCredential.Expiration||!this.sessionCredential.AccessKeyId||!this.sessionCredential.AccessKeySecret||!this.sessionCredential.SecurityToken){return true}const e=u.timestamp(new Date,this.durationSeconds*.05*1e3);if(this.sessionCredential.Expiration<e){return true}return false}async getCredential(){await this.ensureCredential();return new l.default({accessKeyId:this.sessionCredential.AccessKeyId,accessKeySecret:this.sessionCredential.AccessKeySecret,securityToken:this.sessionCredential.SecurityToken,bearerToken:this.bearerToken,type:this.type})}}t["default"]=SessionCredential},4457:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.DEFAULT_CLIENT=t.DEFAULT_UA=void 0;const a=s(r(857));const u=o(r(9343));t.DEFAULT_UA=`AlibabaCloud (${a.platform()}; ${a.arch()}) `+`Node.js/${process.version} Core/${u.default.version}`;t.DEFAULT_CLIENT=`Node.js(${process.version}), ${u.default.name}: ${u.default.version}`},6013:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.request=void 0;const a=o(r(3312));const u=s(r(1406));const c=s(r(4457));const l=s(r(8844));const d=new Set([200,"200","OK","Success"]);function firstLetterUpper(e){return e.slice(0,1).toUpperCase()+e.slice(1)}function formatParams(e){const t=Object.keys(e);const r={};for(const n of t){r[firstLetterUpper(n)]=e[n]}return r}function encode(e){const t=encodeURIComponent(e);return t.replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function replaceRepeatList(e,t,r){for(let n=0;n<r.length;n++){const i=r[n];if(i&&typeof i==="object"){const r=Object.keys(i);for(const s of r){e[`${t}.${n+1}.${s}`]=i[s]}}else{e[`${t}.${n+1}`]=i}}}function flatParams(e){const t={};const r=Object.keys(e);for(const n of r){const r=e[n];if(Array.isArray(r)){replaceRepeatList(t,n,r)}else{t[n]=r}}return t}function normalize(e){const t=[];const r=flatParams(e);const n=Object.keys(r).sort();for(const e of n){const n=r[e];t.push([encode(e),encode(n)])}return t}function canonicalize(e){const t=[];for(const[r,n]of e){t.push(r+"="+n)}return t.join("&")}function _buildParams(){const e={Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureNonce:u.makeNonce(),SignatureVersion:"1.0",Timestamp:l.timestamp(),Version:"2015-04-01",RegionId:"cn-hangzhou"};return e}async function request(e,t={},r={},n){let i=Object.assign({headers:{"x-sdk-client":c.DEFAULT_CLIENT,"user-agent":c.DEFAULT_UA}},r);if(i.formatParams!==false){t=formatParams(t)}t=Object.assign(Object.assign({},_buildParams()),t);const s=(r.method||"GET").toUpperCase();const o=normalize(t);if(!i.anonymous){const e=canonicalize(o);const t=`${s}&${encode("/")}&${encode(e)}`;const r=n+"&";const i=u.sha1(t,r,"base64");o.push(["Signature",encode(i)])}const l=r.method==="POST"?`${e}/`:`${e}/?${canonicalize(o)}`;if(r.method==="POST"){r.headers=r.headers||{};r.headers["content-type"]="application/x-www-form-urlencoded";r.data=canonicalize(o)}const f=await a.default.request(l,r);const h=await a.default.read(f,"utf8");const p=JSON.parse(h);if(p.Code&&!d.has(p.Code)){const e=new Error(`${p.Message}`);e.name=p.Code+"Error";e.data=p;e.code=p.Code;e.url=l;throw e}return p}t.request=request},8844:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getRandomInt=t.loadIni=t.parseFile=t.timestamp=void 0;const a=s(r(6482));const u=s(r(1406));const c=o(r(9896));const l=r(9023);const d=(0,l.promisify)(c.default.readFile);const f=(0,l.promisify)(c.default.access);function timestamp(e,t){let r=new Date(e);if(!e||isNaN(r.getTime())){r=new Date}if(t){r.setTime(r.getTime()+t)}const n=r.getUTCFullYear();const i=u.pad2(r.getUTCMonth()+1);const s=u.pad2(r.getUTCDate());const o=u.pad2(r.getUTCHours());const a=u.pad2(r.getUTCMinutes());const c=u.pad2(r.getUTCSeconds());return`${n}-${i}-${s}T${o}:${a}:${c}Z`}t.timestamp=timestamp;function parseFile(e,t=false){try{c.default.accessSync(e,c.default.constants.R_OK)}catch(e){if(t){return null}throw new Error("Has no read permission to credentials file")}return a.parse(c.default.readFileSync(e,"utf-8"))}t.parseFile=parseFile;async function loadIni(e){await f(e,c.default.constants.R_OK);const t=await d(e,"utf-8");return a.parse(t)}t.loadIni=loadIni;function getRandomInt(e){return Math.floor(Math.random()*(e+1))}t.getRandomInt=getRandomInt},8414:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.InterceptorContextResponse=t.InterceptorContextConfiguration=t.InterceptorContextRequest=t.AttributeMap=t.InterceptorContext=void 0;const a=o(r(113));const u=s(r(4828));class InterceptorContext extends u.Model{constructor(e){super(e)}static names(){return{request:"request",configuration:"configuration",response:"response"}}static types(){return{request:InterceptorContextRequest,configuration:InterceptorContextConfiguration,response:InterceptorContextResponse}}}t.InterceptorContext=InterceptorContext;class AttributeMap extends u.Model{constructor(e){super(e)}static names(){return{attributes:"attributes",key:"key"}}static types(){return{attributes:{type:"map",keyType:"string",valueType:"any"},key:{type:"map",keyType:"string",valueType:"string"}}}}t.AttributeMap=AttributeMap;class InterceptorContextRequest extends u.Model{constructor(e){super(e)}static names(){return{headers:"headers",query:"query",body:"body",stream:"stream",hostMap:"hostMap",pathname:"pathname",productId:"productId",action:"action",version:"version",protocol:"protocol",method:"method",authType:"authType",bodyType:"bodyType",reqBodyType:"reqBodyType",style:"style",credential:"credential",signatureVersion:"signatureVersion",signatureAlgorithm:"signatureAlgorithm",userAgent:"userAgent"}}static types(){return{headers:{type:"map",keyType:"string",valueType:"string"},query:{type:"map",keyType:"string",valueType:"string"},body:"any",stream:"Readable",hostMap:{type:"map",keyType:"string",valueType:"string"},pathname:"string",productId:"string",action:"string",version:"string",protocol:"string",method:"string",authType:"string",bodyType:"string",reqBodyType:"string",style:"string",credential:a.default,signatureVersion:"string",signatureAlgorithm:"string",userAgent:"string"}}}t.InterceptorContextRequest=InterceptorContextRequest;class InterceptorContextConfiguration extends u.Model{constructor(e){super(e)}static names(){return{regionId:"regionId",endpoint:"endpoint",endpointRule:"endpointRule",endpointMap:"endpointMap",endpointType:"endpointType",network:"network",suffix:"suffix"}}static types(){return{regionId:"string",endpoint:"string",endpointRule:"string",endpointMap:{type:"map",keyType:"string",valueType:"string"},endpointType:"string",network:"string",suffix:"string"}}}t.InterceptorContextConfiguration=InterceptorContextConfiguration;class InterceptorContextResponse extends u.Model{constructor(e){super(e)}static names(){return{statusCode:"statusCode",headers:"headers",body:"body",deserializedBody:"deserializedBody"}}static types(){return{statusCode:"number",headers:{type:"map",keyType:"string",valueType:"string"},body:"Readable",deserializedBody:"any"}}}t.InterceptorContextResponse=InterceptorContextResponse;class Client{constructor(){}}t["default"]=Client},5462:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),s=0;s<r.length;s++)if(r[s]!=="default")n(t,e,r[s]);i(t,e);return t}}();var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Params=t.OpenApiRequest=t.Config=t.GlobalParameters=void 0;const a=o(r(9252));const u=s(r(113)),c=u;const l=o(r(6199));const d=s(r(8414));const f=o(r(1927));const h=s(r(4828));class GlobalParameters extends h.Model{static names(){return{headers:"headers",queries:"queries"}}static types(){return{headers:{type:"map",keyType:"string",valueType:"string"},queries:{type:"map",keyType:"string",valueType:"string"}}}constructor(e){super(e)}}t.GlobalParameters=GlobalParameters;class Config extends h.Model{static names(){return{accessKeyId:"accessKeyId",accessKeySecret:"accessKeySecret",securityToken:"securityToken",bearerToken:"bearerToken",protocol:"protocol",method:"method",regionId:"regionId",readTimeout:"readTimeout",connectTimeout:"connectTimeout",httpProxy:"httpProxy",httpsProxy:"httpsProxy",credential:"credential",endpoint:"endpoint",noProxy:"noProxy",maxIdleConns:"maxIdleConns",network:"network",userAgent:"userAgent",suffix:"suffix",socks5Proxy:"socks5Proxy",socks5NetWork:"socks5NetWork",endpointType:"endpointType",openPlatformEndpoint:"openPlatformEndpoint",type:"type",signatureVersion:"signatureVersion",signatureAlgorithm:"signatureAlgorithm",globalParameters:"globalParameters",key:"key",cert:"cert",ca:"ca",disableHttp2:"disableHttp2",tlsMinVersion:"tlsMinVersion"}}static types(){return{accessKeyId:"string",accessKeySecret:"string",securityToken:"string",bearerToken:"string",protocol:"string",method:"string",regionId:"string",readTimeout:"number",connectTimeout:"number",httpProxy:"string",httpsProxy:"string",credential:u.default,endpoint:"string",noProxy:"string",maxIdleConns:"number",network:"string",userAgent:"string",suffix:"string",socks5Proxy:"string",socks5NetWork:"string",endpointType:"string",openPlatformEndpoint:"string",type:"string",signatureVersion:"string",signatureAlgorithm:"string",globalParameters:GlobalParameters,key:"string",cert:"string",ca:"string",disableHttp2:"boolean",tlsMinVersion:"string"}}constructor(e){super(e)}}t.Config=Config;class OpenApiRequest extends h.Model{static names(){return{headers:"headers",query:"query",body:"body",stream:"stream",hostMap:"hostMap",endpointOverride:"endpointOverride"}}static types(){return{headers:{type:"map",keyType:"string",valueType:"string"},query:{type:"map",keyType:"string",valueType:"string"},body:"any",stream:"Readable",hostMap:{type:"map",keyType:"string",valueType:"string"},endpointOverride:"string"}}constructor(e){super(e)}}t.OpenApiRequest=OpenApiRequest;class Params extends h.Model{static names(){return{action:"action",version:"version",protocol:"protocol",pathname:"pathname",method:"method",authType:"authType",bodyType:"bodyType",reqBodyType:"reqBodyType",style:"style"}}static types(){return{action:"string",version:"string",protocol:"string",pathname:"string",method:"string",authType:"string",bodyType:"string",reqBodyType:"string",style:"string"}}constructor(e){super(e)}}t.Params=Params;class Client{constructor(e){if(a.default.isUnset(e)){throw h.newError({code:"ParameterMissing",message:"'config' can not be unset"})}if(!a.default.empty(e.accessKeyId)&&!a.default.empty(e.accessKeySecret)){if(!a.default.empty(e.securityToken)){e.type="sts"}else{e.type="access_key"}let t=new c.Config({accessKeyId:e.accessKeyId,type:e.type,accessKeySecret:e.accessKeySecret});t.securityToken=e.securityToken;this._credential=new u.default(t)}else if(!a.default.empty(e.bearerToken)){let t=new c.Config({type:"bearer",bearerToken:e.bearerToken});this._credential=new u.default(t)}else if(!a.default.isUnset(e.credential)){this._credential=e.credential}this._endpoint=e.endpoint;this._endpointType=e.endpointType;this._network=e.network;this._suffix=e.suffix;this._protocol=e.protocol;this._method=e.method;this._regionId=e.regionId;this._userAgent=e.userAgent;this._readTimeout=e.readTimeout;this._connectTimeout=e.connectTimeout;this._httpProxy=e.httpProxy;this._httpsProxy=e.httpsProxy;this._noProxy=e.noProxy;this._socks5Proxy=e.socks5Proxy;this._socks5NetWork=e.socks5NetWork;this._maxIdleConns=e.maxIdleConns;this._signatureVersion=e.signatureVersion;this._signatureAlgorithm=e.signatureAlgorithm;this._globalParameters=e.globalParameters;this._key=e.key;this._cert=e.cert;this._ca=e.ca;this._disableHttp2=e.disableHttp2;this._tlsMinVersion=e.tlsMinVersion}async doRPCRequest(e,t,r,n,i,s,o,u){let c={timeouted:"retry",key:a.default.defaultString(u.key,this._key),cert:a.default.defaultString(u.cert,this._cert),ca:a.default.defaultString(u.ca,this._ca),readTimeout:a.default.defaultNumber(u.readTimeout,this._readTimeout),connectTimeout:a.default.defaultNumber(u.connectTimeout,this._connectTimeout),httpProxy:a.default.defaultString(u.httpProxy,this._httpProxy),httpsProxy:a.default.defaultString(u.httpsProxy,this._httpsProxy),noProxy:a.default.defaultString(u.noProxy,this._noProxy),socks5Proxy:a.default.defaultString(u.socks5Proxy,this._socks5Proxy),socks5NetWork:a.default.defaultString(u.socks5NetWork,this._socks5NetWork),maxIdleConns:a.default.defaultNumber(u.maxIdleConns,this._maxIdleConns),retry:{retryable:u.autoretry,maxAttempts:a.default.defaultNumber(u.maxAttempts,3)},backoff:{policy:a.default.defaultString(u.backoffPolicy,"no"),period:a.default.defaultNumber(u.backoffPeriod,1)},ignoreSSL:u.ignoreSSL,tlsMinVersion:this._tlsMinVersion};let d=null;let f=Date.now();let p=0;while(h.allowRetry(c["retry"],p,f)){if(p>0){let e=h.getBackoffTime(c["backoff"],p);if(e>0){await h.sleep(e)}}p=p+1;try{let f=new h.Request;f.protocol=a.default.defaultString(this._protocol,r);f.method=n;f.pathname="/";let p={};let m={};if(!a.default.isUnset(this._globalParameters)){let e=this._globalParameters;if(!a.default.isUnset(e.queries)){p=e.queries}if(!a.default.isUnset(e.headers)){m=e.headers}}let y={};let g={};if(!a.default.isUnset(u.extendsParameters)){let e=u.extendsParameters;if(!a.default.isUnset(e.headers)){y=e.headers}if(!a.default.isUnset(e.queries)){g=e.queries}}f.query=Object.assign(Object.assign(Object.assign({Action:e,Format:"json",Version:t,Timestamp:l.default.getTimestamp(),SignatureNonce:a.default.getNonce()},p),g),o.query);let b=this.getRpcHeaders();if(a.default.isUnset(b)){f.headers=Object.assign(Object.assign(Object.assign({host:this._endpoint,"x-acs-version":t,"x-acs-action":e,"user-agent":this.getUserAgent()},m),y),o.headers)}else{f.headers=Object.assign(Object.assign(Object.assign(Object.assign({host:this._endpoint,"x-acs-version":t,"x-acs-action":e,"user-agent":this.getUserAgent()},m),y),o.headers),b)}if(!a.default.isUnset(o.body)){let e=a.default.assertAsMap(o.body);let t=a.default.anyifyMapValue(l.default.query(e));f.body=new h.BytesReadable(a.default.toFormString(t));f.headers["content-type"]="application/x-www-form-urlencoded"}if(!a.default.equalString(i,"Anonymous")){if(a.default.isUnset(this._credential)){throw h.newError({code:`InvalidCredentials`,message:`Please set up the credentials correctly. If you are setting them through environment variables, please ensure that ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set correctly. See https://help.aliyun.com/zh/sdk/developer-reference/configure-the-alibaba-cloud-accesskey-environment-variable-on-linux-macos-and-windows-systems for more details.`})}let e=await this._credential.getCredential();if(!a.default.empty(e.providerName)){f.headers["x-acs-credentials-provider"]=e.providerName}let t=e.type;if(a.default.equalString(t,"bearer")){let t=e.bearerToken;f.query["BearerToken"]=t;f.query["SignatureType"]="BEARERTOKEN"}else if(a.default.equalString(t,"id_token")){let t=e.securityToken;f.headers["x-acs-zero-trust-idtoken"]=t}else{let t=e.accessKeyId;let r=e.accessKeySecret;let n=e.securityToken;if(!a.default.empty(n)){f.query["SecurityToken"]=n}f.query["SignatureMethod"]="HMAC-SHA1";f.query["SignatureVersion"]="1.0";f.query["AccessKeyId"]=t;let i=null;if(!a.default.isUnset(o.body)){i=a.default.assertAsMap(o.body)}let s=Object.assign(Object.assign({},f.query),l.default.query(i));f.query["Signature"]=l.default.getRPCSignature(s,f.method,r)}}d=f;let w=await h.doAction(f,c);if(a.default.is4xx(w.statusCode)||a.default.is5xx(w.statusCode)){let e=await a.default.readAsJSON(w.body);let t=a.default.assertAsMap(e);let r=Client.defaultAny(t["RequestId"],t["requestId"]);t["statusCode"]=w.statusCode;throw h.newError({code:`${Client.defaultAny(t["Code"],t["code"])}`,message:`code: ${w.statusCode}, ${Client.defaultAny(t["Message"],t["message"])} request id: ${r}`,data:t,description:`${Client.defaultAny(t["Description"],t["description"])}`,accessDeniedDetail:Client.defaultAny(t["AccessDeniedDetail"],t["accessDeniedDetail"])})}if(a.default.equalString(s,"binary")){let e={body:w.body,headers:w.headers,statusCode:w.statusCode};return e}else if(a.default.equalString(s,"byte")){let e=await a.default.readAsBytes(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(s,"string")){let e=await a.default.readAsString(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(s,"json")){let e=await a.default.readAsJSON(w.body);let t=a.default.assertAsMap(e);return{body:t,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(s,"array")){let e=await a.default.readAsJSON(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else{return{headers:w.headers,statusCode:w.statusCode}}}catch(e){if(h.isRetryable(e)){continue}throw e}}throw h.newUnretryableError(d)}async doROARequest(e,t,r,n,i,s,o,u,c){let d={timeouted:"retry",key:a.default.defaultString(c.key,this._key),cert:a.default.defaultString(c.cert,this._cert),ca:a.default.defaultString(c.ca,this._ca),readTimeout:a.default.defaultNumber(c.readTimeout,this._readTimeout),connectTimeout:a.default.defaultNumber(c.connectTimeout,this._connectTimeout),httpProxy:a.default.defaultString(c.httpProxy,this._httpProxy),httpsProxy:a.default.defaultString(c.httpsProxy,this._httpsProxy),noProxy:a.default.defaultString(c.noProxy,this._noProxy),socks5Proxy:a.default.defaultString(c.socks5Proxy,this._socks5Proxy),socks5NetWork:a.default.defaultString(c.socks5NetWork,this._socks5NetWork),maxIdleConns:a.default.defaultNumber(c.maxIdleConns,this._maxIdleConns),retry:{retryable:c.autoretry,maxAttempts:a.default.defaultNumber(c.maxAttempts,3)},backoff:{policy:a.default.defaultString(c.backoffPolicy,"no"),period:a.default.defaultNumber(c.backoffPeriod,1)},ignoreSSL:c.ignoreSSL,tlsMinVersion:this._tlsMinVersion};let f=null;let p=Date.now();let m=0;while(h.allowRetry(d["retry"],m,p)){if(m>0){let e=h.getBackoffTime(d["backoff"],m);if(e>0){await h.sleep(e)}}m=m+1;try{let p=new h.Request;p.protocol=a.default.defaultString(this._protocol,r);p.method=n;p.pathname=s;let m={};let y={};if(!a.default.isUnset(this._globalParameters)){let e=this._globalParameters;if(!a.default.isUnset(e.queries)){m=e.queries}if(!a.default.isUnset(e.headers)){y=e.headers}}let g={};let b={};if(!a.default.isUnset(c.extendsParameters)){let e=c.extendsParameters;if(!a.default.isUnset(e.headers)){g=e.headers}if(!a.default.isUnset(e.queries)){b=e.queries}}p.headers=Object.assign(Object.assign(Object.assign({date:a.default.getDateUTCString(),host:this._endpoint,accept:"application/json","x-acs-signature-nonce":a.default.getNonce(),"x-acs-signature-method":"HMAC-SHA1","x-acs-signature-version":"1.0","x-acs-version":t,"x-acs-action":e,"user-agent":a.default.getUserAgent(this._userAgent)},y),g),u.headers);if(!a.default.isUnset(u.body)){p.body=new h.BytesReadable(a.default.toJSONString(u.body));p.headers["content-type"]="application/json; charset=utf-8"}p.query=Object.assign(Object.assign({},m),b);if(!a.default.isUnset(u.query)){p.query=Object.assign(Object.assign({},p.query),u.query)}if(!a.default.equalString(i,"Anonymous")){if(a.default.isUnset(this._credential)){throw h.newError({code:`InvalidCredentials`,message:`Please set up the credentials correctly. If you are setting them through environment variables, please ensure that ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set correctly. See https://help.aliyun.com/zh/sdk/developer-reference/configure-the-alibaba-cloud-accesskey-environment-variable-on-linux-macos-and-windows-systems for more details.`})}let e=await this._credential.getCredential();if(!a.default.empty(e.providerName)){p.headers["x-acs-credentials-provider"]=e.providerName}let t=e.type;if(a.default.equalString(t,"bearer")){let t=e.bearerToken;p.headers["x-acs-bearer-token"]=t;p.headers["x-acs-signature-type"]="BEARERTOKEN"}else if(a.default.equalString(t,"id_token")){let t=e.securityToken;p.headers["x-acs-zero-trust-idtoken"]=t}else{let t=e.accessKeyId;let r=e.accessKeySecret;let n=e.securityToken;if(!a.default.empty(n)){p.headers["x-acs-accesskey-id"]=t;p.headers["x-acs-security-token"]=n}let i=l.default.getStringToSign(p);p.headers["authorization"]=`acs ${t}:${l.default.getROASignature(i,r)}`}}f=p;let w=await h.doAction(p,d);if(a.default.equalNumber(w.statusCode,204)){return{headers:w.headers}}if(a.default.is4xx(w.statusCode)||a.default.is5xx(w.statusCode)){let e=await a.default.readAsJSON(w.body);let t=a.default.assertAsMap(e);let r=Client.defaultAny(t["RequestId"],t["requestId"]);r=Client.defaultAny(r,t["requestid"]);t["statusCode"]=w.statusCode;throw h.newError({code:`${Client.defaultAny(t["Code"],t["code"])}`,message:`code: ${w.statusCode}, ${Client.defaultAny(t["Message"],t["message"])} request id: ${r}`,data:t,description:`${Client.defaultAny(t["Description"],t["description"])}`,accessDeniedDetail:Client.defaultAny(t["AccessDeniedDetail"],t["accessDeniedDetail"])})}if(a.default.equalString(o,"binary")){let e={body:w.body,headers:w.headers,statusCode:w.statusCode};return e}else if(a.default.equalString(o,"byte")){let e=await a.default.readAsBytes(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(o,"string")){let e=await a.default.readAsString(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(o,"json")){let e=await a.default.readAsJSON(w.body);let t=a.default.assertAsMap(e);return{body:t,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(o,"array")){let e=await a.default.readAsJSON(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else{return{headers:w.headers,statusCode:w.statusCode}}}catch(e){if(h.isRetryable(e)){continue}throw e}}throw h.newUnretryableError(f)}async doROARequestWithForm(e,t,r,n,i,s,o,u,c){let d={timeouted:"retry",key:a.default.defaultString(c.key,this._key),cert:a.default.defaultString(c.cert,this._cert),ca:a.default.defaultString(c.ca,this._ca),readTimeout:a.default.defaultNumber(c.readTimeout,this._readTimeout),connectTimeout:a.default.defaultNumber(c.connectTimeout,this._connectTimeout),httpProxy:a.default.defaultString(c.httpProxy,this._httpProxy),httpsProxy:a.default.defaultString(c.httpsProxy,this._httpsProxy),noProxy:a.default.defaultString(c.noProxy,this._noProxy),socks5Proxy:a.default.defaultString(c.socks5Proxy,this._socks5Proxy),socks5NetWork:a.default.defaultString(c.socks5NetWork,this._socks5NetWork),maxIdleConns:a.default.defaultNumber(c.maxIdleConns,this._maxIdleConns),retry:{retryable:c.autoretry,maxAttempts:a.default.defaultNumber(c.maxAttempts,3)},backoff:{policy:a.default.defaultString(c.backoffPolicy,"no"),period:a.default.defaultNumber(c.backoffPeriod,1)},ignoreSSL:c.ignoreSSL,tlsMinVersion:this._tlsMinVersion};let f=null;let p=Date.now();let m=0;while(h.allowRetry(d["retry"],m,p)){if(m>0){let e=h.getBackoffTime(d["backoff"],m);if(e>0){await h.sleep(e)}}m=m+1;try{let p=new h.Request;p.protocol=a.default.defaultString(this._protocol,r);p.method=n;p.pathname=s;let m={};let y={};if(!a.default.isUnset(this._globalParameters)){let e=this._globalParameters;if(!a.default.isUnset(e.queries)){m=e.queries}if(!a.default.isUnset(e.headers)){y=e.headers}}let g={};let b={};if(!a.default.isUnset(c.extendsParameters)){let e=c.extendsParameters;if(!a.default.isUnset(e.headers)){g=e.headers}if(!a.default.isUnset(e.queries)){b=e.queries}}p.headers=Object.assign(Object.assign(Object.assign({date:a.default.getDateUTCString(),host:this._endpoint,accept:"application/json","x-acs-signature-nonce":a.default.getNonce(),"x-acs-signature-method":"HMAC-SHA1","x-acs-signature-version":"1.0","x-acs-version":t,"x-acs-action":e,"user-agent":a.default.getUserAgent(this._userAgent)},y),g),u.headers);if(!a.default.isUnset(u.body)){let e=a.default.assertAsMap(u.body);p.body=new h.BytesReadable(l.default.toForm(e));p.headers["content-type"]="application/x-www-form-urlencoded"}p.query=Object.assign(Object.assign({},m),b);if(!a.default.isUnset(u.query)){p.query=Object.assign(Object.assign({},p.query),u.query)}if(!a.default.equalString(i,"Anonymous")){if(a.default.isUnset(this._credential)){throw h.newError({code:`InvalidCredentials`,message:`Please set up the credentials correctly. If you are setting them through environment variables, please ensure that ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set correctly. See https://help.aliyun.com/zh/sdk/developer-reference/configure-the-alibaba-cloud-accesskey-environment-variable-on-linux-macos-and-windows-systems for more details.`})}let e=await this._credential.getCredential();if(!a.default.empty(e.providerName)){p.headers["x-acs-credentials-provider"]=e.providerName}let t=e.type;if(a.default.equalString(t,"bearer")){let t=e.bearerToken;p.headers["x-acs-bearer-token"]=t;p.headers["x-acs-signature-type"]="BEARERTOKEN"}else if(a.default.equalString(t,"id_token")){let t=e.securityToken;p.headers["x-acs-zero-trust-idtoken"]=t}else{let t=e.accessKeyId;let r=e.accessKeySecret;let n=e.securityToken;if(!a.default.empty(n)){p.headers["x-acs-accesskey-id"]=t;p.headers["x-acs-security-token"]=n}let i=l.default.getStringToSign(p);p.headers["authorization"]=`acs ${t}:${l.default.getROASignature(i,r)}`}}f=p;let w=await h.doAction(p,d);if(a.default.equalNumber(w.statusCode,204)){return{headers:w.headers}}if(a.default.is4xx(w.statusCode)||a.default.is5xx(w.statusCode)){let e=await a.default.readAsJSON(w.body);let t=a.default.assertAsMap(e);t["statusCode"]=w.statusCode;throw h.newError({code:`${Client.defaultAny(t["Code"],t["code"])}`,message:`code: ${w.statusCode}, ${Client.defaultAny(t["Message"],t["message"])} request id: ${Client.defaultAny(t["RequestId"],t["requestId"])}`,data:t,description:`${Client.defaultAny(t["Description"],t["description"])}`,accessDeniedDetail:Client.defaultAny(t["AccessDeniedDetail"],t["accessDeniedDetail"])})}if(a.default.equalString(o,"binary")){let e={body:w.body,headers:w.headers,statusCode:w.statusCode};return e}else if(a.default.equalString(o,"byte")){let e=await a.default.readAsBytes(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(o,"string")){let e=await a.default.readAsString(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(o,"json")){let e=await a.default.readAsJSON(w.body);let t=a.default.assertAsMap(e);return{body:t,headers:w.headers,statusCode:w.statusCode}}else if(a.default.equalString(o,"array")){let e=await a.default.readAsJSON(w.body);return{body:e,headers:w.headers,statusCode:w.statusCode}}else{return{headers:w.headers,statusCode:w.statusCode}}}catch(e){if(h.isRetryable(e)){continue}throw e}}throw h.newUnretryableError(f)}async doRequest(e,t,r){let n={timeouted:"retry",key:a.default.defaultString(r.key,this._key),cert:a.default.defaultString(r.cert,this._cert),ca:a.default.defaultString(r.ca,this._ca),readTimeout:a.default.defaultNumber(r.readTimeout,this._readTimeout),connectTimeout:a.default.defaultNumber(r.connectTimeout,this._connectTimeout),httpProxy:a.default.defaultString(r.httpProxy,this._httpProxy),httpsProxy:a.default.defaultString(r.httpsProxy,this._httpsProxy),noProxy:a.default.defaultString(r.noProxy,this._noProxy),socks5Proxy:a.default.defaultString(r.socks5Proxy,this._socks5Proxy),socks5NetWork:a.default.defaultString(r.socks5NetWork,this._socks5NetWork),maxIdleConns:a.default.defaultNumber(r.maxIdleConns,this._maxIdleConns),retry:{retryable:r.autoretry,maxAttempts:a.default.defaultNumber(r.maxAttempts,3)},backoff:{policy:a.default.defaultString(r.backoffPolicy,"no"),period:a.default.defaultNumber(r.backoffPeriod,1)},ignoreSSL:r.ignoreSSL,tlsMinVersion:this._tlsMinVersion};let i=null;let s=Date.now();let o=0;while(h.allowRetry(n["retry"],o,s)){if(o>0){let e=h.getBackoffTime(n["backoff"],o);if(e>0){await h.sleep(e)}}o=o+1;try{let s=new h.Request;s.protocol=a.default.defaultString(this._protocol,e.protocol);s.method=e.method;s.pathname=e.pathname;let o={};let u={};if(!a.default.isUnset(this._globalParameters)){let e=this._globalParameters;if(!a.default.isUnset(e.queries)){o=e.queries}if(!a.default.isUnset(e.headers)){u=e.headers}}let c={};let d={};if(!a.default.isUnset(r.extendsParameters)){let e=r.extendsParameters;if(!a.default.isUnset(e.headers)){c=e.headers}if(!a.default.isUnset(e.queries)){d=e.queries}}s.query=Object.assign(Object.assign(Object.assign({},o),d),t.query);s.headers=Object.assign(Object.assign(Object.assign({host:this._endpoint,"x-acs-version":e.version,"x-acs-action":e.action,"user-agent":this.getUserAgent(),"x-acs-date":l.default.getTimestamp(),"x-acs-signature-nonce":a.default.getNonce(),accept:"application/json"},u),c),t.headers);if(a.default.equalString(e.style,"RPC")){let e=this.getRpcHeaders();if(!a.default.isUnset(e)){s.headers=Object.assign(Object.assign({},s.headers),e)}}let p=a.default.defaultString(this._signatureAlgorithm,"ACS3-HMAC-SHA256");let m=l.default.hexEncode(l.default.hash(a.default.toBytes(""),p));if(!a.default.isUnset(t.stream)){let e=await a.default.readAsBytes(t.stream);m=l.default.hexEncode(l.default.hash(e,p));s.body=new h.BytesReadable(e);s.headers["content-type"]="application/octet-stream"}else{if(!a.default.isUnset(t.body)){if(a.default.equalString(e.reqBodyType,"byte")){let e=a.default.assertAsBytes(t.body);m=l.default.hexEncode(l.default.hash(e,p));s.body=new h.BytesReadable(e)}else if(a.default.equalString(e.reqBodyType,"json")){let e=a.default.toJSONString(t.body);m=l.default.hexEncode(l.default.hash(a.default.toBytes(e),p));s.body=new h.BytesReadable(e);s.headers["content-type"]="application/json; charset=utf-8"}else{let e=a.default.assertAsMap(t.body);let r=l.default.toForm(e);m=l.default.hexEncode(l.default.hash(a.default.toBytes(r),p));s.body=new h.BytesReadable(r);s.headers["content-type"]="application/x-www-form-urlencoded"}}}s.headers["x-acs-content-sha256"]=m;if(!a.default.equalString(e.authType,"Anonymous")){if(a.default.isUnset(this._credential)){throw h.newError({code:`InvalidCredentials`,message:`Please set up the credentials correctly. If you are setting them through environment variables, please ensure that ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set correctly. See https://help.aliyun.com/zh/sdk/developer-reference/configure-the-alibaba-cloud-accesskey-environment-variable-on-linux-macos-and-windows-systems for more details.`})}let t=await this._credential.getCredential();if(!a.default.empty(t.providerName)){s.headers["x-acs-credentials-provider"]=t.providerName}let r=t.type;if(a.default.equalString(r,"bearer")){let r=t.bearerToken;s.headers["x-acs-bearer-token"]=r;if(a.default.equalString(e.style,"RPC")){s.query["SignatureType"]="BEARERTOKEN"}else{s.headers["x-acs-signature-type"]="BEARERTOKEN"}}else if(a.default.equalString(r,"id_token")){let e=t.securityToken;s.headers["x-acs-zero-trust-idtoken"]=e}else{let e=t.accessKeyId;let r=t.accessKeySecret;let n=t.securityToken;if(!a.default.empty(n)){s.headers["x-acs-accesskey-id"]=e;s.headers["x-acs-security-token"]=n}s.headers["Authorization"]=l.default.getAuthorization(s,p,m,e,r)}}i=s;let y=await h.doAction(s,n);if(a.default.is4xx(y.statusCode)||a.default.is5xx(y.statusCode)){let e={};if(!a.default.isUnset(y.headers["content-type"])&&a.default.equalString(y.headers["content-type"],"text/xml;charset=utf-8")){let t=await a.default.readAsString(y.body);let r=f.default.parseXml(t,null);e=a.default.assertAsMap(r["Error"])}else{let t=await a.default.readAsJSON(y.body);e=a.default.assertAsMap(t)}e["statusCode"]=y.statusCode;throw h.newError({code:`${Client.defaultAny(e["Code"],e["code"])}`,message:`code: ${y.statusCode}, ${Client.defaultAny(e["Message"],e["message"])} request id: ${Client.defaultAny(e["RequestId"],e["requestId"])}`,data:e,description:`${Client.defaultAny(e["Description"],e["description"])}`,accessDeniedDetail:Client.defaultAny(e["AccessDeniedDetail"],e["accessDeniedDetail"])})}if(a.default.equalString(e.bodyType,"binary")){let e={body:y.body,headers:y.headers,statusCode:y.statusCode};return e}else if(a.default.equalString(e.bodyType,"byte")){let e=await a.default.readAsBytes(y.body);return{body:e,headers:y.headers,statusCode:y.statusCode}}else if(a.default.equalString(e.bodyType,"string")){let e=await a.default.readAsString(y.body);return{body:e,headers:y.headers,statusCode:y.statusCode}}else if(a.default.equalString(e.bodyType,"json")){let e=await a.default.readAsJSON(y.body);let t=a.default.assertAsMap(e);return{body:t,headers:y.headers,statusCode:y.statusCode}}else if(a.default.equalString(e.bodyType,"array")){let e=await a.default.readAsJSON(y.body);return{body:e,headers:y.headers,statusCode:y.statusCode}}else{let e=await a.default.readAsString(y.body);return{body:e,headers:y.headers,statusCode:y.statusCode}}}catch(e){if(h.isRetryable(e)){continue}throw e}}throw h.newUnretryableError(i)}async execute(e,t,r){let n={timeouted:"retry",key:a.default.defaultString(r.key,this._key),cert:a.default.defaultString(r.cert,this._cert),ca:a.default.defaultString(r.ca,this._ca),readTimeout:a.default.defaultNumber(r.readTimeout,this._readTimeout),connectTimeout:a.default.defaultNumber(r.connectTimeout,this._connectTimeout),httpProxy:a.default.defaultString(r.httpProxy,this._httpProxy),httpsProxy:a.default.defaultString(r.httpsProxy,this._httpsProxy),noProxy:a.default.defaultString(r.noProxy,this._noProxy),socks5Proxy:a.default.defaultString(r.socks5Proxy,this._socks5Proxy),socks5NetWork:a.default.defaultString(r.socks5NetWork,this._socks5NetWork),maxIdleConns:a.default.defaultNumber(r.maxIdleConns,this._maxIdleConns),retry:{retryable:r.autoretry,maxAttempts:a.default.defaultNumber(r.maxAttempts,3)},backoff:{policy:a.default.defaultString(r.backoffPolicy,"no"),period:a.default.defaultNumber(r.backoffPeriod,1)},ignoreSSL:r.ignoreSSL,disableHttp2:Client.defaultAny(this._disableHttp2,false),tlsMinVersion:this._tlsMinVersion};let i=null;let s=Date.now();let o=0;while(h.allowRetry(n["retry"],o,s)){if(o>0){let e=h.getBackoffTime(n["backoff"],o);if(e>0){await h.sleep(e)}}o=o+1;try{let s=new h.Request;let o=this.getRpcHeaders();let u={};let c={};if(!a.default.isUnset(this._globalParameters)){let e=this._globalParameters;if(!a.default.isUnset(e.queries)){u=e.queries}if(!a.default.isUnset(e.headers)){c=e.headers}}let l={};let f={};if(!a.default.isUnset(r.extendsParameters)){let e=r.extendsParameters;if(!a.default.isUnset(e.headers)){l=e.headers}if(!a.default.isUnset(e.queries)){f=e.queries}}let p=new d.InterceptorContextRequest({headers:Object.assign(Object.assign(Object.assign(Object.assign({},c),l),t.headers),o),query:Object.assign(Object.assign(Object.assign({},u),f),t.query),body:t.body,stream:t.stream,hostMap:t.hostMap,pathname:e.pathname,productId:this._productId,action:e.action,version:e.version,protocol:a.default.defaultString(this._protocol,e.protocol),method:a.default.defaultString(this._method,e.method),authType:e.authType,bodyType:e.bodyType,reqBodyType:e.reqBodyType,style:e.style,credential:this._credential,signatureVersion:this._signatureVersion,signatureAlgorithm:this._signatureAlgorithm,userAgent:this.getUserAgent()});let m=new d.InterceptorContextConfiguration({regionId:this._regionId,endpoint:a.default.defaultString(t.endpointOverride,this._endpoint),endpointRule:this._endpointRule,endpointMap:this._endpointMap,endpointType:this._endpointType,network:this._network,suffix:this._suffix});let y=new d.InterceptorContext({});y.request=p;y.configuration=m;let g=new d.AttributeMap({});if(!a.default.isUnset(this._attributeMap)){g=this._attributeMap}await this._spi.modifyConfiguration(y,g);await this._spi.modifyRequest(y,g);s.protocol=y.request.protocol;s.method=y.request.method;s.pathname=y.request.pathname;s.query=y.request.query;s.body=y.request.stream;s.headers=y.request.headers;i=s;let b=await h.doAction(s,n);let w=new d.InterceptorContextResponse({statusCode:b.statusCode,headers:b.headers,body:b.body});y.response=w;await this._spi.modifyResponse(y,g);return{headers:y.response.headers,statusCode:y.response.statusCode,body:y.response.deserializedBody}}catch(e){if(h.isRetryable(e)){continue}throw e}}throw h.newUnretryableError(i)}async callApi(e,t,r){if(a.default.isUnset(e)){throw h.newError({code:"ParameterMissing",message:"'params' can not be unset"})}if(a.default.isUnset(this._signatureVersion)||!a.default.equalString(this._signatureVersion,"v4")){if(a.default.isUnset(this._signatureAlgorithm)||!a.default.equalString(this._signatureAlgorithm,"v2")){return await this.doRequest(e,t,r)}else if(a.default.equalString(e.style,"ROA")&&a.default.equalString(e.reqBodyType,"json")){return await this.doROARequest(e.action,e.version,e.protocol,e.method,e.authType,e.pathname,e.bodyType,t,r)}else if(a.default.equalString(e.style,"ROA")){return await this.doROARequestWithForm(e.action,e.version,e.protocol,e.method,e.authType,e.pathname,e.bodyType,t,r)}else{return await this.doRPCRequest(e.action,e.version,e.protocol,e.method,e.authType,e.bodyType,t,r)}}else{return await this.execute(e,t,r)}}getUserAgent(){let e=a.default.getUserAgent(this._userAgent);return e}async getAccessKeyId(){if(a.default.isUnset(this._credential)){return""}let e=await this._credential.getAccessKeyId();return e}async getAccessKeySecret(){if(a.default.isUnset(this._credential)){return""}let e=await this._credential.getAccessKeySecret();return e}async getSecurityToken(){if(a.default.isUnset(this._credential)){return""}let e=await this._credential.getSecurityToken();return e}async getBearerToken(){if(a.default.isUnset(this._credential)){return""}let e=this._credential.getBearerToken();return e}async getType(){if(a.default.isUnset(this._credential)){return""}let e=this._credential.getType();return e}static defaultAny(e,t){if(a.default.isUnset(e)){return t}return e}checkConfig(e){if(a.default.empty(this._endpointRule)&&a.default.empty(e.endpoint)){throw h.newError({code:"ParameterMissing",message:"'config.endpoint' can not be empty"})}}setGatewayClient(e){this._spi=e}setRpcHeaders(e){this._headers=e}getRpcHeaders(){let e=this._headers;this._headers=null;return e}}t["default"]=Client},6199:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=s(r(4828));const u=o(r(5606));const c=o(r(1406));const l=o(r(3480));const d=o(r(6982));const f="-----BEGIN PRIVATE KEY-----\n";const h="\n-----END PRIVATE KEY-----";function replaceRepeatList(e,t,r){if(r){r=r+"."}for(var n=0;n<t.length;n++){var i=t[n];let s=r+(n+1);if(typeof i==="undefined"||i==null){continue}if(Array.isArray(i)){replaceRepeatList(e,i,s)}else if(i instanceof Object){flatMap(e,i,s)}else{e[s]=i.toString()}}}function flatMap(e,t,r=""){if(r){r=r+"."}t=toMap(t);let n=Object.keys(t);for(let i=0;i<n.length;i++){let s=n[i];let o=t[s];s=r+s;if(typeof o==="undefined"||o==null){continue}if(Array.isArray(o)){replaceRepeatList(e,o,s)}else if(o instanceof Object){flatMap(e,o,s)}else{e[s]=o.toString()}}return e}function filter(e){return e.replace(/[\t\n\r\f]/g," ")}function getCanonicalizedHeaders(e){const t="x-acs-";const r=Object.keys(e);const n=[];for(let e=0;e<r.length;e++){const i=r[e];if(i.startsWith(t)){n.push(i)}}n.sort();var i="";for(let t=0;t<n.length;t++){const r=n[t];i+=`${r}:${filter(e[r]).trim()}\n`}return i}function getCanonicalizedResource(e,t){const r=!t?[]:Object.keys(t).sort();if(r.length===0){return e}var n=[];for(var i=0;i<r.length;i++){const e=r[i];n.push(`${e}=${t[e]}`)}return`${e}?${n.join("&")}`}function getAuthorizationQueryString(e){let t=[];const r=!e?[]:Object.keys(e).sort();for(let n=0;n<r.length;n++){const i=r[n];let s=i+"=";if(typeof e[i]!=="undefined"&&e[i]!==null){s=s+encode(e[i])}t.push(s)}return t.join("&")}function getAuthorizationHeaders(e){let t="";let r={};const n=!e?[]:Object.keys(e);for(let t=0;t<n.length;t++){const i=n[t];const s=n[t].toLowerCase();if(s.startsWith("x-acs-")||s==="host"||s==="content-type"){if(r[s]){r[s].push((e[i]||"").trim())}else{r[s]=[(e[i]||"").trim()]}}}var i=Object.keys(r).sort();for(let e=0;e<i.length;e++){const n=i[e];let s=r[n].sort();t+=`${n}:${s.join(",")}\n`}return{canonicalheaders:t,hsKeys:i}}function encode(e){var t=encodeURIComponent(e);return t.replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function normalize(e){var t=[];var r={};flatMap(r,e);var n=Object.keys(r).sort();for(let e=0;e<n.length;e++){var i=n[e];var s=r[i];t.push([encode(i),encode(s)])}return t}function canonicalize(e){var t=[];for(var r=0;r<e.length;r++){var[n,i]=e[r];t.push(n+"="+i)}return t.join("&")}function isModelClass(e){if(!e){return false}return typeof e.types==="function"&&typeof e.names==="function"}function isObjectOrArray(e){return Array.isArray(e)||e instanceof Object&&typeof e!=="function"}function toMap(e){if(!isObjectOrArray(e)){return null}else if(e instanceof a.Model){return a.toMap(e)}else if(e&&e.toMap&&typeof e.toMap==="function"){return e.toMap()}else if(Array.isArray(e)){const t=[];e.forEach((e=>{if(isObjectOrArray(e)){t.push(toMap(e))}else{t.push(e)}}));return t}else if(e instanceof Object){const t={};Object.entries(e).forEach((([e,r])=>{if(isObjectOrArray(r)){t[e]=toMap(r)}else{t[e]=r}}));return t}}class Client{static convert(e,t){if(!t){return}let r=Object.assign({},e);let n=t.constructor;let i=n.types();for(let e of Object.keys(n.names())){if(r[e]!==null&&r[e]!==undefined){if(isModelClass(i[e])){t[e]=new i[e](t[e]);Client.convert(r[e],t[e])}else if(i[e]&&i[e].type==="array"){t[e]=r[e].map((function(t){if(isModelClass(i[e].itemType)){var r=new i[e].itemType({});Client.convert(t,r);return r}return t}))}else if(i[e]&&i[e].type==="map"){t[e]={};Object.keys(r[e]).map((function(n){if(isModelClass(i[e].valueType)){var s=new i[e].valueType({});Client.convert(r[e][n],s);t[e][n]=s}else{t[e][n]=r[e][n]}}))}else{t[e]=r[e]}}}}static getStringToSign(e){const t=e.method;const r=e.headers["accept"];const n=e.headers["content-md5"]||"";const i=e.headers["content-type"]||"";const s=e.headers["date"]||"";const o=`${t}\n${r}\n${n}\n${i}\n${s}\n`;const a=getCanonicalizedHeaders(e.headers);const u=getCanonicalizedResource(e.pathname,e.query);return`${o}${a}${u}`}static getROASignature(e,t){const r=Buffer.from(e,"utf8");return c.default.sha1(r,t,"base64")}static toForm(e){if(!e){return""}let t={};flatMap(t,e);return u.default.toFormString(t)}static getTimestamp(){let e=new Date;let t=e.getUTCFullYear();let r=c.default.pad2(e.getUTCMonth()+1);let n=c.default.pad2(e.getUTCDate());let i=c.default.pad2(e.getUTCHours());let s=c.default.pad2(e.getUTCMinutes());let o=c.default.pad2(e.getUTCSeconds());return`${t}-${r}-${n}T${i}:${s}:${o}Z`}static query(e){if(!e){return{}}let t={};flatMap(t,e);return t}static getRPCSignature(e,t,r){var n=normalize(e);var i=canonicalize(n);var s=`${t}&${encode("/")}&${encode(i)}`;const o=r+"&";return c.default.sha1(s,o,"base64")}static arrayToStringWithSpecifiedStyle(e,t,r){if(!e){return""}if(r==="repeatList"){let r={};replaceRepeatList(r,e,t);return l.default.stringify(r,"&&")}else if(r==="json"){return JSON.stringify(toMap(e))}else if(r==="simple"){return e.join(",")}else if(r==="spaceDelimited"){return e.join(" ")}else if(r==="pipeDelimited"){return e.join("|")}else{return""}}static parseToMap(e){return toMap(e)}static getEndpoint(e,t,r){if(r=="internal"){let t=e.split(".");t[0]+="-internal";e=t.join(".")}if(t&&r=="accelerate"){return"oss-accelerate.aliyuncs.com"}return e}static hexEncode(e){return e.toString("hex")}static hash(e,t){if(t==="ACS3-HMAC-SHA256"||t==="ACS3-RSA-SHA256"){const t=d.default.createHash("sha256");t.update(e);return t.digest()}else if(t=="ACS3-HMAC-SM3"){const t=d.default.createHash("sm3");t.update(e);return t.digest()}}static signatureMethod(e,t,r){if(r==="ACS3-HMAC-SHA256"){const r=d.default.createHmac("sha256",e);r.update(t);return r.digest()}else if(r==="ACS3-HMAC-SM3"){const r=d.default.createHmac("sm3",e);r.update(t);return r.digest()}else if(r==="ACS3-RSA-SHA256"){if(!e.startsWith(f)){e=f+e}if(!e.endsWith(h)){e=e+h}var n=d.default.createSign("RSA-SHA256");n.update(t);var i=n.sign({key:e,padding:d.default.constants.RSA_PKCS1_PADDING});return i}}static getAuthorization(e,t,r,n,i){const s=(e.pathname||"").replace("+","%20").replace("*","%2A").replace("%7E","~");const o=e.method;const a=getAuthorizationQueryString(e.query);const u=getAuthorizationHeaders(e.headers);const c=u["canonicalheaders"];const l=u["hsKeys"];const d=o+"\n"+s+"\n"+a+"\n"+c+"\n"+l.join(";")+"\n"+r;let f=Buffer.from(d);const h=t+"\n"+Client.hexEncode(Client.hash(f,t));const p=Client.hexEncode(Client.signatureMethod(i,h,t));const m=`${t} Credential=${n},SignedHeaders=${l.join(";")},Signature=${p}`;return m}static getEncodePath(e){if(typeof e==="undefined"||e===null){return""}let t=e.split("/");for(let e=0;e<t.length;e++){t[e]=encode(t[e])}return t.join("/")}static getEncodeParam(e){if(typeof e==="undefined"||e===null){return""}return encode(e)}}t["default"]=Client},4828:function(e,t,r){"use strict";var n=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(t.hasOwnProperty(r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();var i=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var u=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function verb(e){return function(t){return step([e,t])}}function step(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(s=o[0]&2?i["return"]:o[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;if(i=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;i=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){r.label=o[1];break}if(o[0]===6&&r.label<s[1]){r.label=s[1];s=o;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(o);break}if(s[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];i=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.isRetryable=t.retryError=t.newUnretryableError=t.getBackoffTime=t.allowRetry=t.sleep=t.cast=t.Model=t.toMap=t.newError=t.doAction=t.Response=t.Request=t.BytesReadable=void 0;var c=o(r(3480));var l=r(8611);var d=r(5692);var f=r(2203);var h=o(r(3312));var p=r(7016);var m=function(e){n(BytesReadable,e);function BytesReadable(t){var r=e.call(this)||this;if(typeof t==="string"){r.value=Buffer.from(t)}else if(Buffer.isBuffer(t)){r.value=t}return r}BytesReadable.prototype._read=function(){this.push(this.value);this.push(null)};return BytesReadable}(f.Readable);t.BytesReadable=m;var y=function(){function Request(){this.headers={};this.query={}}return Request}();t.Request=y;var g=function(){function Response(e){this.statusCode=e.statusCode;this.statusMessage=e.statusMessage;this.headers=this.convertHeaders(e.headers);this.body=e}Response.prototype.convertHeaders=function(e){var t={};var r=Object.keys(e);for(var n=0;n<r.length;n++){var i=r[n];t[i]=e[i]}return t};Response.prototype.readBytes=function(){return a(this,void 0,void 0,(function(){var e;return u(this,(function(t){switch(t.label){case 0:return[4,h.read(this.body,"")];case 1:e=t.sent();return[2,e]}}))}))};return Response}();t.Response=g;function buildURL(e){var t=e.protocol+"://"+e.headers["host"];if(e.port){t+=":"+e.port}t+=""+e.pathname;var r=p.parse(t);if(e.query&&Object.keys(e.query).length>0){if(r.query){t+="&"+c.stringify(e.query)}else{t+="?"+c.stringify(e.query)}}return t}function isModelClass(e){if(!e){return false}return typeof e.types==="function"&&typeof e.names==="function"}function doAction(e,t){if(t===void 0){t=null}return a(this,void 0,void 0,(function(){var r,n,i,s,o;return u(this,(function(a){switch(a.label){case 0:r=buildURL(e);n=(e.method||"GET").toUpperCase();i={method:n,headers:e.headers};if(n!=="GET"&&n!=="HEAD"){i.data=e.body}if(t){if(typeof t.timeout!=="undefined"){i.timeout=Number(t.timeout)}if(typeof t.readTimeout!=="undefined"){i.readTimeout=Number(t.readTimeout)}if(typeof t.connectTimeout!=="undefined"){i.connectTimeout=Number(t.connectTimeout)}if(typeof t.ignoreSSL!=="undefined"){i.rejectUnauthorized=!t.ignoreSSL}if(typeof t.key!=="undefined"){i.key=String(t.key)}if(typeof t.cert!=="undefined"){i.cert=String(t.cert)}if(typeof t.ca!=="undefined"){i.ca=String(t.ca)}s={keepAlive:true};if(typeof t.keepAlive!=="undefined"){s.keepAlive=t.keepAlive;if(e.protocol&&e.protocol.toLowerCase()==="https"){i.agent=new d.Agent(s)}else{i.agent=new l.Agent(s)}}}return[4,h.request(r,i)];case 1:o=a.sent();return[2,new g(o)]}}))}))}t.doAction=doAction;var b=function(e){n(ResponseError,e);function ResponseError(t){var r=e.call(this,t.code+": "+t.message)||this;r.code=t.code;r.data=t.data;r.description=t.description;r.accessDeniedDetail=t.accessDeniedDetail;if(r.data&&r.data.statusCode){r.statusCode=Number(r.data.statusCode)}return r}return ResponseError}(Error);function newError(e){return new b(e)}t.newError=newError;function getValue(e,t){if(typeof e==="string"){return t}if(e.type==="array"){if(!Array.isArray(t)){throw new Error("expect: array, actual: "+typeof t)}return t.map((function(t){return getValue(e.itemType,t)}))}if(typeof e==="function"){if(isModelClass(e)){return new e(t)}return t}return t}function toMap(e){if(e===void 0){e=undefined}if(typeof e==="undefined"||e==null){return null}if(e instanceof w){return e.toMap()}if(typeof e.toMap==="function"){return e.toMap()}if(Array.isArray(e)){return e.map((function(e){return toMap(e)}))}return e}t.toMap=toMap;var w=function(){function Model(e){var t=this;if(e==null){return}var r=this.constructor;var n=r.names();var i=r.types();Object.keys(n).forEach((function(r){var n=e[r];if(n===undefined||n===null){return}var s=i[r];t[r]=getValue(s,n)}))}Model.prototype.toMap=function(){var e=this;var t={};var r=this.constructor;var n=r.names();Object.keys(n).forEach((function(r){var i=n[r];var s=e[r];if(typeof s==="undefined"||s==null){return}t[i]=toMap(s)}));return t};return Model}();t.Model=w;function cast(e,t){if(!e){throw new Error("can not cast to Map")}if(typeof e!=="object"){throw new Error("can not cast to Map")}var r=e;var n=t.constructor;var i=n.names();var s=n.types();Object.keys(i).forEach((function(e){var n=i[e];var o=r[n];var a=s[e];if(typeof o==="undefined"||o==null){return}if(typeof a==="string"){if(a==="Readable"||a==="map"||a==="Buffer"||a==="any"||typeof o===a){t[e]=o;return}if(a==="string"&&(typeof o==="number"||typeof o==="boolean")){t[e]=o.toString();return}if(a==="boolean"){if(o===1||o===0){t[e]=!!o;return}if(o==="true"||o==="false"){t[e]=o==="true";return}}if(a==="number"&&typeof o==="string"){if(o.match(/^\d*$/)){t[e]=parseInt(o);return}if(o.match(/^[\.\d]*$/)){t[e]=parseFloat(o);return}}throw new Error("type of "+e+" is mismatch, expect "+a+", but "+typeof o)}else if(a.type==="map"){if(!(o instanceof Object)){throw new Error("type of "+e+" is mismatch, expect object, but "+typeof o)}t[e]=o}else if(a.type==="array"){if(!Array.isArray(o)){throw new Error("type of "+e+" is mismatch, expect array, but "+typeof o)}if(typeof a.itemType==="function"){t[e]=o.map((function(e){if(isModelClass(a.itemType)){return cast(e,new a.itemType({}))}return e}))}else{t[e]=o}}else if(typeof a==="function"){if(!(o instanceof Object)){throw new Error("type of "+e+" is mismatch, expect object, but "+typeof o)}if(isModelClass(a)){t[e]=cast(o,new a({}));return}t[e]=o}else{}}));return t}t.cast=cast;function sleep(e){return new Promise((function(t){setTimeout(t,e)}))}t.sleep=sleep;function allowRetry(e,t,r){if(t===0){return true}if(e.retryable!==true){return false}if(e.policy==="never"){return false}if(e.policy==="always"){return true}if(e.policy==="simple"){return t<e["maxAttempts"]}if(e.policy==="timeout"){return Date.now()-r<e.timeout}if(e.maxAttempts&&typeof e.maxAttempts==="number"){return e.maxAttempts>=t}return false}t.allowRetry=allowRetry;function getBackoffTime(e,t){if(t===0){return 0}if(e.policy==="no"){return 0}if(e.policy==="fixed"){return e.period}if(e.policy==="random"){var r=e["minPeriod"];var n=e["maxPeriod"];return r+(n-r)*Math.random()}if(e.policy==="exponential"){var i=e.initial;var s=e.multiplier;var o=i*Math.pow(1+s,t-1);var n=e.max;return Math.min(o,n)}if(e.policy==="exponential_random"){var i=e.initial;var s=e.multiplier;var o=i*Math.pow(1+s,t-1);var n=e.max;return Math.min(o*(.5+Math.random()),n)}return 0}t.getBackoffTime=getBackoffTime;var v=function(e){n(UnretryableError,e);function UnretryableError(t){var r=e.call(this,t)||this;r.name="UnretryableError";return r}return UnretryableError}(Error);function newUnretryableError(e){var t=new v("");t.data={lastRequest:e};return t}t.newUnretryableError=newUnretryableError;var _=function(e){n(RetryError,e);function RetryError(t){var r=e.call(this,t)||this;r.name="RetryError";return r}return RetryError}(Error);function retryError(e,t){var r=new _("");r.data={request:e,response:t};return r}t.retryError=retryError;function isRetryable(e){if(typeof e==="undefined"||e===null){return false}return e.name==="RetryError"}t.isRetryable=isRetryable},5606:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=r(2203);const u=s(r(4605));const c=s(r(1406));const l=o(r(3480));const d=r(857);const f=`AlibabaCloud (${d.platform()}; ${d.arch()}) Node.js/${process.version} Core/1.0.1 TeaDSL/2`;var h=r(4605);Object.defineProperty(t,"ExtendsParameters",{enumerable:true,get:function(){return h.ExtendsParameters}});Object.defineProperty(t,"RuntimeOptions",{enumerable:true,get:function(){return h.RuntimeOptions}});function read(e){return new Promise(((t,r)=>{let n,i,s;var cleanup=function(){e.removeListener("error",i);e.removeListener("data",n);e.removeListener("end",s)};var o=[];var a=0;n=function(e){o.push(e);a+=e.length};i=function(e){cleanup();r(e)};s=function(){cleanup();t(Buffer.concat(o,a))};e.on("error",i);e.on("data",n);e.on("end",s)}))}class Client{static toString(e){return e.toString()}static parseJSON(e){return JSON.parse(e)}static async readAsBytes(e){return await read(e)}static async readAsString(e){let t=await Client.readAsBytes(e);return Client.toString(t)}static async readAsJSON(e){return Client.parseJSON(await Client.readAsString(e))}static getNonce(){return c.makeNonce()}static getDateUTCString(){const e=new Date;return e.toUTCString()}static defaultString(e,t){return e||t}static defaultNumber(e,t){return e||t}static toFormString(e){return l.default.stringify(e)}static toJSONString(e){if(typeof e==="string"){return e}return JSON.stringify(e)}static toBytes(e){return Buffer.from(e)}static empty(e){return!e}static equalString(e,t){return e===t}static equalNumber(e,t){return e===t}static isUnset(e){if(typeof e==="undefined"){return true}if(e===null){return true}return false}static stringifyMapValue(e){if(!e){return e}const t={};for(const[r,n]of Object.entries(e)){if(typeof n==="undefined"||n===null){continue}t[r]=String(n)}return t}static anyifyMapValue(e){return e}static assertAsBoolean(e){if(typeof e==="boolean"){return e}throw new Error(`The value is not a boolean`)}static assertAsString(e){if(typeof e==="string"){return e}throw new Error(`The value is not a string`)}static assertAsNumber(e){if(typeof e==="number"){return e}throw new Error(`The value is not a number`)}static assertAsInteger(e){if(Number.isInteger(e)){return e}throw new Error(`The value is not a int number`)}static assertAsMap(e){if(e&&typeof e==="object"&&!Array.isArray(e)){return e}throw new Error(`The value is not a object`)}static assertAsArray(e){if(Array.isArray(e)){return e}throw new Error(`The value is not array`)}static assertAsBytes(e){if(Buffer.isBuffer(e)){return e}throw new Error(`The value is not bytes`)}static getUserAgent(e){if(!e||!e.length){return f}return f+" "+e}static is2xx(e){return e>=200&&e<300}static is3xx(e){return e>=300&&e<400}static is4xx(e){return e>=400&&e<500}static is5xx(e){return e>=500&&e<600}static validateModel(e){}static toMap(e){return u.toMap(e)}static async sleep(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}static toArray(e){if(!(e instanceof Array)){return null}let t=[];e.forEach((e=>{if(!e){return}t.push(u.toMap(e))}));return t}static assertAsReadable(e){if(e instanceof a.Readable){return e}throw new Error(`The value is not a readable`)}}t["default"]=Client},9252:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.RuntimeOptions=t.ExtendsParameters=void 0;const a=r(2203);const u=s(r(4828));const c=s(r(1406));const l=o(r(3480));const d=r(857);const f=`AlibabaCloud (${d.platform()}; ${d.arch()}) Node.js/${process.version} Core/1.0.1 TeaDSL/1`;class ExtendsParameters extends u.Model{constructor(e){super(e)}static names(){return{headers:"headers",queries:"queries"}}static types(){return{headers:{type:"map",keyType:"string",valueType:"string"},queries:{type:"map",keyType:"string",valueType:"string"}}}}t.ExtendsParameters=ExtendsParameters;class RuntimeOptions extends u.Model{constructor(e){super(e)}static names(){return{autoretry:"autoretry",ignoreSSL:"ignoreSSL",key:"key",cert:"cert",ca:"ca",maxAttempts:"max_attempts",backoffPolicy:"backoff_policy",backoffPeriod:"backoff_period",readTimeout:"readTimeout",connectTimeout:"connectTimeout",httpProxy:"httpProxy",httpsProxy:"httpsProxy",noProxy:"noProxy",maxIdleConns:"maxIdleConns",keepAlive:"keepAlive",extendsParameters:"extendsParameters"}}static types(){return{autoretry:"boolean",ignoreSSL:"boolean",key:"string",cert:"string",ca:"string",maxAttempts:"number",backoffPolicy:"string",backoffPeriod:"number",readTimeout:"number",connectTimeout:"number",httpProxy:"string",httpsProxy:"string",noProxy:"string",maxIdleConns:"number",keepAlive:"boolean",extendsParameters:ExtendsParameters}}}t.RuntimeOptions=RuntimeOptions;function read(e){return new Promise(((t,r)=>{let n,i,s;var cleanup=function(){e.removeListener("error",i);e.removeListener("data",n);e.removeListener("end",s)};var o=[];var a=0;n=function(e){o.push(e);a+=e.length};i=function(e){cleanup();r(e)};s=function(){cleanup();t(Buffer.concat(o,a))};e.on("error",i);e.on("data",n);e.on("end",s)}))}class Client{static toString(e){return e.toString()}static parseJSON(e){return JSON.parse(e)}static async readAsBytes(e){return await read(e)}static async readAsString(e){let t=await Client.readAsBytes(e);return Client.toString(t)}static async readAsJSON(e){return Client.parseJSON(await Client.readAsString(e))}static getNonce(){return c.makeNonce()}static getDateUTCString(){const e=new Date;return e.toUTCString()}static defaultString(e,t){return e||t}static defaultNumber(e,t){return e||t}static toFormString(e){return l.default.stringify(e)}static toJSONString(e){if(typeof e==="string"){return e}return JSON.stringify(e)}static toBytes(e){return Buffer.from(e)}static empty(e){return!e}static equalString(e,t){return e===t}static equalNumber(e,t){return e===t}static isUnset(e){if(typeof e==="undefined"){return true}if(e===null){return true}return false}static stringifyMapValue(e){if(!e){return e}const t={};for(const[r,n]of Object.entries(e)){if(typeof n==="undefined"||n===null){continue}t[r]=String(n)}return t}static anyifyMapValue(e){return e}static assertAsBoolean(e){if(typeof e==="boolean"){return e}throw new Error(`The value is not a boolean`)}static assertAsString(e){if(typeof e==="string"){return e}throw new Error(`The value is not a string`)}static assertAsNumber(e){if(typeof e==="number"){return e}throw new Error(`The value is not a number`)}static assertAsInteger(e){if(Number.isInteger(e)){return e}throw new Error(`The value is not a int number`)}static assertAsMap(e){if(e&&typeof e==="object"&&!Array.isArray(e)){return e}throw new Error(`The value is not a object`)}static assertAsArray(e){if(Array.isArray(e)){return e}throw new Error(`The value is not array`)}static assertAsBytes(e){if(Buffer.isBuffer(e)){return e}throw new Error(`The value is not bytes`)}static getUserAgent(e){if(!e||!e.length){return f}return f+" "+e}static is2xx(e){return e>=200&&e<300}static is3xx(e){return e>=300&&e<400}static is4xx(e){return e>=400&&e<500}static is5xx(e){return e>=500&&e<600}static validateModel(e){}static toMap(e){return u.toMap(e)}static async sleep(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}static toArray(e){if(!(e instanceof Array)){return null}let t=[];e.forEach((e=>{if(!e){return}t.push(u.toMap(e))}));return t}static assertAsReadable(e){if(e instanceof a.Readable){return e}throw new Error(`The value is not a readable`)}}t["default"]=Client},1927:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(3362);class Client{static parseXml(e,t){let r=this._parseXML(e);if(t!==null&&typeof t!=="undefined"){r=this._xmlCast(r,t)}return r}static toXML(e){const t=new n.Builder;return t.buildObject(e)}static _parseXML(e){let t=new n.Parser({explicitArray:false});let r={};t.parseString(e,(function(e,t){r.err=e;r.output=t}));if(r.err){throw r.err}return r.output}static _xmlCast(e,t){e=e||{};let r={};let n=t;let i=n.names();let s=n.types();Object.keys(i).forEach((t=>{let n=i[t];let o=e[n];let a=s[t];switch(a){case"boolean":if(!o){r[n]=false;return}r[n]=o==="false"?false:true;return;case"number":if(o!=0&&!o){r[n]=NaN;return}r[n]=+o;return;case"string":if(!o){r[n]="";return}r[n]=o.toString();return;default:if(a.type==="array"){if(!o){r[n]=[];return}if(!Array.isArray(o)){o=[o]}if(typeof a.itemType==="function"){r[n]=o.map((e=>this._xmlCast(e,a.itemType)))}else{r[n]=o}}else if(typeof a==="function"){if(!o){o={}}r[n]=this._xmlCast(o,a)}else{r[n]=o}}}));return r}}t["default"]=Client},2594:function(e,t,r){"use strict";var n=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();var i=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var u=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function verb(e){return function(t){return step([e,t])}}function step(a){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(r=0)),r)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1];s=a;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(a);break}if(s[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.isRetryable=t.getBackoffTime=t.allowRetry=t.cast=t.RuntimeOptions=t.ExtendsParameters=t.FileField=t.Model=t.toMap=t.doAction=t.Response=t.Request=t.BytesReadable=void 0;var c=o(r(3480));var l=r(8611);var d=r(5692);var f=r(2203);var h=o(r(3312));var p=r(7016);var m=r(299);var y=r(8727);var g=o(r(4828));var b=function(e){n(BytesReadable,e);function BytesReadable(t){var r=e.call(this)||this;if(typeof t==="string"){r.value=Buffer.from(t)}else if(Buffer.isBuffer(t)){r.value=t}return r}BytesReadable.prototype._read=function(){this.push(this.value);this.push(null)};return BytesReadable}(f.Readable);t.BytesReadable=b;var w=function(){function Request(){this.headers={};this.query={}}return Request}();t.Request=w;var v=function(){function Response(e){this.statusCode=e.statusCode;this.statusMessage=e.statusMessage;this.headers=this.convertHeaders(e.headers);this.body=e}Response.prototype.convertHeaders=function(e){var t={};var r=Object.keys(e);for(var n=0;n<r.length;n++){var i=r[n];t[i]=e[i]}return t};Response.prototype.readBytes=function(){return a(this,void 0,void 0,(function(){var e;return u(this,(function(t){switch(t.label){case 0:return[4,h.read(this.body,"")];case 1:e=t.sent();return[2,e]}}))}))};return Response}();t.Response=v;function buildURL(e){var t="".concat(e.protocol,"://").concat(e.headers["host"]);if(e.port){t+=":".concat(e.port)}t+="".concat(e.pathname);var r=(0,p.parse)(t);if(e.query&&Object.keys(e.query).length>0){if(r.query){t+="&".concat(c.stringify(e.query))}else{t+="?".concat(c.stringify(e.query))}}return t}function isModelClass(e){if(!e){return false}return typeof e.types==="function"&&typeof e.names==="function"}function doAction(e,t){if(t===void 0){t=null}return a(this,void 0,void 0,(function(){var r,n,i,s,o;return u(this,(function(a){switch(a.label){case 0:r=buildURL(e);n=(e.method||"GET").toUpperCase();i={method:n,headers:e.headers};if(n!=="GET"&&n!=="HEAD"){i.data=e.body}if(t){if(typeof t.timeout!=="undefined"){i.timeout=Number(t.timeout)}if(typeof t.readTimeout!=="undefined"){i.readTimeout=Number(t.readTimeout)}if(typeof t.connectTimeout!=="undefined"){i.connectTimeout=Number(t.connectTimeout)}if(typeof t.ignoreSSL!=="undefined"){i.rejectUnauthorized=!t.ignoreSSL}if(typeof t.key!=="undefined"){i.key=String(t.key)}if(typeof t.cert!=="undefined"){i.cert=String(t.cert)}if(typeof t.ca!=="undefined"){i.ca=String(t.ca)}s={keepAlive:true};if(typeof t.keepAlive!=="undefined"){s.keepAlive=t.keepAlive;if(e.protocol&&e.protocol.toLowerCase()==="https"){i.agent=new d.Agent(s)}else{i.agent=new l.Agent(s)}}}return[4,h.request(r,i)];case 1:o=a.sent();return[2,new v(o)]}}))}))}t.doAction=doAction;function getValue(e,t){if(typeof e==="string"){return t}if(e.type==="array"){if(!Array.isArray(t)){throw new Error("expect: array, actual: ".concat(typeof t))}return t.map((function(t){return getValue(e.itemType,t)}))}if(typeof e==="function"){if(isModelClass(e)){return new e(t)}return t}return t}function toMap(e,t){if(e===void 0){e=undefined}if(t===void 0){t=false}if(typeof e==="undefined"||e==null){return null}if(e instanceof _){return e.toMap(t)}if(typeof e.toMap==="function"){return e.toMap(t)}if(Array.isArray(e)){return e.map((function(e){return toMap(e,t)}))}if(t&&(e instanceof f.Readable||e instanceof f.Writable)){return null}return e}t.toMap=toMap;var _=function(e){n(Model,e);function Model(t){var r=e.call(this)||this;if(t==null){return r}var n=r.constructor;var i=n.names();var s=n.types();Object.keys(i).forEach((function(e){var n=t[e];if(n===undefined||n===null){return}var i=s[e];r[e]=getValue(i,n)}));return r}Model.prototype.validate=function(){};Model.prototype.copyWithoutStream=function(){var e=this.toMap(true);var t=this.constructor;return new t(e)};Model.prototype.toMap=function(e){var t=this;if(e===void 0){e=false}var r={};var n=this.constructor;var i=n.names();Object.keys(i).forEach((function(n){var s=i[n];var o=t[n];if(typeof o==="undefined"||o==null){return}r[s]=toMap(o,e)}));return r};Model.validateRequired=function(e,t){if(t===null||typeof t==="undefined"){throw new y.BaseError({code:"SDK.ValidateError",message:"".concat(e," is required.")})}};Model.validateMaxLength=function(e,t,r){if(t===null||typeof t==="undefined"){return}if(t.length>r){throw new y.BaseError({code:"SDK.ValidateError",message:"".concat(e," is exceed max-length: ").concat(r,".")})}};Model.validateMinLength=function(e,t,r){if(t===null||typeof t==="undefined"){return}if(t.length<r){throw new y.BaseError({code:"SDK.ValidateError",message:"".concat(e," is exceed min-length: ").concat(r,".")})}};Model.validateMaximum=function(e,t,r){if(t===null||typeof t==="undefined"){return}if(t>r){throw new y.BaseError({code:"SDK.ValidateError",message:"".concat(e," cannot be greater than ").concat(r,".")})}};Model.validateMinimum=function(e,t,r){if(t===null||typeof t==="undefined"){return}if(t<r){throw new y.BaseError({code:"SDK.ValidateError",message:"".concat(e," cannot be less than ").concat(r,".")})}};Model.validatePattern=function(e,t,r){if(t===null||typeof t==="undefined"){return}var n=new RegExp(r);if(!n.test(t)){throw new y.BaseError({code:"SDK.ValidateError",message:"".concat(e," is not match ").concat(r,".")})}};Model.validateArray=function(e){if(e===null||typeof e==="undefined"){return}e.map((function(e){if(!e){return}if(e instanceof Model||typeof e.validate==="function"){e.validate()}else if(Array.isArray(e)){Model.validateArray(e)}else if(e instanceof Object){Model.validateMap(e)}}))};Model.validateMap=function(e){if(e===null||typeof e==="undefined"){return}Object.keys(e).map((function(t){var r=e[t];if(!r){return}if(r instanceof Model||typeof r.validate==="function"){r.validate()}else if(Array.isArray(r)){Model.validateArray(r)}else if(r instanceof Object){Model.validateMap(r)}}))};return Model}(g.Model);t.Model=_;var T=function(e){n(FileField,e);function FileField(t){return e.call(this,t)||this}FileField.names=function(){return{filename:"filename",contentType:"contentType",content:"content"}};FileField.types=function(){return{filename:"string",contentType:"string",content:"Readable"}};return FileField}(_);t.FileField=T;var S=function(e){n(ExtendsParameters,e);function ExtendsParameters(t){return e.call(this,t)||this}ExtendsParameters.names=function(){return{headers:"headers",queries:"queries"}};ExtendsParameters.types=function(){return{headers:{type:"map",keyType:"string",valueType:"string"},queries:{type:"map",keyType:"string",valueType:"string"}}};return ExtendsParameters}(g.Model);t.ExtendsParameters=S;var M=function(e){n(RuntimeOptions,e);function RuntimeOptions(t){return e.call(this,t)||this}RuntimeOptions.names=function(){return{autoretry:"autoretry",ignoreSSL:"ignoreSSL",key:"key",cert:"cert",ca:"ca",maxAttempts:"max_attempts",backoffPolicy:"backoff_policy",backoffPeriod:"backoff_period",readTimeout:"readTimeout",connectTimeout:"connectTimeout",httpProxy:"httpProxy",httpsProxy:"httpsProxy",noProxy:"noProxy",maxIdleConns:"maxIdleConns",keepAlive:"keepAlive",extendsParameters:"extendsParameters"}};RuntimeOptions.types=function(){return{retryOptions:m.RetryOptions,autoretry:"boolean",ignoreSSL:"boolean",key:"string",cert:"string",ca:"string",maxAttempts:"number",backoffPolicy:"string",backoffPeriod:"number",readTimeout:"number",connectTimeout:"number",httpProxy:"string",httpsProxy:"string",noProxy:"string",maxIdleConns:"number",keepAlive:"boolean",extendsParameters:S}};return RuntimeOptions}(g.Model);t.RuntimeOptions=M;function cast(e,t){if(!e){throw new Error("can not cast to Map")}if(typeof e!=="object"){throw new Error("can not cast to Map")}var r=e;var n=t.constructor;var i=n.names();var s=n.types();Object.keys(i).forEach((function(e){var n=i[e];var o=r[n];var a=s[e];if(typeof o==="undefined"||o==null){return}if(typeof a==="string"){if(a==="Readable"||a==="Writable"||a==="map"||a==="Buffer"||a==="any"||typeof o===a){t[e]=o;return}if(a==="string"&&(typeof o==="number"||typeof o==="boolean")){t[e]=o.toString();return}if(a==="boolean"){if(o===1||o===0){t[e]=!!o;return}if(o==="true"||o==="false"){t[e]=o==="true";return}}if(a==="number"&&typeof o==="string"){if(o.match(/^\d*$/)){t[e]=parseInt(o);return}if(o.match(/^[\.\d]*$/)){t[e]=parseFloat(o);return}}throw new Error("type of ".concat(e," is mismatch, expect ").concat(a,", but ").concat(typeof o))}else if(a.type==="map"){if(!(o instanceof Object)){throw new Error("type of ".concat(e," is mismatch, expect object, but ").concat(typeof o))}t[e]=o}else if(a.type==="array"){if(!Array.isArray(o)){throw new Error("type of ".concat(e," is mismatch, expect array, but ").concat(typeof o))}if(typeof a.itemType==="function"){t[e]=o.map((function(e){if(isModelClass(a.itemType)){return cast(e,new a.itemType({}))}return e}))}else{t[e]=o}}else if(typeof a==="function"){if(!(o instanceof Object)){throw new Error("type of ".concat(e," is mismatch, expect object, but ").concat(typeof o))}if(isModelClass(a)){t[e]=cast(o,new a({}));return}t[e]=o}else{}}));return t}t.cast=cast;function allowRetry(e,t,r){if(t===0){return true}if(e.retryable!==true){return false}if(e.policy==="never"){return false}if(e.policy==="always"){return true}if(e.policy==="simple"){return t<e["maxAttempts"]}if(e.policy==="timeout"){return Date.now()-r<e.timeout}if(e.maxAttempts&&typeof e.maxAttempts==="number"){return e.maxAttempts>=t}return false}t.allowRetry=allowRetry;function getBackoffTime(e,t){if(t===0){return 0}if(e.policy==="no"){return 0}if(e.policy==="fixed"){return e.period}if(e.policy==="random"){var r=e["minPeriod"];var n=e["maxPeriod"];return r+(n-r)*Math.random()}if(e.policy==="exponential"){var i=e.initial;var s=e.multiplier;var o=i*Math.pow(1+s,t-1);var n=e.max;return Math.min(o,n)}if(e.policy==="exponential_random"){var i=e.initial;var s=e.multiplier;var o=i*Math.pow(1+s,t-1);var n=e.max;return Math.min(o*(.5+Math.random()),n)}return 0}t.getBackoffTime=getBackoffTime;function isRetryable(e){if(typeof e==="undefined"||e===null){return false}return e.name==="RetryError"}t.isRetryable=isRetryable},9885:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var i=n(r(8894));var s=function(){function TeaDate(e){this.date=(0,i.default)(e)}TeaDate.prototype.format=function(e){e=e.replace(/y/g,"Y").replace(/d/g,"D").replace(/h/g,"H").replace(/a/g,"A").replace(/E/g,"d");return this.date.format(e)};TeaDate.prototype.unix=function(){return this.date.unix()};TeaDate.prototype.sub=function(e,t){var r=(0,i.default)(this.date).subtract(t,e);return new TeaDate(r)};TeaDate.prototype.add=function(e,t){var r=(0,i.default)(this.date).add(t,e);return new TeaDate(r)};TeaDate.prototype.diff=function(e,t){return this.date.diff(t.date,e)};TeaDate.prototype.hour=function(){return this.date.hour()};TeaDate.prototype.minute=function(){return this.date.minute()};TeaDate.prototype.second=function(){return this.date.second()};TeaDate.prototype.month=function(){return this.date.month()+1};TeaDate.prototype.year=function(){return this.date.year()};TeaDate.prototype.dayOfMonth=function(){return this.date.date()};TeaDate.prototype.dayOfWeek=function(){var e=this.date.weekday();if(e===0){return 7}return e+1};TeaDate.prototype.weekOfMonth=function(){var e=(0,i.default)(this.date).startOf("month").week();var t=this.date.week();if(this.date.weekday()===0){t=t-1}if(t===0&&this.date.date()>1){return this.sub("day",1).weekOfMonth()}var r=t-e;if(r<0){return 1}return r+1};TeaDate.prototype.weekOfYear=function(){var e=this.date.weekday();var t=this.date.week();if(e===0&&t===1&&this.date.date()>1){return this.sub("day",1).weekOfYear()}return this.date.week()};return TeaDate}();t["default"]=s},8727:function(e,t,r){"use strict";var n=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});t.newUnretryableError=t.newError=t.retryError=t.ResponseError=t.BaseError=void 0;var i=r(299);var s=function(e){n(BaseError,e);function BaseError(t){var r=e.call(this,"".concat(t.code,": ").concat(t.message))||this;r.name="BaseError";r.code=t.code;return r}return BaseError}(Error);t.BaseError=s;var o=function(e){n(ResponseError,e);function ResponseError(t){var r=e.call(this,t)||this;r.name="ResponseError";r.data=t.data;r.description=t.description;r.retryAfter=t.retryAfter;r.accessDeniedDetail=t.accessDeniedDetail;if(r.data&&r.data.statusCode){r.statusCode=Number(r.data.statusCode)}return r}return ResponseError}(s);t.ResponseError=o;var a=function(e){n(UnretryableError,e);function UnretryableError(t){var r=e.call(this,t)||this;r.name="UnretryableError";return r}return UnretryableError}(Error);var u=function(e){n(RetryError,e);function RetryError(t){var r=e.call(this,t)||this;r.name="RetryError";return r}return RetryError}(Error);function retryError(e,t){var r=new u("");r.data={request:e,response:t};return r}t.retryError=retryError;function newError(e){return new o(e)}t.newError=newError;function newUnretryableError(e){if(e instanceof i.RetryPolicyContext&&e.exception){return e.exception}else{var t=new a("");t.data={lastRequest:e};return t}}t.newUnretryableError=newUnretryableError},807:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var a=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function verb(e){return function(t){return step([e,t])}}function step(a){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(r=0)),r)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1];s=a;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(a);break}if(s[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var c=s(r(9896));var l=s(r(9023));var d=u(r(9885));var f=l.promisify(c.exists);var h=l.promisify(c.stat);var p=l.promisify(c.read);var m=l.promisify(c.write);var y=l.promisify(c.open);var g=l.promisify(c.close);var b=function(){function TeaFile(e){this._path=e;this._position=0}TeaFile.prototype.path=function(){return this._path};TeaFile.prototype.createTime=function(){return o(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:if(!!this._stat)return[3,2];e=this;return[4,h(this._path)];case 1:e._stat=t.sent();t.label=2;case 2:return[2,new d.default(this._stat.birthtime)]}}))}))};TeaFile.prototype.modifyTime=function(){return o(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:if(!!this._stat)return[3,2];e=this;return[4,h(this._path)];case 1:e._stat=t.sent();t.label=2;case 2:return[2,new d.default(this._stat.mtime)]}}))}))};TeaFile.prototype.length=function(){return o(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:if(!!this._stat)return[3,2];e=this;return[4,h(this._path)];case 1:e._stat=t.sent();t.label=2;case 2:return[2,this._stat.size]}}))}))};TeaFile.prototype.read=function(e){return o(this,void 0,void 0,(function(){var t,r,n,i,s;return a(this,(function(o){switch(o.label){case 0:if(!!this._fd)return[3,2];t=this;return[4,y(this._path,"a+")];case 1:t._fd=o.sent();o.label=2;case 2:r=Buffer.alloc(e);return[4,p(this._fd,r,0,e,this._position)];case 3:n=o.sent(),i=n.bytesRead,s=n.buffer;if(!i){return[2,null]}this._position+=i;return[2,s]}}))}))};TeaFile.prototype.write=function(e){return o(this,void 0,void 0,(function(){var t,r;return a(this,(function(n){switch(n.label){case 0:if(!!this._fd)return[3,2];t=this;return[4,y(this._path,"a+")];case 1:t._fd=n.sent();n.label=2;case 2:return[4,m(this._fd,e)];case 3:n.sent();r=this;return[4,h(this._path)];case 4:r._stat=n.sent();return[2]}}))}))};TeaFile.prototype.close=function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:if(!this._fd){return[2]}return[4,g(this._fd)];case 1:e.sent();return[2]}}))}))};TeaFile.exists=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,f(e)];case 1:return[2,t.sent()]}}))}))};TeaFile.createReadStream=function(e){return c.createReadStream(e)};TeaFile.createWriteStream=function(e){return c.createWriteStream(e)};return TeaFile}();t["default"]=b},5143:function(e,t,r){"use strict";var n=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});t.FileFormStream=void 0;var i=r(2203);var s=r(3480);var o=function(e){n(FileFormStream,e);function FileFormStream(t,r){var n=e.call(this)||this;n.form=t;n.keys=Object.keys(t);n.index=0;n.boundary=r;n.streaming=false;return n}FileFormStream.prototype._read=function(){var e=this;if(this.streaming){return}var t=this.boundary;if(this.index<this.keys.length){var r=this.keys[this.index];var n=this.form[r];if(typeof n.filename==="string"&&typeof n.contentType==="string"&&n.content instanceof i.Readable){var s="--".concat(t,"\r\n")+'Content-Disposition: form-data; name="'.concat(r,'"; filename="').concat(n.filename,'"\r\n')+"Content-Type: ".concat(n.contentType,"\r\n\r\n");this.push(Buffer.from(s));this.streaming=true;n.content.on("data",(function(t){e.push(t)}));n.content.on("end",(function(){e.index++;e.streaming=false;e.push("")}))}else{this.push(Buffer.from("--".concat(t,"\r\n")+'Content-Disposition: form-data; name="'.concat(r,'"\r\n\r\n')+"".concat(n,"\r\n")));this.index++}}else{this.push(Buffer.from("\r\n--".concat(t,"--\r\n")));this.push(null)}};return FileFormStream}(i.Readable);t.FileFormStream=o;var a=function(){function Form(){}Form.getBoundary=function(){return"boundary"+Math.random().toString(16).slice(-12)};Form.toFileForm=function(e,t){return new o(e,t)};Form.toFormString=function(e){return(0,s.stringify)(e)};return Form}();t["default"]=a},3687:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.sleep=t.merge=t.isNull=void 0;var o=s(r(1742));function isNull(e){if(typeof e==="undefined"){return true}if(e===null){return true}return false}t.isNull=isNull;function merge(e,t){if(!e&&!t){return null}return o.merge({},e,t)}t.merge=merge;function sleep(e){return new Promise((function(t){setTimeout(t,e)}))}t.sleep=sleep},4605:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.XML=t.URL=t.SSEEvent=t.Stream=t.FileFormStream=t.Form=t.File=t.Date=void 0;i(r(2594),t);var o=r(9885);Object.defineProperty(t,"Date",{enumerable:true,get:function(){return s(o).default}});i(r(8727),t);var a=r(807);Object.defineProperty(t,"File",{enumerable:true,get:function(){return s(a).default}});var u=r(5143);Object.defineProperty(t,"Form",{enumerable:true,get:function(){return s(u).default}});Object.defineProperty(t,"FileFormStream",{enumerable:true,get:function(){return u.FileFormStream}});i(r(3687),t);i(r(299),t);var c=r(4121);Object.defineProperty(t,"Stream",{enumerable:true,get:function(){return s(c).default}});Object.defineProperty(t,"SSEEvent",{enumerable:true,get:function(){return c.SSEEvent}});var l=r(7564);Object.defineProperty(t,"URL",{enumerable:true,get:function(){return s(l).default}});var d=r(664);Object.defineProperty(t,"XML",{enumerable:true,get:function(){return s(d).default}})},299:function(e,t){"use strict";var r=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});t.getBackoffDelay=t.shouldRetry=t.RetryPolicyContext=t.RetryOptions=t.RetryCondition=t.BackoffPolicy=void 0;var n=120*1e3;var i=100;var s=function(){function BackoffPolicy(e){this.policy=e.policy}BackoffPolicy.prototype.getDelayTime=function(e){throw Error("un-implement")};BackoffPolicy.newBackoffPolicy=function(e){switch(e.policy){case"Fixed":return new o(e);case"Random":return new a(e);case"Exponential":return new u(e);case"EqualJitter":case"ExponentialWithEqualJitter":return new c(e);case"FullJitter":case"ExponentialWithFullJitter":return new l(e)}};return BackoffPolicy}();t.BackoffPolicy=s;var o=function(e){r(FixedBackoffPolicy,e);function FixedBackoffPolicy(t){var r=e.call(this,t)||this;r.period=t.period;return r}FixedBackoffPolicy.prototype.getDelayTime=function(e){return this.period};return FixedBackoffPolicy}(s);var a=function(e){r(RandomBackoffPolicy,e);function RandomBackoffPolicy(t){var r=e.call(this,t)||this;r.period=t.period;r.cap=t.cap||20*1e3;return r}RandomBackoffPolicy.prototype.getDelayTime=function(e){var t=Math.floor(Math.random()*(e.retriesAttempted*this.period));if(t>this.cap){return this.cap}return t};return RandomBackoffPolicy}(s);var u=function(e){r(ExponentialBackoffPolicy,e);function ExponentialBackoffPolicy(t){var r=e.call(this,t)||this;r.period=t.period;r.cap=t.cap||3*24*60*60*1e3;return r}ExponentialBackoffPolicy.prototype.getDelayTime=function(e){var t=Math.pow(2,e.retriesAttempted*this.period);if(t>this.cap){return this.cap}return t};return ExponentialBackoffPolicy}(s);var c=function(e){r(EqualJitterBackoffPolicy,e);function EqualJitterBackoffPolicy(t){var r=e.call(this,t)||this;r.period=t.period;r.cap=t.cap||3*24*60*60*1e3;return r}EqualJitterBackoffPolicy.prototype.getDelayTime=function(e){var t=Math.min(this.cap,Math.pow(2,e.retriesAttempted*this.period));return t/2+Math.floor(Math.random()*(t/2+1))};return EqualJitterBackoffPolicy}(s);var l=function(e){r(FullJitterBackoffPolicy,e);function FullJitterBackoffPolicy(t){var r=e.call(this,t)||this;r.period=t.period;r.cap=t.cap||3*24*60*60*1e3;return r}FullJitterBackoffPolicy.prototype.getDelayTime=function(e){var t=Math.min(this.cap,Math.pow(2,e.retriesAttempted*this.period));return Math.floor(Math.random()*t)};return FullJitterBackoffPolicy}(s);var d=function(){function RetryCondition(e){this.maxAttempts=e.maxAttempts;this.backoff=e.backoff&&s.newBackoffPolicy(e.backoff);this.exception=e.exception;this.errorCode=e.errorCode;this.maxDelay=e.maxDelay}return RetryCondition}();t.RetryCondition=d;var f=function(){function RetryOptions(e){this.retryable=e.retryable;this.retryCondition=(e.retryCondition||[]).map((function(e){return new d(e)}));this.noRetryCondition=(e.noRetryCondition||[]).map((function(e){return new d(e)}))}return RetryOptions}();t.RetryOptions=f;var h=function(){function RetryPolicyContext(e){this.key=e.key;this.retriesAttempted=e.retriesAttempted||0;this.httpRequest=e.httpRequest||null;this.httpResponse=e.httpResponse||null;this.exception=e.exception||null}return RetryPolicyContext}();t.RetryPolicyContext=h;function shouldRetry(e,t){if(t.retriesAttempted===0){return true}if(!e||!e.retryable){return false}var r=t.retriesAttempted;var n=t.exception;var i=e.noRetryCondition;for(var s=0;s<i.length;s++){var o=i[s];if(o.exception.includes(n.name)||o.errorCode.includes(n.code)){return false}}i=e.retryCondition;for(var s=0;s<i.length;s++){var o=i[s];if(!o.exception.includes(n.name)&&!o.errorCode.includes(n.code)){continue}if(r>=o.maxAttempts){return false}return true}return false}t.shouldRetry=shouldRetry;function getBackoffDelay(e,t){var r=t.exception;var s=e.retryCondition;for(var o=0;o<s.length;o++){var a=s[o];if(!a.exception.includes(r.name)&&!a.errorCode.includes(r.code)){continue}var u=a.maxDelay||n;var c=t.exception.retryAfter;if(c!==undefined){return Math.min(c,u)}if(!a.backoff){return i}return Math.min(a.backoff.getDelayTime(t),u)}return i}t.getBackoffDelay=getBackoffDelay},4121:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var n=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function verb(e){return function(t){return step([e,t])}}function step(a){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(r=0)),r)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1];s=a;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(a);break}if(s[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var i=this&&this.__await||function(e){return this instanceof i?(this.v=e,this):new i(e)};var s=this&&this.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),s,o=[];return s={},verb("next"),verb("throw"),verb("return"),s[Symbol.asyncIterator]=function(){return this},s;function verb(e){if(n[e])s[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||resume(e,t)}))}}function resume(e,t){try{step(n[e](t))}catch(e){settle(o[0][3],e)}}function step(e){e.value instanceof i?Promise.resolve(e.value.v).then(fulfill,reject):settle(o[0][2],e)}function fulfill(e){resume("next",e)}function reject(e){resume("throw",e)}function settle(e,t){if(e(t),o.shift(),o.length)resume(o[0][0],o[0][1])}};Object.defineProperty(t,"__esModule",{value:true});t.SSEEvent=void 0;var o="data:";var a="event:";var u="id:";var c="retry:";function isDigitsOnly(e){for(var t=0;t<e.length;t++){var r=e.charAt(t);if(r<"0"||r>"9"){return false}}return e.length>0}var l=function(){function SSEEvent(e){if(e===void 0){e={}}this.data=e.data;this.id=e.id;this.event=e.event;this.retry=e.retry}return SSEEvent}();t.SSEEvent=l;function read(e){return new Promise((function(t,r){var n,i,s;var cleanup=function(){e.removeListener("error",i);e.removeListener("data",n);e.removeListener("end",s)};var o=[];var a=0;n=function(e){o.push(e);a+=e.length};i=function(e){cleanup();r(e)};s=function(){cleanup();t(Buffer.concat(o,a))};e.on("error",i);e.on("data",n);e.on("end",s)}))}function readyToRead(e){return new Promise((function(t,r){var n,i,s;var cleanup=function(){e.removeListener("error",s);e.removeListener("end",i);e.removeListener("readable",n)};n=function(){cleanup();t(false)};i=function(){cleanup();t(true)};s=function(e){cleanup();r(e)};e.once("readable",n);e.once("end",i);e.once("error",s)}))}function tryGetEvents(e,t){var r=e+t;var n=0;var i=[];var _loop_1=function(e){var t=r[e];var s=r[e+1];if(t==="\n"&&s==="\n"){var d=r.substring(n,e);var f=d.split("\n");var h=new l;f.forEach((function(e){if(e.startsWith(o)){h.data=e.substring(o.length).trim()}else if(e.startsWith(a)){h.event=e.substring(a.length).trim()}else if(e.startsWith(u)){h.id=e.substring(u.length).trim()}else if(e.startsWith(c)){var t=e.substring(c.length).trim();if(isDigitsOnly(t)){h.retry=parseInt(t,10)}}else if(e.startsWith(":")){}}));i.push(h);n=e+2}};for(var s=0;s<r.length-1;s++){_loop_1(s)}var d=r.substring(n);return{events:i,remain:d}}var d=function(){function TeaStream(){}TeaStream.readAsBytes=function(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,read(e)];case 1:return[2,t.sent()]}}))}))};TeaStream.readAsString=function(e){return r(this,void 0,void 0,(function(){var t;return n(this,(function(r){switch(r.label){case 0:return[4,TeaStream.readAsBytes(e)];case 1:t=r.sent();return[2,t.toString()]}}))}))};TeaStream.readAsJSON=function(e){return r(this,void 0,void 0,(function(){var t;return n(this,(function(r){switch(r.label){case 0:return[4,TeaStream.readAsString(e)];case 1:t=r.sent();return[2,JSON.parse(t)]}}))}))};TeaStream.readAsSSE=function(e){return s(this,arguments,(function readAsSSE_1(){var t,r,s,o,a,u,c,l,d;return n(this,(function(n){switch(n.label){case 0:t="";n.label=1;case 1:if(false){}return[4,i(readyToRead(e))];case 2:r=n.sent();if(!r)return[3,4];return[4,i(void 0)];case 3:return[2,n.sent()];case 4:s=void 0;n.label=5;case 5:if(!(null!==(s=e.read())))return[3,11];o=tryGetEvents(t,s.toString()),a=o.events,u=o.remain;t=u;if(!(a&&a.length>0))return[3,10];c=0,l=a;n.label=6;case 6:if(!(c<l.length))return[3,10];d=l[c];return[4,i(d)];case 7:return[4,n.sent()];case 8:n.sent();n.label=9;case 9:c++;return[3,6];case 10:return[3,5];case 11:return[3,1];case 12:return[2]}}))}))};return TeaStream}();t["default"]=d},7564:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});var o=s(r(7016));var a={ftp:"21",gopher:"70",http:"80",https:"443",ws:"80",wss:"443"};var u=function(){function TeaURL(e){this._url=new o.URL(e)}TeaURL.prototype.path=function(){return this._url.pathname+this._url.search};TeaURL.prototype.pathname=function(){return this._url.pathname};TeaURL.prototype.protocol=function(){return this._url.protocol?this._url.protocol.replace(":",""):""};TeaURL.prototype.hostname=function(){return this._url.hostname};TeaURL.prototype.host=function(){return this._url.host};TeaURL.prototype.port=function(){return this._url.port||a[this.protocol()]};TeaURL.prototype.hash=function(){return this._url.hash?this._url.hash.replace("#",""):""};TeaURL.prototype.search=function(){return this._url.search?this._url.search.replace("?",""):""};TeaURL.prototype.href=function(){return this._url.href};TeaURL.prototype.auth=function(){return"".concat(this._url.username,":").concat(this._url.password)};TeaURL.parse=function(e){return new TeaURL(e)};TeaURL.urlEncode=function(e){return e!=null?encodeURIComponent(e):""};TeaURL.percentEncode=function(e){return e!=null?encodeURIComponent(e).replace("+","%20").replace("*","%2A").replace("%7E","~"):null};TeaURL.pathEncode=function(e){if(!e||e==="/"){return e}var t=e.split("/");var r=[];for(var n=0,i=t;n<i.length;n++){var s=i[n];r.push(TeaURL.percentEncode(s))}return r.join("/")};return TeaURL}();t["default"]=u},664:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var n=r(3362);var i=function(){function TeaXML(){}TeaXML.parseXml=function(e,t){var r=this._parseXML(e);if(t!==null&&typeof t!=="undefined"){r=this._xmlCast(r,t)}return r};TeaXML.toXML=function(e){var t=new n.Builder;return t.buildObject(e)};TeaXML._parseXML=function(e){var t=new n.Parser({explicitArray:false});var r={};t.parseString(e,(function(e,t){r.err=e;r.output=t}));if(r.err){throw r.err}return r.output};TeaXML._xmlCast=function(e,t){var r=this;e=e||{};var n={};var i=t;var s=i.names();var o=i.types();Object.keys(s).forEach((function(t){var i=s[t];var a=e[i];var u=o[t];switch(u){case"boolean":if(!a){n[i]=false;return}n[i]=a==="false"?false:true;return;case"number":if(a!=0&&!a){n[i]=NaN;return}n[i]=+a;return;case"string":if(!a){n[i]="";return}n[i]=a.toString();return;default:if(u.type==="array"){if(!a){n[i]=[];return}if(!Array.isArray(a)){a=[a]}if(typeof u.itemType==="function"){n[i]=a.map((function(e){return r._xmlCast(e,u.itemType)}))}else{n[i]=a}}else if(typeof u==="function"){if(!a){a={}}n[i]=r._xmlCast(a,u)}else{n[i]=a}}}));return n};return TeaXML}();t["default"]=i},5313:function(e,t,r){t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.storage=localstorage();t.destroy=(()=>{let e=false;return()=>{if(!e){e=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}let e;return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0;let i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{if(e==="%%"){return}n++;if(e==="%c"){i=n}}));t.splice(i,0,r)}t.log=console.debug||console.log||(()=>{});function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=r(5384)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},5384:function(e,t,r){function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=r(2134);createDebug.destroy=destroy;Object.keys(e).forEach((t=>{createDebug[t]=e[t]}));createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let t=0;for(let r=0;r<e.length;r++){t=(t<<5)-t+e.charCodeAt(r);t|=0}return createDebug.colors[Math.abs(t)%createDebug.colors.length]}createDebug.selectColor=selectColor;function createDebug(e){let t;let r=null;let n;let i;function debug(...e){if(!debug.enabled){return}const r=debug;const n=Number(new Date);const i=n-(t||n);r.diff=i;r.prev=t;r.curr=n;t=n;e[0]=createDebug.coerce(e[0]);if(typeof e[0]!=="string"){e.unshift("%O")}let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,n)=>{if(t==="%%"){return"%"}s++;const i=createDebug.formatters[n];if(typeof i==="function"){const n=e[s];t=i.call(r,n);e.splice(s,1);s--}return t}));createDebug.formatArgs.call(r,e);const o=r.log||createDebug.log;o.apply(r,e)}debug.namespace=e;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(e);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(r!==null){return r}if(n!==createDebug.namespaces){n=createDebug.namespaces;i=createDebug.enabled(e)}return i},set:e=>{r=e}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(e,t){const r=createDebug(this.namespace+(typeof t==="undefined"?":":t)+e);r.log=this.log;return r}function enable(e){createDebug.save(e);createDebug.namespaces=e;createDebug.names=[];createDebug.skips=[];const t=(typeof e==="string"?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of t){if(e[0]==="-"){createDebug.skips.push(e.slice(1))}else{createDebug.names.push(e)}}}function matchesTemplate(e,t){let r=0;let n=0;let i=-1;let s=0;while(r<e.length){if(n<t.length&&(t[n]===e[r]||t[n]==="*")){if(t[n]==="*"){i=n;s=r;n++}else{r++;n++}}else if(i!==-1){n=i+1;s++;r=s}else{return false}}while(n<t.length&&t[n]==="*"){n++}return n===t.length}function disable(){const e=[...createDebug.names,...createDebug.skips.map((e=>"-"+e))].join(",");createDebug.enable("");return e}function enabled(e){for(const t of createDebug.skips){if(matchesTemplate(e,t)){return false}}for(const t of createDebug.names){if(matchesTemplate(e,t)){return true}}return false}function coerce(e){if(e instanceof Error){return e.stack||e.message}return e}function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}createDebug.enable(createDebug.load());return createDebug}e.exports=setup},6449:function(e,t,r){if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=r(5313)}else{e.exports=r(249)}},249:function(e,t,r){const n=r(2018);const i=r(9023);t.init=init;t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");t.colors=[6,2,3,4,5,1];try{const e=r(5414);if(e&&(e.stderr||e).level>=2){t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];if(/^(yes|on|true|enabled)$/i.test(n)){n=true}else if(/^(no|off|false|disabled)$/i.test(n)){n=false}else if(n==="null"){n=null}else{n=Number(n)}e[r]=n;return e}),{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)}function formatArgs(t){const{namespace:r,useColors:n}=this;if(n){const n=this.color;const i="[3"+(n<8?n:"8;5;"+n);const s=` ${i};1m${r} [0m`;t[0]=s+t[0].split("\n").join("\n"+s);t.push(i+"m+"+e.exports.humanize(this.diff)+"[0m")}else{t[0]=getDate()+r+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(i.formatWithOptions(t.inspectOpts,...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n<r.length;n++){e.inspectOpts[r[n]]=t.inspectOpts[r[n]]}}e.exports=r(5384)(t);const{formatters:s}=e.exports;s.o=function(e){this.inspectOpts.colors=this.useColors;return i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")};s.O=function(e){this.inspectOpts.colors=this.useColors;return i.inspect(e,this.inspectOpts)}},2871:function(e){"use strict";e.exports=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":e.length===1?"-":"--";const n=t.indexOf(r+e);const i=t.indexOf("--");return n!==-1&&(i===-1?true:n<i)}},3312:function(e,t,r){"use strict";const n=r(3106);const i=r(8611);const s=r(5692);const o=r(7016).parse;const a=r(7016).format;const u=r(6449)("httpx:body");const c=r(6449)("httpx:header");const l=new i.Agent({keepAlive:true});const d=new s.Agent({keepAlive:true});const f=3e3;const h=Symbol("TIMER::READ_TIMER");const p=Symbol("TIMER::READ_TIME_OUT");const m=Symbol("TIMER::READ_TIMER_START_AT");function decompress(e){switch(e.headers["content-encoding"]){case"gzip":return e.pipe(n.createGunzip());case"deflate":return e.pipe(n.createInflate());default:return e}}var append=function(e,t,r){e.name=t+e.name;e.message=`${r}. ${e.message}`;return e};const isNumber=function(e){return e!==null&&!isNaN(e)};t.request=function(e,t){t||(t={});const r=typeof e==="string"?o(e):e;let n,y;if(isNumber(t.readTimeout)||isNumber(t.connectTimeout)){n=isNumber(t.readTimeout)?Number(t.readTimeout):f;y=isNumber(t.connectTimeout)?Number(t.connectTimeout):f}else if(isNumber(t.timeout)){n=y=Number(t.timeout)}else{n=y=f}const g=r.protocol==="https:";const b=(t.method||"GET").toUpperCase();const w=g?d:l;const v=t.agent||w;var _={host:r.hostname||"localhost",path:r.path||"/",method:b,port:r.port||(r.protocol==="https:"?443:80),agent:v,headers:t.headers||{},key:t.key||"",cert:t.cert||"",ca:t.ca||"",timeout:y};if(g&&typeof t.rejectUnauthorized!=="undefined"){_.rejectUnauthorized=t.rejectUnauthorized}if(t.compression){_.headers["accept-encoding"]="gzip,deflate"}const T=g?s:i;if(typeof t.beforeRequest==="function"){_=t.beforeRequest(_)}return new Promise(((i,s)=>{const o=T.request(_);const l=t.data;var fulfilled=e=>{if(c.enabled){const t=e.req._header;t.split("\r\n").forEach((e=>{c("> %s",e)}));c("< HTTP/%s %s %s",e.httpVersion,e.statusCode,e.statusMessage);Object.keys(e.headers).forEach((t=>{c("< %s: %s",t,e.headers[t])}))}i(e)};var rejected=e=>{e.message+=`${b} ${a(r)} failed.`;if(o.socket&&o.socket[h]){clearTimeout(o.socket[h])}s(e)};var abort=e=>{o.abort();rejected(e)};const startResponseTimer=function(e){const t=setTimeout((()=>{if(e[h]){clearTimeout(e[h]);e[h]=null}var t=new Error;var r=`ReadTimeout(${n})`;abort(append(t,"RequestTimeout",r))}),n);e[p]=n;e[h]=t;e[m]=Date.now();t.unref()};if(!l||"string"===typeof l||l instanceof Buffer){if(u.enabled){if(!l){u("<no request body>")}else if("string"===typeof l){u(l)}else{u(`Buffer <ignored>, Buffer length: ${l.length}`)}}o.end(l)}else if("function"===typeof l.pipe){l.pipe(o);if(u.enabled){u("<request body is a stream>")}l.once("error",(e=>{abort(append(e,"HttpX","Stream occor error"))}))}o.on("timeout",(()=>{var t=new Error;t.name="RequestTimeoutError";t.message=`ConnectTimeout: Connect ${e} failed.`;o.destroy();s(t)}));o.on("response",fulfilled);o.on("error",rejected);o.once("socket",(function(e){if(e.readyState==="opening"){e.once("connect",(function(){startResponseTimer(e)}))}else{startResponseTimer(e)}}))}))};t.read=function(e,t){const r=decompress(e);return new Promise(((n,i)=>{const s=e.socket||e.client;const makeReadTimeoutError=()=>{const t=e.req;var r=new Error;r.name="RequestTimeoutError";r.message=`ReadTimeout: ${s[p]}. ${t.method} ${t.path} failed.`;return r};let o;const a=s[h];if(!a){i(makeReadTimeoutError());return}const c=s[p]-(Date.now()-s[m]);clearTimeout(a);if(c<=0){i(makeReadTimeoutError());return}o=setTimeout((function(){i(makeReadTimeoutError())}),c);var l,d,f;var cleanup=function(){r.removeListener("error",l);r.removeListener("data",d);r.removeListener("end",f);if(o){clearTimeout(o)}};const y=[];var g=0;d=function(e){y.push(e);g+=e.length};l=function(e){cleanup();i(e)};f=function(){cleanup();var e=Buffer.concat(y,g);u("");if(t){const r=e.toString(t);u(r);return n(r)}if(u.enabled){u(e.toString())}n(e)};r.on("error",l);r.on("data",d);r.on("end",f)}))};function readyToRead(e){return new Promise(((t,r)=>{var n,i,s;var cleanup=function(){e.removeListener("error",s);e.removeListener("end",i);e.removeListener("readable",n)};n=function(){cleanup();t(false)};i=function(){cleanup();t(true)};s=function(e){cleanup();r(e)};e.once("readable",n);e.once("end",i);e.once("error",s)}))}class Event{constructor(e,t,r,n){this.id=e;this.event=t;this.data=r;this.retry=n}}t.Event=Event;const y="data:";const g="event:";const b="id:";const w="retry:";function isDigitsOnly(e){for(let t=0;t<e.length;t++){const r=e.charAt(t);if(r<"0"||r>"9"){return false}}return e.length>0}function tryGetEvents(e,t){const r=e+t;let n=0;const i=[];for(let e=0;e<r.length-1;e++){const t=r[e];const s=r[e+1];if(t==="\n"&&s==="\n"){const t=r.substring(n,e);const s=t.split("\n");const o=new Event;s.forEach((e=>{if(e.startsWith(y)){o.data=e.substring(y.length).trim()}else if(e.startsWith(g)){o.event=e.substring(g.length).trim()}else if(e.startsWith(b)){o.id=e.substring(b.length).trim()}else if(e.startsWith(w)){const t=e.substring(w.length).trim();if(isDigitsOnly(t)){o.retry=parseInt(t,10)}}else if(e.startsWith(":")){}}));i.push(o);n=e+2}}const s=r.substring(n);return[i,s]}t.readAsSSE=async function*(e){const t=decompress(e);const r=e.socket||e.client;clearTimeout(r[h]);let n="";while(true){const e=await readyToRead(t);if(e){return}let r;while(null!==(r=t.read())){const[e,t]=tryGetEvents(n,r.toString());n=t;if(e&&e.length>0){for(const t of e){yield t}}}}}},6482:function(e,t){t.parse=t.decode=decode;t.stringify=t.encode=encode;t.safe=safe;t.unsafe=unsafe;var r=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(e,t){var n=[];var i="";if(typeof t==="string"){t={section:t,whitespace:false}}else{t=t||{};t.whitespace=t.whitespace===true}var s=t.whitespace?" = ":"=";Object.keys(e).forEach((function(t,o,a){var u=e[t];if(u&&Array.isArray(u)){u.forEach((function(e){i+=safe(t+"[]")+s+safe(e)+"\n"}))}else if(u&&typeof u==="object")n.push(t);else i+=safe(t)+s+safe(u)+r}));if(t.section&&i.length)i="["+safe(t.section)+"]"+r+i;n.forEach((function(n,s,o){var a=dotSplit(n).join("\\.");var u=(t.section?t.section+".":"")+a;var c=encode(e[n],{section:u,whitespace:t.whitespace});if(i.length&&c.length)i+=r;i+=c}));return i}function dotSplit(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function decode(e){var t={};var r=t;var n=null;var i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var s=e.split(/[\r\n]+/g);s.forEach((function(e,s,o){if(!e||e.match(/^\s*[;#]/))return;var a=e.match(i);if(!a)return;if(a[1]!==undefined){n=unsafe(a[1]);if(n==="__proto__"){r={};return}r=t[n]=t[n]||{};return}var u=unsafe(a[2]);if(u==="__proto__")return;var c=a[3]?unsafe(a[4]):true;switch(c){case"true":case"false":case"null":c=JSON.parse(c)}if(u.length>2&&u.slice(-2)==="[]"){u=u.substring(0,u.length-2);if(u==="__proto__")return;if(!r[u])r[u]=[];else if(!Array.isArray(r[u]))r[u]=[r[u]]}if(Array.isArray(r[u]))r[u].push(c);else r[u]=c}));Object.keys(t).filter((function(e,r,n){if(!t[e]||typeof t[e]!=="object"||Array.isArray(t[e]))return false;var i=dotSplit(e);var s=t;var o=i.pop();var a=o.replace(/\\\./g,".");i.forEach((function(e,t,r){if(e==="__proto__")return;if(!s[e]||typeof s[e]!=="object")s[e]={};s=s[e]}));if(s===t&&a===o)return false;s[a]=t[e];return true})).forEach((function(e,r,n){delete t[e]}));return t}function isQuoted(e){return e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'"}function safe(e){return typeof e!=="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&isQuoted(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#")}function unsafe(e,t){e=(e||"").trim();if(isQuoted(e)){if(e.charAt(0)==="'")e=e.substr(1,e.length-2);try{e=JSON.parse(e)}catch(e){}}else{var r=false;var n="";for(var i=0,s=e.length;i<s;i++){var o=e.charAt(i);if(r){if("\\;#".indexOf(o)!==-1)n+=o;else n+="\\"+o;r=false}else if(";#".indexOf(o)!==-1)break;else if(o==="\\")r=true;else n+=o}if(r)n+="\\";return n.trim()}return e}},1406:function(e,t,r){"use strict";const n=r(9896);const i=r(857);const s=r(6982);t.loadJSONSync=function(e){var t=n.readFileSync(e,"utf8");if(t.charCodeAt(0)===65279){t=t.slice(1)}try{return JSON.parse(t)}catch(t){t.message=e+": "+t.message;throw t}};t.encode=function(e,t){if(typeof e!=="string"){e=""+e}return Buffer.from(e,t)};t.makeHasher=function(e){return function(t,r){var n=s.createHash(e);n.update(t);return n.digest(r)}};t.createHash=t.makeHasher;t.md5=t.makeHasher("md5");t.createHmac=function(e){return function(t,r,n){return s.createHmac(e,r).update(t).digest(n)}};t.sha1=t.createHmac("sha1");t.random=function(e,t){return Math.floor(e+Math.random()*(t-e))};t.makeNonce=function(){var e=0;var r;const n=i.hostname();const s=process.pid;return function(){var i=Math.floor(Math.random()*1e12);if(i===r){e++}else{e=0}r=i;var o=`${n}${s}${i}${e}`;return t.md5(o,"hex")}}();t.pad2=function(e){if(e<10){return"0"+e}return""+e};t.pad3=function(e){if(e<10){return"00"+e}else if(e<100){return"0"+e}return""+e};t.getYYYYMMDD=function(e){var r=e.getFullYear();var n=t.pad2(e.getMonth()+1);var i=t.pad2(e.getDate());return""+r+n+i};t.sleep=function(e){return new Promise((t=>{setTimeout(t,e)}))};t.getIPv4=function(){var e=i.networkInterfaces();var t=Object.keys(e);for(var r=0;r<t.length;r++){var n=t[r];var s=e[n];for(var o=0;o<s.length;o++){var a=s[o];if(!a.internal&&a.family==="IPv4"){return a.address}}}return""};t.getMac=function(){var e=i.networkInterfaces();var t=Object.keys(e);for(var r=0;r<t.length;r++){var n=t[r];var s=e[n];for(var o=0;o<s.length;o++){var a=s[o];if(!a.internal&&a.family==="IPv4"){return a.mac}}}return"00:00:00:00:00:00"};t.readAll=function(e){return new Promise(((t,r)=>{var n,i,s;var cleanup=function(t){e.removeListener("error",n);e.removeListener("data",i);e.removeListener("end",s)};var o=[];var a=0;i=function(e){o.push(e);a+=e.length};n=function(e){cleanup();r(e)};s=function(){cleanup();t(Buffer.concat(o,a))};e.on("error",n);e.on("data",i);e.on("end",s)}))};class SimpleCryptoHelper{constructor(e,t,r){this.algorithm=e;this.key=t;this.iv=r}encrypt(e,t,r){const n=s.createCipheriv(this.algorithm,this.key,this.iv);let i=n.update(e,t,r);i+=n.final(r);return i}decrypt(e,t,r){const n=s.createDecipheriv(this.algorithm,this.key,this.iv);let i=n.update(e,t,r);i+=n.final(r);return i}}const o=new SimpleCryptoHelper("aes-192-cbc",Buffer.from("keykeykeykeykeykeykeykey"),Buffer.from("abcdefghijklmnop"));t.encrypt=function(e,t,r){return o.encrypt(e,t,r)};t.decrypt=function(e,t,r){return o.decrypt(e,t,r)}},8894:function(e,t,r){e=r.nmd(e);
|
|
2
|
+
//! moment.js
|
|
3
|
+
//! version : 2.30.1
|
|
4
|
+
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
5
|
+
//! license : MIT
|
|
6
|
+
//! momentjs.com
|
|
7
|
+
(function(t,r){true?e.exports=r():0})(this,(function(){"use strict";var t;function hooks(){return t.apply(null,arguments)}function setHookCallback(e){t=e}function isArray(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function isObject(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function hasOwnProp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function isObjectEmpty(e){if(Object.getOwnPropertyNames){return Object.getOwnPropertyNames(e).length===0}else{var t;for(t in e){if(hasOwnProp(e,t)){return false}}return true}}function isUndefined(e){return e===void 0}function isNumber(e){return typeof e==="number"||Object.prototype.toString.call(e)==="[object Number]"}function isDate(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function map(e,t){var r=[],n,i=e.length;for(n=0;n<i;++n){r.push(t(e[n],n))}return r}function extend(e,t){for(var r in t){if(hasOwnProp(t,r)){e[r]=t[r]}}if(hasOwnProp(t,"toString")){e.toString=t.toString}if(hasOwnProp(t,"valueOf")){e.valueOf=t.valueOf}return e}function createUTC(e,t,r,n){return createLocalOrUTC(e,t,r,n,true).utc()}function defaultParsingFlags(){return{empty:false,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:false,invalidEra:null,invalidMonth:null,invalidFormat:false,userInvalidated:false,iso:false,parsedDateParts:[],era:null,meridiem:null,rfc2822:false,weekdayMismatch:false}}function getParsingFlags(e){if(e._pf==null){e._pf=defaultParsingFlags()}return e._pf}var r;if(Array.prototype.some){r=Array.prototype.some}else{r=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++){if(n in t&&e.call(this,t[n],n,t)){return true}}return false}}function isValid(e){var t=null,n=false,i=e._d&&!isNaN(e._d.getTime());if(i){t=getParsingFlags(e);n=r.call(t.parsedDateParts,(function(e){return e!=null}));i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict){i=i&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===undefined}}if(Object.isFrozen==null||!Object.isFrozen(e)){e._isValid=i}else{return i}return e._isValid}function createInvalid(e){var t=createUTC(NaN);if(e!=null){extend(getParsingFlags(t),e)}else{getParsingFlags(t).userInvalidated=true}return t}var n=hooks.momentProperties=[],i=false;function copyConfig(e,t){var r,i,s,o=n.length;if(!isUndefined(t._isAMomentObject)){e._isAMomentObject=t._isAMomentObject}if(!isUndefined(t._i)){e._i=t._i}if(!isUndefined(t._f)){e._f=t._f}if(!isUndefined(t._l)){e._l=t._l}if(!isUndefined(t._strict)){e._strict=t._strict}if(!isUndefined(t._tzm)){e._tzm=t._tzm}if(!isUndefined(t._isUTC)){e._isUTC=t._isUTC}if(!isUndefined(t._offset)){e._offset=t._offset}if(!isUndefined(t._pf)){e._pf=getParsingFlags(t)}if(!isUndefined(t._locale)){e._locale=t._locale}if(o>0){for(r=0;r<o;r++){i=n[r];s=t[i];if(!isUndefined(s)){e[i]=s}}}return e}function Moment(e){copyConfig(this,e);this._d=new Date(e._d!=null?e._d.getTime():NaN);if(!this.isValid()){this._d=new Date(NaN)}if(i===false){i=true;hooks.updateOffset(this);i=false}}function isMoment(e){return e instanceof Moment||e!=null&&e._isAMomentObject!=null}function warn(e){if(hooks.suppressDeprecationWarnings===false&&typeof console!=="undefined"&&console.warn){console.warn("Deprecation warning: "+e)}}function deprecate(e,t){var r=true;return extend((function(){if(hooks.deprecationHandler!=null){hooks.deprecationHandler(null,e)}if(r){var n=[],i,s,o,a=arguments.length;for(s=0;s<a;s++){i="";if(typeof arguments[s]==="object"){i+="\n["+s+"] ";for(o in arguments[0]){if(hasOwnProp(arguments[0],o)){i+=o+": "+arguments[0][o]+", "}}i=i.slice(0,-2)}else{i=arguments[s]}n.push(i)}warn(e+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack);r=false}return t.apply(this,arguments)}),t)}var s={};function deprecateSimple(e,t){if(hooks.deprecationHandler!=null){hooks.deprecationHandler(e,t)}if(!s[e]){warn(t);s[e]=true}}hooks.suppressDeprecationWarnings=false;hooks.deprecationHandler=null;function isFunction(e){return typeof Function!=="undefined"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function set(e){var t,r;for(r in e){if(hasOwnProp(e,r)){t=e[r];if(isFunction(t)){this[r]=t}else{this["_"+r]=t}}}this._config=e;this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function mergeConfigs(e,t){var r=extend({},e),n;for(n in t){if(hasOwnProp(t,n)){if(isObject(e[n])&&isObject(t[n])){r[n]={};extend(r[n],e[n]);extend(r[n],t[n])}else if(t[n]!=null){r[n]=t[n]}else{delete r[n]}}}for(n in e){if(hasOwnProp(e,n)&&!hasOwnProp(t,n)&&isObject(e[n])){r[n]=extend({},r[n])}}return r}function Locale(e){if(e!=null){this.set(e)}}var o;if(Object.keys){o=Object.keys}else{o=function(e){var t,r=[];for(t in e){if(hasOwnProp(e,t)){r.push(t)}}return r}}var a={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function calendar(e,t,r){var n=this._calendar[e]||this._calendar["sameElse"];return isFunction(n)?n.call(t,r):n}function zeroFill(e,t,r){var n=""+Math.abs(e),i=t-n.length,s=e>=0;return(s?r?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}var u=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,c=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,l={},d={};function addFormatToken(e,t,r,n){var i=n;if(typeof n==="string"){i=function(){return this[n]()}}if(e){d[e]=i}if(t){d[t[0]]=function(){return zeroFill(i.apply(this,arguments),t[1],t[2])}}if(r){d[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)}}}function removeFormattingTokens(e){if(e.match(/\[[\s\S]/)){return e.replace(/^\[|\]$/g,"")}return e.replace(/\\/g,"")}function makeFormatFunction(e){var t=e.match(u),r,n;for(r=0,n=t.length;r<n;r++){if(d[t[r]]){t[r]=d[t[r]]}else{t[r]=removeFormattingTokens(t[r])}}return function(r){var i="",s;for(s=0;s<n;s++){i+=isFunction(t[s])?t[s].call(r,e):t[s]}return i}}function formatMoment(e,t){if(!e.isValid()){return e.localeData().invalidDate()}t=expandFormat(t,e.localeData());l[t]=l[t]||makeFormatFunction(t);return l[t](e)}function expandFormat(e,t){var r=5;function replaceLongDateFormatTokens(e){return t.longDateFormat(e)||e}c.lastIndex=0;while(r>=0&&c.test(e)){e=e.replace(c,replaceLongDateFormatTokens);c.lastIndex=0;r-=1}return e}var f={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function longDateFormat(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];if(t||!r){return t}this._longDateFormat[e]=r.match(u).map((function(e){if(e==="MMMM"||e==="MM"||e==="DD"||e==="dddd"){return e.slice(1)}return e})).join("");return this._longDateFormat[e]}var h="Invalid date";function invalidDate(){return this._invalidDate}var p="%d",m=/\d{1,2}/;function ordinal(e){return this._ordinal.replace("%d",e)}var y={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function relativeTime(e,t,r,n){var i=this._relativeTime[r];return isFunction(i)?i(e,t,r,n):i.replace(/%d/i,e)}function pastFuture(e,t){var r=this._relativeTime[e>0?"future":"past"];return isFunction(r)?r(t):r.replace(/%s/i,t)}var g={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function normalizeUnits(e){return typeof e==="string"?g[e]||g[e.toLowerCase()]:undefined}function normalizeObjectUnits(e){var t={},r,n;for(n in e){if(hasOwnProp(e,n)){r=normalizeUnits(n);if(r){t[r]=e[n]}}}return t}var b={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function getPrioritizedUnits(e){var t=[],r;for(r in e){if(hasOwnProp(e,r)){t.push({unit:r,priority:b[r]})}}t.sort((function(e,t){return e.priority-t.priority}));return t}var w=/\d/,v=/\d\d/,_=/\d{3}/,T=/\d{4}/,S=/[+-]?\d{6}/,M=/\d\d?/,C=/\d\d\d\d?/,D=/\d\d\d\d\d\d?/,O=/\d{1,3}/,k=/\d{1,4}/,A=/[+-]?\d{1,6}/,E=/\d+/,P=/[+-]?\d+/,x=/Z|[+-]\d\d:?\d\d/gi,I=/Z|[+-]\d\d(?::?\d\d)?/gi,L=/[+-]?\d+(\.\d{1,3})?/,N=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,R=/^[1-9]\d?/,j=/^([1-9]\d|\d)/,B;B={};function addRegexToken(e,t,r){B[e]=isFunction(t)?t:function(e,n){return e&&r?r:t}}function getParseRegexForToken(e,t){if(!hasOwnProp(B,e)){return new RegExp(unescapeFormat(e))}return B[e](t._strict,t._locale)}function unescapeFormat(e){return regexEscape(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,r,n,i){return t||r||n||i})))}function regexEscape(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function absFloor(e){if(e<0){return Math.ceil(e)||0}else{return Math.floor(e)}}function toInt(e){var t=+e,r=0;if(t!==0&&isFinite(t)){r=absFloor(t)}return r}var X={};function addParseToken(e,t){var r,n=t,i;if(typeof e==="string"){e=[e]}if(isNumber(t)){n=function(e,r){r[t]=toInt(e)}}i=e.length;for(r=0;r<i;r++){X[e[r]]=n}}function addWeekParseToken(e,t){addParseToken(e,(function(e,r,n,i){n._w=n._w||{};t(e,n._w,n,i)}))}function addTimeToArrayFromToken(e,t,r){if(t!=null&&hasOwnProp(X,e)){X[e](t,r._a,r,e)}}function isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}var U=0,Y=1,q=2,W=3,K=4,V=5,$=6,H=7,G=8;addFormatToken("Y",0,0,(function(){var e=this.year();return e<=9999?zeroFill(e,4):"+"+e}));addFormatToken(0,["YY",2],0,(function(){return this.year()%100}));addFormatToken(0,["YYYY",4],0,"year");addFormatToken(0,["YYYYY",5],0,"year");addFormatToken(0,["YYYYYY",6,true],0,"year");addRegexToken("Y",P);addRegexToken("YY",M,v);addRegexToken("YYYY",k,T);addRegexToken("YYYYY",A,S);addRegexToken("YYYYYY",A,S);addParseToken(["YYYYY","YYYYYY"],U);addParseToken("YYYY",(function(e,t){t[U]=e.length===2?hooks.parseTwoDigitYear(e):toInt(e)}));addParseToken("YY",(function(e,t){t[U]=hooks.parseTwoDigitYear(e)}));addParseToken("Y",(function(e,t){t[U]=parseInt(e,10)}));function daysInYear(e){return isLeapYear(e)?366:365}hooks.parseTwoDigitYear=function(e){return toInt(e)+(toInt(e)>68?1900:2e3)};var z=makeGetSet("FullYear",true);function getIsLeapYear(){return isLeapYear(this.year())}function makeGetSet(e,t){return function(r){if(r!=null){set$1(this,e,r);hooks.updateOffset(this,t);return this}else{return get(this,e)}}}function get(e,t){if(!e.isValid()){return NaN}var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function set$1(e,t,r){var n,i,s,o,a;if(!e.isValid()||isNaN(r)){return}n=e._d;i=e._isUTC;switch(t){case"Milliseconds":return void(i?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(i?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(i?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(i?n.setUTCHours(r):n.setHours(r));case"Date":return void(i?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}s=r;o=e.month();a=e.date();a=a===29&&o===1&&!isLeapYear(s)?28:a;void(i?n.setUTCFullYear(s,o,a):n.setFullYear(s,o,a))}function stringGet(e){e=normalizeUnits(e);if(isFunction(this[e])){return this[e]()}return this}function stringSet(e,t){if(typeof e==="object"){e=normalizeObjectUnits(e);var r=getPrioritizedUnits(e),n,i=r.length;for(n=0;n<i;n++){this[r[n].unit](e[r[n].unit])}}else{e=normalizeUnits(e);if(isFunction(this[e])){return this[e](t)}}return this}function mod(e,t){return(e%t+t)%t}var J;if(Array.prototype.indexOf){J=Array.prototype.indexOf}else{J=function(e){var t;for(t=0;t<this.length;++t){if(this[t]===e){return t}}return-1}}function daysInMonth(e,t){if(isNaN(e)||isNaN(t)){return NaN}var r=mod(t,12);e+=(t-r)/12;return r===1?isLeapYear(e)?29:28:31-r%7%2}addFormatToken("M",["MM",2],"Mo",(function(){return this.month()+1}));addFormatToken("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)}));addFormatToken("MMMM",0,0,(function(e){return this.localeData().months(this,e)}));addRegexToken("M",M,R);addRegexToken("MM",M,v);addRegexToken("MMM",(function(e,t){return t.monthsShortRegex(e)}));addRegexToken("MMMM",(function(e,t){return t.monthsRegex(e)}));addParseToken(["M","MM"],(function(e,t){t[Y]=toInt(e)-1}));addParseToken(["MMM","MMMM"],(function(e,t,r,n){var i=r._locale.monthsParse(e,n,r._strict);if(i!=null){t[Y]=i}else{getParsingFlags(r).invalidMonth=e}}));var Z="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Q="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ee=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,te=N,re=N;function localeMonths(e,t){if(!e){return isArray(this._months)?this._months:this._months["standalone"]}return isArray(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ee).test(t)?"format":"standalone"][e.month()]}function localeMonthsShort(e,t){if(!e){return isArray(this._monthsShort)?this._monthsShort:this._monthsShort["standalone"]}return isArray(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ee.test(t)?"format":"standalone"][e.month()]}function handleStrictParse(e,t,r){var n,i,s,o=e.toLocaleLowerCase();if(!this._monthsParse){this._monthsParse=[];this._longMonthsParse=[];this._shortMonthsParse=[];for(n=0;n<12;++n){s=createUTC([2e3,n]);this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase();this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase()}}if(r){if(t==="MMM"){i=J.call(this._shortMonthsParse,o);return i!==-1?i:null}else{i=J.call(this._longMonthsParse,o);return i!==-1?i:null}}else{if(t==="MMM"){i=J.call(this._shortMonthsParse,o);if(i!==-1){return i}i=J.call(this._longMonthsParse,o);return i!==-1?i:null}else{i=J.call(this._longMonthsParse,o);if(i!==-1){return i}i=J.call(this._shortMonthsParse,o);return i!==-1?i:null}}}function localeMonthsParse(e,t,r){var n,i,s;if(this._monthsParseExact){return handleStrictParse.call(this,e,t,r)}if(!this._monthsParse){this._monthsParse=[];this._longMonthsParse=[];this._shortMonthsParse=[]}for(n=0;n<12;n++){i=createUTC([2e3,n]);if(r&&!this._longMonthsParse[n]){this._longMonthsParse[n]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i");this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")}if(!r&&!this._monthsParse[n]){s="^"+this.months(i,"")+"|^"+this.monthsShort(i,"");this._monthsParse[n]=new RegExp(s.replace(".",""),"i")}if(r&&t==="MMMM"&&this._longMonthsParse[n].test(e)){return n}else if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e)){return n}else if(!r&&this._monthsParse[n].test(e)){return n}}}function setMonth(e,t){if(!e.isValid()){return e}if(typeof t==="string"){if(/^\d+$/.test(t)){t=toInt(t)}else{t=e.localeData().monthsParse(t);if(!isNumber(t)){return e}}}var r=t,n=e.date();n=n<29?n:Math.min(n,daysInMonth(e.year(),r));void(e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n));return e}function getSetMonth(e){if(e!=null){setMonth(this,e);hooks.updateOffset(this,true);return this}else{return get(this,"Month")}}function getDaysInMonth(){return daysInMonth(this.year(),this.month())}function monthsShortRegex(e){if(this._monthsParseExact){if(!hasOwnProp(this,"_monthsRegex")){computeMonthsParse.call(this)}if(e){return this._monthsShortStrictRegex}else{return this._monthsShortRegex}}else{if(!hasOwnProp(this,"_monthsShortRegex")){this._monthsShortRegex=te}return this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex}}function monthsRegex(e){if(this._monthsParseExact){if(!hasOwnProp(this,"_monthsRegex")){computeMonthsParse.call(this)}if(e){return this._monthsStrictRegex}else{return this._monthsRegex}}else{if(!hasOwnProp(this,"_monthsRegex")){this._monthsRegex=re}return this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex}}function computeMonthsParse(){function cmpLenRev(e,t){return t.length-e.length}var e=[],t=[],r=[],n,i,s,o;for(n=0;n<12;n++){i=createUTC([2e3,n]);s=regexEscape(this.monthsShort(i,""));o=regexEscape(this.months(i,""));e.push(s);t.push(o);r.push(o);r.push(s)}e.sort(cmpLenRev);t.sort(cmpLenRev);r.sort(cmpLenRev);this._monthsRegex=new RegExp("^("+r.join("|")+")","i");this._monthsShortRegex=this._monthsRegex;this._monthsStrictRegex=new RegExp("^("+t.join("|")+")","i");this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function createDate(e,t,r,n,i,s,o){var a;if(e<100&&e>=0){a=new Date(e+400,t,r,n,i,s,o);if(isFinite(a.getFullYear())){a.setFullYear(e)}}else{a=new Date(e,t,r,n,i,s,o)}return a}function createUTCDate(e){var t,r;if(e<100&&e>=0){r=Array.prototype.slice.call(arguments);r[0]=e+400;t=new Date(Date.UTC.apply(null,r));if(isFinite(t.getUTCFullYear())){t.setUTCFullYear(e)}}else{t=new Date(Date.UTC.apply(null,arguments))}return t}function firstWeekOffset(e,t,r){var n=7+t-r,i=(7+createUTCDate(e,0,n).getUTCDay()-t)%7;return-i+n-1}function dayOfYearFromWeeks(e,t,r,n,i){var s=(7+r-n)%7,o=firstWeekOffset(e,n,i),a=1+7*(t-1)+s+o,u,c;if(a<=0){u=e-1;c=daysInYear(u)+a}else if(a>daysInYear(e)){u=e+1;c=a-daysInYear(e)}else{u=e;c=a}return{year:u,dayOfYear:c}}function weekOfYear(e,t,r){var n=firstWeekOffset(e.year(),t,r),i=Math.floor((e.dayOfYear()-n-1)/7)+1,s,o;if(i<1){o=e.year()-1;s=i+weeksInYear(o,t,r)}else if(i>weeksInYear(e.year(),t,r)){s=i-weeksInYear(e.year(),t,r);o=e.year()+1}else{o=e.year();s=i}return{week:s,year:o}}function weeksInYear(e,t,r){var n=firstWeekOffset(e,t,r),i=firstWeekOffset(e+1,t,r);return(daysInYear(e)-n+i)/7}addFormatToken("w",["ww",2],"wo","week");addFormatToken("W",["WW",2],"Wo","isoWeek");addRegexToken("w",M,R);addRegexToken("ww",M,v);addRegexToken("W",M,R);addRegexToken("WW",M,v);addWeekParseToken(["w","ww","W","WW"],(function(e,t,r,n){t[n.substr(0,1)]=toInt(e)}));function localeWeek(e){return weekOfYear(e,this._week.dow,this._week.doy).week}var ne={dow:0,doy:6};function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function getSetISOWeek(e){var t=weekOfYear(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}addFormatToken("d",0,"do","day");addFormatToken("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)}));addFormatToken("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)}));addFormatToken("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)}));addFormatToken("e",0,0,"weekday");addFormatToken("E",0,0,"isoWeekday");addRegexToken("d",M);addRegexToken("e",M);addRegexToken("E",M);addRegexToken("dd",(function(e,t){return t.weekdaysMinRegex(e)}));addRegexToken("ddd",(function(e,t){return t.weekdaysShortRegex(e)}));addRegexToken("dddd",(function(e,t){return t.weekdaysRegex(e)}));addWeekParseToken(["dd","ddd","dddd"],(function(e,t,r,n){var i=r._locale.weekdaysParse(e,n,r._strict);if(i!=null){t.d=i}else{getParsingFlags(r).invalidWeekday=e}}));addWeekParseToken(["d","e","E"],(function(e,t,r,n){t[n]=toInt(e)}));function parseWeekday(e,t){if(typeof e!=="string"){return e}if(!isNaN(e)){return parseInt(e,10)}e=t.weekdaysParse(e);if(typeof e==="number"){return e}return null}function parseIsoWeekday(e,t){if(typeof e==="string"){return t.weekdaysParse(e)%7||7}return isNaN(e)?null:e}function shiftWeekdays(e,t){return e.slice(t,7).concat(e.slice(0,t))}var ie="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),se="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),oe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ae=N,ue=N,ce=N;function localeWeekdays(e,t){var r=isArray(this._weekdays)?this._weekdays:this._weekdays[e&&e!==true&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===true?shiftWeekdays(r,this._week.dow):e?r[e.day()]:r}function localeWeekdaysShort(e){return e===true?shiftWeekdays(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function localeWeekdaysMin(e){return e===true?shiftWeekdays(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function handleStrictParse$1(e,t,r){var n,i,s,o=e.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[];this._shortWeekdaysParse=[];this._minWeekdaysParse=[];for(n=0;n<7;++n){s=createUTC([2e3,1]).day(n);this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase();this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase();this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase()}}if(r){if(t==="dddd"){i=J.call(this._weekdaysParse,o);return i!==-1?i:null}else if(t==="ddd"){i=J.call(this._shortWeekdaysParse,o);return i!==-1?i:null}else{i=J.call(this._minWeekdaysParse,o);return i!==-1?i:null}}else{if(t==="dddd"){i=J.call(this._weekdaysParse,o);if(i!==-1){return i}i=J.call(this._shortWeekdaysParse,o);if(i!==-1){return i}i=J.call(this._minWeekdaysParse,o);return i!==-1?i:null}else if(t==="ddd"){i=J.call(this._shortWeekdaysParse,o);if(i!==-1){return i}i=J.call(this._weekdaysParse,o);if(i!==-1){return i}i=J.call(this._minWeekdaysParse,o);return i!==-1?i:null}else{i=J.call(this._minWeekdaysParse,o);if(i!==-1){return i}i=J.call(this._weekdaysParse,o);if(i!==-1){return i}i=J.call(this._shortWeekdaysParse,o);return i!==-1?i:null}}}function localeWeekdaysParse(e,t,r){var n,i,s;if(this._weekdaysParseExact){return handleStrictParse$1.call(this,e,t,r)}if(!this._weekdaysParse){this._weekdaysParse=[];this._minWeekdaysParse=[];this._shortWeekdaysParse=[];this._fullWeekdaysParse=[]}for(n=0;n<7;n++){i=createUTC([2e3,1]).day(n);if(r&&!this._fullWeekdaysParse[n]){this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i");this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i");this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")}if(!this._weekdaysParse[n]){s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,"");this._weekdaysParse[n]=new RegExp(s.replace(".",""),"i")}if(r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e)){return n}else if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e)){return n}else if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e)){return n}else if(!r&&this._weekdaysParse[n].test(e)){return n}}}function getSetDayOfWeek(e){if(!this.isValid()){return e!=null?this:NaN}var t=get(this,"Day");if(e!=null){e=parseWeekday(e,this.localeData());return this.add(e-t,"d")}else{return t}}function getSetLocaleDayOfWeek(e){if(!this.isValid()){return e!=null?this:NaN}var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function getSetISODayOfWeek(e){if(!this.isValid()){return e!=null?this:NaN}if(e!=null){var t=parseIsoWeekday(e,this.localeData());return this.day(this.day()%7?t:t-7)}else{return this.day()||7}}function weekdaysRegex(e){if(this._weekdaysParseExact){if(!hasOwnProp(this,"_weekdaysRegex")){computeWeekdaysParse.call(this)}if(e){return this._weekdaysStrictRegex}else{return this._weekdaysRegex}}else{if(!hasOwnProp(this,"_weekdaysRegex")){this._weekdaysRegex=ae}return this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex}}function weekdaysShortRegex(e){if(this._weekdaysParseExact){if(!hasOwnProp(this,"_weekdaysRegex")){computeWeekdaysParse.call(this)}if(e){return this._weekdaysShortStrictRegex}else{return this._weekdaysShortRegex}}else{if(!hasOwnProp(this,"_weekdaysShortRegex")){this._weekdaysShortRegex=ue}return this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}}function weekdaysMinRegex(e){if(this._weekdaysParseExact){if(!hasOwnProp(this,"_weekdaysRegex")){computeWeekdaysParse.call(this)}if(e){return this._weekdaysMinStrictRegex}else{return this._weekdaysMinRegex}}else{if(!hasOwnProp(this,"_weekdaysMinRegex")){this._weekdaysMinRegex=ce}return this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}}function computeWeekdaysParse(){function cmpLenRev(e,t){return t.length-e.length}var e=[],t=[],r=[],n=[],i,s,o,a,u;for(i=0;i<7;i++){s=createUTC([2e3,1]).day(i);o=regexEscape(this.weekdaysMin(s,""));a=regexEscape(this.weekdaysShort(s,""));u=regexEscape(this.weekdays(s,""));e.push(o);t.push(a);r.push(u);n.push(o);n.push(a);n.push(u)}e.sort(cmpLenRev);t.sort(cmpLenRev);r.sort(cmpLenRev);n.sort(cmpLenRev);this._weekdaysRegex=new RegExp("^("+n.join("|")+")","i");this._weekdaysShortRegex=this._weekdaysRegex;this._weekdaysMinRegex=this._weekdaysRegex;this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+t.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}addFormatToken("H",["HH",2],0,"hour");addFormatToken("h",["hh",2],0,hFormat);addFormatToken("k",["kk",2],0,kFormat);addFormatToken("hmm",0,0,(function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)}));addFormatToken("hmmss",0,0,(function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)}));addFormatToken("Hmm",0,0,(function(){return""+this.hours()+zeroFill(this.minutes(),2)}));addFormatToken("Hmmss",0,0,(function(){return""+this.hours()+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)}));function meridiem(e,t){addFormatToken(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}meridiem("a",true);meridiem("A",false);function matchMeridiem(e,t){return t._meridiemParse}addRegexToken("a",matchMeridiem);addRegexToken("A",matchMeridiem);addRegexToken("H",M,j);addRegexToken("h",M,R);addRegexToken("k",M,R);addRegexToken("HH",M,v);addRegexToken("hh",M,v);addRegexToken("kk",M,v);addRegexToken("hmm",C);addRegexToken("hmmss",D);addRegexToken("Hmm",C);addRegexToken("Hmmss",D);addParseToken(["H","HH"],W);addParseToken(["k","kk"],(function(e,t,r){var n=toInt(e);t[W]=n===24?0:n}));addParseToken(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e);r._meridiem=e}));addParseToken(["h","hh"],(function(e,t,r){t[W]=toInt(e);getParsingFlags(r).bigHour=true}));addParseToken("hmm",(function(e,t,r){var n=e.length-2;t[W]=toInt(e.substr(0,n));t[K]=toInt(e.substr(n));getParsingFlags(r).bigHour=true}));addParseToken("hmmss",(function(e,t,r){var n=e.length-4,i=e.length-2;t[W]=toInt(e.substr(0,n));t[K]=toInt(e.substr(n,2));t[V]=toInt(e.substr(i));getParsingFlags(r).bigHour=true}));addParseToken("Hmm",(function(e,t,r){var n=e.length-2;t[W]=toInt(e.substr(0,n));t[K]=toInt(e.substr(n))}));addParseToken("Hmmss",(function(e,t,r){var n=e.length-4,i=e.length-2;t[W]=toInt(e.substr(0,n));t[K]=toInt(e.substr(n,2));t[V]=toInt(e.substr(i))}));function localeIsPM(e){return(e+"").toLowerCase().charAt(0)==="p"}var le=/[ap]\.?m?\.?/i,de=makeGetSet("Hours",true);function localeMeridiem(e,t,r){if(e>11){return r?"pm":"PM"}else{return r?"am":"AM"}}var fe={calendar:a,longDateFormat:f,invalidDate:h,ordinal:p,dayOfMonthOrdinalParse:m,relativeTime:y,months:Z,monthsShort:Q,week:ne,weekdays:ie,weekdaysMin:oe,weekdaysShort:se,meridiemParse:le};var he={},pe={},me;function commonPrefix(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1){if(e[r]!==t[r]){return r}}return n}function normalizeLocale(e){return e?e.toLowerCase().replace("_","-"):e}function chooseLocale(e){var t=0,r,n,i,s;while(t<e.length){s=normalizeLocale(e[t]).split("-");r=s.length;n=normalizeLocale(e[t+1]);n=n?n.split("-"):null;while(r>0){i=loadLocale(s.slice(0,r).join("-"));if(i){return i}if(n&&n.length>=r&&commonPrefix(s,n)>=r-1){break}r--}t++}return me}function isLocaleNameSane(e){return!!(e&&e.match("^[^/\\\\]*$"))}function loadLocale(t){var r=null,n;if(he[t]===undefined&&"object"!=="undefined"&&e&&e.exports&&isLocaleNameSane(t)){try{r=me._abbr;n=require;n("./locale/"+t);getSetGlobalLocale(r)}catch(e){he[t]=null}}return he[t]}function getSetGlobalLocale(e,t){var r;if(e){if(isUndefined(t)){r=getLocale(e)}else{r=defineLocale(e,t)}if(r){me=r}else{if(typeof console!=="undefined"&&console.warn){console.warn("Locale "+e+" not found. Did you forget to load it?")}}}return me._abbr}function defineLocale(e,t){if(t!==null){var r,n=fe;t.abbr=e;if(he[e]!=null){deprecateSimple("defineLocaleOverride","use moment.updateLocale(localeName, config) to change "+"an existing locale. moment.defineLocale(localeName, "+"config) should only be used for creating a new locale "+"See http://momentjs.com/guides/#/warnings/define-locale/ for more info.");n=he[e]._config}else if(t.parentLocale!=null){if(he[t.parentLocale]!=null){n=he[t.parentLocale]._config}else{r=loadLocale(t.parentLocale);if(r!=null){n=r._config}else{if(!pe[t.parentLocale]){pe[t.parentLocale]=[]}pe[t.parentLocale].push({name:e,config:t});return null}}}he[e]=new Locale(mergeConfigs(n,t));if(pe[e]){pe[e].forEach((function(e){defineLocale(e.name,e.config)}))}getSetGlobalLocale(e);return he[e]}else{delete he[e];return null}}function updateLocale(e,t){if(t!=null){var r,n,i=fe;if(he[e]!=null&&he[e].parentLocale!=null){he[e].set(mergeConfigs(he[e]._config,t))}else{n=loadLocale(e);if(n!=null){i=n._config}t=mergeConfigs(i,t);if(n==null){t.abbr=e}r=new Locale(t);r.parentLocale=he[e];he[e]=r}getSetGlobalLocale(e)}else{if(he[e]!=null){if(he[e].parentLocale!=null){he[e]=he[e].parentLocale;if(e===getSetGlobalLocale()){getSetGlobalLocale(e)}}else if(he[e]!=null){delete he[e]}}}return he[e]}function getLocale(e){var t;if(e&&e._locale&&e._locale._abbr){e=e._locale._abbr}if(!e){return me}if(!isArray(e)){t=loadLocale(e);if(t){return t}e=[e]}return chooseLocale(e)}function listLocales(){return o(he)}function checkOverflow(e){var t,r=e._a;if(r&&getParsingFlags(e).overflow===-2){t=r[Y]<0||r[Y]>11?Y:r[q]<1||r[q]>daysInMonth(r[U],r[Y])?q:r[W]<0||r[W]>24||r[W]===24&&(r[K]!==0||r[V]!==0||r[$]!==0)?W:r[K]<0||r[K]>59?K:r[V]<0||r[V]>59?V:r[$]<0||r[$]>999?$:-1;if(getParsingFlags(e)._overflowDayOfYear&&(t<U||t>q)){t=q}if(getParsingFlags(e)._overflowWeeks&&t===-1){t=H}if(getParsingFlags(e)._overflowWeekday&&t===-1){t=G}getParsingFlags(e).overflow=t}return e}var ye=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ge=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,be=/Z|[+-]\d\d(?::?\d\d)?/,we=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,false],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,false],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,false],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,false],["YYYY",/\d{4}/,false]],ve=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],_e=/^\/?Date\((-?\d+)/i,Te=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Se={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function configFromISO(e){var t,r,n=e._i,i=ye.exec(n)||ge.exec(n),s,o,a,u,c=we.length,l=ve.length;if(i){getParsingFlags(e).iso=true;for(t=0,r=c;t<r;t++){if(we[t][1].exec(i[1])){o=we[t][0];s=we[t][2]!==false;break}}if(o==null){e._isValid=false;return}if(i[3]){for(t=0,r=l;t<r;t++){if(ve[t][1].exec(i[3])){a=(i[2]||" ")+ve[t][0];break}}if(a==null){e._isValid=false;return}}if(!s&&a!=null){e._isValid=false;return}if(i[4]){if(be.exec(i[4])){u="Z"}else{e._isValid=false;return}}e._f=o+(a||"")+(u||"");configFromStringAndFormat(e)}else{e._isValid=false}}function extractFromRFC2822Strings(e,t,r,n,i,s){var o=[untruncateYear(e),Q.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(i,10)];if(s){o.push(parseInt(s,10))}return o}function untruncateYear(e){var t=parseInt(e,10);if(t<=49){return 2e3+t}else if(t<=999){return 1900+t}return t}function preprocessRFC2822(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function checkWeekday(e,t,r){if(e){var n=se.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(n!==i){getParsingFlags(r).weekdayMismatch=true;r._isValid=false;return false}}return true}function calculateOffset(e,t,r){if(e){return Se[e]}else if(t){return 0}else{var n=parseInt(r,10),i=n%100,s=(n-i)/100;return s*60+i}}function configFromRFC2822(e){var t=Te.exec(preprocessRFC2822(e._i)),r;if(t){r=extractFromRFC2822Strings(t[4],t[3],t[2],t[5],t[6],t[7]);if(!checkWeekday(t[1],r,e)){return}e._a=r;e._tzm=calculateOffset(t[8],t[9],t[10]);e._d=createUTCDate.apply(null,e._a);e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm);getParsingFlags(e).rfc2822=true}else{e._isValid=false}}function configFromString(e){var t=_e.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}configFromISO(e);if(e._isValid===false){delete e._isValid}else{return}configFromRFC2822(e);if(e._isValid===false){delete e._isValid}else{return}if(e._strict){e._isValid=false}else{hooks.createFromInputFallback(e)}}hooks.createFromInputFallback=deprecate("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), "+"which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are "+"discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}));function defaults(e,t,r){if(e!=null){return e}if(t!=null){return t}return r}function currentDateArray(e){var t=new Date(hooks.now());if(e._useUTC){return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]}return[t.getFullYear(),t.getMonth(),t.getDate()]}function configFromArray(e){var t,r,n=[],i,s,o;if(e._d){return}i=currentDateArray(e);if(e._w&&e._a[q]==null&&e._a[Y]==null){dayOfYearFromWeekInfo(e)}if(e._dayOfYear!=null){o=defaults(e._a[U],i[U]);if(e._dayOfYear>daysInYear(o)||e._dayOfYear===0){getParsingFlags(e)._overflowDayOfYear=true}r=createUTCDate(o,0,e._dayOfYear);e._a[Y]=r.getUTCMonth();e._a[q]=r.getUTCDate()}for(t=0;t<3&&e._a[t]==null;++t){e._a[t]=n[t]=i[t]}for(;t<7;t++){e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t]}if(e._a[W]===24&&e._a[K]===0&&e._a[V]===0&&e._a[$]===0){e._nextDay=true;e._a[W]=0}e._d=(e._useUTC?createUTCDate:createDate).apply(null,n);s=e._useUTC?e._d.getUTCDay():e._d.getDay();if(e._tzm!=null){e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm)}if(e._nextDay){e._a[W]=24}if(e._w&&typeof e._w.d!=="undefined"&&e._w.d!==s){getParsingFlags(e).weekdayMismatch=true}}function dayOfYearFromWeekInfo(e){var t,r,n,i,s,o,a,u,c;t=e._w;if(t.GG!=null||t.W!=null||t.E!=null){s=1;o=4;r=defaults(t.GG,e._a[U],weekOfYear(createLocal(),1,4).year);n=defaults(t.W,1);i=defaults(t.E,1);if(i<1||i>7){u=true}}else{s=e._locale._week.dow;o=e._locale._week.doy;c=weekOfYear(createLocal(),s,o);r=defaults(t.gg,e._a[U],c.year);n=defaults(t.w,c.week);if(t.d!=null){i=t.d;if(i<0||i>6){u=true}}else if(t.e!=null){i=t.e+s;if(t.e<0||t.e>6){u=true}}else{i=s}}if(n<1||n>weeksInYear(r,s,o)){getParsingFlags(e)._overflowWeeks=true}else if(u!=null){getParsingFlags(e)._overflowWeekday=true}else{a=dayOfYearFromWeeks(r,n,i,s,o);e._a[U]=a.year;e._dayOfYear=a.dayOfYear}}hooks.ISO_8601=function(){};hooks.RFC_2822=function(){};function configFromStringAndFormat(e){if(e._f===hooks.ISO_8601){configFromISO(e);return}if(e._f===hooks.RFC_2822){configFromRFC2822(e);return}e._a=[];getParsingFlags(e).empty=true;var t=""+e._i,r,n,i,s,o,a=t.length,c=0,l,f;i=expandFormat(e._f,e._locale).match(u)||[];f=i.length;for(r=0;r<f;r++){s=i[r];n=(t.match(getParseRegexForToken(s,e))||[])[0];if(n){o=t.substr(0,t.indexOf(n));if(o.length>0){getParsingFlags(e).unusedInput.push(o)}t=t.slice(t.indexOf(n)+n.length);c+=n.length}if(d[s]){if(n){getParsingFlags(e).empty=false}else{getParsingFlags(e).unusedTokens.push(s)}addTimeToArrayFromToken(s,n,e)}else if(e._strict&&!n){getParsingFlags(e).unusedTokens.push(s)}}getParsingFlags(e).charsLeftOver=a-c;if(t.length>0){getParsingFlags(e).unusedInput.push(t)}if(e._a[W]<=12&&getParsingFlags(e).bigHour===true&&e._a[W]>0){getParsingFlags(e).bigHour=undefined}getParsingFlags(e).parsedDateParts=e._a.slice(0);getParsingFlags(e).meridiem=e._meridiem;e._a[W]=meridiemFixWrap(e._locale,e._a[W],e._meridiem);l=getParsingFlags(e).era;if(l!==null){e._a[U]=e._locale.erasConvertYear(l,e._a[U])}configFromArray(e);checkOverflow(e)}function meridiemFixWrap(e,t,r){var n;if(r==null){return t}if(e.meridiemHour!=null){return e.meridiemHour(t,r)}else if(e.isPM!=null){n=e.isPM(r);if(n&&t<12){t+=12}if(!n&&t===12){t=0}return t}else{return t}}function configFromStringAndArray(e){var t,r,n,i,s,o,a=false,u=e._f.length;if(u===0){getParsingFlags(e).invalidFormat=true;e._d=new Date(NaN);return}for(i=0;i<u;i++){s=0;o=false;t=copyConfig({},e);if(e._useUTC!=null){t._useUTC=e._useUTC}t._f=e._f[i];configFromStringAndFormat(t);if(isValid(t)){o=true}s+=getParsingFlags(t).charsLeftOver;s+=getParsingFlags(t).unusedTokens.length*10;getParsingFlags(t).score=s;if(!a){if(n==null||s<n||o){n=s;r=t;if(o){a=true}}}else{if(s<n){n=s;r=t}}}extend(e,r||t)}function configFromObject(e){if(e._d){return}var t=normalizeObjectUnits(e._i),r=t.day===undefined?t.date:t.day;e._a=map([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)}));configFromArray(e)}function createFromConfig(e){var t=new Moment(checkOverflow(prepareConfig(e)));if(t._nextDay){t.add(1,"d");t._nextDay=undefined}return t}function prepareConfig(e){var t=e._i,r=e._f;e._locale=e._locale||getLocale(e._l);if(t===null||r===undefined&&t===""){return createInvalid({nullInput:true})}if(typeof t==="string"){e._i=t=e._locale.preparse(t)}if(isMoment(t)){return new Moment(checkOverflow(t))}else if(isDate(t)){e._d=t}else if(isArray(r)){configFromStringAndArray(e)}else if(r){configFromStringAndFormat(e)}else{configFromInput(e)}if(!isValid(e)){e._d=null}return e}function configFromInput(e){var t=e._i;if(isUndefined(t)){e._d=new Date(hooks.now())}else if(isDate(t)){e._d=new Date(t.valueOf())}else if(typeof t==="string"){configFromString(e)}else if(isArray(t)){e._a=map(t.slice(0),(function(e){return parseInt(e,10)}));configFromArray(e)}else if(isObject(t)){configFromObject(e)}else if(isNumber(t)){e._d=new Date(t)}else{hooks.createFromInputFallback(e)}}function createLocalOrUTC(e,t,r,n,i){var s={};if(t===true||t===false){n=t;t=undefined}if(r===true||r===false){n=r;r=undefined}if(isObject(e)&&isObjectEmpty(e)||isArray(e)&&e.length===0){e=undefined}s._isAMomentObject=true;s._useUTC=s._isUTC=i;s._l=r;s._i=e;s._f=t;s._strict=n;return createFromConfig(s)}function createLocal(e,t,r,n){return createLocalOrUTC(e,t,r,n,false)}var Me=deprecate("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=createLocal.apply(null,arguments);if(this.isValid()&&e.isValid()){return e<this?this:e}else{return createInvalid()}})),Ce=deprecate("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=createLocal.apply(null,arguments);if(this.isValid()&&e.isValid()){return e>this?this:e}else{return createInvalid()}}));function pickBy(e,t){var r,n;if(t.length===1&&isArray(t[0])){t=t[0]}if(!t.length){return createLocal()}r=t[0];for(n=1;n<t.length;++n){if(!t[n].isValid()||t[n][e](r)){r=t[n]}}return r}function min(){var e=[].slice.call(arguments,0);return pickBy("isBefore",e)}function max(){var e=[].slice.call(arguments,0);return pickBy("isAfter",e)}var now=function(){return Date.now?Date.now():+new Date};var De=["year","quarter","month","week","day","hour","minute","second","millisecond"];function isDurationValid(e){var t,r=false,n,i=De.length;for(t in e){if(hasOwnProp(e,t)&&!(J.call(De,t)!==-1&&(e[t]==null||!isNaN(e[t])))){return false}}for(n=0;n<i;++n){if(e[De[n]]){if(r){return false}if(parseFloat(e[De[n]])!==toInt(e[De[n]])){r=true}}}return true}function isValid$1(){return this._isValid}function createInvalid$1(){return createDuration(NaN)}function Duration(e){var t=normalizeObjectUnits(e),r=t.year||0,n=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,o=t.day||0,a=t.hour||0,u=t.minute||0,c=t.second||0,l=t.millisecond||0;this._isValid=isDurationValid(t);this._milliseconds=+l+c*1e3+u*6e4+a*1e3*60*60;this._days=+o+s*7;this._months=+i+n*3+r*12;this._data={};this._locale=getLocale();this._bubble()}function isDuration(e){return e instanceof Duration}function absRound(e){if(e<0){return Math.round(-1*e)*-1}else{return Math.round(e)}}function compareArrays(e,t,r){var n=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0,o;for(o=0;o<n;o++){if(r&&e[o]!==t[o]||!r&&toInt(e[o])!==toInt(t[o])){s++}}return s+i}function offset(e,t){addFormatToken(e,0,0,(function(){var e=this.utcOffset(),r="+";if(e<0){e=-e;r="-"}return r+zeroFill(~~(e/60),2)+t+zeroFill(~~e%60,2)}))}offset("Z",":");offset("ZZ","");addRegexToken("Z",I);addRegexToken("ZZ",I);addParseToken(["Z","ZZ"],(function(e,t,r){r._useUTC=true;r._tzm=offsetFromString(I,e)}));var Oe=/([\+\-]|\d\d)/gi;function offsetFromString(e,t){var r=(t||"").match(e),n,i,s;if(r===null){return null}n=r[r.length-1]||[];i=(n+"").match(Oe)||["-",0,0];s=+(i[1]*60)+toInt(i[2]);return s===0?0:i[0]==="+"?s:-s}function cloneWithOffset(e,t){var r,n;if(t._isUTC){r=t.clone();n=(isMoment(e)||isDate(e)?e.valueOf():createLocal(e).valueOf())-r.valueOf();r._d.setTime(r._d.valueOf()+n);hooks.updateOffset(r,false);return r}else{return createLocal(e).local()}}function getDateOffset(e){return-Math.round(e._d.getTimezoneOffset())}hooks.updateOffset=function(){};function getSetOffset(e,t,r){var n=this._offset||0,i;if(!this.isValid()){return e!=null?this:NaN}if(e!=null){if(typeof e==="string"){e=offsetFromString(I,e);if(e===null){return this}}else if(Math.abs(e)<16&&!r){e=e*60}if(!this._isUTC&&t){i=getDateOffset(this)}this._offset=e;this._isUTC=true;if(i!=null){this.add(i,"m")}if(n!==e){if(!t||this._changeInProgress){addSubtract(this,createDuration(e-n,"m"),1,false)}else if(!this._changeInProgress){this._changeInProgress=true;hooks.updateOffset(this,true);this._changeInProgress=null}}return this}else{return this._isUTC?n:getDateOffset(this)}}function getSetZone(e,t){if(e!=null){if(typeof e!=="string"){e=-e}this.utcOffset(e,t);return this}else{return-this.utcOffset()}}function setOffsetToUTC(e){return this.utcOffset(0,e)}function setOffsetToLocal(e){if(this._isUTC){this.utcOffset(0,e);this._isUTC=false;if(e){this.subtract(getDateOffset(this),"m")}}return this}function setOffsetToParsedOffset(){if(this._tzm!=null){this.utcOffset(this._tzm,false,true)}else if(typeof this._i==="string"){var e=offsetFromString(x,this._i);if(e!=null){this.utcOffset(e)}else{this.utcOffset(0,true)}}return this}function hasAlignedHourOffset(e){if(!this.isValid()){return false}e=e?createLocal(e).utcOffset():0;return(this.utcOffset()-e)%60===0}function isDaylightSavingTime(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted)){return this._isDSTShifted}var e={},t;copyConfig(e,this);e=prepareConfig(e);if(e._a){t=e._isUTC?createUTC(e._a):createLocal(e._a);this._isDSTShifted=this.isValid()&&compareArrays(e._a,t.toArray())>0}else{this._isDSTShifted=false}return this._isDSTShifted}function isLocal(){return this.isValid()?!this._isUTC:false}function isUtcOffset(){return this.isValid()?this._isUTC:false}function isUtc(){return this.isValid()?this._isUTC&&this._offset===0:false}var ke=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ae=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function createDuration(e,t){var r=e,n=null,i,s,o;if(isDuration(e)){r={ms:e._milliseconds,d:e._days,M:e._months}}else if(isNumber(e)||!isNaN(+e)){r={};if(t){r[t]=+e}else{r.milliseconds=+e}}else if(n=ke.exec(e)){i=n[1]==="-"?-1:1;r={y:0,d:toInt(n[q])*i,h:toInt(n[W])*i,m:toInt(n[K])*i,s:toInt(n[V])*i,ms:toInt(absRound(n[$]*1e3))*i}}else if(n=Ae.exec(e)){i=n[1]==="-"?-1:1;r={y:parseIso(n[2],i),M:parseIso(n[3],i),w:parseIso(n[4],i),d:parseIso(n[5],i),h:parseIso(n[6],i),m:parseIso(n[7],i),s:parseIso(n[8],i)}}else if(r==null){r={}}else if(typeof r==="object"&&("from"in r||"to"in r)){o=momentsDifference(createLocal(r.from),createLocal(r.to));r={};r.ms=o.milliseconds;r.M=o.months}s=new Duration(r);if(isDuration(e)&&hasOwnProp(e,"_locale")){s._locale=e._locale}if(isDuration(e)&&hasOwnProp(e,"_isValid")){s._isValid=e._isValid}return s}createDuration.fn=Duration.prototype;createDuration.invalid=createInvalid$1;function parseIso(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function positiveMomentsDifference(e,t){var r={};r.months=t.month()-e.month()+(t.year()-e.year())*12;if(e.clone().add(r.months,"M").isAfter(t)){--r.months}r.milliseconds=+t-+e.clone().add(r.months,"M");return r}function momentsDifference(e,t){var r;if(!(e.isValid()&&t.isValid())){return{milliseconds:0,months:0}}t=cloneWithOffset(t,e);if(e.isBefore(t)){r=positiveMomentsDifference(e,t)}else{r=positiveMomentsDifference(t,e);r.milliseconds=-r.milliseconds;r.months=-r.months}return r}function createAdder(e,t){return function(r,n){var i,s;if(n!==null&&!isNaN(+n)){deprecateSimple(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). "+"See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.");s=r;r=n;n=s}i=createDuration(r,n);addSubtract(this,i,e);return this}}function addSubtract(e,t,r,n){var i=t._milliseconds,s=absRound(t._days),o=absRound(t._months);if(!e.isValid()){return}n=n==null?true:n;if(o){setMonth(e,get(e,"Month")+o*r)}if(s){set$1(e,"Date",get(e,"Date")+s*r)}if(i){e._d.setTime(e._d.valueOf()+i*r)}if(n){hooks.updateOffset(e,s||o)}}var Ee=createAdder(1,"add"),Pe=createAdder(-1,"subtract");function isString(e){return typeof e==="string"||e instanceof String}function isMomentInput(e){return isMoment(e)||isDate(e)||isString(e)||isNumber(e)||isNumberOrStringArray(e)||isMomentInputObject(e)||e===null||e===undefined}function isMomentInputObject(e){var t=isObject(e)&&!isObjectEmpty(e),r=false,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,o=n.length;for(i=0;i<o;i+=1){s=n[i];r=r||hasOwnProp(e,s)}return t&&r}function isNumberOrStringArray(e){var t=isArray(e),r=false;if(t){r=e.filter((function(t){return!isNumber(t)&&isString(e)})).length===0}return t&&r}function isCalendarSpec(e){var t=isObject(e)&&!isObjectEmpty(e),r=false,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,s;for(i=0;i<n.length;i+=1){s=n[i];r=r||hasOwnProp(e,s)}return t&&r}function getCalendarFormat(e,t){var r=e.diff(t,"days",true);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function calendar$1(e,t){if(arguments.length===1){if(!arguments[0]){e=undefined;t=undefined}else if(isMomentInput(arguments[0])){e=arguments[0];t=undefined}else if(isCalendarSpec(arguments[0])){t=arguments[0];e=undefined}}var r=e||createLocal(),n=cloneWithOffset(r,this).startOf("day"),i=hooks.calendarFormat(this,n)||"sameElse",s=t&&(isFunction(t[i])?t[i].call(this,r):t[i]);return this.format(s||this.localeData().calendar(i,this,createLocal(r)))}function clone(){return new Moment(this)}function isAfter(e,t){var r=isMoment(e)?e:createLocal(e);if(!(this.isValid()&&r.isValid())){return false}t=normalizeUnits(t)||"millisecond";if(t==="millisecond"){return this.valueOf()>r.valueOf()}else{return r.valueOf()<this.clone().startOf(t).valueOf()}}function isBefore(e,t){var r=isMoment(e)?e:createLocal(e);if(!(this.isValid()&&r.isValid())){return false}t=normalizeUnits(t)||"millisecond";if(t==="millisecond"){return this.valueOf()<r.valueOf()}else{return this.clone().endOf(t).valueOf()<r.valueOf()}}function isBetween(e,t,r,n){var i=isMoment(e)?e:createLocal(e),s=isMoment(t)?t:createLocal(t);if(!(this.isValid()&&i.isValid()&&s.isValid())){return false}n=n||"()";return(n[0]==="("?this.isAfter(i,r):!this.isBefore(i,r))&&(n[1]===")"?this.isBefore(s,r):!this.isAfter(s,r))}function isSame(e,t){var r=isMoment(e)?e:createLocal(e),n;if(!(this.isValid()&&r.isValid())){return false}t=normalizeUnits(t)||"millisecond";if(t==="millisecond"){return this.valueOf()===r.valueOf()}else{n=r.valueOf();return this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()}}function isSameOrAfter(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function isSameOrBefore(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function diff(e,t,r){var n,i,s;if(!this.isValid()){return NaN}n=cloneWithOffset(e,this);if(!n.isValid()){return NaN}i=(n.utcOffset()-this.utcOffset())*6e4;t=normalizeUnits(t);switch(t){case"year":s=monthDiff(this,n)/12;break;case"month":s=monthDiff(this,n);break;case"quarter":s=monthDiff(this,n)/3;break;case"second":s=(this-n)/1e3;break;case"minute":s=(this-n)/6e4;break;case"hour":s=(this-n)/36e5;break;case"day":s=(this-n-i)/864e5;break;case"week":s=(this-n-i)/6048e5;break;default:s=this-n}return r?s:absFloor(s)}function monthDiff(e,t){if(e.date()<t.date()){return-monthDiff(t,e)}var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),i,s;if(t-n<0){i=e.clone().add(r-1,"months");s=(t-n)/(n-i)}else{i=e.clone().add(r+1,"months");s=(t-n)/(i-n)}return-(r+s)||0}hooks.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";hooks.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function toString(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function toISOString(e){if(!this.isValid()){return null}var t=e!==true,r=t?this.clone().utc():this;if(r.year()<0||r.year()>9999){return formatMoment(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ")}if(isFunction(Date.prototype.toISOString)){if(t){return this.toDate().toISOString()}else{return new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",formatMoment(r,"Z"))}}return formatMoment(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect(){if(!this.isValid()){return"moment.invalid(/* "+this._i+" */)"}var e="moment",t="",r,n,i,s;if(!this.isLocal()){e=this.utcOffset()===0?"moment.utc":"moment.parseZone";t="Z"}r="["+e+'("]';n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY";i="-MM-DD[T]HH:mm:ss.SSS";s=t+'[")]';return this.format(r+n+i+s)}function format(e){if(!e){e=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat}var t=formatMoment(this,e);return this.localeData().postformat(t)}function from(e,t){if(this.isValid()&&(isMoment(e)&&e.isValid()||createLocal(e).isValid())){return createDuration({to:this,from:e}).locale(this.locale()).humanize(!t)}else{return this.localeData().invalidDate()}}function fromNow(e){return this.from(createLocal(),e)}function to(e,t){if(this.isValid()&&(isMoment(e)&&e.isValid()||createLocal(e).isValid())){return createDuration({from:this,to:e}).locale(this.locale()).humanize(!t)}else{return this.localeData().invalidDate()}}function toNow(e){return this.to(createLocal(),e)}function locale(e){var t;if(e===undefined){return this._locale._abbr}else{t=getLocale(e);if(t!=null){this._locale=t}return this}}var xe=deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){if(e===undefined){return this.localeData()}else{return this.locale(e)}}));function localeData(){return this._locale}var Ie=1e3,Le=60*Ie,Ne=60*Le,Re=(365*400+97)*24*Ne;function mod$1(e,t){return(e%t+t)%t}function localStartOfDate(e,t,r){if(e<100&&e>=0){return new Date(e+400,t,r)-Re}else{return new Date(e,t,r).valueOf()}}function utcStartOfDate(e,t,r){if(e<100&&e>=0){return Date.UTC(e+400,t,r)-Re}else{return Date.UTC(e,t,r)}}function startOf(e){var t,r;e=normalizeUnits(e);if(e===undefined||e==="millisecond"||!this.isValid()){return this}r=this._isUTC?utcStartOfDate:localStartOfDate;switch(e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf();t-=mod$1(t+(this._isUTC?0:this.utcOffset()*Le),Ne);break;case"minute":t=this._d.valueOf();t-=mod$1(t,Le);break;case"second":t=this._d.valueOf();t-=mod$1(t,Ie);break}this._d.setTime(t);hooks.updateOffset(this,true);return this}function endOf(e){var t,r;e=normalizeUnits(e);if(e===undefined||e==="millisecond"||!this.isValid()){return this}r=this._isUTC?utcStartOfDate:localStartOfDate;switch(e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf();t+=Ne-mod$1(t+(this._isUTC?0:this.utcOffset()*Le),Ne)-1;break;case"minute":t=this._d.valueOf();t+=Le-mod$1(t,Le)-1;break;case"second":t=this._d.valueOf();t+=Ie-mod$1(t,Ie)-1;break}this._d.setTime(t);hooks.updateOffset(this,true);return this}function valueOf(){return this._d.valueOf()-(this._offset||0)*6e4}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate(){return new Date(this.valueOf())}function toArray(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function toObject(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid(this)}function parsingFlags(){return extend({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}addFormatToken("N",0,0,"eraAbbr");addFormatToken("NN",0,0,"eraAbbr");addFormatToken("NNN",0,0,"eraAbbr");addFormatToken("NNNN",0,0,"eraName");addFormatToken("NNNNN",0,0,"eraNarrow");addFormatToken("y",["y",1],"yo","eraYear");addFormatToken("y",["yy",2],0,"eraYear");addFormatToken("y",["yyy",3],0,"eraYear");addFormatToken("y",["yyyy",4],0,"eraYear");addRegexToken("N",matchEraAbbr);addRegexToken("NN",matchEraAbbr);addRegexToken("NNN",matchEraAbbr);addRegexToken("NNNN",matchEraName);addRegexToken("NNNNN",matchEraNarrow);addParseToken(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,r,n){var i=r._locale.erasParse(e,n,r._strict);if(i){getParsingFlags(r).era=i}else{getParsingFlags(r).invalidEra=e}}));addRegexToken("y",E);addRegexToken("yy",E);addRegexToken("yyy",E);addRegexToken("yyyy",E);addRegexToken("yo",matchEraYearOrdinal);addParseToken(["y","yy","yyy","yyyy"],U);addParseToken(["yo"],(function(e,t,r,n){var i;if(r._locale._eraYearOrdinalRegex){i=e.match(r._locale._eraYearOrdinalRegex)}if(r._locale.eraYearOrdinalParse){t[U]=r._locale.eraYearOrdinalParse(e,i)}else{t[U]=parseInt(e,10)}}));function localeEras(e,t){var r,n,i,s=this._eras||getLocale("en")._eras;for(r=0,n=s.length;r<n;++r){switch(typeof s[r].since){case"string":i=hooks(s[r].since).startOf("day");s[r].since=i.valueOf();break}switch(typeof s[r].until){case"undefined":s[r].until=+Infinity;break;case"string":i=hooks(s[r].until).startOf("day").valueOf();s[r].until=i.valueOf();break}}return s}function localeErasParse(e,t,r){var n,i,s=this.eras(),o,a,u;e=e.toUpperCase();for(n=0,i=s.length;n<i;++n){o=s[n].name.toUpperCase();a=s[n].abbr.toUpperCase();u=s[n].narrow.toUpperCase();if(r){switch(t){case"N":case"NN":case"NNN":if(a===e){return s[n]}break;case"NNNN":if(o===e){return s[n]}break;case"NNNNN":if(u===e){return s[n]}break}}else if([o,a,u].indexOf(e)>=0){return s[n]}}}function localeErasConvertYear(e,t){var r=e.since<=e.until?+1:-1;if(t===undefined){return hooks(e.since).year()}else{return hooks(e.since).year()+(t-e.offset)*r}}function getEraName(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){r=this.clone().startOf("day").valueOf();if(n[e].since<=r&&r<=n[e].until){return n[e].name}if(n[e].until<=r&&r<=n[e].since){return n[e].name}}return""}function getEraNarrow(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){r=this.clone().startOf("day").valueOf();if(n[e].since<=r&&r<=n[e].until){return n[e].narrow}if(n[e].until<=r&&r<=n[e].since){return n[e].narrow}}return""}function getEraAbbr(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){r=this.clone().startOf("day").valueOf();if(n[e].since<=r&&r<=n[e].until){return n[e].abbr}if(n[e].until<=r&&r<=n[e].since){return n[e].abbr}}return""}function getEraYear(){var e,t,r,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){r=i[e].since<=i[e].until?+1:-1;n=this.clone().startOf("day").valueOf();if(i[e].since<=n&&n<=i[e].until||i[e].until<=n&&n<=i[e].since){return(this.year()-hooks(i[e].since).year())*r+i[e].offset}}return this.year()}function erasNameRegex(e){if(!hasOwnProp(this,"_erasNameRegex")){computeErasParse.call(this)}return e?this._erasNameRegex:this._erasRegex}function erasAbbrRegex(e){if(!hasOwnProp(this,"_erasAbbrRegex")){computeErasParse.call(this)}return e?this._erasAbbrRegex:this._erasRegex}function erasNarrowRegex(e){if(!hasOwnProp(this,"_erasNarrowRegex")){computeErasParse.call(this)}return e?this._erasNarrowRegex:this._erasRegex}function matchEraAbbr(e,t){return t.erasAbbrRegex(e)}function matchEraName(e,t){return t.erasNameRegex(e)}function matchEraNarrow(e,t){return t.erasNarrowRegex(e)}function matchEraYearOrdinal(e,t){return t._eraYearOrdinalRegex||E}function computeErasParse(){var e=[],t=[],r=[],n=[],i,s,o,a,u,c=this.eras();for(i=0,s=c.length;i<s;++i){o=regexEscape(c[i].name);a=regexEscape(c[i].abbr);u=regexEscape(c[i].narrow);t.push(o);e.push(a);r.push(u);n.push(o);n.push(a);n.push(u)}this._erasRegex=new RegExp("^("+n.join("|")+")","i");this._erasNameRegex=new RegExp("^("+t.join("|")+")","i");this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i");this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}addFormatToken(0,["gg",2],0,(function(){return this.weekYear()%100}));addFormatToken(0,["GG",2],0,(function(){return this.isoWeekYear()%100}));function addWeekYearFormatToken(e,t){addFormatToken(0,[e,e.length],0,t)}addWeekYearFormatToken("gggg","weekYear");addWeekYearFormatToken("ggggg","weekYear");addWeekYearFormatToken("GGGG","isoWeekYear");addWeekYearFormatToken("GGGGG","isoWeekYear");addRegexToken("G",P);addRegexToken("g",P);addRegexToken("GG",M,v);addRegexToken("gg",M,v);addRegexToken("GGGG",k,T);addRegexToken("gggg",k,T);addRegexToken("GGGGG",A,S);addRegexToken("ggggg",A,S);addWeekParseToken(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,n){t[n.substr(0,2)]=toInt(e)}));addWeekParseToken(["gg","GG"],(function(e,t,r,n){t[n]=hooks.parseTwoDigitYear(e)}));function getSetWeekYear(e){return getSetWeekYearHelper.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function getSetISOWeekYear(e){return getSetWeekYearHelper.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function getISOWeeksInYear(){return weeksInYear(this.year(),1,4)}function getISOWeeksInISOWeekYear(){return weeksInYear(this.isoWeekYear(),1,4)}function getWeeksInYear(){var e=this.localeData()._week;return weeksInYear(this.year(),e.dow,e.doy)}function getWeeksInWeekYear(){var e=this.localeData()._week;return weeksInYear(this.weekYear(),e.dow,e.doy)}function getSetWeekYearHelper(e,t,r,n,i){var s;if(e==null){return weekOfYear(this,n,i).year}else{s=weeksInYear(e,n,i);if(t>s){t=s}return setWeekAll.call(this,e,t,r,n,i)}}function setWeekAll(e,t,r,n,i){var s=dayOfYearFromWeeks(e,t,r,n,i),o=createUTCDate(s.year,0,s.dayOfYear);this.year(o.getUTCFullYear());this.month(o.getUTCMonth());this.date(o.getUTCDate());return this}addFormatToken("Q",0,"Qo","quarter");addRegexToken("Q",w);addParseToken("Q",(function(e,t){t[Y]=(toInt(e)-1)*3}));function getSetQuarter(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}addFormatToken("D",["DD",2],"Do","date");addRegexToken("D",M,R);addRegexToken("DD",M,v);addRegexToken("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}));addParseToken(["D","DD"],q);addParseToken("Do",(function(e,t){t[q]=toInt(e.match(M)[0])}));var Fe=makeGetSet("Date",true);addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear");addRegexToken("DDD",O);addRegexToken("DDDD",_);addParseToken(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=toInt(e)}));function getSetDayOfYear(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}addFormatToken("m",["mm",2],0,"minute");addRegexToken("m",M,j);addRegexToken("mm",M,v);addParseToken(["m","mm"],K);var je=makeGetSet("Minutes",false);addFormatToken("s",["ss",2],0,"second");addRegexToken("s",M,j);addRegexToken("ss",M,v);addParseToken(["s","ss"],V);var Be=makeGetSet("Seconds",false);addFormatToken("S",0,0,(function(){return~~(this.millisecond()/100)}));addFormatToken(0,["SS",2],0,(function(){return~~(this.millisecond()/10)}));addFormatToken(0,["SSS",3],0,"millisecond");addFormatToken(0,["SSSS",4],0,(function(){return this.millisecond()*10}));addFormatToken(0,["SSSSS",5],0,(function(){return this.millisecond()*100}));addFormatToken(0,["SSSSSS",6],0,(function(){return this.millisecond()*1e3}));addFormatToken(0,["SSSSSSS",7],0,(function(){return this.millisecond()*1e4}));addFormatToken(0,["SSSSSSSS",8],0,(function(){return this.millisecond()*1e5}));addFormatToken(0,["SSSSSSSSS",9],0,(function(){return this.millisecond()*1e6}));addRegexToken("S",O,w);addRegexToken("SS",O,v);addRegexToken("SSS",O,_);var Xe,Ue;for(Xe="SSSS";Xe.length<=9;Xe+="S"){addRegexToken(Xe,E)}function parseMs(e,t){t[$]=toInt(("0."+e)*1e3)}for(Xe="S";Xe.length<=9;Xe+="S"){addParseToken(Xe,parseMs)}Ue=makeGetSet("Milliseconds",false);addFormatToken("z",0,0,"zoneAbbr");addFormatToken("zz",0,0,"zoneName");function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}var Ye=Moment.prototype;Ye.add=Ee;Ye.calendar=calendar$1;Ye.clone=clone;Ye.diff=diff;Ye.endOf=endOf;Ye.format=format;Ye.from=from;Ye.fromNow=fromNow;Ye.to=to;Ye.toNow=toNow;Ye.get=stringGet;Ye.invalidAt=invalidAt;Ye.isAfter=isAfter;Ye.isBefore=isBefore;Ye.isBetween=isBetween;Ye.isSame=isSame;Ye.isSameOrAfter=isSameOrAfter;Ye.isSameOrBefore=isSameOrBefore;Ye.isValid=isValid$2;Ye.lang=xe;Ye.locale=locale;Ye.localeData=localeData;Ye.max=Ce;Ye.min=Me;Ye.parsingFlags=parsingFlags;Ye.set=stringSet;Ye.startOf=startOf;Ye.subtract=Pe;Ye.toArray=toArray;Ye.toObject=toObject;Ye.toDate=toDate;Ye.toISOString=toISOString;Ye.inspect=inspect;if(typeof Symbol!=="undefined"&&Symbol.for!=null){Ye[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}}Ye.toJSON=toJSON;Ye.toString=toString;Ye.unix=unix;Ye.valueOf=valueOf;Ye.creationData=creationData;Ye.eraName=getEraName;Ye.eraNarrow=getEraNarrow;Ye.eraAbbr=getEraAbbr;Ye.eraYear=getEraYear;Ye.year=z;Ye.isLeapYear=getIsLeapYear;Ye.weekYear=getSetWeekYear;Ye.isoWeekYear=getSetISOWeekYear;Ye.quarter=Ye.quarters=getSetQuarter;Ye.month=getSetMonth;Ye.daysInMonth=getDaysInMonth;Ye.week=Ye.weeks=getSetWeek;Ye.isoWeek=Ye.isoWeeks=getSetISOWeek;Ye.weeksInYear=getWeeksInYear;Ye.weeksInWeekYear=getWeeksInWeekYear;Ye.isoWeeksInYear=getISOWeeksInYear;Ye.isoWeeksInISOWeekYear=getISOWeeksInISOWeekYear;Ye.date=Fe;Ye.day=Ye.days=getSetDayOfWeek;Ye.weekday=getSetLocaleDayOfWeek;Ye.isoWeekday=getSetISODayOfWeek;Ye.dayOfYear=getSetDayOfYear;Ye.hour=Ye.hours=de;Ye.minute=Ye.minutes=je;Ye.second=Ye.seconds=Be;Ye.millisecond=Ye.milliseconds=Ue;Ye.utcOffset=getSetOffset;Ye.utc=setOffsetToUTC;Ye.local=setOffsetToLocal;Ye.parseZone=setOffsetToParsedOffset;Ye.hasAlignedHourOffset=hasAlignedHourOffset;Ye.isDST=isDaylightSavingTime;Ye.isLocal=isLocal;Ye.isUtcOffset=isUtcOffset;Ye.isUtc=isUtc;Ye.isUTC=isUtc;Ye.zoneAbbr=getZoneAbbr;Ye.zoneName=getZoneName;Ye.dates=deprecate("dates accessor is deprecated. Use date instead.",Fe);Ye.months=deprecate("months accessor is deprecated. Use month instead",getSetMonth);Ye.years=deprecate("years accessor is deprecated. Use year instead",z);Ye.zone=deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",getSetZone);Ye.isDSTShifted=deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",isDaylightSavingTimeShifted);function createUnix(e){return createLocal(e*1e3)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(e){return e}var qe=Locale.prototype;qe.calendar=calendar;qe.longDateFormat=longDateFormat;qe.invalidDate=invalidDate;qe.ordinal=ordinal;qe.preparse=preParsePostFormat;qe.postformat=preParsePostFormat;qe.relativeTime=relativeTime;qe.pastFuture=pastFuture;qe.set=set;qe.eras=localeEras;qe.erasParse=localeErasParse;qe.erasConvertYear=localeErasConvertYear;qe.erasAbbrRegex=erasAbbrRegex;qe.erasNameRegex=erasNameRegex;qe.erasNarrowRegex=erasNarrowRegex;qe.months=localeMonths;qe.monthsShort=localeMonthsShort;qe.monthsParse=localeMonthsParse;qe.monthsRegex=monthsRegex;qe.monthsShortRegex=monthsShortRegex;qe.week=localeWeek;qe.firstDayOfYear=localeFirstDayOfYear;qe.firstDayOfWeek=localeFirstDayOfWeek;qe.weekdays=localeWeekdays;qe.weekdaysMin=localeWeekdaysMin;qe.weekdaysShort=localeWeekdaysShort;qe.weekdaysParse=localeWeekdaysParse;qe.weekdaysRegex=weekdaysRegex;qe.weekdaysShortRegex=weekdaysShortRegex;qe.weekdaysMinRegex=weekdaysMinRegex;qe.isPM=localeIsPM;qe.meridiem=localeMeridiem;function get$1(e,t,r,n){var i=getLocale(),s=createUTC().set(n,t);return i[r](s,e)}function listMonthsImpl(e,t,r){if(isNumber(e)){t=e;e=undefined}e=e||"";if(t!=null){return get$1(e,t,r,"month")}var n,i=[];for(n=0;n<12;n++){i[n]=get$1(e,n,r,"month")}return i}function listWeekdaysImpl(e,t,r,n){if(typeof e==="boolean"){if(isNumber(t)){r=t;t=undefined}t=t||""}else{t=e;r=t;e=false;if(isNumber(t)){r=t;t=undefined}t=t||""}var i=getLocale(),s=e?i._week.dow:0,o,a=[];if(r!=null){return get$1(t,(r+s)%7,n,"day")}for(o=0;o<7;o++){a[o]=get$1(t,(o+s)%7,n,"day")}return a}function listMonths(e,t){return listMonthsImpl(e,t,"months")}function listMonthsShort(e,t){return listMonthsImpl(e,t,"monthsShort")}function listWeekdays(e,t,r){return listWeekdaysImpl(e,t,r,"weekdays")}function listWeekdaysShort(e,t,r){return listWeekdaysImpl(e,t,r,"weekdaysShort")}function listWeekdaysMin(e,t,r){return listWeekdaysImpl(e,t,r,"weekdaysMin")}getSetGlobalLocale("en",{eras:[{since:"0001-01-01",until:+Infinity,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-Infinity,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=toInt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});hooks.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale);hooks.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",getLocale);var We=Math.abs;function abs(){var e=this._data;this._milliseconds=We(this._milliseconds);this._days=We(this._days);this._months=We(this._months);e.milliseconds=We(e.milliseconds);e.seconds=We(e.seconds);e.minutes=We(e.minutes);e.hours=We(e.hours);e.months=We(e.months);e.years=We(e.years);return this}function addSubtract$1(e,t,r,n){var i=createDuration(t,r);e._milliseconds+=n*i._milliseconds;e._days+=n*i._days;e._months+=n*i._months;return e._bubble()}function add$1(e,t){return addSubtract$1(this,e,t,1)}function subtract$1(e,t){return addSubtract$1(this,e,t,-1)}function absCeil(e){if(e<0){return Math.floor(e)}else{return Math.ceil(e)}}function bubble(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,i,s,o,a,u;if(!(e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0)){e+=absCeil(monthsToDays(r)+t)*864e5;t=0;r=0}n.milliseconds=e%1e3;i=absFloor(e/1e3);n.seconds=i%60;s=absFloor(i/60);n.minutes=s%60;o=absFloor(s/60);n.hours=o%24;t+=absFloor(o/24);u=absFloor(daysToMonths(t));r+=u;t-=absCeil(monthsToDays(u));a=absFloor(r/12);r%=12;n.days=t;n.months=r;n.years=a;return this}function daysToMonths(e){return e*4800/146097}function monthsToDays(e){return e*146097/4800}function as(e){if(!this.isValid()){return NaN}var t,r,n=this._milliseconds;e=normalizeUnits(e);if(e==="month"||e==="quarter"||e==="year"){t=this._days+n/864e5;r=this._months+daysToMonths(t);switch(e){case"month":return r;case"quarter":return r/3;case"year":return r/12}}else{t=this._days+Math.round(monthsToDays(this._months));switch(e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}}function makeAs(e){return function(){return this.as(e)}}var Ke=makeAs("ms"),Ve=makeAs("s"),$e=makeAs("m"),He=makeAs("h"),Ge=makeAs("d"),ze=makeAs("w"),Je=makeAs("M"),Ze=makeAs("Q"),Qe=makeAs("y"),et=Ke;function clone$1(){return createDuration(this)}function get$2(e){e=normalizeUnits(e);return this.isValid()?this[e+"s"]():NaN}function makeGetter(e){return function(){return this.isValid()?this._data[e]:NaN}}var tt=makeGetter("milliseconds"),rt=makeGetter("seconds"),nt=makeGetter("minutes"),it=makeGetter("hours"),st=makeGetter("days"),ot=makeGetter("months"),at=makeGetter("years");function weeks(){return absFloor(this.days()/7)}var ut=Math.round,ct={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function substituteTimeAgo(e,t,r,n,i){return i.relativeTime(t||1,!!r,e,n)}function relativeTime$1(e,t,r,n){var i=createDuration(e).abs(),s=ut(i.as("s")),o=ut(i.as("m")),a=ut(i.as("h")),u=ut(i.as("d")),c=ut(i.as("M")),l=ut(i.as("w")),d=ut(i.as("y")),f=s<=r.ss&&["s",s]||s<r.s&&["ss",s]||o<=1&&["m"]||o<r.m&&["mm",o]||a<=1&&["h"]||a<r.h&&["hh",a]||u<=1&&["d"]||u<r.d&&["dd",u];if(r.w!=null){f=f||l<=1&&["w"]||l<r.w&&["ww",l]}f=f||c<=1&&["M"]||c<r.M&&["MM",c]||d<=1&&["y"]||["yy",d];f[2]=t;f[3]=+e>0;f[4]=n;return substituteTimeAgo.apply(null,f)}function getSetRelativeTimeRounding(e){if(e===undefined){return ut}if(typeof e==="function"){ut=e;return true}return false}function getSetRelativeTimeThreshold(e,t){if(ct[e]===undefined){return false}if(t===undefined){return ct[e]}ct[e]=t;if(e==="s"){ct.ss=t-1}return true}function humanize(e,t){if(!this.isValid()){return this.localeData().invalidDate()}var r=false,n=ct,i,s;if(typeof e==="object"){t=e;e=false}if(typeof e==="boolean"){r=e}if(typeof t==="object"){n=Object.assign({},ct,t);if(t.s!=null&&t.ss==null){n.ss=t.s-1}}i=this.localeData();s=relativeTime$1(this,!r,n,i);if(r){s=i.pastFuture(+this,s)}return i.postformat(s)}var lt=Math.abs;function sign(e){return(e>0)-(e<0)||+e}function toISOString$1(){if(!this.isValid()){return this.localeData().invalidDate()}var e=lt(this._milliseconds)/1e3,t=lt(this._days),r=lt(this._months),n,i,s,o,a=this.asSeconds(),u,c,l,d;if(!a){return"P0D"}n=absFloor(e/60);i=absFloor(n/60);e%=60;n%=60;s=absFloor(r/12);r%=12;o=e?e.toFixed(3).replace(/\.?0+$/,""):"";u=a<0?"-":"";c=sign(this._months)!==sign(a)?"-":"";l=sign(this._days)!==sign(a)?"-":"";d=sign(this._milliseconds)!==sign(a)?"-":"";return u+"P"+(s?c+s+"Y":"")+(r?c+r+"M":"")+(t?l+t+"D":"")+(i||n||e?"T":"")+(i?d+i+"H":"")+(n?d+n+"M":"")+(e?d+o+"S":"")}var dt=Duration.prototype;dt.isValid=isValid$1;dt.abs=abs;dt.add=add$1;dt.subtract=subtract$1;dt.as=as;dt.asMilliseconds=Ke;dt.asSeconds=Ve;dt.asMinutes=$e;dt.asHours=He;dt.asDays=Ge;dt.asWeeks=ze;dt.asMonths=Je;dt.asQuarters=Ze;dt.asYears=Qe;dt.valueOf=et;dt._bubble=bubble;dt.clone=clone$1;dt.get=get$2;dt.milliseconds=tt;dt.seconds=rt;dt.minutes=nt;dt.hours=it;dt.days=st;dt.weeks=weeks;dt.months=ot;dt.years=at;dt.humanize=humanize;dt.toISOString=toISOString$1;dt.toString=toISOString$1;dt.toJSON=toISOString$1;dt.locale=locale;dt.localeData=localeData;dt.toIsoString=deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1);dt.lang=xe;addFormatToken("X",0,0,"unix");addFormatToken("x",0,0,"valueOf");addRegexToken("x",P);addRegexToken("X",L);addParseToken("X",(function(e,t,r){r._d=new Date(parseFloat(e)*1e3)}));addParseToken("x",(function(e,t,r){r._d=new Date(toInt(e))}));
|
|
8
|
+
//! moment.js
|
|
9
|
+
hooks.version="2.30.1";setHookCallback(createLocal);hooks.fn=Ye;hooks.min=min;hooks.max=max;hooks.now=now;hooks.utc=createUTC;hooks.unix=createUnix;hooks.months=listMonths;hooks.isDate=isDate;hooks.locale=getSetGlobalLocale;hooks.invalid=createInvalid;hooks.duration=createDuration;hooks.isMoment=isMoment;hooks.weekdays=listWeekdays;hooks.parseZone=createInZone;hooks.localeData=getLocale;hooks.isDuration=isDuration;hooks.monthsShort=listMonthsShort;hooks.weekdaysMin=listWeekdaysMin;hooks.defineLocale=defineLocale;hooks.updateLocale=updateLocale;hooks.locales=listLocales;hooks.weekdaysShort=listWeekdaysShort;hooks.normalizeUnits=normalizeUnits;hooks.relativeTimeRounding=getSetRelativeTimeRounding;hooks.relativeTimeThreshold=getSetRelativeTimeThreshold;hooks.calendarFormat=getCalendarFormat;hooks.prototype=Ye;hooks.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};return hooks}))},2134:function(e){var t=1e3;var r=t*60;var n=r*60;var i=n*24;var s=i*7;var o=i*365.25;e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0){return parse(e)}else if(r==="number"&&isFinite(e)){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a){return}var u=parseFloat(a[1]);var c=(a[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*r;case"seconds":case"second":case"secs":case"sec":case"s":return u*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return undefined}}function fmtShort(e){var s=Math.abs(e);if(s>=i){return Math.round(e/i)+"d"}if(s>=n){return Math.round(e/n)+"h"}if(s>=r){return Math.round(e/r)+"m"}if(s>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var s=Math.abs(e);if(s>=i){return plural(e,s,i,"day")}if(s>=n){return plural(e,s,n,"hour")}if(s>=r){return plural(e,s,r,"minute")}if(s>=t){return plural(e,s,t,"second")}return e+" ms"}function plural(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}},6426:function(e,t,r){(function(e){e.parser=function(e,t){return new SAXParser(e,t)};e.SAXParser=SAXParser;e.SAXStream=SAXStream;e.createStream=createStream;e.MAX_BUFFER_LENGTH=64*1024;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function SAXParser(t,r){if(!(this instanceof SAXParser)){return new SAXParser(t,r)}var n=this;clearBuffers(n);n.q=n.c="";n.bufferCheckPosition=e.MAX_BUFFER_LENGTH;n.opt=r||{};n.opt.lowercase=n.opt.lowercase||n.opt.lowercasetags;n.looseCase=n.opt.lowercase?"toLowerCase":"toUpperCase";n.tags=[];n.closed=n.closedRoot=n.sawRoot=false;n.tag=n.error=null;n.strict=!!t;n.noscript=!!(t||n.opt.noscript);n.state=p.BEGIN;n.strictEntities=n.opt.strictEntities;n.ENTITIES=n.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES);n.attribList=[];if(n.opt.xmlns){n.ns=Object.create(c)}if(n.opt.unquotedAttributeValues===undefined){n.opt.unquotedAttributeValues=!t}n.trackPosition=n.opt.position!==false;if(n.trackPosition){n.position=n.line=n.column=0}emit(n,"onready")}if(!Object.create){Object.create=function(e){function F(){}F.prototype=e;var t=new F;return t}}if(!Object.keys){Object.keys=function(e){var t=[];for(var r in e)if(e.hasOwnProperty(r))t.push(r);return t}}function checkBufferLength(r){var n=Math.max(e.MAX_BUFFER_LENGTH,10);var i=0;for(var s=0,o=t.length;s<o;s++){var a=r[t[s]].length;if(a>n){switch(t[s]){case"textNode":closeText(r);break;case"cdata":emitNode(r,"oncdata",r.cdata);r.cdata="";break;case"script":emitNode(r,"onscript",r.script);r.script="";break;default:error(r,"Max buffer length exceeded: "+t[s])}}i=Math.max(i,a)}var u=e.MAX_BUFFER_LENGTH-i;r.bufferCheckPosition=u+r.position}function clearBuffers(e){for(var r=0,n=t.length;r<n;r++){e[t[r]]=""}}function flushBuffers(e){closeText(e);if(e.cdata!==""){emitNode(e,"oncdata",e.cdata);e.cdata=""}if(e.script!==""){emitNode(e,"onscript",e.script);e.script=""}}SAXParser.prototype={end:function(){end(this)},write:write,resume:function(){this.error=null;return this},close:function(){return this.write(null)},flush:function(){flushBuffers(this)}};var n;try{n=r(2203).Stream}catch(e){n=function(){}}if(!n)n=function(){};var i=e.EVENTS.filter((function(e){return e!=="error"&&e!=="end"}));function createStream(e,t){return new SAXStream(e,t)}function SAXStream(e,t){if(!(this instanceof SAXStream)){return new SAXStream(e,t)}n.apply(this);this._parser=new SAXParser(e,t);this.writable=true;this.readable=true;var r=this;this._parser.onend=function(){r.emit("end")};this._parser.onerror=function(e){r.emit("error",e);r._parser.error=null};this._decoder=null;i.forEach((function(e){Object.defineProperty(r,"on"+e,{get:function(){return r._parser["on"+e]},set:function(t){if(!t){r.removeAllListeners(e);r._parser["on"+e]=t;return t}r.on(e,t)},enumerable:true,configurable:false})}))}SAXStream.prototype=Object.create(n.prototype,{constructor:{value:SAXStream}});SAXStream.prototype.write=function(e){if(typeof Buffer==="function"&&typeof Buffer.isBuffer==="function"&&Buffer.isBuffer(e)){if(!this._decoder){var t=r(3193).StringDecoder;this._decoder=new t("utf8")}e=this._decoder.write(e)}this._parser.write(e.toString());this.emit("data",e);return true};SAXStream.prototype.end=function(e){if(e&&e.length){this.write(e)}this._parser.end();return true};SAXStream.prototype.on=function(e,t){var r=this;if(!r._parser["on"+e]&&i.indexOf(e)!==-1){r._parser["on"+e]=function(){var t=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e);r.emit.apply(r,t)}}return n.prototype.on.call(r,e,t)};var s="[CDATA[";var o="DOCTYPE";var a="http://www.w3.org/XML/1998/namespace";var u="http://www.w3.org/2000/xmlns/";var c={xml:a,xmlns:u};var l=/[:_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]/;var d=/[:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;var f=/[#:_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]/;var h=/[#:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function isWhitespace(e){return e===" "||e==="\n"||e==="\r"||e==="\t"}function isQuote(e){return e==='"'||e==="'"}function isAttribEnd(e){return e===">"||isWhitespace(e)}function isMatch(e,t){return e.test(t)}function notMatch(e,t){return!isMatch(e,t)}var p=0;e.STATE={BEGIN:p++,BEGIN_WHITESPACE:p++,TEXT:p++,TEXT_ENTITY:p++,OPEN_WAKA:p++,SGML_DECL:p++,SGML_DECL_QUOTED:p++,DOCTYPE:p++,DOCTYPE_QUOTED:p++,DOCTYPE_DTD:p++,DOCTYPE_DTD_QUOTED:p++,COMMENT_STARTING:p++,COMMENT:p++,COMMENT_ENDING:p++,COMMENT_ENDED:p++,CDATA:p++,CDATA_ENDING:p++,CDATA_ENDING_2:p++,PROC_INST:p++,PROC_INST_BODY:p++,PROC_INST_ENDING:p++,OPEN_TAG:p++,OPEN_TAG_SLASH:p++,ATTRIB:p++,ATTRIB_NAME:p++,ATTRIB_NAME_SAW_WHITE:p++,ATTRIB_VALUE:p++,ATTRIB_VALUE_QUOTED:p++,ATTRIB_VALUE_CLOSED:p++,ATTRIB_VALUE_UNQUOTED:p++,ATTRIB_VALUE_ENTITY_Q:p++,ATTRIB_VALUE_ENTITY_U:p++,CLOSE_TAG:p++,CLOSE_TAG_SAW_WHITE:p++,SCRIPT:p++,SCRIPT_ENDING:p++};e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"};e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830};Object.keys(e.ENTITIES).forEach((function(t){var r=e.ENTITIES[t];var n=typeof r==="number"?String.fromCharCode(r):r;e.ENTITIES[t]=n}));for(var m in e.STATE){e.STATE[e.STATE[m]]=m}p=e.STATE;function emit(e,t,r){e[t]&&e[t](r)}function emitNode(e,t,r){if(e.textNode)closeText(e);emit(e,t,r)}function closeText(e){e.textNode=textopts(e.opt,e.textNode);if(e.textNode)emit(e,"ontext",e.textNode);e.textNode=""}function textopts(e,t){if(e.trim)t=t.trim();if(e.normalize)t=t.replace(/\s+/g," ");return t}function error(e,t){closeText(e);if(e.trackPosition){t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c}t=new Error(t);e.error=t;emit(e,"onerror",t);return e}function end(e){if(e.sawRoot&&!e.closedRoot)strictFail(e,"Unclosed root tag");if(e.state!==p.BEGIN&&e.state!==p.BEGIN_WHITESPACE&&e.state!==p.TEXT){error(e,"Unexpected end")}closeText(e);e.c="";e.closed=true;emit(e,"onend");SAXParser.call(e,e.strict,e.opt);return e}function strictFail(e,t){if(typeof e!=="object"||!(e instanceof SAXParser)){throw new Error("bad call to strictFail")}if(e.strict){error(e,t)}}function newTag(e){if(!e.strict)e.tagName=e.tagName[e.looseCase]();var t=e.tags[e.tags.length-1]||e;var r=e.tag={name:e.tagName,attributes:{}};if(e.opt.xmlns){r.ns=t.ns}e.attribList.length=0;emitNode(e,"onopentagstart",r)}function qname(e,t){var r=e.indexOf(":");var n=r<0?["",e]:e.split(":");var i=n[0];var s=n[1];if(t&&e==="xmlns"){i="xmlns";s=""}return{prefix:i,local:s}}function attrib(e){if(!e.strict){e.attribName=e.attribName[e.looseCase]()}if(e.attribList.indexOf(e.attribName)!==-1||e.tag.attributes.hasOwnProperty(e.attribName)){e.attribName=e.attribValue="";return}if(e.opt.xmlns){var t=qname(e.attribName,true);var r=t.prefix;var n=t.local;if(r==="xmlns"){if(n==="xml"&&e.attribValue!==a){strictFail(e,"xml: prefix must be bound to "+a+"\n"+"Actual: "+e.attribValue)}else if(n==="xmlns"&&e.attribValue!==u){strictFail(e,"xmlns: prefix must be bound to "+u+"\n"+"Actual: "+e.attribValue)}else{var i=e.tag;var s=e.tags[e.tags.length-1]||e;if(i.ns===s.ns){i.ns=Object.create(s.ns)}i.ns[n]=e.attribValue}}e.attribList.push([e.attribName,e.attribValue])}else{e.tag.attributes[e.attribName]=e.attribValue;emitNode(e,"onattribute",{name:e.attribName,value:e.attribValue})}e.attribName=e.attribValue=""}function openTag(e,t){if(e.opt.xmlns){var r=e.tag;var n=qname(e.tagName);r.prefix=n.prefix;r.local=n.local;r.uri=r.ns[n.prefix]||"";if(r.prefix&&!r.uri){strictFail(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName));r.uri=n.prefix}var i=e.tags[e.tags.length-1]||e;if(r.ns&&i.ns!==r.ns){Object.keys(r.ns).forEach((function(t){emitNode(e,"onopennamespace",{prefix:t,uri:r.ns[t]})}))}for(var s=0,o=e.attribList.length;s<o;s++){var a=e.attribList[s];var u=a[0];var c=a[1];var l=qname(u,true);var d=l.prefix;var f=l.local;var h=d===""?"":r.ns[d]||"";var m={name:u,value:c,prefix:d,local:f,uri:h};if(d&&d!=="xmlns"&&!h){strictFail(e,"Unbound namespace prefix: "+JSON.stringify(d));m.uri=d}e.tag.attributes[u]=m;emitNode(e,"onattribute",m)}e.attribList.length=0}e.tag.isSelfClosing=!!t;e.sawRoot=true;e.tags.push(e.tag);emitNode(e,"onopentag",e.tag);if(!t){if(!e.noscript&&e.tagName.toLowerCase()==="script"){e.state=p.SCRIPT}else{e.state=p.TEXT}e.tag=null;e.tagName=""}e.attribName=e.attribValue="";e.attribList.length=0}function closeTag(e){if(!e.tagName){strictFail(e,"Weird empty close tag.");e.textNode+="</>";e.state=p.TEXT;return}if(e.script){if(e.tagName!=="script"){e.script+="</"+e.tagName+">";e.tagName="";e.state=p.SCRIPT;return}emitNode(e,"onscript",e.script);e.script=""}var t=e.tags.length;var r=e.tagName;if(!e.strict){r=r[e.looseCase]()}var n=r;while(t--){var i=e.tags[t];if(i.name!==n){strictFail(e,"Unexpected close tag")}else{break}}if(t<0){strictFail(e,"Unmatched closing tag: "+e.tagName);e.textNode+="</"+e.tagName+">";e.state=p.TEXT;return}e.tagName=r;var s=e.tags.length;while(s-- >t){var o=e.tag=e.tags.pop();e.tagName=e.tag.name;emitNode(e,"onclosetag",e.tagName);var a={};for(var u in o.ns){a[u]=o.ns[u]}var c=e.tags[e.tags.length-1]||e;if(e.opt.xmlns&&o.ns!==c.ns){Object.keys(o.ns).forEach((function(t){var r=o.ns[t];emitNode(e,"onclosenamespace",{prefix:t,uri:r})}))}}if(t===0)e.closedRoot=true;e.tagName=e.attribValue=e.attribName="";e.attribList.length=0;e.state=p.TEXT}function parseEntity(e){var t=e.entity;var r=t.toLowerCase();var n;var i="";if(e.ENTITIES[t]){return e.ENTITIES[t]}if(e.ENTITIES[r]){return e.ENTITIES[r]}t=r;if(t.charAt(0)==="#"){if(t.charAt(1)==="x"){t=t.slice(2);n=parseInt(t,16);i=n.toString(16)}else{t=t.slice(1);n=parseInt(t,10);i=n.toString(10)}}t=t.replace(/^0+/,"");if(isNaN(n)||i.toLowerCase()!==t){strictFail(e,"Invalid character entity");return"&"+e.entity+";"}return String.fromCodePoint(n)}function beginWhiteSpace(e,t){if(t==="<"){e.state=p.OPEN_WAKA;e.startTagPosition=e.position}else if(!isWhitespace(t)){strictFail(e,"Non-whitespace before first tag.");e.textNode=t;e.state=p.TEXT}}function charAt(e,t){var r="";if(t<e.length){r=e.charAt(t)}return r}function write(t){var r=this;if(this.error){throw this.error}if(r.closed){return error(r,"Cannot write after close. Assign an onready handler.")}if(t===null){return end(r)}if(typeof t==="object"){t=t.toString()}var n=0;var i="";while(true){i=charAt(t,n++);r.c=i;if(!i){break}if(r.trackPosition){r.position++;if(i==="\n"){r.line++;r.column=0}else{r.column++}}switch(r.state){case p.BEGIN:r.state=p.BEGIN_WHITESPACE;if(i==="\ufeff"){continue}beginWhiteSpace(r,i);continue;case p.BEGIN_WHITESPACE:beginWhiteSpace(r,i);continue;case p.TEXT:if(r.sawRoot&&!r.closedRoot){var a=n-1;while(i&&i!=="<"&&i!=="&"){i=charAt(t,n++);if(i&&r.trackPosition){r.position++;if(i==="\n"){r.line++;r.column=0}else{r.column++}}}r.textNode+=t.substring(a,n-1)}if(i==="<"&&!(r.sawRoot&&r.closedRoot&&!r.strict)){r.state=p.OPEN_WAKA;r.startTagPosition=r.position}else{if(!isWhitespace(i)&&(!r.sawRoot||r.closedRoot)){strictFail(r,"Text data outside of root node.")}if(i==="&"){r.state=p.TEXT_ENTITY}else{r.textNode+=i}}continue;case p.SCRIPT:if(i==="<"){r.state=p.SCRIPT_ENDING}else{r.script+=i}continue;case p.SCRIPT_ENDING:if(i==="/"){r.state=p.CLOSE_TAG}else{r.script+="<"+i;r.state=p.SCRIPT}continue;case p.OPEN_WAKA:if(i==="!"){r.state=p.SGML_DECL;r.sgmlDecl=""}else if(isWhitespace(i)){}else if(isMatch(l,i)){r.state=p.OPEN_TAG;r.tagName=i}else if(i==="/"){r.state=p.CLOSE_TAG;r.tagName=""}else if(i==="?"){r.state=p.PROC_INST;r.procInstName=r.procInstBody=""}else{strictFail(r,"Unencoded <");if(r.startTagPosition+1<r.position){var u=r.position-r.startTagPosition;i=new Array(u).join(" ")+i}r.textNode+="<"+i;r.state=p.TEXT}continue;case p.SGML_DECL:if(r.sgmlDecl+i==="--"){r.state=p.COMMENT;r.comment="";r.sgmlDecl="";continue}if(r.doctype&&r.doctype!==true&&r.sgmlDecl){r.state=p.DOCTYPE_DTD;r.doctype+="<!"+r.sgmlDecl+i;r.sgmlDecl=""}else if((r.sgmlDecl+i).toUpperCase()===s){emitNode(r,"onopencdata");r.state=p.CDATA;r.sgmlDecl="";r.cdata=""}else if((r.sgmlDecl+i).toUpperCase()===o){r.state=p.DOCTYPE;if(r.doctype||r.sawRoot){strictFail(r,"Inappropriately located doctype declaration")}r.doctype="";r.sgmlDecl=""}else if(i===">"){emitNode(r,"onsgmldeclaration",r.sgmlDecl);r.sgmlDecl="";r.state=p.TEXT}else if(isQuote(i)){r.state=p.SGML_DECL_QUOTED;r.sgmlDecl+=i}else{r.sgmlDecl+=i}continue;case p.SGML_DECL_QUOTED:if(i===r.q){r.state=p.SGML_DECL;r.q=""}r.sgmlDecl+=i;continue;case p.DOCTYPE:if(i===">"){r.state=p.TEXT;emitNode(r,"ondoctype",r.doctype);r.doctype=true}else{r.doctype+=i;if(i==="["){r.state=p.DOCTYPE_DTD}else if(isQuote(i)){r.state=p.DOCTYPE_QUOTED;r.q=i}}continue;case p.DOCTYPE_QUOTED:r.doctype+=i;if(i===r.q){r.q="";r.state=p.DOCTYPE}continue;case p.DOCTYPE_DTD:if(i==="]"){r.doctype+=i;r.state=p.DOCTYPE}else if(i==="<"){r.state=p.OPEN_WAKA;r.startTagPosition=r.position}else if(isQuote(i)){r.doctype+=i;r.state=p.DOCTYPE_DTD_QUOTED;r.q=i}else{r.doctype+=i}continue;case p.DOCTYPE_DTD_QUOTED:r.doctype+=i;if(i===r.q){r.state=p.DOCTYPE_DTD;r.q=""}continue;case p.COMMENT:if(i==="-"){r.state=p.COMMENT_ENDING}else{r.comment+=i}continue;case p.COMMENT_ENDING:if(i==="-"){r.state=p.COMMENT_ENDED;r.comment=textopts(r.opt,r.comment);if(r.comment){emitNode(r,"oncomment",r.comment)}r.comment=""}else{r.comment+="-"+i;r.state=p.COMMENT}continue;case p.COMMENT_ENDED:if(i!==">"){strictFail(r,"Malformed comment");r.comment+="--"+i;r.state=p.COMMENT}else if(r.doctype&&r.doctype!==true){r.state=p.DOCTYPE_DTD}else{r.state=p.TEXT}continue;case p.CDATA:if(i==="]"){r.state=p.CDATA_ENDING}else{r.cdata+=i}continue;case p.CDATA_ENDING:if(i==="]"){r.state=p.CDATA_ENDING_2}else{r.cdata+="]"+i;r.state=p.CDATA}continue;case p.CDATA_ENDING_2:if(i===">"){if(r.cdata){emitNode(r,"oncdata",r.cdata)}emitNode(r,"onclosecdata");r.cdata="";r.state=p.TEXT}else if(i==="]"){r.cdata+="]"}else{r.cdata+="]]"+i;r.state=p.CDATA}continue;case p.PROC_INST:if(i==="?"){r.state=p.PROC_INST_ENDING}else if(isWhitespace(i)){r.state=p.PROC_INST_BODY}else{r.procInstName+=i}continue;case p.PROC_INST_BODY:if(!r.procInstBody&&isWhitespace(i)){continue}else if(i==="?"){r.state=p.PROC_INST_ENDING}else{r.procInstBody+=i}continue;case p.PROC_INST_ENDING:if(i===">"){emitNode(r,"onprocessinginstruction",{name:r.procInstName,body:r.procInstBody});r.procInstName=r.procInstBody="";r.state=p.TEXT}else{r.procInstBody+="?"+i;r.state=p.PROC_INST_BODY}continue;case p.OPEN_TAG:if(isMatch(d,i)){r.tagName+=i}else{newTag(r);if(i===">"){openTag(r)}else if(i==="/"){r.state=p.OPEN_TAG_SLASH}else{if(!isWhitespace(i)){strictFail(r,"Invalid character in tag name")}r.state=p.ATTRIB}}continue;case p.OPEN_TAG_SLASH:if(i===">"){openTag(r,true);closeTag(r)}else{strictFail(r,"Forward-slash in opening tag not followed by >");r.state=p.ATTRIB}continue;case p.ATTRIB:if(isWhitespace(i)){continue}else if(i===">"){openTag(r)}else if(i==="/"){r.state=p.OPEN_TAG_SLASH}else if(isMatch(l,i)){r.attribName=i;r.attribValue="";r.state=p.ATTRIB_NAME}else{strictFail(r,"Invalid attribute name")}continue;case p.ATTRIB_NAME:if(i==="="){r.state=p.ATTRIB_VALUE}else if(i===">"){strictFail(r,"Attribute without value");r.attribValue=r.attribName;attrib(r);openTag(r)}else if(isWhitespace(i)){r.state=p.ATTRIB_NAME_SAW_WHITE}else if(isMatch(d,i)){r.attribName+=i}else{strictFail(r,"Invalid attribute name")}continue;case p.ATTRIB_NAME_SAW_WHITE:if(i==="="){r.state=p.ATTRIB_VALUE}else if(isWhitespace(i)){continue}else{strictFail(r,"Attribute without value");r.tag.attributes[r.attribName]="";r.attribValue="";emitNode(r,"onattribute",{name:r.attribName,value:""});r.attribName="";if(i===">"){openTag(r)}else if(isMatch(l,i)){r.attribName=i;r.state=p.ATTRIB_NAME}else{strictFail(r,"Invalid attribute name");r.state=p.ATTRIB}}continue;case p.ATTRIB_VALUE:if(isWhitespace(i)){continue}else if(isQuote(i)){r.q=i;r.state=p.ATTRIB_VALUE_QUOTED}else{if(!r.opt.unquotedAttributeValues){error(r,"Unquoted attribute value")}r.state=p.ATTRIB_VALUE_UNQUOTED;r.attribValue=i}continue;case p.ATTRIB_VALUE_QUOTED:if(i!==r.q){if(i==="&"){r.state=p.ATTRIB_VALUE_ENTITY_Q}else{r.attribValue+=i}continue}attrib(r);r.q="";r.state=p.ATTRIB_VALUE_CLOSED;continue;case p.ATTRIB_VALUE_CLOSED:if(isWhitespace(i)){r.state=p.ATTRIB}else if(i===">"){openTag(r)}else if(i==="/"){r.state=p.OPEN_TAG_SLASH}else if(isMatch(l,i)){strictFail(r,"No whitespace between attributes");r.attribName=i;r.attribValue="";r.state=p.ATTRIB_NAME}else{strictFail(r,"Invalid attribute name")}continue;case p.ATTRIB_VALUE_UNQUOTED:if(!isAttribEnd(i)){if(i==="&"){r.state=p.ATTRIB_VALUE_ENTITY_U}else{r.attribValue+=i}continue}attrib(r);if(i===">"){openTag(r)}else{r.state=p.ATTRIB}continue;case p.CLOSE_TAG:if(!r.tagName){if(isWhitespace(i)){continue}else if(notMatch(l,i)){if(r.script){r.script+="</"+i;r.state=p.SCRIPT}else{strictFail(r,"Invalid tagname in closing tag.")}}else{r.tagName=i}}else if(i===">"){closeTag(r)}else if(isMatch(d,i)){r.tagName+=i}else if(r.script){r.script+="</"+r.tagName;r.tagName="";r.state=p.SCRIPT}else{if(!isWhitespace(i)){strictFail(r,"Invalid tagname in closing tag")}r.state=p.CLOSE_TAG_SAW_WHITE}continue;case p.CLOSE_TAG_SAW_WHITE:if(isWhitespace(i)){continue}if(i===">"){closeTag(r)}else{strictFail(r,"Invalid characters in closing tag")}continue;case p.TEXT_ENTITY:case p.ATTRIB_VALUE_ENTITY_Q:case p.ATTRIB_VALUE_ENTITY_U:var c;var m;switch(r.state){case p.TEXT_ENTITY:c=p.TEXT;m="textNode";break;case p.ATTRIB_VALUE_ENTITY_Q:c=p.ATTRIB_VALUE_QUOTED;m="attribValue";break;case p.ATTRIB_VALUE_ENTITY_U:c=p.ATTRIB_VALUE_UNQUOTED;m="attribValue";break}if(i===";"){var y=parseEntity(r);if(r.opt.unparsedEntities&&!Object.values(e.XML_ENTITIES).includes(y)){r.entity="";r.state=c;r.write(y)}else{r[m]+=y;r.entity="";r.state=c}}else if(isMatch(r.entity.length?h:f,i)){r.entity+=i}else{strictFail(r,"Invalid character in entity name");r[m]+="&"+r.entity+i;r.entity="";r.state=c}continue;default:{throw new Error(r,"Unknown state: "+r.state)}}}if(r.position>=r.bufferCheckPosition){checkBufferLength(r)}return r}
|
|
10
|
+
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint){(function(){var e=String.fromCharCode;var t=Math.floor;var fromCodePoint=function(){var r=16384;var n=[];var i;var s;var o=-1;var a=arguments.length;if(!a){return""}var u="";while(++o<a){var c=Number(arguments[o]);if(!isFinite(c)||c<0||c>1114111||t(c)!==c){throw RangeError("Invalid code point: "+c)}if(c<=65535){n.push(c)}else{c-=65536;i=(c>>10)+55296;s=c%1024+56320;n.push(i,s)}if(o+1===a||n.length>r){u+=e.apply(null,n);n.length=0}}return u};if(Object.defineProperty){Object.defineProperty(String,"fromCodePoint",{value:fromCodePoint,configurable:true,writable:true})}else{String.fromCodePoint=fromCodePoint}})()}})(false?0:t)},5414:function(e,t,r){"use strict";const n=r(857);const i=r(2871);const s=process.env;let o;if(i("no-color")||i("no-colors")||i("color=false")){o=false}else if(i("color")||i("colors")||i("color=true")||i("color=always")){o=true}if("FORCE_COLOR"in s){o=s.FORCE_COLOR.length===0||parseInt(s.FORCE_COLOR,10)!==0}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e){if(o===false){return 0}if(i("color=16m")||i("color=full")||i("color=truecolor")){return 3}if(i("color=256")){return 2}if(e&&!e.isTTY&&o!==true){return 0}const t=o?1:0;if(process.platform==="win32"){const e=n.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in s){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in s))||s.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in s){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0}if(s.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in s){const e=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(s.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)){return 1}if("COLORTERM"in s){return 1}if(s.TERM==="dumb"){return t}return t}function getSupportLevel(e){const t=supportsColor(e);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},452:function(e,t){(function(){"use strict";t.stripBOM=function(e){if(e[0]==="\ufeff"){return e.substring(1)}else{return e}}}).call(this)},8937:function(e,t,r){(function(){"use strict";var e,n,i,s,o,a={}.hasOwnProperty;e=r(1203);n=r(5706).defaults;s=function(e){return typeof e==="string"&&(e.indexOf("&")>=0||e.indexOf(">")>=0||e.indexOf("<")>=0)};o=function(e){return"<![CDATA["+i(e)+"]]>"};i=function(e){return e.replace("]]>","]]]]><![CDATA[>")};t.Builder=function(){function Builder(e){var t,r,i;this.options={};r=n["0.2"];for(t in r){if(!a.call(r,t))continue;i=r[t];this.options[t]=i}for(t in e){if(!a.call(e,t))continue;i=e[t];this.options[t]=i}}Builder.prototype.buildObject=function(t){var r,i,u,c,l;r=this.options.attrkey;i=this.options.charkey;if(Object.keys(t).length===1&&this.options.rootName===n["0.2"].rootName){l=Object.keys(t)[0];t=t[l]}else{l=this.options.rootName}u=function(e){return function(t,n){var c,l,d,f,h,p;if(typeof n!=="object"){if(e.options.cdata&&s(n)){t.raw(o(n))}else{t.txt(n)}}else if(Array.isArray(n)){for(f in n){if(!a.call(n,f))continue;l=n[f];for(h in l){d=l[h];t=u(t.ele(h),d).up()}}}else{for(h in n){if(!a.call(n,h))continue;l=n[h];if(h===r){if(typeof l==="object"){for(c in l){p=l[c];t=t.att(c,p)}}}else if(h===i){if(e.options.cdata&&s(l)){t=t.raw(o(l))}else{t=t.txt(l)}}else if(Array.isArray(l)){for(f in l){if(!a.call(l,f))continue;d=l[f];if(typeof d==="string"){if(e.options.cdata&&s(d)){t=t.ele(h).raw(o(d)).up()}else{t=t.ele(h,d).up()}}else{t=u(t.ele(h),d).up()}}}else if(typeof l==="object"){t=u(t.ele(h),l).up()}else{if(typeof l==="string"&&e.options.cdata&&s(l)){t=t.ele(h).raw(o(l)).up()}else{if(l==null){l=""}t=t.ele(h,l.toString()).up()}}}}return t}}(this);c=e.create(l,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars});return u(c,t).end(this.options.renderOpts)};return Builder}()}).call(this)},5706:function(e,t){(function(){t.defaults={.1:{explicitCharkey:false,trim:true,normalize:true,normalizeTags:false,attrkey:"@",charkey:"#",explicitArray:false,ignoreAttrs:false,mergeAttrs:false,explicitRoot:false,validator:null,xmlns:false,explicitChildren:false,childkey:"@@",charsAsChildren:false,includeWhiteChars:false,async:false,strict:true,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:false,trim:false,normalize:false,normalizeTags:false,attrkey:"$",charkey:"_",explicitArray:true,ignoreAttrs:false,mergeAttrs:false,explicitRoot:true,validator:null,xmlns:false,explicitChildren:false,preserveChildrenOrder:false,childkey:"$$",charsAsChildren:false,includeWhiteChars:false,async:false,strict:true,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:true},doctype:null,renderOpts:{pretty:true,indent:" ",newline:"\n"},headless:false,chunkSize:1e4,emptyTag:"",cdata:false}}}).call(this)},6343:function(e,t,r){(function(){"use strict";var e,n,i,s,o,a,u,c,l,bind=function(e,t){return function(){return e.apply(t,arguments)}},extend=function(e,t){for(var r in t){if(d.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},d={}.hasOwnProperty;c=r(6426);s=r(4434);e=r(452);u=r(9193);l=r(3557).setImmediate;n=r(5706).defaults;o=function(e){return typeof e==="object"&&e!=null&&Object.keys(e).length===0};a=function(e,t,r){var n,i,s;for(n=0,i=e.length;n<i;n++){s=e[n];t=s(t,r)}return t};i=function(e,t,r){var n;n=Object.create(null);n.value=r;n.writable=true;n.enumerable=true;n.configurable=true;return Object.defineProperty(e,t,n)};t.Parser=function(r){extend(Parser,r);function Parser(e){this.parseStringPromise=bind(this.parseStringPromise,this);this.parseString=bind(this.parseString,this);this.reset=bind(this.reset,this);this.assignOrPush=bind(this.assignOrPush,this);this.processAsync=bind(this.processAsync,this);var r,i,s;if(!(this instanceof t.Parser)){return new t.Parser(e)}this.options={};i=n["0.2"];for(r in i){if(!d.call(i,r))continue;s=i[r];this.options[r]=s}for(r in e){if(!d.call(e,r))continue;s=e[r];this.options[r]=s}if(this.options.xmlns){this.options.xmlnskey=this.options.attrkey+"ns"}if(this.options.normalizeTags){if(!this.options.tagNameProcessors){this.options.tagNameProcessors=[]}this.options.tagNameProcessors.unshift(u.normalize)}this.reset()}Parser.prototype.processAsync=function(){var e,t;try{if(this.remaining.length<=this.options.chunkSize){e=this.remaining;this.remaining="";this.saxParser=this.saxParser.write(e);return this.saxParser.close()}else{e=this.remaining.substr(0,this.options.chunkSize);this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length);this.saxParser=this.saxParser.write(e);return l(this.processAsync)}}catch(e){t=e;if(!this.saxParser.errThrown){this.saxParser.errThrown=true;return this.emit(t)}}};Parser.prototype.assignOrPush=function(e,t,r){if(!(t in e)){if(!this.options.explicitArray){return i(e,t,r)}else{return i(e,t,[r])}}else{if(!(e[t]instanceof Array)){i(e,t,[e[t]])}return e[t].push(r)}};Parser.prototype.reset=function(){var e,t,r,n;this.removeAllListeners();this.saxParser=c.parser(this.options.strict,{trim:false,normalize:false,xmlns:this.options.xmlns});this.saxParser.errThrown=false;this.saxParser.onerror=function(e){return function(t){e.saxParser.resume();if(!e.saxParser.errThrown){e.saxParser.errThrown=true;return e.emit("error",t)}}}(this);this.saxParser.onend=function(e){return function(){if(!e.saxParser.ended){e.saxParser.ended=true;return e.emit("end",e.resultObject)}}}(this);this.saxParser.ended=false;this.EXPLICIT_CHARKEY=this.options.explicitCharkey;this.resultObject=null;n=[];e=this.options.attrkey;t=this.options.charkey;this.saxParser.onopentag=function(r){return function(s){var o,u,c,l,f;c={};c[t]="";if(!r.options.ignoreAttrs){f=s.attributes;for(o in f){if(!d.call(f,o))continue;if(!(e in c)&&!r.options.mergeAttrs){c[e]={}}u=r.options.attrValueProcessors?a(r.options.attrValueProcessors,s.attributes[o],o):s.attributes[o];l=r.options.attrNameProcessors?a(r.options.attrNameProcessors,o):o;if(r.options.mergeAttrs){r.assignOrPush(c,l,u)}else{i(c[e],l,u)}}}c["#name"]=r.options.tagNameProcessors?a(r.options.tagNameProcessors,s.name):s.name;if(r.options.xmlns){c[r.options.xmlnskey]={uri:s.uri,local:s.local}}return n.push(c)}}(this);this.saxParser.onclosetag=function(e){return function(){var r,s,u,c,l,f,h,p,m,y;f=n.pop();l=f["#name"];if(!e.options.explicitChildren||!e.options.preserveChildrenOrder){delete f["#name"]}if(f.cdata===true){r=f.cdata;delete f.cdata}m=n[n.length-1];if(f[t].match(/^\s*$/)&&!r){s=f[t];delete f[t]}else{if(e.options.trim){f[t]=f[t].trim()}if(e.options.normalize){f[t]=f[t].replace(/\s{2,}/g," ").trim()}f[t]=e.options.valueProcessors?a(e.options.valueProcessors,f[t],l):f[t];if(Object.keys(f).length===1&&t in f&&!e.EXPLICIT_CHARKEY){f=f[t]}}if(o(f)){if(typeof e.options.emptyTag==="function"){f=e.options.emptyTag()}else{f=e.options.emptyTag!==""?e.options.emptyTag:s}}if(e.options.validator!=null){y="/"+function(){var e,t,r;r=[];for(e=0,t=n.length;e<t;e++){c=n[e];r.push(c["#name"])}return r}().concat(l).join("/");(function(){var t;try{return f=e.options.validator(y,m&&m[l],f)}catch(r){t=r;return e.emit("error",t)}})()}if(e.options.explicitChildren&&!e.options.mergeAttrs&&typeof f==="object"){if(!e.options.preserveChildrenOrder){c={};if(e.options.attrkey in f){c[e.options.attrkey]=f[e.options.attrkey];delete f[e.options.attrkey]}if(!e.options.charsAsChildren&&e.options.charkey in f){c[e.options.charkey]=f[e.options.charkey];delete f[e.options.charkey]}if(Object.getOwnPropertyNames(f).length>0){c[e.options.childkey]=f}f=c}else if(m){m[e.options.childkey]=m[e.options.childkey]||[];h={};for(u in f){if(!d.call(f,u))continue;i(h,u,f[u])}m[e.options.childkey].push(h);delete f["#name"];if(Object.keys(f).length===1&&t in f&&!e.EXPLICIT_CHARKEY){f=f[t]}}}if(n.length>0){return e.assignOrPush(m,l,f)}else{if(e.options.explicitRoot){p=f;f={};i(f,l,p)}e.resultObject=f;e.saxParser.ended=true;return e.emit("end",e.resultObject)}}}(this);r=function(e){return function(r){var i,s;s=n[n.length-1];if(s){s[t]+=r;if(e.options.explicitChildren&&e.options.preserveChildrenOrder&&e.options.charsAsChildren&&(e.options.includeWhiteChars||r.replace(/\\n/g,"").trim()!=="")){s[e.options.childkey]=s[e.options.childkey]||[];i={"#name":"__text__"};i[t]=r;if(e.options.normalize){i[t]=i[t].replace(/\s{2,}/g," ").trim()}s[e.options.childkey].push(i)}return s}}}(this);this.saxParser.ontext=r;return this.saxParser.oncdata=function(e){return function(e){var t;t=r(e);if(t){return t.cdata=true}}}(this)};Parser.prototype.parseString=function(t,r){var n;if(r!=null&&typeof r==="function"){this.on("end",(function(e){this.reset();return r(null,e)}));this.on("error",(function(e){this.reset();return r(e)}))}try{t=t.toString();if(t.trim()===""){this.emit("end",null);return true}t=e.stripBOM(t);if(this.options.async){this.remaining=t;l(this.processAsync);return this.saxParser}return this.saxParser.write(t).close()}catch(e){n=e;if(!(this.saxParser.errThrown||this.saxParser.ended)){this.emit("error",n);return this.saxParser.errThrown=true}else if(this.saxParser.ended){throw n}}};Parser.prototype.parseStringPromise=function(e){return new Promise(function(t){return function(r,n){return t.parseString(e,(function(e,t){if(e){return n(e)}else{return r(t)}}))}}(this))};return Parser}(s);t.parseString=function(e,r,n){var i,s,o;if(n!=null){if(typeof n==="function"){i=n}if(typeof r==="object"){s=r}}else{if(typeof r==="function"){i=r}s={}}o=new t.Parser(s);return o.parseString(e,i)};t.parseStringPromise=function(e,r){var n,i;if(typeof r==="object"){n=r}i=new t.Parser(n);return i.parseStringPromise(e)}}).call(this)},9193:function(e,t){(function(){"use strict";var e;e=new RegExp(/(?!xmlns)^.*:/);t.normalize=function(e){return e.toLowerCase()};t.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)};t.stripPrefix=function(t){return t.replace(e,"")};t.parseNumbers=function(e){if(!isNaN(e)){e=e%1===0?parseInt(e,10):parseFloat(e)}return e};t.parseBooleans=function(e){if(/^(?:true|false)$/i.test(e)){e=e.toLowerCase()==="true"}return e}}).call(this)},3362:function(e,t,r){(function(){"use strict";var e,n,i,s,extend=function(e,t){for(var r in t){if(o.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},o={}.hasOwnProperty;n=r(5706);e=r(8937);i=r(6343);s=r(9193);t.defaults=n.defaults;t.processors=s;t.ValidationError=function(e){extend(ValidationError,e);function ValidationError(e){this.message=e}return ValidationError}(Error);t.Builder=e.Builder;t.Parser=i.Parser;t.parseString=i.parseString;t.parseStringPromise=i.parseStringPromise}).call(this)},5921:function(e){(function(){e.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},1259:function(e){(function(){e.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},7871:function(e){(function(){var t,r,n,i,s,o,a,u=[].slice,c={}.hasOwnProperty;t=function(){var e,t,r,n,i,o;o=arguments[0],i=2<=arguments.length?u.call(arguments,1):[];if(s(Object.assign)){Object.assign.apply(null,arguments)}else{for(e=0,r=i.length;e<r;e++){n=i[e];if(n!=null){for(t in n){if(!c.call(n,t))continue;o[t]=n[t]}}}}return o};s=function(e){return!!e&&Object.prototype.toString.call(e)==="[object Function]"};o=function(e){var t;return!!e&&((t=typeof e)==="function"||t==="object")};n=function(e){if(s(Array.isArray)){return Array.isArray(e)}else{return Object.prototype.toString.call(e)==="[object Array]"}};i=function(e){var t;if(n(e)){return!e.length}else{for(t in e){if(!c.call(e,t))continue;return false}return true}};a=function(e){var t,r;return o(e)&&(r=Object.getPrototypeOf(e))&&(t=r.constructor)&&typeof t==="function"&&t instanceof t&&Function.prototype.toString.call(t)===Function.prototype.toString.call(Object)};r=function(e){if(s(e.valueOf)){return e.valueOf()}else{return e}};e.exports.assign=t;e.exports.isFunction=s;e.exports.isObject=o;e.exports.isArray=n;e.exports.isEmpty=i;e.exports.isPlainObject=a;e.exports.getValue=r}).call(this)},5471:function(e){(function(){e.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},5696:function(e,t,r){(function(){var t,n,i;t=r(1259);i=r(7730);e.exports=n=function(){function XMLAttribute(e,r,n){this.parent=e;if(this.parent){this.options=this.parent.options;this.stringify=this.parent.stringify}if(r==null){throw new Error("Missing attribute name. "+this.debugInfo(r))}this.name=this.stringify.name(r);this.value=this.stringify.attValue(n);this.type=t.Attribute;this.isId=false;this.schemaTypeInfo=null}Object.defineProperty(XMLAttribute.prototype,"nodeType",{get:function(){return this.type}});Object.defineProperty(XMLAttribute.prototype,"ownerElement",{get:function(){return this.parent}});Object.defineProperty(XMLAttribute.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}});Object.defineProperty(XMLAttribute.prototype,"namespaceURI",{get:function(){return""}});Object.defineProperty(XMLAttribute.prototype,"prefix",{get:function(){return""}});Object.defineProperty(XMLAttribute.prototype,"localName",{get:function(){return this.name}});Object.defineProperty(XMLAttribute.prototype,"specified",{get:function(){return true}});XMLAttribute.prototype.clone=function(){return Object.create(this)};XMLAttribute.prototype.toString=function(e){return this.options.writer.attribute(this,this.options.writer.filterOptions(e))};XMLAttribute.prototype.debugInfo=function(e){e=e||this.name;if(e==null){return"parent: <"+this.parent.name+">"}else{return"attribute: {"+e+"}, parent: <"+this.parent.name+">"}};XMLAttribute.prototype.isEqualNode=function(e){if(e.namespaceURI!==this.namespaceURI){return false}if(e.prefix!==this.prefix){return false}if(e.localName!==this.localName){return false}if(e.value!==this.value){return false}return true};return XMLAttribute}()}).call(this)},3705:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;t=r(1259);i=r(8363);e.exports=n=function(e){extend(XMLCData,e);function XMLCData(e,r){XMLCData.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing CDATA text. "+this.debugInfo())}this.name="#cdata-section";this.type=t.CData;this.value=this.stringify.cdata(r)}XMLCData.prototype.clone=function(){return Object.create(this)};XMLCData.prototype.toString=function(e){return this.options.writer.cdata(this,this.options.writer.filterOptions(e))};return XMLCData}(i)}).call(this)},8363:function(e,t,r){(function(){var t,n,extend=function(e,t){for(var r in t){if(i.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},i={}.hasOwnProperty;n=r(7730);e.exports=t=function(e){extend(XMLCharacterData,e);function XMLCharacterData(e){XMLCharacterData.__super__.constructor.call(this,e);this.value=""}Object.defineProperty(XMLCharacterData.prototype,"data",{get:function(){return this.value},set:function(e){return this.value=e||""}});Object.defineProperty(XMLCharacterData.prototype,"length",{get:function(){return this.value.length}});Object.defineProperty(XMLCharacterData.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}});XMLCharacterData.prototype.clone=function(){return Object.create(this)};XMLCharacterData.prototype.substringData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.appendData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.insertData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.deleteData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.replaceData=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLCharacterData.prototype.isEqualNode=function(e){if(!XMLCharacterData.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)){return false}if(e.data!==this.data){return false}return true};return XMLCharacterData}(n)}).call(this)},9677:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;t=r(1259);n=r(8363);e.exports=i=function(e){extend(XMLComment,e);function XMLComment(e,r){XMLComment.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing comment text. "+this.debugInfo())}this.name="#comment";this.type=t.Comment;this.value=this.stringify.comment(r)}XMLComment.prototype.clone=function(){return Object.create(this)};XMLComment.prototype.toString=function(e){return this.options.writer.comment(this,this.options.writer.filterOptions(e))};return XMLComment}(n)}).call(this)},6463:function(e,t,r){(function(){var t,n,i;n=r(4426);i=r(4545);e.exports=t=function(){function XMLDOMConfiguration(){var e;this.defaultParams={"canonical-form":false,"cdata-sections":false,comments:false,"datatype-normalization":false,"element-content-whitespace":true,entities:true,"error-handler":new n,infoset:true,"validate-if-schema":false,namespaces:true,"namespace-declarations":true,"normalize-characters":false,"schema-location":"","schema-type":"","split-cdata-sections":true,validate:false,"well-formed":true};this.params=e=Object.create(this.defaultParams)}Object.defineProperty(XMLDOMConfiguration.prototype,"parameterNames",{get:function(){return new i(Object.keys(this.defaultParams))}});XMLDOMConfiguration.prototype.getParameter=function(e){if(this.params.hasOwnProperty(e)){return this.params[e]}else{return null}};XMLDOMConfiguration.prototype.canSetParameter=function(e,t){return true};XMLDOMConfiguration.prototype.setParameter=function(e,t){if(t!=null){return this.params[e]=t}else{return delete this.params[e]}};return XMLDOMConfiguration}()}).call(this)},4426:function(e){(function(){var t;e.exports=t=function(){function XMLDOMErrorHandler(){}XMLDOMErrorHandler.prototype.handleError=function(e){throw new Error(e)};return XMLDOMErrorHandler}()}).call(this)},1926:function(e){(function(){var t;e.exports=t=function(){function XMLDOMImplementation(){}XMLDOMImplementation.prototype.hasFeature=function(e,t){return true};XMLDOMImplementation.prototype.createDocumentType=function(e,t,r){throw new Error("This DOM method is not implemented.")};XMLDOMImplementation.prototype.createDocument=function(e,t,r){throw new Error("This DOM method is not implemented.")};XMLDOMImplementation.prototype.createHTMLDocument=function(e){throw new Error("This DOM method is not implemented.")};XMLDOMImplementation.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented.")};return XMLDOMImplementation}()}).call(this)},4545:function(e){(function(){var t;e.exports=t=function(){function XMLDOMStringList(e){this.arr=e||[]}Object.defineProperty(XMLDOMStringList.prototype,"length",{get:function(){return this.arr.length}});XMLDOMStringList.prototype.item=function(e){return this.arr[e]||null};XMLDOMStringList.prototype.contains=function(e){return this.arr.indexOf(e)!==-1};return XMLDOMStringList}()}).call(this)},5145:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;i=r(7730);t=r(1259);e.exports=n=function(e){extend(XMLDTDAttList,e);function XMLDTDAttList(e,r,n,i,s,o){XMLDTDAttList.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(n==null){throw new Error("Missing DTD attribute name. "+this.debugInfo(r))}if(!i){throw new Error("Missing DTD attribute type. "+this.debugInfo(r))}if(!s){throw new Error("Missing DTD attribute default. "+this.debugInfo(r))}if(s.indexOf("#")!==0){s="#"+s}if(!s.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)){throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(r))}if(o&&!s.match(/^(#FIXED|#DEFAULT)$/)){throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(r))}this.elementName=this.stringify.name(r);this.type=t.AttributeDeclaration;this.attributeName=this.stringify.name(n);this.attributeType=this.stringify.dtdAttType(i);if(o){this.defaultValue=this.stringify.dtdAttDefault(o)}this.defaultValueType=s}XMLDTDAttList.prototype.toString=function(e){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(e))};return XMLDTDAttList}(i)}).call(this)},362:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;i=r(7730);t=r(1259);e.exports=n=function(e){extend(XMLDTDElement,e);function XMLDTDElement(e,r,n){XMLDTDElement.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing DTD element name. "+this.debugInfo())}if(!n){n="(#PCDATA)"}if(Array.isArray(n)){n="("+n.join(",")+")"}this.name=this.stringify.name(r);this.type=t.ElementDeclaration;this.value=this.stringify.dtdElementValue(n)}XMLDTDElement.prototype.toString=function(e){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(e))};return XMLDTDElement}(i)}).call(this)},7847:function(e,t,r){(function(){var t,n,i,s,extend=function(e,t){for(var r in t){if(o.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},o={}.hasOwnProperty;s=r(7871).isObject;i=r(7730);t=r(1259);e.exports=n=function(e){extend(XMLDTDEntity,e);function XMLDTDEntity(e,r,n,i){XMLDTDEntity.__super__.constructor.call(this,e);if(n==null){throw new Error("Missing DTD entity name. "+this.debugInfo(n))}if(i==null){throw new Error("Missing DTD entity value. "+this.debugInfo(n))}this.pe=!!r;this.name=this.stringify.name(n);this.type=t.EntityDeclaration;if(!s(i)){this.value=this.stringify.dtdEntityValue(i);this.internal=true}else{if(!i.pubID&&!i.sysID){throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(n))}if(i.pubID&&!i.sysID){throw new Error("System identifier is required for a public external entity. "+this.debugInfo(n))}this.internal=false;if(i.pubID!=null){this.pubID=this.stringify.dtdPubID(i.pubID)}if(i.sysID!=null){this.sysID=this.stringify.dtdSysID(i.sysID)}if(i.nData!=null){this.nData=this.stringify.dtdNData(i.nData)}if(this.pe&&this.nData){throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(n))}}}Object.defineProperty(XMLDTDEntity.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDTDEntity.prototype,"systemId",{get:function(){return this.sysID}});Object.defineProperty(XMLDTDEntity.prototype,"notationName",{get:function(){return this.nData||null}});Object.defineProperty(XMLDTDEntity.prototype,"inputEncoding",{get:function(){return null}});Object.defineProperty(XMLDTDEntity.prototype,"xmlEncoding",{get:function(){return null}});Object.defineProperty(XMLDTDEntity.prototype,"xmlVersion",{get:function(){return null}});XMLDTDEntity.prototype.toString=function(e){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(e))};return XMLDTDEntity}(i)}).call(this)},5678:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;i=r(7730);t=r(1259);e.exports=n=function(e){extend(XMLDTDNotation,e);function XMLDTDNotation(e,r,n){XMLDTDNotation.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing DTD notation name. "+this.debugInfo(r))}if(!n.pubID&&!n.sysID){throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(r))}this.name=this.stringify.name(r);this.type=t.NotationDeclaration;if(n.pubID!=null){this.pubID=this.stringify.dtdPubID(n.pubID)}if(n.sysID!=null){this.sysID=this.stringify.dtdSysID(n.sysID)}}Object.defineProperty(XMLDTDNotation.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDTDNotation.prototype,"systemId",{get:function(){return this.sysID}});XMLDTDNotation.prototype.toString=function(e){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(e))};return XMLDTDNotation}(i)}).call(this)},4684:function(e,t,r){(function(){var t,n,i,s,extend=function(e,t){for(var r in t){if(o.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},o={}.hasOwnProperty;s=r(7871).isObject;i=r(7730);t=r(1259);e.exports=n=function(e){extend(XMLDeclaration,e);function XMLDeclaration(e,r,n,i){var o;XMLDeclaration.__super__.constructor.call(this,e);if(s(r)){o=r,r=o.version,n=o.encoding,i=o.standalone}if(!r){r="1.0"}this.type=t.Declaration;this.version=this.stringify.xmlVersion(r);if(n!=null){this.encoding=this.stringify.xmlEncoding(n)}if(i!=null){this.standalone=this.stringify.xmlStandalone(i)}}XMLDeclaration.prototype.toString=function(e){return this.options.writer.declaration(this,this.options.writer.filterOptions(e))};return XMLDeclaration}(i)}).call(this)},5522:function(e,t,r){(function(){var t,n,i,s,o,a,u,c,l,extend=function(e,t){for(var r in t){if(d.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},d={}.hasOwnProperty;l=r(7871).isObject;c=r(7730);t=r(1259);n=r(5145);s=r(7847);i=r(362);o=r(5678);u=r(2359);e.exports=a=function(e){extend(XMLDocType,e);function XMLDocType(e,r,n){var i,s,o,a,u,c;XMLDocType.__super__.constructor.call(this,e);this.type=t.DocType;if(e.children){a=e.children;for(s=0,o=a.length;s<o;s++){i=a[s];if(i.type===t.Element){this.name=i.name;break}}}this.documentObject=e;if(l(r)){u=r,r=u.pubID,n=u.sysID}if(n==null){c=[r,n],n=c[0],r=c[1]}if(r!=null){this.pubID=this.stringify.dtdPubID(r)}if(n!=null){this.sysID=this.stringify.dtdSysID(n)}}Object.defineProperty(XMLDocType.prototype,"entities",{get:function(){var e,r,n,i,s;i={};s=this.children;for(r=0,n=s.length;r<n;r++){e=s[r];if(e.type===t.EntityDeclaration&&!e.pe){i[e.name]=e}}return new u(i)}});Object.defineProperty(XMLDocType.prototype,"notations",{get:function(){var e,r,n,i,s;i={};s=this.children;for(r=0,n=s.length;r<n;r++){e=s[r];if(e.type===t.NotationDeclaration){i[e.name]=e}}return new u(i)}});Object.defineProperty(XMLDocType.prototype,"publicId",{get:function(){return this.pubID}});Object.defineProperty(XMLDocType.prototype,"systemId",{get:function(){return this.sysID}});Object.defineProperty(XMLDocType.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});XMLDocType.prototype.element=function(e,t){var r;r=new i(this,e,t);this.children.push(r);return this};XMLDocType.prototype.attList=function(e,t,r,i,s){var o;o=new n(this,e,t,r,i,s);this.children.push(o);return this};XMLDocType.prototype.entity=function(e,t){var r;r=new s(this,false,e,t);this.children.push(r);return this};XMLDocType.prototype.pEntity=function(e,t){var r;r=new s(this,true,e,t);this.children.push(r);return this};XMLDocType.prototype.notation=function(e,t){var r;r=new o(this,e,t);this.children.push(r);return this};XMLDocType.prototype.toString=function(e){return this.options.writer.docType(this,this.options.writer.filterOptions(e))};XMLDocType.prototype.ele=function(e,t){return this.element(e,t)};XMLDocType.prototype.att=function(e,t,r,n,i){return this.attList(e,t,r,n,i)};XMLDocType.prototype.ent=function(e,t){return this.entity(e,t)};XMLDocType.prototype.pent=function(e,t){return this.pEntity(e,t)};XMLDocType.prototype.not=function(e,t){return this.notation(e,t)};XMLDocType.prototype.up=function(){return this.root()||this.documentObject};XMLDocType.prototype.isEqualNode=function(e){if(!XMLDocType.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)){return false}if(e.name!==this.name){return false}if(e.publicId!==this.publicId){return false}if(e.systemId!==this.systemId){return false}return true};return XMLDocType}(c)}).call(this)},6047:function(e,t,r){(function(){var t,n,i,s,o,a,u,c,extend=function(e,t){for(var r in t){if(l.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},l={}.hasOwnProperty;c=r(7871).isPlainObject;i=r(1926);n=r(6463);o=r(7730);t=r(1259);u=r(5178);a=r(160);e.exports=s=function(e){extend(XMLDocument,e);function XMLDocument(e){XMLDocument.__super__.constructor.call(this,null);this.name="#document";this.type=t.Document;this.documentURI=null;this.domConfig=new n;e||(e={});if(!e.writer){e.writer=new a}this.options=e;this.stringify=new u(e)}Object.defineProperty(XMLDocument.prototype,"implementation",{value:new i});Object.defineProperty(XMLDocument.prototype,"doctype",{get:function(){var e,r,n,i;i=this.children;for(r=0,n=i.length;r<n;r++){e=i[r];if(e.type===t.DocType){return e}}return null}});Object.defineProperty(XMLDocument.prototype,"documentElement",{get:function(){return this.rootObject||null}});Object.defineProperty(XMLDocument.prototype,"inputEncoding",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"strictErrorChecking",{get:function(){return false}});Object.defineProperty(XMLDocument.prototype,"xmlEncoding",{get:function(){if(this.children.length!==0&&this.children[0].type===t.Declaration){return this.children[0].encoding}else{return null}}});Object.defineProperty(XMLDocument.prototype,"xmlStandalone",{get:function(){if(this.children.length!==0&&this.children[0].type===t.Declaration){return this.children[0].standalone==="yes"}else{return false}}});Object.defineProperty(XMLDocument.prototype,"xmlVersion",{get:function(){if(this.children.length!==0&&this.children[0].type===t.Declaration){return this.children[0].version}else{return"1.0"}}});Object.defineProperty(XMLDocument.prototype,"URL",{get:function(){return this.documentURI}});Object.defineProperty(XMLDocument.prototype,"origin",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"compatMode",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"characterSet",{get:function(){return null}});Object.defineProperty(XMLDocument.prototype,"contentType",{get:function(){return null}});XMLDocument.prototype.end=function(e){var t;t={};if(!e){e=this.options.writer}else if(c(e)){t=e;e=this.options.writer}return e.document(this,e.filterOptions(t))};XMLDocument.prototype.toString=function(e){return this.options.writer.document(this,this.options.writer.filterOptions(e))};XMLDocument.prototype.createElement=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createTextNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createComment=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createCDATASection=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createProcessingInstruction=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createAttribute=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createEntityReference=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.importNode=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createElementNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementById=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.adoptNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.renameNode=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.getElementsByClassName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createEvent=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createNodeIterator=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLDocument.prototype.createTreeWalker=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};return XMLDocument}(o)}).call(this)},6698:function(e,t,r){(function(){var t,n,i,s,o,a,u,c,l,d,f,h,p,m,y,g,b,w,v,_,T,S,M,C,D={}.hasOwnProperty;C=r(7871),S=C.isObject,T=C.isFunction,M=C.isPlainObject,_=C.getValue;t=r(1259);h=r(6047);m=r(2520);s=r(3705);o=r(9677);g=r(8382);v=r(7389);y=r(7777);d=r(4684);f=r(5522);a=r(5145);c=r(7847);u=r(362);l=r(5678);i=r(5696);w=r(5178);b=r(160);n=r(5471);e.exports=p=function(){function XMLDocumentCB(e,r,n){var i;this.name="?xml";this.type=t.Document;e||(e={});i={};if(!e.writer){e.writer=new b}else if(M(e.writer)){i=e.writer;e.writer=new b}this.options=e;this.writer=e.writer;this.writerOptions=this.writer.filterOptions(i);this.stringify=new w(e);this.onDataCallback=r||function(){};this.onEndCallback=n||function(){};this.currentNode=null;this.currentLevel=-1;this.openTags={};this.documentStarted=false;this.documentCompleted=false;this.root=null}XMLDocumentCB.prototype.createChildNode=function(e){var r,n,i,s,o,a,u,c;switch(e.type){case t.CData:this.cdata(e.value);break;case t.Comment:this.comment(e.value);break;case t.Element:i={};u=e.attribs;for(n in u){if(!D.call(u,n))continue;r=u[n];i[n]=r.value}this.node(e.name,i);break;case t.Dummy:this.dummy();break;case t.Raw:this.raw(e.value);break;case t.Text:this.text(e.value);break;case t.ProcessingInstruction:this.instruction(e.target,e.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+e.constructor.name)}c=e.children;for(o=0,a=c.length;o<a;o++){s=c[o];this.createChildNode(s);if(s.type===t.Element){this.up()}}return this};XMLDocumentCB.prototype.dummy=function(){return this};XMLDocumentCB.prototype.node=function(e,t,r){var n;if(e==null){throw new Error("Missing node name.")}if(this.root&&this.currentLevel===-1){throw new Error("Document can only have one root node. "+this.debugInfo(e))}this.openCurrent();e=_(e);if(t==null){t={}}t=_(t);if(!S(t)){n=[t,r],r=n[0],t=n[1]}this.currentNode=new m(this,e,t);this.currentNode.children=false;this.currentLevel++;this.openTags[this.currentLevel]=this.currentNode;if(r!=null){this.text(r)}return this};XMLDocumentCB.prototype.element=function(e,r,n){var i,s,o,a,u,c;if(this.currentNode&&this.currentNode.type===t.DocType){this.dtdElement.apply(this,arguments)}else{if(Array.isArray(e)||S(e)||T(e)){a=this.options.noValidation;this.options.noValidation=true;c=new h(this.options).element("TEMP_ROOT");c.element(e);this.options.noValidation=a;u=c.children;for(s=0,o=u.length;s<o;s++){i=u[s];this.createChildNode(i);if(i.type===t.Element){this.up()}}}else{this.node(e,r,n)}}return this};XMLDocumentCB.prototype.attribute=function(e,t){var r,n;if(!this.currentNode||this.currentNode.children){throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(e))}if(e!=null){e=_(e)}if(S(e)){for(r in e){if(!D.call(e,r))continue;n=e[r];this.attribute(r,n)}}else{if(T(t)){t=t.apply()}if(this.options.keepNullAttributes&&t==null){this.currentNode.attribs[e]=new i(this,e,"")}else if(t!=null){this.currentNode.attribs[e]=new i(this,e,t)}}return this};XMLDocumentCB.prototype.text=function(e){var t;this.openCurrent();t=new v(this,e);this.onData(this.writer.text(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.cdata=function(e){var t;this.openCurrent();t=new s(this,e);this.onData(this.writer.cdata(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.comment=function(e){var t;this.openCurrent();t=new o(this,e);this.onData(this.writer.comment(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.raw=function(e){var t;this.openCurrent();t=new g(this,e);this.onData(this.writer.raw(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.instruction=function(e,t){var r,n,i,s,o;this.openCurrent();if(e!=null){e=_(e)}if(t!=null){t=_(t)}if(Array.isArray(e)){for(r=0,s=e.length;r<s;r++){n=e[r];this.instruction(n)}}else if(S(e)){for(n in e){if(!D.call(e,n))continue;i=e[n];this.instruction(n,i)}}else{if(T(t)){t=t.apply()}o=new y(this,e,t);this.onData(this.writer.processingInstruction(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1)}return this};XMLDocumentCB.prototype.declaration=function(e,t,r){var n;this.openCurrent();if(this.documentStarted){throw new Error("declaration() must be the first node.")}n=new d(this,e,t,r);this.onData(this.writer.declaration(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.doctype=function(e,t,r){this.openCurrent();if(e==null){throw new Error("Missing root node name.")}if(this.root){throw new Error("dtd() must come before the root node.")}this.currentNode=new f(this,t,r);this.currentNode.rootNodeName=e;this.currentNode.children=false;this.currentLevel++;this.openTags[this.currentLevel]=this.currentNode;return this};XMLDocumentCB.prototype.dtdElement=function(e,t){var r;this.openCurrent();r=new u(this,e,t);this.onData(this.writer.dtdElement(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.attList=function(e,t,r,n,i){var s;this.openCurrent();s=new a(this,e,t,r,n,i);this.onData(this.writer.dtdAttList(s,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.entity=function(e,t){var r;this.openCurrent();r=new c(this,false,e,t);this.onData(this.writer.dtdEntity(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.pEntity=function(e,t){var r;this.openCurrent();r=new c(this,true,e,t);this.onData(this.writer.dtdEntity(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.notation=function(e,t){var r;this.openCurrent();r=new l(this,e,t);this.onData(this.writer.dtdNotation(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this};XMLDocumentCB.prototype.up=function(){if(this.currentLevel<0){throw new Error("The document node has no parent.")}if(this.currentNode){if(this.currentNode.children){this.closeNode(this.currentNode)}else{this.openNode(this.currentNode)}this.currentNode=null}else{this.closeNode(this.openTags[this.currentLevel])}delete this.openTags[this.currentLevel];this.currentLevel--;return this};XMLDocumentCB.prototype.end=function(){while(this.currentLevel>=0){this.up()}return this.onEnd()};XMLDocumentCB.prototype.openCurrent=function(){if(this.currentNode){this.currentNode.children=true;return this.openNode(this.currentNode)}};XMLDocumentCB.prototype.openNode=function(e){var r,i,s,o;if(!e.isOpen){if(!this.root&&this.currentLevel===0&&e.type===t.Element){this.root=e}i="";if(e.type===t.Element){this.writerOptions.state=n.OpenTag;i=this.writer.indent(e,this.writerOptions,this.currentLevel)+"<"+e.name;o=e.attribs;for(s in o){if(!D.call(o,s))continue;r=o[s];i+=this.writer.attribute(r,this.writerOptions,this.currentLevel)}i+=(e.children?">":"/>")+this.writer.endline(e,this.writerOptions,this.currentLevel);this.writerOptions.state=n.InsideTag}else{this.writerOptions.state=n.OpenTag;i=this.writer.indent(e,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+e.rootNodeName;if(e.pubID&&e.sysID){i+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'}else if(e.sysID){i+=' SYSTEM "'+e.sysID+'"'}if(e.children){i+=" [";this.writerOptions.state=n.InsideTag}else{this.writerOptions.state=n.CloseTag;i+=">"}i+=this.writer.endline(e,this.writerOptions,this.currentLevel)}this.onData(i,this.currentLevel);return e.isOpen=true}};XMLDocumentCB.prototype.closeNode=function(e){var r;if(!e.isClosed){r="";this.writerOptions.state=n.CloseTag;if(e.type===t.Element){r=this.writer.indent(e,this.writerOptions,this.currentLevel)+"</"+e.name+">"+this.writer.endline(e,this.writerOptions,this.currentLevel)}else{r=this.writer.indent(e,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(e,this.writerOptions,this.currentLevel)}this.writerOptions.state=n.None;this.onData(r,this.currentLevel);return e.isClosed=true}};XMLDocumentCB.prototype.onData=function(e,t){this.documentStarted=true;return this.onDataCallback(e,t+1)};XMLDocumentCB.prototype.onEnd=function(){this.documentCompleted=true;return this.onEndCallback()};XMLDocumentCB.prototype.debugInfo=function(e){if(e==null){return""}else{return"node: <"+e+">"}};XMLDocumentCB.prototype.ele=function(){return this.element.apply(this,arguments)};XMLDocumentCB.prototype.nod=function(e,t,r){return this.node(e,t,r)};XMLDocumentCB.prototype.txt=function(e){return this.text(e)};XMLDocumentCB.prototype.dat=function(e){return this.cdata(e)};XMLDocumentCB.prototype.com=function(e){return this.comment(e)};XMLDocumentCB.prototype.ins=function(e,t){return this.instruction(e,t)};XMLDocumentCB.prototype.dec=function(e,t,r){return this.declaration(e,t,r)};XMLDocumentCB.prototype.dtd=function(e,t,r){return this.doctype(e,t,r)};XMLDocumentCB.prototype.e=function(e,t,r){return this.element(e,t,r)};XMLDocumentCB.prototype.n=function(e,t,r){return this.node(e,t,r)};XMLDocumentCB.prototype.t=function(e){return this.text(e)};XMLDocumentCB.prototype.d=function(e){return this.cdata(e)};XMLDocumentCB.prototype.c=function(e){return this.comment(e)};XMLDocumentCB.prototype.r=function(e){return this.raw(e)};XMLDocumentCB.prototype.i=function(e,t){return this.instruction(e,t)};XMLDocumentCB.prototype.att=function(){if(this.currentNode&&this.currentNode.type===t.DocType){return this.attList.apply(this,arguments)}else{return this.attribute.apply(this,arguments)}};XMLDocumentCB.prototype.a=function(){if(this.currentNode&&this.currentNode.type===t.DocType){return this.attList.apply(this,arguments)}else{return this.attribute.apply(this,arguments)}};XMLDocumentCB.prototype.ent=function(e,t){return this.entity(e,t)};XMLDocumentCB.prototype.pent=function(e,t){return this.pEntity(e,t)};XMLDocumentCB.prototype.not=function(e,t){return this.notation(e,t)};return XMLDocumentCB}()}).call(this)},6916:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;i=r(7730);t=r(1259);e.exports=n=function(e){extend(XMLDummy,e);function XMLDummy(e){XMLDummy.__super__.constructor.call(this,e);this.type=t.Dummy}XMLDummy.prototype.clone=function(){return Object.create(this)};XMLDummy.prototype.toString=function(e){return""};return XMLDummy}(i)}).call(this)},2520:function(e,t,r){(function(){var t,n,i,s,o,a,u,c,l,extend=function(e,t){for(var r in t){if(d.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},d={}.hasOwnProperty;l=r(7871),c=l.isObject,u=l.isFunction,a=l.getValue;o=r(7730);t=r(1259);n=r(5696);s=r(2359);e.exports=i=function(e){extend(XMLElement,e);function XMLElement(e,r,n){var i,s,o,a;XMLElement.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing element name. "+this.debugInfo())}this.name=this.stringify.name(r);this.type=t.Element;this.attribs={};this.schemaTypeInfo=null;if(n!=null){this.attribute(n)}if(e.type===t.Document){this.isRoot=true;this.documentObject=e;e.rootObject=this;if(e.children){a=e.children;for(s=0,o=a.length;s<o;s++){i=a[s];if(i.type===t.DocType){i.name=this.name;break}}}}}Object.defineProperty(XMLElement.prototype,"tagName",{get:function(){return this.name}});Object.defineProperty(XMLElement.prototype,"namespaceURI",{get:function(){return""}});Object.defineProperty(XMLElement.prototype,"prefix",{get:function(){return""}});Object.defineProperty(XMLElement.prototype,"localName",{get:function(){return this.name}});Object.defineProperty(XMLElement.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLElement.prototype,"attributes",{get:function(){if(!this.attributeMap||!this.attributeMap.nodes){this.attributeMap=new s(this.attribs)}return this.attributeMap}});XMLElement.prototype.clone=function(){var e,t,r,n;r=Object.create(this);if(r.isRoot){r.documentObject=null}r.attribs={};n=this.attribs;for(t in n){if(!d.call(n,t))continue;e=n[t];r.attribs[t]=e.clone()}r.children=[];this.children.forEach((function(e){var t;t=e.clone();t.parent=r;return r.children.push(t)}));return r};XMLElement.prototype.attribute=function(e,t){var r,i;if(e!=null){e=a(e)}if(c(e)){for(r in e){if(!d.call(e,r))continue;i=e[r];this.attribute(r,i)}}else{if(u(t)){t=t.apply()}if(this.options.keepNullAttributes&&t==null){this.attribs[e]=new n(this,e,"")}else if(t!=null){this.attribs[e]=new n(this,e,t)}}return this};XMLElement.prototype.removeAttribute=function(e){var t,r,n;if(e==null){throw new Error("Missing attribute name. "+this.debugInfo())}e=a(e);if(Array.isArray(e)){for(r=0,n=e.length;r<n;r++){t=e[r];delete this.attribs[t]}}else{delete this.attribs[e]}return this};XMLElement.prototype.toString=function(e){return this.options.writer.element(this,this.options.writer.filterOptions(e))};XMLElement.prototype.att=function(e,t){return this.attribute(e,t)};XMLElement.prototype.a=function(e,t){return this.attribute(e,t)};XMLElement.prototype.getAttribute=function(e){if(this.attribs.hasOwnProperty(e)){return this.attribs[e].value}else{return null}};XMLElement.prototype.setAttribute=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getAttributeNode=function(e){if(this.attribs.hasOwnProperty(e)){return this.attribs[e]}else{return null}};XMLElement.prototype.setAttributeNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.removeAttributeNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setAttributeNS=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.removeAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getAttributeNodeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setAttributeNodeNS=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.hasAttribute=function(e){return this.attribs.hasOwnProperty(e)};XMLElement.prototype.hasAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setIdAttribute=function(e,t){if(this.attribs.hasOwnProperty(e)){return this.attribs[e].isId}else{return t}};XMLElement.prototype.setIdAttributeNS=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.setIdAttributeNode=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.getElementsByClassName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLElement.prototype.isEqualNode=function(e){var t,r,n;if(!XMLElement.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)){return false}if(e.namespaceURI!==this.namespaceURI){return false}if(e.prefix!==this.prefix){return false}if(e.localName!==this.localName){return false}if(e.attribs.length!==this.attribs.length){return false}for(t=r=0,n=this.attribs.length-1;0<=n?r<=n:r>=n;t=0<=n?++r:--r){if(!this.attribs[t].isEqualNode(e.attribs[t])){return false}}return true};return XMLElement}(o)}).call(this)},2359:function(e){(function(){var t;e.exports=t=function(){function XMLNamedNodeMap(e){this.nodes=e}Object.defineProperty(XMLNamedNodeMap.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}});XMLNamedNodeMap.prototype.clone=function(){return this.nodes=null};XMLNamedNodeMap.prototype.getNamedItem=function(e){return this.nodes[e]};XMLNamedNodeMap.prototype.setNamedItem=function(e){var t;t=this.nodes[e.nodeName];this.nodes[e.nodeName]=e;return t||null};XMLNamedNodeMap.prototype.removeNamedItem=function(e){var t;t=this.nodes[e];delete this.nodes[e];return t||null};XMLNamedNodeMap.prototype.item=function(e){return this.nodes[Object.keys(this.nodes)[e]]||null};XMLNamedNodeMap.prototype.getNamedItemNS=function(e,t){throw new Error("This DOM method is not implemented.")};XMLNamedNodeMap.prototype.setNamedItemNS=function(e){throw new Error("This DOM method is not implemented.")};XMLNamedNodeMap.prototype.removeNamedItemNS=function(e,t){throw new Error("This DOM method is not implemented.")};return XMLNamedNodeMap}()}).call(this)},7730:function(e,t,r){(function(){var t,n,i,s,o,a,u,c,l,d,f,h,p,m,y,g,b,w,v,_={}.hasOwnProperty;v=r(7871),w=v.isObject,b=v.isFunction,g=v.isEmpty,y=v.getValue;c=null;i=null;s=null;o=null;a=null;p=null;m=null;h=null;u=null;n=null;f=null;l=null;t=null;e.exports=d=function(){function XMLNode(e){this.parent=e;if(this.parent){this.options=this.parent.options;this.stringify=this.parent.stringify}this.value=null;this.children=[];this.baseURI=null;if(!c){c=r(2520);i=r(3705);s=r(9677);o=r(4684);a=r(5522);p=r(8382);m=r(7389);h=r(7777);u=r(6916);n=r(1259);f=r(2374);l=r(2359);t=r(5921)}}Object.defineProperty(XMLNode.prototype,"nodeName",{get:function(){return this.name}});Object.defineProperty(XMLNode.prototype,"nodeType",{get:function(){return this.type}});Object.defineProperty(XMLNode.prototype,"nodeValue",{get:function(){return this.value}});Object.defineProperty(XMLNode.prototype,"parentNode",{get:function(){return this.parent}});Object.defineProperty(XMLNode.prototype,"childNodes",{get:function(){if(!this.childNodeList||!this.childNodeList.nodes){this.childNodeList=new f(this.children)}return this.childNodeList}});Object.defineProperty(XMLNode.prototype,"firstChild",{get:function(){return this.children[0]||null}});Object.defineProperty(XMLNode.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}});Object.defineProperty(XMLNode.prototype,"previousSibling",{get:function(){var e;e=this.parent.children.indexOf(this);return this.parent.children[e-1]||null}});Object.defineProperty(XMLNode.prototype,"nextSibling",{get:function(){var e;e=this.parent.children.indexOf(this);return this.parent.children[e+1]||null}});Object.defineProperty(XMLNode.prototype,"ownerDocument",{get:function(){return this.document()||null}});Object.defineProperty(XMLNode.prototype,"textContent",{get:function(){var e,t,r,i,s;if(this.nodeType===n.Element||this.nodeType===n.DocumentFragment){s="";i=this.children;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.textContent){s+=e.textContent}}return s}else{return null}},set:function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())}});XMLNode.prototype.setParent=function(e){var t,r,n,i,s;this.parent=e;if(e){this.options=e.options;this.stringify=e.stringify}i=this.children;s=[];for(r=0,n=i.length;r<n;r++){t=i[r];s.push(t.setParent(this))}return s};XMLNode.prototype.element=function(e,t,r){var n,i,s,o,a,u,c,l,d,f,h;u=null;if(t===null&&r==null){d=[{},null],t=d[0],r=d[1]}if(t==null){t={}}t=y(t);if(!w(t)){f=[t,r],r=f[0],t=f[1]}if(e!=null){e=y(e)}if(Array.isArray(e)){for(s=0,c=e.length;s<c;s++){i=e[s];u=this.element(i)}}else if(b(e)){u=this.element(e.apply())}else if(w(e)){for(a in e){if(!_.call(e,a))continue;h=e[a];if(b(h)){h=h.apply()}if(!this.options.ignoreDecorators&&this.stringify.convertAttKey&&a.indexOf(this.stringify.convertAttKey)===0){u=this.attribute(a.substr(this.stringify.convertAttKey.length),h)}else if(!this.options.separateArrayItems&&Array.isArray(h)&&g(h)){u=this.dummy()}else if(w(h)&&g(h)){u=this.element(a)}else if(!this.options.keepNullNodes&&h==null){u=this.dummy()}else if(!this.options.separateArrayItems&&Array.isArray(h)){for(o=0,l=h.length;o<l;o++){i=h[o];n={};n[a]=i;u=this.element(n)}}else if(w(h)){if(!this.options.ignoreDecorators&&this.stringify.convertTextKey&&a.indexOf(this.stringify.convertTextKey)===0){u=this.element(h)}else{u=this.element(a);u.element(h)}}else{u=this.element(a,h)}}}else if(!this.options.keepNullNodes&&r===null){u=this.dummy()}else{if(!this.options.ignoreDecorators&&this.stringify.convertTextKey&&e.indexOf(this.stringify.convertTextKey)===0){u=this.text(r)}else if(!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&e.indexOf(this.stringify.convertCDataKey)===0){u=this.cdata(r)}else if(!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&e.indexOf(this.stringify.convertCommentKey)===0){u=this.comment(r)}else if(!this.options.ignoreDecorators&&this.stringify.convertRawKey&&e.indexOf(this.stringify.convertRawKey)===0){u=this.raw(r)}else if(!this.options.ignoreDecorators&&this.stringify.convertPIKey&&e.indexOf(this.stringify.convertPIKey)===0){u=this.instruction(e.substr(this.stringify.convertPIKey.length),r)}else{u=this.node(e,t,r)}}if(u==null){throw new Error("Could not create any elements with: "+e+". "+this.debugInfo())}return u};XMLNode.prototype.insertBefore=function(e,t,r){var n,i,s,o,a;if(e!=null?e.type:void 0){s=e;o=t;s.setParent(this);if(o){i=children.indexOf(o);a=children.splice(i);children.push(s);Array.prototype.push.apply(children,a)}else{children.push(s)}return s}else{if(this.isRoot){throw new Error("Cannot insert elements at root level. "+this.debugInfo(e))}i=this.parent.children.indexOf(this);a=this.parent.children.splice(i);n=this.parent.element(e,t,r);Array.prototype.push.apply(this.parent.children,a);return n}};XMLNode.prototype.insertAfter=function(e,t,r){var n,i,s;if(this.isRoot){throw new Error("Cannot insert elements at root level. "+this.debugInfo(e))}i=this.parent.children.indexOf(this);s=this.parent.children.splice(i+1);n=this.parent.element(e,t,r);Array.prototype.push.apply(this.parent.children,s);return n};XMLNode.prototype.remove=function(){var e,t;if(this.isRoot){throw new Error("Cannot remove the root element. "+this.debugInfo())}e=this.parent.children.indexOf(this);[].splice.apply(this.parent.children,[e,e-e+1].concat(t=[])),t;return this.parent};XMLNode.prototype.node=function(e,t,r){var n,i;if(e!=null){e=y(e)}t||(t={});t=y(t);if(!w(t)){i=[t,r],r=i[0],t=i[1]}n=new c(this,e,t);if(r!=null){n.text(r)}this.children.push(n);return n};XMLNode.prototype.text=function(e){var t;if(w(e)){this.element(e)}t=new m(this,e);this.children.push(t);return this};XMLNode.prototype.cdata=function(e){var t;t=new i(this,e);this.children.push(t);return this};XMLNode.prototype.comment=function(e){var t;t=new s(this,e);this.children.push(t);return this};XMLNode.prototype.commentBefore=function(e){var t,r,n;r=this.parent.children.indexOf(this);n=this.parent.children.splice(r);t=this.parent.comment(e);Array.prototype.push.apply(this.parent.children,n);return this};XMLNode.prototype.commentAfter=function(e){var t,r,n;r=this.parent.children.indexOf(this);n=this.parent.children.splice(r+1);t=this.parent.comment(e);Array.prototype.push.apply(this.parent.children,n);return this};XMLNode.prototype.raw=function(e){var t;t=new p(this,e);this.children.push(t);return this};XMLNode.prototype.dummy=function(){var e;e=new u(this);return e};XMLNode.prototype.instruction=function(e,t){var r,n,i,s,o;if(e!=null){e=y(e)}if(t!=null){t=y(t)}if(Array.isArray(e)){for(s=0,o=e.length;s<o;s++){r=e[s];this.instruction(r)}}else if(w(e)){for(r in e){if(!_.call(e,r))continue;n=e[r];this.instruction(r,n)}}else{if(b(t)){t=t.apply()}i=new h(this,e,t);this.children.push(i)}return this};XMLNode.prototype.instructionBefore=function(e,t){var r,n,i;n=this.parent.children.indexOf(this);i=this.parent.children.splice(n);r=this.parent.instruction(e,t);Array.prototype.push.apply(this.parent.children,i);return this};XMLNode.prototype.instructionAfter=function(e,t){var r,n,i;n=this.parent.children.indexOf(this);i=this.parent.children.splice(n+1);r=this.parent.instruction(e,t);Array.prototype.push.apply(this.parent.children,i);return this};XMLNode.prototype.declaration=function(e,t,r){var i,s;i=this.document();s=new o(i,e,t,r);if(i.children.length===0){i.children.unshift(s)}else if(i.children[0].type===n.Declaration){i.children[0]=s}else{i.children.unshift(s)}return i.root()||i};XMLNode.prototype.dtd=function(e,t){var r,i,s,o,u,c,l,d,f,h;i=this.document();s=new a(i,e,t);f=i.children;for(o=u=0,l=f.length;u<l;o=++u){r=f[o];if(r.type===n.DocType){i.children[o]=s;return s}}h=i.children;for(o=c=0,d=h.length;c<d;o=++c){r=h[o];if(r.isRoot){i.children.splice(o,0,s);return s}}i.children.push(s);return s};XMLNode.prototype.up=function(){if(this.isRoot){throw new Error("The root node has no parent. Use doc() if you need to get the document object.")}return this.parent};XMLNode.prototype.root=function(){var e;e=this;while(e){if(e.type===n.Document){return e.rootObject}else if(e.isRoot){return e}else{e=e.parent}}};XMLNode.prototype.document=function(){var e;e=this;while(e){if(e.type===n.Document){return e}else{e=e.parent}}};XMLNode.prototype.end=function(e){return this.document().end(e)};XMLNode.prototype.prev=function(){var e;e=this.parent.children.indexOf(this);if(e<1){throw new Error("Already at the first node. "+this.debugInfo())}return this.parent.children[e-1]};XMLNode.prototype.next=function(){var e;e=this.parent.children.indexOf(this);if(e===-1||e===this.parent.children.length-1){throw new Error("Already at the last node. "+this.debugInfo())}return this.parent.children[e+1]};XMLNode.prototype.importDocument=function(e){var t;t=e.root().clone();t.parent=this;t.isRoot=false;this.children.push(t);return this};XMLNode.prototype.debugInfo=function(e){var t,r;e=e||this.name;if(e==null&&!((t=this.parent)!=null?t.name:void 0)){return""}else if(e==null){return"parent: <"+this.parent.name+">"}else if(!((r=this.parent)!=null?r.name:void 0)){return"node: <"+e+">"}else{return"node: <"+e+">, parent: <"+this.parent.name+">"}};XMLNode.prototype.ele=function(e,t,r){return this.element(e,t,r)};XMLNode.prototype.nod=function(e,t,r){return this.node(e,t,r)};XMLNode.prototype.txt=function(e){return this.text(e)};XMLNode.prototype.dat=function(e){return this.cdata(e)};XMLNode.prototype.com=function(e){return this.comment(e)};XMLNode.prototype.ins=function(e,t){return this.instruction(e,t)};XMLNode.prototype.doc=function(){return this.document()};XMLNode.prototype.dec=function(e,t,r){return this.declaration(e,t,r)};XMLNode.prototype.e=function(e,t,r){return this.element(e,t,r)};XMLNode.prototype.n=function(e,t,r){return this.node(e,t,r)};XMLNode.prototype.t=function(e){return this.text(e)};XMLNode.prototype.d=function(e){return this.cdata(e)};XMLNode.prototype.c=function(e){return this.comment(e)};XMLNode.prototype.r=function(e){return this.raw(e)};XMLNode.prototype.i=function(e,t){return this.instruction(e,t)};XMLNode.prototype.u=function(){return this.up()};XMLNode.prototype.importXMLBuilder=function(e){return this.importDocument(e)};XMLNode.prototype.replaceChild=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.removeChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.appendChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.hasChildNodes=function(){return this.children.length!==0};XMLNode.prototype.cloneNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.isSupported=function(e,t){return true};XMLNode.prototype.hasAttributes=function(){return this.attribs.length!==0};XMLNode.prototype.compareDocumentPosition=function(e){var r,n;r=this;if(r===e){return 0}else if(this.document()!==e.document()){n=t.Disconnected|t.ImplementationSpecific;if(Math.random()<.5){n|=t.Preceding}else{n|=t.Following}return n}else if(r.isAncestor(e)){return t.Contains|t.Preceding}else if(r.isDescendant(e)){return t.Contains|t.Following}else if(r.isPreceding(e)){return t.Preceding}else{return t.Following}};XMLNode.prototype.isSameNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.lookupPrefix=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.isDefaultNamespace=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.lookupNamespaceURI=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.isEqualNode=function(e){var t,r,n;if(e.nodeType!==this.nodeType){return false}if(e.children.length!==this.children.length){return false}for(t=r=0,n=this.children.length-1;0<=n?r<=n:r>=n;t=0<=n?++r:--r){if(!this.children[t].isEqualNode(e.children[t])){return false}}return true};XMLNode.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.setUserData=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.getUserData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLNode.prototype.contains=function(e){if(!e){return false}return e===this||this.isDescendant(e)};XMLNode.prototype.isDescendant=function(e){var t,r,n,i,s;s=this.children;for(n=0,i=s.length;n<i;n++){t=s[n];if(e===t){return true}r=t.isDescendant(e);if(r){return true}}return false};XMLNode.prototype.isAncestor=function(e){return e.isDescendant(this)};XMLNode.prototype.isPreceding=function(e){var t,r;t=this.treePosition(e);r=this.treePosition(this);if(t===-1||r===-1){return false}else{return t<r}};XMLNode.prototype.isFollowing=function(e){var t,r;t=this.treePosition(e);r=this.treePosition(this);if(t===-1||r===-1){return false}else{return t>r}};XMLNode.prototype.treePosition=function(e){var t,r;r=0;t=false;this.foreachTreeNode(this.document(),(function(n){r++;if(!t&&n===e){return t=true}}));if(t){return r}else{return-1}};XMLNode.prototype.foreachTreeNode=function(e,t){var r,n,i,s,o;e||(e=this.document());s=e.children;for(n=0,i=s.length;n<i;n++){r=s[n];if(o=t(r)){return o}else{o=this.foreachTreeNode(r,t);if(o){return o}}}};return XMLNode}()}).call(this)},2374:function(e){(function(){var t;e.exports=t=function(){function XMLNodeList(e){this.nodes=e}Object.defineProperty(XMLNodeList.prototype,"length",{get:function(){return this.nodes.length||0}});XMLNodeList.prototype.clone=function(){return this.nodes=null};XMLNodeList.prototype.item=function(e){return this.nodes[e]||null};return XMLNodeList}()}).call(this)},7777:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;t=r(1259);n=r(8363);e.exports=i=function(e){extend(XMLProcessingInstruction,e);function XMLProcessingInstruction(e,r,n){XMLProcessingInstruction.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing instruction target. "+this.debugInfo())}this.type=t.ProcessingInstruction;this.target=this.stringify.insTarget(r);this.name=this.target;if(n){this.value=this.stringify.insValue(n)}}XMLProcessingInstruction.prototype.clone=function(){return Object.create(this)};XMLProcessingInstruction.prototype.toString=function(e){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(e))};XMLProcessingInstruction.prototype.isEqualNode=function(e){if(!XMLProcessingInstruction.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)){return false}if(e.target!==this.target){return false}return true};return XMLProcessingInstruction}(n)}).call(this)},8382:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;t=r(1259);n=r(7730);e.exports=i=function(e){extend(XMLRaw,e);function XMLRaw(e,r){XMLRaw.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing raw text. "+this.debugInfo())}this.type=t.Raw;this.value=this.stringify.raw(r)}XMLRaw.prototype.clone=function(){return Object.create(this)};XMLRaw.prototype.toString=function(e){return this.options.writer.raw(this,this.options.writer.filterOptions(e))};return XMLRaw}(n)}).call(this)},5345:function(e,t,r){(function(){var t,n,i,s,extend=function(e,t){for(var r in t){if(o.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},o={}.hasOwnProperty;t=r(1259);s=r(6664);n=r(5471);e.exports=i=function(e){extend(XMLStreamWriter,e);function XMLStreamWriter(e,t){this.stream=e;XMLStreamWriter.__super__.constructor.call(this,t)}XMLStreamWriter.prototype.endline=function(e,t,r){if(e.isLastRootNode&&t.state===n.CloseTag){return""}else{return XMLStreamWriter.__super__.endline.call(this,e,t,r)}};XMLStreamWriter.prototype.document=function(e,t){var r,n,i,s,o,a,u,c,l;u=e.children;for(n=i=0,o=u.length;i<o;n=++i){r=u[n];r.isLastRootNode=n===e.children.length-1}t=this.filterOptions(t);c=e.children;l=[];for(s=0,a=c.length;s<a;s++){r=c[s];l.push(this.writeChildNode(r,t,0))}return l};XMLStreamWriter.prototype.attribute=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.attribute.call(this,e,t,r))};XMLStreamWriter.prototype.cdata=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.cdata.call(this,e,t,r))};XMLStreamWriter.prototype.comment=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.comment.call(this,e,t,r))};XMLStreamWriter.prototype.declaration=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.declaration.call(this,e,t,r))};XMLStreamWriter.prototype.docType=function(e,t,r){var i,s,o,a;r||(r=0);this.openNode(e,t,r);t.state=n.OpenTag;this.stream.write(this.indent(e,t,r));this.stream.write("<!DOCTYPE "+e.root().name);if(e.pubID&&e.sysID){this.stream.write(' PUBLIC "'+e.pubID+'" "'+e.sysID+'"')}else if(e.sysID){this.stream.write(' SYSTEM "'+e.sysID+'"')}if(e.children.length>0){this.stream.write(" [");this.stream.write(this.endline(e,t,r));t.state=n.InsideTag;a=e.children;for(s=0,o=a.length;s<o;s++){i=a[s];this.writeChildNode(i,t,r+1)}t.state=n.CloseTag;this.stream.write("]")}t.state=n.CloseTag;this.stream.write(t.spaceBeforeSlash+">");this.stream.write(this.endline(e,t,r));t.state=n.None;return this.closeNode(e,t,r)};XMLStreamWriter.prototype.element=function(e,r,i){var s,a,u,c,l,d,f,h,p,m;i||(i=0);this.openNode(e,r,i);r.state=n.OpenTag;this.stream.write(this.indent(e,r,i)+"<"+e.name);p=e.attribs;for(f in p){if(!o.call(p,f))continue;s=p[f];this.attribute(s,r,i)}u=e.children.length;c=u===0?null:e.children[0];if(u===0||e.children.every((function(e){return(e.type===t.Text||e.type===t.Raw)&&e.value===""}))){if(r.allowEmpty){this.stream.write(">");r.state=n.CloseTag;this.stream.write("</"+e.name+">")}else{r.state=n.CloseTag;this.stream.write(r.spaceBeforeSlash+"/>")}}else if(r.pretty&&u===1&&(c.type===t.Text||c.type===t.Raw)&&c.value!=null){this.stream.write(">");r.state=n.InsideTag;r.suppressPrettyCount++;h=true;this.writeChildNode(c,r,i+1);r.suppressPrettyCount--;h=false;r.state=n.CloseTag;this.stream.write("</"+e.name+">")}else{this.stream.write(">"+this.endline(e,r,i));r.state=n.InsideTag;m=e.children;for(l=0,d=m.length;l<d;l++){a=m[l];this.writeChildNode(a,r,i+1)}r.state=n.CloseTag;this.stream.write(this.indent(e,r,i)+"</"+e.name+">")}this.stream.write(this.endline(e,r,i));r.state=n.None;return this.closeNode(e,r,i)};XMLStreamWriter.prototype.processingInstruction=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.processingInstruction.call(this,e,t,r))};XMLStreamWriter.prototype.raw=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.raw.call(this,e,t,r))};XMLStreamWriter.prototype.text=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.text.call(this,e,t,r))};XMLStreamWriter.prototype.dtdAttList=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.dtdAttList.call(this,e,t,r))};XMLStreamWriter.prototype.dtdElement=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.dtdElement.call(this,e,t,r))};XMLStreamWriter.prototype.dtdEntity=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.dtdEntity.call(this,e,t,r))};XMLStreamWriter.prototype.dtdNotation=function(e,t,r){return this.stream.write(XMLStreamWriter.__super__.dtdNotation.call(this,e,t,r))};return XMLStreamWriter}(s)}).call(this)},160:function(e,t,r){(function(){var t,n,extend=function(e,t){for(var r in t){if(i.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},i={}.hasOwnProperty;n=r(6664);e.exports=t=function(e){extend(XMLStringWriter,e);function XMLStringWriter(e){XMLStringWriter.__super__.constructor.call(this,e)}XMLStringWriter.prototype.document=function(e,t){var r,n,i,s,o;t=this.filterOptions(t);s="";o=e.children;for(n=0,i=o.length;n<i;n++){r=o[n];s+=this.writeChildNode(r,t,0)}if(t.pretty&&s.slice(-t.newline.length)===t.newline){s=s.slice(0,-t.newline.length)}return s};return XMLStringWriter}(n)}).call(this)},5178:function(e){(function(){var t,bind=function(e,t){return function(){return e.apply(t,arguments)}},r={}.hasOwnProperty;e.exports=t=function(){function XMLStringifier(e){this.assertLegalName=bind(this.assertLegalName,this);this.assertLegalChar=bind(this.assertLegalChar,this);var t,n,i;e||(e={});this.options=e;if(!this.options.version){this.options.version="1.0"}n=e.stringify||{};for(t in n){if(!r.call(n,t))continue;i=n[t];this[t]=i}}XMLStringifier.prototype.name=function(e){if(this.options.noValidation){return e}return this.assertLegalName(""+e||"")};XMLStringifier.prototype.text=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(this.textEscape(""+e||""))};XMLStringifier.prototype.cdata=function(e){if(this.options.noValidation){return e}e=""+e||"";e=e.replace("]]>","]]]]><![CDATA[>");return this.assertLegalChar(e)};XMLStringifier.prototype.comment=function(e){if(this.options.noValidation){return e}e=""+e||"";if(e.match(/--/)){throw new Error("Comment text cannot contain double-hypen: "+e)}return this.assertLegalChar(e)};XMLStringifier.prototype.raw=function(e){if(this.options.noValidation){return e}return""+e||""};XMLStringifier.prototype.attValue=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(this.attEscape(e=""+e||""))};XMLStringifier.prototype.insTarget=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(""+e||"")};XMLStringifier.prototype.insValue=function(e){if(this.options.noValidation){return e}e=""+e||"";if(e.match(/\?>/)){throw new Error("Invalid processing instruction value: "+e)}return this.assertLegalChar(e)};XMLStringifier.prototype.xmlVersion=function(e){if(this.options.noValidation){return e}e=""+e||"";if(!e.match(/1\.[0-9]+/)){throw new Error("Invalid version number: "+e)}return e};XMLStringifier.prototype.xmlEncoding=function(e){if(this.options.noValidation){return e}e=""+e||"";if(!e.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)){throw new Error("Invalid encoding: "+e)}return this.assertLegalChar(e)};XMLStringifier.prototype.xmlStandalone=function(e){if(this.options.noValidation){return e}if(e){return"yes"}else{return"no"}};XMLStringifier.prototype.dtdPubID=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(""+e||"")};XMLStringifier.prototype.dtdSysID=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(""+e||"")};XMLStringifier.prototype.dtdElementValue=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(""+e||"")};XMLStringifier.prototype.dtdAttType=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(""+e||"")};XMLStringifier.prototype.dtdAttDefault=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(""+e||"")};XMLStringifier.prototype.dtdEntityValue=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(""+e||"")};XMLStringifier.prototype.dtdNData=function(e){if(this.options.noValidation){return e}return this.assertLegalChar(""+e||"")};XMLStringifier.prototype.convertAttKey="@";XMLStringifier.prototype.convertPIKey="?";XMLStringifier.prototype.convertTextKey="#text";XMLStringifier.prototype.convertCDataKey="#cdata";XMLStringifier.prototype.convertCommentKey="#comment";XMLStringifier.prototype.convertRawKey="#raw";XMLStringifier.prototype.assertLegalChar=function(e){var t,r;if(this.options.noValidation){return e}t="";if(this.options.version==="1.0"){t=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(r=e.match(t)){throw new Error("Invalid character in string: "+e+" at index "+r.index)}}else if(this.options.version==="1.1"){t=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;if(r=e.match(t)){throw new Error("Invalid character in string: "+e+" at index "+r.index)}}return e};XMLStringifier.prototype.assertLegalName=function(e){var t;if(this.options.noValidation){return e}this.assertLegalChar(e);t=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/;if(!e.match(t)){throw new Error("Invalid character in name")}return e};XMLStringifier.prototype.textEscape=function(e){var t;if(this.options.noValidation){return e}t=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return e.replace(t,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")};XMLStringifier.prototype.attEscape=function(e){var t;if(this.options.noValidation){return e}t=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return e.replace(t,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")};return XMLStringifier}()}).call(this)},7389:function(e,t,r){(function(){var t,n,i,extend=function(e,t){for(var r in t){if(s.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},s={}.hasOwnProperty;t=r(1259);n=r(8363);e.exports=i=function(e){extend(XMLText,e);function XMLText(e,r){XMLText.__super__.constructor.call(this,e);if(r==null){throw new Error("Missing element text. "+this.debugInfo())}this.name="#text";this.type=t.Text;this.value=this.stringify.text(r)}Object.defineProperty(XMLText.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}});Object.defineProperty(XMLText.prototype,"wholeText",{get:function(){var e,t,r;r="";t=this.previousSibling;while(t){r=t.data+r;t=t.previousSibling}r+=this.data;e=this.nextSibling;while(e){r=r+e.data;e=e.nextSibling}return r}});XMLText.prototype.clone=function(){return Object.create(this)};XMLText.prototype.toString=function(e){return this.options.writer.text(this,this.options.writer.filterOptions(e))};XMLText.prototype.splitText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};XMLText.prototype.replaceWholeText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())};return XMLText}(n)}).call(this)},6664:function(e,t,r){(function(){var t,n,i,s,o,a,u,c,l,d,f,h,p,m,y,g,b,w={}.hasOwnProperty;b=r(7871).assign;t=r(1259);l=r(4684);d=r(5522);i=r(3705);s=r(9677);h=r(2520);m=r(8382);y=r(7389);p=r(7777);f=r(6916);o=r(5145);a=r(362);u=r(7847);c=r(5678);n=r(5471);e.exports=g=function(){function XMLWriterBase(e){var t,r,n;e||(e={});this.options=e;r=e.writer||{};for(t in r){if(!w.call(r,t))continue;n=r[t];this["_"+t]=this[t];this[t]=n}}XMLWriterBase.prototype.filterOptions=function(e){var t,r,i,s,o,a,u,c;e||(e={});e=b({},this.options,e);t={writer:this};t.pretty=e.pretty||false;t.allowEmpty=e.allowEmpty||false;t.indent=(r=e.indent)!=null?r:" ";t.newline=(i=e.newline)!=null?i:"\n";t.offset=(s=e.offset)!=null?s:0;t.dontPrettyTextNodes=(o=(a=e.dontPrettyTextNodes)!=null?a:e.dontprettytextnodes)!=null?o:0;t.spaceBeforeSlash=(u=(c=e.spaceBeforeSlash)!=null?c:e.spacebeforeslash)!=null?u:"";if(t.spaceBeforeSlash===true){t.spaceBeforeSlash=" "}t.suppressPrettyCount=0;t.user={};t.state=n.None;return t};XMLWriterBase.prototype.indent=function(e,t,r){var n;if(!t.pretty||t.suppressPrettyCount){return""}else if(t.pretty){n=(r||0)+t.offset+1;if(n>0){return new Array(n).join(t.indent)}}return""};XMLWriterBase.prototype.endline=function(e,t,r){if(!t.pretty||t.suppressPrettyCount){return""}else{return t.newline}};XMLWriterBase.prototype.attribute=function(e,t,r){var n;this.openAttribute(e,t,r);n=" "+e.name+'="'+e.value+'"';this.closeAttribute(e,t,r);return n};XMLWriterBase.prototype.cdata=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r)+"<![CDATA[";t.state=n.InsideTag;i+=e.value;t.state=n.CloseTag;i+="]]>"+this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.comment=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r)+"\x3c!-- ";t.state=n.InsideTag;i+=e.value;t.state=n.CloseTag;i+=" --\x3e"+this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.declaration=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r)+"<?xml";t.state=n.InsideTag;i+=' version="'+e.version+'"';if(e.encoding!=null){i+=' encoding="'+e.encoding+'"'}if(e.standalone!=null){i+=' standalone="'+e.standalone+'"'}t.state=n.CloseTag;i+=t.spaceBeforeSlash+"?>";i+=this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.docType=function(e,t,r){var i,s,o,a,u;r||(r=0);this.openNode(e,t,r);t.state=n.OpenTag;a=this.indent(e,t,r);a+="<!DOCTYPE "+e.root().name;if(e.pubID&&e.sysID){a+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'}else if(e.sysID){a+=' SYSTEM "'+e.sysID+'"'}if(e.children.length>0){a+=" [";a+=this.endline(e,t,r);t.state=n.InsideTag;u=e.children;for(s=0,o=u.length;s<o;s++){i=u[s];a+=this.writeChildNode(i,t,r+1)}t.state=n.CloseTag;a+="]"}t.state=n.CloseTag;a+=t.spaceBeforeSlash+">";a+=this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return a};XMLWriterBase.prototype.element=function(e,r,i){var s,o,a,u,c,l,d,f,h,p,m,y,g,b;i||(i=0);p=false;m="";this.openNode(e,r,i);r.state=n.OpenTag;m+=this.indent(e,r,i)+"<"+e.name;y=e.attribs;for(h in y){if(!w.call(y,h))continue;s=y[h];m+=this.attribute(s,r,i)}a=e.children.length;u=a===0?null:e.children[0];if(a===0||e.children.every((function(e){return(e.type===t.Text||e.type===t.Raw)&&e.value===""}))){if(r.allowEmpty){m+=">";r.state=n.CloseTag;m+="</"+e.name+">"+this.endline(e,r,i)}else{r.state=n.CloseTag;m+=r.spaceBeforeSlash+"/>"+this.endline(e,r,i)}}else if(r.pretty&&a===1&&(u.type===t.Text||u.type===t.Raw)&&u.value!=null){m+=">";r.state=n.InsideTag;r.suppressPrettyCount++;p=true;m+=this.writeChildNode(u,r,i+1);r.suppressPrettyCount--;p=false;r.state=n.CloseTag;m+="</"+e.name+">"+this.endline(e,r,i)}else{if(r.dontPrettyTextNodes){g=e.children;for(c=0,d=g.length;c<d;c++){o=g[c];if((o.type===t.Text||o.type===t.Raw)&&o.value!=null){r.suppressPrettyCount++;p=true;break}}}m+=">"+this.endline(e,r,i);r.state=n.InsideTag;b=e.children;for(l=0,f=b.length;l<f;l++){o=b[l];m+=this.writeChildNode(o,r,i+1)}r.state=n.CloseTag;m+=this.indent(e,r,i)+"</"+e.name+">";if(p){r.suppressPrettyCount--}m+=this.endline(e,r,i);r.state=n.None}this.closeNode(e,r,i);return m};XMLWriterBase.prototype.writeChildNode=function(e,r,n){switch(e.type){case t.CData:return this.cdata(e,r,n);case t.Comment:return this.comment(e,r,n);case t.Element:return this.element(e,r,n);case t.Raw:return this.raw(e,r,n);case t.Text:return this.text(e,r,n);case t.ProcessingInstruction:return this.processingInstruction(e,r,n);case t.Dummy:return"";case t.Declaration:return this.declaration(e,r,n);case t.DocType:return this.docType(e,r,n);case t.AttributeDeclaration:return this.dtdAttList(e,r,n);case t.ElementDeclaration:return this.dtdElement(e,r,n);case t.EntityDeclaration:return this.dtdEntity(e,r,n);case t.NotationDeclaration:return this.dtdNotation(e,r,n);default:throw new Error("Unknown XML node type: "+e.constructor.name)}};XMLWriterBase.prototype.processingInstruction=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r)+"<?";t.state=n.InsideTag;i+=e.target;if(e.value){i+=" "+e.value}t.state=n.CloseTag;i+=t.spaceBeforeSlash+"?>";i+=this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.raw=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r);t.state=n.InsideTag;i+=e.value;t.state=n.CloseTag;i+=this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.text=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r);t.state=n.InsideTag;i+=e.value;t.state=n.CloseTag;i+=this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.dtdAttList=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r)+"<!ATTLIST";t.state=n.InsideTag;i+=" "+e.elementName+" "+e.attributeName+" "+e.attributeType;if(e.defaultValueType!=="#DEFAULT"){i+=" "+e.defaultValueType}if(e.defaultValue){i+=' "'+e.defaultValue+'"'}t.state=n.CloseTag;i+=t.spaceBeforeSlash+">"+this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.dtdElement=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r)+"<!ELEMENT";t.state=n.InsideTag;i+=" "+e.name+" "+e.value;t.state=n.CloseTag;i+=t.spaceBeforeSlash+">"+this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.dtdEntity=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r)+"<!ENTITY";t.state=n.InsideTag;if(e.pe){i+=" %"}i+=" "+e.name;if(e.value){i+=' "'+e.value+'"'}else{if(e.pubID&&e.sysID){i+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'}else if(e.sysID){i+=' SYSTEM "'+e.sysID+'"'}if(e.nData){i+=" NDATA "+e.nData}}t.state=n.CloseTag;i+=t.spaceBeforeSlash+">"+this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.dtdNotation=function(e,t,r){var i;this.openNode(e,t,r);t.state=n.OpenTag;i=this.indent(e,t,r)+"<!NOTATION";t.state=n.InsideTag;i+=" "+e.name;if(e.pubID&&e.sysID){i+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'}else if(e.pubID){i+=' PUBLIC "'+e.pubID+'"'}else if(e.sysID){i+=' SYSTEM "'+e.sysID+'"'}t.state=n.CloseTag;i+=t.spaceBeforeSlash+">"+this.endline(e,t,r);t.state=n.None;this.closeNode(e,t,r);return i};XMLWriterBase.prototype.openNode=function(e,t,r){};XMLWriterBase.prototype.closeNode=function(e,t,r){};XMLWriterBase.prototype.openAttribute=function(e,t,r){};XMLWriterBase.prototype.closeAttribute=function(e,t,r){};return XMLWriterBase}()}).call(this)},1203:function(e,t,r){(function(){var t,n,i,s,o,a,u,c,l,d;d=r(7871),c=d.assign,l=d.isFunction;i=r(1926);s=r(6047);o=r(6698);u=r(160);a=r(5345);t=r(1259);n=r(5471);e.exports.create=function(e,t,r,n){var i,o;if(e==null){throw new Error("Root element needs a name.")}n=c({},t,r,n);i=new s(n);o=i.element(e);if(!n.headless){i.declaration(n);if(n.pubID!=null||n.sysID!=null){i.dtd(n)}}return o};e.exports.begin=function(e,t,r){var n;if(l(e)){n=[e,t],t=n[0],r=n[1];e={}}if(t){return new o(e,t,r)}else{return new s(e)}};e.exports.stringWriter=function(e){return new u(e)};e.exports.streamWriter=function(e,t){return new a(e,t)};e.exports.implementation=new i;e.exports.nodeType=t;e.exports.writerState=n}).call(this)},6982:function(e){"use strict";e.exports=require("crypto")},4434:function(e){"use strict";e.exports=require("events")},9896:function(e){"use strict";e.exports=require("fs")},8611:function(e){"use strict";e.exports=require("http")},5692:function(e){"use strict";e.exports=require("https")},1742:function(e){"use strict";e.exports=require("lodash")},857:function(e){"use strict";e.exports=require("os")},6928:function(e){"use strict";e.exports=require("path")},3480:function(e){"use strict";e.exports=require("querystring")},2203:function(e){"use strict";e.exports=require("stream")},3193:function(e){"use strict";e.exports=require("string_decoder")},3557:function(e){"use strict";e.exports=require("timers")},2018:function(e){"use strict";e.exports=require("tty")},7016:function(e){"use strict";e.exports=require("url")},9023:function(e){"use strict";e.exports=require("util")},3106:function(e){"use strict";e.exports=require("zlib")},9343:function(e){"use strict";e.exports=JSON.parse('{"name":"@alicloud/credentials","version":"2.4.4","description":"alibaba cloud node.js sdk credentials","main":"dist/src/client.js","scripts":{"prepublishOnly":"tsc","build":"tsc","lint":"eslint --fix ./src --ext .ts","test":"mocha -b -r ts-node/register test/**/*.test.ts test/*.test.ts --timeout 15000","test-dev":"nyc -e .ts -r=html -r=text -r=lcov mocha -b -r ts-node/register","cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","ci":"npm run cov","integration":"mocha -b -r ts-node/register -R spec integration/*.test.ts","clean":"rm -rf coverage"},"repository":{"type":"git","url":"git+https://github.com/aliyun/nodejs-credentials.git"},"keywords":["alibaba cloud","sdk","credentials"],"author":"Alibaba Cloud SDK","license":"MIT","devDependencies":{"@types/debug":"^4.1.12","@types/expect.js":"^0.3.29","@types/ini":"^1.3.30","@types/mocha":"^10.0.6","@types/node":"^20.11.10","@types/rewire":"^2.5.28","@typescript-eslint/eslint-plugin":"^6.18.1","@typescript-eslint/parser":"^6.18.1","eslint":"^8.56.0","expect.js":"^0.3.1","mm":"^2.4.1","mocha":"^10.1.0","nyc":"^15.1.0","rewire":"^7.0.0","ts-node":"^10.9.2","typescript":"^4.7.4"},"dependencies":{"@alicloud/tea-typescript":"^1.8.0","httpx":"^2.3.3","ini":"^1.3.5","kitx":"^2.0.0"},"bugs":{"url":"https://github.com/aliyun/nodejs-credentials/issues"},"homepage":"https://github.com/aliyun/nodejs-credentials#readme","files":["src","dist"]}')}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={id:r,loaded:false,exports:{}};var s=true;try{e[r].call(i.exports,i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}i.loaded=true;return i.exports}!function(){__nccwpck_require__.nmd=function(e){e.paths=[];if(!e.children)e.children=[];return e}}();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(5462);module.exports=r})();
|