@zuplo/core 5.1754.0 → 5.1756.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.minified.js CHANGED
@@ -407,7 +407,7 @@ ${p}
407
407
  ${f}`;const h=`${o}/${e.region}/${n}/${dSn}`;const g=`${OCt}
408
408
  ${s}
409
409
  ${h}
410
- `+await e.crypto.sha256DigestHex(m);const _=await pSn(e.crypto,e.securityCredentials.secretAccessKey,o,e.region,n);const v=await vF(e.crypto,_,g);const S=`${OCt} Credential=${e.securityCredentials.accessKeyId}/${h}, SignedHeaders=${p}, Signature=${(0,PCt.fromArrayBufferToHex)(v)}`;return{amzDate:u.date?void 0:s,authorizationHeader:S,canonicalQuerystring:e.canonicalQuerystring}}a(fSn,"generateAuthenticationHeaderMap")});var ZTe=y(JX=>{"use strict";Object.defineProperty(JX,"__esModule",{value:true});JX.AwsClient=void 0;var mSn=NCt();var hSn=ME();var EF=class extends hSn.BaseExternalAccountClient{static{a(this,"AwsClient")}constructor(t,r){super(t,r);this.environmentId=t.credential_source.environment_id;this.regionUrl=t.credential_source.region_url;this.securityCredentialsUrl=t.credential_source.url;this.regionalCredVerificationUrl=t.credential_source.regional_cred_verification_url;this.imdsV2SessionTokenUrl=t.credential_source.imdsv2_session_token_url;this.awsRequestSigner=null;this.region="";this.validateEnvironmentId()}validateEnvironmentId(){var t;const r=(t=this.environmentId)===null||t===void 0?void 0:t.match(/^(aws)(\d+)$/);if(!r||!this.regionalCredVerificationUrl){throw new Error('No valid AWS "credential_source" provided')}else if(parseInt(r[2],10)!==1){throw new Error(`aws version "${r[2]}" is not supported in the current build.`)}}async retrieveSubjectToken(){if(!this.awsRequestSigner){const i={};if(this.shouldUseMetadataServer()&&this.imdsV2SessionTokenUrl){i["x-aws-ec2-metadata-token"]=await this.getImdsV2SessionToken()}this.region=await this.getAwsRegion(i);this.awsRequestSigner=new mSn.AwsRequestSigner(async()=>{if(this.securityCredentialsFromEnv){return this.securityCredentialsFromEnv}const s=await this.getAwsRoleName(i);const o=await this.getAwsSecurityCredentials(s,i);return{accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,token:o.Token}},this.region)}const t=await this.awsRequestSigner.getRequestOptions({url:this.regionalCredVerificationUrl.replace("{region}",this.region),method:"POST"});const r=[];const n=Object.assign({"x-goog-cloud-target-resource":this.audience},t.headers);for(const i in n){r.push({key:i,value:n[i]})}return encodeURIComponent(JSON.stringify({url:t.url,method:t.method,headers:r}))}async getImdsV2SessionToken(){const t={url:this.imdsV2SessionTokenUrl,method:"PUT",responseType:"text",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"300"}};const r=await this.transporter.request(t);return r.data}async getAwsRegion(t){if(this.regionFromEnv){return this.regionFromEnv}if(!this.regionUrl){throw new Error('Unable to determine AWS region due to missing "options.credential_source.region_url"')}const r={url:this.regionUrl,method:"GET",responseType:"text",headers:t};const n=await this.transporter.request(r);return n.data.substr(0,n.data.length-1)}async getAwsRoleName(t){if(!this.securityCredentialsUrl){throw new Error('Unable to determine AWS role name due to missing "options.credential_source.url"')}const r={url:this.securityCredentialsUrl,method:"GET",responseType:"text",headers:t};const n=await this.transporter.request(r);return n.data}async getAwsSecurityCredentials(t,r){const n=await this.transporter.request({url:`${this.securityCredentialsUrl}/${t}`,responseType:"json",headers:r});return n.data}shouldUseMetadataServer(){return!this.regionFromEnv||!this.securityCredentialsFromEnv}get regionFromEnv(){return process.env["AWS_REGION"]||process.env["AWS_DEFAULT_REGION"]||null}get securityCredentialsFromEnv(){if(process.env["AWS_ACCESS_KEY_ID"]&&process.env["AWS_SECRET_ACCESS_KEY"]){return{accessKeyId:process.env["AWS_ACCESS_KEY_ID"],secretAccessKey:process.env["AWS_SECRET_ACCESS_KEY"],token:process.env["AWS_SESSION_TOKEN"]}}return null}};JX.AwsClient=EF;EF.AWS_EC2_METADATA_IPV4_ADDRESS="169.254.169.254";EF.AWS_EC2_METADATA_IPV6_ADDRESS="fd00:ec2::254"});var ixe=y(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:true});Do.InvalidSubjectTokenError=Do.InvalidMessageFieldError=Do.InvalidCodeFieldError=Do.InvalidTokenTypeFieldError=Do.InvalidExpirationTimeFieldError=Do.InvalidSuccessFieldError=Do.InvalidVersionFieldError=Do.ExecutableResponseError=Do.ExecutableResponse=void 0;var QX="urn:ietf:params:oauth:token-type:saml2";var exe="urn:ietf:params:oauth:token-type:id_token";var txe="urn:ietf:params:oauth:token-type:jwt";var rxe=class{static{a(this,"ExecutableResponse")}constructor(t){if(!t.version){throw new ZX("Executable response must contain a 'version' field.")}if(t.success===void 0){throw new eJ("Executable response must contain a 'success' field.")}this.version=t.version;this.success=t.success;if(this.success){this.expirationTime=t.expiration_time;this.tokenType=t.token_type;if(this.tokenType!==QX&&this.tokenType!==exe&&this.tokenType!==txe){throw new tJ(`Executable response must contain a 'token_type' field when successful and it must be one of ${exe}, ${txe}, or ${QX}.`)}if(this.tokenType===QX){if(!t.saml_response){throw new bF(`Executable response must contain a 'saml_response' field when token_type=${QX}.`)}this.subjectToken=t.saml_response}else{if(!t.id_token){throw new bF(`Executable response must contain a 'id_token' field when token_type=${exe} or ${txe}.`)}this.subjectToken=t.id_token}}else{if(!t.code){throw new rJ("Executable response must contain a 'code' field when unsuccessful.")}if(!t.message){throw new nJ("Executable response must contain a 'message' field when unsuccessful.")}this.errorCode=t.code;this.errorMessage=t.message}}isValid(){return!this.isExpired()&&this.success}isExpired(){return this.expirationTime!==void 0&&this.expirationTime<Math.round(Date.now()/1e3)}};Do.ExecutableResponse=rxe;var tg=class extends Error{static{a(this,"ExecutableResponseError")}constructor(t){super(t);Object.setPrototypeOf(this,new.target.prototype)}};Do.ExecutableResponseError=tg;var ZX=class extends tg{static{a(this,"InvalidVersionFieldError")}};Do.InvalidVersionFieldError=ZX;var eJ=class extends tg{static{a(this,"InvalidSuccessFieldError")}};Do.InvalidSuccessFieldError=eJ;var nxe=class extends tg{static{a(this,"InvalidExpirationTimeFieldError")}};Do.InvalidExpirationTimeFieldError=nxe;var tJ=class extends tg{static{a(this,"InvalidTokenTypeFieldError")}};Do.InvalidTokenTypeFieldError=tJ;var rJ=class extends tg{static{a(this,"InvalidCodeFieldError")}};Do.InvalidCodeFieldError=rJ;var nJ=class extends tg{static{a(this,"InvalidMessageFieldError")}};Do.InvalidMessageFieldError=nJ;var bF=class extends tg{static{a(this,"InvalidSubjectTokenError")}};Do.InvalidSubjectTokenError=bF});var ICt=y(iJ=>{"use strict";Object.defineProperty(iJ,"__esModule",{value:true});iJ.PluggableAuthHandler=void 0;var gSn=sJ();var JA=ixe();var ySn=require("child_process");var sxe=require("fs");var axe=class e{static{a(this,"PluggableAuthHandler")}constructor(t){if(!t.command){throw new Error("No command provided.")}this.commandComponents=e.parseCommand(t.command);this.timeoutMillis=t.timeoutMillis;if(!this.timeoutMillis){throw new Error("No timeoutMillis provided.")}this.outputFile=t.outputFile}retrieveResponseFromExecutable(t){return new Promise((r,n)=>{const i=ySn.spawn(this.commandComponents[0],this.commandComponents.slice(1),{env:{...process.env,...Object.fromEntries(t)}});let s="";i.stdout.on("data",u=>{s+=u});i.stderr.on("data",u=>{s+=u});const o=setTimeout(()=>{i.removeAllListeners();i.kill();return n(new Error("The executable failed to finish within the timeout specified."))},this.timeoutMillis);i.on("close",u=>{clearTimeout(o);if(u===0){try{const l=JSON.parse(s);const c=new JA.ExecutableResponse(l);return r(c)}catch(l){if(l instanceof JA.ExecutableResponseError){return n(l)}return n(new JA.ExecutableResponseError(`The executable returned an invalid response: ${s}`))}}else{return n(new gSn.ExecutableError(s,u.toString()))}})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0){return void 0}let t;try{t=await sxe.promises.realpath(this.outputFile)}catch(n){return void 0}if(!(await sxe.promises.lstat(t)).isFile()){return void 0}const r=await sxe.promises.readFile(t,{encoding:"utf8"});if(r===""){return void 0}try{const n=JSON.parse(r);const i=new JA.ExecutableResponse(n);if(i.isValid()){return new JA.ExecutableResponse(n)}return void 0}catch(n){if(n instanceof JA.ExecutableResponseError){throw n}throw new JA.ExecutableResponseError(`The output file contained an invalid response: ${r}`)}}static parseCommand(t){const r=t.match(/(?:[^\s"]+|"[^"]*")+/g);if(!r){throw new Error(`Provided command: "${t}" could not be parsed.`)}for(let n=0;n<r.length;n++){if(r[n][0]==='"'&&r[n].slice(-1)==='"'){r[n]=r[n].slice(1,-1)}}return r}};iJ.PluggableAuthHandler=axe});var sJ=y(zO=>{"use strict";Object.defineProperty(zO,"__esModule",{value:true});zO.PluggableAuthClient=zO.ExecutableError=void 0;var _Sn=ME();var vSn=ixe();var ESn=ICt();var aJ=class extends Error{static{a(this,"ExecutableError")}constructor(t,r){super(`The executable failed with exit code: ${r} and error message: ${t}.`);this.code=r;Object.setPrototypeOf(this,new.target.prototype)}};zO.ExecutableError=aJ;var bSn=30*1e3;var kCt=5*1e3;var DCt=120*1e3;var SSn="GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES";var LCt=1;var oxe=class extends _Sn.BaseExternalAccountClient{static{a(this,"PluggableAuthClient")}constructor(t,r){super(t,r);if(!t.credential_source.executable){throw new Error('No valid Pluggable Auth "credential_source" provided.')}this.command=t.credential_source.executable.command;if(!this.command){throw new Error('No valid Pluggable Auth "credential_source" provided.')}if(t.credential_source.executable.timeout_millis===void 0){this.timeoutMillis=bSn}else{this.timeoutMillis=t.credential_source.executable.timeout_millis;if(this.timeoutMillis<kCt||this.timeoutMillis>DCt){throw new Error(`Timeout must be between ${kCt} and ${DCt} milliseconds.`)}}this.outputFile=t.credential_source.executable.output_file;this.handler=new ESn.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile})}async retrieveSubjectToken(){if(process.env[SSn]!=="1"){throw new Error("Pluggable Auth executables need to be explicitly allowed to run by setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment Variable to 1.")}let t=void 0;if(this.outputFile){t=await this.handler.retrieveCachedResponse()}if(!t){const r=new Map;r.set("GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE",this.audience);r.set("GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE",this.subjectTokenType);r.set("GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE","0");if(this.outputFile){r.set("GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE",this.outputFile)}const n=this.getServiceAccountEmail();if(n){r.set("GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL",n)}t=await this.handler.retrieveResponseFromExecutable(r)}if(t.version>LCt){throw new Error(`Version of executable is not currently supported, maximum supported version is ${LCt}.`)}if(!t.success){throw new aJ(t.errorMessage,t.errorCode)}if(this.outputFile){if(!t.expirationTime){throw new vSn.InvalidExpirationTimeFieldError("The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.")}}if(t.isExpired()){throw new Error("Executable response is expired.")}return t.subjectToken}};zO.PluggableAuthClient=oxe});var lxe=y(oJ=>{"use strict";Object.defineProperty(oJ,"__esModule",{value:true});oJ.ExternalAccountClient=void 0;var ASn=ME();var CSn=JTe();var wSn=ZTe();var TSn=sJ();var uxe=class{static{a(this,"ExternalAccountClient")}constructor(){throw new Error("ExternalAccountClients should be initialized via: ExternalAccountClient.fromJSON(), directly via explicit constructors, eg. new AwsClient(options), new IdentityPoolClient(options), newPluggableAuthClientOptions, or via new GoogleAuth(options).getClient()")}static fromJSON(t,r){var n,i;if(t&&t.type===ASn.EXTERNAL_ACCOUNT_TYPE){if((n=t.credential_source)===null||n===void 0?void 0:n.environment_id){return new wSn.AwsClient(t,r)}else if((i=t.credential_source)===null||i===void 0?void 0:i.executable){return new TSn.PluggableAuthClient(t,r)}else{return new CSn.IdentityPoolClient(t,r)}}else{return null}}};oJ.ExternalAccountClient=uxe});var BCt=y(KO=>{"use strict";Object.defineProperty(KO,"__esModule",{value:true});KO.ExternalAccountAuthorizedUserClient=KO.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var xSn=TO();var FCt=UTe();var RSn=Ey();var OSn=require("stream");var PSn=ME();KO.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE="external_account_authorized_user";var cxe=class extends FCt.OAuthClientAuthHandler{static{a(this,"ExternalAccountAuthorizedUserHandler")}constructor(t,r,n){super(n);this.url=t;this.transporter=r}async refreshToken(t,r){const n=new URLSearchParams({grant_type:"refresh_token",refresh_token:t});const i={"Content-Type":"application/x-www-form-urlencoded",...r};const s={url:this.url,method:"POST",headers:i,data:n.toString(),responseType:"json"};this.applyClientAuthenticationOptions(s);try{const o=await this.transporter.request(s);const u=o.data;u.res=o;return u}catch(o){if(o instanceof RSn.GaxiosError&&o.response){throw(0,FCt.getErrorFromOAuthErrorResponse)(o.response.data,o)}throw o}}};var dxe=class extends xSn.AuthClient{static{a(this,"ExternalAccountAuthorizedUserClient")}constructor(t,r){super();this.refreshToken=t.refresh_token;const n={confidentialClientType:"basic",clientId:t.client_id,clientSecret:t.client_secret};this.externalAccountAuthorizedUserHandler=new cxe(t.token_url,this.transporter,n);this.cachedAccessToken=null;this.quotaProjectId=t.quota_project_id;if(typeof(r===null||r===void 0?void 0:r.eagerRefreshThresholdMillis)!=="number"){this.eagerRefreshThresholdMillis=PSn.EXPIRATION_TIME_OFFSET}else{this.eagerRefreshThresholdMillis=r.eagerRefreshThresholdMillis}this.forceRefreshOnFailure=!!(r===null||r===void 0?void 0:r.forceRefreshOnFailure)}async getAccessToken(){if(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken)){await this.refreshAccessTokenAsync()}return{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){const t=await this.getAccessToken();const r={Authorization:`Bearer ${t.token}`};return this.addSharedMetadataHeaders(r)}request(t,r){if(r){this.requestAsync(t).then(n=>r(null,n),n=>{return r(n,n.response)})}else{return this.requestAsync(t)}}async requestAsync(t,r=false){let n;try{const i=await this.getRequestHeaders();t.headers=t.headers||{};if(i&&i["x-goog-user-project"]){t.headers["x-goog-user-project"]=i["x-goog-user-project"]}if(i&&i.Authorization){t.headers.Authorization=i.Authorization}n=await this.transporter.request(t)}catch(i){const s=i.response;if(s){const o=s.status;const u=s.config.data instanceof OSn.Readable;const l=o===401||o===403;if(!r&&l&&!u&&this.forceRefreshOnFailure){await this.refreshAccessTokenAsync();return await this.requestAsync(t,true)}}throw i}return n}async refreshAccessTokenAsync(){const t=await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken);this.cachedAccessToken={access_token:t.access_token,expiry_date:new Date().getTime()+t.expires_in*1e3,res:t.res};if(t.refresh_token!==void 0){this.refreshToken=t.refresh_token}return this.cachedAccessToken}isExpired(t){const r=new Date().getTime();return t.expiry_date?r>=t.expiry_date-this.eagerRefreshThresholdMillis:false}};KO.ExternalAccountAuthorizedUserClient=dxe});var UCt=y(YO=>{"use strict";Object.defineProperty(YO,"__esModule",{value:true});YO.GoogleAuth=YO.CLOUD_SDK_CLIENT_ID=void 0;var NSn=require("child_process");var SF=require("fs");var pxe=eX();var ISn=require("os");var fxe=require("path");var kSn=CO();var DSn=rF();var LSn=Swe();var FSn=Cwe();var BSn=wwe();var WO=DTe();var mxe=FTe();var uJ=MTe();var MSn=lxe();var AF=ME();var MCt=BCt();YO.CLOUD_SDK_CLIENT_ID="764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com";var qCt={NO_PROJECT_ID_FOUND:"Unable to detect a Project Id in the current environment. \nTo learn more about authentication and Google APIs, visit: \nhttps://cloud.google.com/docs/authentication/getting-started"};var lJ=class{static{a(this,"GoogleAuth")}get isGCE(){return this.checkIsGCE}constructor(t){this.checkIsGCE=void 0;this.jsonContent=null;this.cachedCredential=null;t=t||{};this._cachedProjectId=t.projectId||null;this.cachedCredential=t.authClient||null;this.keyFilename=t.keyFilename||t.keyFile;this.scopes=t.scopes;this.jsonContent=t.credentials||null;this.clientOptions=t.clientOptions}setGapicJWTValues(t){t.defaultServicePath=this.defaultServicePath;t.useJWTAccessWithScope=this.useJWTAccessWithScope;t.defaultScopes=this.defaultScopes}getProjectId(t){if(t){this.getProjectIdAsync().then(r=>t(null,r),t)}else{return this.getProjectIdAsync()}}async getProjectIdOptional(){try{return await this.getProjectId()}catch(t){if(t instanceof Error&&t.message===qCt.NO_PROJECT_ID_FOUND){return null}else{throw t}}}async findAndCacheProjectId(){let t=null;t||(t=await this.getProductionProjectId());t||(t=await this.getFileProjectId());t||(t=await this.getDefaultServiceProjectId());t||(t=await this.getGCEProjectId());t||(t=await this.getExternalAccountClientProjectId());if(t){this._cachedProjectId=t;return t}else{throw new Error(qCt.NO_PROJECT_ID_FOUND)}}async getProjectIdAsync(){if(this._cachedProjectId){return this._cachedProjectId}if(!this._findProjectIdPromise){this._findProjectIdPromise=this.findAndCacheProjectId()}return this._findProjectIdPromise}getAnyScopes(){return this.scopes||this.defaultScopes}getApplicationDefault(t={},r){let n;if(typeof t==="function"){r=t}else{n=t}if(r){this.getApplicationDefaultAsync(n).then(i=>r(null,i.credential,i.projectId),r)}else{return this.getApplicationDefaultAsync(n)}}async getApplicationDefaultAsync(t={}){if(this.cachedCredential){return await this.prepareAndCacheADC(this.cachedCredential)}const r=process.env["GOOGLE_CLOUD_QUOTA_PROJECT"];let n;n=await this._tryGetApplicationCredentialsFromEnvironmentVariable(t);if(n){if(n instanceof WO.JWT){n.scopes=this.scopes}else if(n instanceof AF.BaseExternalAccountClient){n.scopes=this.getAnyScopes()}return await this.prepareAndCacheADC(n,r)}n=await this._tryGetApplicationCredentialsFromWellKnownFile(t);if(n){if(n instanceof WO.JWT){n.scopes=this.scopes}else if(n instanceof AF.BaseExternalAccountClient){n.scopes=this.getAnyScopes()}return await this.prepareAndCacheADC(n,r)}let i;try{i=await this._checkIsGCE()}catch(s){if(s instanceof Error){s.message=`Unexpected error determining execution environment: ${s.message}`}throw s}if(!i){throw new Error("Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.")}t.scopes=this.getAnyScopes();return await this.prepareAndCacheADC(new LSn.Compute(t),r)}async prepareAndCacheADC(t,r){const n=await this.getProjectIdOptional();if(r){t.quotaProjectId=r}this.cachedCredential=t;return{credential:t,projectId:n}}async _checkIsGCE(){if(this.checkIsGCE===void 0){this.checkIsGCE=await pxe.isAvailable()}return this.checkIsGCE}async _tryGetApplicationCredentialsFromEnvironmentVariable(t){const r=process.env["GOOGLE_APPLICATION_CREDENTIALS"]||process.env["google_application_credentials"];if(!r||r.length===0){return null}try{return this._getApplicationCredentialsFromFilePath(r,t)}catch(n){if(n instanceof Error){n.message=`Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${n.message}`}throw n}}async _tryGetApplicationCredentialsFromWellKnownFile(t){let r=null;if(this._isWindows()){r=process.env["APPDATA"]}else{const i=process.env["HOME"];if(i){r=fxe.join(i,".config")}}if(r){r=fxe.join(r,"gcloud","application_default_credentials.json");if(!SF.existsSync(r)){r=null}}if(!r){return null}const n=await this._getApplicationCredentialsFromFilePath(r,t);return n}async _getApplicationCredentialsFromFilePath(t,r={}){if(!t||t.length===0){throw new Error("The file path is invalid.")}try{t=SF.realpathSync(t);if(!SF.lstatSync(t).isFile()){throw new Error}}catch(i){if(i instanceof Error){i.message=`The file at ${t} does not exist, or it is not a file. ${i.message}`}throw i}const n=SF.createReadStream(t);return this.fromStream(n,r)}fromImpersonatedJSON(t){var r,n,i,s;if(!t){throw new Error("Must pass in a JSON object containing an impersonated refresh token")}if(t.type!==uJ.IMPERSONATED_ACCOUNT_TYPE){throw new Error(`The incoming JSON object does not have the "${uJ.IMPERSONATED_ACCOUNT_TYPE}" type`)}if(!t.source_credentials){throw new Error("The incoming JSON object does not contain a source_credentials field")}if(!t.service_account_impersonation_url){throw new Error("The incoming JSON object does not contain a service_account_impersonation_url field")}const o=new mxe.UserRefreshClient(t.source_credentials.client_id,t.source_credentials.client_secret,t.source_credentials.refresh_token);const u=(n=(r=/(?<target>[^/]+):generateAccessToken$/.exec(t.service_account_impersonation_url))===null||r===void 0?void 0:r.groups)===null||n===void 0?void 0:n.target;if(!u){throw new RangeError(`Cannot extract target principal from ${t.service_account_impersonation_url}`)}const l=(i=this.getAnyScopes())!==null&&i!==void 0?i:[];const c=new uJ.Impersonated({delegates:(s=t.delegates)!==null&&s!==void 0?s:[],sourceClient:o,targetPrincipal:u,targetScopes:Array.isArray(l)?l:[l]});return c}fromJSON(t,r={}){let n;r=r||{};if(t.type===mxe.USER_REFRESH_ACCOUNT_TYPE){n=new mxe.UserRefreshClient(r);n.fromJSON(t)}else if(t.type===uJ.IMPERSONATED_ACCOUNT_TYPE){n=this.fromImpersonatedJSON(t)}else if(t.type===AF.EXTERNAL_ACCOUNT_TYPE){n=MSn.ExternalAccountClient.fromJSON(t,r);n.scopes=this.getAnyScopes()}else if(t.type===MCt.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE){n=new MCt.ExternalAccountAuthorizedUserClient(t,r)}else{r.scopes=this.scopes;n=new WO.JWT(r);this.setGapicJWTValues(n);n.fromJSON(t)}return n}_cacheClientFromJSON(t,r){const n=this.fromJSON(t,r);this.jsonContent=t;this.cachedCredential=n;return n}fromStream(t,r={},n){let i={};if(typeof r==="function"){n=r}else{i=r}if(n){this.fromStreamAsync(t,i).then(s=>n(null,s),n)}else{return this.fromStreamAsync(t,i)}}fromStreamAsync(t,r){return new Promise((n,i)=>{if(!t){throw new Error("Must pass in a stream containing the Google auth settings.")}let s="";t.setEncoding("utf8").on("error",i).on("data",o=>s+=o).on("end",()=>{try{try{const o=JSON.parse(s);const u=this._cacheClientFromJSON(o,r);return n(u)}catch(o){if(!this.keyFilename)throw o;const u=new WO.JWT({...this.clientOptions,keyFile:this.keyFilename});this.cachedCredential=u;this.setGapicJWTValues(u);return n(u)}}catch(o){return i(o)}})})}fromAPIKey(t,r){r=r||{};const n=new WO.JWT(r);n.fromAPIKey(t);return n}_isWindows(){const t=ISn.platform();if(t&&t.length>=3){if(t.substring(0,3).toLowerCase()==="win"){return true}}return false}async getDefaultServiceProjectId(){return new Promise(t=>{(0,NSn.exec)("gcloud config config-helper --format json",(r,n)=>{if(!r&&n){try{const i=JSON.parse(n).configuration.properties.core.project;t(i);return}catch(i){}}t(null)})})}getProductionProjectId(){return process.env["GCLOUD_PROJECT"]||process.env["GOOGLE_CLOUD_PROJECT"]||process.env["gcloud_project"]||process.env["google_cloud_project"]}async getFileProjectId(){if(this.cachedCredential){return this.cachedCredential.projectId}if(this.keyFilename){const r=await this.getClient();if(r&&r.projectId){return r.projectId}}const t=await this._tryGetApplicationCredentialsFromEnvironmentVariable();if(t){return t.projectId}else{return null}}async getExternalAccountClientProjectId(){if(!this.jsonContent||this.jsonContent.type!==AF.EXTERNAL_ACCOUNT_TYPE){return null}const t=await this.getClient();return await t.getProjectId()}async getGCEProjectId(){try{const t=await pxe.project("project-id");return t}catch(t){return null}}getCredentials(t){if(t){this.getCredentialsAsync().then(r=>t(null,r),t)}else{return this.getCredentialsAsync()}}async getCredentialsAsync(){const t=await this.getClient();if(t instanceof AF.BaseExternalAccountClient){const i=t.getServiceAccountEmail();if(i){return{client_email:i}}}if(this.jsonContent){const i={client_email:this.jsonContent.client_email,private_key:this.jsonContent.private_key};return i}const r=await this._checkIsGCE();if(!r){throw new Error("Unknown error.")}const n=await pxe.instance({property:"service-accounts/",params:{recursive:"true"}});if(!n||!n.default||!n.default.email){throw new Error("Failure from metadata server.")}return{client_email:n.default.email}}async getClient(){if(!this.cachedCredential){if(this.jsonContent){this._cacheClientFromJSON(this.jsonContent,this.clientOptions)}else if(this.keyFilename){const t=fxe.resolve(this.keyFilename);const r=SF.createReadStream(t);await this.fromStreamAsync(r,this.clientOptions)}else{await this.getApplicationDefaultAsync(this.clientOptions)}}return this.cachedCredential}async getIdTokenClient(t){const r=await this.getClient();if(!("fetchIdToken"in r)){throw new Error("Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.")}return new FSn.IdTokenClient({targetAudience:t,idTokenProvider:r})}async getAccessToken(){const t=await this.getClient();return(await t.getAccessToken()).token}async getRequestHeaders(t){const r=await this.getClient();return r.getRequestHeaders(t)}async authorizeRequest(t){t=t||{};const r=t.url||t.uri;const n=await this.getClient();const i=await n.getRequestHeaders(r);t.headers=Object.assign(t.headers||{},i);return t}async request(t){const r=await this.getClient();return r.request(t)}getEnv(){return(0,BSn.getEnv)()}async sign(t){const r=await this.getClient();const n=(0,kSn.createCrypto)();if(r instanceof WO.JWT&&r.key){const s=await n.sign(r.key,t);return s}const i=await this.getCredentials();if(!i.client_email){throw new Error("Cannot sign data without `client_email`.")}return this.signBlob(n,i.client_email,t)}async signBlob(t,r,n){const i=`https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/${r}:signBlob`;const s=await this.request({method:"POST",url:i,data:{payload:t.encodeBase64StringUtf8(n)}});return s.data.signedBlob}};YO.GoogleAuth=lJ;lJ.DefaultTransporter=DSn.DefaultTransporter});var $Ct=y(cJ=>{"use strict";Object.defineProperty(cJ,"__esModule",{value:true});cJ.IAMAuth=void 0;var hxe=class{static{a(this,"IAMAuth")}constructor(t,r){this.selector=t;this.token=r;this.selector=t;this.token=r}getRequestHeaders(){return{"x-goog-iam-authority-selector":this.selector,"x-goog-iam-authorization-token":this.token}}};cJ.IAMAuth=hxe});var jCt=y(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:true});fh.DownscopedClient=fh.EXPIRATION_TIME_OFFSET=fh.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var qSn=require("stream");var USn=TO();var $Sn=jTe();var jSn="urn:ietf:params:oauth:grant-type:token-exchange";var GSn="urn:ietf:params:oauth:token-type:access_token";var HSn="urn:ietf:params:oauth:token-type:access_token";var VSn="https://sts.googleapis.com/v1/token";fh.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;fh.EXPIRATION_TIME_OFFSET=5*60*1e3;var gxe=class extends USn.AuthClient{static{a(this,"DownscopedClient")}constructor(t,r,n,i){super();this.authClient=t;this.credentialAccessBoundary=r;if(r.accessBoundary.accessBoundaryRules.length===0){throw new Error("At least one access boundary rule needs to be defined.")}else if(r.accessBoundary.accessBoundaryRules.length>fh.MAX_ACCESS_BOUNDARY_RULES_COUNT){throw new Error(`The provided access boundary has more than ${fh.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`)}for(const s of r.accessBoundary.accessBoundaryRules){if(s.availablePermissions.length===0){throw new Error("At least one permission should be defined in access boundary rules.")}}this.stsCredential=new $Sn.StsCredentials(VSn);this.cachedDownscopedAccessToken=null;if(typeof(n===null||n===void 0?void 0:n.eagerRefreshThresholdMillis)!=="number"){this.eagerRefreshThresholdMillis=fh.EXPIRATION_TIME_OFFSET}else{this.eagerRefreshThresholdMillis=n.eagerRefreshThresholdMillis}this.forceRefreshOnFailure=!!(n===null||n===void 0?void 0:n.forceRefreshOnFailure);this.quotaProjectId=i}setCredentials(t){if(!t.expiry_date){throw new Error("The access token expiry_date field is missing in the provided credentials.")}super.setCredentials(t);this.cachedDownscopedAccessToken=t}async getAccessToken(){if(!this.cachedDownscopedAccessToken||this.isExpired(this.cachedDownscopedAccessToken)){await this.refreshAccessTokenAsync()}return{token:this.cachedDownscopedAccessToken.access_token,expirationTime:this.cachedDownscopedAccessToken.expiry_date,res:this.cachedDownscopedAccessToken.res}}async getRequestHeaders(){const t=await this.getAccessToken();const r={Authorization:`Bearer ${t.token}`};return this.addSharedMetadataHeaders(r)}request(t,r){if(r){this.requestAsync(t).then(n=>r(null,n),n=>{return r(n,n.response)})}else{return this.requestAsync(t)}}async requestAsync(t,r=false){let n;try{const i=await this.getRequestHeaders();t.headers=t.headers||{};if(i&&i["x-goog-user-project"]){t.headers["x-goog-user-project"]=i["x-goog-user-project"]}if(i&&i.Authorization){t.headers.Authorization=i.Authorization}n=await this.transporter.request(t)}catch(i){const s=i.response;if(s){const o=s.status;const u=s.config.data instanceof qSn.Readable;const l=o===401||o===403;if(!r&&l&&!u&&this.forceRefreshOnFailure){await this.refreshAccessTokenAsync();return await this.requestAsync(t,true)}}throw i}return n}async refreshAccessTokenAsync(){var t;const r=(await this.authClient.getAccessToken()).token;const n={grantType:jSn,requestedTokenType:GSn,subjectToken:r,subjectTokenType:HSn};const i=await this.stsCredential.exchangeToken(n,void 0,this.credentialAccessBoundary);const s=((t=this.authClient.credentials)===null||t===void 0?void 0:t.expiry_date)||null;const o=i.expires_in?new Date().getTime()+i.expires_in*1e3:s;this.cachedDownscopedAccessToken={access_token:i.access_token,expiry_date:o,res:i.res};this.credentials={};Object.assign(this.credentials,this.cachedDownscopedAccessToken);delete this.credentials.res;this.emit("tokens",{refresh_token:null,expiry_date:this.cachedDownscopedAccessToken.expiry_date,access_token:this.cachedDownscopedAccessToken.access_token,token_type:"Bearer",id_token:null});return this.cachedDownscopedAccessToken}isExpired(t){const r=new Date().getTime();return t.expiry_date?r>=t.expiry_date-this.eagerRefreshThresholdMillis:false}};fh.DownscopedClient=gxe});var yxe=y(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:true});mn.GoogleAuth=mn.auth=mn.DefaultTransporter=mn.PluggableAuthClient=mn.DownscopedClient=mn.BaseExternalAccountClient=mn.ExternalAccountClient=mn.IdentityPoolClient=mn.AwsClient=mn.UserRefreshClient=mn.LoginTicket=mn.OAuth2Client=mn.CodeChallengeMethod=mn.Impersonated=mn.JWT=mn.JWTAccess=mn.IdTokenClient=mn.IAMAuth=mn.GCPEnv=mn.Compute=mn.AuthClient=void 0;var GCt=UCt();Object.defineProperty(mn,"GoogleAuth",{enumerable:true,get:function(){return GCt.GoogleAuth}});var zSn=TO();Object.defineProperty(mn,"AuthClient",{enumerable:true,get:function(){return zSn.AuthClient}});var KSn=Swe();Object.defineProperty(mn,"Compute",{enumerable:true,get:function(){return KSn.Compute}});var WSn=wwe();Object.defineProperty(mn,"GCPEnv",{enumerable:true,get:function(){return WSn.GCPEnv}});var YSn=$Ct();Object.defineProperty(mn,"IAMAuth",{enumerable:true,get:function(){return YSn.IAMAuth}});var XSn=Cwe();Object.defineProperty(mn,"IdTokenClient",{enumerable:true,get:function(){return XSn.IdTokenClient}});var JSn=ITe();Object.defineProperty(mn,"JWTAccess",{enumerable:true,get:function(){return JSn.JWTAccess}});var QSn=DTe();Object.defineProperty(mn,"JWT",{enumerable:true,get:function(){return QSn.JWT}});var ZSn=MTe();Object.defineProperty(mn,"Impersonated",{enumerable:true,get:function(){return ZSn.Impersonated}});var HCt=$A();Object.defineProperty(mn,"CodeChallengeMethod",{enumerable:true,get:function(){return HCt.CodeChallengeMethod}});Object.defineProperty(mn,"OAuth2Client",{enumerable:true,get:function(){return HCt.OAuth2Client}});var eAn=vwe();Object.defineProperty(mn,"LoginTicket",{enumerable:true,get:function(){return eAn.LoginTicket}});var tAn=FTe();Object.defineProperty(mn,"UserRefreshClient",{enumerable:true,get:function(){return tAn.UserRefreshClient}});var rAn=ZTe();Object.defineProperty(mn,"AwsClient",{enumerable:true,get:function(){return rAn.AwsClient}});var nAn=JTe();Object.defineProperty(mn,"IdentityPoolClient",{enumerable:true,get:function(){return nAn.IdentityPoolClient}});var iAn=lxe();Object.defineProperty(mn,"ExternalAccountClient",{enumerable:true,get:function(){return iAn.ExternalAccountClient}});var sAn=ME();Object.defineProperty(mn,"BaseExternalAccountClient",{enumerable:true,get:function(){return sAn.BaseExternalAccountClient}});var aAn=jCt();Object.defineProperty(mn,"DownscopedClient",{enumerable:true,get:function(){return aAn.DownscopedClient}});var oAn=sJ();Object.defineProperty(mn,"PluggableAuthClient",{enumerable:true,get:function(){return oAn.PluggableAuthClient}});var uAn=rF();Object.defineProperty(mn,"DefaultTransporter",{enumerable:true,get:function(){return uAn.DefaultTransporter}});var lAn=new GCt.GoogleAuth;mn.auth=lAn});var JO=y(XO=>{"use strict";var cAn=XO&&XO.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(XO,"__esModule",{value:true});XO.getServiceAccountIdToken=void 0;var dAn=yxe();var pAn=cAn(Bm());var fAn=new dAn.GoogleAuth;var VCt=new pAn.default({max:50,maxAge:1e3*60*50});async function mAn(e){let t=VCt.get(e);if(!t){const r=await fAn.getIdTokenClient(e);t=await r.idTokenProvider.fetchIdToken(e);VCt.set(e,t)}return t}a(mAn,"getServiceAccountIdToken");XO.getServiceAccountIdToken=mAn});var XCt=y(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:true});Df.mergeHeaders=Df.createFinalURL=Df.defaultBodySerializer=Df.defaultQuerySerializer=Df.createClient=void 0;var QO=ac();var hAn=JO();var gAn=/\/*$/;async function yAn(e){const{baseUrl:t,fetch:r=globalThis.fetch,querySerializer:n,bodySerializer:i,zuploExtensions:s,...o}=e;const u=s?.fastifyRequest.log;const l=s?.fastifyRequest.id;const c=s?.options?.userSub??s?.fastifyRequest.getUserSub();const d=new Headers({"zuplo-user":c,"zp-rid":l,...o.headers??{}});const p=await(0,hAn.getServiceAccountIdToken)(t);d.set("Authorization",`Bearer ${p}`);if(["GET","DELETE","HEAD","OPTIONS","TRACE"].includes(s.fastifyRequest.method)){}else{d.set("Content-Type","application/json")}async function f(m,h){const{headers:g,body:_,params:v={},parseAs:S="json",querySerializer:E=n??zCt,bodySerializer:b=i??KCt,...A}=h||{};const C=WCt(m,{baseUrl:t,params:v,querySerializer:E});const T=YCt(d,g,v.header);const O={redirect:"follow",...o,...A,headers:T};if(_)O.body=b(_);if(O.body instanceof FormData)T.delete("Content-Type");const P=await r(C,O);if(P.status===404){const R=await P.json();if(R&&R.hasOwnProperty("type")&&R.hasOwnProperty("title")&&R.hasOwnProperty("status")){throw new QO.ApiError(R)}throw new QO.ApiError(QO.Problems.NOT_FOUND)}if(P.status===204||P.headers.get("Content-Length")==="0"){return P.ok?{data:{},response:P}:{error:{},response:P}}if(P.ok){let R=P.body;if(S!=="stream"){const I=P.clone();R=typeof I[S]==="function"?await I[S]():await I.text()}return{data:R,response:P}}else{u.debug(`Error on internal api: path: ${C}, status: ${P.status}, headers: ${JSON.stringify(P.headers)}, body: ${await P.clone().text()}`);let R={};try{R=await P.clone().json();if(R.type&&R.status&&R.title){throw new QO.ApiError(R)}}catch(I){}throw new QO.ApiError(QO.Problems.INTERNAL_SERVER_ERROR)}}a(f,"coreFetch");return{async GET(m,h){return f(m,{...h,method:"GET"})},async PUT(m,h){return f(m,{...h,method:"PUT"})},async POST(m,h){return f(m,{...h,method:"POST"})},async DELETE(m,h){return f(m,{...h,method:"DELETE"})},async OPTIONS(m,h){return f(m,{...h,method:"OPTIONS"})},async HEAD(m,h){return f(m,{...h,method:"HEAD"})},async PATCH(m,h){return f(m,{...h,method:"PATCH"})},async TRACE(m,h){return f(m,{...h,method:"TRACE"})}}}a(yAn,"createClient");Df.createClient=yAn;function zCt(e){const t=new URLSearchParams;if(e&&typeof e==="object"){for(const[r,n]of Object.entries(e)){if(n===void 0||n===null)continue;t.set(r,n)}}return t.toString()}a(zCt,"defaultQuerySerializer");Df.defaultQuerySerializer=zCt;function KCt(e){return JSON.stringify(e)}a(KCt,"defaultBodySerializer");Df.defaultBodySerializer=KCt;function WCt(e,t){let r=`${t.baseUrl?t.baseUrl.replace(gAn,""):""}${e}`;if(t.params.path){for(const[n,i]of Object.entries(t.params.path))r=r.replace(`{${n}}`,encodeURIComponent(String(i)))}if(t.params.query){const n=t.querySerializer(t.params.query);if(n)r+=`?${n}`}return r}a(WCt,"createFinalURL");Df.createFinalURL=WCt;function YCt(...e){const t=new Headers;for(const r of e){if(!r||typeof r!=="object")continue;const n=r instanceof Headers?r.entries():Object.entries(r);for(const[i,s]of n){if(s!==void 0&&s!==null){t.set(i,s)}}}return t}a(YCt,"mergeHeaders");Df.mergeHeaders=YCt});var JCt=y(qE=>{"use strict";var _An=qE&&qE.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(qE,"__esModule",{value:true});qE.ApiKeyService=qE.createApiKeyServiceClient=void 0;var ZO=ac();var vAn=yxe();var dJ=_An(ep());var EAn=XCt();async function bAn(e){return(0,EAn.createClient)({baseUrl:dJ.default.API_KEY_MANAGEMENT_SERVICE_URL,zuploExtensions:{fastifyRequest:e}})}a(bAn,"createApiKeyServiceClient");qE.createApiKeyServiceClient=bAn;var _xe=class{static{a(this,"ApiKeyService")}logger;requestId;constructor(t){this.logger=t.log;this.requestId=t.id}async fetchGCP(t,r={}){this.logger.info(`Fetching with GCP JWT ${r.method} ${t} from Api Key Service API.`);const n=new vAn.GoogleAuth;const i=await n.getIdTokenClient(dJ.default.API_KEY_MANAGEMENT_SERVICE_URL);this.logger.info(`Payload to send: ${JSON.stringify({url:`${dJ.default.API_KEY_MANAGEMENT_SERVICE_URL}/${t}`,method:"GET",body:r.body,headers:{...r.headers,...r.method!=="DELETE"&&{"content-type":"application/json"}}})}`);const s=await i.getRequestHeaders();const o=await i.request({url:`${dJ.default.API_KEY_MANAGEMENT_SERVICE_URL}/${t}`,method:r.method||"GET",body:r.body,headers:{...s,...r.headers,...r.method!=="DELETE"&&{"content-type":"application/json"}},validateStatus:u=>u>=200&&u<500});if(o.status===404){const u=await o.data;if(u&&u.hasOwnProperty("type")&&u.hasOwnProperty("title")&&u.hasOwnProperty("status")){throw new ZO.ApiError(u)}throw new ZO.ApiError(ZO.Problems.NOT_FOUND)}if(o.status>=300){this.logger.debug(`Error on api-key-service: path: ${t}, status: ${o.status}, headers: ${JSON.stringify(o.headers)}, body: ${JSON.stringify(o.data)}`);const u=o.data;if(u.type&&u.status&&u.title){throw new ZO.ApiError(u)}this.logger.error(`Error not handled on api-key-service: path: ${t}, status: ${o.status}`);throw new ZO.ApiError(ZO.Problems.INTERNAL_SERVER_ERROR)}if(o.status===204){return{}}return o.data}};qE.ApiKeyService=_xe});var ZCt=y(eP=>{"use strict";var SAn=eP&&eP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(eP,"__esModule",{value:true});eP.AuthApiService=void 0;var QA=ac();var QCt=SAn(ep());var AAn=JO();var vxe=class{static{a(this,"AuthApiService")}logger;requestId;baseUrl;constructor(t){this.logger=t.log;this.requestId=t.id;if(!QCt.default.AUTH_API_URL){throw new Error("AUTH_API_URL is not set")}this.baseUrl=QCt.default.AUTH_API_URL}async getClientJWT(t,r){let n;try{n=await this.fetch(`/v1/clients/${t}`,{method:"GET"})}catch(s){if(s.status===QA.Problems.NOT_FOUND.status){n=await this.fetch(`/v1/clients`,{method:"POST",body:JSON.stringify({client_id:t})})}else{throw s}}const i=await this.fetch(`/v1/oauth/token`,{method:"POST",body:JSON.stringify({client_id:t,client_secret:n.client_secret,grant_type:"client_credentials",custom_claims:r})});return i.access_token}async fetch(t,r){this.logger.info(`Fetching internally ${t} from Auth API V2.`);const n=new Headers({"content-type":"application/json","zp-rid":this.requestId,authorization:""});if(process.env.K_SERVICE){const s=await(0,AAn.getServiceAccountIdToken)(this.baseUrl);n.set("Authorization",`Bearer ${s}`)}const i=await fetch(`${this.baseUrl}${t}`,{...r,headers:n});if(i.status===QA.HttpStatusCode.NOT_FOUND){throw new QA.ApiError(QA.Problems.NOT_FOUND)}if(!i.ok){this.logger.debug(`Error on auth-api: path: ${t}, status: ${i.status}`);const s=await i.clone().json();if(s.type&&s.status&&s.title){throw new QA.ApiError(s)}this.logger.error(`Error not handled on auth-api: path: ${t}, status: ${i.status}`);throw new QA.ApiError(QA.Problems.INTERNAL_SERVER_ERROR)}return i.clone().json()}};eP.AuthApiService=vxe});var CF=y(pJ=>{"use strict";Object.defineProperty(pJ,"__esModule",{value:true});pJ.ApiServiceClient=void 0;var tP=ac();var CAn=JO();var Exe=class{static{a(this,"ApiServiceClient")}userSub;logger;requestId;baseUrl;cache;targetAudience;constructor(t,r,n){this.userSub=n.userSub;this.logger=n.logger;this.requestId=n.requestId;this.baseUrl=t;this.cache=r;this.targetAudience=n.targetAudience}async cachedFetch(t,r,n){if(!this.userSub||!n){throw new Error("userSub and cacheKey parameters are required to use cachedFetch")}const i=`${this.userSub}@${n}`;if(this.cache.has(i)){return this.cache.get(i)}const s=await this.fetchInternally(t,r);this.cache.set(i,s);return s}async fetchInternally(t,r){this.logger.info(`Fetching internally ${r.method} ${this.baseUrl}${t}`);const n=new Headers({...r.headers,"zuplo-user":this.userSub,"content-type":"application/json","zp-rid":this.requestId});if(process.env.K_SERVICE){const s=await(0,CAn.getServiceAccountIdToken)(this.targetAudience??this.baseUrl);n.set("Authorization",`Bearer ${s}`)}const i=await fetch(`${this.baseUrl}${t}`,{...r,headers:n});if(i.status===404){this.logger.debug(`Error on internal api: path: ${t}, status: ${i.status}, body: ${JSON.stringify(i.clone().text())}`);const s=await i.json();if(s&&s.hasOwnProperty("type")&&s.hasOwnProperty("title")&&s.hasOwnProperty("status")){throw new tP.ApiError(s)}throw new tP.ApiError(tP.Problems.NOT_FOUND)}if(!i.ok){this.logger.debug(`Error on internal api: path: ${t}, status: ${i.status}, body: ${JSON.stringify(i.clone().text())}`);const s=await i.clone().json();if(s.type&&s.status&&s.title){throw new tP.ApiError(s)}this.logger.error(`Error not handled on internal api: path: ${t}, status: ${i.status}`);throw new tP.ApiError(tP.Problems.INTERNAL_SERVER_ERROR)}if(i.status===204){return{}}return i.clone().json()}};pJ.ApiServiceClient=Exe});var nwt=y(rg=>{"use strict";var twt=rg&&rg.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(rg,"__esModule",{value:true});rg.ContentApiService=rg.getContentApiStorageTarballPath=rg.contentApiTarballFileName=void 0;var wAn=twt(Bm());var ewt=twt(ep());var TAn=CF();var xAn=new wAn.default({max:500,maxAge:1e3*60*50});function rwt(e,t){return`${e}--${t}.tar.gz`}a(rwt,"contentApiTarballFileName");rg.contentApiTarballFileName=rwt;function RAn(e,t){const r=rwt(e,t);return`${e}/builds/${r}`}a(RAn,"getContentApiStorageTarballPath");rg.getContentApiStorageTarballPath=RAn;var bxe=class extends TAn.ApiServiceClient{static{a(this,"ContentApiService")}constructor(t){if(!ewt.default.CONTENT_API_URL){throw new Error("CONTENT_API_URL is not set")}super(ewt.default.CONTENT_API_URL,xAn,t)}};rg.ContentApiService=bxe});var awt=y(rP=>{"use strict";var swt=rP&&rP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(rP,"__esModule",{value:true});rP.DevApiService=void 0;var OAn=swt(Bm());var iwt=swt(ep());var PAn=CF();var NAn=new OAn.default({max:500,maxAge:1e3*60*50});var Sxe=class extends PAn.ApiServiceClient{static{a(this,"DevApiService")}constructor(t,r){if(!iwt.default.DEV_API_URL){throw new Error("DEV_API_URL is not set")}const n=r&&r.userSub?r.userSub:t.getUserSub();super(iwt.default.DEV_API_URL,NAn,{userSub:n,logger:t.log,requestId:t.id})}};rP.DevApiService=Sxe});var lwt=y((_Ds,uwt)=>{var owt=require("stream").Stream;var IAn=require("util");uwt.exports=mh;function mh(){this.source=null;this.dataSize=0;this.maxDataSize=1024*1024;this.pauseStream=true;this._maxDataSizeExceeded=false;this._released=false;this._bufferedEvents=[]}a(mh,"DelayedStream");IAn.inherits(mh,owt);mh.create=function(e,t){var r=new this;t=t||{};for(var n in t){r[n]=t[n]}r.source=e;var i=e.emit;e.emit=function(){r._handleEmit(arguments);return i.apply(e,arguments)};e.on("error",function(){});if(r.pauseStream){e.pause()}return r};Object.defineProperty(mh.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});mh.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};mh.prototype.resume=function(){if(!this._released){this.release()}this.source.resume()};mh.prototype.pause=function(){this.source.pause()};mh.prototype.release=function(){this._released=true;this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this));this._bufferedEvents=[]};mh.prototype.pipe=function(){var e=owt.prototype.pipe.apply(this,arguments);this.resume();return e};mh.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}if(e[0]==="data"){this.dataSize+=e[1].length;this._checkIfMaxDataSizeExceeded()}this._bufferedEvents.push(e)};mh.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded){return}if(this.dataSize<=this.maxDataSize){return}this._maxDataSizeExceeded=true;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}});var fwt=y((EDs,pwt)=>{var kAn=require("util");var dwt=require("stream").Stream;var cwt=lwt();pwt.exports=ao;function ao(){this.writable=false;this.readable=true;this.dataSize=0;this.maxDataSize=2*1024*1024;this.pauseStreams=true;this._released=false;this._streams=[];this._currentStream=null;this._insideLoop=false;this._pendingNext=false}a(ao,"CombinedStream");kAn.inherits(ao,dwt);ao.create=function(e){var t=new this;e=e||{};for(var r in e){t[r]=e[r]}return t};ao.isStreamLike=function(e){return typeof e!=="function"&&typeof e!=="string"&&typeof e!=="boolean"&&typeof e!=="number"&&!Buffer.isBuffer(e)};ao.prototype.append=function(e){var t=ao.isStreamLike(e);if(t){if(!(e instanceof cwt)){var r=cwt.create(e,{maxDataSize:Infinity,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this));e=r}this._handleErrors(e);if(this.pauseStreams){e.pause()}}this._streams.push(e);return this};ao.prototype.pipe=function(e,t){dwt.prototype.pipe.call(this,e,t);this.resume();return e};ao.prototype._getNext=function(){this._currentStream=null;if(this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do{this._pendingNext=false;this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=false}};ao.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e=="undefined"){this.end();return}if(typeof e!=="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=ao.isStreamLike(r);if(n){r.on("data",this._checkDataSize.bind(this));this._handleErrors(r)}this._pipeNext(r)}.bind(this))};ao.prototype._pipeNext=function(e){this._currentStream=e;var t=ao.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this));e.pipe(this,{end:false});return}var r=e;this.write(r);this._getNext()};ao.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};ao.prototype.write=function(e){this.emit("data",e)};ao.prototype.pause=function(){if(!this.pauseStreams){return}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};ao.prototype.resume=function(){if(!this._released){this._released=true;this.writable=true;this._getNext()}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};ao.prototype.end=function(){this._reset();this.emit("end")};ao.prototype.destroy=function(){this._reset();this.emit("close")};ao.prototype._reset=function(){this.writable=false;this._streams=[];this._currentStream=null};ao.prototype._checkDataSize=function(){this._updateDataSize();if(this.dataSize<=this.maxDataSize){return}var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))};ao.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){if(!t.dataSize){return}e.dataSize+=t.dataSize});if(this._currentStream&&this._currentStream.dataSize){this.dataSize+=this._currentStream.dataSize}};ao.prototype._emitError=function(e){this._reset();this.emit("error",e)}});var hwt=y((SDs,mwt)=>{mwt.exports=DAn;function DAn(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(t){t(e)}else{setTimeout(e,0)}}a(DAn,"defer")});var Axe=y((CDs,ywt)=>{var gwt=hwt();ywt.exports=LAn;function LAn(e){var t=false;gwt(function(){t=true});return a(function r(n,i){if(t){e(n,i)}else{gwt(a(function s(){e(n,i)},"nextTick_callback"))}},"async_callback")}a(LAn,"async")});var Cxe=y((TDs,_wt)=>{_wt.exports=FAn;function FAn(e){Object.keys(e.jobs).forEach(BAn.bind(e));e.jobs={}}a(FAn,"abort");function BAn(e){if(typeof this.jobs[e]=="function"){this.jobs[e]()}}a(BAn,"clean")});var wxe=y((RDs,Ewt)=>{var vwt=Axe();var MAn=Cxe();Ewt.exports=qAn;function qAn(e,t,r,n){var i=r["keyedList"]?r["keyedList"][r.index]:r.index;r.jobs[i]=UAn(t,i,e[i],function(s,o){if(!(i in r.jobs)){return}delete r.jobs[i];if(s){MAn(r)}else{r.results[i]=o}n(s,r.results)})}a(qAn,"iterate");function UAn(e,t,r,n){var i;if(e.length==2){i=e(r,vwt(n))}else{i=e(r,t,vwt(n))}return i}a(UAn,"runJob")});var Txe=y((PDs,bwt)=>{bwt.exports=$An;function $An(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};if(t){n.keyedList.sort(r?t:function(i,s){return t(e[i],e[s])})}return n}a($An,"state")});var xxe=y((IDs,Swt)=>{var jAn=Cxe();var GAn=Axe();Swt.exports=HAn;function HAn(e){if(!Object.keys(this.jobs).length){return}this.index=this.size;jAn(this);GAn(e)(null,this.results)}a(HAn,"terminator")});var Cwt=y((DDs,Awt)=>{var VAn=wxe();var zAn=Txe();var KAn=xxe();Awt.exports=WAn;function WAn(e,t,r){var n=zAn(e);while(n.index<(n["keyedList"]||e).length){VAn(e,t,n,function(i,s){if(i){r(i,s);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}});n.index++}return KAn.bind(n,r)}a(WAn,"parallel")});var Rxe=y((FDs,fJ)=>{var wwt=wxe();var YAn=Txe();var XAn=xxe();fJ.exports=JAn;fJ.exports.ascending=Twt;fJ.exports.descending=QAn;function JAn(e,t,r,n){var i=YAn(e,r);wwt(e,t,i,a(function s(o,u){if(o){n(o,u);return}i.index++;if(i.index<(i["keyedList"]||e).length){wwt(e,t,i,s);return}n(null,i.results)},"iteratorHandler"));return XAn.bind(i,n)}a(JAn,"serialOrdered");function Twt(e,t){return e<t?-1:e>t?1:0}a(Twt,"ascending");function QAn(e,t){return-1*Twt(e,t)}a(QAn,"descending")});var Rwt=y((MDs,xwt)=>{var ZAn=Rxe();xwt.exports=eCn;function eCn(e,t,r){return ZAn(e,t,null,r)}a(eCn,"serial")});var Pwt=y((UDs,Owt)=>{Owt.exports={parallel:Cwt(),serial:Rwt(),serialOrdered:Rxe()}});var Iwt=y(($Ds,Nwt)=>{Nwt.exports=function(e,t){Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]});return e}});var Lwt=y((jDs,Dwt)=>{var Ixe=fwt();var kwt=require("util");var Oxe=require("path");var tCn=require("http");var rCn=require("https");var nCn=require("url").parse;var iCn=require("fs");var sCn=require("stream").Stream;var Pxe=dSe();var aCn=Pwt();var Nxe=Iwt();Dwt.exports=es;kwt.inherits(es,Ixe);function es(e){if(!(this instanceof es)){return new es(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];Ixe.call(this);e=e||{};for(var t in e){this[t]=e[t]}}a(es,"FormData");es.LINE_BREAK="\r\n";es.DEFAULT_CONTENT_TYPE="application/octet-stream";es.prototype.append=function(e,t,r){r=r||{};if(typeof r=="string"){r={filename:r}}var n=Ixe.prototype.append.bind(this);if(typeof t=="number"){t=""+t}if(kwt.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,r);var s=this._multiPartFooter();n(i);n(t);n(s);this._trackLength(i,t,r)};es.prototype._trackLength=function(e,t,r){var n=0;if(r.knownLength!=null){n+=+r.knownLength}else if(Buffer.isBuffer(t)){n=t.length}else if(typeof t==="string"){n=Buffer.byteLength(t)}this._valueLength+=n;this._overheadLength+=Buffer.byteLength(e)+es.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof sCn)){return}if(!r.knownLength){this._valuesToMeasure.push(t)}};es.prototype._lengthRetriever=function(e,t){if(e.hasOwnProperty("fd")){if(e.end!=void 0&&e.end!=Infinity&&e.start!=void 0){t(null,e.end+1-(e.start?e.start:0))}else{iCn.stat(e.path,function(r,n){var i;if(r){t(r);return}i=n.size-(e.start?e.start:0);t(null,i)})}}else if(e.hasOwnProperty("httpVersion")){t(null,+e.headers["content-length"])}else if(e.hasOwnProperty("httpModule")){e.on("response",function(r){e.pause();t(null,+r.headers["content-length"])});e.resume()}else{t("Unknown stream")}};es.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string"){return r.header}var n=this._getContentDisposition(t,r);var i=this._getContentType(t,r);var s="";var o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};if(typeof r.header=="object"){Nxe(o,r.header)}var u;for(var l in o){if(!o.hasOwnProperty(l))continue;u=o[l];if(u==null){continue}if(!Array.isArray(u)){u=[u]}if(u.length){s+=l+": "+u.join("; ")+es.LINE_BREAK}}return"--"+this.getBoundary()+es.LINE_BREAK+s+es.LINE_BREAK};es.prototype._getContentDisposition=function(e,t){var r,n;if(typeof t.filepath==="string"){r=Oxe.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e.name||e.path){r=Oxe.basename(t.filename||e.name||e.path)}else if(e.readable&&e.hasOwnProperty("httpVersion")){r=Oxe.basename(e.client._httpMessage.path||"")}if(r){n='filename="'+r+'"'}return n};es.prototype._getContentType=function(e,t){var r=t.contentType;if(!r&&e.name){r=Pxe.lookup(e.name)}if(!r&&e.path){r=Pxe.lookup(e.path)}if(!r&&e.readable&&e.hasOwnProperty("httpVersion")){r=e.headers["content-type"]}if(!r&&(t.filepath||t.filename)){r=Pxe.lookup(t.filepath||t.filename)}if(!r&&typeof e=="object"){r=es.DEFAULT_CONTENT_TYPE}return r};es.prototype._multiPartFooter=function(){return function(e){var t=es.LINE_BREAK;var r=this._streams.length===0;if(r){t+=this._lastBoundary()}e(t)}.bind(this)};es.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+es.LINE_BREAK};es.prototype.getHeaders=function(e){var t;var r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(e.hasOwnProperty(t)){r[t.toLowerCase()]=e[t]}}return r};es.prototype.setBoundary=function(e){this._boundary=e};es.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};es.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var r=0,n=this._streams.length;r<n;r++){if(typeof this._streams[r]!=="function"){if(Buffer.isBuffer(this._streams[r])){e=Buffer.concat([e,this._streams[r]])}else{e=Buffer.concat([e,Buffer.from(this._streams[r])])}if(typeof this._streams[r]!=="string"||this._streams[r].substring(2,t.length+2)!==t){e=Buffer.concat([e,Buffer.from(es.LINE_BREAK)])}}}return Buffer.concat([e,Buffer.from(this._lastBoundary())])};es.prototype._generateBoundary=function(){var e="--------------------------";for(var t=0;t<24;t++){e+=Math.floor(Math.random()*10).toString(16)}this._boundary=e};es.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;if(this._streams.length){e+=this._lastBoundary().length}if(!this.hasKnownLength()){this._error(new Error("Cannot calculate proper length in synchronous way."))}return e};es.prototype.hasKnownLength=function(){var e=true;if(this._valuesToMeasure.length){e=false}return e};es.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length){t+=this._lastBoundary().length}if(!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}aCn.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i});e(null,t)})};es.prototype.submit=function(e,t){var r,n,i={method:"post"};if(typeof e=="string"){e=nCn(e);n=Nxe({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)}else{n=Nxe(e,i);if(!n.port){n.port=n.protocol=="https:"?443:80}}n.headers=this.getHeaders(e.headers);if(n.protocol=="https:"){r=rCn.request(n)}else{r=tCn.request(n)}this.getLength(function(s,o){if(s&&s!=="Unknown stream"){this._error(s);return}if(o){r.setHeader("Content-Length",o)}this.pipe(r);if(t){var u;var l=a(function(c,d){r.removeListener("error",l);r.removeListener("response",u);return t.call(this,c,d)},"callback");u=l.bind(this,null);r.on("error",l);r.on("response",u)}}.bind(this));return r};es.prototype._error=function(e){if(!this.error){this.error=e;this.pause();this.emit("error",e)}};es.prototype.toString=function(){return"[object FormData]"}});var Bwt=y(Fwt=>{"use strict";var oCn=require("url").parse;var uCn={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};var lCn=String.prototype.endsWith||function(e){return e.length<=this.length&&this.indexOf(e,this.length-e.length)!==-1};function cCn(e){var t=typeof e==="string"?oCn(e):e||{};var r=t.protocol;var n=t.host;var i=t.port;if(typeof n!=="string"||!n||typeof r!=="string"){return""}r=r.split(":",1)[0];n=n.replace(/:\d*$/,"");i=parseInt(i)||uCn[r]||0;if(!dCn(n,i)){return""}var s=nP("npm_config_"+r+"_proxy")||nP(r+"_proxy")||nP("npm_config_proxy")||nP("all_proxy");if(s&&s.indexOf("://")===-1){s=r+"://"+s}return s}a(cCn,"getProxyForUrl");function dCn(e,t){var r=(nP("npm_config_no_proxy")||nP("no_proxy")).toLowerCase();if(!r){return true}if(r==="*"){return false}return r.split(/[,\s]/).every(function(n){if(!n){return true}var i=n.match(/^(.+):(\d+)$/);var s=i?i[1]:n;var o=i?parseInt(i[2]):0;if(o&&o!==t){return true}if(!/^[.*]/.test(s)){return e!==s}if(s.charAt(0)==="*"){s=s.slice(1)}return!lCn.call(e,s)})}a(dCn,"shouldProxy");function nP(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}a(nP,"getEnv");Fwt.getProxyForUrl=cCn});var qwt=y((zDs,Mwt)=>{var wF;Mwt.exports=function(){if(!wF){try{wF=Wc()("follow-redirects")}catch(e){}if(typeof wF!=="function"){wF=a(function(){},"debug")}}wF.apply(null,arguments)}});var Hwt=y((WDs,Hxe)=>{var RF=require("url");var TF=RF.URL;var pCn=require("http");var fCn=require("https");var Bxe=require("stream").Writable;var Mxe=require("assert");var Uwt=qwt();var qxe=false;try{Mxe(new TF)}catch(e){qxe=e.code==="ERR_INVALID_URL"}var mCn=["auth","host","hostname","href","path","pathname","port","protocol","query","search"];var Uxe=["abort","aborted","connect","error","socket","timeout"];var $xe=Object.create(null);Uxe.forEach(function(e){$xe[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var Dxe=OF("ERR_INVALID_URL","Invalid URL",TypeError);var Lxe=OF("ERR_FR_REDIRECTION_FAILURE","Redirected request failed");var hCn=OF("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Lxe);var gCn=OF("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit");var yCn=OF("ERR_STREAM_WRITE_AFTER_END","write after end");var _Cn=Bxe.prototype.destroy||jwt;function _d(e,t){Bxe.call(this);this._sanitizeOptions(e);this._options=e;this._ended=false;this._ending=false;this._redirectCount=0;this._redirects=[];this._requestBodyLength=0;this._requestBodyBuffers=[];if(t){this.on("response",t)}var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(i){r.emit("error",i instanceof Lxe?i:new Lxe({cause:i}))}};this._performRequest()}a(_d,"RedirectableRequest");_d.prototype=Object.create(Bxe.prototype);_d.prototype.abort=function(){Gxe(this._currentRequest);this._currentRequest.abort();this.emit("abort")};_d.prototype.destroy=function(e){Gxe(this._currentRequest,e);_Cn.call(this,e);return this};_d.prototype.write=function(e,t,r){if(this._ending){throw new yCn}if(!ZA(e)&&!bCn(e)){throw new TypeError("data should be a string, Buffer or Uint8Array")}if(xF(t)){r=t;t=null}if(e.length===0){if(r){r()}return}if(this._requestBodyLength+e.length<=this._options.maxBodyLength){this._requestBodyLength+=e.length;this._requestBodyBuffers.push({data:e,encoding:t});this._currentRequest.write(e,t,r)}else{this.emit("error",new gCn);this.abort()}};_d.prototype.end=function(e,t,r){if(xF(e)){r=e;e=t=null}else if(xF(t)){r=t;t=null}if(!e){this._ended=this._ending=true;this._currentRequest.end(null,null,r)}else{var n=this;var i=this._currentRequest;this.write(e,t,function(){n._ended=true;i.end(null,null,r)});this._ending=true}};_d.prototype.setHeader=function(e,t){this._options.headers[e]=t;this._currentRequest.setHeader(e,t)};_d.prototype.removeHeader=function(e){delete this._options.headers[e];this._currentRequest.removeHeader(e)};_d.prototype.setTimeout=function(e,t){var r=this;function n(o){o.setTimeout(e);o.removeListener("timeout",o.destroy);o.addListener("timeout",o.destroy)}a(n,"destroyOnTimeout");function i(o){if(r._timeout){clearTimeout(r._timeout)}r._timeout=setTimeout(function(){r.emit("timeout");s()},e);n(o)}a(i,"startTimer");function s(){if(r._timeout){clearTimeout(r._timeout);r._timeout=null}r.removeListener("abort",s);r.removeListener("error",s);r.removeListener("response",s);r.removeListener("close",s);if(t){r.removeListener("timeout",t)}if(!r.socket){r._currentRequest.removeListener("socket",i)}}a(s,"clearTimer");if(t){this.on("timeout",t)}if(this.socket){i(this.socket)}else{this._currentRequest.once("socket",i)}this.on("socket",n);this.on("abort",s);this.on("error",s);this.on("response",s);this.on("close",s);return this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){_d.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(_d.prototype,e,{get:function(){return this._currentRequest[e]}})});_d.prototype._sanitizeOptions=function(e){if(!e.headers){e.headers={}}if(e.host){if(!e.hostname){e.hostname=e.host}delete e.host}if(!e.pathname&&e.path){var t=e.path.indexOf("?");if(t<0){e.pathname=e.path}else{e.pathname=e.path.substring(0,t);e.search=e.path.substring(t)}}};_d.prototype._performRequest=function(){var e=this._options.protocol;var t=this._options.nativeProtocols[e];if(!t){throw new TypeError("Unsupported protocol "+e)}if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var i of Uxe){n.on(i,$xe[i])}this._currentUrl=/^\//.test(this._options.path)?RF.format(this._options):this._options.path;if(this._isRedirect){var s=0;var o=this;var u=this._requestBodyBuffers;a(function l(c){if(n===o._currentRequest){if(c){o.emit("error",c)}else if(s<u.length){var d=u[s++];if(!n.finished){n.write(d.data,d.encoding,l)}}else if(o._ended){n.end()}}},"writeNext")()}};_d.prototype._processResponse=function(e){var t=e.statusCode;if(this._options.trackRedirects){this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t})}var r=e.headers.location;if(!r||this._options.followRedirects===false||t<300||t>=400){e.responseUrl=this._currentUrl;e.redirects=this._redirects;this.emit("response",e);this._requestBodyBuffers=[];return}Gxe(this._currentRequest);e.destroy();if(++this._redirectCount>this._options.maxRedirects){throw new hCn}var n;var i=this._options.beforeRedirect;if(i){n=Object.assign({Host:e.req.getHeader("host")},this._options.headers)}var s=this._options.method;if((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method)){this._options.method="GET";this._requestBodyBuffers=[];kxe(/^content-/i,this._options.headers)}var o=kxe(/^host$/i,this._options.headers);var u=jxe(this._currentUrl);var l=o||u.host;var c=/^\w+:/.test(r)?this._currentUrl:RF.format(Object.assign(u,{host:l}));var d=vCn(r,c);Uwt("redirecting to",d.href);this._isRedirect=true;Fxe(d,this._options);if(d.protocol!==u.protocol&&d.protocol!=="https:"||d.host!==l&&!ECn(d.host,l)){kxe(/^(?:authorization|cookie)$/i,this._options.headers)}if(xF(i)){var p={headers:e.headers,statusCode:t};var f={url:c,method:s,headers:n};i(this._options,p,f);this._sanitizeOptions(this._options)}this._performRequest()};function $wt(e){var t={maxRedirects:21,maxBodyLength:10*1024*1024};var r={};Object.keys(e).forEach(function(n){var i=n+":";var s=r[i]=e[n];var o=t[n]=Object.create(s);function u(c,d,p){if(SCn(c)){c=Fxe(c)}else if(ZA(c)){c=Fxe(jxe(c))}else{p=d;d=Gwt(c);c={protocol:i}}if(xF(d)){p=d;d=null}d=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},c,d);d.nativeProtocols=r;if(!ZA(d.host)&&!ZA(d.hostname)){d.hostname="::1"}Mxe.equal(d.protocol,i,"protocol mismatch");Uwt("options",d);return new _d(d,p)}a(u,"request");function l(c,d,p){var f=o.request(c,d,p);f.end();return f}a(l,"get");Object.defineProperties(o,{request:{value:u,configurable:true,enumerable:true,writable:true},get:{value:l,configurable:true,enumerable:true,writable:true}})});return t}a($wt,"wrap");function jwt(){}a(jwt,"noop");function jxe(e){var t;if(qxe){t=new TF(e)}else{t=Gwt(RF.parse(e));if(!ZA(t.protocol)){throw new Dxe({input:e})}}return t}a(jxe,"parseUrl");function vCn(e,t){return qxe?new TF(e,t):jxe(RF.resolve(t,e))}a(vCn,"resolveUrl");function Gwt(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname)){throw new Dxe({input:e.href||e})}if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host)){throw new Dxe({input:e.href||e})}return e}a(Gwt,"validateUrl");function Fxe(e,t){var r=t||{};for(var n of mCn){r[n]=e[n]}if(r.hostname.startsWith("[")){r.hostname=r.hostname.slice(1,-1)}if(r.port!==""){r.port=Number(r.port)}r.path=r.search?r.pathname+r.search:r.pathname;return r}a(Fxe,"spreadUrlObject");function kxe(e,t){var r;for(var n in t){if(e.test(n)){r=t[n];delete t[n]}}return r===null||typeof r==="undefined"?void 0:String(r).trim()}a(kxe,"removeMatchingHeaders");function OF(e,t,r){function n(i){Error.captureStackTrace(this,this.constructor);Object.assign(this,i||{});this.code=e;this.message=this.cause?t+": "+this.cause.message:t}a(n,"CustomError");n.prototype=new(r||Error);Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:false},name:{value:"Error ["+e+"]",enumerable:false}});return n}a(OF,"createErrorType");function Gxe(e,t){for(var r of Uxe){e.removeListener(r,$xe[r])}e.on("error",jwt);e.destroy(t)}a(Gxe,"destroyRequest");function ECn(e,t){Mxe(ZA(e)&&ZA(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}a(ECn,"isSubdomain");function ZA(e){return typeof e==="string"||e instanceof String}a(ZA,"isString");function xF(e){return typeof e==="function"}a(xF,"isFunction");function bCn(e){return typeof e==="object"&&"length"in e}a(bCn,"isBuffer");function SCn(e){return TF&&e instanceof TF}a(SCn,"isURL");Hxe.exports=$wt({http:pCn,https:fCn});Hxe.exports.wrap=$wt});var AJ=y((XDs,kTt)=>{"use strict";var ACn=Lwt();var CCn=require("url");var wCn=Bwt();var TCn=require("http");var xCn=require("https");var uTt=require("util");var RCn=Hwt();var OCn=require("zlib");var lTt=require("stream");var PCn=require("events");function Ty(e){return e&&typeof e==="object"&&"default"in e?e:{"default":e}}a(Ty,"_interopDefaultLegacy");var cTt=Ty(ACn);var NCn=Ty(CCn);var ICn=Ty(TCn);var kCn=Ty(xCn);var DCn=Ty(uTt);var LCn=Ty(RCn);var GE=Ty(OCn);var $E=Ty(lTt);var FCn=Ty(PCn);function dTt(e,t){return a(function r(){return e.apply(t,arguments)},"wrap")}a(dTt,"bind");var{toString:BCn}=Object.prototype;var{getPrototypeOf:sRe}=Object;var vJ=(e=>t=>{const r=BCn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null));var ng=a(e=>{e=e.toLowerCase();return t=>vJ(t)===e},"kindOfTest");var EJ=a(e=>t=>typeof t===e,"typeOfTest");var{isArray:oP}=Array;var IF=EJ("undefined");function MCn(e){return e!==null&&!IF(e)&&e.constructor!==null&&!IF(e.constructor)&&Ff(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}a(MCn,"isBuffer");var pTt=ng("ArrayBuffer");function qCn(e){let t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&pTt(e.buffer)}return t}a(qCn,"isArrayBufferView");var UCn=EJ("string");var Ff=EJ("function");var fTt=EJ("number");var bJ=a(e=>e!==null&&typeof e==="object","isObject");var $Cn=a(e=>e===true||e===false,"isBoolean");var hJ=a(e=>{if(vJ(e)!=="object"){return false}const t=sRe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},"isPlainObject");var jCn=ng("Date");var GCn=ng("File");var HCn=ng("Blob");var VCn=ng("FileList");var zCn=a(e=>bJ(e)&&Ff(e.pipe),"isStream");var KCn=a(e=>{let t;return e&&(typeof FormData==="function"&&e instanceof FormData||Ff(e.append)&&((t=vJ(e))==="formdata"||t==="object"&&Ff(e.toString)&&e.toString()==="[object FormData]"))},"isFormData");var WCn=ng("URLSearchParams");var YCn=a(e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function DF(e,t,{allOwnKeys:r=false}={}){if(e===null||typeof e==="undefined"){return}let n;let i;if(typeof e!=="object"){e=[e]}if(oP(e)){for(n=0,i=e.length;n<i;n++){t.call(null,e[n],n,e)}}else{const s=r?Object.getOwnPropertyNames(e):Object.keys(e);const o=s.length;let u;for(n=0;n<o;n++){u=s[n];t.call(null,e[u],u,e)}}}a(DF,"forEach");function mTt(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length;let i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}a(mTt,"findKey");var hTt=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})();var gTt=a(e=>!IF(e)&&e!==hTt,"isContextDefined");function Yxe(){const{caseless:e}=gTt(this)&&this||{};const t={};const r=a((n,i)=>{const s=e&&mTt(t,i)||i;if(hJ(t[s])&&hJ(n)){t[s]=Yxe(t[s],n)}else if(hJ(n)){t[s]=Yxe({},n)}else if(oP(n)){t[s]=n.slice()}else{t[s]=n}},"assignValue");for(let n=0,i=arguments.length;n<i;n++){arguments[n]&&DF(arguments[n],r)}return t}a(Yxe,"merge");var XCn=a((e,t,r,{allOwnKeys:n}={})=>{DF(t,(i,s)=>{if(r&&Ff(i)){e[s]=dTt(i,r)}else{e[s]=i}},{allOwnKeys:n});return e},"extend");var JCn=a(e=>{if(e.charCodeAt(0)===65279){e=e.slice(1)}return e},"stripBOM");var QCn=a((e,t,r,n)=>{e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)},"inherits");var ZCn=a((e,t,r,n)=>{let i;let s;let o;const u={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);s=i.length;while(s-- >0){o=i[s];if((!n||n(o,e,t))&&!u[o]){t[o]=e[o];u[o]=true}}e=r!==false&&sRe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},"toFlatObject");var ewn=a((e,t,r)=>{e=String(e);if(r===void 0||r>e.length){r=e.length}r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},"endsWith");var twn=a(e=>{if(!e)return null;if(oP(e))return e;let t=e.length;if(!fTt(t))return null;const r=new Array(t);while(t-- >0){r[t]=e[t]}return r},"toArray");var rwn=(e=>{return t=>{return e&&t instanceof e}})(typeof Uint8Array!=="undefined"&&sRe(Uint8Array));var nwn=a((e,t)=>{const r=e&&e[Symbol.iterator];const n=r.call(e);let i;while((i=n.next())&&!i.done){const s=i.value;t.call(e,s[0],s[1])}},"forEachEntry");var iwn=a((e,t)=>{let r;const n=[];while((r=e.exec(t))!==null){n.push(r)}return n},"matchAll");var swn=ng("HTMLFormElement");var awn=a(e=>{return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,a(function t(r,n,i){return n.toUpperCase()+i},"replacer"))},"toCamelCase");var Vwt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype);var own=ng("RegExp");var yTt=a((e,t)=>{const r=Object.getOwnPropertyDescriptors(e);const n={};DF(r,(i,s)=>{let o;if((o=t(i,s,e))!==false){n[s]=o||i}});Object.defineProperties(e,n)},"reduceDescriptors");var uwn=a(e=>{yTt(e,(t,r)=>{if(Ff(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}const n=e[r];if(!Ff(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}}})},"freezeMethods");var lwn=a((e,t)=>{const r={};const n=a(i=>{i.forEach(s=>{r[s]=true})},"define");oP(e)?n(e):n(String(e).split(t));return r},"toObjectSet");var cwn=a(()=>{},"noop");var dwn=a((e,t)=>{e=+e;return Number.isFinite(e)?e:t},"toFiniteNumber");var Vxe="abcdefghijklmnopqrstuvwxyz";var zwt="0123456789";var _Tt={DIGIT:zwt,ALPHA:Vxe,ALPHA_DIGIT:Vxe+Vxe.toUpperCase()+zwt};var pwn=a((e=16,t=_Tt.ALPHA_DIGIT)=>{let r="";const{length:n}=t;while(e--){r+=t[Math.random()*n|0]}return r},"generateString");function fwn(e){return!!(e&&Ff(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}a(fwn,"isSpecCompliantForm");var mwn=a(e=>{const t=new Array(10);const r=a((n,i)=>{if(bJ(n)){if(t.indexOf(n)>=0){return}if(!("toJSON"in n)){t[i]=n;const s=oP(n)?[]:{};DF(n,(o,u)=>{const l=r(o,i+1);!IF(l)&&(s[u]=l)});t[i]=void 0;return s}}return n},"visit");return r(e,0)},"toJSONObject");var hwn=ng("AsyncFunction");var gwn=a(e=>e&&(bJ(e)||Ff(e))&&Ff(e.then)&&Ff(e.catch),"isThenable");var Je={isArray:oP,isArrayBuffer:pTt,isBuffer:MCn,isFormData:KCn,isArrayBufferView:qCn,isString:UCn,isNumber:fTt,isBoolean:$Cn,isObject:bJ,isPlainObject:hJ,isUndefined:IF,isDate:jCn,isFile:GCn,isBlob:HCn,isRegExp:own,isFunction:Ff,isStream:zCn,isURLSearchParams:WCn,isTypedArray:rwn,isFileList:VCn,forEach:DF,merge:Yxe,extend:XCn,trim:YCn,stripBOM:JCn,inherits:QCn,toFlatObject:ZCn,kindOf:vJ,kindOfTest:ng,endsWith:ewn,toArray:twn,forEachEntry:nwn,matchAll:iwn,isHTMLForm:swn,hasOwnProperty:Vwt,hasOwnProp:Vwt,reduceDescriptors:yTt,freezeMethods:uwn,toObjectSet:lwn,toCamelCase:awn,noop:cwn,toFiniteNumber:dwn,findKey:mTt,global:hTt,isContextDefined:gTt,ALPHABET:_Tt,generateString:pwn,isSpecCompliantForm:fwn,toJSONObject:mwn,isAsyncFn:hwn,isThenable:gwn};function yr(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=new Error().stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}a(yr,"AxiosError");Je.inherits(yr,Error,{toJSON:a(function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Je.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}},"toJSON")});var vTt=yr.prototype;var ETt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ETt[e]={value:e}});Object.defineProperties(yr,ETt);Object.defineProperty(vTt,"isAxiosError",{value:true});yr.from=(e,t,r,n,i,s)=>{const o=Object.create(vTt);Je.toFlatObject(e,o,a(function u(l){return l!==Error.prototype},"filter"),u=>{return u!=="isAxiosError"});yr.call(o,e.message,t,r,n,i);o.cause=e;o.name=e.name;s&&Object.assign(o,s);return o};function Xxe(e){return Je.isPlainObject(e)||Je.isArray(e)}a(Xxe,"isVisitable");function bTt(e){return Je.endsWith(e,"[]")?e.slice(0,-2):e}a(bTt,"removeBrackets");function Kwt(e,t,r){if(!e)return t;return e.concat(t).map(a(function n(i,s){i=bTt(i);return!r&&s?"["+i+"]":i},"each")).join(r?".":"")}a(Kwt,"renderKey");function ywn(e){return Je.isArray(e)&&!e.some(Xxe)}a(ywn,"isFlatArray");var _wn=Je.toFlatObject(Je,{},null,a(function e(t){return/^is[A-Z]/.test(t)},"filter"));function SJ(e,t,r){if(!Je.isObject(e)){throw new TypeError("target must be an object")}t=t||new(cTt["default"]||FormData);r=Je.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,a(function h(g,_){return!Je.isUndefined(_[g])},"defined"));const n=r.metaTokens;const i=r.visitor||d;const s=r.dots;const o=r.indexes;const u=r.Blob||typeof Blob!=="undefined"&&Blob;const l=u&&Je.isSpecCompliantForm(t);if(!Je.isFunction(i)){throw new TypeError("visitor must be a function")}function c(h){if(h===null)return"";if(Je.isDate(h)){return h.toISOString()}if(!l&&Je.isBlob(h)){throw new yr("Blob is not supported. Use a Buffer instead.")}if(Je.isArrayBuffer(h)||Je.isTypedArray(h)){return l&&typeof Blob==="function"?new Blob([h]):Buffer.from(h)}return h}a(c,"convertValue");function d(h,g,_){let v=h;if(h&&!_&&typeof h==="object"){if(Je.endsWith(g,"{}")){g=n?g:g.slice(0,-2);h=JSON.stringify(h)}else if(Je.isArray(h)&&ywn(h)||(Je.isFileList(h)||Je.endsWith(g,"[]"))&&(v=Je.toArray(h))){g=bTt(g);v.forEach(a(function S(E,b){!(Je.isUndefined(E)||E===null)&&t.append(o===true?Kwt([g],b,s):o===null?g:g+"[]",c(E))},"each"));return false}}if(Xxe(h)){return true}t.append(Kwt(_,g,s),c(h));return false}a(d,"defaultVisitor");const p=[];const f=Object.assign(_wn,{defaultVisitor:d,convertValue:c,isVisitable:Xxe});function m(h,g){if(Je.isUndefined(h))return;if(p.indexOf(h)!==-1){throw Error("Circular reference detected in "+g.join("."))}p.push(h);Je.forEach(h,a(function _(v,S){const E=!(Je.isUndefined(v)||v===null)&&i.call(t,v,Je.isString(S)?S.trim():S,g,f);if(E===true){m(v,g?g.concat(S):[S])}},"each"));p.pop()}a(m,"build");if(!Je.isObject(e)){throw new TypeError("data must be an object")}m(e);return t}a(SJ,"toFormData");function Wwt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,a(function r(n){return t[n]},"replacer"))}a(Wwt,"encode$1");function STt(e,t){this._pairs=[];e&&SJ(e,this,t)}a(STt,"AxiosURLSearchParams");var ATt=STt.prototype;ATt.append=a(function e(t,r){this._pairs.push([t,r])},"append");ATt.toString=a(function e(t){const r=t?function(n){return t.call(this,n,Wwt)}:Wwt;return this._pairs.map(a(function n(i){return r(i[0])+"="+r(i[1])},"each"),"").join("&")},"toString");function vwn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}a(vwn,"encode");function aRe(e,t,r){if(!t){return e}const n=r&&r.encode||vwn;const i=r&&r.serialize;let s;if(i){s=i(t,r)}else{s=Je.isURLSearchParams(t)?t.toString():new STt(t,r).toString(n)}if(s){const o=e.indexOf("#");if(o!==-1){e=e.slice(0,o)}e+=(e.indexOf("?")===-1?"?":"&")+s}return e}a(aRe,"buildURL");var Jxe=class{static{a(this,"InterceptorManager")}constructor(){this.handlers=[]}use(t,r,n){this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:false,runWhen:n?n.runWhen:null});return this.handlers.length-1}eject(t){if(this.handlers[t]){this.handlers[t]=null}}clear(){if(this.handlers){this.handlers=[]}}forEach(t){Je.forEach(this.handlers,a(function r(n){if(n!==null){t(n)}},"forEachHandler"))}};var Ywt=Jxe;var oRe={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var Ewn=NCn["default"].URLSearchParams;var bwn={isNode:true,classes:{URLSearchParams:Ewn,FormData:cTt["default"],Blob:typeof Blob!=="undefined"&&Blob||null},protocols:["http","https","file","data"]};var CTt=typeof window!=="undefined"&&typeof document!=="undefined";var Swn=(e=>{return CTt&&["ReactNative","NativeScript","NS"].indexOf(e)<0})(typeof navigator!=="undefined"&&navigator.product);var Awn=(()=>{return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})();var Cwn=Object.freeze({__proto__:null,hasBrowserEnv:CTt,hasStandardBrowserWebWorkerEnv:Awn,hasStandardBrowserEnv:Swn});var Lf={...Cwn,...bwn};function wwn(e,t){return SJ(e,new Lf.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,s){if(Lf.isNode&&Je.isBuffer(r)){this.append(n,r.toString("base64"));return false}return s.defaultVisitor.apply(this,arguments)}},t))}a(wwn,"toURLEncodedForm");function Twn(e){return Je.matchAll(/\w+|\[(\w*)]/g,e).map(t=>{return t[0]==="[]"?"":t[1]||t[0]})}a(Twn,"parsePropPath");function xwn(e){const t={};const r=Object.keys(e);let n;const i=r.length;let s;for(n=0;n<i;n++){s=r[n];t[s]=e[s]}return t}a(xwn,"arrayToObject");function wTt(e){function t(r,n,i,s){let o=r[s++];const u=Number.isFinite(+o);const l=s>=r.length;o=!o&&Je.isArray(i)?i.length:o;if(l){if(Je.hasOwnProp(i,o)){i[o]=[i[o],n]}else{i[o]=n}return!u}if(!i[o]||!Je.isObject(i[o])){i[o]=[]}const c=t(r,n,i[o],s);if(c&&Je.isArray(i[o])){i[o]=xwn(i[o])}return!u}a(t,"buildPath");if(Je.isFormData(e)&&Je.isFunction(e.entries)){const r={};Je.forEachEntry(e,(n,i)=>{t(Twn(n),i,r,0)});return r}return null}a(wTt,"formDataToJSON");function Rwn(e,t,r){if(Je.isString(e)){try{(t||JSON.parse)(e);return Je.trim(e)}catch(n){if(n.name!=="SyntaxError"){throw n}}}return(r||JSON.stringify)(e)}a(Rwn,"stringifySafely");var uRe={transitional:oRe,adapter:["xhr","http"],transformRequest:[a(function e(t,r){const n=r.getContentType()||"";const i=n.indexOf("application/json")>-1;const s=Je.isObject(t);if(s&&Je.isHTMLForm(t)){t=new FormData(t)}const o=Je.isFormData(t);if(o){if(!i){return t}return i?JSON.stringify(wTt(t)):t}if(Je.isArrayBuffer(t)||Je.isBuffer(t)||Je.isStream(t)||Je.isFile(t)||Je.isBlob(t)){return t}if(Je.isArrayBufferView(t)){return t.buffer}if(Je.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}let u;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1){return wwn(t,this.formSerializer).toString()}if((u=Je.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return SJ(u?{"files[]":t}:t,l&&new l,this.formSerializer)}}if(s||i){r.setContentType("application/json",false);return Rwn(t)}return t},"transformRequest")],transformResponse:[a(function e(t){const r=this.transitional||uRe.transitional;const n=r&&r.forcedJSONParsing;const i=this.responseType==="json";if(t&&Je.isString(t)&&(n&&!this.responseType||i)){const s=r&&r.silentJSONParsing;const o=!s&&i;try{return JSON.parse(t)}catch(u){if(o){if(u.name==="SyntaxError"){throw yr.from(u,yr.ERR_BAD_RESPONSE,this,null,this.response)}throw u}}}return t},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lf.classes.FormData,Blob:Lf.classes.Blob},validateStatus:a(function e(t){return t>=200&&t<300},"validateStatus"),headers:{common:{"Accept":"application/json, text/plain, */*","Content-Type":void 0}}};Je.forEach(["delete","get","head","post","put","patch"],e=>{uRe.headers[e]={}});var lRe=uRe;var Own=Je.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Pwn=a(e=>{const t={};let r;let n;let i;e&&e.split("\n").forEach(a(function s(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&Own[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}},"parser"));return t},"parseHeaders");var Xwt=Symbol("internals");function PF(e){return e&&String(e).trim().toLowerCase()}a(PF,"normalizeHeader");function gJ(e){if(e===false||e==null){return e}return Je.isArray(e)?e.map(gJ):String(e)}a(gJ,"normalizeValue");function Nwn(e){const t=Object.create(null);const r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}a(Nwn,"parseTokens");var Iwn=a(e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()),"isValidHeaderName");function zxe(e,t,r,n,i){if(Je.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!Je.isString(t))return;if(Je.isString(n)){return t.indexOf(n)!==-1}if(Je.isRegExp(n)){return n.test(t)}}a(zxe,"matchHeaderValue");function kwn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>{return r.toUpperCase()+n})}a(kwn,"formatHeader");function Dwn(e,t){const r=Je.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,s,o){return this[n].call(this,t,i,s,o)},configurable:true})})}a(Dwn,"buildAccessors");var iP=class{static{a(this,"AxiosHeaders")}constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function s(u,l,c){const d=PF(l);if(!d){throw new Error("header name must be a non-empty string")}const p=Je.findKey(i,d);if(!p||i[p]===void 0||c===true||c===void 0&&i[p]!==false){i[p||l]=gJ(u)}}a(s,"setHeader");const o=a((u,l)=>Je.forEach(u,(c,d)=>s(c,d,l)),"setHeaders");if(Je.isPlainObject(t)||t instanceof this.constructor){o(t,r)}else if(Je.isString(t)&&(t=t.trim())&&!Iwn(t)){o(Pwn(t),r)}else{t!=null&&s(r,t,n)}return this}get(t,r){t=PF(t);if(t){const n=Je.findKey(this,t);if(n){const i=this[n];if(!r){return i}if(r===true){return Nwn(i)}if(Je.isFunction(r)){return r.call(this,i,n)}if(Je.isRegExp(r)){return r.exec(i)}throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){t=PF(t);if(t){const n=Je.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||zxe(this,this[n],n,r)))}return false}delete(t,r){const n=this;let i=false;function s(o){o=PF(o);if(o){const u=Je.findKey(n,o);if(u&&(!r||zxe(n,n[u],u,r))){delete n[u];i=true}}}a(s,"deleteHeader");if(Je.isArray(t)){t.forEach(s)}else{s(t)}return i}clear(t){const r=Object.keys(this);let n=r.length;let i=false;while(n--){const s=r[n];if(!t||zxe(this,this[s],s,t,true)){delete this[s];i=true}}return i}normalize(t){const r=this;const n={};Je.forEach(this,(i,s)=>{const o=Je.findKey(n,s);if(o){r[o]=gJ(i);delete r[s];return}const u=t?kwn(s):String(s).trim();if(u!==s){delete r[s]}r[u]=gJ(i);n[u]=true});return this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);Je.forEach(this,(n,i)=>{n!=null&&n!==false&&(r[i]=t&&Je.isArray(n)?n.join(", "):n)});return r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);r.forEach(i=>n.set(i));return n}static accessor(t){const r=this[Xwt]=this[Xwt]={accessors:{}};const n=r.accessors;const i=this.prototype;function s(o){const u=PF(o);if(!n[u]){Dwn(i,o);n[u]=true}}a(s,"defineAccessor");Je.isArray(t)?t.forEach(s):s(t);return this}};iP.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Je.reduceDescriptors(iP.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});Je.freezeMethods(iP);var Bf=iP;function Kxe(e,t){const r=this||lRe;const n=t||r;const i=Bf.from(n.headers);let s=n.data;Je.forEach(e,a(function o(u){s=u.call(r,s,i.normalize(),t?t.status:void 0)},"transform"));i.normalize();return s}a(Kxe,"transformData");function TTt(e){return!!(e&&e.__CANCEL__)}a(TTt,"isCancel");function eC(e,t,r){yr.call(this,e==null?"canceled":e,yr.ERR_CANCELED,t,r);this.name="CanceledError"}a(eC,"CanceledError");Je.inherits(eC,yr,{__CANCEL__:true});function NF(e,t,r){const n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new yr("Request failed with status code "+r.status,[yr.ERR_BAD_REQUEST,yr.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}a(NF,"settle");function Lwn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}a(Lwn,"isAbsoluteURL");function Fwn(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}a(Fwn,"combineURLs");function cRe(e,t){if(e&&!Lwn(t)){return Fwn(e,t)}return t}a(cRe,"buildFullPath");var _J="1.6.2";function xTt(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}a(xTt,"parseProtocol");var Bwn=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Mwn(e,t,r){const n=r&&r.Blob||Lf.classes.Blob;const i=xTt(e);if(t===void 0&&n){t=true}if(i==="data"){e=i.length?e.slice(i.length+1):e;const s=Bwn.exec(e);if(!s){throw new yr("Invalid URL",yr.ERR_INVALID_URL)}const o=s[1];const u=s[2];const l=s[3];const c=Buffer.from(decodeURIComponent(l),u?"base64":"utf8");if(t){if(!n){throw new yr("Blob is not supported",yr.ERR_NOT_SUPPORT)}return new n([c],{type:o})}return c}throw new yr("Unsupported protocol "+i,yr.ERR_NOT_SUPPORT)}a(Mwn,"fromDataURI");function qwn(e,t){let r=0;const n=1e3/t;let i=null;return a(function s(o,u){const l=Date.now();if(o||l-r>n){if(i){clearTimeout(i);i=null}r=l;return e.apply(null,u)}if(!i){i=setTimeout(()=>{i=null;r=Date.now();return e.apply(null,u)},n-(l-r))}},"throttled")}a(qwn,"throttle");function RTt(e,t){e=e||10;const r=new Array(e);const n=new Array(e);let i=0;let s=0;let o;t=t!==void 0?t:1e3;return a(function u(l){const c=Date.now();const d=n[s];if(!o){o=c}r[i]=l;n[i]=c;let p=s;let f=0;while(p!==i){f+=r[p++];p=p%e}i=(i+1)%e;if(i===s){s=(s+1)%e}if(c-o<t){return}const m=d&&c-d;return m?Math.round(f*1e3/m):void 0},"push")}a(RTt,"speedometer");var mJ=Symbol("internals");var Qxe=class extends $E["default"].Transform{static{a(this,"AxiosTransformStream")}constructor(t){t=Je.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(u,l)=>{return!Je.isUndefined(l[u])});super({readableHighWaterMark:t.chunkSize});const r=this;const n=this[mJ]={length:t.length,timeWindow:t.timeWindow,ticksRate:t.ticksRate,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:false,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};const i=RTt(n.ticksRate*t.samplesCount,n.timeWindow);this.on("newListener",u=>{if(u==="progress"){if(!n.isCaptured){n.isCaptured=true}}});let s=0;n.updateProgress=qwn(a(function u(){const l=n.length;const c=n.bytesSeen;const d=c-s;if(!d||r.destroyed)return;const p=i(d);s=c;process.nextTick(()=>{r.emit("progress",{"loaded":c,"total":l,"progress":l?c/l:void 0,"bytes":d,"rate":p?p:void 0,"estimated":p&&l&&c<=l?(l-c)/p:void 0})})},"throttledHandler"),n.ticksRate);const o=a(()=>{n.updateProgress(true)},"onFinish");this.once("end",o);this.once("error",o)}_read(t){const r=this[mJ];if(r.onReadCallback){r.onReadCallback()}return super._read(t)}_transform(t,r,n){const i=this;const s=this[mJ];const o=s.maxRate;const u=this.readableHighWaterMark;const l=s.timeWindow;const c=1e3/l;const d=o/c;const p=s.minChunkSize!==false?Math.max(s.minChunkSize,d*.01):0;function f(h,g){const _=Buffer.byteLength(h);s.bytesSeen+=_;s.bytes+=_;if(s.isCaptured){s.updateProgress()}if(i.push(h)){process.nextTick(g)}else{s.onReadCallback=()=>{s.onReadCallback=null;process.nextTick(g)}}}a(f,"pushChunk");const m=a((h,g)=>{const _=Buffer.byteLength(h);let v=null;let S=u;let E;let b=0;if(o){const A=Date.now();if(!s.ts||(b=A-s.ts)>=l){s.ts=A;E=d-s.bytes;s.bytes=E<0?-E:0;b=0}E=d-s.bytes}if(o){if(E<=0){return setTimeout(()=>{g(null,h)},l-b)}if(E<S){S=E}}if(S&&_>S&&_-S>p){v=h.subarray(S);h=h.subarray(0,S)}f(h,v?()=>{process.nextTick(g,null,v)}:g)},"transformChunk");m(t,a(function h(g,_){if(g){return n(g)}if(_){m(_,h)}else{n(null)}},"transformNextChunk"))}setLength(t){this[mJ].length=+t;return this}};var Jwt=Qxe;var{asyncIterator:Qwt}=Symbol;var Uwn=a(async function*(e){if(e.stream){yield*e.stream()}else if(e.arrayBuffer){yield await e.arrayBuffer()}else if(e[Qwt]){yield*e[Qwt]()}else{yield e}},"readBlob");var OTt=Uwn;var $wn=Je.ALPHABET.ALPHA_DIGIT+"-_";var kF=new uTt.TextEncoder;var jE="\r\n";var jwn=kF.encode(jE);var Gwn=2;var Zxe=class{static{a(this,"FormDataPart")}constructor(t,r){const{escapeName:n}=this.constructor;const i=Je.isString(r);let s=`Content-Disposition: form-data; name="${n(t)}"${!i&&r.name?`; filename="${n(r.name)}"`:""}${jE}`;if(i){r=kF.encode(String(r).replace(/\r?\n|\r\n?/g,jE))}else{s+=`Content-Type: ${r.type||"application/octet-stream"}${jE}`}this.headers=kF.encode(s+jE);this.contentLength=i?r.byteLength:r.size;this.size=this.headers.byteLength+this.contentLength+Gwn;this.name=t;this.value=r}async*encode(){yield this.headers;const{value:t}=this;if(Je.isTypedArray(t)){yield t}else{yield*OTt(t)}yield jwn}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}};var Hwn=a((e,t,r)=>{const{tag:n="form-data-boundary",size:i=25,boundary:s=n+"-"+Je.generateString(i,$wn)}=r||{};if(!Je.isFormData(e)){throw TypeError("FormData instance required")}if(s.length<1||s.length>70){throw Error("boundary must be 10-70 characters long")}const o=kF.encode("--"+s+jE);const u=kF.encode("--"+s+"--"+jE+jE);let l=u.byteLength;const c=Array.from(e.entries()).map(([p,f])=>{const m=new Zxe(p,f);l+=m.size;return m});l+=o.byteLength*c.length;l=Je.toFiniteNumber(l);const d={"Content-Type":`multipart/form-data; boundary=${s}`};if(Number.isFinite(l)){d["Content-Length"]=l}t&&t(d);return lTt.Readable.from(async function*(){for(const p of c){yield o;yield*p.encode()}yield u}())},"formDataToStream");var Vwn=Hwn;var eRe=class extends $E["default"].Transform{static{a(this,"ZlibHeaderTransformStream")}__transform(t,r,n){this.push(t);n()}_transform(t,r,n){if(t.length!==0){this._transform=this.__transform;if(t[0]!==120){const i=Buffer.alloc(2);i[0]=120;i[1]=156;this.push(i,r)}}this.__transform(t,r,n)}};var zwn=eRe;var Kwn=a((e,t)=>{return Je.isAsyncFn(e)?function(...r){const n=r.pop();e.apply(this,r).then(i=>{try{t?n(null,...t(i)):n(null,i)}catch(s){n(s)}},n)}:e},"callbackify");var Wwn=Kwn;var Zwt={flush:GE["default"].constants.Z_SYNC_FLUSH,finishFlush:GE["default"].constants.Z_SYNC_FLUSH};var Ywn={flush:GE["default"].constants.BROTLI_OPERATION_FLUSH,finishFlush:GE["default"].constants.BROTLI_OPERATION_FLUSH};var eTt=Je.isFunction(GE["default"].createBrotliDecompress);var{http:Xwn,https:Jwn}=LCn["default"];var Qwn=/https:?/;var tTt=Lf.protocols.map(e=>{return e+":"});function Zwn(e){if(e.beforeRedirects.proxy){e.beforeRedirects.proxy(e)}if(e.beforeRedirects.config){e.beforeRedirects.config(e)}}a(Zwn,"dispatchBeforeRedirect");function PTt(e,t,r){let n=t;if(!n&&n!==false){const i=wCn.getProxyForUrl(r);if(i){n=new URL(i)}}if(n){if(n.username){n.auth=(n.username||"")+":"+(n.password||"")}if(n.auth){if(n.auth.username||n.auth.password){n.auth=(n.auth.username||"")+":"+(n.auth.password||"")}const s=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+s}e.headers.host=e.hostname+(e.port?":"+e.port:"");const i=n.hostname||n.host;e.hostname=i;e.host=i;e.port=n.port;e.path=r;if(n.protocol){e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`}}e.beforeRedirects.proxy=a(function i(s){PTt(s,t,s.href)},"beforeRedirect")}a(PTt,"setProxy");var eTn=typeof process!=="undefined"&&Je.kindOf(process)==="process";var tTn=a(e=>{return new Promise((t,r)=>{let n;let i;const s=a((l,c)=>{if(i)return;i=true;n&&n(l,c)},"done");const o=a(l=>{s(l);t(l)},"_resolve");const u=a(l=>{s(l,true);r(l)},"_reject");e(o,u,l=>n=l).catch(u)})},"wrapAsync");var rTn=a(({address:e,family:t})=>{if(!Je.isString(e)){throw TypeError("address must be a string")}return{address:e,family:t||(e.indexOf(".")<0?6:4)}},"resolveFamily");var rTt=a((e,t)=>rTn(Je.isObject(e)?e:{address:e,family:t}),"buildAddressEntry");var nTn=eTn&&a(function e(t){return tTn(a(async function r(n,i,s){let{data:o,lookup:u,family:l}=t;const{responseType:c,responseEncoding:d}=t;const p=t.method.toUpperCase();let f;let m=false;let h;if(u){const he=Wwn(u,Fe=>Je.isArray(Fe)?Fe:[Fe]);u=a((Fe,Oe,M)=>{he(Fe,Oe,(Q,fe,B)=>{const ye=Je.isArray(fe)?fe.map(De=>rTt(De)):[rTt(fe,B)];Oe.all?M(Q,ye):M(Q,ye[0].address,ye[0].family)})},"lookup")}const g=new FCn["default"];const _=a(()=>{if(t.cancelToken){t.cancelToken.unsubscribe(v)}if(t.signal){t.signal.removeEventListener("abort",v)}g.removeAllListeners()},"onFinished");s((he,Fe)=>{f=true;if(Fe){m=true;_()}});function v(he){g.emit("abort",!he||he.type?new eC(null,t,h):he)}a(v,"abort");g.once("abort",i);if(t.cancelToken||t.signal){t.cancelToken&&t.cancelToken.subscribe(v);if(t.signal){t.signal.aborted?v():t.signal.addEventListener("abort",v)}}const S=cRe(t.baseURL,t.url);const E=new URL(S,"http://localhost");const b=E.protocol||tTt[0];if(b==="data:"){let he;if(p!=="GET"){return NF(n,i,{status:405,statusText:"method not allowed",headers:{},config:t})}try{he=Mwn(t.url,c==="blob",{Blob:t.env&&t.env.Blob})}catch(Fe){throw yr.from(Fe,yr.ERR_BAD_REQUEST,t)}if(c==="text"){he=he.toString(d);if(!d||d==="utf8"){he=Je.stripBOM(he)}}else if(c==="stream"){he=$E["default"].Readable.from(he)}return NF(n,i,{data:he,status:200,statusText:"OK",headers:new Bf,config:t})}if(tTt.indexOf(b)===-1){return i(new yr("Unsupported protocol "+b,yr.ERR_BAD_REQUEST,t))}const A=Bf.from(t.headers).normalize();A.set("User-Agent","axios/"+_J,false);const C=t.onDownloadProgress;const T=t.onUploadProgress;const O=t.maxRate;let P=void 0;let R=void 0;if(Je.isSpecCompliantForm(o)){const he=A.getContentType(/boundary=([-_\w\d]{10,70})/i);o=Vwn(o,Fe=>{A.set(Fe)},{tag:`axios-${_J}-boundary`,boundary:he&&he[1]||void 0})}else if(Je.isFormData(o)&&Je.isFunction(o.getHeaders)){A.set(o.getHeaders());if(!A.hasContentLength()){try{const he=await DCn["default"].promisify(o.getLength).call(o);Number.isFinite(he)&&he>=0&&A.setContentLength(he)}catch(he){}}}else if(Je.isBlob(o)){o.size&&A.setContentType(o.type||"application/octet-stream");A.setContentLength(o.size||0);o=$E["default"].Readable.from(OTt(o))}else if(o&&!Je.isStream(o)){if(Buffer.isBuffer(o));else if(Je.isArrayBuffer(o)){o=Buffer.from(new Uint8Array(o))}else if(Je.isString(o)){o=Buffer.from(o,"utf-8")}else{return i(new yr("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",yr.ERR_BAD_REQUEST,t))}A.setContentLength(o.length,false);if(t.maxBodyLength>-1&&o.length>t.maxBodyLength){return i(new yr("Request body larger than maxBodyLength limit",yr.ERR_BAD_REQUEST,t))}}const I=Je.toFiniteNumber(A.getContentLength());if(Je.isArray(O)){P=O[0];R=O[1]}else{P=R=O}if(o&&(T||P)){if(!Je.isStream(o)){o=$E["default"].Readable.from(o,{objectMode:false})}o=$E["default"].pipeline([o,new Jwt({length:I,maxRate:Je.toFiniteNumber(P)})],Je.noop);T&&o.on("progress",he=>{T(Object.assign(he,{upload:true}))})}let D=void 0;if(t.auth){const he=t.auth.username||"";const Fe=t.auth.password||"";D=he+":"+Fe}if(!D&&E.username){const he=E.username;const Fe=E.password;D=he+":"+Fe}D&&A.delete("authorization");let U;try{U=aRe(E.pathname+E.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(he){const Fe=new Error(he.message);Fe.config=t;Fe.url=t.url;Fe.exists=true;return i(Fe)}A.set("Accept-Encoding","gzip, compress, deflate"+(eTt?", br":""),false);const te={path:U,method:p,headers:A.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:D,protocol:b,family:l,beforeRedirect:Zwn,beforeRedirects:{}};!Je.isUndefined(u)&&(te.lookup=u);if(t.socketPath){te.socketPath=t.socketPath}else{te.hostname=E.hostname;te.port=E.port;PTt(te,t.proxy,b+"//"+E.hostname+(E.port?":"+E.port:"")+te.path)}let ve;const me=Qwn.test(te.protocol);te.agent=me?t.httpsAgent:t.httpAgent;if(t.transport){ve=t.transport}else if(t.maxRedirects===0){ve=me?kCn["default"]:ICn["default"]}else{if(t.maxRedirects){te.maxRedirects=t.maxRedirects}if(t.beforeRedirect){te.beforeRedirects.config=t.beforeRedirect}ve=me?Jwn:Xwn}if(t.maxBodyLength>-1){te.maxBodyLength=t.maxBodyLength}else{te.maxBodyLength=Infinity}if(t.insecureHTTPParser){te.insecureHTTPParser=t.insecureHTTPParser}h=ve.request(te,a(function he(Fe){if(h.destroyed)return;const Oe=[Fe];const M=+Fe.headers["content-length"];if(C){const De=new Jwt({length:Je.toFiniteNumber(M),maxRate:Je.toFiniteNumber(R)});C&&De.on("progress",$e=>{C(Object.assign($e,{download:true}))});Oe.push(De)}let Q=Fe;const fe=Fe.req||h;if(t.decompress!==false&&Fe.headers["content-encoding"]){if(p==="HEAD"||Fe.statusCode===204){delete Fe.headers["content-encoding"]}switch((Fe.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Oe.push(GE["default"].createUnzip(Zwt));delete Fe.headers["content-encoding"];break;case"deflate":Oe.push(new zwn);Oe.push(GE["default"].createUnzip(Zwt));delete Fe.headers["content-encoding"];break;case"br":if(eTt){Oe.push(GE["default"].createBrotliDecompress(Ywn));delete Fe.headers["content-encoding"]}}}Q=Oe.length>1?$E["default"].pipeline(Oe,Je.noop):Oe[0];const B=$E["default"].finished(Q,()=>{B();_()});const ye={status:Fe.statusCode,statusText:Fe.statusMessage,headers:new Bf(Fe.headers),config:t,request:fe};if(c==="stream"){ye.data=Q;NF(n,i,ye)}else{const De=[];let $e=0;Q.on("data",a(function gt(ut){De.push(ut);$e+=ut.length;if(t.maxContentLength>-1&&$e>t.maxContentLength){m=true;Q.destroy();i(new yr("maxContentLength size of "+t.maxContentLength+" exceeded",yr.ERR_BAD_RESPONSE,t,fe))}},"handleStreamData"));Q.on("aborted",a(function gt(){if(m){return}const ut=new yr("maxContentLength size of "+t.maxContentLength+" exceeded",yr.ERR_BAD_RESPONSE,t,fe);Q.destroy(ut);i(ut)},"handlerStreamAborted"));Q.on("error",a(function gt(ut){if(h.destroyed)return;i(yr.from(ut,null,t,fe))},"handleStreamError"));Q.on("end",a(function gt(){try{let ut=De.length===1?De[0]:Buffer.concat(De);if(c!=="arraybuffer"){ut=ut.toString(d);if(!d||d==="utf8"){ut=Je.stripBOM(ut)}}ye.data=ut}catch(ut){return i(yr.from(ut,null,t,ye.request,ye))}NF(n,i,ye)},"handleStreamEnd"))}g.once("abort",De=>{if(!Q.destroyed){Q.emit("error",De);Q.destroy()}})},"handleResponse"));g.once("abort",he=>{i(he);h.destroy(he)});h.on("error",a(function he(Fe){i(yr.from(Fe,null,t,h))},"handleRequestError"));h.on("socket",a(function he(Fe){Fe.setKeepAlive(true,1e3*60)},"handleRequestSocket"));if(t.timeout){const he=parseInt(t.timeout,10);if(Number.isNaN(he)){i(new yr("error trying to parse `config.timeout` to int",yr.ERR_BAD_OPTION_VALUE,t,h));return}h.setTimeout(he,a(function Fe(){if(f)return;let Oe=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const M=t.transitional||oRe;if(t.timeoutErrorMessage){Oe=t.timeoutErrorMessage}i(new yr(Oe,M.clarifyTimeoutError?yr.ETIMEDOUT:yr.ECONNABORTED,t,h));v()},"handleRequestTimeout"))}if(Je.isStream(o)){let he=false;let Fe=false;o.on("end",()=>{he=true});o.once("error",Oe=>{Fe=true;h.destroy(Oe)});o.on("close",()=>{if(!he&&!Fe){v(new eC("Request stream has been aborted",t,h))}});o.pipe(h)}else{h.end(o)}},"dispatchHttpRequest"))},"httpAdapter");var iTn=Lf.hasStandardBrowserEnv?{write(e,t,r,n,i,s){const o=[e+"="+encodeURIComponent(t)];Je.isNumber(r)&&o.push("expires="+new Date(r).toGMTString());Je.isString(n)&&o.push("path="+n);Je.isString(i)&&o.push("domain="+i);s===true&&o.push("secure");document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var sTn=Lf.hasStandardBrowserEnv?a(function e(){const t=/(msie|trident)/i.test(navigator.userAgent);const r=document.createElement("a");let n;function i(s){let o=s;if(t){r.setAttribute("href",o);o=r.href}r.setAttribute("href",o);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}a(i,"resolveURL");n=i(window.location.href);return a(function s(o){const u=Je.isString(o)?i(o):o;return u.protocol===n.protocol&&u.host===n.host},"isURLSameOrigin")},"standardBrowserEnv")():a(function e(){return a(function t(){return true},"isURLSameOrigin")},"nonStandardBrowserEnv")();function nTt(e,t){let r=0;const n=RTt(50,250);return i=>{const s=i.loaded;const o=i.lengthComputable?i.total:void 0;const u=s-r;const l=n(u);const c=s<=o;r=s;const d={loaded:s,total:o,progress:o?s/o:void 0,bytes:u,rate:l?l:void 0,estimated:l&&o&&c?(o-s)/l:void 0,event:i};d[t?"download":"upload"]=true;e(d)}}a(nTt,"progressEventReducer");var aTn=typeof XMLHttpRequest!=="undefined";var oTn=aTn&&function(e){return new Promise(a(function t(r,n){let i=e.data;const s=Bf.from(e.headers).normalize();let{responseType:o,withXSRFToken:u}=e;let l;function c(){if(e.cancelToken){e.cancelToken.unsubscribe(l)}if(e.signal){e.signal.removeEventListener("abort",l)}}a(c,"done");let d;if(Je.isFormData(i)){if(Lf.hasStandardBrowserEnv||Lf.hasStandardBrowserWebWorkerEnv){s.setContentType(false)}else if((d=s.getContentType())!==false){const[g,..._]=d?d.split(";").map(v=>v.trim()).filter(Boolean):[];s.setContentType([g||"multipart/form-data",..._].join("; "))}}let p=new XMLHttpRequest;if(e.auth){const g=e.auth.username||"";const _=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(g+":"+_))}const f=cRe(e.baseURL,e.url);p.open(e.method.toUpperCase(),aRe(f,e.params,e.paramsSerializer),true);p.timeout=e.timeout;function m(){if(!p){return}const g=Bf.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders());const _=!o||o==="text"||o==="json"?p.responseText:p.response;const v={data:_,status:p.status,statusText:p.statusText,headers:g,config:e,request:p};NF(a(function S(E){r(E);c()},"_resolve"),a(function S(E){n(E);c()},"_reject"),v);p=null}a(m,"onloadend");if("onloadend"in p){p.onloadend=m}else{p.onreadystatechange=a(function g(){if(!p||p.readyState!==4){return}if(p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)){return}setTimeout(m)},"handleLoad")}p.onabort=a(function g(){if(!p){return}n(new yr("Request aborted",yr.ECONNABORTED,e,p));p=null},"handleAbort");p.onerror=a(function g(){n(new yr("Network Error",yr.ERR_NETWORK,e,p));p=null},"handleError");p.ontimeout=a(function g(){let _=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const v=e.transitional||oRe;if(e.timeoutErrorMessage){_=e.timeoutErrorMessage}n(new yr(_,v.clarifyTimeoutError?yr.ETIMEDOUT:yr.ECONNABORTED,e,p));p=null},"handleTimeout");if(Lf.hasStandardBrowserEnv){u&&Je.isFunction(u)&&(u=u(e));if(u||u!==false&&sTn(f)){const g=e.xsrfHeaderName&&e.xsrfCookieName&&iTn.read(e.xsrfCookieName);if(g){s.set(e.xsrfHeaderName,g)}}}i===void 0&&s.setContentType(null);if("setRequestHeader"in p){Je.forEach(s.toJSON(),a(function g(_,v){p.setRequestHeader(v,_)},"setRequestHeader"))}if(!Je.isUndefined(e.withCredentials)){p.withCredentials=!!e.withCredentials}if(o&&o!=="json"){p.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){p.addEventListener("progress",nTt(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&p.upload){p.upload.addEventListener("progress",nTt(e.onUploadProgress))}if(e.cancelToken||e.signal){l=a(g=>{if(!p){return}n(!g||g.type?new eC(null,e,p):g);p.abort();p=null},"onCanceled");e.cancelToken&&e.cancelToken.subscribe(l);if(e.signal){e.signal.aborted?l():e.signal.addEventListener("abort",l)}}const h=xTt(f);if(h&&Lf.protocols.indexOf(h)===-1){n(new yr("Unsupported protocol "+h+":",yr.ERR_BAD_REQUEST,e));return}p.send(i||null)},"dispatchXhrRequest"))};var tRe={http:nTn,xhr:oTn};Je.forEach(tRe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});var iTt=a(e=>`- ${e}`,"renderReason");var uTn=a(e=>Je.isFunction(e)||e===null||e===false,"isResolvedHandle");var NTt={getAdapter:e=>{e=Je.isArray(e)?e:[e];const{length:t}=e;let r;let n;const i={};for(let s=0;s<t;s++){r=e[s];let o;n=r;if(!uTn(r)){n=tRe[(o=String(r)).toLowerCase()];if(n===void 0){throw new yr(`Unknown adapter '${o}'`)}}if(n){break}i[o||"#"+s]=n}if(!n){const s=Object.entries(i).map(([u,l])=>`adapter ${u} `+(l===false?"is not supported by the environment":"is not available in the build"));let o=t?s.length>1?"since :\n"+s.map(iTt).join("\n"):" "+iTt(s[0]):"as no adapter specified";throw new yr(`There is no suitable adapter to dispatch the request `+o,"ERR_NOT_SUPPORT")}return n},adapters:tRe};function Wxe(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new eC(null,e)}}a(Wxe,"throwIfCancellationRequested");function sTt(e){Wxe(e);e.headers=Bf.from(e.headers);e.data=Kxe.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}const t=NTt.getAdapter(e.adapter||lRe.adapter);return t(e).then(a(function r(n){Wxe(e);n.data=Kxe.call(e,e.transformResponse,n);n.headers=Bf.from(n.headers);return n},"onAdapterResolution"),a(function r(n){if(!TTt(n)){Wxe(e);if(n&&n.response){n.response.data=Kxe.call(e,e.transformResponse,n.response);n.response.headers=Bf.from(n.response.headers)}}return Promise.reject(n)},"onAdapterRejection"))}a(sTt,"dispatchRequest");var aTt=a(e=>e instanceof Bf?e.toJSON():e,"headersToObject");function sP(e,t){t=t||{};const r={};function n(c,d,p){if(Je.isPlainObject(c)&&Je.isPlainObject(d)){return Je.merge.call({caseless:p},c,d)}else if(Je.isPlainObject(d)){return Je.merge({},d)}else if(Je.isArray(d)){return d.slice()}return d}a(n,"getMergedValue");function i(c,d,p){if(!Je.isUndefined(d)){return n(c,d,p)}else if(!Je.isUndefined(c)){return n(void 0,c,p)}}a(i,"mergeDeepProperties");function s(c,d){if(!Je.isUndefined(d)){return n(void 0,d)}}a(s,"valueFromConfig2");function o(c,d){if(!Je.isUndefined(d)){return n(void 0,d)}else if(!Je.isUndefined(c)){return n(void 0,c)}}a(o,"defaultToConfig2");function u(c,d,p){if(p in t){return n(c,d)}else if(p in e){return n(void 0,c)}}a(u,"mergeDirectKeys");const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u,headers:(c,d)=>i(aTt(c),aTt(d),true)};Je.forEach(Object.keys(Object.assign({},e,t)),a(function c(d){const p=l[d]||i;const f=p(e[d],t[d],d);Je.isUndefined(f)&&p!==u||(r[d]=f)},"computeConfigValue"));return r}a(sP,"mergeConfig");var dRe={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{dRe[e]=a(function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e},"validator")});var oTt={};dRe.transitional=a(function e(t,r,n){function i(s,o){return"[Axios v"+_J+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}a(i,"formatMessage");return(s,o,u)=>{if(t===false){throw new yr(i(o," has been removed"+(r?" in "+r:"")),yr.ERR_DEPRECATED)}if(r&&!oTt[o]){oTt[o]=true;console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(s,o,u):true}},"transitional");function lTn(e,t,r){if(typeof e!=="object"){throw new yr("options must be an object",yr.ERR_BAD_OPTION_VALUE)}const n=Object.keys(e);let i=n.length;while(i-- >0){const s=n[i];const o=t[s];if(o){const u=e[s];const l=u===void 0||o(u,s,e);if(l!==true){throw new yr("option "+s+" must be "+l,yr.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new yr("Unknown option "+s,yr.ERR_BAD_OPTION)}}}a(lTn,"assertOptions");var rRe={assertOptions:lTn,validators:dRe};var UE=rRe.validators;var aP=class{static{a(this,"Axios")}constructor(t){this.defaults=t;this.interceptors={request:new Ywt,response:new Ywt}}request(t,r){if(typeof t==="string"){r=r||{};r.url=t}else{r=t||{}}r=sP(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:s}=r;if(n!==void 0){rRe.assertOptions(n,{silentJSONParsing:UE.transitional(UE.boolean),forcedJSONParsing:UE.transitional(UE.boolean),clarifyTimeoutError:UE.transitional(UE.boolean)},false)}if(i!=null){if(Je.isFunction(i)){r.paramsSerializer={serialize:i}}else{rRe.assertOptions(i,{encode:UE.function,serialize:UE.function},true)}}r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=s&&Je.merge(s.common,s[r.method]);s&&Je.forEach(["delete","get","head","post","put","patch","common"],h=>{delete s[h]});r.headers=Bf.concat(o,s);const u=[];let l=true;this.interceptors.request.forEach(a(function h(g){if(typeof g.runWhen==="function"&&g.runWhen(r)===false){return}l=l&&g.synchronous;u.unshift(g.fulfilled,g.rejected)},"unshiftRequestInterceptors"));const c=[];this.interceptors.response.forEach(a(function h(g){c.push(g.fulfilled,g.rejected)},"pushResponseInterceptors"));let d;let p=0;let f;if(!l){const h=[sTt.bind(this),void 0];h.unshift.apply(h,u);h.push.apply(h,c);f=h.length;d=Promise.resolve(r);while(p<f){d=d.then(h[p++],h[p++])}return d}f=u.length;let m=r;p=0;while(p<f){const h=u[p++];const g=u[p++];try{m=h(m)}catch(_){g.call(this,_);break}}try{d=sTt.call(this,m)}catch(h){return Promise.reject(h)}p=0;f=c.length;while(p<f){d=d.then(c[p++],c[p++])}return d}getUri(t){t=sP(this.defaults,t);const r=cRe(t.baseURL,t.url);return aRe(r,t.params,t.paramsSerializer)}};Je.forEach(["delete","get","head","options"],a(function e(t){aP.prototype[t]=function(r,n){return this.request(sP(n||{},{method:t,url:r,data:(n||{}).data}))}},"forEachMethodNoData"));Je.forEach(["post","put","patch"],a(function e(t){function r(n){return a(function i(s,o,u){return this.request(sP(u||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))},"httpMethod")}a(r,"generateHTTPMethod");aP.prototype[t]=r();aP.prototype[t+"Form"]=r(true)},"forEachMethodWithData"));var yJ=aP;var nRe=class e{static{a(this,"CancelToken")}constructor(t){if(typeof t!=="function"){throw new TypeError("executor must be a function.")}let r;this.promise=new Promise(a(function i(s){r=s},"promiseExecutor"));const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;while(s-- >0){n._listeners[s](i)}n._listeners=null});this.promise.then=i=>{let s;const o=new Promise(u=>{n.subscribe(u);s=u}).then(i);o.cancel=a(function u(){n.unsubscribe(s)},"reject");return o};t(a(function i(s,o,u){if(n.reason){return}n.reason=new eC(s,o,u);r(n.reason)},"cancel"))}throwIfRequested(){if(this.reason){throw this.reason}}subscribe(t){if(this.reason){t(this.reason);return}if(this._listeners){this._listeners.push(t)}else{this._listeners=[t]}}unsubscribe(t){if(!this._listeners){return}const r=this._listeners.indexOf(t);if(r!==-1){this._listeners.splice(r,1)}}static source(){let t;const r=new e(a(function n(i){t=i},"executor"));return{token:r,cancel:t}}};var cTn=nRe;function dTn(e){return a(function t(r){return e.apply(null,r)},"wrap")}a(dTn,"spread");function pTn(e){return Je.isObject(e)&&e.isAxiosError===true}a(pTn,"isAxiosError");var iRe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(iRe).forEach(([e,t])=>{iRe[t]=e});var fTn=iRe;function ITt(e){const t=new yJ(e);const r=dTt(yJ.prototype.request,t);Je.extend(r,yJ.prototype,t,{allOwnKeys:true});Je.extend(r,t,null,{allOwnKeys:true});r.create=a(function n(i){return ITt(sP(e,i))},"create");return r}a(ITt,"createInstance");var Lo=ITt(lRe);Lo.Axios=yJ;Lo.CanceledError=eC;Lo.CancelToken=cTn;Lo.isCancel=TTt;Lo.VERSION=_J;Lo.toFormData=SJ;Lo.AxiosError=yr;Lo.Cancel=Lo.CanceledError;Lo.all=a(function e(t){return Promise.all(t)},"all");Lo.spread=dTn;Lo.isAxiosError=pTn;Lo.mergeConfig=sP;Lo.AxiosHeaders=Bf;Lo.formToJSON=e=>wTt(Je.isHTMLForm(e)?new FormData(e):e);Lo.getAdapter=NTt.getAdapter;Lo.HttpStatusCode=fTn;Lo.default=Lo;kTt.exports=Lo});var wJ=y(CJ=>{"use strict";Object.defineProperty(CJ,"__esModule",{value:true});CJ.CredentialsMethod=void 0;var DTt;(function(e){e["None"]="none";e["ApiToken"]="api_token";e["ClientCredentials"]="client_credentials"})(DTt||(CJ.CredentialsMethod=DTt={}))});var rC=y(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:true});Fo.FgaRequiredParamError=Fo.FgaValidationError=Fo.FgaApiAuthenticationError=Fo.FgaApiInternalError=Fo.FgaApiRateLimitExceededError=Fo.FgaApiNotFoundError=Fo.FgaApiValidationError=Fo.FgaApiError=Fo.FgaError=void 0;var uP=class extends Error{static{a(this,"FgaError")}constructor(t,r){super(r||typeof t==="string"?t:`FGA Error${(t===null||t===void 0?void 0:t.message)?`: ${t.message}`:""}`);this.name="FgaError";if(t===null||t===void 0?void 0:t.stack){this.stack=t.stack}}};Fo.FgaError=uP;function xJ(e){let t=(e||"").split("/");if(t.length<4){t=[]}const r=t[2]||"";const n=t[3]||"";return{storeId:r,endpointCategory:n}}a(xJ,"getRequestMetadataFromPath");var LTt="fga-request-id";function _Re(e){return e.response?Object.fromEntries(Object.entries(e.response.headers).map(([t,r])=>[t.toLowerCase(),r])):{}}a(_Re,"getResponseHeaders");var tC=class extends uP{static{a(this,"FgaApiError")}constructor(t,r){var n,i,s,o,u,l,c,d,p,f;super(r?r:t);this.name="FgaApiError";this.statusCode=(n=t.response)===null||n===void 0?void 0:n.status;this.statusText=(i=t.response)===null||i===void 0?void 0:i.statusText;this.requestData=(s=t.config)===null||s===void 0?void 0:s.data;this.requestURL=(o=t.config)===null||o===void 0?void 0:o.url;this.method=(u=t.config)===null||u===void 0?void 0:u.method;const{storeId:m,endpointCategory:h}=xJ((l=t.request)===null||l===void 0?void 0:l.path);this.storeId=m;this.endpointCategory=h;this.apiErrorMessage=(d=(c=t.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.message;this.responseData=(p=t.response)===null||p===void 0?void 0:p.data;this.responseHeader=(f=t.response)===null||f===void 0?void 0:f.headers;const g=_Re(t);this.requestId=g[LTt];if(t===null||t===void 0?void 0:t.stack){this.stack=t.stack}}};Fo.FgaApiError=tC;var pRe=class extends tC{static{a(this,"FgaApiValidationError")}constructor(t,r){var n,i,s,o,u,l,c,d;super(t);this.name="FgaApiValidationError";this.apiErrorCode=(i=(n=t.response)===null||n===void 0?void 0:n.data)===null||i===void 0?void 0:i.code;const{endpointCategory:p}=xJ((s=t.request)===null||s===void 0?void 0:s.path);this.message=r?r:((u=(o=t.response)===null||o===void 0?void 0:o.data)===null||u===void 0?void 0:u.message)?`FGA API Validation Error: ${(l=t.config)===null||l===void 0?void 0:l.method} ${p} : Error ${(d=(c=t.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.message}`:t.message}};Fo.FgaApiValidationError=pRe;var fRe=class extends tC{static{a(this,"FgaApiNotFoundError")}constructor(t,r){var n,i,s,o,u,l,c;super(t);this.name="FgaApiNotFoundError";this.apiErrorCode=(i=(n=t.response)===null||n===void 0?void 0:n.data)===null||i===void 0?void 0:i.code;this.message=r?r:((o=(s=t.response)===null||s===void 0?void 0:s.data)===null||o===void 0?void 0:o.message)?`FGA API NotFound Error: ${(u=t.config)===null||u===void 0?void 0:u.method} : Error ${(c=(l=t.response)===null||l===void 0?void 0:l.data)===null||c===void 0?void 0:c.message}`:t.message}};Fo.FgaApiNotFoundError=fRe;var mRe=class extends tC{static{a(this,"FgaApiRateLimitExceededError")}constructor(t,r){var n,i,s;super(t);this.name="FgaApiRateLimitExceededError";this.apiErrorCode=(i=(n=t.response)===null||n===void 0?void 0:n.data)===null||i===void 0?void 0:i.code;const{endpointCategory:o}=xJ((s=t.request)===null||s===void 0?void 0:s.path);const u=_Re(t);this.message=r?r:`FGA API Rate Limit Error for ${this.method} ${o}`}};Fo.FgaApiRateLimitExceededError=mRe;var hRe=class extends tC{static{a(this,"FgaApiInternalError")}constructor(t,r){var n,i,s,o,u,l,c,d;super(t);this.name="FgaApiInternalError";const{endpointCategory:p}=xJ((n=t.request)===null||n===void 0?void 0:n.path);this.apiErrorCode=(s=(i=t.response)===null||i===void 0?void 0:i.data)===null||s===void 0?void 0:s.code;this.message=r?r:((u=(o=t.response)===null||o===void 0?void 0:o.data)===null||u===void 0?void 0:u.message)?`FGA API Internal Error: ${(l=t.config)===null||l===void 0?void 0:l.method} ${p} : Error ${(d=(c=t.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.message}`:t.message}};Fo.FgaApiInternalError=hRe;var gRe=class extends uP{static{a(this,"FgaApiAuthenticationError")}constructor(t){var r,n,i,s,o,u,l,c,d,p;super(`FGA Authentication Error.${((r=t.response)===null||r===void 0?void 0:r.statusText)?` ${t.response.statusText}`:""}`);this.name="FgaApiAuthenticationError";this.statusCode=(n=t.response)===null||n===void 0?void 0:n.status;this.statusText=(i=t.response)===null||i===void 0?void 0:i.statusText;this.requestURL=(s=t.config)===null||s===void 0?void 0:s.url;this.method=(o=t.config)===null||o===void 0?void 0:o.method;this.responseData=(u=t.response)===null||u===void 0?void 0:u.data;this.responseHeader=(l=t.response)===null||l===void 0?void 0:l.headers;this.apiErrorCode=(d=(c=t.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.code;const f=_Re(t);this.requestId=f[LTt];let m;try{m=JSON.parse(((p=t.config)===null||p===void 0?void 0:p.data)||"{}")}catch(h){}this.clientId=m===null||m===void 0?void 0:m.client_id;this.audience=m===null||m===void 0?void 0:m.audience;this.grantType=m===null||m===void 0?void 0:m.grant_type;if(t===null||t===void 0?void 0:t.stack){this.stack=t.stack}}};Fo.FgaApiAuthenticationError=gRe;var TJ=class extends uP{static{a(this,"FgaValidationError")}constructor(t,r){super(r);this.field=t;this.name="FgaValidationError"}};Fo.FgaValidationError=TJ;var yRe=class extends TJ{static{a(this,"FgaRequiredParamError")}constructor(t,r,n){super(r,n);this.functionName=t;this.name="FgaRequiredParamError"}};Fo.FgaRequiredParamError=yRe});var LF=y(HE=>{"use strict";Object.defineProperty(HE,"__esModule",{value:true});HE.isWellFormedUlidString=HE.isWellFormedUriString=HE.assertParamExists=void 0;var mTn=rC();var hTn=a(function(e,t,r){if(r===null||r===void 0){throw new mTn.FgaRequiredParamError(e,t,`Required parameter ${t} was null or undefined when calling ${e}.`)}},"assertParamExists");HE.assertParamExists=hTn;var gTn=a(e=>{try{const t=new URL(e);return(t.toString()===e||t.toString()===`${e}/`)&&(t.protocol==="https:"||t.protocol==="http:")}catch(t){return false}},"isWellFormedUriString");HE.isWellFormedUriString=gTn;var yTn=a(e=>{var t;const r=/^[0-7][0-9A-HJKMNP-TV-Z]{25}$/;return!!(typeof e==="string"&&((t=e.match(r))===null||t===void 0?void 0:t.length))},"isWellFormedUlidString");HE.isWellFormedUlidString=yTn});var ERe=y(lP=>{"use strict";Object.defineProperty(lP,"__esModule",{value:true});lP.Configuration=lP.GetDefaultRetryParams=void 0;var FF=wJ();var vRe=rC();var RJ=LF();var _Tn=15;var vTn=100;var ETn="openfga-sdk js/0.3.0";function bTn(e=_Tn,t=vTn){return{maxRetry:e,minWaitInMs:t}}a(bTn,"GetDefaultRetryParams");lP.GetDefaultRetryParams=bTn;var OJ=class{static{a(this,"Configuration")}constructor(t={}){this.apiScheme="https";this.getBasePath=()=>`${this.apiScheme}://${this.apiHost}`;this.apiScheme=t.apiScheme||this.apiScheme;this.apiHost=t.apiHost;this.storeId=t.storeId;const r=t.credentials;if(r){switch(r===null||r===void 0?void 0:r.method){case FF.CredentialsMethod.ApiToken:this.credentials={method:r.method,config:{token:r.config.token,headerName:"Authorization",headerValuePrefix:"Bearer"}};break;case FF.CredentialsMethod.ClientCredentials:this.credentials={method:FF.CredentialsMethod.ClientCredentials,config:{clientId:r.config.clientId,clientSecret:r.config.clientSecret,apiAudience:r.config.apiAudience,apiTokenIssuer:r.config.apiTokenIssuer}};break;case FF.CredentialsMethod.None:default:this.credentials={method:FF.CredentialsMethod.None};break}}const n=t.baseOptions||{};n.headers=n.headers||{};if(typeof process==="object"&&process.title==="node"&&!n.headers["User-Agent"]){n.headers["User-Agent"]=ETn}this.baseOptions=n;this.retryParams=t.retryParams}isValid(){var t;(0,RJ.assertParamExists)("Configuration","apiScheme",this.apiScheme);(0,RJ.assertParamExists)("Configuration","apiHost",this.apiHost);if(!(0,RJ.isWellFormedUriString)(this.getBasePath())){throw new vRe.FgaValidationError(`Configuration.apiScheme (${this.apiScheme}) and Configuration.apiHost (${this.apiHost}) do not form a valid URI (${this.getBasePath()})`)}if(this.storeId&&!(0,RJ.isWellFormedUlidString)(this.storeId)){throw new vRe.FgaValidationError("storeId")}if(((t=this.retryParams)===null||t===void 0?void 0:t.maxRetry)&&this.retryParams.maxRetry>15){throw new vRe.FgaValidationError("Configuration.retryParams.maxRetry exceeds maximum allowed limit of 15")}return true}};lP.Configuration=OJ;OJ.sdkVersion="0.3.0"});var FTt=y(PJ=>{"use strict";Object.defineProperty(PJ,"__esModule",{value:true});PJ.assertNever=void 0;function STn(e){throw new Error(`Assertion failed. Unacceptable value: '${e}'`)}a(STn,"assertNever");PJ.assertNever=STn});var BTt=y(NJ=>{"use strict";Object.defineProperty(NJ,"__esModule",{value:true});NJ.chunkArray=void 0;function ATn(e,t){const r=[];const n=[...e];while(n.length>0){r.push(n.splice(0,t))}return r}a(ATn,"chunkArray");NJ.chunkArray=ATn});var qTt=y(cP=>{"use strict";Object.defineProperty(cP,"__esModule",{value:true});cP.generateRandomIdWithNonUniqueFallback=cP.generateRandomId=void 0;var IJ=require("crypto");function MTt(){if(typeof IJ.randomUUID==="function"){return(0,IJ.randomUUID)()}if(typeof IJ.randomBytes==="function"){return(0,IJ.randomBytes)(20).toString("hex")}return}a(MTt,"generateRandomId");cP.generateRandomId=MTt;function CTn(){return MTt()||"00000000-0000-0000-0000-000000000000"}a(CTn,"generateRandomIdWithNonUniqueFallback");cP.generateRandomIdWithNonUniqueFallback=CTn});var UTt=y(kJ=>{"use strict";Object.defineProperty(kJ,"__esModule",{value:true});kJ.setHeaderIfNotSet=void 0;function wTn(e,t,r){if(!e[t]&&r){e[t]=r}}a(wTn,"setHeaderIfNotSet");kJ.setHeaderIfNotSet=wTn});var $Tt=y(DJ=>{"use strict";Object.defineProperty(DJ,"__esModule",{value:true});DJ.setNotEnumerableProperty=void 0;function TTn(e,t,r){Object.defineProperty(e,t,{enumerable:false,writable:false,value:r})}a(TTn,"setNotEnumerableProperty");DJ.setNotEnumerableProperty=TTn});var bRe=y(hh=>{"use strict";var xTn=hh&&hh.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)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===void 0)n=r;e[n]=t[r]});var BF=hh&&hh.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))xTn(t,e,r)};Object.defineProperty(hh,"__esModule",{value:true});BF(FTt(),hh);BF(BTt(),hh);BF(qTt(),hh);BF(UTt(),hh);BF($Tt(),hh)});var ARe=y(eu=>{"use strict";var SRe=eu&&eu.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}a(i,"adopt");return new(r||(r=Promise))(function(s,o){function u(d){try{c(n.next(d))}catch(p){o(p)}}a(u,"fulfilled");function l(d){try{c(n["throw"](d))}catch(p){o(p)}}a(l,"rejected");function c(d){d.done?s(d.value):i(d.value).then(u,l)}a(c,"step");c((n=n.apply(e,t||[])).next())})};Object.defineProperty(eu,"__esModule",{value:true});eu.createRequestFunction=eu.attemptHttpRequest=eu.toPathString=eu.serializeDataIfNeeded=eu.setSearchParams=eu.setBearerAuthToObject=eu.DUMMY_BASE_URL=void 0;var RTn=LJ();var nC=rC();var OTn=bRe();eu.DUMMY_BASE_URL="https://example.com";var PTn=a(function(e,t){return SRe(this,void 0,void 0,function*(){const r=yield t.getAccessTokenHeader();if(r&&!e[r.name]){e[r.name]=r.value}})},"setBearerAuthToObject");eu.setBearerAuthToObject=PTn;var NTn=a(function(e,...t){const r=new URLSearchParams(e.search);for(const n of t){for(const i in n){if(Array.isArray(n[i])){r.delete(i);for(const s of n[i]){r.append(i,s)}}else{r.set(i,n[i])}}}e.search=r.toString()},"setSearchParams");eu.setSearchParams=NTn;var ITn=a(e=>{const t=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return e!==null&&(t.test(e)||e.toLowerCase()==="application/json-patch+json")},"isJsonMime");var kTn=a(function(e,t){const r=typeof e!=="string";const n=r?ITn(t.headers["Content-Type"]):r;return n?JSON.stringify(e!==void 0?e:{}):e||""},"serializeDataIfNeeded");eu.serializeDataIfNeeded=kTn;var DTn=a(function(e){return e.pathname+e.search+e.hash},"toPathString");eu.toPathString=DTn;function LTn(e){return e&&typeof e==="object"&&e.isAxiosError===true}a(LTn,"isAxiosError");function FTn(e,t){const r=Math.ceil(Math.pow(2,e)*t);const n=Math.ceil(Math.pow(2,e+1)*t);return Math.floor(Math.random()*(n-r)+r)}a(FTn,"randomTime");function jTt(e,t,r){var n;return SRe(this,void 0,void 0,function*(){let i=0;do{i++;try{return yield r(e)}catch(s){if(!LTn(s)){throw new nC.FgaError(s)}const o=(n=s===null||s===void 0?void 0:s.response)===null||n===void 0?void 0:n.status;if(o===400||o===422){throw new nC.FgaApiValidationError(s)}else if(o===401||o===403){throw new nC.FgaApiAuthenticationError(s)}else if(o===404){throw new nC.FgaApiNotFoundError(s)}else if(o===429||o>=500){if(i>=t.maxRetry){if(o===429){throw new nC.FgaApiRateLimitExceededError(s)}else{throw new nC.FgaApiInternalError(s)}}yield new Promise(u=>setTimeout(u,FTn(i,t.minWaitInMs)))}else{throw new nC.FgaApiError(s)}}}while(i<t.maxRetry+1)})}a(jTt,"attemptHttpRequest");eu.attemptHttpRequest=jTt;var BTn=a(function(e,t,r,n){var i,s;r.isValid();const o=((i=e.options)===null||i===void 0?void 0:i.retryParams)?(s=e.options)===null||s===void 0?void 0:s.retryParams:r.retryParams;const u=o?o.maxRetry:0;const l=o?o.minWaitInMs:0;if(!n){n=RTn.Credentials.init(r)}return(c=t)=>SRe(this,void 0,void 0,function*(){yield(0,eu.setBearerAuthToObject)(e.options.headers,n);const d=Object.assign(Object.assign({},e.options),{url:r.getBasePath()+e.url});const p=yield jTt(d,{maxRetry:u,minWaitInMs:l},c);const f=typeof(p===null||p===void 0?void 0:p.data)==="undefined"?{}:p===null||p===void 0?void 0:p.data;const m=Object.assign({},f);(0,OTn.setNotEnumerableProperty)(m,"$response",p);return m})},"createRequestFunction");eu.createRequestFunction=BTn});var HTt=y(dP=>{"use strict";var CRe=dP&&dP.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}a(i,"adopt");return new(r||(r=Promise))(function(s,o){function u(d){try{c(n.next(d))}catch(p){o(p)}}a(u,"fulfilled");function l(d){try{c(n["throw"](d))}catch(p){o(p)}}a(l,"rejected");function c(d){d.done?s(d.value):i(d.value).then(u,l)}a(c,"step");c((n=n.apply(e,t||[])).next())})};Object.defineProperty(dP,"__esModule",{value:true});dP.Credentials=void 0;var GTt=AJ();var VE=LF();var wRe=rC();var MTn=ARe();var Mf=wJ();var TRe=class e{static{a(this,"Credentials")}static init(t){return new e(t.credentials)}constructor(t,r=GTt.default){this.authConfig=t;this.axios=r;this.initConfig();this.isValid()}initConfig(){var t;switch((t=this.authConfig)===null||t===void 0?void 0:t.method){case Mf.CredentialsMethod.ApiToken:if(this.authConfig.config){if(!this.authConfig.config.headerName){this.authConfig.config.headerName="Authorization"}if(!this.authConfig.config.headerValuePrefix){this.authConfig.config.headerValuePrefix="Bearer"}}break;case Mf.CredentialsMethod.ClientCredentials:case Mf.CredentialsMethod.None:default:break}}isValid(){var t,r,n,i,s,o,u,l,c;const{authConfig:d}=this;switch(d===null||d===void 0?void 0:d.method){case Mf.CredentialsMethod.None:break;case Mf.CredentialsMethod.ApiToken:(0,VE.assertParamExists)("Credentials","config.token",(t=d.config)===null||t===void 0?void 0:t.token);(0,VE.assertParamExists)("Credentials","config.headerName",(r=d.config)===null||r===void 0?void 0:r.headerName);(0,VE.assertParamExists)("Credentials","config.headerName",(n=d.config)===null||n===void 0?void 0:n.headerName);break;case Mf.CredentialsMethod.ClientCredentials:(0,VE.assertParamExists)("Credentials","config.clientId",(i=d.config)===null||i===void 0?void 0:i.clientId);(0,VE.assertParamExists)("Credentials","config.clientSecret",(s=d.config)===null||s===void 0?void 0:s.clientSecret);(0,VE.assertParamExists)("Credentials","config.apiTokenIssuer",(o=d.config)===null||o===void 0?void 0:o.apiTokenIssuer);(0,VE.assertParamExists)("Credentials","config.apiAudience",(u=d.config)===null||u===void 0?void 0:u.apiAudience);if(!(0,VE.isWellFormedUriString)(`https://${(l=d.config)===null||l===void 0?void 0:l.apiTokenIssuer}`)){throw new wRe.FgaValidationError(`Configuration.apiTokenIssuer does not form a valid URI (https://${(c=d.config)===null||c===void 0?void 0:c.apiTokenIssuer})`)}break}}getAccessTokenHeader(){var t;return CRe(this,void 0,void 0,function*(){const r=yield this.getAccessTokenValue();switch((t=this.authConfig)===null||t===void 0?void 0:t.method){case Mf.CredentialsMethod.None:return;case Mf.CredentialsMethod.ApiToken:return{name:this.authConfig.config.headerName,value:`${this.authConfig.config.headerValuePrefix?`${this.authConfig.config.headerValuePrefix} `:""}${r}`};case Mf.CredentialsMethod.ClientCredentials:return{name:"Authorization",value:`Bearer ${r}`}}})}getAccessTokenValue(){var t;return CRe(this,void 0,void 0,function*(){switch((t=this.authConfig)===null||t===void 0?void 0:t.method){case Mf.CredentialsMethod.None:return;case Mf.CredentialsMethod.ApiToken:return this.authConfig.config.token;case Mf.CredentialsMethod.ClientCredentials:if(this.accessToken&&(!this.accessTokenExpiryDate||this.accessTokenExpiryDate>new Date)){return this.accessToken}return this.refreshAccessToken()}})}refreshAccessToken(){var t;return CRe(this,void 0,void 0,function*(){const r=(t=this.authConfig)===null||t===void 0?void 0:t.config;try{const n=yield(0,MTn.attemptHttpRequest)({url:`https://${r.apiTokenIssuer}/oauth/token`,method:"post",data:{client_id:r.clientId,client_secret:r.clientSecret,audience:r.apiAudience,grant_type:"client_credentials"}},{maxRetry:3,minWaitInMs:100},GTt.default);if(n){this.accessToken=n.data.access_token;this.accessTokenExpiryDate=new Date(Date.now()+n.data.expires_in*1e3)}return this.accessToken}catch(n){if(n instanceof wRe.FgaApiError){n.constructor=wRe.FgaApiAuthenticationError;n.name="FgaApiAuthenticationError";n.clientId=r.clientId;n.audience=r.apiAudience;n.grantType="client_credentials"}throw n}})}};dP.Credentials=TRe});var LJ=y(zE=>{"use strict";var qTn=zE&&zE.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)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===void 0)n=r;e[n]=t[r]});var VTt=zE&&zE.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))qTn(t,e,r)};Object.defineProperty(zE,"__esModule",{value:true});VTt(HTt(),zE);VTt(wJ(),zE)});var RRe=y(FJ=>{"use strict";Object.defineProperty(FJ,"__esModule",{value:true});FJ.BaseAPI=void 0;var UTn=AJ();var $Tn=require("http");var jTn=require("https");var zTt=ERe();var GTn=LJ();var HTn=1e4;var xRe=class{static{a(this,"BaseAPI")}constructor(t,r){var n;this.axios=r;if(t instanceof zTt.Configuration){this.configuration=t}else{this.configuration=new zTt.Configuration(t)}this.configuration.isValid();this.credentials=GTn.Credentials.init(this.configuration);if(!this.axios){const i=new $Tn.Agent({keepAlive:true});const s=new jTn.Agent({keepAlive:true});this.axios=UTn.default.create({httpAgent:i,httpsAgent:s,timeout:HTn,headers:(n=this.configuration.baseOptions)===null||n===void 0?void 0:n.headers})}}get storeId(){return this.configuration.storeId}set storeId(t){this.configuration.storeId=t}};FJ.BaseAPI=xRe});var PRe=y(Ts=>{"use strict";var As=Ts&&Ts.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}a(i,"adopt");return new(r||(r=Promise))(function(s,o){function u(d){try{c(n.next(d))}catch(p){o(p)}}a(u,"fulfilled");function l(d){try{c(n["throw"](d))}catch(p){o(p)}}a(l,"rejected");function c(d){d.done?s(d.value):i(d.value).then(u,l)}a(c,"step");c((n=n.apply(e,t||[])).next())})};Object.defineProperty(Ts,"__esModule",{value:true});Ts.OpenFgaApi=Ts.OpenFgaApiFactory=Ts.OpenFgaApiFp=Ts.OpenFgaApiAxiosParamCreator=void 0;var Tc=AJ();var VTn=RRe();var sr=ARe();var za=LF();var zTn=a(function(e,t){return{check:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("check","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/check".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),createStore:(r,n={})=>As(this,void 0,void 0,function*(){const i="/stores";const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),deleteStore:(r={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("Configuration","storeId",e.storeId);const n="/stores/{store_id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const i=new URL(n,sr.DUMMY_BASE_URL);let s;if(e){s=e.baseOptions}const o=Object.assign(Object.assign({method:"DELETE"},s),r);const u={};const l={};(0,sr.setSearchParams)(i,l,r.query);o.headers=Object.assign(Object.assign({},u),r.headers);return{url:(0,sr.toPathString)(i),options:o}}),expand:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("expand","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/expand".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),getStore:(r={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("Configuration","storeId",e.storeId);const n="/stores/{store_id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const i=new URL(n,sr.DUMMY_BASE_URL);let s;if(e){s=e.baseOptions}const o=Object.assign(Object.assign({method:"GET"},s),r);const u={};const l={};(0,sr.setSearchParams)(i,l,r.query);o.headers=Object.assign(Object.assign({},u),r.headers);return{url:(0,sr.toPathString)(i),options:o}}),listObjects:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("listObjects","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/list-objects".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),listStores:(r,n,i={})=>As(this,void 0,void 0,function*(){const s="/stores";const o=new URL(s,sr.DUMMY_BASE_URL);let u;if(e){u=e.baseOptions}const l=Object.assign(Object.assign({method:"GET"},u),i);const c={};const d={};if(r!==void 0){d["page_size"]=r}if(n!==void 0){d["continuation_token"]=n}(0,sr.setSearchParams)(o,d,i.query);l.headers=Object.assign(Object.assign({},c),i.headers);return{url:(0,sr.toPathString)(o),options:l}}),read:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("read","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/read".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),readAssertions:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("readAssertions","authorizationModelId",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/assertions/{authorization_model_id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId))).replace(`{${"authorization_model_id"}}`,encodeURIComponent(String(r)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"GET"},o),n);const l={};const c={};(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);return{url:(0,sr.toPathString)(s),options:u}}),readAuthorizationModel:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("readAuthorizationModel","id",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/authorization-models/{id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId))).replace(`{${"id"}}`,encodeURIComponent(String(r)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"GET"},o),n);const l={};const c={};(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);return{url:(0,sr.toPathString)(s),options:u}}),readAuthorizationModels:(r,n,i={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("Configuration","storeId",e.storeId);const s="/stores/{store_id}/authorization-models".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const o=new URL(s,sr.DUMMY_BASE_URL);let u;if(e){u=e.baseOptions}const l=Object.assign(Object.assign({method:"GET"},u),i);const c={};const d={};if(r!==void 0){d["page_size"]=r}if(n!==void 0){d["continuation_token"]=n}(0,sr.setSearchParams)(o,d,i.query);l.headers=Object.assign(Object.assign({},c),i.headers);return{url:(0,sr.toPathString)(o),options:l}}),readChanges:(r,n,i,s={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("Configuration","storeId",e.storeId);const o="/stores/{store_id}/changes".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const u=new URL(o,sr.DUMMY_BASE_URL);let l;if(e){l=e.baseOptions}const c=Object.assign(Object.assign({method:"GET"},l),s);const d={};const p={};if(r!==void 0){p["type"]=r}if(n!==void 0){p["page_size"]=n}if(i!==void 0){p["continuation_token"]=i}(0,sr.setSearchParams)(u,p,s.query);c.headers=Object.assign(Object.assign({},d),s.headers);return{url:(0,sr.toPathString)(u),options:c}}),write:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("write","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/write".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),writeAssertions:(r,n,i={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("writeAssertions","authorizationModelId",r);(0,za.assertParamExists)("writeAssertions","body",n);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const s="/stores/{store_id}/assertions/{authorization_model_id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId))).replace(`{${"authorization_model_id"}}`,encodeURIComponent(String(r)));const o=new URL(s,sr.DUMMY_BASE_URL);let u;if(e){u=e.baseOptions}const l=Object.assign(Object.assign({method:"PUT"},u),i);const c={};const d={};c["Content-Type"]="application/json";(0,sr.setSearchParams)(o,d,i.query);l.headers=Object.assign(Object.assign({},c),i.headers);l.data=(0,sr.serializeDataIfNeeded)(n,l);return{url:(0,sr.toPathString)(o),options:l}}),writeAuthorizationModel:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("writeAuthorizationModel","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/authorization-models".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}})}},"OpenFgaApiAxiosParamCreator");Ts.OpenFgaApiAxiosParamCreator=zTn;var KTn=a(function(e,t){const r=(0,Ts.OpenFgaApiAxiosParamCreator)(e,t);return{check(n,i){return As(this,void 0,void 0,function*(){const s=yield r.check(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},createStore(n,i){return As(this,void 0,void 0,function*(){const s=yield r.createStore(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},deleteStore(n){return As(this,void 0,void 0,function*(){const i=yield r.deleteStore(n);return(0,sr.createRequestFunction)(i,Tc.default,e,t)})},expand(n,i){return As(this,void 0,void 0,function*(){const s=yield r.expand(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},getStore(n){return As(this,void 0,void 0,function*(){const i=yield r.getStore(n);return(0,sr.createRequestFunction)(i,Tc.default,e,t)})},listObjects(n,i){return As(this,void 0,void 0,function*(){const s=yield r.listObjects(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},listStores(n,i,s){return As(this,void 0,void 0,function*(){const o=yield r.listStores(n,i,s);return(0,sr.createRequestFunction)(o,Tc.default,e,t)})},read(n,i){return As(this,void 0,void 0,function*(){const s=yield r.read(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},readAssertions(n,i){return As(this,void 0,void 0,function*(){const s=yield r.readAssertions(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},readAuthorizationModel(n,i){return As(this,void 0,void 0,function*(){const s=yield r.readAuthorizationModel(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},readAuthorizationModels(n,i,s){return As(this,void 0,void 0,function*(){const o=yield r.readAuthorizationModels(n,i,s);return(0,sr.createRequestFunction)(o,Tc.default,e,t)})},readChanges(n,i,s,o){return As(this,void 0,void 0,function*(){const u=yield r.readChanges(n,i,s,o);return(0,sr.createRequestFunction)(u,Tc.default,e,t)})},write(n,i){return As(this,void 0,void 0,function*(){const s=yield r.write(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},writeAssertions(n,i,s){return As(this,void 0,void 0,function*(){const o=yield r.writeAssertions(n,i,s);return(0,sr.createRequestFunction)(o,Tc.default,e,t)})},writeAuthorizationModel(n,i){return As(this,void 0,void 0,function*(){const s=yield r.writeAuthorizationModel(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})}}},"OpenFgaApiFp");Ts.OpenFgaApiFp=KTn;var WTn=a(function(e,t,r){const n=(0,Ts.OpenFgaApiFp)(e,t);return{check(i,s){return n.check(i,s).then(o=>o(r))},createStore(i,s){return n.createStore(i,s).then(o=>o(r))},deleteStore(i){return n.deleteStore(i).then(s=>s(r))},expand(i,s){return n.expand(i,s).then(o=>o(r))},getStore(i){return n.getStore(i).then(s=>s(r))},listObjects(i,s){return n.listObjects(i,s).then(o=>o(r))},listStores(i,s,o){return n.listStores(i,s,o).then(u=>u(r))},read(i,s){return n.read(i,s).then(o=>o(r))},readAssertions(i,s){return n.readAssertions(i,s).then(o=>o(r))},readAuthorizationModel(i,s){return n.readAuthorizationModel(i,s).then(o=>o(r))},readAuthorizationModels(i,s,o){return n.readAuthorizationModels(i,s,o).then(u=>u(r))},readChanges(i,s,o,u){return n.readChanges(i,s,o,u).then(l=>l(r))},write(i,s){return n.write(i,s).then(o=>o(r))},writeAssertions(i,s,o){return n.writeAssertions(i,s,o).then(u=>u(r))},writeAuthorizationModel(i,s){return n.writeAuthorizationModel(i,s).then(o=>o(r))}}},"OpenFgaApiFactory");Ts.OpenFgaApiFactory=WTn;var ORe=class extends VTn.BaseAPI{static{a(this,"OpenFgaApi")}check(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).check(t,r).then(n=>n(this.axios))}createStore(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).createStore(t,r).then(n=>n(this.axios))}deleteStore(t){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).deleteStore(t).then(r=>r(this.axios))}expand(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).expand(t,r).then(n=>n(this.axios))}getStore(t){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).getStore(t).then(r=>r(this.axios))}listObjects(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).listObjects(t,r).then(n=>n(this.axios))}listStores(t,r,n){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).listStores(t,r,n).then(i=>i(this.axios))}read(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).read(t,r).then(n=>n(this.axios))}readAssertions(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).readAssertions(t,r).then(n=>n(this.axios))}readAuthorizationModel(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).readAuthorizationModel(t,r).then(n=>n(this.axios))}readAuthorizationModels(t,r,n){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).readAuthorizationModels(t,r,n).then(i=>i(this.axios))}readChanges(t,r,n,i){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).readChanges(t,r,n,i).then(s=>s(this.axios))}write(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).write(t,r).then(n=>n(this.axios))}writeAssertions(t,r,n){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).writeAssertions(t,r,n).then(i=>i(this.axios))}writeAuthorizationModel(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).writeAuthorizationModel(t,r).then(n=>n(this.axios))}};Ts.OpenFgaApi=ORe});var WTt=y((w6s,KTt)=>{async function*YTn(e,t,r){const n=new Set;async function i(){const[s,o]=await Promise.race(n);n.delete(s);return o}a(i,"consume");for(const s of t){const o=(async()=>await r(s,t))().then(u=>[o,u]);n.add(o);if(n.size>=e){yield await i()}}while(n.size){yield await i()}}a(YTn,"asyncPool");KTt.exports=YTn});var YTt=y(ig=>{"use strict";var Ka=ig&&ig.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}a(i,"adopt");return new(r||(r=Promise))(function(s,o){function u(d){try{c(n.next(d))}catch(p){o(p)}}a(u,"fulfilled");function l(d){try{c(n["throw"](d))}catch(p){o(p)}}a(l,"rejected");function c(d){d.done?s(d.value):i(d.value).then(u,l)}a(c,"step");c((n=n.apply(e,t||[])).next())})};var NRe=ig&&ig.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(o){return new Promise(function(u,l){o=e[s](o),i(u,l,o.done,o.value)})}}a(n,"verb");function i(s,o,u,l){Promise.resolve(l).then(function(c){s({value:c,done:u})},o)}a(i,"settle")};Object.defineProperty(ig,"__esModule",{value:true});ig.OpenFgaClient=ig.ClientWriteStatus=void 0;var IRe=WTt();var XTn=PRe();var JTn=RRe();var kRe=rC();var vd=bRe();var QTn=LF();var DRe=10;var pP="X-OpenFGA-Client-Method";var LRe="X-OpenFGA-Client-Bulk-Request-Id";var fP;(function(e){e["SUCCESS"]="success";e["FAILURE"]="failure"})(fP||(ig.ClientWriteStatus=fP={}));var FRe=class extends JTn.BaseAPI{static{a(this,"OpenFgaClient")}constructor(t,r){super(t,r);this.axios=r;this.api=new XTn.OpenFgaApi(this.configuration,r);this.authorizationModelId=t.authorizationModelId;this.getAuthorizationModelId()}getAuthorizationModelId(t={}){const r=(t===null||t===void 0?void 0:t.authorizationModelId)||this.authorizationModelId;if(r&&!(0,QTn.isWellFormedUlidString)(r)){throw new kRe.FgaValidationError("authorizationModelId")}return r}checkValidApiConnection(t={}){return Ka(this,void 0,void 0,function*(){if(this.getAuthorizationModelId(t)){yield this.readAuthorizationModel(t)}else{yield this.readLatestAuthorizationModel(t)}})}listStores(t={}){return Ka(this,void 0,void 0,function*(){return this.api.listStores(t.pageSize,t.continuationToken,t)})}createStore(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.createStore(t,r)})}getStore(t={}){return Ka(this,void 0,void 0,function*(){return this.api.getStore(t)})}deleteStore(t={}){return Ka(this,void 0,void 0,function*(){return this.api.deleteStore(t)})}readAuthorizationModels(t={}){return Ka(this,void 0,void 0,function*(){return this.api.readAuthorizationModels(t.pageSize,t.continuationToken,t)})}writeAuthorizationModel(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.writeAuthorizationModel(t,r)})}readAuthorizationModel(t={}){return Ka(this,void 0,void 0,function*(){const r=this.getAuthorizationModelId(t);if(!r){throw new kRe.FgaRequiredParamError("ClientConfiguration","authorizationModelId")}return this.api.readAuthorizationModel(r,t)})}readLatestAuthorizationModel(t={}){var r;return Ka(this,void 0,void 0,function*(){const{headers:n={}}=t;(0,vd.setHeaderIfNotSet)(n,pP,"ReadLatestAuthorizationModel");const i=yield this.readAuthorizationModels(Object.assign(Object.assign({},t),{pageSize:1,headers:n}));const s=i;s.authorization_model=(r=i.authorization_models)===null||r===void 0?void 0:r[0];delete s.authorization_models;return s})}readChanges(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.readChanges(t.type,r.pageSize,r.continuationToken,r)})}read(t={},r={}){return Ka(this,void 0,void 0,function*(){const n={page_size:r.pageSize,continuation_token:r.continuationToken};if(t.user||t.object||t.relation){n.tuple_key=t}return this.api.read(n,r)})}write(t,r={}){return Ka(this,void 0,void 0,function*(){const{transaction:n={},headers:i={}}=r;const{maxPerChunk:s=1,maxParallelRequests:o=DRe}=n;const{writes:u,deletes:l}=t;const c=this.getAuthorizationModelId(r);if(!(n===null||n===void 0?void 0:n.disable)){const d={authorization_model_id:c};if(u===null||u===void 0?void 0:u.length){d.writes={tuple_keys:u}}if(l===null||l===void 0?void 0:l.length){d.deletes={tuple_keys:l}}yield this.api.write(d,r);return{writes:(u===null||u===void 0?void 0:u.map(p=>({tuple_key:p,status:fP.SUCCESS})))||[],deletes:(l===null||l===void 0?void 0:l.map(p=>({tuple_key:p,status:fP.SUCCESS})))||[]}}return Promise.all([(()=>Ka(this,void 0,void 0,function*(){var d,p,f,m,h,g,_,v;(0,vd.setHeaderIfNotSet)(i,pP,"Write");(0,vd.setHeaderIfNotSet)(i,LRe,(0,vd.generateRandomIdWithNonUniqueFallback)());const S=[];if(u===null||u===void 0?void 0:u.length){try{for(var E=true,b=NRe(IRe(o,(0,vd.chunkArray)(u,s),R=>this.writeTuples(R,Object.assign(Object.assign({},r),{headers:i,transaction:void 0})).catch(I=>({writes:R.map(D=>({tuple_key:D,status:fP.FAILURE,err:I})),deletes:[]})))),A;A=yield b.next(),d=A.done,!d;E=true){m=A.value;E=false;const R=m;S.push(R.writes)}}catch(R){p={error:R}}finally{try{if(!E&&!d&&(f=b.return))yield f.call(b)}finally{if(p)throw p.error}}}const C=[];if(l===null||l===void 0?void 0:l.length){try{for(var T=true,O=NRe(IRe(o,(0,vd.chunkArray)(l,s),R=>this.deleteTuples(R,Object.assign(Object.assign({},r),{headers:i,transaction:void 0})).catch(I=>({writes:[],deletes:R.map(D=>({tuple_key:D,status:fP.FAILURE,err:I}))})))),P;P=yield O.next(),h=P.done,!h;T=true){v=P.value;T=false;const R=v;C.push(R.deletes)}}catch(R){g={error:R}}finally{try{if(!T&&!h&&(_=O.return))yield _.call(O)}finally{if(g)throw g.error}}}return{writes:S.flat(),deletes:C.flat()}}))(),this.checkValidApiConnection(r)]).then(d=>d[0])})}writeTuples(t,r={}){return Ka(this,void 0,void 0,function*(){const{headers:n={}}=r;(0,vd.setHeaderIfNotSet)(n,pP,"WriteTuples");return this.write({writes:t},Object.assign(Object.assign({},r),{headers:n}))})}deleteTuples(t,r={}){return Ka(this,void 0,void 0,function*(){const{headers:n={}}=r;(0,vd.setHeaderIfNotSet)(n,pP,"DeleteTuples");return this.write({deletes:t},Object.assign(Object.assign({},r),{headers:n}))})}check(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.check({tuple_key:{user:t.user,relation:t.relation,object:t.object},context:t.context,contextual_tuples:{tuple_keys:t.contextualTuples||[]},authorization_model_id:this.getAuthorizationModelId(r)},r)})}batchCheck(t,r={}){return Ka(this,void 0,void 0,function*(){return Promise.all([(()=>Ka(this,void 0,void 0,function*(){var n,i,s,o;const{headers:u={},maxParallelRequests:l=DRe}=r;(0,vd.setHeaderIfNotSet)(u,pP,"BatchCheck");(0,vd.setHeaderIfNotSet)(u,LRe,(0,vd.generateRandomIdWithNonUniqueFallback)());const c=[];try{for(var d=true,p=NRe(IRe(l,t,m=>this.check(m,Object.assign(Object.assign({},r),{headers:u})).then(h=>{h._request=m;return h}).catch(h=>{return{allowed:void 0,error:h,_request:m}}))),f;f=yield p.next(),n=f.done,!n;d=true){o=f.value;d=false;const m=o;c.push(m)}}catch(m){i={error:m}}finally{try{if(!d&&!n&&(s=p.return))yield s.call(p)}finally{if(i)throw i.error}}return{responses:c}}))(),this.checkValidApiConnection(r)]).then(n=>n[0])})}expand(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.expand({authorization_model_id:this.getAuthorizationModelId(r),tuple_key:t},r)})}listObjects(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.listObjects({authorization_model_id:this.getAuthorizationModelId(r),user:t.user,relation:t.relation,type:t.type,context:t.context,contextual_tuples:{tuple_keys:t.contextualTuples||[]}},r)})}listRelations(t,r={}){return Ka(this,void 0,void 0,function*(){const{user:n,object:i,relations:s,contextualTuples:o,context:u}=t;const{headers:l={},maxParallelRequests:c=DRe}=r;(0,vd.setHeaderIfNotSet)(l,pP,"ListRelations");(0,vd.setHeaderIfNotSet)(l,LRe,(0,vd.generateRandomIdWithNonUniqueFallback)());if(!(s===null||s===void 0?void 0:s.length)){throw new kRe.FgaValidationError("relations","When calling listRelations, at least one relation must be passed in the relations field")}const d=yield this.batchCheck(s.map(f=>({user:n,relation:f,object:i,contextualTuples:o,context:u})),Object.assign(Object.assign({},r),{headers:l,maxParallelRequests:c}));const p=d.responses.find(f=>f.error);if(p){throw p.error}return{relations:d.responses.filter(f=>f.allowed).map(f=>f._request.relation)}})}readAssertions(t={}){return Ka(this,void 0,void 0,function*(){return this.api.readAssertions(this.getAuthorizationModelId(t),t)})}writeAssertions(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.writeAssertions(this.getAuthorizationModelId(r),{assertions:t.map(n=>({tuple_key:{user:n.user,relation:n.relation,object:n.object},expectation:n.expectation}))},r)})}};ig.OpenFgaClient=FRe});var rxt=y(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:true});Ed.TypeName=Ed.TupleOperation=Ed.NullValue=Ed.NotFoundErrorCode=Ed.InternalErrorCode=Ed.ErrorCode=void 0;var XTt;(function(e){e["NoError"]="no_error";e["ValidationError"]="validation_error";e["AuthorizationModelNotFound"]="authorization_model_not_found";e["AuthorizationModelResolutionTooComplex"]="authorization_model_resolution_too_complex";e["InvalidWriteInput"]="invalid_write_input";e["CannotAllowDuplicateTuplesInOneRequest"]="cannot_allow_duplicate_tuples_in_one_request";e["CannotAllowDuplicateTypesInOneRequest"]="cannot_allow_duplicate_types_in_one_request";e["CannotAllowMultipleReferencesToOneRelation"]="cannot_allow_multiple_references_to_one_relation";e["InvalidContinuationToken"]="invalid_continuation_token";e["InvalidTupleSet"]="invalid_tuple_set";e["InvalidCheckInput"]="invalid_check_input";e["InvalidExpandInput"]="invalid_expand_input";e["UnsupportedUserSet"]="unsupported_user_set";e["InvalidObjectFormat"]="invalid_object_format";e["WriteFailedDueToInvalidInput"]="write_failed_due_to_invalid_input";e["AuthorizationModelAssertionsNotFound"]="authorization_model_assertions_not_found";e["LatestAuthorizationModelNotFound"]="latest_authorization_model_not_found";e["TypeNotFound"]="type_not_found";e["RelationNotFound"]="relation_not_found";e["EmptyRelationDefinition"]="empty_relation_definition";e["InvalidUser"]="invalid_user";e["InvalidTuple"]="invalid_tuple";e["UnknownRelation"]="unknown_relation";e["StoreIdInvalidLength"]="store_id_invalid_length";e["AssertionsTooManyItems"]="assertions_too_many_items";e["IdTooLong"]="id_too_long";e["AuthorizationModelIdTooLong"]="authorization_model_id_too_long";e["TupleKeyValueNotSpecified"]="tuple_key_value_not_specified";e["TupleKeysTooManyOrTooFewItems"]="tuple_keys_too_many_or_too_few_items";e["PageSizeInvalid"]="page_size_invalid";e["ParamMissingValue"]="param_missing_value";e["DifferenceBaseMissingValue"]="difference_base_missing_value";e["SubtractBaseMissingValue"]="subtract_base_missing_value";e["ObjectTooLong"]="object_too_long";e["RelationTooLong"]="relation_too_long";e["TypeDefinitionsTooFewItems"]="type_definitions_too_few_items";e["TypeInvalidLength"]="type_invalid_length";e["TypeInvalidPattern"]="type_invalid_pattern";e["RelationsTooFewItems"]="relations_too_few_items";e["RelationsTooLong"]="relations_too_long";e["RelationsInvalidPattern"]="relations_invalid_pattern";e["ObjectInvalidPattern"]="object_invalid_pattern";e["QueryStringTypeContinuationTokenMismatch"]="query_string_type_continuation_token_mismatch";e["ExceededEntityLimit"]="exceeded_entity_limit";e["InvalidContextualTuple"]="invalid_contextual_tuple";e["DuplicateContextualTuple"]="duplicate_contextual_tuple";e["InvalidAuthorizationModel"]="invalid_authorization_model";e["UnsupportedSchemaVersion"]="unsupported_schema_version"})(XTt||(Ed.ErrorCode=XTt={}));var JTt;(function(e){e["NoInternalError"]="no_internal_error";e["InternalError"]="internal_error";e["Cancelled"]="cancelled";e["DeadlineExceeded"]="deadline_exceeded";e["AlreadyExists"]="already_exists";e["ResourceExhausted"]="resource_exhausted";e["FailedPrecondition"]="failed_precondition";e["Aborted"]="aborted";e["OutOfRange"]="out_of_range";e["Unavailable"]="unavailable";e["DataLoss"]="data_loss"})(JTt||(Ed.InternalErrorCode=JTt={}));var QTt;(function(e){e["NoNotFoundError"]="no_not_found_error";e["UndefinedEndpoint"]="undefined_endpoint";e["StoreIdNotFound"]="store_id_not_found";e["Unimplemented"]="unimplemented"})(QTt||(Ed.NotFoundErrorCode=QTt={}));var ZTt;(function(e){e["NullValue"]="NULL_VALUE"})(ZTt||(Ed.NullValue=ZTt={}));var ext;(function(e){e["Write"]="TUPLE_OPERATION_WRITE";e["Delete"]="TUPLE_OPERATION_DELETE"})(ext||(Ed.TupleOperation=ext={}));var txt;(function(e){e["Unspecified"]="TYPE_NAME_UNSPECIFIED";e["Any"]="TYPE_NAME_ANY";e["Bool"]="TYPE_NAME_BOOL";e["String"]="TYPE_NAME_STRING";e["Int"]="TYPE_NAME_INT";e["Uint"]="TYPE_NAME_UINT";e["Double"]="TYPE_NAME_DOUBLE";e["Duration"]="TYPE_NAME_DURATION";e["Timestamp"]="TYPE_NAME_TIMESTAMP";e["Map"]="TYPE_NAME_MAP";e["List"]="TYPE_NAME_LIST";e["Ipaddress"]="TYPE_NAME_IPADDRESS"})(txt||(Ed.TypeName=txt={}))});var sxt=y(Au=>{"use strict";var ZTn=Au&&Au.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)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===void 0)n=r;e[n]=t[r]});var BJ=Au&&Au.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))ZTn(t,e,r)};Object.defineProperty(Au,"__esModule",{value:true});Au.CredentialsMethod=Au.Credentials=Au.GetDefaultRetryParams=Au.Configuration=void 0;BJ(PRe(),Au);BJ(YTt(),Au);BJ(rxt(),Au);var nxt=ERe();Object.defineProperty(Au,"Configuration",{enumerable:true,get:function(){return nxt.Configuration}});Object.defineProperty(Au,"GetDefaultRetryParams",{enumerable:true,get:function(){return nxt.GetDefaultRetryParams}});var ixt=LJ();Object.defineProperty(Au,"Credentials",{enumerable:true,get:function(){return ixt.Credentials}});Object.defineProperty(Au,"CredentialsMethod",{enumerable:true,get:function(){return ixt.CredentialsMethod}});BJ(rC(),Au)});var oxt=y(mP=>{"use strict";var exn=mP&&mP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(mP,"__esModule",{value:true});mP.OpenFGAService=void 0;var MF=exn(ep());var axt=sxt();var txn=JO();var BRe=class{static{a(this,"OpenFGAService")}logger;openFGAClient;baseUrl;apiHost;storeId;modelId;userSub;constructor(t,r){if(!MF.default.OPENFGA_SERVICE_URL){throw new Error("OPENFGA_SERVICE_URL is not set")}this.userSub=r&&r.userSub?r.userSub:t.getUserSub();this.baseUrl=MF.default.OPENFGA_SERVICE_URL;this.apiHost=MF.default.OPENFGA_SERVICE_URL.replace(/^(https:\/\/)/,"");this.storeId=MF.default.OPENFGA_STORE_ID;this.modelId=MF.default.OPENFGA_MODEL_ID;this.logger=t.log}async getOpenFgaClient(){if(!this.openFGAClient){const t=await(0,txn.getServiceAccountIdToken)(this.baseUrl);this.openFGAClient=new axt.OpenFgaClient({apiScheme:"https",apiHost:this.apiHost,storeId:this.storeId,authorizationModelId:this.modelId,credentials:{method:axt.CredentialsMethod.ApiToken,config:{token:t}}})}return this.openFGAClient}async createAccountMember(t){try{const r=await this.getOpenFgaClient();await r.write({writes:[{user:`user:${this.userSub}`,relation:"admin",object:`account:${t}`}]})}catch(r){this.logger.warn(`RBAC failed to create account membership. Error: ${r.message}`)}}async getAccountMemberships(){const t=await this.getOpenFgaClient();const r=await t.listObjects({user:`user:${this.userSub}`,relation:"member",type:"account"});if(r){return r.objects.map(n=>n.replace(/^(account:)/,""))}return[]}async isAccountMember(t){try{const r=await this.getOpenFgaClient();const{allowed:n}=await r.check({user:`user:${this.userSub}`,relation:"member",object:`account:${t}`});if(!n){return false}return n}catch(r){this.logger.warn(`RBAC failed to check account membership. Error: ${r.message}`);return false}}async isZuploAdmin(){try{const t=await this.getOpenFgaClient();const{tuples:r}=await t.read({object:"role:zuplo-admin"});const n=[];r.forEach(i=>{const s=i.key.user.replace(/^(user:)/,"");n.push(s)});return n.includes(this.userSub)}catch(t){this.logger.warn(`RBAC failed to check for zuplo admin. Error: ${t.message}`);return false}}async isDeployerServiceAccount(){try{const t=await this.getOpenFgaClient();const{tuples:r}=await t.read({object:"role:zuplo-deployer"});const n=[];r.forEach(i=>{const s=i.key.user.replace(/^(user:)/,"");n.push(s)});return n.includes(this.userSub)}catch(t){this.logger.warn(`RBAC failed to check for zuplo deployer. Error: ${t.message}`);return false}}async createProjectAccountAssociation(t,r){try{const n=await this.getOpenFgaClient();await n.write({writes:[{user:`account:${t}`,relation:"associated_account",object:`project:${r}`}]})}catch(n){this.logger.warn(`RBAC failed to create account-project association. Error: ${n.message}`)}}async deleteProjectAccountAssociation(t,r){try{const n=await this.getOpenFgaClient();await n.write({deletes:[{user:`account:${t}`,relation:"associated_account",object:`project:${r}`}]})}catch(n){this.logger.warn(`RBAC failed to delete account-project association. Error: ${n.message}`)}}};mP.OpenFGAService=BRe});var cxt=y(hP=>{"use strict";var lxt=hP&&hP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(hP,"__esModule",{value:true});hP.TenantService=void 0;var rxn=lxt(Bm());var uxt=lxt(ep());var nxn=CF();var ixn=new rxn.default({max:500,maxAge:1e3*60*50});var MRe=class extends nxn.ApiServiceClient{static{a(this,"TenantService")}constructor(t,r){if(!uxt.default.TENANT_API_URL){throw new Error("TENANT_API_URL is not set")}const n=r&&r.userSub?r.userSub:t.getUserSub();super(uxt.default.TENANT_API_URL,ixn,{userSub:n,logger:t.log,requestId:t.id})}};hP.TenantService=MRe});var fxt=y(gP=>{"use strict";var pxt=gP&&gP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(gP,"__esModule",{value:true});gP.MeteringService=void 0;var sxn=pxt(Bm());var dxt=pxt(ep());var axn=CF();var oxn=new sxn.default({max:500,maxAge:1e3*60*50});var qRe=class extends axn.ApiServiceClient{static{a(this,"MeteringService")}constructor(t,r){if(!dxt.default.METERING_SERVICE_URL){throw new Error("METERING_SERVICE_URL is not set")}const n=r&&r.userSub?r.userSub:t.getUserSub();super(dxt.default.METERING_SERVICE_URL,oxn,{userSub:n,logger:t.log,requestId:t.id,targetAudience:"https://meters.zuplo.com"})}};gP.MeteringService=qRe});var mxt=y(sg=>{"use strict";Object.defineProperty(sg,"__esModule",{value:true});sg.validateHostname=sg.kebabCase=sg.snakeCase=sg.sizeInBytes=void 0;function uxn(e){return new TextEncoder().encode(JSON.stringify(e)).length}a(uxn,"sizeInBytes");sg.sizeInBytes=uxn;function lxn(e){if(!e||e===null){return""}return e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)?.map(t=>t.toLowerCase()).join("_")}a(lxn,"snakeCase");sg.snakeCase=lxn;function cxn(e){if(!e||e===null){return""}const t=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g);if(t===null){return""}return t.map(r=>r.toLowerCase()).join("-")}a(cxn,"kebabCase");sg.kebabCase=cxn;function dxn(e){try{const t=/^(?!https?:\/\/)([a-zA-Z0-9.-]*|(\*))*\.[a-zA-Z]+$/;if(e&&!t.test(e)){return false}return true}catch(t){}return false}a(dxn,"validateHostname");sg.validateHostname=dxn});var yxt=y(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:true});_e.Type=_e.JsonType=_e.JavaScriptTypeBuilder=_e.JsonTypeBuilder=_e.TypeBuilder=_e.TypeBuilderError=_e.TransformEncodeBuilder=_e.TransformDecodeBuilder=_e.TemplateLiteralDslParser=_e.TemplateLiteralGenerator=_e.TemplateLiteralGeneratorError=_e.TemplateLiteralFinite=_e.TemplateLiteralFiniteError=_e.TemplateLiteralParser=_e.TemplateLiteralParserError=_e.TemplateLiteralResolver=_e.TemplateLiteralPattern=_e.TemplateLiteralPatternError=_e.UnionResolver=_e.KeyArrayResolver=_e.KeyArrayResolverError=_e.KeyResolver=_e.ObjectMap=_e.Intrinsic=_e.IndexedAccessor=_e.TypeClone=_e.TypeExtends=_e.TypeExtendsResult=_e.TypeExtendsError=_e.ExtendsUndefined=_e.TypeGuard=_e.TypeGuardUnknownTypeError=_e.ValueGuard=_e.FormatRegistry=_e.TypeBoxError=_e.TypeRegistry=_e.PatternStringExact=_e.PatternNumberExact=_e.PatternBooleanExact=_e.PatternString=_e.PatternNumber=_e.PatternBoolean=_e.Kind=_e.Hint=_e.Optional=_e.Readonly=_e.Transform=void 0;_e.Transform=Symbol.for("TypeBox.Transform");_e.Readonly=Symbol.for("TypeBox.Readonly");_e.Optional=Symbol.for("TypeBox.Optional");_e.Hint=Symbol.for("TypeBox.Hint");_e.Kind=Symbol.for("TypeBox.Kind");_e.PatternBoolean="(true|false)";_e.PatternNumber="(0|[1-9][0-9]*)";_e.PatternString="(.*)";_e.PatternBooleanExact=`^${_e.PatternBoolean}$`;_e.PatternNumberExact=`^${_e.PatternNumber}$`;_e.PatternStringExact=`^${_e.PatternString}$`;var URe;(function(e){const t=new Map;function r(){return new Map(t)}a(r,"Entries");e.Entries=r;function n(){return t.clear()}a(n,"Clear");e.Clear=n;function i(l){return t.delete(l)}a(i,"Delete");e.Delete=i;function s(l){return t.has(l)}a(s,"Has");e.Has=s;function o(l,c){t.set(l,c)}a(o,"Set");e.Set=o;function u(l){return t.get(l)}a(u,"Get");e.Get=u})(URe||(_e.TypeRegistry=URe={}));var gh=class extends Error{static{a(this,"TypeBoxError")}constructor(t){super(t)}};_e.TypeBoxError=gh;var hxt;(function(e){const t=new Map;function r(){return new Map(t)}a(r,"Entries");e.Entries=r;function n(){return t.clear()}a(n,"Clear");e.Clear=n;function i(l){return t.delete(l)}a(i,"Delete");e.Delete=i;function s(l){return t.has(l)}a(s,"Has");e.Has=s;function o(l,c){t.set(l,c)}a(o,"Set");e.Set=o;function u(l){return t.get(l)}a(u,"Get");e.Get=u})(hxt||(_e.FormatRegistry=hxt={}));var Jt;(function(e){function t(c){return Array.isArray(c)}a(t,"IsArray");e.IsArray=t;function r(c){return typeof c==="bigint"}a(r,"IsBigInt");e.IsBigInt=r;function n(c){return typeof c==="boolean"}a(n,"IsBoolean");e.IsBoolean=n;function i(c){return c===null}a(i,"IsNull");e.IsNull=i;function s(c){return typeof c==="number"}a(s,"IsNumber");e.IsNumber=s;function o(c){return typeof c==="object"&&c!==null}a(o,"IsObject");e.IsObject=o;function u(c){return typeof c==="string"}a(u,"IsString");e.IsString=u;function l(c){return c===void 0}a(l,"IsUndefined");e.IsUndefined=l})(Jt||(_e.ValueGuard=Jt={}));var $Re=class extends gh{static{a(this,"TypeGuardUnknownTypeError")}};_e.TypeGuardUnknownTypeError=$Re;var Ee;(function(e){function t(L){try{new RegExp(L);return true}catch{return false}}a(t,"IsPattern");function r(L){if(!Jt.IsString(L))return false;for(let Se=0;Se<L.length;Se++){const Le=L.charCodeAt(Se);if(Le>=7&&Le<=13||Le===27||Le===127){return false}}return true}a(r,"IsControlCharacterFree");function n(L){return o(L)||se(L)}a(n,"IsAdditionalProperties");function i(L){return Jt.IsUndefined(L)||Jt.IsBigInt(L)}a(i,"IsOptionalBigInt");function s(L){return Jt.IsUndefined(L)||Jt.IsNumber(L)}a(s,"IsOptionalNumber");function o(L){return Jt.IsUndefined(L)||Jt.IsBoolean(L)}a(o,"IsOptionalBoolean");function u(L){return Jt.IsUndefined(L)||Jt.IsString(L)}a(u,"IsOptionalString");function l(L){return Jt.IsUndefined(L)||Jt.IsString(L)&&r(L)&&t(L)}a(l,"IsOptionalPattern");function c(L){return Jt.IsUndefined(L)||Jt.IsString(L)&&r(L)}a(c,"IsOptionalFormat");function d(L){return Jt.IsUndefined(L)||se(L)}a(d,"IsOptionalSchema");function p(L){return C(L,"Any")&&u(L.$id)}a(p,"TAny");e.TAny=p;function f(L){return C(L,"Array")&&L.type==="array"&&u(L.$id)&&se(L.items)&&s(L.minItems)&&s(L.maxItems)&&o(L.uniqueItems)&&d(L.contains)&&s(L.minContains)&&s(L.maxContains)}a(f,"TArray");e.TArray=f;function m(L){return C(L,"AsyncIterator")&&L.type==="AsyncIterator"&&u(L.$id)&&se(L.items)}a(m,"TAsyncIterator");e.TAsyncIterator=m;function h(L){return C(L,"BigInt")&&L.type==="bigint"&&u(L.$id)&&i(L.exclusiveMaximum)&&i(L.exclusiveMinimum)&&i(L.maximum)&&i(L.minimum)&&i(L.multipleOf)}a(h,"TBigInt");e.TBigInt=h;function g(L){return C(L,"Boolean")&&L.type==="boolean"&&u(L.$id)}a(g,"TBoolean");e.TBoolean=g;function _(L){return C(L,"Constructor")&&L.type==="constructor"&&u(L.$id)&&Jt.IsArray(L.parameters)&&L.parameters.every(Se=>se(Se))&&se(L.returns)}a(_,"TConstructor");e.TConstructor=_;function v(L){return C(L,"Date")&&L.type==="Date"&&u(L.$id)&&s(L.exclusiveMaximumTimestamp)&&s(L.exclusiveMinimumTimestamp)&&s(L.maximumTimestamp)&&s(L.minimumTimestamp)&&s(L.multipleOfTimestamp)}a(v,"TDate");e.TDate=v;function S(L){return C(L,"Function")&&L.type==="function"&&u(L.$id)&&Jt.IsArray(L.parameters)&&L.parameters.every(Se=>se(Se))&&se(L.returns)}a(S,"TFunction");e.TFunction=S;function E(L){return C(L,"Integer")&&L.type==="integer"&&u(L.$id)&&s(L.exclusiveMaximum)&&s(L.exclusiveMinimum)&&s(L.maximum)&&s(L.minimum)&&s(L.multipleOf)}a(E,"TInteger");e.TInteger=E;function b(L){return C(L,"Intersect")&&(Jt.IsString(L.type)&&L.type!=="object"?false:true)&&Jt.IsArray(L.allOf)&&L.allOf.every(Se=>se(Se)&&!De(Se))&&u(L.type)&&(o(L.unevaluatedProperties)||d(L.unevaluatedProperties))&&u(L.$id)}a(b,"TIntersect");e.TIntersect=b;function A(L){return C(L,"Iterator")&&L.type==="Iterator"&&u(L.$id)&&se(L.items)}a(A,"TIterator");e.TIterator=A;function C(L,Se){return T(L)&&L[_e.Kind]===Se}a(C,"TKindOf");e.TKindOf=C;function T(L){return Jt.IsObject(L)&&_e.Kind in L&&Jt.IsString(L[_e.Kind])}a(T,"TKind");e.TKind=T;function O(L){return I(L)&&Jt.IsString(L.const)}a(O,"TLiteralString");e.TLiteralString=O;function P(L){return I(L)&&Jt.IsNumber(L.const)}a(P,"TLiteralNumber");e.TLiteralNumber=P;function R(L){return I(L)&&Jt.IsBoolean(L.const)}a(R,"TLiteralBoolean");e.TLiteralBoolean=R;function I(L){return C(L,"Literal")&&u(L.$id)&&(Jt.IsBoolean(L.const)||Jt.IsNumber(L.const)||Jt.IsString(L.const))}a(I,"TLiteral");e.TLiteral=I;function D(L){return C(L,"Never")&&Jt.IsObject(L.not)&&Object.getOwnPropertyNames(L.not).length===0}a(D,"TNever");e.TNever=D;function U(L){return C(L,"Not")&&se(L.not)}a(U,"TNot");e.TNot=U;function te(L){return C(L,"Null")&&L.type==="null"&&u(L.$id)}a(te,"TNull");e.TNull=te;function ve(L){return C(L,"Number")&&L.type==="number"&&u(L.$id)&&s(L.exclusiveMaximum)&&s(L.exclusiveMinimum)&&s(L.maximum)&&s(L.minimum)&&s(L.multipleOf)}a(ve,"TNumber");e.TNumber=ve;function me(L){return C(L,"Object")&&L.type==="object"&&u(L.$id)&&Jt.IsObject(L.properties)&&n(L.additionalProperties)&&s(L.minProperties)&&s(L.maxProperties)&&Object.entries(L.properties).every(([Se,Le])=>r(Se)&&se(Le))}a(me,"TObject");e.TObject=me;function he(L){return C(L,"Promise")&&L.type==="Promise"&&u(L.$id)&&se(L.item)}a(he,"TPromise");e.TPromise=he;function Fe(L){return C(L,"Record")&&L.type==="object"&&u(L.$id)&&n(L.additionalProperties)&&Jt.IsObject(L.patternProperties)&&(Se=>{const Le=Object.getOwnPropertyNames(Se.patternProperties);return Le.length===1&&t(Le[0])&&Jt.IsObject(Se.patternProperties)&&se(Se.patternProperties[Le[0]])})(L)}a(Fe,"TRecord");e.TRecord=Fe;function Oe(L){return Jt.IsObject(L)&&_e.Hint in L&&L[_e.Hint]==="Recursive"}a(Oe,"TRecursive");e.TRecursive=Oe;function M(L){return C(L,"Ref")&&u(L.$id)&&Jt.IsString(L.$ref)}a(M,"TRef");e.TRef=M;function Q(L){return C(L,"String")&&L.type==="string"&&u(L.$id)&&s(L.minLength)&&s(L.maxLength)&&l(L.pattern)&&c(L.format)}a(Q,"TString");e.TString=Q;function fe(L){return C(L,"Symbol")&&L.type==="symbol"&&u(L.$id)}a(fe,"TSymbol");e.TSymbol=fe;function B(L){return C(L,"TemplateLiteral")&&L.type==="string"&&Jt.IsString(L.pattern)&&L.pattern[0]==="^"&&L.pattern[L.pattern.length-1]==="$"}a(B,"TTemplateLiteral");e.TTemplateLiteral=B;function ye(L){return C(L,"This")&&u(L.$id)&&Jt.IsString(L.$ref)}a(ye,"TThis");e.TThis=ye;function De(L){return Jt.IsObject(L)&&_e.Transform in L}a(De,"TTransform");e.TTransform=De;function $e(L){return C(L,"Tuple")&&L.type==="array"&&u(L.$id)&&Jt.IsNumber(L.minItems)&&Jt.IsNumber(L.maxItems)&&L.minItems===L.maxItems&&(Jt.IsUndefined(L.items)&&Jt.IsUndefined(L.additionalItems)&&L.minItems===0||Jt.IsArray(L.items)&&L.items.every(Se=>se(Se)))}a($e,"TTuple");e.TTuple=$e;function gt(L){return C(L,"Undefined")&&L.type==="undefined"&&u(L.$id)}a(gt,"TUndefined");e.TUndefined=gt;function ut(L){return F(L)&&L.anyOf.every(Se=>O(Se)||P(Se))}a(ut,"TUnionLiteral");e.TUnionLiteral=ut;function F(L){return C(L,"Union")&&u(L.$id)&&Jt.IsObject(L)&&Jt.IsArray(L.anyOf)&&L.anyOf.every(Se=>se(Se))}a(F,"TUnion");e.TUnion=F;function G(L){return C(L,"Uint8Array")&&L.type==="Uint8Array"&&u(L.$id)&&s(L.minByteLength)&&s(L.maxByteLength)}a(G,"TUint8Array");e.TUint8Array=G;function $(L){return C(L,"Unknown")&&u(L.$id)}a($,"TUnknown");e.TUnknown=$;function W(L){return C(L,"Unsafe")}a(W,"TUnsafe");e.TUnsafe=W;function pe(L){return C(L,"Void")&&L.type==="void"&&u(L.$id)}a(pe,"TVoid");e.TVoid=pe;function H(L){return Jt.IsObject(L)&&L[_e.Readonly]==="Readonly"}a(H,"TReadonly");e.TReadonly=H;function de(L){return Jt.IsObject(L)&&L[_e.Optional]==="Optional"}a(de,"TOptional");e.TOptional=de;function se(L){return Jt.IsObject(L)&&(p(L)||f(L)||g(L)||h(L)||m(L)||_(L)||v(L)||S(L)||E(L)||b(L)||A(L)||I(L)||D(L)||U(L)||te(L)||ve(L)||me(L)||he(L)||Fe(L)||M(L)||Q(L)||fe(L)||B(L)||ye(L)||$e(L)||gt(L)||F(L)||G(L)||$(L)||W(L)||pe(L)||T(L)&&URe.Has(L[_e.Kind]))}a(se,"TSchema");e.TSchema=se})(Ee||(_e.TypeGuard=Ee={}));var gxt;(function(e){function t(r){return r[_e.Kind]==="Intersect"?r.allOf.every(n=>t(n)):r[_e.Kind]==="Union"?r.anyOf.some(n=>t(n)):r[_e.Kind]==="Undefined"?true:r[_e.Kind]==="Not"?!t(r.not):false}a(t,"Check");e.Check=t})(gxt||(_e.ExtendsUndefined=gxt={}));var MJ=class extends gh{static{a(this,"TypeExtendsError")}};_e.TypeExtendsError=MJ;var at;(function(e){e[e["Union"]=0]="Union";e[e["True"]=1]="True";e[e["False"]=2]="False"})(at||(_e.TypeExtendsResult=at={}));var iC;(function(e){function t(N){return N===at.False?N:at.True}a(t,"IntoBooleanResult");function r(N){throw new MJ(N)}a(r,"Throw");function n(N){return Ee.TNever(N)||Ee.TIntersect(N)||Ee.TUnion(N)||Ee.TUnknown(N)||Ee.TAny(N)}a(n,"IsStructuralRight");function i(N,k){return Ee.TNever(k)?C(N,k):Ee.TIntersect(k)?S(N,k):Ee.TUnion(k)?Mt(N,k):Ee.TUnknown(k)?Ur(N,k):Ee.TAny(k)?s(N,k):r("StructuralRight")}a(i,"StructuralRight");function s(N,k){return at.True}a(s,"TAnyRight");function o(N,k){return Ee.TIntersect(k)?S(N,k):Ee.TUnion(k)&&k.anyOf.some(Ae=>Ee.TAny(Ae)||Ee.TUnknown(Ae))?at.True:Ee.TUnion(k)?at.Union:Ee.TUnknown(k)?at.True:Ee.TAny(k)?at.True:at.Union}a(o,"TAny");function u(N,k){return Ee.TUnknown(N)?at.False:Ee.TAny(N)?at.Union:Ee.TNever(N)?at.True:at.False}a(u,"TArrayRight");function l(N,k){return Ee.TObject(k)&&B(k)?at.True:n(k)?i(N,k):!Ee.TArray(k)?at.False:t(J(N.items,k.items))}a(l,"TArray");function c(N,k){return n(k)?i(N,k):!Ee.TAsyncIterator(k)?at.False:t(J(N.items,k.items))}a(c,"TAsyncIterator");function d(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TBigInt(k)?at.True:at.False}a(d,"TBigInt");function p(N,k){return Ee.TLiteral(N)&&Jt.IsBoolean(N.const)?at.True:Ee.TBoolean(N)?at.True:at.False}a(p,"TBooleanRight");function f(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TBoolean(k)?at.True:at.False}a(f,"TBoolean");function m(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):!Ee.TConstructor(k)?at.False:N.parameters.length>k.parameters.length?at.False:!N.parameters.every((Ae,Be)=>t(J(k.parameters[Be],Ae))===at.True)?at.False:t(J(N.returns,k.returns))}a(m,"TConstructor");function h(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TDate(k)?at.True:at.False}a(h,"TDate");function g(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):!Ee.TFunction(k)?at.False:N.parameters.length>k.parameters.length?at.False:!N.parameters.every((Ae,Be)=>t(J(k.parameters[Be],Ae))===at.True)?at.False:t(J(N.returns,k.returns))}a(g,"TFunction");function _(N,k){return Ee.TLiteral(N)&&Jt.IsNumber(N.const)?at.True:Ee.TNumber(N)||Ee.TInteger(N)?at.True:at.False}a(_,"TIntegerRight");function v(N,k){return Ee.TInteger(k)||Ee.TNumber(k)?at.True:n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):at.False}a(v,"TInteger");function S(N,k){return k.allOf.every(Ae=>J(N,Ae)===at.True)?at.True:at.False}a(S,"TIntersectRight");function E(N,k){return N.allOf.some(Ae=>J(Ae,k)===at.True)?at.True:at.False}a(E,"TIntersect");function b(N,k){return n(k)?i(N,k):!Ee.TIterator(k)?at.False:t(J(N.items,k.items))}a(b,"TIterator");function A(N,k){return Ee.TLiteral(k)&&k.const===N.const?at.True:n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TString(k)?pe(N,k):Ee.TNumber(k)?I(N,k):Ee.TInteger(k)?_(N,k):Ee.TBoolean(k)?p(N,k):at.False}a(A,"TLiteral");function C(N,k){return at.False}a(C,"TNeverRight");function T(N,k){return at.True}a(T,"TNever");function O(N){let[k,Ae]=[N,0];while(true){if(!Ee.TNot(k))break;k=k.not;Ae+=1}return Ae%2===0?k:_e.Type.Unknown()}a(O,"UnwrapTNot");function P(N,k){return Ee.TNot(N)?J(O(N),k):Ee.TNot(k)?J(N,O(k)):r("Invalid fallthrough for Not")}a(P,"TNot");function R(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TNull(k)?at.True:at.False}a(R,"TNull");function I(N,k){return Ee.TLiteralNumber(N)?at.True:Ee.TNumber(N)||Ee.TInteger(N)?at.True:at.False}a(I,"TNumberRight");function D(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TInteger(k)||Ee.TNumber(k)?at.True:at.False}a(D,"TNumber");function U(N,k){return Object.getOwnPropertyNames(N.properties).length===k}a(U,"IsObjectPropertyCount");function te(N){return B(N)}a(te,"IsObjectStringLike");function ve(N){return U(N,0)||U(N,1)&&"description"in N.properties&&Ee.TUnion(N.properties.description)&&N.properties.description.anyOf.length===2&&(Ee.TString(N.properties.description.anyOf[0])&&Ee.TUndefined(N.properties.description.anyOf[1])||Ee.TString(N.properties.description.anyOf[1])&&Ee.TUndefined(N.properties.description.anyOf[0]))}a(ve,"IsObjectSymbolLike");function me(N){return U(N,0)}a(me,"IsObjectNumberLike");function he(N){return U(N,0)}a(he,"IsObjectBooleanLike");function Fe(N){return U(N,0)}a(Fe,"IsObjectBigIntLike");function Oe(N){return U(N,0)}a(Oe,"IsObjectDateLike");function M(N){return B(N)}a(M,"IsObjectUint8ArrayLike");function Q(N){const k=_e.Type.Number();return U(N,0)||U(N,1)&&"length"in N.properties&&t(J(N.properties["length"],k))===at.True}a(Q,"IsObjectFunctionLike");function fe(N){return U(N,0)}a(fe,"IsObjectConstructorLike");function B(N){const k=_e.Type.Number();return U(N,0)||U(N,1)&&"length"in N.properties&&t(J(N.properties["length"],k))===at.True}a(B,"IsObjectArrayLike");function ye(N){const k=_e.Type.Function([_e.Type.Any()],_e.Type.Any());return U(N,0)||U(N,1)&&"then"in N.properties&&t(J(N.properties["then"],k))===at.True}a(ye,"IsObjectPromiseLike");function De(N,k){return J(N,k)===at.False?at.False:Ee.TOptional(N)&&!Ee.TOptional(k)?at.False:at.True}a(De,"Property");function $e(N,k){return Ee.TUnknown(N)?at.False:Ee.TAny(N)?at.Union:Ee.TNever(N)||Ee.TLiteralString(N)&&te(k)||Ee.TLiteralNumber(N)&&me(k)||Ee.TLiteralBoolean(N)&&he(k)||Ee.TSymbol(N)&&ve(k)||Ee.TBigInt(N)&&Fe(k)||Ee.TString(N)&&te(k)||Ee.TSymbol(N)&&ve(k)||Ee.TNumber(N)&&me(k)||Ee.TInteger(N)&&me(k)||Ee.TBoolean(N)&&he(k)||Ee.TUint8Array(N)&&M(k)||Ee.TDate(N)&&Oe(k)||Ee.TConstructor(N)&&fe(k)||Ee.TFunction(N)&&Q(k)?at.True:Ee.TRecord(N)&&Ee.TString(F(N))?(()=>{return k[_e.Hint]==="Record"?at.True:at.False})():Ee.TRecord(N)&&Ee.TNumber(F(N))?(()=>{return U(k,0)?at.True:at.False})():at.False}a($e,"TObjectRight");function gt(N,k){return n(k)?i(N,k):Ee.TRecord(k)?$(N,k):!Ee.TObject(k)?at.False:(()=>{for(const Ae of Object.getOwnPropertyNames(k.properties)){if(!(Ae in N.properties))return at.False;if(De(N.properties[Ae],k.properties[Ae])===at.False){return at.False}}return at.True})()}a(gt,"TObject");function ut(N,k){return n(k)?i(N,k):Ee.TObject(k)&&ye(k)?at.True:!Ee.TPromise(k)?at.False:t(J(N.item,k.item))}a(ut,"TPromise");function F(N){return _e.PatternNumberExact in N.patternProperties?_e.Type.Number():_e.PatternStringExact in N.patternProperties?_e.Type.String():r("Unknown record key pattern")}a(F,"RecordKey");function G(N){return _e.PatternNumberExact in N.patternProperties?N.patternProperties[_e.PatternNumberExact]:_e.PatternStringExact in N.patternProperties?N.patternProperties[_e.PatternStringExact]:r("Unable to get record value schema")}a(G,"RecordValue");function $(N,k){const[Ae,Be]=[F(k),G(k)];return Ee.TLiteralString(N)&&Ee.TNumber(Ae)&&t(J(N,Be))===at.True?at.True:Ee.TUint8Array(N)&&Ee.TNumber(Ae)?J(N,Be):Ee.TString(N)&&Ee.TNumber(Ae)?J(N,Be):Ee.TArray(N)&&Ee.TNumber(Ae)?J(N,Be):Ee.TObject(N)?(()=>{for(const et of Object.getOwnPropertyNames(N.properties)){if(De(Be,N.properties[et])===at.False){return at.False}}return at.True})():at.False}a($,"TRecordRight");function W(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):!Ee.TRecord(k)?at.False:J(G(N),G(k))}a(W,"TRecord");function pe(N,k){return Ee.TLiteral(N)&&Jt.IsString(N.const)?at.True:Ee.TString(N)?at.True:at.False}a(pe,"TStringRight");function H(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TString(k)?at.True:at.False}a(H,"TString");function de(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TSymbol(k)?at.True:at.False}a(de,"TSymbol");function se(N,k){return Ee.TTemplateLiteral(N)?J(xy.Resolve(N),k):Ee.TTemplateLiteral(k)?J(N,xy.Resolve(k)):r("Invalid fallthrough for TemplateLiteral")}a(se,"TTemplateLiteral");function L(N,k){return Ee.TArray(k)&&N.items!==void 0&&N.items.every(Ae=>J(Ae,k.items)===at.True)}a(L,"IsArrayOfTuple");function Se(N,k){return Ee.TNever(N)?at.True:Ee.TUnknown(N)?at.False:Ee.TAny(N)?at.Union:at.False}a(Se,"TTupleRight");function Le(N,k){return n(k)?i(N,k):Ee.TObject(k)&&B(k)?at.True:Ee.TArray(k)&&L(N,k)?at.True:!Ee.TTuple(k)?at.False:Jt.IsUndefined(N.items)&&!Jt.IsUndefined(k.items)||!Jt.IsUndefined(N.items)&&Jt.IsUndefined(k.items)?at.False:Jt.IsUndefined(N.items)&&!Jt.IsUndefined(k.items)?at.True:N.items.every((Ae,Be)=>J(Ae,k.items[Be])===at.True)?at.True:at.False}a(Le,"TTuple");function Ke(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TUint8Array(k)?at.True:at.False}a(Ke,"TUint8Array");function St(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TVoid(k)?j(N,k):Ee.TUndefined(k)?at.True:at.False}a(St,"TUndefined");function Mt(N,k){return k.anyOf.some(Ae=>J(N,Ae)===at.True)?at.True:at.False}a(Mt,"TUnionRight");function _r(N,k){return N.anyOf.every(Ae=>J(Ae,k)===at.True)?at.True:at.False}a(_r,"TUnion");function Ur(N,k){return at.True}a(Ur,"TUnknownRight");function Ve(N,k){return Ee.TNever(k)?C(N,k):Ee.TIntersect(k)?S(N,k):Ee.TUnion(k)?Mt(N,k):Ee.TAny(k)?s(N,k):Ee.TString(k)?pe(N,k):Ee.TNumber(k)?I(N,k):Ee.TInteger(k)?_(N,k):Ee.TBoolean(k)?p(N,k):Ee.TArray(k)?u(N,k):Ee.TTuple(k)?Se(N,k):Ee.TObject(k)?$e(N,k):Ee.TUnknown(k)?at.True:at.False}a(Ve,"TUnknown");function j(N,k){return Ee.TUndefined(N)?at.True:Ee.TUndefined(N)?at.True:at.False}a(j,"VoidRight");function q(N,k){return Ee.TIntersect(k)?S(N,k):Ee.TUnion(k)?Mt(N,k):Ee.TUnknown(k)?Ur(N,k):Ee.TAny(k)?s(N,k):Ee.TObject(k)?$e(N,k):Ee.TVoid(k)?at.True:at.False}a(q,"TVoid");function J(N,k){return Ee.TTemplateLiteral(N)||Ee.TTemplateLiteral(k)?se(N,k):Ee.TNot(N)||Ee.TNot(k)?P(N,k):Ee.TAny(N)?o(N,k):Ee.TArray(N)?l(N,k):Ee.TBigInt(N)?d(N,k):Ee.TBoolean(N)?f(N,k):Ee.TAsyncIterator(N)?c(N,k):Ee.TConstructor(N)?m(N,k):Ee.TDate(N)?h(N,k):Ee.TFunction(N)?g(N,k):Ee.TInteger(N)?v(N,k):Ee.TIntersect(N)?E(N,k):Ee.TIterator(N)?b(N,k):Ee.TLiteral(N)?A(N,k):Ee.TNever(N)?T(N,k):Ee.TNull(N)?R(N,k):Ee.TNumber(N)?D(N,k):Ee.TObject(N)?gt(N,k):Ee.TRecord(N)?W(N,k):Ee.TString(N)?H(N,k):Ee.TSymbol(N)?de(N,k):Ee.TTuple(N)?Le(N,k):Ee.TPromise(N)?ut(N,k):Ee.TUint8Array(N)?Ke(N,k):Ee.TUndefined(N)?St(N,k):Ee.TUnion(N)?_r(N,k):Ee.TUnknown(N)?Ve(N,k):Ee.TVoid(N)?q(N,k):r(`Unknown left type operand '${N[_e.Kind]}'`)}a(J,"Visit");function ae(N,k){return J(N,k)}a(ae,"Extends");e.Extends=ae})(iC||(_e.TypeExtends=iC={}));var Rr;(function(e){function t(o){const u=Object.getOwnPropertyNames(o).reduce((c,d)=>({...c,[d]:n(o[d])}),{});const l=Object.getOwnPropertySymbols(o).reduce((c,d)=>({...c,[d]:n(o[d])}),{});return{...u,...l}}a(t,"ObjectType");function r(o){return o.map(u=>n(u))}a(r,"ArrayType");function n(o){return Jt.IsArray(o)?r(o):Jt.IsObject(o)?t(o):o}a(n,"Visit");function i(o){return o.map(u=>s(u))}a(i,"Rest");e.Rest=i;function s(o,u={}){return{...n(o),...u}}a(s,"Type");e.Type=s})(Rr||(_e.TypeClone=Rr={}));var jRe;(function(e){function t(m){return m.map(h=>{const{[_e.Optional]:g,..._}=Rr.Type(h);return _})}a(t,"OptionalUnwrap");function r(m){return m.every(h=>Ee.TOptional(h))}a(r,"IsIntersectOptional");function n(m){return m.some(h=>Ee.TOptional(h))}a(n,"IsUnionOptional");function i(m){return r(m.allOf)?_e.Type.Optional(_e.Type.Intersect(t(m.allOf))):m}a(i,"ResolveIntersect");function s(m){return n(m.anyOf)?_e.Type.Optional(_e.Type.Union(t(m.anyOf))):m}a(s,"ResolveUnion");function o(m){return m[_e.Kind]==="Intersect"?i(m):m[_e.Kind]==="Union"?s(m):m}a(o,"ResolveOptional");function u(m,h){const g=m.allOf.reduce((_,v)=>{const S=p(v,h);return S[_e.Kind]==="Never"?_:[..._,S]},[]);return o(_e.Type.Intersect(g))}a(u,"TIntersect");function l(m,h){const g=m.anyOf.map(_=>p(_,h));return o(_e.Type.Union(g))}a(l,"TUnion");function c(m,h){const g=m.properties[h];return Jt.IsUndefined(g)?_e.Type.Never():_e.Type.Union([g])}a(c,"TObject");function d(m,h){const g=m.items;if(Jt.IsUndefined(g))return _e.Type.Never();const _=g[h];if(Jt.IsUndefined(_))return _e.Type.Never();return _}a(d,"TTuple");function p(m,h){return m[_e.Kind]==="Intersect"?u(m,h):m[_e.Kind]==="Union"?l(m,h):m[_e.Kind]==="Object"?c(m,h):m[_e.Kind]==="Tuple"?d(m,h):_e.Type.Never()}a(p,"Visit");function f(m,h,g={}){const _=h.map(v=>p(m,v.toString()));return o(_e.Type.Union(_,g))}a(f,"Resolve");e.Resolve=f})(jRe||(_e.IndexedAccessor=jRe={}));var yP;(function(e){function t(d){const[p,f]=[d.slice(0,1),d.slice(1)];return`${p.toLowerCase()}${f}`}a(t,"Uncapitalize");function r(d){const[p,f]=[d.slice(0,1),d.slice(1)];return`${p.toUpperCase()}${f}`}a(r,"Capitalize");function n(d){return d.toUpperCase()}a(n,"Uppercase");function i(d){return d.toLowerCase()}a(i,"Lowercase");function s(d,p){const f=vP.ParseExact(d.pattern);const m=EP.Check(f);if(!m)return{...d,pattern:o(d.pattern,p)};const h=[...bP.Generate(f)];const g=h.map(S=>_e.Type.Literal(S));const _=u(g,p);const v=_e.Type.Union(_);return _e.Type.TemplateLiteral([v])}a(s,"IntrinsicTemplateLiteral");function o(d,p){return typeof d==="string"?p==="Uncapitalize"?t(d):p==="Capitalize"?r(d):p==="Uppercase"?n(d):p==="Lowercase"?i(d):d:d.toString()}a(o,"IntrinsicLiteral");function u(d,p){if(d.length===0)return[];const[f,...m]=d;return[c(f,p),...u(m,p)]}a(u,"IntrinsicRest");function l(d,p){return Ee.TTemplateLiteral(d)?s(d,p):Ee.TUnion(d)?_e.Type.Union(u(d.anyOf,p)):Ee.TLiteral(d)?_e.Type.Literal(o(d.const,p)):d}a(l,"Visit");function c(d,p){return l(d,p)}a(c,"Map");e.Map=c})(yP||(_e.Intrinsic=yP={}));var _P;(function(e){function t(o,u){return _e.Type.Intersect(o.allOf.map(l=>i(l,u)),{...o})}a(t,"TIntersect");function r(o,u){return _e.Type.Union(o.anyOf.map(l=>i(l,u)),{...o})}a(r,"TUnion");function n(o,u){return u(o)}a(n,"TObject");function i(o,u){return o[_e.Kind]==="Intersect"?t(o,u):o[_e.Kind]==="Union"?r(o,u):o[_e.Kind]==="Object"?n(o,u):o}a(i,"Visit");function s(o,u,l){return{...i(Rr.Type(o),u),...l}}a(s,"Map");e.Map=s})(_P||(_e.ObjectMap=_P={}));var qJ;(function(e){function t(c){return c[0]==="^"&&c[c.length-1]==="$"?c.slice(1,c.length-1):c}a(t,"UnwrapPattern");function r(c,d){return c.allOf.reduce((p,f)=>[...p,...o(f,d)],[])}a(r,"TIntersect");function n(c,d){const p=c.anyOf.map(f=>o(f,d));return[...p.reduce((f,m)=>m.map(h=>p.every(g=>g.includes(h))?f.add(h):f)[0],new Set)]}a(n,"TUnion");function i(c,d){return Object.getOwnPropertyNames(c.properties)}a(i,"TObject");function s(c,d){return d.includePatterns?Object.getOwnPropertyNames(c.patternProperties):[]}a(s,"TRecord");function o(c,d){return Ee.TIntersect(c)?r(c,d):Ee.TUnion(c)?n(c,d):Ee.TObject(c)?i(c,d):Ee.TRecord(c)?s(c,d):[]}a(o,"Visit");function u(c,d){return[...new Set(o(c,d))]}a(u,"ResolveKeys");e.ResolveKeys=u;function l(c){const d=u(c,{includePatterns:true});const p=d.map(f=>`(${t(f)})`);return`^(${p.join("|")})$`}a(l,"ResolvePattern");e.ResolvePattern=l})(qJ||(_e.KeyResolver=qJ={}));var UJ=class extends gh{static{a(this,"KeyArrayResolverError")}};_e.KeyArrayResolverError=UJ;var qF;(function(e){function t(r){return Array.isArray(r)?r:Ee.TUnionLiteral(r)?r.anyOf.map(n=>n.const.toString()):Ee.TLiteral(r)?[r.const]:Ee.TTemplateLiteral(r)?(()=>{const n=vP.ParseExact(r.pattern);if(!EP.Check(n))throw new UJ("Cannot resolve keys from infinite template expression");return[...bP.Generate(n)]})():[]}a(t,"Resolve");e.Resolve=t})(qF||(_e.KeyArrayResolver=qF={}));var GRe;(function(e){function*t(n){for(const i of n.anyOf){if(i[_e.Kind]==="Union"){yield*t(i)}else{yield i}}}a(t,"TUnion");function r(n){return _e.Type.Union([...t(n)],{...n})}a(r,"Resolve");e.Resolve=r})(GRe||(_e.UnionResolver=GRe={}));var $J=class extends gh{static{a(this,"TemplateLiteralPatternError")}};_e.TemplateLiteralPatternError=$J;var jJ;(function(e){function t(s){throw new $J(s)}a(t,"Throw");function r(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(r,"Escape");function n(s,o){return Ee.TTemplateLiteral(s)?s.pattern.slice(1,s.pattern.length-1):Ee.TUnion(s)?`(${s.anyOf.map(u=>n(u,o)).join("|")})`:Ee.TNumber(s)?`${o}${_e.PatternNumber}`:Ee.TInteger(s)?`${o}${_e.PatternNumber}`:Ee.TBigInt(s)?`${o}${_e.PatternNumber}`:Ee.TString(s)?`${o}${_e.PatternString}`:Ee.TLiteral(s)?`${o}${r(s.const.toString())}`:Ee.TBoolean(s)?`${o}${_e.PatternBoolean}`:t(`Unexpected Kind '${s[_e.Kind]}'`)}a(n,"Visit");function i(s){return`^${s.map(o=>n(o,"")).join("")}$`}a(i,"Create");e.Create=i})(jJ||(_e.TemplateLiteralPattern=jJ={}));var xy;(function(e){function t(r){const n=vP.ParseExact(r.pattern);if(!EP.Check(n))return _e.Type.String();const i=[...bP.Generate(n)].map(s=>_e.Type.Literal(s));return _e.Type.Union(i)}a(t,"Resolve");e.Resolve=t})(xy||(_e.TemplateLiteralResolver=xy={}));var UF=class extends gh{static{a(this,"TemplateLiteralParserError")}};_e.TemplateLiteralParserError=UF;var vP;(function(e){function t(m,h,g){return m[h]===g&&m.charCodeAt(h-1)!==92}a(t,"IsNonEscaped");function r(m,h){return t(m,h,"(")}a(r,"IsOpenParen");function n(m,h){return t(m,h,")")}a(n,"IsCloseParen");function i(m,h){return t(m,h,"|")}a(i,"IsSeparator");function s(m){if(!(r(m,0)&&n(m,m.length-1)))return false;let h=0;for(let g=0;g<m.length;g++){if(r(m,g))h+=1;if(n(m,g))h-=1;if(h===0&&g!==m.length-1)return false}return true}a(s,"IsGroup");function o(m){return m.slice(1,m.length-1)}a(o,"InGroup");function u(m){let h=0;for(let g=0;g<m.length;g++){if(r(m,g))h+=1;if(n(m,g))h-=1;if(i(m,g)&&h===0)return true}return false}a(u,"IsPrecedenceOr");function l(m){for(let h=0;h<m.length;h++){if(r(m,h))return true}return false}a(l,"IsPrecedenceAnd");function c(m){let[h,g]=[0,0];const _=[];for(let S=0;S<m.length;S++){if(r(m,S))h+=1;if(n(m,S))h-=1;if(i(m,S)&&h===0){const E=m.slice(g,S);if(E.length>0)_.push(p(E));g=S+1}}const v=m.slice(g);if(v.length>0)_.push(p(v));if(_.length===0)return{type:"const",const:""};if(_.length===1)return _[0];return{type:"or",expr:_}}a(c,"Or");function d(m){function h(v,S){if(!r(v,S))throw new UF(`TemplateLiteralParser: Index must point to open parens`);let E=0;for(let b=S;b<v.length;b++){if(r(v,b))E+=1;if(n(v,b))E-=1;if(E===0)return[S,b]}throw new UF(`TemplateLiteralParser: Unclosed group parens in expression`)}a(h,"Group");function g(v,S){for(let E=S;E<v.length;E++){if(r(v,E))return[S,E]}return[S,v.length]}a(g,"Range");const _=[];for(let v=0;v<m.length;v++){if(r(m,v)){const[S,E]=h(m,v);const b=m.slice(S,E+1);_.push(p(b));v=E}else{const[S,E]=g(m,v);const b=m.slice(S,E);if(b.length>0)_.push(p(b));v=E-1}}return _.length===0?{type:"const",const:""}:_.length===1?_[0]:{type:"and",expr:_}}a(d,"And");function p(m){return s(m)?p(o(m)):u(m)?c(m):l(m)?d(m):{type:"const",const:m}}a(p,"Parse");e.Parse=p;function f(m){return p(m.slice(1,m.length-1))}a(f,"ParseExact");e.ParseExact=f})(vP||(_e.TemplateLiteralParser=vP={}));var GJ=class extends gh{static{a(this,"TemplateLiteralFiniteError")}};_e.TemplateLiteralFiniteError=GJ;var EP;(function(e){function t(o){throw new GJ(o)}a(t,"Throw");function r(o){return o.type==="or"&&o.expr.length===2&&o.expr[0].type==="const"&&o.expr[0].const==="0"&&o.expr[1].type==="const"&&o.expr[1].const==="[1-9][0-9]*"}a(r,"IsNumber");function n(o){return o.type==="or"&&o.expr.length===2&&o.expr[0].type==="const"&&o.expr[0].const==="true"&&o.expr[1].type==="const"&&o.expr[1].const==="false"}a(n,"IsBoolean");function i(o){return o.type==="const"&&o.const===".*"}a(i,"IsString");function s(o){return n(o)?true:r(o)||i(o)?false:o.type==="and"?o.expr.every(u=>s(u)):o.type==="or"?o.expr.every(u=>s(u)):o.type==="const"?true:t(`Unknown expression type`)}a(s,"Check");e.Check=s})(EP||(_e.TemplateLiteralFinite=EP={}));var HJ=class extends gh{static{a(this,"TemplateLiteralGeneratorError")}};_e.TemplateLiteralGeneratorError=HJ;var bP;(function(e){function*t(o){if(o.length===1)return yield*o[0];for(const u of o[0]){for(const l of t(o.slice(1))){yield`${u}${l}`}}}a(t,"Reduce");function*r(o){return yield*t(o.expr.map(u=>[...s(u)]))}a(r,"And");function*n(o){for(const u of o.expr)yield*s(u)}a(n,"Or");function*i(o){return yield o.const}a(i,"Const");function*s(o){return o.type==="and"?yield*r(o):o.type==="or"?yield*n(o):o.type==="const"?yield*i(o):(()=>{throw new HJ("Unknown expression")})()}a(s,"Generate");e.Generate=s})(bP||(_e.TemplateLiteralGenerator=bP={}));var HRe;(function(e){function*t(s){const o=s.trim().replace(/"|'/g,"");return o==="boolean"?yield _e.Type.Boolean():o==="number"?yield _e.Type.Number():o==="bigint"?yield _e.Type.BigInt():o==="string"?yield _e.Type.String():yield(()=>{const u=o.split("|").map(l=>_e.Type.Literal(l.trim()));return u.length===0?_e.Type.Never():u.length===1?u[0]:_e.Type.Union(u)})()}a(t,"ParseUnion");function*r(s){if(s[1]!=="{"){const o=_e.Type.Literal("$");const u=n(s.slice(1));return yield*[o,...u]}for(let o=2;o<s.length;o++){if(s[o]==="}"){const u=t(s.slice(2,o));const l=n(s.slice(o+1));return yield*[...u,...l]}}yield _e.Type.Literal(s)}a(r,"ParseTerminal");function*n(s){for(let o=0;o<s.length;o++){if(s[o]==="$"){const u=_e.Type.Literal(s.slice(0,o));const l=r(s.slice(o));return yield*[u,...l]}}yield _e.Type.Literal(s)}a(n,"ParseLiteral");function i(s){return[...n(s)]}a(i,"Parse");e.Parse=i})(HRe||(_e.TemplateLiteralDslParser=HRe={}));var VJ=class{static{a(this,"TransformDecodeBuilder")}constructor(t){this.schema=t}Decode(t){return new zJ(this.schema,t)}};_e.TransformDecodeBuilder=VJ;var zJ=class{static{a(this,"TransformEncodeBuilder")}constructor(t,r){this.schema=t;this.decode=r}Encode(t){const r=Rr.Type(this.schema);return Ee.TTransform(r)?(()=>{const n=a(o=>r[_e.Transform].Encode(t(o)),"Encode");const i=a(o=>this.decode(r[_e.Transform].Decode(o)),"Decode");const s={Encode:n,Decode:i};return{...r,[_e.Transform]:s}})():(()=>{const n={Decode:this.decode,Encode:t};return{...r,[_e.Transform]:n}})()}};_e.TransformEncodeBuilder=zJ;var pxn=0;var KJ=class extends gh{static{a(this,"TypeBuilderError")}};_e.TypeBuilderError=KJ;var WJ=class{static{a(this,"TypeBuilder")}Create(t){return t}Throw(t){throw new KJ(t)}Discard(t,r){const{[r]:n,...i}=t;return i}Strict(t){return JSON.parse(JSON.stringify(t))}};_e.TypeBuilder=WJ;var $F=class extends WJ{static{a(this,"JsonTypeBuilder")}ReadonlyOptional(t){return this.Readonly(this.Optional(t))}Readonly(t){return{...Rr.Type(t),[_e.Readonly]:"Readonly"}}Optional(t){return{...Rr.Type(t),[_e.Optional]:"Optional"}}Any(t={}){return this.Create({...t,[_e.Kind]:"Any"})}Array(t,r={}){return this.Create({...r,[_e.Kind]:"Array",type:"array",items:Rr.Type(t)})}Boolean(t={}){return this.Create({...t,[_e.Kind]:"Boolean",type:"boolean"})}Capitalize(t,r={}){return{...yP.Map(Rr.Type(t),"Capitalize"),...r}}Composite(t,r){const n=_e.Type.Intersect(t,{});const i=qJ.ResolveKeys(n,{includePatterns:false});const s=i.reduce((o,u)=>({...o,[u]:_e.Type.Index(n,[u])}),{});return _e.Type.Object(s,r)}Enum(t,r={}){const n=Object.getOwnPropertyNames(t).filter(s=>isNaN(s)).map(s=>t[s]);const i=n.map(s=>Jt.IsString(s)?{[_e.Kind]:"Literal",type:"string",const:s}:{[_e.Kind]:"Literal",type:"number",const:s});return this.Create({...r,[_e.Kind]:"Union",anyOf:i})}Extends(t,r,n,i,s={}){switch(iC.Extends(t,r)){case at.Union:return this.Union([Rr.Type(n,s),Rr.Type(i,s)]);case at.True:return Rr.Type(n,s);case at.False:return Rr.Type(i,s)}}Exclude(t,r,n={}){return Ee.TTemplateLiteral(t)?this.Exclude(xy.Resolve(t),r,n):Ee.TTemplateLiteral(r)?this.Exclude(t,xy.Resolve(r),n):Ee.TUnion(t)?(()=>{const i=t.anyOf.filter(s=>iC.Extends(s,r)===at.False);return i.length===1?Rr.Type(i[0],n):this.Union(i,n)})():iC.Extends(t,r)!==at.False?this.Never(n):Rr.Type(t,n)}Extract(t,r,n={}){return Ee.TTemplateLiteral(t)?this.Extract(xy.Resolve(t),r,n):Ee.TTemplateLiteral(r)?this.Extract(t,xy.Resolve(r),n):Ee.TUnion(t)?(()=>{const i=t.anyOf.filter(s=>iC.Extends(s,r)!==at.False);return i.length===1?Rr.Type(i[0],n):this.Union(i,n)})():iC.Extends(t,r)!==at.False?Rr.Type(t,n):this.Never(n)}Index(t,r,n={}){return Ee.TArray(t)&&Ee.TNumber(r)?(()=>{return Rr.Type(t.items,n)})():Ee.TTuple(t)&&Ee.TNumber(r)?(()=>{const i=Jt.IsUndefined(t.items)?[]:t.items;const s=i.map(o=>Rr.Type(o));return this.Union(s,n)})():(()=>{const i=qF.Resolve(r);const s=Rr.Type(t);return jRe.Resolve(s,i,n)})()}Integer(t={}){return this.Create({...t,[_e.Kind]:"Integer",type:"integer"})}Intersect(t,r={}){if(t.length===0)return _e.Type.Never();if(t.length===1)return Rr.Type(t[0],r);if(t.some(o=>Ee.TTransform(o)))this.Throw("Cannot intersect transform types");const n=t.every(o=>Ee.TObject(o));const i=Rr.Rest(t);const s=Ee.TSchema(r.unevaluatedProperties)?{unevaluatedProperties:Rr.Type(r.unevaluatedProperties)}:{};return r.unevaluatedProperties===false||Ee.TSchema(r.unevaluatedProperties)||n?this.Create({...r,...s,[_e.Kind]:"Intersect",type:"object",allOf:i}):this.Create({...r,...s,[_e.Kind]:"Intersect",allOf:i})}KeyOf(t,r={}){return Ee.TRecord(t)?(()=>{const n=Object.getOwnPropertyNames(t.patternProperties)[0];return n===_e.PatternNumberExact?this.Number(r):n===_e.PatternStringExact?this.String(r):this.Throw("Unable to resolve key type from Record key pattern")})():Ee.TTuple(t)?(()=>{const n=Jt.IsUndefined(t.items)?[]:t.items;const i=n.map((s,o)=>_e.Type.Literal(o.toString()));return this.Union(i,r)})():Ee.TArray(t)?(()=>{return this.Number(r)})():(()=>{const n=qJ.ResolveKeys(t,{includePatterns:false});if(n.length===0)return this.Never(r);const i=n.map(s=>this.Literal(s));return this.Union(i,r)})()}Literal(t,r={}){return this.Create({...r,[_e.Kind]:"Literal",const:t,type:typeof t})}Lowercase(t,r={}){return{...yP.Map(Rr.Type(t),"Lowercase"),...r}}Never(t={}){return this.Create({...t,[_e.Kind]:"Never",not:{}})}Not(t,r){return this.Create({...r,[_e.Kind]:"Not",not:Rr.Type(t)})}Null(t={}){return this.Create({...t,[_e.Kind]:"Null",type:"null"})}Number(t={}){return this.Create({...t,[_e.Kind]:"Number",type:"number"})}Object(t,r={}){const n=Object.getOwnPropertyNames(t);const i=n.filter(l=>Ee.TOptional(t[l]));const s=n.filter(l=>!i.includes(l));const o=Ee.TSchema(r.additionalProperties)?{additionalProperties:Rr.Type(r.additionalProperties)}:{};const u=n.reduce((l,c)=>({...l,[c]:Rr.Type(t[c])}),{});return s.length>0?this.Create({...r,...o,[_e.Kind]:"Object",type:"object",properties:u,required:s}):this.Create({...r,...o,[_e.Kind]:"Object",type:"object",properties:u})}Omit(t,r,n={}){const i=qF.Resolve(r);return _P.Map(this.Discard(Rr.Type(t),_e.Transform),s=>{if(Jt.IsArray(s.required)){s.required=s.required.filter(o=>!i.includes(o));if(s.required.length===0)delete s.required}for(const o of Object.getOwnPropertyNames(s.properties)){if(i.includes(o))delete s.properties[o]}return this.Create(s)},n)}Partial(t,r={}){return _P.Map(this.Discard(Rr.Type(t),_e.Transform),n=>{const i=Object.getOwnPropertyNames(n.properties).reduce((s,o)=>{return{...s,[o]:this.Optional(n.properties[o])}},{});return this.Object(i,this.Discard(n,"required"))},r)}Pick(t,r,n={}){const i=qF.Resolve(r);return _P.Map(this.Discard(Rr.Type(t),_e.Transform),s=>{if(Jt.IsArray(s.required)){s.required=s.required.filter(o=>i.includes(o));if(s.required.length===0)delete s.required}for(const o of Object.getOwnPropertyNames(s.properties)){if(!i.includes(o))delete s.properties[o]}return this.Create(s)},n)}Record(t,r,n={}){return Ee.TTemplateLiteral(t)?(()=>{const i=vP.ParseExact(t.pattern);return EP.Check(i)?this.Object([...bP.Generate(i)].reduce((s,o)=>({...s,[o]:Rr.Type(r)}),{}),n):this.Create({...n,[_e.Kind]:"Record",type:"object",patternProperties:{[t.pattern]:Rr.Type(r)}})})():Ee.TUnion(t)?(()=>{const i=GRe.Resolve(t);if(Ee.TUnionLiteral(i)){const s=i.anyOf.reduce((o,u)=>({...o,[u.const]:Rr.Type(r)}),{});return this.Object(s,{...n,[_e.Hint]:"Record"})}else this.Throw("Record key of type union contains non-literal types")})():Ee.TLiteral(t)?(()=>{return Jt.IsString(t.const)||Jt.IsNumber(t.const)?this.Object({[t.const]:Rr.Type(r)},n):this.Throw("Record key of type literal is not of type string or number")})():Ee.TInteger(t)||Ee.TNumber(t)?(()=>{return this.Create({...n,[_e.Kind]:"Record",type:"object",patternProperties:{[_e.PatternNumberExact]:Rr.Type(r)}})})():Ee.TString(t)?(()=>{const i=Jt.IsUndefined(t.pattern)?_e.PatternStringExact:t.pattern;return this.Create({...n,[_e.Kind]:"Record",type:"object",patternProperties:{[i]:Rr.Type(r)}})})():this.Never()}Recursive(t,r={}){if(Jt.IsUndefined(r.$id))r.$id=`T${pxn++}`;const n=t({[_e.Kind]:"This",$ref:`${r.$id}`});n.$id=r.$id;return this.Create({...r,[_e.Hint]:"Recursive",...n})}Ref(t,r={}){if(Jt.IsString(t))return this.Create({...r,[_e.Kind]:"Ref",$ref:t});if(Jt.IsUndefined(t.$id))this.Throw("Reference target type must specify an $id");return this.Create({...r,[_e.Kind]:"Ref",$ref:t.$id})}Required(t,r={}){return _P.Map(this.Discard(Rr.Type(t),_e.Transform),n=>{const i=Object.getOwnPropertyNames(n.properties).reduce((s,o)=>{return{...s,[o]:this.Discard(n.properties[o],_e.Optional)}},{});return this.Object(i,n)},r)}Rest(t){return Ee.TTuple(t)&&!Jt.IsUndefined(t.items)?Rr.Rest(t.items):Ee.TIntersect(t)?Rr.Rest(t.allOf):Ee.TUnion(t)?Rr.Rest(t.anyOf):[]}String(t={}){return this.Create({...t,[_e.Kind]:"String",type:"string"})}TemplateLiteral(t,r={}){const n=Jt.IsString(t)?jJ.Create(HRe.Parse(t)):jJ.Create(t);return this.Create({...r,[_e.Kind]:"TemplateLiteral",type:"string",pattern:n})}Transform(t){return new VJ(t)}Tuple(t,r={}){const[n,i,s]=[false,t.length,t.length];const o=Rr.Rest(t);const u=t.length>0?{...r,[_e.Kind]:"Tuple",type:"array",items:o,additionalItems:n,minItems:i,maxItems:s}:{...r,[_e.Kind]:"Tuple",type:"array",minItems:i,maxItems:s};return this.Create(u)}Uncapitalize(t,r={}){return{...yP.Map(Rr.Type(t),"Uncapitalize"),...r}}Union(t,r={}){return Ee.TTemplateLiteral(t)?xy.Resolve(t):(()=>{const n=t;if(n.length===0)return this.Never(r);if(n.length===1)return this.Create(Rr.Type(n[0],r));const i=Rr.Rest(n);return this.Create({...r,[_e.Kind]:"Union",anyOf:i})})()}Unknown(t={}){return this.Create({...t,[_e.Kind]:"Unknown"})}Unsafe(t={}){return this.Create({...t,[_e.Kind]:t[_e.Kind]||"Unsafe"})}Uppercase(t,r={}){return{...yP.Map(Rr.Type(t),"Uppercase"),...r}}};_e.JsonTypeBuilder=$F;var YJ=class extends $F{static{a(this,"JavaScriptTypeBuilder")}AsyncIterator(t,r={}){return this.Create({...r,[_e.Kind]:"AsyncIterator",type:"AsyncIterator",items:Rr.Type(t)})}Awaited(t,r={}){const n=a(i=>i.length>0?(()=>{const[s,...o]=i;return[this.Awaited(s),...n(o)]})():i,"Unwrap");return Ee.TIntersect(t)?_e.Type.Intersect(n(t.allOf)):Ee.TUnion(t)?_e.Type.Union(n(t.anyOf)):Ee.TPromise(t)?this.Awaited(t.item):Rr.Type(t,r)}BigInt(t={}){return this.Create({...t,[_e.Kind]:"BigInt",type:"bigint"})}ConstructorParameters(t,r={}){return this.Tuple([...t.parameters],{...r})}Constructor(t,r,n){const[i,s]=[Rr.Rest(t),Rr.Type(r)];return this.Create({...n,[_e.Kind]:"Constructor",type:"constructor",parameters:i,returns:s})}Date(t={}){return this.Create({...t,[_e.Kind]:"Date",type:"Date"})}Function(t,r,n){const[i,s]=[Rr.Rest(t),Rr.Type(r)];return this.Create({...n,[_e.Kind]:"Function",type:"function",parameters:i,returns:s})}InstanceType(t,r={}){return Rr.Type(t.returns,r)}Iterator(t,r={}){return this.Create({...r,[_e.Kind]:"Iterator",type:"Iterator",items:Rr.Type(t)})}Parameters(t,r={}){return this.Tuple(t.parameters,{...r})}Promise(t,r={}){return this.Create({...r,[_e.Kind]:"Promise",type:"Promise",item:Rr.Type(t)})}RegExp(t,r={}){const n=Jt.IsString(t)?t:t.source;return this.Create({...r,[_e.Kind]:"String",type:"string",pattern:n})}RegEx(t,r={}){return this.RegExp(t,r)}ReturnType(t,r={}){return Rr.Type(t.returns,r)}Symbol(t){return this.Create({...t,[_e.Kind]:"Symbol",type:"symbol"})}Undefined(t={}){return this.Create({...t,[_e.Kind]:"Undefined",type:"undefined"})}Uint8Array(t={}){return this.Create({...t,[_e.Kind]:"Uint8Array",type:"Uint8Array"})}Void(t={}){return this.Create({...t,[_e.Kind]:"Void",type:"void"})}};_e.JavaScriptTypeBuilder=YJ;_e.JsonType=new $F;_e.Type=new YJ});var _xt=y(XJ=>{"use strict";Object.defineProperty(XJ,"__esModule",{value:true});XJ.CustomTypeBuilder=void 0;var jF=yxt();var VRe=class extends jF.TypeBuilder{static{a(this,"CustomTypeBuilder")}static Date(){return jF.Type.Unsafe({type:"string",format:"date-time"})}static Nullable(t){return jF.Type.Union([t,jF.Type.Null()])}static StringEnum(t){return jF.Type.Unsafe({type:"string",enum:t})}};XJ.CustomTypeBuilder=VRe});var Sxt=y(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:true});Tr.throwIfNotNumber=Tr.throwIfNotString=Tr.throwIfUndefinedOrNull=Tr.throwIfUndefined=Tr.ArgumentTypeError=Tr.ArgumentUndefinedError=Tr.ValidationError=Tr.withUndefinedAsNull=Tr.withNullAsUndefined=Tr.validateConstraint=Tr.validateConstraints=Tr.areFunctions=Tr.isFunction=Tr.isEmptyObject=Tr.assertAllDefined=Tr.assertIsDefined=Tr.assertType=Tr.isUndefinedOrNull=Tr.isDefined=Tr.isUndefined=Tr.isBoolean=Tr.isIterable=Tr.isNumber=Tr.isTypedArray=Tr.isObject=Tr.isStringArray=Tr.isString=void 0;function JJ(e){return typeof e==="string"}a(JJ,"isString");Tr.isString=JJ;function fxn(e){return Array.isArray(e)&&e.every(t=>JJ(t))}a(fxn,"isStringArray");Tr.isStringArray=fxn;function vxt(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}a(vxt,"isObject");Tr.isObject=vxt;function mxn(e){const t=Object.getPrototypeOf(Uint8Array);return typeof e==="object"&&e instanceof t}a(mxn,"isTypedArray");Tr.isTypedArray=mxn;function Ext(e){return typeof e==="number"&&!isNaN(e)}a(Ext,"isNumber");Tr.isNumber=Ext;function hxn(e){return!!e&&typeof e[Symbol.iterator]==="function"}a(hxn,"isIterable");Tr.isIterable=hxn;function gxn(e){return e===true||e===false}a(gxn,"isBoolean");Tr.isBoolean=gxn;function zRe(e){return typeof e==="undefined"}a(zRe,"isUndefined");Tr.isUndefined=zRe;function yxn(e){return!SP(e)}a(yxn,"isDefined");Tr.isDefined=yxn;function SP(e){return zRe(e)||e===null}a(SP,"isUndefinedOrNull");Tr.isUndefinedOrNull=SP;function _xn(e,t){if(!e){throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}}a(_xn,"assertType");Tr.assertType=_xn;function vxn(e){if(SP(e)){throw new Error("Assertion Failed: argument is undefined or null")}return e}a(vxn,"assertIsDefined");Tr.assertIsDefined=vxn;function Exn(...e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];if(SP(n)){throw new Error(`Assertion Failed: argument at index ${r} is undefined or null`)}t.push(n)}return t}a(Exn,"assertAllDefined");Tr.assertAllDefined=Exn;var bxn=Object.prototype.hasOwnProperty;function Sxn(e){if(!vxt(e)){return false}for(const t in e){if(bxn.call(e,t)){return false}}return true}a(Sxn,"isEmptyObject");Tr.isEmptyObject=Sxn;function KRe(e){return typeof e==="function"}a(KRe,"isFunction");Tr.isFunction=KRe;function Axn(...e){return e.length>0&&e.every(KRe)}a(Axn,"areFunctions");Tr.areFunctions=Axn;function Cxn(e,t){const r=Math.min(e.length,t.length);for(let n=0;n<r;n++){bxt(e[n],t[n])}}a(Cxn,"validateConstraints");Tr.validateConstraints=Cxn;function bxt(e,t){if(JJ(t)){if(typeof e!==t){throw new Error(`argument does not match constraint: typeof ${t}`)}}else if(KRe(t)){try{if(e instanceof t){return}}catch{}if(!SP(e)&&e.constructor===t){return}if(t.length===1&&t.call(void 0,e)===true){return}throw new Error(`argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true`)}}a(bxt,"validateConstraint");Tr.validateConstraint=bxt;function wxn(e){return e===null?void 0:e}a(wxn,"withNullAsUndefined");Tr.withNullAsUndefined=wxn;function Txn(e){return typeof e==="undefined"?null:e}a(Txn,"withUndefinedAsNull");Tr.withUndefinedAsNull=Txn;var GF=class extends Error{static{a(this,"ValidationError")}constructor(t){super(t)}};Tr.ValidationError=GF;var HF=class extends GF{static{a(this,"ArgumentUndefinedError")}constructor(t){super(`The argument '${t}' is undefined.`)}};Tr.ArgumentUndefinedError=HF;var VF=class extends GF{static{a(this,"ArgumentTypeError")}constructor(t,r){super(`The argument '${t}' must be of type '${r}'.`)}};Tr.ArgumentTypeError=VF;function xxn(e,t){if(zRe(e)){throw new HF(t)}return true}a(xxn,"throwIfUndefined");Tr.throwIfUndefined=xxn;function WRe(e,t){if(SP(e)){throw new HF(t)}}a(WRe,"throwIfUndefinedOrNull");Tr.throwIfUndefinedOrNull=WRe;function Rxn(e,t){WRe(e,t);if(!JJ(e)){throw new VF(t,"string")}return true}a(Rxn,"throwIfNotString");Tr.throwIfNotString=Rxn;function Oxn(e,t){WRe(e,t);if(!Ext(e)){throw new VF(t,"number")}return true}a(Oxn,"throwIfNotNumber");Tr.throwIfNotNumber=Oxn});var hn=y(mt=>{"use strict";var Axt=mt&&mt.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)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===void 0)n=r;e[n]=t[r]});var Pxn=mt&&mt.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var QJ=mt&&mt.__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))Axt(t,e,r)}Pxn(t,e);return t};var KE=mt&&mt.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))Axt(t,e,r)};Object.defineProperty(mt,"__esModule",{value:true});mt.getRequiredEnvVar=mt.env=mt.EnvironmentalVariableRequiredError=mt.xfs=mt.RouteValidator=mt.JsonValidator=mt.MeteringService=mt.TenantService=mt.OpenFGAService=mt.DevApiService=mt.getContentApiStorageTarballPath=mt.contentApiTarballFileName=mt.ContentApiService=mt.AuthApiService=mt.getServiceAccountIdToken=mt.createApiKeyServiceClient=mt.ApiKeyService=mt.RouteVersions=mt.startsWithReservedKeyword=mt.logger=mt.createNewLogger=mt.graphQL=mt.CloudStorage=mt.fly=mt.ApiServer=mt.featureFlagsPlugin=mt.ensureZuploUserPlugin=mt.ensureZuploAdminPlugin=mt.ensureServiceAccountPlugin=mt.apiKeyAuthPlugin=mt.errorHandler=mt.DeploymentLogState=mt.signString=mt.FeatureFlags=mt.VALID_COMPATIBILITY_DATES=mt.DEFAULT_COMPATIBILITY_DATE=mt.COMPATIBILITY_FLAG_MAPPINGS=mt.WARNING_STATUS=mt.WARNING_SEVERITY=mt.GOOD_STATUS=mt.FAILURE_STATUS=mt.ERROR_SEVERITY=mt.BuildIssueError=mt.hasBlockedNotifications=mt.getDefaultFlags=mt.getBuildFlagsForDeployment=mt.CommonAuth=void 0;var YRe=QJ(ep());mt.env=YRe.default;Object.defineProperty(mt,"EnvironmentalVariableRequiredError",{enumerable:true,get:function(){return YRe.EnvironmentalVariableRequiredError}});Object.defineProperty(mt,"getRequiredEnvVar",{enumerable:true,get:function(){return YRe.getRequiredEnvVar}});KE(ac(),mt);var Nxn=$ce();Object.defineProperty(mt,"CommonAuth",{enumerable:true,get:function(){return Nxn.CommonAuth}});var XRe=$Ge();Object.defineProperty(mt,"getBuildFlagsForDeployment",{enumerable:true,get:function(){return XRe.getBuildFlagsForDeployment}});Object.defineProperty(mt,"getDefaultFlags",{enumerable:true,get:function(){return XRe.getDefaultFlags}});Object.defineProperty(mt,"hasBlockedNotifications",{enumerable:true,get:function(){return XRe.hasBlockedNotifications}});var AP=jGe();Object.defineProperty(mt,"BuildIssueError",{enumerable:true,get:function(){return AP.BuildIssueError}});Object.defineProperty(mt,"ERROR_SEVERITY",{enumerable:true,get:function(){return AP.ERROR_SEVERITY}});Object.defineProperty(mt,"FAILURE_STATUS",{enumerable:true,get:function(){return AP.FAILURE_STATUS}});Object.defineProperty(mt,"GOOD_STATUS",{enumerable:true,get:function(){return AP.GOOD_STATUS}});Object.defineProperty(mt,"WARNING_SEVERITY",{enumerable:true,get:function(){return AP.WARNING_SEVERITY}});Object.defineProperty(mt,"WARNING_STATUS",{enumerable:true,get:function(){return AP.WARNING_STATUS}});var Ixn=GGe();Object.defineProperty(mt,"COMPATIBILITY_FLAG_MAPPINGS",{enumerable:true,get:function(){return Ixn.COMPATIBILITY_FLAG_MAPPINGS}});var Cxt=zGe();Object.defineProperty(mt,"DEFAULT_COMPATIBILITY_DATE",{enumerable:true,get:function(){return Cxt.DEFAULT_COMPATIBILITY_DATE}});Object.defineProperty(mt,"VALID_COMPATIBILITY_DATES",{enumerable:true,get:function(){return Cxt.VALID_COMPATIBILITY_DATES}});var kxn=jce();Object.defineProperty(mt,"FeatureFlags",{enumerable:true,get:function(){return kxn.FeatureFlags}});var Dxn=KGe();Object.defineProperty(mt,"signString",{enumerable:true,get:function(){return Dxn.signString}});KE(WGe(),mt);var Lxn=Vce();Object.defineProperty(mt,"DeploymentLogState",{enumerable:true,get:function(){return Lxn.DeploymentLogState}});KE(rHe(),mt);KE(zce(),mt);var Fxn=Kce();Object.defineProperty(mt,"errorHandler",{enumerable:true,get:function(){return Fxn.errorHandler}});var zF=Qce();Object.defineProperty(mt,"apiKeyAuthPlugin",{enumerable:true,get:function(){return zF.apiKeyAuthPlugin}});Object.defineProperty(mt,"ensureServiceAccountPlugin",{enumerable:true,get:function(){return zF.ensureServiceAccountPlugin}});Object.defineProperty(mt,"ensureZuploAdminPlugin",{enumerable:true,get:function(){return zF.ensureZuploAdminPlugin}});Object.defineProperty(mt,"ensureZuploUserPlugin",{enumerable:true,get:function(){return zF.ensureZuploUserPlugin}});Object.defineProperty(mt,"featureFlagsPlugin",{enumerable:true,get:function(){return zF.featureFlagsPlugin}});var Bxn=hft();Object.defineProperty(mt,"ApiServer",{enumerable:true,get:function(){return Bxn.ApiServer}});mt.fly=QJ(_ft());mt.CloudStorage=QJ(nvt());var Mxn=ivt();Object.defineProperty(mt,"graphQL",{enumerable:true,get:function(){return Mxn.graphQL}});KE(T2t(),mt);var wxt=aEe();Object.defineProperty(mt,"createNewLogger",{enumerable:true,get:function(){return wxt.createNewLogger}});Object.defineProperty(mt,"logger",{enumerable:true,get:function(){return wxt.logger}});var qxn=JCe();Object.defineProperty(mt,"startsWithReservedKeyword",{enumerable:true,get:function(){return qxn.startsWithReservedKeyword}});var Uxn=x2t();Object.defineProperty(mt,"RouteVersions",{enumerable:true,get:function(){return Uxn.RouteVersions}});var Txt=JCt();Object.defineProperty(mt,"ApiKeyService",{enumerable:true,get:function(){return Txt.ApiKeyService}});Object.defineProperty(mt,"createApiKeyServiceClient",{enumerable:true,get:function(){return Txt.createApiKeyServiceClient}});var $xn=JO();Object.defineProperty(mt,"getServiceAccountIdToken",{enumerable:true,get:function(){return $xn.getServiceAccountIdToken}});var jxn=ZCt();Object.defineProperty(mt,"AuthApiService",{enumerable:true,get:function(){return jxn.AuthApiService}});var JRe=nwt();Object.defineProperty(mt,"ContentApiService",{enumerable:true,get:function(){return JRe.ContentApiService}});Object.defineProperty(mt,"contentApiTarballFileName",{enumerable:true,get:function(){return JRe.contentApiTarballFileName}});Object.defineProperty(mt,"getContentApiStorageTarballPath",{enumerable:true,get:function(){return JRe.getContentApiStorageTarballPath}});var Gxn=awt();Object.defineProperty(mt,"DevApiService",{enumerable:true,get:function(){return Gxn.DevApiService}});var Hxn=oxt();Object.defineProperty(mt,"OpenFGAService",{enumerable:true,get:function(){return Hxn.OpenFGAService}});var Vxn=cxt();Object.defineProperty(mt,"TenantService",{enumerable:true,get:function(){return Vxn.TenantService}});var zxn=fxt();Object.defineProperty(mt,"MeteringService",{enumerable:true,get:function(){return zxn.MeteringService}});KE(mxt(),mt);KE(_xt(),mt);KE(Sxt(),mt);var Kxn=jY();Object.defineProperty(mt,"JsonValidator",{enumerable:true,get:function(){return Kxn.JsonValidator}});var Wxn=iwe();Object.defineProperty(mt,"RouteValidator",{enumerable:true,get:function(){return Wxn.RouteValidator}});mt.xfs=QJ(tAe())});var Fn=y(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:true});Vt.NODE_BUILD_OPEN_API_OUTPUT_FILE=Vt.NODE_BUILD_OUTPUT_FILE=Vt.NODE_ENTRY_NAME=Vt.WORKER_BUILD_OUTPUT_SOURCEMAP_FILE=Vt.WORKER_BUILD_OUTPUT_FILE=Vt.WORKER_ENTRY_NAME=Vt.ENV_MODULE_FILE=Vt.ZUPLO_SYSTEM_ENV_FILE=Vt.ENV_FILE=Vt.CACHE_DIRECTORY=Vt.BUILD_CACHE_FILE=Vt.ZUPLO_FILE_SCHEMA=Vt.NON_STANDARD_NODE_ENV=Vt.GENERATED_TYPES_DIR_NAME=Vt.GENERATED_BUILD_JSON_FILE=Vt.GENERATED_SOURCE_DIR_NAME=Vt.BUILD_OUTPUT_DIR=Vt.DEFAULT_TEST_FILE=Vt.DEFAULT_DOCS_MARKDOWN_FILE=Vt.DOCS_THEME_FILE=Vt.DOCS_SIDEBAR_FILE=Vt.ZUPLO_FALLBACK_JSON_FILE=Vt.ZUPLO_PREFERRED_JSON_FILE=Vt.DEFAULT_MODULE_FILE=Vt.OPEN_API_FILE_SUFFIX=Vt.OPEN_API_CONFIG_FILE=Vt.OPEN_API_UNVERSIONED_DIR_NAME=Vt.DEV_PORTAL_OUTPUT_DIR_NAME=Vt.DEV_PORTAL_CONFIG_FILE=Vt.POLICIES_CONFIG_FILE=Vt.ROUTES_OAS_CONFIG_FILE=Vt.LOCAL_API_KEYS_CONFIG_FILE=Vt.DEV_PORTAL_V4_PATH=Vt.USER_DOCS_DIR_NAME=Vt.USER_SCHEMAS_DIR_NAME=Vt.USER_CONFIG_DIR_NAME=Vt.USER_TEST_DIR_NAME=Vt.USER_MODULES_DIR_NAME=void 0;Vt.USER_MODULES_DIR_NAME="modules";Vt.USER_TEST_DIR_NAME="tests";Vt.USER_CONFIG_DIR_NAME="config";Vt.USER_SCHEMAS_DIR_NAME="schemas";Vt.USER_DOCS_DIR_NAME="docs";Vt.DEV_PORTAL_V4_PATH="v4";Vt.LOCAL_API_KEYS_CONFIG_FILE="api-keys.json";Vt.ROUTES_OAS_CONFIG_FILE="routes.oas.json";Vt.POLICIES_CONFIG_FILE="policies.json";Vt.DEV_PORTAL_CONFIG_FILE="dev-portal.json";Vt.DEV_PORTAL_OUTPUT_DIR_NAME="dev-portal";Vt.OPEN_API_UNVERSIONED_DIR_NAME="unversioned";Vt.OPEN_API_CONFIG_FILE="open-api.json";Vt.OPEN_API_FILE_SUFFIX=".oas.json";Vt.DEFAULT_MODULE_FILE="hello-world.ts";Vt.ZUPLO_PREFERRED_JSON_FILE="zuplo.jsonc";Vt.ZUPLO_FALLBACK_JSON_FILE="zuplo.json";Vt.DOCS_SIDEBAR_FILE="sidebar.json";Vt.DOCS_THEME_FILE="theme.css";Vt.DEFAULT_DOCS_MARKDOWN_FILE="index.md";Vt.DEFAULT_TEST_FILE="hello-world.json";Vt.BUILD_OUTPUT_DIR="dist";Vt.GENERATED_SOURCE_DIR_NAME=".zuplo";Vt.GENERATED_BUILD_JSON_FILE="build.json";Vt.GENERATED_TYPES_DIR_NAME="types";Vt.NON_STANDARD_NODE_ENV=`You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against.`;Vt.ZUPLO_FILE_SCHEMA="zuplo";Vt.BUILD_CACHE_FILE="buildstate.json";Vt.CACHE_DIRECTORY=".cache";Vt.ENV_FILE=".env";Vt.ZUPLO_SYSTEM_ENV_FILE=".env.zuplo";Vt.ENV_MODULE_FILE="environment.ts";Vt.WORKER_ENTRY_NAME="worker.ts";Vt.WORKER_BUILD_OUTPUT_FILE="worker.js";Vt.WORKER_BUILD_OUTPUT_SOURCEMAP_FILE="worker.js.map";Vt.NODE_ENTRY_NAME="server.ts";Vt.NODE_BUILD_OUTPUT_FILE="main.js";Vt.NODE_BUILD_OPEN_API_OUTPUT_FILE=Vt.OPEN_API_CONFIG_FILE});var tu=y(CP=>{"use strict";Object.defineProperty(CP,"__esModule",{value:true});CP.runPlugins=CP.PluginResult=void 0;var QRe=class{static{a(this,"PluginResult")}errors=[];warnings=[];constructor(t){if(t){this.errors.push(t)}}};CP.PluginResult=QRe;async function Yxn(e,t){const r=[];const n=[];const i=new Map;for await(const s of e){try{const o=await s(t,i);n.push(...o.errors.map(u=>{if(u.pluginName===""){u.pluginName=s.name}return u}));r.push(...o.warnings);if(o.errors.length>0){break}}catch(o){n.push(o);break}}return{errors:n,warnings:r}}a(Yxn,"runPlugins");CP.runPlugins=Yxn});var xs=y(eOe=>{"use strict";Object.defineProperty(eOe,"__esModule",{value:true});var ZJ=require("perf_hooks");var ZRe=[];async function Xxn(e,t){const r=ZJ.performance.timerify(t);const n=new ZJ.PerformanceObserver(i=>{const s=i.getEntries()[0];ZRe.push({name:e,duration:s.duration});n.disconnect()});n.observe({entryTypes:["function"]});return r()}a(Xxn,"timeFn");var Jxn={mark:e=>{ZJ.performance.mark(e)},measure:(e,t,r)=>{ZJ.performance.measure(e,t,r)},timeFn:Xxn,report:()=>{if(ZRe.length>0){console.table(ZRe)}}};eOe.default=Jxn});var tOe=y(wP=>{"use strict";var Qxn=wP&&wP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(wP,"__esModule",{value:true});wP.getZuploConfig=void 0;var KF=hn();var Zxn=require("jsonc-parser");var eRn=require("fs/promises");var xxt=Qxn(require("path"));var Rxt=Fn();async function tRn(e){const t=xxt.default.join(e,Rxt.ZUPLO_PREFERRED_JSON_FILE);const r=xxt.default.join(e,Rxt.ZUPLO_FALLBACK_JSON_FILE);let n=false;let i=t;if(await KF.xfs.fileExists(t)){n=true;i=t}else if(await KF.xfs.fileExists(r)){n=true;i=r}const s={};if(n){const o=await(0,eRn.readFile)(i,"utf-8");const u=[];const l=(0,Zxn.parse)(o,u);if(typeof l!=="object"){const c={message:`Invalid zuplo.json file`,detail:`The zuplo.json file is not a valid JSON object`,pluginName:"buildData",severity:"error"};return{errors:[c]}}if("version"in l&&l.version!==1){const c={message:`Invalid version set in zuplo.config`,detail:`version in zuplo.json must be set to 1`,pluginName:"buildData",severity:"error"};return{errors:[c]}}if("compatibilityDate"in l&&KF.VALID_COMPATIBILITY_DATES&&typeof l.compatibilityDate==="string"){if(!KF.VALID_COMPATIBILITY_DATES.includes(l.compatibilityDate)){const c={message:`Invalid compatibilityDate set in zuplo.config`,detail:`compatibilityDate was set to ${l.compatibilityDate}. Valid compatibility dates are ${KF.VALID_COMPATIBILITY_DATES.join(", ")}`,pluginName:"buildData",severity:"error"};return{errors:[c]}}s.compatibilityDate=l.compatibilityDate}}return{config:s,errors:[]}}a(tRn,"getZuploConfig");wP.getZuploConfig=tRn});var WF=y(eQ=>{"use strict";Object.defineProperty(eQ,"__esModule",{value:true});eQ.TargetPlatform=void 0;var Oxt;(function(e){e["Worker"]="worker"})(Oxt||(eQ.TargetPlatform=Oxt={}))});var Nxt=y(TP=>{"use strict";var Pxt=TP&&TP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(TP,"__esModule",{value:true});TP.cleanOutput=void 0;var rRn=Pxt(require("fs/promises"));var nRn=Pxt(xs());var iRn=a(async function({outputDirectory:e,systemDirectory:t,logger:r}){return nRn.default.timeFn("Cleaning output",async()=>{r.debug("Cleaning output");const n=[e,t];for await(const i of n){try{await rRn.default.rm(i,{recursive:true,force:true})}catch(s){r.error(s)}}return{warnings:[],errors:[]}})},"cleanOutput");TP.cleanOutput=iRn});var kxt=y(xP=>{"use strict";var Ixt=xP&&xP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(xP,"__esModule",{value:true});xP.createSystemDir=void 0;var sRn=hn();var aRn=Ixt(require("fs/promises"));var oRn=Ixt(xs());var uRn=a(async function({systemDirectory:e,logger:t}){return oRn.default.timeFn("Creating system directory",async()=>{t.debug("Creating system directory");try{if(await sRn.xfs.dirExists(e)){t.debug("System directory already exists, skipping");return{warnings:[],errors:[]}}await aRn.default.mkdir(e)}catch(r){t.error(r);return{warnings:[],errors:[]}}return{warnings:[],errors:[]}})},"createSystemDir");xP.createSystemDir=uRn});var Dxt=y(RP=>{"use strict";var lRn=RP&&RP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(RP,"__esModule",{value:true});RP.checkForDeprecations=void 0;var cRn=lRn(xs());var dRn=a(async function({logger:e}){return cRn.default.timeFn("Checking for breaking changes",async()=>{e.debug("Checking for breaking changes");return{warnings:[],errors:[]}})},"checkForDeprecations");RP.checkForDeprecations=dRn});var Lxt=y(rOe=>{var sC=require("path");var YE=process.platform==="win32";var WE=require("fs");var pRn=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function fRn(){var e;if(pRn){var t=new Error;e=r}else e=n;return e;function r(i){if(i){t.message=i.message;i=t;n(i)}}a(r,"debugCallback");function n(i){if(i){if(process.throwDeprecation)throw i;else if(!process.noDeprecation){var s="fs: missing callback "+(i.stack||i.message);if(process.traceDeprecation)console.trace(s);else console.error(s)}}}a(n,"missingCallback")}a(fRn,"rethrow");function mRn(e){return typeof e==="function"?e:fRn()}a(mRn,"maybeCallback");var a5s=sC.normalize;if(YE){Ry=/(.*?)(?:[\/\\]+|$)/g}else{Ry=/(.*?)(?:[\/]+|$)/g}var Ry;if(YE){YF=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/}else{YF=/^[\/]*/}var YF;rOe.realpathSync=a(function e(t,r){t=sC.resolve(t);if(r&&Object.prototype.hasOwnProperty.call(r,t)){return r[t]}var n=t,i={},s={};var o;var u;var l;var c;d();function d(){var _=YF.exec(t);o=_[0].length;u=_[0];l=_[0];c="";if(YE&&!s[l]){WE.lstatSync(l);s[l]=true}}a(d,"start");while(o<t.length){Ry.lastIndex=o;var p=Ry.exec(t);c=u;u+=p[0];l=c+p[1];o=Ry.lastIndex;if(s[l]||r&&r[l]===l){continue}var f;if(r&&Object.prototype.hasOwnProperty.call(r,l)){f=r[l]}else{var m=WE.lstatSync(l);if(!m.isSymbolicLink()){s[l]=true;if(r)r[l]=l;continue}var h=null;if(!YE){var g=m.dev.toString(32)+":"+m.ino.toString(32);if(i.hasOwnProperty(g)){h=i[g]}}if(h===null){WE.statSync(l);h=WE.readlinkSync(l)}f=sC.resolve(c,h);if(r)r[l]=f;if(!YE)i[g]=h}t=sC.resolve(f,t.slice(o));d()}if(r)r[n]=t;return t},"realpathSync");rOe.realpath=a(function e(t,r,n){if(typeof n!=="function"){n=mRn(r);r=null}t=sC.resolve(t);if(r&&Object.prototype.hasOwnProperty.call(r,t)){return process.nextTick(n.bind(null,null,r[t]))}var i=t,s={},o={};var u;var l;var c;var d;p();function p(){var _=YF.exec(t);u=_[0].length;l=_[0];c=_[0];d="";if(YE&&!o[c]){WE.lstat(c,function(v){if(v)return n(v);o[c]=true;f()})}else{process.nextTick(f)}}a(p,"start");function f(){if(u>=t.length){if(r)r[i]=t;return n(null,t)}Ry.lastIndex=u;var _=Ry.exec(t);d=l;l+=_[0];c=d+_[1];u=Ry.lastIndex;if(o[c]||r&&r[c]===c){return process.nextTick(f)}if(r&&Object.prototype.hasOwnProperty.call(r,c)){return g(r[c])}return WE.lstat(c,m)}a(f,"LOOP");function m(_,v){if(_)return n(_);if(!v.isSymbolicLink()){o[c]=true;if(r)r[c]=c;return process.nextTick(f)}if(!YE){var S=v.dev.toString(32)+":"+v.ino.toString(32);if(s.hasOwnProperty(S)){return h(null,s[S],c)}}WE.stat(c,function(E){if(E)return n(E);WE.readlink(c,function(b,A){if(!YE)s[S]=A;h(b,A)})})}a(m,"gotStat");function h(_,v,S){if(_)return n(_);var E=sC.resolve(d,v);if(r)r[S]=E;g(E)}a(h,"gotTarget");function g(_){t=sC.resolve(_,t.slice(u));p()}a(g,"gotResolvedLink")},"realpath")});var aOe=y((l5s,qxt)=>{qxt.exports=XE;XE.realpath=XE;XE.sync=sOe;XE.realpathSync=sOe;XE.monkeypatch=gRn;XE.unmonkeypatch=yRn;var OP=require("fs");var nOe=OP.realpath;var iOe=OP.realpathSync;var hRn=process.version;var Fxt=/^v[0-5]\./.test(hRn);var Bxt=Lxt();function Mxt(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}a(Mxt,"newError");function XE(e,t,r){if(Fxt){return nOe(e,t,r)}if(typeof t==="function"){r=t;t=null}nOe(e,t,function(n,i){if(Mxt(n)){Bxt.realpath(e,t,r)}else{r(n,i)}})}a(XE,"realpath");function sOe(e,t){if(Fxt){return iOe(e,t)}try{return iOe(e,t)}catch(r){if(Mxt(r)){return Bxt.realpathSync(e,t)}else{throw r}}}a(sOe,"realpathSync");function gRn(){OP.realpath=XE;OP.realpathSync=sOe}a(gRn,"monkeypatch");function yRn(){OP.realpath=nOe;OP.realpathSync=iOe}a(yRn,"unmonkeypatch")});var $xt=y((d5s,Uxt)=>{Uxt.exports=function(e,t){var r=[];for(var n=0;n<e.length;n++){var i=t(e[n],n);if(_Rn(i))r.push.apply(r,i);else r.push(i)}return r};var _Rn=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"}});var oOe=y((p5s,Vxt)=>{"use strict";Vxt.exports=Gxt;function Gxt(e,t,r){if(e instanceof RegExp)e=jxt(e,r);if(t instanceof RegExp)t=jxt(t,r);var n=Hxt(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}a(Gxt,"balanced");function jxt(e,t){var r=t.match(e);return r?r[0]:null}a(jxt,"maybeMatch");Gxt.range=Hxt;function Hxt(e,t,r){var n,i,s,o,u;var l=r.indexOf(e);var c=r.indexOf(t,l+1);var d=l;if(l>=0&&c>0){if(e===t){return[l,c]}n=[];s=r.length;while(d>=0&&!u){if(d==l){n.push(d);l=r.indexOf(e,d+1)}else if(n.length==1){u=[n.pop(),c]}else{i=n.pop();if(i<s){s=i;o=c}c=r.indexOf(t,d+1)}d=l<c&&l>=0?l:c}if(n.length){u=[s,o]}}return u}a(Hxt,"range")});var Zxt=y((m5s,Qxt)=>{var vRn=$xt();var zxt=oOe();Qxt.exports=SRn;var Kxt="\0SLASH"+Math.random()+"\0";var Wxt="\0OPEN"+Math.random()+"\0";var lOe="\0CLOSE"+Math.random()+"\0";var Yxt="\0COMMA"+Math.random()+"\0";var Xxt="\0PERIOD"+Math.random()+"\0";function uOe(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}a(uOe,"numeric");function ERn(e){return e.split("\\\\").join(Kxt).split("\\{").join(Wxt).split("\\}").join(lOe).split("\\,").join(Yxt).split("\\.").join(Xxt)}a(ERn,"escapeBraces");function bRn(e){return e.split(Kxt).join("\\").split(Wxt).join("{").split(lOe).join("}").split(Yxt).join(",").split(Xxt).join(".")}a(bRn,"unescapeBraces");function Jxt(e){if(!e)return[""];var t=[];var r=zxt("{","}",e);if(!r)return e.split(",");var n=r.pre;var i=r.body;var s=r.post;var o=n.split(",");o[o.length-1]+="{"+i+"}";var u=Jxt(s);if(s.length){o[o.length-1]+=u.shift();o.push.apply(o,u)}t.push.apply(t,o);return t}a(Jxt,"parseCommaParts");function SRn(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return PP(ERn(e),true).map(bRn)}a(SRn,"expandTop");function ARn(e){return"{"+e+"}"}a(ARn,"embrace");function CRn(e){return/^-?0\d/.test(e)}a(CRn,"isPadded");function wRn(e,t){return e<=t}a(wRn,"lte");function TRn(e,t){return e>=t}a(TRn,"gte");function PP(e,t){var r=[];var n=zxt("{","}",e);if(!n||/\$$/.test(n.pre))return[e];var i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body);var s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body);var o=i||s;var u=n.body.indexOf(",")>=0;if(!o&&!u){if(n.post.match(/,.*\}/)){e=n.pre+"{"+n.body+lOe+n.post;return PP(e)}return[e]}var l;if(o){l=n.body.split(/\.\./)}else{l=Jxt(n.body);if(l.length===1){l=PP(l[0],false).map(ARn);if(l.length===1){var d=n.post.length?PP(n.post,false):[""];return d.map(function(I){return n.pre+l[0]+I})}}}var c=n.pre;var d=n.post.length?PP(n.post,false):[""];var p;if(o){var f=uOe(l[0]);var m=uOe(l[1]);var h=Math.max(l[0].length,l[1].length);var g=l.length==3?Math.abs(uOe(l[2])):1;var _=wRn;var v=m<f;if(v){g*=-1;_=TRn}var S=l.some(CRn);p=[];for(var E=f;_(E,m);E+=g){var b;if(s){b=String.fromCharCode(E);if(b==="\\")b=""}else{b=String(E);if(S){var A=h-b.length;if(A>0){var C=new Array(A+1).join("0");if(E<0)b="-"+C+b.slice(1);else b=C+b}}}p.push(b)}}else{p=vRn(l,function(R){return PP(R,false)})}for(var T=0;T<p.length;T++){for(var O=0;O<d.length;O++){var P=c+p[T]+d[O];if(!t||o||P)r.push(P)}}return r}a(PP,"expand")});var nQ=y((g5s,iRt)=>{iRt.exports=mp;mp.Minimatch=ol;var XF=function(){try{return require("path")}catch(e){}}()||{sep:"/"};mp.sep=XF.sep;var pOe=mp.GLOBSTAR=ol.GLOBSTAR={};var xRn=Zxt();var eRt={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var cOe="[^/]";var dOe=cOe+"*?";var RRn="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var ORn="(?:(?!(?:\\/|^)\\.).)*?";var tRt=PRn("().*{}+?[]^$\\!");function PRn(e){return e.split("").reduce(function(t,r){t[r]=true;return t},{})}a(PRn,"charSet");var rRt=/\/+/;mp.filter=NRn;function NRn(e,t){t=t||{};return function(r,n,i){return mp(r,e,t)}}a(NRn,"filter");function JE(e,t){t=t||{};var r={};Object.keys(e).forEach(function(n){r[n]=e[n]});Object.keys(t).forEach(function(n){r[n]=t[n]});return r}a(JE,"ext");mp.defaults=function(e){if(!e||typeof e!=="object"||!Object.keys(e).length){return mp}var t=mp;var r=a(function n(i,s,o){return t(i,s,JE(e,o))},"minimatch");r.Minimatch=a(function n(i,s){return new t.Minimatch(i,JE(e,s))},"Minimatch");r.Minimatch.defaults=a(function n(i){return t.defaults(JE(e,i)).Minimatch},"defaults");r.filter=a(function n(i,s){return t.filter(i,JE(e,s))},"filter");r.defaults=a(function n(i){return t.defaults(JE(e,i))},"defaults");r.makeRe=a(function n(i,s){return t.makeRe(i,JE(e,s))},"makeRe");r.braceExpand=a(function n(i,s){return t.braceExpand(i,JE(e,s))},"braceExpand");r.match=function(n,i,s){return t.match(n,i,JE(e,s))};return r};ol.defaults=function(e){return mp.defaults(e).Minimatch};function mp(e,t,r){rQ(t);if(!r)r={};if(!r.nocomment&&t.charAt(0)==="#"){return false}return new ol(t,r).match(e)}a(mp,"minimatch");function ol(e,t){if(!(this instanceof ol)){return new ol(e,t)}rQ(e);if(!t)t={};e=e.trim();if(!t.allowWindowsEscape&&XF.sep!=="/"){e=e.split(XF.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!t.partial;this.make()}a(ol,"Minimatch");ol.prototype.debug=function(){};ol.prototype.make=IRn;function IRn(){var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var r=this.globSet=this.braceExpand();if(t.debug)this.debug=a(function n(){console.error.apply(console,arguments)},"debug");this.debug(this.pattern,r);r=this.globParts=r.map(function(n){return n.split(rRt)});this.debug(this.pattern,r);r=r.map(function(n,i,s){return n.map(this.parse,this)},this);this.debug(this.pattern,r);r=r.filter(function(n){return n.indexOf(false)===-1});this.debug(this.pattern,r);this.set=r}a(IRn,"make");ol.prototype.parseNegate=kRn;function kRn(){var e=this.pattern;var t=false;var r=this.options;var n=0;if(r.nonegate)return;for(var i=0,s=e.length;i<s&&e.charAt(i)==="!";i++){t=!t;n++}if(n)this.pattern=e.substr(n);this.negate=t}a(kRn,"parseNegate");mp.braceExpand=function(e,t){return nRt(e,t)};ol.prototype.braceExpand=nRt;function nRt(e,t){if(!t){if(this instanceof ol){t=this.options}else{t={}}}e=typeof e==="undefined"?this.pattern:e;rQ(e);if(t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)){return[e]}return xRn(e)}a(nRt,"braceExpand");var DRn=1024*64;var rQ=a(function(e){if(typeof e!=="string"){throw new TypeError("invalid pattern")}if(e.length>DRn){throw new TypeError("pattern is too long")}},"assertValidPattern");ol.prototype.parse=LRn;var tQ={};function LRn(e,t){rQ(e);var r=this.options;if(e==="**"){if(!r.noglobstar)return pOe;else e="*"}if(e==="")return"";var n="";var i=!!r.nocase;var s=false;var o=[];var u=[];var l;var c=false;var d=-1;var p=-1;var f=e.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var m=this;function h(){if(l){switch(l){case"*":n+=dOe;i=true;break;case"?":n+=cOe;i=true;break;default:n+="\\"+l;break}m.debug("clearStateChar %j %j",l,n);l=false}}a(h,"clearStateChar");for(var g=0,_=e.length,v;g<_&&(v=e.charAt(g));g++){this.debug("%s %s %s %j",e,g,n,v);if(s&&tRt[v]){n+="\\"+v;s=false;continue}switch(v){case"/":{return false}case"\\":h();s=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s %s %s %j <-- stateChar",e,g,n,v);if(c){this.debug(" in class");if(v==="!"&&g===p+1)v="^";n+=v;continue}m.debug("call clearStateChar %j",l);h();l=v;if(r.noext)h();continue;case"(":if(c){n+="(";continue}if(!l){n+="\\(";continue}o.push({type:l,start:g-1,reStart:n.length,open:eRt[l].open,close:eRt[l].close});n+=l==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",l,n);l=false;continue;case")":if(c||!o.length){n+="\\)";continue}h();i=true;var S=o.pop();n+=S.close;if(S.type==="!"){u.push(S)}S.reEnd=n.length;continue;case"|":if(c||!o.length||s){n+="\\|";s=false;continue}h();n+="|";continue;case"[":h();if(c){n+="\\"+v;continue}c=true;p=g;d=n.length;n+=v;continue;case"]":if(g===p+1||!c){n+="\\"+v;s=false;continue}var E=e.substring(p+1,g);try{RegExp("["+E+"]")}catch(M){var b=this.parse(E,tQ);n=n.substr(0,d)+"\\["+b[0]+"\\]";i=i||b[1];c=false;continue}i=true;c=false;n+=v;continue;default:h();if(s){s=false}else if(tRt[v]&&!(v==="^"&&c)){n+="\\"}n+=v}}if(c){E=e.substr(p+1);b=this.parse(E,tQ);n=n.substr(0,d)+"\\["+b[0];i=i||b[1]}for(S=o.pop();S;S=o.pop()){var A=n.slice(S.reStart+S.open.length);this.debug("setting tail",n,S);A=A.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(M,Q,fe){if(!fe){fe="\\"}return Q+Q+fe+"|"});this.debug("tail=%j\n %s",A,A,S,n);var C=S.type==="*"?dOe:S.type==="?"?cOe:"\\"+S.type;i=true;n=n.slice(0,S.reStart)+C+"\\("+A}h();if(s){n+="\\\\"}var T=false;switch(n.charAt(0)){case"[":case".":case"(":T=true}for(var O=u.length-1;O>-1;O--){var P=u[O];var R=n.slice(0,P.reStart);var I=n.slice(P.reStart,P.reEnd-8);var D=n.slice(P.reEnd-8,P.reEnd);var U=n.slice(P.reEnd);D+=U;var te=R.split("(").length-1;var ve=U;for(g=0;g<te;g++){ve=ve.replace(/\)[+*?]?/,"")}U=ve;var me="";if(U===""&&t!==tQ){me="$"}var he=R+I+U+me+D;n=he}if(n!==""&&i){n="(?=.)"+n}if(T){n=f+n}if(t===tQ){return[n,i]}if(!i){return BRn(e)}var Fe=r.nocase?"i":"";try{var Oe=new RegExp("^"+n+"$",Fe)}catch(M){return new RegExp("$.")}Oe._glob=e;Oe._src=n;return Oe}a(LRn,"parse");mp.makeRe=function(e,t){return new ol(e,t||{}).makeRe()};ol.prototype.makeRe=FRn;function FRn(){if(this.regexp||this.regexp===false)return this.regexp;var e=this.set;if(!e.length){this.regexp=false;return this.regexp}var t=this.options;var r=t.noglobstar?dOe:t.dot?RRn:ORn;var n=t.nocase?"i":"";var i=e.map(function(s){return s.map(function(o){return o===pOe?r:typeof o==="string"?MRn(o):o._src}).join("\\/")}).join("|");i="^(?:"+i+")$";if(this.negate)i="^(?!"+i+").*$";try{this.regexp=new RegExp(i,n)}catch(s){this.regexp=false}return this.regexp}a(FRn,"makeRe");mp.match=function(e,t,r){r=r||{};var n=new ol(t,r);e=e.filter(function(i){return n.match(i)});if(n.options.nonull&&!e.length){e.push(t)}return e};ol.prototype.match=a(function e(t,r){if(typeof r==="undefined")r=this.partial;this.debug("match",t,this.pattern);if(this.comment)return false;if(this.empty)return t==="";if(t==="/"&&r)return true;var n=this.options;if(XF.sep!=="/"){t=t.split(XF.sep).join("/")}t=t.split(rRt);this.debug(this.pattern,"split",t);var i=this.set;this.debug(this.pattern,"set",i);var s;var o;for(o=t.length-1;o>=0;o--){s=t[o];if(s)break}for(o=0;o<i.length;o++){var u=i[o];var l=t;if(n.matchBase&&u.length===1){l=[s]}var c=this.matchOne(l,u,r);if(c){if(n.flipNegate)return true;return!this.negate}}if(n.flipNegate)return false;return this.negate},"match");ol.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{"this":this,file:e,pattern:t});this.debug("matchOne",e.length,t.length);for(var i=0,s=0,o=e.length,u=t.length;i<o&&s<u;i++,s++){this.debug("matchOne loop");var l=t[s];var c=e[i];this.debug(t,l,c);if(l===false)return false;if(l===pOe){this.debug("GLOBSTAR",[t,l,c]);var d=i;var p=s+1;if(p===u){this.debug("** at the end");for(;i<o;i++){if(e[i]==="."||e[i]===".."||!n.dot&&e[i].charAt(0)===".")return false}return true}while(d<o){var f=e[d];this.debug("\nglobstar while",e,d,t,p,f);if(this.matchOne(e.slice(d),t.slice(p),r)){this.debug("globstar found match!",d,o,f);return true}else{if(f==="."||f===".."||!n.dot&&f.charAt(0)==="."){this.debug("dot detected!",e,d,t,p);break}this.debug("globstar swallow a segment, and continue");d++}}if(r){this.debug("\n>>> no match, partial?",e,d,t,p);if(d===o)return true}return false}var m;if(typeof l==="string"){m=c===l;this.debug("string match",l,c,m)}else{m=c.match(l);this.debug("pattern match",l,c,m)}if(!m)return false}if(i===o&&s===u){return true}else if(i===o){return r}else if(s===u){return i===o-1&&e[i]===""}throw new Error("wtf?")};function BRn(e){return e.replace(/\\(.)/g,"$1")}a(BRn,"globUnescape");function MRn(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}a(MRn,"regExpEscape")});var sQ=y((_5s,iQ)=>{"use strict";function sRt(e){return e.charAt(0)==="/"}a(sRt,"posix");function aRt(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var r=t.exec(e);var n=r[1]||"";var i=Boolean(n&&n.charAt(1)!==":");return Boolean(r[2]||i)}a(aRt,"win32");iQ.exports=process.platform==="win32"?aRt:sRt;iQ.exports.posix=sRt;iQ.exports.win32=aRt});var mOe=y(QE=>{QE.setopts=HRn;QE.ownProp=oRt;QE.makeAbs=JF;QE.finish=VRn;QE.mark=zRn;QE.isIgnored=lRt;QE.childrenIgnored=KRn;function oRt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}a(oRt,"ownProp");var qRn=require("fs");var NP=require("path");var URn=nQ();var uRt=sQ();var fOe=URn.Minimatch;function $Rn(e,t){return e.localeCompare(t,"en")}a($Rn,"alphasort");function jRn(e,t){e.ignore=t.ignore||[];if(!Array.isArray(e.ignore))e.ignore=[e.ignore];if(e.ignore.length){e.ignore=e.ignore.map(GRn)}}a(jRn,"setupIgnores");function GRn(e){var t=null;if(e.slice(-3)==="/**"){var r=e.replace(/(\/\*\*)+$/,"");t=new fOe(r,{dot:true})}return{matcher:new fOe(e,{dot:true}),gmatcher:t}}a(GRn,"ignoreMap");function HRn(e,t,r){if(!r)r={};if(r.matchBase&&-1===t.indexOf("/")){if(r.noglobstar){throw new Error("base matching requires globstar")}t="**/"+t}e.silent=!!r.silent;e.pattern=t;e.strict=r.strict!==false;e.realpath=!!r.realpath;e.realpathCache=r.realpathCache||Object.create(null);e.follow=!!r.follow;e.dot=!!r.dot;e.mark=!!r.mark;e.nodir=!!r.nodir;if(e.nodir)e.mark=true;e.sync=!!r.sync;e.nounique=!!r.nounique;e.nonull=!!r.nonull;e.nosort=!!r.nosort;e.nocase=!!r.nocase;e.stat=!!r.stat;e.noprocess=!!r.noprocess;e.absolute=!!r.absolute;e.fs=r.fs||qRn;e.maxLength=r.maxLength||Infinity;e.cache=r.cache||Object.create(null);e.statCache=r.statCache||Object.create(null);e.symlinks=r.symlinks||Object.create(null);jRn(e,r);e.changedCwd=false;var n=process.cwd();if(!oRt(r,"cwd"))e.cwd=n;else{e.cwd=NP.resolve(r.cwd);e.changedCwd=e.cwd!==n}e.root=r.root||NP.resolve(e.cwd,"/");e.root=NP.resolve(e.root);if(process.platform==="win32")e.root=e.root.replace(/\\/g,"/");e.cwdAbs=uRt(e.cwd)?e.cwd:JF(e,e.cwd);if(process.platform==="win32")e.cwdAbs=e.cwdAbs.replace(/\\/g,"/");e.nomount=!!r.nomount;r.nonegate=true;r.nocomment=true;r.allowWindowsEscape=false;e.minimatch=new fOe(t,r);e.options=e.minimatch.options}a(HRn,"setopts");function VRn(e){var t=e.nounique;var r=t?[]:Object.create(null);for(var n=0,i=e.matches.length;n<i;n++){var s=e.matches[n];if(!s||Object.keys(s).length===0){if(e.nonull){var o=e.minimatch.globSet[n];if(t)r.push(o);else r[o]=true}}else{var u=Object.keys(s);if(t)r.push.apply(r,u);else u.forEach(function(l){r[l]=true})}}if(!t)r=Object.keys(r);if(!e.nosort)r=r.sort($Rn);if(e.mark){for(var n=0;n<r.length;n++){r[n]=e._mark(r[n])}if(e.nodir){r=r.filter(function(l){var c=!/\/$/.test(l);var d=e.cache[l]||e.cache[JF(e,l)];if(c&&d)c=d!=="DIR"&&!Array.isArray(d);return c})}}if(e.ignore.length)r=r.filter(function(l){return!lRt(e,l)});e.found=r}a(VRn,"finish");function zRn(e,t){var r=JF(e,t);var n=e.cache[r];var i=t;if(n){var s=n==="DIR"||Array.isArray(n);var o=t.slice(-1)==="/";if(s&&!o)i+="/";else if(!s&&o)i=i.slice(0,-1);if(i!==t){var u=JF(e,i);e.statCache[u]=e.statCache[r];e.cache[u]=e.cache[r]}}return i}a(zRn,"mark");function JF(e,t){var r=t;if(t.charAt(0)==="/"){r=NP.join(e.root,t)}else if(uRt(t)||t===""){r=t}else if(e.changedCwd){r=NP.resolve(e.cwd,t)}else{r=NP.resolve(t)}if(process.platform==="win32")r=r.replace(/\\/g,"/");return r}a(JF,"makeAbs");function lRt(e,t){if(!e.ignore.length)return false;return e.ignore.some(function(r){return r.matcher.match(t)||!!(r.gmatcher&&r.gmatcher.match(t))})}a(lRt,"isIgnored");function KRn(e,t){if(!e.ignore.length)return false;return e.ignore.some(function(r){return!!(r.gmatcher&&r.gmatcher.match(t))})}a(KRn,"childrenIgnored")});var mRt=y((w5s,fRt)=>{fRt.exports=pRt;pRt.GlobSync=ru;var WRn=aOe();var cRt=nQ();var S5s=cRt.Minimatch;var A5s=yOe().Glob;var C5s=require("util");var hOe=require("path");var dRt=require("assert");var aQ=sQ();var aC=mOe();var YRn=aC.setopts;var gOe=aC.ownProp;var XRn=aC.childrenIgnored;var JRn=aC.isIgnored;function pRt(e,t){if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new ru(e,t).found}a(pRt,"globSync");function ru(e,t){if(!e)throw new Error("must provide pattern");if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof ru))return new ru(e,t);YRn(this,e,t);if(this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;n<r;n++){this._process(this.minimatch.set[n],n,false)}this._finish()}a(ru,"GlobSync");ru.prototype._finish=function(){dRt.ok(this instanceof ru);if(this.realpath){var e=this;this.matches.forEach(function(t,r){var n=e.matches[r]=Object.create(null);for(var i in t){try{i=e._makeAbs(i);var s=WRn.realpathSync(i,e.realpathCache);n[s]=true}catch(o){if(o.syscall==="stat")n[e._makeAbs(i)]=true;else throw o}}})}aC.finish(this)};ru.prototype._process=function(e,t,r){dRt.ok(this instanceof ru);var n=0;while(typeof e[n]==="string"){n++}var i;switch(n){case e.length:this._processSimple(e.join("/"),t);return;case 0:i=null;break;default:i=e.slice(0,n).join("/");break}var s=e.slice(n);var o;if(i===null)o=".";else if(aQ(i)||aQ(e.map(function(c){return typeof c==="string"?c:"[*]"}).join("/"))){if(!i||!aQ(i))i="/"+i;o=i}else o=i;var u=this._makeAbs(o);if(XRn(this,o))return;var l=s[0]===cRt.GLOBSTAR;if(l)this._processGlobStar(i,o,u,s,t,r);else this._processReaddir(i,o,u,s,t,r)};ru.prototype._processReaddir=function(e,t,r,n,i,s){var o=this._readdir(r,s);if(!o)return;var u=n[0];var l=!!this.minimatch.negate;var c=u._glob;var d=this.dot||c.charAt(0)===".";var p=[];for(var f=0;f<o.length;f++){var m=o[f];if(m.charAt(0)!=="."||d){var h;if(l&&!e){h=!m.match(u)}else{h=m.match(u)}if(h)p.push(m)}}var g=p.length;if(g===0)return;if(n.length===1&&!this.mark&&!this.stat){if(!this.matches[i])this.matches[i]=Object.create(null);for(var f=0;f<g;f++){var m=p[f];if(e){if(e.slice(-1)!=="/")m=e+"/"+m;else m=e+m}if(m.charAt(0)==="/"&&!this.nomount){m=hOe.join(this.root,m)}this._emitMatch(i,m)}return}n.shift();for(var f=0;f<g;f++){var m=p[f];var _;if(e)_=[e,m];else _=[m];this._process(_.concat(n),i,s)}};ru.prototype._emitMatch=function(e,t){if(JRn(this,t))return;var r=this._makeAbs(t);if(this.mark)t=this._mark(t);if(this.absolute){t=r}if(this.matches[e][t])return;if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.matches[e][t]=true;if(this.stat)this._stat(t)};ru.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,false);var t;var r;var n;try{r=this.fs.lstatSync(e)}catch(s){if(s.code==="ENOENT"){return null}}var i=r&&r.isSymbolicLink();this.symlinks[e]=i;if(!i&&r&&!r.isDirectory())this.cache[e]="FILE";else t=this._readdir(e,false);return t};ru.prototype._readdir=function(e,t){var r;if(t&&!gOe(this.symlinks,e))return this._readdirInGlobStar(e);if(gOe(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return null;if(Array.isArray(n))return n}try{return this._readdirEntries(e,this.fs.readdirSync(e))}catch(i){this._readdirError(e,i);return null}};ru.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat){for(var r=0;r<t.length;r++){var n=t[r];if(e==="/")n=e+n;else n=e+"/"+n;this.cache[n]=true}}this.cache[e]=t;return t};ru.prototype._readdirError=function(e,t){switch(t.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(e);this.cache[r]="FILE";if(r===this.cwdAbs){var n=new Error(t.code+" invalid cwd "+this.cwd);n.path=this.cwd;n.code=t.code;throw n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=false;break;default:this.cache[this._makeAbs(e)]=false;if(this.strict)throw t;if(!this.silent)console.error("glob error",t);break}};ru.prototype._processGlobStar=function(e,t,r,n,i,s){var o=this._readdir(r,s);if(!o)return;var u=n.slice(1);var l=e?[e]:[];var c=l.concat(u);this._process(c,i,false);var d=o.length;var p=this.symlinks[r];if(p&&s)return;for(var f=0;f<d;f++){var m=o[f];if(m.charAt(0)==="."&&!this.dot)continue;var h=l.concat(o[f],u);this._process(h,i,true);var g=l.concat(o[f],n);this._process(g,i,true)}};ru.prototype._processSimple=function(e,t){var r=this._stat(e);if(!this.matches[t])this.matches[t]=Object.create(null);if(!r)return;if(e&&aQ(e)&&!this.nomount){var n=/[\/\\]$/.test(e);if(e.charAt(0)==="/"){e=hOe.join(this.root,e)}else{e=hOe.resolve(this.root,e);if(n)e+="/"}}if(process.platform==="win32")e=e.replace(/\\/g,"/");this._emitMatch(t,e)};ru.prototype._stat=function(e){var t=this._makeAbs(e);var r=e.slice(-1)==="/";if(e.length>this.maxLength)return false;if(!this.stat&&gOe(this.cache,t)){var o=this.cache[t];if(Array.isArray(o))o="DIR";if(!r||o==="DIR")return o;if(r&&o==="FILE")return false}var n;var i=this.statCache[t];if(!i){var s;try{s=this.fs.lstatSync(t)}catch(u){if(u&&(u.code==="ENOENT"||u.code==="ENOTDIR")){this.statCache[t]=false;return false}}if(s&&s.isSymbolicLink()){try{i=this.fs.statSync(t)}catch(u){i=s}}else{i=s}}this.statCache[t]=i;var o=true;if(i)o=i.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||o;if(r&&o==="FILE")return false;return o};ru.prototype._mark=function(e){return aC.mark(this,e)};ru.prototype._makeAbs=function(e){return aC.makeAbs(this,e)}});var gRt=y((x5s,hRt)=>{var QRn=X2e();var QF=Object.create(null);var ZRn=wW();hRt.exports=QRn(eOn);function eOn(e,t){if(QF[e]){QF[e].push(t);return null}else{QF[e]=[t];return tOn(e)}}a(eOn,"inflight");function tOn(e){return ZRn(a(function t(){var r=QF[e];var n=r.length;var i=rOn(arguments);try{for(var s=0;s<n;s++){r[s].apply(null,i)}}finally{if(r.length>n){r.splice(0,n);process.nextTick(function(){t.apply(null,i)})}else{delete QF[e]}}},"RES"))}a(tOn,"makeres");function rOn(e){var t=e.length;var r=[];for(var n=0;n<t;n++)r[n]=e[n];return r}a(rOn,"slice")});var yOe=y((N5s,_Rt)=>{_Rt.exports=oC;var nOn=aOe();var yRt=nQ();var O5s=yRt.Minimatch;var iOn=Xv();var sOn=require("events").EventEmitter;var _Oe=require("path");var vOe=require("assert");var ZF=sQ();var bOe=mRt();var uC=mOe();var aOn=uC.setopts;var EOe=uC.ownProp;var SOe=gRt();var P5s=require("util");var oOn=uC.childrenIgnored;var uOn=uC.isIgnored;var lOn=wW();function oC(e,t,r){if(typeof t==="function")r=t,t={};if(!t)t={};if(t.sync){if(r)throw new TypeError("callback provided to sync glob");return bOe(e,t)}return new Cs(e,t,r)}a(oC,"glob");oC.sync=bOe;var cOn=oC.GlobSync=bOe.GlobSync;oC.glob=oC;function dOn(e,t){if(t===null||typeof t!=="object"){return e}var r=Object.keys(t);var n=r.length;while(n--){e[r[n]]=t[r[n]]}return e}a(dOn,"extend");oC.hasMagic=function(e,t){var r=dOn({},t);r.noprocess=true;var n=new Cs(e,r);var i=n.minimatch.set;if(!e)return false;if(i.length>1)return true;for(var s=0;s<i[0].length;s++){if(typeof i[0][s]!=="string")return true}return false};oC.Glob=Cs;iOn(Cs,sOn);function Cs(e,t,r){if(typeof t==="function"){r=t;t=null}if(t&&t.sync){if(r)throw new TypeError("callback provided to sync glob");return new cOn(e,t)}if(!(this instanceof Cs))return new Cs(e,t,r);aOn(this,e,t);this._didRealPath=false;var n=this.minimatch.set.length;this.matches=new Array(n);if(typeof r==="function"){r=lOn(r);this.on("error",r);this.on("end",function(l){r(null,l)})}var i=this;this._processing=0;this._emitQueue=[];this._processQueue=[];this.paused=false;if(this.noprocess)return this;if(n===0)return u();var s=true;for(var o=0;o<n;o++){this._process(this.minimatch.set[o],o,false,u)}s=false;function u(){--i._processing;if(i._processing<=0){if(s){process.nextTick(function(){i._finish()})}else{i._finish()}}}a(u,"done")}a(Cs,"Glob");Cs.prototype._finish=function(){vOe(this instanceof Cs);if(this.aborted)return;if(this.realpath&&!this._didRealpath)return this._realpath();uC.finish(this);this.emit("end",this.found)};Cs.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=true;var e=this.matches.length;if(e===0)return this._finish();var t=this;for(var r=0;r<this.matches.length;r++)this._realpathSet(r,n);function n(){if(--e===0)t._finish()}a(n,"next")};Cs.prototype._realpathSet=function(e,t){var r=this.matches[e];if(!r)return t();var n=Object.keys(r);var i=this;var s=n.length;if(s===0)return t();var o=this.matches[e]=Object.create(null);n.forEach(function(u,l){u=i._makeAbs(u);nOn.realpath(u,i.realpathCache,function(c,d){if(!c)o[d]=true;else if(c.syscall==="stat")o[u]=true;else i.emit("error",c);if(--s===0){i.matches[e]=o;t()}})})};Cs.prototype._mark=function(e){return uC.mark(this,e)};Cs.prototype._makeAbs=function(e){return uC.makeAbs(this,e)};Cs.prototype.abort=function(){this.aborted=true;this.emit("abort")};Cs.prototype.pause=function(){if(!this.paused){this.paused=true;this.emit("pause")}};Cs.prototype.resume=function(){if(this.paused){this.emit("resume");this.paused=false;if(this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var r=e[t];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(var t=0;t<n.length;t++){var i=n[t];this._processing--;this._process(i[0],i[1],i[2],i[3])}}}};Cs.prototype._process=function(e,t,r,n){vOe(this instanceof Cs);vOe(typeof n==="function");if(this.aborted)return;this._processing++;if(this.paused){this._processQueue.push([e,t,r,n]);return}var i=0;while(typeof e[i]==="string"){i++}var s;switch(i){case e.length:this._processSimple(e.join("/"),t,n);return;case 0:s=null;break;default:s=e.slice(0,i).join("/");break}var o=e.slice(i);var u;if(s===null)u=".";else if(ZF(s)||ZF(e.map(function(d){return typeof d==="string"?d:"[*]"}).join("/"))){if(!s||!ZF(s))s="/"+s;u=s}else u=s;var l=this._makeAbs(u);if(oOn(this,u))return n();var c=o[0]===yRt.GLOBSTAR;if(c)this._processGlobStar(s,u,l,o,t,r,n);else this._processReaddir(s,u,l,o,t,r,n)};Cs.prototype._processReaddir=function(e,t,r,n,i,s,o){var u=this;this._readdir(r,s,function(l,c){return u._processReaddir2(e,t,r,n,i,s,c,o)})};Cs.prototype._processReaddir2=function(e,t,r,n,i,s,o,u){if(!o)return u();var l=n[0];var c=!!this.minimatch.negate;var d=l._glob;var p=this.dot||d.charAt(0)===".";var f=[];for(var m=0;m<o.length;m++){var h=o[m];if(h.charAt(0)!=="."||p){var g;if(c&&!e){g=!h.match(l)}else{g=h.match(l)}if(g)f.push(h)}}var _=f.length;if(_===0)return u();if(n.length===1&&!this.mark&&!this.stat){if(!this.matches[i])this.matches[i]=Object.create(null);for(var m=0;m<_;m++){var h=f[m];if(e){if(e!=="/")h=e+"/"+h;else h=e+h}if(h.charAt(0)==="/"&&!this.nomount){h=_Oe.join(this.root,h)}this._emitMatch(i,h)}return u()}n.shift();for(var m=0;m<_;m++){var h=f[m];var v;if(e){if(e!=="/")h=e+"/"+h;else h=e+h}this._process([h].concat(n),i,s,u)}u()};Cs.prototype._emitMatch=function(e,t){if(this.aborted)return;if(uOn(this,t))return;if(this.paused){this._emitQueue.push([e,t]);return}var r=ZF(t)?t:this._makeAbs(t);if(this.mark)t=this._mark(t);if(this.absolute)t=r;if(this.matches[e][t])return;if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.matches[e][t]=true;var i=this.statCache[r];if(i)this.emit("stat",t,i);this.emit("match",t)};Cs.prototype._readdirInGlobStar=function(e,t){if(this.aborted)return;if(this.follow)return this._readdir(e,false,t);var r="lstat\0"+e;var n=this;var i=SOe(r,s);if(i)n.fs.lstat(e,i);function s(o,u){if(o&&o.code==="ENOENT")return t();var l=u&&u.isSymbolicLink();n.symlinks[e]=l;if(!l&&u&&!u.isDirectory()){n.cache[e]="FILE";t()}else n._readdir(e,false,t)}a(s,"lstatcb_")};Cs.prototype._readdir=function(e,t,r){if(this.aborted)return;r=SOe("readdir\0"+e+"\0"+t,r);if(!r)return;if(t&&!EOe(this.symlinks,e))return this._readdirInGlobStar(e,r);if(EOe(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return r();if(Array.isArray(n))return r(null,n)}var i=this;i.fs.readdir(e,pOn(this,e,r))};function pOn(e,t,r){return function(n,i){if(n)e._readdirError(t,n,r);else e._readdirEntries(t,i,r)}}a(pOn,"readdirCb");Cs.prototype._readdirEntries=function(e,t,r){if(this.aborted)return;if(!this.mark&&!this.stat){for(var n=0;n<t.length;n++){var i=t[n];if(e==="/")i=e+i;else i=e+"/"+i;this.cache[i]=true}}this.cache[e]=t;return r(null,t)};Cs.prototype._readdirError=function(e,t,r){if(this.aborted)return;switch(t.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(e);this.cache[n]="FILE";if(n===this.cwdAbs){var i=new Error(t.code+" invalid cwd "+this.cwd);i.path=this.cwd;i.code=t.code;this.emit("error",i);this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=false;break;default:this.cache[this._makeAbs(e)]=false;if(this.strict){this.emit("error",t);this.abort()}if(!this.silent)console.error("glob error",t);break}return r()};Cs.prototype._processGlobStar=function(e,t,r,n,i,s,o){var u=this;this._readdir(r,s,function(l,c){u._processGlobStar2(e,t,r,n,i,s,c,o)})};Cs.prototype._processGlobStar2=function(e,t,r,n,i,s,o,u){if(!o)return u();var l=n.slice(1);var c=e?[e]:[];var d=c.concat(l);this._process(d,i,false,u);var p=this.symlinks[r];var f=o.length;if(p&&s)return u();for(var m=0;m<f;m++){var h=o[m];if(h.charAt(0)==="."&&!this.dot)continue;var g=c.concat(o[m],l);this._process(g,i,true,u);var _=c.concat(o[m],n);this._process(_,i,true,u)}u()};Cs.prototype._processSimple=function(e,t,r){var n=this;this._stat(e,function(i,s){n._processSimple2(e,t,i,s,r)})};Cs.prototype._processSimple2=function(e,t,r,n,i){if(!this.matches[t])this.matches[t]=Object.create(null);if(!n)return i();if(e&&ZF(e)&&!this.nomount){var s=/[\/\\]$/.test(e);if(e.charAt(0)==="/"){e=_Oe.join(this.root,e)}else{e=_Oe.resolve(this.root,e);if(s)e+="/"}}if(process.platform==="win32")e=e.replace(/\\/g,"/");this._emitMatch(t,e);i()};Cs.prototype._stat=function(e,t){var r=this._makeAbs(e);var n=e.slice(-1)==="/";if(e.length>this.maxLength)return t();if(!this.stat&&EOe(this.cache,r)){var i=this.cache[r];if(Array.isArray(i))i="DIR";if(!n||i==="DIR")return t(null,i);if(n&&i==="FILE")return t()}var s;var o=this.statCache[r];if(o!==void 0){if(o===false)return t(null,o);else{var u=o.isDirectory()?"DIR":"FILE";if(n&&u==="FILE")return t();else return t(null,u,o)}}var l=this;var c=SOe("stat\0"+r,d);if(c)l.fs.lstat(r,c);function d(p,f){if(f&&f.isSymbolicLink()){return l.fs.stat(r,function(m,h){if(m)l._stat2(e,r,null,f,t);else l._stat2(e,r,m,h,t)})}else{l._stat2(e,r,p,f,t)}}a(d,"lstatcb_")};Cs.prototype._stat2=function(e,t,r,n,i){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[t]=false;return i()}var s=e.slice(-1)==="/";this.statCache[t]=n;if(t.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,false,n);var o=true;if(n)o=n.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||o;if(s&&o==="FILE")return i();return i(null,o,n)}});var xRt=y((k5s,TRt)=>{TRt.exports=wOe;wOe.sync=wRt;var ds=require("assert");var SRt=require("path");var vRt=require("fs");var lQ=yOe();var ARt=parseInt("666",8);var fOn={nosort:true,silent:true};var AOe=0;var e7=process.platform==="win32";function CRt(e){var t=["unlink","chmod","stat","lstat","rmdir","readdir"];t.forEach(function(r){e[r]=e[r]||vRt[r];r=r+"Sync";e[r]=e[r]||vRt[r]});e.maxBusyTries=e.maxBusyTries||3;e.emfileWait=e.emfileWait||1e3;if(e.glob===false){e.disableGlob=true}e.disableGlob=e.disableGlob||false;e.glob=e.glob||fOn}a(CRt,"defaults");function wOe(e,t,r){if(typeof t==="function"){r=t;t={}}ds(e,"rimraf: missing path");ds.equal(typeof e,"string","rimraf: path should be a string");ds.equal(typeof r,"function","rimraf: callback function required");ds(t,"rimraf: invalid options argument provided");ds.equal(typeof t,"object","rimraf: options should be object");CRt(t);var n=0;var i=null;var s=0;if(t.disableGlob||!lQ.hasMagic(e))return u(null,[e]);t.lstat(e,function(l,c){if(!l)return u(null,[e]);lQ(e,t.glob,u)});function o(l){i=i||l;if(--s===0)r(i)}a(o,"next");function u(l,c){if(l)return r(l);s=c.length;if(s===0)return r();c.forEach(function(d){COe(d,t,a(function p(f){if(f){if((f.code==="EBUSY"||f.code==="ENOTEMPTY"||f.code==="EPERM")&&n<t.maxBusyTries){n++;var m=n*100;return setTimeout(function(){COe(d,t,p)},m)}if(f.code==="EMFILE"&&AOe<t.emfileWait){return setTimeout(function(){COe(d,t,p)},AOe++)}if(f.code==="ENOENT")f=null}AOe=0;o(f)},"CB"))})}a(u,"afterGlob")}a(wOe,"rimraf");function COe(e,t,r){ds(e);ds(t);ds(typeof r==="function");t.lstat(e,function(n,i){if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&e7)ERt(e,t,n,r);if(i&&i.isDirectory())return oQ(e,t,n,r);t.unlink(e,function(s){if(s){if(s.code==="ENOENT")return r(null);if(s.code==="EPERM")return e7?ERt(e,t,s,r):oQ(e,t,s,r);if(s.code==="EISDIR")return oQ(e,t,s,r)}return r(s)})})}a(COe,"rimraf_");function ERt(e,t,r,n){ds(e);ds(t);ds(typeof n==="function");if(r)ds(r instanceof Error);t.chmod(e,ARt,function(i){if(i)n(i.code==="ENOENT"?null:r);else t.stat(e,function(s,o){if(s)n(s.code==="ENOENT"?null:r);else if(o.isDirectory())oQ(e,t,r,n);else t.unlink(e,n)})})}a(ERt,"fixWinEPERM");function bRt(e,t,r){ds(e);ds(t);if(r)ds(r instanceof Error);try{t.chmodSync(e,ARt)}catch(i){if(i.code==="ENOENT")return;else throw r}try{var n=t.statSync(e)}catch(i){if(i.code==="ENOENT")return;else throw r}if(n.isDirectory())uQ(e,t,r);else t.unlinkSync(e)}a(bRt,"fixWinEPERMSync");function oQ(e,t,r,n){ds(e);ds(t);if(r)ds(r instanceof Error);ds(typeof n==="function");t.rmdir(e,function(i){if(i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM"))mOn(e,t,n);else if(i&&i.code==="ENOTDIR")n(r);else n(i)})}a(oQ,"rmdir");function mOn(e,t,r){ds(e);ds(t);ds(typeof r==="function");t.readdir(e,function(n,i){if(n)return r(n);var s=i.length;if(s===0)return t.rmdir(e,r);var o;i.forEach(function(u){wOe(SRt.join(e,u),t,function(l){if(o)return;if(l)return r(o=l);if(--s===0)t.rmdir(e,r)})})})}a(mOn,"rmkids");function wRt(e,t){t=t||{};CRt(t);ds(e,"rimraf: missing path");ds.equal(typeof e,"string","rimraf: path should be a string");ds(t,"rimraf: missing options");ds.equal(typeof t,"object","rimraf: options should be object");var r;if(t.disableGlob||!lQ.hasMagic(e)){r=[e]}else{try{t.lstatSync(e);r=[e]}catch(s){r=lQ.sync(e,t.glob)}}if(!r.length)return;for(var n=0;n<r.length;n++){var e=r[n];try{var i=t.lstatSync(e)}catch(o){if(o.code==="ENOENT")return;if(o.code==="EPERM"&&e7)bRt(e,t,o)}try{if(i&&i.isDirectory())uQ(e,t,null);else t.unlinkSync(e)}catch(o){if(o.code==="ENOENT")return;if(o.code==="EPERM")return e7?bRt(e,t,o):uQ(e,t,o);if(o.code!=="EISDIR")throw o;uQ(e,t,o)}}}a(wRt,"rimrafSync");function uQ(e,t,r){ds(e);ds(t);if(r)ds(r instanceof Error);try{t.rmdirSync(e)}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")hOn(e,t)}}a(uQ,"rmdirSync");function hOn(e,t){ds(e);ds(t);t.readdirSync(e).forEach(function(o){wRt(SRt.join(e,o),t)});var r=e7?100:1;var n=0;do{var i=true;try{var s=t.rmdirSync(e,t);i=false;return s}finally{if(++n<r&&i)continue}}while(true)}a(hOn,"rmkidsSync")});var NRt=y((L5s,PRt)=>{var t7=require("path");var RRt=require("fs");var ORt=parseInt("0777",8);PRt.exports=IP.mkdirp=IP.mkdirP=IP;function IP(e,t,r,n){if(typeof t==="function"){r=t;t={}}else if(!t||typeof t!=="object"){t={mode:t}}var i=t.mode;var s=t.fs||RRt;if(i===void 0){i=ORt}if(!n)n=null;var o=r||function(){};e=t7.resolve(e);s.mkdir(e,i,function(u){if(!u){n=n||e;return o(null,n)}switch(u.code){case"ENOENT":if(t7.dirname(e)===e)return o(u);IP(t7.dirname(e),t,function(l,c){if(l)o(l,c);else IP(e,t,o,c)});break;default:s.stat(e,function(l,c){if(l||!c.isDirectory())o(u,n);else o(null,n)});break}})}a(IP,"mkdirP");IP.sync=a(function e(t,r,n){if(!r||typeof r!=="object"){r={mode:r}}var i=r.mode;var s=r.fs||RRt;if(i===void 0){i=ORt}if(!n)n=null;t=t7.resolve(t);try{s.mkdirSync(t,i);n=n||t}catch(u){switch(u.code){case"ENOENT":n=e(t7.dirname(t),r,n);e(t,r,n);break;default:var o;try{o=s.statSync(t)}catch(l){throw u}if(!o.isDirectory())throw u;break}}return n},"sync")});var $Rt=y((yh,URt)=>{var TOe=require("fs");var kRt=require("path");var cQ=require("constants");var gOn=require("os");var xOe=xRt();var DRt=NRt();var B5s=require("os").tmpdir();var LRt=xOe.sync;var FRt=kRt.resolve(gOn.tmpdir());var ROe=cQ.O_CREAT|cQ.O_TRUNC|cQ.O_RDWR|cQ.O_EXCL;var r7=a(function(e){if(typeof e==="function"){return[void 0,e]}var t;var r=new Promise(function(n,i){t=a(function(){var s=Array.from(arguments);var o=s.shift();process.nextTick(function(){if(o){i(o)}else if(s.length===1){n(s[0])}else{n(s)}})},"promiseCallback")});return[r,t]},"promisify");var kP=a(function(e,t){var r=yOn(e,t);var n=new Date;var i=[r.prefix,n.getFullYear(),n.getMonth(),n.getDate(),"-",process.pid,"-",(Math.random()*4294967296+1).toString(36),r.suffix].join("");return kRt.join(r.dir||FRt,i)},"generateName");var yOn=a(function(e,t){var r={prefix:null,suffix:null};if(e){switch(typeof e){case"string":r.prefix=e;break;case"object":r=e;break;default:throw new Error("Unknown affix declaration: "+r)}}else{r.prefix=t}return r},"parseAffixes");var ag=false;var _On=a(function(e){ag=e!==false;return URt.exports},"track");var IRt=false;var dQ=[];var pQ=[];function OOe(e){if(!ag)return false;MRt();dQ.push(e)}a(OOe,"deleteFileOnExit");function BRt(e){if(!ag)return false;MRt();pQ.push(e)}a(BRt,"deleteDirOnExit");function MRt(){if(!ag)return false;if(!IRt){process.addListener("exit",function(){try{qRt()}catch(e){console.warn("Fail to clean temporary files on exit : ",e);throw e}});IRt=true}}a(MRt,"attachExitListener");function vOn(){if(!ag){return false}var e=0;var t;while((t=dQ.shift())!==void 0){LRt(t,{maxBusyTries:6});e++}return e}a(vOn,"cleanupFilesSync");function EOn(e){var t=r7(e);var r=t[0];e=t[1];if(!ag){e(new Error("not tracking"));return r}var n=0;var i=dQ.length;if(!i){e(null,n);return r}var s;var o=a(function(u){if(!i){return}if(u){e(u);i=0;return}else{n++}i--;if(!i){e(null,n)}},"rimrafCallback");while((s=dQ.shift())!==void 0){xOe(s,{maxBusyTries:6},o)}return r}a(EOn,"cleanupFiles");function bOn(){if(!ag){return false}var e=0;var t;while((t=pQ.shift())!==void 0){LRt(t,{maxBusyTries:6});e++}return e}a(bOn,"cleanupDirsSync");function SOn(e){var t=r7(e);var r=t[0];e=t[1];if(!ag){e(new Error("not tracking"));return r}var n=0;var i=pQ.length;if(!i){e(null,n);return r}var s;var o=a(function(u){if(!i){return}if(u){e(u,n);i=0;return}else{n++}i--;if(!i){e(null,n)}},"rimrafCallback");while((s=pQ.shift())!==void 0){xOe(s,{maxBusyTries:6},o)}return r}a(SOn,"cleanupDirs");function qRt(){if(!ag){return false}var e=vOn();var t=bOn();return{files:e,dirs:t}}a(qRt,"cleanupSync");function AOn(e){var t=r7(e);var r=t[0];e=t[1];if(!ag){e(new Error("not tracking"));return r}EOn(function(n,i){if(n){e(n,{files:i})}else{SOn(function(s,o){e(s,{files:i,dirs:o})})}});return r}a(AOn,"cleanup");var COn=a((e,t)=>{const r=r7(t);const n=r[0];t=r[1];let i=kP(e,"d-");DRt(i,448,s=>{if(!s){BRt(i)}t(s,i)});return n},"mkdir");var wOn=a(e=>{let t=kP(e,"d-");DRt.sync(t,448);BRt(t);return t},"mkdirSync");var TOn=a((e,t)=>{const r=r7(t);const n=r[0];t=r[1];const i=kP(e,"f-");TOe.open(i,ROe,384,(s,o)=>{if(!s){OOe(i)}t(s,{path:i,fd:o})});return n},"open");var xOn=a(e=>{const t=kP(e,"f-");let r=TOe.openSync(t,ROe,384);OOe(t);return{path:t,fd:r}},"openSync");var ROn=a(e=>{const t=kP(e,"s-");let r=TOe.createWriteStream(t,{flags:ROe,mode:384});OOe(t);return r},"createWriteStream");yh.dir=FRt;yh.track=_On;yh.mkdir=COn;yh.mkdirSync=wOn;yh.open=TOn;yh.openSync=xOn;yh.path=kP;yh.cleanup=AOn;yh.cleanupSync=qRt;yh.createWriteStream=ROn});var VRt=y(DP=>{"use strict";var HRt=DP&&DP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(DP,"__esModule",{value:true});DP.generateBuildData=void 0;var fQ=hn();var jRt=require("fs/promises");var GRt=HRt(require("path"));var OOn=Fn();var POn=HRt(xs());var NOn=a(async function({systemDirectory:e,buildId:t,logger:r,config:n,publicZuploEnvironmentVariables:i}){return POn.default.timeFn("Generating build data",async()=>{r.debug(`Generating build data`);const s=await(0,jRt.readFile)(GRt.default.resolve(__dirname,"../../../package.json"),"utf-8");const o=JSON.parse(s);const u={BUILD_ID:t??"",GIT_SHA:process.env.GIT_SHA,TIMESTAMP:new Date().toISOString(),IS_PRODUCTION:fQ.env.isProduction(),BUILD_ENV:fQ.env.NODE_ENV,ZUPLO_VERSION:o.version,API_VERSION:process.env.API_VERSION,COMPATIBILITY_DATE:n?.compatibilityDate,ACCOUNT_NAME:i?.ZUPLO_ACCOUNT_NAME,PROJECT_NAME:i?.ZUPLO_PROJECT_NAME,ENVIRONMENT_TYPE:i?.ZUPLO_ENVIRONMENT_TYPE,COMPATIBILITY_FLAGS:fQ.COMPATIBILITY_FLAG_MAPPINGS?fQ.COMPATIBILITY_FLAG_MAPPINGS[n?.compatibilityDate??"none"]:{runOutboundPoliciesOnHandlerOnAllStatuses:false}};const l=JSON.stringify(u,void 0,2);const c=GRt.default.join(e,OOn.GENERATED_BUILD_JSON_FILE);try{await(0,jRt.writeFile)(c,l.trimStart(),"utf-8")}catch(d){r.error(d);const p={message:`Error creating file at ${c}`,pluginName:"buildData",severity:"error"};return{warnings:[],errors:[p]}}return{warnings:[],errors:[]}})},"generateBuildData");DP.generateBuildData=NOn});var zRt=y(LP=>{"use strict";var NOe=LP&&LP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(LP,"__esModule",{value:true});LP.generateWorker=void 0;var IOn=NOe(require("fs/promises"));var kOn=NOe(require("path"));var POe=Fn();var DOn=NOe(xs());var LOn=a(async function({systemDirectory:e,logger:t}){return DOn.default.timeFn("Generating Worker shim",async()=>{t.debug("Generating Worker shim");const r=`import { Handler, ServiceProviderImpl } from "@zuplo/runtime";
410
+ `+await e.crypto.sha256DigestHex(m);const _=await pSn(e.crypto,e.securityCredentials.secretAccessKey,o,e.region,n);const v=await vF(e.crypto,_,g);const S=`${OCt} Credential=${e.securityCredentials.accessKeyId}/${h}, SignedHeaders=${p}, Signature=${(0,PCt.fromArrayBufferToHex)(v)}`;return{amzDate:u.date?void 0:s,authorizationHeader:S,canonicalQuerystring:e.canonicalQuerystring}}a(fSn,"generateAuthenticationHeaderMap")});var ZTe=y(JX=>{"use strict";Object.defineProperty(JX,"__esModule",{value:true});JX.AwsClient=void 0;var mSn=NCt();var hSn=ME();var EF=class extends hSn.BaseExternalAccountClient{static{a(this,"AwsClient")}constructor(t,r){super(t,r);this.environmentId=t.credential_source.environment_id;this.regionUrl=t.credential_source.region_url;this.securityCredentialsUrl=t.credential_source.url;this.regionalCredVerificationUrl=t.credential_source.regional_cred_verification_url;this.imdsV2SessionTokenUrl=t.credential_source.imdsv2_session_token_url;this.awsRequestSigner=null;this.region="";this.validateEnvironmentId()}validateEnvironmentId(){var t;const r=(t=this.environmentId)===null||t===void 0?void 0:t.match(/^(aws)(\d+)$/);if(!r||!this.regionalCredVerificationUrl){throw new Error('No valid AWS "credential_source" provided')}else if(parseInt(r[2],10)!==1){throw new Error(`aws version "${r[2]}" is not supported in the current build.`)}}async retrieveSubjectToken(){if(!this.awsRequestSigner){const i={};if(this.shouldUseMetadataServer()&&this.imdsV2SessionTokenUrl){i["x-aws-ec2-metadata-token"]=await this.getImdsV2SessionToken()}this.region=await this.getAwsRegion(i);this.awsRequestSigner=new mSn.AwsRequestSigner(async()=>{if(this.securityCredentialsFromEnv){return this.securityCredentialsFromEnv}const s=await this.getAwsRoleName(i);const o=await this.getAwsSecurityCredentials(s,i);return{accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,token:o.Token}},this.region)}const t=await this.awsRequestSigner.getRequestOptions({url:this.regionalCredVerificationUrl.replace("{region}",this.region),method:"POST"});const r=[];const n=Object.assign({"x-goog-cloud-target-resource":this.audience},t.headers);for(const i in n){r.push({key:i,value:n[i]})}return encodeURIComponent(JSON.stringify({url:t.url,method:t.method,headers:r}))}async getImdsV2SessionToken(){const t={url:this.imdsV2SessionTokenUrl,method:"PUT",responseType:"text",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"300"}};const r=await this.transporter.request(t);return r.data}async getAwsRegion(t){if(this.regionFromEnv){return this.regionFromEnv}if(!this.regionUrl){throw new Error('Unable to determine AWS region due to missing "options.credential_source.region_url"')}const r={url:this.regionUrl,method:"GET",responseType:"text",headers:t};const n=await this.transporter.request(r);return n.data.substr(0,n.data.length-1)}async getAwsRoleName(t){if(!this.securityCredentialsUrl){throw new Error('Unable to determine AWS role name due to missing "options.credential_source.url"')}const r={url:this.securityCredentialsUrl,method:"GET",responseType:"text",headers:t};const n=await this.transporter.request(r);return n.data}async getAwsSecurityCredentials(t,r){const n=await this.transporter.request({url:`${this.securityCredentialsUrl}/${t}`,responseType:"json",headers:r});return n.data}shouldUseMetadataServer(){return!this.regionFromEnv||!this.securityCredentialsFromEnv}get regionFromEnv(){return process.env["AWS_REGION"]||process.env["AWS_DEFAULT_REGION"]||null}get securityCredentialsFromEnv(){if(process.env["AWS_ACCESS_KEY_ID"]&&process.env["AWS_SECRET_ACCESS_KEY"]){return{accessKeyId:process.env["AWS_ACCESS_KEY_ID"],secretAccessKey:process.env["AWS_SECRET_ACCESS_KEY"],token:process.env["AWS_SESSION_TOKEN"]}}return null}};JX.AwsClient=EF;EF.AWS_EC2_METADATA_IPV4_ADDRESS="169.254.169.254";EF.AWS_EC2_METADATA_IPV6_ADDRESS="fd00:ec2::254"});var ixe=y(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:true});Do.InvalidSubjectTokenError=Do.InvalidMessageFieldError=Do.InvalidCodeFieldError=Do.InvalidTokenTypeFieldError=Do.InvalidExpirationTimeFieldError=Do.InvalidSuccessFieldError=Do.InvalidVersionFieldError=Do.ExecutableResponseError=Do.ExecutableResponse=void 0;var QX="urn:ietf:params:oauth:token-type:saml2";var exe="urn:ietf:params:oauth:token-type:id_token";var txe="urn:ietf:params:oauth:token-type:jwt";var rxe=class{static{a(this,"ExecutableResponse")}constructor(t){if(!t.version){throw new ZX("Executable response must contain a 'version' field.")}if(t.success===void 0){throw new eJ("Executable response must contain a 'success' field.")}this.version=t.version;this.success=t.success;if(this.success){this.expirationTime=t.expiration_time;this.tokenType=t.token_type;if(this.tokenType!==QX&&this.tokenType!==exe&&this.tokenType!==txe){throw new tJ(`Executable response must contain a 'token_type' field when successful and it must be one of ${exe}, ${txe}, or ${QX}.`)}if(this.tokenType===QX){if(!t.saml_response){throw new bF(`Executable response must contain a 'saml_response' field when token_type=${QX}.`)}this.subjectToken=t.saml_response}else{if(!t.id_token){throw new bF(`Executable response must contain a 'id_token' field when token_type=${exe} or ${txe}.`)}this.subjectToken=t.id_token}}else{if(!t.code){throw new rJ("Executable response must contain a 'code' field when unsuccessful.")}if(!t.message){throw new nJ("Executable response must contain a 'message' field when unsuccessful.")}this.errorCode=t.code;this.errorMessage=t.message}}isValid(){return!this.isExpired()&&this.success}isExpired(){return this.expirationTime!==void 0&&this.expirationTime<Math.round(Date.now()/1e3)}};Do.ExecutableResponse=rxe;var tg=class extends Error{static{a(this,"ExecutableResponseError")}constructor(t){super(t);Object.setPrototypeOf(this,new.target.prototype)}};Do.ExecutableResponseError=tg;var ZX=class extends tg{static{a(this,"InvalidVersionFieldError")}};Do.InvalidVersionFieldError=ZX;var eJ=class extends tg{static{a(this,"InvalidSuccessFieldError")}};Do.InvalidSuccessFieldError=eJ;var nxe=class extends tg{static{a(this,"InvalidExpirationTimeFieldError")}};Do.InvalidExpirationTimeFieldError=nxe;var tJ=class extends tg{static{a(this,"InvalidTokenTypeFieldError")}};Do.InvalidTokenTypeFieldError=tJ;var rJ=class extends tg{static{a(this,"InvalidCodeFieldError")}};Do.InvalidCodeFieldError=rJ;var nJ=class extends tg{static{a(this,"InvalidMessageFieldError")}};Do.InvalidMessageFieldError=nJ;var bF=class extends tg{static{a(this,"InvalidSubjectTokenError")}};Do.InvalidSubjectTokenError=bF});var ICt=y(iJ=>{"use strict";Object.defineProperty(iJ,"__esModule",{value:true});iJ.PluggableAuthHandler=void 0;var gSn=sJ();var JA=ixe();var ySn=require("child_process");var sxe=require("fs");var axe=class e{static{a(this,"PluggableAuthHandler")}constructor(t){if(!t.command){throw new Error("No command provided.")}this.commandComponents=e.parseCommand(t.command);this.timeoutMillis=t.timeoutMillis;if(!this.timeoutMillis){throw new Error("No timeoutMillis provided.")}this.outputFile=t.outputFile}retrieveResponseFromExecutable(t){return new Promise((r,n)=>{const i=ySn.spawn(this.commandComponents[0],this.commandComponents.slice(1),{env:{...process.env,...Object.fromEntries(t)}});let s="";i.stdout.on("data",u=>{s+=u});i.stderr.on("data",u=>{s+=u});const o=setTimeout(()=>{i.removeAllListeners();i.kill();return n(new Error("The executable failed to finish within the timeout specified."))},this.timeoutMillis);i.on("close",u=>{clearTimeout(o);if(u===0){try{const l=JSON.parse(s);const c=new JA.ExecutableResponse(l);return r(c)}catch(l){if(l instanceof JA.ExecutableResponseError){return n(l)}return n(new JA.ExecutableResponseError(`The executable returned an invalid response: ${s}`))}}else{return n(new gSn.ExecutableError(s,u.toString()))}})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0){return void 0}let t;try{t=await sxe.promises.realpath(this.outputFile)}catch(n){return void 0}if(!(await sxe.promises.lstat(t)).isFile()){return void 0}const r=await sxe.promises.readFile(t,{encoding:"utf8"});if(r===""){return void 0}try{const n=JSON.parse(r);const i=new JA.ExecutableResponse(n);if(i.isValid()){return new JA.ExecutableResponse(n)}return void 0}catch(n){if(n instanceof JA.ExecutableResponseError){throw n}throw new JA.ExecutableResponseError(`The output file contained an invalid response: ${r}`)}}static parseCommand(t){const r=t.match(/(?:[^\s"]+|"[^"]*")+/g);if(!r){throw new Error(`Provided command: "${t}" could not be parsed.`)}for(let n=0;n<r.length;n++){if(r[n][0]==='"'&&r[n].slice(-1)==='"'){r[n]=r[n].slice(1,-1)}}return r}};iJ.PluggableAuthHandler=axe});var sJ=y(zO=>{"use strict";Object.defineProperty(zO,"__esModule",{value:true});zO.PluggableAuthClient=zO.ExecutableError=void 0;var _Sn=ME();var vSn=ixe();var ESn=ICt();var aJ=class extends Error{static{a(this,"ExecutableError")}constructor(t,r){super(`The executable failed with exit code: ${r} and error message: ${t}.`);this.code=r;Object.setPrototypeOf(this,new.target.prototype)}};zO.ExecutableError=aJ;var bSn=30*1e3;var kCt=5*1e3;var DCt=120*1e3;var SSn="GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES";var LCt=1;var oxe=class extends _Sn.BaseExternalAccountClient{static{a(this,"PluggableAuthClient")}constructor(t,r){super(t,r);if(!t.credential_source.executable){throw new Error('No valid Pluggable Auth "credential_source" provided.')}this.command=t.credential_source.executable.command;if(!this.command){throw new Error('No valid Pluggable Auth "credential_source" provided.')}if(t.credential_source.executable.timeout_millis===void 0){this.timeoutMillis=bSn}else{this.timeoutMillis=t.credential_source.executable.timeout_millis;if(this.timeoutMillis<kCt||this.timeoutMillis>DCt){throw new Error(`Timeout must be between ${kCt} and ${DCt} milliseconds.`)}}this.outputFile=t.credential_source.executable.output_file;this.handler=new ESn.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile})}async retrieveSubjectToken(){if(process.env[SSn]!=="1"){throw new Error("Pluggable Auth executables need to be explicitly allowed to run by setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment Variable to 1.")}let t=void 0;if(this.outputFile){t=await this.handler.retrieveCachedResponse()}if(!t){const r=new Map;r.set("GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE",this.audience);r.set("GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE",this.subjectTokenType);r.set("GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE","0");if(this.outputFile){r.set("GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE",this.outputFile)}const n=this.getServiceAccountEmail();if(n){r.set("GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL",n)}t=await this.handler.retrieveResponseFromExecutable(r)}if(t.version>LCt){throw new Error(`Version of executable is not currently supported, maximum supported version is ${LCt}.`)}if(!t.success){throw new aJ(t.errorMessage,t.errorCode)}if(this.outputFile){if(!t.expirationTime){throw new vSn.InvalidExpirationTimeFieldError("The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.")}}if(t.isExpired()){throw new Error("Executable response is expired.")}return t.subjectToken}};zO.PluggableAuthClient=oxe});var lxe=y(oJ=>{"use strict";Object.defineProperty(oJ,"__esModule",{value:true});oJ.ExternalAccountClient=void 0;var ASn=ME();var CSn=JTe();var wSn=ZTe();var TSn=sJ();var uxe=class{static{a(this,"ExternalAccountClient")}constructor(){throw new Error("ExternalAccountClients should be initialized via: ExternalAccountClient.fromJSON(), directly via explicit constructors, eg. new AwsClient(options), new IdentityPoolClient(options), newPluggableAuthClientOptions, or via new GoogleAuth(options).getClient()")}static fromJSON(t,r){var n,i;if(t&&t.type===ASn.EXTERNAL_ACCOUNT_TYPE){if((n=t.credential_source)===null||n===void 0?void 0:n.environment_id){return new wSn.AwsClient(t,r)}else if((i=t.credential_source)===null||i===void 0?void 0:i.executable){return new TSn.PluggableAuthClient(t,r)}else{return new CSn.IdentityPoolClient(t,r)}}else{return null}}};oJ.ExternalAccountClient=uxe});var BCt=y(KO=>{"use strict";Object.defineProperty(KO,"__esModule",{value:true});KO.ExternalAccountAuthorizedUserClient=KO.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var xSn=TO();var FCt=UTe();var RSn=Ey();var OSn=require("stream");var PSn=ME();KO.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE="external_account_authorized_user";var cxe=class extends FCt.OAuthClientAuthHandler{static{a(this,"ExternalAccountAuthorizedUserHandler")}constructor(t,r,n){super(n);this.url=t;this.transporter=r}async refreshToken(t,r){const n=new URLSearchParams({grant_type:"refresh_token",refresh_token:t});const i={"Content-Type":"application/x-www-form-urlencoded",...r};const s={url:this.url,method:"POST",headers:i,data:n.toString(),responseType:"json"};this.applyClientAuthenticationOptions(s);try{const o=await this.transporter.request(s);const u=o.data;u.res=o;return u}catch(o){if(o instanceof RSn.GaxiosError&&o.response){throw(0,FCt.getErrorFromOAuthErrorResponse)(o.response.data,o)}throw o}}};var dxe=class extends xSn.AuthClient{static{a(this,"ExternalAccountAuthorizedUserClient")}constructor(t,r){super();this.refreshToken=t.refresh_token;const n={confidentialClientType:"basic",clientId:t.client_id,clientSecret:t.client_secret};this.externalAccountAuthorizedUserHandler=new cxe(t.token_url,this.transporter,n);this.cachedAccessToken=null;this.quotaProjectId=t.quota_project_id;if(typeof(r===null||r===void 0?void 0:r.eagerRefreshThresholdMillis)!=="number"){this.eagerRefreshThresholdMillis=PSn.EXPIRATION_TIME_OFFSET}else{this.eagerRefreshThresholdMillis=r.eagerRefreshThresholdMillis}this.forceRefreshOnFailure=!!(r===null||r===void 0?void 0:r.forceRefreshOnFailure)}async getAccessToken(){if(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken)){await this.refreshAccessTokenAsync()}return{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){const t=await this.getAccessToken();const r={Authorization:`Bearer ${t.token}`};return this.addSharedMetadataHeaders(r)}request(t,r){if(r){this.requestAsync(t).then(n=>r(null,n),n=>{return r(n,n.response)})}else{return this.requestAsync(t)}}async requestAsync(t,r=false){let n;try{const i=await this.getRequestHeaders();t.headers=t.headers||{};if(i&&i["x-goog-user-project"]){t.headers["x-goog-user-project"]=i["x-goog-user-project"]}if(i&&i.Authorization){t.headers.Authorization=i.Authorization}n=await this.transporter.request(t)}catch(i){const s=i.response;if(s){const o=s.status;const u=s.config.data instanceof OSn.Readable;const l=o===401||o===403;if(!r&&l&&!u&&this.forceRefreshOnFailure){await this.refreshAccessTokenAsync();return await this.requestAsync(t,true)}}throw i}return n}async refreshAccessTokenAsync(){const t=await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken);this.cachedAccessToken={access_token:t.access_token,expiry_date:new Date().getTime()+t.expires_in*1e3,res:t.res};if(t.refresh_token!==void 0){this.refreshToken=t.refresh_token}return this.cachedAccessToken}isExpired(t){const r=new Date().getTime();return t.expiry_date?r>=t.expiry_date-this.eagerRefreshThresholdMillis:false}};KO.ExternalAccountAuthorizedUserClient=dxe});var UCt=y(YO=>{"use strict";Object.defineProperty(YO,"__esModule",{value:true});YO.GoogleAuth=YO.CLOUD_SDK_CLIENT_ID=void 0;var NSn=require("child_process");var SF=require("fs");var pxe=eX();var ISn=require("os");var fxe=require("path");var kSn=CO();var DSn=rF();var LSn=Swe();var FSn=Cwe();var BSn=wwe();var WO=DTe();var mxe=FTe();var uJ=MTe();var MSn=lxe();var AF=ME();var MCt=BCt();YO.CLOUD_SDK_CLIENT_ID="764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com";var qCt={NO_PROJECT_ID_FOUND:"Unable to detect a Project Id in the current environment. \nTo learn more about authentication and Google APIs, visit: \nhttps://cloud.google.com/docs/authentication/getting-started"};var lJ=class{static{a(this,"GoogleAuth")}get isGCE(){return this.checkIsGCE}constructor(t){this.checkIsGCE=void 0;this.jsonContent=null;this.cachedCredential=null;t=t||{};this._cachedProjectId=t.projectId||null;this.cachedCredential=t.authClient||null;this.keyFilename=t.keyFilename||t.keyFile;this.scopes=t.scopes;this.jsonContent=t.credentials||null;this.clientOptions=t.clientOptions}setGapicJWTValues(t){t.defaultServicePath=this.defaultServicePath;t.useJWTAccessWithScope=this.useJWTAccessWithScope;t.defaultScopes=this.defaultScopes}getProjectId(t){if(t){this.getProjectIdAsync().then(r=>t(null,r),t)}else{return this.getProjectIdAsync()}}async getProjectIdOptional(){try{return await this.getProjectId()}catch(t){if(t instanceof Error&&t.message===qCt.NO_PROJECT_ID_FOUND){return null}else{throw t}}}async findAndCacheProjectId(){let t=null;t||(t=await this.getProductionProjectId());t||(t=await this.getFileProjectId());t||(t=await this.getDefaultServiceProjectId());t||(t=await this.getGCEProjectId());t||(t=await this.getExternalAccountClientProjectId());if(t){this._cachedProjectId=t;return t}else{throw new Error(qCt.NO_PROJECT_ID_FOUND)}}async getProjectIdAsync(){if(this._cachedProjectId){return this._cachedProjectId}if(!this._findProjectIdPromise){this._findProjectIdPromise=this.findAndCacheProjectId()}return this._findProjectIdPromise}getAnyScopes(){return this.scopes||this.defaultScopes}getApplicationDefault(t={},r){let n;if(typeof t==="function"){r=t}else{n=t}if(r){this.getApplicationDefaultAsync(n).then(i=>r(null,i.credential,i.projectId),r)}else{return this.getApplicationDefaultAsync(n)}}async getApplicationDefaultAsync(t={}){if(this.cachedCredential){return await this.prepareAndCacheADC(this.cachedCredential)}const r=process.env["GOOGLE_CLOUD_QUOTA_PROJECT"];let n;n=await this._tryGetApplicationCredentialsFromEnvironmentVariable(t);if(n){if(n instanceof WO.JWT){n.scopes=this.scopes}else if(n instanceof AF.BaseExternalAccountClient){n.scopes=this.getAnyScopes()}return await this.prepareAndCacheADC(n,r)}n=await this._tryGetApplicationCredentialsFromWellKnownFile(t);if(n){if(n instanceof WO.JWT){n.scopes=this.scopes}else if(n instanceof AF.BaseExternalAccountClient){n.scopes=this.getAnyScopes()}return await this.prepareAndCacheADC(n,r)}let i;try{i=await this._checkIsGCE()}catch(s){if(s instanceof Error){s.message=`Unexpected error determining execution environment: ${s.message}`}throw s}if(!i){throw new Error("Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.")}t.scopes=this.getAnyScopes();return await this.prepareAndCacheADC(new LSn.Compute(t),r)}async prepareAndCacheADC(t,r){const n=await this.getProjectIdOptional();if(r){t.quotaProjectId=r}this.cachedCredential=t;return{credential:t,projectId:n}}async _checkIsGCE(){if(this.checkIsGCE===void 0){this.checkIsGCE=await pxe.isAvailable()}return this.checkIsGCE}async _tryGetApplicationCredentialsFromEnvironmentVariable(t){const r=process.env["GOOGLE_APPLICATION_CREDENTIALS"]||process.env["google_application_credentials"];if(!r||r.length===0){return null}try{return this._getApplicationCredentialsFromFilePath(r,t)}catch(n){if(n instanceof Error){n.message=`Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${n.message}`}throw n}}async _tryGetApplicationCredentialsFromWellKnownFile(t){let r=null;if(this._isWindows()){r=process.env["APPDATA"]}else{const i=process.env["HOME"];if(i){r=fxe.join(i,".config")}}if(r){r=fxe.join(r,"gcloud","application_default_credentials.json");if(!SF.existsSync(r)){r=null}}if(!r){return null}const n=await this._getApplicationCredentialsFromFilePath(r,t);return n}async _getApplicationCredentialsFromFilePath(t,r={}){if(!t||t.length===0){throw new Error("The file path is invalid.")}try{t=SF.realpathSync(t);if(!SF.lstatSync(t).isFile()){throw new Error}}catch(i){if(i instanceof Error){i.message=`The file at ${t} does not exist, or it is not a file. ${i.message}`}throw i}const n=SF.createReadStream(t);return this.fromStream(n,r)}fromImpersonatedJSON(t){var r,n,i,s;if(!t){throw new Error("Must pass in a JSON object containing an impersonated refresh token")}if(t.type!==uJ.IMPERSONATED_ACCOUNT_TYPE){throw new Error(`The incoming JSON object does not have the "${uJ.IMPERSONATED_ACCOUNT_TYPE}" type`)}if(!t.source_credentials){throw new Error("The incoming JSON object does not contain a source_credentials field")}if(!t.service_account_impersonation_url){throw new Error("The incoming JSON object does not contain a service_account_impersonation_url field")}const o=new mxe.UserRefreshClient(t.source_credentials.client_id,t.source_credentials.client_secret,t.source_credentials.refresh_token);const u=(n=(r=/(?<target>[^/]+):generateAccessToken$/.exec(t.service_account_impersonation_url))===null||r===void 0?void 0:r.groups)===null||n===void 0?void 0:n.target;if(!u){throw new RangeError(`Cannot extract target principal from ${t.service_account_impersonation_url}`)}const l=(i=this.getAnyScopes())!==null&&i!==void 0?i:[];const c=new uJ.Impersonated({delegates:(s=t.delegates)!==null&&s!==void 0?s:[],sourceClient:o,targetPrincipal:u,targetScopes:Array.isArray(l)?l:[l]});return c}fromJSON(t,r={}){let n;r=r||{};if(t.type===mxe.USER_REFRESH_ACCOUNT_TYPE){n=new mxe.UserRefreshClient(r);n.fromJSON(t)}else if(t.type===uJ.IMPERSONATED_ACCOUNT_TYPE){n=this.fromImpersonatedJSON(t)}else if(t.type===AF.EXTERNAL_ACCOUNT_TYPE){n=MSn.ExternalAccountClient.fromJSON(t,r);n.scopes=this.getAnyScopes()}else if(t.type===MCt.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE){n=new MCt.ExternalAccountAuthorizedUserClient(t,r)}else{r.scopes=this.scopes;n=new WO.JWT(r);this.setGapicJWTValues(n);n.fromJSON(t)}return n}_cacheClientFromJSON(t,r){const n=this.fromJSON(t,r);this.jsonContent=t;this.cachedCredential=n;return n}fromStream(t,r={},n){let i={};if(typeof r==="function"){n=r}else{i=r}if(n){this.fromStreamAsync(t,i).then(s=>n(null,s),n)}else{return this.fromStreamAsync(t,i)}}fromStreamAsync(t,r){return new Promise((n,i)=>{if(!t){throw new Error("Must pass in a stream containing the Google auth settings.")}let s="";t.setEncoding("utf8").on("error",i).on("data",o=>s+=o).on("end",()=>{try{try{const o=JSON.parse(s);const u=this._cacheClientFromJSON(o,r);return n(u)}catch(o){if(!this.keyFilename)throw o;const u=new WO.JWT({...this.clientOptions,keyFile:this.keyFilename});this.cachedCredential=u;this.setGapicJWTValues(u);return n(u)}}catch(o){return i(o)}})})}fromAPIKey(t,r){r=r||{};const n=new WO.JWT(r);n.fromAPIKey(t);return n}_isWindows(){const t=ISn.platform();if(t&&t.length>=3){if(t.substring(0,3).toLowerCase()==="win"){return true}}return false}async getDefaultServiceProjectId(){return new Promise(t=>{(0,NSn.exec)("gcloud config config-helper --format json",(r,n)=>{if(!r&&n){try{const i=JSON.parse(n).configuration.properties.core.project;t(i);return}catch(i){}}t(null)})})}getProductionProjectId(){return process.env["GCLOUD_PROJECT"]||process.env["GOOGLE_CLOUD_PROJECT"]||process.env["gcloud_project"]||process.env["google_cloud_project"]}async getFileProjectId(){if(this.cachedCredential){return this.cachedCredential.projectId}if(this.keyFilename){const r=await this.getClient();if(r&&r.projectId){return r.projectId}}const t=await this._tryGetApplicationCredentialsFromEnvironmentVariable();if(t){return t.projectId}else{return null}}async getExternalAccountClientProjectId(){if(!this.jsonContent||this.jsonContent.type!==AF.EXTERNAL_ACCOUNT_TYPE){return null}const t=await this.getClient();return await t.getProjectId()}async getGCEProjectId(){try{const t=await pxe.project("project-id");return t}catch(t){return null}}getCredentials(t){if(t){this.getCredentialsAsync().then(r=>t(null,r),t)}else{return this.getCredentialsAsync()}}async getCredentialsAsync(){const t=await this.getClient();if(t instanceof AF.BaseExternalAccountClient){const i=t.getServiceAccountEmail();if(i){return{client_email:i}}}if(this.jsonContent){const i={client_email:this.jsonContent.client_email,private_key:this.jsonContent.private_key};return i}const r=await this._checkIsGCE();if(!r){throw new Error("Unknown error.")}const n=await pxe.instance({property:"service-accounts/",params:{recursive:"true"}});if(!n||!n.default||!n.default.email){throw new Error("Failure from metadata server.")}return{client_email:n.default.email}}async getClient(){if(!this.cachedCredential){if(this.jsonContent){this._cacheClientFromJSON(this.jsonContent,this.clientOptions)}else if(this.keyFilename){const t=fxe.resolve(this.keyFilename);const r=SF.createReadStream(t);await this.fromStreamAsync(r,this.clientOptions)}else{await this.getApplicationDefaultAsync(this.clientOptions)}}return this.cachedCredential}async getIdTokenClient(t){const r=await this.getClient();if(!("fetchIdToken"in r)){throw new Error("Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.")}return new FSn.IdTokenClient({targetAudience:t,idTokenProvider:r})}async getAccessToken(){const t=await this.getClient();return(await t.getAccessToken()).token}async getRequestHeaders(t){const r=await this.getClient();return r.getRequestHeaders(t)}async authorizeRequest(t){t=t||{};const r=t.url||t.uri;const n=await this.getClient();const i=await n.getRequestHeaders(r);t.headers=Object.assign(t.headers||{},i);return t}async request(t){const r=await this.getClient();return r.request(t)}getEnv(){return(0,BSn.getEnv)()}async sign(t){const r=await this.getClient();const n=(0,kSn.createCrypto)();if(r instanceof WO.JWT&&r.key){const s=await n.sign(r.key,t);return s}const i=await this.getCredentials();if(!i.client_email){throw new Error("Cannot sign data without `client_email`.")}return this.signBlob(n,i.client_email,t)}async signBlob(t,r,n){const i=`https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/${r}:signBlob`;const s=await this.request({method:"POST",url:i,data:{payload:t.encodeBase64StringUtf8(n)}});return s.data.signedBlob}};YO.GoogleAuth=lJ;lJ.DefaultTransporter=DSn.DefaultTransporter});var $Ct=y(cJ=>{"use strict";Object.defineProperty(cJ,"__esModule",{value:true});cJ.IAMAuth=void 0;var hxe=class{static{a(this,"IAMAuth")}constructor(t,r){this.selector=t;this.token=r;this.selector=t;this.token=r}getRequestHeaders(){return{"x-goog-iam-authority-selector":this.selector,"x-goog-iam-authorization-token":this.token}}};cJ.IAMAuth=hxe});var jCt=y(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:true});fh.DownscopedClient=fh.EXPIRATION_TIME_OFFSET=fh.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var qSn=require("stream");var USn=TO();var $Sn=jTe();var jSn="urn:ietf:params:oauth:grant-type:token-exchange";var GSn="urn:ietf:params:oauth:token-type:access_token";var HSn="urn:ietf:params:oauth:token-type:access_token";var VSn="https://sts.googleapis.com/v1/token";fh.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;fh.EXPIRATION_TIME_OFFSET=5*60*1e3;var gxe=class extends USn.AuthClient{static{a(this,"DownscopedClient")}constructor(t,r,n,i){super();this.authClient=t;this.credentialAccessBoundary=r;if(r.accessBoundary.accessBoundaryRules.length===0){throw new Error("At least one access boundary rule needs to be defined.")}else if(r.accessBoundary.accessBoundaryRules.length>fh.MAX_ACCESS_BOUNDARY_RULES_COUNT){throw new Error(`The provided access boundary has more than ${fh.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`)}for(const s of r.accessBoundary.accessBoundaryRules){if(s.availablePermissions.length===0){throw new Error("At least one permission should be defined in access boundary rules.")}}this.stsCredential=new $Sn.StsCredentials(VSn);this.cachedDownscopedAccessToken=null;if(typeof(n===null||n===void 0?void 0:n.eagerRefreshThresholdMillis)!=="number"){this.eagerRefreshThresholdMillis=fh.EXPIRATION_TIME_OFFSET}else{this.eagerRefreshThresholdMillis=n.eagerRefreshThresholdMillis}this.forceRefreshOnFailure=!!(n===null||n===void 0?void 0:n.forceRefreshOnFailure);this.quotaProjectId=i}setCredentials(t){if(!t.expiry_date){throw new Error("The access token expiry_date field is missing in the provided credentials.")}super.setCredentials(t);this.cachedDownscopedAccessToken=t}async getAccessToken(){if(!this.cachedDownscopedAccessToken||this.isExpired(this.cachedDownscopedAccessToken)){await this.refreshAccessTokenAsync()}return{token:this.cachedDownscopedAccessToken.access_token,expirationTime:this.cachedDownscopedAccessToken.expiry_date,res:this.cachedDownscopedAccessToken.res}}async getRequestHeaders(){const t=await this.getAccessToken();const r={Authorization:`Bearer ${t.token}`};return this.addSharedMetadataHeaders(r)}request(t,r){if(r){this.requestAsync(t).then(n=>r(null,n),n=>{return r(n,n.response)})}else{return this.requestAsync(t)}}async requestAsync(t,r=false){let n;try{const i=await this.getRequestHeaders();t.headers=t.headers||{};if(i&&i["x-goog-user-project"]){t.headers["x-goog-user-project"]=i["x-goog-user-project"]}if(i&&i.Authorization){t.headers.Authorization=i.Authorization}n=await this.transporter.request(t)}catch(i){const s=i.response;if(s){const o=s.status;const u=s.config.data instanceof qSn.Readable;const l=o===401||o===403;if(!r&&l&&!u&&this.forceRefreshOnFailure){await this.refreshAccessTokenAsync();return await this.requestAsync(t,true)}}throw i}return n}async refreshAccessTokenAsync(){var t;const r=(await this.authClient.getAccessToken()).token;const n={grantType:jSn,requestedTokenType:GSn,subjectToken:r,subjectTokenType:HSn};const i=await this.stsCredential.exchangeToken(n,void 0,this.credentialAccessBoundary);const s=((t=this.authClient.credentials)===null||t===void 0?void 0:t.expiry_date)||null;const o=i.expires_in?new Date().getTime()+i.expires_in*1e3:s;this.cachedDownscopedAccessToken={access_token:i.access_token,expiry_date:o,res:i.res};this.credentials={};Object.assign(this.credentials,this.cachedDownscopedAccessToken);delete this.credentials.res;this.emit("tokens",{refresh_token:null,expiry_date:this.cachedDownscopedAccessToken.expiry_date,access_token:this.cachedDownscopedAccessToken.access_token,token_type:"Bearer",id_token:null});return this.cachedDownscopedAccessToken}isExpired(t){const r=new Date().getTime();return t.expiry_date?r>=t.expiry_date-this.eagerRefreshThresholdMillis:false}};fh.DownscopedClient=gxe});var yxe=y(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:true});mn.GoogleAuth=mn.auth=mn.DefaultTransporter=mn.PluggableAuthClient=mn.DownscopedClient=mn.BaseExternalAccountClient=mn.ExternalAccountClient=mn.IdentityPoolClient=mn.AwsClient=mn.UserRefreshClient=mn.LoginTicket=mn.OAuth2Client=mn.CodeChallengeMethod=mn.Impersonated=mn.JWT=mn.JWTAccess=mn.IdTokenClient=mn.IAMAuth=mn.GCPEnv=mn.Compute=mn.AuthClient=void 0;var GCt=UCt();Object.defineProperty(mn,"GoogleAuth",{enumerable:true,get:function(){return GCt.GoogleAuth}});var zSn=TO();Object.defineProperty(mn,"AuthClient",{enumerable:true,get:function(){return zSn.AuthClient}});var KSn=Swe();Object.defineProperty(mn,"Compute",{enumerable:true,get:function(){return KSn.Compute}});var WSn=wwe();Object.defineProperty(mn,"GCPEnv",{enumerable:true,get:function(){return WSn.GCPEnv}});var YSn=$Ct();Object.defineProperty(mn,"IAMAuth",{enumerable:true,get:function(){return YSn.IAMAuth}});var XSn=Cwe();Object.defineProperty(mn,"IdTokenClient",{enumerable:true,get:function(){return XSn.IdTokenClient}});var JSn=ITe();Object.defineProperty(mn,"JWTAccess",{enumerable:true,get:function(){return JSn.JWTAccess}});var QSn=DTe();Object.defineProperty(mn,"JWT",{enumerable:true,get:function(){return QSn.JWT}});var ZSn=MTe();Object.defineProperty(mn,"Impersonated",{enumerable:true,get:function(){return ZSn.Impersonated}});var HCt=$A();Object.defineProperty(mn,"CodeChallengeMethod",{enumerable:true,get:function(){return HCt.CodeChallengeMethod}});Object.defineProperty(mn,"OAuth2Client",{enumerable:true,get:function(){return HCt.OAuth2Client}});var eAn=vwe();Object.defineProperty(mn,"LoginTicket",{enumerable:true,get:function(){return eAn.LoginTicket}});var tAn=FTe();Object.defineProperty(mn,"UserRefreshClient",{enumerable:true,get:function(){return tAn.UserRefreshClient}});var rAn=ZTe();Object.defineProperty(mn,"AwsClient",{enumerable:true,get:function(){return rAn.AwsClient}});var nAn=JTe();Object.defineProperty(mn,"IdentityPoolClient",{enumerable:true,get:function(){return nAn.IdentityPoolClient}});var iAn=lxe();Object.defineProperty(mn,"ExternalAccountClient",{enumerable:true,get:function(){return iAn.ExternalAccountClient}});var sAn=ME();Object.defineProperty(mn,"BaseExternalAccountClient",{enumerable:true,get:function(){return sAn.BaseExternalAccountClient}});var aAn=jCt();Object.defineProperty(mn,"DownscopedClient",{enumerable:true,get:function(){return aAn.DownscopedClient}});var oAn=sJ();Object.defineProperty(mn,"PluggableAuthClient",{enumerable:true,get:function(){return oAn.PluggableAuthClient}});var uAn=rF();Object.defineProperty(mn,"DefaultTransporter",{enumerable:true,get:function(){return uAn.DefaultTransporter}});var lAn=new GCt.GoogleAuth;mn.auth=lAn});var JO=y(XO=>{"use strict";var cAn=XO&&XO.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(XO,"__esModule",{value:true});XO.getServiceAccountIdToken=void 0;var dAn=yxe();var pAn=cAn(Bm());var fAn=new dAn.GoogleAuth;var VCt=new pAn.default({max:50,maxAge:1e3*60*50});async function mAn(e){let t=VCt.get(e);if(!t){const r=await fAn.getIdTokenClient(e);t=await r.idTokenProvider.fetchIdToken(e);VCt.set(e,t)}return t}a(mAn,"getServiceAccountIdToken");XO.getServiceAccountIdToken=mAn});var XCt=y(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:true});Df.mergeHeaders=Df.createFinalURL=Df.defaultBodySerializer=Df.defaultQuerySerializer=Df.createClient=void 0;var QO=ac();var hAn=JO();var gAn=/\/*$/;async function yAn(e){const{baseUrl:t,fetch:r=globalThis.fetch,querySerializer:n,bodySerializer:i,zuploExtensions:s,...o}=e;const u=s?.fastifyRequest.log;const l=s?.fastifyRequest.id;const c=s?.options?.userSub??s?.fastifyRequest.getUserSub();const d=new Headers({"zuplo-user":c,"zp-rid":l,...o.headers??{}});const p=await(0,hAn.getServiceAccountIdToken)(t);d.set("Authorization",`Bearer ${p}`);if(["GET","DELETE","HEAD","OPTIONS","TRACE"].includes(o.method?.toUpperCase()??"")){}else{d.set("Content-Type","application/json")}async function f(m,h){const{headers:g,body:_,params:v={},parseAs:S="json",querySerializer:E=n??zCt,bodySerializer:b=i??KCt,...A}=h||{};const C=WCt(m,{baseUrl:t,params:v,querySerializer:E});const T=YCt(d,g,v.header);const O={redirect:"follow",...o,...A,headers:T};if(_)O.body=b(_);if(O.body instanceof FormData)T.delete("Content-Type");const P=await r(C,O);if(P.status===404){const R=await P.json();if(R&&R.hasOwnProperty("type")&&R.hasOwnProperty("title")&&R.hasOwnProperty("status")){throw new QO.ApiError(R)}throw new QO.ApiError(QO.Problems.NOT_FOUND)}if(P.status===204||P.headers.get("Content-Length")==="0"){return P.ok?{data:{},response:P}:{error:{},response:P}}if(P.ok){let R=P.body;if(S!=="stream"){const I=P.clone();R=typeof I[S]==="function"?await I[S]():await I.text()}return{data:R,response:P}}else{u.debug(`Error on internal api: path: ${C}, status: ${P.status}, headers: ${JSON.stringify(P.headers)}, body: ${await P.clone().text()}`);let R={};try{R=await P.clone().json();if(R.type&&R.status&&R.title){throw new QO.ApiError(R)}}catch(I){}throw new QO.ApiError(QO.Problems.INTERNAL_SERVER_ERROR)}}a(f,"coreFetch");return{async GET(m,h){return f(m,{...h,method:"GET"})},async PUT(m,h){return f(m,{...h,method:"PUT"})},async POST(m,h){return f(m,{...h,method:"POST"})},async DELETE(m,h){return f(m,{...h,method:"DELETE"})},async OPTIONS(m,h){return f(m,{...h,method:"OPTIONS"})},async HEAD(m,h){return f(m,{...h,method:"HEAD"})},async PATCH(m,h){return f(m,{...h,method:"PATCH"})},async TRACE(m,h){return f(m,{...h,method:"TRACE"})}}}a(yAn,"createClient");Df.createClient=yAn;function zCt(e){const t=new URLSearchParams;if(e&&typeof e==="object"){for(const[r,n]of Object.entries(e)){if(n===void 0||n===null)continue;t.set(r,n)}}return t.toString()}a(zCt,"defaultQuerySerializer");Df.defaultQuerySerializer=zCt;function KCt(e){return JSON.stringify(e)}a(KCt,"defaultBodySerializer");Df.defaultBodySerializer=KCt;function WCt(e,t){let r=`${t.baseUrl?t.baseUrl.replace(gAn,""):""}${e}`;if(t.params.path){for(const[n,i]of Object.entries(t.params.path))r=r.replace(`{${n}}`,encodeURIComponent(String(i)))}if(t.params.query){const n=t.querySerializer(t.params.query);if(n)r+=`?${n}`}return r}a(WCt,"createFinalURL");Df.createFinalURL=WCt;function YCt(...e){const t=new Headers;for(const r of e){if(!r||typeof r!=="object")continue;const n=r instanceof Headers?r.entries():Object.entries(r);for(const[i,s]of n){if(s!==void 0&&s!==null){t.set(i,s)}}}return t}a(YCt,"mergeHeaders");Df.mergeHeaders=YCt});var JCt=y(qE=>{"use strict";var _An=qE&&qE.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(qE,"__esModule",{value:true});qE.ApiKeyService=qE.createApiKeyServiceClient=void 0;var ZO=ac();var vAn=yxe();var dJ=_An(ep());var EAn=XCt();async function bAn(e){return(0,EAn.createClient)({baseUrl:dJ.default.API_KEY_MANAGEMENT_SERVICE_URL,zuploExtensions:{fastifyRequest:e}})}a(bAn,"createApiKeyServiceClient");qE.createApiKeyServiceClient=bAn;var _xe=class{static{a(this,"ApiKeyService")}logger;requestId;constructor(t){this.logger=t.log;this.requestId=t.id}async fetchGCP(t,r={}){this.logger.info(`Fetching with GCP JWT ${r.method} ${t} from Api Key Service API.`);const n=new vAn.GoogleAuth;const i=await n.getIdTokenClient(dJ.default.API_KEY_MANAGEMENT_SERVICE_URL);this.logger.info(`Payload to send: ${JSON.stringify({url:`${dJ.default.API_KEY_MANAGEMENT_SERVICE_URL}/${t}`,method:"GET",body:r.body,headers:{...r.headers,...r.method!=="DELETE"&&{"content-type":"application/json"}}})}`);const s=await i.getRequestHeaders();const o=await i.request({url:`${dJ.default.API_KEY_MANAGEMENT_SERVICE_URL}/${t}`,method:r.method||"GET",body:r.body,headers:{...s,...r.headers,...r.method!=="DELETE"&&{"content-type":"application/json"}},validateStatus:u=>u>=200&&u<500});if(o.status===404){const u=await o.data;if(u&&u.hasOwnProperty("type")&&u.hasOwnProperty("title")&&u.hasOwnProperty("status")){throw new ZO.ApiError(u)}throw new ZO.ApiError(ZO.Problems.NOT_FOUND)}if(o.status>=300){this.logger.debug(`Error on api-key-service: path: ${t}, status: ${o.status}, headers: ${JSON.stringify(o.headers)}, body: ${JSON.stringify(o.data)}`);const u=o.data;if(u.type&&u.status&&u.title){throw new ZO.ApiError(u)}this.logger.error(`Error not handled on api-key-service: path: ${t}, status: ${o.status}`);throw new ZO.ApiError(ZO.Problems.INTERNAL_SERVER_ERROR)}if(o.status===204){return{}}return o.data}};qE.ApiKeyService=_xe});var ZCt=y(eP=>{"use strict";var SAn=eP&&eP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(eP,"__esModule",{value:true});eP.AuthApiService=void 0;var QA=ac();var QCt=SAn(ep());var AAn=JO();var vxe=class{static{a(this,"AuthApiService")}logger;requestId;baseUrl;constructor(t){this.logger=t.log;this.requestId=t.id;if(!QCt.default.AUTH_API_URL){throw new Error("AUTH_API_URL is not set")}this.baseUrl=QCt.default.AUTH_API_URL}async getClientJWT(t,r){let n;try{n=await this.fetch(`/v1/clients/${t}`,{method:"GET"})}catch(s){if(s.status===QA.Problems.NOT_FOUND.status){n=await this.fetch(`/v1/clients`,{method:"POST",body:JSON.stringify({client_id:t})})}else{throw s}}const i=await this.fetch(`/v1/oauth/token`,{method:"POST",body:JSON.stringify({client_id:t,client_secret:n.client_secret,grant_type:"client_credentials",custom_claims:r})});return i.access_token}async fetch(t,r){this.logger.info(`Fetching internally ${t} from Auth API V2.`);const n=new Headers({"content-type":"application/json","zp-rid":this.requestId,authorization:""});if(process.env.K_SERVICE){const s=await(0,AAn.getServiceAccountIdToken)(this.baseUrl);n.set("Authorization",`Bearer ${s}`)}const i=await fetch(`${this.baseUrl}${t}`,{...r,headers:n});if(i.status===QA.HttpStatusCode.NOT_FOUND){throw new QA.ApiError(QA.Problems.NOT_FOUND)}if(!i.ok){this.logger.debug(`Error on auth-api: path: ${t}, status: ${i.status}`);const s=await i.clone().json();if(s.type&&s.status&&s.title){throw new QA.ApiError(s)}this.logger.error(`Error not handled on auth-api: path: ${t}, status: ${i.status}`);throw new QA.ApiError(QA.Problems.INTERNAL_SERVER_ERROR)}return i.clone().json()}};eP.AuthApiService=vxe});var CF=y(pJ=>{"use strict";Object.defineProperty(pJ,"__esModule",{value:true});pJ.ApiServiceClient=void 0;var tP=ac();var CAn=JO();var Exe=class{static{a(this,"ApiServiceClient")}userSub;logger;requestId;baseUrl;cache;targetAudience;constructor(t,r,n){this.userSub=n.userSub;this.logger=n.logger;this.requestId=n.requestId;this.baseUrl=t;this.cache=r;this.targetAudience=n.targetAudience}async cachedFetch(t,r,n){if(!this.userSub||!n){throw new Error("userSub and cacheKey parameters are required to use cachedFetch")}const i=`${this.userSub}@${n}`;if(this.cache.has(i)){return this.cache.get(i)}const s=await this.fetchInternally(t,r);this.cache.set(i,s);return s}async fetchInternally(t,r){this.logger.info(`Fetching internally ${r.method} ${this.baseUrl}${t}`);const n=new Headers({...r.headers,"zuplo-user":this.userSub,"content-type":"application/json","zp-rid":this.requestId});if(process.env.K_SERVICE){const s=await(0,CAn.getServiceAccountIdToken)(this.targetAudience??this.baseUrl);n.set("Authorization",`Bearer ${s}`)}const i=await fetch(`${this.baseUrl}${t}`,{...r,headers:n});if(i.status===404){this.logger.debug(`Error on internal api: path: ${t}, status: ${i.status}, body: ${JSON.stringify(i.clone().text())}`);const s=await i.json();if(s&&s.hasOwnProperty("type")&&s.hasOwnProperty("title")&&s.hasOwnProperty("status")){throw new tP.ApiError(s)}throw new tP.ApiError(tP.Problems.NOT_FOUND)}if(!i.ok){this.logger.debug(`Error on internal api: path: ${t}, status: ${i.status}, body: ${JSON.stringify(i.clone().text())}`);const s=await i.clone().json();if(s.type&&s.status&&s.title){throw new tP.ApiError(s)}this.logger.error(`Error not handled on internal api: path: ${t}, status: ${i.status}`);throw new tP.ApiError(tP.Problems.INTERNAL_SERVER_ERROR)}if(i.status===204){return{}}return i.clone().json()}};pJ.ApiServiceClient=Exe});var nwt=y(rg=>{"use strict";var twt=rg&&rg.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(rg,"__esModule",{value:true});rg.ContentApiService=rg.getContentApiStorageTarballPath=rg.contentApiTarballFileName=void 0;var wAn=twt(Bm());var ewt=twt(ep());var TAn=CF();var xAn=new wAn.default({max:500,maxAge:1e3*60*50});function rwt(e,t){return`${e}--${t}.tar.gz`}a(rwt,"contentApiTarballFileName");rg.contentApiTarballFileName=rwt;function RAn(e,t){const r=rwt(e,t);return`${e}/builds/${r}`}a(RAn,"getContentApiStorageTarballPath");rg.getContentApiStorageTarballPath=RAn;var bxe=class extends TAn.ApiServiceClient{static{a(this,"ContentApiService")}constructor(t){if(!ewt.default.CONTENT_API_URL){throw new Error("CONTENT_API_URL is not set")}super(ewt.default.CONTENT_API_URL,xAn,t)}};rg.ContentApiService=bxe});var awt=y(rP=>{"use strict";var swt=rP&&rP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(rP,"__esModule",{value:true});rP.DevApiService=void 0;var OAn=swt(Bm());var iwt=swt(ep());var PAn=CF();var NAn=new OAn.default({max:500,maxAge:1e3*60*50});var Sxe=class extends PAn.ApiServiceClient{static{a(this,"DevApiService")}constructor(t,r){if(!iwt.default.DEV_API_URL){throw new Error("DEV_API_URL is not set")}const n=r&&r.userSub?r.userSub:t.getUserSub();super(iwt.default.DEV_API_URL,NAn,{userSub:n,logger:t.log,requestId:t.id})}};rP.DevApiService=Sxe});var lwt=y((_Ds,uwt)=>{var owt=require("stream").Stream;var IAn=require("util");uwt.exports=mh;function mh(){this.source=null;this.dataSize=0;this.maxDataSize=1024*1024;this.pauseStream=true;this._maxDataSizeExceeded=false;this._released=false;this._bufferedEvents=[]}a(mh,"DelayedStream");IAn.inherits(mh,owt);mh.create=function(e,t){var r=new this;t=t||{};for(var n in t){r[n]=t[n]}r.source=e;var i=e.emit;e.emit=function(){r._handleEmit(arguments);return i.apply(e,arguments)};e.on("error",function(){});if(r.pauseStream){e.pause()}return r};Object.defineProperty(mh.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});mh.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};mh.prototype.resume=function(){if(!this._released){this.release()}this.source.resume()};mh.prototype.pause=function(){this.source.pause()};mh.prototype.release=function(){this._released=true;this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this));this._bufferedEvents=[]};mh.prototype.pipe=function(){var e=owt.prototype.pipe.apply(this,arguments);this.resume();return e};mh.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}if(e[0]==="data"){this.dataSize+=e[1].length;this._checkIfMaxDataSizeExceeded()}this._bufferedEvents.push(e)};mh.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded){return}if(this.dataSize<=this.maxDataSize){return}this._maxDataSizeExceeded=true;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}});var fwt=y((EDs,pwt)=>{var kAn=require("util");var dwt=require("stream").Stream;var cwt=lwt();pwt.exports=ao;function ao(){this.writable=false;this.readable=true;this.dataSize=0;this.maxDataSize=2*1024*1024;this.pauseStreams=true;this._released=false;this._streams=[];this._currentStream=null;this._insideLoop=false;this._pendingNext=false}a(ao,"CombinedStream");kAn.inherits(ao,dwt);ao.create=function(e){var t=new this;e=e||{};for(var r in e){t[r]=e[r]}return t};ao.isStreamLike=function(e){return typeof e!=="function"&&typeof e!=="string"&&typeof e!=="boolean"&&typeof e!=="number"&&!Buffer.isBuffer(e)};ao.prototype.append=function(e){var t=ao.isStreamLike(e);if(t){if(!(e instanceof cwt)){var r=cwt.create(e,{maxDataSize:Infinity,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this));e=r}this._handleErrors(e);if(this.pauseStreams){e.pause()}}this._streams.push(e);return this};ao.prototype.pipe=function(e,t){dwt.prototype.pipe.call(this,e,t);this.resume();return e};ao.prototype._getNext=function(){this._currentStream=null;if(this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do{this._pendingNext=false;this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=false}};ao.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e=="undefined"){this.end();return}if(typeof e!=="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=ao.isStreamLike(r);if(n){r.on("data",this._checkDataSize.bind(this));this._handleErrors(r)}this._pipeNext(r)}.bind(this))};ao.prototype._pipeNext=function(e){this._currentStream=e;var t=ao.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this));e.pipe(this,{end:false});return}var r=e;this.write(r);this._getNext()};ao.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};ao.prototype.write=function(e){this.emit("data",e)};ao.prototype.pause=function(){if(!this.pauseStreams){return}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};ao.prototype.resume=function(){if(!this._released){this._released=true;this.writable=true;this._getNext()}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};ao.prototype.end=function(){this._reset();this.emit("end")};ao.prototype.destroy=function(){this._reset();this.emit("close")};ao.prototype._reset=function(){this.writable=false;this._streams=[];this._currentStream=null};ao.prototype._checkDataSize=function(){this._updateDataSize();if(this.dataSize<=this.maxDataSize){return}var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))};ao.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){if(!t.dataSize){return}e.dataSize+=t.dataSize});if(this._currentStream&&this._currentStream.dataSize){this.dataSize+=this._currentStream.dataSize}};ao.prototype._emitError=function(e){this._reset();this.emit("error",e)}});var hwt=y((SDs,mwt)=>{mwt.exports=DAn;function DAn(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(t){t(e)}else{setTimeout(e,0)}}a(DAn,"defer")});var Axe=y((CDs,ywt)=>{var gwt=hwt();ywt.exports=LAn;function LAn(e){var t=false;gwt(function(){t=true});return a(function r(n,i){if(t){e(n,i)}else{gwt(a(function s(){e(n,i)},"nextTick_callback"))}},"async_callback")}a(LAn,"async")});var Cxe=y((TDs,_wt)=>{_wt.exports=FAn;function FAn(e){Object.keys(e.jobs).forEach(BAn.bind(e));e.jobs={}}a(FAn,"abort");function BAn(e){if(typeof this.jobs[e]=="function"){this.jobs[e]()}}a(BAn,"clean")});var wxe=y((RDs,Ewt)=>{var vwt=Axe();var MAn=Cxe();Ewt.exports=qAn;function qAn(e,t,r,n){var i=r["keyedList"]?r["keyedList"][r.index]:r.index;r.jobs[i]=UAn(t,i,e[i],function(s,o){if(!(i in r.jobs)){return}delete r.jobs[i];if(s){MAn(r)}else{r.results[i]=o}n(s,r.results)})}a(qAn,"iterate");function UAn(e,t,r,n){var i;if(e.length==2){i=e(r,vwt(n))}else{i=e(r,t,vwt(n))}return i}a(UAn,"runJob")});var Txe=y((PDs,bwt)=>{bwt.exports=$An;function $An(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};if(t){n.keyedList.sort(r?t:function(i,s){return t(e[i],e[s])})}return n}a($An,"state")});var xxe=y((IDs,Swt)=>{var jAn=Cxe();var GAn=Axe();Swt.exports=HAn;function HAn(e){if(!Object.keys(this.jobs).length){return}this.index=this.size;jAn(this);GAn(e)(null,this.results)}a(HAn,"terminator")});var Cwt=y((DDs,Awt)=>{var VAn=wxe();var zAn=Txe();var KAn=xxe();Awt.exports=WAn;function WAn(e,t,r){var n=zAn(e);while(n.index<(n["keyedList"]||e).length){VAn(e,t,n,function(i,s){if(i){r(i,s);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}});n.index++}return KAn.bind(n,r)}a(WAn,"parallel")});var Rxe=y((FDs,fJ)=>{var wwt=wxe();var YAn=Txe();var XAn=xxe();fJ.exports=JAn;fJ.exports.ascending=Twt;fJ.exports.descending=QAn;function JAn(e,t,r,n){var i=YAn(e,r);wwt(e,t,i,a(function s(o,u){if(o){n(o,u);return}i.index++;if(i.index<(i["keyedList"]||e).length){wwt(e,t,i,s);return}n(null,i.results)},"iteratorHandler"));return XAn.bind(i,n)}a(JAn,"serialOrdered");function Twt(e,t){return e<t?-1:e>t?1:0}a(Twt,"ascending");function QAn(e,t){return-1*Twt(e,t)}a(QAn,"descending")});var Rwt=y((MDs,xwt)=>{var ZAn=Rxe();xwt.exports=eCn;function eCn(e,t,r){return ZAn(e,t,null,r)}a(eCn,"serial")});var Pwt=y((UDs,Owt)=>{Owt.exports={parallel:Cwt(),serial:Rwt(),serialOrdered:Rxe()}});var Iwt=y(($Ds,Nwt)=>{Nwt.exports=function(e,t){Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]});return e}});var Lwt=y((jDs,Dwt)=>{var Ixe=fwt();var kwt=require("util");var Oxe=require("path");var tCn=require("http");var rCn=require("https");var nCn=require("url").parse;var iCn=require("fs");var sCn=require("stream").Stream;var Pxe=dSe();var aCn=Pwt();var Nxe=Iwt();Dwt.exports=es;kwt.inherits(es,Ixe);function es(e){if(!(this instanceof es)){return new es(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];Ixe.call(this);e=e||{};for(var t in e){this[t]=e[t]}}a(es,"FormData");es.LINE_BREAK="\r\n";es.DEFAULT_CONTENT_TYPE="application/octet-stream";es.prototype.append=function(e,t,r){r=r||{};if(typeof r=="string"){r={filename:r}}var n=Ixe.prototype.append.bind(this);if(typeof t=="number"){t=""+t}if(kwt.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,r);var s=this._multiPartFooter();n(i);n(t);n(s);this._trackLength(i,t,r)};es.prototype._trackLength=function(e,t,r){var n=0;if(r.knownLength!=null){n+=+r.knownLength}else if(Buffer.isBuffer(t)){n=t.length}else if(typeof t==="string"){n=Buffer.byteLength(t)}this._valueLength+=n;this._overheadLength+=Buffer.byteLength(e)+es.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof sCn)){return}if(!r.knownLength){this._valuesToMeasure.push(t)}};es.prototype._lengthRetriever=function(e,t){if(e.hasOwnProperty("fd")){if(e.end!=void 0&&e.end!=Infinity&&e.start!=void 0){t(null,e.end+1-(e.start?e.start:0))}else{iCn.stat(e.path,function(r,n){var i;if(r){t(r);return}i=n.size-(e.start?e.start:0);t(null,i)})}}else if(e.hasOwnProperty("httpVersion")){t(null,+e.headers["content-length"])}else if(e.hasOwnProperty("httpModule")){e.on("response",function(r){e.pause();t(null,+r.headers["content-length"])});e.resume()}else{t("Unknown stream")}};es.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string"){return r.header}var n=this._getContentDisposition(t,r);var i=this._getContentType(t,r);var s="";var o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};if(typeof r.header=="object"){Nxe(o,r.header)}var u;for(var l in o){if(!o.hasOwnProperty(l))continue;u=o[l];if(u==null){continue}if(!Array.isArray(u)){u=[u]}if(u.length){s+=l+": "+u.join("; ")+es.LINE_BREAK}}return"--"+this.getBoundary()+es.LINE_BREAK+s+es.LINE_BREAK};es.prototype._getContentDisposition=function(e,t){var r,n;if(typeof t.filepath==="string"){r=Oxe.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e.name||e.path){r=Oxe.basename(t.filename||e.name||e.path)}else if(e.readable&&e.hasOwnProperty("httpVersion")){r=Oxe.basename(e.client._httpMessage.path||"")}if(r){n='filename="'+r+'"'}return n};es.prototype._getContentType=function(e,t){var r=t.contentType;if(!r&&e.name){r=Pxe.lookup(e.name)}if(!r&&e.path){r=Pxe.lookup(e.path)}if(!r&&e.readable&&e.hasOwnProperty("httpVersion")){r=e.headers["content-type"]}if(!r&&(t.filepath||t.filename)){r=Pxe.lookup(t.filepath||t.filename)}if(!r&&typeof e=="object"){r=es.DEFAULT_CONTENT_TYPE}return r};es.prototype._multiPartFooter=function(){return function(e){var t=es.LINE_BREAK;var r=this._streams.length===0;if(r){t+=this._lastBoundary()}e(t)}.bind(this)};es.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+es.LINE_BREAK};es.prototype.getHeaders=function(e){var t;var r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(e.hasOwnProperty(t)){r[t.toLowerCase()]=e[t]}}return r};es.prototype.setBoundary=function(e){this._boundary=e};es.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};es.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var r=0,n=this._streams.length;r<n;r++){if(typeof this._streams[r]!=="function"){if(Buffer.isBuffer(this._streams[r])){e=Buffer.concat([e,this._streams[r]])}else{e=Buffer.concat([e,Buffer.from(this._streams[r])])}if(typeof this._streams[r]!=="string"||this._streams[r].substring(2,t.length+2)!==t){e=Buffer.concat([e,Buffer.from(es.LINE_BREAK)])}}}return Buffer.concat([e,Buffer.from(this._lastBoundary())])};es.prototype._generateBoundary=function(){var e="--------------------------";for(var t=0;t<24;t++){e+=Math.floor(Math.random()*10).toString(16)}this._boundary=e};es.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;if(this._streams.length){e+=this._lastBoundary().length}if(!this.hasKnownLength()){this._error(new Error("Cannot calculate proper length in synchronous way."))}return e};es.prototype.hasKnownLength=function(){var e=true;if(this._valuesToMeasure.length){e=false}return e};es.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length){t+=this._lastBoundary().length}if(!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}aCn.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i});e(null,t)})};es.prototype.submit=function(e,t){var r,n,i={method:"post"};if(typeof e=="string"){e=nCn(e);n=Nxe({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)}else{n=Nxe(e,i);if(!n.port){n.port=n.protocol=="https:"?443:80}}n.headers=this.getHeaders(e.headers);if(n.protocol=="https:"){r=rCn.request(n)}else{r=tCn.request(n)}this.getLength(function(s,o){if(s&&s!=="Unknown stream"){this._error(s);return}if(o){r.setHeader("Content-Length",o)}this.pipe(r);if(t){var u;var l=a(function(c,d){r.removeListener("error",l);r.removeListener("response",u);return t.call(this,c,d)},"callback");u=l.bind(this,null);r.on("error",l);r.on("response",u)}}.bind(this));return r};es.prototype._error=function(e){if(!this.error){this.error=e;this.pause();this.emit("error",e)}};es.prototype.toString=function(){return"[object FormData]"}});var Bwt=y(Fwt=>{"use strict";var oCn=require("url").parse;var uCn={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};var lCn=String.prototype.endsWith||function(e){return e.length<=this.length&&this.indexOf(e,this.length-e.length)!==-1};function cCn(e){var t=typeof e==="string"?oCn(e):e||{};var r=t.protocol;var n=t.host;var i=t.port;if(typeof n!=="string"||!n||typeof r!=="string"){return""}r=r.split(":",1)[0];n=n.replace(/:\d*$/,"");i=parseInt(i)||uCn[r]||0;if(!dCn(n,i)){return""}var s=nP("npm_config_"+r+"_proxy")||nP(r+"_proxy")||nP("npm_config_proxy")||nP("all_proxy");if(s&&s.indexOf("://")===-1){s=r+"://"+s}return s}a(cCn,"getProxyForUrl");function dCn(e,t){var r=(nP("npm_config_no_proxy")||nP("no_proxy")).toLowerCase();if(!r){return true}if(r==="*"){return false}return r.split(/[,\s]/).every(function(n){if(!n){return true}var i=n.match(/^(.+):(\d+)$/);var s=i?i[1]:n;var o=i?parseInt(i[2]):0;if(o&&o!==t){return true}if(!/^[.*]/.test(s)){return e!==s}if(s.charAt(0)==="*"){s=s.slice(1)}return!lCn.call(e,s)})}a(dCn,"shouldProxy");function nP(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}a(nP,"getEnv");Fwt.getProxyForUrl=cCn});var qwt=y((zDs,Mwt)=>{var wF;Mwt.exports=function(){if(!wF){try{wF=Wc()("follow-redirects")}catch(e){}if(typeof wF!=="function"){wF=a(function(){},"debug")}}wF.apply(null,arguments)}});var Hwt=y((WDs,Hxe)=>{var RF=require("url");var TF=RF.URL;var pCn=require("http");var fCn=require("https");var Bxe=require("stream").Writable;var Mxe=require("assert");var Uwt=qwt();var qxe=false;try{Mxe(new TF)}catch(e){qxe=e.code==="ERR_INVALID_URL"}var mCn=["auth","host","hostname","href","path","pathname","port","protocol","query","search"];var Uxe=["abort","aborted","connect","error","socket","timeout"];var $xe=Object.create(null);Uxe.forEach(function(e){$xe[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var Dxe=OF("ERR_INVALID_URL","Invalid URL",TypeError);var Lxe=OF("ERR_FR_REDIRECTION_FAILURE","Redirected request failed");var hCn=OF("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Lxe);var gCn=OF("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit");var yCn=OF("ERR_STREAM_WRITE_AFTER_END","write after end");var _Cn=Bxe.prototype.destroy||jwt;function _d(e,t){Bxe.call(this);this._sanitizeOptions(e);this._options=e;this._ended=false;this._ending=false;this._redirectCount=0;this._redirects=[];this._requestBodyLength=0;this._requestBodyBuffers=[];if(t){this.on("response",t)}var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(i){r.emit("error",i instanceof Lxe?i:new Lxe({cause:i}))}};this._performRequest()}a(_d,"RedirectableRequest");_d.prototype=Object.create(Bxe.prototype);_d.prototype.abort=function(){Gxe(this._currentRequest);this._currentRequest.abort();this.emit("abort")};_d.prototype.destroy=function(e){Gxe(this._currentRequest,e);_Cn.call(this,e);return this};_d.prototype.write=function(e,t,r){if(this._ending){throw new yCn}if(!ZA(e)&&!bCn(e)){throw new TypeError("data should be a string, Buffer or Uint8Array")}if(xF(t)){r=t;t=null}if(e.length===0){if(r){r()}return}if(this._requestBodyLength+e.length<=this._options.maxBodyLength){this._requestBodyLength+=e.length;this._requestBodyBuffers.push({data:e,encoding:t});this._currentRequest.write(e,t,r)}else{this.emit("error",new gCn);this.abort()}};_d.prototype.end=function(e,t,r){if(xF(e)){r=e;e=t=null}else if(xF(t)){r=t;t=null}if(!e){this._ended=this._ending=true;this._currentRequest.end(null,null,r)}else{var n=this;var i=this._currentRequest;this.write(e,t,function(){n._ended=true;i.end(null,null,r)});this._ending=true}};_d.prototype.setHeader=function(e,t){this._options.headers[e]=t;this._currentRequest.setHeader(e,t)};_d.prototype.removeHeader=function(e){delete this._options.headers[e];this._currentRequest.removeHeader(e)};_d.prototype.setTimeout=function(e,t){var r=this;function n(o){o.setTimeout(e);o.removeListener("timeout",o.destroy);o.addListener("timeout",o.destroy)}a(n,"destroyOnTimeout");function i(o){if(r._timeout){clearTimeout(r._timeout)}r._timeout=setTimeout(function(){r.emit("timeout");s()},e);n(o)}a(i,"startTimer");function s(){if(r._timeout){clearTimeout(r._timeout);r._timeout=null}r.removeListener("abort",s);r.removeListener("error",s);r.removeListener("response",s);r.removeListener("close",s);if(t){r.removeListener("timeout",t)}if(!r.socket){r._currentRequest.removeListener("socket",i)}}a(s,"clearTimer");if(t){this.on("timeout",t)}if(this.socket){i(this.socket)}else{this._currentRequest.once("socket",i)}this.on("socket",n);this.on("abort",s);this.on("error",s);this.on("response",s);this.on("close",s);return this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){_d.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(_d.prototype,e,{get:function(){return this._currentRequest[e]}})});_d.prototype._sanitizeOptions=function(e){if(!e.headers){e.headers={}}if(e.host){if(!e.hostname){e.hostname=e.host}delete e.host}if(!e.pathname&&e.path){var t=e.path.indexOf("?");if(t<0){e.pathname=e.path}else{e.pathname=e.path.substring(0,t);e.search=e.path.substring(t)}}};_d.prototype._performRequest=function(){var e=this._options.protocol;var t=this._options.nativeProtocols[e];if(!t){throw new TypeError("Unsupported protocol "+e)}if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var i of Uxe){n.on(i,$xe[i])}this._currentUrl=/^\//.test(this._options.path)?RF.format(this._options):this._options.path;if(this._isRedirect){var s=0;var o=this;var u=this._requestBodyBuffers;a(function l(c){if(n===o._currentRequest){if(c){o.emit("error",c)}else if(s<u.length){var d=u[s++];if(!n.finished){n.write(d.data,d.encoding,l)}}else if(o._ended){n.end()}}},"writeNext")()}};_d.prototype._processResponse=function(e){var t=e.statusCode;if(this._options.trackRedirects){this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t})}var r=e.headers.location;if(!r||this._options.followRedirects===false||t<300||t>=400){e.responseUrl=this._currentUrl;e.redirects=this._redirects;this.emit("response",e);this._requestBodyBuffers=[];return}Gxe(this._currentRequest);e.destroy();if(++this._redirectCount>this._options.maxRedirects){throw new hCn}var n;var i=this._options.beforeRedirect;if(i){n=Object.assign({Host:e.req.getHeader("host")},this._options.headers)}var s=this._options.method;if((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method)){this._options.method="GET";this._requestBodyBuffers=[];kxe(/^content-/i,this._options.headers)}var o=kxe(/^host$/i,this._options.headers);var u=jxe(this._currentUrl);var l=o||u.host;var c=/^\w+:/.test(r)?this._currentUrl:RF.format(Object.assign(u,{host:l}));var d=vCn(r,c);Uwt("redirecting to",d.href);this._isRedirect=true;Fxe(d,this._options);if(d.protocol!==u.protocol&&d.protocol!=="https:"||d.host!==l&&!ECn(d.host,l)){kxe(/^(?:authorization|cookie)$/i,this._options.headers)}if(xF(i)){var p={headers:e.headers,statusCode:t};var f={url:c,method:s,headers:n};i(this._options,p,f);this._sanitizeOptions(this._options)}this._performRequest()};function $wt(e){var t={maxRedirects:21,maxBodyLength:10*1024*1024};var r={};Object.keys(e).forEach(function(n){var i=n+":";var s=r[i]=e[n];var o=t[n]=Object.create(s);function u(c,d,p){if(SCn(c)){c=Fxe(c)}else if(ZA(c)){c=Fxe(jxe(c))}else{p=d;d=Gwt(c);c={protocol:i}}if(xF(d)){p=d;d=null}d=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},c,d);d.nativeProtocols=r;if(!ZA(d.host)&&!ZA(d.hostname)){d.hostname="::1"}Mxe.equal(d.protocol,i,"protocol mismatch");Uwt("options",d);return new _d(d,p)}a(u,"request");function l(c,d,p){var f=o.request(c,d,p);f.end();return f}a(l,"get");Object.defineProperties(o,{request:{value:u,configurable:true,enumerable:true,writable:true},get:{value:l,configurable:true,enumerable:true,writable:true}})});return t}a($wt,"wrap");function jwt(){}a(jwt,"noop");function jxe(e){var t;if(qxe){t=new TF(e)}else{t=Gwt(RF.parse(e));if(!ZA(t.protocol)){throw new Dxe({input:e})}}return t}a(jxe,"parseUrl");function vCn(e,t){return qxe?new TF(e,t):jxe(RF.resolve(t,e))}a(vCn,"resolveUrl");function Gwt(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname)){throw new Dxe({input:e.href||e})}if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host)){throw new Dxe({input:e.href||e})}return e}a(Gwt,"validateUrl");function Fxe(e,t){var r=t||{};for(var n of mCn){r[n]=e[n]}if(r.hostname.startsWith("[")){r.hostname=r.hostname.slice(1,-1)}if(r.port!==""){r.port=Number(r.port)}r.path=r.search?r.pathname+r.search:r.pathname;return r}a(Fxe,"spreadUrlObject");function kxe(e,t){var r;for(var n in t){if(e.test(n)){r=t[n];delete t[n]}}return r===null||typeof r==="undefined"?void 0:String(r).trim()}a(kxe,"removeMatchingHeaders");function OF(e,t,r){function n(i){Error.captureStackTrace(this,this.constructor);Object.assign(this,i||{});this.code=e;this.message=this.cause?t+": "+this.cause.message:t}a(n,"CustomError");n.prototype=new(r||Error);Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:false},name:{value:"Error ["+e+"]",enumerable:false}});return n}a(OF,"createErrorType");function Gxe(e,t){for(var r of Uxe){e.removeListener(r,$xe[r])}e.on("error",jwt);e.destroy(t)}a(Gxe,"destroyRequest");function ECn(e,t){Mxe(ZA(e)&&ZA(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}a(ECn,"isSubdomain");function ZA(e){return typeof e==="string"||e instanceof String}a(ZA,"isString");function xF(e){return typeof e==="function"}a(xF,"isFunction");function bCn(e){return typeof e==="object"&&"length"in e}a(bCn,"isBuffer");function SCn(e){return TF&&e instanceof TF}a(SCn,"isURL");Hxe.exports=$wt({http:pCn,https:fCn});Hxe.exports.wrap=$wt});var AJ=y((XDs,kTt)=>{"use strict";var ACn=Lwt();var CCn=require("url");var wCn=Bwt();var TCn=require("http");var xCn=require("https");var uTt=require("util");var RCn=Hwt();var OCn=require("zlib");var lTt=require("stream");var PCn=require("events");function Ty(e){return e&&typeof e==="object"&&"default"in e?e:{"default":e}}a(Ty,"_interopDefaultLegacy");var cTt=Ty(ACn);var NCn=Ty(CCn);var ICn=Ty(TCn);var kCn=Ty(xCn);var DCn=Ty(uTt);var LCn=Ty(RCn);var GE=Ty(OCn);var $E=Ty(lTt);var FCn=Ty(PCn);function dTt(e,t){return a(function r(){return e.apply(t,arguments)},"wrap")}a(dTt,"bind");var{toString:BCn}=Object.prototype;var{getPrototypeOf:sRe}=Object;var vJ=(e=>t=>{const r=BCn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null));var ng=a(e=>{e=e.toLowerCase();return t=>vJ(t)===e},"kindOfTest");var EJ=a(e=>t=>typeof t===e,"typeOfTest");var{isArray:oP}=Array;var IF=EJ("undefined");function MCn(e){return e!==null&&!IF(e)&&e.constructor!==null&&!IF(e.constructor)&&Ff(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}a(MCn,"isBuffer");var pTt=ng("ArrayBuffer");function qCn(e){let t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&pTt(e.buffer)}return t}a(qCn,"isArrayBufferView");var UCn=EJ("string");var Ff=EJ("function");var fTt=EJ("number");var bJ=a(e=>e!==null&&typeof e==="object","isObject");var $Cn=a(e=>e===true||e===false,"isBoolean");var hJ=a(e=>{if(vJ(e)!=="object"){return false}const t=sRe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},"isPlainObject");var jCn=ng("Date");var GCn=ng("File");var HCn=ng("Blob");var VCn=ng("FileList");var zCn=a(e=>bJ(e)&&Ff(e.pipe),"isStream");var KCn=a(e=>{let t;return e&&(typeof FormData==="function"&&e instanceof FormData||Ff(e.append)&&((t=vJ(e))==="formdata"||t==="object"&&Ff(e.toString)&&e.toString()==="[object FormData]"))},"isFormData");var WCn=ng("URLSearchParams");var YCn=a(e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function DF(e,t,{allOwnKeys:r=false}={}){if(e===null||typeof e==="undefined"){return}let n;let i;if(typeof e!=="object"){e=[e]}if(oP(e)){for(n=0,i=e.length;n<i;n++){t.call(null,e[n],n,e)}}else{const s=r?Object.getOwnPropertyNames(e):Object.keys(e);const o=s.length;let u;for(n=0;n<o;n++){u=s[n];t.call(null,e[u],u,e)}}}a(DF,"forEach");function mTt(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length;let i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}a(mTt,"findKey");var hTt=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})();var gTt=a(e=>!IF(e)&&e!==hTt,"isContextDefined");function Yxe(){const{caseless:e}=gTt(this)&&this||{};const t={};const r=a((n,i)=>{const s=e&&mTt(t,i)||i;if(hJ(t[s])&&hJ(n)){t[s]=Yxe(t[s],n)}else if(hJ(n)){t[s]=Yxe({},n)}else if(oP(n)){t[s]=n.slice()}else{t[s]=n}},"assignValue");for(let n=0,i=arguments.length;n<i;n++){arguments[n]&&DF(arguments[n],r)}return t}a(Yxe,"merge");var XCn=a((e,t,r,{allOwnKeys:n}={})=>{DF(t,(i,s)=>{if(r&&Ff(i)){e[s]=dTt(i,r)}else{e[s]=i}},{allOwnKeys:n});return e},"extend");var JCn=a(e=>{if(e.charCodeAt(0)===65279){e=e.slice(1)}return e},"stripBOM");var QCn=a((e,t,r,n)=>{e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)},"inherits");var ZCn=a((e,t,r,n)=>{let i;let s;let o;const u={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);s=i.length;while(s-- >0){o=i[s];if((!n||n(o,e,t))&&!u[o]){t[o]=e[o];u[o]=true}}e=r!==false&&sRe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},"toFlatObject");var ewn=a((e,t,r)=>{e=String(e);if(r===void 0||r>e.length){r=e.length}r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},"endsWith");var twn=a(e=>{if(!e)return null;if(oP(e))return e;let t=e.length;if(!fTt(t))return null;const r=new Array(t);while(t-- >0){r[t]=e[t]}return r},"toArray");var rwn=(e=>{return t=>{return e&&t instanceof e}})(typeof Uint8Array!=="undefined"&&sRe(Uint8Array));var nwn=a((e,t)=>{const r=e&&e[Symbol.iterator];const n=r.call(e);let i;while((i=n.next())&&!i.done){const s=i.value;t.call(e,s[0],s[1])}},"forEachEntry");var iwn=a((e,t)=>{let r;const n=[];while((r=e.exec(t))!==null){n.push(r)}return n},"matchAll");var swn=ng("HTMLFormElement");var awn=a(e=>{return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,a(function t(r,n,i){return n.toUpperCase()+i},"replacer"))},"toCamelCase");var Vwt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype);var own=ng("RegExp");var yTt=a((e,t)=>{const r=Object.getOwnPropertyDescriptors(e);const n={};DF(r,(i,s)=>{let o;if((o=t(i,s,e))!==false){n[s]=o||i}});Object.defineProperties(e,n)},"reduceDescriptors");var uwn=a(e=>{yTt(e,(t,r)=>{if(Ff(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}const n=e[r];if(!Ff(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}}})},"freezeMethods");var lwn=a((e,t)=>{const r={};const n=a(i=>{i.forEach(s=>{r[s]=true})},"define");oP(e)?n(e):n(String(e).split(t));return r},"toObjectSet");var cwn=a(()=>{},"noop");var dwn=a((e,t)=>{e=+e;return Number.isFinite(e)?e:t},"toFiniteNumber");var Vxe="abcdefghijklmnopqrstuvwxyz";var zwt="0123456789";var _Tt={DIGIT:zwt,ALPHA:Vxe,ALPHA_DIGIT:Vxe+Vxe.toUpperCase()+zwt};var pwn=a((e=16,t=_Tt.ALPHA_DIGIT)=>{let r="";const{length:n}=t;while(e--){r+=t[Math.random()*n|0]}return r},"generateString");function fwn(e){return!!(e&&Ff(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}a(fwn,"isSpecCompliantForm");var mwn=a(e=>{const t=new Array(10);const r=a((n,i)=>{if(bJ(n)){if(t.indexOf(n)>=0){return}if(!("toJSON"in n)){t[i]=n;const s=oP(n)?[]:{};DF(n,(o,u)=>{const l=r(o,i+1);!IF(l)&&(s[u]=l)});t[i]=void 0;return s}}return n},"visit");return r(e,0)},"toJSONObject");var hwn=ng("AsyncFunction");var gwn=a(e=>e&&(bJ(e)||Ff(e))&&Ff(e.then)&&Ff(e.catch),"isThenable");var Je={isArray:oP,isArrayBuffer:pTt,isBuffer:MCn,isFormData:KCn,isArrayBufferView:qCn,isString:UCn,isNumber:fTt,isBoolean:$Cn,isObject:bJ,isPlainObject:hJ,isUndefined:IF,isDate:jCn,isFile:GCn,isBlob:HCn,isRegExp:own,isFunction:Ff,isStream:zCn,isURLSearchParams:WCn,isTypedArray:rwn,isFileList:VCn,forEach:DF,merge:Yxe,extend:XCn,trim:YCn,stripBOM:JCn,inherits:QCn,toFlatObject:ZCn,kindOf:vJ,kindOfTest:ng,endsWith:ewn,toArray:twn,forEachEntry:nwn,matchAll:iwn,isHTMLForm:swn,hasOwnProperty:Vwt,hasOwnProp:Vwt,reduceDescriptors:yTt,freezeMethods:uwn,toObjectSet:lwn,toCamelCase:awn,noop:cwn,toFiniteNumber:dwn,findKey:mTt,global:hTt,isContextDefined:gTt,ALPHABET:_Tt,generateString:pwn,isSpecCompliantForm:fwn,toJSONObject:mwn,isAsyncFn:hwn,isThenable:gwn};function yr(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=new Error().stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}a(yr,"AxiosError");Je.inherits(yr,Error,{toJSON:a(function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Je.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}},"toJSON")});var vTt=yr.prototype;var ETt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ETt[e]={value:e}});Object.defineProperties(yr,ETt);Object.defineProperty(vTt,"isAxiosError",{value:true});yr.from=(e,t,r,n,i,s)=>{const o=Object.create(vTt);Je.toFlatObject(e,o,a(function u(l){return l!==Error.prototype},"filter"),u=>{return u!=="isAxiosError"});yr.call(o,e.message,t,r,n,i);o.cause=e;o.name=e.name;s&&Object.assign(o,s);return o};function Xxe(e){return Je.isPlainObject(e)||Je.isArray(e)}a(Xxe,"isVisitable");function bTt(e){return Je.endsWith(e,"[]")?e.slice(0,-2):e}a(bTt,"removeBrackets");function Kwt(e,t,r){if(!e)return t;return e.concat(t).map(a(function n(i,s){i=bTt(i);return!r&&s?"["+i+"]":i},"each")).join(r?".":"")}a(Kwt,"renderKey");function ywn(e){return Je.isArray(e)&&!e.some(Xxe)}a(ywn,"isFlatArray");var _wn=Je.toFlatObject(Je,{},null,a(function e(t){return/^is[A-Z]/.test(t)},"filter"));function SJ(e,t,r){if(!Je.isObject(e)){throw new TypeError("target must be an object")}t=t||new(cTt["default"]||FormData);r=Je.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,a(function h(g,_){return!Je.isUndefined(_[g])},"defined"));const n=r.metaTokens;const i=r.visitor||d;const s=r.dots;const o=r.indexes;const u=r.Blob||typeof Blob!=="undefined"&&Blob;const l=u&&Je.isSpecCompliantForm(t);if(!Je.isFunction(i)){throw new TypeError("visitor must be a function")}function c(h){if(h===null)return"";if(Je.isDate(h)){return h.toISOString()}if(!l&&Je.isBlob(h)){throw new yr("Blob is not supported. Use a Buffer instead.")}if(Je.isArrayBuffer(h)||Je.isTypedArray(h)){return l&&typeof Blob==="function"?new Blob([h]):Buffer.from(h)}return h}a(c,"convertValue");function d(h,g,_){let v=h;if(h&&!_&&typeof h==="object"){if(Je.endsWith(g,"{}")){g=n?g:g.slice(0,-2);h=JSON.stringify(h)}else if(Je.isArray(h)&&ywn(h)||(Je.isFileList(h)||Je.endsWith(g,"[]"))&&(v=Je.toArray(h))){g=bTt(g);v.forEach(a(function S(E,b){!(Je.isUndefined(E)||E===null)&&t.append(o===true?Kwt([g],b,s):o===null?g:g+"[]",c(E))},"each"));return false}}if(Xxe(h)){return true}t.append(Kwt(_,g,s),c(h));return false}a(d,"defaultVisitor");const p=[];const f=Object.assign(_wn,{defaultVisitor:d,convertValue:c,isVisitable:Xxe});function m(h,g){if(Je.isUndefined(h))return;if(p.indexOf(h)!==-1){throw Error("Circular reference detected in "+g.join("."))}p.push(h);Je.forEach(h,a(function _(v,S){const E=!(Je.isUndefined(v)||v===null)&&i.call(t,v,Je.isString(S)?S.trim():S,g,f);if(E===true){m(v,g?g.concat(S):[S])}},"each"));p.pop()}a(m,"build");if(!Je.isObject(e)){throw new TypeError("data must be an object")}m(e);return t}a(SJ,"toFormData");function Wwt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,a(function r(n){return t[n]},"replacer"))}a(Wwt,"encode$1");function STt(e,t){this._pairs=[];e&&SJ(e,this,t)}a(STt,"AxiosURLSearchParams");var ATt=STt.prototype;ATt.append=a(function e(t,r){this._pairs.push([t,r])},"append");ATt.toString=a(function e(t){const r=t?function(n){return t.call(this,n,Wwt)}:Wwt;return this._pairs.map(a(function n(i){return r(i[0])+"="+r(i[1])},"each"),"").join("&")},"toString");function vwn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}a(vwn,"encode");function aRe(e,t,r){if(!t){return e}const n=r&&r.encode||vwn;const i=r&&r.serialize;let s;if(i){s=i(t,r)}else{s=Je.isURLSearchParams(t)?t.toString():new STt(t,r).toString(n)}if(s){const o=e.indexOf("#");if(o!==-1){e=e.slice(0,o)}e+=(e.indexOf("?")===-1?"?":"&")+s}return e}a(aRe,"buildURL");var Jxe=class{static{a(this,"InterceptorManager")}constructor(){this.handlers=[]}use(t,r,n){this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:false,runWhen:n?n.runWhen:null});return this.handlers.length-1}eject(t){if(this.handlers[t]){this.handlers[t]=null}}clear(){if(this.handlers){this.handlers=[]}}forEach(t){Je.forEach(this.handlers,a(function r(n){if(n!==null){t(n)}},"forEachHandler"))}};var Ywt=Jxe;var oRe={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var Ewn=NCn["default"].URLSearchParams;var bwn={isNode:true,classes:{URLSearchParams:Ewn,FormData:cTt["default"],Blob:typeof Blob!=="undefined"&&Blob||null},protocols:["http","https","file","data"]};var CTt=typeof window!=="undefined"&&typeof document!=="undefined";var Swn=(e=>{return CTt&&["ReactNative","NativeScript","NS"].indexOf(e)<0})(typeof navigator!=="undefined"&&navigator.product);var Awn=(()=>{return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})();var Cwn=Object.freeze({__proto__:null,hasBrowserEnv:CTt,hasStandardBrowserWebWorkerEnv:Awn,hasStandardBrowserEnv:Swn});var Lf={...Cwn,...bwn};function wwn(e,t){return SJ(e,new Lf.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,s){if(Lf.isNode&&Je.isBuffer(r)){this.append(n,r.toString("base64"));return false}return s.defaultVisitor.apply(this,arguments)}},t))}a(wwn,"toURLEncodedForm");function Twn(e){return Je.matchAll(/\w+|\[(\w*)]/g,e).map(t=>{return t[0]==="[]"?"":t[1]||t[0]})}a(Twn,"parsePropPath");function xwn(e){const t={};const r=Object.keys(e);let n;const i=r.length;let s;for(n=0;n<i;n++){s=r[n];t[s]=e[s]}return t}a(xwn,"arrayToObject");function wTt(e){function t(r,n,i,s){let o=r[s++];const u=Number.isFinite(+o);const l=s>=r.length;o=!o&&Je.isArray(i)?i.length:o;if(l){if(Je.hasOwnProp(i,o)){i[o]=[i[o],n]}else{i[o]=n}return!u}if(!i[o]||!Je.isObject(i[o])){i[o]=[]}const c=t(r,n,i[o],s);if(c&&Je.isArray(i[o])){i[o]=xwn(i[o])}return!u}a(t,"buildPath");if(Je.isFormData(e)&&Je.isFunction(e.entries)){const r={};Je.forEachEntry(e,(n,i)=>{t(Twn(n),i,r,0)});return r}return null}a(wTt,"formDataToJSON");function Rwn(e,t,r){if(Je.isString(e)){try{(t||JSON.parse)(e);return Je.trim(e)}catch(n){if(n.name!=="SyntaxError"){throw n}}}return(r||JSON.stringify)(e)}a(Rwn,"stringifySafely");var uRe={transitional:oRe,adapter:["xhr","http"],transformRequest:[a(function e(t,r){const n=r.getContentType()||"";const i=n.indexOf("application/json")>-1;const s=Je.isObject(t);if(s&&Je.isHTMLForm(t)){t=new FormData(t)}const o=Je.isFormData(t);if(o){if(!i){return t}return i?JSON.stringify(wTt(t)):t}if(Je.isArrayBuffer(t)||Je.isBuffer(t)||Je.isStream(t)||Je.isFile(t)||Je.isBlob(t)){return t}if(Je.isArrayBufferView(t)){return t.buffer}if(Je.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}let u;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1){return wwn(t,this.formSerializer).toString()}if((u=Je.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return SJ(u?{"files[]":t}:t,l&&new l,this.formSerializer)}}if(s||i){r.setContentType("application/json",false);return Rwn(t)}return t},"transformRequest")],transformResponse:[a(function e(t){const r=this.transitional||uRe.transitional;const n=r&&r.forcedJSONParsing;const i=this.responseType==="json";if(t&&Je.isString(t)&&(n&&!this.responseType||i)){const s=r&&r.silentJSONParsing;const o=!s&&i;try{return JSON.parse(t)}catch(u){if(o){if(u.name==="SyntaxError"){throw yr.from(u,yr.ERR_BAD_RESPONSE,this,null,this.response)}throw u}}}return t},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lf.classes.FormData,Blob:Lf.classes.Blob},validateStatus:a(function e(t){return t>=200&&t<300},"validateStatus"),headers:{common:{"Accept":"application/json, text/plain, */*","Content-Type":void 0}}};Je.forEach(["delete","get","head","post","put","patch"],e=>{uRe.headers[e]={}});var lRe=uRe;var Own=Je.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Pwn=a(e=>{const t={};let r;let n;let i;e&&e.split("\n").forEach(a(function s(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&Own[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}},"parser"));return t},"parseHeaders");var Xwt=Symbol("internals");function PF(e){return e&&String(e).trim().toLowerCase()}a(PF,"normalizeHeader");function gJ(e){if(e===false||e==null){return e}return Je.isArray(e)?e.map(gJ):String(e)}a(gJ,"normalizeValue");function Nwn(e){const t=Object.create(null);const r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}a(Nwn,"parseTokens");var Iwn=a(e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()),"isValidHeaderName");function zxe(e,t,r,n,i){if(Je.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!Je.isString(t))return;if(Je.isString(n)){return t.indexOf(n)!==-1}if(Je.isRegExp(n)){return n.test(t)}}a(zxe,"matchHeaderValue");function kwn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>{return r.toUpperCase()+n})}a(kwn,"formatHeader");function Dwn(e,t){const r=Je.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,s,o){return this[n].call(this,t,i,s,o)},configurable:true})})}a(Dwn,"buildAccessors");var iP=class{static{a(this,"AxiosHeaders")}constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function s(u,l,c){const d=PF(l);if(!d){throw new Error("header name must be a non-empty string")}const p=Je.findKey(i,d);if(!p||i[p]===void 0||c===true||c===void 0&&i[p]!==false){i[p||l]=gJ(u)}}a(s,"setHeader");const o=a((u,l)=>Je.forEach(u,(c,d)=>s(c,d,l)),"setHeaders");if(Je.isPlainObject(t)||t instanceof this.constructor){o(t,r)}else if(Je.isString(t)&&(t=t.trim())&&!Iwn(t)){o(Pwn(t),r)}else{t!=null&&s(r,t,n)}return this}get(t,r){t=PF(t);if(t){const n=Je.findKey(this,t);if(n){const i=this[n];if(!r){return i}if(r===true){return Nwn(i)}if(Je.isFunction(r)){return r.call(this,i,n)}if(Je.isRegExp(r)){return r.exec(i)}throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){t=PF(t);if(t){const n=Je.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||zxe(this,this[n],n,r)))}return false}delete(t,r){const n=this;let i=false;function s(o){o=PF(o);if(o){const u=Je.findKey(n,o);if(u&&(!r||zxe(n,n[u],u,r))){delete n[u];i=true}}}a(s,"deleteHeader");if(Je.isArray(t)){t.forEach(s)}else{s(t)}return i}clear(t){const r=Object.keys(this);let n=r.length;let i=false;while(n--){const s=r[n];if(!t||zxe(this,this[s],s,t,true)){delete this[s];i=true}}return i}normalize(t){const r=this;const n={};Je.forEach(this,(i,s)=>{const o=Je.findKey(n,s);if(o){r[o]=gJ(i);delete r[s];return}const u=t?kwn(s):String(s).trim();if(u!==s){delete r[s]}r[u]=gJ(i);n[u]=true});return this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);Je.forEach(this,(n,i)=>{n!=null&&n!==false&&(r[i]=t&&Je.isArray(n)?n.join(", "):n)});return r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);r.forEach(i=>n.set(i));return n}static accessor(t){const r=this[Xwt]=this[Xwt]={accessors:{}};const n=r.accessors;const i=this.prototype;function s(o){const u=PF(o);if(!n[u]){Dwn(i,o);n[u]=true}}a(s,"defineAccessor");Je.isArray(t)?t.forEach(s):s(t);return this}};iP.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Je.reduceDescriptors(iP.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});Je.freezeMethods(iP);var Bf=iP;function Kxe(e,t){const r=this||lRe;const n=t||r;const i=Bf.from(n.headers);let s=n.data;Je.forEach(e,a(function o(u){s=u.call(r,s,i.normalize(),t?t.status:void 0)},"transform"));i.normalize();return s}a(Kxe,"transformData");function TTt(e){return!!(e&&e.__CANCEL__)}a(TTt,"isCancel");function eC(e,t,r){yr.call(this,e==null?"canceled":e,yr.ERR_CANCELED,t,r);this.name="CanceledError"}a(eC,"CanceledError");Je.inherits(eC,yr,{__CANCEL__:true});function NF(e,t,r){const n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new yr("Request failed with status code "+r.status,[yr.ERR_BAD_REQUEST,yr.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}a(NF,"settle");function Lwn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}a(Lwn,"isAbsoluteURL");function Fwn(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}a(Fwn,"combineURLs");function cRe(e,t){if(e&&!Lwn(t)){return Fwn(e,t)}return t}a(cRe,"buildFullPath");var _J="1.6.2";function xTt(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}a(xTt,"parseProtocol");var Bwn=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Mwn(e,t,r){const n=r&&r.Blob||Lf.classes.Blob;const i=xTt(e);if(t===void 0&&n){t=true}if(i==="data"){e=i.length?e.slice(i.length+1):e;const s=Bwn.exec(e);if(!s){throw new yr("Invalid URL",yr.ERR_INVALID_URL)}const o=s[1];const u=s[2];const l=s[3];const c=Buffer.from(decodeURIComponent(l),u?"base64":"utf8");if(t){if(!n){throw new yr("Blob is not supported",yr.ERR_NOT_SUPPORT)}return new n([c],{type:o})}return c}throw new yr("Unsupported protocol "+i,yr.ERR_NOT_SUPPORT)}a(Mwn,"fromDataURI");function qwn(e,t){let r=0;const n=1e3/t;let i=null;return a(function s(o,u){const l=Date.now();if(o||l-r>n){if(i){clearTimeout(i);i=null}r=l;return e.apply(null,u)}if(!i){i=setTimeout(()=>{i=null;r=Date.now();return e.apply(null,u)},n-(l-r))}},"throttled")}a(qwn,"throttle");function RTt(e,t){e=e||10;const r=new Array(e);const n=new Array(e);let i=0;let s=0;let o;t=t!==void 0?t:1e3;return a(function u(l){const c=Date.now();const d=n[s];if(!o){o=c}r[i]=l;n[i]=c;let p=s;let f=0;while(p!==i){f+=r[p++];p=p%e}i=(i+1)%e;if(i===s){s=(s+1)%e}if(c-o<t){return}const m=d&&c-d;return m?Math.round(f*1e3/m):void 0},"push")}a(RTt,"speedometer");var mJ=Symbol("internals");var Qxe=class extends $E["default"].Transform{static{a(this,"AxiosTransformStream")}constructor(t){t=Je.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(u,l)=>{return!Je.isUndefined(l[u])});super({readableHighWaterMark:t.chunkSize});const r=this;const n=this[mJ]={length:t.length,timeWindow:t.timeWindow,ticksRate:t.ticksRate,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:false,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};const i=RTt(n.ticksRate*t.samplesCount,n.timeWindow);this.on("newListener",u=>{if(u==="progress"){if(!n.isCaptured){n.isCaptured=true}}});let s=0;n.updateProgress=qwn(a(function u(){const l=n.length;const c=n.bytesSeen;const d=c-s;if(!d||r.destroyed)return;const p=i(d);s=c;process.nextTick(()=>{r.emit("progress",{"loaded":c,"total":l,"progress":l?c/l:void 0,"bytes":d,"rate":p?p:void 0,"estimated":p&&l&&c<=l?(l-c)/p:void 0})})},"throttledHandler"),n.ticksRate);const o=a(()=>{n.updateProgress(true)},"onFinish");this.once("end",o);this.once("error",o)}_read(t){const r=this[mJ];if(r.onReadCallback){r.onReadCallback()}return super._read(t)}_transform(t,r,n){const i=this;const s=this[mJ];const o=s.maxRate;const u=this.readableHighWaterMark;const l=s.timeWindow;const c=1e3/l;const d=o/c;const p=s.minChunkSize!==false?Math.max(s.minChunkSize,d*.01):0;function f(h,g){const _=Buffer.byteLength(h);s.bytesSeen+=_;s.bytes+=_;if(s.isCaptured){s.updateProgress()}if(i.push(h)){process.nextTick(g)}else{s.onReadCallback=()=>{s.onReadCallback=null;process.nextTick(g)}}}a(f,"pushChunk");const m=a((h,g)=>{const _=Buffer.byteLength(h);let v=null;let S=u;let E;let b=0;if(o){const A=Date.now();if(!s.ts||(b=A-s.ts)>=l){s.ts=A;E=d-s.bytes;s.bytes=E<0?-E:0;b=0}E=d-s.bytes}if(o){if(E<=0){return setTimeout(()=>{g(null,h)},l-b)}if(E<S){S=E}}if(S&&_>S&&_-S>p){v=h.subarray(S);h=h.subarray(0,S)}f(h,v?()=>{process.nextTick(g,null,v)}:g)},"transformChunk");m(t,a(function h(g,_){if(g){return n(g)}if(_){m(_,h)}else{n(null)}},"transformNextChunk"))}setLength(t){this[mJ].length=+t;return this}};var Jwt=Qxe;var{asyncIterator:Qwt}=Symbol;var Uwn=a(async function*(e){if(e.stream){yield*e.stream()}else if(e.arrayBuffer){yield await e.arrayBuffer()}else if(e[Qwt]){yield*e[Qwt]()}else{yield e}},"readBlob");var OTt=Uwn;var $wn=Je.ALPHABET.ALPHA_DIGIT+"-_";var kF=new uTt.TextEncoder;var jE="\r\n";var jwn=kF.encode(jE);var Gwn=2;var Zxe=class{static{a(this,"FormDataPart")}constructor(t,r){const{escapeName:n}=this.constructor;const i=Je.isString(r);let s=`Content-Disposition: form-data; name="${n(t)}"${!i&&r.name?`; filename="${n(r.name)}"`:""}${jE}`;if(i){r=kF.encode(String(r).replace(/\r?\n|\r\n?/g,jE))}else{s+=`Content-Type: ${r.type||"application/octet-stream"}${jE}`}this.headers=kF.encode(s+jE);this.contentLength=i?r.byteLength:r.size;this.size=this.headers.byteLength+this.contentLength+Gwn;this.name=t;this.value=r}async*encode(){yield this.headers;const{value:t}=this;if(Je.isTypedArray(t)){yield t}else{yield*OTt(t)}yield jwn}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}};var Hwn=a((e,t,r)=>{const{tag:n="form-data-boundary",size:i=25,boundary:s=n+"-"+Je.generateString(i,$wn)}=r||{};if(!Je.isFormData(e)){throw TypeError("FormData instance required")}if(s.length<1||s.length>70){throw Error("boundary must be 10-70 characters long")}const o=kF.encode("--"+s+jE);const u=kF.encode("--"+s+"--"+jE+jE);let l=u.byteLength;const c=Array.from(e.entries()).map(([p,f])=>{const m=new Zxe(p,f);l+=m.size;return m});l+=o.byteLength*c.length;l=Je.toFiniteNumber(l);const d={"Content-Type":`multipart/form-data; boundary=${s}`};if(Number.isFinite(l)){d["Content-Length"]=l}t&&t(d);return lTt.Readable.from(async function*(){for(const p of c){yield o;yield*p.encode()}yield u}())},"formDataToStream");var Vwn=Hwn;var eRe=class extends $E["default"].Transform{static{a(this,"ZlibHeaderTransformStream")}__transform(t,r,n){this.push(t);n()}_transform(t,r,n){if(t.length!==0){this._transform=this.__transform;if(t[0]!==120){const i=Buffer.alloc(2);i[0]=120;i[1]=156;this.push(i,r)}}this.__transform(t,r,n)}};var zwn=eRe;var Kwn=a((e,t)=>{return Je.isAsyncFn(e)?function(...r){const n=r.pop();e.apply(this,r).then(i=>{try{t?n(null,...t(i)):n(null,i)}catch(s){n(s)}},n)}:e},"callbackify");var Wwn=Kwn;var Zwt={flush:GE["default"].constants.Z_SYNC_FLUSH,finishFlush:GE["default"].constants.Z_SYNC_FLUSH};var Ywn={flush:GE["default"].constants.BROTLI_OPERATION_FLUSH,finishFlush:GE["default"].constants.BROTLI_OPERATION_FLUSH};var eTt=Je.isFunction(GE["default"].createBrotliDecompress);var{http:Xwn,https:Jwn}=LCn["default"];var Qwn=/https:?/;var tTt=Lf.protocols.map(e=>{return e+":"});function Zwn(e){if(e.beforeRedirects.proxy){e.beforeRedirects.proxy(e)}if(e.beforeRedirects.config){e.beforeRedirects.config(e)}}a(Zwn,"dispatchBeforeRedirect");function PTt(e,t,r){let n=t;if(!n&&n!==false){const i=wCn.getProxyForUrl(r);if(i){n=new URL(i)}}if(n){if(n.username){n.auth=(n.username||"")+":"+(n.password||"")}if(n.auth){if(n.auth.username||n.auth.password){n.auth=(n.auth.username||"")+":"+(n.auth.password||"")}const s=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+s}e.headers.host=e.hostname+(e.port?":"+e.port:"");const i=n.hostname||n.host;e.hostname=i;e.host=i;e.port=n.port;e.path=r;if(n.protocol){e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`}}e.beforeRedirects.proxy=a(function i(s){PTt(s,t,s.href)},"beforeRedirect")}a(PTt,"setProxy");var eTn=typeof process!=="undefined"&&Je.kindOf(process)==="process";var tTn=a(e=>{return new Promise((t,r)=>{let n;let i;const s=a((l,c)=>{if(i)return;i=true;n&&n(l,c)},"done");const o=a(l=>{s(l);t(l)},"_resolve");const u=a(l=>{s(l,true);r(l)},"_reject");e(o,u,l=>n=l).catch(u)})},"wrapAsync");var rTn=a(({address:e,family:t})=>{if(!Je.isString(e)){throw TypeError("address must be a string")}return{address:e,family:t||(e.indexOf(".")<0?6:4)}},"resolveFamily");var rTt=a((e,t)=>rTn(Je.isObject(e)?e:{address:e,family:t}),"buildAddressEntry");var nTn=eTn&&a(function e(t){return tTn(a(async function r(n,i,s){let{data:o,lookup:u,family:l}=t;const{responseType:c,responseEncoding:d}=t;const p=t.method.toUpperCase();let f;let m=false;let h;if(u){const he=Wwn(u,Fe=>Je.isArray(Fe)?Fe:[Fe]);u=a((Fe,Oe,M)=>{he(Fe,Oe,(Q,fe,B)=>{const ye=Je.isArray(fe)?fe.map(De=>rTt(De)):[rTt(fe,B)];Oe.all?M(Q,ye):M(Q,ye[0].address,ye[0].family)})},"lookup")}const g=new FCn["default"];const _=a(()=>{if(t.cancelToken){t.cancelToken.unsubscribe(v)}if(t.signal){t.signal.removeEventListener("abort",v)}g.removeAllListeners()},"onFinished");s((he,Fe)=>{f=true;if(Fe){m=true;_()}});function v(he){g.emit("abort",!he||he.type?new eC(null,t,h):he)}a(v,"abort");g.once("abort",i);if(t.cancelToken||t.signal){t.cancelToken&&t.cancelToken.subscribe(v);if(t.signal){t.signal.aborted?v():t.signal.addEventListener("abort",v)}}const S=cRe(t.baseURL,t.url);const E=new URL(S,"http://localhost");const b=E.protocol||tTt[0];if(b==="data:"){let he;if(p!=="GET"){return NF(n,i,{status:405,statusText:"method not allowed",headers:{},config:t})}try{he=Mwn(t.url,c==="blob",{Blob:t.env&&t.env.Blob})}catch(Fe){throw yr.from(Fe,yr.ERR_BAD_REQUEST,t)}if(c==="text"){he=he.toString(d);if(!d||d==="utf8"){he=Je.stripBOM(he)}}else if(c==="stream"){he=$E["default"].Readable.from(he)}return NF(n,i,{data:he,status:200,statusText:"OK",headers:new Bf,config:t})}if(tTt.indexOf(b)===-1){return i(new yr("Unsupported protocol "+b,yr.ERR_BAD_REQUEST,t))}const A=Bf.from(t.headers).normalize();A.set("User-Agent","axios/"+_J,false);const C=t.onDownloadProgress;const T=t.onUploadProgress;const O=t.maxRate;let P=void 0;let R=void 0;if(Je.isSpecCompliantForm(o)){const he=A.getContentType(/boundary=([-_\w\d]{10,70})/i);o=Vwn(o,Fe=>{A.set(Fe)},{tag:`axios-${_J}-boundary`,boundary:he&&he[1]||void 0})}else if(Je.isFormData(o)&&Je.isFunction(o.getHeaders)){A.set(o.getHeaders());if(!A.hasContentLength()){try{const he=await DCn["default"].promisify(o.getLength).call(o);Number.isFinite(he)&&he>=0&&A.setContentLength(he)}catch(he){}}}else if(Je.isBlob(o)){o.size&&A.setContentType(o.type||"application/octet-stream");A.setContentLength(o.size||0);o=$E["default"].Readable.from(OTt(o))}else if(o&&!Je.isStream(o)){if(Buffer.isBuffer(o));else if(Je.isArrayBuffer(o)){o=Buffer.from(new Uint8Array(o))}else if(Je.isString(o)){o=Buffer.from(o,"utf-8")}else{return i(new yr("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",yr.ERR_BAD_REQUEST,t))}A.setContentLength(o.length,false);if(t.maxBodyLength>-1&&o.length>t.maxBodyLength){return i(new yr("Request body larger than maxBodyLength limit",yr.ERR_BAD_REQUEST,t))}}const I=Je.toFiniteNumber(A.getContentLength());if(Je.isArray(O)){P=O[0];R=O[1]}else{P=R=O}if(o&&(T||P)){if(!Je.isStream(o)){o=$E["default"].Readable.from(o,{objectMode:false})}o=$E["default"].pipeline([o,new Jwt({length:I,maxRate:Je.toFiniteNumber(P)})],Je.noop);T&&o.on("progress",he=>{T(Object.assign(he,{upload:true}))})}let D=void 0;if(t.auth){const he=t.auth.username||"";const Fe=t.auth.password||"";D=he+":"+Fe}if(!D&&E.username){const he=E.username;const Fe=E.password;D=he+":"+Fe}D&&A.delete("authorization");let U;try{U=aRe(E.pathname+E.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(he){const Fe=new Error(he.message);Fe.config=t;Fe.url=t.url;Fe.exists=true;return i(Fe)}A.set("Accept-Encoding","gzip, compress, deflate"+(eTt?", br":""),false);const te={path:U,method:p,headers:A.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:D,protocol:b,family:l,beforeRedirect:Zwn,beforeRedirects:{}};!Je.isUndefined(u)&&(te.lookup=u);if(t.socketPath){te.socketPath=t.socketPath}else{te.hostname=E.hostname;te.port=E.port;PTt(te,t.proxy,b+"//"+E.hostname+(E.port?":"+E.port:"")+te.path)}let ve;const me=Qwn.test(te.protocol);te.agent=me?t.httpsAgent:t.httpAgent;if(t.transport){ve=t.transport}else if(t.maxRedirects===0){ve=me?kCn["default"]:ICn["default"]}else{if(t.maxRedirects){te.maxRedirects=t.maxRedirects}if(t.beforeRedirect){te.beforeRedirects.config=t.beforeRedirect}ve=me?Jwn:Xwn}if(t.maxBodyLength>-1){te.maxBodyLength=t.maxBodyLength}else{te.maxBodyLength=Infinity}if(t.insecureHTTPParser){te.insecureHTTPParser=t.insecureHTTPParser}h=ve.request(te,a(function he(Fe){if(h.destroyed)return;const Oe=[Fe];const M=+Fe.headers["content-length"];if(C){const De=new Jwt({length:Je.toFiniteNumber(M),maxRate:Je.toFiniteNumber(R)});C&&De.on("progress",$e=>{C(Object.assign($e,{download:true}))});Oe.push(De)}let Q=Fe;const fe=Fe.req||h;if(t.decompress!==false&&Fe.headers["content-encoding"]){if(p==="HEAD"||Fe.statusCode===204){delete Fe.headers["content-encoding"]}switch((Fe.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Oe.push(GE["default"].createUnzip(Zwt));delete Fe.headers["content-encoding"];break;case"deflate":Oe.push(new zwn);Oe.push(GE["default"].createUnzip(Zwt));delete Fe.headers["content-encoding"];break;case"br":if(eTt){Oe.push(GE["default"].createBrotliDecompress(Ywn));delete Fe.headers["content-encoding"]}}}Q=Oe.length>1?$E["default"].pipeline(Oe,Je.noop):Oe[0];const B=$E["default"].finished(Q,()=>{B();_()});const ye={status:Fe.statusCode,statusText:Fe.statusMessage,headers:new Bf(Fe.headers),config:t,request:fe};if(c==="stream"){ye.data=Q;NF(n,i,ye)}else{const De=[];let $e=0;Q.on("data",a(function gt(ut){De.push(ut);$e+=ut.length;if(t.maxContentLength>-1&&$e>t.maxContentLength){m=true;Q.destroy();i(new yr("maxContentLength size of "+t.maxContentLength+" exceeded",yr.ERR_BAD_RESPONSE,t,fe))}},"handleStreamData"));Q.on("aborted",a(function gt(){if(m){return}const ut=new yr("maxContentLength size of "+t.maxContentLength+" exceeded",yr.ERR_BAD_RESPONSE,t,fe);Q.destroy(ut);i(ut)},"handlerStreamAborted"));Q.on("error",a(function gt(ut){if(h.destroyed)return;i(yr.from(ut,null,t,fe))},"handleStreamError"));Q.on("end",a(function gt(){try{let ut=De.length===1?De[0]:Buffer.concat(De);if(c!=="arraybuffer"){ut=ut.toString(d);if(!d||d==="utf8"){ut=Je.stripBOM(ut)}}ye.data=ut}catch(ut){return i(yr.from(ut,null,t,ye.request,ye))}NF(n,i,ye)},"handleStreamEnd"))}g.once("abort",De=>{if(!Q.destroyed){Q.emit("error",De);Q.destroy()}})},"handleResponse"));g.once("abort",he=>{i(he);h.destroy(he)});h.on("error",a(function he(Fe){i(yr.from(Fe,null,t,h))},"handleRequestError"));h.on("socket",a(function he(Fe){Fe.setKeepAlive(true,1e3*60)},"handleRequestSocket"));if(t.timeout){const he=parseInt(t.timeout,10);if(Number.isNaN(he)){i(new yr("error trying to parse `config.timeout` to int",yr.ERR_BAD_OPTION_VALUE,t,h));return}h.setTimeout(he,a(function Fe(){if(f)return;let Oe=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const M=t.transitional||oRe;if(t.timeoutErrorMessage){Oe=t.timeoutErrorMessage}i(new yr(Oe,M.clarifyTimeoutError?yr.ETIMEDOUT:yr.ECONNABORTED,t,h));v()},"handleRequestTimeout"))}if(Je.isStream(o)){let he=false;let Fe=false;o.on("end",()=>{he=true});o.once("error",Oe=>{Fe=true;h.destroy(Oe)});o.on("close",()=>{if(!he&&!Fe){v(new eC("Request stream has been aborted",t,h))}});o.pipe(h)}else{h.end(o)}},"dispatchHttpRequest"))},"httpAdapter");var iTn=Lf.hasStandardBrowserEnv?{write(e,t,r,n,i,s){const o=[e+"="+encodeURIComponent(t)];Je.isNumber(r)&&o.push("expires="+new Date(r).toGMTString());Je.isString(n)&&o.push("path="+n);Je.isString(i)&&o.push("domain="+i);s===true&&o.push("secure");document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var sTn=Lf.hasStandardBrowserEnv?a(function e(){const t=/(msie|trident)/i.test(navigator.userAgent);const r=document.createElement("a");let n;function i(s){let o=s;if(t){r.setAttribute("href",o);o=r.href}r.setAttribute("href",o);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}a(i,"resolveURL");n=i(window.location.href);return a(function s(o){const u=Je.isString(o)?i(o):o;return u.protocol===n.protocol&&u.host===n.host},"isURLSameOrigin")},"standardBrowserEnv")():a(function e(){return a(function t(){return true},"isURLSameOrigin")},"nonStandardBrowserEnv")();function nTt(e,t){let r=0;const n=RTt(50,250);return i=>{const s=i.loaded;const o=i.lengthComputable?i.total:void 0;const u=s-r;const l=n(u);const c=s<=o;r=s;const d={loaded:s,total:o,progress:o?s/o:void 0,bytes:u,rate:l?l:void 0,estimated:l&&o&&c?(o-s)/l:void 0,event:i};d[t?"download":"upload"]=true;e(d)}}a(nTt,"progressEventReducer");var aTn=typeof XMLHttpRequest!=="undefined";var oTn=aTn&&function(e){return new Promise(a(function t(r,n){let i=e.data;const s=Bf.from(e.headers).normalize();let{responseType:o,withXSRFToken:u}=e;let l;function c(){if(e.cancelToken){e.cancelToken.unsubscribe(l)}if(e.signal){e.signal.removeEventListener("abort",l)}}a(c,"done");let d;if(Je.isFormData(i)){if(Lf.hasStandardBrowserEnv||Lf.hasStandardBrowserWebWorkerEnv){s.setContentType(false)}else if((d=s.getContentType())!==false){const[g,..._]=d?d.split(";").map(v=>v.trim()).filter(Boolean):[];s.setContentType([g||"multipart/form-data",..._].join("; "))}}let p=new XMLHttpRequest;if(e.auth){const g=e.auth.username||"";const _=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(g+":"+_))}const f=cRe(e.baseURL,e.url);p.open(e.method.toUpperCase(),aRe(f,e.params,e.paramsSerializer),true);p.timeout=e.timeout;function m(){if(!p){return}const g=Bf.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders());const _=!o||o==="text"||o==="json"?p.responseText:p.response;const v={data:_,status:p.status,statusText:p.statusText,headers:g,config:e,request:p};NF(a(function S(E){r(E);c()},"_resolve"),a(function S(E){n(E);c()},"_reject"),v);p=null}a(m,"onloadend");if("onloadend"in p){p.onloadend=m}else{p.onreadystatechange=a(function g(){if(!p||p.readyState!==4){return}if(p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)){return}setTimeout(m)},"handleLoad")}p.onabort=a(function g(){if(!p){return}n(new yr("Request aborted",yr.ECONNABORTED,e,p));p=null},"handleAbort");p.onerror=a(function g(){n(new yr("Network Error",yr.ERR_NETWORK,e,p));p=null},"handleError");p.ontimeout=a(function g(){let _=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const v=e.transitional||oRe;if(e.timeoutErrorMessage){_=e.timeoutErrorMessage}n(new yr(_,v.clarifyTimeoutError?yr.ETIMEDOUT:yr.ECONNABORTED,e,p));p=null},"handleTimeout");if(Lf.hasStandardBrowserEnv){u&&Je.isFunction(u)&&(u=u(e));if(u||u!==false&&sTn(f)){const g=e.xsrfHeaderName&&e.xsrfCookieName&&iTn.read(e.xsrfCookieName);if(g){s.set(e.xsrfHeaderName,g)}}}i===void 0&&s.setContentType(null);if("setRequestHeader"in p){Je.forEach(s.toJSON(),a(function g(_,v){p.setRequestHeader(v,_)},"setRequestHeader"))}if(!Je.isUndefined(e.withCredentials)){p.withCredentials=!!e.withCredentials}if(o&&o!=="json"){p.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){p.addEventListener("progress",nTt(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&p.upload){p.upload.addEventListener("progress",nTt(e.onUploadProgress))}if(e.cancelToken||e.signal){l=a(g=>{if(!p){return}n(!g||g.type?new eC(null,e,p):g);p.abort();p=null},"onCanceled");e.cancelToken&&e.cancelToken.subscribe(l);if(e.signal){e.signal.aborted?l():e.signal.addEventListener("abort",l)}}const h=xTt(f);if(h&&Lf.protocols.indexOf(h)===-1){n(new yr("Unsupported protocol "+h+":",yr.ERR_BAD_REQUEST,e));return}p.send(i||null)},"dispatchXhrRequest"))};var tRe={http:nTn,xhr:oTn};Je.forEach(tRe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});var iTt=a(e=>`- ${e}`,"renderReason");var uTn=a(e=>Je.isFunction(e)||e===null||e===false,"isResolvedHandle");var NTt={getAdapter:e=>{e=Je.isArray(e)?e:[e];const{length:t}=e;let r;let n;const i={};for(let s=0;s<t;s++){r=e[s];let o;n=r;if(!uTn(r)){n=tRe[(o=String(r)).toLowerCase()];if(n===void 0){throw new yr(`Unknown adapter '${o}'`)}}if(n){break}i[o||"#"+s]=n}if(!n){const s=Object.entries(i).map(([u,l])=>`adapter ${u} `+(l===false?"is not supported by the environment":"is not available in the build"));let o=t?s.length>1?"since :\n"+s.map(iTt).join("\n"):" "+iTt(s[0]):"as no adapter specified";throw new yr(`There is no suitable adapter to dispatch the request `+o,"ERR_NOT_SUPPORT")}return n},adapters:tRe};function Wxe(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new eC(null,e)}}a(Wxe,"throwIfCancellationRequested");function sTt(e){Wxe(e);e.headers=Bf.from(e.headers);e.data=Kxe.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}const t=NTt.getAdapter(e.adapter||lRe.adapter);return t(e).then(a(function r(n){Wxe(e);n.data=Kxe.call(e,e.transformResponse,n);n.headers=Bf.from(n.headers);return n},"onAdapterResolution"),a(function r(n){if(!TTt(n)){Wxe(e);if(n&&n.response){n.response.data=Kxe.call(e,e.transformResponse,n.response);n.response.headers=Bf.from(n.response.headers)}}return Promise.reject(n)},"onAdapterRejection"))}a(sTt,"dispatchRequest");var aTt=a(e=>e instanceof Bf?e.toJSON():e,"headersToObject");function sP(e,t){t=t||{};const r={};function n(c,d,p){if(Je.isPlainObject(c)&&Je.isPlainObject(d)){return Je.merge.call({caseless:p},c,d)}else if(Je.isPlainObject(d)){return Je.merge({},d)}else if(Je.isArray(d)){return d.slice()}return d}a(n,"getMergedValue");function i(c,d,p){if(!Je.isUndefined(d)){return n(c,d,p)}else if(!Je.isUndefined(c)){return n(void 0,c,p)}}a(i,"mergeDeepProperties");function s(c,d){if(!Je.isUndefined(d)){return n(void 0,d)}}a(s,"valueFromConfig2");function o(c,d){if(!Je.isUndefined(d)){return n(void 0,d)}else if(!Je.isUndefined(c)){return n(void 0,c)}}a(o,"defaultToConfig2");function u(c,d,p){if(p in t){return n(c,d)}else if(p in e){return n(void 0,c)}}a(u,"mergeDirectKeys");const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u,headers:(c,d)=>i(aTt(c),aTt(d),true)};Je.forEach(Object.keys(Object.assign({},e,t)),a(function c(d){const p=l[d]||i;const f=p(e[d],t[d],d);Je.isUndefined(f)&&p!==u||(r[d]=f)},"computeConfigValue"));return r}a(sP,"mergeConfig");var dRe={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{dRe[e]=a(function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e},"validator")});var oTt={};dRe.transitional=a(function e(t,r,n){function i(s,o){return"[Axios v"+_J+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}a(i,"formatMessage");return(s,o,u)=>{if(t===false){throw new yr(i(o," has been removed"+(r?" in "+r:"")),yr.ERR_DEPRECATED)}if(r&&!oTt[o]){oTt[o]=true;console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(s,o,u):true}},"transitional");function lTn(e,t,r){if(typeof e!=="object"){throw new yr("options must be an object",yr.ERR_BAD_OPTION_VALUE)}const n=Object.keys(e);let i=n.length;while(i-- >0){const s=n[i];const o=t[s];if(o){const u=e[s];const l=u===void 0||o(u,s,e);if(l!==true){throw new yr("option "+s+" must be "+l,yr.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new yr("Unknown option "+s,yr.ERR_BAD_OPTION)}}}a(lTn,"assertOptions");var rRe={assertOptions:lTn,validators:dRe};var UE=rRe.validators;var aP=class{static{a(this,"Axios")}constructor(t){this.defaults=t;this.interceptors={request:new Ywt,response:new Ywt}}request(t,r){if(typeof t==="string"){r=r||{};r.url=t}else{r=t||{}}r=sP(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:s}=r;if(n!==void 0){rRe.assertOptions(n,{silentJSONParsing:UE.transitional(UE.boolean),forcedJSONParsing:UE.transitional(UE.boolean),clarifyTimeoutError:UE.transitional(UE.boolean)},false)}if(i!=null){if(Je.isFunction(i)){r.paramsSerializer={serialize:i}}else{rRe.assertOptions(i,{encode:UE.function,serialize:UE.function},true)}}r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=s&&Je.merge(s.common,s[r.method]);s&&Je.forEach(["delete","get","head","post","put","patch","common"],h=>{delete s[h]});r.headers=Bf.concat(o,s);const u=[];let l=true;this.interceptors.request.forEach(a(function h(g){if(typeof g.runWhen==="function"&&g.runWhen(r)===false){return}l=l&&g.synchronous;u.unshift(g.fulfilled,g.rejected)},"unshiftRequestInterceptors"));const c=[];this.interceptors.response.forEach(a(function h(g){c.push(g.fulfilled,g.rejected)},"pushResponseInterceptors"));let d;let p=0;let f;if(!l){const h=[sTt.bind(this),void 0];h.unshift.apply(h,u);h.push.apply(h,c);f=h.length;d=Promise.resolve(r);while(p<f){d=d.then(h[p++],h[p++])}return d}f=u.length;let m=r;p=0;while(p<f){const h=u[p++];const g=u[p++];try{m=h(m)}catch(_){g.call(this,_);break}}try{d=sTt.call(this,m)}catch(h){return Promise.reject(h)}p=0;f=c.length;while(p<f){d=d.then(c[p++],c[p++])}return d}getUri(t){t=sP(this.defaults,t);const r=cRe(t.baseURL,t.url);return aRe(r,t.params,t.paramsSerializer)}};Je.forEach(["delete","get","head","options"],a(function e(t){aP.prototype[t]=function(r,n){return this.request(sP(n||{},{method:t,url:r,data:(n||{}).data}))}},"forEachMethodNoData"));Je.forEach(["post","put","patch"],a(function e(t){function r(n){return a(function i(s,o,u){return this.request(sP(u||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))},"httpMethod")}a(r,"generateHTTPMethod");aP.prototype[t]=r();aP.prototype[t+"Form"]=r(true)},"forEachMethodWithData"));var yJ=aP;var nRe=class e{static{a(this,"CancelToken")}constructor(t){if(typeof t!=="function"){throw new TypeError("executor must be a function.")}let r;this.promise=new Promise(a(function i(s){r=s},"promiseExecutor"));const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;while(s-- >0){n._listeners[s](i)}n._listeners=null});this.promise.then=i=>{let s;const o=new Promise(u=>{n.subscribe(u);s=u}).then(i);o.cancel=a(function u(){n.unsubscribe(s)},"reject");return o};t(a(function i(s,o,u){if(n.reason){return}n.reason=new eC(s,o,u);r(n.reason)},"cancel"))}throwIfRequested(){if(this.reason){throw this.reason}}subscribe(t){if(this.reason){t(this.reason);return}if(this._listeners){this._listeners.push(t)}else{this._listeners=[t]}}unsubscribe(t){if(!this._listeners){return}const r=this._listeners.indexOf(t);if(r!==-1){this._listeners.splice(r,1)}}static source(){let t;const r=new e(a(function n(i){t=i},"executor"));return{token:r,cancel:t}}};var cTn=nRe;function dTn(e){return a(function t(r){return e.apply(null,r)},"wrap")}a(dTn,"spread");function pTn(e){return Je.isObject(e)&&e.isAxiosError===true}a(pTn,"isAxiosError");var iRe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(iRe).forEach(([e,t])=>{iRe[t]=e});var fTn=iRe;function ITt(e){const t=new yJ(e);const r=dTt(yJ.prototype.request,t);Je.extend(r,yJ.prototype,t,{allOwnKeys:true});Je.extend(r,t,null,{allOwnKeys:true});r.create=a(function n(i){return ITt(sP(e,i))},"create");return r}a(ITt,"createInstance");var Lo=ITt(lRe);Lo.Axios=yJ;Lo.CanceledError=eC;Lo.CancelToken=cTn;Lo.isCancel=TTt;Lo.VERSION=_J;Lo.toFormData=SJ;Lo.AxiosError=yr;Lo.Cancel=Lo.CanceledError;Lo.all=a(function e(t){return Promise.all(t)},"all");Lo.spread=dTn;Lo.isAxiosError=pTn;Lo.mergeConfig=sP;Lo.AxiosHeaders=Bf;Lo.formToJSON=e=>wTt(Je.isHTMLForm(e)?new FormData(e):e);Lo.getAdapter=NTt.getAdapter;Lo.HttpStatusCode=fTn;Lo.default=Lo;kTt.exports=Lo});var wJ=y(CJ=>{"use strict";Object.defineProperty(CJ,"__esModule",{value:true});CJ.CredentialsMethod=void 0;var DTt;(function(e){e["None"]="none";e["ApiToken"]="api_token";e["ClientCredentials"]="client_credentials"})(DTt||(CJ.CredentialsMethod=DTt={}))});var rC=y(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:true});Fo.FgaRequiredParamError=Fo.FgaValidationError=Fo.FgaApiAuthenticationError=Fo.FgaApiInternalError=Fo.FgaApiRateLimitExceededError=Fo.FgaApiNotFoundError=Fo.FgaApiValidationError=Fo.FgaApiError=Fo.FgaError=void 0;var uP=class extends Error{static{a(this,"FgaError")}constructor(t,r){super(r||typeof t==="string"?t:`FGA Error${(t===null||t===void 0?void 0:t.message)?`: ${t.message}`:""}`);this.name="FgaError";if(t===null||t===void 0?void 0:t.stack){this.stack=t.stack}}};Fo.FgaError=uP;function xJ(e){let t=(e||"").split("/");if(t.length<4){t=[]}const r=t[2]||"";const n=t[3]||"";return{storeId:r,endpointCategory:n}}a(xJ,"getRequestMetadataFromPath");var LTt="fga-request-id";function _Re(e){return e.response?Object.fromEntries(Object.entries(e.response.headers).map(([t,r])=>[t.toLowerCase(),r])):{}}a(_Re,"getResponseHeaders");var tC=class extends uP{static{a(this,"FgaApiError")}constructor(t,r){var n,i,s,o,u,l,c,d,p,f;super(r?r:t);this.name="FgaApiError";this.statusCode=(n=t.response)===null||n===void 0?void 0:n.status;this.statusText=(i=t.response)===null||i===void 0?void 0:i.statusText;this.requestData=(s=t.config)===null||s===void 0?void 0:s.data;this.requestURL=(o=t.config)===null||o===void 0?void 0:o.url;this.method=(u=t.config)===null||u===void 0?void 0:u.method;const{storeId:m,endpointCategory:h}=xJ((l=t.request)===null||l===void 0?void 0:l.path);this.storeId=m;this.endpointCategory=h;this.apiErrorMessage=(d=(c=t.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.message;this.responseData=(p=t.response)===null||p===void 0?void 0:p.data;this.responseHeader=(f=t.response)===null||f===void 0?void 0:f.headers;const g=_Re(t);this.requestId=g[LTt];if(t===null||t===void 0?void 0:t.stack){this.stack=t.stack}}};Fo.FgaApiError=tC;var pRe=class extends tC{static{a(this,"FgaApiValidationError")}constructor(t,r){var n,i,s,o,u,l,c,d;super(t);this.name="FgaApiValidationError";this.apiErrorCode=(i=(n=t.response)===null||n===void 0?void 0:n.data)===null||i===void 0?void 0:i.code;const{endpointCategory:p}=xJ((s=t.request)===null||s===void 0?void 0:s.path);this.message=r?r:((u=(o=t.response)===null||o===void 0?void 0:o.data)===null||u===void 0?void 0:u.message)?`FGA API Validation Error: ${(l=t.config)===null||l===void 0?void 0:l.method} ${p} : Error ${(d=(c=t.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.message}`:t.message}};Fo.FgaApiValidationError=pRe;var fRe=class extends tC{static{a(this,"FgaApiNotFoundError")}constructor(t,r){var n,i,s,o,u,l,c;super(t);this.name="FgaApiNotFoundError";this.apiErrorCode=(i=(n=t.response)===null||n===void 0?void 0:n.data)===null||i===void 0?void 0:i.code;this.message=r?r:((o=(s=t.response)===null||s===void 0?void 0:s.data)===null||o===void 0?void 0:o.message)?`FGA API NotFound Error: ${(u=t.config)===null||u===void 0?void 0:u.method} : Error ${(c=(l=t.response)===null||l===void 0?void 0:l.data)===null||c===void 0?void 0:c.message}`:t.message}};Fo.FgaApiNotFoundError=fRe;var mRe=class extends tC{static{a(this,"FgaApiRateLimitExceededError")}constructor(t,r){var n,i,s;super(t);this.name="FgaApiRateLimitExceededError";this.apiErrorCode=(i=(n=t.response)===null||n===void 0?void 0:n.data)===null||i===void 0?void 0:i.code;const{endpointCategory:o}=xJ((s=t.request)===null||s===void 0?void 0:s.path);const u=_Re(t);this.message=r?r:`FGA API Rate Limit Error for ${this.method} ${o}`}};Fo.FgaApiRateLimitExceededError=mRe;var hRe=class extends tC{static{a(this,"FgaApiInternalError")}constructor(t,r){var n,i,s,o,u,l,c,d;super(t);this.name="FgaApiInternalError";const{endpointCategory:p}=xJ((n=t.request)===null||n===void 0?void 0:n.path);this.apiErrorCode=(s=(i=t.response)===null||i===void 0?void 0:i.data)===null||s===void 0?void 0:s.code;this.message=r?r:((u=(o=t.response)===null||o===void 0?void 0:o.data)===null||u===void 0?void 0:u.message)?`FGA API Internal Error: ${(l=t.config)===null||l===void 0?void 0:l.method} ${p} : Error ${(d=(c=t.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.message}`:t.message}};Fo.FgaApiInternalError=hRe;var gRe=class extends uP{static{a(this,"FgaApiAuthenticationError")}constructor(t){var r,n,i,s,o,u,l,c,d,p;super(`FGA Authentication Error.${((r=t.response)===null||r===void 0?void 0:r.statusText)?` ${t.response.statusText}`:""}`);this.name="FgaApiAuthenticationError";this.statusCode=(n=t.response)===null||n===void 0?void 0:n.status;this.statusText=(i=t.response)===null||i===void 0?void 0:i.statusText;this.requestURL=(s=t.config)===null||s===void 0?void 0:s.url;this.method=(o=t.config)===null||o===void 0?void 0:o.method;this.responseData=(u=t.response)===null||u===void 0?void 0:u.data;this.responseHeader=(l=t.response)===null||l===void 0?void 0:l.headers;this.apiErrorCode=(d=(c=t.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.code;const f=_Re(t);this.requestId=f[LTt];let m;try{m=JSON.parse(((p=t.config)===null||p===void 0?void 0:p.data)||"{}")}catch(h){}this.clientId=m===null||m===void 0?void 0:m.client_id;this.audience=m===null||m===void 0?void 0:m.audience;this.grantType=m===null||m===void 0?void 0:m.grant_type;if(t===null||t===void 0?void 0:t.stack){this.stack=t.stack}}};Fo.FgaApiAuthenticationError=gRe;var TJ=class extends uP{static{a(this,"FgaValidationError")}constructor(t,r){super(r);this.field=t;this.name="FgaValidationError"}};Fo.FgaValidationError=TJ;var yRe=class extends TJ{static{a(this,"FgaRequiredParamError")}constructor(t,r,n){super(r,n);this.functionName=t;this.name="FgaRequiredParamError"}};Fo.FgaRequiredParamError=yRe});var LF=y(HE=>{"use strict";Object.defineProperty(HE,"__esModule",{value:true});HE.isWellFormedUlidString=HE.isWellFormedUriString=HE.assertParamExists=void 0;var mTn=rC();var hTn=a(function(e,t,r){if(r===null||r===void 0){throw new mTn.FgaRequiredParamError(e,t,`Required parameter ${t} was null or undefined when calling ${e}.`)}},"assertParamExists");HE.assertParamExists=hTn;var gTn=a(e=>{try{const t=new URL(e);return(t.toString()===e||t.toString()===`${e}/`)&&(t.protocol==="https:"||t.protocol==="http:")}catch(t){return false}},"isWellFormedUriString");HE.isWellFormedUriString=gTn;var yTn=a(e=>{var t;const r=/^[0-7][0-9A-HJKMNP-TV-Z]{25}$/;return!!(typeof e==="string"&&((t=e.match(r))===null||t===void 0?void 0:t.length))},"isWellFormedUlidString");HE.isWellFormedUlidString=yTn});var ERe=y(lP=>{"use strict";Object.defineProperty(lP,"__esModule",{value:true});lP.Configuration=lP.GetDefaultRetryParams=void 0;var FF=wJ();var vRe=rC();var RJ=LF();var _Tn=15;var vTn=100;var ETn="openfga-sdk js/0.3.0";function bTn(e=_Tn,t=vTn){return{maxRetry:e,minWaitInMs:t}}a(bTn,"GetDefaultRetryParams");lP.GetDefaultRetryParams=bTn;var OJ=class{static{a(this,"Configuration")}constructor(t={}){this.apiScheme="https";this.getBasePath=()=>`${this.apiScheme}://${this.apiHost}`;this.apiScheme=t.apiScheme||this.apiScheme;this.apiHost=t.apiHost;this.storeId=t.storeId;const r=t.credentials;if(r){switch(r===null||r===void 0?void 0:r.method){case FF.CredentialsMethod.ApiToken:this.credentials={method:r.method,config:{token:r.config.token,headerName:"Authorization",headerValuePrefix:"Bearer"}};break;case FF.CredentialsMethod.ClientCredentials:this.credentials={method:FF.CredentialsMethod.ClientCredentials,config:{clientId:r.config.clientId,clientSecret:r.config.clientSecret,apiAudience:r.config.apiAudience,apiTokenIssuer:r.config.apiTokenIssuer}};break;case FF.CredentialsMethod.None:default:this.credentials={method:FF.CredentialsMethod.None};break}}const n=t.baseOptions||{};n.headers=n.headers||{};if(typeof process==="object"&&process.title==="node"&&!n.headers["User-Agent"]){n.headers["User-Agent"]=ETn}this.baseOptions=n;this.retryParams=t.retryParams}isValid(){var t;(0,RJ.assertParamExists)("Configuration","apiScheme",this.apiScheme);(0,RJ.assertParamExists)("Configuration","apiHost",this.apiHost);if(!(0,RJ.isWellFormedUriString)(this.getBasePath())){throw new vRe.FgaValidationError(`Configuration.apiScheme (${this.apiScheme}) and Configuration.apiHost (${this.apiHost}) do not form a valid URI (${this.getBasePath()})`)}if(this.storeId&&!(0,RJ.isWellFormedUlidString)(this.storeId)){throw new vRe.FgaValidationError("storeId")}if(((t=this.retryParams)===null||t===void 0?void 0:t.maxRetry)&&this.retryParams.maxRetry>15){throw new vRe.FgaValidationError("Configuration.retryParams.maxRetry exceeds maximum allowed limit of 15")}return true}};lP.Configuration=OJ;OJ.sdkVersion="0.3.0"});var FTt=y(PJ=>{"use strict";Object.defineProperty(PJ,"__esModule",{value:true});PJ.assertNever=void 0;function STn(e){throw new Error(`Assertion failed. Unacceptable value: '${e}'`)}a(STn,"assertNever");PJ.assertNever=STn});var BTt=y(NJ=>{"use strict";Object.defineProperty(NJ,"__esModule",{value:true});NJ.chunkArray=void 0;function ATn(e,t){const r=[];const n=[...e];while(n.length>0){r.push(n.splice(0,t))}return r}a(ATn,"chunkArray");NJ.chunkArray=ATn});var qTt=y(cP=>{"use strict";Object.defineProperty(cP,"__esModule",{value:true});cP.generateRandomIdWithNonUniqueFallback=cP.generateRandomId=void 0;var IJ=require("crypto");function MTt(){if(typeof IJ.randomUUID==="function"){return(0,IJ.randomUUID)()}if(typeof IJ.randomBytes==="function"){return(0,IJ.randomBytes)(20).toString("hex")}return}a(MTt,"generateRandomId");cP.generateRandomId=MTt;function CTn(){return MTt()||"00000000-0000-0000-0000-000000000000"}a(CTn,"generateRandomIdWithNonUniqueFallback");cP.generateRandomIdWithNonUniqueFallback=CTn});var UTt=y(kJ=>{"use strict";Object.defineProperty(kJ,"__esModule",{value:true});kJ.setHeaderIfNotSet=void 0;function wTn(e,t,r){if(!e[t]&&r){e[t]=r}}a(wTn,"setHeaderIfNotSet");kJ.setHeaderIfNotSet=wTn});var $Tt=y(DJ=>{"use strict";Object.defineProperty(DJ,"__esModule",{value:true});DJ.setNotEnumerableProperty=void 0;function TTn(e,t,r){Object.defineProperty(e,t,{enumerable:false,writable:false,value:r})}a(TTn,"setNotEnumerableProperty");DJ.setNotEnumerableProperty=TTn});var bRe=y(hh=>{"use strict";var xTn=hh&&hh.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)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===void 0)n=r;e[n]=t[r]});var BF=hh&&hh.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))xTn(t,e,r)};Object.defineProperty(hh,"__esModule",{value:true});BF(FTt(),hh);BF(BTt(),hh);BF(qTt(),hh);BF(UTt(),hh);BF($Tt(),hh)});var ARe=y(eu=>{"use strict";var SRe=eu&&eu.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}a(i,"adopt");return new(r||(r=Promise))(function(s,o){function u(d){try{c(n.next(d))}catch(p){o(p)}}a(u,"fulfilled");function l(d){try{c(n["throw"](d))}catch(p){o(p)}}a(l,"rejected");function c(d){d.done?s(d.value):i(d.value).then(u,l)}a(c,"step");c((n=n.apply(e,t||[])).next())})};Object.defineProperty(eu,"__esModule",{value:true});eu.createRequestFunction=eu.attemptHttpRequest=eu.toPathString=eu.serializeDataIfNeeded=eu.setSearchParams=eu.setBearerAuthToObject=eu.DUMMY_BASE_URL=void 0;var RTn=LJ();var nC=rC();var OTn=bRe();eu.DUMMY_BASE_URL="https://example.com";var PTn=a(function(e,t){return SRe(this,void 0,void 0,function*(){const r=yield t.getAccessTokenHeader();if(r&&!e[r.name]){e[r.name]=r.value}})},"setBearerAuthToObject");eu.setBearerAuthToObject=PTn;var NTn=a(function(e,...t){const r=new URLSearchParams(e.search);for(const n of t){for(const i in n){if(Array.isArray(n[i])){r.delete(i);for(const s of n[i]){r.append(i,s)}}else{r.set(i,n[i])}}}e.search=r.toString()},"setSearchParams");eu.setSearchParams=NTn;var ITn=a(e=>{const t=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return e!==null&&(t.test(e)||e.toLowerCase()==="application/json-patch+json")},"isJsonMime");var kTn=a(function(e,t){const r=typeof e!=="string";const n=r?ITn(t.headers["Content-Type"]):r;return n?JSON.stringify(e!==void 0?e:{}):e||""},"serializeDataIfNeeded");eu.serializeDataIfNeeded=kTn;var DTn=a(function(e){return e.pathname+e.search+e.hash},"toPathString");eu.toPathString=DTn;function LTn(e){return e&&typeof e==="object"&&e.isAxiosError===true}a(LTn,"isAxiosError");function FTn(e,t){const r=Math.ceil(Math.pow(2,e)*t);const n=Math.ceil(Math.pow(2,e+1)*t);return Math.floor(Math.random()*(n-r)+r)}a(FTn,"randomTime");function jTt(e,t,r){var n;return SRe(this,void 0,void 0,function*(){let i=0;do{i++;try{return yield r(e)}catch(s){if(!LTn(s)){throw new nC.FgaError(s)}const o=(n=s===null||s===void 0?void 0:s.response)===null||n===void 0?void 0:n.status;if(o===400||o===422){throw new nC.FgaApiValidationError(s)}else if(o===401||o===403){throw new nC.FgaApiAuthenticationError(s)}else if(o===404){throw new nC.FgaApiNotFoundError(s)}else if(o===429||o>=500){if(i>=t.maxRetry){if(o===429){throw new nC.FgaApiRateLimitExceededError(s)}else{throw new nC.FgaApiInternalError(s)}}yield new Promise(u=>setTimeout(u,FTn(i,t.minWaitInMs)))}else{throw new nC.FgaApiError(s)}}}while(i<t.maxRetry+1)})}a(jTt,"attemptHttpRequest");eu.attemptHttpRequest=jTt;var BTn=a(function(e,t,r,n){var i,s;r.isValid();const o=((i=e.options)===null||i===void 0?void 0:i.retryParams)?(s=e.options)===null||s===void 0?void 0:s.retryParams:r.retryParams;const u=o?o.maxRetry:0;const l=o?o.minWaitInMs:0;if(!n){n=RTn.Credentials.init(r)}return(c=t)=>SRe(this,void 0,void 0,function*(){yield(0,eu.setBearerAuthToObject)(e.options.headers,n);const d=Object.assign(Object.assign({},e.options),{url:r.getBasePath()+e.url});const p=yield jTt(d,{maxRetry:u,minWaitInMs:l},c);const f=typeof(p===null||p===void 0?void 0:p.data)==="undefined"?{}:p===null||p===void 0?void 0:p.data;const m=Object.assign({},f);(0,OTn.setNotEnumerableProperty)(m,"$response",p);return m})},"createRequestFunction");eu.createRequestFunction=BTn});var HTt=y(dP=>{"use strict";var CRe=dP&&dP.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}a(i,"adopt");return new(r||(r=Promise))(function(s,o){function u(d){try{c(n.next(d))}catch(p){o(p)}}a(u,"fulfilled");function l(d){try{c(n["throw"](d))}catch(p){o(p)}}a(l,"rejected");function c(d){d.done?s(d.value):i(d.value).then(u,l)}a(c,"step");c((n=n.apply(e,t||[])).next())})};Object.defineProperty(dP,"__esModule",{value:true});dP.Credentials=void 0;var GTt=AJ();var VE=LF();var wRe=rC();var MTn=ARe();var Mf=wJ();var TRe=class e{static{a(this,"Credentials")}static init(t){return new e(t.credentials)}constructor(t,r=GTt.default){this.authConfig=t;this.axios=r;this.initConfig();this.isValid()}initConfig(){var t;switch((t=this.authConfig)===null||t===void 0?void 0:t.method){case Mf.CredentialsMethod.ApiToken:if(this.authConfig.config){if(!this.authConfig.config.headerName){this.authConfig.config.headerName="Authorization"}if(!this.authConfig.config.headerValuePrefix){this.authConfig.config.headerValuePrefix="Bearer"}}break;case Mf.CredentialsMethod.ClientCredentials:case Mf.CredentialsMethod.None:default:break}}isValid(){var t,r,n,i,s,o,u,l,c;const{authConfig:d}=this;switch(d===null||d===void 0?void 0:d.method){case Mf.CredentialsMethod.None:break;case Mf.CredentialsMethod.ApiToken:(0,VE.assertParamExists)("Credentials","config.token",(t=d.config)===null||t===void 0?void 0:t.token);(0,VE.assertParamExists)("Credentials","config.headerName",(r=d.config)===null||r===void 0?void 0:r.headerName);(0,VE.assertParamExists)("Credentials","config.headerName",(n=d.config)===null||n===void 0?void 0:n.headerName);break;case Mf.CredentialsMethod.ClientCredentials:(0,VE.assertParamExists)("Credentials","config.clientId",(i=d.config)===null||i===void 0?void 0:i.clientId);(0,VE.assertParamExists)("Credentials","config.clientSecret",(s=d.config)===null||s===void 0?void 0:s.clientSecret);(0,VE.assertParamExists)("Credentials","config.apiTokenIssuer",(o=d.config)===null||o===void 0?void 0:o.apiTokenIssuer);(0,VE.assertParamExists)("Credentials","config.apiAudience",(u=d.config)===null||u===void 0?void 0:u.apiAudience);if(!(0,VE.isWellFormedUriString)(`https://${(l=d.config)===null||l===void 0?void 0:l.apiTokenIssuer}`)){throw new wRe.FgaValidationError(`Configuration.apiTokenIssuer does not form a valid URI (https://${(c=d.config)===null||c===void 0?void 0:c.apiTokenIssuer})`)}break}}getAccessTokenHeader(){var t;return CRe(this,void 0,void 0,function*(){const r=yield this.getAccessTokenValue();switch((t=this.authConfig)===null||t===void 0?void 0:t.method){case Mf.CredentialsMethod.None:return;case Mf.CredentialsMethod.ApiToken:return{name:this.authConfig.config.headerName,value:`${this.authConfig.config.headerValuePrefix?`${this.authConfig.config.headerValuePrefix} `:""}${r}`};case Mf.CredentialsMethod.ClientCredentials:return{name:"Authorization",value:`Bearer ${r}`}}})}getAccessTokenValue(){var t;return CRe(this,void 0,void 0,function*(){switch((t=this.authConfig)===null||t===void 0?void 0:t.method){case Mf.CredentialsMethod.None:return;case Mf.CredentialsMethod.ApiToken:return this.authConfig.config.token;case Mf.CredentialsMethod.ClientCredentials:if(this.accessToken&&(!this.accessTokenExpiryDate||this.accessTokenExpiryDate>new Date)){return this.accessToken}return this.refreshAccessToken()}})}refreshAccessToken(){var t;return CRe(this,void 0,void 0,function*(){const r=(t=this.authConfig)===null||t===void 0?void 0:t.config;try{const n=yield(0,MTn.attemptHttpRequest)({url:`https://${r.apiTokenIssuer}/oauth/token`,method:"post",data:{client_id:r.clientId,client_secret:r.clientSecret,audience:r.apiAudience,grant_type:"client_credentials"}},{maxRetry:3,minWaitInMs:100},GTt.default);if(n){this.accessToken=n.data.access_token;this.accessTokenExpiryDate=new Date(Date.now()+n.data.expires_in*1e3)}return this.accessToken}catch(n){if(n instanceof wRe.FgaApiError){n.constructor=wRe.FgaApiAuthenticationError;n.name="FgaApiAuthenticationError";n.clientId=r.clientId;n.audience=r.apiAudience;n.grantType="client_credentials"}throw n}})}};dP.Credentials=TRe});var LJ=y(zE=>{"use strict";var qTn=zE&&zE.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)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===void 0)n=r;e[n]=t[r]});var VTt=zE&&zE.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))qTn(t,e,r)};Object.defineProperty(zE,"__esModule",{value:true});VTt(HTt(),zE);VTt(wJ(),zE)});var RRe=y(FJ=>{"use strict";Object.defineProperty(FJ,"__esModule",{value:true});FJ.BaseAPI=void 0;var UTn=AJ();var $Tn=require("http");var jTn=require("https");var zTt=ERe();var GTn=LJ();var HTn=1e4;var xRe=class{static{a(this,"BaseAPI")}constructor(t,r){var n;this.axios=r;if(t instanceof zTt.Configuration){this.configuration=t}else{this.configuration=new zTt.Configuration(t)}this.configuration.isValid();this.credentials=GTn.Credentials.init(this.configuration);if(!this.axios){const i=new $Tn.Agent({keepAlive:true});const s=new jTn.Agent({keepAlive:true});this.axios=UTn.default.create({httpAgent:i,httpsAgent:s,timeout:HTn,headers:(n=this.configuration.baseOptions)===null||n===void 0?void 0:n.headers})}}get storeId(){return this.configuration.storeId}set storeId(t){this.configuration.storeId=t}};FJ.BaseAPI=xRe});var PRe=y(Ts=>{"use strict";var As=Ts&&Ts.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}a(i,"adopt");return new(r||(r=Promise))(function(s,o){function u(d){try{c(n.next(d))}catch(p){o(p)}}a(u,"fulfilled");function l(d){try{c(n["throw"](d))}catch(p){o(p)}}a(l,"rejected");function c(d){d.done?s(d.value):i(d.value).then(u,l)}a(c,"step");c((n=n.apply(e,t||[])).next())})};Object.defineProperty(Ts,"__esModule",{value:true});Ts.OpenFgaApi=Ts.OpenFgaApiFactory=Ts.OpenFgaApiFp=Ts.OpenFgaApiAxiosParamCreator=void 0;var Tc=AJ();var VTn=RRe();var sr=ARe();var za=LF();var zTn=a(function(e,t){return{check:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("check","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/check".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),createStore:(r,n={})=>As(this,void 0,void 0,function*(){const i="/stores";const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),deleteStore:(r={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("Configuration","storeId",e.storeId);const n="/stores/{store_id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const i=new URL(n,sr.DUMMY_BASE_URL);let s;if(e){s=e.baseOptions}const o=Object.assign(Object.assign({method:"DELETE"},s),r);const u={};const l={};(0,sr.setSearchParams)(i,l,r.query);o.headers=Object.assign(Object.assign({},u),r.headers);return{url:(0,sr.toPathString)(i),options:o}}),expand:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("expand","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/expand".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),getStore:(r={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("Configuration","storeId",e.storeId);const n="/stores/{store_id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const i=new URL(n,sr.DUMMY_BASE_URL);let s;if(e){s=e.baseOptions}const o=Object.assign(Object.assign({method:"GET"},s),r);const u={};const l={};(0,sr.setSearchParams)(i,l,r.query);o.headers=Object.assign(Object.assign({},u),r.headers);return{url:(0,sr.toPathString)(i),options:o}}),listObjects:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("listObjects","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/list-objects".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),listStores:(r,n,i={})=>As(this,void 0,void 0,function*(){const s="/stores";const o=new URL(s,sr.DUMMY_BASE_URL);let u;if(e){u=e.baseOptions}const l=Object.assign(Object.assign({method:"GET"},u),i);const c={};const d={};if(r!==void 0){d["page_size"]=r}if(n!==void 0){d["continuation_token"]=n}(0,sr.setSearchParams)(o,d,i.query);l.headers=Object.assign(Object.assign({},c),i.headers);return{url:(0,sr.toPathString)(o),options:l}}),read:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("read","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/read".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),readAssertions:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("readAssertions","authorizationModelId",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/assertions/{authorization_model_id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId))).replace(`{${"authorization_model_id"}}`,encodeURIComponent(String(r)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"GET"},o),n);const l={};const c={};(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);return{url:(0,sr.toPathString)(s),options:u}}),readAuthorizationModel:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("readAuthorizationModel","id",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/authorization-models/{id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId))).replace(`{${"id"}}`,encodeURIComponent(String(r)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"GET"},o),n);const l={};const c={};(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);return{url:(0,sr.toPathString)(s),options:u}}),readAuthorizationModels:(r,n,i={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("Configuration","storeId",e.storeId);const s="/stores/{store_id}/authorization-models".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const o=new URL(s,sr.DUMMY_BASE_URL);let u;if(e){u=e.baseOptions}const l=Object.assign(Object.assign({method:"GET"},u),i);const c={};const d={};if(r!==void 0){d["page_size"]=r}if(n!==void 0){d["continuation_token"]=n}(0,sr.setSearchParams)(o,d,i.query);l.headers=Object.assign(Object.assign({},c),i.headers);return{url:(0,sr.toPathString)(o),options:l}}),readChanges:(r,n,i,s={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("Configuration","storeId",e.storeId);const o="/stores/{store_id}/changes".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const u=new URL(o,sr.DUMMY_BASE_URL);let l;if(e){l=e.baseOptions}const c=Object.assign(Object.assign({method:"GET"},l),s);const d={};const p={};if(r!==void 0){p["type"]=r}if(n!==void 0){p["page_size"]=n}if(i!==void 0){p["continuation_token"]=i}(0,sr.setSearchParams)(u,p,s.query);c.headers=Object.assign(Object.assign({},d),s.headers);return{url:(0,sr.toPathString)(u),options:c}}),write:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("write","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/write".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),writeAssertions:(r,n,i={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("writeAssertions","authorizationModelId",r);(0,za.assertParamExists)("writeAssertions","body",n);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const s="/stores/{store_id}/assertions/{authorization_model_id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId))).replace(`{${"authorization_model_id"}}`,encodeURIComponent(String(r)));const o=new URL(s,sr.DUMMY_BASE_URL);let u;if(e){u=e.baseOptions}const l=Object.assign(Object.assign({method:"PUT"},u),i);const c={};const d={};c["Content-Type"]="application/json";(0,sr.setSearchParams)(o,d,i.query);l.headers=Object.assign(Object.assign({},c),i.headers);l.data=(0,sr.serializeDataIfNeeded)(n,l);return{url:(0,sr.toPathString)(o),options:l}}),writeAuthorizationModel:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("writeAuthorizationModel","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/authorization-models".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}})}},"OpenFgaApiAxiosParamCreator");Ts.OpenFgaApiAxiosParamCreator=zTn;var KTn=a(function(e,t){const r=(0,Ts.OpenFgaApiAxiosParamCreator)(e,t);return{check(n,i){return As(this,void 0,void 0,function*(){const s=yield r.check(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},createStore(n,i){return As(this,void 0,void 0,function*(){const s=yield r.createStore(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},deleteStore(n){return As(this,void 0,void 0,function*(){const i=yield r.deleteStore(n);return(0,sr.createRequestFunction)(i,Tc.default,e,t)})},expand(n,i){return As(this,void 0,void 0,function*(){const s=yield r.expand(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},getStore(n){return As(this,void 0,void 0,function*(){const i=yield r.getStore(n);return(0,sr.createRequestFunction)(i,Tc.default,e,t)})},listObjects(n,i){return As(this,void 0,void 0,function*(){const s=yield r.listObjects(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},listStores(n,i,s){return As(this,void 0,void 0,function*(){const o=yield r.listStores(n,i,s);return(0,sr.createRequestFunction)(o,Tc.default,e,t)})},read(n,i){return As(this,void 0,void 0,function*(){const s=yield r.read(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},readAssertions(n,i){return As(this,void 0,void 0,function*(){const s=yield r.readAssertions(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},readAuthorizationModel(n,i){return As(this,void 0,void 0,function*(){const s=yield r.readAuthorizationModel(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},readAuthorizationModels(n,i,s){return As(this,void 0,void 0,function*(){const o=yield r.readAuthorizationModels(n,i,s);return(0,sr.createRequestFunction)(o,Tc.default,e,t)})},readChanges(n,i,s,o){return As(this,void 0,void 0,function*(){const u=yield r.readChanges(n,i,s,o);return(0,sr.createRequestFunction)(u,Tc.default,e,t)})},write(n,i){return As(this,void 0,void 0,function*(){const s=yield r.write(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},writeAssertions(n,i,s){return As(this,void 0,void 0,function*(){const o=yield r.writeAssertions(n,i,s);return(0,sr.createRequestFunction)(o,Tc.default,e,t)})},writeAuthorizationModel(n,i){return As(this,void 0,void 0,function*(){const s=yield r.writeAuthorizationModel(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})}}},"OpenFgaApiFp");Ts.OpenFgaApiFp=KTn;var WTn=a(function(e,t,r){const n=(0,Ts.OpenFgaApiFp)(e,t);return{check(i,s){return n.check(i,s).then(o=>o(r))},createStore(i,s){return n.createStore(i,s).then(o=>o(r))},deleteStore(i){return n.deleteStore(i).then(s=>s(r))},expand(i,s){return n.expand(i,s).then(o=>o(r))},getStore(i){return n.getStore(i).then(s=>s(r))},listObjects(i,s){return n.listObjects(i,s).then(o=>o(r))},listStores(i,s,o){return n.listStores(i,s,o).then(u=>u(r))},read(i,s){return n.read(i,s).then(o=>o(r))},readAssertions(i,s){return n.readAssertions(i,s).then(o=>o(r))},readAuthorizationModel(i,s){return n.readAuthorizationModel(i,s).then(o=>o(r))},readAuthorizationModels(i,s,o){return n.readAuthorizationModels(i,s,o).then(u=>u(r))},readChanges(i,s,o,u){return n.readChanges(i,s,o,u).then(l=>l(r))},write(i,s){return n.write(i,s).then(o=>o(r))},writeAssertions(i,s,o){return n.writeAssertions(i,s,o).then(u=>u(r))},writeAuthorizationModel(i,s){return n.writeAuthorizationModel(i,s).then(o=>o(r))}}},"OpenFgaApiFactory");Ts.OpenFgaApiFactory=WTn;var ORe=class extends VTn.BaseAPI{static{a(this,"OpenFgaApi")}check(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).check(t,r).then(n=>n(this.axios))}createStore(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).createStore(t,r).then(n=>n(this.axios))}deleteStore(t){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).deleteStore(t).then(r=>r(this.axios))}expand(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).expand(t,r).then(n=>n(this.axios))}getStore(t){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).getStore(t).then(r=>r(this.axios))}listObjects(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).listObjects(t,r).then(n=>n(this.axios))}listStores(t,r,n){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).listStores(t,r,n).then(i=>i(this.axios))}read(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).read(t,r).then(n=>n(this.axios))}readAssertions(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).readAssertions(t,r).then(n=>n(this.axios))}readAuthorizationModel(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).readAuthorizationModel(t,r).then(n=>n(this.axios))}readAuthorizationModels(t,r,n){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).readAuthorizationModels(t,r,n).then(i=>i(this.axios))}readChanges(t,r,n,i){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).readChanges(t,r,n,i).then(s=>s(this.axios))}write(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).write(t,r).then(n=>n(this.axios))}writeAssertions(t,r,n){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).writeAssertions(t,r,n).then(i=>i(this.axios))}writeAuthorizationModel(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).writeAuthorizationModel(t,r).then(n=>n(this.axios))}};Ts.OpenFgaApi=ORe});var WTt=y((w6s,KTt)=>{async function*YTn(e,t,r){const n=new Set;async function i(){const[s,o]=await Promise.race(n);n.delete(s);return o}a(i,"consume");for(const s of t){const o=(async()=>await r(s,t))().then(u=>[o,u]);n.add(o);if(n.size>=e){yield await i()}}while(n.size){yield await i()}}a(YTn,"asyncPool");KTt.exports=YTn});var YTt=y(ig=>{"use strict";var Ka=ig&&ig.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}a(i,"adopt");return new(r||(r=Promise))(function(s,o){function u(d){try{c(n.next(d))}catch(p){o(p)}}a(u,"fulfilled");function l(d){try{c(n["throw"](d))}catch(p){o(p)}}a(l,"rejected");function c(d){d.done?s(d.value):i(d.value).then(u,l)}a(c,"step");c((n=n.apply(e,t||[])).next())})};var NRe=ig&&ig.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(o){return new Promise(function(u,l){o=e[s](o),i(u,l,o.done,o.value)})}}a(n,"verb");function i(s,o,u,l){Promise.resolve(l).then(function(c){s({value:c,done:u})},o)}a(i,"settle")};Object.defineProperty(ig,"__esModule",{value:true});ig.OpenFgaClient=ig.ClientWriteStatus=void 0;var IRe=WTt();var XTn=PRe();var JTn=RRe();var kRe=rC();var vd=bRe();var QTn=LF();var DRe=10;var pP="X-OpenFGA-Client-Method";var LRe="X-OpenFGA-Client-Bulk-Request-Id";var fP;(function(e){e["SUCCESS"]="success";e["FAILURE"]="failure"})(fP||(ig.ClientWriteStatus=fP={}));var FRe=class extends JTn.BaseAPI{static{a(this,"OpenFgaClient")}constructor(t,r){super(t,r);this.axios=r;this.api=new XTn.OpenFgaApi(this.configuration,r);this.authorizationModelId=t.authorizationModelId;this.getAuthorizationModelId()}getAuthorizationModelId(t={}){const r=(t===null||t===void 0?void 0:t.authorizationModelId)||this.authorizationModelId;if(r&&!(0,QTn.isWellFormedUlidString)(r)){throw new kRe.FgaValidationError("authorizationModelId")}return r}checkValidApiConnection(t={}){return Ka(this,void 0,void 0,function*(){if(this.getAuthorizationModelId(t)){yield this.readAuthorizationModel(t)}else{yield this.readLatestAuthorizationModel(t)}})}listStores(t={}){return Ka(this,void 0,void 0,function*(){return this.api.listStores(t.pageSize,t.continuationToken,t)})}createStore(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.createStore(t,r)})}getStore(t={}){return Ka(this,void 0,void 0,function*(){return this.api.getStore(t)})}deleteStore(t={}){return Ka(this,void 0,void 0,function*(){return this.api.deleteStore(t)})}readAuthorizationModels(t={}){return Ka(this,void 0,void 0,function*(){return this.api.readAuthorizationModels(t.pageSize,t.continuationToken,t)})}writeAuthorizationModel(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.writeAuthorizationModel(t,r)})}readAuthorizationModel(t={}){return Ka(this,void 0,void 0,function*(){const r=this.getAuthorizationModelId(t);if(!r){throw new kRe.FgaRequiredParamError("ClientConfiguration","authorizationModelId")}return this.api.readAuthorizationModel(r,t)})}readLatestAuthorizationModel(t={}){var r;return Ka(this,void 0,void 0,function*(){const{headers:n={}}=t;(0,vd.setHeaderIfNotSet)(n,pP,"ReadLatestAuthorizationModel");const i=yield this.readAuthorizationModels(Object.assign(Object.assign({},t),{pageSize:1,headers:n}));const s=i;s.authorization_model=(r=i.authorization_models)===null||r===void 0?void 0:r[0];delete s.authorization_models;return s})}readChanges(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.readChanges(t.type,r.pageSize,r.continuationToken,r)})}read(t={},r={}){return Ka(this,void 0,void 0,function*(){const n={page_size:r.pageSize,continuation_token:r.continuationToken};if(t.user||t.object||t.relation){n.tuple_key=t}return this.api.read(n,r)})}write(t,r={}){return Ka(this,void 0,void 0,function*(){const{transaction:n={},headers:i={}}=r;const{maxPerChunk:s=1,maxParallelRequests:o=DRe}=n;const{writes:u,deletes:l}=t;const c=this.getAuthorizationModelId(r);if(!(n===null||n===void 0?void 0:n.disable)){const d={authorization_model_id:c};if(u===null||u===void 0?void 0:u.length){d.writes={tuple_keys:u}}if(l===null||l===void 0?void 0:l.length){d.deletes={tuple_keys:l}}yield this.api.write(d,r);return{writes:(u===null||u===void 0?void 0:u.map(p=>({tuple_key:p,status:fP.SUCCESS})))||[],deletes:(l===null||l===void 0?void 0:l.map(p=>({tuple_key:p,status:fP.SUCCESS})))||[]}}return Promise.all([(()=>Ka(this,void 0,void 0,function*(){var d,p,f,m,h,g,_,v;(0,vd.setHeaderIfNotSet)(i,pP,"Write");(0,vd.setHeaderIfNotSet)(i,LRe,(0,vd.generateRandomIdWithNonUniqueFallback)());const S=[];if(u===null||u===void 0?void 0:u.length){try{for(var E=true,b=NRe(IRe(o,(0,vd.chunkArray)(u,s),R=>this.writeTuples(R,Object.assign(Object.assign({},r),{headers:i,transaction:void 0})).catch(I=>({writes:R.map(D=>({tuple_key:D,status:fP.FAILURE,err:I})),deletes:[]})))),A;A=yield b.next(),d=A.done,!d;E=true){m=A.value;E=false;const R=m;S.push(R.writes)}}catch(R){p={error:R}}finally{try{if(!E&&!d&&(f=b.return))yield f.call(b)}finally{if(p)throw p.error}}}const C=[];if(l===null||l===void 0?void 0:l.length){try{for(var T=true,O=NRe(IRe(o,(0,vd.chunkArray)(l,s),R=>this.deleteTuples(R,Object.assign(Object.assign({},r),{headers:i,transaction:void 0})).catch(I=>({writes:[],deletes:R.map(D=>({tuple_key:D,status:fP.FAILURE,err:I}))})))),P;P=yield O.next(),h=P.done,!h;T=true){v=P.value;T=false;const R=v;C.push(R.deletes)}}catch(R){g={error:R}}finally{try{if(!T&&!h&&(_=O.return))yield _.call(O)}finally{if(g)throw g.error}}}return{writes:S.flat(),deletes:C.flat()}}))(),this.checkValidApiConnection(r)]).then(d=>d[0])})}writeTuples(t,r={}){return Ka(this,void 0,void 0,function*(){const{headers:n={}}=r;(0,vd.setHeaderIfNotSet)(n,pP,"WriteTuples");return this.write({writes:t},Object.assign(Object.assign({},r),{headers:n}))})}deleteTuples(t,r={}){return Ka(this,void 0,void 0,function*(){const{headers:n={}}=r;(0,vd.setHeaderIfNotSet)(n,pP,"DeleteTuples");return this.write({deletes:t},Object.assign(Object.assign({},r),{headers:n}))})}check(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.check({tuple_key:{user:t.user,relation:t.relation,object:t.object},context:t.context,contextual_tuples:{tuple_keys:t.contextualTuples||[]},authorization_model_id:this.getAuthorizationModelId(r)},r)})}batchCheck(t,r={}){return Ka(this,void 0,void 0,function*(){return Promise.all([(()=>Ka(this,void 0,void 0,function*(){var n,i,s,o;const{headers:u={},maxParallelRequests:l=DRe}=r;(0,vd.setHeaderIfNotSet)(u,pP,"BatchCheck");(0,vd.setHeaderIfNotSet)(u,LRe,(0,vd.generateRandomIdWithNonUniqueFallback)());const c=[];try{for(var d=true,p=NRe(IRe(l,t,m=>this.check(m,Object.assign(Object.assign({},r),{headers:u})).then(h=>{h._request=m;return h}).catch(h=>{return{allowed:void 0,error:h,_request:m}}))),f;f=yield p.next(),n=f.done,!n;d=true){o=f.value;d=false;const m=o;c.push(m)}}catch(m){i={error:m}}finally{try{if(!d&&!n&&(s=p.return))yield s.call(p)}finally{if(i)throw i.error}}return{responses:c}}))(),this.checkValidApiConnection(r)]).then(n=>n[0])})}expand(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.expand({authorization_model_id:this.getAuthorizationModelId(r),tuple_key:t},r)})}listObjects(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.listObjects({authorization_model_id:this.getAuthorizationModelId(r),user:t.user,relation:t.relation,type:t.type,context:t.context,contextual_tuples:{tuple_keys:t.contextualTuples||[]}},r)})}listRelations(t,r={}){return Ka(this,void 0,void 0,function*(){const{user:n,object:i,relations:s,contextualTuples:o,context:u}=t;const{headers:l={},maxParallelRequests:c=DRe}=r;(0,vd.setHeaderIfNotSet)(l,pP,"ListRelations");(0,vd.setHeaderIfNotSet)(l,LRe,(0,vd.generateRandomIdWithNonUniqueFallback)());if(!(s===null||s===void 0?void 0:s.length)){throw new kRe.FgaValidationError("relations","When calling listRelations, at least one relation must be passed in the relations field")}const d=yield this.batchCheck(s.map(f=>({user:n,relation:f,object:i,contextualTuples:o,context:u})),Object.assign(Object.assign({},r),{headers:l,maxParallelRequests:c}));const p=d.responses.find(f=>f.error);if(p){throw p.error}return{relations:d.responses.filter(f=>f.allowed).map(f=>f._request.relation)}})}readAssertions(t={}){return Ka(this,void 0,void 0,function*(){return this.api.readAssertions(this.getAuthorizationModelId(t),t)})}writeAssertions(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.writeAssertions(this.getAuthorizationModelId(r),{assertions:t.map(n=>({tuple_key:{user:n.user,relation:n.relation,object:n.object},expectation:n.expectation}))},r)})}};ig.OpenFgaClient=FRe});var rxt=y(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:true});Ed.TypeName=Ed.TupleOperation=Ed.NullValue=Ed.NotFoundErrorCode=Ed.InternalErrorCode=Ed.ErrorCode=void 0;var XTt;(function(e){e["NoError"]="no_error";e["ValidationError"]="validation_error";e["AuthorizationModelNotFound"]="authorization_model_not_found";e["AuthorizationModelResolutionTooComplex"]="authorization_model_resolution_too_complex";e["InvalidWriteInput"]="invalid_write_input";e["CannotAllowDuplicateTuplesInOneRequest"]="cannot_allow_duplicate_tuples_in_one_request";e["CannotAllowDuplicateTypesInOneRequest"]="cannot_allow_duplicate_types_in_one_request";e["CannotAllowMultipleReferencesToOneRelation"]="cannot_allow_multiple_references_to_one_relation";e["InvalidContinuationToken"]="invalid_continuation_token";e["InvalidTupleSet"]="invalid_tuple_set";e["InvalidCheckInput"]="invalid_check_input";e["InvalidExpandInput"]="invalid_expand_input";e["UnsupportedUserSet"]="unsupported_user_set";e["InvalidObjectFormat"]="invalid_object_format";e["WriteFailedDueToInvalidInput"]="write_failed_due_to_invalid_input";e["AuthorizationModelAssertionsNotFound"]="authorization_model_assertions_not_found";e["LatestAuthorizationModelNotFound"]="latest_authorization_model_not_found";e["TypeNotFound"]="type_not_found";e["RelationNotFound"]="relation_not_found";e["EmptyRelationDefinition"]="empty_relation_definition";e["InvalidUser"]="invalid_user";e["InvalidTuple"]="invalid_tuple";e["UnknownRelation"]="unknown_relation";e["StoreIdInvalidLength"]="store_id_invalid_length";e["AssertionsTooManyItems"]="assertions_too_many_items";e["IdTooLong"]="id_too_long";e["AuthorizationModelIdTooLong"]="authorization_model_id_too_long";e["TupleKeyValueNotSpecified"]="tuple_key_value_not_specified";e["TupleKeysTooManyOrTooFewItems"]="tuple_keys_too_many_or_too_few_items";e["PageSizeInvalid"]="page_size_invalid";e["ParamMissingValue"]="param_missing_value";e["DifferenceBaseMissingValue"]="difference_base_missing_value";e["SubtractBaseMissingValue"]="subtract_base_missing_value";e["ObjectTooLong"]="object_too_long";e["RelationTooLong"]="relation_too_long";e["TypeDefinitionsTooFewItems"]="type_definitions_too_few_items";e["TypeInvalidLength"]="type_invalid_length";e["TypeInvalidPattern"]="type_invalid_pattern";e["RelationsTooFewItems"]="relations_too_few_items";e["RelationsTooLong"]="relations_too_long";e["RelationsInvalidPattern"]="relations_invalid_pattern";e["ObjectInvalidPattern"]="object_invalid_pattern";e["QueryStringTypeContinuationTokenMismatch"]="query_string_type_continuation_token_mismatch";e["ExceededEntityLimit"]="exceeded_entity_limit";e["InvalidContextualTuple"]="invalid_contextual_tuple";e["DuplicateContextualTuple"]="duplicate_contextual_tuple";e["InvalidAuthorizationModel"]="invalid_authorization_model";e["UnsupportedSchemaVersion"]="unsupported_schema_version"})(XTt||(Ed.ErrorCode=XTt={}));var JTt;(function(e){e["NoInternalError"]="no_internal_error";e["InternalError"]="internal_error";e["Cancelled"]="cancelled";e["DeadlineExceeded"]="deadline_exceeded";e["AlreadyExists"]="already_exists";e["ResourceExhausted"]="resource_exhausted";e["FailedPrecondition"]="failed_precondition";e["Aborted"]="aborted";e["OutOfRange"]="out_of_range";e["Unavailable"]="unavailable";e["DataLoss"]="data_loss"})(JTt||(Ed.InternalErrorCode=JTt={}));var QTt;(function(e){e["NoNotFoundError"]="no_not_found_error";e["UndefinedEndpoint"]="undefined_endpoint";e["StoreIdNotFound"]="store_id_not_found";e["Unimplemented"]="unimplemented"})(QTt||(Ed.NotFoundErrorCode=QTt={}));var ZTt;(function(e){e["NullValue"]="NULL_VALUE"})(ZTt||(Ed.NullValue=ZTt={}));var ext;(function(e){e["Write"]="TUPLE_OPERATION_WRITE";e["Delete"]="TUPLE_OPERATION_DELETE"})(ext||(Ed.TupleOperation=ext={}));var txt;(function(e){e["Unspecified"]="TYPE_NAME_UNSPECIFIED";e["Any"]="TYPE_NAME_ANY";e["Bool"]="TYPE_NAME_BOOL";e["String"]="TYPE_NAME_STRING";e["Int"]="TYPE_NAME_INT";e["Uint"]="TYPE_NAME_UINT";e["Double"]="TYPE_NAME_DOUBLE";e["Duration"]="TYPE_NAME_DURATION";e["Timestamp"]="TYPE_NAME_TIMESTAMP";e["Map"]="TYPE_NAME_MAP";e["List"]="TYPE_NAME_LIST";e["Ipaddress"]="TYPE_NAME_IPADDRESS"})(txt||(Ed.TypeName=txt={}))});var sxt=y(Au=>{"use strict";var ZTn=Au&&Au.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)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===void 0)n=r;e[n]=t[r]});var BJ=Au&&Au.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))ZTn(t,e,r)};Object.defineProperty(Au,"__esModule",{value:true});Au.CredentialsMethod=Au.Credentials=Au.GetDefaultRetryParams=Au.Configuration=void 0;BJ(PRe(),Au);BJ(YTt(),Au);BJ(rxt(),Au);var nxt=ERe();Object.defineProperty(Au,"Configuration",{enumerable:true,get:function(){return nxt.Configuration}});Object.defineProperty(Au,"GetDefaultRetryParams",{enumerable:true,get:function(){return nxt.GetDefaultRetryParams}});var ixt=LJ();Object.defineProperty(Au,"Credentials",{enumerable:true,get:function(){return ixt.Credentials}});Object.defineProperty(Au,"CredentialsMethod",{enumerable:true,get:function(){return ixt.CredentialsMethod}});BJ(rC(),Au)});var oxt=y(mP=>{"use strict";var exn=mP&&mP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(mP,"__esModule",{value:true});mP.OpenFGAService=void 0;var MF=exn(ep());var axt=sxt();var txn=JO();var BRe=class{static{a(this,"OpenFGAService")}logger;openFGAClient;baseUrl;apiHost;storeId;modelId;userSub;constructor(t,r){if(!MF.default.OPENFGA_SERVICE_URL){throw new Error("OPENFGA_SERVICE_URL is not set")}this.userSub=r&&r.userSub?r.userSub:t.getUserSub();this.baseUrl=MF.default.OPENFGA_SERVICE_URL;this.apiHost=MF.default.OPENFGA_SERVICE_URL.replace(/^(https:\/\/)/,"");this.storeId=MF.default.OPENFGA_STORE_ID;this.modelId=MF.default.OPENFGA_MODEL_ID;this.logger=t.log}async getOpenFgaClient(){if(!this.openFGAClient){const t=await(0,txn.getServiceAccountIdToken)(this.baseUrl);this.openFGAClient=new axt.OpenFgaClient({apiScheme:"https",apiHost:this.apiHost,storeId:this.storeId,authorizationModelId:this.modelId,credentials:{method:axt.CredentialsMethod.ApiToken,config:{token:t}}})}return this.openFGAClient}async createAccountMember(t){try{const r=await this.getOpenFgaClient();await r.write({writes:[{user:`user:${this.userSub}`,relation:"admin",object:`account:${t}`}]})}catch(r){this.logger.warn(`RBAC failed to create account membership. Error: ${r.message}`)}}async getAccountMemberships(){const t=await this.getOpenFgaClient();const r=await t.listObjects({user:`user:${this.userSub}`,relation:"member",type:"account"});if(r){return r.objects.map(n=>n.replace(/^(account:)/,""))}return[]}async isAccountMember(t){try{const r=await this.getOpenFgaClient();const{allowed:n}=await r.check({user:`user:${this.userSub}`,relation:"member",object:`account:${t}`});if(!n){return false}return n}catch(r){this.logger.warn(`RBAC failed to check account membership. Error: ${r.message}`);return false}}async isZuploAdmin(){try{const t=await this.getOpenFgaClient();const{tuples:r}=await t.read({object:"role:zuplo-admin"});const n=[];r.forEach(i=>{const s=i.key.user.replace(/^(user:)/,"");n.push(s)});return n.includes(this.userSub)}catch(t){this.logger.warn(`RBAC failed to check for zuplo admin. Error: ${t.message}`);return false}}async isDeployerServiceAccount(){try{const t=await this.getOpenFgaClient();const{tuples:r}=await t.read({object:"role:zuplo-deployer"});const n=[];r.forEach(i=>{const s=i.key.user.replace(/^(user:)/,"");n.push(s)});return n.includes(this.userSub)}catch(t){this.logger.warn(`RBAC failed to check for zuplo deployer. Error: ${t.message}`);return false}}async createProjectAccountAssociation(t,r){try{const n=await this.getOpenFgaClient();await n.write({writes:[{user:`account:${t}`,relation:"associated_account",object:`project:${r}`}]})}catch(n){this.logger.warn(`RBAC failed to create account-project association. Error: ${n.message}`)}}async deleteProjectAccountAssociation(t,r){try{const n=await this.getOpenFgaClient();await n.write({deletes:[{user:`account:${t}`,relation:"associated_account",object:`project:${r}`}]})}catch(n){this.logger.warn(`RBAC failed to delete account-project association. Error: ${n.message}`)}}};mP.OpenFGAService=BRe});var cxt=y(hP=>{"use strict";var lxt=hP&&hP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(hP,"__esModule",{value:true});hP.TenantService=void 0;var rxn=lxt(Bm());var uxt=lxt(ep());var nxn=CF();var ixn=new rxn.default({max:500,maxAge:1e3*60*50});var MRe=class extends nxn.ApiServiceClient{static{a(this,"TenantService")}constructor(t,r){if(!uxt.default.TENANT_API_URL){throw new Error("TENANT_API_URL is not set")}const n=r&&r.userSub?r.userSub:t.getUserSub();super(uxt.default.TENANT_API_URL,ixn,{userSub:n,logger:t.log,requestId:t.id})}};hP.TenantService=MRe});var fxt=y(gP=>{"use strict";var pxt=gP&&gP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(gP,"__esModule",{value:true});gP.MeteringService=void 0;var sxn=pxt(Bm());var dxt=pxt(ep());var axn=CF();var oxn=new sxn.default({max:500,maxAge:1e3*60*50});var qRe=class extends axn.ApiServiceClient{static{a(this,"MeteringService")}constructor(t,r){if(!dxt.default.METERING_SERVICE_URL){throw new Error("METERING_SERVICE_URL is not set")}const n=r&&r.userSub?r.userSub:t.getUserSub();super(dxt.default.METERING_SERVICE_URL,oxn,{userSub:n,logger:t.log,requestId:t.id,targetAudience:"https://meters.zuplo.com"})}};gP.MeteringService=qRe});var mxt=y(sg=>{"use strict";Object.defineProperty(sg,"__esModule",{value:true});sg.validateHostname=sg.kebabCase=sg.snakeCase=sg.sizeInBytes=void 0;function uxn(e){return new TextEncoder().encode(JSON.stringify(e)).length}a(uxn,"sizeInBytes");sg.sizeInBytes=uxn;function lxn(e){if(!e||e===null){return""}return e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)?.map(t=>t.toLowerCase()).join("_")}a(lxn,"snakeCase");sg.snakeCase=lxn;function cxn(e){if(!e||e===null){return""}const t=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g);if(t===null){return""}return t.map(r=>r.toLowerCase()).join("-")}a(cxn,"kebabCase");sg.kebabCase=cxn;function dxn(e){try{const t=/^(?!https?:\/\/)([a-zA-Z0-9.-]*|(\*))*\.[a-zA-Z]+$/;if(e&&!t.test(e)){return false}return true}catch(t){}return false}a(dxn,"validateHostname");sg.validateHostname=dxn});var yxt=y(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:true});_e.Type=_e.JsonType=_e.JavaScriptTypeBuilder=_e.JsonTypeBuilder=_e.TypeBuilder=_e.TypeBuilderError=_e.TransformEncodeBuilder=_e.TransformDecodeBuilder=_e.TemplateLiteralDslParser=_e.TemplateLiteralGenerator=_e.TemplateLiteralGeneratorError=_e.TemplateLiteralFinite=_e.TemplateLiteralFiniteError=_e.TemplateLiteralParser=_e.TemplateLiteralParserError=_e.TemplateLiteralResolver=_e.TemplateLiteralPattern=_e.TemplateLiteralPatternError=_e.UnionResolver=_e.KeyArrayResolver=_e.KeyArrayResolverError=_e.KeyResolver=_e.ObjectMap=_e.Intrinsic=_e.IndexedAccessor=_e.TypeClone=_e.TypeExtends=_e.TypeExtendsResult=_e.TypeExtendsError=_e.ExtendsUndefined=_e.TypeGuard=_e.TypeGuardUnknownTypeError=_e.ValueGuard=_e.FormatRegistry=_e.TypeBoxError=_e.TypeRegistry=_e.PatternStringExact=_e.PatternNumberExact=_e.PatternBooleanExact=_e.PatternString=_e.PatternNumber=_e.PatternBoolean=_e.Kind=_e.Hint=_e.Optional=_e.Readonly=_e.Transform=void 0;_e.Transform=Symbol.for("TypeBox.Transform");_e.Readonly=Symbol.for("TypeBox.Readonly");_e.Optional=Symbol.for("TypeBox.Optional");_e.Hint=Symbol.for("TypeBox.Hint");_e.Kind=Symbol.for("TypeBox.Kind");_e.PatternBoolean="(true|false)";_e.PatternNumber="(0|[1-9][0-9]*)";_e.PatternString="(.*)";_e.PatternBooleanExact=`^${_e.PatternBoolean}$`;_e.PatternNumberExact=`^${_e.PatternNumber}$`;_e.PatternStringExact=`^${_e.PatternString}$`;var URe;(function(e){const t=new Map;function r(){return new Map(t)}a(r,"Entries");e.Entries=r;function n(){return t.clear()}a(n,"Clear");e.Clear=n;function i(l){return t.delete(l)}a(i,"Delete");e.Delete=i;function s(l){return t.has(l)}a(s,"Has");e.Has=s;function o(l,c){t.set(l,c)}a(o,"Set");e.Set=o;function u(l){return t.get(l)}a(u,"Get");e.Get=u})(URe||(_e.TypeRegistry=URe={}));var gh=class extends Error{static{a(this,"TypeBoxError")}constructor(t){super(t)}};_e.TypeBoxError=gh;var hxt;(function(e){const t=new Map;function r(){return new Map(t)}a(r,"Entries");e.Entries=r;function n(){return t.clear()}a(n,"Clear");e.Clear=n;function i(l){return t.delete(l)}a(i,"Delete");e.Delete=i;function s(l){return t.has(l)}a(s,"Has");e.Has=s;function o(l,c){t.set(l,c)}a(o,"Set");e.Set=o;function u(l){return t.get(l)}a(u,"Get");e.Get=u})(hxt||(_e.FormatRegistry=hxt={}));var Jt;(function(e){function t(c){return Array.isArray(c)}a(t,"IsArray");e.IsArray=t;function r(c){return typeof c==="bigint"}a(r,"IsBigInt");e.IsBigInt=r;function n(c){return typeof c==="boolean"}a(n,"IsBoolean");e.IsBoolean=n;function i(c){return c===null}a(i,"IsNull");e.IsNull=i;function s(c){return typeof c==="number"}a(s,"IsNumber");e.IsNumber=s;function o(c){return typeof c==="object"&&c!==null}a(o,"IsObject");e.IsObject=o;function u(c){return typeof c==="string"}a(u,"IsString");e.IsString=u;function l(c){return c===void 0}a(l,"IsUndefined");e.IsUndefined=l})(Jt||(_e.ValueGuard=Jt={}));var $Re=class extends gh{static{a(this,"TypeGuardUnknownTypeError")}};_e.TypeGuardUnknownTypeError=$Re;var Ee;(function(e){function t(L){try{new RegExp(L);return true}catch{return false}}a(t,"IsPattern");function r(L){if(!Jt.IsString(L))return false;for(let Se=0;Se<L.length;Se++){const Le=L.charCodeAt(Se);if(Le>=7&&Le<=13||Le===27||Le===127){return false}}return true}a(r,"IsControlCharacterFree");function n(L){return o(L)||se(L)}a(n,"IsAdditionalProperties");function i(L){return Jt.IsUndefined(L)||Jt.IsBigInt(L)}a(i,"IsOptionalBigInt");function s(L){return Jt.IsUndefined(L)||Jt.IsNumber(L)}a(s,"IsOptionalNumber");function o(L){return Jt.IsUndefined(L)||Jt.IsBoolean(L)}a(o,"IsOptionalBoolean");function u(L){return Jt.IsUndefined(L)||Jt.IsString(L)}a(u,"IsOptionalString");function l(L){return Jt.IsUndefined(L)||Jt.IsString(L)&&r(L)&&t(L)}a(l,"IsOptionalPattern");function c(L){return Jt.IsUndefined(L)||Jt.IsString(L)&&r(L)}a(c,"IsOptionalFormat");function d(L){return Jt.IsUndefined(L)||se(L)}a(d,"IsOptionalSchema");function p(L){return C(L,"Any")&&u(L.$id)}a(p,"TAny");e.TAny=p;function f(L){return C(L,"Array")&&L.type==="array"&&u(L.$id)&&se(L.items)&&s(L.minItems)&&s(L.maxItems)&&o(L.uniqueItems)&&d(L.contains)&&s(L.minContains)&&s(L.maxContains)}a(f,"TArray");e.TArray=f;function m(L){return C(L,"AsyncIterator")&&L.type==="AsyncIterator"&&u(L.$id)&&se(L.items)}a(m,"TAsyncIterator");e.TAsyncIterator=m;function h(L){return C(L,"BigInt")&&L.type==="bigint"&&u(L.$id)&&i(L.exclusiveMaximum)&&i(L.exclusiveMinimum)&&i(L.maximum)&&i(L.minimum)&&i(L.multipleOf)}a(h,"TBigInt");e.TBigInt=h;function g(L){return C(L,"Boolean")&&L.type==="boolean"&&u(L.$id)}a(g,"TBoolean");e.TBoolean=g;function _(L){return C(L,"Constructor")&&L.type==="constructor"&&u(L.$id)&&Jt.IsArray(L.parameters)&&L.parameters.every(Se=>se(Se))&&se(L.returns)}a(_,"TConstructor");e.TConstructor=_;function v(L){return C(L,"Date")&&L.type==="Date"&&u(L.$id)&&s(L.exclusiveMaximumTimestamp)&&s(L.exclusiveMinimumTimestamp)&&s(L.maximumTimestamp)&&s(L.minimumTimestamp)&&s(L.multipleOfTimestamp)}a(v,"TDate");e.TDate=v;function S(L){return C(L,"Function")&&L.type==="function"&&u(L.$id)&&Jt.IsArray(L.parameters)&&L.parameters.every(Se=>se(Se))&&se(L.returns)}a(S,"TFunction");e.TFunction=S;function E(L){return C(L,"Integer")&&L.type==="integer"&&u(L.$id)&&s(L.exclusiveMaximum)&&s(L.exclusiveMinimum)&&s(L.maximum)&&s(L.minimum)&&s(L.multipleOf)}a(E,"TInteger");e.TInteger=E;function b(L){return C(L,"Intersect")&&(Jt.IsString(L.type)&&L.type!=="object"?false:true)&&Jt.IsArray(L.allOf)&&L.allOf.every(Se=>se(Se)&&!De(Se))&&u(L.type)&&(o(L.unevaluatedProperties)||d(L.unevaluatedProperties))&&u(L.$id)}a(b,"TIntersect");e.TIntersect=b;function A(L){return C(L,"Iterator")&&L.type==="Iterator"&&u(L.$id)&&se(L.items)}a(A,"TIterator");e.TIterator=A;function C(L,Se){return T(L)&&L[_e.Kind]===Se}a(C,"TKindOf");e.TKindOf=C;function T(L){return Jt.IsObject(L)&&_e.Kind in L&&Jt.IsString(L[_e.Kind])}a(T,"TKind");e.TKind=T;function O(L){return I(L)&&Jt.IsString(L.const)}a(O,"TLiteralString");e.TLiteralString=O;function P(L){return I(L)&&Jt.IsNumber(L.const)}a(P,"TLiteralNumber");e.TLiteralNumber=P;function R(L){return I(L)&&Jt.IsBoolean(L.const)}a(R,"TLiteralBoolean");e.TLiteralBoolean=R;function I(L){return C(L,"Literal")&&u(L.$id)&&(Jt.IsBoolean(L.const)||Jt.IsNumber(L.const)||Jt.IsString(L.const))}a(I,"TLiteral");e.TLiteral=I;function D(L){return C(L,"Never")&&Jt.IsObject(L.not)&&Object.getOwnPropertyNames(L.not).length===0}a(D,"TNever");e.TNever=D;function U(L){return C(L,"Not")&&se(L.not)}a(U,"TNot");e.TNot=U;function te(L){return C(L,"Null")&&L.type==="null"&&u(L.$id)}a(te,"TNull");e.TNull=te;function ve(L){return C(L,"Number")&&L.type==="number"&&u(L.$id)&&s(L.exclusiveMaximum)&&s(L.exclusiveMinimum)&&s(L.maximum)&&s(L.minimum)&&s(L.multipleOf)}a(ve,"TNumber");e.TNumber=ve;function me(L){return C(L,"Object")&&L.type==="object"&&u(L.$id)&&Jt.IsObject(L.properties)&&n(L.additionalProperties)&&s(L.minProperties)&&s(L.maxProperties)&&Object.entries(L.properties).every(([Se,Le])=>r(Se)&&se(Le))}a(me,"TObject");e.TObject=me;function he(L){return C(L,"Promise")&&L.type==="Promise"&&u(L.$id)&&se(L.item)}a(he,"TPromise");e.TPromise=he;function Fe(L){return C(L,"Record")&&L.type==="object"&&u(L.$id)&&n(L.additionalProperties)&&Jt.IsObject(L.patternProperties)&&(Se=>{const Le=Object.getOwnPropertyNames(Se.patternProperties);return Le.length===1&&t(Le[0])&&Jt.IsObject(Se.patternProperties)&&se(Se.patternProperties[Le[0]])})(L)}a(Fe,"TRecord");e.TRecord=Fe;function Oe(L){return Jt.IsObject(L)&&_e.Hint in L&&L[_e.Hint]==="Recursive"}a(Oe,"TRecursive");e.TRecursive=Oe;function M(L){return C(L,"Ref")&&u(L.$id)&&Jt.IsString(L.$ref)}a(M,"TRef");e.TRef=M;function Q(L){return C(L,"String")&&L.type==="string"&&u(L.$id)&&s(L.minLength)&&s(L.maxLength)&&l(L.pattern)&&c(L.format)}a(Q,"TString");e.TString=Q;function fe(L){return C(L,"Symbol")&&L.type==="symbol"&&u(L.$id)}a(fe,"TSymbol");e.TSymbol=fe;function B(L){return C(L,"TemplateLiteral")&&L.type==="string"&&Jt.IsString(L.pattern)&&L.pattern[0]==="^"&&L.pattern[L.pattern.length-1]==="$"}a(B,"TTemplateLiteral");e.TTemplateLiteral=B;function ye(L){return C(L,"This")&&u(L.$id)&&Jt.IsString(L.$ref)}a(ye,"TThis");e.TThis=ye;function De(L){return Jt.IsObject(L)&&_e.Transform in L}a(De,"TTransform");e.TTransform=De;function $e(L){return C(L,"Tuple")&&L.type==="array"&&u(L.$id)&&Jt.IsNumber(L.minItems)&&Jt.IsNumber(L.maxItems)&&L.minItems===L.maxItems&&(Jt.IsUndefined(L.items)&&Jt.IsUndefined(L.additionalItems)&&L.minItems===0||Jt.IsArray(L.items)&&L.items.every(Se=>se(Se)))}a($e,"TTuple");e.TTuple=$e;function gt(L){return C(L,"Undefined")&&L.type==="undefined"&&u(L.$id)}a(gt,"TUndefined");e.TUndefined=gt;function ut(L){return F(L)&&L.anyOf.every(Se=>O(Se)||P(Se))}a(ut,"TUnionLiteral");e.TUnionLiteral=ut;function F(L){return C(L,"Union")&&u(L.$id)&&Jt.IsObject(L)&&Jt.IsArray(L.anyOf)&&L.anyOf.every(Se=>se(Se))}a(F,"TUnion");e.TUnion=F;function G(L){return C(L,"Uint8Array")&&L.type==="Uint8Array"&&u(L.$id)&&s(L.minByteLength)&&s(L.maxByteLength)}a(G,"TUint8Array");e.TUint8Array=G;function $(L){return C(L,"Unknown")&&u(L.$id)}a($,"TUnknown");e.TUnknown=$;function W(L){return C(L,"Unsafe")}a(W,"TUnsafe");e.TUnsafe=W;function pe(L){return C(L,"Void")&&L.type==="void"&&u(L.$id)}a(pe,"TVoid");e.TVoid=pe;function H(L){return Jt.IsObject(L)&&L[_e.Readonly]==="Readonly"}a(H,"TReadonly");e.TReadonly=H;function de(L){return Jt.IsObject(L)&&L[_e.Optional]==="Optional"}a(de,"TOptional");e.TOptional=de;function se(L){return Jt.IsObject(L)&&(p(L)||f(L)||g(L)||h(L)||m(L)||_(L)||v(L)||S(L)||E(L)||b(L)||A(L)||I(L)||D(L)||U(L)||te(L)||ve(L)||me(L)||he(L)||Fe(L)||M(L)||Q(L)||fe(L)||B(L)||ye(L)||$e(L)||gt(L)||F(L)||G(L)||$(L)||W(L)||pe(L)||T(L)&&URe.Has(L[_e.Kind]))}a(se,"TSchema");e.TSchema=se})(Ee||(_e.TypeGuard=Ee={}));var gxt;(function(e){function t(r){return r[_e.Kind]==="Intersect"?r.allOf.every(n=>t(n)):r[_e.Kind]==="Union"?r.anyOf.some(n=>t(n)):r[_e.Kind]==="Undefined"?true:r[_e.Kind]==="Not"?!t(r.not):false}a(t,"Check");e.Check=t})(gxt||(_e.ExtendsUndefined=gxt={}));var MJ=class extends gh{static{a(this,"TypeExtendsError")}};_e.TypeExtendsError=MJ;var at;(function(e){e[e["Union"]=0]="Union";e[e["True"]=1]="True";e[e["False"]=2]="False"})(at||(_e.TypeExtendsResult=at={}));var iC;(function(e){function t(N){return N===at.False?N:at.True}a(t,"IntoBooleanResult");function r(N){throw new MJ(N)}a(r,"Throw");function n(N){return Ee.TNever(N)||Ee.TIntersect(N)||Ee.TUnion(N)||Ee.TUnknown(N)||Ee.TAny(N)}a(n,"IsStructuralRight");function i(N,k){return Ee.TNever(k)?C(N,k):Ee.TIntersect(k)?S(N,k):Ee.TUnion(k)?Mt(N,k):Ee.TUnknown(k)?Ur(N,k):Ee.TAny(k)?s(N,k):r("StructuralRight")}a(i,"StructuralRight");function s(N,k){return at.True}a(s,"TAnyRight");function o(N,k){return Ee.TIntersect(k)?S(N,k):Ee.TUnion(k)&&k.anyOf.some(Ae=>Ee.TAny(Ae)||Ee.TUnknown(Ae))?at.True:Ee.TUnion(k)?at.Union:Ee.TUnknown(k)?at.True:Ee.TAny(k)?at.True:at.Union}a(o,"TAny");function u(N,k){return Ee.TUnknown(N)?at.False:Ee.TAny(N)?at.Union:Ee.TNever(N)?at.True:at.False}a(u,"TArrayRight");function l(N,k){return Ee.TObject(k)&&B(k)?at.True:n(k)?i(N,k):!Ee.TArray(k)?at.False:t(J(N.items,k.items))}a(l,"TArray");function c(N,k){return n(k)?i(N,k):!Ee.TAsyncIterator(k)?at.False:t(J(N.items,k.items))}a(c,"TAsyncIterator");function d(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TBigInt(k)?at.True:at.False}a(d,"TBigInt");function p(N,k){return Ee.TLiteral(N)&&Jt.IsBoolean(N.const)?at.True:Ee.TBoolean(N)?at.True:at.False}a(p,"TBooleanRight");function f(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TBoolean(k)?at.True:at.False}a(f,"TBoolean");function m(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):!Ee.TConstructor(k)?at.False:N.parameters.length>k.parameters.length?at.False:!N.parameters.every((Ae,Be)=>t(J(k.parameters[Be],Ae))===at.True)?at.False:t(J(N.returns,k.returns))}a(m,"TConstructor");function h(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TDate(k)?at.True:at.False}a(h,"TDate");function g(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):!Ee.TFunction(k)?at.False:N.parameters.length>k.parameters.length?at.False:!N.parameters.every((Ae,Be)=>t(J(k.parameters[Be],Ae))===at.True)?at.False:t(J(N.returns,k.returns))}a(g,"TFunction");function _(N,k){return Ee.TLiteral(N)&&Jt.IsNumber(N.const)?at.True:Ee.TNumber(N)||Ee.TInteger(N)?at.True:at.False}a(_,"TIntegerRight");function v(N,k){return Ee.TInteger(k)||Ee.TNumber(k)?at.True:n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):at.False}a(v,"TInteger");function S(N,k){return k.allOf.every(Ae=>J(N,Ae)===at.True)?at.True:at.False}a(S,"TIntersectRight");function E(N,k){return N.allOf.some(Ae=>J(Ae,k)===at.True)?at.True:at.False}a(E,"TIntersect");function b(N,k){return n(k)?i(N,k):!Ee.TIterator(k)?at.False:t(J(N.items,k.items))}a(b,"TIterator");function A(N,k){return Ee.TLiteral(k)&&k.const===N.const?at.True:n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TString(k)?pe(N,k):Ee.TNumber(k)?I(N,k):Ee.TInteger(k)?_(N,k):Ee.TBoolean(k)?p(N,k):at.False}a(A,"TLiteral");function C(N,k){return at.False}a(C,"TNeverRight");function T(N,k){return at.True}a(T,"TNever");function O(N){let[k,Ae]=[N,0];while(true){if(!Ee.TNot(k))break;k=k.not;Ae+=1}return Ae%2===0?k:_e.Type.Unknown()}a(O,"UnwrapTNot");function P(N,k){return Ee.TNot(N)?J(O(N),k):Ee.TNot(k)?J(N,O(k)):r("Invalid fallthrough for Not")}a(P,"TNot");function R(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TNull(k)?at.True:at.False}a(R,"TNull");function I(N,k){return Ee.TLiteralNumber(N)?at.True:Ee.TNumber(N)||Ee.TInteger(N)?at.True:at.False}a(I,"TNumberRight");function D(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TInteger(k)||Ee.TNumber(k)?at.True:at.False}a(D,"TNumber");function U(N,k){return Object.getOwnPropertyNames(N.properties).length===k}a(U,"IsObjectPropertyCount");function te(N){return B(N)}a(te,"IsObjectStringLike");function ve(N){return U(N,0)||U(N,1)&&"description"in N.properties&&Ee.TUnion(N.properties.description)&&N.properties.description.anyOf.length===2&&(Ee.TString(N.properties.description.anyOf[0])&&Ee.TUndefined(N.properties.description.anyOf[1])||Ee.TString(N.properties.description.anyOf[1])&&Ee.TUndefined(N.properties.description.anyOf[0]))}a(ve,"IsObjectSymbolLike");function me(N){return U(N,0)}a(me,"IsObjectNumberLike");function he(N){return U(N,0)}a(he,"IsObjectBooleanLike");function Fe(N){return U(N,0)}a(Fe,"IsObjectBigIntLike");function Oe(N){return U(N,0)}a(Oe,"IsObjectDateLike");function M(N){return B(N)}a(M,"IsObjectUint8ArrayLike");function Q(N){const k=_e.Type.Number();return U(N,0)||U(N,1)&&"length"in N.properties&&t(J(N.properties["length"],k))===at.True}a(Q,"IsObjectFunctionLike");function fe(N){return U(N,0)}a(fe,"IsObjectConstructorLike");function B(N){const k=_e.Type.Number();return U(N,0)||U(N,1)&&"length"in N.properties&&t(J(N.properties["length"],k))===at.True}a(B,"IsObjectArrayLike");function ye(N){const k=_e.Type.Function([_e.Type.Any()],_e.Type.Any());return U(N,0)||U(N,1)&&"then"in N.properties&&t(J(N.properties["then"],k))===at.True}a(ye,"IsObjectPromiseLike");function De(N,k){return J(N,k)===at.False?at.False:Ee.TOptional(N)&&!Ee.TOptional(k)?at.False:at.True}a(De,"Property");function $e(N,k){return Ee.TUnknown(N)?at.False:Ee.TAny(N)?at.Union:Ee.TNever(N)||Ee.TLiteralString(N)&&te(k)||Ee.TLiteralNumber(N)&&me(k)||Ee.TLiteralBoolean(N)&&he(k)||Ee.TSymbol(N)&&ve(k)||Ee.TBigInt(N)&&Fe(k)||Ee.TString(N)&&te(k)||Ee.TSymbol(N)&&ve(k)||Ee.TNumber(N)&&me(k)||Ee.TInteger(N)&&me(k)||Ee.TBoolean(N)&&he(k)||Ee.TUint8Array(N)&&M(k)||Ee.TDate(N)&&Oe(k)||Ee.TConstructor(N)&&fe(k)||Ee.TFunction(N)&&Q(k)?at.True:Ee.TRecord(N)&&Ee.TString(F(N))?(()=>{return k[_e.Hint]==="Record"?at.True:at.False})():Ee.TRecord(N)&&Ee.TNumber(F(N))?(()=>{return U(k,0)?at.True:at.False})():at.False}a($e,"TObjectRight");function gt(N,k){return n(k)?i(N,k):Ee.TRecord(k)?$(N,k):!Ee.TObject(k)?at.False:(()=>{for(const Ae of Object.getOwnPropertyNames(k.properties)){if(!(Ae in N.properties))return at.False;if(De(N.properties[Ae],k.properties[Ae])===at.False){return at.False}}return at.True})()}a(gt,"TObject");function ut(N,k){return n(k)?i(N,k):Ee.TObject(k)&&ye(k)?at.True:!Ee.TPromise(k)?at.False:t(J(N.item,k.item))}a(ut,"TPromise");function F(N){return _e.PatternNumberExact in N.patternProperties?_e.Type.Number():_e.PatternStringExact in N.patternProperties?_e.Type.String():r("Unknown record key pattern")}a(F,"RecordKey");function G(N){return _e.PatternNumberExact in N.patternProperties?N.patternProperties[_e.PatternNumberExact]:_e.PatternStringExact in N.patternProperties?N.patternProperties[_e.PatternStringExact]:r("Unable to get record value schema")}a(G,"RecordValue");function $(N,k){const[Ae,Be]=[F(k),G(k)];return Ee.TLiteralString(N)&&Ee.TNumber(Ae)&&t(J(N,Be))===at.True?at.True:Ee.TUint8Array(N)&&Ee.TNumber(Ae)?J(N,Be):Ee.TString(N)&&Ee.TNumber(Ae)?J(N,Be):Ee.TArray(N)&&Ee.TNumber(Ae)?J(N,Be):Ee.TObject(N)?(()=>{for(const et of Object.getOwnPropertyNames(N.properties)){if(De(Be,N.properties[et])===at.False){return at.False}}return at.True})():at.False}a($,"TRecordRight");function W(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):!Ee.TRecord(k)?at.False:J(G(N),G(k))}a(W,"TRecord");function pe(N,k){return Ee.TLiteral(N)&&Jt.IsString(N.const)?at.True:Ee.TString(N)?at.True:at.False}a(pe,"TStringRight");function H(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TString(k)?at.True:at.False}a(H,"TString");function de(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TSymbol(k)?at.True:at.False}a(de,"TSymbol");function se(N,k){return Ee.TTemplateLiteral(N)?J(xy.Resolve(N),k):Ee.TTemplateLiteral(k)?J(N,xy.Resolve(k)):r("Invalid fallthrough for TemplateLiteral")}a(se,"TTemplateLiteral");function L(N,k){return Ee.TArray(k)&&N.items!==void 0&&N.items.every(Ae=>J(Ae,k.items)===at.True)}a(L,"IsArrayOfTuple");function Se(N,k){return Ee.TNever(N)?at.True:Ee.TUnknown(N)?at.False:Ee.TAny(N)?at.Union:at.False}a(Se,"TTupleRight");function Le(N,k){return n(k)?i(N,k):Ee.TObject(k)&&B(k)?at.True:Ee.TArray(k)&&L(N,k)?at.True:!Ee.TTuple(k)?at.False:Jt.IsUndefined(N.items)&&!Jt.IsUndefined(k.items)||!Jt.IsUndefined(N.items)&&Jt.IsUndefined(k.items)?at.False:Jt.IsUndefined(N.items)&&!Jt.IsUndefined(k.items)?at.True:N.items.every((Ae,Be)=>J(Ae,k.items[Be])===at.True)?at.True:at.False}a(Le,"TTuple");function Ke(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TUint8Array(k)?at.True:at.False}a(Ke,"TUint8Array");function St(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TVoid(k)?j(N,k):Ee.TUndefined(k)?at.True:at.False}a(St,"TUndefined");function Mt(N,k){return k.anyOf.some(Ae=>J(N,Ae)===at.True)?at.True:at.False}a(Mt,"TUnionRight");function _r(N,k){return N.anyOf.every(Ae=>J(Ae,k)===at.True)?at.True:at.False}a(_r,"TUnion");function Ur(N,k){return at.True}a(Ur,"TUnknownRight");function Ve(N,k){return Ee.TNever(k)?C(N,k):Ee.TIntersect(k)?S(N,k):Ee.TUnion(k)?Mt(N,k):Ee.TAny(k)?s(N,k):Ee.TString(k)?pe(N,k):Ee.TNumber(k)?I(N,k):Ee.TInteger(k)?_(N,k):Ee.TBoolean(k)?p(N,k):Ee.TArray(k)?u(N,k):Ee.TTuple(k)?Se(N,k):Ee.TObject(k)?$e(N,k):Ee.TUnknown(k)?at.True:at.False}a(Ve,"TUnknown");function j(N,k){return Ee.TUndefined(N)?at.True:Ee.TUndefined(N)?at.True:at.False}a(j,"VoidRight");function q(N,k){return Ee.TIntersect(k)?S(N,k):Ee.TUnion(k)?Mt(N,k):Ee.TUnknown(k)?Ur(N,k):Ee.TAny(k)?s(N,k):Ee.TObject(k)?$e(N,k):Ee.TVoid(k)?at.True:at.False}a(q,"TVoid");function J(N,k){return Ee.TTemplateLiteral(N)||Ee.TTemplateLiteral(k)?se(N,k):Ee.TNot(N)||Ee.TNot(k)?P(N,k):Ee.TAny(N)?o(N,k):Ee.TArray(N)?l(N,k):Ee.TBigInt(N)?d(N,k):Ee.TBoolean(N)?f(N,k):Ee.TAsyncIterator(N)?c(N,k):Ee.TConstructor(N)?m(N,k):Ee.TDate(N)?h(N,k):Ee.TFunction(N)?g(N,k):Ee.TInteger(N)?v(N,k):Ee.TIntersect(N)?E(N,k):Ee.TIterator(N)?b(N,k):Ee.TLiteral(N)?A(N,k):Ee.TNever(N)?T(N,k):Ee.TNull(N)?R(N,k):Ee.TNumber(N)?D(N,k):Ee.TObject(N)?gt(N,k):Ee.TRecord(N)?W(N,k):Ee.TString(N)?H(N,k):Ee.TSymbol(N)?de(N,k):Ee.TTuple(N)?Le(N,k):Ee.TPromise(N)?ut(N,k):Ee.TUint8Array(N)?Ke(N,k):Ee.TUndefined(N)?St(N,k):Ee.TUnion(N)?_r(N,k):Ee.TUnknown(N)?Ve(N,k):Ee.TVoid(N)?q(N,k):r(`Unknown left type operand '${N[_e.Kind]}'`)}a(J,"Visit");function ae(N,k){return J(N,k)}a(ae,"Extends");e.Extends=ae})(iC||(_e.TypeExtends=iC={}));var Rr;(function(e){function t(o){const u=Object.getOwnPropertyNames(o).reduce((c,d)=>({...c,[d]:n(o[d])}),{});const l=Object.getOwnPropertySymbols(o).reduce((c,d)=>({...c,[d]:n(o[d])}),{});return{...u,...l}}a(t,"ObjectType");function r(o){return o.map(u=>n(u))}a(r,"ArrayType");function n(o){return Jt.IsArray(o)?r(o):Jt.IsObject(o)?t(o):o}a(n,"Visit");function i(o){return o.map(u=>s(u))}a(i,"Rest");e.Rest=i;function s(o,u={}){return{...n(o),...u}}a(s,"Type");e.Type=s})(Rr||(_e.TypeClone=Rr={}));var jRe;(function(e){function t(m){return m.map(h=>{const{[_e.Optional]:g,..._}=Rr.Type(h);return _})}a(t,"OptionalUnwrap");function r(m){return m.every(h=>Ee.TOptional(h))}a(r,"IsIntersectOptional");function n(m){return m.some(h=>Ee.TOptional(h))}a(n,"IsUnionOptional");function i(m){return r(m.allOf)?_e.Type.Optional(_e.Type.Intersect(t(m.allOf))):m}a(i,"ResolveIntersect");function s(m){return n(m.anyOf)?_e.Type.Optional(_e.Type.Union(t(m.anyOf))):m}a(s,"ResolveUnion");function o(m){return m[_e.Kind]==="Intersect"?i(m):m[_e.Kind]==="Union"?s(m):m}a(o,"ResolveOptional");function u(m,h){const g=m.allOf.reduce((_,v)=>{const S=p(v,h);return S[_e.Kind]==="Never"?_:[..._,S]},[]);return o(_e.Type.Intersect(g))}a(u,"TIntersect");function l(m,h){const g=m.anyOf.map(_=>p(_,h));return o(_e.Type.Union(g))}a(l,"TUnion");function c(m,h){const g=m.properties[h];return Jt.IsUndefined(g)?_e.Type.Never():_e.Type.Union([g])}a(c,"TObject");function d(m,h){const g=m.items;if(Jt.IsUndefined(g))return _e.Type.Never();const _=g[h];if(Jt.IsUndefined(_))return _e.Type.Never();return _}a(d,"TTuple");function p(m,h){return m[_e.Kind]==="Intersect"?u(m,h):m[_e.Kind]==="Union"?l(m,h):m[_e.Kind]==="Object"?c(m,h):m[_e.Kind]==="Tuple"?d(m,h):_e.Type.Never()}a(p,"Visit");function f(m,h,g={}){const _=h.map(v=>p(m,v.toString()));return o(_e.Type.Union(_,g))}a(f,"Resolve");e.Resolve=f})(jRe||(_e.IndexedAccessor=jRe={}));var yP;(function(e){function t(d){const[p,f]=[d.slice(0,1),d.slice(1)];return`${p.toLowerCase()}${f}`}a(t,"Uncapitalize");function r(d){const[p,f]=[d.slice(0,1),d.slice(1)];return`${p.toUpperCase()}${f}`}a(r,"Capitalize");function n(d){return d.toUpperCase()}a(n,"Uppercase");function i(d){return d.toLowerCase()}a(i,"Lowercase");function s(d,p){const f=vP.ParseExact(d.pattern);const m=EP.Check(f);if(!m)return{...d,pattern:o(d.pattern,p)};const h=[...bP.Generate(f)];const g=h.map(S=>_e.Type.Literal(S));const _=u(g,p);const v=_e.Type.Union(_);return _e.Type.TemplateLiteral([v])}a(s,"IntrinsicTemplateLiteral");function o(d,p){return typeof d==="string"?p==="Uncapitalize"?t(d):p==="Capitalize"?r(d):p==="Uppercase"?n(d):p==="Lowercase"?i(d):d:d.toString()}a(o,"IntrinsicLiteral");function u(d,p){if(d.length===0)return[];const[f,...m]=d;return[c(f,p),...u(m,p)]}a(u,"IntrinsicRest");function l(d,p){return Ee.TTemplateLiteral(d)?s(d,p):Ee.TUnion(d)?_e.Type.Union(u(d.anyOf,p)):Ee.TLiteral(d)?_e.Type.Literal(o(d.const,p)):d}a(l,"Visit");function c(d,p){return l(d,p)}a(c,"Map");e.Map=c})(yP||(_e.Intrinsic=yP={}));var _P;(function(e){function t(o,u){return _e.Type.Intersect(o.allOf.map(l=>i(l,u)),{...o})}a(t,"TIntersect");function r(o,u){return _e.Type.Union(o.anyOf.map(l=>i(l,u)),{...o})}a(r,"TUnion");function n(o,u){return u(o)}a(n,"TObject");function i(o,u){return o[_e.Kind]==="Intersect"?t(o,u):o[_e.Kind]==="Union"?r(o,u):o[_e.Kind]==="Object"?n(o,u):o}a(i,"Visit");function s(o,u,l){return{...i(Rr.Type(o),u),...l}}a(s,"Map");e.Map=s})(_P||(_e.ObjectMap=_P={}));var qJ;(function(e){function t(c){return c[0]==="^"&&c[c.length-1]==="$"?c.slice(1,c.length-1):c}a(t,"UnwrapPattern");function r(c,d){return c.allOf.reduce((p,f)=>[...p,...o(f,d)],[])}a(r,"TIntersect");function n(c,d){const p=c.anyOf.map(f=>o(f,d));return[...p.reduce((f,m)=>m.map(h=>p.every(g=>g.includes(h))?f.add(h):f)[0],new Set)]}a(n,"TUnion");function i(c,d){return Object.getOwnPropertyNames(c.properties)}a(i,"TObject");function s(c,d){return d.includePatterns?Object.getOwnPropertyNames(c.patternProperties):[]}a(s,"TRecord");function o(c,d){return Ee.TIntersect(c)?r(c,d):Ee.TUnion(c)?n(c,d):Ee.TObject(c)?i(c,d):Ee.TRecord(c)?s(c,d):[]}a(o,"Visit");function u(c,d){return[...new Set(o(c,d))]}a(u,"ResolveKeys");e.ResolveKeys=u;function l(c){const d=u(c,{includePatterns:true});const p=d.map(f=>`(${t(f)})`);return`^(${p.join("|")})$`}a(l,"ResolvePattern");e.ResolvePattern=l})(qJ||(_e.KeyResolver=qJ={}));var UJ=class extends gh{static{a(this,"KeyArrayResolverError")}};_e.KeyArrayResolverError=UJ;var qF;(function(e){function t(r){return Array.isArray(r)?r:Ee.TUnionLiteral(r)?r.anyOf.map(n=>n.const.toString()):Ee.TLiteral(r)?[r.const]:Ee.TTemplateLiteral(r)?(()=>{const n=vP.ParseExact(r.pattern);if(!EP.Check(n))throw new UJ("Cannot resolve keys from infinite template expression");return[...bP.Generate(n)]})():[]}a(t,"Resolve");e.Resolve=t})(qF||(_e.KeyArrayResolver=qF={}));var GRe;(function(e){function*t(n){for(const i of n.anyOf){if(i[_e.Kind]==="Union"){yield*t(i)}else{yield i}}}a(t,"TUnion");function r(n){return _e.Type.Union([...t(n)],{...n})}a(r,"Resolve");e.Resolve=r})(GRe||(_e.UnionResolver=GRe={}));var $J=class extends gh{static{a(this,"TemplateLiteralPatternError")}};_e.TemplateLiteralPatternError=$J;var jJ;(function(e){function t(s){throw new $J(s)}a(t,"Throw");function r(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(r,"Escape");function n(s,o){return Ee.TTemplateLiteral(s)?s.pattern.slice(1,s.pattern.length-1):Ee.TUnion(s)?`(${s.anyOf.map(u=>n(u,o)).join("|")})`:Ee.TNumber(s)?`${o}${_e.PatternNumber}`:Ee.TInteger(s)?`${o}${_e.PatternNumber}`:Ee.TBigInt(s)?`${o}${_e.PatternNumber}`:Ee.TString(s)?`${o}${_e.PatternString}`:Ee.TLiteral(s)?`${o}${r(s.const.toString())}`:Ee.TBoolean(s)?`${o}${_e.PatternBoolean}`:t(`Unexpected Kind '${s[_e.Kind]}'`)}a(n,"Visit");function i(s){return`^${s.map(o=>n(o,"")).join("")}$`}a(i,"Create");e.Create=i})(jJ||(_e.TemplateLiteralPattern=jJ={}));var xy;(function(e){function t(r){const n=vP.ParseExact(r.pattern);if(!EP.Check(n))return _e.Type.String();const i=[...bP.Generate(n)].map(s=>_e.Type.Literal(s));return _e.Type.Union(i)}a(t,"Resolve");e.Resolve=t})(xy||(_e.TemplateLiteralResolver=xy={}));var UF=class extends gh{static{a(this,"TemplateLiteralParserError")}};_e.TemplateLiteralParserError=UF;var vP;(function(e){function t(m,h,g){return m[h]===g&&m.charCodeAt(h-1)!==92}a(t,"IsNonEscaped");function r(m,h){return t(m,h,"(")}a(r,"IsOpenParen");function n(m,h){return t(m,h,")")}a(n,"IsCloseParen");function i(m,h){return t(m,h,"|")}a(i,"IsSeparator");function s(m){if(!(r(m,0)&&n(m,m.length-1)))return false;let h=0;for(let g=0;g<m.length;g++){if(r(m,g))h+=1;if(n(m,g))h-=1;if(h===0&&g!==m.length-1)return false}return true}a(s,"IsGroup");function o(m){return m.slice(1,m.length-1)}a(o,"InGroup");function u(m){let h=0;for(let g=0;g<m.length;g++){if(r(m,g))h+=1;if(n(m,g))h-=1;if(i(m,g)&&h===0)return true}return false}a(u,"IsPrecedenceOr");function l(m){for(let h=0;h<m.length;h++){if(r(m,h))return true}return false}a(l,"IsPrecedenceAnd");function c(m){let[h,g]=[0,0];const _=[];for(let S=0;S<m.length;S++){if(r(m,S))h+=1;if(n(m,S))h-=1;if(i(m,S)&&h===0){const E=m.slice(g,S);if(E.length>0)_.push(p(E));g=S+1}}const v=m.slice(g);if(v.length>0)_.push(p(v));if(_.length===0)return{type:"const",const:""};if(_.length===1)return _[0];return{type:"or",expr:_}}a(c,"Or");function d(m){function h(v,S){if(!r(v,S))throw new UF(`TemplateLiteralParser: Index must point to open parens`);let E=0;for(let b=S;b<v.length;b++){if(r(v,b))E+=1;if(n(v,b))E-=1;if(E===0)return[S,b]}throw new UF(`TemplateLiteralParser: Unclosed group parens in expression`)}a(h,"Group");function g(v,S){for(let E=S;E<v.length;E++){if(r(v,E))return[S,E]}return[S,v.length]}a(g,"Range");const _=[];for(let v=0;v<m.length;v++){if(r(m,v)){const[S,E]=h(m,v);const b=m.slice(S,E+1);_.push(p(b));v=E}else{const[S,E]=g(m,v);const b=m.slice(S,E);if(b.length>0)_.push(p(b));v=E-1}}return _.length===0?{type:"const",const:""}:_.length===1?_[0]:{type:"and",expr:_}}a(d,"And");function p(m){return s(m)?p(o(m)):u(m)?c(m):l(m)?d(m):{type:"const",const:m}}a(p,"Parse");e.Parse=p;function f(m){return p(m.slice(1,m.length-1))}a(f,"ParseExact");e.ParseExact=f})(vP||(_e.TemplateLiteralParser=vP={}));var GJ=class extends gh{static{a(this,"TemplateLiteralFiniteError")}};_e.TemplateLiteralFiniteError=GJ;var EP;(function(e){function t(o){throw new GJ(o)}a(t,"Throw");function r(o){return o.type==="or"&&o.expr.length===2&&o.expr[0].type==="const"&&o.expr[0].const==="0"&&o.expr[1].type==="const"&&o.expr[1].const==="[1-9][0-9]*"}a(r,"IsNumber");function n(o){return o.type==="or"&&o.expr.length===2&&o.expr[0].type==="const"&&o.expr[0].const==="true"&&o.expr[1].type==="const"&&o.expr[1].const==="false"}a(n,"IsBoolean");function i(o){return o.type==="const"&&o.const===".*"}a(i,"IsString");function s(o){return n(o)?true:r(o)||i(o)?false:o.type==="and"?o.expr.every(u=>s(u)):o.type==="or"?o.expr.every(u=>s(u)):o.type==="const"?true:t(`Unknown expression type`)}a(s,"Check");e.Check=s})(EP||(_e.TemplateLiteralFinite=EP={}));var HJ=class extends gh{static{a(this,"TemplateLiteralGeneratorError")}};_e.TemplateLiteralGeneratorError=HJ;var bP;(function(e){function*t(o){if(o.length===1)return yield*o[0];for(const u of o[0]){for(const l of t(o.slice(1))){yield`${u}${l}`}}}a(t,"Reduce");function*r(o){return yield*t(o.expr.map(u=>[...s(u)]))}a(r,"And");function*n(o){for(const u of o.expr)yield*s(u)}a(n,"Or");function*i(o){return yield o.const}a(i,"Const");function*s(o){return o.type==="and"?yield*r(o):o.type==="or"?yield*n(o):o.type==="const"?yield*i(o):(()=>{throw new HJ("Unknown expression")})()}a(s,"Generate");e.Generate=s})(bP||(_e.TemplateLiteralGenerator=bP={}));var HRe;(function(e){function*t(s){const o=s.trim().replace(/"|'/g,"");return o==="boolean"?yield _e.Type.Boolean():o==="number"?yield _e.Type.Number():o==="bigint"?yield _e.Type.BigInt():o==="string"?yield _e.Type.String():yield(()=>{const u=o.split("|").map(l=>_e.Type.Literal(l.trim()));return u.length===0?_e.Type.Never():u.length===1?u[0]:_e.Type.Union(u)})()}a(t,"ParseUnion");function*r(s){if(s[1]!=="{"){const o=_e.Type.Literal("$");const u=n(s.slice(1));return yield*[o,...u]}for(let o=2;o<s.length;o++){if(s[o]==="}"){const u=t(s.slice(2,o));const l=n(s.slice(o+1));return yield*[...u,...l]}}yield _e.Type.Literal(s)}a(r,"ParseTerminal");function*n(s){for(let o=0;o<s.length;o++){if(s[o]==="$"){const u=_e.Type.Literal(s.slice(0,o));const l=r(s.slice(o));return yield*[u,...l]}}yield _e.Type.Literal(s)}a(n,"ParseLiteral");function i(s){return[...n(s)]}a(i,"Parse");e.Parse=i})(HRe||(_e.TemplateLiteralDslParser=HRe={}));var VJ=class{static{a(this,"TransformDecodeBuilder")}constructor(t){this.schema=t}Decode(t){return new zJ(this.schema,t)}};_e.TransformDecodeBuilder=VJ;var zJ=class{static{a(this,"TransformEncodeBuilder")}constructor(t,r){this.schema=t;this.decode=r}Encode(t){const r=Rr.Type(this.schema);return Ee.TTransform(r)?(()=>{const n=a(o=>r[_e.Transform].Encode(t(o)),"Encode");const i=a(o=>this.decode(r[_e.Transform].Decode(o)),"Decode");const s={Encode:n,Decode:i};return{...r,[_e.Transform]:s}})():(()=>{const n={Decode:this.decode,Encode:t};return{...r,[_e.Transform]:n}})()}};_e.TransformEncodeBuilder=zJ;var pxn=0;var KJ=class extends gh{static{a(this,"TypeBuilderError")}};_e.TypeBuilderError=KJ;var WJ=class{static{a(this,"TypeBuilder")}Create(t){return t}Throw(t){throw new KJ(t)}Discard(t,r){const{[r]:n,...i}=t;return i}Strict(t){return JSON.parse(JSON.stringify(t))}};_e.TypeBuilder=WJ;var $F=class extends WJ{static{a(this,"JsonTypeBuilder")}ReadonlyOptional(t){return this.Readonly(this.Optional(t))}Readonly(t){return{...Rr.Type(t),[_e.Readonly]:"Readonly"}}Optional(t){return{...Rr.Type(t),[_e.Optional]:"Optional"}}Any(t={}){return this.Create({...t,[_e.Kind]:"Any"})}Array(t,r={}){return this.Create({...r,[_e.Kind]:"Array",type:"array",items:Rr.Type(t)})}Boolean(t={}){return this.Create({...t,[_e.Kind]:"Boolean",type:"boolean"})}Capitalize(t,r={}){return{...yP.Map(Rr.Type(t),"Capitalize"),...r}}Composite(t,r){const n=_e.Type.Intersect(t,{});const i=qJ.ResolveKeys(n,{includePatterns:false});const s=i.reduce((o,u)=>({...o,[u]:_e.Type.Index(n,[u])}),{});return _e.Type.Object(s,r)}Enum(t,r={}){const n=Object.getOwnPropertyNames(t).filter(s=>isNaN(s)).map(s=>t[s]);const i=n.map(s=>Jt.IsString(s)?{[_e.Kind]:"Literal",type:"string",const:s}:{[_e.Kind]:"Literal",type:"number",const:s});return this.Create({...r,[_e.Kind]:"Union",anyOf:i})}Extends(t,r,n,i,s={}){switch(iC.Extends(t,r)){case at.Union:return this.Union([Rr.Type(n,s),Rr.Type(i,s)]);case at.True:return Rr.Type(n,s);case at.False:return Rr.Type(i,s)}}Exclude(t,r,n={}){return Ee.TTemplateLiteral(t)?this.Exclude(xy.Resolve(t),r,n):Ee.TTemplateLiteral(r)?this.Exclude(t,xy.Resolve(r),n):Ee.TUnion(t)?(()=>{const i=t.anyOf.filter(s=>iC.Extends(s,r)===at.False);return i.length===1?Rr.Type(i[0],n):this.Union(i,n)})():iC.Extends(t,r)!==at.False?this.Never(n):Rr.Type(t,n)}Extract(t,r,n={}){return Ee.TTemplateLiteral(t)?this.Extract(xy.Resolve(t),r,n):Ee.TTemplateLiteral(r)?this.Extract(t,xy.Resolve(r),n):Ee.TUnion(t)?(()=>{const i=t.anyOf.filter(s=>iC.Extends(s,r)!==at.False);return i.length===1?Rr.Type(i[0],n):this.Union(i,n)})():iC.Extends(t,r)!==at.False?Rr.Type(t,n):this.Never(n)}Index(t,r,n={}){return Ee.TArray(t)&&Ee.TNumber(r)?(()=>{return Rr.Type(t.items,n)})():Ee.TTuple(t)&&Ee.TNumber(r)?(()=>{const i=Jt.IsUndefined(t.items)?[]:t.items;const s=i.map(o=>Rr.Type(o));return this.Union(s,n)})():(()=>{const i=qF.Resolve(r);const s=Rr.Type(t);return jRe.Resolve(s,i,n)})()}Integer(t={}){return this.Create({...t,[_e.Kind]:"Integer",type:"integer"})}Intersect(t,r={}){if(t.length===0)return _e.Type.Never();if(t.length===1)return Rr.Type(t[0],r);if(t.some(o=>Ee.TTransform(o)))this.Throw("Cannot intersect transform types");const n=t.every(o=>Ee.TObject(o));const i=Rr.Rest(t);const s=Ee.TSchema(r.unevaluatedProperties)?{unevaluatedProperties:Rr.Type(r.unevaluatedProperties)}:{};return r.unevaluatedProperties===false||Ee.TSchema(r.unevaluatedProperties)||n?this.Create({...r,...s,[_e.Kind]:"Intersect",type:"object",allOf:i}):this.Create({...r,...s,[_e.Kind]:"Intersect",allOf:i})}KeyOf(t,r={}){return Ee.TRecord(t)?(()=>{const n=Object.getOwnPropertyNames(t.patternProperties)[0];return n===_e.PatternNumberExact?this.Number(r):n===_e.PatternStringExact?this.String(r):this.Throw("Unable to resolve key type from Record key pattern")})():Ee.TTuple(t)?(()=>{const n=Jt.IsUndefined(t.items)?[]:t.items;const i=n.map((s,o)=>_e.Type.Literal(o.toString()));return this.Union(i,r)})():Ee.TArray(t)?(()=>{return this.Number(r)})():(()=>{const n=qJ.ResolveKeys(t,{includePatterns:false});if(n.length===0)return this.Never(r);const i=n.map(s=>this.Literal(s));return this.Union(i,r)})()}Literal(t,r={}){return this.Create({...r,[_e.Kind]:"Literal",const:t,type:typeof t})}Lowercase(t,r={}){return{...yP.Map(Rr.Type(t),"Lowercase"),...r}}Never(t={}){return this.Create({...t,[_e.Kind]:"Never",not:{}})}Not(t,r){return this.Create({...r,[_e.Kind]:"Not",not:Rr.Type(t)})}Null(t={}){return this.Create({...t,[_e.Kind]:"Null",type:"null"})}Number(t={}){return this.Create({...t,[_e.Kind]:"Number",type:"number"})}Object(t,r={}){const n=Object.getOwnPropertyNames(t);const i=n.filter(l=>Ee.TOptional(t[l]));const s=n.filter(l=>!i.includes(l));const o=Ee.TSchema(r.additionalProperties)?{additionalProperties:Rr.Type(r.additionalProperties)}:{};const u=n.reduce((l,c)=>({...l,[c]:Rr.Type(t[c])}),{});return s.length>0?this.Create({...r,...o,[_e.Kind]:"Object",type:"object",properties:u,required:s}):this.Create({...r,...o,[_e.Kind]:"Object",type:"object",properties:u})}Omit(t,r,n={}){const i=qF.Resolve(r);return _P.Map(this.Discard(Rr.Type(t),_e.Transform),s=>{if(Jt.IsArray(s.required)){s.required=s.required.filter(o=>!i.includes(o));if(s.required.length===0)delete s.required}for(const o of Object.getOwnPropertyNames(s.properties)){if(i.includes(o))delete s.properties[o]}return this.Create(s)},n)}Partial(t,r={}){return _P.Map(this.Discard(Rr.Type(t),_e.Transform),n=>{const i=Object.getOwnPropertyNames(n.properties).reduce((s,o)=>{return{...s,[o]:this.Optional(n.properties[o])}},{});return this.Object(i,this.Discard(n,"required"))},r)}Pick(t,r,n={}){const i=qF.Resolve(r);return _P.Map(this.Discard(Rr.Type(t),_e.Transform),s=>{if(Jt.IsArray(s.required)){s.required=s.required.filter(o=>i.includes(o));if(s.required.length===0)delete s.required}for(const o of Object.getOwnPropertyNames(s.properties)){if(!i.includes(o))delete s.properties[o]}return this.Create(s)},n)}Record(t,r,n={}){return Ee.TTemplateLiteral(t)?(()=>{const i=vP.ParseExact(t.pattern);return EP.Check(i)?this.Object([...bP.Generate(i)].reduce((s,o)=>({...s,[o]:Rr.Type(r)}),{}),n):this.Create({...n,[_e.Kind]:"Record",type:"object",patternProperties:{[t.pattern]:Rr.Type(r)}})})():Ee.TUnion(t)?(()=>{const i=GRe.Resolve(t);if(Ee.TUnionLiteral(i)){const s=i.anyOf.reduce((o,u)=>({...o,[u.const]:Rr.Type(r)}),{});return this.Object(s,{...n,[_e.Hint]:"Record"})}else this.Throw("Record key of type union contains non-literal types")})():Ee.TLiteral(t)?(()=>{return Jt.IsString(t.const)||Jt.IsNumber(t.const)?this.Object({[t.const]:Rr.Type(r)},n):this.Throw("Record key of type literal is not of type string or number")})():Ee.TInteger(t)||Ee.TNumber(t)?(()=>{return this.Create({...n,[_e.Kind]:"Record",type:"object",patternProperties:{[_e.PatternNumberExact]:Rr.Type(r)}})})():Ee.TString(t)?(()=>{const i=Jt.IsUndefined(t.pattern)?_e.PatternStringExact:t.pattern;return this.Create({...n,[_e.Kind]:"Record",type:"object",patternProperties:{[i]:Rr.Type(r)}})})():this.Never()}Recursive(t,r={}){if(Jt.IsUndefined(r.$id))r.$id=`T${pxn++}`;const n=t({[_e.Kind]:"This",$ref:`${r.$id}`});n.$id=r.$id;return this.Create({...r,[_e.Hint]:"Recursive",...n})}Ref(t,r={}){if(Jt.IsString(t))return this.Create({...r,[_e.Kind]:"Ref",$ref:t});if(Jt.IsUndefined(t.$id))this.Throw("Reference target type must specify an $id");return this.Create({...r,[_e.Kind]:"Ref",$ref:t.$id})}Required(t,r={}){return _P.Map(this.Discard(Rr.Type(t),_e.Transform),n=>{const i=Object.getOwnPropertyNames(n.properties).reduce((s,o)=>{return{...s,[o]:this.Discard(n.properties[o],_e.Optional)}},{});return this.Object(i,n)},r)}Rest(t){return Ee.TTuple(t)&&!Jt.IsUndefined(t.items)?Rr.Rest(t.items):Ee.TIntersect(t)?Rr.Rest(t.allOf):Ee.TUnion(t)?Rr.Rest(t.anyOf):[]}String(t={}){return this.Create({...t,[_e.Kind]:"String",type:"string"})}TemplateLiteral(t,r={}){const n=Jt.IsString(t)?jJ.Create(HRe.Parse(t)):jJ.Create(t);return this.Create({...r,[_e.Kind]:"TemplateLiteral",type:"string",pattern:n})}Transform(t){return new VJ(t)}Tuple(t,r={}){const[n,i,s]=[false,t.length,t.length];const o=Rr.Rest(t);const u=t.length>0?{...r,[_e.Kind]:"Tuple",type:"array",items:o,additionalItems:n,minItems:i,maxItems:s}:{...r,[_e.Kind]:"Tuple",type:"array",minItems:i,maxItems:s};return this.Create(u)}Uncapitalize(t,r={}){return{...yP.Map(Rr.Type(t),"Uncapitalize"),...r}}Union(t,r={}){return Ee.TTemplateLiteral(t)?xy.Resolve(t):(()=>{const n=t;if(n.length===0)return this.Never(r);if(n.length===1)return this.Create(Rr.Type(n[0],r));const i=Rr.Rest(n);return this.Create({...r,[_e.Kind]:"Union",anyOf:i})})()}Unknown(t={}){return this.Create({...t,[_e.Kind]:"Unknown"})}Unsafe(t={}){return this.Create({...t,[_e.Kind]:t[_e.Kind]||"Unsafe"})}Uppercase(t,r={}){return{...yP.Map(Rr.Type(t),"Uppercase"),...r}}};_e.JsonTypeBuilder=$F;var YJ=class extends $F{static{a(this,"JavaScriptTypeBuilder")}AsyncIterator(t,r={}){return this.Create({...r,[_e.Kind]:"AsyncIterator",type:"AsyncIterator",items:Rr.Type(t)})}Awaited(t,r={}){const n=a(i=>i.length>0?(()=>{const[s,...o]=i;return[this.Awaited(s),...n(o)]})():i,"Unwrap");return Ee.TIntersect(t)?_e.Type.Intersect(n(t.allOf)):Ee.TUnion(t)?_e.Type.Union(n(t.anyOf)):Ee.TPromise(t)?this.Awaited(t.item):Rr.Type(t,r)}BigInt(t={}){return this.Create({...t,[_e.Kind]:"BigInt",type:"bigint"})}ConstructorParameters(t,r={}){return this.Tuple([...t.parameters],{...r})}Constructor(t,r,n){const[i,s]=[Rr.Rest(t),Rr.Type(r)];return this.Create({...n,[_e.Kind]:"Constructor",type:"constructor",parameters:i,returns:s})}Date(t={}){return this.Create({...t,[_e.Kind]:"Date",type:"Date"})}Function(t,r,n){const[i,s]=[Rr.Rest(t),Rr.Type(r)];return this.Create({...n,[_e.Kind]:"Function",type:"function",parameters:i,returns:s})}InstanceType(t,r={}){return Rr.Type(t.returns,r)}Iterator(t,r={}){return this.Create({...r,[_e.Kind]:"Iterator",type:"Iterator",items:Rr.Type(t)})}Parameters(t,r={}){return this.Tuple(t.parameters,{...r})}Promise(t,r={}){return this.Create({...r,[_e.Kind]:"Promise",type:"Promise",item:Rr.Type(t)})}RegExp(t,r={}){const n=Jt.IsString(t)?t:t.source;return this.Create({...r,[_e.Kind]:"String",type:"string",pattern:n})}RegEx(t,r={}){return this.RegExp(t,r)}ReturnType(t,r={}){return Rr.Type(t.returns,r)}Symbol(t){return this.Create({...t,[_e.Kind]:"Symbol",type:"symbol"})}Undefined(t={}){return this.Create({...t,[_e.Kind]:"Undefined",type:"undefined"})}Uint8Array(t={}){return this.Create({...t,[_e.Kind]:"Uint8Array",type:"Uint8Array"})}Void(t={}){return this.Create({...t,[_e.Kind]:"Void",type:"void"})}};_e.JavaScriptTypeBuilder=YJ;_e.JsonType=new $F;_e.Type=new YJ});var _xt=y(XJ=>{"use strict";Object.defineProperty(XJ,"__esModule",{value:true});XJ.CustomTypeBuilder=void 0;var jF=yxt();var VRe=class extends jF.TypeBuilder{static{a(this,"CustomTypeBuilder")}static Date(){return jF.Type.Unsafe({type:"string",format:"date-time"})}static Nullable(t){return jF.Type.Union([t,jF.Type.Null()])}static StringEnum(t){return jF.Type.Unsafe({type:"string",enum:t})}};XJ.CustomTypeBuilder=VRe});var Sxt=y(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:true});Tr.throwIfNotNumber=Tr.throwIfNotString=Tr.throwIfUndefinedOrNull=Tr.throwIfUndefined=Tr.ArgumentTypeError=Tr.ArgumentUndefinedError=Tr.ValidationError=Tr.withUndefinedAsNull=Tr.withNullAsUndefined=Tr.validateConstraint=Tr.validateConstraints=Tr.areFunctions=Tr.isFunction=Tr.isEmptyObject=Tr.assertAllDefined=Tr.assertIsDefined=Tr.assertType=Tr.isUndefinedOrNull=Tr.isDefined=Tr.isUndefined=Tr.isBoolean=Tr.isIterable=Tr.isNumber=Tr.isTypedArray=Tr.isObject=Tr.isStringArray=Tr.isString=void 0;function JJ(e){return typeof e==="string"}a(JJ,"isString");Tr.isString=JJ;function fxn(e){return Array.isArray(e)&&e.every(t=>JJ(t))}a(fxn,"isStringArray");Tr.isStringArray=fxn;function vxt(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}a(vxt,"isObject");Tr.isObject=vxt;function mxn(e){const t=Object.getPrototypeOf(Uint8Array);return typeof e==="object"&&e instanceof t}a(mxn,"isTypedArray");Tr.isTypedArray=mxn;function Ext(e){return typeof e==="number"&&!isNaN(e)}a(Ext,"isNumber");Tr.isNumber=Ext;function hxn(e){return!!e&&typeof e[Symbol.iterator]==="function"}a(hxn,"isIterable");Tr.isIterable=hxn;function gxn(e){return e===true||e===false}a(gxn,"isBoolean");Tr.isBoolean=gxn;function zRe(e){return typeof e==="undefined"}a(zRe,"isUndefined");Tr.isUndefined=zRe;function yxn(e){return!SP(e)}a(yxn,"isDefined");Tr.isDefined=yxn;function SP(e){return zRe(e)||e===null}a(SP,"isUndefinedOrNull");Tr.isUndefinedOrNull=SP;function _xn(e,t){if(!e){throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}}a(_xn,"assertType");Tr.assertType=_xn;function vxn(e){if(SP(e)){throw new Error("Assertion Failed: argument is undefined or null")}return e}a(vxn,"assertIsDefined");Tr.assertIsDefined=vxn;function Exn(...e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];if(SP(n)){throw new Error(`Assertion Failed: argument at index ${r} is undefined or null`)}t.push(n)}return t}a(Exn,"assertAllDefined");Tr.assertAllDefined=Exn;var bxn=Object.prototype.hasOwnProperty;function Sxn(e){if(!vxt(e)){return false}for(const t in e){if(bxn.call(e,t)){return false}}return true}a(Sxn,"isEmptyObject");Tr.isEmptyObject=Sxn;function KRe(e){return typeof e==="function"}a(KRe,"isFunction");Tr.isFunction=KRe;function Axn(...e){return e.length>0&&e.every(KRe)}a(Axn,"areFunctions");Tr.areFunctions=Axn;function Cxn(e,t){const r=Math.min(e.length,t.length);for(let n=0;n<r;n++){bxt(e[n],t[n])}}a(Cxn,"validateConstraints");Tr.validateConstraints=Cxn;function bxt(e,t){if(JJ(t)){if(typeof e!==t){throw new Error(`argument does not match constraint: typeof ${t}`)}}else if(KRe(t)){try{if(e instanceof t){return}}catch{}if(!SP(e)&&e.constructor===t){return}if(t.length===1&&t.call(void 0,e)===true){return}throw new Error(`argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true`)}}a(bxt,"validateConstraint");Tr.validateConstraint=bxt;function wxn(e){return e===null?void 0:e}a(wxn,"withNullAsUndefined");Tr.withNullAsUndefined=wxn;function Txn(e){return typeof e==="undefined"?null:e}a(Txn,"withUndefinedAsNull");Tr.withUndefinedAsNull=Txn;var GF=class extends Error{static{a(this,"ValidationError")}constructor(t){super(t)}};Tr.ValidationError=GF;var HF=class extends GF{static{a(this,"ArgumentUndefinedError")}constructor(t){super(`The argument '${t}' is undefined.`)}};Tr.ArgumentUndefinedError=HF;var VF=class extends GF{static{a(this,"ArgumentTypeError")}constructor(t,r){super(`The argument '${t}' must be of type '${r}'.`)}};Tr.ArgumentTypeError=VF;function xxn(e,t){if(zRe(e)){throw new HF(t)}return true}a(xxn,"throwIfUndefined");Tr.throwIfUndefined=xxn;function WRe(e,t){if(SP(e)){throw new HF(t)}}a(WRe,"throwIfUndefinedOrNull");Tr.throwIfUndefinedOrNull=WRe;function Rxn(e,t){WRe(e,t);if(!JJ(e)){throw new VF(t,"string")}return true}a(Rxn,"throwIfNotString");Tr.throwIfNotString=Rxn;function Oxn(e,t){WRe(e,t);if(!Ext(e)){throw new VF(t,"number")}return true}a(Oxn,"throwIfNotNumber");Tr.throwIfNotNumber=Oxn});var hn=y(mt=>{"use strict";var Axt=mt&&mt.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)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===void 0)n=r;e[n]=t[r]});var Pxn=mt&&mt.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var QJ=mt&&mt.__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))Axt(t,e,r)}Pxn(t,e);return t};var KE=mt&&mt.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))Axt(t,e,r)};Object.defineProperty(mt,"__esModule",{value:true});mt.getRequiredEnvVar=mt.env=mt.EnvironmentalVariableRequiredError=mt.xfs=mt.RouteValidator=mt.JsonValidator=mt.MeteringService=mt.TenantService=mt.OpenFGAService=mt.DevApiService=mt.getContentApiStorageTarballPath=mt.contentApiTarballFileName=mt.ContentApiService=mt.AuthApiService=mt.getServiceAccountIdToken=mt.createApiKeyServiceClient=mt.ApiKeyService=mt.RouteVersions=mt.startsWithReservedKeyword=mt.logger=mt.createNewLogger=mt.graphQL=mt.CloudStorage=mt.fly=mt.ApiServer=mt.featureFlagsPlugin=mt.ensureZuploUserPlugin=mt.ensureZuploAdminPlugin=mt.ensureServiceAccountPlugin=mt.apiKeyAuthPlugin=mt.errorHandler=mt.DeploymentLogState=mt.signString=mt.FeatureFlags=mt.VALID_COMPATIBILITY_DATES=mt.DEFAULT_COMPATIBILITY_DATE=mt.COMPATIBILITY_FLAG_MAPPINGS=mt.WARNING_STATUS=mt.WARNING_SEVERITY=mt.GOOD_STATUS=mt.FAILURE_STATUS=mt.ERROR_SEVERITY=mt.BuildIssueError=mt.hasBlockedNotifications=mt.getDefaultFlags=mt.getBuildFlagsForDeployment=mt.CommonAuth=void 0;var YRe=QJ(ep());mt.env=YRe.default;Object.defineProperty(mt,"EnvironmentalVariableRequiredError",{enumerable:true,get:function(){return YRe.EnvironmentalVariableRequiredError}});Object.defineProperty(mt,"getRequiredEnvVar",{enumerable:true,get:function(){return YRe.getRequiredEnvVar}});KE(ac(),mt);var Nxn=$ce();Object.defineProperty(mt,"CommonAuth",{enumerable:true,get:function(){return Nxn.CommonAuth}});var XRe=$Ge();Object.defineProperty(mt,"getBuildFlagsForDeployment",{enumerable:true,get:function(){return XRe.getBuildFlagsForDeployment}});Object.defineProperty(mt,"getDefaultFlags",{enumerable:true,get:function(){return XRe.getDefaultFlags}});Object.defineProperty(mt,"hasBlockedNotifications",{enumerable:true,get:function(){return XRe.hasBlockedNotifications}});var AP=jGe();Object.defineProperty(mt,"BuildIssueError",{enumerable:true,get:function(){return AP.BuildIssueError}});Object.defineProperty(mt,"ERROR_SEVERITY",{enumerable:true,get:function(){return AP.ERROR_SEVERITY}});Object.defineProperty(mt,"FAILURE_STATUS",{enumerable:true,get:function(){return AP.FAILURE_STATUS}});Object.defineProperty(mt,"GOOD_STATUS",{enumerable:true,get:function(){return AP.GOOD_STATUS}});Object.defineProperty(mt,"WARNING_SEVERITY",{enumerable:true,get:function(){return AP.WARNING_SEVERITY}});Object.defineProperty(mt,"WARNING_STATUS",{enumerable:true,get:function(){return AP.WARNING_STATUS}});var Ixn=GGe();Object.defineProperty(mt,"COMPATIBILITY_FLAG_MAPPINGS",{enumerable:true,get:function(){return Ixn.COMPATIBILITY_FLAG_MAPPINGS}});var Cxt=zGe();Object.defineProperty(mt,"DEFAULT_COMPATIBILITY_DATE",{enumerable:true,get:function(){return Cxt.DEFAULT_COMPATIBILITY_DATE}});Object.defineProperty(mt,"VALID_COMPATIBILITY_DATES",{enumerable:true,get:function(){return Cxt.VALID_COMPATIBILITY_DATES}});var kxn=jce();Object.defineProperty(mt,"FeatureFlags",{enumerable:true,get:function(){return kxn.FeatureFlags}});var Dxn=KGe();Object.defineProperty(mt,"signString",{enumerable:true,get:function(){return Dxn.signString}});KE(WGe(),mt);var Lxn=Vce();Object.defineProperty(mt,"DeploymentLogState",{enumerable:true,get:function(){return Lxn.DeploymentLogState}});KE(rHe(),mt);KE(zce(),mt);var Fxn=Kce();Object.defineProperty(mt,"errorHandler",{enumerable:true,get:function(){return Fxn.errorHandler}});var zF=Qce();Object.defineProperty(mt,"apiKeyAuthPlugin",{enumerable:true,get:function(){return zF.apiKeyAuthPlugin}});Object.defineProperty(mt,"ensureServiceAccountPlugin",{enumerable:true,get:function(){return zF.ensureServiceAccountPlugin}});Object.defineProperty(mt,"ensureZuploAdminPlugin",{enumerable:true,get:function(){return zF.ensureZuploAdminPlugin}});Object.defineProperty(mt,"ensureZuploUserPlugin",{enumerable:true,get:function(){return zF.ensureZuploUserPlugin}});Object.defineProperty(mt,"featureFlagsPlugin",{enumerable:true,get:function(){return zF.featureFlagsPlugin}});var Bxn=hft();Object.defineProperty(mt,"ApiServer",{enumerable:true,get:function(){return Bxn.ApiServer}});mt.fly=QJ(_ft());mt.CloudStorage=QJ(nvt());var Mxn=ivt();Object.defineProperty(mt,"graphQL",{enumerable:true,get:function(){return Mxn.graphQL}});KE(T2t(),mt);var wxt=aEe();Object.defineProperty(mt,"createNewLogger",{enumerable:true,get:function(){return wxt.createNewLogger}});Object.defineProperty(mt,"logger",{enumerable:true,get:function(){return wxt.logger}});var qxn=JCe();Object.defineProperty(mt,"startsWithReservedKeyword",{enumerable:true,get:function(){return qxn.startsWithReservedKeyword}});var Uxn=x2t();Object.defineProperty(mt,"RouteVersions",{enumerable:true,get:function(){return Uxn.RouteVersions}});var Txt=JCt();Object.defineProperty(mt,"ApiKeyService",{enumerable:true,get:function(){return Txt.ApiKeyService}});Object.defineProperty(mt,"createApiKeyServiceClient",{enumerable:true,get:function(){return Txt.createApiKeyServiceClient}});var $xn=JO();Object.defineProperty(mt,"getServiceAccountIdToken",{enumerable:true,get:function(){return $xn.getServiceAccountIdToken}});var jxn=ZCt();Object.defineProperty(mt,"AuthApiService",{enumerable:true,get:function(){return jxn.AuthApiService}});var JRe=nwt();Object.defineProperty(mt,"ContentApiService",{enumerable:true,get:function(){return JRe.ContentApiService}});Object.defineProperty(mt,"contentApiTarballFileName",{enumerable:true,get:function(){return JRe.contentApiTarballFileName}});Object.defineProperty(mt,"getContentApiStorageTarballPath",{enumerable:true,get:function(){return JRe.getContentApiStorageTarballPath}});var Gxn=awt();Object.defineProperty(mt,"DevApiService",{enumerable:true,get:function(){return Gxn.DevApiService}});var Hxn=oxt();Object.defineProperty(mt,"OpenFGAService",{enumerable:true,get:function(){return Hxn.OpenFGAService}});var Vxn=cxt();Object.defineProperty(mt,"TenantService",{enumerable:true,get:function(){return Vxn.TenantService}});var zxn=fxt();Object.defineProperty(mt,"MeteringService",{enumerable:true,get:function(){return zxn.MeteringService}});KE(mxt(),mt);KE(_xt(),mt);KE(Sxt(),mt);var Kxn=jY();Object.defineProperty(mt,"JsonValidator",{enumerable:true,get:function(){return Kxn.JsonValidator}});var Wxn=iwe();Object.defineProperty(mt,"RouteValidator",{enumerable:true,get:function(){return Wxn.RouteValidator}});mt.xfs=QJ(tAe())});var Fn=y(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:true});Vt.NODE_BUILD_OPEN_API_OUTPUT_FILE=Vt.NODE_BUILD_OUTPUT_FILE=Vt.NODE_ENTRY_NAME=Vt.WORKER_BUILD_OUTPUT_SOURCEMAP_FILE=Vt.WORKER_BUILD_OUTPUT_FILE=Vt.WORKER_ENTRY_NAME=Vt.ENV_MODULE_FILE=Vt.ZUPLO_SYSTEM_ENV_FILE=Vt.ENV_FILE=Vt.CACHE_DIRECTORY=Vt.BUILD_CACHE_FILE=Vt.ZUPLO_FILE_SCHEMA=Vt.NON_STANDARD_NODE_ENV=Vt.GENERATED_TYPES_DIR_NAME=Vt.GENERATED_BUILD_JSON_FILE=Vt.GENERATED_SOURCE_DIR_NAME=Vt.BUILD_OUTPUT_DIR=Vt.DEFAULT_TEST_FILE=Vt.DEFAULT_DOCS_MARKDOWN_FILE=Vt.DOCS_THEME_FILE=Vt.DOCS_SIDEBAR_FILE=Vt.ZUPLO_FALLBACK_JSON_FILE=Vt.ZUPLO_PREFERRED_JSON_FILE=Vt.DEFAULT_MODULE_FILE=Vt.OPEN_API_FILE_SUFFIX=Vt.OPEN_API_CONFIG_FILE=Vt.OPEN_API_UNVERSIONED_DIR_NAME=Vt.DEV_PORTAL_OUTPUT_DIR_NAME=Vt.DEV_PORTAL_CONFIG_FILE=Vt.POLICIES_CONFIG_FILE=Vt.ROUTES_OAS_CONFIG_FILE=Vt.LOCAL_API_KEYS_CONFIG_FILE=Vt.DEV_PORTAL_V4_PATH=Vt.USER_DOCS_DIR_NAME=Vt.USER_SCHEMAS_DIR_NAME=Vt.USER_CONFIG_DIR_NAME=Vt.USER_TEST_DIR_NAME=Vt.USER_MODULES_DIR_NAME=void 0;Vt.USER_MODULES_DIR_NAME="modules";Vt.USER_TEST_DIR_NAME="tests";Vt.USER_CONFIG_DIR_NAME="config";Vt.USER_SCHEMAS_DIR_NAME="schemas";Vt.USER_DOCS_DIR_NAME="docs";Vt.DEV_PORTAL_V4_PATH="v4";Vt.LOCAL_API_KEYS_CONFIG_FILE="api-keys.json";Vt.ROUTES_OAS_CONFIG_FILE="routes.oas.json";Vt.POLICIES_CONFIG_FILE="policies.json";Vt.DEV_PORTAL_CONFIG_FILE="dev-portal.json";Vt.DEV_PORTAL_OUTPUT_DIR_NAME="dev-portal";Vt.OPEN_API_UNVERSIONED_DIR_NAME="unversioned";Vt.OPEN_API_CONFIG_FILE="open-api.json";Vt.OPEN_API_FILE_SUFFIX=".oas.json";Vt.DEFAULT_MODULE_FILE="hello-world.ts";Vt.ZUPLO_PREFERRED_JSON_FILE="zuplo.jsonc";Vt.ZUPLO_FALLBACK_JSON_FILE="zuplo.json";Vt.DOCS_SIDEBAR_FILE="sidebar.json";Vt.DOCS_THEME_FILE="theme.css";Vt.DEFAULT_DOCS_MARKDOWN_FILE="index.md";Vt.DEFAULT_TEST_FILE="hello-world.json";Vt.BUILD_OUTPUT_DIR="dist";Vt.GENERATED_SOURCE_DIR_NAME=".zuplo";Vt.GENERATED_BUILD_JSON_FILE="build.json";Vt.GENERATED_TYPES_DIR_NAME="types";Vt.NON_STANDARD_NODE_ENV=`You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against.`;Vt.ZUPLO_FILE_SCHEMA="zuplo";Vt.BUILD_CACHE_FILE="buildstate.json";Vt.CACHE_DIRECTORY=".cache";Vt.ENV_FILE=".env";Vt.ZUPLO_SYSTEM_ENV_FILE=".env.zuplo";Vt.ENV_MODULE_FILE="environment.ts";Vt.WORKER_ENTRY_NAME="worker.ts";Vt.WORKER_BUILD_OUTPUT_FILE="worker.js";Vt.WORKER_BUILD_OUTPUT_SOURCEMAP_FILE="worker.js.map";Vt.NODE_ENTRY_NAME="server.ts";Vt.NODE_BUILD_OUTPUT_FILE="main.js";Vt.NODE_BUILD_OPEN_API_OUTPUT_FILE=Vt.OPEN_API_CONFIG_FILE});var tu=y(CP=>{"use strict";Object.defineProperty(CP,"__esModule",{value:true});CP.runPlugins=CP.PluginResult=void 0;var QRe=class{static{a(this,"PluginResult")}errors=[];warnings=[];constructor(t){if(t){this.errors.push(t)}}};CP.PluginResult=QRe;async function Yxn(e,t){const r=[];const n=[];const i=new Map;for await(const s of e){try{const o=await s(t,i);n.push(...o.errors.map(u=>{if(u.pluginName===""){u.pluginName=s.name}return u}));r.push(...o.warnings);if(o.errors.length>0){break}}catch(o){n.push(o);break}}return{errors:n,warnings:r}}a(Yxn,"runPlugins");CP.runPlugins=Yxn});var xs=y(eOe=>{"use strict";Object.defineProperty(eOe,"__esModule",{value:true});var ZJ=require("perf_hooks");var ZRe=[];async function Xxn(e,t){const r=ZJ.performance.timerify(t);const n=new ZJ.PerformanceObserver(i=>{const s=i.getEntries()[0];ZRe.push({name:e,duration:s.duration});n.disconnect()});n.observe({entryTypes:["function"]});return r()}a(Xxn,"timeFn");var Jxn={mark:e=>{ZJ.performance.mark(e)},measure:(e,t,r)=>{ZJ.performance.measure(e,t,r)},timeFn:Xxn,report:()=>{if(ZRe.length>0){console.table(ZRe)}}};eOe.default=Jxn});var tOe=y(wP=>{"use strict";var Qxn=wP&&wP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(wP,"__esModule",{value:true});wP.getZuploConfig=void 0;var KF=hn();var Zxn=require("jsonc-parser");var eRn=require("fs/promises");var xxt=Qxn(require("path"));var Rxt=Fn();async function tRn(e){const t=xxt.default.join(e,Rxt.ZUPLO_PREFERRED_JSON_FILE);const r=xxt.default.join(e,Rxt.ZUPLO_FALLBACK_JSON_FILE);let n=false;let i=t;if(await KF.xfs.fileExists(t)){n=true;i=t}else if(await KF.xfs.fileExists(r)){n=true;i=r}const s={};if(n){const o=await(0,eRn.readFile)(i,"utf-8");const u=[];const l=(0,Zxn.parse)(o,u);if(typeof l!=="object"){const c={message:`Invalid zuplo.json file`,detail:`The zuplo.json file is not a valid JSON object`,pluginName:"buildData",severity:"error"};return{errors:[c]}}if("version"in l&&l.version!==1){const c={message:`Invalid version set in zuplo.config`,detail:`version in zuplo.json must be set to 1`,pluginName:"buildData",severity:"error"};return{errors:[c]}}if("compatibilityDate"in l&&KF.VALID_COMPATIBILITY_DATES&&typeof l.compatibilityDate==="string"){if(!KF.VALID_COMPATIBILITY_DATES.includes(l.compatibilityDate)){const c={message:`Invalid compatibilityDate set in zuplo.config`,detail:`compatibilityDate was set to ${l.compatibilityDate}. Valid compatibility dates are ${KF.VALID_COMPATIBILITY_DATES.join(", ")}`,pluginName:"buildData",severity:"error"};return{errors:[c]}}s.compatibilityDate=l.compatibilityDate}}return{config:s,errors:[]}}a(tRn,"getZuploConfig");wP.getZuploConfig=tRn});var WF=y(eQ=>{"use strict";Object.defineProperty(eQ,"__esModule",{value:true});eQ.TargetPlatform=void 0;var Oxt;(function(e){e["Worker"]="worker"})(Oxt||(eQ.TargetPlatform=Oxt={}))});var Nxt=y(TP=>{"use strict";var Pxt=TP&&TP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(TP,"__esModule",{value:true});TP.cleanOutput=void 0;var rRn=Pxt(require("fs/promises"));var nRn=Pxt(xs());var iRn=a(async function({outputDirectory:e,systemDirectory:t,logger:r}){return nRn.default.timeFn("Cleaning output",async()=>{r.debug("Cleaning output");const n=[e,t];for await(const i of n){try{await rRn.default.rm(i,{recursive:true,force:true})}catch(s){r.error(s)}}return{warnings:[],errors:[]}})},"cleanOutput");TP.cleanOutput=iRn});var kxt=y(xP=>{"use strict";var Ixt=xP&&xP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(xP,"__esModule",{value:true});xP.createSystemDir=void 0;var sRn=hn();var aRn=Ixt(require("fs/promises"));var oRn=Ixt(xs());var uRn=a(async function({systemDirectory:e,logger:t}){return oRn.default.timeFn("Creating system directory",async()=>{t.debug("Creating system directory");try{if(await sRn.xfs.dirExists(e)){t.debug("System directory already exists, skipping");return{warnings:[],errors:[]}}await aRn.default.mkdir(e)}catch(r){t.error(r);return{warnings:[],errors:[]}}return{warnings:[],errors:[]}})},"createSystemDir");xP.createSystemDir=uRn});var Dxt=y(RP=>{"use strict";var lRn=RP&&RP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(RP,"__esModule",{value:true});RP.checkForDeprecations=void 0;var cRn=lRn(xs());var dRn=a(async function({logger:e}){return cRn.default.timeFn("Checking for breaking changes",async()=>{e.debug("Checking for breaking changes");return{warnings:[],errors:[]}})},"checkForDeprecations");RP.checkForDeprecations=dRn});var Lxt=y(rOe=>{var sC=require("path");var YE=process.platform==="win32";var WE=require("fs");var pRn=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function fRn(){var e;if(pRn){var t=new Error;e=r}else e=n;return e;function r(i){if(i){t.message=i.message;i=t;n(i)}}a(r,"debugCallback");function n(i){if(i){if(process.throwDeprecation)throw i;else if(!process.noDeprecation){var s="fs: missing callback "+(i.stack||i.message);if(process.traceDeprecation)console.trace(s);else console.error(s)}}}a(n,"missingCallback")}a(fRn,"rethrow");function mRn(e){return typeof e==="function"?e:fRn()}a(mRn,"maybeCallback");var a5s=sC.normalize;if(YE){Ry=/(.*?)(?:[\/\\]+|$)/g}else{Ry=/(.*?)(?:[\/]+|$)/g}var Ry;if(YE){YF=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/}else{YF=/^[\/]*/}var YF;rOe.realpathSync=a(function e(t,r){t=sC.resolve(t);if(r&&Object.prototype.hasOwnProperty.call(r,t)){return r[t]}var n=t,i={},s={};var o;var u;var l;var c;d();function d(){var _=YF.exec(t);o=_[0].length;u=_[0];l=_[0];c="";if(YE&&!s[l]){WE.lstatSync(l);s[l]=true}}a(d,"start");while(o<t.length){Ry.lastIndex=o;var p=Ry.exec(t);c=u;u+=p[0];l=c+p[1];o=Ry.lastIndex;if(s[l]||r&&r[l]===l){continue}var f;if(r&&Object.prototype.hasOwnProperty.call(r,l)){f=r[l]}else{var m=WE.lstatSync(l);if(!m.isSymbolicLink()){s[l]=true;if(r)r[l]=l;continue}var h=null;if(!YE){var g=m.dev.toString(32)+":"+m.ino.toString(32);if(i.hasOwnProperty(g)){h=i[g]}}if(h===null){WE.statSync(l);h=WE.readlinkSync(l)}f=sC.resolve(c,h);if(r)r[l]=f;if(!YE)i[g]=h}t=sC.resolve(f,t.slice(o));d()}if(r)r[n]=t;return t},"realpathSync");rOe.realpath=a(function e(t,r,n){if(typeof n!=="function"){n=mRn(r);r=null}t=sC.resolve(t);if(r&&Object.prototype.hasOwnProperty.call(r,t)){return process.nextTick(n.bind(null,null,r[t]))}var i=t,s={},o={};var u;var l;var c;var d;p();function p(){var _=YF.exec(t);u=_[0].length;l=_[0];c=_[0];d="";if(YE&&!o[c]){WE.lstat(c,function(v){if(v)return n(v);o[c]=true;f()})}else{process.nextTick(f)}}a(p,"start");function f(){if(u>=t.length){if(r)r[i]=t;return n(null,t)}Ry.lastIndex=u;var _=Ry.exec(t);d=l;l+=_[0];c=d+_[1];u=Ry.lastIndex;if(o[c]||r&&r[c]===c){return process.nextTick(f)}if(r&&Object.prototype.hasOwnProperty.call(r,c)){return g(r[c])}return WE.lstat(c,m)}a(f,"LOOP");function m(_,v){if(_)return n(_);if(!v.isSymbolicLink()){o[c]=true;if(r)r[c]=c;return process.nextTick(f)}if(!YE){var S=v.dev.toString(32)+":"+v.ino.toString(32);if(s.hasOwnProperty(S)){return h(null,s[S],c)}}WE.stat(c,function(E){if(E)return n(E);WE.readlink(c,function(b,A){if(!YE)s[S]=A;h(b,A)})})}a(m,"gotStat");function h(_,v,S){if(_)return n(_);var E=sC.resolve(d,v);if(r)r[S]=E;g(E)}a(h,"gotTarget");function g(_){t=sC.resolve(_,t.slice(u));p()}a(g,"gotResolvedLink")},"realpath")});var aOe=y((l5s,qxt)=>{qxt.exports=XE;XE.realpath=XE;XE.sync=sOe;XE.realpathSync=sOe;XE.monkeypatch=gRn;XE.unmonkeypatch=yRn;var OP=require("fs");var nOe=OP.realpath;var iOe=OP.realpathSync;var hRn=process.version;var Fxt=/^v[0-5]\./.test(hRn);var Bxt=Lxt();function Mxt(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}a(Mxt,"newError");function XE(e,t,r){if(Fxt){return nOe(e,t,r)}if(typeof t==="function"){r=t;t=null}nOe(e,t,function(n,i){if(Mxt(n)){Bxt.realpath(e,t,r)}else{r(n,i)}})}a(XE,"realpath");function sOe(e,t){if(Fxt){return iOe(e,t)}try{return iOe(e,t)}catch(r){if(Mxt(r)){return Bxt.realpathSync(e,t)}else{throw r}}}a(sOe,"realpathSync");function gRn(){OP.realpath=XE;OP.realpathSync=sOe}a(gRn,"monkeypatch");function yRn(){OP.realpath=nOe;OP.realpathSync=iOe}a(yRn,"unmonkeypatch")});var $xt=y((d5s,Uxt)=>{Uxt.exports=function(e,t){var r=[];for(var n=0;n<e.length;n++){var i=t(e[n],n);if(_Rn(i))r.push.apply(r,i);else r.push(i)}return r};var _Rn=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"}});var oOe=y((p5s,Vxt)=>{"use strict";Vxt.exports=Gxt;function Gxt(e,t,r){if(e instanceof RegExp)e=jxt(e,r);if(t instanceof RegExp)t=jxt(t,r);var n=Hxt(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}a(Gxt,"balanced");function jxt(e,t){var r=t.match(e);return r?r[0]:null}a(jxt,"maybeMatch");Gxt.range=Hxt;function Hxt(e,t,r){var n,i,s,o,u;var l=r.indexOf(e);var c=r.indexOf(t,l+1);var d=l;if(l>=0&&c>0){if(e===t){return[l,c]}n=[];s=r.length;while(d>=0&&!u){if(d==l){n.push(d);l=r.indexOf(e,d+1)}else if(n.length==1){u=[n.pop(),c]}else{i=n.pop();if(i<s){s=i;o=c}c=r.indexOf(t,d+1)}d=l<c&&l>=0?l:c}if(n.length){u=[s,o]}}return u}a(Hxt,"range")});var Zxt=y((m5s,Qxt)=>{var vRn=$xt();var zxt=oOe();Qxt.exports=SRn;var Kxt="\0SLASH"+Math.random()+"\0";var Wxt="\0OPEN"+Math.random()+"\0";var lOe="\0CLOSE"+Math.random()+"\0";var Yxt="\0COMMA"+Math.random()+"\0";var Xxt="\0PERIOD"+Math.random()+"\0";function uOe(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}a(uOe,"numeric");function ERn(e){return e.split("\\\\").join(Kxt).split("\\{").join(Wxt).split("\\}").join(lOe).split("\\,").join(Yxt).split("\\.").join(Xxt)}a(ERn,"escapeBraces");function bRn(e){return e.split(Kxt).join("\\").split(Wxt).join("{").split(lOe).join("}").split(Yxt).join(",").split(Xxt).join(".")}a(bRn,"unescapeBraces");function Jxt(e){if(!e)return[""];var t=[];var r=zxt("{","}",e);if(!r)return e.split(",");var n=r.pre;var i=r.body;var s=r.post;var o=n.split(",");o[o.length-1]+="{"+i+"}";var u=Jxt(s);if(s.length){o[o.length-1]+=u.shift();o.push.apply(o,u)}t.push.apply(t,o);return t}a(Jxt,"parseCommaParts");function SRn(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return PP(ERn(e),true).map(bRn)}a(SRn,"expandTop");function ARn(e){return"{"+e+"}"}a(ARn,"embrace");function CRn(e){return/^-?0\d/.test(e)}a(CRn,"isPadded");function wRn(e,t){return e<=t}a(wRn,"lte");function TRn(e,t){return e>=t}a(TRn,"gte");function PP(e,t){var r=[];var n=zxt("{","}",e);if(!n||/\$$/.test(n.pre))return[e];var i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body);var s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body);var o=i||s;var u=n.body.indexOf(",")>=0;if(!o&&!u){if(n.post.match(/,.*\}/)){e=n.pre+"{"+n.body+lOe+n.post;return PP(e)}return[e]}var l;if(o){l=n.body.split(/\.\./)}else{l=Jxt(n.body);if(l.length===1){l=PP(l[0],false).map(ARn);if(l.length===1){var d=n.post.length?PP(n.post,false):[""];return d.map(function(I){return n.pre+l[0]+I})}}}var c=n.pre;var d=n.post.length?PP(n.post,false):[""];var p;if(o){var f=uOe(l[0]);var m=uOe(l[1]);var h=Math.max(l[0].length,l[1].length);var g=l.length==3?Math.abs(uOe(l[2])):1;var _=wRn;var v=m<f;if(v){g*=-1;_=TRn}var S=l.some(CRn);p=[];for(var E=f;_(E,m);E+=g){var b;if(s){b=String.fromCharCode(E);if(b==="\\")b=""}else{b=String(E);if(S){var A=h-b.length;if(A>0){var C=new Array(A+1).join("0");if(E<0)b="-"+C+b.slice(1);else b=C+b}}}p.push(b)}}else{p=vRn(l,function(R){return PP(R,false)})}for(var T=0;T<p.length;T++){for(var O=0;O<d.length;O++){var P=c+p[T]+d[O];if(!t||o||P)r.push(P)}}return r}a(PP,"expand")});var nQ=y((g5s,iRt)=>{iRt.exports=mp;mp.Minimatch=ol;var XF=function(){try{return require("path")}catch(e){}}()||{sep:"/"};mp.sep=XF.sep;var pOe=mp.GLOBSTAR=ol.GLOBSTAR={};var xRn=Zxt();var eRt={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var cOe="[^/]";var dOe=cOe+"*?";var RRn="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var ORn="(?:(?!(?:\\/|^)\\.).)*?";var tRt=PRn("().*{}+?[]^$\\!");function PRn(e){return e.split("").reduce(function(t,r){t[r]=true;return t},{})}a(PRn,"charSet");var rRt=/\/+/;mp.filter=NRn;function NRn(e,t){t=t||{};return function(r,n,i){return mp(r,e,t)}}a(NRn,"filter");function JE(e,t){t=t||{};var r={};Object.keys(e).forEach(function(n){r[n]=e[n]});Object.keys(t).forEach(function(n){r[n]=t[n]});return r}a(JE,"ext");mp.defaults=function(e){if(!e||typeof e!=="object"||!Object.keys(e).length){return mp}var t=mp;var r=a(function n(i,s,o){return t(i,s,JE(e,o))},"minimatch");r.Minimatch=a(function n(i,s){return new t.Minimatch(i,JE(e,s))},"Minimatch");r.Minimatch.defaults=a(function n(i){return t.defaults(JE(e,i)).Minimatch},"defaults");r.filter=a(function n(i,s){return t.filter(i,JE(e,s))},"filter");r.defaults=a(function n(i){return t.defaults(JE(e,i))},"defaults");r.makeRe=a(function n(i,s){return t.makeRe(i,JE(e,s))},"makeRe");r.braceExpand=a(function n(i,s){return t.braceExpand(i,JE(e,s))},"braceExpand");r.match=function(n,i,s){return t.match(n,i,JE(e,s))};return r};ol.defaults=function(e){return mp.defaults(e).Minimatch};function mp(e,t,r){rQ(t);if(!r)r={};if(!r.nocomment&&t.charAt(0)==="#"){return false}return new ol(t,r).match(e)}a(mp,"minimatch");function ol(e,t){if(!(this instanceof ol)){return new ol(e,t)}rQ(e);if(!t)t={};e=e.trim();if(!t.allowWindowsEscape&&XF.sep!=="/"){e=e.split(XF.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!t.partial;this.make()}a(ol,"Minimatch");ol.prototype.debug=function(){};ol.prototype.make=IRn;function IRn(){var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var r=this.globSet=this.braceExpand();if(t.debug)this.debug=a(function n(){console.error.apply(console,arguments)},"debug");this.debug(this.pattern,r);r=this.globParts=r.map(function(n){return n.split(rRt)});this.debug(this.pattern,r);r=r.map(function(n,i,s){return n.map(this.parse,this)},this);this.debug(this.pattern,r);r=r.filter(function(n){return n.indexOf(false)===-1});this.debug(this.pattern,r);this.set=r}a(IRn,"make");ol.prototype.parseNegate=kRn;function kRn(){var e=this.pattern;var t=false;var r=this.options;var n=0;if(r.nonegate)return;for(var i=0,s=e.length;i<s&&e.charAt(i)==="!";i++){t=!t;n++}if(n)this.pattern=e.substr(n);this.negate=t}a(kRn,"parseNegate");mp.braceExpand=function(e,t){return nRt(e,t)};ol.prototype.braceExpand=nRt;function nRt(e,t){if(!t){if(this instanceof ol){t=this.options}else{t={}}}e=typeof e==="undefined"?this.pattern:e;rQ(e);if(t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)){return[e]}return xRn(e)}a(nRt,"braceExpand");var DRn=1024*64;var rQ=a(function(e){if(typeof e!=="string"){throw new TypeError("invalid pattern")}if(e.length>DRn){throw new TypeError("pattern is too long")}},"assertValidPattern");ol.prototype.parse=LRn;var tQ={};function LRn(e,t){rQ(e);var r=this.options;if(e==="**"){if(!r.noglobstar)return pOe;else e="*"}if(e==="")return"";var n="";var i=!!r.nocase;var s=false;var o=[];var u=[];var l;var c=false;var d=-1;var p=-1;var f=e.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var m=this;function h(){if(l){switch(l){case"*":n+=dOe;i=true;break;case"?":n+=cOe;i=true;break;default:n+="\\"+l;break}m.debug("clearStateChar %j %j",l,n);l=false}}a(h,"clearStateChar");for(var g=0,_=e.length,v;g<_&&(v=e.charAt(g));g++){this.debug("%s %s %s %j",e,g,n,v);if(s&&tRt[v]){n+="\\"+v;s=false;continue}switch(v){case"/":{return false}case"\\":h();s=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s %s %s %j <-- stateChar",e,g,n,v);if(c){this.debug(" in class");if(v==="!"&&g===p+1)v="^";n+=v;continue}m.debug("call clearStateChar %j",l);h();l=v;if(r.noext)h();continue;case"(":if(c){n+="(";continue}if(!l){n+="\\(";continue}o.push({type:l,start:g-1,reStart:n.length,open:eRt[l].open,close:eRt[l].close});n+=l==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",l,n);l=false;continue;case")":if(c||!o.length){n+="\\)";continue}h();i=true;var S=o.pop();n+=S.close;if(S.type==="!"){u.push(S)}S.reEnd=n.length;continue;case"|":if(c||!o.length||s){n+="\\|";s=false;continue}h();n+="|";continue;case"[":h();if(c){n+="\\"+v;continue}c=true;p=g;d=n.length;n+=v;continue;case"]":if(g===p+1||!c){n+="\\"+v;s=false;continue}var E=e.substring(p+1,g);try{RegExp("["+E+"]")}catch(M){var b=this.parse(E,tQ);n=n.substr(0,d)+"\\["+b[0]+"\\]";i=i||b[1];c=false;continue}i=true;c=false;n+=v;continue;default:h();if(s){s=false}else if(tRt[v]&&!(v==="^"&&c)){n+="\\"}n+=v}}if(c){E=e.substr(p+1);b=this.parse(E,tQ);n=n.substr(0,d)+"\\["+b[0];i=i||b[1]}for(S=o.pop();S;S=o.pop()){var A=n.slice(S.reStart+S.open.length);this.debug("setting tail",n,S);A=A.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(M,Q,fe){if(!fe){fe="\\"}return Q+Q+fe+"|"});this.debug("tail=%j\n %s",A,A,S,n);var C=S.type==="*"?dOe:S.type==="?"?cOe:"\\"+S.type;i=true;n=n.slice(0,S.reStart)+C+"\\("+A}h();if(s){n+="\\\\"}var T=false;switch(n.charAt(0)){case"[":case".":case"(":T=true}for(var O=u.length-1;O>-1;O--){var P=u[O];var R=n.slice(0,P.reStart);var I=n.slice(P.reStart,P.reEnd-8);var D=n.slice(P.reEnd-8,P.reEnd);var U=n.slice(P.reEnd);D+=U;var te=R.split("(").length-1;var ve=U;for(g=0;g<te;g++){ve=ve.replace(/\)[+*?]?/,"")}U=ve;var me="";if(U===""&&t!==tQ){me="$"}var he=R+I+U+me+D;n=he}if(n!==""&&i){n="(?=.)"+n}if(T){n=f+n}if(t===tQ){return[n,i]}if(!i){return BRn(e)}var Fe=r.nocase?"i":"";try{var Oe=new RegExp("^"+n+"$",Fe)}catch(M){return new RegExp("$.")}Oe._glob=e;Oe._src=n;return Oe}a(LRn,"parse");mp.makeRe=function(e,t){return new ol(e,t||{}).makeRe()};ol.prototype.makeRe=FRn;function FRn(){if(this.regexp||this.regexp===false)return this.regexp;var e=this.set;if(!e.length){this.regexp=false;return this.regexp}var t=this.options;var r=t.noglobstar?dOe:t.dot?RRn:ORn;var n=t.nocase?"i":"";var i=e.map(function(s){return s.map(function(o){return o===pOe?r:typeof o==="string"?MRn(o):o._src}).join("\\/")}).join("|");i="^(?:"+i+")$";if(this.negate)i="^(?!"+i+").*$";try{this.regexp=new RegExp(i,n)}catch(s){this.regexp=false}return this.regexp}a(FRn,"makeRe");mp.match=function(e,t,r){r=r||{};var n=new ol(t,r);e=e.filter(function(i){return n.match(i)});if(n.options.nonull&&!e.length){e.push(t)}return e};ol.prototype.match=a(function e(t,r){if(typeof r==="undefined")r=this.partial;this.debug("match",t,this.pattern);if(this.comment)return false;if(this.empty)return t==="";if(t==="/"&&r)return true;var n=this.options;if(XF.sep!=="/"){t=t.split(XF.sep).join("/")}t=t.split(rRt);this.debug(this.pattern,"split",t);var i=this.set;this.debug(this.pattern,"set",i);var s;var o;for(o=t.length-1;o>=0;o--){s=t[o];if(s)break}for(o=0;o<i.length;o++){var u=i[o];var l=t;if(n.matchBase&&u.length===1){l=[s]}var c=this.matchOne(l,u,r);if(c){if(n.flipNegate)return true;return!this.negate}}if(n.flipNegate)return false;return this.negate},"match");ol.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{"this":this,file:e,pattern:t});this.debug("matchOne",e.length,t.length);for(var i=0,s=0,o=e.length,u=t.length;i<o&&s<u;i++,s++){this.debug("matchOne loop");var l=t[s];var c=e[i];this.debug(t,l,c);if(l===false)return false;if(l===pOe){this.debug("GLOBSTAR",[t,l,c]);var d=i;var p=s+1;if(p===u){this.debug("** at the end");for(;i<o;i++){if(e[i]==="."||e[i]===".."||!n.dot&&e[i].charAt(0)===".")return false}return true}while(d<o){var f=e[d];this.debug("\nglobstar while",e,d,t,p,f);if(this.matchOne(e.slice(d),t.slice(p),r)){this.debug("globstar found match!",d,o,f);return true}else{if(f==="."||f===".."||!n.dot&&f.charAt(0)==="."){this.debug("dot detected!",e,d,t,p);break}this.debug("globstar swallow a segment, and continue");d++}}if(r){this.debug("\n>>> no match, partial?",e,d,t,p);if(d===o)return true}return false}var m;if(typeof l==="string"){m=c===l;this.debug("string match",l,c,m)}else{m=c.match(l);this.debug("pattern match",l,c,m)}if(!m)return false}if(i===o&&s===u){return true}else if(i===o){return r}else if(s===u){return i===o-1&&e[i]===""}throw new Error("wtf?")};function BRn(e){return e.replace(/\\(.)/g,"$1")}a(BRn,"globUnescape");function MRn(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}a(MRn,"regExpEscape")});var sQ=y((_5s,iQ)=>{"use strict";function sRt(e){return e.charAt(0)==="/"}a(sRt,"posix");function aRt(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var r=t.exec(e);var n=r[1]||"";var i=Boolean(n&&n.charAt(1)!==":");return Boolean(r[2]||i)}a(aRt,"win32");iQ.exports=process.platform==="win32"?aRt:sRt;iQ.exports.posix=sRt;iQ.exports.win32=aRt});var mOe=y(QE=>{QE.setopts=HRn;QE.ownProp=oRt;QE.makeAbs=JF;QE.finish=VRn;QE.mark=zRn;QE.isIgnored=lRt;QE.childrenIgnored=KRn;function oRt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}a(oRt,"ownProp");var qRn=require("fs");var NP=require("path");var URn=nQ();var uRt=sQ();var fOe=URn.Minimatch;function $Rn(e,t){return e.localeCompare(t,"en")}a($Rn,"alphasort");function jRn(e,t){e.ignore=t.ignore||[];if(!Array.isArray(e.ignore))e.ignore=[e.ignore];if(e.ignore.length){e.ignore=e.ignore.map(GRn)}}a(jRn,"setupIgnores");function GRn(e){var t=null;if(e.slice(-3)==="/**"){var r=e.replace(/(\/\*\*)+$/,"");t=new fOe(r,{dot:true})}return{matcher:new fOe(e,{dot:true}),gmatcher:t}}a(GRn,"ignoreMap");function HRn(e,t,r){if(!r)r={};if(r.matchBase&&-1===t.indexOf("/")){if(r.noglobstar){throw new Error("base matching requires globstar")}t="**/"+t}e.silent=!!r.silent;e.pattern=t;e.strict=r.strict!==false;e.realpath=!!r.realpath;e.realpathCache=r.realpathCache||Object.create(null);e.follow=!!r.follow;e.dot=!!r.dot;e.mark=!!r.mark;e.nodir=!!r.nodir;if(e.nodir)e.mark=true;e.sync=!!r.sync;e.nounique=!!r.nounique;e.nonull=!!r.nonull;e.nosort=!!r.nosort;e.nocase=!!r.nocase;e.stat=!!r.stat;e.noprocess=!!r.noprocess;e.absolute=!!r.absolute;e.fs=r.fs||qRn;e.maxLength=r.maxLength||Infinity;e.cache=r.cache||Object.create(null);e.statCache=r.statCache||Object.create(null);e.symlinks=r.symlinks||Object.create(null);jRn(e,r);e.changedCwd=false;var n=process.cwd();if(!oRt(r,"cwd"))e.cwd=n;else{e.cwd=NP.resolve(r.cwd);e.changedCwd=e.cwd!==n}e.root=r.root||NP.resolve(e.cwd,"/");e.root=NP.resolve(e.root);if(process.platform==="win32")e.root=e.root.replace(/\\/g,"/");e.cwdAbs=uRt(e.cwd)?e.cwd:JF(e,e.cwd);if(process.platform==="win32")e.cwdAbs=e.cwdAbs.replace(/\\/g,"/");e.nomount=!!r.nomount;r.nonegate=true;r.nocomment=true;r.allowWindowsEscape=false;e.minimatch=new fOe(t,r);e.options=e.minimatch.options}a(HRn,"setopts");function VRn(e){var t=e.nounique;var r=t?[]:Object.create(null);for(var n=0,i=e.matches.length;n<i;n++){var s=e.matches[n];if(!s||Object.keys(s).length===0){if(e.nonull){var o=e.minimatch.globSet[n];if(t)r.push(o);else r[o]=true}}else{var u=Object.keys(s);if(t)r.push.apply(r,u);else u.forEach(function(l){r[l]=true})}}if(!t)r=Object.keys(r);if(!e.nosort)r=r.sort($Rn);if(e.mark){for(var n=0;n<r.length;n++){r[n]=e._mark(r[n])}if(e.nodir){r=r.filter(function(l){var c=!/\/$/.test(l);var d=e.cache[l]||e.cache[JF(e,l)];if(c&&d)c=d!=="DIR"&&!Array.isArray(d);return c})}}if(e.ignore.length)r=r.filter(function(l){return!lRt(e,l)});e.found=r}a(VRn,"finish");function zRn(e,t){var r=JF(e,t);var n=e.cache[r];var i=t;if(n){var s=n==="DIR"||Array.isArray(n);var o=t.slice(-1)==="/";if(s&&!o)i+="/";else if(!s&&o)i=i.slice(0,-1);if(i!==t){var u=JF(e,i);e.statCache[u]=e.statCache[r];e.cache[u]=e.cache[r]}}return i}a(zRn,"mark");function JF(e,t){var r=t;if(t.charAt(0)==="/"){r=NP.join(e.root,t)}else if(uRt(t)||t===""){r=t}else if(e.changedCwd){r=NP.resolve(e.cwd,t)}else{r=NP.resolve(t)}if(process.platform==="win32")r=r.replace(/\\/g,"/");return r}a(JF,"makeAbs");function lRt(e,t){if(!e.ignore.length)return false;return e.ignore.some(function(r){return r.matcher.match(t)||!!(r.gmatcher&&r.gmatcher.match(t))})}a(lRt,"isIgnored");function KRn(e,t){if(!e.ignore.length)return false;return e.ignore.some(function(r){return!!(r.gmatcher&&r.gmatcher.match(t))})}a(KRn,"childrenIgnored")});var mRt=y((w5s,fRt)=>{fRt.exports=pRt;pRt.GlobSync=ru;var WRn=aOe();var cRt=nQ();var S5s=cRt.Minimatch;var A5s=yOe().Glob;var C5s=require("util");var hOe=require("path");var dRt=require("assert");var aQ=sQ();var aC=mOe();var YRn=aC.setopts;var gOe=aC.ownProp;var XRn=aC.childrenIgnored;var JRn=aC.isIgnored;function pRt(e,t){if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new ru(e,t).found}a(pRt,"globSync");function ru(e,t){if(!e)throw new Error("must provide pattern");if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof ru))return new ru(e,t);YRn(this,e,t);if(this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;n<r;n++){this._process(this.minimatch.set[n],n,false)}this._finish()}a(ru,"GlobSync");ru.prototype._finish=function(){dRt.ok(this instanceof ru);if(this.realpath){var e=this;this.matches.forEach(function(t,r){var n=e.matches[r]=Object.create(null);for(var i in t){try{i=e._makeAbs(i);var s=WRn.realpathSync(i,e.realpathCache);n[s]=true}catch(o){if(o.syscall==="stat")n[e._makeAbs(i)]=true;else throw o}}})}aC.finish(this)};ru.prototype._process=function(e,t,r){dRt.ok(this instanceof ru);var n=0;while(typeof e[n]==="string"){n++}var i;switch(n){case e.length:this._processSimple(e.join("/"),t);return;case 0:i=null;break;default:i=e.slice(0,n).join("/");break}var s=e.slice(n);var o;if(i===null)o=".";else if(aQ(i)||aQ(e.map(function(c){return typeof c==="string"?c:"[*]"}).join("/"))){if(!i||!aQ(i))i="/"+i;o=i}else o=i;var u=this._makeAbs(o);if(XRn(this,o))return;var l=s[0]===cRt.GLOBSTAR;if(l)this._processGlobStar(i,o,u,s,t,r);else this._processReaddir(i,o,u,s,t,r)};ru.prototype._processReaddir=function(e,t,r,n,i,s){var o=this._readdir(r,s);if(!o)return;var u=n[0];var l=!!this.minimatch.negate;var c=u._glob;var d=this.dot||c.charAt(0)===".";var p=[];for(var f=0;f<o.length;f++){var m=o[f];if(m.charAt(0)!=="."||d){var h;if(l&&!e){h=!m.match(u)}else{h=m.match(u)}if(h)p.push(m)}}var g=p.length;if(g===0)return;if(n.length===1&&!this.mark&&!this.stat){if(!this.matches[i])this.matches[i]=Object.create(null);for(var f=0;f<g;f++){var m=p[f];if(e){if(e.slice(-1)!=="/")m=e+"/"+m;else m=e+m}if(m.charAt(0)==="/"&&!this.nomount){m=hOe.join(this.root,m)}this._emitMatch(i,m)}return}n.shift();for(var f=0;f<g;f++){var m=p[f];var _;if(e)_=[e,m];else _=[m];this._process(_.concat(n),i,s)}};ru.prototype._emitMatch=function(e,t){if(JRn(this,t))return;var r=this._makeAbs(t);if(this.mark)t=this._mark(t);if(this.absolute){t=r}if(this.matches[e][t])return;if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.matches[e][t]=true;if(this.stat)this._stat(t)};ru.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,false);var t;var r;var n;try{r=this.fs.lstatSync(e)}catch(s){if(s.code==="ENOENT"){return null}}var i=r&&r.isSymbolicLink();this.symlinks[e]=i;if(!i&&r&&!r.isDirectory())this.cache[e]="FILE";else t=this._readdir(e,false);return t};ru.prototype._readdir=function(e,t){var r;if(t&&!gOe(this.symlinks,e))return this._readdirInGlobStar(e);if(gOe(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return null;if(Array.isArray(n))return n}try{return this._readdirEntries(e,this.fs.readdirSync(e))}catch(i){this._readdirError(e,i);return null}};ru.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat){for(var r=0;r<t.length;r++){var n=t[r];if(e==="/")n=e+n;else n=e+"/"+n;this.cache[n]=true}}this.cache[e]=t;return t};ru.prototype._readdirError=function(e,t){switch(t.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(e);this.cache[r]="FILE";if(r===this.cwdAbs){var n=new Error(t.code+" invalid cwd "+this.cwd);n.path=this.cwd;n.code=t.code;throw n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=false;break;default:this.cache[this._makeAbs(e)]=false;if(this.strict)throw t;if(!this.silent)console.error("glob error",t);break}};ru.prototype._processGlobStar=function(e,t,r,n,i,s){var o=this._readdir(r,s);if(!o)return;var u=n.slice(1);var l=e?[e]:[];var c=l.concat(u);this._process(c,i,false);var d=o.length;var p=this.symlinks[r];if(p&&s)return;for(var f=0;f<d;f++){var m=o[f];if(m.charAt(0)==="."&&!this.dot)continue;var h=l.concat(o[f],u);this._process(h,i,true);var g=l.concat(o[f],n);this._process(g,i,true)}};ru.prototype._processSimple=function(e,t){var r=this._stat(e);if(!this.matches[t])this.matches[t]=Object.create(null);if(!r)return;if(e&&aQ(e)&&!this.nomount){var n=/[\/\\]$/.test(e);if(e.charAt(0)==="/"){e=hOe.join(this.root,e)}else{e=hOe.resolve(this.root,e);if(n)e+="/"}}if(process.platform==="win32")e=e.replace(/\\/g,"/");this._emitMatch(t,e)};ru.prototype._stat=function(e){var t=this._makeAbs(e);var r=e.slice(-1)==="/";if(e.length>this.maxLength)return false;if(!this.stat&&gOe(this.cache,t)){var o=this.cache[t];if(Array.isArray(o))o="DIR";if(!r||o==="DIR")return o;if(r&&o==="FILE")return false}var n;var i=this.statCache[t];if(!i){var s;try{s=this.fs.lstatSync(t)}catch(u){if(u&&(u.code==="ENOENT"||u.code==="ENOTDIR")){this.statCache[t]=false;return false}}if(s&&s.isSymbolicLink()){try{i=this.fs.statSync(t)}catch(u){i=s}}else{i=s}}this.statCache[t]=i;var o=true;if(i)o=i.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||o;if(r&&o==="FILE")return false;return o};ru.prototype._mark=function(e){return aC.mark(this,e)};ru.prototype._makeAbs=function(e){return aC.makeAbs(this,e)}});var gRt=y((x5s,hRt)=>{var QRn=X2e();var QF=Object.create(null);var ZRn=wW();hRt.exports=QRn(eOn);function eOn(e,t){if(QF[e]){QF[e].push(t);return null}else{QF[e]=[t];return tOn(e)}}a(eOn,"inflight");function tOn(e){return ZRn(a(function t(){var r=QF[e];var n=r.length;var i=rOn(arguments);try{for(var s=0;s<n;s++){r[s].apply(null,i)}}finally{if(r.length>n){r.splice(0,n);process.nextTick(function(){t.apply(null,i)})}else{delete QF[e]}}},"RES"))}a(tOn,"makeres");function rOn(e){var t=e.length;var r=[];for(var n=0;n<t;n++)r[n]=e[n];return r}a(rOn,"slice")});var yOe=y((N5s,_Rt)=>{_Rt.exports=oC;var nOn=aOe();var yRt=nQ();var O5s=yRt.Minimatch;var iOn=Xv();var sOn=require("events").EventEmitter;var _Oe=require("path");var vOe=require("assert");var ZF=sQ();var bOe=mRt();var uC=mOe();var aOn=uC.setopts;var EOe=uC.ownProp;var SOe=gRt();var P5s=require("util");var oOn=uC.childrenIgnored;var uOn=uC.isIgnored;var lOn=wW();function oC(e,t,r){if(typeof t==="function")r=t,t={};if(!t)t={};if(t.sync){if(r)throw new TypeError("callback provided to sync glob");return bOe(e,t)}return new Cs(e,t,r)}a(oC,"glob");oC.sync=bOe;var cOn=oC.GlobSync=bOe.GlobSync;oC.glob=oC;function dOn(e,t){if(t===null||typeof t!=="object"){return e}var r=Object.keys(t);var n=r.length;while(n--){e[r[n]]=t[r[n]]}return e}a(dOn,"extend");oC.hasMagic=function(e,t){var r=dOn({},t);r.noprocess=true;var n=new Cs(e,r);var i=n.minimatch.set;if(!e)return false;if(i.length>1)return true;for(var s=0;s<i[0].length;s++){if(typeof i[0][s]!=="string")return true}return false};oC.Glob=Cs;iOn(Cs,sOn);function Cs(e,t,r){if(typeof t==="function"){r=t;t=null}if(t&&t.sync){if(r)throw new TypeError("callback provided to sync glob");return new cOn(e,t)}if(!(this instanceof Cs))return new Cs(e,t,r);aOn(this,e,t);this._didRealPath=false;var n=this.minimatch.set.length;this.matches=new Array(n);if(typeof r==="function"){r=lOn(r);this.on("error",r);this.on("end",function(l){r(null,l)})}var i=this;this._processing=0;this._emitQueue=[];this._processQueue=[];this.paused=false;if(this.noprocess)return this;if(n===0)return u();var s=true;for(var o=0;o<n;o++){this._process(this.minimatch.set[o],o,false,u)}s=false;function u(){--i._processing;if(i._processing<=0){if(s){process.nextTick(function(){i._finish()})}else{i._finish()}}}a(u,"done")}a(Cs,"Glob");Cs.prototype._finish=function(){vOe(this instanceof Cs);if(this.aborted)return;if(this.realpath&&!this._didRealpath)return this._realpath();uC.finish(this);this.emit("end",this.found)};Cs.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=true;var e=this.matches.length;if(e===0)return this._finish();var t=this;for(var r=0;r<this.matches.length;r++)this._realpathSet(r,n);function n(){if(--e===0)t._finish()}a(n,"next")};Cs.prototype._realpathSet=function(e,t){var r=this.matches[e];if(!r)return t();var n=Object.keys(r);var i=this;var s=n.length;if(s===0)return t();var o=this.matches[e]=Object.create(null);n.forEach(function(u,l){u=i._makeAbs(u);nOn.realpath(u,i.realpathCache,function(c,d){if(!c)o[d]=true;else if(c.syscall==="stat")o[u]=true;else i.emit("error",c);if(--s===0){i.matches[e]=o;t()}})})};Cs.prototype._mark=function(e){return uC.mark(this,e)};Cs.prototype._makeAbs=function(e){return uC.makeAbs(this,e)};Cs.prototype.abort=function(){this.aborted=true;this.emit("abort")};Cs.prototype.pause=function(){if(!this.paused){this.paused=true;this.emit("pause")}};Cs.prototype.resume=function(){if(this.paused){this.emit("resume");this.paused=false;if(this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var r=e[t];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(var t=0;t<n.length;t++){var i=n[t];this._processing--;this._process(i[0],i[1],i[2],i[3])}}}};Cs.prototype._process=function(e,t,r,n){vOe(this instanceof Cs);vOe(typeof n==="function");if(this.aborted)return;this._processing++;if(this.paused){this._processQueue.push([e,t,r,n]);return}var i=0;while(typeof e[i]==="string"){i++}var s;switch(i){case e.length:this._processSimple(e.join("/"),t,n);return;case 0:s=null;break;default:s=e.slice(0,i).join("/");break}var o=e.slice(i);var u;if(s===null)u=".";else if(ZF(s)||ZF(e.map(function(d){return typeof d==="string"?d:"[*]"}).join("/"))){if(!s||!ZF(s))s="/"+s;u=s}else u=s;var l=this._makeAbs(u);if(oOn(this,u))return n();var c=o[0]===yRt.GLOBSTAR;if(c)this._processGlobStar(s,u,l,o,t,r,n);else this._processReaddir(s,u,l,o,t,r,n)};Cs.prototype._processReaddir=function(e,t,r,n,i,s,o){var u=this;this._readdir(r,s,function(l,c){return u._processReaddir2(e,t,r,n,i,s,c,o)})};Cs.prototype._processReaddir2=function(e,t,r,n,i,s,o,u){if(!o)return u();var l=n[0];var c=!!this.minimatch.negate;var d=l._glob;var p=this.dot||d.charAt(0)===".";var f=[];for(var m=0;m<o.length;m++){var h=o[m];if(h.charAt(0)!=="."||p){var g;if(c&&!e){g=!h.match(l)}else{g=h.match(l)}if(g)f.push(h)}}var _=f.length;if(_===0)return u();if(n.length===1&&!this.mark&&!this.stat){if(!this.matches[i])this.matches[i]=Object.create(null);for(var m=0;m<_;m++){var h=f[m];if(e){if(e!=="/")h=e+"/"+h;else h=e+h}if(h.charAt(0)==="/"&&!this.nomount){h=_Oe.join(this.root,h)}this._emitMatch(i,h)}return u()}n.shift();for(var m=0;m<_;m++){var h=f[m];var v;if(e){if(e!=="/")h=e+"/"+h;else h=e+h}this._process([h].concat(n),i,s,u)}u()};Cs.prototype._emitMatch=function(e,t){if(this.aborted)return;if(uOn(this,t))return;if(this.paused){this._emitQueue.push([e,t]);return}var r=ZF(t)?t:this._makeAbs(t);if(this.mark)t=this._mark(t);if(this.absolute)t=r;if(this.matches[e][t])return;if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.matches[e][t]=true;var i=this.statCache[r];if(i)this.emit("stat",t,i);this.emit("match",t)};Cs.prototype._readdirInGlobStar=function(e,t){if(this.aborted)return;if(this.follow)return this._readdir(e,false,t);var r="lstat\0"+e;var n=this;var i=SOe(r,s);if(i)n.fs.lstat(e,i);function s(o,u){if(o&&o.code==="ENOENT")return t();var l=u&&u.isSymbolicLink();n.symlinks[e]=l;if(!l&&u&&!u.isDirectory()){n.cache[e]="FILE";t()}else n._readdir(e,false,t)}a(s,"lstatcb_")};Cs.prototype._readdir=function(e,t,r){if(this.aborted)return;r=SOe("readdir\0"+e+"\0"+t,r);if(!r)return;if(t&&!EOe(this.symlinks,e))return this._readdirInGlobStar(e,r);if(EOe(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return r();if(Array.isArray(n))return r(null,n)}var i=this;i.fs.readdir(e,pOn(this,e,r))};function pOn(e,t,r){return function(n,i){if(n)e._readdirError(t,n,r);else e._readdirEntries(t,i,r)}}a(pOn,"readdirCb");Cs.prototype._readdirEntries=function(e,t,r){if(this.aborted)return;if(!this.mark&&!this.stat){for(var n=0;n<t.length;n++){var i=t[n];if(e==="/")i=e+i;else i=e+"/"+i;this.cache[i]=true}}this.cache[e]=t;return r(null,t)};Cs.prototype._readdirError=function(e,t,r){if(this.aborted)return;switch(t.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(e);this.cache[n]="FILE";if(n===this.cwdAbs){var i=new Error(t.code+" invalid cwd "+this.cwd);i.path=this.cwd;i.code=t.code;this.emit("error",i);this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=false;break;default:this.cache[this._makeAbs(e)]=false;if(this.strict){this.emit("error",t);this.abort()}if(!this.silent)console.error("glob error",t);break}return r()};Cs.prototype._processGlobStar=function(e,t,r,n,i,s,o){var u=this;this._readdir(r,s,function(l,c){u._processGlobStar2(e,t,r,n,i,s,c,o)})};Cs.prototype._processGlobStar2=function(e,t,r,n,i,s,o,u){if(!o)return u();var l=n.slice(1);var c=e?[e]:[];var d=c.concat(l);this._process(d,i,false,u);var p=this.symlinks[r];var f=o.length;if(p&&s)return u();for(var m=0;m<f;m++){var h=o[m];if(h.charAt(0)==="."&&!this.dot)continue;var g=c.concat(o[m],l);this._process(g,i,true,u);var _=c.concat(o[m],n);this._process(_,i,true,u)}u()};Cs.prototype._processSimple=function(e,t,r){var n=this;this._stat(e,function(i,s){n._processSimple2(e,t,i,s,r)})};Cs.prototype._processSimple2=function(e,t,r,n,i){if(!this.matches[t])this.matches[t]=Object.create(null);if(!n)return i();if(e&&ZF(e)&&!this.nomount){var s=/[\/\\]$/.test(e);if(e.charAt(0)==="/"){e=_Oe.join(this.root,e)}else{e=_Oe.resolve(this.root,e);if(s)e+="/"}}if(process.platform==="win32")e=e.replace(/\\/g,"/");this._emitMatch(t,e);i()};Cs.prototype._stat=function(e,t){var r=this._makeAbs(e);var n=e.slice(-1)==="/";if(e.length>this.maxLength)return t();if(!this.stat&&EOe(this.cache,r)){var i=this.cache[r];if(Array.isArray(i))i="DIR";if(!n||i==="DIR")return t(null,i);if(n&&i==="FILE")return t()}var s;var o=this.statCache[r];if(o!==void 0){if(o===false)return t(null,o);else{var u=o.isDirectory()?"DIR":"FILE";if(n&&u==="FILE")return t();else return t(null,u,o)}}var l=this;var c=SOe("stat\0"+r,d);if(c)l.fs.lstat(r,c);function d(p,f){if(f&&f.isSymbolicLink()){return l.fs.stat(r,function(m,h){if(m)l._stat2(e,r,null,f,t);else l._stat2(e,r,m,h,t)})}else{l._stat2(e,r,p,f,t)}}a(d,"lstatcb_")};Cs.prototype._stat2=function(e,t,r,n,i){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[t]=false;return i()}var s=e.slice(-1)==="/";this.statCache[t]=n;if(t.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,false,n);var o=true;if(n)o=n.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||o;if(s&&o==="FILE")return i();return i(null,o,n)}});var xRt=y((k5s,TRt)=>{TRt.exports=wOe;wOe.sync=wRt;var ds=require("assert");var SRt=require("path");var vRt=require("fs");var lQ=yOe();var ARt=parseInt("666",8);var fOn={nosort:true,silent:true};var AOe=0;var e7=process.platform==="win32";function CRt(e){var t=["unlink","chmod","stat","lstat","rmdir","readdir"];t.forEach(function(r){e[r]=e[r]||vRt[r];r=r+"Sync";e[r]=e[r]||vRt[r]});e.maxBusyTries=e.maxBusyTries||3;e.emfileWait=e.emfileWait||1e3;if(e.glob===false){e.disableGlob=true}e.disableGlob=e.disableGlob||false;e.glob=e.glob||fOn}a(CRt,"defaults");function wOe(e,t,r){if(typeof t==="function"){r=t;t={}}ds(e,"rimraf: missing path");ds.equal(typeof e,"string","rimraf: path should be a string");ds.equal(typeof r,"function","rimraf: callback function required");ds(t,"rimraf: invalid options argument provided");ds.equal(typeof t,"object","rimraf: options should be object");CRt(t);var n=0;var i=null;var s=0;if(t.disableGlob||!lQ.hasMagic(e))return u(null,[e]);t.lstat(e,function(l,c){if(!l)return u(null,[e]);lQ(e,t.glob,u)});function o(l){i=i||l;if(--s===0)r(i)}a(o,"next");function u(l,c){if(l)return r(l);s=c.length;if(s===0)return r();c.forEach(function(d){COe(d,t,a(function p(f){if(f){if((f.code==="EBUSY"||f.code==="ENOTEMPTY"||f.code==="EPERM")&&n<t.maxBusyTries){n++;var m=n*100;return setTimeout(function(){COe(d,t,p)},m)}if(f.code==="EMFILE"&&AOe<t.emfileWait){return setTimeout(function(){COe(d,t,p)},AOe++)}if(f.code==="ENOENT")f=null}AOe=0;o(f)},"CB"))})}a(u,"afterGlob")}a(wOe,"rimraf");function COe(e,t,r){ds(e);ds(t);ds(typeof r==="function");t.lstat(e,function(n,i){if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&e7)ERt(e,t,n,r);if(i&&i.isDirectory())return oQ(e,t,n,r);t.unlink(e,function(s){if(s){if(s.code==="ENOENT")return r(null);if(s.code==="EPERM")return e7?ERt(e,t,s,r):oQ(e,t,s,r);if(s.code==="EISDIR")return oQ(e,t,s,r)}return r(s)})})}a(COe,"rimraf_");function ERt(e,t,r,n){ds(e);ds(t);ds(typeof n==="function");if(r)ds(r instanceof Error);t.chmod(e,ARt,function(i){if(i)n(i.code==="ENOENT"?null:r);else t.stat(e,function(s,o){if(s)n(s.code==="ENOENT"?null:r);else if(o.isDirectory())oQ(e,t,r,n);else t.unlink(e,n)})})}a(ERt,"fixWinEPERM");function bRt(e,t,r){ds(e);ds(t);if(r)ds(r instanceof Error);try{t.chmodSync(e,ARt)}catch(i){if(i.code==="ENOENT")return;else throw r}try{var n=t.statSync(e)}catch(i){if(i.code==="ENOENT")return;else throw r}if(n.isDirectory())uQ(e,t,r);else t.unlinkSync(e)}a(bRt,"fixWinEPERMSync");function oQ(e,t,r,n){ds(e);ds(t);if(r)ds(r instanceof Error);ds(typeof n==="function");t.rmdir(e,function(i){if(i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM"))mOn(e,t,n);else if(i&&i.code==="ENOTDIR")n(r);else n(i)})}a(oQ,"rmdir");function mOn(e,t,r){ds(e);ds(t);ds(typeof r==="function");t.readdir(e,function(n,i){if(n)return r(n);var s=i.length;if(s===0)return t.rmdir(e,r);var o;i.forEach(function(u){wOe(SRt.join(e,u),t,function(l){if(o)return;if(l)return r(o=l);if(--s===0)t.rmdir(e,r)})})})}a(mOn,"rmkids");function wRt(e,t){t=t||{};CRt(t);ds(e,"rimraf: missing path");ds.equal(typeof e,"string","rimraf: path should be a string");ds(t,"rimraf: missing options");ds.equal(typeof t,"object","rimraf: options should be object");var r;if(t.disableGlob||!lQ.hasMagic(e)){r=[e]}else{try{t.lstatSync(e);r=[e]}catch(s){r=lQ.sync(e,t.glob)}}if(!r.length)return;for(var n=0;n<r.length;n++){var e=r[n];try{var i=t.lstatSync(e)}catch(o){if(o.code==="ENOENT")return;if(o.code==="EPERM"&&e7)bRt(e,t,o)}try{if(i&&i.isDirectory())uQ(e,t,null);else t.unlinkSync(e)}catch(o){if(o.code==="ENOENT")return;if(o.code==="EPERM")return e7?bRt(e,t,o):uQ(e,t,o);if(o.code!=="EISDIR")throw o;uQ(e,t,o)}}}a(wRt,"rimrafSync");function uQ(e,t,r){ds(e);ds(t);if(r)ds(r instanceof Error);try{t.rmdirSync(e)}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")hOn(e,t)}}a(uQ,"rmdirSync");function hOn(e,t){ds(e);ds(t);t.readdirSync(e).forEach(function(o){wRt(SRt.join(e,o),t)});var r=e7?100:1;var n=0;do{var i=true;try{var s=t.rmdirSync(e,t);i=false;return s}finally{if(++n<r&&i)continue}}while(true)}a(hOn,"rmkidsSync")});var NRt=y((L5s,PRt)=>{var t7=require("path");var RRt=require("fs");var ORt=parseInt("0777",8);PRt.exports=IP.mkdirp=IP.mkdirP=IP;function IP(e,t,r,n){if(typeof t==="function"){r=t;t={}}else if(!t||typeof t!=="object"){t={mode:t}}var i=t.mode;var s=t.fs||RRt;if(i===void 0){i=ORt}if(!n)n=null;var o=r||function(){};e=t7.resolve(e);s.mkdir(e,i,function(u){if(!u){n=n||e;return o(null,n)}switch(u.code){case"ENOENT":if(t7.dirname(e)===e)return o(u);IP(t7.dirname(e),t,function(l,c){if(l)o(l,c);else IP(e,t,o,c)});break;default:s.stat(e,function(l,c){if(l||!c.isDirectory())o(u,n);else o(null,n)});break}})}a(IP,"mkdirP");IP.sync=a(function e(t,r,n){if(!r||typeof r!=="object"){r={mode:r}}var i=r.mode;var s=r.fs||RRt;if(i===void 0){i=ORt}if(!n)n=null;t=t7.resolve(t);try{s.mkdirSync(t,i);n=n||t}catch(u){switch(u.code){case"ENOENT":n=e(t7.dirname(t),r,n);e(t,r,n);break;default:var o;try{o=s.statSync(t)}catch(l){throw u}if(!o.isDirectory())throw u;break}}return n},"sync")});var $Rt=y((yh,URt)=>{var TOe=require("fs");var kRt=require("path");var cQ=require("constants");var gOn=require("os");var xOe=xRt();var DRt=NRt();var B5s=require("os").tmpdir();var LRt=xOe.sync;var FRt=kRt.resolve(gOn.tmpdir());var ROe=cQ.O_CREAT|cQ.O_TRUNC|cQ.O_RDWR|cQ.O_EXCL;var r7=a(function(e){if(typeof e==="function"){return[void 0,e]}var t;var r=new Promise(function(n,i){t=a(function(){var s=Array.from(arguments);var o=s.shift();process.nextTick(function(){if(o){i(o)}else if(s.length===1){n(s[0])}else{n(s)}})},"promiseCallback")});return[r,t]},"promisify");var kP=a(function(e,t){var r=yOn(e,t);var n=new Date;var i=[r.prefix,n.getFullYear(),n.getMonth(),n.getDate(),"-",process.pid,"-",(Math.random()*4294967296+1).toString(36),r.suffix].join("");return kRt.join(r.dir||FRt,i)},"generateName");var yOn=a(function(e,t){var r={prefix:null,suffix:null};if(e){switch(typeof e){case"string":r.prefix=e;break;case"object":r=e;break;default:throw new Error("Unknown affix declaration: "+r)}}else{r.prefix=t}return r},"parseAffixes");var ag=false;var _On=a(function(e){ag=e!==false;return URt.exports},"track");var IRt=false;var dQ=[];var pQ=[];function OOe(e){if(!ag)return false;MRt();dQ.push(e)}a(OOe,"deleteFileOnExit");function BRt(e){if(!ag)return false;MRt();pQ.push(e)}a(BRt,"deleteDirOnExit");function MRt(){if(!ag)return false;if(!IRt){process.addListener("exit",function(){try{qRt()}catch(e){console.warn("Fail to clean temporary files on exit : ",e);throw e}});IRt=true}}a(MRt,"attachExitListener");function vOn(){if(!ag){return false}var e=0;var t;while((t=dQ.shift())!==void 0){LRt(t,{maxBusyTries:6});e++}return e}a(vOn,"cleanupFilesSync");function EOn(e){var t=r7(e);var r=t[0];e=t[1];if(!ag){e(new Error("not tracking"));return r}var n=0;var i=dQ.length;if(!i){e(null,n);return r}var s;var o=a(function(u){if(!i){return}if(u){e(u);i=0;return}else{n++}i--;if(!i){e(null,n)}},"rimrafCallback");while((s=dQ.shift())!==void 0){xOe(s,{maxBusyTries:6},o)}return r}a(EOn,"cleanupFiles");function bOn(){if(!ag){return false}var e=0;var t;while((t=pQ.shift())!==void 0){LRt(t,{maxBusyTries:6});e++}return e}a(bOn,"cleanupDirsSync");function SOn(e){var t=r7(e);var r=t[0];e=t[1];if(!ag){e(new Error("not tracking"));return r}var n=0;var i=pQ.length;if(!i){e(null,n);return r}var s;var o=a(function(u){if(!i){return}if(u){e(u,n);i=0;return}else{n++}i--;if(!i){e(null,n)}},"rimrafCallback");while((s=pQ.shift())!==void 0){xOe(s,{maxBusyTries:6},o)}return r}a(SOn,"cleanupDirs");function qRt(){if(!ag){return false}var e=vOn();var t=bOn();return{files:e,dirs:t}}a(qRt,"cleanupSync");function AOn(e){var t=r7(e);var r=t[0];e=t[1];if(!ag){e(new Error("not tracking"));return r}EOn(function(n,i){if(n){e(n,{files:i})}else{SOn(function(s,o){e(s,{files:i,dirs:o})})}});return r}a(AOn,"cleanup");var COn=a((e,t)=>{const r=r7(t);const n=r[0];t=r[1];let i=kP(e,"d-");DRt(i,448,s=>{if(!s){BRt(i)}t(s,i)});return n},"mkdir");var wOn=a(e=>{let t=kP(e,"d-");DRt.sync(t,448);BRt(t);return t},"mkdirSync");var TOn=a((e,t)=>{const r=r7(t);const n=r[0];t=r[1];const i=kP(e,"f-");TOe.open(i,ROe,384,(s,o)=>{if(!s){OOe(i)}t(s,{path:i,fd:o})});return n},"open");var xOn=a(e=>{const t=kP(e,"f-");let r=TOe.openSync(t,ROe,384);OOe(t);return{path:t,fd:r}},"openSync");var ROn=a(e=>{const t=kP(e,"s-");let r=TOe.createWriteStream(t,{flags:ROe,mode:384});OOe(t);return r},"createWriteStream");yh.dir=FRt;yh.track=_On;yh.mkdir=COn;yh.mkdirSync=wOn;yh.open=TOn;yh.openSync=xOn;yh.path=kP;yh.cleanup=AOn;yh.cleanupSync=qRt;yh.createWriteStream=ROn});var VRt=y(DP=>{"use strict";var HRt=DP&&DP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(DP,"__esModule",{value:true});DP.generateBuildData=void 0;var fQ=hn();var jRt=require("fs/promises");var GRt=HRt(require("path"));var OOn=Fn();var POn=HRt(xs());var NOn=a(async function({systemDirectory:e,buildId:t,logger:r,config:n,publicZuploEnvironmentVariables:i}){return POn.default.timeFn("Generating build data",async()=>{r.debug(`Generating build data`);const s=await(0,jRt.readFile)(GRt.default.resolve(__dirname,"../../../package.json"),"utf-8");const o=JSON.parse(s);const u={BUILD_ID:t??"",GIT_SHA:process.env.GIT_SHA,TIMESTAMP:new Date().toISOString(),IS_PRODUCTION:fQ.env.isProduction(),BUILD_ENV:fQ.env.NODE_ENV,ZUPLO_VERSION:o.version,API_VERSION:process.env.API_VERSION,COMPATIBILITY_DATE:n?.compatibilityDate,ACCOUNT_NAME:i?.ZUPLO_ACCOUNT_NAME,PROJECT_NAME:i?.ZUPLO_PROJECT_NAME,ENVIRONMENT_TYPE:i?.ZUPLO_ENVIRONMENT_TYPE,COMPATIBILITY_FLAGS:fQ.COMPATIBILITY_FLAG_MAPPINGS?fQ.COMPATIBILITY_FLAG_MAPPINGS[n?.compatibilityDate??"none"]:{runOutboundPoliciesOnHandlerOnAllStatuses:false}};const l=JSON.stringify(u,void 0,2);const c=GRt.default.join(e,OOn.GENERATED_BUILD_JSON_FILE);try{await(0,jRt.writeFile)(c,l.trimStart(),"utf-8")}catch(d){r.error(d);const p={message:`Error creating file at ${c}`,pluginName:"buildData",severity:"error"};return{warnings:[],errors:[p]}}return{warnings:[],errors:[]}})},"generateBuildData");DP.generateBuildData=NOn});var zRt=y(LP=>{"use strict";var NOe=LP&&LP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(LP,"__esModule",{value:true});LP.generateWorker=void 0;var IOn=NOe(require("fs/promises"));var kOn=NOe(require("path"));var POe=Fn();var DOn=NOe(xs());var LOn=a(async function({systemDirectory:e,logger:t}){return DOn.default.timeFn("Generating Worker shim",async()=>{t.debug("Generating Worker shim");const r=`import { Handler, ServiceProviderImpl } from "@zuplo/runtime";
411
411
  import routeLoader from "../config/routes.json";
412
412
  import * as schemaValidations from "./ajv-schema.json";
413
413
  import { runtimeInit } from "../modules/zuplo.runtime.ts";
@@ -524,7 +524,7 @@ ${n.message}`:g;const S=[v,t,e].filter(Boolean).join("\n");if(_){n.originalMessa
524
524
  `});++n<e.length;)n&&r.push({type:"text",value:`
525
525
  `}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
526
526
  `}),r}a(M2i,"hP");function xVt(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}a(xVt,"Ak");function RVt(e,t){let r=D2i(e,t),n=r.one(e,void 0),i=N2i(r),s=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&("children"in s,s.children.push({type:"text",value:`
527
- `},i)),s}a(RVt,"ui");function q2i(e,t){return e&&"run"in e?async function(r,n){let i=RVt(r,t);await e.run(i,n)}:function(r){return RVt(r,t||e)}}a(q2i,"li");var U2i=oq(NVt(),1);var $2i=a(e=>{let t=[];return(0,U2i.default)(e,{type:"heading"},r=>{let n={depth:r.depth,value:yne(r,{includeImageAlt:false})},i=r==null?void 0:r.data;i&&(n.data=i),t.push(n)}),t},"bP");function j2i(){return(e,t)=>{t.data.headings=$2i(e)}}a(j2i,"Cm");var OVt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"];async function G2i(e){let t=await Bmi().use(r2i).use(Tbi).use(j2i).use(q2i,{allowDangerousHtml:true}).use(b1i).use(N1i,{...nq,attributes:{...nq.attributes,form:[...OVt,"className","action","method"],button:[...OVt,"className","type","role"]},tagNames:[...nq.tagNames??[],"form","button"]}).use($mi.default).use(U1i).use(xmi).use(Hyi).process(e);return{html:t.value,headings:t.data.headings}}a(G2i,"EP");});var yw=y((TKs,gw)=>{"use strict";function uWt(e){return typeof e==="undefined"||e===null}a(uWt,"isNothing");function H2i(e){return typeof e==="object"&&e!==null}a(H2i,"isObject");function V2i(e){if(Array.isArray(e))return e;else if(uWt(e))return[];return[e]}a(V2i,"toArray");function z2i(e,t){var r,n,i,s;if(t){s=Object.keys(t);for(r=0,n=s.length;r<n;r+=1){i=s[r];e[i]=t[i]}}return e}a(z2i,"extend");function K2i(e,t){var r="",n;for(n=0;n<t;n+=1){r+=e}return r}a(K2i,"repeat");function W2i(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}a(W2i,"isNegativeZero");gw.exports.isNothing=uWt;gw.exports.isObject=H2i;gw.exports.toArray=V2i;gw.exports.repeat=K2i;gw.exports.isNegativeZero=W2i;gw.exports.extend=z2i});var t3=y((RKs,lWt)=>{"use strict";function yq(e,t){Error.call(this);this.name="YAMLException";this.reason=e;this.mark=t;this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"");if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=new Error().stack||""}}a(yq,"YAMLException");yq.prototype=Object.create(Error.prototype);yq.prototype.constructor=yq;yq.prototype.toString=a(function e(t){var r=this.name+": ";r+=this.reason||"(unknown reason)";if(!t&&this.mark){r+=" "+this.mark.toString()}return r},"toString");lWt.exports=yq});var pWt=y((PKs,dWt)=>{"use strict";var cWt=yw();function h8e(e,t,r,n,i){this.name=e;this.buffer=t;this.position=r;this.line=n;this.column=i}a(h8e,"Mark");h8e.prototype.getSnippet=a(function e(t,r){var n,i,s,o,u;if(!this.buffer)return null;t=t||4;r=r||75;n="";i=this.position;while(i>0&&"\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(i-1))===-1){i-=1;if(this.position-i>r/2-1){n=" ... ";i+=5;break}}s="";o=this.position;while(o<this.buffer.length&&"\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(o))===-1){o+=1;if(o-this.position>r/2-1){s=" ... ";o-=5;break}}u=this.buffer.slice(i,o);return cWt.repeat(" ",t)+n+u+s+"\n"+cWt.repeat(" ",t+this.position-i+n.length)+"^"},"getSnippet");h8e.prototype.toString=a(function e(t){var r,n="";if(this.name){n+='in "'+this.name+'" '}n+="at line "+(this.line+1)+", column "+(this.column+1);if(!t){r=this.getSnippet();if(r){n+=":\n"+r}}return n},"toString");dWt.exports=h8e});var iu=y((IKs,mWt)=>{"use strict";var fWt=t3();var Y2i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"];var X2i=["scalar","sequence","mapping"];function J2i(e){var t={};if(e!==null){Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})})}return t}a(J2i,"compileStyleAliases");function Q2i(e,t){t=t||{};Object.keys(t).forEach(function(r){if(Y2i.indexOf(r)===-1){throw new fWt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}});this.tag=e;this.kind=t["kind"]||null;this.resolve=t["resolve"]||function(){return true};this.construct=t["construct"]||function(r){return r};this.instanceOf=t["instanceOf"]||null;this.predicate=t["predicate"]||null;this.represent=t["represent"]||null;this.defaultStyle=t["defaultStyle"]||null;this.styleAliases=J2i(t["styleAliases"]||null);if(X2i.indexOf(this.kind)===-1){throw new fWt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}a(Q2i,"Type");mWt.exports=Q2i});var _w=y((DKs,gWt)=>{"use strict";var hWt=yw();var vne=t3();var Z2i=iu();function g8e(e,t,r){var n=[];e.include.forEach(function(i){r=g8e(i,t,r)});e[t].forEach(function(i){r.forEach(function(s,o){if(s.tag===i.tag&&s.kind===i.kind){n.push(o)}});r.push(i)});return r.filter(function(i,s){return n.indexOf(s)===-1})}a(g8e,"compileList");function eSi(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,r;function n(i){e[i.kind][i.tag]=e["fallback"][i.tag]=i}a(n,"collectType");for(t=0,r=arguments.length;t<r;t+=1){arguments[t].forEach(n)}return e}a(eSi,"compileMap");function r3(e){this.include=e.include||[];this.implicit=e.implicit||[];this.explicit=e.explicit||[];this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar"){throw new vne("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}});this.compiledImplicit=g8e(this,"implicit",[]);this.compiledExplicit=g8e(this,"explicit",[]);this.compiledTypeMap=eSi(this.compiledImplicit,this.compiledExplicit)}a(r3,"Schema");r3.DEFAULT=null;r3.create=a(function e(){var t,r;switch(arguments.length){case 1:t=r3.DEFAULT;r=arguments[0];break;case 2:t=arguments[0];r=arguments[1];break;default:throw new vne("Wrong number of arguments for Schema.create function")}t=hWt.toArray(t);r=hWt.toArray(r);if(!t.every(function(n){return n instanceof r3})){throw new vne("Specified list of super schemas (or a single Schema object) contains a non-Schema object.")}if(!r.every(function(n){return n instanceof Z2i})){throw new vne("Specified list of YAML types (or a single Type object) contains a non-Type object.")}return new r3({include:t,explicit:r})},"createSchema");gWt.exports=r3});var _Wt=y((FKs,yWt)=>{"use strict";var tSi=iu();yWt.exports=new tSi("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var EWt=y((BKs,vWt)=>{"use strict";var rSi=iu();vWt.exports=new rSi("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var SWt=y((MKs,bWt)=>{"use strict";var nSi=iu();bWt.exports=new nSi("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var Ene=y((qKs,AWt)=>{"use strict";var iSi=_w();AWt.exports=new iSi({explicit:[_Wt(),EWt(),SWt()]})});var wWt=y((UKs,CWt)=>{"use strict";var sSi=iu();function aSi(e){if(e===null)return true;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}a(aSi,"resolveYamlNull");function oSi(){return null}a(oSi,"constructYamlNull");function uSi(e){return e===null}a(uSi,"isNull");CWt.exports=new sSi("tag:yaml.org,2002:null",{kind:"scalar",resolve:aSi,construct:oSi,predicate:uSi,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var xWt=y((jKs,TWt)=>{"use strict";var lSi=iu();function cSi(e){if(e===null)return false;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}a(cSi,"resolveYamlBoolean");function dSi(e){return e==="true"||e==="True"||e==="TRUE"}a(dSi,"constructYamlBoolean");function pSi(e){return Object.prototype.toString.call(e)==="[object Boolean]"}a(pSi,"isBoolean");TWt.exports=new lSi("tag:yaml.org,2002:bool",{kind:"scalar",resolve:cSi,construct:dSi,predicate:pSi,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var OWt=y((HKs,RWt)=>{"use strict";var fSi=yw();var mSi=iu();function hSi(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}a(hSi,"isHexCode");function gSi(e){return 48<=e&&e<=55}a(gSi,"isOctCode");function ySi(e){return 48<=e&&e<=57}a(ySi,"isDecCode");function _Si(e){if(e===null)return false;var t=e.length,r=0,n=false,i;if(!t)return false;i=e[r];if(i==="-"||i==="+"){i=e[++r]}if(i==="0"){if(r+1===t)return true;i=e[++r];if(i==="b"){r++;for(;r<t;r++){i=e[r];if(i==="_")continue;if(i!=="0"&&i!=="1")return false;n=true}return n&&i!=="_"}if(i==="x"){r++;for(;r<t;r++){i=e[r];if(i==="_")continue;if(!hSi(e.charCodeAt(r)))return false;n=true}return n&&i!=="_"}for(;r<t;r++){i=e[r];if(i==="_")continue;if(!gSi(e.charCodeAt(r)))return false;n=true}return n&&i!=="_"}if(i==="_")return false;for(;r<t;r++){i=e[r];if(i==="_")continue;if(i===":")break;if(!ySi(e.charCodeAt(r))){return false}n=true}if(!n||i==="_")return false;if(i!==":")return true;return/^(:[0-5]?[0-9])+$/.test(e.slice(r))}a(_Si,"resolveYamlInteger");function vSi(e){var t=e,r=1,n,i,s=[];if(t.indexOf("_")!==-1){t=t.replace(/_/g,"")}n=t[0];if(n==="-"||n==="+"){if(n==="-")r=-1;t=t.slice(1);n=t[0]}if(t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t,16);return r*parseInt(t,8)}if(t.indexOf(":")!==-1){t.split(":").forEach(function(o){s.unshift(parseInt(o,10))});t=0;i=1;s.forEach(function(o){t+=o*i;i*=60});return r*t}return r*parseInt(t,10)}a(vSi,"constructYamlInteger");function ESi(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1===0&&!fSi.isNegativeZero(e))}a(ESi,"isInteger");RWt.exports=new mSi("tag:yaml.org,2002:int",{kind:"scalar",resolve:_Si,construct:vSi,predicate:ESi,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var IWt=y((zKs,NWt)=>{"use strict";var PWt=yw();var bSi=iu();var SSi=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ASi(e){if(e===null)return false;if(!SSi.test(e)||e[e.length-1]==="_"){return false}return true}a(ASi,"resolveYamlFloat");function CSi(e){var t,r,n,i;t=e.replace(/_/g,"").toLowerCase();r=t[0]==="-"?-1:1;i=[];if("+-".indexOf(t[0])>=0){t=t.slice(1)}if(t===".inf"){return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(t===".nan"){return NaN}else if(t.indexOf(":")>=0){t.split(":").forEach(function(s){i.unshift(parseFloat(s,10))});t=0;n=1;i.forEach(function(s){t+=s*n;n*=60});return r*t}return r*parseFloat(t,10)}a(CSi,"constructYamlFloat");var wSi=/^[-+]?[0-9]+e/;function TSi(e,t){var r;if(isNaN(e)){switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(PWt.isNegativeZero(e)){return"-0.0"}r=e.toString(10);return wSi.test(r)?r.replace("e",".e"):r}a(TSi,"representYamlFloat");function xSi(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||PWt.isNegativeZero(e))}a(xSi,"isFloat");NWt.exports=new bSi("tag:yaml.org,2002:float",{kind:"scalar",resolve:ASi,construct:CSi,predicate:xSi,represent:TSi,defaultStyle:"lowercase"})});var y8e=y((WKs,kWt)=>{"use strict";var RSi=_w();kWt.exports=new RSi({include:[Ene()],implicit:[wWt(),xWt(),OWt(),IWt()]})});var _8e=y((YKs,DWt)=>{"use strict";var OSi=_w();DWt.exports=new OSi({include:[y8e()]})});var MWt=y((XKs,BWt)=>{"use strict";var PSi=iu();var LWt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");var FWt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function NSi(e){if(e===null)return false;if(LWt.exec(e)!==null)return true;if(FWt.exec(e)!==null)return true;return false}a(NSi,"resolveYamlTimestamp");function ISi(e){var t,r,n,i,s,o,u,l=0,c=null,d,p,f;t=LWt.exec(e);if(t===null)t=FWt.exec(e);if(t===null)throw new Error("Date resolve error");r=+t[1];n=+t[2]-1;i=+t[3];if(!t[4]){return new Date(Date.UTC(r,n,i))}s=+t[4];o=+t[5];u=+t[6];if(t[7]){l=t[7].slice(0,3);while(l.length<3){l+="0"}l=+l}if(t[9]){d=+t[10];p=+(t[11]||0);c=(d*60+p)*6e4;if(t[9]==="-")c=-c}f=new Date(Date.UTC(r,n,i,s,o,u,l));if(c)f.setTime(f.getTime()-c);return f}a(ISi,"constructYamlTimestamp");function kSi(e){return e.toISOString()}a(kSi,"representYamlTimestamp");BWt.exports=new PSi("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:NSi,construct:ISi,instanceOf:Date,represent:kSi})});var UWt=y((QKs,qWt)=>{"use strict";var DSi=iu();function LSi(e){return e==="<<"||e===null}a(LSi,"resolveYamlMerge");qWt.exports=new DSi("tag:yaml.org,2002:merge",{kind:"scalar",resolve:LSi})});var GWt=y((eWs,jWt)=>{"use strict";var vw;try{$Wt=require;vw=$Wt("buffer").Buffer}catch(e){}var $Wt;var FSi=iu();var v8e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function BSi(e){if(e===null)return false;var t,r,n=0,i=e.length,s=v8e;for(r=0;r<i;r++){t=s.indexOf(e.charAt(r));if(t>64)continue;if(t<0)return false;n+=6}return n%8===0}a(BSi,"resolveYamlBinary");function MSi(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,s=v8e,o=0,u=[];for(t=0;t<i;t++){if(t%4===0&&t){u.push(o>>16&255);u.push(o>>8&255);u.push(o&255)}o=o<<6|s.indexOf(n.charAt(t))}r=i%4*6;if(r===0){u.push(o>>16&255);u.push(o>>8&255);u.push(o&255)}else if(r===18){u.push(o>>10&255);u.push(o>>2&255)}else if(r===12){u.push(o>>4&255)}if(vw){return vw.from?vw.from(u):new vw(u)}return u}a(MSi,"constructYamlBinary");function qSi(e){var t="",r=0,n,i,s=e.length,o=v8e;for(n=0;n<s;n++){if(n%3===0&&n){t+=o[r>>18&63];t+=o[r>>12&63];t+=o[r>>6&63];t+=o[r&63]}r=(r<<8)+e[n]}i=s%3;if(i===0){t+=o[r>>18&63];t+=o[r>>12&63];t+=o[r>>6&63];t+=o[r&63]}else if(i===2){t+=o[r>>10&63];t+=o[r>>4&63];t+=o[r<<2&63];t+=o[64]}else if(i===1){t+=o[r>>2&63];t+=o[r<<4&63];t+=o[64];t+=o[64]}return t}a(qSi,"representYamlBinary");function USi(e){return vw&&vw.isBuffer(e)}a(USi,"isBinary");jWt.exports=new FSi("tag:yaml.org,2002:binary",{kind:"scalar",resolve:BSi,construct:MSi,predicate:USi,represent:qSi})});var VWt=y((rWs,HWt)=>{"use strict";var $Si=iu();var jSi=Object.prototype.hasOwnProperty;var GSi=Object.prototype.toString;function HSi(e){if(e===null)return true;var t=[],r,n,i,s,o,u=e;for(r=0,n=u.length;r<n;r+=1){i=u[r];o=false;if(GSi.call(i)!=="[object Object]")return false;for(s in i){if(jSi.call(i,s)){if(!o)o=true;else return false}}if(!o)return false;if(t.indexOf(s)===-1)t.push(s);else return false}return true}a(HSi,"resolveYamlOmap");function VSi(e){return e!==null?e:[]}a(VSi,"constructYamlOmap");HWt.exports=new $Si("tag:yaml.org,2002:omap",{kind:"sequence",resolve:HSi,construct:VSi})});var KWt=y((iWs,zWt)=>{"use strict";var zSi=iu();var KSi=Object.prototype.toString;function WSi(e){if(e===null)return true;var t,r,n,i,s,o=e;s=new Array(o.length);for(t=0,r=o.length;t<r;t+=1){n=o[t];if(KSi.call(n)!=="[object Object]")return false;i=Object.keys(n);if(i.length!==1)return false;s[t]=[i[0],n[i[0]]]}return true}a(WSi,"resolveYamlPairs");function YSi(e){if(e===null)return[];var t,r,n,i,s,o=e;s=new Array(o.length);for(t=0,r=o.length;t<r;t+=1){n=o[t];i=Object.keys(n);s[t]=[i[0],n[i[0]]]}return s}a(YSi,"constructYamlPairs");zWt.exports=new zSi("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:WSi,construct:YSi})});var YWt=y((aWs,WWt)=>{"use strict";var XSi=iu();var JSi=Object.prototype.hasOwnProperty;function QSi(e){if(e===null)return true;var t,r=e;for(t in r){if(JSi.call(r,t)){if(r[t]!==null)return false}}return true}a(QSi,"resolveYamlSet");function ZSi(e){return e!==null?e:{}}a(ZSi,"constructYamlSet");WWt.exports=new XSi("tag:yaml.org,2002:set",{kind:"mapping",resolve:QSi,construct:ZSi})});var n3=y((uWs,XWt)=>{"use strict";var eAi=_w();XWt.exports=new eAi({include:[_8e()],implicit:[MWt(),UWt()],explicit:[GWt(),VWt(),KWt(),YWt()]})});var QWt=y((lWs,JWt)=>{"use strict";var tAi=iu();function rAi(){return true}a(rAi,"resolveJavascriptUndefined");function nAi(){return void 0}a(nAi,"constructJavascriptUndefined");function iAi(){return""}a(iAi,"representJavascriptUndefined");function sAi(e){return typeof e==="undefined"}a(sAi,"isUndefined");JWt.exports=new tAi("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:rAi,construct:nAi,predicate:sAi,represent:iAi})});var eYt=y((dWs,ZWt)=>{"use strict";var aAi=iu();function oAi(e){if(e===null)return false;if(e.length===0)return false;var t=e,r=/\/([gim]*)$/.exec(e),n="";if(t[0]==="/"){if(r)n=r[1];if(n.length>3)return false;if(t[t.length-n.length-1]!=="/")return false}return true}a(oAi,"resolveJavascriptRegExp");function uAi(e){var t=e,r=/\/([gim]*)$/.exec(e),n="";if(t[0]==="/"){if(r)n=r[1];t=t.slice(1,t.length-n.length-1)}return new RegExp(t,n)}a(uAi,"constructJavascriptRegExp");function lAi(e){var t="/"+e.source+"/";if(e.global)t+="g";if(e.multiline)t+="m";if(e.ignoreCase)t+="i";return t}a(lAi,"representJavascriptRegExp");function cAi(e){return Object.prototype.toString.call(e)==="[object RegExp]"}a(cAi,"isRegExp");ZWt.exports=new aAi("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:oAi,construct:uAi,predicate:cAi,represent:lAi})});var nYt=y((fWs,rYt)=>{"use strict";var bne;try{tYt=require;bne=tYt("esprima")}catch(e){if(typeof window!=="undefined")bne=window.esprima}var tYt;var dAi=iu();function pAi(e){if(e===null)return false;try{var t="("+e+")",r=bne.parse(t,{range:true});if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(n){return false}}a(pAi,"resolveJavascriptFunction");function fAi(e){var t="("+e+")",r=bne.parse(t,{range:true}),n=[],i;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}r.body[0].expression.params.forEach(function(s){n.push(s.name)});i=r.body[0].expression.body.range;if(r.body[0].expression.body.type==="BlockStatement"){return new Function(n,t.slice(i[0]+1,i[1]-1))}return new Function(n,"return "+t.slice(i[0],i[1]))}a(fAi,"constructJavascriptFunction");function mAi(e){return e.toString()}a(mAi,"representJavascriptFunction");function hAi(e){return Object.prototype.toString.call(e)==="[object Function]"}a(hAi,"isFunction");rYt.exports=new dAi("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:pAi,construct:fAi,predicate:hAi,represent:mAi})});var _q=y((hWs,sYt)=>{"use strict";var iYt=_w();sYt.exports=iYt.DEFAULT=new iYt({include:[n3()],explicit:[QWt(),eYt(),nYt()]})});var CYt=y((gWs,vq)=>{"use strict";var Qy=yw();var pYt=t3();var gAi=pWt();var fYt=n3();var yAi=_q();var Xb=Object.prototype.hasOwnProperty;var Sne=1;var mYt=2;var hYt=3;var Ane=4;var E8e=1;var _Ai=2;var aYt=3;var vAi=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var EAi=/[\x85\u2028\u2029]/;var bAi=/[,\[\]\{\}]/;var gYt=/^(?:!|!!|![a-z\-]+!)$/i;var yYt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function oYt(e){return Object.prototype.toString.call(e)}a(oYt,"_class");function Ng(e){return e===10||e===13}a(Ng,"is_EOL");function bw(e){return e===9||e===32}a(bw,"is_WHITE_SPACE");function jd(e){return e===9||e===32||e===10||e===13}a(jd,"is_WS_OR_EOL");function i3(e){return e===44||e===91||e===93||e===123||e===125}a(i3,"is_FLOW_INDICATOR");function SAi(e){var t;if(48<=e&&e<=57){return e-48}t=e|32;if(97<=t&&t<=102){return t-97+10}return-1}a(SAi,"fromHexCode");function AAi(e){if(e===120){return 2}if(e===117){return 4}if(e===85){return 8}return 0}a(AAi,"escapedHexLen");function CAi(e){if(48<=e&&e<=57){return e-48}return-1}a(CAi,"fromDecimalCode");function uYt(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116?" ":e===9?" ":e===110?"\n":e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}a(uYt,"simpleEscapeSequence");function wAi(e){if(e<=65535){return String.fromCharCode(e)}return String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}a(wAi,"charFromCodepoint");var _Yt=new Array(256);var vYt=new Array(256);for(Ew=0;Ew<256;Ew++){_Yt[Ew]=uYt(Ew)?1:0;vYt[Ew]=uYt(Ew)}var Ew;function TAi(e,t){this.input=e;this.filename=t["filename"]||null;this.schema=t["schema"]||yAi;this.onWarning=t["onWarning"]||null;this.legacy=t["legacy"]||false;this.json=t["json"]||false;this.listener=t["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}a(TAi,"State");function EYt(e,t){return new pYt(t,new gAi(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}a(EYt,"generateError");function Br(e,t){throw EYt(e,t)}a(Br,"throwError");function Cne(e,t){if(e.onWarning){e.onWarning.call(null,EYt(e,t))}}a(Cne,"throwWarning");var lYt={YAML:a(function e(t,r,n){var i,s,o;if(t.version!==null){Br(t,"duplication of %YAML directive")}if(n.length!==1){Br(t,"YAML directive accepts exactly one argument")}i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]);if(i===null){Br(t,"ill-formed argument of the YAML directive")}s=parseInt(i[1],10);o=parseInt(i[2],10);if(s!==1){Br(t,"unacceptable YAML version of the document")}t.version=n[0];t.checkLineBreaks=o<2;if(o!==1&&o!==2){Cne(t,"unsupported YAML version of the document")}},"handleYamlDirective"),TAG:a(function e(t,r,n){var i,s;if(n.length!==2){Br(t,"TAG directive accepts exactly two arguments")}i=n[0];s=n[1];if(!gYt.test(i)){Br(t,"ill-formed tag handle (first argument) of the TAG directive")}if(Xb.call(t.tagMap,i)){Br(t,'there is a previously declared suffix for "'+i+'" tag handle')}if(!yYt.test(s)){Br(t,"ill-formed tag prefix (second argument) of the TAG directive")}t.tagMap[i]=s},"handleTagDirective")};function Yb(e,t,r,n){var i,s,o,u;if(t<r){u=e.input.slice(t,r);if(n){for(i=0,s=u.length;i<s;i+=1){o=u.charCodeAt(i);if(!(o===9||32<=o&&o<=1114111)){Br(e,"expected valid JSON character")}}}else if(vAi.test(u)){Br(e,"the stream contains non-printable characters")}e.result+=u}}a(Yb,"captureSegment");function cYt(e,t,r,n){var i,s,o,u;if(!Qy.isObject(r)){Br(e,"cannot merge mappings; the provided source object is unacceptable")}i=Object.keys(r);for(o=0,u=i.length;o<u;o+=1){s=i[o];if(!Xb.call(t,s)){t[s]=r[s];n[s]=true}}}a(cYt,"mergeMappings");function s3(e,t,r,n,i,s,o,u){var l,c;if(Array.isArray(i)){i=Array.prototype.slice.call(i);for(l=0,c=i.length;l<c;l+=1){if(Array.isArray(i[l])){Br(e,"nested arrays are not supported inside keys")}if(typeof i==="object"&&oYt(i[l])==="[object Object]"){i[l]="[object Object]"}}}if(typeof i==="object"&&oYt(i)==="[object Object]"){i="[object Object]"}i=String(i);if(t===null){t={}}if(n==="tag:yaml.org,2002:merge"){if(Array.isArray(s)){for(l=0,c=s.length;l<c;l+=1){cYt(e,t,s[l],r)}}else{cYt(e,t,s,r)}}else{if(!e.json&&!Xb.call(r,i)&&Xb.call(t,i)){e.line=o||e.line;e.position=u||e.position;Br(e,"duplicated mapping key")}t[i]=s;delete r[i]}return t}a(s3,"storeMappingPair");function b8e(e){var t;t=e.input.charCodeAt(e.position);if(t===10){e.position++}else if(t===13){e.position++;if(e.input.charCodeAt(e.position)===10){e.position++}}else{Br(e,"a line break is expected")}e.line+=1;e.lineStart=e.position}a(b8e,"readLineBreak");function Ko(e,t,r){var n=0,i=e.input.charCodeAt(e.position);while(i!==0){while(bw(i)){i=e.input.charCodeAt(++e.position)}if(t&&i===35){do{i=e.input.charCodeAt(++e.position)}while(i!==10&&i!==13&&i!==0)}if(Ng(i)){b8e(e);i=e.input.charCodeAt(e.position);n++;e.lineIndent=0;while(i===32){e.lineIndent++;i=e.input.charCodeAt(++e.position)}}else{break}}if(r!==-1&&n!==0&&e.lineIndent<r){Cne(e,"deficient indentation")}return n}a(Ko,"skipSeparationSpace");function wne(e){var t=e.position,r;r=e.input.charCodeAt(t);if((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)){t+=3;r=e.input.charCodeAt(t);if(r===0||jd(r)){return true}}return false}a(wne,"testDocumentSeparator");function S8e(e,t){if(t===1){e.result+=" "}else if(t>1){e.result+=Qy.repeat("\n",t-1)}}a(S8e,"writeFoldedLines");function xAi(e,t,r){var n,i,s,o,u,l,c,d,p=e.kind,f=e.result,m;m=e.input.charCodeAt(e.position);if(jd(m)||i3(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96){return false}if(m===63||m===45){i=e.input.charCodeAt(e.position+1);if(jd(i)||r&&i3(i)){return false}}e.kind="scalar";e.result="";s=o=e.position;u=false;while(m!==0){if(m===58){i=e.input.charCodeAt(e.position+1);if(jd(i)||r&&i3(i)){break}}else if(m===35){n=e.input.charCodeAt(e.position-1);if(jd(n)){break}}else if(e.position===e.lineStart&&wne(e)||r&&i3(m)){break}else if(Ng(m)){l=e.line;c=e.lineStart;d=e.lineIndent;Ko(e,false,-1);if(e.lineIndent>=t){u=true;m=e.input.charCodeAt(e.position);continue}else{e.position=o;e.line=l;e.lineStart=c;e.lineIndent=d;break}}if(u){Yb(e,s,o,false);S8e(e,e.line-l);s=o=e.position;u=false}if(!bw(m)){o=e.position+1}m=e.input.charCodeAt(++e.position)}Yb(e,s,o,false);if(e.result){return true}e.kind=p;e.result=f;return false}a(xAi,"readPlainScalar");function RAi(e,t){var r,n,i;r=e.input.charCodeAt(e.position);if(r!==39){return false}e.kind="scalar";e.result="";e.position++;n=i=e.position;while((r=e.input.charCodeAt(e.position))!==0){if(r===39){Yb(e,n,e.position,true);r=e.input.charCodeAt(++e.position);if(r===39){n=e.position;e.position++;i=e.position}else{return true}}else if(Ng(r)){Yb(e,n,i,true);S8e(e,Ko(e,false,t));n=i=e.position}else if(e.position===e.lineStart&&wne(e)){Br(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;i=e.position}}Br(e,"unexpected end of the stream within a single quoted scalar")}a(RAi,"readSingleQuotedScalar");function OAi(e,t){var r,n,i,s,o,u;u=e.input.charCodeAt(e.position);if(u!==34){return false}e.kind="scalar";e.result="";e.position++;r=n=e.position;while((u=e.input.charCodeAt(e.position))!==0){if(u===34){Yb(e,r,e.position,true);e.position++;return true}else if(u===92){Yb(e,r,e.position,true);u=e.input.charCodeAt(++e.position);if(Ng(u)){Ko(e,false,t)}else if(u<256&&_Yt[u]){e.result+=vYt[u];e.position++}else if((o=AAi(u))>0){i=o;s=0;for(;i>0;i--){u=e.input.charCodeAt(++e.position);if((o=SAi(u))>=0){s=(s<<4)+o}else{Br(e,"expected hexadecimal character")}}e.result+=wAi(s);e.position++}else{Br(e,"unknown escape sequence")}r=n=e.position}else if(Ng(u)){Yb(e,r,n,true);S8e(e,Ko(e,false,t));r=n=e.position}else if(e.position===e.lineStart&&wne(e)){Br(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;n=e.position}}Br(e,"unexpected end of the stream within a double quoted scalar")}a(OAi,"readDoubleQuotedScalar");function PAi(e,t){var r=true,n,i=e.tag,s,o=e.anchor,u,l,c,d,p,f={},m,h,g,_;_=e.input.charCodeAt(e.position);if(_===91){l=93;p=false;s=[]}else if(_===123){l=125;p=true;s={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=s}_=e.input.charCodeAt(++e.position);while(_!==0){Ko(e,true,t);_=e.input.charCodeAt(e.position);if(_===l){e.position++;e.tag=i;e.anchor=o;e.kind=p?"mapping":"sequence";e.result=s;return true}else if(!r){Br(e,"missed comma between flow collection entries")}h=m=g=null;c=d=false;if(_===63){u=e.input.charCodeAt(e.position+1);if(jd(u)){c=d=true;e.position++;Ko(e,true,t)}}n=e.line;a3(e,t,Sne,false,true);h=e.tag;m=e.result;Ko(e,true,t);_=e.input.charCodeAt(e.position);if((d||e.line===n)&&_===58){c=true;_=e.input.charCodeAt(++e.position);Ko(e,true,t);a3(e,t,Sne,false,true);g=e.result}if(p){s3(e,s,f,h,m,g)}else if(c){s.push(s3(e,null,f,h,m,g))}else{s.push(m)}Ko(e,true,t);_=e.input.charCodeAt(e.position);if(_===44){r=true;_=e.input.charCodeAt(++e.position)}else{r=false}}Br(e,"unexpected end of the stream within a flow collection")}a(PAi,"readFlowCollection");function NAi(e,t){var r,n,i=E8e,s=false,o=false,u=t,l=0,c=false,d,p;p=e.input.charCodeAt(e.position);if(p===124){n=false}else if(p===62){n=true}else{return false}e.kind="scalar";e.result="";while(p!==0){p=e.input.charCodeAt(++e.position);if(p===43||p===45){if(E8e===i){i=p===43?aYt:_Ai}else{Br(e,"repeat of a chomping mode identifier")}}else if((d=CAi(p))>=0){if(d===0){Br(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!o){u=t+d-1;o=true}else{Br(e,"repeat of an indentation width identifier")}}else{break}}if(bw(p)){do{p=e.input.charCodeAt(++e.position)}while(bw(p));if(p===35){do{p=e.input.charCodeAt(++e.position)}while(!Ng(p)&&p!==0)}}while(p!==0){b8e(e);e.lineIndent=0;p=e.input.charCodeAt(e.position);while((!o||e.lineIndent<u)&&p===32){e.lineIndent++;p=e.input.charCodeAt(++e.position)}if(!o&&e.lineIndent>u){u=e.lineIndent}if(Ng(p)){l++;continue}if(e.lineIndent<u){if(i===aYt){e.result+=Qy.repeat("\n",s?1+l:l)}else if(i===E8e){if(s){e.result+="\n"}}break}if(n){if(bw(p)){c=true;e.result+=Qy.repeat("\n",s?1+l:l)}else if(c){c=false;e.result+=Qy.repeat("\n",l+1)}else if(l===0){if(s){e.result+=" "}}else{e.result+=Qy.repeat("\n",l)}}else{e.result+=Qy.repeat("\n",s?1+l:l)}s=true;o=true;l=0;r=e.position;while(!Ng(p)&&p!==0){p=e.input.charCodeAt(++e.position)}Yb(e,r,e.position,false)}return true}a(NAi,"readBlockScalar");function dYt(e,t){var r,n=e.tag,i=e.anchor,s=[],o,u=false,l;if(e.anchor!==null){e.anchorMap[e.anchor]=s}l=e.input.charCodeAt(e.position);while(l!==0){if(l!==45){break}o=e.input.charCodeAt(e.position+1);if(!jd(o)){break}u=true;e.position++;if(Ko(e,true,-1)){if(e.lineIndent<=t){s.push(null);l=e.input.charCodeAt(e.position);continue}}r=e.line;a3(e,t,hYt,false,true);s.push(e.result);Ko(e,true,-1);l=e.input.charCodeAt(e.position);if((e.line===r||e.lineIndent>t)&&l!==0){Br(e,"bad indentation of a sequence entry")}else if(e.lineIndent<t){break}}if(u){e.tag=n;e.anchor=i;e.kind="sequence";e.result=s;return true}return false}a(dYt,"readBlockSequence");function IAi(e,t,r){var n,i,s,o,u=e.tag,l=e.anchor,c={},d={},p=null,f=null,m=null,h=false,g=false,_;if(e.anchor!==null){e.anchorMap[e.anchor]=c}_=e.input.charCodeAt(e.position);while(_!==0){n=e.input.charCodeAt(e.position+1);s=e.line;o=e.position;if((_===63||_===58)&&jd(n)){if(_===63){if(h){s3(e,c,d,p,f,null);p=f=m=null}g=true;h=true;i=true}else if(h){h=false;i=true}else{Br(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line")}e.position+=1;_=n}else if(a3(e,r,mYt,false,true)){if(e.line===s){_=e.input.charCodeAt(e.position);while(bw(_)){_=e.input.charCodeAt(++e.position)}if(_===58){_=e.input.charCodeAt(++e.position);if(!jd(_)){Br(e,"a whitespace character is expected after the key-value separator within a block mapping")}if(h){s3(e,c,d,p,f,null);p=f=m=null}g=true;h=false;i=false;p=e.tag;f=e.result}else if(g){Br(e,"can not read an implicit mapping pair; a colon is missed")}else{e.tag=u;e.anchor=l;return true}}else if(g){Br(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}else{e.tag=u;e.anchor=l;return true}}else{break}if(e.line===s||e.lineIndent>t){if(a3(e,t,Ane,true,i)){if(h){f=e.result}else{m=e.result}}if(!h){s3(e,c,d,p,f,m,s,o);p=f=m=null}Ko(e,true,-1);_=e.input.charCodeAt(e.position)}if(e.lineIndent>t&&_!==0){Br(e,"bad indentation of a mapping entry")}else if(e.lineIndent<t){break}}if(h){s3(e,c,d,p,f,null)}if(g){e.tag=u;e.anchor=l;e.kind="mapping";e.result=c}return g}a(IAi,"readBlockMapping");function kAi(e){var t,r=false,n=false,i,s,o;o=e.input.charCodeAt(e.position);if(o!==33)return false;if(e.tag!==null){Br(e,"duplication of a tag property")}o=e.input.charCodeAt(++e.position);if(o===60){r=true;o=e.input.charCodeAt(++e.position)}else if(o===33){n=true;i="!!";o=e.input.charCodeAt(++e.position)}else{i="!"}t=e.position;if(r){do{o=e.input.charCodeAt(++e.position)}while(o!==0&&o!==62);if(e.position<e.length){s=e.input.slice(t,e.position);o=e.input.charCodeAt(++e.position)}else{Br(e,"unexpected end of the stream within a verbatim tag")}}else{while(o!==0&&!jd(o)){if(o===33){if(!n){i=e.input.slice(t-1,e.position+1);if(!gYt.test(i)){Br(e,"named tag handle cannot contain such characters")}n=true;t=e.position+1}else{Br(e,"tag suffix cannot contain exclamation marks")}}o=e.input.charCodeAt(++e.position)}s=e.input.slice(t,e.position);if(bAi.test(s)){Br(e,"tag suffix cannot contain flow indicator characters")}}if(s&&!yYt.test(s)){Br(e,"tag name cannot contain such characters: "+s)}if(r){e.tag=s}else if(Xb.call(e.tagMap,i)){e.tag=e.tagMap[i]+s}else if(i==="!"){e.tag="!"+s}else if(i==="!!"){e.tag="tag:yaml.org,2002:"+s}else{Br(e,'undeclared tag handle "'+i+'"')}return true}a(kAi,"readTagProperty");function DAi(e){var t,r;r=e.input.charCodeAt(e.position);if(r!==38)return false;if(e.anchor!==null){Br(e,"duplication of an anchor property")}r=e.input.charCodeAt(++e.position);t=e.position;while(r!==0&&!jd(r)&&!i3(r)){r=e.input.charCodeAt(++e.position)}if(e.position===t){Br(e,"name of an anchor node must contain at least one character")}e.anchor=e.input.slice(t,e.position);return true}a(DAi,"readAnchorProperty");function LAi(e){var t,r,n;n=e.input.charCodeAt(e.position);if(n!==42)return false;n=e.input.charCodeAt(++e.position);t=e.position;while(n!==0&&!jd(n)&&!i3(n)){n=e.input.charCodeAt(++e.position)}if(e.position===t){Br(e,"name of an alias node must contain at least one character")}r=e.input.slice(t,e.position);if(!Xb.call(e.anchorMap,r)){Br(e,'unidentified alias "'+r+'"')}e.result=e.anchorMap[r];Ko(e,true,-1);return true}a(LAi,"readAlias");function a3(e,t,r,n,i){var s,o,u,l=1,c=false,d=false,p,f,m,h,g;if(e.listener!==null){e.listener("open",e)}e.tag=null;e.anchor=null;e.kind=null;e.result=null;s=o=u=Ane===r||hYt===r;if(n){if(Ko(e,true,-1)){c=true;if(e.lineIndent>t){l=1}else if(e.lineIndent===t){l=0}else if(e.lineIndent<t){l=-1}}}if(l===1){while(kAi(e)||DAi(e)){if(Ko(e,true,-1)){c=true;u=s;if(e.lineIndent>t){l=1}else if(e.lineIndent===t){l=0}else if(e.lineIndent<t){l=-1}}else{u=false}}}if(u){u=c||i}if(l===1||Ane===r){if(Sne===r||mYt===r){h=t}else{h=t+1}g=e.position-e.lineStart;if(l===1){if(u&&(dYt(e,g)||IAi(e,g,h))||PAi(e,h)){d=true}else{if(o&&NAi(e,h)||RAi(e,h)||OAi(e,h)){d=true}else if(LAi(e)){d=true;if(e.tag!==null||e.anchor!==null){Br(e,"alias node should not have any properties")}}else if(xAi(e,h,Sne===r)){d=true;if(e.tag===null){e.tag="?"}}if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}else if(l===0){d=u&&dYt(e,g)}}if(e.tag!==null&&e.tag!=="!"){if(e.tag==="?"){if(e.result!==null&&e.kind!=="scalar"){Br(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"')}for(p=0,f=e.implicitTypes.length;p<f;p+=1){m=e.implicitTypes[p];if(m.resolve(e.result)){e.result=m.construct(e.result);e.tag=m.tag;if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}break}}}else if(Xb.call(e.typeMap[e.kind||"fallback"],e.tag)){m=e.typeMap[e.kind||"fallback"][e.tag];if(e.result!==null&&m.kind!==e.kind){Br(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"')}if(!m.resolve(e.result)){Br(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=m.construct(e.result);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}else{Br(e,"unknown tag !<"+e.tag+">")}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||d}a(a3,"composeNode");function FAi(e){var t=e.position,r,n,i,s=false,o;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap={};e.anchorMap={};while((o=e.input.charCodeAt(e.position))!==0){Ko(e,true,-1);o=e.input.charCodeAt(e.position);if(e.lineIndent>0||o!==37){break}s=true;o=e.input.charCodeAt(++e.position);r=e.position;while(o!==0&&!jd(o)){o=e.input.charCodeAt(++e.position)}n=e.input.slice(r,e.position);i=[];if(n.length<1){Br(e,"directive name must not be less than one character in length")}while(o!==0){while(bw(o)){o=e.input.charCodeAt(++e.position)}if(o===35){do{o=e.input.charCodeAt(++e.position)}while(o!==0&&!Ng(o));break}if(Ng(o))break;r=e.position;while(o!==0&&!jd(o)){o=e.input.charCodeAt(++e.position)}i.push(e.input.slice(r,e.position))}if(o!==0)b8e(e);if(Xb.call(lYt,n)){lYt[n](e,n,i)}else{Cne(e,'unknown document directive "'+n+'"')}}Ko(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;Ko(e,true,-1)}else if(s){Br(e,"directives end mark is expected")}a3(e,e.lineIndent-1,Ane,false,true);Ko(e,true,-1);if(e.checkLineBreaks&&EAi.test(e.input.slice(t,e.position))){Cne(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&wne(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;Ko(e,true,-1)}return}if(e.position<e.length-1){Br(e,"end of the stream or a document separator is expected")}else{return}}a(FAi,"readDocument");function bYt(e,t){e=String(e);t=t||{};if(e.length!==0){if(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13){e+="\n"}if(e.charCodeAt(0)===65279){e=e.slice(1)}}var r=new TAi(e,t);var n=e.indexOf("\0");if(n!==-1){r.position=n;Br(r,"null byte is not allowed in input")}r.input+="\0";while(r.input.charCodeAt(r.position)===32){r.lineIndent+=1;r.position+=1}while(r.position<r.length-1){FAi(r)}return r.documents}a(bYt,"loadDocuments");function SYt(e,t,r){if(t!==null&&typeof t==="object"&&typeof r==="undefined"){r=t;t=null}var n=bYt(e,r);if(typeof t!=="function"){return n}for(var i=0,s=n.length;i<s;i+=1){t(n[i])}}a(SYt,"loadAll");function AYt(e,t){var r=bYt(e,t);if(r.length===0){return void 0}else if(r.length===1){return r[0]}throw new pYt("expected a single document in the stream, but found more")}a(AYt,"load");function BAi(e,t,r){if(typeof t==="object"&&t!==null&&typeof r==="undefined"){r=t;t=null}return SYt(e,t,Qy.extend({schema:fYt},r))}a(BAi,"safeLoadAll");function MAi(e,t){return AYt(e,Qy.extend({schema:fYt},t))}a(MAi,"safeLoad");vq.exports.loadAll=SYt;vq.exports.load=AYt;vq.exports.safeLoadAll=BAi;vq.exports.safeLoad=MAi});var KYt=y((_Ws,T8e)=>{"use strict";var bq=yw();var Sq=t3();var qAi=_q();var UAi=n3();var IYt=Object.prototype.toString;var kYt=Object.prototype.hasOwnProperty;var $Ai=9;var Eq=10;var jAi=13;var GAi=32;var HAi=33;var VAi=34;var DYt=35;var zAi=37;var KAi=38;var WAi=39;var YAi=42;var LYt=44;var XAi=45;var FYt=58;var JAi=61;var QAi=62;var ZAi=63;var eCi=64;var BYt=91;var MYt=93;var tCi=96;var qYt=123;var rCi=124;var UYt=125;var Kl={};Kl[0]="\\0";Kl[7]="\\a";Kl[8]="\\b";Kl[9]="\\t";Kl[10]="\\n";Kl[11]="\\v";Kl[12]="\\f";Kl[13]="\\r";Kl[27]="\\e";Kl[34]='\\"';Kl[92]="\\\\";Kl[133]="\\N";Kl[160]="\\_";Kl[8232]="\\L";Kl[8233]="\\P";var nCi=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function iCi(e,t){var r,n,i,s,o,u,l;if(t===null)return{};r={};n=Object.keys(t);for(i=0,s=n.length;i<s;i+=1){o=n[i];u=String(t[o]);if(o.slice(0,2)==="!!"){o="tag:yaml.org,2002:"+o.slice(2)}l=e.compiledTypeMap["fallback"][o];if(l&&kYt.call(l.styleAliases,u)){u=l.styleAliases[u]}r[o]=u}return r}a(iCi,"compileStyleMap");function wYt(e){var t,r,n;t=e.toString(16).toUpperCase();if(e<=255){r="x";n=2}else if(e<=65535){r="u";n=4}else if(e<=4294967295){r="U";n=8}else{throw new Sq("code point within a string may not be greater than 0xFFFFFFFF")}return"\\"+r+bq.repeat("0",n-t.length)+t}a(wYt,"encodeHex");function sCi(e){this.schema=e["schema"]||qAi;this.indent=Math.max(1,e["indent"]||2);this.noArrayIndent=e["noArrayIndent"]||false;this.skipInvalid=e["skipInvalid"]||false;this.flowLevel=bq.isNothing(e["flowLevel"])?-1:e["flowLevel"];this.styleMap=iCi(this.schema,e["styles"]||null);this.sortKeys=e["sortKeys"]||false;this.lineWidth=e["lineWidth"]||80;this.noRefs=e["noRefs"]||false;this.noCompatMode=e["noCompatMode"]||false;this.condenseFlow=e["condenseFlow"]||false;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}a(sCi,"State");function TYt(e,t){var r=bq.repeat(" ",t),n=0,i=-1,s="",o,u=e.length;while(n<u){i=e.indexOf("\n",n);if(i===-1){o=e.slice(n);n=u}else{o=e.slice(n,i+1);n=i+1}if(o.length&&o!=="\n")s+=r;s+=o}return s}a(TYt,"indentString");function A8e(e,t){return"\n"+bq.repeat(" ",e.indent*t)}a(A8e,"generateNextLine");function aCi(e,t){var r,n,i;for(r=0,n=e.implicitTypes.length;r<n;r+=1){i=e.implicitTypes[r];if(i.resolve(t)){return true}}return false}a(aCi,"testImplicitResolving");function w8e(e){return e===GAi||e===$Ai}a(w8e,"isWhitespace");function o3(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}a(o3,"isPrintable");function oCi(e){return o3(e)&&!w8e(e)&&e!==65279&&e!==jAi&&e!==Eq}a(oCi,"isNsChar");function xYt(e,t){return o3(e)&&e!==65279&&e!==LYt&&e!==BYt&&e!==MYt&&e!==qYt&&e!==UYt&&e!==FYt&&(e!==DYt||t&&oCi(t))}a(xYt,"isPlainSafe");function uCi(e){return o3(e)&&e!==65279&&!w8e(e)&&e!==XAi&&e!==ZAi&&e!==FYt&&e!==LYt&&e!==BYt&&e!==MYt&&e!==qYt&&e!==UYt&&e!==DYt&&e!==KAi&&e!==YAi&&e!==HAi&&e!==rCi&&e!==JAi&&e!==QAi&&e!==WAi&&e!==VAi&&e!==zAi&&e!==eCi&&e!==tCi}a(uCi,"isPlainSafeFirst");function $Yt(e){var t=/^\n* /;return t.test(e)}a($Yt,"needIndentIndicator");var jYt=1;var GYt=2;var HYt=3;var VYt=4;var Tne=5;function lCi(e,t,r,n,i){var s;var o,u;var l=false;var c=false;var d=n!==-1;var p=-1;var f=uCi(e.charCodeAt(0))&&!w8e(e.charCodeAt(e.length-1));if(t){for(s=0;s<e.length;s++){o=e.charCodeAt(s);if(!o3(o)){return Tne}u=s>0?e.charCodeAt(s-1):null;f=f&&xYt(o,u)}}else{for(s=0;s<e.length;s++){o=e.charCodeAt(s);if(o===Eq){l=true;if(d){c=c||s-p-1>n&&e[p+1]!==" ";p=s}}else if(!o3(o)){return Tne}u=s>0?e.charCodeAt(s-1):null;f=f&&xYt(o,u)}c=c||d&&(s-p-1>n&&e[p+1]!==" ")}if(!l&&!c){return f&&!i(e)?jYt:GYt}if(r>9&&$Yt(e)){return Tne}return c?VYt:HYt}a(lCi,"chooseScalarStyle");function cCi(e,t,r,n){e.dump=function(){if(t.length===0){return"''"}if(!e.noCompatMode&&nCi.indexOf(t)!==-1){return"'"+t+"'"}var i=e.indent*Math.max(1,r);var s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i);var o=n||e.flowLevel>-1&&r>=e.flowLevel;function u(l){return aCi(e,l)}a(u,"testAmbiguity");switch(lCi(t,o,e.indent,s,u)){case jYt:return t;case GYt:return"'"+t.replace(/'/g,"''")+"'";case HYt:return"|"+RYt(t,e.indent)+OYt(TYt(t,i));case VYt:return">"+RYt(t,e.indent)+OYt(TYt(dCi(t,s),i));case Tne:return'"'+pCi(t,s)+'"';default:throw new Sq("impossible error: invalid scalar style")}}()}a(cCi,"writeScalar");function RYt(e,t){var r=$Yt(e)?String(t):"";var n=e[e.length-1]==="\n";var i=n&&(e[e.length-2]==="\n"||e==="\n");var s=i?"+":n?"":"-";return r+s+"\n"}a(RYt,"blockHeader");function OYt(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}a(OYt,"dropEndingNewline");function dCi(e,t){var r=/(\n+)([^\n]*)/g;var n=function(){var c=e.indexOf("\n");c=c!==-1?c:e.length;r.lastIndex=c;return PYt(e.slice(0,c),t)}();var i=e[0]==="\n"||e[0]===" ";var s;var o;while(o=r.exec(e)){var u=o[1],l=o[2];s=l[0]===" ";n+=u+(!i&&!s&&l!==""?"\n":"")+PYt(l,t);i=s}return n}a(dCi,"foldString");function PYt(e,t){if(e===""||e[0]===" ")return e;var r=/ [^ ]/g;var n;var i=0,s,o=0,u=0;var l="";while(n=r.exec(e)){u=n.index;if(u-i>t){s=o>i?o:u;l+="\n"+e.slice(i,s);i=s+1}o=u}l+="\n";if(e.length-i>t&&o>i){l+=e.slice(i,o)+"\n"+e.slice(o+1)}else{l+=e.slice(i)}return l.slice(1)}a(PYt,"foldLine");function pCi(e){var t="";var r,n;var i;for(var s=0;s<e.length;s++){r=e.charCodeAt(s);if(r>=55296&&r<=56319){n=e.charCodeAt(s+1);if(n>=56320&&n<=57343){t+=wYt((r-55296)*1024+n-56320+65536);s++;continue}}i=Kl[r];t+=!i&&o3(r)?e[s]:i||wYt(r)}return t}a(pCi,"escapeString");function fCi(e,t,r){var n="",i=e.tag,s,o;for(s=0,o=r.length;s<o;s+=1){if(Sw(e,t,r[s],false,false)){if(s!==0)n+=","+(!e.condenseFlow?" ":"");n+=e.dump}}e.tag=i;e.dump="["+n+"]"}a(fCi,"writeFlowSequence");function mCi(e,t,r,n){var i="",s=e.tag,o,u;for(o=0,u=r.length;o<u;o+=1){if(Sw(e,t+1,r[o],true,true)){if(!n||o!==0){i+=A8e(e,t)}if(e.dump&&Eq===e.dump.charCodeAt(0)){i+="-"}else{i+="- "}i+=e.dump}}e.tag=s;e.dump=i||"[]"}a(mCi,"writeBlockSequence");function hCi(e,t,r){var n="",i=e.tag,s=Object.keys(r),o,u,l,c,d;for(o=0,u=s.length;o<u;o+=1){d="";if(o!==0)d+=", ";if(e.condenseFlow)d+='"';l=s[o];c=r[l];if(!Sw(e,t,l,false,false)){continue}if(e.dump.length>1024)d+="? ";d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!Sw(e,t,c,false,false)){continue}d+=e.dump;n+=d}e.tag=i;e.dump="{"+n+"}"}a(hCi,"writeFlowMapping");function gCi(e,t,r,n){var i="",s=e.tag,o=Object.keys(r),u,l,c,d,p,f;if(e.sortKeys===true){o.sort()}else if(typeof e.sortKeys==="function"){o.sort(e.sortKeys)}else if(e.sortKeys){throw new Sq("sortKeys must be a boolean or a function")}for(u=0,l=o.length;u<l;u+=1){f="";if(!n||u!==0){f+=A8e(e,t)}c=o[u];d=r[c];if(!Sw(e,t+1,c,true,true,true)){continue}p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024;if(p){if(e.dump&&Eq===e.dump.charCodeAt(0)){f+="?"}else{f+="? "}}f+=e.dump;if(p){f+=A8e(e,t)}if(!Sw(e,t+1,d,true,p)){continue}if(e.dump&&Eq===e.dump.charCodeAt(0)){f+=":"}else{f+=": "}f+=e.dump;i+=f}e.tag=s;e.dump=i||"{}"}a(gCi,"writeBlockMapping");function NYt(e,t,r){var n,i,s,o,u,l;i=r?e.explicitTypes:e.implicitTypes;for(s=0,o=i.length;s<o;s+=1){u=i[s];if((u.instanceOf||u.predicate)&&(!u.instanceOf||typeof t==="object"&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){e.tag=r?u.tag:"?";if(u.represent){l=e.styleMap[u.tag]||u.defaultStyle;if(IYt.call(u.represent)==="[object Function]"){n=u.represent(t,l)}else if(kYt.call(u.represent,l)){n=u.represent[l](t,l)}else{throw new Sq("!<"+u.tag+'> tag resolver accepts not "'+l+'" style')}e.dump=n}return true}}return false}a(NYt,"detectType");function Sw(e,t,r,n,i,s){e.tag=null;e.dump=r;if(!NYt(e,r,false)){NYt(e,r,true)}var o=IYt.call(e.dump);if(n){n=e.flowLevel<0||e.flowLevel>t}var u=o==="[object Object]"||o==="[object Array]",l,c;if(u){l=e.duplicates.indexOf(r);c=l!==-1}if(e.tag!==null&&e.tag!=="?"||c||e.indent!==2&&t>0){i=false}if(c&&e.usedDuplicates[l]){e.dump="*ref_"+l}else{if(u&&c&&!e.usedDuplicates[l]){e.usedDuplicates[l]=true}if(o==="[object Object]"){if(n&&Object.keys(e.dump).length!==0){gCi(e,t,e.dump,i);if(c){e.dump="&ref_"+l+e.dump}}else{hCi(e,t,e.dump);if(c){e.dump="&ref_"+l+" "+e.dump}}}else if(o==="[object Array]"){var d=e.noArrayIndent&&t>0?t-1:t;if(n&&e.dump.length!==0){mCi(e,d,e.dump,i);if(c){e.dump="&ref_"+l+e.dump}}else{fCi(e,d,e.dump);if(c){e.dump="&ref_"+l+" "+e.dump}}}else if(o==="[object String]"){if(e.tag!=="?"){cCi(e,e.dump,t,s)}}else{if(e.skipInvalid)return false;throw new Sq("unacceptable kind of an object to dump "+o)}if(e.tag!==null&&e.tag!=="?"){e.dump="!<"+e.tag+"> "+e.dump}}return true}a(Sw,"writeNode");function yCi(e,t){var r=[],n=[],i,s;C8e(e,r,n);for(i=0,s=n.length;i<s;i+=1){t.duplicates.push(r[n[i]])}t.usedDuplicates=new Array(s)}a(yCi,"getDuplicateReferences");function C8e(e,t,r){var n,i,s;if(e!==null&&typeof e==="object"){i=t.indexOf(e);if(i!==-1){if(r.indexOf(i)===-1){r.push(i)}}else{t.push(e);if(Array.isArray(e)){for(i=0,s=e.length;i<s;i+=1){C8e(e[i],t,r)}}else{n=Object.keys(e);for(i=0,s=n.length;i<s;i+=1){C8e(e[n[i]],t,r)}}}}}a(C8e,"inspectNode");function zYt(e,t){t=t||{};var r=new sCi(t);if(!r.noRefs)yCi(e,r);if(Sw(r,0,e,true,true))return r.dump+"\n";return""}a(zYt,"dump");function _Ci(e,t){return zYt(e,bq.extend({schema:UAi},t))}a(_Ci,"safeDump");T8e.exports.dump=zYt;T8e.exports.safeDump=_Ci});var YYt=y((EWs,lo)=>{"use strict";var xne=CYt();var WYt=KYt();function Rne(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}a(Rne,"deprecated");lo.exports.Type=iu();lo.exports.Schema=_w();lo.exports.FAILSAFE_SCHEMA=Ene();lo.exports.JSON_SCHEMA=y8e();lo.exports.CORE_SCHEMA=_8e();lo.exports.DEFAULT_SAFE_SCHEMA=n3();lo.exports.DEFAULT_FULL_SCHEMA=_q();lo.exports.load=xne.load;lo.exports.loadAll=xne.loadAll;lo.exports.safeLoad=xne.safeLoad;lo.exports.safeLoadAll=xne.safeLoadAll;lo.exports.dump=WYt.dump;lo.exports.safeDump=WYt.safeDump;lo.exports.YAMLException=t3();lo.exports.MINIMAL_SCHEMA=Ene();lo.exports.SAFE_SCHEMA=n3();lo.exports.DEFAULT_SCHEMA=_q();lo.exports.scan=Rne("scan");lo.exports.parse=Rne("parse");lo.exports.compose=Rne("compose");lo.exports.addConstructor=Rne("addConstructor")});var JYt=y((SWs,XYt)=>{"use strict";var vCi=YYt();XYt.exports=vCi});var eXt=y((AWs,x8e)=>{var QYt=JYt();var ECi="\\ufeff?";var bCi=typeof process!=="undefined"?process.platform:"";var SCi="^("+ECi+"(= yaml =|---)$([\\s\\S]*?)^(?:\\2|\\.\\.\\.)\\s*$"+(bCi==="win32"?"\\r?":"")+"(?:\\n)?)";var ZYt=new RegExp(SCi,"m");x8e.exports=ACi;x8e.exports.test=TCi;function ACi(e,t){e=e||"";var r={allowUnsafe:false};t=t instanceof Object?{...r,...t}:r;t.allowUnsafe=Boolean(t.allowUnsafe);var n=e.split(/(\r?\n)/);if(n[0]&&/= yaml =|---/.test(n[0])){return wCi(e,t.allowUnsafe)}else{return{attributes:{},body:e,bodyBegin:1}}}a(ACi,"extractor");function CCi(e,t){var r=1;var n=t.indexOf("\n");var i=e.index+e[0].length;while(n!==-1){if(n>=i){return r}r++;n=t.indexOf("\n",n+1)}return r}a(CCi,"computeLocation");function wCi(e,t){var r=ZYt.exec(e);if(!r){return{attributes:{},body:e,bodyBegin:1}}var n=t?QYt.load:QYt.safeLoad;var i=r[r.length-1].replace(/^\s+|\s+$/g,"");var s=n(i)||{};var o=e.replace(r[0],"");var u=CCi(r,e);return{attributes:s,body:o,bodyBegin:u,frontmatter:i}}a(wCi,"parse");function TCi(e){e=e||"";return ZYt.test(e)}a(TCi,"test")});var N8e=y(Zy=>{"use strict";var P8e=Zy&&Zy.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(Zy,"__esModule",{value:true});Zy.generateDevPortalDocs=Zy.BUILD_DATA_DOC_METADATA=void 0;var u3=hn();var xCi=oWt();var RCi=P8e(eXt());var R8e=require("fs/promises");var Aw=P8e(require("path"));var O8e=Fn();var OCi=P8e(xs());Zy.BUILD_DATA_DOC_METADATA="doc-metadata";var PCi=a(async function({sourceDirectory:e,outputDirectory:t,logger:r},n){return OCi.default.timeFn("Generating documentation from markdown files",async()=>{r.info("Generating documentation from markdown files");const i=Aw.default.join(e,O8e.USER_DOCS_DIR_NAME);const s=Aw.default.join(t,O8e.DEV_PORTAL_V4_PATH,O8e.USER_DOCS_DIR_NAME);if(!await u3.xfs.dirExists(s)){await(0,R8e.mkdir)(s,{recursive:true})}const o=[];const u=await u3.xfs.listFolderContents(i,"docs");const l=[];for(const d of u){if(Aw.default.extname(d)!==".md"){continue}if(!await u3.xfs.fileExists(Aw.default.join(i,d))){o.push({message:`Can not resolve reference to file '${d}'`,pluginName:"generate-docs",severity:u3.WARNING_SEVERITY});continue}l.push(d)}const c=await Promise.all(l.map(async d=>{const p=await(0,R8e.readFile)(Aw.default.join(i,d),"utf-8");const{attributes:f,body:m}=(0,RCi.default)(p);const{html:h,headings:g}=await(0,xCi.render)(m);const _=Aw.default.basename(d).replace(".md","");const v=Aw.default.join(s,d.replace(".md",".html"));await u3.xfs.mkdirForFilePathIfNotExits(v);await(0,R8e.writeFile)(v,h,"utf-8");const S=g.filter(E=>E.depth===2&&E.value!==void 0).map(E=>({title:E.value,id:(0,u3.kebabCase)(E.value)}));return{name:_,title:g.find(E=>E.depth===0)?.value??_,...f,innerNav:S}}));n.set(Zy.BUILD_DATA_DOC_METADATA,c);return{errors:[],warnings:o}})},"generateDevPortalDocs");Zy.generateDevPortalDocs=PCi});var rXt=y(c3=>{"use strict";var tXt=c3&&c3.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(c3,"__esModule",{value:true});c3.generateEnrichedDevPortalJson=void 0;var Aq=require("fs/promises");var Cq=tXt(require("path"));var l3=Fn();var I8e=hn();var k8e=tu();var NCi=tXt(xs());var ICi=Bb();var kCi=a(async function({sourceDirectory:e,logger:t,outputDirectory:r,publicZuploEnvironmentVariables:n,entitlements:i}){return NCi.default.timeFn("Enriching dev-portal.json with data needed for the developer portal",async()=>{t.info("Enriching dev-portal.json with data needed for the developer portal");const s=Cq.default.join(e,l3.USER_CONFIG_DIR_NAME);const o=Cq.default.join(s,l3.DEV_PORTAL_CONFIG_FILE);const u=Cq.default.join(r,l3.USER_CONFIG_DIR_NAME);try{if(!await I8e.xfs.fileExists(o)){t.debug("Project is missing a dev-portal.json file. Skipping generate-enriched-dev-portal-json plugin.");return new k8e.PluginResult}if(!await I8e.xfs.dirExists(r)){await(0,Aq.mkdir)(r)}if(!await I8e.xfs.dirExists(u)){await(0,Aq.mkdir)(u)}let l=await(0,Aq.readFile)(o,"utf-8");let c=JSON.parse(l);if(n){Object.keys(n).forEach(f=>{l=l.replaceAll(`$env(${f})`,n[f])});c=JSON.parse(l);if(!c?.apiKeys?.bucketName&&n["ZUPLO_PROJECT_ID"]&&n["ZUPLO_ENVIRONMENT_TYPE"]){c.apiKeys={bucketName:`z${n["ZUPLO_PROJECT_ID"]}-${n["ZUPLO_ENVIRONMENT_TYPE"]}`,...n["ZUPLO_ACCOUNT_DEVELOPER_API_KEY"]&&{apiKey:n["ZUPLO_ACCOUNT_DEVELOPER_API_KEY"]}}}if(c?.apiKeys?.bucketName){c.apiKeys.bucketName=c.apiKeys.bucketName.toLowerCase().replaceAll("_","-");if(n["ZUPLO_ACCOUNT_DEVELOPER_API_KEY"]){c.apiKeys.apiKey=`${n["ZUPLO_ACCOUNT_DEVELOPER_API_KEY"]}`}}}if(c.sitePathname==="/__zuplo/dev-portal"){c.sitePathname=void 0}let d=void 0;try{const f=Cq.default.join(r,l3.USER_DOCS_DIR_NAME,l3.DOCS_SIDEBAR_FILE);const m=await(0,Aq.readFile)(f,"utf-8");d=JSON.parse(m)}catch(f){t.error(f)}const p={...c,entitlements:i,sidebar:d};await(0,Aq.writeFile)(Cq.default.join(u,l3.DEV_PORTAL_CONFIG_FILE),JSON.stringify(p))}catch(l){t.error(l);return new k8e.PluginResult({severity:"warning",pluginName:"generate-enriched-dev-portal-json",message:ICi.DEV_PORTAL_PLUGIN_FAILURE_ERROR})}return new k8e.PluginResult})},"generateEnrichedDevPortalJson");c3.generateEnrichedDevPortalJson=kCi});var nXt=y(Ig=>{"use strict";Object.defineProperty(Ig,"__esModule",{value:true});Ig.LOCAL_AUTH_CONFIG=Ig.DEVELOPMENT_AUTH_CONFIG=Ig.PRODUCTION_AUTH_CONFIG=Ig.PRODUCTION_TEMP_AUTH_CONFIG=void 0;Ig.PRODUCTION_TEMP_AUTH_CONFIG={provider:"auth0",authority:"https://customer-auth.zuploapp.com/",jwksUrl:"https://customer-auth.zuploapp.com/.well-known/jwks.json",devPortalClient:{clientId:"CjwgIKXvighnHrVg1Uh9uKWFlqjRpRro",audience:"https://dev-zup.zuplo.app/"}};Ig.PRODUCTION_AUTH_CONFIG={provider:"auth0",authority:"https://customer-auth.zuplo.app/",jwksUrl:"https://customer-auth.zuplo.app/.well-known/jwks.json",devPortalClient:{clientId:"CjwgIKXvighnHrVg1Uh9uKWFlqjRpRro",audience:"https://dev-zup.zuplo.app/"}};Ig.DEVELOPMENT_AUTH_CONFIG={provider:"auth0",authority:"https://customer-auth.zuplo.dev/",jwksUrl:"https://customer-auth.zuplo.dev/.well-known/jwks.json",devPortalClient:{clientId:"B3IEDT7WGI0FjY0KZdmXXtCtZtCcLaDp",audience:"https://dev-zup.zuplo.dev/"}};Ig.LOCAL_AUTH_CONFIG={provider:"auth0",authority:"https://zuplo-dev.us.auth0.com/",jwksUrl:"https://zuplo-dev.us.auth0.com/.well-known/jwks.json",devPortalClient:{clientId:"elmO8w0n7XW6iC83hTtuREvRwpLaj6hN",audience:"https://dev-zup.zuplo.dev/"}}});var iXt=y(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:true});dm.DEFAULT_PAGE_TITLE=dm.POWERED_BY_ZUPLO_URL=dm.DEFAULT_FAVICON_URL=dm.FILE_EXAMPLE=dm.SUPPORTED_REQUEST_BODY_MEDIA_TYPES=void 0;dm.SUPPORTED_REQUEST_BODY_MEDIA_TYPES=["application/json","multipart/form-data"];dm.FILE_EXAMPLE="file.text";dm.DEFAULT_FAVICON_URL=`https://cdn.zuplo.com/dev-portal/favicon-dev.ico`;dm.POWERED_BY_ZUPLO_URL=`https://cdn.zuplo.com/dev-portal/powered_by_zuplo.svg`;dm.DEFAULT_PAGE_TITLE="Zuplo Dev Portal"});var sXt=y(kg=>{"use strict";Object.defineProperty(kg,"__esModule",{value:true});kg.getFailedToSetPropertyErrorMessage=kg.getFailedToParseFileErrorMessage=kg.CANNOT_USE_DEMO_AUTH_ERROR=kg.INVALID_DEV_PORTAL_AUTH_CONFIG_ERROR=void 0;kg.INVALID_DEV_PORTAL_AUTH_CONFIG_ERROR="The authentication settings for the dev portal are invalid.";kg.CANNOT_USE_DEMO_AUTH_ERROR="The demo auth tenant cannot be used with a custom domain. Please configure your own auth provider in your Developer Portal settings.";var DCi=a((e,t,r)=>`Failed to parse ${e} file '${t}'. Please try rebuilding your project or contact support if this persists. Error: ${r.message}`,"getFailedToParseFileErrorMessage");kg.getFailedToParseFileErrorMessage=DCi;var LCi=a(e=>`Failed to set property '${e}'. Please try rebuilding your project or contact support if this persists.`,"getFailedToSetPropertyErrorMessage");kg.getFailedToSetPropertyErrorMessage=LCi});var oXt=y(Jb=>{"use strict";Object.defineProperty(Jb,"__esModule",{value:true});Jb.validateGeneratedConfiguration=Jb.generateDevPortalClientConfig=Jb.DEFAULT_AUTHORIZE_PATHNAME=void 0;var FCi=hn();var d3=nXt();var D8e=iXt();var BCi=sXt();Jb.DEFAULT_AUTHORIZE_PATHNAME="/__zuplo/oauth/authorize";function MCi({zupBuildId:e,originalDevPortalConfig:t,publicZuploEnvironmentVariables:r,entitlements:n,sidebar:i,environmentType:s,openApiMetadata:o,projectConfiguration:u,privateEnvironmentVariables:l}){if(r){let v=JSON.stringify(t);Object.keys(r).forEach(S=>{v=v.replaceAll(`$env(${S})`,r[S])});t=JSON.parse(v);if(!t?.apiKeys?.bucketName&&r["ZUPLO_PROJECT_ID"]&&r["ZUPLO_ENVIRONMENT_TYPE"]){t.apiKeys={bucketName:`z${r["ZUPLO_PROJECT_ID"]}-${r["ZUPLO_ENVIRONMENT_TYPE"]}`,...r["ZUPLO_ACCOUNT_DEVELOPER_API_KEY"]&&{apiKey:r["ZUPLO_ACCOUNT_DEVELOPER_API_KEY"]}}}if(t?.apiKeys?.bucketName){t.apiKeys.bucketName=t.apiKeys.bucketName.toLowerCase().replaceAll("_","-");if(r["ZUPLO_ACCOUNT_DEVELOPER_API_KEY"]){t.apiKeys.apiKey=`${r["ZUPLO_ACCOUNT_DEVELOPER_API_KEY"]}`}}if(t.metering&&!t.metering.meteringBucketId&&u&&u.meteringBucket){t.metering.meteringBucketId=u.meteringBucket}}if(t.metering?.secretKey&&l){if(t.metering.secretKey.startsWith("$env(")){const v=t.metering.secretKey.replace(/^(\$env\()/,"").replace(/\)$/,"");t.metering.secretKey=l[v]}}let c;if(t.sitePathname==="/__zuplo/dev-portal"){c=void 0}else if(t.sitePathname&&t.sitePathname.startsWith("/")){c=t.sitePathname.substring(1)}const d=t.enableAuthentication??true;const p=t.requireAuthentication??false;const f=UCi(d,s,t.authentication);if(!f.isValid){return f}const m=t.apiKeys?.bucketName??"";const h=t.apiKeys?.apiKey??"";const g=d&&!!t.apiKeys?.bucketName;const _={zupBuildId:e,sitePathname:c,bucketName:m,bucketApiKey:h,enableAuthentication:d,requireAuthentication:p,enableApiKeyManagement:g,faviconUrl:t.faviconUrl??D8e.DEFAULT_FAVICON_URL,pageTitle:t.pageTitle??D8e.DEFAULT_PAGE_TITLE,auth:f.config,zuploBrandingUrl:n?.devPortalZuploBranding??true?D8e.POWERED_BY_ZUPLO_URL:void 0,generateFallbackExamples:t.generateExamples??true,entitlements:n,sidebar:i,apis:o,enableMetering:t.enableMetering??false,metering:t.metering};return{isValid:true,config:_}}a(MCi,"generateDevPortalClientConfig");Jb.generateDevPortalClientConfig=MCi;function qCi(e){const t=[];if(e.bucketName){const r=p3(e.bucketName,"bucketName");if(r.length>0){t.push(...r)}}if(e.enableAuthentication&&e.auth){if(e.auth.provider&&!(e.auth.provider==="auth0"||e.auth.provider==="okta"||e.auth.provider==="azure-ad"||e.auth.provider==="clerk"||e.auth.provider==="oidc"||e.auth.provider==="external")){t.push({message:"The authentication setting 'provider' is not set or invalid. Valid values are 'auth0', 'okta', 'azure-ad', 'clerk', 'oidc', or 'external'.",pluginName:"generate-manifest",severity:"warning"})}if(e.auth.provider==="external"){const r=p3(e.auth.loginUrl,"loginUrl");if(r.length>0){t.push(...r)}const n=p3(e.auth.logoutUrl,"logoutUrl");if(n.length>0){t.push(...n)}if(e.auth.loginUrl?.endsWith("/")){t.push({message:`The authentication setting 'loginUrl' should not end with a trailing slash. The current value is '${e.auth.loginUrl}'.`,pluginName:"generate-manifest",severity:"warning"})}if(e.auth.logoutUrl?.endsWith("/")){t.push({message:`The authentication setting 'logoutUrl' should not end with a trailing slash. The current value is '${e.auth.logoutUrl}'.`,pluginName:"generate-manifest",severity:"warning"})}const i=aXt(e.auth.loginUrl,"loginUrl");if(i.length>0){t.push(...i)}const s=aXt(e.auth.logoutUrl,"logoutUrl");if(s.length>0){t.push(...s)}}else{const r=p3(e.auth.audience,"audience");if(r.length>0){t.push(...r)}const n=p3(e.auth.issuer,"authority");if(n.length>0){t.push(...n)}const i=p3(e.auth.clientId,"clientId");if(i.length>0){t.push(...i)}if(e.auth.provider==="auth0"&&!e.auth.issuer?.endsWith("/")){t.push({message:`The authentication setting 'authority' should end with a trailing slash when using Auth0. i.e. 'https://my-account.us.auth0.com/' The current value is '${e.auth.issuer}'.`,pluginName:"generate-manifest",severity:"warning"})}if(e.auth.provider==="okta"&&e.auth.issuer?.endsWith("/")){t.push({message:`The authentication setting 'authority' should not end with a trailing slash when using Okta. i.e. 'https://dev-1235.okta.com/oauth2/aus123152352342'. The current value is '${e.auth.issuer}'.`,pluginName:"generate-manifest",severity:"warning"})}}}return t}a(qCi,"validateGeneratedConfiguration");Jb.validateGeneratedConfiguration=qCi;function p3(e,t){const r=[];if(e===void 0||e.trim().length===0){r.push({message:`The authentication setting for '${t}' is not set or is invalid.`,pluginName:"generate-manifest",severity:"warning"})}else if(e.startsWith("$env(")&&!e.startsWith("$env(ZUPLO_PUBLIC_")){r.push({message:`'${t}' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.`,pluginName:"generate-manifest",severity:"warning"})}return r}a(p3,"verifyDevPortalAuthConfig");function aXt(e,t){const r=[];try{new URL(e)}catch(n){r.push({message:`The authentication setting '${t}' is not a valid URL. The current value is '${e}'.`,pluginName:"generate-manifest",severity:"warning"})}return r}a(aXt,"verifyValidUrl");function UCi(e,t,r){if(!e){return{isValid:true,config:void 0}}if(r){if(r.provider==="external"){return{isValid:true,config:r}}if(!r?.devPortalClient){return{isValid:false,errors:[BCi.INVALID_DEV_PORTAL_AUTH_CONFIG_ERROR]}}const{clientId:n,audience:i}=r.devPortalClient;const{authority:s,provider:o}=r;return{isValid:true,config:{clientId:n,audience:i,issuer:s,provider:o}}}if(t===FCi.EnvironmentType.WORKING_COPY){return{isValid:true,config:{clientId:d3.DEVELOPMENT_AUTH_CONFIG.devPortalClient.clientId,audience:d3.DEVELOPMENT_AUTH_CONFIG.devPortalClient.audience,issuer:d3.DEVELOPMENT_AUTH_CONFIG.authority,provider:"auth0"}}}else{return{isValid:true,config:{clientId:d3.PRODUCTION_AUTH_CONFIG.devPortalClient.clientId,audience:d3.PRODUCTION_AUTH_CONFIG.devPortalClient.audience,issuer:d3.PRODUCTION_AUTH_CONFIG.authority,provider:"auth0"}}}}a(UCi,"getDevPortalAuthConfig")});var L8e=y(Wl=>{"use strict";var pXt=Wl&&Wl.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(Wl,"__esModule",{value:true});Wl.generateSidenav=Wl.BUILD_DATA_SIDENAV_DOCS=Wl.getDefaultSpecAndPage=Wl.validateSidebarConfig=Wl.expandSidebarDocsConfig=void 0;var $Ci=hn();var jCi=require("fs/promises");var uXt=pXt(require("path"));var lXt=Fn();var GCi=pXt(xs());var cXt=N8e();var HCi=a((e,t)=>{const r=e.docs?.reduce((n,i)=>{if(typeof i==="object"&&i.type==="api-ref"){return n.concat(i)}const s=typeof i==="string";if(s||i.type==="doc"){const p=dXt(i,t);return n.concat(p)}const{link:o,items:u}=i;const l=o?VCi(o):void 0;const c=u?.map(p=>dXt(p,t));const d={...i,link:l,items:c};return n.concat(d)},[]);if(!r?.some(({type:n})=>n==="api-ref")){r?.push({type:"api-ref",label:"API Reference"})}return{docs:r}},"expandSidebarDocsConfig");Wl.expandSidebarDocsConfig=HCi;var VCi=a(e=>{const t=typeof e==="string";return t?{type:"doc",id:e}:e},"generateDocLinkConfig");var dXt=a((e,t)=>{const r=typeof e==="string";const n=r?e:e.id;const i=t.find(({name:o})=>o===n);if(!i){return r?{title:void 0,type:"doc",label:n,id:n}:{title:void 0,...e}}const s=i.sidebar_label;return r?{title:void 0,type:"doc",label:s??n,id:n}:{title:void 0,...e,label:s??e.label}},"generateDocConfig");var zCi=a((e,t,r)=>{if(!e?.docs){return[]}const n=e.docs.map(g=>{if(g.type==="doc"){return g.id}else if(g.type==="api-ref"){return null}else if(g.type==="dir"){return g.link?.id}else{throw new Error("Entry is not of an expected type. Allowed types are: doc, api-ref, and dir")}}).filter(g=>g!=null);const i=One(n);if(i.length>0){return i.map(([g,_])=>`ID: '${g}' was used more than once. Duplicates found in entries: ${_.toString()}.`)}const s=e.docs.map(g=>g.label);const o=One(s);if(o.length>0){return o.map(([g,_])=>`Label: '${g}' was used more than once. Duplicates found in entries: ${_.toString()}.`)}let u=[];e.docs.forEach(g=>{if(g.type!=="category"){return}const{items:_,label:v}=g;const S=_.map(({id:C})=>C);const E=One(S);if(E.length>0){u=u.concat(E.map(([C,T])=>`ID: '${C}' was used more than once in Category: '${v}'. Duplicates found in 'items' entries: ${T.toString()}.`))}const b=_.map(({label:C})=>C);const A=One(b);if(A.length>0){u=u.concat(A.map(([C,T])=>`Label: '${C}' was used more than once in Category: '${v}'. Duplicates found in 'items' entries: ${T.toString()}.`))}});if(u.length>0){return u}const l=e.docs.map(g=>{if(g.type==="doc"){return g.id}else if(g.type==="api-ref"){return null}else if(g.type==="dir"){let _=[];const v=g.link?.id;if(v){_=_.concat(v)}const S=g.items.map(({id:E})=>E);_=_.concat(S);return _}else{throw new Error("Entry is not of an expected type. Allowed types are: doc, api-ref, and dir")}}).flat().filter(g=>g!=null);const c=l.filter(g=>!t.find(_=>_.includes(g))).map(g=>`ID: '${g}' in sidebar.json does not map to a file in the docs directory`);if(c.length>0){return c}const d=e.docs?.filter(g=>typeof g==="object"&&g.type==="api-ref");const p=d.length;if(p>1){return["Entry with type 'api-ref' was used more than once"]}else if(p===0){return["No entry with type 'api-ref' was found. The API Reference page will not appear in your developer portal"]}const f=d[0];const{defaultSpec:m}=f;if(m){if(!r.includes(m)){return[`The defaultSpec: '${m}' does not match any of the spec IDs: ${r.toString()}.`]}}const h=e.docs?.filter(g=>{if(g.type!=="doc"){return false}return g.defaultPage});if(h.length>1){return[`More than one entry has 'defaultPage' set to true. Only one entry can have this set to true.`]}return[]},"validateSidebarConfig");Wl.validateSidebarConfig=zCi;var One=a(e=>{return Object.entries(e.reduce((t,r,n)=>{if(t[r]){t[r]=t[r].concat(n)}else{t[r]=[n]}return t},{})).filter(([,t])=>t.length>1)},"findDuplicateOccurrences");var KCi=a(e=>{const t=e.docs?.find(i=>i.type==="api-ref");if(!t){throw new Error("No api-ref config found")}const{defaultSpec:r}=t;const n=e.docs?.find(i=>{if(i.type!=="doc"){return false}return i.defaultPage});return{defaultSpec:r,defaultPage:n?.id}},"getDefaultSpecAndPage");Wl.getDefaultSpecAndPage=KCi;Wl.BUILD_DATA_SIDENAV_DOCS="sidenav";var WCi=a(async function({sourceDirectory:e,logger:t},r){return GCi.default.timeFn("Generating side navigation",async()=>{t.info("Generating side navigation");if(!r.has(cXt.BUILD_DATA_DOC_METADATA)){throw new Error("Generate Sidenav must follow generate docs build plugin")}const n=r.get(cXt.BUILD_DATA_DOC_METADATA);const i=uXt.default.join(e,lXt.USER_DOCS_DIR_NAME);const s=uXt.default.join(i,lXt.DOCS_SIDEBAR_FILE);if(!await $Ci.xfs.fileExists(s)){return{errors:[],warnings:[{pluginName:"generate-sidenav",message:"Project does not have a docs/sidebar.json file",severity:"warning"}]}}const o=await(0,jCi.readFile)(s,"utf-8").then(JSON.parse);const u=(0,Wl.expandSidebarDocsConfig)(o,n);r.set(Wl.BUILD_DATA_SIDENAV_DOCS,u);return{errors:[],warnings:[]}})},"generateSidenav");Wl.generateSidenav=WCi});var yXt=y(f3=>{"use strict";var gXt=f3&&f3.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(f3,"__esModule",{value:true});f3.generateDevPortalManifest=void 0;var Pne=hn();var Nne=require("fs/promises");var Ine=gXt(require("path"));var kne=Fn();var F8e=tu();var YCi=gXt(xs());var fXt=oXt();var mXt=ODe();var XCi=Bb();var hXt=L8e();var JCi=a(async function({zupBuildId:e,sourceDirectory:t,outputDirectory:r,publicZuploEnvironmentVariables:n,entitlements:i,environmentType:s,logger:o,projectConfiguration:u,privateEnvironmentVariables:l},c){return YCi.default.timeFn("Generating dev portal manifest",async()=>{o.info("Generating dev portal manifest");if(!c.has(hXt.BUILD_DATA_SIDENAV_DOCS)){throw new Error("Generate Sidenav must follow generate sidenav")}if(!c.has(mXt.BUILD_DATA_OPEN_API_METADATA)){throw new Error("Generate Sidenav must follow build open api files")}const d=c.get(hXt.BUILD_DATA_SIDENAV_DOCS);const p=c.get(mXt.BUILD_DATA_OPEN_API_METADATA);const f=Ine.default.join(t,kne.USER_CONFIG_DIR_NAME);const m=Ine.default.join(f,kne.DEV_PORTAL_CONFIG_FILE);const h=Ine.default.join(r,kne.DEV_PORTAL_V4_PATH,kne.USER_CONFIG_DIR_NAME);try{if(!await Pne.xfs.fileExists(m)){o.debug("Project is missing a dev-portal.json file. Skipping generate-dev-portal-manifest plugin.");return new F8e.PluginResult}if(!await Pne.xfs.dirExists(r)){await(0,Nne.mkdir)(r)}if(!await Pne.xfs.dirExists(h)){await(0,Nne.mkdir)(h)}const g=await(0,Nne.readFile)(m,"utf-8").then(JSON.parse);const _=(0,fXt.generateDevPortalClientConfig)({zupBuildId:e,originalDevPortalConfig:g,sidebar:d,openApiMetadata:p,environmentType:s??Pne.EnvironmentType.WORKING_COPY,entitlements:i,publicZuploEnvironmentVariables:n,projectConfiguration:u,privateEnvironmentVariables:l});c.set("generateExamples",_.isValid&&_.config.generateFallbackExamples);if(!_.isValid){throw new Error("Error")}await(0,Nne.writeFile)(Ine.default.join(h,"dev-portal-manifest.json"),process.env.DEBUG_BUILD_MODE?JSON.stringify(_.config,null,2):JSON.stringify(_.config));const v=(0,fXt.validateGeneratedConfiguration)(_.config);if(v.length>0){return{errors:[],warnings:v}}}catch(g){o.error(g);return new F8e.PluginResult({severity:"warning",pluginName:"generate-dev-portal-manifest",message:XCi.DEV_PORTAL_PLUGIN_FAILURE_ERROR})}return new F8e.PluginResult})},"generateDevPortalManifest");f3.generateDevPortalManifest=JCi});var vXt=y((qWs,_Xt)=>{"use strict";_Xt.exports={order:100,allowEmpty:true,canParse:".json",parse:a(function e(t){return new Promise(function(r,n){var i=t.data;if(Buffer.isBuffer(i)){i=i.toString()}if(typeof i==="string"){if(i.trim().length===0){r(void 0)}else{r(JSON.parse(i))}}else{r(i)}})},"parseJSON")}});var ww=y(($Ws,Cw)=>{"use strict";function EXt(e){return typeof e==="undefined"||e===null}a(EXt,"isNothing");function QCi(e){return typeof e==="object"&&e!==null}a(QCi,"isObject");function ZCi(e){if(Array.isArray(e))return e;else if(EXt(e))return[];return[e]}a(ZCi,"toArray");function ewi(e,t){var r,n,i,s;if(t){s=Object.keys(t);for(r=0,n=s.length;r<n;r+=1){i=s[r];e[i]=t[i]}}return e}a(ewi,"extend");function twi(e,t){var r="",n;for(n=0;n<t;n+=1){r+=e}return r}a(twi,"repeat");function rwi(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}a(rwi,"isNegativeZero");Cw.exports.isNothing=EXt;Cw.exports.isObject=QCi;Cw.exports.toArray=ZCi;Cw.exports.repeat=twi;Cw.exports.isNegativeZero=rwi;Cw.exports.extend=ewi});var m3=y((GWs,bXt)=>{"use strict";function wq(e,t){Error.call(this);this.name="YAMLException";this.reason=e;this.mark=t;this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"");if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=new Error().stack||""}}a(wq,"YAMLException");wq.prototype=Object.create(Error.prototype);wq.prototype.constructor=wq;wq.prototype.toString=a(function e(t){var r=this.name+": ";r+=this.reason||"(unknown reason)";if(!t&&this.mark){r+=" "+this.mark.toString()}return r},"toString");bXt.exports=wq});var CXt=y((VWs,AXt)=>{"use strict";var SXt=ww();function B8e(e,t,r,n,i){this.name=e;this.buffer=t;this.position=r;this.line=n;this.column=i}a(B8e,"Mark");B8e.prototype.getSnippet=a(function e(t,r){var n,i,s,o,u;if(!this.buffer)return null;t=t||4;r=r||75;n="";i=this.position;while(i>0&&"\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(i-1))===-1){i-=1;if(this.position-i>r/2-1){n=" ... ";i+=5;break}}s="";o=this.position;while(o<this.buffer.length&&"\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(o))===-1){o+=1;if(o-this.position>r/2-1){s=" ... ";o-=5;break}}u=this.buffer.slice(i,o);return SXt.repeat(" ",t)+n+u+s+"\n"+SXt.repeat(" ",t+this.position-i+n.length)+"^"},"getSnippet");B8e.prototype.toString=a(function e(t){var r,n="";if(this.name){n+='in "'+this.name+'" '}n+="at line "+(this.line+1)+", column "+(this.column+1);if(!t){r=this.getSnippet();if(r){n+=":\n"+r}}return n},"toString");AXt.exports=B8e});var su=y((KWs,TXt)=>{"use strict";var wXt=m3();var nwi=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"];var iwi=["scalar","sequence","mapping"];function swi(e){var t={};if(e!==null){Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})})}return t}a(swi,"compileStyleAliases");function awi(e,t){t=t||{};Object.keys(t).forEach(function(r){if(nwi.indexOf(r)===-1){throw new wXt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}});this.tag=e;this.kind=t["kind"]||null;this.resolve=t["resolve"]||function(){return true};this.construct=t["construct"]||function(r){return r};this.instanceOf=t["instanceOf"]||null;this.predicate=t["predicate"]||null;this.represent=t["represent"]||null;this.defaultStyle=t["defaultStyle"]||null;this.styleAliases=swi(t["styleAliases"]||null);if(iwi.indexOf(this.kind)===-1){throw new wXt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}a(awi,"Type");TXt.exports=awi});var Tw=y((YWs,RXt)=>{"use strict";var xXt=ww();var Dne=m3();var owi=su();function M8e(e,t,r){var n=[];e.include.forEach(function(i){r=M8e(i,t,r)});e[t].forEach(function(i){r.forEach(function(s,o){if(s.tag===i.tag&&s.kind===i.kind){n.push(o)}});r.push(i)});return r.filter(function(i,s){return n.indexOf(s)===-1})}a(M8e,"compileList");function uwi(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,r;function n(i){e[i.kind][i.tag]=e["fallback"][i.tag]=i}a(n,"collectType");for(t=0,r=arguments.length;t<r;t+=1){arguments[t].forEach(n)}return e}a(uwi,"compileMap");function h3(e){this.include=e.include||[];this.implicit=e.implicit||[];this.explicit=e.explicit||[];this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar"){throw new Dne("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}});this.compiledImplicit=M8e(this,"implicit",[]);this.compiledExplicit=M8e(this,"explicit",[]);this.compiledTypeMap=uwi(this.compiledImplicit,this.compiledExplicit)}a(h3,"Schema");h3.DEFAULT=null;h3.create=a(function e(){var t,r;switch(arguments.length){case 1:t=h3.DEFAULT;r=arguments[0];break;case 2:t=arguments[0];r=arguments[1];break;default:throw new Dne("Wrong number of arguments for Schema.create function")}t=xXt.toArray(t);r=xXt.toArray(r);if(!t.every(function(n){return n instanceof h3})){throw new Dne("Specified list of super schemas (or a single Schema object) contains a non-Schema object.")}if(!r.every(function(n){return n instanceof owi})){throw new Dne("Specified list of YAML types (or a single Type object) contains a non-Type object.")}return new h3({include:t,explicit:r})},"createSchema");RXt.exports=h3});var PXt=y((JWs,OXt)=>{"use strict";var lwi=su();OXt.exports=new lwi("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var IXt=y((QWs,NXt)=>{"use strict";var cwi=su();NXt.exports=new cwi("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var DXt=y((ZWs,kXt)=>{"use strict";var dwi=su();kXt.exports=new dwi("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var Lne=y((eYs,LXt)=>{"use strict";var pwi=Tw();LXt.exports=new pwi({explicit:[PXt(),IXt(),DXt()]})});var BXt=y((tYs,FXt)=>{"use strict";var fwi=su();function mwi(e){if(e===null)return true;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}a(mwi,"resolveYamlNull");function hwi(){return null}a(hwi,"constructYamlNull");function gwi(e){return e===null}a(gwi,"isNull");FXt.exports=new fwi("tag:yaml.org,2002:null",{kind:"scalar",resolve:mwi,construct:hwi,predicate:gwi,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var qXt=y((nYs,MXt)=>{"use strict";var ywi=su();function _wi(e){if(e===null)return false;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}a(_wi,"resolveYamlBoolean");function vwi(e){return e==="true"||e==="True"||e==="TRUE"}a(vwi,"constructYamlBoolean");function Ewi(e){return Object.prototype.toString.call(e)==="[object Boolean]"}a(Ewi,"isBoolean");MXt.exports=new ywi("tag:yaml.org,2002:bool",{kind:"scalar",resolve:_wi,construct:vwi,predicate:Ewi,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var $Xt=y((sYs,UXt)=>{"use strict";var bwi=ww();var Swi=su();function Awi(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}a(Awi,"isHexCode");function Cwi(e){return 48<=e&&e<=55}a(Cwi,"isOctCode");function wwi(e){return 48<=e&&e<=57}a(wwi,"isDecCode");function Twi(e){if(e===null)return false;var t=e.length,r=0,n=false,i;if(!t)return false;i=e[r];if(i==="-"||i==="+"){i=e[++r]}if(i==="0"){if(r+1===t)return true;i=e[++r];if(i==="b"){r++;for(;r<t;r++){i=e[r];if(i==="_")continue;if(i!=="0"&&i!=="1")return false;n=true}return n&&i!=="_"}if(i==="x"){r++;for(;r<t;r++){i=e[r];if(i==="_")continue;if(!Awi(e.charCodeAt(r)))return false;n=true}return n&&i!=="_"}for(;r<t;r++){i=e[r];if(i==="_")continue;if(!Cwi(e.charCodeAt(r)))return false;n=true}return n&&i!=="_"}if(i==="_")return false;for(;r<t;r++){i=e[r];if(i==="_")continue;if(i===":")break;if(!wwi(e.charCodeAt(r))){return false}n=true}if(!n||i==="_")return false;if(i!==":")return true;return/^(:[0-5]?[0-9])+$/.test(e.slice(r))}a(Twi,"resolveYamlInteger");function xwi(e){var t=e,r=1,n,i,s=[];if(t.indexOf("_")!==-1){t=t.replace(/_/g,"")}n=t[0];if(n==="-"||n==="+"){if(n==="-")r=-1;t=t.slice(1);n=t[0]}if(t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t,16);return r*parseInt(t,8)}if(t.indexOf(":")!==-1){t.split(":").forEach(function(o){s.unshift(parseInt(o,10))});t=0;i=1;s.forEach(function(o){t+=o*i;i*=60});return r*t}return r*parseInt(t,10)}a(xwi,"constructYamlInteger");function Rwi(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1===0&&!bwi.isNegativeZero(e))}a(Rwi,"isInteger");UXt.exports=new Swi("tag:yaml.org,2002:int",{kind:"scalar",resolve:Twi,construct:xwi,predicate:Rwi,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var HXt=y((oYs,GXt)=>{"use strict";var jXt=ww();var Owi=su();var Pwi=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Nwi(e){if(e===null)return false;if(!Pwi.test(e)||e[e.length-1]==="_"){return false}return true}a(Nwi,"resolveYamlFloat");function Iwi(e){var t,r,n,i;t=e.replace(/_/g,"").toLowerCase();r=t[0]==="-"?-1:1;i=[];if("+-".indexOf(t[0])>=0){t=t.slice(1)}if(t===".inf"){return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(t===".nan"){return NaN}else if(t.indexOf(":")>=0){t.split(":").forEach(function(s){i.unshift(parseFloat(s,10))});t=0;n=1;i.forEach(function(s){t+=s*n;n*=60});return r*t}return r*parseFloat(t,10)}a(Iwi,"constructYamlFloat");var kwi=/^[-+]?[0-9]+e/;function Dwi(e,t){var r;if(isNaN(e)){switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(jXt.isNegativeZero(e)){return"-0.0"}r=e.toString(10);return kwi.test(r)?r.replace("e",".e"):r}a(Dwi,"representYamlFloat");function Lwi(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||jXt.isNegativeZero(e))}a(Lwi,"isFloat");GXt.exports=new Owi("tag:yaml.org,2002:float",{kind:"scalar",resolve:Nwi,construct:Iwi,predicate:Lwi,represent:Dwi,defaultStyle:"lowercase"})});var q8e=y((lYs,VXt)=>{"use strict";var Fwi=Tw();VXt.exports=new Fwi({include:[Lne()],implicit:[BXt(),qXt(),$Xt(),HXt()]})});var U8e=y((cYs,zXt)=>{"use strict";var Bwi=Tw();zXt.exports=new Bwi({include:[q8e()]})});var XXt=y((dYs,YXt)=>{"use strict";var Mwi=su();var KXt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");var WXt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function qwi(e){if(e===null)return false;if(KXt.exec(e)!==null)return true;if(WXt.exec(e)!==null)return true;return false}a(qwi,"resolveYamlTimestamp");function Uwi(e){var t,r,n,i,s,o,u,l=0,c=null,d,p,f;t=KXt.exec(e);if(t===null)t=WXt.exec(e);if(t===null)throw new Error("Date resolve error");r=+t[1];n=+t[2]-1;i=+t[3];if(!t[4]){return new Date(Date.UTC(r,n,i))}s=+t[4];o=+t[5];u=+t[6];if(t[7]){l=t[7].slice(0,3);while(l.length<3){l+="0"}l=+l}if(t[9]){d=+t[10];p=+(t[11]||0);c=(d*60+p)*6e4;if(t[9]==="-")c=-c}f=new Date(Date.UTC(r,n,i,s,o,u,l));if(c)f.setTime(f.getTime()-c);return f}a(Uwi,"constructYamlTimestamp");function $wi(e){return e.toISOString()}a($wi,"representYamlTimestamp");YXt.exports=new Mwi("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:qwi,construct:Uwi,instanceOf:Date,represent:$wi})});var QXt=y((fYs,JXt)=>{"use strict";var jwi=su();function Gwi(e){return e==="<<"||e===null}a(Gwi,"resolveYamlMerge");JXt.exports=new jwi("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Gwi})});var tJt=y((hYs,eJt)=>{"use strict";var xw;try{ZXt=require;xw=ZXt("buffer").Buffer}catch(e){}var ZXt;var Hwi=su();var $8e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function Vwi(e){if(e===null)return false;var t,r,n=0,i=e.length,s=$8e;for(r=0;r<i;r++){t=s.indexOf(e.charAt(r));if(t>64)continue;if(t<0)return false;n+=6}return n%8===0}a(Vwi,"resolveYamlBinary");function zwi(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,s=$8e,o=0,u=[];for(t=0;t<i;t++){if(t%4===0&&t){u.push(o>>16&255);u.push(o>>8&255);u.push(o&255)}o=o<<6|s.indexOf(n.charAt(t))}r=i%4*6;if(r===0){u.push(o>>16&255);u.push(o>>8&255);u.push(o&255)}else if(r===18){u.push(o>>10&255);u.push(o>>2&255)}else if(r===12){u.push(o>>4&255)}if(xw){return xw.from?xw.from(u):new xw(u)}return u}a(zwi,"constructYamlBinary");function Kwi(e){var t="",r=0,n,i,s=e.length,o=$8e;for(n=0;n<s;n++){if(n%3===0&&n){t+=o[r>>18&63];t+=o[r>>12&63];t+=o[r>>6&63];t+=o[r&63]}r=(r<<8)+e[n]}i=s%3;if(i===0){t+=o[r>>18&63];t+=o[r>>12&63];t+=o[r>>6&63];t+=o[r&63]}else if(i===2){t+=o[r>>10&63];t+=o[r>>4&63];t+=o[r<<2&63];t+=o[64]}else if(i===1){t+=o[r>>2&63];t+=o[r<<4&63];t+=o[64];t+=o[64]}return t}a(Kwi,"representYamlBinary");function Wwi(e){return xw&&xw.isBuffer(e)}a(Wwi,"isBinary");eJt.exports=new Hwi("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Vwi,construct:zwi,predicate:Wwi,represent:Kwi})});var nJt=y((yYs,rJt)=>{"use strict";var Ywi=su();var Xwi=Object.prototype.hasOwnProperty;var Jwi=Object.prototype.toString;function Qwi(e){if(e===null)return true;var t=[],r,n,i,s,o,u=e;for(r=0,n=u.length;r<n;r+=1){i=u[r];o=false;if(Jwi.call(i)!=="[object Object]")return false;for(s in i){if(Xwi.call(i,s)){if(!o)o=true;else return false}}if(!o)return false;if(t.indexOf(s)===-1)t.push(s);else return false}return true}a(Qwi,"resolveYamlOmap");function Zwi(e){return e!==null?e:[]}a(Zwi,"constructYamlOmap");rJt.exports=new Ywi("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Qwi,construct:Zwi})});var sJt=y((vYs,iJt)=>{"use strict";var eTi=su();var tTi=Object.prototype.toString;function rTi(e){if(e===null)return true;var t,r,n,i,s,o=e;s=new Array(o.length);for(t=0,r=o.length;t<r;t+=1){n=o[t];if(tTi.call(n)!=="[object Object]")return false;i=Object.keys(n);if(i.length!==1)return false;s[t]=[i[0],n[i[0]]]}return true}a(rTi,"resolveYamlPairs");function nTi(e){if(e===null)return[];var t,r,n,i,s,o=e;s=new Array(o.length);for(t=0,r=o.length;t<r;t+=1){n=o[t];i=Object.keys(n);s[t]=[i[0],n[i[0]]]}return s}a(nTi,"constructYamlPairs");iJt.exports=new eTi("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:rTi,construct:nTi})});var oJt=y((bYs,aJt)=>{"use strict";var iTi=su();var sTi=Object.prototype.hasOwnProperty;function aTi(e){if(e===null)return true;var t,r=e;for(t in r){if(sTi.call(r,t)){if(r[t]!==null)return false}}return true}a(aTi,"resolveYamlSet");function oTi(e){return e!==null?e:{}}a(oTi,"constructYamlSet");aJt.exports=new iTi("tag:yaml.org,2002:set",{kind:"mapping",resolve:aTi,construct:oTi})});var g3=y((AYs,uJt)=>{"use strict";var uTi=Tw();uJt.exports=new uTi({include:[U8e()],implicit:[XXt(),QXt()],explicit:[tJt(),nJt(),sJt(),oJt()]})});var cJt=y((CYs,lJt)=>{"use strict";var lTi=su();function cTi(){return true}a(cTi,"resolveJavascriptUndefined");function dTi(){return void 0}a(dTi,"constructJavascriptUndefined");function pTi(){return""}a(pTi,"representJavascriptUndefined");function fTi(e){return typeof e==="undefined"}a(fTi,"isUndefined");lJt.exports=new lTi("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:cTi,construct:dTi,predicate:fTi,represent:pTi})});var pJt=y((TYs,dJt)=>{"use strict";var mTi=su();function hTi(e){if(e===null)return false;if(e.length===0)return false;var t=e,r=/\/([gim]*)$/.exec(e),n="";if(t[0]==="/"){if(r)n=r[1];if(n.length>3)return false;if(t[t.length-n.length-1]!=="/")return false}return true}a(hTi,"resolveJavascriptRegExp");function gTi(e){var t=e,r=/\/([gim]*)$/.exec(e),n="";if(t[0]==="/"){if(r)n=r[1];t=t.slice(1,t.length-n.length-1)}return new RegExp(t,n)}a(gTi,"constructJavascriptRegExp");function yTi(e){var t="/"+e.source+"/";if(e.global)t+="g";if(e.multiline)t+="m";if(e.ignoreCase)t+="i";return t}a(yTi,"representJavascriptRegExp");function _Ti(e){return Object.prototype.toString.call(e)==="[object RegExp]"}a(_Ti,"isRegExp");dJt.exports=new mTi("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:hTi,construct:gTi,predicate:_Ti,represent:yTi})});var hJt=y((RYs,mJt)=>{"use strict";var Fne;try{fJt=require;Fne=fJt("esprima")}catch(e){if(typeof window!=="undefined")Fne=window.esprima}var fJt;var vTi=su();function ETi(e){if(e===null)return false;try{var t="("+e+")",r=Fne.parse(t,{range:true});if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(n){return false}}a(ETi,"resolveJavascriptFunction");function bTi(e){var t="("+e+")",r=Fne.parse(t,{range:true}),n=[],i;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}r.body[0].expression.params.forEach(function(s){n.push(s.name)});i=r.body[0].expression.body.range;if(r.body[0].expression.body.type==="BlockStatement"){return new Function(n,t.slice(i[0]+1,i[1]-1))}return new Function(n,"return "+t.slice(i[0],i[1]))}a(bTi,"constructJavascriptFunction");function STi(e){return e.toString()}a(STi,"representJavascriptFunction");function ATi(e){return Object.prototype.toString.call(e)==="[object Function]"}a(ATi,"isFunction");mJt.exports=new vTi("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:ETi,construct:bTi,predicate:ATi,represent:STi})});var Tq=y((PYs,yJt)=>{"use strict";var gJt=Tw();yJt.exports=gJt.DEFAULT=new gJt({include:[g3()],explicit:[cJt(),pJt(),hJt()]})});var FJt=y((NYs,xq)=>{"use strict";var e_=ww();var CJt=m3();var CTi=CXt();var wJt=g3();var wTi=Tq();var Zb=Object.prototype.hasOwnProperty;var Bne=1;var TJt=2;var xJt=3;var Mne=4;var j8e=1;var TTi=2;var _Jt=3;var xTi=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var RTi=/[\x85\u2028\u2029]/;var OTi=/[,\[\]\{\}]/;var RJt=/^(?:!|!!|![a-z\-]+!)$/i;var OJt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function vJt(e){return Object.prototype.toString.call(e)}a(vJt,"_class");function Dg(e){return e===10||e===13}a(Dg,"is_EOL");function Ow(e){return e===9||e===32}a(Ow,"is_WHITE_SPACE");function Gd(e){return e===9||e===32||e===10||e===13}a(Gd,"is_WS_OR_EOL");function y3(e){return e===44||e===91||e===93||e===123||e===125}a(y3,"is_FLOW_INDICATOR");function PTi(e){var t;if(48<=e&&e<=57){return e-48}t=e|32;if(97<=t&&t<=102){return t-97+10}return-1}a(PTi,"fromHexCode");function NTi(e){if(e===120){return 2}if(e===117){return 4}if(e===85){return 8}return 0}a(NTi,"escapedHexLen");function ITi(e){if(48<=e&&e<=57){return e-48}return-1}a(ITi,"fromDecimalCode");function EJt(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116?" ":e===9?" ":e===110?"\n":e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}a(EJt,"simpleEscapeSequence");function kTi(e){if(e<=65535){return String.fromCharCode(e)}return String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}a(kTi,"charFromCodepoint");var PJt=new Array(256);var NJt=new Array(256);for(Rw=0;Rw<256;Rw++){PJt[Rw]=EJt(Rw)?1:0;NJt[Rw]=EJt(Rw)}var Rw;function DTi(e,t){this.input=e;this.filename=t["filename"]||null;this.schema=t["schema"]||wTi;this.onWarning=t["onWarning"]||null;this.legacy=t["legacy"]||false;this.json=t["json"]||false;this.listener=t["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}a(DTi,"State");function IJt(e,t){return new CJt(t,new CTi(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}a(IJt,"generateError");function Mr(e,t){throw IJt(e,t)}a(Mr,"throwError");function qne(e,t){if(e.onWarning){e.onWarning.call(null,IJt(e,t))}}a(qne,"throwWarning");var bJt={YAML:a(function e(t,r,n){var i,s,o;if(t.version!==null){Mr(t,"duplication of %YAML directive")}if(n.length!==1){Mr(t,"YAML directive accepts exactly one argument")}i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]);if(i===null){Mr(t,"ill-formed argument of the YAML directive")}s=parseInt(i[1],10);o=parseInt(i[2],10);if(s!==1){Mr(t,"unacceptable YAML version of the document")}t.version=n[0];t.checkLineBreaks=o<2;if(o!==1&&o!==2){qne(t,"unsupported YAML version of the document")}},"handleYamlDirective"),TAG:a(function e(t,r,n){var i,s;if(n.length!==2){Mr(t,"TAG directive accepts exactly two arguments")}i=n[0];s=n[1];if(!RJt.test(i)){Mr(t,"ill-formed tag handle (first argument) of the TAG directive")}if(Zb.call(t.tagMap,i)){Mr(t,'there is a previously declared suffix for "'+i+'" tag handle')}if(!OJt.test(s)){Mr(t,"ill-formed tag prefix (second argument) of the TAG directive")}t.tagMap[i]=s},"handleTagDirective")};function Qb(e,t,r,n){var i,s,o,u;if(t<r){u=e.input.slice(t,r);if(n){for(i=0,s=u.length;i<s;i+=1){o=u.charCodeAt(i);if(!(o===9||32<=o&&o<=1114111)){Mr(e,"expected valid JSON character")}}}else if(xTi.test(u)){Mr(e,"the stream contains non-printable characters")}e.result+=u}}a(Qb,"captureSegment");function SJt(e,t,r,n){var i,s,o,u;if(!e_.isObject(r)){Mr(e,"cannot merge mappings; the provided source object is unacceptable")}i=Object.keys(r);for(o=0,u=i.length;o<u;o+=1){s=i[o];if(!Zb.call(t,s)){t[s]=r[s];n[s]=true}}}a(SJt,"mergeMappings");function _3(e,t,r,n,i,s,o,u){var l,c;if(Array.isArray(i)){i=Array.prototype.slice.call(i);for(l=0,c=i.length;l<c;l+=1){if(Array.isArray(i[l])){Mr(e,"nested arrays are not supported inside keys")}if(typeof i==="object"&&vJt(i[l])==="[object Object]"){i[l]="[object Object]"}}}if(typeof i==="object"&&vJt(i)==="[object Object]"){i="[object Object]"}i=String(i);if(t===null){t={}}if(n==="tag:yaml.org,2002:merge"){if(Array.isArray(s)){for(l=0,c=s.length;l<c;l+=1){SJt(e,t,s[l],r)}}else{SJt(e,t,s,r)}}else{if(!e.json&&!Zb.call(r,i)&&Zb.call(t,i)){e.line=o||e.line;e.position=u||e.position;Mr(e,"duplicated mapping key")}t[i]=s;delete r[i]}return t}a(_3,"storeMappingPair");function G8e(e){var t;t=e.input.charCodeAt(e.position);if(t===10){e.position++}else if(t===13){e.position++;if(e.input.charCodeAt(e.position)===10){e.position++}}else{Mr(e,"a line break is expected")}e.line+=1;e.lineStart=e.position}a(G8e,"readLineBreak");function Wo(e,t,r){var n=0,i=e.input.charCodeAt(e.position);while(i!==0){while(Ow(i)){i=e.input.charCodeAt(++e.position)}if(t&&i===35){do{i=e.input.charCodeAt(++e.position)}while(i!==10&&i!==13&&i!==0)}if(Dg(i)){G8e(e);i=e.input.charCodeAt(e.position);n++;e.lineIndent=0;while(i===32){e.lineIndent++;i=e.input.charCodeAt(++e.position)}}else{break}}if(r!==-1&&n!==0&&e.lineIndent<r){qne(e,"deficient indentation")}return n}a(Wo,"skipSeparationSpace");function Une(e){var t=e.position,r;r=e.input.charCodeAt(t);if((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)){t+=3;r=e.input.charCodeAt(t);if(r===0||Gd(r)){return true}}return false}a(Une,"testDocumentSeparator");function H8e(e,t){if(t===1){e.result+=" "}else if(t>1){e.result+=e_.repeat("\n",t-1)}}a(H8e,"writeFoldedLines");function LTi(e,t,r){var n,i,s,o,u,l,c,d,p=e.kind,f=e.result,m;m=e.input.charCodeAt(e.position);if(Gd(m)||y3(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96){return false}if(m===63||m===45){i=e.input.charCodeAt(e.position+1);if(Gd(i)||r&&y3(i)){return false}}e.kind="scalar";e.result="";s=o=e.position;u=false;while(m!==0){if(m===58){i=e.input.charCodeAt(e.position+1);if(Gd(i)||r&&y3(i)){break}}else if(m===35){n=e.input.charCodeAt(e.position-1);if(Gd(n)){break}}else if(e.position===e.lineStart&&Une(e)||r&&y3(m)){break}else if(Dg(m)){l=e.line;c=e.lineStart;d=e.lineIndent;Wo(e,false,-1);if(e.lineIndent>=t){u=true;m=e.input.charCodeAt(e.position);continue}else{e.position=o;e.line=l;e.lineStart=c;e.lineIndent=d;break}}if(u){Qb(e,s,o,false);H8e(e,e.line-l);s=o=e.position;u=false}if(!Ow(m)){o=e.position+1}m=e.input.charCodeAt(++e.position)}Qb(e,s,o,false);if(e.result){return true}e.kind=p;e.result=f;return false}a(LTi,"readPlainScalar");function FTi(e,t){var r,n,i;r=e.input.charCodeAt(e.position);if(r!==39){return false}e.kind="scalar";e.result="";e.position++;n=i=e.position;while((r=e.input.charCodeAt(e.position))!==0){if(r===39){Qb(e,n,e.position,true);r=e.input.charCodeAt(++e.position);if(r===39){n=e.position;e.position++;i=e.position}else{return true}}else if(Dg(r)){Qb(e,n,i,true);H8e(e,Wo(e,false,t));n=i=e.position}else if(e.position===e.lineStart&&Une(e)){Mr(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;i=e.position}}Mr(e,"unexpected end of the stream within a single quoted scalar")}a(FTi,"readSingleQuotedScalar");function BTi(e,t){var r,n,i,s,o,u;u=e.input.charCodeAt(e.position);if(u!==34){return false}e.kind="scalar";e.result="";e.position++;r=n=e.position;while((u=e.input.charCodeAt(e.position))!==0){if(u===34){Qb(e,r,e.position,true);e.position++;return true}else if(u===92){Qb(e,r,e.position,true);u=e.input.charCodeAt(++e.position);if(Dg(u)){Wo(e,false,t)}else if(u<256&&PJt[u]){e.result+=NJt[u];e.position++}else if((o=NTi(u))>0){i=o;s=0;for(;i>0;i--){u=e.input.charCodeAt(++e.position);if((o=PTi(u))>=0){s=(s<<4)+o}else{Mr(e,"expected hexadecimal character")}}e.result+=kTi(s);e.position++}else{Mr(e,"unknown escape sequence")}r=n=e.position}else if(Dg(u)){Qb(e,r,n,true);H8e(e,Wo(e,false,t));r=n=e.position}else if(e.position===e.lineStart&&Une(e)){Mr(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;n=e.position}}Mr(e,"unexpected end of the stream within a double quoted scalar")}a(BTi,"readDoubleQuotedScalar");function MTi(e,t){var r=true,n,i=e.tag,s,o=e.anchor,u,l,c,d,p,f={},m,h,g,_;_=e.input.charCodeAt(e.position);if(_===91){l=93;p=false;s=[]}else if(_===123){l=125;p=true;s={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=s}_=e.input.charCodeAt(++e.position);while(_!==0){Wo(e,true,t);_=e.input.charCodeAt(e.position);if(_===l){e.position++;e.tag=i;e.anchor=o;e.kind=p?"mapping":"sequence";e.result=s;return true}else if(!r){Mr(e,"missed comma between flow collection entries")}h=m=g=null;c=d=false;if(_===63){u=e.input.charCodeAt(e.position+1);if(Gd(u)){c=d=true;e.position++;Wo(e,true,t)}}n=e.line;v3(e,t,Bne,false,true);h=e.tag;m=e.result;Wo(e,true,t);_=e.input.charCodeAt(e.position);if((d||e.line===n)&&_===58){c=true;_=e.input.charCodeAt(++e.position);Wo(e,true,t);v3(e,t,Bne,false,true);g=e.result}if(p){_3(e,s,f,h,m,g)}else if(c){s.push(_3(e,null,f,h,m,g))}else{s.push(m)}Wo(e,true,t);_=e.input.charCodeAt(e.position);if(_===44){r=true;_=e.input.charCodeAt(++e.position)}else{r=false}}Mr(e,"unexpected end of the stream within a flow collection")}a(MTi,"readFlowCollection");function qTi(e,t){var r,n,i=j8e,s=false,o=false,u=t,l=0,c=false,d,p;p=e.input.charCodeAt(e.position);if(p===124){n=false}else if(p===62){n=true}else{return false}e.kind="scalar";e.result="";while(p!==0){p=e.input.charCodeAt(++e.position);if(p===43||p===45){if(j8e===i){i=p===43?_Jt:TTi}else{Mr(e,"repeat of a chomping mode identifier")}}else if((d=ITi(p))>=0){if(d===0){Mr(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!o){u=t+d-1;o=true}else{Mr(e,"repeat of an indentation width identifier")}}else{break}}if(Ow(p)){do{p=e.input.charCodeAt(++e.position)}while(Ow(p));if(p===35){do{p=e.input.charCodeAt(++e.position)}while(!Dg(p)&&p!==0)}}while(p!==0){G8e(e);e.lineIndent=0;p=e.input.charCodeAt(e.position);while((!o||e.lineIndent<u)&&p===32){e.lineIndent++;p=e.input.charCodeAt(++e.position)}if(!o&&e.lineIndent>u){u=e.lineIndent}if(Dg(p)){l++;continue}if(e.lineIndent<u){if(i===_Jt){e.result+=e_.repeat("\n",s?1+l:l)}else if(i===j8e){if(s){e.result+="\n"}}break}if(n){if(Ow(p)){c=true;e.result+=e_.repeat("\n",s?1+l:l)}else if(c){c=false;e.result+=e_.repeat("\n",l+1)}else if(l===0){if(s){e.result+=" "}}else{e.result+=e_.repeat("\n",l)}}else{e.result+=e_.repeat("\n",s?1+l:l)}s=true;o=true;l=0;r=e.position;while(!Dg(p)&&p!==0){p=e.input.charCodeAt(++e.position)}Qb(e,r,e.position,false)}return true}a(qTi,"readBlockScalar");function AJt(e,t){var r,n=e.tag,i=e.anchor,s=[],o,u=false,l;if(e.anchor!==null){e.anchorMap[e.anchor]=s}l=e.input.charCodeAt(e.position);while(l!==0){if(l!==45){break}o=e.input.charCodeAt(e.position+1);if(!Gd(o)){break}u=true;e.position++;if(Wo(e,true,-1)){if(e.lineIndent<=t){s.push(null);l=e.input.charCodeAt(e.position);continue}}r=e.line;v3(e,t,xJt,false,true);s.push(e.result);Wo(e,true,-1);l=e.input.charCodeAt(e.position);if((e.line===r||e.lineIndent>t)&&l!==0){Mr(e,"bad indentation of a sequence entry")}else if(e.lineIndent<t){break}}if(u){e.tag=n;e.anchor=i;e.kind="sequence";e.result=s;return true}return false}a(AJt,"readBlockSequence");function UTi(e,t,r){var n,i,s,o,u=e.tag,l=e.anchor,c={},d={},p=null,f=null,m=null,h=false,g=false,_;if(e.anchor!==null){e.anchorMap[e.anchor]=c}_=e.input.charCodeAt(e.position);while(_!==0){n=e.input.charCodeAt(e.position+1);s=e.line;o=e.position;if((_===63||_===58)&&Gd(n)){if(_===63){if(h){_3(e,c,d,p,f,null);p=f=m=null}g=true;h=true;i=true}else if(h){h=false;i=true}else{Mr(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line")}e.position+=1;_=n}else if(v3(e,r,TJt,false,true)){if(e.line===s){_=e.input.charCodeAt(e.position);while(Ow(_)){_=e.input.charCodeAt(++e.position)}if(_===58){_=e.input.charCodeAt(++e.position);if(!Gd(_)){Mr(e,"a whitespace character is expected after the key-value separator within a block mapping")}if(h){_3(e,c,d,p,f,null);p=f=m=null}g=true;h=false;i=false;p=e.tag;f=e.result}else if(g){Mr(e,"can not read an implicit mapping pair; a colon is missed")}else{e.tag=u;e.anchor=l;return true}}else if(g){Mr(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}else{e.tag=u;e.anchor=l;return true}}else{break}if(e.line===s||e.lineIndent>t){if(v3(e,t,Mne,true,i)){if(h){f=e.result}else{m=e.result}}if(!h){_3(e,c,d,p,f,m,s,o);p=f=m=null}Wo(e,true,-1);_=e.input.charCodeAt(e.position)}if(e.lineIndent>t&&_!==0){Mr(e,"bad indentation of a mapping entry")}else if(e.lineIndent<t){break}}if(h){_3(e,c,d,p,f,null)}if(g){e.tag=u;e.anchor=l;e.kind="mapping";e.result=c}return g}a(UTi,"readBlockMapping");function $Ti(e){var t,r=false,n=false,i,s,o;o=e.input.charCodeAt(e.position);if(o!==33)return false;if(e.tag!==null){Mr(e,"duplication of a tag property")}o=e.input.charCodeAt(++e.position);if(o===60){r=true;o=e.input.charCodeAt(++e.position)}else if(o===33){n=true;i="!!";o=e.input.charCodeAt(++e.position)}else{i="!"}t=e.position;if(r){do{o=e.input.charCodeAt(++e.position)}while(o!==0&&o!==62);if(e.position<e.length){s=e.input.slice(t,e.position);o=e.input.charCodeAt(++e.position)}else{Mr(e,"unexpected end of the stream within a verbatim tag")}}else{while(o!==0&&!Gd(o)){if(o===33){if(!n){i=e.input.slice(t-1,e.position+1);if(!RJt.test(i)){Mr(e,"named tag handle cannot contain such characters")}n=true;t=e.position+1}else{Mr(e,"tag suffix cannot contain exclamation marks")}}o=e.input.charCodeAt(++e.position)}s=e.input.slice(t,e.position);if(OTi.test(s)){Mr(e,"tag suffix cannot contain flow indicator characters")}}if(s&&!OJt.test(s)){Mr(e,"tag name cannot contain such characters: "+s)}if(r){e.tag=s}else if(Zb.call(e.tagMap,i)){e.tag=e.tagMap[i]+s}else if(i==="!"){e.tag="!"+s}else if(i==="!!"){e.tag="tag:yaml.org,2002:"+s}else{Mr(e,'undeclared tag handle "'+i+'"')}return true}a($Ti,"readTagProperty");function jTi(e){var t,r;r=e.input.charCodeAt(e.position);if(r!==38)return false;if(e.anchor!==null){Mr(e,"duplication of an anchor property")}r=e.input.charCodeAt(++e.position);t=e.position;while(r!==0&&!Gd(r)&&!y3(r)){r=e.input.charCodeAt(++e.position)}if(e.position===t){Mr(e,"name of an anchor node must contain at least one character")}e.anchor=e.input.slice(t,e.position);return true}a(jTi,"readAnchorProperty");function GTi(e){var t,r,n;n=e.input.charCodeAt(e.position);if(n!==42)return false;n=e.input.charCodeAt(++e.position);t=e.position;while(n!==0&&!Gd(n)&&!y3(n)){n=e.input.charCodeAt(++e.position)}if(e.position===t){Mr(e,"name of an alias node must contain at least one character")}r=e.input.slice(t,e.position);if(!Zb.call(e.anchorMap,r)){Mr(e,'unidentified alias "'+r+'"')}e.result=e.anchorMap[r];Wo(e,true,-1);return true}a(GTi,"readAlias");function v3(e,t,r,n,i){var s,o,u,l=1,c=false,d=false,p,f,m,h,g;if(e.listener!==null){e.listener("open",e)}e.tag=null;e.anchor=null;e.kind=null;e.result=null;s=o=u=Mne===r||xJt===r;if(n){if(Wo(e,true,-1)){c=true;if(e.lineIndent>t){l=1}else if(e.lineIndent===t){l=0}else if(e.lineIndent<t){l=-1}}}if(l===1){while($Ti(e)||jTi(e)){if(Wo(e,true,-1)){c=true;u=s;if(e.lineIndent>t){l=1}else if(e.lineIndent===t){l=0}else if(e.lineIndent<t){l=-1}}else{u=false}}}if(u){u=c||i}if(l===1||Mne===r){if(Bne===r||TJt===r){h=t}else{h=t+1}g=e.position-e.lineStart;if(l===1){if(u&&(AJt(e,g)||UTi(e,g,h))||MTi(e,h)){d=true}else{if(o&&qTi(e,h)||FTi(e,h)||BTi(e,h)){d=true}else if(GTi(e)){d=true;if(e.tag!==null||e.anchor!==null){Mr(e,"alias node should not have any properties")}}else if(LTi(e,h,Bne===r)){d=true;if(e.tag===null){e.tag="?"}}if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}else if(l===0){d=u&&AJt(e,g)}}if(e.tag!==null&&e.tag!=="!"){if(e.tag==="?"){if(e.result!==null&&e.kind!=="scalar"){Mr(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"')}for(p=0,f=e.implicitTypes.length;p<f;p+=1){m=e.implicitTypes[p];if(m.resolve(e.result)){e.result=m.construct(e.result);e.tag=m.tag;if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}break}}}else if(Zb.call(e.typeMap[e.kind||"fallback"],e.tag)){m=e.typeMap[e.kind||"fallback"][e.tag];if(e.result!==null&&m.kind!==e.kind){Mr(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"')}if(!m.resolve(e.result)){Mr(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=m.construct(e.result);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}else{Mr(e,"unknown tag !<"+e.tag+">")}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||d}a(v3,"composeNode");function HTi(e){var t=e.position,r,n,i,s=false,o;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap={};e.anchorMap={};while((o=e.input.charCodeAt(e.position))!==0){Wo(e,true,-1);o=e.input.charCodeAt(e.position);if(e.lineIndent>0||o!==37){break}s=true;o=e.input.charCodeAt(++e.position);r=e.position;while(o!==0&&!Gd(o)){o=e.input.charCodeAt(++e.position)}n=e.input.slice(r,e.position);i=[];if(n.length<1){Mr(e,"directive name must not be less than one character in length")}while(o!==0){while(Ow(o)){o=e.input.charCodeAt(++e.position)}if(o===35){do{o=e.input.charCodeAt(++e.position)}while(o!==0&&!Dg(o));break}if(Dg(o))break;r=e.position;while(o!==0&&!Gd(o)){o=e.input.charCodeAt(++e.position)}i.push(e.input.slice(r,e.position))}if(o!==0)G8e(e);if(Zb.call(bJt,n)){bJt[n](e,n,i)}else{qne(e,'unknown document directive "'+n+'"')}}Wo(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;Wo(e,true,-1)}else if(s){Mr(e,"directives end mark is expected")}v3(e,e.lineIndent-1,Mne,false,true);Wo(e,true,-1);if(e.checkLineBreaks&&RTi.test(e.input.slice(t,e.position))){qne(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&Une(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;Wo(e,true,-1)}return}if(e.position<e.length-1){Mr(e,"end of the stream or a document separator is expected")}else{return}}a(HTi,"readDocument");function kJt(e,t){e=String(e);t=t||{};if(e.length!==0){if(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13){e+="\n"}if(e.charCodeAt(0)===65279){e=e.slice(1)}}var r=new DTi(e,t);var n=e.indexOf("\0");if(n!==-1){r.position=n;Mr(r,"null byte is not allowed in input")}r.input+="\0";while(r.input.charCodeAt(r.position)===32){r.lineIndent+=1;r.position+=1}while(r.position<r.length-1){HTi(r)}return r.documents}a(kJt,"loadDocuments");function DJt(e,t,r){if(t!==null&&typeof t==="object"&&typeof r==="undefined"){r=t;t=null}var n=kJt(e,r);if(typeof t!=="function"){return n}for(var i=0,s=n.length;i<s;i+=1){t(n[i])}}a(DJt,"loadAll");function LJt(e,t){var r=kJt(e,t);if(r.length===0){return void 0}else if(r.length===1){return r[0]}throw new CJt("expected a single document in the stream, but found more")}a(LJt,"load");function VTi(e,t,r){if(typeof t==="object"&&t!==null&&typeof r==="undefined"){r=t;t=null}return DJt(e,t,e_.extend({schema:wJt},r))}a(VTi,"safeLoadAll");function zTi(e,t){return LJt(e,e_.extend({schema:wJt},t))}a(zTi,"safeLoad");xq.exports.loadAll=DJt;xq.exports.load=LJt;xq.exports.safeLoadAll=VTi;xq.exports.safeLoad=zTi});var sQt=y((kYs,W8e)=>{"use strict";var Oq=ww();var Pq=m3();var KTi=Tq();var WTi=g3();var HJt=Object.prototype.toString;var VJt=Object.prototype.hasOwnProperty;var YTi=9;var Rq=10;var XTi=13;var JTi=32;var QTi=33;var ZTi=34;var zJt=35;var exi=37;var txi=38;var rxi=39;var nxi=42;var KJt=44;var ixi=45;var WJt=58;var sxi=61;var axi=62;var oxi=63;var uxi=64;var YJt=91;var XJt=93;var lxi=96;var JJt=123;var cxi=124;var QJt=125;var Yl={};Yl[0]="\\0";Yl[7]="\\a";Yl[8]="\\b";Yl[9]="\\t";Yl[10]="\\n";Yl[11]="\\v";Yl[12]="\\f";Yl[13]="\\r";Yl[27]="\\e";Yl[34]='\\"';Yl[92]="\\\\";Yl[133]="\\N";Yl[160]="\\_";Yl[8232]="\\L";Yl[8233]="\\P";var dxi=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function pxi(e,t){var r,n,i,s,o,u,l;if(t===null)return{};r={};n=Object.keys(t);for(i=0,s=n.length;i<s;i+=1){o=n[i];u=String(t[o]);if(o.slice(0,2)==="!!"){o="tag:yaml.org,2002:"+o.slice(2)}l=e.compiledTypeMap["fallback"][o];if(l&&VJt.call(l.styleAliases,u)){u=l.styleAliases[u]}r[o]=u}return r}a(pxi,"compileStyleMap");function BJt(e){var t,r,n;t=e.toString(16).toUpperCase();if(e<=255){r="x";n=2}else if(e<=65535){r="u";n=4}else if(e<=4294967295){r="U";n=8}else{throw new Pq("code point within a string may not be greater than 0xFFFFFFFF")}return"\\"+r+Oq.repeat("0",n-t.length)+t}a(BJt,"encodeHex");function fxi(e){this.schema=e["schema"]||KTi;this.indent=Math.max(1,e["indent"]||2);this.noArrayIndent=e["noArrayIndent"]||false;this.skipInvalid=e["skipInvalid"]||false;this.flowLevel=Oq.isNothing(e["flowLevel"])?-1:e["flowLevel"];this.styleMap=pxi(this.schema,e["styles"]||null);this.sortKeys=e["sortKeys"]||false;this.lineWidth=e["lineWidth"]||80;this.noRefs=e["noRefs"]||false;this.noCompatMode=e["noCompatMode"]||false;this.condenseFlow=e["condenseFlow"]||false;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}a(fxi,"State");function MJt(e,t){var r=Oq.repeat(" ",t),n=0,i=-1,s="",o,u=e.length;while(n<u){i=e.indexOf("\n",n);if(i===-1){o=e.slice(n);n=u}else{o=e.slice(n,i+1);n=i+1}if(o.length&&o!=="\n")s+=r;s+=o}return s}a(MJt,"indentString");function V8e(e,t){return"\n"+Oq.repeat(" ",e.indent*t)}a(V8e,"generateNextLine");function mxi(e,t){var r,n,i;for(r=0,n=e.implicitTypes.length;r<n;r+=1){i=e.implicitTypes[r];if(i.resolve(t)){return true}}return false}a(mxi,"testImplicitResolving");function K8e(e){return e===JTi||e===YTi}a(K8e,"isWhitespace");function E3(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}a(E3,"isPrintable");function hxi(e){return E3(e)&&!K8e(e)&&e!==65279&&e!==XTi&&e!==Rq}a(hxi,"isNsChar");function qJt(e,t){return E3(e)&&e!==65279&&e!==KJt&&e!==YJt&&e!==XJt&&e!==JJt&&e!==QJt&&e!==WJt&&(e!==zJt||t&&hxi(t))}a(qJt,"isPlainSafe");function gxi(e){return E3(e)&&e!==65279&&!K8e(e)&&e!==ixi&&e!==oxi&&e!==WJt&&e!==KJt&&e!==YJt&&e!==XJt&&e!==JJt&&e!==QJt&&e!==zJt&&e!==txi&&e!==nxi&&e!==QTi&&e!==cxi&&e!==sxi&&e!==axi&&e!==rxi&&e!==ZTi&&e!==exi&&e!==uxi&&e!==lxi}a(gxi,"isPlainSafeFirst");function ZJt(e){var t=/^\n* /;return t.test(e)}a(ZJt,"needIndentIndicator");var eQt=1;var tQt=2;var rQt=3;var nQt=4;var $ne=5;function yxi(e,t,r,n,i){var s;var o,u;var l=false;var c=false;var d=n!==-1;var p=-1;var f=gxi(e.charCodeAt(0))&&!K8e(e.charCodeAt(e.length-1));if(t){for(s=0;s<e.length;s++){o=e.charCodeAt(s);if(!E3(o)){return $ne}u=s>0?e.charCodeAt(s-1):null;f=f&&qJt(o,u)}}else{for(s=0;s<e.length;s++){o=e.charCodeAt(s);if(o===Rq){l=true;if(d){c=c||s-p-1>n&&e[p+1]!==" ";p=s}}else if(!E3(o)){return $ne}u=s>0?e.charCodeAt(s-1):null;f=f&&qJt(o,u)}c=c||d&&(s-p-1>n&&e[p+1]!==" ")}if(!l&&!c){return f&&!i(e)?eQt:tQt}if(r>9&&ZJt(e)){return $ne}return c?nQt:rQt}a(yxi,"chooseScalarStyle");function _xi(e,t,r,n){e.dump=function(){if(t.length===0){return"''"}if(!e.noCompatMode&&dxi.indexOf(t)!==-1){return"'"+t+"'"}var i=e.indent*Math.max(1,r);var s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i);var o=n||e.flowLevel>-1&&r>=e.flowLevel;function u(l){return mxi(e,l)}a(u,"testAmbiguity");switch(yxi(t,o,e.indent,s,u)){case eQt:return t;case tQt:return"'"+t.replace(/'/g,"''")+"'";case rQt:return"|"+UJt(t,e.indent)+$Jt(MJt(t,i));case nQt:return">"+UJt(t,e.indent)+$Jt(MJt(vxi(t,s),i));case $ne:return'"'+Exi(t,s)+'"';default:throw new Pq("impossible error: invalid scalar style")}}()}a(_xi,"writeScalar");function UJt(e,t){var r=ZJt(e)?String(t):"";var n=e[e.length-1]==="\n";var i=n&&(e[e.length-2]==="\n"||e==="\n");var s=i?"+":n?"":"-";return r+s+"\n"}a(UJt,"blockHeader");function $Jt(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}a($Jt,"dropEndingNewline");function vxi(e,t){var r=/(\n+)([^\n]*)/g;var n=function(){var c=e.indexOf("\n");c=c!==-1?c:e.length;r.lastIndex=c;return jJt(e.slice(0,c),t)}();var i=e[0]==="\n"||e[0]===" ";var s;var o;while(o=r.exec(e)){var u=o[1],l=o[2];s=l[0]===" ";n+=u+(!i&&!s&&l!==""?"\n":"")+jJt(l,t);i=s}return n}a(vxi,"foldString");function jJt(e,t){if(e===""||e[0]===" ")return e;var r=/ [^ ]/g;var n;var i=0,s,o=0,u=0;var l="";while(n=r.exec(e)){u=n.index;if(u-i>t){s=o>i?o:u;l+="\n"+e.slice(i,s);i=s+1}o=u}l+="\n";if(e.length-i>t&&o>i){l+=e.slice(i,o)+"\n"+e.slice(o+1)}else{l+=e.slice(i)}return l.slice(1)}a(jJt,"foldLine");function Exi(e){var t="";var r,n;var i;for(var s=0;s<e.length;s++){r=e.charCodeAt(s);if(r>=55296&&r<=56319){n=e.charCodeAt(s+1);if(n>=56320&&n<=57343){t+=BJt((r-55296)*1024+n-56320+65536);s++;continue}}i=Yl[r];t+=!i&&E3(r)?e[s]:i||BJt(r)}return t}a(Exi,"escapeString");function bxi(e,t,r){var n="",i=e.tag,s,o;for(s=0,o=r.length;s<o;s+=1){if(Pw(e,t,r[s],false,false)){if(s!==0)n+=","+(!e.condenseFlow?" ":"");n+=e.dump}}e.tag=i;e.dump="["+n+"]"}a(bxi,"writeFlowSequence");function Sxi(e,t,r,n){var i="",s=e.tag,o,u;for(o=0,u=r.length;o<u;o+=1){if(Pw(e,t+1,r[o],true,true)){if(!n||o!==0){i+=V8e(e,t)}if(e.dump&&Rq===e.dump.charCodeAt(0)){i+="-"}else{i+="- "}i+=e.dump}}e.tag=s;e.dump=i||"[]"}a(Sxi,"writeBlockSequence");function Axi(e,t,r){var n="",i=e.tag,s=Object.keys(r),o,u,l,c,d;for(o=0,u=s.length;o<u;o+=1){d="";if(o!==0)d+=", ";if(e.condenseFlow)d+='"';l=s[o];c=r[l];if(!Pw(e,t,l,false,false)){continue}if(e.dump.length>1024)d+="? ";d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!Pw(e,t,c,false,false)){continue}d+=e.dump;n+=d}e.tag=i;e.dump="{"+n+"}"}a(Axi,"writeFlowMapping");function Cxi(e,t,r,n){var i="",s=e.tag,o=Object.keys(r),u,l,c,d,p,f;if(e.sortKeys===true){o.sort()}else if(typeof e.sortKeys==="function"){o.sort(e.sortKeys)}else if(e.sortKeys){throw new Pq("sortKeys must be a boolean or a function")}for(u=0,l=o.length;u<l;u+=1){f="";if(!n||u!==0){f+=V8e(e,t)}c=o[u];d=r[c];if(!Pw(e,t+1,c,true,true,true)){continue}p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024;if(p){if(e.dump&&Rq===e.dump.charCodeAt(0)){f+="?"}else{f+="? "}}f+=e.dump;if(p){f+=V8e(e,t)}if(!Pw(e,t+1,d,true,p)){continue}if(e.dump&&Rq===e.dump.charCodeAt(0)){f+=":"}else{f+=": "}f+=e.dump;i+=f}e.tag=s;e.dump=i||"{}"}a(Cxi,"writeBlockMapping");function GJt(e,t,r){var n,i,s,o,u,l;i=r?e.explicitTypes:e.implicitTypes;for(s=0,o=i.length;s<o;s+=1){u=i[s];if((u.instanceOf||u.predicate)&&(!u.instanceOf||typeof t==="object"&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){e.tag=r?u.tag:"?";if(u.represent){l=e.styleMap[u.tag]||u.defaultStyle;if(HJt.call(u.represent)==="[object Function]"){n=u.represent(t,l)}else if(VJt.call(u.represent,l)){n=u.represent[l](t,l)}else{throw new Pq("!<"+u.tag+'> tag resolver accepts not "'+l+'" style')}e.dump=n}return true}}return false}a(GJt,"detectType");function Pw(e,t,r,n,i,s){e.tag=null;e.dump=r;if(!GJt(e,r,false)){GJt(e,r,true)}var o=HJt.call(e.dump);if(n){n=e.flowLevel<0||e.flowLevel>t}var u=o==="[object Object]"||o==="[object Array]",l,c;if(u){l=e.duplicates.indexOf(r);c=l!==-1}if(e.tag!==null&&e.tag!=="?"||c||e.indent!==2&&t>0){i=false}if(c&&e.usedDuplicates[l]){e.dump="*ref_"+l}else{if(u&&c&&!e.usedDuplicates[l]){e.usedDuplicates[l]=true}if(o==="[object Object]"){if(n&&Object.keys(e.dump).length!==0){Cxi(e,t,e.dump,i);if(c){e.dump="&ref_"+l+e.dump}}else{Axi(e,t,e.dump);if(c){e.dump="&ref_"+l+" "+e.dump}}}else if(o==="[object Array]"){var d=e.noArrayIndent&&t>0?t-1:t;if(n&&e.dump.length!==0){Sxi(e,d,e.dump,i);if(c){e.dump="&ref_"+l+e.dump}}else{bxi(e,d,e.dump);if(c){e.dump="&ref_"+l+" "+e.dump}}}else if(o==="[object String]"){if(e.tag!=="?"){_xi(e,e.dump,t,s)}}else{if(e.skipInvalid)return false;throw new Pq("unacceptable kind of an object to dump "+o)}if(e.tag!==null&&e.tag!=="?"){e.dump="!<"+e.tag+"> "+e.dump}}return true}a(Pw,"writeNode");function wxi(e,t){var r=[],n=[],i,s;z8e(e,r,n);for(i=0,s=n.length;i<s;i+=1){t.duplicates.push(r[n[i]])}t.usedDuplicates=new Array(s)}a(wxi,"getDuplicateReferences");function z8e(e,t,r){var n,i,s;if(e!==null&&typeof e==="object"){i=t.indexOf(e);if(i!==-1){if(r.indexOf(i)===-1){r.push(i)}}else{t.push(e);if(Array.isArray(e)){for(i=0,s=e.length;i<s;i+=1){z8e(e[i],t,r)}}else{n=Object.keys(e);for(i=0,s=n.length;i<s;i+=1){z8e(e[n[i]],t,r)}}}}}a(z8e,"inspectNode");function iQt(e,t){t=t||{};var r=new fxi(t);if(!r.noRefs)wxi(e,r);if(Pw(r,0,e,true,true))return r.dump+"\n";return""}a(iQt,"dump");function Txi(e,t){return iQt(e,Oq.extend({schema:WTi},t))}a(Txi,"safeDump");W8e.exports.dump=iQt;W8e.exports.safeDump=Txi});var oQt=y((LYs,co)=>{"use strict";var jne=FJt();var aQt=sQt();function Gne(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}a(Gne,"deprecated");co.exports.Type=su();co.exports.Schema=Tw();co.exports.FAILSAFE_SCHEMA=Lne();co.exports.JSON_SCHEMA=q8e();co.exports.CORE_SCHEMA=U8e();co.exports.DEFAULT_SAFE_SCHEMA=g3();co.exports.DEFAULT_FULL_SCHEMA=Tq();co.exports.load=jne.load;co.exports.loadAll=jne.loadAll;co.exports.safeLoad=jne.safeLoad;co.exports.safeLoadAll=jne.safeLoadAll;co.exports.dump=aQt.dump;co.exports.safeDump=aQt.safeDump;co.exports.YAMLException=m3();co.exports.MINIMAL_SCHEMA=Lne();co.exports.SAFE_SCHEMA=g3();co.exports.DEFAULT_SCHEMA=Tq();co.exports.scan=Gne("scan");co.exports.parse=Gne("parse");co.exports.compose=Gne("compose");co.exports.addConstructor=Gne("addConstructor")});var lQt=y((BYs,uQt)=>{"use strict";var xxi=oQt();uQt.exports=xxi});var dQt=y((MYs,cQt)=>{cQt.exports=require("util").format});var t_=y((qYs,Vh)=>{"use strict";var Rxi=dQt();var Y8e=Array.prototype.slice;var Oxi=["name","message","stack"];var Pxi=["name","message","description","number","code","fileName","lineNumber","columnNumber","sourceURL","line","column","stack"];Vh.exports=e2(Error);Vh.exports.error=e2(Error);Vh.exports.eval=e2(EvalError);Vh.exports.range=e2(RangeError);Vh.exports.reference=e2(ReferenceError);Vh.exports.syntax=e2(SyntaxError);Vh.exports.type=e2(TypeError);Vh.exports.uri=e2(URIError);Vh.exports.formatter=Rxi;function e2(e){return a(function t(r,n,i,s){var o=[];var u="";if(typeof r==="string"){o=Y8e.call(arguments);r=n=void 0}else if(typeof n==="string"){o=Y8e.call(arguments,1);n=void 0}else if(typeof i==="string"){o=Y8e.call(arguments,2)}if(o.length>0){u=Vh.exports.formatter.apply(null,o)}if(r&&r.message){u+=(u?" \n":"")+r.message}var l=new e(u);Nxi(l,r);Ixi(l);pQt(l,n);return l},"onoFactory")}a(e2,"create");function Nxi(e,t){Lxi(e,t);pQt(e,t)}a(Nxi,"extendError");function Ixi(e){e.toJSON=kxi;e.inspect=Dxi}a(Ixi,"extendToJSON");function pQt(e,t){if(t&&typeof t==="object"){var r=Object.keys(t);for(var n=0;n<r.length;n++){var i=r[n];if(Oxi.indexOf(i)>=0){continue}try{e[i]=t[i]}catch(s){}}}}a(pQt,"extend");function kxi(){var e={};var t=Object.keys(this);t=t.concat(Pxi);for(var r=0;r<t.length;r++){var n=t[r];var i=this[n];var s=typeof i;if(s!=="undefined"&&s!=="function"){e[n]=i}}return e}a(kxi,"errorToJSON");function Dxi(){return JSON.stringify(this,null,2).replace(/\\n/g,"\n")}a(Dxi,"errorToString");function Lxi(e,t){if(Bxi(e)){if(t){Mxi(e,t)}else{qxi(e)}}else{if(t){e.stack=fQt(e.stack,t.stack)}else{e.stack=X8e(e.stack)}}}a(Lxi,"extendStack");function fQt(e,t){e=X8e(e);if(e&&t){return e+"\n\n"+t}else{return e||t}}a(fQt,"joinStacks");function X8e(e){if(e){var t=e.split("\n");if(t.length<2){return e}for(var r=0;r<t.length;r++){var n=t[r];if(n.indexOf("onoFactory")>=0){t.splice(r,1);return t.join("\n")}}return e}}a(X8e,"popStack");var Fxi=function(){return!!(Object.getOwnPropertyDescriptor&&Object.defineProperty&&(typeof navigator==="undefined"||!/Android/.test(navigator.userAgent)))}();function Bxi(e){if(!Fxi){return false}var t=Object.getOwnPropertyDescriptor(e,"stack");if(!t){return false}return typeof t.get==="function"}a(Bxi,"hasLazyStack");function Mxi(e,t){var r=Object.getOwnPropertyDescriptor(e,"stack");Object.defineProperty(e,"stack",{get:function(){return fQt(r.get.apply(e),t.stack)},enumerable:false,configurable:true})}a(Mxi,"lazyJoinStacks");function qxi(e){var t=Object.getOwnPropertyDescriptor(e,"stack");Object.defineProperty(e,"stack",{get:function(){return X8e(t.get.apply(e))},enumerable:false,configurable:true})}a(qxi,"lazyPopStack")});var J8e=y(($Ys,gQt)=>{"use strict";var mQt=lQt();var hQt=t_();gQt.exports={parse:a(function e(t,r){try{return mQt.safeLoad(t)}catch(n){if(n instanceof Error){throw n}else{throw hQt(n,n.message)}}},"yamlParse"),stringify:a(function e(t,r,n){try{var i=(typeof n==="string"?n.length:n)||2;return mQt.safeDump(t,{indent:i})}catch(s){if(s instanceof Error){throw s}else{throw hQt(s,s.message)}}},"yamlStringify")}});var _Qt=y((GYs,yQt)=>{"use strict";var Uxi=J8e();yQt.exports={order:200,allowEmpty:true,canParse:[".yaml",".yml",".json"],parse:a(function e(t){return new Promise(function(r,n){var i=t.data;if(Buffer.isBuffer(i)){i=i.toString()}if(typeof i==="string"){r(Uxi.parse(i))}else{r(i)}})},"parseYAML")}});var EQt=y((VYs,vQt)=>{"use strict";var $xi=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;vQt.exports={order:300,allowEmpty:true,encoding:"utf8",canParse:a(function e(t){return(typeof t.data==="string"||Buffer.isBuffer(t.data))&&$xi.test(t.url)},"isText"),parse:a(function e(t){if(typeof t.data==="string"){return t.data}else if(Buffer.isBuffer(t.data)){return t.data.toString(this.encoding)}else{throw new Error("data is not text")}},"parseText")}});var SQt=y((KYs,bQt)=>{"use strict";var jxi=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;bQt.exports={order:400,allowEmpty:true,canParse:a(function e(t){return Buffer.isBuffer(t.data)&&jxi.test(t.url)},"isBinary"),parse:a(function e(t){if(Buffer.isBuffer(t.data)){return t.data}else{return new Buffer(t.data)}},"parseBinary")}});var Lg=y((pm,CQt)=>{"use strict";var Hne=/^win/.test(process.platform);var Gxi=/\//g;var Hxi=/^(\w{2,}):\/\//i;var AQt=CQt.exports;var Q8e=[/\?/g,"%3F",/\#/g,"%23"];var Z8e=[/\%23/g,"#",/\%24/g,"$",/\%26/g,"&",/\%2C/g,",",/\%40/g,"@"];pm.parse=require("url").parse;pm.resolve=require("url").resolve;pm.cwd=a(function e(){return process.browser?location.href:process.cwd()+"/"},"cwd");pm.getProtocol=a(function e(t){var r=Hxi.exec(t);if(r){return r[1].toLowerCase()}},"getProtocol");pm.getExtension=a(function e(t){var r=t.lastIndexOf(".");if(r>=0){return t.substr(r).toLowerCase()}return""},"getExtension");pm.getHash=a(function e(t){var r=t.indexOf("#");if(r>=0){return t.substr(r)}return"#"},"getHash");pm.stripHash=a(function e(t){var r=t.indexOf("#");if(r>=0){t=t.substr(0,r)}return t},"stripHash");pm.isHttp=a(function e(t){var r=AQt.getProtocol(t);if(r==="http"||r==="https"){return true}else if(r===void 0){return process.browser}else{return false}},"isHttp");pm.isFileSystemPath=a(function e(t){if(process.browser){return false}var r=AQt.getProtocol(t);return r===void 0||r==="file"},"isFileSystemPath");pm.fromFileSystemPath=a(function e(t){if(Hne){t=t.replace(/\\/g,"/")}t=encodeURI(t);for(var r=0;r<Q8e.length;r+=2){t=t.replace(Q8e[r],Q8e[r+1])}return t},"fromFileSystemPath");pm.toFileSystemPath=a(function e(t,r){t=decodeURI(t);for(var n=0;n<Z8e.length;n+=2){t=t.replace(Z8e[n],Z8e[n+1])}var i=t.substr(0,7).toLowerCase()==="file://";if(i){t=t[7]==="/"?t.substr(8):t.substr(7);if(Hne&&t[1]==="/"){t=t[0]+":"+t.substr(1)}if(r){t="file:///"+t}else{i=false;t=Hne?t:"/"+t}}if(Hne&&!i){t=t.replace(Gxi,"\\");if(t.substr(1,2)===":\\"){t=t[0].toUpperCase()+t.substr(1)}}return t},"toFileSystemPath")});var xQt=y((XYs,TQt)=>{"use strict";var Vxi=require("fs");var e9e=t_();var wQt=Lg();TQt.exports={order:100,canRead:a(function e(t){return wQt.isFileSystemPath(t.url)},"isFile"),read:a(function e(t){return new Promise(function(r,n){var i;try{i=wQt.toFileSystemPath(t.url)}catch(s){n(e9e.uri(s,"Malformed URI: %s",t.url))}try{Vxi.readFile(i,function(s,o){if(s){n(e9e(s,'Error opening file "%s"',i))}else{r(o)}})}catch(s){n(e9e(s,'Error opening file "%s"',i))}})},"readFile")}});var PQt=y((QYs,OQt)=>{"use strict";var zxi=require("http");var Kxi=require("https");var Vne=t_();var Nq=Lg();OQt.exports={order:200,headers:null,timeout:5e3,redirects:5,withCredentials:false,canRead:a(function e(t){return Nq.isHttp(t.url)},"isHttp"),read:a(function e(t){var r=Nq.parse(t.url);if(process.browser&&!r.protocol){r.protocol=Nq.parse(location.href).protocol}return RQt(r,this)},"readHttp")};function RQt(e,t,r){return new Promise(function(n,i){e=Nq.parse(e);r=r||[];r.push(e.href);Wxi(e,t).then(function(s){if(s.statusCode>=400){throw Vne({status:s.statusCode},"HTTP ERROR %d",s.statusCode)}else if(s.statusCode>=300){if(r.length>t.redirects){i(Vne({status:s.statusCode},"Error downloading %s. \nToo many redirects: \n %s",r[0],r.join(" \n ")))}else if(!s.headers.location){throw Vne({status:s.statusCode},"HTTP %d redirect with no location header",s.statusCode)}else{var o=Nq.resolve(e,s.headers.location);RQt(o,t,r).then(n,i)}}else{n(s.body||new Buffer(0))}}).catch(function(s){i(Vne(s,"Error downloading",e.href))})})}a(RQt,"download");function Wxi(e,t){return new Promise(function(r,n){var i=e.protocol==="https:"?Kxi:zxi;var s=i.get({hostname:e.hostname,port:e.port,path:e.path,auth:e.auth,protocol:e.protocol,headers:t.headers||{},withCredentials:t.withCredentials});if(typeof s.setTimeout==="function"){s.setTimeout(t.timeout)}s.on("timeout",function(){s.abort()});s.on("error",n);s.once("response",function(o){o.body=new Buffer(0);o.on("data",function(u){o.body=Buffer.concat([o.body,new Buffer(u)])});o.on("error",n);o.on("end",function(){r(o)})})})}a(Wxi,"get")});var n9e=y((eXs,IQt)=>{"use strict";var Yxi=vXt();var Xxi=_Qt();var Jxi=EQt();var Qxi=SQt();var Zxi=xQt();var eRi=PQt();IQt.exports=r9e;function r9e(e){t9e(this,r9e.defaults);t9e(this,e)}a(r9e,"$RefParserOptions");r9e.defaults={parse:{json:Yxi,yaml:Xxi,text:Jxi,binary:Qxi},resolve:{file:Zxi,http:eRi,external:true},dereference:{circular:true}};function t9e(e,t){if(NQt(t)){var r=Object.keys(t);for(var n=0;n<r.length;n++){var i=r[n];var s=t[i];var o=e[i];if(NQt(s)){e[i]=t9e(o||{},s)}else if(s!==void 0){e[i]=s}}}return e}a(t9e,"merge");function NQt(e){return e&&typeof e==="object"&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}a(NQt,"isMergeable")});var Iq=y((rXs,LQt)=>{"use strict";LQt.exports=t2;var i9e=b3();var DQt=Lg();var s9e=t_();var tRi=/\//g;var rRi=/~/g;var nRi=/~1/g;var iRi=/~0/g;function t2(e,t,r){this.$ref=e;this.path=t;this.originalPath=r||t;this.value=void 0;this.circular=false;this.indirections=0}a(t2,"Pointer");t2.prototype.resolve=function(e,t){var r=t2.parse(this.path);this.value=e;for(var n=0;n<r.length;n++){if(zne(this,t)){this.path=t2.join(this.path,r.slice(n))}var i=r[n];if(this.value[i]===void 0){throw s9e.syntax('Error resolving $ref pointer "%s". \nToken "%s" does not exist.',this.originalPath,i)}else{this.value=this.value[i]}}zne(this,t);return this};t2.prototype.set=function(e,t,r){var n=t2.parse(this.path);var i;if(n.length===0){this.value=t;return t}this.value=e;for(var s=0;s<n.length-1;s++){zne(this,r);i=n[s];if(this.value&&this.value[i]!==void 0){this.value=this.value[i]}else{this.value=kQt(this,i,{})}}zne(this,r);i=n[n.length-1];kQt(this,i,t);return e};t2.parse=function(e){var t=DQt.getHash(e).substr(1);if(!t){return[]}t=t.split("/");for(var r=0;r<t.length;r++){t[r]=decodeURIComponent(t[r].replace(nRi,"/").replace(iRi,"~"))}if(t[0]!==""){throw s9e.syntax('Invalid $ref pointer "%s". Pointers must begin with "#/"',t)}return t.slice(1)};t2.join=function(e,t){if(e.indexOf("#")===-1){e+="#"}t=Array.isArray(t)?t:[t];for(var r=0;r<t.length;r++){var n=t[r];e+="/"+encodeURIComponent(n.replace(rRi,"~0").replace(tRi,"~1"))}return e};function zne(e,t){if(i9e.isAllowed$Ref(e.value,t)){var r=DQt.resolve(e.path,e.value.$ref);if(r===e.path){e.circular=true}else{var n=e.$ref.$refs._resolve(r,t);e.indirections+=n.indirections+1;if(i9e.isExtended$Ref(e.value)){e.value=i9e.dereference(e.value,n.value);return false}else{e.$ref=n.$ref;e.path=n.path;e.value=n.value}return true}}}a(zne,"resolveIf$Ref");function kQt(e,t,r){if(e.value&&typeof e.value==="object"){if(t==="-"&&Array.isArray(e.value)){e.value.push(r)}else{e.value[t]=r}}else{throw s9e.syntax('Error assigning $ref pointer "%s". \nCannot set "%s" of a non-object.',e.path,t)}return r}a(kQt,"setValue")});var b3=y((iXs,BQt)=>{"use strict";BQt.exports=Hd;var FQt=Iq();function Hd(){this.path=void 0;this.value=void 0;this.$refs=void 0;this.pathType=void 0}a(Hd,"$Ref");Hd.prototype.exists=function(e,t){try{this.resolve(e,t);return true}catch(r){return false}};Hd.prototype.get=function(e,t){return this.resolve(e,t).value};Hd.prototype.resolve=function(e,t,r){var n=new FQt(this,e,r);return n.resolve(this.value,t)};Hd.prototype.set=function(e,t){var r=new FQt(this,e);this.value=r.set(this.value,t)};Hd.is$Ref=function(e){return e&&typeof e==="object"&&typeof e.$ref==="string"&&e.$ref.length>0};Hd.isExternal$Ref=function(e){return Hd.is$Ref(e)&&e.$ref[0]!=="#"};Hd.isAllowed$Ref=function(e,t){if(Hd.is$Ref(e)){if(e.$ref.substr(0,2)==="#/"||e.$ref==="#"){return true}else if(e.$ref[0]!=="#"&&(!t||t.resolve.external)){return true}}};Hd.isExtended$Ref=function(e){return Hd.is$Ref(e)&&Object.keys(e).length>1};Hd.dereference=function(e,t){if(t&&typeof t==="object"&&Hd.isExtended$Ref(e)){var r={};Object.keys(e).forEach(function(n){if(n!=="$ref"){r[n]=e[n]}});Object.keys(t).forEach(function(n){if(!(n in r)){r[n]=t[n]}});return r}else{return t}}});var $Qt=y((aXs,UQt)=>{"use strict";var MQt=t_();var sRi=b3();var r2=Lg();UQt.exports=zh;function zh(){this.circular=false;this._$refs={};this._root$Ref=null}a(zh,"$Refs");zh.prototype.paths=function(e){var t=qQt(this._$refs,arguments);return t.map(function(r){return r.decoded})};zh.prototype.values=function(e){var t=this._$refs;var r=qQt(t,arguments);return r.reduce(function(n,i){n[i.decoded]=t[i.encoded].value;return n},{})};zh.prototype.toJSON=zh.prototype.values;zh.prototype.exists=function(e,t){try{this._resolve(e,t);return true}catch(r){return false}};zh.prototype.get=function(e,t){return this._resolve(e,t).value};zh.prototype.set=function(e,t){var r=r2.resolve(this._root$Ref.path,e);var n=r2.stripHash(r);var i=this._$refs[n];if(!i){throw MQt('Error resolving $ref pointer "%s". \n"%s" not found.',e,n)}i.set(r,t)};zh.prototype._add=function(e){var t=r2.stripHash(e);var r=new sRi;r.path=t;r.$refs=this;this._$refs[t]=r;this._root$Ref=this._root$Ref||r;return r};zh.prototype._resolve=function(e,t){var r=r2.resolve(this._root$Ref.path,e);var n=r2.stripHash(r);var i=this._$refs[n];if(!i){throw MQt('Error resolving $ref pointer "%s". \n"%s" not found.',e,n)}return i.resolve(r,t,e)};zh.prototype._get$Ref=function(e){e=r2.resolve(this._root$Ref.path,e);var t=r2.stripHash(e);return this._$refs[t]};function qQt(e,t){var r=Object.keys(e);t=Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t);if(t.length>0&&t[0]){r=r.filter(function(n){return t.indexOf(e[n].pathType)!==-1})}return r.map(function(n){return{encoded:n,decoded:e[n].pathType==="file"?r2.toFileSystemPath(n,true):n}})}a(qQt,"getPaths")});var GQt=y(kq=>{"use strict";kq.all=function(e){return Object.keys(e).filter(function(t){return typeof e[t]==="object"}).map(function(t){e[t].name=t;return e[t]})};kq.filter=function(e,t,r){return e.filter(function(n){return!!jQt(n,t,r)})};kq.sort=function(e){e.forEach(function(t){t.order=t.order||Number.MAX_SAFE_INTEGER});return e.sort(function(t,r){return t.order-r.order})};kq.run=function(e,t,r){var n,i,s=0;return new Promise(function(o,u){l();function l(){n=e[s++];if(!n){return u(i)}try{var f=jQt(n,t,r,c);if(f&&typeof f.then==="function"){f.then(d,p)}else if(f!==void 0){d(f)}}catch(m){p(m)}}a(l,"runNextPlugin");function c(f,m){if(f){p(f)}else{d(m)}}a(c,"callback");function d(f){o({plugin:n,result:f})}a(d,"onSuccess");function p(f){i=f;l()}a(p,"onError")})};function jQt(e,t,r,n){var i=e[t];if(typeof i==="function"){return i.apply(e,[r,n])}if(!n){if(i instanceof RegExp){return i.test(r.url)}else if(typeof i==="string"){return i===r.extension}else if(Array.isArray(i)){return i.indexOf(r.extension)!==-1}}return i}a(jQt,"getResult")});var a9e=y((cXs,VQt)=>{"use strict";var Kne=t_();var HQt=Lg();var n2=GQt();VQt.exports=aRi;function aRi(e,t,r){try{e=HQt.stripHash(e);var n=t._add(e);var i={url:e,extension:HQt.getExtension(e)};return oRi(i,r).then(function(s){n.pathType=s.plugin.name;i.data=s.result;return uRi(i,r)}).then(function(s){n.value=s.result;return s.result})}catch(s){return Promise.reject(s)}}a(aRi,"parse");function oRi(e,t){return new Promise(function(r,n){var i=n2.all(t.resolve);i=n2.filter(i,"canRead",e);n2.sort(i);n2.run(i,"read",e).then(r,s);function s(o){if(o&&!(o instanceof SyntaxError)){n(o)}else{n(Kne.syntax('Unable to resolve $ref pointer "%s"',e.url))}}a(s,"onError")})}a(oRi,"readFile");function uRi(e,t){return new Promise(function(r,n){var i=n2.all(t.parse);var s=n2.filter(i,"canParse",e);var o=s.length>0?s:i;n2.sort(o);n2.run(o,"parse",e).then(u,l);function u(c){if(!c.plugin.allowEmpty&&lRi(c.result)){n(Kne.syntax('Error parsing "%s" as %s. \nParsed value is empty',e.url,c.plugin.name))}else{r(c)}}a(u,"onParsed");function l(c){if(c){c=c instanceof Error?c:new Error(c);n(Kne.syntax(c,"Error parsing %s",e.url))}else{n(Kne.syntax("Unable to parse %s",e.url))}}a(l,"onError")})}a(uRi,"parseFile");function lRi(e){return e===void 0||typeof e==="object"&&Object.keys(e).length===0||typeof e==="string"&&e.trim().length===0||Buffer.isBuffer(e)&&e.length===0}a(lRi,"isEmpty")});var WQt=y((pXs,KQt)=>{"use strict";var zQt=n9e();KQt.exports=cRi;function cRi(e){var t,r,n,i;e=Array.prototype.slice.call(e);if(typeof e[e.length-1]==="function"){i=e.pop()}if(typeof e[0]==="string"){t=e[0];if(typeof e[2]==="object"){r=e[1];n=e[2]}else{r=void 0;n=e[1]}}else{t="";r=e[0];n=e[1]}if(!(n instanceof zQt)){n=new zQt(n)}return{path:t,schema:r,options:n,callback:i}}a(cRi,"normalizeArgs")});var ZQt=y((mXs,QQt)=>{"use strict";var YQt=b3();var dRi=Iq();var pRi=a9e();var XQt=Lg();QQt.exports=fRi;function fRi(e,t){if(!t.resolve.external){return Promise.resolve()}try{var r=o9e(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(r)}catch(n){return Promise.reject(n)}}a(fRi,"resolveExternal");function o9e(e,t,r,n){var i=[];if(e&&typeof e==="object"){if(YQt.isExternal$Ref(e)){i.push(JQt(e,t,r,n))}else{Object.keys(e).forEach(function(s){var o=dRi.join(t,s);var u=e[s];if(YQt.isExternal$Ref(u)){i.push(JQt(u,o,r,n))}else{i=i.concat(o9e(u,o,r,n))}})}}return i}a(o9e,"crawl");function JQt(e,t,r,n){var i=XQt.resolve(t,e.$ref);var s=XQt.stripHash(i);e=r._$refs[s];if(e){return Promise.resolve(e.value)}return pRi(i,r,n).then(function(o){var u=o9e(o,s+"#",r,n);return Promise.all(u)})}a(JQt,"resolve$Ref")});var rZt=y((gXs,tZt)=>{"use strict";var Wne=b3();var Dq=Iq();var u9e=Lg();tZt.exports=mRi;function mRi(e,t){var r=[];l9e(e,"schema",e.$refs._root$Ref.path+"#","#",0,r,e.$refs,t);hRi(r)}a(mRi,"bundle");function l9e(e,t,r,n,i,s,o,u){var l=t===null?e:e[t];if(l&&typeof l==="object"){if(Wne.isAllowed$Ref(l)){eZt(e,t,r,n,i,s,o,u)}else{var c=Object.keys(l).sort(function(d,p){if(d==="definitions"){return-1}else if(p==="definitions"){return 1}else{return d.length-p.length}});c.forEach(function(d){var p=Dq.join(r,d);var f=Dq.join(n,d);var m=l[d];if(Wne.isAllowed$Ref(m)){eZt(l,d,r,f,i,s,o,u)}else{l9e(l,d,p,f,i,s,o,u)}})}}}a(l9e,"crawl");function eZt(e,t,r,n,i,s,o,u){var l=t===null?e:e[t];var c=u9e.resolve(r,l.$ref);var d=o._resolve(c,u);var p=Dq.parse(n).length;var f=u9e.stripHash(d.path);var m=u9e.getHash(d.path);var h=f!==o._root$Ref.path;var g=Wne.isExtended$Ref(l);i+=d.indirections;var _=gRi(s,e,t);if(_){if(p<_.depth||i<_.indirections){yRi(s,_)}else{return}}s.push({$ref:l,parent:e,key:t,pathFromRoot:n,depth:p,file:f,hash:m,value:d.value,circular:d.circular,extended:g,external:h,indirections:i});l9e(d.value,null,d.path,n,i+1,s,o,u)}a(eZt,"inventory$Ref");function hRi(e){e.sort(function(i,s){if(i.file!==s.file){return i.file<s.file?-1:1}else if(i.hash!==s.hash){return i.hash<s.hash?-1:1}else if(i.circular!==s.circular){return i.circular?-1:1}else if(i.extended!==s.extended){return i.extended?1:-1}else if(i.indirections!==s.indirections){return i.indirections-s.indirections}else if(i.depth!==s.depth){return i.depth-s.depth}else{var o=i.pathFromRoot.lastIndexOf("/definitions");var u=s.pathFromRoot.lastIndexOf("/definitions");if(o!==u){return u-o}else{return i.pathFromRoot.length-s.pathFromRoot.length}}});var t,r,n;e.forEach(function(i){if(!i.external){i.$ref.$ref=i.hash}else if(i.file===t&&i.hash===r){i.$ref.$ref=n}else if(i.file===t&&i.hash.indexOf(r+"/")===0){i.$ref.$ref=Dq.join(n,Dq.parse(i.hash.replace(r,"#")))}else{t=i.file;r=i.hash;n=i.pathFromRoot;i.$ref=i.parent[i.key]=Wne.dereference(i.$ref,i.value);if(i.circular){i.$ref.$ref=i.pathFromRoot}}})}a(hRi,"remap");function gRi(e,t,r){for(var n=0;n<e.length;n++){var i=e[n];if(i.parent===t&&i.key===r){return i}}}a(gRi,"findInInventory");function yRi(e,t){var r=e.indexOf(t);e.splice(r,1)}a(yRi,"removeFromInventory")});var oZt=y((_Xs,aZt)=>{"use strict";var c9e=b3();var nZt=Iq();var _Ri=t_();var vRi=Lg();aZt.exports=ERi;function ERi(e,t){var r=d9e(e.schema,e.$refs._root$Ref.path,"#",[],e.$refs,t);e.$refs.circular=r.circular;e.schema=r.value}a(ERi,"dereference");function d9e(e,t,r,n,i,s){var o;var u={value:e,circular:false};if(e&&typeof e==="object"){n.push(e);if(c9e.isAllowed$Ref(e,s)){o=iZt(e,t,r,n,i,s);u.circular=o.circular;u.value=o.value}else{Object.keys(e).forEach(function(l){var c=nZt.join(t,l);var d=nZt.join(r,l);var p=e[l];var f=false;if(c9e.isAllowed$Ref(p,s)){o=iZt(p,c,d,n,i,s);f=o.circular;e[l]=o.value}else{if(n.indexOf(p)===-1){o=d9e(p,c,d,n,i,s);f=o.circular;e[l]=o.value}else{f=sZt(c,i,s)}}u.circular=u.circular||f})}n.pop()}return u}a(d9e,"crawl");function iZt(e,t,r,n,i,s){var o=vRi.resolve(t,e.$ref);var u=i._resolve(o,s);var l=u.circular;var c=l||n.indexOf(u.value)!==-1;c&&sZt(t,i,s);var d=c9e.dereference(e,u.value);if(!c){var p=d9e(d,u.path,r,n,i,s);c=p.circular;d=p.value}if(c&&!l&&s.dereference.circular==="ignore"){d=e}if(l){d.$ref=r}return{circular:c,value:d}}a(iZt,"dereference$Ref");function sZt(e,t,r){t.circular=true;if(!r.dereference.circular){throw _Ri.reference("Circular $ref pointer found at %s",e)}return true}a(sZt,"foundCircularReference")});var cZt=y((bXs,p9e)=>{"use strict";var EXs=n9e();var lZt=$Qt();var bRi=a9e();var Xne=WQt();var SRi=ZQt();var ARi=rZt();var CRi=oZt();var Yne=Lg();var r_=U4e();var uZt=t_();p9e.exports=n_;p9e.exports.YAML=J8e();function n_(){this.schema=null;this.$refs=new lZt}a(n_,"$RefParser");n_.parse=function(e,t,r,n){var i=this;var s=new i;return s.parse.apply(s,arguments)};n_.prototype.parse=function(e,t,r,n){var i=Xne(arguments);var s;if(!i.path&&!i.schema){var o=uZt("Expected a file path, URL, or object. Got %s",i.path||i.schema);return r_(i.callback,Promise.reject(o))}this.schema=null;this.$refs=new lZt;var u="http";if(Yne.isFileSystemPath(i.path)){i.path=Yne.fromFileSystemPath(i.path);u="file"}i.path=Yne.resolve(Yne.cwd(),i.path);if(i.schema&&typeof i.schema==="object"){var l=this.$refs._add(i.path);l.value=i.schema;l.pathType=u;s=Promise.resolve(i.schema)}else{s=bRi(i.path,this.$refs,i.options)}var c=this;return s.then(function(d){if(!d||typeof d!=="object"||Buffer.isBuffer(d)){throw uZt.syntax('"%s" is not a valid JSON Schema',c.$refs._root$Ref.path||d)}else{c.schema=d;return r_(i.callback,Promise.resolve(c.schema))}}).catch(function(d){return r_(i.callback,Promise.reject(d))})};n_.resolve=function(e,t,r,n){var i=this;var s=new i;return s.resolve.apply(s,arguments)};n_.prototype.resolve=function(e,t,r,n){var i=this;var s=Xne(arguments);return this.parse(s.path,s.schema,s.options).then(function(){return SRi(i,s.options)}).then(function(){return r_(s.callback,Promise.resolve(i.$refs))}).catch(function(o){return r_(s.callback,Promise.reject(o))})};n_.bundle=function(e,t,r,n){var i=this;var s=new i;return s.bundle.apply(s,arguments)};n_.prototype.bundle=function(e,t,r,n){var i=this;var s=Xne(arguments);return this.resolve(s.path,s.schema,s.options).then(function(){ARi(i,s.options);return r_(s.callback,Promise.resolve(i.schema))}).catch(function(o){return r_(s.callback,Promise.reject(o))})};n_.dereference=function(e,t,r,n){var i=this;var s=new i;return s.dereference.apply(s,arguments)};n_.prototype.dereference=function(e,t,r,n){var i=this;var s=Xne(arguments);return this.resolve(s.path,s.schema,s.options).then(function(){CRi(i,s.options);return r_(s.callback,Promise.resolve(i.schema))}).catch(function(o){return r_(s.callback,Promise.reject(o))})}});var xer=y((AXs,F9e)=>{var wRi=Object.create;var nie=Object.defineProperty;var TRi=Object.getOwnPropertyDescriptor;var T9e=Object.getOwnPropertyNames;var xRi=Object.getPrototypeOf;var RRi=Object.prototype.hasOwnProperty;var ri=a((e,t)=>a(function r(){return e&&(t=(0,e[T9e(e)[0]])(e=0)),t},"__init"),"__esm");var mm=a((e,t)=>a(function r(){return t||(0,e[T9e(e)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS");var ORi=a((e,t)=>{for(var r in t)nie(e,r,{get:t[r],enumerable:true})},"__export");var kZt=a((e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of T9e(t))if(!RRi.call(e,i)&&i!==r)nie(e,i,{get:()=>t[i],enumerable:!(n=TRi(t,i))||n.enumerable})}return e},"__copyProps");var x9e=a((e,t,r)=>(r=e!=null?wRi(xRi(e)):{},kZt(t||!e||!e.__esModule?nie(r,"default",{value:e,enumerable:true}):r,e)),"__toESM");var PRi=a(e=>kZt(nie({},"__esModule",{value:true}),e),"__toCommonJS");var f9e;var R9e;var DZt;var O9e=ri({"src/lib/vendor.mjs"(){f9e={};R9e=a(()=>{return f9e},"getDependencies");DZt=a(e=>{Object.assign(f9e,e)},"setDependencies")}});var dZt;var P9e;var LZt=ri({"src/lib/class/Registry.mjs"(){dZt=class{static{a(this,"Registry")}constructor(){this.data={}}unregister(e){if(!e){this.data={}}else{delete this.data[e]}}register(e,t){this.data[e]=t}registerMany(e){Object.keys(e).forEach(t=>{this.data[t]=e[t]})}get(e){const t=this.data[e];return t}list(){return this.data}};P9e=dZt}});var fs;var y9e;var NRi=ri({"src/lib/api/defaults.mjs"(){fs={};y9e=fs;fs.defaultInvalidTypeProduct=void 0;fs.defaultRandExpMax=10;fs.pruneProperties=[];fs.ignoreProperties=[];fs.ignoreMissingRefs=false;fs.failOnInvalidTypes=true;fs.failOnInvalidFormat=true;fs.alwaysFakeOptionals=false;fs.optionalsProbability=null;fs.fixedProbabilities=false;fs.useExamplesValue=false;fs.useDefaultValue=false;fs.requiredOnly=false;fs.omitNulls=false;fs.minItems=0;fs.maxItems=null;fs.minLength=0;fs.maxLength=null;fs.resolveJsonPath=false;fs.reuseProperties=false;fs.fillProperties=true;fs.sortProperties=false;fs.replaceEmptyByRandomValue=false;fs.random=Math.random;fs.minDateTime=new Date("1889-12-31T00:00:00.000Z");fs.maxDateTime=new Date("1970-01-01T00:00:01.000Z");fs.renderTitle=true;fs.renderDescription=true;fs.renderComment=false}});var pZt;var FZt;var IRi=ri({"src/lib/class/OptionRegistry.mjs"(){LZt();NRi();pZt=class extends P9e{static{a(this,"OptionRegistry")}constructor(){super();this.data={...y9e};this._defaults=y9e}get defaults(){return{...this._defaults}}};FZt=pZt}});function fZt(e,t){if(typeof e==="string"){if(typeof t!=="undefined"){return Mq.register(e,t)}return Mq.get(e)}return Mq.registerMany(e)}a(fZt,"optionAPI");var Mq;var on;var Kh=ri({"src/lib/api/option.mjs"(){IRi();Mq=new FZt;fZt.getDefaults=()=>Mq.defaults;on=fZt}});var m9e;var h9e;var mZt;var hZt;var gZt;var yZt;var _Zt;var vZt;var Fg;var $q=ri({"src/lib/core/constants.mjs"(){m9e=["integer","number","string","boolean"];h9e=m9e.concat(["null"]);mZt=["array","object"].concat(h9e);hZt=2524608e6;gZt=-1e8;yZt=1e8;_Zt=-100;vZt=100;Fg={ALLOWED_TYPES:m9e,SCALAR_TYPES:h9e,ALL_TYPES:mZt,MIN_NUMBER:_Zt,MAX_NUMBER:vZt,MIN_INTEGER:gZt,MAX_INTEGER:yZt,MOST_NEAR_DATETIME:hZt}}});var iie=mm({"node_modules/ret/lib/types.js"(e,t){t.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}}});var BZt=mm({"node_modules/ret/lib/sets.js"(e){var t=iie();var r=a(()=>[{type:t.RANGE,from:48,to:57}],"INTS");var n=a(()=>{return[{type:t.CHAR,value:95},{type:t.RANGE,from:97,to:122},{type:t.RANGE,from:65,to:90}].concat(r())},"WORDS");var i=a(()=>{return[{type:t.CHAR,value:9},{type:t.CHAR,value:10},{type:t.CHAR,value:11},{type:t.CHAR,value:12},{type:t.CHAR,value:13},{type:t.CHAR,value:32},{type:t.CHAR,value:160},{type:t.CHAR,value:5760},{type:t.RANGE,from:8192,to:8202},{type:t.CHAR,value:8232},{type:t.CHAR,value:8233},{type:t.CHAR,value:8239},{type:t.CHAR,value:8287},{type:t.CHAR,value:12288},{type:t.CHAR,value:65279}]},"WHITESPACE");var s=a(()=>{return[{type:t.CHAR,value:10},{type:t.CHAR,value:13},{type:t.CHAR,value:8232},{type:t.CHAR,value:8233}]},"NOTANYCHAR");e.words=()=>({type:t.SET,set:n(),not:false});e.notWords=()=>({type:t.SET,set:n(),not:true});e.ints=()=>({type:t.SET,set:r(),not:false});e.notInts=()=>({type:t.SET,set:r(),not:true});e.whitespace=()=>({type:t.SET,set:i(),not:false});e.notWhitespace=()=>({type:t.SET,set:i(),not:true});e.anyChar=()=>({type:t.SET,set:s(),not:true})}});var kRi=mm({"node_modules/ret/lib/util.js"(e){var t=iie();var r=BZt();var n="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?";var i={"0":0,"t":9,"n":10,"v":11,"f":12,"r":13};e.strToChars=function(s){var o=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;s=s.replace(o,function(u,l,c,d,p,f,m,h){if(c){return u}var g=l?8:d?parseInt(d,16):p?parseInt(p,16):f?parseInt(f,8):m?n.indexOf(m):i[h];var _=String.fromCharCode(g);if(/[[\]{}^$.|?*+()]/.test(_)){_="\\"+_}return _});return s};e.tokenizeClass=(s,o)=>{var u=[];var l=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g;var c,d;while((c=l.exec(s))!=null){if(c[1]){u.push(r.words())}else if(c[2]){u.push(r.ints())}else if(c[3]){u.push(r.whitespace())}else if(c[4]){u.push(r.notWords())}else if(c[5]){u.push(r.notInts())}else if(c[6]){u.push(r.notWhitespace())}else if(c[7]){u.push({type:t.RANGE,from:(c[8]||c[9]).charCodeAt(0),to:c[10].charCodeAt(0)})}else if(d=c[12]){u.push({type:t.CHAR,value:d.charCodeAt(0)})}else{return[u,l.lastIndex]}}e.error(o,"Unterminated character class")};e.error=(s,o)=>{throw new SyntaxError("Invalid regular expression: /"+s+"/: "+o)}}});var DRi=mm({"node_modules/ret/lib/positions.js"(e){var t=iie();e.wordBoundary=()=>({type:t.POSITION,value:"b"});e.nonWordBoundary=()=>({type:t.POSITION,value:"B"});e.begin=()=>({type:t.POSITION,value:"^"});e.end=()=>({type:t.POSITION,value:"$"})}});var LRi=mm({"node_modules/ret/lib/index.js"(e,t){var r=kRi();var n=iie();var i=BZt();var s=DRi();t.exports=o=>{var u=0,l,c,d={type:n.ROOT,stack:[]},p=d,f=d.stack,m=[];var h=a(T=>{r.error(o,`Nothing to repeat at column ${T-1}`)},"repeatErr");var g=r.strToChars(o);l=g.length;while(u<l){c=g[u++];switch(c){case"\\":c=g[u++];switch(c){case"b":f.push(s.wordBoundary());break;case"B":f.push(s.nonWordBoundary());break;case"w":f.push(i.words());break;case"W":f.push(i.notWords());break;case"d":f.push(i.ints());break;case"D":f.push(i.notInts());break;case"s":f.push(i.whitespace());break;case"S":f.push(i.notWhitespace());break;default:if(/\d/.test(c)){f.push({type:n.REFERENCE,value:parseInt(c,10)})}else{f.push({type:n.CHAR,value:c.charCodeAt(0)})}}break;case"^":f.push(s.begin());break;case"$":f.push(s.end());break;case"[":var _;if(g[u]==="^"){_=true;u++}else{_=false}var v=r.tokenizeClass(g.slice(u),o);u+=v[1];f.push({type:n.SET,set:v[0],not:_});break;case".":f.push(i.anyChar());break;case"(":var S={type:n.GROUP,stack:[],remember:true};c=g[u];if(c==="?"){c=g[u+1];u+=2;if(c==="="){S.followedBy=true}else if(c==="!"){S.notFollowedBy=true}else if(c!==":"){r.error(o,`Invalid group, character '${c}' after '?' at column ${u-1}`)}S.remember=false}f.push(S);m.push(p);p=S;f=S.stack;break;case")":if(m.length===0){r.error(o,`Unmatched ) at column ${u-1}`)}p=m.pop();f=p.options?p.options[p.options.length-1]:p.stack;break;case"|":if(!p.options){p.options=[p.stack];delete p.stack}var E=[];p.options.push(E);f=E;break;case"{":var b=/^(\d+)(,(\d+)?)?\}/.exec(g.slice(u)),A,C;if(b!==null){if(f.length===0){h(u)}A=parseInt(b[1],10);C=b[2]?b[3]?parseInt(b[3],10):Infinity:A;u+=b[0].length;f.push({type:n.REPETITION,min:A,max:C,value:f.pop()})}else{f.push({type:n.CHAR,value:123})}break;case"?":if(f.length===0){h(u)}f.push({type:n.REPETITION,min:0,max:1,value:f.pop()});break;case"+":if(f.length===0){h(u)}f.push({type:n.REPETITION,min:1,max:Infinity,value:f.pop()});break;case"*":if(f.length===0){h(u)}f.push({type:n.REPETITION,min:0,max:Infinity,value:f.pop()});break;default:f.push({type:n.CHAR,value:c.charCodeAt(0)})}}if(m.length!==0){r.error(o,"Unterminated group")}return d};t.exports.types=n}});var FRi=mm({"node_modules/drange/lib/index.js"(e,t){"use strict";var r=class S3{static{a(this,"_SubRange")}constructor(s,o){this.low=s;this.high=o;this.length=1+o-s}overlaps(s){return!(this.high<s.low||this.low>s.high)}touches(s){return!(this.high+1<s.low||this.low-1>s.high)}add(s){return new S3(Math.min(this.low,s.low),Math.max(this.high,s.high))}subtract(s){if(s.low<=this.low&&s.high>=this.high){return[]}else if(s.low>this.low&&s.high<this.high){return[new S3(this.low,s.low-1),new S3(s.high+1,this.high)]}else if(s.low<=this.low){return[new S3(s.high+1,this.high)]}else{return[new S3(this.low,s.low-1)]}}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}};var n=class Lq{static{a(this,"_DRange")}constructor(s,o){this.ranges=[];this.length=0;if(s!=null)this.add(s,o)}_update_length(){this.length=this.ranges.reduce((s,o)=>{return s+o.length},0)}add(s,o){var u=a(l=>{var c=0;while(c<this.ranges.length&&!l.touches(this.ranges[c])){c++}var d=this.ranges.slice(0,c);while(c<this.ranges.length&&l.touches(this.ranges[c])){l=l.add(this.ranges[c]);c++}d.push(l);this.ranges=d.concat(this.ranges.slice(c));this._update_length()},"_add");if(s instanceof Lq){s.ranges.forEach(u)}else{if(o==null)o=s;u(new r(s,o))}return this}subtract(s,o){var u=a(l=>{var c=0;while(c<this.ranges.length&&!l.overlaps(this.ranges[c])){c++}var d=this.ranges.slice(0,c);while(c<this.ranges.length&&l.overlaps(this.ranges[c])){d=d.concat(this.ranges[c].subtract(l));c++}this.ranges=d.concat(this.ranges.slice(c));this._update_length()},"_subtract");if(s instanceof Lq){s.ranges.forEach(u)}else{if(o==null)o=s;u(new r(s,o))}return this}intersect(s,o){var u=[];var l=a(c=>{var d=0;while(d<this.ranges.length&&!c.overlaps(this.ranges[d])){d++}while(d<this.ranges.length&&c.overlaps(this.ranges[d])){var p=Math.max(this.ranges[d].low,c.low);var f=Math.min(this.ranges[d].high,c.high);u.push(new r(p,f));d++}},"_intersect");if(s instanceof Lq){s.ranges.forEach(l)}else{if(o==null)o=s;l(new r(s,o))}this.ranges=u;this._update_length();return this}index(s){var o=0;while(o<this.ranges.length&&this.ranges[o].length<=s){s-=this.ranges[o].length;o++}return this.ranges[o].low+s}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new Lq(this)}numbers(){return this.ranges.reduce((s,o)=>{var u=o.low;while(u<=o.high){s.push(u);u++}return s},[])}subranges(){return this.ranges.map(s=>({low:s.low,high:s.high,length:1+s.high-s.low}))}};t.exports=n}});var BRi=mm({"node_modules/randexp/lib/randexp.js"(e,t){var r=LRi();var n=FRi();var i=r.types;t.exports=class Fq{static{a(this,"RandExp2")}constructor(o,u){this._setDefaults(o);if(o instanceof RegExp){this.ignoreCase=o.ignoreCase;this.multiline=o.multiline;o=o.source}else if(typeof o==="string"){this.ignoreCase=u&&u.indexOf("i")!==-1;this.multiline=u&&u.indexOf("m")!==-1}else{throw new Error("Expected a regexp or string")}this.tokens=r(o)}_setDefaults(o){this.max=o.max!=null?o.max:Fq.prototype.max!=null?Fq.prototype.max:100;this.defaultRange=o.defaultRange?o.defaultRange:this.defaultRange.clone();if(o.randInt){this.randInt=o.randInt}}gen(){return this._gen(this.tokens,[])}_gen(o,u){var l,c,d,p,f;switch(o.type){case i.ROOT:case i.GROUP:if(o.followedBy||o.notFollowedBy){return""}if(o.remember&&o.groupNumber===void 0){o.groupNumber=u.push(null)-1}l=o.options?this._randSelect(o.options):o.stack;c="";for(p=0,f=l.length;p<f;p++){c+=this._gen(l[p],u)}if(o.remember){u[o.groupNumber]=c}return c;case i.POSITION:return"";case i.SET:var m=this._expand(o);if(!m.length){return""}return String.fromCharCode(this._randSelect(m));case i.REPETITION:d=this.randInt(o.min,o.max===Infinity?o.min+this.max:o.max);c="";for(p=0;p<d;p++){c+=this._gen(o.value,u)}return c;case i.REFERENCE:return u[o.value-1]||"";case i.CHAR:var h=this.ignoreCase&&this._randBool()?this._toOtherCase(o.value):o.value;return String.fromCharCode(h)}}_toOtherCase(o){return o+(97<=o&&o<=122?-32:65<=o&&o<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(o){if(o instanceof n){return o.index(this.randInt(0,o.length-1))}return o[this.randInt(0,o.length-1)]}_expand(o){if(o.type===r.types.CHAR){return new n(o.value)}else if(o.type===r.types.RANGE){return new n(o.from,o.to)}else{let u=new n;for(let l=0;l<o.set.length;l++){let c=this._expand(o.set[l]);u.add(c);if(this.ignoreCase){for(let d=0;d<c.length;d++){let p=c.index(d);let f=this._toOtherCase(p);if(p!==f){u.add(f)}}}}if(o.not){return this.defaultRange.clone().subtract(u)}else{return this.defaultRange.clone().intersect(u)}}}randInt(o,u){return o+Math.floor(Math.random()*(1+u-o))}get defaultRange(){return this._range=this._range||new n(32,126)}set defaultRange(o){this._range=o}static randexp(o,u){var l;if(typeof o==="string"){o=new RegExp(o,u)}if(o._randexp===void 0){l=new Fq(o,u);o._randexp=l}else{l=o._randexp;l._setDefaults(o)}return l.gen()}static sugar(){RegExp.prototype.gen=function(){return Fq.randexp(this)}}}}});function MRi(e,t){e=typeof e==="undefined"?Fg.MIN_INTEGER:e;t=typeof t==="undefined"?Fg.MAX_INTEGER:t;return Math.floor(on("random")()*(t-e+1))+e}a(MRi,"getRandomInteger");function qRi(e){Qne.default.prototype.max=on("defaultRandExpMax");Qne.default.prototype.randInt=(r,n)=>r+Math.floor(on("random")()*(1+(n-r)));const t=new Qne.default(e);return t.gen()}a(qRi,"_randexp");function URi(e){return e[Math.floor(on("random")()*e.length)]}a(URi,"pick");function $Ri(e){let t;let r;let n=e.length;const i=e.slice();for(;n>0;){r=Math.floor(on("random")()*n);n-=1;t=i[n];i[n]=i[r];i[r]=t}return i}a($Ri,"shuffle");function MZt(e,t){return on("random")()*(t-e)+e}a(MZt,"getRandom");function i2(e,t,r,n,i=false){r=typeof r==="undefined"?Fg.MIN_NUMBER:r;n=typeof n==="undefined"?Fg.MAX_NUMBER:n;e=typeof e==="undefined"?r:e;t=typeof t==="undefined"?n:t;if(t<e){t+=e}if(i){return MZt(e,t)}return MRi(e,t)}a(i2,"number");function jRi(e){switch(e){case"seconds":return i2(0,60)*60;case"minutes":return i2(15,50)*612;case"hours":return i2(12,72)*36123;case"days":return i2(7,30)*86412345;case"weeks":return i2(4,52)*604812345;case"months":return i2(2,13)*2592012345;case"years":return i2(1,20)*31104012345;default:break}}a(jRi,"by");function GRi(e){if(e){return jRi(e)}let t=on("minDateTime");let r=on("maxDateTime");if(typeof t==="string"){t=new Date(t)}if(typeof r==="string"){r=new Date(r)}const n=new Date().getTime();if(typeof t==="number"){t=new Date(n+t)}if(typeof r==="number"){r=new Date(n+r)}return new Date(MZt(t.getTime(),r.getTime()))}a(GRi,"date");var Qne;var Wr;var Vd=ri({"src/lib/core/random.mjs"(){Qne=x9e(BRi(),1);Kh();$q();Wr={pick:URi,date:GRi,shuffle:$Ri,number:i2,randexp:qRi}}});function HRi(e,t,r){t=decodeURIComponent(t);if(r&&r[t])return eie(r[t]);const n=t.replace("#/","/").split("/");let i=e.$ref&&r&&r[e.$ref]||e;if(!i&&!n[0]){n[0]=e.$ref.split("#/")[0]}if(r&&t.includes("#/")&&r[n[0]]){i=r[n.shift()]}if(!n[0])n.shift();while(i&&n.length>0){const s=n.shift();if(!i[s]){throw new Error(`Prop not found: ${s} (${t})`)}i=i[s]}return i}a(HRi,"getLocalRef");function EZt(e){return typeof e==="string"&&GZt.test(e)}a(EZt,"isNumeric");function VRi(e){return["number","boolean"].includes(typeof e)}a(VRi,"isScalar");function zRi(e,...t){return t.filter(r=>{return typeof e[r]!=="undefined"}).length>0}a(zRi,"hasProperties");function qZt(e){if(e.includes(" ")){return new Date(e).toISOString().substr(0,10)}let[t,r,n]=e.split("T")[0].split("-");r=`0${Math.max(1,Math.min(12,r))}`.slice(-2);n=`0${Math.max(1,Math.min(31,n))}`.slice(-2);return`${t}-${r}-${n}`}a(qZt,"clampDate");function KRi(e){if(e.includes(" ")){return new Date(e).toISOString().substr(0,10)}const[t,r]=e.split("T");let[n,i,s]=t.split("-");let[o,u,l]=r.substr(0,8).split(":");i=`0${Math.max(1,Math.min(12,i))}`.slice(-2);s=`0${Math.max(1,Math.min(31,s))}`.slice(-2);o=`0${Math.max(1,Math.min(23,o))}`.slice(-2);u=`0${Math.max(1,Math.min(59,u))}`.slice(-2);l=`0${Math.max(1,Math.min(59,l))}`.slice(-2);return`${n}-${i}-${s}T${o}:${u}:${l}.000Z`}a(KRi,"clampDateTime");function WRi(e,t,r){const n={};switch(e||t.type){case"integer":case"number":if(typeof t.minimum!=="undefined"){n.minimum=t.minimum}if(typeof t.maximum!=="undefined"){n.maximum=t.maximum}if(t.enum){let s=Math.max(n.minimum||0,0);let o=Math.min(n.maximum||Infinity,Infinity);if(t.exclusiveMinimum&&s===t.minimum){s+=t.multipleOf||1}if(t.exclusiveMaximum&&o===t.maximum){o-=t.multipleOf||1}if(s||o!==Infinity){t.enum=t.enum.filter(u=>{if(u>=s&&u<=o){return true}return false})}}break;case"string":{n.minLength=on("minLength")||0;n.maxLength=on("maxLength")||Number.MAX_SAFE_INTEGER;if(typeof t.minLength!=="undefined"){n.minLength=Math.max(n.minLength,t.minLength)}if(typeof t.maxLength!=="undefined"){n.maxLength=Math.min(n.maxLength,t.maxLength)}break}default:break}let i=r(n);if(i===null||i===void 0){return null}switch(e||t.type){case"number":i=EZt(i)?parseFloat(i):i;break;case"integer":i=EZt(i)?parseInt(i,10):i;break;case"boolean":i=!!i;break;case"string":{if(VRi(i)){return i}i=String(i);const s=Math.max(n.minLength||0,0);const o=Math.min(n.maxLength||Infinity,Infinity);let u;let l=0;while(i.length<s){u=i;if(!t.pattern){i+=`${Wr.pick([" ","/","_","-","+","=","@","^"])}${i}`}else{i+=Wr.randexp(t.pattern)}if(i===u){l+=1;if(l===3){break}}else{l=0}}if(i.length>o){i=i.substr(0,o)}switch(t.format){case"date-time":case"datetime":i=new Date(KRi(i)).toISOString().replace(/([0-9])0+Z$/,"$1Z");break;case"full-date":case"date":i=new Date(qZt(i)).toISOString().substr(0,10);break;case"time":i=new Date(`1969-01-01 ${i}`).toISOString().substr(11);break;default:break}break}default:break}return i}a(WRi,"typecast");function w3(e,t){Object.keys(t).forEach(r=>{if(typeof t[r]!=="object"||t[r]===null){e[r]=t[r]}else if(Array.isArray(t[r])){e[r]=e[r]||[];t[r].forEach((n,i)=>{if(e.type==="array"&&t.type==="array"){e[r][i]=w3(e[r][i]||{},n,true)}else if(Array.isArray(e[r])&&e[r].indexOf(n)===-1){e[r].push(n)}})}else if(typeof e[r]!=="object"||e[r]===null||Array.isArray(e[r])){e[r]=w3({},t[r])}else{e[r]=w3(e[r],t[r])}});return e}a(w3,"merge");function eie(e,t=new Map){if(!e||typeof e!=="object"){return e}if(t.has(e)){return t.get(e)}if(Array.isArray(e)){const n=[];t.set(e,n);n.push(...e.map(i=>eie(i,t)));return n}const r={};t.set(e,r);return Object.keys(e).reduce((n,i)=>{n[i]=eie(e[i],t);return n},r)}a(eie,"clone");function YRi(e){const t=JSON.stringify(e);const r=JSON.stringify(e,null,2);return t.length>400?`${r.substr(0,400)}...`:r}a(YRi,"short");function UZt(){return Wr.pick([false,true,null,-1,NaN,Math.PI,Infinity,void 0,[],{},Math.random(),Math.random().toString(36).substr(2)])}a(UZt,"anyValue");function XRi(e,t){if(e.enum)return e.enum.includes(t);if(e.const)return e.const===t}a(XRi,"hasValue");function JRi(e,t){const r=w3({},t);if(typeof e.minimum!=="undefined"){r.maximum=e.minimum;r.exclusiveMaximum=true}if(typeof e.maximum!=="undefined"){r.minimum=e.maximum>r.maximum?0:e.maximum;r.exclusiveMinimum=true}if(typeof e.minLength!=="undefined"){r.maxLength=e.minLength}if(typeof e.maxLength!=="undefined"){r.minLength=e.maxLength>r.maxLength?0:e.maxLength}if(e.type){r.type=Wr.pick(Fg.SCALAR_TYPES.filter(n=>{const i=Array.isArray(e.type)?e.type:[e.type];return i.every(s=>{if(n==="number"||n==="integer"){return s!=="number"&&s!=="integer"}return n!==s})}))}else if(e.enum){let n;do{n=UZt()}while(e.enum.indexOf(n)!==-1);r.enum=[n]}if(e.required&&r.properties){e.required.forEach(n=>{delete r.properties[n]})}return r}a(JRi,"notValue");function N9e(e,t){const r=t.minimum!==void 0;const n=t.maximum!==void 0;return(r||n)&&(!r||e>=t.minimum)&&(!n||e<=t.maximum)}a(N9e,"validateValueForSchema");function QRi(e,t){return!t.every(r=>N9e(e,r))}a(QRi,"validate");function ZRi(e,t){const r=t.reduce((n,i)=>n+(N9e(e,i)?1:0),0);return r===1}a(ZRi,"validateValueForOneOf");function eOi(e){return["enum","const","default","examples","required","definitions","items","properties"].includes(e)}a(eOi,"isKey");function tOi(e,t){return Object.keys(e).filter(r=>!t.includes(r)).reduce((r,n)=>{if(Array.isArray(e[n])){r[n]=e[n].slice()}else{r[n]=e[n]instanceof Object?w3({},e[n]):e[n]}return r},{})}a(tOi,"omitProps");function $Zt(e,t){if(Array.isArray(e)){return e.map(r=>$Zt(r,t))}if(typeof e==="string"){e=e.replace(/#\{([\w.-]+)\}/g,(r,n)=>t[n])}return e}a($Zt,"template");function _9e(e){return Object.prototype.toString.call(e)==="[object Object]"&&!Object.keys(e).length}a(_9e,"isEmpty");function jZt(e,t){t=t.items||t;const r=on("alwaysFakeOptionals");const n=Array.isArray(t.required)&&t.required.includes(e)||r;const i=typeof t.thunk==="function"||t.additionalProperties&&typeof t.additionalProperties.thunk==="function";return!n&&!i}a(jZt,"shouldClean");function v9e(e,t,r=false){if(!e||typeof e!=="object"){return e}if(Array.isArray(e)){return e.map(n=>v9e(n,t,true)).filter(n=>typeof n!=="undefined")}Object.keys(e).forEach(n=>{if(_9e(e[n])){if(jZt(n,t)){delete e[n]}}else{let i=t;if(t&&t.properties&&t.properties[n]){i=t.properties[n]}const s=v9e(e[n],i);if(!_9e(s)){e[n]=s}}if(typeof e[n]==="undefined"){delete e[n]}});if(!Object.keys(e).length&&r){return void 0}return e}a(v9e,"clean");var GZt;var ms;var s2=ri({"src/lib/core/utils.mjs"(){Kh();$q();Vd();GZt=/^(0|[1-9][0-9]*)$/;ms={hasProperties:zRi,getLocalRef:HRi,omitProps:tOi,typecast:WRi,merge:w3,clone:eie,short:YRi,hasValue:XRi,notValue:JRi,anyValue:UZt,validate:QRi,validateValueForSchema:N9e,validateValueForOneOf:ZRi,isKey:eOi,template:$Zt,shouldClean:jZt,clean:v9e,isEmpty:_9e,clampDate:qZt}}});function rOi(e){return(t,r,n,i)=>{let s=t;let o=[];if(typeof t==="object"){s=Object.keys(t)[0];if(Array.isArray(t[s])){o=t[s]}else{o.push(t[s])}}const u=s.split(".");let l=e();while(u.length>1){l=l[u.shift()]}t=typeof l==="object"?l[u[0]]:l;if(typeof t==="function"){t=t.apply(l,o.map(c=>ms.template(c,i)))}if(Object.prototype.toString.call(t)==="[object Object]"){Object.keys(t).forEach(c=>{if(typeof t[c]==="function"){throw new Error(`Cannot resolve value for '${n}: ${s}', given: ${t}`)}})}return t}}a(rOi,"proxy");var bZt;var HZt;var nOi=ri({"src/lib/class/Container.mjs"(){s2();bZt=class{static{a(this,"Container")}constructor(){this.registry={};this.support={}}reset(e){if(!e){this.registry={};this.support={}}else{delete this.registry[e];delete this.support[e]}}extend(e,t){this.registry[e]=t(this.registry[e]);if(!this.support[e]){this.support[e]=rOi(()=>this.registry[e])}}define(e,t){this.support[e]=t}get(e){if(typeof this.registry[e]==="undefined"){throw new ReferenceError(`'${e}' dependency doesn't exist.`)}return this.registry[e]}wrap(e){if(!("generate"in e)){const t=Object.keys(e);const r={};let n=t.length;while(n--){const i=t[n].replace(/^x-/,"");const s=this.support[i];if(typeof s==="function"){Object.defineProperty(e,"generate",{configurable:false,enumerable:false,writable:false,value:(o,u)=>s.call(r,e[t[n]],e,t[n],o,u.slice())});break}}}return e}};HZt=bZt}});function iOi(e,t){if(typeof e==="undefined"){return A3.list()}if(typeof e==="string"){if(typeof t==="function"){A3.register(e,t)}else if(t===null||t===false){A3.unregister(e)}else{return A3.get(e)}}else{A3.registerMany(e)}}a(iOi,"formatAPI");var A3;var I9e;var VZt=ri({"src/lib/api/format.mjs"(){LZt();A3=new P9e;I9e=iOi}});var SZt;var tie;var zZt=ri({"src/lib/core/error.mjs"(){SZt=class extends Error{static{a(this,"ParseError")}constructor(e,t){super();if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="ParseError";this.message=e;this.path=t}};tie=SZt}});function sOi(e,t,r){return Object.keys(e).filter(n=>{const i=KZt.indexOf(t)>-1;const s=r.indexOf(n)>-1;if(s&&!i){return true}return false}).length>0}a(sOi,"matchesType");function aOi(e,t){const r=Object.keys(qq);for(let n=0;n<r.length;n+=1){const i=r[n];const s=t[t.length-1];if(sOi(e,s,qq[i])){return i}}}a(aOi,"inferType");var qq;var KZt;var WZt;var oOi=ri({"src/lib/core/infer.mjs"(){qq={array:["additionalItems","items","maxItems","minItems","uniqueItems"],integer:["exclusiveMaximum","exclusiveMinimum","maximum","minimum","multipleOf"],object:["additionalProperties","dependencies","maxProperties","minProperties","patternProperties","properties","required"],string:["maxLength","minLength","pattern","format"]};qq.number=qq.integer;KZt=["additionalItems","items","additionalProperties","dependencies","patternProperties","properties"];WZt=aOi}});function uOi(){return on("random")()>.5}a(uOi,"booleanGenerator");var YZt;var lOi=ri({"src/lib/generators/boolean.mjs"(){Kh();YZt=uOi}});var AZt;var XZt;var cOi=ri({"src/lib/types/boolean.mjs"(){lOi();AZt=YZt;XZt=AZt}});function dOi(){return null}a(dOi,"nullGenerator");var JZt;var pOi=ri({"src/lib/generators/null.mjs"(){JZt=dOi}});var CZt;var QZt;var fOi=ri({"src/lib/types/null.mjs"(){pOi();CZt=JZt;QZt=CZt}});function mOi(e,t,r,n,i,s){const o=[];const u=[];function l(d){const p=JSON.stringify(d.value);if(u.indexOf(p)===-1){u.push(p);o.push(d);return true}return false}a(l,"walk");t.forEach(l);let c=100;while(o.length!==t.length){if(!l(s(r.items||n,e,i))){c-=1}if(!c){break}}return o}a(mOi,"unique");function hOi(e,t,r,n){const i=[];if(!(e.items||e.additionalItems)){if(ms.hasProperties(e,"minItems","maxItems","uniqueItems")){if(e.minItems!==0||e.maxItems!==0){throw new tie(`missing items for ${ms.short(e)}`,t)}}return i}if(Array.isArray(e.items)){return e.items.map((m,h)=>{const g=t.concat(["items",h]);return n(m,g,r)})}let s=e.minItems;let o=e.maxItems;const u=on("minItems");const l=on("maxItems");if(u){s=typeof s==="undefined"?u:Math.min(u,s)}if(l){o=typeof o==="undefined"?l:Math.min(l,o);if(o&&o>l){o=l}if(s&&s>l){s=o}}const c=on("alwaysFakeOptionals")===true?1:on("optionalsProbability");const d=on("alwaysFakeOptionals")||on("fixedProbabilities")||false;let p=Wr.number(s,o,1,5);if(c!==null){p=Math.max(d?Math.round((o||p)*c):Math.abs(Wr.number(s,o)*c),s||0)}const f=typeof e.additionalItems==="object"?e.additionalItems:{};for(let m=i.length;m<p;m+=1){const h=t.concat(["items",m]);const g=n(e.items||f,h,r);i.push(g)}if(e.contains&&p>0){const m=Wr.number(0,p-1);i[m]=n(e.contains,t.concat(["items",m]),r)}if(e.uniqueItems){return mOi(t.concat(["items"]),i,e,f,r,n)}return i}a(hOi,"arrayType");var ZZt;var gOi=ri({"src/lib/types/array.mjs"(){Vd();s2();zZt();Kh();ZZt=hOi}});function yOi(e){let t=typeof e.minimum==="undefined"||e.minimum===-Number.MAX_VALUE?Fg.MIN_INTEGER:e.minimum;let r=typeof e.maximum==="undefined"||e.maximum===Number.MAX_VALUE?Fg.MAX_INTEGER:e.maximum;const n=e.multipleOf;const i=n&&String(n).match(/e-(\d)|\.(\d+)$/);if(i){const s=(Math.random()*Wr.number(0,10)+1)*n;const o=i[1]||i[2].length;const u=parseFloat(s.toFixed(o));const l=Wr.number(t,r-1);if(!String(u).includes(".")){return(l+u).toExponential()}return l+u}if(n){r=Math.floor(r/n)*n;t=Math.ceil(t/n)*n}if(e.exclusiveMinimum&&t===e.minimum){t+=n||1}if(e.exclusiveMaximum&&r===e.maximum){r-=n||1}if(t>r){return NaN}if(n){let s=Wr.number(Math.floor(t/n),Math.floor(r/n))*n;while(s<t){s+=n}return s}return Wr.number(t,r,void 0,void 0,e.type!=="integer")}a(yOi,"numberType");var k9e;var eer=ri({"src/lib/types/number.mjs"(){Vd();$q();k9e=yOi}});function _Oi(e){return Math.floor(k9e({...e}))}a(_Oi,"integerType");var ter;var vOi=ri({"src/lib/types/integer.mjs"(){eer();ter=_Oi}});function EOi(e){const t=Wr.shuffle(rer);return t.slice(0,e)}a(EOi,"wordsGenerator");var rer;var rie;var ner=ri({"src/lib/generators/words.mjs"(){Vd();rer=`Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore
527
+ `},i)),s}a(RVt,"ui");function q2i(e,t){return e&&"run"in e?async function(r,n){let i=RVt(r,t);await e.run(i,n)}:function(r){return RVt(r,t||e)}}a(q2i,"li");var U2i=oq(NVt(),1);var $2i=a(e=>{let t=[];return(0,U2i.default)(e,{type:"heading"},r=>{let n={depth:r.depth,value:yne(r,{includeImageAlt:false})},i=r==null?void 0:r.data;i&&(n.data=i),t.push(n)}),t},"bP");function j2i(){return(e,t)=>{t.data.headings=$2i(e)}}a(j2i,"Cm");var OVt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"];async function G2i(e){let t=await Bmi().use(r2i).use(Tbi).use(j2i).use(q2i,{allowDangerousHtml:true}).use(b1i).use(N1i,{...nq,attributes:{...nq.attributes,form:[...OVt,"className","action","method"],button:[...OVt,"className","type","role"]},tagNames:[...nq.tagNames??[],"form","button"]}).use($mi.default).use(U1i).use(xmi).use(Hyi).process(e);return{html:t.value,headings:t.data.headings}}a(G2i,"EP");});var yw=y((TKs,gw)=>{"use strict";function uWt(e){return typeof e==="undefined"||e===null}a(uWt,"isNothing");function H2i(e){return typeof e==="object"&&e!==null}a(H2i,"isObject");function V2i(e){if(Array.isArray(e))return e;else if(uWt(e))return[];return[e]}a(V2i,"toArray");function z2i(e,t){var r,n,i,s;if(t){s=Object.keys(t);for(r=0,n=s.length;r<n;r+=1){i=s[r];e[i]=t[i]}}return e}a(z2i,"extend");function K2i(e,t){var r="",n;for(n=0;n<t;n+=1){r+=e}return r}a(K2i,"repeat");function W2i(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}a(W2i,"isNegativeZero");gw.exports.isNothing=uWt;gw.exports.isObject=H2i;gw.exports.toArray=V2i;gw.exports.repeat=K2i;gw.exports.isNegativeZero=W2i;gw.exports.extend=z2i});var t3=y((RKs,lWt)=>{"use strict";function yq(e,t){Error.call(this);this.name="YAMLException";this.reason=e;this.mark=t;this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"");if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=new Error().stack||""}}a(yq,"YAMLException");yq.prototype=Object.create(Error.prototype);yq.prototype.constructor=yq;yq.prototype.toString=a(function e(t){var r=this.name+": ";r+=this.reason||"(unknown reason)";if(!t&&this.mark){r+=" "+this.mark.toString()}return r},"toString");lWt.exports=yq});var pWt=y((PKs,dWt)=>{"use strict";var cWt=yw();function h8e(e,t,r,n,i){this.name=e;this.buffer=t;this.position=r;this.line=n;this.column=i}a(h8e,"Mark");h8e.prototype.getSnippet=a(function e(t,r){var n,i,s,o,u;if(!this.buffer)return null;t=t||4;r=r||75;n="";i=this.position;while(i>0&&"\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(i-1))===-1){i-=1;if(this.position-i>r/2-1){n=" ... ";i+=5;break}}s="";o=this.position;while(o<this.buffer.length&&"\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(o))===-1){o+=1;if(o-this.position>r/2-1){s=" ... ";o-=5;break}}u=this.buffer.slice(i,o);return cWt.repeat(" ",t)+n+u+s+"\n"+cWt.repeat(" ",t+this.position-i+n.length)+"^"},"getSnippet");h8e.prototype.toString=a(function e(t){var r,n="";if(this.name){n+='in "'+this.name+'" '}n+="at line "+(this.line+1)+", column "+(this.column+1);if(!t){r=this.getSnippet();if(r){n+=":\n"+r}}return n},"toString");dWt.exports=h8e});var iu=y((IKs,mWt)=>{"use strict";var fWt=t3();var Y2i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"];var X2i=["scalar","sequence","mapping"];function J2i(e){var t={};if(e!==null){Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})})}return t}a(J2i,"compileStyleAliases");function Q2i(e,t){t=t||{};Object.keys(t).forEach(function(r){if(Y2i.indexOf(r)===-1){throw new fWt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}});this.tag=e;this.kind=t["kind"]||null;this.resolve=t["resolve"]||function(){return true};this.construct=t["construct"]||function(r){return r};this.instanceOf=t["instanceOf"]||null;this.predicate=t["predicate"]||null;this.represent=t["represent"]||null;this.defaultStyle=t["defaultStyle"]||null;this.styleAliases=J2i(t["styleAliases"]||null);if(X2i.indexOf(this.kind)===-1){throw new fWt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}a(Q2i,"Type");mWt.exports=Q2i});var _w=y((DKs,gWt)=>{"use strict";var hWt=yw();var vne=t3();var Z2i=iu();function g8e(e,t,r){var n=[];e.include.forEach(function(i){r=g8e(i,t,r)});e[t].forEach(function(i){r.forEach(function(s,o){if(s.tag===i.tag&&s.kind===i.kind){n.push(o)}});r.push(i)});return r.filter(function(i,s){return n.indexOf(s)===-1})}a(g8e,"compileList");function eSi(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,r;function n(i){e[i.kind][i.tag]=e["fallback"][i.tag]=i}a(n,"collectType");for(t=0,r=arguments.length;t<r;t+=1){arguments[t].forEach(n)}return e}a(eSi,"compileMap");function r3(e){this.include=e.include||[];this.implicit=e.implicit||[];this.explicit=e.explicit||[];this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar"){throw new vne("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}});this.compiledImplicit=g8e(this,"implicit",[]);this.compiledExplicit=g8e(this,"explicit",[]);this.compiledTypeMap=eSi(this.compiledImplicit,this.compiledExplicit)}a(r3,"Schema");r3.DEFAULT=null;r3.create=a(function e(){var t,r;switch(arguments.length){case 1:t=r3.DEFAULT;r=arguments[0];break;case 2:t=arguments[0];r=arguments[1];break;default:throw new vne("Wrong number of arguments for Schema.create function")}t=hWt.toArray(t);r=hWt.toArray(r);if(!t.every(function(n){return n instanceof r3})){throw new vne("Specified list of super schemas (or a single Schema object) contains a non-Schema object.")}if(!r.every(function(n){return n instanceof Z2i})){throw new vne("Specified list of YAML types (or a single Type object) contains a non-Type object.")}return new r3({include:t,explicit:r})},"createSchema");gWt.exports=r3});var _Wt=y((FKs,yWt)=>{"use strict";var tSi=iu();yWt.exports=new tSi("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var EWt=y((BKs,vWt)=>{"use strict";var rSi=iu();vWt.exports=new rSi("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var SWt=y((MKs,bWt)=>{"use strict";var nSi=iu();bWt.exports=new nSi("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var Ene=y((qKs,AWt)=>{"use strict";var iSi=_w();AWt.exports=new iSi({explicit:[_Wt(),EWt(),SWt()]})});var wWt=y((UKs,CWt)=>{"use strict";var sSi=iu();function aSi(e){if(e===null)return true;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}a(aSi,"resolveYamlNull");function oSi(){return null}a(oSi,"constructYamlNull");function uSi(e){return e===null}a(uSi,"isNull");CWt.exports=new sSi("tag:yaml.org,2002:null",{kind:"scalar",resolve:aSi,construct:oSi,predicate:uSi,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var xWt=y((jKs,TWt)=>{"use strict";var lSi=iu();function cSi(e){if(e===null)return false;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}a(cSi,"resolveYamlBoolean");function dSi(e){return e==="true"||e==="True"||e==="TRUE"}a(dSi,"constructYamlBoolean");function pSi(e){return Object.prototype.toString.call(e)==="[object Boolean]"}a(pSi,"isBoolean");TWt.exports=new lSi("tag:yaml.org,2002:bool",{kind:"scalar",resolve:cSi,construct:dSi,predicate:pSi,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var OWt=y((HKs,RWt)=>{"use strict";var fSi=yw();var mSi=iu();function hSi(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}a(hSi,"isHexCode");function gSi(e){return 48<=e&&e<=55}a(gSi,"isOctCode");function ySi(e){return 48<=e&&e<=57}a(ySi,"isDecCode");function _Si(e){if(e===null)return false;var t=e.length,r=0,n=false,i;if(!t)return false;i=e[r];if(i==="-"||i==="+"){i=e[++r]}if(i==="0"){if(r+1===t)return true;i=e[++r];if(i==="b"){r++;for(;r<t;r++){i=e[r];if(i==="_")continue;if(i!=="0"&&i!=="1")return false;n=true}return n&&i!=="_"}if(i==="x"){r++;for(;r<t;r++){i=e[r];if(i==="_")continue;if(!hSi(e.charCodeAt(r)))return false;n=true}return n&&i!=="_"}for(;r<t;r++){i=e[r];if(i==="_")continue;if(!gSi(e.charCodeAt(r)))return false;n=true}return n&&i!=="_"}if(i==="_")return false;for(;r<t;r++){i=e[r];if(i==="_")continue;if(i===":")break;if(!ySi(e.charCodeAt(r))){return false}n=true}if(!n||i==="_")return false;if(i!==":")return true;return/^(:[0-5]?[0-9])+$/.test(e.slice(r))}a(_Si,"resolveYamlInteger");function vSi(e){var t=e,r=1,n,i,s=[];if(t.indexOf("_")!==-1){t=t.replace(/_/g,"")}n=t[0];if(n==="-"||n==="+"){if(n==="-")r=-1;t=t.slice(1);n=t[0]}if(t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t,16);return r*parseInt(t,8)}if(t.indexOf(":")!==-1){t.split(":").forEach(function(o){s.unshift(parseInt(o,10))});t=0;i=1;s.forEach(function(o){t+=o*i;i*=60});return r*t}return r*parseInt(t,10)}a(vSi,"constructYamlInteger");function ESi(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1===0&&!fSi.isNegativeZero(e))}a(ESi,"isInteger");RWt.exports=new mSi("tag:yaml.org,2002:int",{kind:"scalar",resolve:_Si,construct:vSi,predicate:ESi,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var IWt=y((zKs,NWt)=>{"use strict";var PWt=yw();var bSi=iu();var SSi=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ASi(e){if(e===null)return false;if(!SSi.test(e)||e[e.length-1]==="_"){return false}return true}a(ASi,"resolveYamlFloat");function CSi(e){var t,r,n,i;t=e.replace(/_/g,"").toLowerCase();r=t[0]==="-"?-1:1;i=[];if("+-".indexOf(t[0])>=0){t=t.slice(1)}if(t===".inf"){return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(t===".nan"){return NaN}else if(t.indexOf(":")>=0){t.split(":").forEach(function(s){i.unshift(parseFloat(s,10))});t=0;n=1;i.forEach(function(s){t+=s*n;n*=60});return r*t}return r*parseFloat(t,10)}a(CSi,"constructYamlFloat");var wSi=/^[-+]?[0-9]+e/;function TSi(e,t){var r;if(isNaN(e)){switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(PWt.isNegativeZero(e)){return"-0.0"}r=e.toString(10);return wSi.test(r)?r.replace("e",".e"):r}a(TSi,"representYamlFloat");function xSi(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||PWt.isNegativeZero(e))}a(xSi,"isFloat");NWt.exports=new bSi("tag:yaml.org,2002:float",{kind:"scalar",resolve:ASi,construct:CSi,predicate:xSi,represent:TSi,defaultStyle:"lowercase"})});var y8e=y((WKs,kWt)=>{"use strict";var RSi=_w();kWt.exports=new RSi({include:[Ene()],implicit:[wWt(),xWt(),OWt(),IWt()]})});var _8e=y((YKs,DWt)=>{"use strict";var OSi=_w();DWt.exports=new OSi({include:[y8e()]})});var MWt=y((XKs,BWt)=>{"use strict";var PSi=iu();var LWt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");var FWt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function NSi(e){if(e===null)return false;if(LWt.exec(e)!==null)return true;if(FWt.exec(e)!==null)return true;return false}a(NSi,"resolveYamlTimestamp");function ISi(e){var t,r,n,i,s,o,u,l=0,c=null,d,p,f;t=LWt.exec(e);if(t===null)t=FWt.exec(e);if(t===null)throw new Error("Date resolve error");r=+t[1];n=+t[2]-1;i=+t[3];if(!t[4]){return new Date(Date.UTC(r,n,i))}s=+t[4];o=+t[5];u=+t[6];if(t[7]){l=t[7].slice(0,3);while(l.length<3){l+="0"}l=+l}if(t[9]){d=+t[10];p=+(t[11]||0);c=(d*60+p)*6e4;if(t[9]==="-")c=-c}f=new Date(Date.UTC(r,n,i,s,o,u,l));if(c)f.setTime(f.getTime()-c);return f}a(ISi,"constructYamlTimestamp");function kSi(e){return e.toISOString()}a(kSi,"representYamlTimestamp");BWt.exports=new PSi("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:NSi,construct:ISi,instanceOf:Date,represent:kSi})});var UWt=y((QKs,qWt)=>{"use strict";var DSi=iu();function LSi(e){return e==="<<"||e===null}a(LSi,"resolveYamlMerge");qWt.exports=new DSi("tag:yaml.org,2002:merge",{kind:"scalar",resolve:LSi})});var GWt=y((eWs,jWt)=>{"use strict";var vw;try{$Wt=require;vw=$Wt("buffer").Buffer}catch(e){}var $Wt;var FSi=iu();var v8e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function BSi(e){if(e===null)return false;var t,r,n=0,i=e.length,s=v8e;for(r=0;r<i;r++){t=s.indexOf(e.charAt(r));if(t>64)continue;if(t<0)return false;n+=6}return n%8===0}a(BSi,"resolveYamlBinary");function MSi(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,s=v8e,o=0,u=[];for(t=0;t<i;t++){if(t%4===0&&t){u.push(o>>16&255);u.push(o>>8&255);u.push(o&255)}o=o<<6|s.indexOf(n.charAt(t))}r=i%4*6;if(r===0){u.push(o>>16&255);u.push(o>>8&255);u.push(o&255)}else if(r===18){u.push(o>>10&255);u.push(o>>2&255)}else if(r===12){u.push(o>>4&255)}if(vw){return vw.from?vw.from(u):new vw(u)}return u}a(MSi,"constructYamlBinary");function qSi(e){var t="",r=0,n,i,s=e.length,o=v8e;for(n=0;n<s;n++){if(n%3===0&&n){t+=o[r>>18&63];t+=o[r>>12&63];t+=o[r>>6&63];t+=o[r&63]}r=(r<<8)+e[n]}i=s%3;if(i===0){t+=o[r>>18&63];t+=o[r>>12&63];t+=o[r>>6&63];t+=o[r&63]}else if(i===2){t+=o[r>>10&63];t+=o[r>>4&63];t+=o[r<<2&63];t+=o[64]}else if(i===1){t+=o[r>>2&63];t+=o[r<<4&63];t+=o[64];t+=o[64]}return t}a(qSi,"representYamlBinary");function USi(e){return vw&&vw.isBuffer(e)}a(USi,"isBinary");jWt.exports=new FSi("tag:yaml.org,2002:binary",{kind:"scalar",resolve:BSi,construct:MSi,predicate:USi,represent:qSi})});var VWt=y((rWs,HWt)=>{"use strict";var $Si=iu();var jSi=Object.prototype.hasOwnProperty;var GSi=Object.prototype.toString;function HSi(e){if(e===null)return true;var t=[],r,n,i,s,o,u=e;for(r=0,n=u.length;r<n;r+=1){i=u[r];o=false;if(GSi.call(i)!=="[object Object]")return false;for(s in i){if(jSi.call(i,s)){if(!o)o=true;else return false}}if(!o)return false;if(t.indexOf(s)===-1)t.push(s);else return false}return true}a(HSi,"resolveYamlOmap");function VSi(e){return e!==null?e:[]}a(VSi,"constructYamlOmap");HWt.exports=new $Si("tag:yaml.org,2002:omap",{kind:"sequence",resolve:HSi,construct:VSi})});var KWt=y((iWs,zWt)=>{"use strict";var zSi=iu();var KSi=Object.prototype.toString;function WSi(e){if(e===null)return true;var t,r,n,i,s,o=e;s=new Array(o.length);for(t=0,r=o.length;t<r;t+=1){n=o[t];if(KSi.call(n)!=="[object Object]")return false;i=Object.keys(n);if(i.length!==1)return false;s[t]=[i[0],n[i[0]]]}return true}a(WSi,"resolveYamlPairs");function YSi(e){if(e===null)return[];var t,r,n,i,s,o=e;s=new Array(o.length);for(t=0,r=o.length;t<r;t+=1){n=o[t];i=Object.keys(n);s[t]=[i[0],n[i[0]]]}return s}a(YSi,"constructYamlPairs");zWt.exports=new zSi("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:WSi,construct:YSi})});var YWt=y((aWs,WWt)=>{"use strict";var XSi=iu();var JSi=Object.prototype.hasOwnProperty;function QSi(e){if(e===null)return true;var t,r=e;for(t in r){if(JSi.call(r,t)){if(r[t]!==null)return false}}return true}a(QSi,"resolveYamlSet");function ZSi(e){return e!==null?e:{}}a(ZSi,"constructYamlSet");WWt.exports=new XSi("tag:yaml.org,2002:set",{kind:"mapping",resolve:QSi,construct:ZSi})});var n3=y((uWs,XWt)=>{"use strict";var eAi=_w();XWt.exports=new eAi({include:[_8e()],implicit:[MWt(),UWt()],explicit:[GWt(),VWt(),KWt(),YWt()]})});var QWt=y((lWs,JWt)=>{"use strict";var tAi=iu();function rAi(){return true}a(rAi,"resolveJavascriptUndefined");function nAi(){return void 0}a(nAi,"constructJavascriptUndefined");function iAi(){return""}a(iAi,"representJavascriptUndefined");function sAi(e){return typeof e==="undefined"}a(sAi,"isUndefined");JWt.exports=new tAi("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:rAi,construct:nAi,predicate:sAi,represent:iAi})});var eYt=y((dWs,ZWt)=>{"use strict";var aAi=iu();function oAi(e){if(e===null)return false;if(e.length===0)return false;var t=e,r=/\/([gim]*)$/.exec(e),n="";if(t[0]==="/"){if(r)n=r[1];if(n.length>3)return false;if(t[t.length-n.length-1]!=="/")return false}return true}a(oAi,"resolveJavascriptRegExp");function uAi(e){var t=e,r=/\/([gim]*)$/.exec(e),n="";if(t[0]==="/"){if(r)n=r[1];t=t.slice(1,t.length-n.length-1)}return new RegExp(t,n)}a(uAi,"constructJavascriptRegExp");function lAi(e){var t="/"+e.source+"/";if(e.global)t+="g";if(e.multiline)t+="m";if(e.ignoreCase)t+="i";return t}a(lAi,"representJavascriptRegExp");function cAi(e){return Object.prototype.toString.call(e)==="[object RegExp]"}a(cAi,"isRegExp");ZWt.exports=new aAi("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:oAi,construct:uAi,predicate:cAi,represent:lAi})});var nYt=y((fWs,rYt)=>{"use strict";var bne;try{tYt=require;bne=tYt("esprima")}catch(e){if(typeof window!=="undefined")bne=window.esprima}var tYt;var dAi=iu();function pAi(e){if(e===null)return false;try{var t="("+e+")",r=bne.parse(t,{range:true});if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(n){return false}}a(pAi,"resolveJavascriptFunction");function fAi(e){var t="("+e+")",r=bne.parse(t,{range:true}),n=[],i;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}r.body[0].expression.params.forEach(function(s){n.push(s.name)});i=r.body[0].expression.body.range;if(r.body[0].expression.body.type==="BlockStatement"){return new Function(n,t.slice(i[0]+1,i[1]-1))}return new Function(n,"return "+t.slice(i[0],i[1]))}a(fAi,"constructJavascriptFunction");function mAi(e){return e.toString()}a(mAi,"representJavascriptFunction");function hAi(e){return Object.prototype.toString.call(e)==="[object Function]"}a(hAi,"isFunction");rYt.exports=new dAi("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:pAi,construct:fAi,predicate:hAi,represent:mAi})});var _q=y((hWs,sYt)=>{"use strict";var iYt=_w();sYt.exports=iYt.DEFAULT=new iYt({include:[n3()],explicit:[QWt(),eYt(),nYt()]})});var CYt=y((gWs,vq)=>{"use strict";var Qy=yw();var pYt=t3();var gAi=pWt();var fYt=n3();var yAi=_q();var Xb=Object.prototype.hasOwnProperty;var Sne=1;var mYt=2;var hYt=3;var Ane=4;var E8e=1;var _Ai=2;var aYt=3;var vAi=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var EAi=/[\x85\u2028\u2029]/;var bAi=/[,\[\]\{\}]/;var gYt=/^(?:!|!!|![a-z\-]+!)$/i;var yYt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function oYt(e){return Object.prototype.toString.call(e)}a(oYt,"_class");function Ng(e){return e===10||e===13}a(Ng,"is_EOL");function bw(e){return e===9||e===32}a(bw,"is_WHITE_SPACE");function jd(e){return e===9||e===32||e===10||e===13}a(jd,"is_WS_OR_EOL");function i3(e){return e===44||e===91||e===93||e===123||e===125}a(i3,"is_FLOW_INDICATOR");function SAi(e){var t;if(48<=e&&e<=57){return e-48}t=e|32;if(97<=t&&t<=102){return t-97+10}return-1}a(SAi,"fromHexCode");function AAi(e){if(e===120){return 2}if(e===117){return 4}if(e===85){return 8}return 0}a(AAi,"escapedHexLen");function CAi(e){if(48<=e&&e<=57){return e-48}return-1}a(CAi,"fromDecimalCode");function uYt(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116?" ":e===9?" ":e===110?"\n":e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}a(uYt,"simpleEscapeSequence");function wAi(e){if(e<=65535){return String.fromCharCode(e)}return String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}a(wAi,"charFromCodepoint");var _Yt=new Array(256);var vYt=new Array(256);for(Ew=0;Ew<256;Ew++){_Yt[Ew]=uYt(Ew)?1:0;vYt[Ew]=uYt(Ew)}var Ew;function TAi(e,t){this.input=e;this.filename=t["filename"]||null;this.schema=t["schema"]||yAi;this.onWarning=t["onWarning"]||null;this.legacy=t["legacy"]||false;this.json=t["json"]||false;this.listener=t["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}a(TAi,"State");function EYt(e,t){return new pYt(t,new gAi(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}a(EYt,"generateError");function Br(e,t){throw EYt(e,t)}a(Br,"throwError");function Cne(e,t){if(e.onWarning){e.onWarning.call(null,EYt(e,t))}}a(Cne,"throwWarning");var lYt={YAML:a(function e(t,r,n){var i,s,o;if(t.version!==null){Br(t,"duplication of %YAML directive")}if(n.length!==1){Br(t,"YAML directive accepts exactly one argument")}i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]);if(i===null){Br(t,"ill-formed argument of the YAML directive")}s=parseInt(i[1],10);o=parseInt(i[2],10);if(s!==1){Br(t,"unacceptable YAML version of the document")}t.version=n[0];t.checkLineBreaks=o<2;if(o!==1&&o!==2){Cne(t,"unsupported YAML version of the document")}},"handleYamlDirective"),TAG:a(function e(t,r,n){var i,s;if(n.length!==2){Br(t,"TAG directive accepts exactly two arguments")}i=n[0];s=n[1];if(!gYt.test(i)){Br(t,"ill-formed tag handle (first argument) of the TAG directive")}if(Xb.call(t.tagMap,i)){Br(t,'there is a previously declared suffix for "'+i+'" tag handle')}if(!yYt.test(s)){Br(t,"ill-formed tag prefix (second argument) of the TAG directive")}t.tagMap[i]=s},"handleTagDirective")};function Yb(e,t,r,n){var i,s,o,u;if(t<r){u=e.input.slice(t,r);if(n){for(i=0,s=u.length;i<s;i+=1){o=u.charCodeAt(i);if(!(o===9||32<=o&&o<=1114111)){Br(e,"expected valid JSON character")}}}else if(vAi.test(u)){Br(e,"the stream contains non-printable characters")}e.result+=u}}a(Yb,"captureSegment");function cYt(e,t,r,n){var i,s,o,u;if(!Qy.isObject(r)){Br(e,"cannot merge mappings; the provided source object is unacceptable")}i=Object.keys(r);for(o=0,u=i.length;o<u;o+=1){s=i[o];if(!Xb.call(t,s)){t[s]=r[s];n[s]=true}}}a(cYt,"mergeMappings");function s3(e,t,r,n,i,s,o,u){var l,c;if(Array.isArray(i)){i=Array.prototype.slice.call(i);for(l=0,c=i.length;l<c;l+=1){if(Array.isArray(i[l])){Br(e,"nested arrays are not supported inside keys")}if(typeof i==="object"&&oYt(i[l])==="[object Object]"){i[l]="[object Object]"}}}if(typeof i==="object"&&oYt(i)==="[object Object]"){i="[object Object]"}i=String(i);if(t===null){t={}}if(n==="tag:yaml.org,2002:merge"){if(Array.isArray(s)){for(l=0,c=s.length;l<c;l+=1){cYt(e,t,s[l],r)}}else{cYt(e,t,s,r)}}else{if(!e.json&&!Xb.call(r,i)&&Xb.call(t,i)){e.line=o||e.line;e.position=u||e.position;Br(e,"duplicated mapping key")}t[i]=s;delete r[i]}return t}a(s3,"storeMappingPair");function b8e(e){var t;t=e.input.charCodeAt(e.position);if(t===10){e.position++}else if(t===13){e.position++;if(e.input.charCodeAt(e.position)===10){e.position++}}else{Br(e,"a line break is expected")}e.line+=1;e.lineStart=e.position}a(b8e,"readLineBreak");function Ko(e,t,r){var n=0,i=e.input.charCodeAt(e.position);while(i!==0){while(bw(i)){i=e.input.charCodeAt(++e.position)}if(t&&i===35){do{i=e.input.charCodeAt(++e.position)}while(i!==10&&i!==13&&i!==0)}if(Ng(i)){b8e(e);i=e.input.charCodeAt(e.position);n++;e.lineIndent=0;while(i===32){e.lineIndent++;i=e.input.charCodeAt(++e.position)}}else{break}}if(r!==-1&&n!==0&&e.lineIndent<r){Cne(e,"deficient indentation")}return n}a(Ko,"skipSeparationSpace");function wne(e){var t=e.position,r;r=e.input.charCodeAt(t);if((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)){t+=3;r=e.input.charCodeAt(t);if(r===0||jd(r)){return true}}return false}a(wne,"testDocumentSeparator");function S8e(e,t){if(t===1){e.result+=" "}else if(t>1){e.result+=Qy.repeat("\n",t-1)}}a(S8e,"writeFoldedLines");function xAi(e,t,r){var n,i,s,o,u,l,c,d,p=e.kind,f=e.result,m;m=e.input.charCodeAt(e.position);if(jd(m)||i3(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96){return false}if(m===63||m===45){i=e.input.charCodeAt(e.position+1);if(jd(i)||r&&i3(i)){return false}}e.kind="scalar";e.result="";s=o=e.position;u=false;while(m!==0){if(m===58){i=e.input.charCodeAt(e.position+1);if(jd(i)||r&&i3(i)){break}}else if(m===35){n=e.input.charCodeAt(e.position-1);if(jd(n)){break}}else if(e.position===e.lineStart&&wne(e)||r&&i3(m)){break}else if(Ng(m)){l=e.line;c=e.lineStart;d=e.lineIndent;Ko(e,false,-1);if(e.lineIndent>=t){u=true;m=e.input.charCodeAt(e.position);continue}else{e.position=o;e.line=l;e.lineStart=c;e.lineIndent=d;break}}if(u){Yb(e,s,o,false);S8e(e,e.line-l);s=o=e.position;u=false}if(!bw(m)){o=e.position+1}m=e.input.charCodeAt(++e.position)}Yb(e,s,o,false);if(e.result){return true}e.kind=p;e.result=f;return false}a(xAi,"readPlainScalar");function RAi(e,t){var r,n,i;r=e.input.charCodeAt(e.position);if(r!==39){return false}e.kind="scalar";e.result="";e.position++;n=i=e.position;while((r=e.input.charCodeAt(e.position))!==0){if(r===39){Yb(e,n,e.position,true);r=e.input.charCodeAt(++e.position);if(r===39){n=e.position;e.position++;i=e.position}else{return true}}else if(Ng(r)){Yb(e,n,i,true);S8e(e,Ko(e,false,t));n=i=e.position}else if(e.position===e.lineStart&&wne(e)){Br(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;i=e.position}}Br(e,"unexpected end of the stream within a single quoted scalar")}a(RAi,"readSingleQuotedScalar");function OAi(e,t){var r,n,i,s,o,u;u=e.input.charCodeAt(e.position);if(u!==34){return false}e.kind="scalar";e.result="";e.position++;r=n=e.position;while((u=e.input.charCodeAt(e.position))!==0){if(u===34){Yb(e,r,e.position,true);e.position++;return true}else if(u===92){Yb(e,r,e.position,true);u=e.input.charCodeAt(++e.position);if(Ng(u)){Ko(e,false,t)}else if(u<256&&_Yt[u]){e.result+=vYt[u];e.position++}else if((o=AAi(u))>0){i=o;s=0;for(;i>0;i--){u=e.input.charCodeAt(++e.position);if((o=SAi(u))>=0){s=(s<<4)+o}else{Br(e,"expected hexadecimal character")}}e.result+=wAi(s);e.position++}else{Br(e,"unknown escape sequence")}r=n=e.position}else if(Ng(u)){Yb(e,r,n,true);S8e(e,Ko(e,false,t));r=n=e.position}else if(e.position===e.lineStart&&wne(e)){Br(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;n=e.position}}Br(e,"unexpected end of the stream within a double quoted scalar")}a(OAi,"readDoubleQuotedScalar");function PAi(e,t){var r=true,n,i=e.tag,s,o=e.anchor,u,l,c,d,p,f={},m,h,g,_;_=e.input.charCodeAt(e.position);if(_===91){l=93;p=false;s=[]}else if(_===123){l=125;p=true;s={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=s}_=e.input.charCodeAt(++e.position);while(_!==0){Ko(e,true,t);_=e.input.charCodeAt(e.position);if(_===l){e.position++;e.tag=i;e.anchor=o;e.kind=p?"mapping":"sequence";e.result=s;return true}else if(!r){Br(e,"missed comma between flow collection entries")}h=m=g=null;c=d=false;if(_===63){u=e.input.charCodeAt(e.position+1);if(jd(u)){c=d=true;e.position++;Ko(e,true,t)}}n=e.line;a3(e,t,Sne,false,true);h=e.tag;m=e.result;Ko(e,true,t);_=e.input.charCodeAt(e.position);if((d||e.line===n)&&_===58){c=true;_=e.input.charCodeAt(++e.position);Ko(e,true,t);a3(e,t,Sne,false,true);g=e.result}if(p){s3(e,s,f,h,m,g)}else if(c){s.push(s3(e,null,f,h,m,g))}else{s.push(m)}Ko(e,true,t);_=e.input.charCodeAt(e.position);if(_===44){r=true;_=e.input.charCodeAt(++e.position)}else{r=false}}Br(e,"unexpected end of the stream within a flow collection")}a(PAi,"readFlowCollection");function NAi(e,t){var r,n,i=E8e,s=false,o=false,u=t,l=0,c=false,d,p;p=e.input.charCodeAt(e.position);if(p===124){n=false}else if(p===62){n=true}else{return false}e.kind="scalar";e.result="";while(p!==0){p=e.input.charCodeAt(++e.position);if(p===43||p===45){if(E8e===i){i=p===43?aYt:_Ai}else{Br(e,"repeat of a chomping mode identifier")}}else if((d=CAi(p))>=0){if(d===0){Br(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!o){u=t+d-1;o=true}else{Br(e,"repeat of an indentation width identifier")}}else{break}}if(bw(p)){do{p=e.input.charCodeAt(++e.position)}while(bw(p));if(p===35){do{p=e.input.charCodeAt(++e.position)}while(!Ng(p)&&p!==0)}}while(p!==0){b8e(e);e.lineIndent=0;p=e.input.charCodeAt(e.position);while((!o||e.lineIndent<u)&&p===32){e.lineIndent++;p=e.input.charCodeAt(++e.position)}if(!o&&e.lineIndent>u){u=e.lineIndent}if(Ng(p)){l++;continue}if(e.lineIndent<u){if(i===aYt){e.result+=Qy.repeat("\n",s?1+l:l)}else if(i===E8e){if(s){e.result+="\n"}}break}if(n){if(bw(p)){c=true;e.result+=Qy.repeat("\n",s?1+l:l)}else if(c){c=false;e.result+=Qy.repeat("\n",l+1)}else if(l===0){if(s){e.result+=" "}}else{e.result+=Qy.repeat("\n",l)}}else{e.result+=Qy.repeat("\n",s?1+l:l)}s=true;o=true;l=0;r=e.position;while(!Ng(p)&&p!==0){p=e.input.charCodeAt(++e.position)}Yb(e,r,e.position,false)}return true}a(NAi,"readBlockScalar");function dYt(e,t){var r,n=e.tag,i=e.anchor,s=[],o,u=false,l;if(e.anchor!==null){e.anchorMap[e.anchor]=s}l=e.input.charCodeAt(e.position);while(l!==0){if(l!==45){break}o=e.input.charCodeAt(e.position+1);if(!jd(o)){break}u=true;e.position++;if(Ko(e,true,-1)){if(e.lineIndent<=t){s.push(null);l=e.input.charCodeAt(e.position);continue}}r=e.line;a3(e,t,hYt,false,true);s.push(e.result);Ko(e,true,-1);l=e.input.charCodeAt(e.position);if((e.line===r||e.lineIndent>t)&&l!==0){Br(e,"bad indentation of a sequence entry")}else if(e.lineIndent<t){break}}if(u){e.tag=n;e.anchor=i;e.kind="sequence";e.result=s;return true}return false}a(dYt,"readBlockSequence");function IAi(e,t,r){var n,i,s,o,u=e.tag,l=e.anchor,c={},d={},p=null,f=null,m=null,h=false,g=false,_;if(e.anchor!==null){e.anchorMap[e.anchor]=c}_=e.input.charCodeAt(e.position);while(_!==0){n=e.input.charCodeAt(e.position+1);s=e.line;o=e.position;if((_===63||_===58)&&jd(n)){if(_===63){if(h){s3(e,c,d,p,f,null);p=f=m=null}g=true;h=true;i=true}else if(h){h=false;i=true}else{Br(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line")}e.position+=1;_=n}else if(a3(e,r,mYt,false,true)){if(e.line===s){_=e.input.charCodeAt(e.position);while(bw(_)){_=e.input.charCodeAt(++e.position)}if(_===58){_=e.input.charCodeAt(++e.position);if(!jd(_)){Br(e,"a whitespace character is expected after the key-value separator within a block mapping")}if(h){s3(e,c,d,p,f,null);p=f=m=null}g=true;h=false;i=false;p=e.tag;f=e.result}else if(g){Br(e,"can not read an implicit mapping pair; a colon is missed")}else{e.tag=u;e.anchor=l;return true}}else if(g){Br(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}else{e.tag=u;e.anchor=l;return true}}else{break}if(e.line===s||e.lineIndent>t){if(a3(e,t,Ane,true,i)){if(h){f=e.result}else{m=e.result}}if(!h){s3(e,c,d,p,f,m,s,o);p=f=m=null}Ko(e,true,-1);_=e.input.charCodeAt(e.position)}if(e.lineIndent>t&&_!==0){Br(e,"bad indentation of a mapping entry")}else if(e.lineIndent<t){break}}if(h){s3(e,c,d,p,f,null)}if(g){e.tag=u;e.anchor=l;e.kind="mapping";e.result=c}return g}a(IAi,"readBlockMapping");function kAi(e){var t,r=false,n=false,i,s,o;o=e.input.charCodeAt(e.position);if(o!==33)return false;if(e.tag!==null){Br(e,"duplication of a tag property")}o=e.input.charCodeAt(++e.position);if(o===60){r=true;o=e.input.charCodeAt(++e.position)}else if(o===33){n=true;i="!!";o=e.input.charCodeAt(++e.position)}else{i="!"}t=e.position;if(r){do{o=e.input.charCodeAt(++e.position)}while(o!==0&&o!==62);if(e.position<e.length){s=e.input.slice(t,e.position);o=e.input.charCodeAt(++e.position)}else{Br(e,"unexpected end of the stream within a verbatim tag")}}else{while(o!==0&&!jd(o)){if(o===33){if(!n){i=e.input.slice(t-1,e.position+1);if(!gYt.test(i)){Br(e,"named tag handle cannot contain such characters")}n=true;t=e.position+1}else{Br(e,"tag suffix cannot contain exclamation marks")}}o=e.input.charCodeAt(++e.position)}s=e.input.slice(t,e.position);if(bAi.test(s)){Br(e,"tag suffix cannot contain flow indicator characters")}}if(s&&!yYt.test(s)){Br(e,"tag name cannot contain such characters: "+s)}if(r){e.tag=s}else if(Xb.call(e.tagMap,i)){e.tag=e.tagMap[i]+s}else if(i==="!"){e.tag="!"+s}else if(i==="!!"){e.tag="tag:yaml.org,2002:"+s}else{Br(e,'undeclared tag handle "'+i+'"')}return true}a(kAi,"readTagProperty");function DAi(e){var t,r;r=e.input.charCodeAt(e.position);if(r!==38)return false;if(e.anchor!==null){Br(e,"duplication of an anchor property")}r=e.input.charCodeAt(++e.position);t=e.position;while(r!==0&&!jd(r)&&!i3(r)){r=e.input.charCodeAt(++e.position)}if(e.position===t){Br(e,"name of an anchor node must contain at least one character")}e.anchor=e.input.slice(t,e.position);return true}a(DAi,"readAnchorProperty");function LAi(e){var t,r,n;n=e.input.charCodeAt(e.position);if(n!==42)return false;n=e.input.charCodeAt(++e.position);t=e.position;while(n!==0&&!jd(n)&&!i3(n)){n=e.input.charCodeAt(++e.position)}if(e.position===t){Br(e,"name of an alias node must contain at least one character")}r=e.input.slice(t,e.position);if(!Xb.call(e.anchorMap,r)){Br(e,'unidentified alias "'+r+'"')}e.result=e.anchorMap[r];Ko(e,true,-1);return true}a(LAi,"readAlias");function a3(e,t,r,n,i){var s,o,u,l=1,c=false,d=false,p,f,m,h,g;if(e.listener!==null){e.listener("open",e)}e.tag=null;e.anchor=null;e.kind=null;e.result=null;s=o=u=Ane===r||hYt===r;if(n){if(Ko(e,true,-1)){c=true;if(e.lineIndent>t){l=1}else if(e.lineIndent===t){l=0}else if(e.lineIndent<t){l=-1}}}if(l===1){while(kAi(e)||DAi(e)){if(Ko(e,true,-1)){c=true;u=s;if(e.lineIndent>t){l=1}else if(e.lineIndent===t){l=0}else if(e.lineIndent<t){l=-1}}else{u=false}}}if(u){u=c||i}if(l===1||Ane===r){if(Sne===r||mYt===r){h=t}else{h=t+1}g=e.position-e.lineStart;if(l===1){if(u&&(dYt(e,g)||IAi(e,g,h))||PAi(e,h)){d=true}else{if(o&&NAi(e,h)||RAi(e,h)||OAi(e,h)){d=true}else if(LAi(e)){d=true;if(e.tag!==null||e.anchor!==null){Br(e,"alias node should not have any properties")}}else if(xAi(e,h,Sne===r)){d=true;if(e.tag===null){e.tag="?"}}if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}else if(l===0){d=u&&dYt(e,g)}}if(e.tag!==null&&e.tag!=="!"){if(e.tag==="?"){if(e.result!==null&&e.kind!=="scalar"){Br(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"')}for(p=0,f=e.implicitTypes.length;p<f;p+=1){m=e.implicitTypes[p];if(m.resolve(e.result)){e.result=m.construct(e.result);e.tag=m.tag;if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}break}}}else if(Xb.call(e.typeMap[e.kind||"fallback"],e.tag)){m=e.typeMap[e.kind||"fallback"][e.tag];if(e.result!==null&&m.kind!==e.kind){Br(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"')}if(!m.resolve(e.result)){Br(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=m.construct(e.result);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}else{Br(e,"unknown tag !<"+e.tag+">")}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||d}a(a3,"composeNode");function FAi(e){var t=e.position,r,n,i,s=false,o;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap={};e.anchorMap={};while((o=e.input.charCodeAt(e.position))!==0){Ko(e,true,-1);o=e.input.charCodeAt(e.position);if(e.lineIndent>0||o!==37){break}s=true;o=e.input.charCodeAt(++e.position);r=e.position;while(o!==0&&!jd(o)){o=e.input.charCodeAt(++e.position)}n=e.input.slice(r,e.position);i=[];if(n.length<1){Br(e,"directive name must not be less than one character in length")}while(o!==0){while(bw(o)){o=e.input.charCodeAt(++e.position)}if(o===35){do{o=e.input.charCodeAt(++e.position)}while(o!==0&&!Ng(o));break}if(Ng(o))break;r=e.position;while(o!==0&&!jd(o)){o=e.input.charCodeAt(++e.position)}i.push(e.input.slice(r,e.position))}if(o!==0)b8e(e);if(Xb.call(lYt,n)){lYt[n](e,n,i)}else{Cne(e,'unknown document directive "'+n+'"')}}Ko(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;Ko(e,true,-1)}else if(s){Br(e,"directives end mark is expected")}a3(e,e.lineIndent-1,Ane,false,true);Ko(e,true,-1);if(e.checkLineBreaks&&EAi.test(e.input.slice(t,e.position))){Cne(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&wne(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;Ko(e,true,-1)}return}if(e.position<e.length-1){Br(e,"end of the stream or a document separator is expected")}else{return}}a(FAi,"readDocument");function bYt(e,t){e=String(e);t=t||{};if(e.length!==0){if(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13){e+="\n"}if(e.charCodeAt(0)===65279){e=e.slice(1)}}var r=new TAi(e,t);var n=e.indexOf("\0");if(n!==-1){r.position=n;Br(r,"null byte is not allowed in input")}r.input+="\0";while(r.input.charCodeAt(r.position)===32){r.lineIndent+=1;r.position+=1}while(r.position<r.length-1){FAi(r)}return r.documents}a(bYt,"loadDocuments");function SYt(e,t,r){if(t!==null&&typeof t==="object"&&typeof r==="undefined"){r=t;t=null}var n=bYt(e,r);if(typeof t!=="function"){return n}for(var i=0,s=n.length;i<s;i+=1){t(n[i])}}a(SYt,"loadAll");function AYt(e,t){var r=bYt(e,t);if(r.length===0){return void 0}else if(r.length===1){return r[0]}throw new pYt("expected a single document in the stream, but found more")}a(AYt,"load");function BAi(e,t,r){if(typeof t==="object"&&t!==null&&typeof r==="undefined"){r=t;t=null}return SYt(e,t,Qy.extend({schema:fYt},r))}a(BAi,"safeLoadAll");function MAi(e,t){return AYt(e,Qy.extend({schema:fYt},t))}a(MAi,"safeLoad");vq.exports.loadAll=SYt;vq.exports.load=AYt;vq.exports.safeLoadAll=BAi;vq.exports.safeLoad=MAi});var KYt=y((_Ws,T8e)=>{"use strict";var bq=yw();var Sq=t3();var qAi=_q();var UAi=n3();var IYt=Object.prototype.toString;var kYt=Object.prototype.hasOwnProperty;var $Ai=9;var Eq=10;var jAi=13;var GAi=32;var HAi=33;var VAi=34;var DYt=35;var zAi=37;var KAi=38;var WAi=39;var YAi=42;var LYt=44;var XAi=45;var FYt=58;var JAi=61;var QAi=62;var ZAi=63;var eCi=64;var BYt=91;var MYt=93;var tCi=96;var qYt=123;var rCi=124;var UYt=125;var Kl={};Kl[0]="\\0";Kl[7]="\\a";Kl[8]="\\b";Kl[9]="\\t";Kl[10]="\\n";Kl[11]="\\v";Kl[12]="\\f";Kl[13]="\\r";Kl[27]="\\e";Kl[34]='\\"';Kl[92]="\\\\";Kl[133]="\\N";Kl[160]="\\_";Kl[8232]="\\L";Kl[8233]="\\P";var nCi=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function iCi(e,t){var r,n,i,s,o,u,l;if(t===null)return{};r={};n=Object.keys(t);for(i=0,s=n.length;i<s;i+=1){o=n[i];u=String(t[o]);if(o.slice(0,2)==="!!"){o="tag:yaml.org,2002:"+o.slice(2)}l=e.compiledTypeMap["fallback"][o];if(l&&kYt.call(l.styleAliases,u)){u=l.styleAliases[u]}r[o]=u}return r}a(iCi,"compileStyleMap");function wYt(e){var t,r,n;t=e.toString(16).toUpperCase();if(e<=255){r="x";n=2}else if(e<=65535){r="u";n=4}else if(e<=4294967295){r="U";n=8}else{throw new Sq("code point within a string may not be greater than 0xFFFFFFFF")}return"\\"+r+bq.repeat("0",n-t.length)+t}a(wYt,"encodeHex");function sCi(e){this.schema=e["schema"]||qAi;this.indent=Math.max(1,e["indent"]||2);this.noArrayIndent=e["noArrayIndent"]||false;this.skipInvalid=e["skipInvalid"]||false;this.flowLevel=bq.isNothing(e["flowLevel"])?-1:e["flowLevel"];this.styleMap=iCi(this.schema,e["styles"]||null);this.sortKeys=e["sortKeys"]||false;this.lineWidth=e["lineWidth"]||80;this.noRefs=e["noRefs"]||false;this.noCompatMode=e["noCompatMode"]||false;this.condenseFlow=e["condenseFlow"]||false;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}a(sCi,"State");function TYt(e,t){var r=bq.repeat(" ",t),n=0,i=-1,s="",o,u=e.length;while(n<u){i=e.indexOf("\n",n);if(i===-1){o=e.slice(n);n=u}else{o=e.slice(n,i+1);n=i+1}if(o.length&&o!=="\n")s+=r;s+=o}return s}a(TYt,"indentString");function A8e(e,t){return"\n"+bq.repeat(" ",e.indent*t)}a(A8e,"generateNextLine");function aCi(e,t){var r,n,i;for(r=0,n=e.implicitTypes.length;r<n;r+=1){i=e.implicitTypes[r];if(i.resolve(t)){return true}}return false}a(aCi,"testImplicitResolving");function w8e(e){return e===GAi||e===$Ai}a(w8e,"isWhitespace");function o3(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}a(o3,"isPrintable");function oCi(e){return o3(e)&&!w8e(e)&&e!==65279&&e!==jAi&&e!==Eq}a(oCi,"isNsChar");function xYt(e,t){return o3(e)&&e!==65279&&e!==LYt&&e!==BYt&&e!==MYt&&e!==qYt&&e!==UYt&&e!==FYt&&(e!==DYt||t&&oCi(t))}a(xYt,"isPlainSafe");function uCi(e){return o3(e)&&e!==65279&&!w8e(e)&&e!==XAi&&e!==ZAi&&e!==FYt&&e!==LYt&&e!==BYt&&e!==MYt&&e!==qYt&&e!==UYt&&e!==DYt&&e!==KAi&&e!==YAi&&e!==HAi&&e!==rCi&&e!==JAi&&e!==QAi&&e!==WAi&&e!==VAi&&e!==zAi&&e!==eCi&&e!==tCi}a(uCi,"isPlainSafeFirst");function $Yt(e){var t=/^\n* /;return t.test(e)}a($Yt,"needIndentIndicator");var jYt=1;var GYt=2;var HYt=3;var VYt=4;var Tne=5;function lCi(e,t,r,n,i){var s;var o,u;var l=false;var c=false;var d=n!==-1;var p=-1;var f=uCi(e.charCodeAt(0))&&!w8e(e.charCodeAt(e.length-1));if(t){for(s=0;s<e.length;s++){o=e.charCodeAt(s);if(!o3(o)){return Tne}u=s>0?e.charCodeAt(s-1):null;f=f&&xYt(o,u)}}else{for(s=0;s<e.length;s++){o=e.charCodeAt(s);if(o===Eq){l=true;if(d){c=c||s-p-1>n&&e[p+1]!==" ";p=s}}else if(!o3(o)){return Tne}u=s>0?e.charCodeAt(s-1):null;f=f&&xYt(o,u)}c=c||d&&(s-p-1>n&&e[p+1]!==" ")}if(!l&&!c){return f&&!i(e)?jYt:GYt}if(r>9&&$Yt(e)){return Tne}return c?VYt:HYt}a(lCi,"chooseScalarStyle");function cCi(e,t,r,n){e.dump=function(){if(t.length===0){return"''"}if(!e.noCompatMode&&nCi.indexOf(t)!==-1){return"'"+t+"'"}var i=e.indent*Math.max(1,r);var s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i);var o=n||e.flowLevel>-1&&r>=e.flowLevel;function u(l){return aCi(e,l)}a(u,"testAmbiguity");switch(lCi(t,o,e.indent,s,u)){case jYt:return t;case GYt:return"'"+t.replace(/'/g,"''")+"'";case HYt:return"|"+RYt(t,e.indent)+OYt(TYt(t,i));case VYt:return">"+RYt(t,e.indent)+OYt(TYt(dCi(t,s),i));case Tne:return'"'+pCi(t,s)+'"';default:throw new Sq("impossible error: invalid scalar style")}}()}a(cCi,"writeScalar");function RYt(e,t){var r=$Yt(e)?String(t):"";var n=e[e.length-1]==="\n";var i=n&&(e[e.length-2]==="\n"||e==="\n");var s=i?"+":n?"":"-";return r+s+"\n"}a(RYt,"blockHeader");function OYt(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}a(OYt,"dropEndingNewline");function dCi(e,t){var r=/(\n+)([^\n]*)/g;var n=function(){var c=e.indexOf("\n");c=c!==-1?c:e.length;r.lastIndex=c;return PYt(e.slice(0,c),t)}();var i=e[0]==="\n"||e[0]===" ";var s;var o;while(o=r.exec(e)){var u=o[1],l=o[2];s=l[0]===" ";n+=u+(!i&&!s&&l!==""?"\n":"")+PYt(l,t);i=s}return n}a(dCi,"foldString");function PYt(e,t){if(e===""||e[0]===" ")return e;var r=/ [^ ]/g;var n;var i=0,s,o=0,u=0;var l="";while(n=r.exec(e)){u=n.index;if(u-i>t){s=o>i?o:u;l+="\n"+e.slice(i,s);i=s+1}o=u}l+="\n";if(e.length-i>t&&o>i){l+=e.slice(i,o)+"\n"+e.slice(o+1)}else{l+=e.slice(i)}return l.slice(1)}a(PYt,"foldLine");function pCi(e){var t="";var r,n;var i;for(var s=0;s<e.length;s++){r=e.charCodeAt(s);if(r>=55296&&r<=56319){n=e.charCodeAt(s+1);if(n>=56320&&n<=57343){t+=wYt((r-55296)*1024+n-56320+65536);s++;continue}}i=Kl[r];t+=!i&&o3(r)?e[s]:i||wYt(r)}return t}a(pCi,"escapeString");function fCi(e,t,r){var n="",i=e.tag,s,o;for(s=0,o=r.length;s<o;s+=1){if(Sw(e,t,r[s],false,false)){if(s!==0)n+=","+(!e.condenseFlow?" ":"");n+=e.dump}}e.tag=i;e.dump="["+n+"]"}a(fCi,"writeFlowSequence");function mCi(e,t,r,n){var i="",s=e.tag,o,u;for(o=0,u=r.length;o<u;o+=1){if(Sw(e,t+1,r[o],true,true)){if(!n||o!==0){i+=A8e(e,t)}if(e.dump&&Eq===e.dump.charCodeAt(0)){i+="-"}else{i+="- "}i+=e.dump}}e.tag=s;e.dump=i||"[]"}a(mCi,"writeBlockSequence");function hCi(e,t,r){var n="",i=e.tag,s=Object.keys(r),o,u,l,c,d;for(o=0,u=s.length;o<u;o+=1){d="";if(o!==0)d+=", ";if(e.condenseFlow)d+='"';l=s[o];c=r[l];if(!Sw(e,t,l,false,false)){continue}if(e.dump.length>1024)d+="? ";d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!Sw(e,t,c,false,false)){continue}d+=e.dump;n+=d}e.tag=i;e.dump="{"+n+"}"}a(hCi,"writeFlowMapping");function gCi(e,t,r,n){var i="",s=e.tag,o=Object.keys(r),u,l,c,d,p,f;if(e.sortKeys===true){o.sort()}else if(typeof e.sortKeys==="function"){o.sort(e.sortKeys)}else if(e.sortKeys){throw new Sq("sortKeys must be a boolean or a function")}for(u=0,l=o.length;u<l;u+=1){f="";if(!n||u!==0){f+=A8e(e,t)}c=o[u];d=r[c];if(!Sw(e,t+1,c,true,true,true)){continue}p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024;if(p){if(e.dump&&Eq===e.dump.charCodeAt(0)){f+="?"}else{f+="? "}}f+=e.dump;if(p){f+=A8e(e,t)}if(!Sw(e,t+1,d,true,p)){continue}if(e.dump&&Eq===e.dump.charCodeAt(0)){f+=":"}else{f+=": "}f+=e.dump;i+=f}e.tag=s;e.dump=i||"{}"}a(gCi,"writeBlockMapping");function NYt(e,t,r){var n,i,s,o,u,l;i=r?e.explicitTypes:e.implicitTypes;for(s=0,o=i.length;s<o;s+=1){u=i[s];if((u.instanceOf||u.predicate)&&(!u.instanceOf||typeof t==="object"&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){e.tag=r?u.tag:"?";if(u.represent){l=e.styleMap[u.tag]||u.defaultStyle;if(IYt.call(u.represent)==="[object Function]"){n=u.represent(t,l)}else if(kYt.call(u.represent,l)){n=u.represent[l](t,l)}else{throw new Sq("!<"+u.tag+'> tag resolver accepts not "'+l+'" style')}e.dump=n}return true}}return false}a(NYt,"detectType");function Sw(e,t,r,n,i,s){e.tag=null;e.dump=r;if(!NYt(e,r,false)){NYt(e,r,true)}var o=IYt.call(e.dump);if(n){n=e.flowLevel<0||e.flowLevel>t}var u=o==="[object Object]"||o==="[object Array]",l,c;if(u){l=e.duplicates.indexOf(r);c=l!==-1}if(e.tag!==null&&e.tag!=="?"||c||e.indent!==2&&t>0){i=false}if(c&&e.usedDuplicates[l]){e.dump="*ref_"+l}else{if(u&&c&&!e.usedDuplicates[l]){e.usedDuplicates[l]=true}if(o==="[object Object]"){if(n&&Object.keys(e.dump).length!==0){gCi(e,t,e.dump,i);if(c){e.dump="&ref_"+l+e.dump}}else{hCi(e,t,e.dump);if(c){e.dump="&ref_"+l+" "+e.dump}}}else if(o==="[object Array]"){var d=e.noArrayIndent&&t>0?t-1:t;if(n&&e.dump.length!==0){mCi(e,d,e.dump,i);if(c){e.dump="&ref_"+l+e.dump}}else{fCi(e,d,e.dump);if(c){e.dump="&ref_"+l+" "+e.dump}}}else if(o==="[object String]"){if(e.tag!=="?"){cCi(e,e.dump,t,s)}}else{if(e.skipInvalid)return false;throw new Sq("unacceptable kind of an object to dump "+o)}if(e.tag!==null&&e.tag!=="?"){e.dump="!<"+e.tag+"> "+e.dump}}return true}a(Sw,"writeNode");function yCi(e,t){var r=[],n=[],i,s;C8e(e,r,n);for(i=0,s=n.length;i<s;i+=1){t.duplicates.push(r[n[i]])}t.usedDuplicates=new Array(s)}a(yCi,"getDuplicateReferences");function C8e(e,t,r){var n,i,s;if(e!==null&&typeof e==="object"){i=t.indexOf(e);if(i!==-1){if(r.indexOf(i)===-1){r.push(i)}}else{t.push(e);if(Array.isArray(e)){for(i=0,s=e.length;i<s;i+=1){C8e(e[i],t,r)}}else{n=Object.keys(e);for(i=0,s=n.length;i<s;i+=1){C8e(e[n[i]],t,r)}}}}}a(C8e,"inspectNode");function zYt(e,t){t=t||{};var r=new sCi(t);if(!r.noRefs)yCi(e,r);if(Sw(r,0,e,true,true))return r.dump+"\n";return""}a(zYt,"dump");function _Ci(e,t){return zYt(e,bq.extend({schema:UAi},t))}a(_Ci,"safeDump");T8e.exports.dump=zYt;T8e.exports.safeDump=_Ci});var YYt=y((EWs,lo)=>{"use strict";var xne=CYt();var WYt=KYt();function Rne(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}a(Rne,"deprecated");lo.exports.Type=iu();lo.exports.Schema=_w();lo.exports.FAILSAFE_SCHEMA=Ene();lo.exports.JSON_SCHEMA=y8e();lo.exports.CORE_SCHEMA=_8e();lo.exports.DEFAULT_SAFE_SCHEMA=n3();lo.exports.DEFAULT_FULL_SCHEMA=_q();lo.exports.load=xne.load;lo.exports.loadAll=xne.loadAll;lo.exports.safeLoad=xne.safeLoad;lo.exports.safeLoadAll=xne.safeLoadAll;lo.exports.dump=WYt.dump;lo.exports.safeDump=WYt.safeDump;lo.exports.YAMLException=t3();lo.exports.MINIMAL_SCHEMA=Ene();lo.exports.SAFE_SCHEMA=n3();lo.exports.DEFAULT_SCHEMA=_q();lo.exports.scan=Rne("scan");lo.exports.parse=Rne("parse");lo.exports.compose=Rne("compose");lo.exports.addConstructor=Rne("addConstructor")});var JYt=y((SWs,XYt)=>{"use strict";var vCi=YYt();XYt.exports=vCi});var eXt=y((AWs,x8e)=>{var QYt=JYt();var ECi="\\ufeff?";var bCi=typeof process!=="undefined"?process.platform:"";var SCi="^("+ECi+"(= yaml =|---)$([\\s\\S]*?)^(?:\\2|\\.\\.\\.)\\s*$"+(bCi==="win32"?"\\r?":"")+"(?:\\n)?)";var ZYt=new RegExp(SCi,"m");x8e.exports=ACi;x8e.exports.test=TCi;function ACi(e,t){e=e||"";var r={allowUnsafe:false};t=t instanceof Object?{...r,...t}:r;t.allowUnsafe=Boolean(t.allowUnsafe);var n=e.split(/(\r?\n)/);if(n[0]&&/= yaml =|---/.test(n[0])){return wCi(e,t.allowUnsafe)}else{return{attributes:{},body:e,bodyBegin:1}}}a(ACi,"extractor");function CCi(e,t){var r=1;var n=t.indexOf("\n");var i=e.index+e[0].length;while(n!==-1){if(n>=i){return r}r++;n=t.indexOf("\n",n+1)}return r}a(CCi,"computeLocation");function wCi(e,t){var r=ZYt.exec(e);if(!r){return{attributes:{},body:e,bodyBegin:1}}var n=t?QYt.load:QYt.safeLoad;var i=r[r.length-1].replace(/^\s+|\s+$/g,"");var s=n(i)||{};var o=e.replace(r[0],"");var u=CCi(r,e);return{attributes:s,body:o,bodyBegin:u,frontmatter:i}}a(wCi,"parse");function TCi(e){e=e||"";return ZYt.test(e)}a(TCi,"test")});var N8e=y(Zy=>{"use strict";var P8e=Zy&&Zy.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(Zy,"__esModule",{value:true});Zy.generateDevPortalDocs=Zy.BUILD_DATA_DOC_METADATA=void 0;var u3=hn();var xCi=oWt();var RCi=P8e(eXt());var R8e=require("fs/promises");var Aw=P8e(require("path"));var O8e=Fn();var OCi=P8e(xs());Zy.BUILD_DATA_DOC_METADATA="doc-metadata";var PCi=a(async function({sourceDirectory:e,outputDirectory:t,logger:r},n){return OCi.default.timeFn("Generating documentation from markdown files",async()=>{r.info("Generating documentation from markdown files");const i=Aw.default.join(e,O8e.USER_DOCS_DIR_NAME);const s=Aw.default.join(t,O8e.DEV_PORTAL_V4_PATH,O8e.USER_DOCS_DIR_NAME);if(!await u3.xfs.dirExists(s)){await(0,R8e.mkdir)(s,{recursive:true})}const o=[];const u=await u3.xfs.listFolderContents(i,"docs");const l=[];for(const d of u){if(Aw.default.extname(d)!==".md"){continue}if(!await u3.xfs.fileExists(Aw.default.join(i,d))){o.push({message:`Can not resolve reference to file '${d}'`,pluginName:"generate-docs",severity:u3.WARNING_SEVERITY});continue}l.push(d)}const c=await Promise.all(l.map(async d=>{const p=await(0,R8e.readFile)(Aw.default.join(i,d),"utf-8");const{attributes:f,body:m}=(0,RCi.default)(p);const{html:h,headings:g}=await(0,xCi.render)(m);const _=Aw.default.basename(d).replace(".md","");const v=Aw.default.join(s,d.replace(".md",".html"));await u3.xfs.mkdirForFilePathIfNotExits(v);await(0,R8e.writeFile)(v,h,"utf-8");const S=g.filter(E=>E.depth===2&&E.value!==void 0).map(E=>({title:E.value,id:(0,u3.kebabCase)(E.value)}));return{name:_,title:g.find(E=>E.depth===0)?.value??_,...f,innerNav:S}}));n.set(Zy.BUILD_DATA_DOC_METADATA,c);return{errors:[],warnings:o}})},"generateDevPortalDocs");Zy.generateDevPortalDocs=PCi});var rXt=y(c3=>{"use strict";var tXt=c3&&c3.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(c3,"__esModule",{value:true});c3.generateEnrichedDevPortalJson=void 0;var Aq=require("fs/promises");var Cq=tXt(require("path"));var l3=Fn();var I8e=hn();var k8e=tu();var NCi=tXt(xs());var ICi=Bb();var kCi=a(async function({sourceDirectory:e,logger:t,outputDirectory:r,publicZuploEnvironmentVariables:n,entitlements:i}){return NCi.default.timeFn("Enriching dev-portal.json with data needed for the developer portal",async()=>{t.info("Enriching dev-portal.json with data needed for the developer portal");const s=Cq.default.join(e,l3.USER_CONFIG_DIR_NAME);const o=Cq.default.join(s,l3.DEV_PORTAL_CONFIG_FILE);const u=Cq.default.join(r,l3.USER_CONFIG_DIR_NAME);try{if(!await I8e.xfs.fileExists(o)){t.debug("Project is missing a dev-portal.json file. Skipping generate-enriched-dev-portal-json plugin.");return new k8e.PluginResult}if(!await I8e.xfs.dirExists(r)){await(0,Aq.mkdir)(r)}if(!await I8e.xfs.dirExists(u)){await(0,Aq.mkdir)(u)}let l=await(0,Aq.readFile)(o,"utf-8");let c=JSON.parse(l);if(n){Object.keys(n).forEach(f=>{l=l.replaceAll(`$env(${f})`,n[f])});c=JSON.parse(l);if(!c?.apiKeys?.bucketName&&n["ZUPLO_PROJECT_ID"]&&n["ZUPLO_ENVIRONMENT_TYPE"]){c.apiKeys={bucketName:`z${n["ZUPLO_PROJECT_ID"]}-${n["ZUPLO_ENVIRONMENT_TYPE"]}`,...n["ZUPLO_ACCOUNT_DEVELOPER_API_KEY"]&&{apiKey:n["ZUPLO_ACCOUNT_DEVELOPER_API_KEY"]}}}if(c?.apiKeys?.bucketName){c.apiKeys.bucketName=c.apiKeys.bucketName.toLowerCase().replaceAll("_","-");if(n["ZUPLO_ACCOUNT_DEVELOPER_API_KEY"]){c.apiKeys.apiKey=`${n["ZUPLO_ACCOUNT_DEVELOPER_API_KEY"]}`}}}if(c.sitePathname==="/__zuplo/dev-portal"){c.sitePathname=void 0}let d=void 0;try{const f=Cq.default.join(r,l3.USER_DOCS_DIR_NAME,l3.DOCS_SIDEBAR_FILE);const m=await(0,Aq.readFile)(f,"utf-8");d=JSON.parse(m)}catch(f){t.error(f)}const p={...c,entitlements:i,sidebar:d};await(0,Aq.writeFile)(Cq.default.join(u,l3.DEV_PORTAL_CONFIG_FILE),JSON.stringify(p))}catch(l){t.error(l);return new k8e.PluginResult({severity:"warning",pluginName:"generate-enriched-dev-portal-json",message:ICi.DEV_PORTAL_PLUGIN_FAILURE_ERROR})}return new k8e.PluginResult})},"generateEnrichedDevPortalJson");c3.generateEnrichedDevPortalJson=kCi});var nXt=y(Ig=>{"use strict";Object.defineProperty(Ig,"__esModule",{value:true});Ig.LOCAL_AUTH_CONFIG=Ig.DEVELOPMENT_AUTH_CONFIG=Ig.PRODUCTION_AUTH_CONFIG=Ig.PRODUCTION_TEMP_AUTH_CONFIG=void 0;Ig.PRODUCTION_TEMP_AUTH_CONFIG={provider:"auth0",authority:"https://customer-auth.zuploapp.com/",jwksUrl:"https://customer-auth.zuploapp.com/.well-known/jwks.json",devPortalClient:{clientId:"CjwgIKXvighnHrVg1Uh9uKWFlqjRpRro",audience:"https://dev-zup.zuplo.app/"}};Ig.PRODUCTION_AUTH_CONFIG={provider:"auth0",authority:"https://customer-auth.zuplo.app/",jwksUrl:"https://customer-auth.zuplo.app/.well-known/jwks.json",devPortalClient:{clientId:"CjwgIKXvighnHrVg1Uh9uKWFlqjRpRro",audience:"https://dev-zup.zuplo.app/"}};Ig.DEVELOPMENT_AUTH_CONFIG={provider:"auth0",authority:"https://customer-auth.zuplo.dev/",jwksUrl:"https://customer-auth.zuplo.dev/.well-known/jwks.json",devPortalClient:{clientId:"B3IEDT7WGI0FjY0KZdmXXtCtZtCcLaDp",audience:"https://dev-zup.zuplo.dev/"}};Ig.LOCAL_AUTH_CONFIG={provider:"auth0",authority:"https://zuplo-dev.us.auth0.com/",jwksUrl:"https://zuplo-dev.us.auth0.com/.well-known/jwks.json",devPortalClient:{clientId:"elmO8w0n7XW6iC83hTtuREvRwpLaj6hN",audience:"https://dev-zup.zuplo.dev/"}}});var iXt=y(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:true});dm.DEFAULT_PAGE_TITLE=dm.POWERED_BY_ZUPLO_URL=dm.DEFAULT_FAVICON_URL=dm.FILE_EXAMPLE=dm.SUPPORTED_REQUEST_BODY_MEDIA_TYPES=void 0;dm.SUPPORTED_REQUEST_BODY_MEDIA_TYPES=["application/json","multipart/form-data"];dm.FILE_EXAMPLE="file.text";dm.DEFAULT_FAVICON_URL=`https://cdn.zuplo.com/dev-portal/favicon-dev.ico`;dm.POWERED_BY_ZUPLO_URL=`https://cdn.zuplo.com/dev-portal/powered_by_zuplo.svg`;dm.DEFAULT_PAGE_TITLE="Zuplo Dev Portal"});var sXt=y(kg=>{"use strict";Object.defineProperty(kg,"__esModule",{value:true});kg.getFailedToSetPropertyErrorMessage=kg.getFailedToParseFileErrorMessage=kg.CANNOT_USE_DEMO_AUTH_ERROR=kg.INVALID_DEV_PORTAL_AUTH_CONFIG_ERROR=void 0;kg.INVALID_DEV_PORTAL_AUTH_CONFIG_ERROR="The authentication settings for the dev portal are invalid.";kg.CANNOT_USE_DEMO_AUTH_ERROR="The demo auth tenant cannot be used with a custom domain. Please configure your own auth provider in your Developer Portal settings.";var DCi=a((e,t,r)=>`Failed to parse ${e} file '${t}'. Please try rebuilding your project or contact support if this persists. Error: ${r.message}`,"getFailedToParseFileErrorMessage");kg.getFailedToParseFileErrorMessage=DCi;var LCi=a(e=>`Failed to set property '${e}'. Please try rebuilding your project or contact support if this persists.`,"getFailedToSetPropertyErrorMessage");kg.getFailedToSetPropertyErrorMessage=LCi});var oXt=y(Jb=>{"use strict";Object.defineProperty(Jb,"__esModule",{value:true});Jb.validateGeneratedConfiguration=Jb.generateDevPortalClientConfig=Jb.DEFAULT_AUTHORIZE_PATHNAME=void 0;var FCi=hn();var d3=nXt();var D8e=iXt();var BCi=sXt();Jb.DEFAULT_AUTHORIZE_PATHNAME="/__zuplo/oauth/authorize";function MCi({zupBuildId:e,originalDevPortalConfig:t,publicZuploEnvironmentVariables:r,entitlements:n,sidebar:i,environmentType:s,openApiMetadata:o,projectConfiguration:u,privateEnvironmentVariables:l}){if(r){let v=JSON.stringify(t);Object.keys(r).forEach(S=>{v=v.replaceAll(`$env(${S})`,r[S])});t=JSON.parse(v);if(!t?.apiKeys?.bucketName&&r["ZUPLO_PROJECT_ID"]&&r["ZUPLO_ENVIRONMENT_TYPE"]){t.apiKeys={bucketName:`z${r["ZUPLO_PROJECT_ID"]}-${r["ZUPLO_ENVIRONMENT_TYPE"]}`,...r["ZUPLO_ACCOUNT_DEVELOPER_API_KEY"]&&{apiKey:r["ZUPLO_ACCOUNT_DEVELOPER_API_KEY"]}}}if(t?.apiKeys?.bucketName){t.apiKeys.bucketName=t.apiKeys.bucketName.toLowerCase().replaceAll("_","-");if(r["ZUPLO_ACCOUNT_DEVELOPER_API_KEY"]){t.apiKeys.apiKey=`${r["ZUPLO_ACCOUNT_DEVELOPER_API_KEY"]}`}}if(t.metering&&!t.metering.meteringBucketId&&u&&u.meteringBucket){t.metering.meteringBucketId=u.meteringBucket}}if(t.metering?.secretKey&&l){if(t.metering.secretKey.startsWith("$env(")){const v=t.metering.secretKey.replace(/^(\$env\()/,"").replace(/\)$/,"");t.metering.secretKey=l[v]}}let c;if(t.sitePathname==="/__zuplo/dev-portal"){c=void 0}else if(t.sitePathname&&t.sitePathname.startsWith("/")){c=t.sitePathname.substring(1)}const d=t.enableAuthentication??true;const p=t.requireAuthentication??false;const f=UCi(d,s,t.authentication);if(!f.isValid){return f}const m=t.apiKeys?.bucketName??"";const h=t.apiKeys?.apiKey??"";const g=d&&!!t.apiKeys?.bucketName;const _={zupBuildId:e,sitePathname:c,bucketName:m,bucketApiKey:h,enableAuthentication:d,requireAuthentication:p,enableApiKeyManagement:g,faviconUrl:t.faviconUrl??D8e.DEFAULT_FAVICON_URL,pageTitle:t.pageTitle??D8e.DEFAULT_PAGE_TITLE,auth:f.config,zuploBrandingUrl:n?.devPortalZuploBranding??true?D8e.POWERED_BY_ZUPLO_URL:void 0,generateFallbackExamples:t.generateExamples??true,entitlements:n,sidebar:i,apis:o,enableMetering:t.enableMetering??false,metering:t.metering};return{isValid:true,config:_}}a(MCi,"generateDevPortalClientConfig");Jb.generateDevPortalClientConfig=MCi;function qCi(e){const t=[];if(e.bucketName){const r=p3(e.bucketName,"bucketName");if(r.length>0){t.push(...r)}}if(e.enableAuthentication&&e.auth){if(e.auth.provider&&!(e.auth.provider==="auth0"||e.auth.provider==="okta"||e.auth.provider==="azure-ad"||e.auth.provider==="clerk"||e.auth.provider==="oidc"||e.auth.provider==="external")){t.push({message:"The authentication setting 'provider' is not set or invalid. Valid values are 'auth0', 'okta', 'azure-ad', 'clerk', 'oidc', or 'external'.",pluginName:"generate-manifest",severity:"warning"})}if(e.auth.provider==="external"){const r=p3(e.auth.loginUrl,"loginUrl");if(r.length>0){t.push(...r)}else{const i=aXt(e.auth.loginUrl,"loginUrl");if(i.length>0){t.push(...i)}}const n=p3(e.auth.logoutUrl,"logoutUrl");if(n.length>0){t.push(...n)}else{if(e.auth.loginUrl?.endsWith("/")){t.push({message:`The authentication setting 'loginUrl' should not end with a trailing slash. The current value is '${e.auth.loginUrl}'.`,pluginName:"generate-manifest",severity:"warning"})}if(e.auth.logoutUrl?.endsWith("/")){t.push({message:`The authentication setting 'logoutUrl' should not end with a trailing slash. The current value is '${e.auth.logoutUrl}'.`,pluginName:"generate-manifest",severity:"warning"})}const i=aXt(e.auth.logoutUrl,"logoutUrl");if(i.length>0){t.push(...i)}}}else{const r=p3(e.auth.audience,"audience");if(r.length>0){t.push(...r)}const n=p3(e.auth.clientId,"clientId");if(n.length>0){t.push(...n)}const i=p3(e.auth.issuer,"authority");if(i.length>0){t.push(...i)}else{if(e.auth.provider==="auth0"&&!e.auth.issuer?.endsWith("/")){t.push({message:`The authentication setting 'authority' should end with a trailing slash when using Auth0. i.e. 'https://my-account.us.auth0.com/' The current value is '${e.auth.issuer}'.`,pluginName:"generate-manifest",severity:"warning"})}if(e.auth.provider==="okta"&&e.auth.issuer?.endsWith("/")){t.push({message:`The authentication setting 'authority' should not end with a trailing slash when using Okta. i.e. 'https://dev-1235.okta.com/oauth2/aus123152352342'. The current value is '${e.auth.issuer}'.`,pluginName:"generate-manifest",severity:"warning"})}}}}return t}a(qCi,"validateGeneratedConfiguration");Jb.validateGeneratedConfiguration=qCi;function p3(e,t){const r=[];if(e===void 0||e.trim().length===0){r.push({message:`The authentication setting for '${t}' is not set or is invalid.`,pluginName:"generate-manifest",severity:"warning"})}else if(e.startsWith("$env(")&&!e.startsWith("$env(ZUPLO_PUBLIC_")){r.push({message:`'${t}' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.`,pluginName:"generate-manifest",severity:"warning"})}return r}a(p3,"verifyDevPortalAuthConfig");function aXt(e,t){const r=[];try{new URL(e)}catch(n){r.push({message:`The authentication setting '${t}' is not a valid URL. The current value is '${e}'.`,pluginName:"generate-manifest",severity:"warning"})}return r}a(aXt,"verifyValidUrl");function UCi(e,t,r){if(!e){return{isValid:true,config:void 0}}if(r){if(r.provider==="external"){return{isValid:true,config:r}}if(!r?.devPortalClient){return{isValid:false,errors:[BCi.INVALID_DEV_PORTAL_AUTH_CONFIG_ERROR]}}const{clientId:n,audience:i}=r.devPortalClient;const{authority:s,provider:o}=r;return{isValid:true,config:{clientId:n,audience:i,issuer:s,provider:o}}}if(t===FCi.EnvironmentType.WORKING_COPY){return{isValid:true,config:{clientId:d3.DEVELOPMENT_AUTH_CONFIG.devPortalClient.clientId,audience:d3.DEVELOPMENT_AUTH_CONFIG.devPortalClient.audience,issuer:d3.DEVELOPMENT_AUTH_CONFIG.authority,provider:"auth0"}}}else{return{isValid:true,config:{clientId:d3.PRODUCTION_AUTH_CONFIG.devPortalClient.clientId,audience:d3.PRODUCTION_AUTH_CONFIG.devPortalClient.audience,issuer:d3.PRODUCTION_AUTH_CONFIG.authority,provider:"auth0"}}}}a(UCi,"getDevPortalAuthConfig")});var L8e=y(Wl=>{"use strict";var pXt=Wl&&Wl.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(Wl,"__esModule",{value:true});Wl.generateSidenav=Wl.BUILD_DATA_SIDENAV_DOCS=Wl.getDefaultSpecAndPage=Wl.validateSidebarConfig=Wl.expandSidebarDocsConfig=void 0;var $Ci=hn();var jCi=require("fs/promises");var uXt=pXt(require("path"));var lXt=Fn();var GCi=pXt(xs());var cXt=N8e();var HCi=a((e,t)=>{const r=e.docs?.reduce((n,i)=>{if(typeof i==="object"&&i.type==="api-ref"){return n.concat(i)}const s=typeof i==="string";if(s||i.type==="doc"){const p=dXt(i,t);return n.concat(p)}const{link:o,items:u}=i;const l=o?VCi(o):void 0;const c=u?.map(p=>dXt(p,t));const d={...i,link:l,items:c};return n.concat(d)},[]);if(!r?.some(({type:n})=>n==="api-ref")){r?.push({type:"api-ref",label:"API Reference"})}return{docs:r}},"expandSidebarDocsConfig");Wl.expandSidebarDocsConfig=HCi;var VCi=a(e=>{const t=typeof e==="string";return t?{type:"doc",id:e}:e},"generateDocLinkConfig");var dXt=a((e,t)=>{const r=typeof e==="string";const n=r?e:e.id;const i=t.find(({name:o})=>o===n);if(!i){return r?{title:void 0,type:"doc",label:n,id:n}:{title:void 0,...e}}const s=i.sidebar_label;return r?{title:void 0,type:"doc",label:s??n,id:n}:{title:void 0,...e,label:s??e.label}},"generateDocConfig");var zCi=a((e,t,r)=>{if(!e?.docs){return[]}const n=e.docs.map(g=>{if(g.type==="doc"){return g.id}else if(g.type==="api-ref"){return null}else if(g.type==="dir"){return g.link?.id}else{throw new Error("Entry is not of an expected type. Allowed types are: doc, api-ref, and dir")}}).filter(g=>g!=null);const i=One(n);if(i.length>0){return i.map(([g,_])=>`ID: '${g}' was used more than once. Duplicates found in entries: ${_.toString()}.`)}const s=e.docs.map(g=>g.label);const o=One(s);if(o.length>0){return o.map(([g,_])=>`Label: '${g}' was used more than once. Duplicates found in entries: ${_.toString()}.`)}let u=[];e.docs.forEach(g=>{if(g.type!=="category"){return}const{items:_,label:v}=g;const S=_.map(({id:C})=>C);const E=One(S);if(E.length>0){u=u.concat(E.map(([C,T])=>`ID: '${C}' was used more than once in Category: '${v}'. Duplicates found in 'items' entries: ${T.toString()}.`))}const b=_.map(({label:C})=>C);const A=One(b);if(A.length>0){u=u.concat(A.map(([C,T])=>`Label: '${C}' was used more than once in Category: '${v}'. Duplicates found in 'items' entries: ${T.toString()}.`))}});if(u.length>0){return u}const l=e.docs.map(g=>{if(g.type==="doc"){return g.id}else if(g.type==="api-ref"){return null}else if(g.type==="dir"){let _=[];const v=g.link?.id;if(v){_=_.concat(v)}const S=g.items.map(({id:E})=>E);_=_.concat(S);return _}else{throw new Error("Entry is not of an expected type. Allowed types are: doc, api-ref, and dir")}}).flat().filter(g=>g!=null);const c=l.filter(g=>!t.find(_=>_.includes(g))).map(g=>`ID: '${g}' in sidebar.json does not map to a file in the docs directory`);if(c.length>0){return c}const d=e.docs?.filter(g=>typeof g==="object"&&g.type==="api-ref");const p=d.length;if(p>1){return["Entry with type 'api-ref' was used more than once"]}else if(p===0){return["No entry with type 'api-ref' was found. The API Reference page will not appear in your developer portal"]}const f=d[0];const{defaultSpec:m}=f;if(m){if(!r.includes(m)){return[`The defaultSpec: '${m}' does not match any of the spec IDs: ${r.toString()}.`]}}const h=e.docs?.filter(g=>{if(g.type!=="doc"){return false}return g.defaultPage});if(h.length>1){return[`More than one entry has 'defaultPage' set to true. Only one entry can have this set to true.`]}return[]},"validateSidebarConfig");Wl.validateSidebarConfig=zCi;var One=a(e=>{return Object.entries(e.reduce((t,r,n)=>{if(t[r]){t[r]=t[r].concat(n)}else{t[r]=[n]}return t},{})).filter(([,t])=>t.length>1)},"findDuplicateOccurrences");var KCi=a(e=>{const t=e.docs?.find(i=>i.type==="api-ref");if(!t){throw new Error("No api-ref config found")}const{defaultSpec:r}=t;const n=e.docs?.find(i=>{if(i.type!=="doc"){return false}return i.defaultPage});return{defaultSpec:r,defaultPage:n?.id}},"getDefaultSpecAndPage");Wl.getDefaultSpecAndPage=KCi;Wl.BUILD_DATA_SIDENAV_DOCS="sidenav";var WCi=a(async function({sourceDirectory:e,logger:t},r){return GCi.default.timeFn("Generating side navigation",async()=>{t.info("Generating side navigation");if(!r.has(cXt.BUILD_DATA_DOC_METADATA)){throw new Error("Generate Sidenav must follow generate docs build plugin")}const n=r.get(cXt.BUILD_DATA_DOC_METADATA);const i=uXt.default.join(e,lXt.USER_DOCS_DIR_NAME);const s=uXt.default.join(i,lXt.DOCS_SIDEBAR_FILE);if(!await $Ci.xfs.fileExists(s)){return{errors:[],warnings:[{pluginName:"generate-sidenav",message:"Project does not have a docs/sidebar.json file",severity:"warning"}]}}const o=await(0,jCi.readFile)(s,"utf-8").then(JSON.parse);const u=(0,Wl.expandSidebarDocsConfig)(o,n);r.set(Wl.BUILD_DATA_SIDENAV_DOCS,u);return{errors:[],warnings:[]}})},"generateSidenav");Wl.generateSidenav=WCi});var yXt=y(f3=>{"use strict";var gXt=f3&&f3.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(f3,"__esModule",{value:true});f3.generateDevPortalManifest=void 0;var Pne=hn();var Nne=require("fs/promises");var Ine=gXt(require("path"));var kne=Fn();var F8e=tu();var YCi=gXt(xs());var fXt=oXt();var mXt=ODe();var XCi=Bb();var hXt=L8e();var JCi=a(async function({zupBuildId:e,sourceDirectory:t,outputDirectory:r,publicZuploEnvironmentVariables:n,entitlements:i,environmentType:s,logger:o,projectConfiguration:u,privateEnvironmentVariables:l},c){return YCi.default.timeFn("Generating dev portal manifest",async()=>{o.info("Generating dev portal manifest");if(!c.has(hXt.BUILD_DATA_SIDENAV_DOCS)){throw new Error("Generate Sidenav must follow generate sidenav")}if(!c.has(mXt.BUILD_DATA_OPEN_API_METADATA)){throw new Error("Generate Sidenav must follow build open api files")}const d=c.get(hXt.BUILD_DATA_SIDENAV_DOCS);const p=c.get(mXt.BUILD_DATA_OPEN_API_METADATA);const f=Ine.default.join(t,kne.USER_CONFIG_DIR_NAME);const m=Ine.default.join(f,kne.DEV_PORTAL_CONFIG_FILE);const h=Ine.default.join(r,kne.DEV_PORTAL_V4_PATH,kne.USER_CONFIG_DIR_NAME);try{if(!await Pne.xfs.fileExists(m)){o.debug("Project is missing a dev-portal.json file. Skipping generate-dev-portal-manifest plugin.");return new F8e.PluginResult}if(!await Pne.xfs.dirExists(r)){await(0,Nne.mkdir)(r)}if(!await Pne.xfs.dirExists(h)){await(0,Nne.mkdir)(h)}const g=await(0,Nne.readFile)(m,"utf-8").then(JSON.parse);const _=(0,fXt.generateDevPortalClientConfig)({zupBuildId:e,originalDevPortalConfig:g,sidebar:d,openApiMetadata:p,environmentType:s??Pne.EnvironmentType.WORKING_COPY,entitlements:i,publicZuploEnvironmentVariables:n,projectConfiguration:u,privateEnvironmentVariables:l});c.set("generateExamples",_.isValid&&_.config.generateFallbackExamples);if(!_.isValid){throw new Error("Error")}await(0,Nne.writeFile)(Ine.default.join(h,"dev-portal-manifest.json"),process.env.DEBUG_BUILD_MODE?JSON.stringify(_.config,null,2):JSON.stringify(_.config));const v=(0,fXt.validateGeneratedConfiguration)(_.config);if(v.length>0){return{errors:[],warnings:v}}}catch(g){o.error(g);return new F8e.PluginResult({severity:"warning",pluginName:"generate-dev-portal-manifest",message:XCi.DEV_PORTAL_PLUGIN_FAILURE_ERROR})}return new F8e.PluginResult})},"generateDevPortalManifest");f3.generateDevPortalManifest=JCi});var vXt=y((qWs,_Xt)=>{"use strict";_Xt.exports={order:100,allowEmpty:true,canParse:".json",parse:a(function e(t){return new Promise(function(r,n){var i=t.data;if(Buffer.isBuffer(i)){i=i.toString()}if(typeof i==="string"){if(i.trim().length===0){r(void 0)}else{r(JSON.parse(i))}}else{r(i)}})},"parseJSON")}});var ww=y(($Ws,Cw)=>{"use strict";function EXt(e){return typeof e==="undefined"||e===null}a(EXt,"isNothing");function QCi(e){return typeof e==="object"&&e!==null}a(QCi,"isObject");function ZCi(e){if(Array.isArray(e))return e;else if(EXt(e))return[];return[e]}a(ZCi,"toArray");function ewi(e,t){var r,n,i,s;if(t){s=Object.keys(t);for(r=0,n=s.length;r<n;r+=1){i=s[r];e[i]=t[i]}}return e}a(ewi,"extend");function twi(e,t){var r="",n;for(n=0;n<t;n+=1){r+=e}return r}a(twi,"repeat");function rwi(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}a(rwi,"isNegativeZero");Cw.exports.isNothing=EXt;Cw.exports.isObject=QCi;Cw.exports.toArray=ZCi;Cw.exports.repeat=twi;Cw.exports.isNegativeZero=rwi;Cw.exports.extend=ewi});var m3=y((GWs,bXt)=>{"use strict";function wq(e,t){Error.call(this);this.name="YAMLException";this.reason=e;this.mark=t;this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"");if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=new Error().stack||""}}a(wq,"YAMLException");wq.prototype=Object.create(Error.prototype);wq.prototype.constructor=wq;wq.prototype.toString=a(function e(t){var r=this.name+": ";r+=this.reason||"(unknown reason)";if(!t&&this.mark){r+=" "+this.mark.toString()}return r},"toString");bXt.exports=wq});var CXt=y((VWs,AXt)=>{"use strict";var SXt=ww();function B8e(e,t,r,n,i){this.name=e;this.buffer=t;this.position=r;this.line=n;this.column=i}a(B8e,"Mark");B8e.prototype.getSnippet=a(function e(t,r){var n,i,s,o,u;if(!this.buffer)return null;t=t||4;r=r||75;n="";i=this.position;while(i>0&&"\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(i-1))===-1){i-=1;if(this.position-i>r/2-1){n=" ... ";i+=5;break}}s="";o=this.position;while(o<this.buffer.length&&"\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(o))===-1){o+=1;if(o-this.position>r/2-1){s=" ... ";o-=5;break}}u=this.buffer.slice(i,o);return SXt.repeat(" ",t)+n+u+s+"\n"+SXt.repeat(" ",t+this.position-i+n.length)+"^"},"getSnippet");B8e.prototype.toString=a(function e(t){var r,n="";if(this.name){n+='in "'+this.name+'" '}n+="at line "+(this.line+1)+", column "+(this.column+1);if(!t){r=this.getSnippet();if(r){n+=":\n"+r}}return n},"toString");AXt.exports=B8e});var su=y((KWs,TXt)=>{"use strict";var wXt=m3();var nwi=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"];var iwi=["scalar","sequence","mapping"];function swi(e){var t={};if(e!==null){Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})})}return t}a(swi,"compileStyleAliases");function awi(e,t){t=t||{};Object.keys(t).forEach(function(r){if(nwi.indexOf(r)===-1){throw new wXt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}});this.tag=e;this.kind=t["kind"]||null;this.resolve=t["resolve"]||function(){return true};this.construct=t["construct"]||function(r){return r};this.instanceOf=t["instanceOf"]||null;this.predicate=t["predicate"]||null;this.represent=t["represent"]||null;this.defaultStyle=t["defaultStyle"]||null;this.styleAliases=swi(t["styleAliases"]||null);if(iwi.indexOf(this.kind)===-1){throw new wXt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}a(awi,"Type");TXt.exports=awi});var Tw=y((YWs,RXt)=>{"use strict";var xXt=ww();var Dne=m3();var owi=su();function M8e(e,t,r){var n=[];e.include.forEach(function(i){r=M8e(i,t,r)});e[t].forEach(function(i){r.forEach(function(s,o){if(s.tag===i.tag&&s.kind===i.kind){n.push(o)}});r.push(i)});return r.filter(function(i,s){return n.indexOf(s)===-1})}a(M8e,"compileList");function uwi(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,r;function n(i){e[i.kind][i.tag]=e["fallback"][i.tag]=i}a(n,"collectType");for(t=0,r=arguments.length;t<r;t+=1){arguments[t].forEach(n)}return e}a(uwi,"compileMap");function h3(e){this.include=e.include||[];this.implicit=e.implicit||[];this.explicit=e.explicit||[];this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar"){throw new Dne("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}});this.compiledImplicit=M8e(this,"implicit",[]);this.compiledExplicit=M8e(this,"explicit",[]);this.compiledTypeMap=uwi(this.compiledImplicit,this.compiledExplicit)}a(h3,"Schema");h3.DEFAULT=null;h3.create=a(function e(){var t,r;switch(arguments.length){case 1:t=h3.DEFAULT;r=arguments[0];break;case 2:t=arguments[0];r=arguments[1];break;default:throw new Dne("Wrong number of arguments for Schema.create function")}t=xXt.toArray(t);r=xXt.toArray(r);if(!t.every(function(n){return n instanceof h3})){throw new Dne("Specified list of super schemas (or a single Schema object) contains a non-Schema object.")}if(!r.every(function(n){return n instanceof owi})){throw new Dne("Specified list of YAML types (or a single Type object) contains a non-Type object.")}return new h3({include:t,explicit:r})},"createSchema");RXt.exports=h3});var PXt=y((JWs,OXt)=>{"use strict";var lwi=su();OXt.exports=new lwi("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var IXt=y((QWs,NXt)=>{"use strict";var cwi=su();NXt.exports=new cwi("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var DXt=y((ZWs,kXt)=>{"use strict";var dwi=su();kXt.exports=new dwi("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var Lne=y((eYs,LXt)=>{"use strict";var pwi=Tw();LXt.exports=new pwi({explicit:[PXt(),IXt(),DXt()]})});var BXt=y((tYs,FXt)=>{"use strict";var fwi=su();function mwi(e){if(e===null)return true;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}a(mwi,"resolveYamlNull");function hwi(){return null}a(hwi,"constructYamlNull");function gwi(e){return e===null}a(gwi,"isNull");FXt.exports=new fwi("tag:yaml.org,2002:null",{kind:"scalar",resolve:mwi,construct:hwi,predicate:gwi,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var qXt=y((nYs,MXt)=>{"use strict";var ywi=su();function _wi(e){if(e===null)return false;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}a(_wi,"resolveYamlBoolean");function vwi(e){return e==="true"||e==="True"||e==="TRUE"}a(vwi,"constructYamlBoolean");function Ewi(e){return Object.prototype.toString.call(e)==="[object Boolean]"}a(Ewi,"isBoolean");MXt.exports=new ywi("tag:yaml.org,2002:bool",{kind:"scalar",resolve:_wi,construct:vwi,predicate:Ewi,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var $Xt=y((sYs,UXt)=>{"use strict";var bwi=ww();var Swi=su();function Awi(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}a(Awi,"isHexCode");function Cwi(e){return 48<=e&&e<=55}a(Cwi,"isOctCode");function wwi(e){return 48<=e&&e<=57}a(wwi,"isDecCode");function Twi(e){if(e===null)return false;var t=e.length,r=0,n=false,i;if(!t)return false;i=e[r];if(i==="-"||i==="+"){i=e[++r]}if(i==="0"){if(r+1===t)return true;i=e[++r];if(i==="b"){r++;for(;r<t;r++){i=e[r];if(i==="_")continue;if(i!=="0"&&i!=="1")return false;n=true}return n&&i!=="_"}if(i==="x"){r++;for(;r<t;r++){i=e[r];if(i==="_")continue;if(!Awi(e.charCodeAt(r)))return false;n=true}return n&&i!=="_"}for(;r<t;r++){i=e[r];if(i==="_")continue;if(!Cwi(e.charCodeAt(r)))return false;n=true}return n&&i!=="_"}if(i==="_")return false;for(;r<t;r++){i=e[r];if(i==="_")continue;if(i===":")break;if(!wwi(e.charCodeAt(r))){return false}n=true}if(!n||i==="_")return false;if(i!==":")return true;return/^(:[0-5]?[0-9])+$/.test(e.slice(r))}a(Twi,"resolveYamlInteger");function xwi(e){var t=e,r=1,n,i,s=[];if(t.indexOf("_")!==-1){t=t.replace(/_/g,"")}n=t[0];if(n==="-"||n==="+"){if(n==="-")r=-1;t=t.slice(1);n=t[0]}if(t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t,16);return r*parseInt(t,8)}if(t.indexOf(":")!==-1){t.split(":").forEach(function(o){s.unshift(parseInt(o,10))});t=0;i=1;s.forEach(function(o){t+=o*i;i*=60});return r*t}return r*parseInt(t,10)}a(xwi,"constructYamlInteger");function Rwi(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1===0&&!bwi.isNegativeZero(e))}a(Rwi,"isInteger");UXt.exports=new Swi("tag:yaml.org,2002:int",{kind:"scalar",resolve:Twi,construct:xwi,predicate:Rwi,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var HXt=y((oYs,GXt)=>{"use strict";var jXt=ww();var Owi=su();var Pwi=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Nwi(e){if(e===null)return false;if(!Pwi.test(e)||e[e.length-1]==="_"){return false}return true}a(Nwi,"resolveYamlFloat");function Iwi(e){var t,r,n,i;t=e.replace(/_/g,"").toLowerCase();r=t[0]==="-"?-1:1;i=[];if("+-".indexOf(t[0])>=0){t=t.slice(1)}if(t===".inf"){return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(t===".nan"){return NaN}else if(t.indexOf(":")>=0){t.split(":").forEach(function(s){i.unshift(parseFloat(s,10))});t=0;n=1;i.forEach(function(s){t+=s*n;n*=60});return r*t}return r*parseFloat(t,10)}a(Iwi,"constructYamlFloat");var kwi=/^[-+]?[0-9]+e/;function Dwi(e,t){var r;if(isNaN(e)){switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(jXt.isNegativeZero(e)){return"-0.0"}r=e.toString(10);return kwi.test(r)?r.replace("e",".e"):r}a(Dwi,"representYamlFloat");function Lwi(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||jXt.isNegativeZero(e))}a(Lwi,"isFloat");GXt.exports=new Owi("tag:yaml.org,2002:float",{kind:"scalar",resolve:Nwi,construct:Iwi,predicate:Lwi,represent:Dwi,defaultStyle:"lowercase"})});var q8e=y((lYs,VXt)=>{"use strict";var Fwi=Tw();VXt.exports=new Fwi({include:[Lne()],implicit:[BXt(),qXt(),$Xt(),HXt()]})});var U8e=y((cYs,zXt)=>{"use strict";var Bwi=Tw();zXt.exports=new Bwi({include:[q8e()]})});var XXt=y((dYs,YXt)=>{"use strict";var Mwi=su();var KXt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");var WXt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function qwi(e){if(e===null)return false;if(KXt.exec(e)!==null)return true;if(WXt.exec(e)!==null)return true;return false}a(qwi,"resolveYamlTimestamp");function Uwi(e){var t,r,n,i,s,o,u,l=0,c=null,d,p,f;t=KXt.exec(e);if(t===null)t=WXt.exec(e);if(t===null)throw new Error("Date resolve error");r=+t[1];n=+t[2]-1;i=+t[3];if(!t[4]){return new Date(Date.UTC(r,n,i))}s=+t[4];o=+t[5];u=+t[6];if(t[7]){l=t[7].slice(0,3);while(l.length<3){l+="0"}l=+l}if(t[9]){d=+t[10];p=+(t[11]||0);c=(d*60+p)*6e4;if(t[9]==="-")c=-c}f=new Date(Date.UTC(r,n,i,s,o,u,l));if(c)f.setTime(f.getTime()-c);return f}a(Uwi,"constructYamlTimestamp");function $wi(e){return e.toISOString()}a($wi,"representYamlTimestamp");YXt.exports=new Mwi("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:qwi,construct:Uwi,instanceOf:Date,represent:$wi})});var QXt=y((fYs,JXt)=>{"use strict";var jwi=su();function Gwi(e){return e==="<<"||e===null}a(Gwi,"resolveYamlMerge");JXt.exports=new jwi("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Gwi})});var tJt=y((hYs,eJt)=>{"use strict";var xw;try{ZXt=require;xw=ZXt("buffer").Buffer}catch(e){}var ZXt;var Hwi=su();var $8e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function Vwi(e){if(e===null)return false;var t,r,n=0,i=e.length,s=$8e;for(r=0;r<i;r++){t=s.indexOf(e.charAt(r));if(t>64)continue;if(t<0)return false;n+=6}return n%8===0}a(Vwi,"resolveYamlBinary");function zwi(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,s=$8e,o=0,u=[];for(t=0;t<i;t++){if(t%4===0&&t){u.push(o>>16&255);u.push(o>>8&255);u.push(o&255)}o=o<<6|s.indexOf(n.charAt(t))}r=i%4*6;if(r===0){u.push(o>>16&255);u.push(o>>8&255);u.push(o&255)}else if(r===18){u.push(o>>10&255);u.push(o>>2&255)}else if(r===12){u.push(o>>4&255)}if(xw){return xw.from?xw.from(u):new xw(u)}return u}a(zwi,"constructYamlBinary");function Kwi(e){var t="",r=0,n,i,s=e.length,o=$8e;for(n=0;n<s;n++){if(n%3===0&&n){t+=o[r>>18&63];t+=o[r>>12&63];t+=o[r>>6&63];t+=o[r&63]}r=(r<<8)+e[n]}i=s%3;if(i===0){t+=o[r>>18&63];t+=o[r>>12&63];t+=o[r>>6&63];t+=o[r&63]}else if(i===2){t+=o[r>>10&63];t+=o[r>>4&63];t+=o[r<<2&63];t+=o[64]}else if(i===1){t+=o[r>>2&63];t+=o[r<<4&63];t+=o[64];t+=o[64]}return t}a(Kwi,"representYamlBinary");function Wwi(e){return xw&&xw.isBuffer(e)}a(Wwi,"isBinary");eJt.exports=new Hwi("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Vwi,construct:zwi,predicate:Wwi,represent:Kwi})});var nJt=y((yYs,rJt)=>{"use strict";var Ywi=su();var Xwi=Object.prototype.hasOwnProperty;var Jwi=Object.prototype.toString;function Qwi(e){if(e===null)return true;var t=[],r,n,i,s,o,u=e;for(r=0,n=u.length;r<n;r+=1){i=u[r];o=false;if(Jwi.call(i)!=="[object Object]")return false;for(s in i){if(Xwi.call(i,s)){if(!o)o=true;else return false}}if(!o)return false;if(t.indexOf(s)===-1)t.push(s);else return false}return true}a(Qwi,"resolveYamlOmap");function Zwi(e){return e!==null?e:[]}a(Zwi,"constructYamlOmap");rJt.exports=new Ywi("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Qwi,construct:Zwi})});var sJt=y((vYs,iJt)=>{"use strict";var eTi=su();var tTi=Object.prototype.toString;function rTi(e){if(e===null)return true;var t,r,n,i,s,o=e;s=new Array(o.length);for(t=0,r=o.length;t<r;t+=1){n=o[t];if(tTi.call(n)!=="[object Object]")return false;i=Object.keys(n);if(i.length!==1)return false;s[t]=[i[0],n[i[0]]]}return true}a(rTi,"resolveYamlPairs");function nTi(e){if(e===null)return[];var t,r,n,i,s,o=e;s=new Array(o.length);for(t=0,r=o.length;t<r;t+=1){n=o[t];i=Object.keys(n);s[t]=[i[0],n[i[0]]]}return s}a(nTi,"constructYamlPairs");iJt.exports=new eTi("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:rTi,construct:nTi})});var oJt=y((bYs,aJt)=>{"use strict";var iTi=su();var sTi=Object.prototype.hasOwnProperty;function aTi(e){if(e===null)return true;var t,r=e;for(t in r){if(sTi.call(r,t)){if(r[t]!==null)return false}}return true}a(aTi,"resolveYamlSet");function oTi(e){return e!==null?e:{}}a(oTi,"constructYamlSet");aJt.exports=new iTi("tag:yaml.org,2002:set",{kind:"mapping",resolve:aTi,construct:oTi})});var g3=y((AYs,uJt)=>{"use strict";var uTi=Tw();uJt.exports=new uTi({include:[U8e()],implicit:[XXt(),QXt()],explicit:[tJt(),nJt(),sJt(),oJt()]})});var cJt=y((CYs,lJt)=>{"use strict";var lTi=su();function cTi(){return true}a(cTi,"resolveJavascriptUndefined");function dTi(){return void 0}a(dTi,"constructJavascriptUndefined");function pTi(){return""}a(pTi,"representJavascriptUndefined");function fTi(e){return typeof e==="undefined"}a(fTi,"isUndefined");lJt.exports=new lTi("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:cTi,construct:dTi,predicate:fTi,represent:pTi})});var pJt=y((TYs,dJt)=>{"use strict";var mTi=su();function hTi(e){if(e===null)return false;if(e.length===0)return false;var t=e,r=/\/([gim]*)$/.exec(e),n="";if(t[0]==="/"){if(r)n=r[1];if(n.length>3)return false;if(t[t.length-n.length-1]!=="/")return false}return true}a(hTi,"resolveJavascriptRegExp");function gTi(e){var t=e,r=/\/([gim]*)$/.exec(e),n="";if(t[0]==="/"){if(r)n=r[1];t=t.slice(1,t.length-n.length-1)}return new RegExp(t,n)}a(gTi,"constructJavascriptRegExp");function yTi(e){var t="/"+e.source+"/";if(e.global)t+="g";if(e.multiline)t+="m";if(e.ignoreCase)t+="i";return t}a(yTi,"representJavascriptRegExp");function _Ti(e){return Object.prototype.toString.call(e)==="[object RegExp]"}a(_Ti,"isRegExp");dJt.exports=new mTi("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:hTi,construct:gTi,predicate:_Ti,represent:yTi})});var hJt=y((RYs,mJt)=>{"use strict";var Fne;try{fJt=require;Fne=fJt("esprima")}catch(e){if(typeof window!=="undefined")Fne=window.esprima}var fJt;var vTi=su();function ETi(e){if(e===null)return false;try{var t="("+e+")",r=Fne.parse(t,{range:true});if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(n){return false}}a(ETi,"resolveJavascriptFunction");function bTi(e){var t="("+e+")",r=Fne.parse(t,{range:true}),n=[],i;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}r.body[0].expression.params.forEach(function(s){n.push(s.name)});i=r.body[0].expression.body.range;if(r.body[0].expression.body.type==="BlockStatement"){return new Function(n,t.slice(i[0]+1,i[1]-1))}return new Function(n,"return "+t.slice(i[0],i[1]))}a(bTi,"constructJavascriptFunction");function STi(e){return e.toString()}a(STi,"representJavascriptFunction");function ATi(e){return Object.prototype.toString.call(e)==="[object Function]"}a(ATi,"isFunction");mJt.exports=new vTi("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:ETi,construct:bTi,predicate:ATi,represent:STi})});var Tq=y((PYs,yJt)=>{"use strict";var gJt=Tw();yJt.exports=gJt.DEFAULT=new gJt({include:[g3()],explicit:[cJt(),pJt(),hJt()]})});var FJt=y((NYs,xq)=>{"use strict";var e_=ww();var CJt=m3();var CTi=CXt();var wJt=g3();var wTi=Tq();var Zb=Object.prototype.hasOwnProperty;var Bne=1;var TJt=2;var xJt=3;var Mne=4;var j8e=1;var TTi=2;var _Jt=3;var xTi=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var RTi=/[\x85\u2028\u2029]/;var OTi=/[,\[\]\{\}]/;var RJt=/^(?:!|!!|![a-z\-]+!)$/i;var OJt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function vJt(e){return Object.prototype.toString.call(e)}a(vJt,"_class");function Dg(e){return e===10||e===13}a(Dg,"is_EOL");function Ow(e){return e===9||e===32}a(Ow,"is_WHITE_SPACE");function Gd(e){return e===9||e===32||e===10||e===13}a(Gd,"is_WS_OR_EOL");function y3(e){return e===44||e===91||e===93||e===123||e===125}a(y3,"is_FLOW_INDICATOR");function PTi(e){var t;if(48<=e&&e<=57){return e-48}t=e|32;if(97<=t&&t<=102){return t-97+10}return-1}a(PTi,"fromHexCode");function NTi(e){if(e===120){return 2}if(e===117){return 4}if(e===85){return 8}return 0}a(NTi,"escapedHexLen");function ITi(e){if(48<=e&&e<=57){return e-48}return-1}a(ITi,"fromDecimalCode");function EJt(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116?" ":e===9?" ":e===110?"\n":e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}a(EJt,"simpleEscapeSequence");function kTi(e){if(e<=65535){return String.fromCharCode(e)}return String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}a(kTi,"charFromCodepoint");var PJt=new Array(256);var NJt=new Array(256);for(Rw=0;Rw<256;Rw++){PJt[Rw]=EJt(Rw)?1:0;NJt[Rw]=EJt(Rw)}var Rw;function DTi(e,t){this.input=e;this.filename=t["filename"]||null;this.schema=t["schema"]||wTi;this.onWarning=t["onWarning"]||null;this.legacy=t["legacy"]||false;this.json=t["json"]||false;this.listener=t["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}a(DTi,"State");function IJt(e,t){return new CJt(t,new CTi(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}a(IJt,"generateError");function Mr(e,t){throw IJt(e,t)}a(Mr,"throwError");function qne(e,t){if(e.onWarning){e.onWarning.call(null,IJt(e,t))}}a(qne,"throwWarning");var bJt={YAML:a(function e(t,r,n){var i,s,o;if(t.version!==null){Mr(t,"duplication of %YAML directive")}if(n.length!==1){Mr(t,"YAML directive accepts exactly one argument")}i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]);if(i===null){Mr(t,"ill-formed argument of the YAML directive")}s=parseInt(i[1],10);o=parseInt(i[2],10);if(s!==1){Mr(t,"unacceptable YAML version of the document")}t.version=n[0];t.checkLineBreaks=o<2;if(o!==1&&o!==2){qne(t,"unsupported YAML version of the document")}},"handleYamlDirective"),TAG:a(function e(t,r,n){var i,s;if(n.length!==2){Mr(t,"TAG directive accepts exactly two arguments")}i=n[0];s=n[1];if(!RJt.test(i)){Mr(t,"ill-formed tag handle (first argument) of the TAG directive")}if(Zb.call(t.tagMap,i)){Mr(t,'there is a previously declared suffix for "'+i+'" tag handle')}if(!OJt.test(s)){Mr(t,"ill-formed tag prefix (second argument) of the TAG directive")}t.tagMap[i]=s},"handleTagDirective")};function Qb(e,t,r,n){var i,s,o,u;if(t<r){u=e.input.slice(t,r);if(n){for(i=0,s=u.length;i<s;i+=1){o=u.charCodeAt(i);if(!(o===9||32<=o&&o<=1114111)){Mr(e,"expected valid JSON character")}}}else if(xTi.test(u)){Mr(e,"the stream contains non-printable characters")}e.result+=u}}a(Qb,"captureSegment");function SJt(e,t,r,n){var i,s,o,u;if(!e_.isObject(r)){Mr(e,"cannot merge mappings; the provided source object is unacceptable")}i=Object.keys(r);for(o=0,u=i.length;o<u;o+=1){s=i[o];if(!Zb.call(t,s)){t[s]=r[s];n[s]=true}}}a(SJt,"mergeMappings");function _3(e,t,r,n,i,s,o,u){var l,c;if(Array.isArray(i)){i=Array.prototype.slice.call(i);for(l=0,c=i.length;l<c;l+=1){if(Array.isArray(i[l])){Mr(e,"nested arrays are not supported inside keys")}if(typeof i==="object"&&vJt(i[l])==="[object Object]"){i[l]="[object Object]"}}}if(typeof i==="object"&&vJt(i)==="[object Object]"){i="[object Object]"}i=String(i);if(t===null){t={}}if(n==="tag:yaml.org,2002:merge"){if(Array.isArray(s)){for(l=0,c=s.length;l<c;l+=1){SJt(e,t,s[l],r)}}else{SJt(e,t,s,r)}}else{if(!e.json&&!Zb.call(r,i)&&Zb.call(t,i)){e.line=o||e.line;e.position=u||e.position;Mr(e,"duplicated mapping key")}t[i]=s;delete r[i]}return t}a(_3,"storeMappingPair");function G8e(e){var t;t=e.input.charCodeAt(e.position);if(t===10){e.position++}else if(t===13){e.position++;if(e.input.charCodeAt(e.position)===10){e.position++}}else{Mr(e,"a line break is expected")}e.line+=1;e.lineStart=e.position}a(G8e,"readLineBreak");function Wo(e,t,r){var n=0,i=e.input.charCodeAt(e.position);while(i!==0){while(Ow(i)){i=e.input.charCodeAt(++e.position)}if(t&&i===35){do{i=e.input.charCodeAt(++e.position)}while(i!==10&&i!==13&&i!==0)}if(Dg(i)){G8e(e);i=e.input.charCodeAt(e.position);n++;e.lineIndent=0;while(i===32){e.lineIndent++;i=e.input.charCodeAt(++e.position)}}else{break}}if(r!==-1&&n!==0&&e.lineIndent<r){qne(e,"deficient indentation")}return n}a(Wo,"skipSeparationSpace");function Une(e){var t=e.position,r;r=e.input.charCodeAt(t);if((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)){t+=3;r=e.input.charCodeAt(t);if(r===0||Gd(r)){return true}}return false}a(Une,"testDocumentSeparator");function H8e(e,t){if(t===1){e.result+=" "}else if(t>1){e.result+=e_.repeat("\n",t-1)}}a(H8e,"writeFoldedLines");function LTi(e,t,r){var n,i,s,o,u,l,c,d,p=e.kind,f=e.result,m;m=e.input.charCodeAt(e.position);if(Gd(m)||y3(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96){return false}if(m===63||m===45){i=e.input.charCodeAt(e.position+1);if(Gd(i)||r&&y3(i)){return false}}e.kind="scalar";e.result="";s=o=e.position;u=false;while(m!==0){if(m===58){i=e.input.charCodeAt(e.position+1);if(Gd(i)||r&&y3(i)){break}}else if(m===35){n=e.input.charCodeAt(e.position-1);if(Gd(n)){break}}else if(e.position===e.lineStart&&Une(e)||r&&y3(m)){break}else if(Dg(m)){l=e.line;c=e.lineStart;d=e.lineIndent;Wo(e,false,-1);if(e.lineIndent>=t){u=true;m=e.input.charCodeAt(e.position);continue}else{e.position=o;e.line=l;e.lineStart=c;e.lineIndent=d;break}}if(u){Qb(e,s,o,false);H8e(e,e.line-l);s=o=e.position;u=false}if(!Ow(m)){o=e.position+1}m=e.input.charCodeAt(++e.position)}Qb(e,s,o,false);if(e.result){return true}e.kind=p;e.result=f;return false}a(LTi,"readPlainScalar");function FTi(e,t){var r,n,i;r=e.input.charCodeAt(e.position);if(r!==39){return false}e.kind="scalar";e.result="";e.position++;n=i=e.position;while((r=e.input.charCodeAt(e.position))!==0){if(r===39){Qb(e,n,e.position,true);r=e.input.charCodeAt(++e.position);if(r===39){n=e.position;e.position++;i=e.position}else{return true}}else if(Dg(r)){Qb(e,n,i,true);H8e(e,Wo(e,false,t));n=i=e.position}else if(e.position===e.lineStart&&Une(e)){Mr(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;i=e.position}}Mr(e,"unexpected end of the stream within a single quoted scalar")}a(FTi,"readSingleQuotedScalar");function BTi(e,t){var r,n,i,s,o,u;u=e.input.charCodeAt(e.position);if(u!==34){return false}e.kind="scalar";e.result="";e.position++;r=n=e.position;while((u=e.input.charCodeAt(e.position))!==0){if(u===34){Qb(e,r,e.position,true);e.position++;return true}else if(u===92){Qb(e,r,e.position,true);u=e.input.charCodeAt(++e.position);if(Dg(u)){Wo(e,false,t)}else if(u<256&&PJt[u]){e.result+=NJt[u];e.position++}else if((o=NTi(u))>0){i=o;s=0;for(;i>0;i--){u=e.input.charCodeAt(++e.position);if((o=PTi(u))>=0){s=(s<<4)+o}else{Mr(e,"expected hexadecimal character")}}e.result+=kTi(s);e.position++}else{Mr(e,"unknown escape sequence")}r=n=e.position}else if(Dg(u)){Qb(e,r,n,true);H8e(e,Wo(e,false,t));r=n=e.position}else if(e.position===e.lineStart&&Une(e)){Mr(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;n=e.position}}Mr(e,"unexpected end of the stream within a double quoted scalar")}a(BTi,"readDoubleQuotedScalar");function MTi(e,t){var r=true,n,i=e.tag,s,o=e.anchor,u,l,c,d,p,f={},m,h,g,_;_=e.input.charCodeAt(e.position);if(_===91){l=93;p=false;s=[]}else if(_===123){l=125;p=true;s={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=s}_=e.input.charCodeAt(++e.position);while(_!==0){Wo(e,true,t);_=e.input.charCodeAt(e.position);if(_===l){e.position++;e.tag=i;e.anchor=o;e.kind=p?"mapping":"sequence";e.result=s;return true}else if(!r){Mr(e,"missed comma between flow collection entries")}h=m=g=null;c=d=false;if(_===63){u=e.input.charCodeAt(e.position+1);if(Gd(u)){c=d=true;e.position++;Wo(e,true,t)}}n=e.line;v3(e,t,Bne,false,true);h=e.tag;m=e.result;Wo(e,true,t);_=e.input.charCodeAt(e.position);if((d||e.line===n)&&_===58){c=true;_=e.input.charCodeAt(++e.position);Wo(e,true,t);v3(e,t,Bne,false,true);g=e.result}if(p){_3(e,s,f,h,m,g)}else if(c){s.push(_3(e,null,f,h,m,g))}else{s.push(m)}Wo(e,true,t);_=e.input.charCodeAt(e.position);if(_===44){r=true;_=e.input.charCodeAt(++e.position)}else{r=false}}Mr(e,"unexpected end of the stream within a flow collection")}a(MTi,"readFlowCollection");function qTi(e,t){var r,n,i=j8e,s=false,o=false,u=t,l=0,c=false,d,p;p=e.input.charCodeAt(e.position);if(p===124){n=false}else if(p===62){n=true}else{return false}e.kind="scalar";e.result="";while(p!==0){p=e.input.charCodeAt(++e.position);if(p===43||p===45){if(j8e===i){i=p===43?_Jt:TTi}else{Mr(e,"repeat of a chomping mode identifier")}}else if((d=ITi(p))>=0){if(d===0){Mr(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!o){u=t+d-1;o=true}else{Mr(e,"repeat of an indentation width identifier")}}else{break}}if(Ow(p)){do{p=e.input.charCodeAt(++e.position)}while(Ow(p));if(p===35){do{p=e.input.charCodeAt(++e.position)}while(!Dg(p)&&p!==0)}}while(p!==0){G8e(e);e.lineIndent=0;p=e.input.charCodeAt(e.position);while((!o||e.lineIndent<u)&&p===32){e.lineIndent++;p=e.input.charCodeAt(++e.position)}if(!o&&e.lineIndent>u){u=e.lineIndent}if(Dg(p)){l++;continue}if(e.lineIndent<u){if(i===_Jt){e.result+=e_.repeat("\n",s?1+l:l)}else if(i===j8e){if(s){e.result+="\n"}}break}if(n){if(Ow(p)){c=true;e.result+=e_.repeat("\n",s?1+l:l)}else if(c){c=false;e.result+=e_.repeat("\n",l+1)}else if(l===0){if(s){e.result+=" "}}else{e.result+=e_.repeat("\n",l)}}else{e.result+=e_.repeat("\n",s?1+l:l)}s=true;o=true;l=0;r=e.position;while(!Dg(p)&&p!==0){p=e.input.charCodeAt(++e.position)}Qb(e,r,e.position,false)}return true}a(qTi,"readBlockScalar");function AJt(e,t){var r,n=e.tag,i=e.anchor,s=[],o,u=false,l;if(e.anchor!==null){e.anchorMap[e.anchor]=s}l=e.input.charCodeAt(e.position);while(l!==0){if(l!==45){break}o=e.input.charCodeAt(e.position+1);if(!Gd(o)){break}u=true;e.position++;if(Wo(e,true,-1)){if(e.lineIndent<=t){s.push(null);l=e.input.charCodeAt(e.position);continue}}r=e.line;v3(e,t,xJt,false,true);s.push(e.result);Wo(e,true,-1);l=e.input.charCodeAt(e.position);if((e.line===r||e.lineIndent>t)&&l!==0){Mr(e,"bad indentation of a sequence entry")}else if(e.lineIndent<t){break}}if(u){e.tag=n;e.anchor=i;e.kind="sequence";e.result=s;return true}return false}a(AJt,"readBlockSequence");function UTi(e,t,r){var n,i,s,o,u=e.tag,l=e.anchor,c={},d={},p=null,f=null,m=null,h=false,g=false,_;if(e.anchor!==null){e.anchorMap[e.anchor]=c}_=e.input.charCodeAt(e.position);while(_!==0){n=e.input.charCodeAt(e.position+1);s=e.line;o=e.position;if((_===63||_===58)&&Gd(n)){if(_===63){if(h){_3(e,c,d,p,f,null);p=f=m=null}g=true;h=true;i=true}else if(h){h=false;i=true}else{Mr(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line")}e.position+=1;_=n}else if(v3(e,r,TJt,false,true)){if(e.line===s){_=e.input.charCodeAt(e.position);while(Ow(_)){_=e.input.charCodeAt(++e.position)}if(_===58){_=e.input.charCodeAt(++e.position);if(!Gd(_)){Mr(e,"a whitespace character is expected after the key-value separator within a block mapping")}if(h){_3(e,c,d,p,f,null);p=f=m=null}g=true;h=false;i=false;p=e.tag;f=e.result}else if(g){Mr(e,"can not read an implicit mapping pair; a colon is missed")}else{e.tag=u;e.anchor=l;return true}}else if(g){Mr(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}else{e.tag=u;e.anchor=l;return true}}else{break}if(e.line===s||e.lineIndent>t){if(v3(e,t,Mne,true,i)){if(h){f=e.result}else{m=e.result}}if(!h){_3(e,c,d,p,f,m,s,o);p=f=m=null}Wo(e,true,-1);_=e.input.charCodeAt(e.position)}if(e.lineIndent>t&&_!==0){Mr(e,"bad indentation of a mapping entry")}else if(e.lineIndent<t){break}}if(h){_3(e,c,d,p,f,null)}if(g){e.tag=u;e.anchor=l;e.kind="mapping";e.result=c}return g}a(UTi,"readBlockMapping");function $Ti(e){var t,r=false,n=false,i,s,o;o=e.input.charCodeAt(e.position);if(o!==33)return false;if(e.tag!==null){Mr(e,"duplication of a tag property")}o=e.input.charCodeAt(++e.position);if(o===60){r=true;o=e.input.charCodeAt(++e.position)}else if(o===33){n=true;i="!!";o=e.input.charCodeAt(++e.position)}else{i="!"}t=e.position;if(r){do{o=e.input.charCodeAt(++e.position)}while(o!==0&&o!==62);if(e.position<e.length){s=e.input.slice(t,e.position);o=e.input.charCodeAt(++e.position)}else{Mr(e,"unexpected end of the stream within a verbatim tag")}}else{while(o!==0&&!Gd(o)){if(o===33){if(!n){i=e.input.slice(t-1,e.position+1);if(!RJt.test(i)){Mr(e,"named tag handle cannot contain such characters")}n=true;t=e.position+1}else{Mr(e,"tag suffix cannot contain exclamation marks")}}o=e.input.charCodeAt(++e.position)}s=e.input.slice(t,e.position);if(OTi.test(s)){Mr(e,"tag suffix cannot contain flow indicator characters")}}if(s&&!OJt.test(s)){Mr(e,"tag name cannot contain such characters: "+s)}if(r){e.tag=s}else if(Zb.call(e.tagMap,i)){e.tag=e.tagMap[i]+s}else if(i==="!"){e.tag="!"+s}else if(i==="!!"){e.tag="tag:yaml.org,2002:"+s}else{Mr(e,'undeclared tag handle "'+i+'"')}return true}a($Ti,"readTagProperty");function jTi(e){var t,r;r=e.input.charCodeAt(e.position);if(r!==38)return false;if(e.anchor!==null){Mr(e,"duplication of an anchor property")}r=e.input.charCodeAt(++e.position);t=e.position;while(r!==0&&!Gd(r)&&!y3(r)){r=e.input.charCodeAt(++e.position)}if(e.position===t){Mr(e,"name of an anchor node must contain at least one character")}e.anchor=e.input.slice(t,e.position);return true}a(jTi,"readAnchorProperty");function GTi(e){var t,r,n;n=e.input.charCodeAt(e.position);if(n!==42)return false;n=e.input.charCodeAt(++e.position);t=e.position;while(n!==0&&!Gd(n)&&!y3(n)){n=e.input.charCodeAt(++e.position)}if(e.position===t){Mr(e,"name of an alias node must contain at least one character")}r=e.input.slice(t,e.position);if(!Zb.call(e.anchorMap,r)){Mr(e,'unidentified alias "'+r+'"')}e.result=e.anchorMap[r];Wo(e,true,-1);return true}a(GTi,"readAlias");function v3(e,t,r,n,i){var s,o,u,l=1,c=false,d=false,p,f,m,h,g;if(e.listener!==null){e.listener("open",e)}e.tag=null;e.anchor=null;e.kind=null;e.result=null;s=o=u=Mne===r||xJt===r;if(n){if(Wo(e,true,-1)){c=true;if(e.lineIndent>t){l=1}else if(e.lineIndent===t){l=0}else if(e.lineIndent<t){l=-1}}}if(l===1){while($Ti(e)||jTi(e)){if(Wo(e,true,-1)){c=true;u=s;if(e.lineIndent>t){l=1}else if(e.lineIndent===t){l=0}else if(e.lineIndent<t){l=-1}}else{u=false}}}if(u){u=c||i}if(l===1||Mne===r){if(Bne===r||TJt===r){h=t}else{h=t+1}g=e.position-e.lineStart;if(l===1){if(u&&(AJt(e,g)||UTi(e,g,h))||MTi(e,h)){d=true}else{if(o&&qTi(e,h)||FTi(e,h)||BTi(e,h)){d=true}else if(GTi(e)){d=true;if(e.tag!==null||e.anchor!==null){Mr(e,"alias node should not have any properties")}}else if(LTi(e,h,Bne===r)){d=true;if(e.tag===null){e.tag="?"}}if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}else if(l===0){d=u&&AJt(e,g)}}if(e.tag!==null&&e.tag!=="!"){if(e.tag==="?"){if(e.result!==null&&e.kind!=="scalar"){Mr(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"')}for(p=0,f=e.implicitTypes.length;p<f;p+=1){m=e.implicitTypes[p];if(m.resolve(e.result)){e.result=m.construct(e.result);e.tag=m.tag;if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}break}}}else if(Zb.call(e.typeMap[e.kind||"fallback"],e.tag)){m=e.typeMap[e.kind||"fallback"][e.tag];if(e.result!==null&&m.kind!==e.kind){Mr(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"')}if(!m.resolve(e.result)){Mr(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=m.construct(e.result);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}else{Mr(e,"unknown tag !<"+e.tag+">")}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||d}a(v3,"composeNode");function HTi(e){var t=e.position,r,n,i,s=false,o;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap={};e.anchorMap={};while((o=e.input.charCodeAt(e.position))!==0){Wo(e,true,-1);o=e.input.charCodeAt(e.position);if(e.lineIndent>0||o!==37){break}s=true;o=e.input.charCodeAt(++e.position);r=e.position;while(o!==0&&!Gd(o)){o=e.input.charCodeAt(++e.position)}n=e.input.slice(r,e.position);i=[];if(n.length<1){Mr(e,"directive name must not be less than one character in length")}while(o!==0){while(Ow(o)){o=e.input.charCodeAt(++e.position)}if(o===35){do{o=e.input.charCodeAt(++e.position)}while(o!==0&&!Dg(o));break}if(Dg(o))break;r=e.position;while(o!==0&&!Gd(o)){o=e.input.charCodeAt(++e.position)}i.push(e.input.slice(r,e.position))}if(o!==0)G8e(e);if(Zb.call(bJt,n)){bJt[n](e,n,i)}else{qne(e,'unknown document directive "'+n+'"')}}Wo(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;Wo(e,true,-1)}else if(s){Mr(e,"directives end mark is expected")}v3(e,e.lineIndent-1,Mne,false,true);Wo(e,true,-1);if(e.checkLineBreaks&&RTi.test(e.input.slice(t,e.position))){qne(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&Une(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;Wo(e,true,-1)}return}if(e.position<e.length-1){Mr(e,"end of the stream or a document separator is expected")}else{return}}a(HTi,"readDocument");function kJt(e,t){e=String(e);t=t||{};if(e.length!==0){if(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13){e+="\n"}if(e.charCodeAt(0)===65279){e=e.slice(1)}}var r=new DTi(e,t);var n=e.indexOf("\0");if(n!==-1){r.position=n;Mr(r,"null byte is not allowed in input")}r.input+="\0";while(r.input.charCodeAt(r.position)===32){r.lineIndent+=1;r.position+=1}while(r.position<r.length-1){HTi(r)}return r.documents}a(kJt,"loadDocuments");function DJt(e,t,r){if(t!==null&&typeof t==="object"&&typeof r==="undefined"){r=t;t=null}var n=kJt(e,r);if(typeof t!=="function"){return n}for(var i=0,s=n.length;i<s;i+=1){t(n[i])}}a(DJt,"loadAll");function LJt(e,t){var r=kJt(e,t);if(r.length===0){return void 0}else if(r.length===1){return r[0]}throw new CJt("expected a single document in the stream, but found more")}a(LJt,"load");function VTi(e,t,r){if(typeof t==="object"&&t!==null&&typeof r==="undefined"){r=t;t=null}return DJt(e,t,e_.extend({schema:wJt},r))}a(VTi,"safeLoadAll");function zTi(e,t){return LJt(e,e_.extend({schema:wJt},t))}a(zTi,"safeLoad");xq.exports.loadAll=DJt;xq.exports.load=LJt;xq.exports.safeLoadAll=VTi;xq.exports.safeLoad=zTi});var sQt=y((kYs,W8e)=>{"use strict";var Oq=ww();var Pq=m3();var KTi=Tq();var WTi=g3();var HJt=Object.prototype.toString;var VJt=Object.prototype.hasOwnProperty;var YTi=9;var Rq=10;var XTi=13;var JTi=32;var QTi=33;var ZTi=34;var zJt=35;var exi=37;var txi=38;var rxi=39;var nxi=42;var KJt=44;var ixi=45;var WJt=58;var sxi=61;var axi=62;var oxi=63;var uxi=64;var YJt=91;var XJt=93;var lxi=96;var JJt=123;var cxi=124;var QJt=125;var Yl={};Yl[0]="\\0";Yl[7]="\\a";Yl[8]="\\b";Yl[9]="\\t";Yl[10]="\\n";Yl[11]="\\v";Yl[12]="\\f";Yl[13]="\\r";Yl[27]="\\e";Yl[34]='\\"';Yl[92]="\\\\";Yl[133]="\\N";Yl[160]="\\_";Yl[8232]="\\L";Yl[8233]="\\P";var dxi=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function pxi(e,t){var r,n,i,s,o,u,l;if(t===null)return{};r={};n=Object.keys(t);for(i=0,s=n.length;i<s;i+=1){o=n[i];u=String(t[o]);if(o.slice(0,2)==="!!"){o="tag:yaml.org,2002:"+o.slice(2)}l=e.compiledTypeMap["fallback"][o];if(l&&VJt.call(l.styleAliases,u)){u=l.styleAliases[u]}r[o]=u}return r}a(pxi,"compileStyleMap");function BJt(e){var t,r,n;t=e.toString(16).toUpperCase();if(e<=255){r="x";n=2}else if(e<=65535){r="u";n=4}else if(e<=4294967295){r="U";n=8}else{throw new Pq("code point within a string may not be greater than 0xFFFFFFFF")}return"\\"+r+Oq.repeat("0",n-t.length)+t}a(BJt,"encodeHex");function fxi(e){this.schema=e["schema"]||KTi;this.indent=Math.max(1,e["indent"]||2);this.noArrayIndent=e["noArrayIndent"]||false;this.skipInvalid=e["skipInvalid"]||false;this.flowLevel=Oq.isNothing(e["flowLevel"])?-1:e["flowLevel"];this.styleMap=pxi(this.schema,e["styles"]||null);this.sortKeys=e["sortKeys"]||false;this.lineWidth=e["lineWidth"]||80;this.noRefs=e["noRefs"]||false;this.noCompatMode=e["noCompatMode"]||false;this.condenseFlow=e["condenseFlow"]||false;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}a(fxi,"State");function MJt(e,t){var r=Oq.repeat(" ",t),n=0,i=-1,s="",o,u=e.length;while(n<u){i=e.indexOf("\n",n);if(i===-1){o=e.slice(n);n=u}else{o=e.slice(n,i+1);n=i+1}if(o.length&&o!=="\n")s+=r;s+=o}return s}a(MJt,"indentString");function V8e(e,t){return"\n"+Oq.repeat(" ",e.indent*t)}a(V8e,"generateNextLine");function mxi(e,t){var r,n,i;for(r=0,n=e.implicitTypes.length;r<n;r+=1){i=e.implicitTypes[r];if(i.resolve(t)){return true}}return false}a(mxi,"testImplicitResolving");function K8e(e){return e===JTi||e===YTi}a(K8e,"isWhitespace");function E3(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}a(E3,"isPrintable");function hxi(e){return E3(e)&&!K8e(e)&&e!==65279&&e!==XTi&&e!==Rq}a(hxi,"isNsChar");function qJt(e,t){return E3(e)&&e!==65279&&e!==KJt&&e!==YJt&&e!==XJt&&e!==JJt&&e!==QJt&&e!==WJt&&(e!==zJt||t&&hxi(t))}a(qJt,"isPlainSafe");function gxi(e){return E3(e)&&e!==65279&&!K8e(e)&&e!==ixi&&e!==oxi&&e!==WJt&&e!==KJt&&e!==YJt&&e!==XJt&&e!==JJt&&e!==QJt&&e!==zJt&&e!==txi&&e!==nxi&&e!==QTi&&e!==cxi&&e!==sxi&&e!==axi&&e!==rxi&&e!==ZTi&&e!==exi&&e!==uxi&&e!==lxi}a(gxi,"isPlainSafeFirst");function ZJt(e){var t=/^\n* /;return t.test(e)}a(ZJt,"needIndentIndicator");var eQt=1;var tQt=2;var rQt=3;var nQt=4;var $ne=5;function yxi(e,t,r,n,i){var s;var o,u;var l=false;var c=false;var d=n!==-1;var p=-1;var f=gxi(e.charCodeAt(0))&&!K8e(e.charCodeAt(e.length-1));if(t){for(s=0;s<e.length;s++){o=e.charCodeAt(s);if(!E3(o)){return $ne}u=s>0?e.charCodeAt(s-1):null;f=f&&qJt(o,u)}}else{for(s=0;s<e.length;s++){o=e.charCodeAt(s);if(o===Rq){l=true;if(d){c=c||s-p-1>n&&e[p+1]!==" ";p=s}}else if(!E3(o)){return $ne}u=s>0?e.charCodeAt(s-1):null;f=f&&qJt(o,u)}c=c||d&&(s-p-1>n&&e[p+1]!==" ")}if(!l&&!c){return f&&!i(e)?eQt:tQt}if(r>9&&ZJt(e)){return $ne}return c?nQt:rQt}a(yxi,"chooseScalarStyle");function _xi(e,t,r,n){e.dump=function(){if(t.length===0){return"''"}if(!e.noCompatMode&&dxi.indexOf(t)!==-1){return"'"+t+"'"}var i=e.indent*Math.max(1,r);var s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i);var o=n||e.flowLevel>-1&&r>=e.flowLevel;function u(l){return mxi(e,l)}a(u,"testAmbiguity");switch(yxi(t,o,e.indent,s,u)){case eQt:return t;case tQt:return"'"+t.replace(/'/g,"''")+"'";case rQt:return"|"+UJt(t,e.indent)+$Jt(MJt(t,i));case nQt:return">"+UJt(t,e.indent)+$Jt(MJt(vxi(t,s),i));case $ne:return'"'+Exi(t,s)+'"';default:throw new Pq("impossible error: invalid scalar style")}}()}a(_xi,"writeScalar");function UJt(e,t){var r=ZJt(e)?String(t):"";var n=e[e.length-1]==="\n";var i=n&&(e[e.length-2]==="\n"||e==="\n");var s=i?"+":n?"":"-";return r+s+"\n"}a(UJt,"blockHeader");function $Jt(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}a($Jt,"dropEndingNewline");function vxi(e,t){var r=/(\n+)([^\n]*)/g;var n=function(){var c=e.indexOf("\n");c=c!==-1?c:e.length;r.lastIndex=c;return jJt(e.slice(0,c),t)}();var i=e[0]==="\n"||e[0]===" ";var s;var o;while(o=r.exec(e)){var u=o[1],l=o[2];s=l[0]===" ";n+=u+(!i&&!s&&l!==""?"\n":"")+jJt(l,t);i=s}return n}a(vxi,"foldString");function jJt(e,t){if(e===""||e[0]===" ")return e;var r=/ [^ ]/g;var n;var i=0,s,o=0,u=0;var l="";while(n=r.exec(e)){u=n.index;if(u-i>t){s=o>i?o:u;l+="\n"+e.slice(i,s);i=s+1}o=u}l+="\n";if(e.length-i>t&&o>i){l+=e.slice(i,o)+"\n"+e.slice(o+1)}else{l+=e.slice(i)}return l.slice(1)}a(jJt,"foldLine");function Exi(e){var t="";var r,n;var i;for(var s=0;s<e.length;s++){r=e.charCodeAt(s);if(r>=55296&&r<=56319){n=e.charCodeAt(s+1);if(n>=56320&&n<=57343){t+=BJt((r-55296)*1024+n-56320+65536);s++;continue}}i=Yl[r];t+=!i&&E3(r)?e[s]:i||BJt(r)}return t}a(Exi,"escapeString");function bxi(e,t,r){var n="",i=e.tag,s,o;for(s=0,o=r.length;s<o;s+=1){if(Pw(e,t,r[s],false,false)){if(s!==0)n+=","+(!e.condenseFlow?" ":"");n+=e.dump}}e.tag=i;e.dump="["+n+"]"}a(bxi,"writeFlowSequence");function Sxi(e,t,r,n){var i="",s=e.tag,o,u;for(o=0,u=r.length;o<u;o+=1){if(Pw(e,t+1,r[o],true,true)){if(!n||o!==0){i+=V8e(e,t)}if(e.dump&&Rq===e.dump.charCodeAt(0)){i+="-"}else{i+="- "}i+=e.dump}}e.tag=s;e.dump=i||"[]"}a(Sxi,"writeBlockSequence");function Axi(e,t,r){var n="",i=e.tag,s=Object.keys(r),o,u,l,c,d;for(o=0,u=s.length;o<u;o+=1){d="";if(o!==0)d+=", ";if(e.condenseFlow)d+='"';l=s[o];c=r[l];if(!Pw(e,t,l,false,false)){continue}if(e.dump.length>1024)d+="? ";d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!Pw(e,t,c,false,false)){continue}d+=e.dump;n+=d}e.tag=i;e.dump="{"+n+"}"}a(Axi,"writeFlowMapping");function Cxi(e,t,r,n){var i="",s=e.tag,o=Object.keys(r),u,l,c,d,p,f;if(e.sortKeys===true){o.sort()}else if(typeof e.sortKeys==="function"){o.sort(e.sortKeys)}else if(e.sortKeys){throw new Pq("sortKeys must be a boolean or a function")}for(u=0,l=o.length;u<l;u+=1){f="";if(!n||u!==0){f+=V8e(e,t)}c=o[u];d=r[c];if(!Pw(e,t+1,c,true,true,true)){continue}p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024;if(p){if(e.dump&&Rq===e.dump.charCodeAt(0)){f+="?"}else{f+="? "}}f+=e.dump;if(p){f+=V8e(e,t)}if(!Pw(e,t+1,d,true,p)){continue}if(e.dump&&Rq===e.dump.charCodeAt(0)){f+=":"}else{f+=": "}f+=e.dump;i+=f}e.tag=s;e.dump=i||"{}"}a(Cxi,"writeBlockMapping");function GJt(e,t,r){var n,i,s,o,u,l;i=r?e.explicitTypes:e.implicitTypes;for(s=0,o=i.length;s<o;s+=1){u=i[s];if((u.instanceOf||u.predicate)&&(!u.instanceOf||typeof t==="object"&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){e.tag=r?u.tag:"?";if(u.represent){l=e.styleMap[u.tag]||u.defaultStyle;if(HJt.call(u.represent)==="[object Function]"){n=u.represent(t,l)}else if(VJt.call(u.represent,l)){n=u.represent[l](t,l)}else{throw new Pq("!<"+u.tag+'> tag resolver accepts not "'+l+'" style')}e.dump=n}return true}}return false}a(GJt,"detectType");function Pw(e,t,r,n,i,s){e.tag=null;e.dump=r;if(!GJt(e,r,false)){GJt(e,r,true)}var o=HJt.call(e.dump);if(n){n=e.flowLevel<0||e.flowLevel>t}var u=o==="[object Object]"||o==="[object Array]",l,c;if(u){l=e.duplicates.indexOf(r);c=l!==-1}if(e.tag!==null&&e.tag!=="?"||c||e.indent!==2&&t>0){i=false}if(c&&e.usedDuplicates[l]){e.dump="*ref_"+l}else{if(u&&c&&!e.usedDuplicates[l]){e.usedDuplicates[l]=true}if(o==="[object Object]"){if(n&&Object.keys(e.dump).length!==0){Cxi(e,t,e.dump,i);if(c){e.dump="&ref_"+l+e.dump}}else{Axi(e,t,e.dump);if(c){e.dump="&ref_"+l+" "+e.dump}}}else if(o==="[object Array]"){var d=e.noArrayIndent&&t>0?t-1:t;if(n&&e.dump.length!==0){Sxi(e,d,e.dump,i);if(c){e.dump="&ref_"+l+e.dump}}else{bxi(e,d,e.dump);if(c){e.dump="&ref_"+l+" "+e.dump}}}else if(o==="[object String]"){if(e.tag!=="?"){_xi(e,e.dump,t,s)}}else{if(e.skipInvalid)return false;throw new Pq("unacceptable kind of an object to dump "+o)}if(e.tag!==null&&e.tag!=="?"){e.dump="!<"+e.tag+"> "+e.dump}}return true}a(Pw,"writeNode");function wxi(e,t){var r=[],n=[],i,s;z8e(e,r,n);for(i=0,s=n.length;i<s;i+=1){t.duplicates.push(r[n[i]])}t.usedDuplicates=new Array(s)}a(wxi,"getDuplicateReferences");function z8e(e,t,r){var n,i,s;if(e!==null&&typeof e==="object"){i=t.indexOf(e);if(i!==-1){if(r.indexOf(i)===-1){r.push(i)}}else{t.push(e);if(Array.isArray(e)){for(i=0,s=e.length;i<s;i+=1){z8e(e[i],t,r)}}else{n=Object.keys(e);for(i=0,s=n.length;i<s;i+=1){z8e(e[n[i]],t,r)}}}}}a(z8e,"inspectNode");function iQt(e,t){t=t||{};var r=new fxi(t);if(!r.noRefs)wxi(e,r);if(Pw(r,0,e,true,true))return r.dump+"\n";return""}a(iQt,"dump");function Txi(e,t){return iQt(e,Oq.extend({schema:WTi},t))}a(Txi,"safeDump");W8e.exports.dump=iQt;W8e.exports.safeDump=Txi});var oQt=y((LYs,co)=>{"use strict";var jne=FJt();var aQt=sQt();function Gne(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}a(Gne,"deprecated");co.exports.Type=su();co.exports.Schema=Tw();co.exports.FAILSAFE_SCHEMA=Lne();co.exports.JSON_SCHEMA=q8e();co.exports.CORE_SCHEMA=U8e();co.exports.DEFAULT_SAFE_SCHEMA=g3();co.exports.DEFAULT_FULL_SCHEMA=Tq();co.exports.load=jne.load;co.exports.loadAll=jne.loadAll;co.exports.safeLoad=jne.safeLoad;co.exports.safeLoadAll=jne.safeLoadAll;co.exports.dump=aQt.dump;co.exports.safeDump=aQt.safeDump;co.exports.YAMLException=m3();co.exports.MINIMAL_SCHEMA=Lne();co.exports.SAFE_SCHEMA=g3();co.exports.DEFAULT_SCHEMA=Tq();co.exports.scan=Gne("scan");co.exports.parse=Gne("parse");co.exports.compose=Gne("compose");co.exports.addConstructor=Gne("addConstructor")});var lQt=y((BYs,uQt)=>{"use strict";var xxi=oQt();uQt.exports=xxi});var dQt=y((MYs,cQt)=>{cQt.exports=require("util").format});var t_=y((qYs,Vh)=>{"use strict";var Rxi=dQt();var Y8e=Array.prototype.slice;var Oxi=["name","message","stack"];var Pxi=["name","message","description","number","code","fileName","lineNumber","columnNumber","sourceURL","line","column","stack"];Vh.exports=e2(Error);Vh.exports.error=e2(Error);Vh.exports.eval=e2(EvalError);Vh.exports.range=e2(RangeError);Vh.exports.reference=e2(ReferenceError);Vh.exports.syntax=e2(SyntaxError);Vh.exports.type=e2(TypeError);Vh.exports.uri=e2(URIError);Vh.exports.formatter=Rxi;function e2(e){return a(function t(r,n,i,s){var o=[];var u="";if(typeof r==="string"){o=Y8e.call(arguments);r=n=void 0}else if(typeof n==="string"){o=Y8e.call(arguments,1);n=void 0}else if(typeof i==="string"){o=Y8e.call(arguments,2)}if(o.length>0){u=Vh.exports.formatter.apply(null,o)}if(r&&r.message){u+=(u?" \n":"")+r.message}var l=new e(u);Nxi(l,r);Ixi(l);pQt(l,n);return l},"onoFactory")}a(e2,"create");function Nxi(e,t){Lxi(e,t);pQt(e,t)}a(Nxi,"extendError");function Ixi(e){e.toJSON=kxi;e.inspect=Dxi}a(Ixi,"extendToJSON");function pQt(e,t){if(t&&typeof t==="object"){var r=Object.keys(t);for(var n=0;n<r.length;n++){var i=r[n];if(Oxi.indexOf(i)>=0){continue}try{e[i]=t[i]}catch(s){}}}}a(pQt,"extend");function kxi(){var e={};var t=Object.keys(this);t=t.concat(Pxi);for(var r=0;r<t.length;r++){var n=t[r];var i=this[n];var s=typeof i;if(s!=="undefined"&&s!=="function"){e[n]=i}}return e}a(kxi,"errorToJSON");function Dxi(){return JSON.stringify(this,null,2).replace(/\\n/g,"\n")}a(Dxi,"errorToString");function Lxi(e,t){if(Bxi(e)){if(t){Mxi(e,t)}else{qxi(e)}}else{if(t){e.stack=fQt(e.stack,t.stack)}else{e.stack=X8e(e.stack)}}}a(Lxi,"extendStack");function fQt(e,t){e=X8e(e);if(e&&t){return e+"\n\n"+t}else{return e||t}}a(fQt,"joinStacks");function X8e(e){if(e){var t=e.split("\n");if(t.length<2){return e}for(var r=0;r<t.length;r++){var n=t[r];if(n.indexOf("onoFactory")>=0){t.splice(r,1);return t.join("\n")}}return e}}a(X8e,"popStack");var Fxi=function(){return!!(Object.getOwnPropertyDescriptor&&Object.defineProperty&&(typeof navigator==="undefined"||!/Android/.test(navigator.userAgent)))}();function Bxi(e){if(!Fxi){return false}var t=Object.getOwnPropertyDescriptor(e,"stack");if(!t){return false}return typeof t.get==="function"}a(Bxi,"hasLazyStack");function Mxi(e,t){var r=Object.getOwnPropertyDescriptor(e,"stack");Object.defineProperty(e,"stack",{get:function(){return fQt(r.get.apply(e),t.stack)},enumerable:false,configurable:true})}a(Mxi,"lazyJoinStacks");function qxi(e){var t=Object.getOwnPropertyDescriptor(e,"stack");Object.defineProperty(e,"stack",{get:function(){return X8e(t.get.apply(e))},enumerable:false,configurable:true})}a(qxi,"lazyPopStack")});var J8e=y(($Ys,gQt)=>{"use strict";var mQt=lQt();var hQt=t_();gQt.exports={parse:a(function e(t,r){try{return mQt.safeLoad(t)}catch(n){if(n instanceof Error){throw n}else{throw hQt(n,n.message)}}},"yamlParse"),stringify:a(function e(t,r,n){try{var i=(typeof n==="string"?n.length:n)||2;return mQt.safeDump(t,{indent:i})}catch(s){if(s instanceof Error){throw s}else{throw hQt(s,s.message)}}},"yamlStringify")}});var _Qt=y((GYs,yQt)=>{"use strict";var Uxi=J8e();yQt.exports={order:200,allowEmpty:true,canParse:[".yaml",".yml",".json"],parse:a(function e(t){return new Promise(function(r,n){var i=t.data;if(Buffer.isBuffer(i)){i=i.toString()}if(typeof i==="string"){r(Uxi.parse(i))}else{r(i)}})},"parseYAML")}});var EQt=y((VYs,vQt)=>{"use strict";var $xi=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;vQt.exports={order:300,allowEmpty:true,encoding:"utf8",canParse:a(function e(t){return(typeof t.data==="string"||Buffer.isBuffer(t.data))&&$xi.test(t.url)},"isText"),parse:a(function e(t){if(typeof t.data==="string"){return t.data}else if(Buffer.isBuffer(t.data)){return t.data.toString(this.encoding)}else{throw new Error("data is not text")}},"parseText")}});var SQt=y((KYs,bQt)=>{"use strict";var jxi=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;bQt.exports={order:400,allowEmpty:true,canParse:a(function e(t){return Buffer.isBuffer(t.data)&&jxi.test(t.url)},"isBinary"),parse:a(function e(t){if(Buffer.isBuffer(t.data)){return t.data}else{return new Buffer(t.data)}},"parseBinary")}});var Lg=y((pm,CQt)=>{"use strict";var Hne=/^win/.test(process.platform);var Gxi=/\//g;var Hxi=/^(\w{2,}):\/\//i;var AQt=CQt.exports;var Q8e=[/\?/g,"%3F",/\#/g,"%23"];var Z8e=[/\%23/g,"#",/\%24/g,"$",/\%26/g,"&",/\%2C/g,",",/\%40/g,"@"];pm.parse=require("url").parse;pm.resolve=require("url").resolve;pm.cwd=a(function e(){return process.browser?location.href:process.cwd()+"/"},"cwd");pm.getProtocol=a(function e(t){var r=Hxi.exec(t);if(r){return r[1].toLowerCase()}},"getProtocol");pm.getExtension=a(function e(t){var r=t.lastIndexOf(".");if(r>=0){return t.substr(r).toLowerCase()}return""},"getExtension");pm.getHash=a(function e(t){var r=t.indexOf("#");if(r>=0){return t.substr(r)}return"#"},"getHash");pm.stripHash=a(function e(t){var r=t.indexOf("#");if(r>=0){t=t.substr(0,r)}return t},"stripHash");pm.isHttp=a(function e(t){var r=AQt.getProtocol(t);if(r==="http"||r==="https"){return true}else if(r===void 0){return process.browser}else{return false}},"isHttp");pm.isFileSystemPath=a(function e(t){if(process.browser){return false}var r=AQt.getProtocol(t);return r===void 0||r==="file"},"isFileSystemPath");pm.fromFileSystemPath=a(function e(t){if(Hne){t=t.replace(/\\/g,"/")}t=encodeURI(t);for(var r=0;r<Q8e.length;r+=2){t=t.replace(Q8e[r],Q8e[r+1])}return t},"fromFileSystemPath");pm.toFileSystemPath=a(function e(t,r){t=decodeURI(t);for(var n=0;n<Z8e.length;n+=2){t=t.replace(Z8e[n],Z8e[n+1])}var i=t.substr(0,7).toLowerCase()==="file://";if(i){t=t[7]==="/"?t.substr(8):t.substr(7);if(Hne&&t[1]==="/"){t=t[0]+":"+t.substr(1)}if(r){t="file:///"+t}else{i=false;t=Hne?t:"/"+t}}if(Hne&&!i){t=t.replace(Gxi,"\\");if(t.substr(1,2)===":\\"){t=t[0].toUpperCase()+t.substr(1)}}return t},"toFileSystemPath")});var xQt=y((XYs,TQt)=>{"use strict";var Vxi=require("fs");var e9e=t_();var wQt=Lg();TQt.exports={order:100,canRead:a(function e(t){return wQt.isFileSystemPath(t.url)},"isFile"),read:a(function e(t){return new Promise(function(r,n){var i;try{i=wQt.toFileSystemPath(t.url)}catch(s){n(e9e.uri(s,"Malformed URI: %s",t.url))}try{Vxi.readFile(i,function(s,o){if(s){n(e9e(s,'Error opening file "%s"',i))}else{r(o)}})}catch(s){n(e9e(s,'Error opening file "%s"',i))}})},"readFile")}});var PQt=y((QYs,OQt)=>{"use strict";var zxi=require("http");var Kxi=require("https");var Vne=t_();var Nq=Lg();OQt.exports={order:200,headers:null,timeout:5e3,redirects:5,withCredentials:false,canRead:a(function e(t){return Nq.isHttp(t.url)},"isHttp"),read:a(function e(t){var r=Nq.parse(t.url);if(process.browser&&!r.protocol){r.protocol=Nq.parse(location.href).protocol}return RQt(r,this)},"readHttp")};function RQt(e,t,r){return new Promise(function(n,i){e=Nq.parse(e);r=r||[];r.push(e.href);Wxi(e,t).then(function(s){if(s.statusCode>=400){throw Vne({status:s.statusCode},"HTTP ERROR %d",s.statusCode)}else if(s.statusCode>=300){if(r.length>t.redirects){i(Vne({status:s.statusCode},"Error downloading %s. \nToo many redirects: \n %s",r[0],r.join(" \n ")))}else if(!s.headers.location){throw Vne({status:s.statusCode},"HTTP %d redirect with no location header",s.statusCode)}else{var o=Nq.resolve(e,s.headers.location);RQt(o,t,r).then(n,i)}}else{n(s.body||new Buffer(0))}}).catch(function(s){i(Vne(s,"Error downloading",e.href))})})}a(RQt,"download");function Wxi(e,t){return new Promise(function(r,n){var i=e.protocol==="https:"?Kxi:zxi;var s=i.get({hostname:e.hostname,port:e.port,path:e.path,auth:e.auth,protocol:e.protocol,headers:t.headers||{},withCredentials:t.withCredentials});if(typeof s.setTimeout==="function"){s.setTimeout(t.timeout)}s.on("timeout",function(){s.abort()});s.on("error",n);s.once("response",function(o){o.body=new Buffer(0);o.on("data",function(u){o.body=Buffer.concat([o.body,new Buffer(u)])});o.on("error",n);o.on("end",function(){r(o)})})})}a(Wxi,"get")});var n9e=y((eXs,IQt)=>{"use strict";var Yxi=vXt();var Xxi=_Qt();var Jxi=EQt();var Qxi=SQt();var Zxi=xQt();var eRi=PQt();IQt.exports=r9e;function r9e(e){t9e(this,r9e.defaults);t9e(this,e)}a(r9e,"$RefParserOptions");r9e.defaults={parse:{json:Yxi,yaml:Xxi,text:Jxi,binary:Qxi},resolve:{file:Zxi,http:eRi,external:true},dereference:{circular:true}};function t9e(e,t){if(NQt(t)){var r=Object.keys(t);for(var n=0;n<r.length;n++){var i=r[n];var s=t[i];var o=e[i];if(NQt(s)){e[i]=t9e(o||{},s)}else if(s!==void 0){e[i]=s}}}return e}a(t9e,"merge");function NQt(e){return e&&typeof e==="object"&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}a(NQt,"isMergeable")});var Iq=y((rXs,LQt)=>{"use strict";LQt.exports=t2;var i9e=b3();var DQt=Lg();var s9e=t_();var tRi=/\//g;var rRi=/~/g;var nRi=/~1/g;var iRi=/~0/g;function t2(e,t,r){this.$ref=e;this.path=t;this.originalPath=r||t;this.value=void 0;this.circular=false;this.indirections=0}a(t2,"Pointer");t2.prototype.resolve=function(e,t){var r=t2.parse(this.path);this.value=e;for(var n=0;n<r.length;n++){if(zne(this,t)){this.path=t2.join(this.path,r.slice(n))}var i=r[n];if(this.value[i]===void 0){throw s9e.syntax('Error resolving $ref pointer "%s". \nToken "%s" does not exist.',this.originalPath,i)}else{this.value=this.value[i]}}zne(this,t);return this};t2.prototype.set=function(e,t,r){var n=t2.parse(this.path);var i;if(n.length===0){this.value=t;return t}this.value=e;for(var s=0;s<n.length-1;s++){zne(this,r);i=n[s];if(this.value&&this.value[i]!==void 0){this.value=this.value[i]}else{this.value=kQt(this,i,{})}}zne(this,r);i=n[n.length-1];kQt(this,i,t);return e};t2.parse=function(e){var t=DQt.getHash(e).substr(1);if(!t){return[]}t=t.split("/");for(var r=0;r<t.length;r++){t[r]=decodeURIComponent(t[r].replace(nRi,"/").replace(iRi,"~"))}if(t[0]!==""){throw s9e.syntax('Invalid $ref pointer "%s". Pointers must begin with "#/"',t)}return t.slice(1)};t2.join=function(e,t){if(e.indexOf("#")===-1){e+="#"}t=Array.isArray(t)?t:[t];for(var r=0;r<t.length;r++){var n=t[r];e+="/"+encodeURIComponent(n.replace(rRi,"~0").replace(tRi,"~1"))}return e};function zne(e,t){if(i9e.isAllowed$Ref(e.value,t)){var r=DQt.resolve(e.path,e.value.$ref);if(r===e.path){e.circular=true}else{var n=e.$ref.$refs._resolve(r,t);e.indirections+=n.indirections+1;if(i9e.isExtended$Ref(e.value)){e.value=i9e.dereference(e.value,n.value);return false}else{e.$ref=n.$ref;e.path=n.path;e.value=n.value}return true}}}a(zne,"resolveIf$Ref");function kQt(e,t,r){if(e.value&&typeof e.value==="object"){if(t==="-"&&Array.isArray(e.value)){e.value.push(r)}else{e.value[t]=r}}else{throw s9e.syntax('Error assigning $ref pointer "%s". \nCannot set "%s" of a non-object.',e.path,t)}return r}a(kQt,"setValue")});var b3=y((iXs,BQt)=>{"use strict";BQt.exports=Hd;var FQt=Iq();function Hd(){this.path=void 0;this.value=void 0;this.$refs=void 0;this.pathType=void 0}a(Hd,"$Ref");Hd.prototype.exists=function(e,t){try{this.resolve(e,t);return true}catch(r){return false}};Hd.prototype.get=function(e,t){return this.resolve(e,t).value};Hd.prototype.resolve=function(e,t,r){var n=new FQt(this,e,r);return n.resolve(this.value,t)};Hd.prototype.set=function(e,t){var r=new FQt(this,e);this.value=r.set(this.value,t)};Hd.is$Ref=function(e){return e&&typeof e==="object"&&typeof e.$ref==="string"&&e.$ref.length>0};Hd.isExternal$Ref=function(e){return Hd.is$Ref(e)&&e.$ref[0]!=="#"};Hd.isAllowed$Ref=function(e,t){if(Hd.is$Ref(e)){if(e.$ref.substr(0,2)==="#/"||e.$ref==="#"){return true}else if(e.$ref[0]!=="#"&&(!t||t.resolve.external)){return true}}};Hd.isExtended$Ref=function(e){return Hd.is$Ref(e)&&Object.keys(e).length>1};Hd.dereference=function(e,t){if(t&&typeof t==="object"&&Hd.isExtended$Ref(e)){var r={};Object.keys(e).forEach(function(n){if(n!=="$ref"){r[n]=e[n]}});Object.keys(t).forEach(function(n){if(!(n in r)){r[n]=t[n]}});return r}else{return t}}});var $Qt=y((aXs,UQt)=>{"use strict";var MQt=t_();var sRi=b3();var r2=Lg();UQt.exports=zh;function zh(){this.circular=false;this._$refs={};this._root$Ref=null}a(zh,"$Refs");zh.prototype.paths=function(e){var t=qQt(this._$refs,arguments);return t.map(function(r){return r.decoded})};zh.prototype.values=function(e){var t=this._$refs;var r=qQt(t,arguments);return r.reduce(function(n,i){n[i.decoded]=t[i.encoded].value;return n},{})};zh.prototype.toJSON=zh.prototype.values;zh.prototype.exists=function(e,t){try{this._resolve(e,t);return true}catch(r){return false}};zh.prototype.get=function(e,t){return this._resolve(e,t).value};zh.prototype.set=function(e,t){var r=r2.resolve(this._root$Ref.path,e);var n=r2.stripHash(r);var i=this._$refs[n];if(!i){throw MQt('Error resolving $ref pointer "%s". \n"%s" not found.',e,n)}i.set(r,t)};zh.prototype._add=function(e){var t=r2.stripHash(e);var r=new sRi;r.path=t;r.$refs=this;this._$refs[t]=r;this._root$Ref=this._root$Ref||r;return r};zh.prototype._resolve=function(e,t){var r=r2.resolve(this._root$Ref.path,e);var n=r2.stripHash(r);var i=this._$refs[n];if(!i){throw MQt('Error resolving $ref pointer "%s". \n"%s" not found.',e,n)}return i.resolve(r,t,e)};zh.prototype._get$Ref=function(e){e=r2.resolve(this._root$Ref.path,e);var t=r2.stripHash(e);return this._$refs[t]};function qQt(e,t){var r=Object.keys(e);t=Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t);if(t.length>0&&t[0]){r=r.filter(function(n){return t.indexOf(e[n].pathType)!==-1})}return r.map(function(n){return{encoded:n,decoded:e[n].pathType==="file"?r2.toFileSystemPath(n,true):n}})}a(qQt,"getPaths")});var GQt=y(kq=>{"use strict";kq.all=function(e){return Object.keys(e).filter(function(t){return typeof e[t]==="object"}).map(function(t){e[t].name=t;return e[t]})};kq.filter=function(e,t,r){return e.filter(function(n){return!!jQt(n,t,r)})};kq.sort=function(e){e.forEach(function(t){t.order=t.order||Number.MAX_SAFE_INTEGER});return e.sort(function(t,r){return t.order-r.order})};kq.run=function(e,t,r){var n,i,s=0;return new Promise(function(o,u){l();function l(){n=e[s++];if(!n){return u(i)}try{var f=jQt(n,t,r,c);if(f&&typeof f.then==="function"){f.then(d,p)}else if(f!==void 0){d(f)}}catch(m){p(m)}}a(l,"runNextPlugin");function c(f,m){if(f){p(f)}else{d(m)}}a(c,"callback");function d(f){o({plugin:n,result:f})}a(d,"onSuccess");function p(f){i=f;l()}a(p,"onError")})};function jQt(e,t,r,n){var i=e[t];if(typeof i==="function"){return i.apply(e,[r,n])}if(!n){if(i instanceof RegExp){return i.test(r.url)}else if(typeof i==="string"){return i===r.extension}else if(Array.isArray(i)){return i.indexOf(r.extension)!==-1}}return i}a(jQt,"getResult")});var a9e=y((cXs,VQt)=>{"use strict";var Kne=t_();var HQt=Lg();var n2=GQt();VQt.exports=aRi;function aRi(e,t,r){try{e=HQt.stripHash(e);var n=t._add(e);var i={url:e,extension:HQt.getExtension(e)};return oRi(i,r).then(function(s){n.pathType=s.plugin.name;i.data=s.result;return uRi(i,r)}).then(function(s){n.value=s.result;return s.result})}catch(s){return Promise.reject(s)}}a(aRi,"parse");function oRi(e,t){return new Promise(function(r,n){var i=n2.all(t.resolve);i=n2.filter(i,"canRead",e);n2.sort(i);n2.run(i,"read",e).then(r,s);function s(o){if(o&&!(o instanceof SyntaxError)){n(o)}else{n(Kne.syntax('Unable to resolve $ref pointer "%s"',e.url))}}a(s,"onError")})}a(oRi,"readFile");function uRi(e,t){return new Promise(function(r,n){var i=n2.all(t.parse);var s=n2.filter(i,"canParse",e);var o=s.length>0?s:i;n2.sort(o);n2.run(o,"parse",e).then(u,l);function u(c){if(!c.plugin.allowEmpty&&lRi(c.result)){n(Kne.syntax('Error parsing "%s" as %s. \nParsed value is empty',e.url,c.plugin.name))}else{r(c)}}a(u,"onParsed");function l(c){if(c){c=c instanceof Error?c:new Error(c);n(Kne.syntax(c,"Error parsing %s",e.url))}else{n(Kne.syntax("Unable to parse %s",e.url))}}a(l,"onError")})}a(uRi,"parseFile");function lRi(e){return e===void 0||typeof e==="object"&&Object.keys(e).length===0||typeof e==="string"&&e.trim().length===0||Buffer.isBuffer(e)&&e.length===0}a(lRi,"isEmpty")});var WQt=y((pXs,KQt)=>{"use strict";var zQt=n9e();KQt.exports=cRi;function cRi(e){var t,r,n,i;e=Array.prototype.slice.call(e);if(typeof e[e.length-1]==="function"){i=e.pop()}if(typeof e[0]==="string"){t=e[0];if(typeof e[2]==="object"){r=e[1];n=e[2]}else{r=void 0;n=e[1]}}else{t="";r=e[0];n=e[1]}if(!(n instanceof zQt)){n=new zQt(n)}return{path:t,schema:r,options:n,callback:i}}a(cRi,"normalizeArgs")});var ZQt=y((mXs,QQt)=>{"use strict";var YQt=b3();var dRi=Iq();var pRi=a9e();var XQt=Lg();QQt.exports=fRi;function fRi(e,t){if(!t.resolve.external){return Promise.resolve()}try{var r=o9e(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(r)}catch(n){return Promise.reject(n)}}a(fRi,"resolveExternal");function o9e(e,t,r,n){var i=[];if(e&&typeof e==="object"){if(YQt.isExternal$Ref(e)){i.push(JQt(e,t,r,n))}else{Object.keys(e).forEach(function(s){var o=dRi.join(t,s);var u=e[s];if(YQt.isExternal$Ref(u)){i.push(JQt(u,o,r,n))}else{i=i.concat(o9e(u,o,r,n))}})}}return i}a(o9e,"crawl");function JQt(e,t,r,n){var i=XQt.resolve(t,e.$ref);var s=XQt.stripHash(i);e=r._$refs[s];if(e){return Promise.resolve(e.value)}return pRi(i,r,n).then(function(o){var u=o9e(o,s+"#",r,n);return Promise.all(u)})}a(JQt,"resolve$Ref")});var rZt=y((gXs,tZt)=>{"use strict";var Wne=b3();var Dq=Iq();var u9e=Lg();tZt.exports=mRi;function mRi(e,t){var r=[];l9e(e,"schema",e.$refs._root$Ref.path+"#","#",0,r,e.$refs,t);hRi(r)}a(mRi,"bundle");function l9e(e,t,r,n,i,s,o,u){var l=t===null?e:e[t];if(l&&typeof l==="object"){if(Wne.isAllowed$Ref(l)){eZt(e,t,r,n,i,s,o,u)}else{var c=Object.keys(l).sort(function(d,p){if(d==="definitions"){return-1}else if(p==="definitions"){return 1}else{return d.length-p.length}});c.forEach(function(d){var p=Dq.join(r,d);var f=Dq.join(n,d);var m=l[d];if(Wne.isAllowed$Ref(m)){eZt(l,d,r,f,i,s,o,u)}else{l9e(l,d,p,f,i,s,o,u)}})}}}a(l9e,"crawl");function eZt(e,t,r,n,i,s,o,u){var l=t===null?e:e[t];var c=u9e.resolve(r,l.$ref);var d=o._resolve(c,u);var p=Dq.parse(n).length;var f=u9e.stripHash(d.path);var m=u9e.getHash(d.path);var h=f!==o._root$Ref.path;var g=Wne.isExtended$Ref(l);i+=d.indirections;var _=gRi(s,e,t);if(_){if(p<_.depth||i<_.indirections){yRi(s,_)}else{return}}s.push({$ref:l,parent:e,key:t,pathFromRoot:n,depth:p,file:f,hash:m,value:d.value,circular:d.circular,extended:g,external:h,indirections:i});l9e(d.value,null,d.path,n,i+1,s,o,u)}a(eZt,"inventory$Ref");function hRi(e){e.sort(function(i,s){if(i.file!==s.file){return i.file<s.file?-1:1}else if(i.hash!==s.hash){return i.hash<s.hash?-1:1}else if(i.circular!==s.circular){return i.circular?-1:1}else if(i.extended!==s.extended){return i.extended?1:-1}else if(i.indirections!==s.indirections){return i.indirections-s.indirections}else if(i.depth!==s.depth){return i.depth-s.depth}else{var o=i.pathFromRoot.lastIndexOf("/definitions");var u=s.pathFromRoot.lastIndexOf("/definitions");if(o!==u){return u-o}else{return i.pathFromRoot.length-s.pathFromRoot.length}}});var t,r,n;e.forEach(function(i){if(!i.external){i.$ref.$ref=i.hash}else if(i.file===t&&i.hash===r){i.$ref.$ref=n}else if(i.file===t&&i.hash.indexOf(r+"/")===0){i.$ref.$ref=Dq.join(n,Dq.parse(i.hash.replace(r,"#")))}else{t=i.file;r=i.hash;n=i.pathFromRoot;i.$ref=i.parent[i.key]=Wne.dereference(i.$ref,i.value);if(i.circular){i.$ref.$ref=i.pathFromRoot}}})}a(hRi,"remap");function gRi(e,t,r){for(var n=0;n<e.length;n++){var i=e[n];if(i.parent===t&&i.key===r){return i}}}a(gRi,"findInInventory");function yRi(e,t){var r=e.indexOf(t);e.splice(r,1)}a(yRi,"removeFromInventory")});var oZt=y((_Xs,aZt)=>{"use strict";var c9e=b3();var nZt=Iq();var _Ri=t_();var vRi=Lg();aZt.exports=ERi;function ERi(e,t){var r=d9e(e.schema,e.$refs._root$Ref.path,"#",[],e.$refs,t);e.$refs.circular=r.circular;e.schema=r.value}a(ERi,"dereference");function d9e(e,t,r,n,i,s){var o;var u={value:e,circular:false};if(e&&typeof e==="object"){n.push(e);if(c9e.isAllowed$Ref(e,s)){o=iZt(e,t,r,n,i,s);u.circular=o.circular;u.value=o.value}else{Object.keys(e).forEach(function(l){var c=nZt.join(t,l);var d=nZt.join(r,l);var p=e[l];var f=false;if(c9e.isAllowed$Ref(p,s)){o=iZt(p,c,d,n,i,s);f=o.circular;e[l]=o.value}else{if(n.indexOf(p)===-1){o=d9e(p,c,d,n,i,s);f=o.circular;e[l]=o.value}else{f=sZt(c,i,s)}}u.circular=u.circular||f})}n.pop()}return u}a(d9e,"crawl");function iZt(e,t,r,n,i,s){var o=vRi.resolve(t,e.$ref);var u=i._resolve(o,s);var l=u.circular;var c=l||n.indexOf(u.value)!==-1;c&&sZt(t,i,s);var d=c9e.dereference(e,u.value);if(!c){var p=d9e(d,u.path,r,n,i,s);c=p.circular;d=p.value}if(c&&!l&&s.dereference.circular==="ignore"){d=e}if(l){d.$ref=r}return{circular:c,value:d}}a(iZt,"dereference$Ref");function sZt(e,t,r){t.circular=true;if(!r.dereference.circular){throw _Ri.reference("Circular $ref pointer found at %s",e)}return true}a(sZt,"foundCircularReference")});var cZt=y((bXs,p9e)=>{"use strict";var EXs=n9e();var lZt=$Qt();var bRi=a9e();var Xne=WQt();var SRi=ZQt();var ARi=rZt();var CRi=oZt();var Yne=Lg();var r_=U4e();var uZt=t_();p9e.exports=n_;p9e.exports.YAML=J8e();function n_(){this.schema=null;this.$refs=new lZt}a(n_,"$RefParser");n_.parse=function(e,t,r,n){var i=this;var s=new i;return s.parse.apply(s,arguments)};n_.prototype.parse=function(e,t,r,n){var i=Xne(arguments);var s;if(!i.path&&!i.schema){var o=uZt("Expected a file path, URL, or object. Got %s",i.path||i.schema);return r_(i.callback,Promise.reject(o))}this.schema=null;this.$refs=new lZt;var u="http";if(Yne.isFileSystemPath(i.path)){i.path=Yne.fromFileSystemPath(i.path);u="file"}i.path=Yne.resolve(Yne.cwd(),i.path);if(i.schema&&typeof i.schema==="object"){var l=this.$refs._add(i.path);l.value=i.schema;l.pathType=u;s=Promise.resolve(i.schema)}else{s=bRi(i.path,this.$refs,i.options)}var c=this;return s.then(function(d){if(!d||typeof d!=="object"||Buffer.isBuffer(d)){throw uZt.syntax('"%s" is not a valid JSON Schema',c.$refs._root$Ref.path||d)}else{c.schema=d;return r_(i.callback,Promise.resolve(c.schema))}}).catch(function(d){return r_(i.callback,Promise.reject(d))})};n_.resolve=function(e,t,r,n){var i=this;var s=new i;return s.resolve.apply(s,arguments)};n_.prototype.resolve=function(e,t,r,n){var i=this;var s=Xne(arguments);return this.parse(s.path,s.schema,s.options).then(function(){return SRi(i,s.options)}).then(function(){return r_(s.callback,Promise.resolve(i.$refs))}).catch(function(o){return r_(s.callback,Promise.reject(o))})};n_.bundle=function(e,t,r,n){var i=this;var s=new i;return s.bundle.apply(s,arguments)};n_.prototype.bundle=function(e,t,r,n){var i=this;var s=Xne(arguments);return this.resolve(s.path,s.schema,s.options).then(function(){ARi(i,s.options);return r_(s.callback,Promise.resolve(i.schema))}).catch(function(o){return r_(s.callback,Promise.reject(o))})};n_.dereference=function(e,t,r,n){var i=this;var s=new i;return s.dereference.apply(s,arguments)};n_.prototype.dereference=function(e,t,r,n){var i=this;var s=Xne(arguments);return this.resolve(s.path,s.schema,s.options).then(function(){CRi(i,s.options);return r_(s.callback,Promise.resolve(i.schema))}).catch(function(o){return r_(s.callback,Promise.reject(o))})}});var xer=y((AXs,F9e)=>{var wRi=Object.create;var nie=Object.defineProperty;var TRi=Object.getOwnPropertyDescriptor;var T9e=Object.getOwnPropertyNames;var xRi=Object.getPrototypeOf;var RRi=Object.prototype.hasOwnProperty;var ri=a((e,t)=>a(function r(){return e&&(t=(0,e[T9e(e)[0]])(e=0)),t},"__init"),"__esm");var mm=a((e,t)=>a(function r(){return t||(0,e[T9e(e)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS");var ORi=a((e,t)=>{for(var r in t)nie(e,r,{get:t[r],enumerable:true})},"__export");var kZt=a((e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of T9e(t))if(!RRi.call(e,i)&&i!==r)nie(e,i,{get:()=>t[i],enumerable:!(n=TRi(t,i))||n.enumerable})}return e},"__copyProps");var x9e=a((e,t,r)=>(r=e!=null?wRi(xRi(e)):{},kZt(t||!e||!e.__esModule?nie(r,"default",{value:e,enumerable:true}):r,e)),"__toESM");var PRi=a(e=>kZt(nie({},"__esModule",{value:true}),e),"__toCommonJS");var f9e;var R9e;var DZt;var O9e=ri({"src/lib/vendor.mjs"(){f9e={};R9e=a(()=>{return f9e},"getDependencies");DZt=a(e=>{Object.assign(f9e,e)},"setDependencies")}});var dZt;var P9e;var LZt=ri({"src/lib/class/Registry.mjs"(){dZt=class{static{a(this,"Registry")}constructor(){this.data={}}unregister(e){if(!e){this.data={}}else{delete this.data[e]}}register(e,t){this.data[e]=t}registerMany(e){Object.keys(e).forEach(t=>{this.data[t]=e[t]})}get(e){const t=this.data[e];return t}list(){return this.data}};P9e=dZt}});var fs;var y9e;var NRi=ri({"src/lib/api/defaults.mjs"(){fs={};y9e=fs;fs.defaultInvalidTypeProduct=void 0;fs.defaultRandExpMax=10;fs.pruneProperties=[];fs.ignoreProperties=[];fs.ignoreMissingRefs=false;fs.failOnInvalidTypes=true;fs.failOnInvalidFormat=true;fs.alwaysFakeOptionals=false;fs.optionalsProbability=null;fs.fixedProbabilities=false;fs.useExamplesValue=false;fs.useDefaultValue=false;fs.requiredOnly=false;fs.omitNulls=false;fs.minItems=0;fs.maxItems=null;fs.minLength=0;fs.maxLength=null;fs.resolveJsonPath=false;fs.reuseProperties=false;fs.fillProperties=true;fs.sortProperties=false;fs.replaceEmptyByRandomValue=false;fs.random=Math.random;fs.minDateTime=new Date("1889-12-31T00:00:00.000Z");fs.maxDateTime=new Date("1970-01-01T00:00:01.000Z");fs.renderTitle=true;fs.renderDescription=true;fs.renderComment=false}});var pZt;var FZt;var IRi=ri({"src/lib/class/OptionRegistry.mjs"(){LZt();NRi();pZt=class extends P9e{static{a(this,"OptionRegistry")}constructor(){super();this.data={...y9e};this._defaults=y9e}get defaults(){return{...this._defaults}}};FZt=pZt}});function fZt(e,t){if(typeof e==="string"){if(typeof t!=="undefined"){return Mq.register(e,t)}return Mq.get(e)}return Mq.registerMany(e)}a(fZt,"optionAPI");var Mq;var on;var Kh=ri({"src/lib/api/option.mjs"(){IRi();Mq=new FZt;fZt.getDefaults=()=>Mq.defaults;on=fZt}});var m9e;var h9e;var mZt;var hZt;var gZt;var yZt;var _Zt;var vZt;var Fg;var $q=ri({"src/lib/core/constants.mjs"(){m9e=["integer","number","string","boolean"];h9e=m9e.concat(["null"]);mZt=["array","object"].concat(h9e);hZt=2524608e6;gZt=-1e8;yZt=1e8;_Zt=-100;vZt=100;Fg={ALLOWED_TYPES:m9e,SCALAR_TYPES:h9e,ALL_TYPES:mZt,MIN_NUMBER:_Zt,MAX_NUMBER:vZt,MIN_INTEGER:gZt,MAX_INTEGER:yZt,MOST_NEAR_DATETIME:hZt}}});var iie=mm({"node_modules/ret/lib/types.js"(e,t){t.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}}});var BZt=mm({"node_modules/ret/lib/sets.js"(e){var t=iie();var r=a(()=>[{type:t.RANGE,from:48,to:57}],"INTS");var n=a(()=>{return[{type:t.CHAR,value:95},{type:t.RANGE,from:97,to:122},{type:t.RANGE,from:65,to:90}].concat(r())},"WORDS");var i=a(()=>{return[{type:t.CHAR,value:9},{type:t.CHAR,value:10},{type:t.CHAR,value:11},{type:t.CHAR,value:12},{type:t.CHAR,value:13},{type:t.CHAR,value:32},{type:t.CHAR,value:160},{type:t.CHAR,value:5760},{type:t.RANGE,from:8192,to:8202},{type:t.CHAR,value:8232},{type:t.CHAR,value:8233},{type:t.CHAR,value:8239},{type:t.CHAR,value:8287},{type:t.CHAR,value:12288},{type:t.CHAR,value:65279}]},"WHITESPACE");var s=a(()=>{return[{type:t.CHAR,value:10},{type:t.CHAR,value:13},{type:t.CHAR,value:8232},{type:t.CHAR,value:8233}]},"NOTANYCHAR");e.words=()=>({type:t.SET,set:n(),not:false});e.notWords=()=>({type:t.SET,set:n(),not:true});e.ints=()=>({type:t.SET,set:r(),not:false});e.notInts=()=>({type:t.SET,set:r(),not:true});e.whitespace=()=>({type:t.SET,set:i(),not:false});e.notWhitespace=()=>({type:t.SET,set:i(),not:true});e.anyChar=()=>({type:t.SET,set:s(),not:true})}});var kRi=mm({"node_modules/ret/lib/util.js"(e){var t=iie();var r=BZt();var n="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?";var i={"0":0,"t":9,"n":10,"v":11,"f":12,"r":13};e.strToChars=function(s){var o=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;s=s.replace(o,function(u,l,c,d,p,f,m,h){if(c){return u}var g=l?8:d?parseInt(d,16):p?parseInt(p,16):f?parseInt(f,8):m?n.indexOf(m):i[h];var _=String.fromCharCode(g);if(/[[\]{}^$.|?*+()]/.test(_)){_="\\"+_}return _});return s};e.tokenizeClass=(s,o)=>{var u=[];var l=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g;var c,d;while((c=l.exec(s))!=null){if(c[1]){u.push(r.words())}else if(c[2]){u.push(r.ints())}else if(c[3]){u.push(r.whitespace())}else if(c[4]){u.push(r.notWords())}else if(c[5]){u.push(r.notInts())}else if(c[6]){u.push(r.notWhitespace())}else if(c[7]){u.push({type:t.RANGE,from:(c[8]||c[9]).charCodeAt(0),to:c[10].charCodeAt(0)})}else if(d=c[12]){u.push({type:t.CHAR,value:d.charCodeAt(0)})}else{return[u,l.lastIndex]}}e.error(o,"Unterminated character class")};e.error=(s,o)=>{throw new SyntaxError("Invalid regular expression: /"+s+"/: "+o)}}});var DRi=mm({"node_modules/ret/lib/positions.js"(e){var t=iie();e.wordBoundary=()=>({type:t.POSITION,value:"b"});e.nonWordBoundary=()=>({type:t.POSITION,value:"B"});e.begin=()=>({type:t.POSITION,value:"^"});e.end=()=>({type:t.POSITION,value:"$"})}});var LRi=mm({"node_modules/ret/lib/index.js"(e,t){var r=kRi();var n=iie();var i=BZt();var s=DRi();t.exports=o=>{var u=0,l,c,d={type:n.ROOT,stack:[]},p=d,f=d.stack,m=[];var h=a(T=>{r.error(o,`Nothing to repeat at column ${T-1}`)},"repeatErr");var g=r.strToChars(o);l=g.length;while(u<l){c=g[u++];switch(c){case"\\":c=g[u++];switch(c){case"b":f.push(s.wordBoundary());break;case"B":f.push(s.nonWordBoundary());break;case"w":f.push(i.words());break;case"W":f.push(i.notWords());break;case"d":f.push(i.ints());break;case"D":f.push(i.notInts());break;case"s":f.push(i.whitespace());break;case"S":f.push(i.notWhitespace());break;default:if(/\d/.test(c)){f.push({type:n.REFERENCE,value:parseInt(c,10)})}else{f.push({type:n.CHAR,value:c.charCodeAt(0)})}}break;case"^":f.push(s.begin());break;case"$":f.push(s.end());break;case"[":var _;if(g[u]==="^"){_=true;u++}else{_=false}var v=r.tokenizeClass(g.slice(u),o);u+=v[1];f.push({type:n.SET,set:v[0],not:_});break;case".":f.push(i.anyChar());break;case"(":var S={type:n.GROUP,stack:[],remember:true};c=g[u];if(c==="?"){c=g[u+1];u+=2;if(c==="="){S.followedBy=true}else if(c==="!"){S.notFollowedBy=true}else if(c!==":"){r.error(o,`Invalid group, character '${c}' after '?' at column ${u-1}`)}S.remember=false}f.push(S);m.push(p);p=S;f=S.stack;break;case")":if(m.length===0){r.error(o,`Unmatched ) at column ${u-1}`)}p=m.pop();f=p.options?p.options[p.options.length-1]:p.stack;break;case"|":if(!p.options){p.options=[p.stack];delete p.stack}var E=[];p.options.push(E);f=E;break;case"{":var b=/^(\d+)(,(\d+)?)?\}/.exec(g.slice(u)),A,C;if(b!==null){if(f.length===0){h(u)}A=parseInt(b[1],10);C=b[2]?b[3]?parseInt(b[3],10):Infinity:A;u+=b[0].length;f.push({type:n.REPETITION,min:A,max:C,value:f.pop()})}else{f.push({type:n.CHAR,value:123})}break;case"?":if(f.length===0){h(u)}f.push({type:n.REPETITION,min:0,max:1,value:f.pop()});break;case"+":if(f.length===0){h(u)}f.push({type:n.REPETITION,min:1,max:Infinity,value:f.pop()});break;case"*":if(f.length===0){h(u)}f.push({type:n.REPETITION,min:0,max:Infinity,value:f.pop()});break;default:f.push({type:n.CHAR,value:c.charCodeAt(0)})}}if(m.length!==0){r.error(o,"Unterminated group")}return d};t.exports.types=n}});var FRi=mm({"node_modules/drange/lib/index.js"(e,t){"use strict";var r=class S3{static{a(this,"_SubRange")}constructor(s,o){this.low=s;this.high=o;this.length=1+o-s}overlaps(s){return!(this.high<s.low||this.low>s.high)}touches(s){return!(this.high+1<s.low||this.low-1>s.high)}add(s){return new S3(Math.min(this.low,s.low),Math.max(this.high,s.high))}subtract(s){if(s.low<=this.low&&s.high>=this.high){return[]}else if(s.low>this.low&&s.high<this.high){return[new S3(this.low,s.low-1),new S3(s.high+1,this.high)]}else if(s.low<=this.low){return[new S3(s.high+1,this.high)]}else{return[new S3(this.low,s.low-1)]}}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}};var n=class Lq{static{a(this,"_DRange")}constructor(s,o){this.ranges=[];this.length=0;if(s!=null)this.add(s,o)}_update_length(){this.length=this.ranges.reduce((s,o)=>{return s+o.length},0)}add(s,o){var u=a(l=>{var c=0;while(c<this.ranges.length&&!l.touches(this.ranges[c])){c++}var d=this.ranges.slice(0,c);while(c<this.ranges.length&&l.touches(this.ranges[c])){l=l.add(this.ranges[c]);c++}d.push(l);this.ranges=d.concat(this.ranges.slice(c));this._update_length()},"_add");if(s instanceof Lq){s.ranges.forEach(u)}else{if(o==null)o=s;u(new r(s,o))}return this}subtract(s,o){var u=a(l=>{var c=0;while(c<this.ranges.length&&!l.overlaps(this.ranges[c])){c++}var d=this.ranges.slice(0,c);while(c<this.ranges.length&&l.overlaps(this.ranges[c])){d=d.concat(this.ranges[c].subtract(l));c++}this.ranges=d.concat(this.ranges.slice(c));this._update_length()},"_subtract");if(s instanceof Lq){s.ranges.forEach(u)}else{if(o==null)o=s;u(new r(s,o))}return this}intersect(s,o){var u=[];var l=a(c=>{var d=0;while(d<this.ranges.length&&!c.overlaps(this.ranges[d])){d++}while(d<this.ranges.length&&c.overlaps(this.ranges[d])){var p=Math.max(this.ranges[d].low,c.low);var f=Math.min(this.ranges[d].high,c.high);u.push(new r(p,f));d++}},"_intersect");if(s instanceof Lq){s.ranges.forEach(l)}else{if(o==null)o=s;l(new r(s,o))}this.ranges=u;this._update_length();return this}index(s){var o=0;while(o<this.ranges.length&&this.ranges[o].length<=s){s-=this.ranges[o].length;o++}return this.ranges[o].low+s}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new Lq(this)}numbers(){return this.ranges.reduce((s,o)=>{var u=o.low;while(u<=o.high){s.push(u);u++}return s},[])}subranges(){return this.ranges.map(s=>({low:s.low,high:s.high,length:1+s.high-s.low}))}};t.exports=n}});var BRi=mm({"node_modules/randexp/lib/randexp.js"(e,t){var r=LRi();var n=FRi();var i=r.types;t.exports=class Fq{static{a(this,"RandExp2")}constructor(o,u){this._setDefaults(o);if(o instanceof RegExp){this.ignoreCase=o.ignoreCase;this.multiline=o.multiline;o=o.source}else if(typeof o==="string"){this.ignoreCase=u&&u.indexOf("i")!==-1;this.multiline=u&&u.indexOf("m")!==-1}else{throw new Error("Expected a regexp or string")}this.tokens=r(o)}_setDefaults(o){this.max=o.max!=null?o.max:Fq.prototype.max!=null?Fq.prototype.max:100;this.defaultRange=o.defaultRange?o.defaultRange:this.defaultRange.clone();if(o.randInt){this.randInt=o.randInt}}gen(){return this._gen(this.tokens,[])}_gen(o,u){var l,c,d,p,f;switch(o.type){case i.ROOT:case i.GROUP:if(o.followedBy||o.notFollowedBy){return""}if(o.remember&&o.groupNumber===void 0){o.groupNumber=u.push(null)-1}l=o.options?this._randSelect(o.options):o.stack;c="";for(p=0,f=l.length;p<f;p++){c+=this._gen(l[p],u)}if(o.remember){u[o.groupNumber]=c}return c;case i.POSITION:return"";case i.SET:var m=this._expand(o);if(!m.length){return""}return String.fromCharCode(this._randSelect(m));case i.REPETITION:d=this.randInt(o.min,o.max===Infinity?o.min+this.max:o.max);c="";for(p=0;p<d;p++){c+=this._gen(o.value,u)}return c;case i.REFERENCE:return u[o.value-1]||"";case i.CHAR:var h=this.ignoreCase&&this._randBool()?this._toOtherCase(o.value):o.value;return String.fromCharCode(h)}}_toOtherCase(o){return o+(97<=o&&o<=122?-32:65<=o&&o<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(o){if(o instanceof n){return o.index(this.randInt(0,o.length-1))}return o[this.randInt(0,o.length-1)]}_expand(o){if(o.type===r.types.CHAR){return new n(o.value)}else if(o.type===r.types.RANGE){return new n(o.from,o.to)}else{let u=new n;for(let l=0;l<o.set.length;l++){let c=this._expand(o.set[l]);u.add(c);if(this.ignoreCase){for(let d=0;d<c.length;d++){let p=c.index(d);let f=this._toOtherCase(p);if(p!==f){u.add(f)}}}}if(o.not){return this.defaultRange.clone().subtract(u)}else{return this.defaultRange.clone().intersect(u)}}}randInt(o,u){return o+Math.floor(Math.random()*(1+u-o))}get defaultRange(){return this._range=this._range||new n(32,126)}set defaultRange(o){this._range=o}static randexp(o,u){var l;if(typeof o==="string"){o=new RegExp(o,u)}if(o._randexp===void 0){l=new Fq(o,u);o._randexp=l}else{l=o._randexp;l._setDefaults(o)}return l.gen()}static sugar(){RegExp.prototype.gen=function(){return Fq.randexp(this)}}}}});function MRi(e,t){e=typeof e==="undefined"?Fg.MIN_INTEGER:e;t=typeof t==="undefined"?Fg.MAX_INTEGER:t;return Math.floor(on("random")()*(t-e+1))+e}a(MRi,"getRandomInteger");function qRi(e){Qne.default.prototype.max=on("defaultRandExpMax");Qne.default.prototype.randInt=(r,n)=>r+Math.floor(on("random")()*(1+(n-r)));const t=new Qne.default(e);return t.gen()}a(qRi,"_randexp");function URi(e){return e[Math.floor(on("random")()*e.length)]}a(URi,"pick");function $Ri(e){let t;let r;let n=e.length;const i=e.slice();for(;n>0;){r=Math.floor(on("random")()*n);n-=1;t=i[n];i[n]=i[r];i[r]=t}return i}a($Ri,"shuffle");function MZt(e,t){return on("random")()*(t-e)+e}a(MZt,"getRandom");function i2(e,t,r,n,i=false){r=typeof r==="undefined"?Fg.MIN_NUMBER:r;n=typeof n==="undefined"?Fg.MAX_NUMBER:n;e=typeof e==="undefined"?r:e;t=typeof t==="undefined"?n:t;if(t<e){t+=e}if(i){return MZt(e,t)}return MRi(e,t)}a(i2,"number");function jRi(e){switch(e){case"seconds":return i2(0,60)*60;case"minutes":return i2(15,50)*612;case"hours":return i2(12,72)*36123;case"days":return i2(7,30)*86412345;case"weeks":return i2(4,52)*604812345;case"months":return i2(2,13)*2592012345;case"years":return i2(1,20)*31104012345;default:break}}a(jRi,"by");function GRi(e){if(e){return jRi(e)}let t=on("minDateTime");let r=on("maxDateTime");if(typeof t==="string"){t=new Date(t)}if(typeof r==="string"){r=new Date(r)}const n=new Date().getTime();if(typeof t==="number"){t=new Date(n+t)}if(typeof r==="number"){r=new Date(n+r)}return new Date(MZt(t.getTime(),r.getTime()))}a(GRi,"date");var Qne;var Wr;var Vd=ri({"src/lib/core/random.mjs"(){Qne=x9e(BRi(),1);Kh();$q();Wr={pick:URi,date:GRi,shuffle:$Ri,number:i2,randexp:qRi}}});function HRi(e,t,r){t=decodeURIComponent(t);if(r&&r[t])return eie(r[t]);const n=t.replace("#/","/").split("/");let i=e.$ref&&r&&r[e.$ref]||e;if(!i&&!n[0]){n[0]=e.$ref.split("#/")[0]}if(r&&t.includes("#/")&&r[n[0]]){i=r[n.shift()]}if(!n[0])n.shift();while(i&&n.length>0){const s=n.shift();if(!i[s]){throw new Error(`Prop not found: ${s} (${t})`)}i=i[s]}return i}a(HRi,"getLocalRef");function EZt(e){return typeof e==="string"&&GZt.test(e)}a(EZt,"isNumeric");function VRi(e){return["number","boolean"].includes(typeof e)}a(VRi,"isScalar");function zRi(e,...t){return t.filter(r=>{return typeof e[r]!=="undefined"}).length>0}a(zRi,"hasProperties");function qZt(e){if(e.includes(" ")){return new Date(e).toISOString().substr(0,10)}let[t,r,n]=e.split("T")[0].split("-");r=`0${Math.max(1,Math.min(12,r))}`.slice(-2);n=`0${Math.max(1,Math.min(31,n))}`.slice(-2);return`${t}-${r}-${n}`}a(qZt,"clampDate");function KRi(e){if(e.includes(" ")){return new Date(e).toISOString().substr(0,10)}const[t,r]=e.split("T");let[n,i,s]=t.split("-");let[o,u,l]=r.substr(0,8).split(":");i=`0${Math.max(1,Math.min(12,i))}`.slice(-2);s=`0${Math.max(1,Math.min(31,s))}`.slice(-2);o=`0${Math.max(1,Math.min(23,o))}`.slice(-2);u=`0${Math.max(1,Math.min(59,u))}`.slice(-2);l=`0${Math.max(1,Math.min(59,l))}`.slice(-2);return`${n}-${i}-${s}T${o}:${u}:${l}.000Z`}a(KRi,"clampDateTime");function WRi(e,t,r){const n={};switch(e||t.type){case"integer":case"number":if(typeof t.minimum!=="undefined"){n.minimum=t.minimum}if(typeof t.maximum!=="undefined"){n.maximum=t.maximum}if(t.enum){let s=Math.max(n.minimum||0,0);let o=Math.min(n.maximum||Infinity,Infinity);if(t.exclusiveMinimum&&s===t.minimum){s+=t.multipleOf||1}if(t.exclusiveMaximum&&o===t.maximum){o-=t.multipleOf||1}if(s||o!==Infinity){t.enum=t.enum.filter(u=>{if(u>=s&&u<=o){return true}return false})}}break;case"string":{n.minLength=on("minLength")||0;n.maxLength=on("maxLength")||Number.MAX_SAFE_INTEGER;if(typeof t.minLength!=="undefined"){n.minLength=Math.max(n.minLength,t.minLength)}if(typeof t.maxLength!=="undefined"){n.maxLength=Math.min(n.maxLength,t.maxLength)}break}default:break}let i=r(n);if(i===null||i===void 0){return null}switch(e||t.type){case"number":i=EZt(i)?parseFloat(i):i;break;case"integer":i=EZt(i)?parseInt(i,10):i;break;case"boolean":i=!!i;break;case"string":{if(VRi(i)){return i}i=String(i);const s=Math.max(n.minLength||0,0);const o=Math.min(n.maxLength||Infinity,Infinity);let u;let l=0;while(i.length<s){u=i;if(!t.pattern){i+=`${Wr.pick([" ","/","_","-","+","=","@","^"])}${i}`}else{i+=Wr.randexp(t.pattern)}if(i===u){l+=1;if(l===3){break}}else{l=0}}if(i.length>o){i=i.substr(0,o)}switch(t.format){case"date-time":case"datetime":i=new Date(KRi(i)).toISOString().replace(/([0-9])0+Z$/,"$1Z");break;case"full-date":case"date":i=new Date(qZt(i)).toISOString().substr(0,10);break;case"time":i=new Date(`1969-01-01 ${i}`).toISOString().substr(11);break;default:break}break}default:break}return i}a(WRi,"typecast");function w3(e,t){Object.keys(t).forEach(r=>{if(typeof t[r]!=="object"||t[r]===null){e[r]=t[r]}else if(Array.isArray(t[r])){e[r]=e[r]||[];t[r].forEach((n,i)=>{if(e.type==="array"&&t.type==="array"){e[r][i]=w3(e[r][i]||{},n,true)}else if(Array.isArray(e[r])&&e[r].indexOf(n)===-1){e[r].push(n)}})}else if(typeof e[r]!=="object"||e[r]===null||Array.isArray(e[r])){e[r]=w3({},t[r])}else{e[r]=w3(e[r],t[r])}});return e}a(w3,"merge");function eie(e,t=new Map){if(!e||typeof e!=="object"){return e}if(t.has(e)){return t.get(e)}if(Array.isArray(e)){const n=[];t.set(e,n);n.push(...e.map(i=>eie(i,t)));return n}const r={};t.set(e,r);return Object.keys(e).reduce((n,i)=>{n[i]=eie(e[i],t);return n},r)}a(eie,"clone");function YRi(e){const t=JSON.stringify(e);const r=JSON.stringify(e,null,2);return t.length>400?`${r.substr(0,400)}...`:r}a(YRi,"short");function UZt(){return Wr.pick([false,true,null,-1,NaN,Math.PI,Infinity,void 0,[],{},Math.random(),Math.random().toString(36).substr(2)])}a(UZt,"anyValue");function XRi(e,t){if(e.enum)return e.enum.includes(t);if(e.const)return e.const===t}a(XRi,"hasValue");function JRi(e,t){const r=w3({},t);if(typeof e.minimum!=="undefined"){r.maximum=e.minimum;r.exclusiveMaximum=true}if(typeof e.maximum!=="undefined"){r.minimum=e.maximum>r.maximum?0:e.maximum;r.exclusiveMinimum=true}if(typeof e.minLength!=="undefined"){r.maxLength=e.minLength}if(typeof e.maxLength!=="undefined"){r.minLength=e.maxLength>r.maxLength?0:e.maxLength}if(e.type){r.type=Wr.pick(Fg.SCALAR_TYPES.filter(n=>{const i=Array.isArray(e.type)?e.type:[e.type];return i.every(s=>{if(n==="number"||n==="integer"){return s!=="number"&&s!=="integer"}return n!==s})}))}else if(e.enum){let n;do{n=UZt()}while(e.enum.indexOf(n)!==-1);r.enum=[n]}if(e.required&&r.properties){e.required.forEach(n=>{delete r.properties[n]})}return r}a(JRi,"notValue");function N9e(e,t){const r=t.minimum!==void 0;const n=t.maximum!==void 0;return(r||n)&&(!r||e>=t.minimum)&&(!n||e<=t.maximum)}a(N9e,"validateValueForSchema");function QRi(e,t){return!t.every(r=>N9e(e,r))}a(QRi,"validate");function ZRi(e,t){const r=t.reduce((n,i)=>n+(N9e(e,i)?1:0),0);return r===1}a(ZRi,"validateValueForOneOf");function eOi(e){return["enum","const","default","examples","required","definitions","items","properties"].includes(e)}a(eOi,"isKey");function tOi(e,t){return Object.keys(e).filter(r=>!t.includes(r)).reduce((r,n)=>{if(Array.isArray(e[n])){r[n]=e[n].slice()}else{r[n]=e[n]instanceof Object?w3({},e[n]):e[n]}return r},{})}a(tOi,"omitProps");function $Zt(e,t){if(Array.isArray(e)){return e.map(r=>$Zt(r,t))}if(typeof e==="string"){e=e.replace(/#\{([\w.-]+)\}/g,(r,n)=>t[n])}return e}a($Zt,"template");function _9e(e){return Object.prototype.toString.call(e)==="[object Object]"&&!Object.keys(e).length}a(_9e,"isEmpty");function jZt(e,t){t=t.items||t;const r=on("alwaysFakeOptionals");const n=Array.isArray(t.required)&&t.required.includes(e)||r;const i=typeof t.thunk==="function"||t.additionalProperties&&typeof t.additionalProperties.thunk==="function";return!n&&!i}a(jZt,"shouldClean");function v9e(e,t,r=false){if(!e||typeof e!=="object"){return e}if(Array.isArray(e)){return e.map(n=>v9e(n,t,true)).filter(n=>typeof n!=="undefined")}Object.keys(e).forEach(n=>{if(_9e(e[n])){if(jZt(n,t)){delete e[n]}}else{let i=t;if(t&&t.properties&&t.properties[n]){i=t.properties[n]}const s=v9e(e[n],i);if(!_9e(s)){e[n]=s}}if(typeof e[n]==="undefined"){delete e[n]}});if(!Object.keys(e).length&&r){return void 0}return e}a(v9e,"clean");var GZt;var ms;var s2=ri({"src/lib/core/utils.mjs"(){Kh();$q();Vd();GZt=/^(0|[1-9][0-9]*)$/;ms={hasProperties:zRi,getLocalRef:HRi,omitProps:tOi,typecast:WRi,merge:w3,clone:eie,short:YRi,hasValue:XRi,notValue:JRi,anyValue:UZt,validate:QRi,validateValueForSchema:N9e,validateValueForOneOf:ZRi,isKey:eOi,template:$Zt,shouldClean:jZt,clean:v9e,isEmpty:_9e,clampDate:qZt}}});function rOi(e){return(t,r,n,i)=>{let s=t;let o=[];if(typeof t==="object"){s=Object.keys(t)[0];if(Array.isArray(t[s])){o=t[s]}else{o.push(t[s])}}const u=s.split(".");let l=e();while(u.length>1){l=l[u.shift()]}t=typeof l==="object"?l[u[0]]:l;if(typeof t==="function"){t=t.apply(l,o.map(c=>ms.template(c,i)))}if(Object.prototype.toString.call(t)==="[object Object]"){Object.keys(t).forEach(c=>{if(typeof t[c]==="function"){throw new Error(`Cannot resolve value for '${n}: ${s}', given: ${t}`)}})}return t}}a(rOi,"proxy");var bZt;var HZt;var nOi=ri({"src/lib/class/Container.mjs"(){s2();bZt=class{static{a(this,"Container")}constructor(){this.registry={};this.support={}}reset(e){if(!e){this.registry={};this.support={}}else{delete this.registry[e];delete this.support[e]}}extend(e,t){this.registry[e]=t(this.registry[e]);if(!this.support[e]){this.support[e]=rOi(()=>this.registry[e])}}define(e,t){this.support[e]=t}get(e){if(typeof this.registry[e]==="undefined"){throw new ReferenceError(`'${e}' dependency doesn't exist.`)}return this.registry[e]}wrap(e){if(!("generate"in e)){const t=Object.keys(e);const r={};let n=t.length;while(n--){const i=t[n].replace(/^x-/,"");const s=this.support[i];if(typeof s==="function"){Object.defineProperty(e,"generate",{configurable:false,enumerable:false,writable:false,value:(o,u)=>s.call(r,e[t[n]],e,t[n],o,u.slice())});break}}}return e}};HZt=bZt}});function iOi(e,t){if(typeof e==="undefined"){return A3.list()}if(typeof e==="string"){if(typeof t==="function"){A3.register(e,t)}else if(t===null||t===false){A3.unregister(e)}else{return A3.get(e)}}else{A3.registerMany(e)}}a(iOi,"formatAPI");var A3;var I9e;var VZt=ri({"src/lib/api/format.mjs"(){LZt();A3=new P9e;I9e=iOi}});var SZt;var tie;var zZt=ri({"src/lib/core/error.mjs"(){SZt=class extends Error{static{a(this,"ParseError")}constructor(e,t){super();if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="ParseError";this.message=e;this.path=t}};tie=SZt}});function sOi(e,t,r){return Object.keys(e).filter(n=>{const i=KZt.indexOf(t)>-1;const s=r.indexOf(n)>-1;if(s&&!i){return true}return false}).length>0}a(sOi,"matchesType");function aOi(e,t){const r=Object.keys(qq);for(let n=0;n<r.length;n+=1){const i=r[n];const s=t[t.length-1];if(sOi(e,s,qq[i])){return i}}}a(aOi,"inferType");var qq;var KZt;var WZt;var oOi=ri({"src/lib/core/infer.mjs"(){qq={array:["additionalItems","items","maxItems","minItems","uniqueItems"],integer:["exclusiveMaximum","exclusiveMinimum","maximum","minimum","multipleOf"],object:["additionalProperties","dependencies","maxProperties","minProperties","patternProperties","properties","required"],string:["maxLength","minLength","pattern","format"]};qq.number=qq.integer;KZt=["additionalItems","items","additionalProperties","dependencies","patternProperties","properties"];WZt=aOi}});function uOi(){return on("random")()>.5}a(uOi,"booleanGenerator");var YZt;var lOi=ri({"src/lib/generators/boolean.mjs"(){Kh();YZt=uOi}});var AZt;var XZt;var cOi=ri({"src/lib/types/boolean.mjs"(){lOi();AZt=YZt;XZt=AZt}});function dOi(){return null}a(dOi,"nullGenerator");var JZt;var pOi=ri({"src/lib/generators/null.mjs"(){JZt=dOi}});var CZt;var QZt;var fOi=ri({"src/lib/types/null.mjs"(){pOi();CZt=JZt;QZt=CZt}});function mOi(e,t,r,n,i,s){const o=[];const u=[];function l(d){const p=JSON.stringify(d.value);if(u.indexOf(p)===-1){u.push(p);o.push(d);return true}return false}a(l,"walk");t.forEach(l);let c=100;while(o.length!==t.length){if(!l(s(r.items||n,e,i))){c-=1}if(!c){break}}return o}a(mOi,"unique");function hOi(e,t,r,n){const i=[];if(!(e.items||e.additionalItems)){if(ms.hasProperties(e,"minItems","maxItems","uniqueItems")){if(e.minItems!==0||e.maxItems!==0){throw new tie(`missing items for ${ms.short(e)}`,t)}}return i}if(Array.isArray(e.items)){return e.items.map((m,h)=>{const g=t.concat(["items",h]);return n(m,g,r)})}let s=e.minItems;let o=e.maxItems;const u=on("minItems");const l=on("maxItems");if(u){s=typeof s==="undefined"?u:Math.min(u,s)}if(l){o=typeof o==="undefined"?l:Math.min(l,o);if(o&&o>l){o=l}if(s&&s>l){s=o}}const c=on("alwaysFakeOptionals")===true?1:on("optionalsProbability");const d=on("alwaysFakeOptionals")||on("fixedProbabilities")||false;let p=Wr.number(s,o,1,5);if(c!==null){p=Math.max(d?Math.round((o||p)*c):Math.abs(Wr.number(s,o)*c),s||0)}const f=typeof e.additionalItems==="object"?e.additionalItems:{};for(let m=i.length;m<p;m+=1){const h=t.concat(["items",m]);const g=n(e.items||f,h,r);i.push(g)}if(e.contains&&p>0){const m=Wr.number(0,p-1);i[m]=n(e.contains,t.concat(["items",m]),r)}if(e.uniqueItems){return mOi(t.concat(["items"]),i,e,f,r,n)}return i}a(hOi,"arrayType");var ZZt;var gOi=ri({"src/lib/types/array.mjs"(){Vd();s2();zZt();Kh();ZZt=hOi}});function yOi(e){let t=typeof e.minimum==="undefined"||e.minimum===-Number.MAX_VALUE?Fg.MIN_INTEGER:e.minimum;let r=typeof e.maximum==="undefined"||e.maximum===Number.MAX_VALUE?Fg.MAX_INTEGER:e.maximum;const n=e.multipleOf;const i=n&&String(n).match(/e-(\d)|\.(\d+)$/);if(i){const s=(Math.random()*Wr.number(0,10)+1)*n;const o=i[1]||i[2].length;const u=parseFloat(s.toFixed(o));const l=Wr.number(t,r-1);if(!String(u).includes(".")){return(l+u).toExponential()}return l+u}if(n){r=Math.floor(r/n)*n;t=Math.ceil(t/n)*n}if(e.exclusiveMinimum&&t===e.minimum){t+=n||1}if(e.exclusiveMaximum&&r===e.maximum){r-=n||1}if(t>r){return NaN}if(n){let s=Wr.number(Math.floor(t/n),Math.floor(r/n))*n;while(s<t){s+=n}return s}return Wr.number(t,r,void 0,void 0,e.type!=="integer")}a(yOi,"numberType");var k9e;var eer=ri({"src/lib/types/number.mjs"(){Vd();$q();k9e=yOi}});function _Oi(e){return Math.floor(k9e({...e}))}a(_Oi,"integerType");var ter;var vOi=ri({"src/lib/types/integer.mjs"(){eer();ter=_Oi}});function EOi(e){const t=Wr.shuffle(rer);return t.slice(0,e)}a(EOi,"wordsGenerator");var rer;var rie;var ner=ri({"src/lib/generators/words.mjs"(){Vd();rer=`Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore
528
528
  et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
529
529
  commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
530
530
  pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est