likec4 1.34.2 → 1.36.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.
@@ -1,32 +1,32 @@
1
1
  #!/usr/bin/env node
2
- import{k as He,o as Dh,q as At,r as Ur,t as ur,s as ua,C as kh,e as xh,d as Bt,u as K,w as la,v as Mh,x as qh,y as at,z as fa,A as Hr,B as Uh,D as Ot,E as Hh,h as da,F as ha,c as Fh,L as rt,j as pa,G as Vh,H as nt,I as zh,J as Gh,n as Bh,K as Wt,M as lr,O as Ps,P as ma,Q as Wh,R as Kh}from"../shared/likec4.B5b4pT-B.mjs";import he,{existsSync as Ct,copyFileSync as ga,readdirSync as Yh,rmSync as Is}from"node:fs";import Se,{hrtime as Xh,cwd as Ns,exit as ya,stdout as Jh,argv as Qh}from"node:process";
3
- import{strictEqual as Zh,notStrictEqual as ep}from"assert";import Ts,{resolve as Fe,dirname as js,normalize as tp,relative as rp,extname as np,basename as sp}from"path";import{statSync as $a,readdirSync as ip,readFileSync as Ls,writeFile as op}from"fs";import _a,{format as va,inspect as ap}from"util";import{fileURLToPath as cp}from"url";import me,{resolve as ge,dirname as Pt,join as fr,relative as gt,extname as dr,isAbsolute as Ds,basename as Fr}from"node:path";import ba,{mkdtemp as Vr,writeFile as It,
4
- mkdir as ct,stat as ks,copyFile as up,rm as lp}from"node:fs/promises";import hr,{tmpdir as zr}from"node:os";import{fileURLToPath as wa}from"node:url";import xs from"@vitejs/plugin-react";import{j as Ea,e as Sa,C as fp,t as Ra,N as Kt,L as Ms,g as dp,a as hp,b as pp}from"../shared/likec4.ButMg-j9.mjs";import{build as pr,createServer as mp,preview as gp}from"vite";import yp from"node:module";import{compareNatural as $p,sortNaturalByFqn as _p,invariant as Gr,hasAtLeast as qs,nonexhaustive as Aa,delay as Oa}from"@likec4/core";
5
- import{chromium as Ca}from"playwright";import vp from"node:net";import{setTimeout as bp}from"node:timers/promises";import{promisify as Ie,isDeepStrictEqual as wp}from"node:util";import mr from"node:crypto";import Ep from"node:assert";import{u as Sp}from"../shared/likec4.BeWJWU7_.mjs";import"tty";import"os";import"crypto";import"net";import"child_process";import"@likec4/core/types";import"events";import"@hpcc-js/wasm-graphviz";import"@likec4/core/model";import"buffer";import"@likec4/core/compute-view";
6
- import"@likec4/core/utils";import"boxen";import"node:child_process";import"node:events";import"node:stream/promises";import"node:readline/promises";import"fs/promises";function Rp(...t){return Sp(Ap,t)}var Ap=t=>`${t[0]?.toUpperCase()??""}${t.slice(1)}`,Us,Pa;function Ia(){return Pa||(Pa=1,Us=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)
7
- if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var o=i[s];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r}),Us}let Hs;function Op(){
8
- try{return he.statSync("/.dockerenv"),!0}catch{return!1}}function Cp(){try{return he.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function Pp(){return Hs===void 0&&(Hs=Op()||Cp()),Hs}let Fs;const Ip=()=>{try{return he.statSync("/run/.containerenv"),!0}catch{return!1}};function ut(){return Fs===void 0&&(Fs=Ip()||Pp()),Fs}const Br=Object.create(null),gr=t=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?Br:globalThis),
9
- yt=new Proxy(Br,{get(t,e){return gr()[e]??Br[e]},has(t,e){const r=gr();return e in r||e in Br},set(t,e,r){const n=gr(!0);return n[e]=r,!0},deleteProperty(t,e){if(!e)return!1;const r=gr(!0);return delete r[e],!0},ownKeys(){const t=gr(!0);return Object.keys(t)}}),Wr=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",Np=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRC\
2
+ import{k as He,o as kh,p as At,q as Ur,t as ur,r as ua,C as xh,e as Mh,d as Bt,u as K,w as la,s as qh,v as Uh,x as at,y as fa,z as Hr,A as Hh,B as Ot,D as Fh,h as da,E as ha,c as Vh,L as rt,j as pa,F as zh,G as nt,H as Gh,I as Bh,n as Wh,J as Wt,K as lr,M as Ps,O as ma,P as Kh,Q as Yh}from"../shared/likec4.DWIqzE5d.mjs";import he,{existsSync as Ct,copyFileSync as ga,readdirSync as Xh,rmSync as Is}from"node:fs";import Se,{hrtime as Jh,cwd as Ns,exit as ya,stdout as Qh,argv as Zh}from"node:process";
3
+ import{strictEqual as ep,notStrictEqual as tp}from"assert";import Ts,{resolve as Fe,dirname as js,normalize as rp,relative as np,extname as sp,basename as ip}from"path";import{statSync as $a,readdirSync as op,readFileSync as Ls,writeFile as ap}from"fs";import _a,{format as va,inspect as cp}from"util";import{fileURLToPath as up}from"url";import me,{resolve as ge,dirname as Pt,join as fr,relative as gt,extname as dr,isAbsolute as Ds,basename as Fr}from"node:path";import ba,{mkdtemp as Vr,writeFile as It,
4
+ mkdir as ct,stat as ks,copyFile as lp,rm as fp}from"node:fs/promises";import hr,{tmpdir as zr}from"node:os";import{fileURLToPath as wa}from"node:url";import xs from"@vitejs/plugin-react";import{j as Ea,e as Sa,C as dp,t as Ra,N as Kt,L as Ms,g as hp,a as pp,b as mp}from"../shared/likec4.D8qlxD_Y.mjs";import{build as pr,createServer as gp,preview as yp}from"vite";import $p from"node:module";import{compareNatural as _p,sortNaturalByFqn as vp,invariant as Gr,hasAtLeast as qs,nonexhaustive as Aa,delay as Oa}from"@likec4/core";
5
+ import{chromium as Ca}from"playwright";import bp from"node:net";import{setTimeout as wp}from"node:timers/promises";import{promisify as Ie,isDeepStrictEqual as Ep}from"node:util";import mr from"node:crypto";import Sp from"node:assert";import{u as Rp}from"../shared/likec4.BeWJWU7_.mjs";import"tty";import"os";import"crypto";import"net";import"child_process";import"@likec4/core/types";import"events";import"@hpcc-js/wasm-graphviz";import"@likec4/core/model";import"buffer";import"@likec4/core/compute-view";
6
+ import"@likec4/core/utils";import"boxen";import"node:child_process";import"node:events";import"node:stream/promises";import"node:readline/promises";import"fs/promises";function Ap(...t){return Rp(Op,t)}var Op=t=>`${t[0]?.toUpperCase()??""}${t.slice(1)}`,Us,Pa;function Ia(){return Pa||(Pa=1,Us=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)
7
+ if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var o=i[s];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r}),Us}let Hs;function Cp(){
8
+ try{return he.statSync("/.dockerenv"),!0}catch{return!1}}function Pp(){try{return he.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function Ip(){return Hs===void 0&&(Hs=Cp()||Pp()),Hs}let Fs;const Np=()=>{try{return he.statSync("/run/.containerenv"),!0}catch{return!1}};function ut(){return Fs===void 0&&(Fs=Np()||Ip()),Fs}const Br=Object.create(null),gr=t=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?Br:globalThis),
9
+ yt=new Proxy(Br,{get(t,e){return gr()[e]??Br[e]},has(t,e){const r=gr();return e in r||e in Br},set(t,e,r){const n=gr(!0);return n[e]=r,!0},deleteProperty(t,e){if(!e)return!1;const r=gr(!0);return delete r[e],!0},ownKeys(){const t=gr(!0);return Object.keys(t)}}),Wr=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",Tp=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRC\
10
10
  LE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CLOUDFLARE_WORKERS","WORKERS_CI",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["\
11
11
  LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],
12
- ["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function Tp(){if(globalThis.process?.env)for(const t of Np){const e=t[1]||t[0];if(globalThis.process?.env[e])return{name:t[0].toLowerCase(),...t[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",
13
- ci:!1}:{name:"",ci:!1}}const Na=Tp();Na.name;function Nt(t){return t?t!=="false":!1}const jp=globalThis.process?.platform||"",Ta=Nt(yt.CI)||Na.ci!==!1,ja=Nt(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);Nt(yt.DEBUG);const Lp=Wr==="test"||Nt(yt.TEST),Dp=Wr==="dev"||Wr==="development",kp=Nt(yt.MINIMAL)||Ta||Lp||!ja,xp=/^win/i.test(jp);!Nt(yt.NO_COLOR)&&(Nt(yt.FORCE_COLOR)||(ja||xp)&&yt.TERM);const Mp=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(Mp?.split("\
14
- .")[0]);const qp=globalThis.process||Object.create(null),La={versions:{}};new Proxy(qp,{get(t,e){if(e==="env")return yt;if(e in t)return t[e];if(e in La)return La[e]}});const Up=globalThis.process?.release?.name==="node",Hp=!!globalThis.Bun||!!globalThis.process?.versions?.bun,Fp=!!globalThis.Deno,Vp=!!globalThis.fastly,zp=!!globalThis.Netlify,Gp=!!globalThis.EdgeRuntime,Bp=globalThis.navigator?.userAgent==="Cloudflare-Workers",Wp=[[zp,"netlify"],[Gp,"edge-light"],[Bp,"workerd"],[Vp,"fastly"],[Fp,
15
- "deno"],[Hp,"bun"],[Up,"node"]];function Kp(){const t=Wp.find(e=>e[0]);if(t)return{name:t[1]}}const Yp=Kp();Yp?.name;const Xp={right:rm,center:nm},Jp=0,Kr=1,Qp=2,Yr=3;class Zp{constructor(e){var r;this.width=e.width,this.wrap=(r=e.wrap)!==null&&r!==void 0?r:!0,this.rows=[]}span(...e){const r=this.div(...e);r.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]=="string")return this.applyLayoutDSL(e[0]);const r=e.map(n=>typeof n==
12
+ ["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function jp(){if(globalThis.process?.env)for(const t of Tp){const e=t[1]||t[0];if(globalThis.process?.env[e])return{name:t[0].toLowerCase(),...t[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",
13
+ ci:!1}:{name:"",ci:!1}}const Na=jp();Na.name;function Nt(t){return t?t!=="false":!1}const Lp=globalThis.process?.platform||"",Ta=Nt(yt.CI)||Na.ci!==!1,ja=Nt(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);Nt(yt.DEBUG);const Dp=Wr==="test"||Nt(yt.TEST),kp=Wr==="dev"||Wr==="development",xp=Nt(yt.MINIMAL)||Ta||Dp||!ja,Mp=/^win/i.test(Lp);!Nt(yt.NO_COLOR)&&(Nt(yt.FORCE_COLOR)||(ja||Mp)&&yt.TERM);const qp=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(qp?.split("\
14
+ .")[0]);const Up=globalThis.process||Object.create(null),La={versions:{}};new Proxy(Up,{get(t,e){if(e==="env")return yt;if(e in t)return t[e];if(e in La)return La[e]}});const Hp=globalThis.process?.release?.name==="node",Fp=!!globalThis.Bun||!!globalThis.process?.versions?.bun,Vp=!!globalThis.Deno,zp=!!globalThis.fastly,Gp=!!globalThis.Netlify,Bp=!!globalThis.EdgeRuntime,Wp=globalThis.navigator?.userAgent==="Cloudflare-Workers",Kp=[[Gp,"netlify"],[Bp,"edge-light"],[Wp,"workerd"],[zp,"fastly"],[Vp,
15
+ "deno"],[Fp,"bun"],[Hp,"node"]];function Yp(){const t=Kp.find(e=>e[0]);if(t)return{name:t[1]}}const Xp=Yp();Xp?.name;const Jp={right:nm,center:sm},Qp=0,Kr=1,Zp=2,Yr=3;class em{constructor(e){var r;this.width=e.width,this.wrap=(r=e.wrap)!==null&&r!==void 0?r:!0,this.rows=[]}span(...e){const r=this.div(...e);r.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]=="string")return this.applyLayoutDSL(e[0]);const r=e.map(n=>typeof n==
16
16
  "string"?this.colFromString(n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]=="string"&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){const r=e.split(`
17
17
  `).map(s=>s.split(" "));let n=0;return r.forEach(s=>{s.length>1&&De.stringWidth(s[0])>n&&(n=Math.min(Math.floor(this.width*.5),De.stringWidth(s[0])))}),r.forEach(s=>{this.div(...s.map((i,o)=>({text:i.trim(),padding:this.measurePadding(i),width:o===0&&s.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){const r=De.stripAnsi(e);return[0,r.match(/\s*$/)[0].length,0,r.match(/^\s*/)[0].length]}toString(){const e=[];return this.
18
18
  rows.forEach(r=>{this.rowToString(r,e)}),e.filter(r=>!r.hidden).map(r=>r.text).join(`
19
- `)}rowToString(e,r){return this.rasterize(e).forEach((n,s)=>{let i="";n.forEach((o,a)=>{const{width:c}=e[a],l=this.negatePadding(e[a]);let u=o;if(l>De.stringWidth(o)&&(u+=" ".repeat(l-De.stringWidth(o))),e[a].align&&e[a].align!=="left"&&this.wrap){const h=Xp[e[a].align];u=h(u,l),De.stringWidth(u)<l&&(u+=" ".repeat((c||0)-De.stringWidth(u)-1))}const f=e[a].padding||[0,0,0,0];f[Yr]&&(i+=" ".repeat(f[Yr])),i+=Da(e[a],u,"| "),i+=u,i+=Da(e[a],u," |"),f[Kr]&&(i+=" ".repeat(f[Kr])),s===0&&r.length>0&&(i=
19
+ `)}rowToString(e,r){return this.rasterize(e).forEach((n,s)=>{let i="";n.forEach((o,a)=>{const{width:c}=e[a],l=this.negatePadding(e[a]);let u=o;if(l>De.stringWidth(o)&&(u+=" ".repeat(l-De.stringWidth(o))),e[a].align&&e[a].align!=="left"&&this.wrap){const h=Jp[e[a].align];u=h(u,l),De.stringWidth(u)<l&&(u+=" ".repeat((c||0)-De.stringWidth(u)-1))}const f=e[a].padding||[0,0,0,0];f[Yr]&&(i+=" ".repeat(f[Yr])),i+=Da(e[a],u,"| "),i+=u,i+=Da(e[a],u," |"),f[Kr]&&(i+=" ".repeat(f[Kr])),s===0&&r.length>0&&(i=
20
20
  this.renderInline(i,r[r.length-1]))}),r.push({text:i.replace(/ +$/,""),span:e.span})}),r}renderInline(e,r){const n=e.match(/^ */),s=n?n[0].length:0,i=r.text,o=De.stringWidth(i.trimRight());return r.span?this.wrap?s<o?e:(r.hidden=!0,i.trimRight()+" ".repeat(s-o)+e.trimLeft()):(r.hidden=!0,i+e):e}rasterize(e){const r=[],n=this.columnWidths(e);let s;return e.forEach((i,o)=>{i.width=n[o],this.wrap?s=De.wrap(i.text,this.negatePadding(i),{hard:!0}).split(`
21
21
  `):s=i.text.split(`
22
- `),i.border&&(s.unshift("."+"-".repeat(this.negatePadding(i)+2)+"."),s.push("'"+"-".repeat(this.negatePadding(i)+2)+"'")),i.padding&&(s.unshift(...new Array(i.padding[Jp]||0).fill("")),s.push(...new Array(i.padding[Qp]||0).fill(""))),s.forEach((a,c)=>{r[c]||r.push([]);const l=r[c];for(let u=0;u<o;u++)l[u]===void 0&&l.push("");l.push(a)})}),r}negatePadding(e){let r=e.width||0;return e.padding&&(r-=(e.padding[Yr]||0)+(e.padding[Kr]||0)),e.border&&(r-=4),r}columnWidths(e){if(!this.wrap)return e.map(
23
- o=>o.width||De.stringWidth(o.text));let r=e.length,n=this.width;const s=e.map(o=>{if(o.width)return r--,n-=o.width,o.width}),i=r?Math.floor(n/r):0;return s.map((o,a)=>o===void 0?Math.max(i,em(e[a])):o)}}function Da(t,e,r){return t.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?r:" ":""}function em(t){const e=t.padding||[],r=1+(e[Yr]||0)+(e[Kr]||0);return t.border?r+4:r}function tm(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function rm(t,e){
24
- t=t.trim();const r=De.stringWidth(t);return r<e?" ".repeat(e-r)+t:t}function nm(t,e){t=t.trim();const r=De.stringWidth(t);return r>=e?t:" ".repeat(e-r>>1)+t}let De;function sm(t,e){return De=e,new Zp({width:t?.width||tm(),wrap:t?.wrap})}const ka=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function xa(t){return t.replace(ka,"")}function im(t,e){const[r,n]=t.match(ka)||["",""];t=xa(t);let s="";for(let i=0;i<t.length;i++)i!==0&&i%e===0&&(s+=
22
+ `),i.border&&(s.unshift("."+"-".repeat(this.negatePadding(i)+2)+"."),s.push("'"+"-".repeat(this.negatePadding(i)+2)+"'")),i.padding&&(s.unshift(...new Array(i.padding[Qp]||0).fill("")),s.push(...new Array(i.padding[Zp]||0).fill(""))),s.forEach((a,c)=>{r[c]||r.push([]);const l=r[c];for(let u=0;u<o;u++)l[u]===void 0&&l.push("");l.push(a)})}),r}negatePadding(e){let r=e.width||0;return e.padding&&(r-=(e.padding[Yr]||0)+(e.padding[Kr]||0)),e.border&&(r-=4),r}columnWidths(e){if(!this.wrap)return e.map(
23
+ o=>o.width||De.stringWidth(o.text));let r=e.length,n=this.width;const s=e.map(o=>{if(o.width)return r--,n-=o.width,o.width}),i=r?Math.floor(n/r):0;return s.map((o,a)=>o===void 0?Math.max(i,tm(e[a])):o)}}function Da(t,e,r){return t.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?r:" ":""}function tm(t){const e=t.padding||[],r=1+(e[Yr]||0)+(e[Kr]||0);return t.border?r+4:r}function rm(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function nm(t,e){
24
+ t=t.trim();const r=De.stringWidth(t);return r<e?" ".repeat(e-r)+t:t}function sm(t,e){t=t.trim();const r=De.stringWidth(t);return r>=e?t:" ".repeat(e-r>>1)+t}let De;function im(t,e){return De=e,new em({width:t?.width||rm(),wrap:t?.wrap})}const ka=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function xa(t){return t.replace(ka,"")}function om(t,e){const[r,n]=t.match(ka)||["",""];t=xa(t);let s="";for(let i=0;i<t.length;i++)i!==0&&i%e===0&&(s+=
25
25
  `
26
- `),s+=t.charAt(i);return r&&n&&(s=`${r}${s}${n}`),s}function om(t){return sm(t,{stringWidth:e=>[...e].length,stripAnsi:xa,wrap:im})}function am(t,e){let r=Fe(".",t),n;for($a(r).isDirectory()||(r=js(r));;){if(n=e(r,ip(r)),n)return Fe(r,n);if(r=js(n=r),n===r)break}}function yr(t){if(t!==t.toLowerCase()&&t!==t.toUpperCase()||(t=t.toLowerCase()),t.indexOf("-")===-1&&t.indexOf("_")===-1)return t;{let r="",n=!1;const s=t.match(/^-+/);for(let i=s?s[0].length:0;i<t.length;i++){let o=t.charAt(i);n&&(n=!1,
27
- o=o.toUpperCase()),i!==0&&(o==="-"||o==="_")?n=!0:o!=="-"&&o!=="_"&&(r+=o)}return r}}function Ma(t,e){const r=t.toLowerCase();e=e||"-";let n="";for(let s=0;s<t.length;s++){const i=r.charAt(s),o=t.charAt(s);i!==o&&s>0?n+=`${e}${r.charAt(s)}`:n+=o}return n}function qa(t){return t==null?!1:typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^0[^.]/.test(t)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function cm(t){if(Array.isArray(t))return t.map(o=>typeof o!="string"?o+"":o);t=t.trim();let e=0,
28
- r=null,n=null,s=null;const i=[];for(let o=0;o<t.length;o++){if(r=n,n=t.charAt(o),n===" "&&!s){r!==" "&&e++;continue}n===s?s=null:(n==="'"||n==='"')&&!s&&(s=n),i[e]||(i[e]=""),i[e]+=n}return i}var Ke;(function(t){t.BOOLEAN="boolean",t.STRING="string",t.NUMBER="number",t.ARRAY="array"})(Ke||(Ke={}));let lt;class um{constructor(e){lt=e}parse(e,r){const n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,
29
- envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),s=cm(e),i=typeof e=="string",o=lm(Object.assign(Object.create(null),n.alias)),a=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"se\
26
+ `),s+=t.charAt(i);return r&&n&&(s=`${r}${s}${n}`),s}function am(t){return im(t,{stringWidth:e=>[...e].length,stripAnsi:xa,wrap:om})}function cm(t,e){let r=Fe(".",t),n;for($a(r).isDirectory()||(r=js(r));;){if(n=e(r,op(r)),n)return Fe(r,n);if(r=js(n=r),n===r)break}}function yr(t){if(t!==t.toLowerCase()&&t!==t.toUpperCase()||(t=t.toLowerCase()),t.indexOf("-")===-1&&t.indexOf("_")===-1)return t;{let r="",n=!1;const s=t.match(/^-+/);for(let i=s?s[0].length:0;i<t.length;i++){let o=t.charAt(i);n&&(n=!1,
27
+ o=o.toUpperCase()),i!==0&&(o==="-"||o==="_")?n=!0:o!=="-"&&o!=="_"&&(r+=o)}return r}}function Ma(t,e){const r=t.toLowerCase();e=e||"-";let n="";for(let s=0;s<t.length;s++){const i=r.charAt(s),o=t.charAt(s);i!==o&&s>0?n+=`${e}${r.charAt(s)}`:n+=o}return n}function qa(t){return t==null?!1:typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^0[^.]/.test(t)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function um(t){if(Array.isArray(t))return t.map(o=>typeof o!="string"?o+"":o);t=t.trim();let e=0,
28
+ r=null,n=null,s=null;const i=[];for(let o=0;o<t.length;o++){if(r=n,n=t.charAt(o),n===" "&&!s){r!==" "&&e++;continue}n===s?s=null:(n==="'"||n==='"')&&!s&&(s=n),i[e]||(i[e]=""),i[e]+=n}return i}var Ke;(function(t){t.BOOLEAN="boolean",t.STRING="string",t.NUMBER="number",t.ARRAY="array"})(Ke||(Ke={}));let lt;class lm{constructor(e){lt=e}parse(e,r){const n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,
29
+ envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),s=um(e),i=typeof e=="string",o=fm(Object.assign(Object.create(null),n.alias)),a=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"se\
30
30
  t-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),c=Object.assign(Object.create(null),n.default),l=n.configObjects||[],u=n.envPrefix,f=a["populate--"],h=f?"--":"_",$=Object.create(null),b=Object.create(null),y=n.__||lt.format,d={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),
31
31
  configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},g=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,p=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(P){const T=typeof P=="object"?P.key:P,ee=Object.keys(P).map(function(W){return{boolean:"bools",string:"strings",number:"numbers"}[W]}).filter(Boolean).pop();ee&&(d[ee][T]=!0),d.arrays[T]=!0,d.keys.push(T)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(P){
32
32
  d.bools[P]=!0,d.keys.push(P)}),[].concat(n.string||[]).filter(Boolean).forEach(function(P){d.strings[P]=!0,d.keys.push(P)}),[].concat(n.number||[]).filter(Boolean).forEach(function(P){d.numbers[P]=!0,d.keys.push(P)}),[].concat(n.count||[]).filter(Boolean).forEach(function(P){d.counts[P]=!0,d.keys.push(P)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(P){d.normalize[P]=!0,d.keys.push(P)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([P,T])=>{typeof T=="number"&&(d.nargs[P]=
@@ -40,7 +40,7 @@ P=F(P,N,s,le):E(N,d.nargs)!==!1?P=I(P,N,s,le):B(N,le),W=!0;break}if(re==="-"){B(
40
40
  rgs-eats-options"])ee.length-(P+1)+z<te&&(m=Error(y("Not enough arguments following: %s",T))),z=te;else{for(N=P+1;N<ee.length&&(!ee[N].match(/^-[^0-9]/)||ee[N].match(g)||Z(ee[N]));N++)z++;z<te&&(m=Error(y("Not enough arguments following: %s",T)))}let re=Math.min(z,te);for(!Q(W)&&re>0&&(B(T,W),re--),N=P+1;N<re+P+1;N++)B(T,ee[N]);return P+re}function F(P,T,ee,W){let N=[],te=W||ee[P+1];const z=E(T,d.nargs);if(E(T,d.bools)&&!/^(true|false)$/.test(te))N.push(!0);else if(Q(te)||Q(W)&&/^-/.test(te)&&!g.
41
41
  test(te)&&!Z(te)){if(c[T]!==void 0){const re=c[T];N=Array.isArray(re)?re:[re]}}else{Q(W)||N.push(M(T,W,!0));for(let re=P+1;re<ee.length&&!(!a["greedy-arrays"]&&N.length>0||z&&typeof z=="number"&&N.length>=z||(te=ee[re],/^-/.test(te)&&!g.test(te)&&!Z(te)));re++)P=re,N.push(M(T,te,i))}return typeof z=="number"&&(z&&N.length<z||isNaN(z)&&N.length===0)&&(m=Error(y("Not enough arguments following: %s",T))),B(T,N),P}function B(P,T,ee=i){if(/-/.test(P)&&a["camel-case-expansion"]){const te=P.split(".").
42
42
  map(function(z){return yr(z)}).join(".");D(P,te)}const W=M(P,T,ee),N=P.split(".");V(v,N,W),d.aliases[P]&&d.aliases[P].forEach(function(te){const z=te.split(".");V(v,z,W)}),N.length>1&&a["dot-notation"]&&(d.aliases[N[0]]||[]).forEach(function(te){let z=te.split(".");const re=[].concat(N);re.shift(),z=z.concat(re),(d.aliases[P]||[]).includes(z.join("."))||V(v,z,W)}),E(P,d.normalize)&&!E(P,d.arrays)&&[P].concat(d.aliases[P]||[]).forEach(function(z){Object.defineProperty(w,z,{enumerable:!0,get(){return T},
43
- set(re){T=typeof re=="string"?lt.normalize(re):re}})})}function D(P,T){d.aliases[P]&&d.aliases[P].length||(d.aliases[P]=[T],$[T]=!0),d.aliases[T]&&d.aliases[T].length||D(T,P)}function M(P,T,ee){ee&&(T=fm(T)),(E(P,d.bools)||E(P,d.counts))&&typeof T=="string"&&(T=T==="true");let W=Array.isArray(T)?T.map(function(N){return j(P,N)}):j(P,T);return E(P,d.counts)&&(Q(W)||typeof W=="boolean")&&(W=Vs()),E(P,d.normalize)&&E(P,d.arrays)&&(Array.isArray(T)?W=T.map(N=>lt.normalize(N)):W=lt.normalize(T)),W}function j(P,T){
43
+ set(re){T=typeof re=="string"?lt.normalize(re):re}})})}function D(P,T){d.aliases[P]&&d.aliases[P].length||(d.aliases[P]=[T],$[T]=!0),d.aliases[T]&&d.aliases[T].length||D(T,P)}function M(P,T,ee){ee&&(T=dm(T)),(E(P,d.bools)||E(P,d.counts))&&typeof T=="string"&&(T=T==="true");let W=Array.isArray(T)?T.map(function(N){return j(P,N)}):j(P,T);return E(P,d.counts)&&(Q(W)||typeof W=="boolean")&&(W=Vs()),E(P,d.normalize)&&E(P,d.arrays)&&(Array.isArray(T)?W=T.map(N=>lt.normalize(N)):W=lt.normalize(T)),W}function j(P,T){
44
44
  return!a["parse-positional-numbers"]&&P==="_"||!E(P,d.strings)&&!E(P,d.bools)&&!Array.isArray(T)&&(qa(T)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${T}`)))||!Q(T)&&E(P,d.numbers))&&(T=Number(T)),T}function k(P){const T=Object.create(null);H(T,d.aliases,c),Object.keys(d.configs).forEach(function(ee){const W=P[ee]||T[ee];if(W)try{let N=null;const te=lt.resolve(lt.cwd(),W),z=d.configs[ee];if(typeof z=="function"){try{N=z(te)}catch(re){N=re}if(N instanceof Error){m=N;return}}else
45
45
  N=lt.require(te);U(N)}catch(N){N.name==="PermissionDenied"?m=N:P[ee]&&(m=Error(y("Invalid JSON config file: %s",W)))}})}function U(P,T){Object.keys(P).forEach(function(ee){const W=P[ee],N=T?T+"."+ee:ee;typeof W=="object"&&W!==null&&!Array.isArray(W)&&a["dot-notation"]?U(W,N):(!A(v,N.split("."))||E(N,d.arrays)&&a["combine-arrays"])&&B(N,W)})}function Y(){typeof l<"u"&&l.forEach(function(P){U(P)})}function G(P,T){if(typeof u>"u")return;const ee=typeof u=="string"?u:"",W=lt.env();Object.keys(W).forEach(
46
46
  function(N){if(ee===""||N.lastIndexOf(ee,0)===0){const te=N.split("__").map(function(z,re){return re===0&&(z=z.substring(ee.length)),yr(z)});(T&&d.configs[te.join(".")]||!T)&&!A(P,te)&&B(te.join("."),W[N])}})}function J(P){let T;const ee=new Set;Object.keys(P).forEach(function(W){if(!ee.has(W)&&(T=E(W,d.coercions),typeof T=="function"))try{const N=j(W,T(P[W]));[].concat(d.aliases[W]||[],W).forEach(te=>{ee.add(te),P[te]=N})}catch(N){m=N}})}function se(P){return d.keys.forEach(T=>{~T.indexOf(".")||
@@ -50,30 +50,30 @@ rays"]?W[N].concat(ee):(Array.isArray(W[N][0])?W[N]:[W[N]]).concat([ee]):!re&&!!
50
50
  push(N),$[N]=!0)}}),d.aliases[ee].concat(ee).forEach(function(W){if(W.length>1&&/[A-Z]/.test(W)&&a["camel-case-expansion"]){const N=Ma(W,"-");N!==ee&&d.aliases[ee].indexOf(N)===-1&&(d.aliases[ee].push(N),$[N]=!0)}}),d.aliases[ee].forEach(function(W){d.aliases[W]=[ee].concat(d.aliases[ee].filter(function(N){return W!==N}))}))})})}function E(P,T){const ee=[].concat(d.aliases[P]||[],P),W=Object.keys(T),N=ee.find(te=>W.includes(te));return N?T[N]:!1}function R(P){const T=Object.keys(d);return[].concat(
51
51
  T.map(W=>d[W])).some(function(W){return Array.isArray(W)?W.includes(P):W[P]})}function C(P,...T){return[].concat(...T).some(function(W){const N=P.match(W);return N&&R(N[1])})}function X(P){if(P.match(g)||!P.match(/^-[^-]+/))return!1;let T=!0,ee;const W=P.slice(1).split("");for(let N=0;N<W.length;N++){if(ee=P.slice(N+2),!R(W[N])){T=!1;break}if(W[N+1]&&W[N+1]==="="||ee==="-"||/[A-Za-z]/.test(W[N])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(ee)||W[N+1]&&W[N+1].match(/\W/))break}return T}function Z(P){return a["\
52
52
  unknown-options-as-args"]&&ie(P)}function ie(P){return P=P.replace(/^-{3,}/,"--"),P.match(g)||X(P)?!1:!C(P,/^-+([^=]+?)=[\s\S]*$/,p,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function oe(P){return!E(P,d.bools)&&!E(P,d.counts)&&`${P}`in c?c[P]:L(q(P))}function L(P){return{[Ke.BOOLEAN]:!0,[Ke.STRING]:"",[Ke.NUMBER]:void 0,[Ke.ARRAY]:[]}[P]}function q(P){let T=Ke.BOOLEAN;return E(P,d.strings)?T=Ke.STRING:E(P,d.numbers)?T=Ke.NUMBER:E(P,d.bools)?T=Ke.BOOLEAN:E(P,d.arrays)&&
53
- (T=Ke.ARRAY),T}function Q(P){return P===void 0}function ne(){Object.keys(d.counts).find(P=>E(P,d.arrays)?(m=Error(y("Invalid configuration: %s, opts.count excludes opts.array.",P)),!0):E(P,d.nargs)?(m=Error(y("Invalid configuration: %s, opts.count excludes opts.narg.",P)),!0):!1)}return{aliases:Object.assign({},d.aliases),argv:Object.assign(w,v),configuration:a,defaulted:Object.assign({},b),error:m,newAliases:Object.assign({},$)}}}function lm(t){const e=[],r=Object.create(null);let n=!0;for(Object.
54
- keys(t).forEach(function(s){e.push([].concat(t[s],s))});n;){n=!1;for(let s=0;s<e.length;s++)for(let i=s+1;i<e.length;i++)if(e[s].filter(function(a){return e[i].indexOf(a)!==-1}).length){e[s]=e[s].concat(e[i]),e.splice(i,1),n=!0;break}}return e.forEach(function(s){s=s.filter(function(o,a,c){return c.indexOf(o)===a});const i=s.pop();i!==void 0&&typeof i=="string"&&(r[i]=s)}),r}function Vs(t){return t!==void 0?t+1:1}function Ua(t){return t==="__proto__"?"___proto___":t}function fm(t){return typeof t==
53
+ (T=Ke.ARRAY),T}function Q(P){return P===void 0}function ne(){Object.keys(d.counts).find(P=>E(P,d.arrays)?(m=Error(y("Invalid configuration: %s, opts.count excludes opts.array.",P)),!0):E(P,d.nargs)?(m=Error(y("Invalid configuration: %s, opts.count excludes opts.narg.",P)),!0):!1)}return{aliases:Object.assign({},d.aliases),argv:Object.assign(w,v),configuration:a,defaulted:Object.assign({},b),error:m,newAliases:Object.assign({},$)}}}function fm(t){const e=[],r=Object.create(null);let n=!0;for(Object.
54
+ keys(t).forEach(function(s){e.push([].concat(t[s],s))});n;){n=!1;for(let s=0;s<e.length;s++)for(let i=s+1;i<e.length;i++)if(e[s].filter(function(a){return e[i].indexOf(a)!==-1}).length){e[s]=e[s].concat(e[i]),e.splice(i,1),n=!0;break}}return e.forEach(function(s){s=s.filter(function(o,a,c){return c.indexOf(o)===a});const i=s.pop();i!==void 0&&typeof i=="string"&&(r[i]=s)}),r}function Vs(t){return t!==void 0?t+1:1}function Ua(t){return t==="__proto__"?"___proto___":t}function dm(t){return typeof t==
55
55
  "string"&&(t[0]==="'"||t[0]==='"')&&t[t.length-1]===t[0]?t.substring(1,t.length-1):t}var zs,Gs,Bs;const Ha=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,Fa=(Gs=(zs=process==null?void 0:process.versions)===null||zs===void 0?void 0:zs.node)!==null&&Gs!==void 0?Gs:(Bs=process==null?void 0:process.version)===null||Bs===void 0?void 0:Bs.slice(1);if(Fa&&Number(Fa.match(/^([^.]+)/)[1])<Ha)throw Error(`yargs parser supports a minimum Node.js versi\
56
- on of ${Ha}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const dm=process?process.env:{},Va=new um({cwd:process.cwd,env:()=>dm,format:va,normalize:tp,resolve:Fe,require:t=>{if(typeof require<"u")return require(t);if(t.match(/\.json$/))return JSON.parse(Ls(t,"utf8"));throw Error("only .json config files are supported in ESM")}}),$r=function(e,r){return Va.parse(e.slice(),r).argv};$r.detailed=function(t,e){return Va.parse(t.slice(),e)},$r.camelCase=
57
- yr,$r.decamelize=Ma,$r.looksLikeNumber=qa;function za(){return hm()?0:1}function hm(){return pm()&&!process.defaultApp}function pm(){return!!process.versions.electron}function mm(t){return t.slice(za()+1)}function gm(){return process.argv[za()]}class Oe extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,Oe)}}const ym={fs:{readFileSync:Ls,writeFile:op},format:va,resolve:Fe,exists:t=>{try{return $a(t).isFile()}catch{return!1}}};
58
- let Ye;class $m{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);const r=e.shift();let n=function(){};return typeof e[e.length-1]=="function"&&(n=e.pop()),n=n||
56
+ on of ${Ha}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const hm=process?process.env:{},Va=new lm({cwd:process.cwd,env:()=>hm,format:va,normalize:rp,resolve:Fe,require:t=>{if(typeof require<"u")return require(t);if(t.match(/\.json$/))return JSON.parse(Ls(t,"utf8"));throw Error("only .json config files are supported in ESM")}}),$r=function(e,r){return Va.parse(e.slice(),r).argv};$r.detailed=function(t,e){return Va.parse(t.slice(),e)},$r.camelCase=
57
+ yr,$r.decamelize=Ma,$r.looksLikeNumber=qa;function za(){return pm()?0:1}function pm(){return mm()&&!process.defaultApp}function mm(){return!!process.versions.electron}function gm(t){return t.slice(za()+1)}function ym(){return process.argv[za()]}class Oe extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,Oe)}}const $m={fs:{readFileSync:Ls,writeFile:ap},format:va,resolve:Fe,exists:t=>{try{return $a(t).isFile()}catch{return!1}}};
58
+ let Ye;class _m{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);const r=e.shift();let n=function(){};return typeof e[e.length-1]=="function"&&(n=e.pop()),n=n||
59
59
  function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),Ye.format.apply(Ye.format,[this.cache[this.locale][r]||r].concat(e))}__n(){const e=Array.prototype.slice.call(arguments),r=e.shift(),n=e.shift(),s=e.shift();let i=function(){};typeof e[e.length-1]=="function"&&(i=e.pop()),this.cache[this.locale]||this._readLocaleFile();let o=s===1?r:n;this.
60
60
  cache[this.locale][r]&&(o=this.cache[this.locale][r][s===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:i})):i();const a=[o];return~o.indexOf("%d")&&a.push(s),Ye.format.apply(Ye.format,a.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(const r in e)Object.prototype.hasOwnProperty.call(
61
61
  e,r)&&(this.cache[this.locale][r]=e[r])}_taggedLiteral(e,...r){let n="";return e.forEach(function(s,i){const o=r[i+1];n+=s,typeof o<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){const e=this,r=this.writeQueue[0],n=r.directory,s=r.locale,i=r.cb,o=this._resolveLocaleFile(n,s),a=JSON.stringify(this.cache[s],null,2);Ye.fs.writeFile(o,a,"utf-8",function(c){e.writeQueue.
62
62
  shift(),e.writeQueue.length>0&&e._processWriteQueue(),i(c)})}_readLocaleFile(){let e={};const r=this._resolveLocaleFile(this.directory,this.locale);try{Ye.fs.readFileSync&&(e=JSON.parse(Ye.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,r){let n=Ye.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){const s=Ye.resolve(
63
- e,"./",r.split("_")[0]+".json");this._fileExistsSync(s)&&(n=s)}return n}_fileExistsSync(e){return Ye.exists(e)}}function _m(t,e){Ye=e;const r=new $m(t);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}const vm=t=>_m(t,ym),bm="require is not supported by ESM",Ga="loading a directory of commands is not supported yet for ESM";let _r;try{_r=cp(import.meta.url)}catch{_r=process.cwd()}const wm=_r.substring(
64
- 0,_r.lastIndexOf("node_modules")),Em={assert:{notStrictEqual:ep,strictEqual:Zh},cliui:om,findUp:am,getEnv:t=>process.env[t],inspect:ap,getCallerFile:()=>{throw new Oe(Ga)},getProcessArgvBin:gm,mainFilename:wm||process.cwd(),Parser:$r,path:{basename:sp,dirname:js,extname:np,relative:rp,resolve:Fe},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<
65
- "u"?process.stdout.columns:null},readFileSync:Ls,require:()=>{throw new Oe(bm)},requireDirectory:()=>{throw new Oe(Ga)},stringWidth:t=>[...t].length,y18n:vm({directory:Fe(_r,"../../../locales"),updateFiles:!1})};function Xe(t,e,r,n){r.assert.notStrictEqual(t,e,n)}function Ba(t,e){e.assert.strictEqual(typeof t,"string")}function Xr(t){return Object.keys(t)}function Ae(t){return!!t&&!!t.then&&typeof t.then=="function"}function vr(t){const r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,
66
- s=r.shift();if(!s)throw new Error(`No command found in: ${t}`);const i={cmd:s.replace(n,""),demanded:[],optional:[]};return r.forEach((o,a)=>{let c=!1;o=o.replace(/\s/g,""),/\.+[\]>]/.test(o)&&a===r.length-1&&(c=!0),/^\[/.test(o)?i.optional.push({cmd:o.replace(n,"").split("|"),variadic:c}):i.demanded.push({cmd:o.replace(n,"").split("|"),variadic:c})}),i}const Sm=["first","second","third","fourth","fifth","sixth"];function ce(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},
63
+ e,"./",r.split("_")[0]+".json");this._fileExistsSync(s)&&(n=s)}return n}_fileExistsSync(e){return Ye.exists(e)}}function vm(t,e){Ye=e;const r=new _m(t);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}const bm=t=>vm(t,$m),wm="require is not supported by ESM",Ga="loading a directory of commands is not supported yet for ESM";let _r;try{_r=up(import.meta.url)}catch{_r=process.cwd()}const Em=_r.substring(
64
+ 0,_r.lastIndexOf("node_modules")),Sm={assert:{notStrictEqual:tp,strictEqual:ep},cliui:am,findUp:cm,getEnv:t=>process.env[t],inspect:cp,getCallerFile:()=>{throw new Oe(Ga)},getProcessArgvBin:ym,mainFilename:Em||process.cwd(),Parser:$r,path:{basename:ip,dirname:js,extname:sp,relative:np,resolve:Fe},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<
65
+ "u"?process.stdout.columns:null},readFileSync:Ls,require:()=>{throw new Oe(wm)},requireDirectory:()=>{throw new Oe(Ga)},stringWidth:t=>[...t].length,y18n:bm({directory:Fe(_r,"../../../locales"),updateFiles:!1})};function Xe(t,e,r,n){r.assert.notStrictEqual(t,e,n)}function Ba(t,e){e.assert.strictEqual(typeof t,"string")}function Xr(t){return Object.keys(t)}function Ae(t){return!!t&&!!t.then&&typeof t.then=="function"}function vr(t){const r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,
66
+ s=r.shift();if(!s)throw new Error(`No command found in: ${t}`);const i={cmd:s.replace(n,""),demanded:[],optional:[]};return r.forEach((o,a)=>{let c=!1;o=o.replace(/\s/g,""),/\.+[\]>]/.test(o)&&a===r.length-1&&(c=!0),/^\[/.test(o)?i.optional.push({cmd:o.replace(n,"").split("|"),variadic:c}):i.demanded.push({cmd:o.replace(n,"").split("|"),variadic:c})}),i}const Rm=["first","second","third","fourth","fifth","sixth"];function ce(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},
67
67
  t,e]:[vr(`cmd ${t}`),e,r]}try{let s=0;const[i,o,a]=n(),c=[].slice.call(o);for(;c.length&&c[c.length-1]===void 0;)c.pop();const l=a||c.length;if(l<i.demanded.length)throw new Oe(`Not enough arguments provided. Expected ${i.demanded.length} but received ${c.length}.`);const u=i.demanded.length+i.optional.length;if(l>u)throw new Oe(`Too many arguments provided. Expected max ${u} but received ${l}.`);i.demanded.forEach(f=>{const h=c.shift(),$=Wa(h);f.cmd.filter(y=>y===$||y==="*").length===0&&Ka($,f.
68
- cmd,s),s+=1}),i.optional.forEach(f=>{if(c.length===0)return;const h=c.shift(),$=Wa(h);f.cmd.filter(y=>y===$||y==="*").length===0&&Ka($,f.cmd,s),s+=1})}catch(s){console.warn(s.stack)}}function Wa(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function Ka(t,e,r){throw new Oe(`Invalid ${Sm[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}class Rm{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,s=!1){if(ce("<array|funct\
68
+ cmd,s),s+=1}),i.optional.forEach(f=>{if(c.length===0)return;const h=c.shift(),$=Wa(h);f.cmd.filter(y=>y===$||y==="*").length===0&&Ka($,f.cmd,s),s+=1})}catch(s){console.warn(s.stack)}}function Wa(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function Ka(t,e,r){throw new Oe(`Invalid ${Rm[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}class Am{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,s=!1){if(ce("<array|funct\
69
69
  ion> [boolean] [boolean] [boolean]",[e,r,n],arguments.length),Array.isArray(e)){for(let i=0;i<e.length;i++){if(typeof e[i]!="function")throw Error("middleware must be a function");const o=e[i];o.applyBeforeValidation=r,o.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){const i=e;i.applyBeforeValidation=r,i.global=n,i.mutates=s,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,r){const n=this.yargs.getAliases();return this.globalMiddleware=
70
- this.globalMiddleware.filter(s=>{const i=[...n[r]||[],r];return s.option?!i.includes(s.option):!0}),e.option=r,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){const e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}}function Am(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}function br(t,e,r,n){return r.reduce((s,i)=>{
71
- if(i.applyBeforeValidation!==n)return s;if(i.mutates){if(i.applied)return s;i.applied=!0}if(Ae(s))return s.then(o=>Promise.all([o,i(o,e)])).then(([o,a])=>Object.assign(o,a));{const o=i(s,e);return Ae(o)?o.then(a=>Object.assign(s,a)):Object.assign(s,o)}},t)}function wr(t,e,r=n=>{throw n}){try{const n=Om(t)?t():t;return Ae(n)?n.then(s=>e(s)):e(n)}catch(n){return r(n)}}function Om(t){return typeof t=="function"}function Cm(t){if(typeof require>"u")return null;for(let e=0,r=Object.keys(require.cache),
72
- n;e<r.length;e++)if(n=require.cache[r[e]],n.exports===t)return n;return null}const Yt=/(^\*)|(^\$0)/;class Pm{constructor(e,r,n,s){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=s,this.usage=e,this.globalMiddleware=n,this.validation=r}addDirectory(e,r,n,s){s=s||{},typeof s.recurse!="boolean"&&(s.recurse=!1),Array.isArray(s.extensions)||(s.extensions=["js"]);const i=typeof s.visit=="function"?s.visit:o=>o;s.visit=(o,a,c)=>{const l=i(o,a,c);if(l){if(this.requireCache.
73
- has(a))return l;this.requireCache.add(a),this.addHandler(l)}return l},this.shim.requireDirectory({require:r,filename:n},e,s)}addHandler(e,r,n,s,i,o){let a=[];const c=Am(i);if(s=s||(()=>{}),Array.isArray(e))if(Nm(e))[e,...a]=e;else for(const l of e)this.addHandler(l);else if(jm(e)){let l=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(l=[].concat(l).concat(e.aliases)),this.addHandler(l,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);
70
+ this.globalMiddleware.filter(s=>{const i=[...n[r]||[],r];return s.option?!i.includes(s.option):!0}),e.option=r,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){const e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}}function Om(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}function br(t,e,r,n){return r.reduce((s,i)=>{
71
+ if(i.applyBeforeValidation!==n)return s;if(i.mutates){if(i.applied)return s;i.applied=!0}if(Ae(s))return s.then(o=>Promise.all([o,i(o,e)])).then(([o,a])=>Object.assign(o,a));{const o=i(s,e);return Ae(o)?o.then(a=>Object.assign(s,a)):Object.assign(s,o)}},t)}function wr(t,e,r=n=>{throw n}){try{const n=Cm(t)?t():t;return Ae(n)?n.then(s=>e(s)):e(n)}catch(n){return r(n)}}function Cm(t){return typeof t=="function"}function Pm(t){if(typeof require>"u")return null;for(let e=0,r=Object.keys(require.cache),
72
+ n;e<r.length;e++)if(n=require.cache[r[e]],n.exports===t)return n;return null}const Yt=/(^\*)|(^\$0)/;class Im{constructor(e,r,n,s){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=s,this.usage=e,this.globalMiddleware=n,this.validation=r}addDirectory(e,r,n,s){s=s||{},typeof s.recurse!="boolean"&&(s.recurse=!1),Array.isArray(s.extensions)||(s.extensions=["js"]);const i=typeof s.visit=="function"?s.visit:o=>o;s.visit=(o,a,c)=>{const l=i(o,a,c);if(l){if(this.requireCache.
73
+ has(a))return l;this.requireCache.add(a),this.addHandler(l)}return l},this.shim.requireDirectory({require:r,filename:n},e,s)}addHandler(e,r,n,s,i,o){let a=[];const c=Om(i);if(s=s||(()=>{}),Array.isArray(e))if(Tm(e))[e,...a]=e;else for(const l of e)this.addHandler(l);else if(Lm(e)){let l=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(l=[].concat(l).concat(e.aliases)),this.addHandler(l,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);
74
74
  return}else if(Ya(n)){this.addHandler([e].concat(a),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){const l=vr(e);a=a.map(h=>vr(h).cmd);let u=!1;const f=[l.cmd].concat(a).filter(h=>Yt.test(h)?(u=!0,!1):!0);f.length===0&&u&&f.push("$0"),u&&(l.cmd=f[0],a=f.slice(1),e=e.replace(Yt,l.cmd)),a.forEach(h=>{this.aliasMap[h]=l.cmd}),r!==!1&&this.usage.command(e,r,u,a,o),this.handlers[l.cmd]={original:e,description:r,handler:s,builder:n||{},middlewares:c,deprecated:o,demanded:l.
75
75
  demanded,optional:l.optional},u&&(this.defaultCommand=this.handlers[l.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,r,n,s,i,o){const a=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,c=r.getInternalMethods().getContext(),l=c.commands.slice(),u=!e;e&&(c.commands.push(e),c.fullCommands.push(a.original));const f=this.applyBuilderUpdateUsageAndParse(
76
- u,a,r,n.aliases,l,s,i,o);return Ae(f)?f.then(h=>this.applyMiddlewareAndGetResult(u,a,h.innerArgv,c,i,h.aliases,r)):this.applyMiddlewareAndGetResult(u,a,f.innerArgv,c,i,f.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,s,i,o,a,c){const l=r.builder;let u=n;if(Ws(l)){n.getInternalMethods().getUsageInstance().freeze();const f=l(n.getInternalMethods().reset(s),c);if(Ae(f))return f.then(h=>(u=Ym(h)?h:n,this.parseAndUpdateUsage(e,r,u,i,o,a)))}else Tm(l)&&(n.getInternalMethods().getUsageInstance().freeze(),
76
+ u,a,r,n.aliases,l,s,i,o);return Ae(f)?f.then(h=>this.applyMiddlewareAndGetResult(u,a,h.innerArgv,c,i,h.aliases,r)):this.applyMiddlewareAndGetResult(u,a,f.innerArgv,c,i,f.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,s,i,o,a,c){const l=r.builder;let u=n;if(Ws(l)){n.getInternalMethods().getUsageInstance().freeze();const f=l(n.getInternalMethods().reset(s),c);if(Ae(f))return f.then(h=>(u=Xm(h)?h:n,this.parseAndUpdateUsage(e,r,u,i,o,a)))}else jm(l)&&(n.getInternalMethods().getUsageInstance().freeze(),
77
77
  u=n.getInternalMethods().reset(s),Object.keys(r.builder).forEach(f=>{u.option(f,l[f])}));return this.parseAndUpdateUsage(e,r,u,i,o,a)}parseAndUpdateUsage(e,r,n,s,i,o){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(s,r),r.description);const a=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,i,o);return Ae(a)?a.then(c=>({aliases:n.parsed.aliases,innerArgv:c})):
78
78
  {aliases:n.parsed.aliases,innerArgv:a}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,r){const n=Yt.test(r.original)?r.original.replace(Yt,"").trim():r.original,s=e.filter(i=>!Yt.test(i));return s.push(n),`$0 ${s.join(" ")}`}handleValidationAndGetResult(e,r,n,s,i,o,a,c){if(!o.getInternalMethods().getHasOutput()){const l=o.getInternalMethods().runValidation(
79
79
  i,c,o.parsed.error,e);n=wr(n,u=>(l(u),u))}if(r.handler&&!o.getInternalMethods().getHasOutput()){o.getInternalMethods().setHasOutput();const l=!!o.getOptions().configuration["populate--"];o.getInternalMethods().postProcess(n,l,!1,!1),n=br(n,o,a,!1),n=wr(n,u=>{const f=r.handler(u);return Ae(f)?f.then(()=>u):u}),e||o.getInternalMethods().getUsageInstance().cacheHelpMessage(),Ae(n)&&!o.getInternalMethods().hasParseCallback()&&n.catch(u=>{try{o.getInternalMethods().getUsageInstance().fail(null,u)}catch{}})}
@@ -83,10 +83,10 @@ alias:{},demand:{}},n=vr(e);return n.demanded.forEach(s=>{const[i,...o]=s.cmd;s.
83
83
  {};const o=[];if(Object.keys(r).forEach(l=>{r[l].map(u=>{i.configuration["unknown-options-as-args"]&&(i.key[l]=!0),o.push(`--${l}`),o.push(u)})}),!o.length)return;const a=Object.assign({},i.configuration,{"populate--":!1}),c=this.shim.Parser.detailed(o,Object.assign({},i,{configuration:a}));if(c.error)s.getInternalMethods().getUsageInstance().fail(c.error.message,c.error);else{const l=Object.keys(r);Object.keys(r).forEach(u=>{l.push(...c.aliases[u])}),Object.keys(c.argv).forEach(u=>{l.includes(u)&&
84
84
  (r[u]||(r[u]=c.argv[u]),!this.isInConfigs(s,u)&&!this.isDefaulted(s,u)&&Object.prototype.hasOwnProperty.call(e,u)&&Object.prototype.hasOwnProperty.call(c.argv,u)&&(Array.isArray(e[u])||Array.isArray(c.argv[u]))?e[u]=[].concat(e[u],c.argv[u]):e[u]=c.argv[u])})}}isDefaulted(e,r){const{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(e,r){const{configObjects:n}=e.getOptions();return n.some(s=>Object.
85
85
  prototype.hasOwnProperty.call(s,r))||n.some(s=>Object.prototype.hasOwnProperty.call(s,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){const n=Yt.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}const r=this.defaultCommand.builder;if(Ws(r))return r(e,!0);Ya(r)||Object.keys(r).forEach(
86
- n=>{e.option(n,r[n])})}moduleName(e){const r=Cm(e);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(r.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:r,desc:n}){for(const s of[e,r,n]){if(typeof s=="string"||s===!1)return s;Xe(s,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){
87
- const e=this.frozens.pop();Xe(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}}function Im(t,e,r,n){return new Pm(t,e,r,n)}function Ya(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function Nm(t){return t.every(e=>typeof e=="string")}function Ws(t){return typeof t=="function"}function Tm(t){return typeof t=="\
88
- object"}function jm(t){return typeof t=="object"&&!Array.isArray(t)}function Er(t={},e=()=>!0){const r={};return Xr(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}function Sr(t){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{const r=e;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(t)})}function Lm(t){return typeof t=="boolean"}function Dm(t,e){const r=e.y18n.__,n={},s=[];n.failFn=function(M){s.push(M)};let i=null,o=null,a=!0;n.showHelpOnFail=function(M=!0,j){
89
- const[k,U]=typeof M=="string"?[!0,M]:[M,j];return t.getInternalMethods().isGlobalContext()&&(o=U),i=U,a=k,n};let c=!1;n.fail=function(M,j){const k=t.getInternalMethods().getLoggerInstance();if(s.length)for(let U=s.length-1;U>=0;--U){const Y=s[U];if(Lm(Y)){if(j)throw j;if(M)throw Error(M)}else Y(M,j,n)}else{if(t.getExitProcess()&&Sr(!0),!c){c=!0,a&&(t.showHelp("error"),k.error()),(M||j)&&k.error(M||j);const U=i||o;U&&((M||j)&&k.error(""),k.error(U))}if(j=j||new Oe(M),t.getExitProcess())return t.exit(
86
+ n=>{e.option(n,r[n])})}moduleName(e){const r=Pm(e);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(r.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:r,desc:n}){for(const s of[e,r,n]){if(typeof s=="string"||s===!1)return s;Xe(s,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){
87
+ const e=this.frozens.pop();Xe(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}}function Nm(t,e,r,n){return new Im(t,e,r,n)}function Ya(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function Tm(t){return t.every(e=>typeof e=="string")}function Ws(t){return typeof t=="function"}function jm(t){return typeof t=="\
88
+ object"}function Lm(t){return typeof t=="object"&&!Array.isArray(t)}function Er(t={},e=()=>!0){const r={};return Xr(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}function Sr(t){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{const r=e;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(t)})}function Dm(t){return typeof t=="boolean"}function km(t,e){const r=e.y18n.__,n={},s=[];n.failFn=function(M){s.push(M)};let i=null,o=null,a=!0;n.showHelpOnFail=function(M=!0,j){
89
+ const[k,U]=typeof M=="string"?[!0,M]:[M,j];return t.getInternalMethods().isGlobalContext()&&(o=U),i=U,a=k,n};let c=!1;n.fail=function(M,j){const k=t.getInternalMethods().getLoggerInstance();if(s.length)for(let U=s.length-1;U>=0;--U){const Y=s[U];if(Dm(Y)){if(j)throw j;if(M)throw Error(M)}else Y(M,j,n)}else{if(t.getExitProcess()&&Sr(!0),!c){c=!0,a&&(t.showHelp("error"),k.error()),(M||j)&&k.error(M||j);const U=i||o;U&&((M||j)&&k.error(""),k.error(U))}if(j=j||new Oe(M),t.getExitProcess())return t.exit(
90
90
  1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,j);throw j}};let l=[],u=!1;n.usage=(D,M)=>D===null?(u=!0,l=[],n):(u=!1,l.push([D,M||""]),n),n.getUsage=()=>l,n.getUsageDisabled=()=>u,n.getPositionalGroupName=()=>r("Positionals:");let f=[];n.example=(D,M)=>{f.push([D,M||""])};let h=[];n.command=function(M,j,k,U,Y=!1){k&&(h=h.map(G=>(G[2]=!1,G))),h.push([M,j||"",k,U,Y])},n.getCommands=()=>h;let $={};n.describe=function(M,j){Array.isArray(M)?M.forEach(k=>{n.describe(k,j)}):typeof M==
91
91
  "object"?Object.keys(M).forEach(k=>{n.describe(k,M[k])}):$[M]=j},n.getDescriptions=()=>$;let b=[];n.epilog=D=>{b.push(D)};let y=!1,d;n.wrap=D=>{y=!0,d=D},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(y||(d=I(),y=!0),d);const g="__yargsString__:";n.deferY18nLookup=D=>g+D,n.help=function(){if(_)return _;m();const M=t.customScriptName?t.$0:e.path.basename(t.$0),j=t.getDemandedOptions(),k=t.getDemandedCommands(),U=t.getDeprecatedOptions(),Y=t.getGroups(),G=t.getOptions();let J=[];J=J.concat(Object.
92
92
  keys($)),J=J.concat(Object.keys(j)),J=J.concat(Object.keys(k)),J=J.concat(Object.keys(G.default)),J=J.filter(w),J=Object.keys(J.reduce((C,X)=>(X!=="_"&&(C[X]=!0),C),{}));const se=n.getWrap(),H=e.cliui({width:se,wrap:!!se});if(!u){if(l.length)l.forEach(C=>{H.div({text:`${C[0].replace(/\$0/g,M)}`}),C[1]&&H.div({text:`${C[1]}`,padding:[1,0,0,0]})}),H.div();else if(h.length){let C=null;k._?C=`${M} <${r("command")}>
@@ -94,7 +94,7 @@ keys($)),J=J.concat(Object.keys(j)),J=J.concat(Object.keys(k)),J=J.concat(Object
94
94
  `,H.div(`${C}`)}}if(h.length>1||h.length===1&&!h[0][2]){H.div(r("Commands:"));const C=t.getInternalMethods().getContext(),X=C.commands.length?`${C.commands.join(" ")} `:"";t.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(h=h.sort((ie,oe)=>ie[0].localeCompare(oe[0])));const Z=M?`${M} `:"";h.forEach(ie=>{const oe=`${Z}${X}${ie[0].replace(/^\$0 ?/,"")}`;H.span({text:oe,padding:[0,2,0,2],width:p(h,se,`${M}${X}`)+4},{text:ie[1]});const L=[];ie[2]&&L.push(`[${r("default")}]`),ie[3]&&
95
95
  ie[3].length&&L.push(`[${r("aliases:")} ${ie[3].join(", ")}]`),ie[4]&&(typeof ie[4]=="string"?L.push(`[${r("deprecated: %s",ie[4])}]`):L.push(`[${r("deprecated")}]`)),L.length?H.div({text:L.join(" "),padding:[0,0,0,2],align:"right"}):H.div()}),H.div()}const A=(Object.keys(G.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);J=J.filter(C=>!t.parsed.newAliases[C]&&A.every(X=>(G.alias[X]||[]).indexOf(C)===-1));const V=r("Options:");Y[V]||(Y[V]=[]),v(J,G.alias,Y,V);const x=C=>/^--/.test(Jr(C)),
96
96
  E=Object.keys(Y).filter(C=>Y[C].length>0).map(C=>{const X=Y[C].filter(w).map(Z=>{if(A.includes(Z))return Z;for(let ie=0,oe;(oe=A[ie])!==void 0;ie++)if((G.alias[oe]||[]).includes(Z))return oe;return Z});return{groupName:C,normalizedKeys:X}}).filter(({normalizedKeys:C})=>C.length>0).map(({groupName:C,normalizedKeys:X})=>{const Z=X.reduce((ie,oe)=>(ie[oe]=[oe].concat(G.alias[oe]||[]).map(L=>C===n.getPositionalGroupName()?L:(/^[0-9]$/.test(L)?G.boolean.includes(oe)?"-":"--":L.length>1?"--":"-")+L).sort(
97
- (L,q)=>x(L)===x(q)?0:x(L)?1:-1).join(", "),ie),{});return{groupName:C,normalizedKeys:X,switches:Z}});if(E.filter(({groupName:C})=>C!==n.getPositionalGroupName()).some(({normalizedKeys:C,switches:X})=>!C.every(Z=>x(X[Z])))&&E.filter(({groupName:C})=>C!==n.getPositionalGroupName()).forEach(({normalizedKeys:C,switches:X})=>{C.forEach(Z=>{x(X[Z])&&(X[Z]=km(X[Z],4))})}),E.forEach(({groupName:C,normalizedKeys:X,switches:Z})=>{H.div(C),X.forEach(ie=>{const oe=Z[ie];let L=$[ie]||"",q=null;L.includes(g)&&
97
+ (L,q)=>x(L)===x(q)?0:x(L)?1:-1).join(", "),ie),{});return{groupName:C,normalizedKeys:X,switches:Z}});if(E.filter(({groupName:C})=>C!==n.getPositionalGroupName()).some(({normalizedKeys:C,switches:X})=>!C.every(Z=>x(X[Z])))&&E.filter(({groupName:C})=>C!==n.getPositionalGroupName()).forEach(({normalizedKeys:C,switches:X})=>{C.forEach(Z=>{x(X[Z])&&(X[Z]=xm(X[Z],4))})}),E.forEach(({groupName:C,normalizedKeys:X,switches:Z})=>{H.div(C),X.forEach(ie=>{const oe=Z[ie];let L=$[ie]||"",q=null;L.includes(g)&&
98
98
  (L=r(L.substring(g.length))),G.boolean.includes(ie)&&(q=`[${r("boolean")}]`),G.count.includes(ie)&&(q=`[${r("count")}]`),G.string.includes(ie)&&(q=`[${r("string")}]`),G.normalize.includes(ie)&&(q=`[${r("string")}]`),G.array.includes(ie)&&(q=`[${r("array")}]`),G.number.includes(ie)&&(q=`[${r("number")}]`);const Q=T=>typeof T=="string"?`[${r("deprecated: %s",T)}]`:`[${r("deprecated")}]`,ne=[ie in U?Q(U[ie]):null,q,ie in j?`[${r("required")}]`:null,G.choices&&G.choices[ie]?`[${r("choices:")} ${n.stringifiedValues(
99
99
  G.choices[ie])}]`:null,S(G.default[ie],G.defaultDescription[ie])].filter(Boolean).join(" ");H.span({text:Jr(oe),padding:[0,2,0,2+Xa(oe)],width:p(Z,se)+4},L);const P=t.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;ne&&!P?H.div({text:ne,padding:[0,0,0,2],align:"right"}):H.div()}),H.div()}),f.length&&(H.div(r("Examples:")),f.forEach(C=>{C[0]=C[0].replace(/\$0/g,M)}),f.forEach(C=>{C[1]===""?H.div({text:C[0],padding:[0,2,0,2]}):H.div({text:C[0],padding:[0,2,0,2],width:p(f,se)+4},{text:C[1]})}),
100
100
  H.div()),b.length>0){const C=b.map(X=>X.replace(/\$0/g,M)).join(`
@@ -103,8 +103,8 @@ H.div()),b.length>0){const C=b.map(X=>X.replace(/\$0/g,M)).join(`
103
103
  count(j),M.string.includes(k)&&t.string(j),M.normalize.includes(k)&&t.normalize(j),M.array.includes(k)&&t.array(j),M.number.includes(k)&&t.number(j)})})}let _;n.cacheHelpMessage=function(){_=this.help()},n.clearCachedHelpMessage=function(){_=void 0},n.hasCachedHelpMessage=function(){return!!_};function v(D,M,j,k){let U=[],Y=null;return Object.keys(j).forEach(G=>{U=U.concat(j[G])}),D.forEach(G=>{Y=[G].concat(M[G]),Y.some(J=>U.indexOf(J)!==-1)||j[k].push(G)}),U}function w(D){return t.getOptions().
104
104
  hiddenOptions.indexOf(D)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}n.showHelp=D=>{const M=t.getInternalMethods().getLoggerInstance();D||(D="error"),(typeof D=="function"?D:M[D])(n.help())},n.functionDescription=D=>["(",D.name?e.Parser.decamelize(D.name,"-"):r("generated-value"),")"].join(""),n.stringifiedValues=function(M,j){let k="";const U=j||", ",Y=[].concat(M);return!M||!Y.length||Y.forEach(G=>{k.length&&(k+=U),k+=JSON.stringify(G)}),k};function S(D,M){let j=`[${r("default:")} `;if(D===
105
105
  void 0&&!M)return null;if(M)j+=M;else switch(typeof D){case"string":j+=`"${D}"`;break;case"object":j+=JSON.stringify(D);break;default:j+=D}return`${j}]`}function I(){return e.process.stdColumns?Math.min(80,e.process.stdColumns):80}let F=null;n.version=D=>{F=D},n.showVersion=D=>{const M=t.getInternalMethods().getLoggerInstance();D||(D="error"),(typeof D=="function"?D:M[D])(F)},n.reset=function(M){return i=null,c=!1,l=[],u=!1,b=[],f=[],h=[],$=Er($,j=>!M[j]),n};const B=[];return n.freeze=function(){
106
- B.push({failMessage:i,failureOutput:c,usages:l,usageDisabled:u,epilogs:b,examples:f,commands:h,descriptions:$})},n.unfreeze=function(M=!1){const j=B.pop();j&&(M?($={...j.descriptions,...$},h=[...j.commands,...h],l=[...j.usages,...l],f=[...j.examples,...f],b=[...j.epilogs,...b]):{failMessage:i,failureOutput:c,usages:l,usageDisabled:u,epilogs:b,examples:f,commands:h,descriptions:$}=j)},n}function Ks(t){return typeof t=="object"}function km(t,e){return Ks(t)?{text:t.text,indentation:t.indentation+e}:
107
- {text:t,indentation:e}}function Xa(t){return Ks(t)?t.indentation:0}function Jr(t){return Ks(t)?t.text:t}const xm=`###-begin-{{app_name}}-completions-###
106
+ B.push({failMessage:i,failureOutput:c,usages:l,usageDisabled:u,epilogs:b,examples:f,commands:h,descriptions:$})},n.unfreeze=function(M=!1){const j=B.pop();j&&(M?($={...j.descriptions,...$},h=[...j.commands,...h],l=[...j.usages,...l],f=[...j.examples,...f],b=[...j.epilogs,...b]):{failMessage:i,failureOutput:c,usages:l,usageDisabled:u,epilogs:b,examples:f,commands:h,descriptions:$}=j)},n}function Ks(t){return typeof t=="object"}function xm(t,e){return Ks(t)?{text:t.text,indentation:t.indentation+e}:
107
+ {text:t,indentation:e}}function Xa(t){return Ks(t)?t.indentation:0}function Jr(t){return Ks(t)?t.text:t}const Mm=`###-begin-{{app_name}}-completions-###
108
108
  #
109
109
  # yargs command completion script
110
110
  #
@@ -132,7 +132,7 @@ _{{app_name}}_yargs_completions()
132
132
  }
133
133
  complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
134
134
  ###-end-{{app_name}}-completions-###
135
- `,Mm=`#compdef {{app_name}}
135
+ `,qm=`#compdef {{app_name}}
136
136
  ###-begin-{{app_name}}-completions-###
137
137
  #
138
138
  # yargs command completion script
@@ -151,17 +151,17 @@ _{{app_name}}_yargs_completions()
151
151
  }
152
152
  compdef _{{app_name}}_yargs_completions {{app_name}}
153
153
  ###-end-{{app_name}}-completions-###
154
- `;class qm{constructor(e,r,n,s){var i,o,a;this.yargs=e,this.usage=r,this.command=n,this.shim=s,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(a=((i=this.shim.getEnv("SHELL"))===null||i===void 0?void 0:i.includes("zsh"))||((o=this.shim.getEnv("ZSH_NAME"))===null||o===void 0?void 0:o.includes("zsh")))!==null&&a!==void 0?a:!1}defaultCompletion(e,r,n,s){const i=this.command.getCommandHandlers();for(let a=0,c=e.
154
+ `;class Um{constructor(e,r,n,s){var i,o,a;this.yargs=e,this.usage=r,this.command=n,this.shim=s,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(a=((i=this.shim.getEnv("SHELL"))===null||i===void 0?void 0:i.includes("zsh"))||((o=this.shim.getEnv("ZSH_NAME"))===null||o===void 0?void 0:o.includes("zsh")))!==null&&a!==void 0?a:!1}defaultCompletion(e,r,n,s){const i=this.command.getCommandHandlers();for(let a=0,c=e.
155
155
  length;a<c;++a)if(i[e[a]]&&i[e[a]].builder){const l=i[e[a]].builder;if(Ws(l)){this.indexAfterLastReset=a+1;const u=this.yargs.getInternalMethods().reset();return l(u,!0),u.argv}}const o=[];this.commandCompletions(o,e,n),this.optionCompletions(o,e,r,n),this.choicesFromOptionsCompletions(o,e,r,n),this.choicesFromPositionalsCompletions(o,e,r,n),s(null,o)}commandCompletions(e,r,n){const s=this.yargs.getInternalMethods().getContext().commands;!n.match(/^-/)&&s[s.length-1]!==n&&!this.previousArgHasChoices(
156
156
  r)&&this.usage.getCommands().forEach(i=>{const o=vr(i[0]).cmd;if(r.indexOf(o)===-1)if(!this.zshShell)e.push(o);else{const a=i[1]||"";e.push(o.replace(/:/g,"\\:")+":"+a)}})}optionCompletions(e,r,n,s){if((s.match(/^-/)||s===""&&e.length===0)&&!this.previousArgHasChoices(r)){const i=this.yargs.getOptions(),o=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(i.key).forEach(a=>{const c=!!i.configuration["boolean-negation"]&&i.boolean.includes(a);!o.includes(a)&&!i.hiddenOptions.
157
157
  includes(a)&&!this.argsContainKey(r,a,c)&&this.completeOptionKey(a,e,s,c&&!!i.default[a])})}}choicesFromOptionsCompletions(e,r,n,s){if(this.previousArgHasChoices(r)){const i=this.getPreviousArgChoices(r);i&&i.length>0&&e.push(...i.map(o=>o.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(e,r,n,s){if(s===""&&e.length>0&&this.previousArgHasChoices(r))return;const i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],o=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().
158
158
  getContext().commands.length+1),a=i[n._.length-o-1];if(!a)return;const c=this.yargs.getOptions().choices[a]||[];for(const l of c)l.startsWith(s)&&e.push(l.replace(/:/g,"\\:"))}getPreviousArgChoices(e){if(e.length<1)return;let r=e[e.length-1],n="";if(!r.startsWith("-")&&e.length>1&&(n=r,r=e[e.length-2]),!r.startsWith("-"))return;const s=r.replace(/^-+/,""),i=this.yargs.getOptions(),o=[s,...this.yargs.getAliases()[s]||[]];let a;for(const c of o)if(Object.prototype.hasOwnProperty.call(i.key,c)&&Array.
159
159
  isArray(i.choices[c])){a=i.choices[c];break}if(a)return a.filter(c=>!n||c.startsWith(n))}previousArgHasChoices(e){const r=this.getPreviousArgChoices(e);return r!==void 0&&r.length>0}argsContainKey(e,r,n){const s=i=>e.indexOf((/^[^0-9]$/.test(i)?"-":"--")+i)!==-1;if(s(r)||n&&s(`no-${r}`))return!0;if(this.aliases){for(const i of this.aliases[r])if(s(i))return!0}return!1}completeOptionKey(e,r,n,s){var i,o,a,c;let l=e;if(this.zshShell){const $=this.usage.getDescriptions(),b=(o=(i=this===null||this===
160
160
  void 0?void 0:this.aliases)===null||i===void 0?void 0:i[e])===null||o===void 0?void 0:o.find(g=>{const p=$[g];return typeof p=="string"&&p.length>0}),y=b?$[b]:void 0,d=(c=(a=$[e])!==null&&a!==void 0?a:y)!==null&&c!==void 0?c:"";l=`${e.replace(/:/g,"\\:")}:${d.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}const u=$=>/^--/.test($),f=$=>/^[^0-9]$/.test($),h=!u(n)&&f(e)?"-":"--";r.push(h+l),s&&r.push(h+"no-"+l)}customCompletion(e,r,n,s){if(Xe(this.customCompletionFunction,null,this.
161
- shim),Hm(this.customCompletionFunction)){const i=this.customCompletionFunction(n,r);return Ae(i)?i.then(o=>{this.shim.process.nextTick(()=>{s(null,o)})}).catch(o=>{this.shim.process.nextTick(()=>{s(o,void 0)})}):s(null,i)}else return Fm(this.customCompletionFunction)?this.customCompletionFunction(n,r,(i=s)=>this.defaultCompletion(e,r,n,i),i=>{s(null,i)}):this.customCompletionFunction(n,r,i=>{s(null,i)})}getCompletion(e,r){const n=e.length?e[e.length-1]:"",s=this.yargs.parse(e,!0),i=this.customCompletionFunction?
162
- o=>this.customCompletion(e,o,n,r):o=>this.defaultCompletion(e,o,n,r);return Ae(s)?s.then(i):i(s)}generateCompletionScript(e,r){let n=this.zshShell?Mm:xm;const s=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,s),n=n.replace(/{{completion_command}}/g,r),n.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}}function Um(t,e,r,n){return new qm(t,e,r,n)}function Hm(t){return t.length<3}function Fm(t){
163
- return t.length>3}function Vm(t,e){if(t.length===0)return e.length;if(e.length===0)return t.length;const r=[];let n;for(n=0;n<=e.length;n++)r[n]=[n];let s;for(s=0;s<=t.length;s++)r[0][s]=s;for(n=1;n<=e.length;n++)for(s=1;s<=t.length;s++)e.charAt(n-1)===t.charAt(s-1)?r[n][s]=r[n-1][s-1]:n>1&&s>1&&e.charAt(n-2)===t.charAt(s-1)&&e.charAt(n-1)===t.charAt(s-2)?r[n][s]=r[n-2][s-2]+1:r[n][s]=Math.min(r[n-1][s-1]+1,Math.min(r[n][s-1]+1,r[n-1][s]+1));return r[e.length][t.length]}const Ja=["$0","--","_"];
164
- function zm(t,e,r){const n=r.y18n.__,s=r.y18n.__n,i={};i.nonOptionCount=function(f){const h=t.getDemandedCommands(),b=f._.length+(f["--"]?f["--"].length:0)-t.getInternalMethods().getContext().commands.length;h._&&(b<h._.min||b>h._.max)&&(b<h._.min?h._.minMsg!==void 0?e.fail(h._.minMsg?h._.minMsg.replace(/\$0/g,b.toString()).replace(/\$1/,h._.min.toString()):null):e.fail(s("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",b,b.toString(),
161
+ shim),Fm(this.customCompletionFunction)){const i=this.customCompletionFunction(n,r);return Ae(i)?i.then(o=>{this.shim.process.nextTick(()=>{s(null,o)})}).catch(o=>{this.shim.process.nextTick(()=>{s(o,void 0)})}):s(null,i)}else return Vm(this.customCompletionFunction)?this.customCompletionFunction(n,r,(i=s)=>this.defaultCompletion(e,r,n,i),i=>{s(null,i)}):this.customCompletionFunction(n,r,i=>{s(null,i)})}getCompletion(e,r){const n=e.length?e[e.length-1]:"",s=this.yargs.parse(e,!0),i=this.customCompletionFunction?
162
+ o=>this.customCompletion(e,o,n,r):o=>this.defaultCompletion(e,o,n,r);return Ae(s)?s.then(i):i(s)}generateCompletionScript(e,r){let n=this.zshShell?qm:Mm;const s=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,s),n=n.replace(/{{completion_command}}/g,r),n.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}}function Hm(t,e,r,n){return new Um(t,e,r,n)}function Fm(t){return t.length<3}function Vm(t){
163
+ return t.length>3}function zm(t,e){if(t.length===0)return e.length;if(e.length===0)return t.length;const r=[];let n;for(n=0;n<=e.length;n++)r[n]=[n];let s;for(s=0;s<=t.length;s++)r[0][s]=s;for(n=1;n<=e.length;n++)for(s=1;s<=t.length;s++)e.charAt(n-1)===t.charAt(s-1)?r[n][s]=r[n-1][s-1]:n>1&&s>1&&e.charAt(n-2)===t.charAt(s-1)&&e.charAt(n-1)===t.charAt(s-2)?r[n][s]=r[n-2][s-2]+1:r[n][s]=Math.min(r[n-1][s-1]+1,Math.min(r[n][s-1]+1,r[n-1][s]+1));return r[e.length][t.length]}const Ja=["$0","--","_"];
164
+ function Gm(t,e,r){const n=r.y18n.__,s=r.y18n.__n,i={};i.nonOptionCount=function(f){const h=t.getDemandedCommands(),b=f._.length+(f["--"]?f["--"].length:0)-t.getInternalMethods().getContext().commands.length;h._&&(b<h._.min||b>h._.max)&&(b<h._.min?h._.minMsg!==void 0?e.fail(h._.minMsg?h._.minMsg.replace(/\$0/g,b.toString()).replace(/\$1/,h._.min.toString()):null):e.fail(s("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",b,b.toString(),
165
165
  h._.min.toString())):b>h._.max&&(h._.maxMsg!==void 0?e.fail(h._.maxMsg?h._.maxMsg.replace(/\$0/g,b.toString()).replace(/\$1/,h._.max.toString()):null):e.fail(s("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",b,b.toString(),h._.max.toString()))))},i.positionalCount=function(f,h){h<f&&e.fail(s("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",h,h+"",f+""))},i.requiredArguments=
166
166
  function(f,h){let $=null;for(const b of Object.keys(h))(!Object.prototype.hasOwnProperty.call(f,b)||typeof f[b]>"u")&&($=$||{},$[b]=h[b]);if($){const b=[];for(const d of Object.keys($)){const g=$[d];g&&b.indexOf(g)<0&&b.push(g)}const y=b.length?`
167
167
  ${b.join(`
@@ -172,15 +172,15 @@ function(f){const h=t.getOptions(),$={};if(!Object.keys(h.choices).length)return
172
172
  ${n("Argument: %s, Given: %s, Choices: %s",d,e.stringifiedValues($[d]),e.stringifiedValues(h.choices[d]))}`}),e.fail(y)};let o={};i.implies=function(f,h){ce("<string|object> [array|number|string]",[f,h],arguments.length),typeof f=="object"?Object.keys(f).forEach($=>{i.implies($,f[$])}):(t.global(f),o[f]||(o[f]=[]),Array.isArray(h)?h.forEach($=>i.implies(f,$)):(Xe(h,void 0,r),o[f].push(h)))},i.getImplied=function(){return o};function a(u,f){const h=Number(f);return f=isNaN(h)?f:h,typeof f=="num\
173
173
  ber"?f=u._.length>=f:f.match(/^--no-.+/)?(f=f.match(/^--no-(.+)/)[1],f=!Object.prototype.hasOwnProperty.call(u,f)):f=Object.prototype.hasOwnProperty.call(u,f),f}i.implications=function(f){const h=[];if(Object.keys(o).forEach($=>{const b=$;(o[$]||[]).forEach(y=>{let d=b;const g=y;d=a(f,d),y=a(f,y),d&&!y&&h.push(` ${b} -> ${g}`)})}),h.length){let $=`${n("Implications failed:")}
174
174
  `;h.forEach(b=>{$+=b}),e.fail($)}};let c={};i.conflicts=function(f,h){ce("<string|object> [array|string]",[f,h],arguments.length),typeof f=="object"?Object.keys(f).forEach($=>{i.conflicts($,f[$])}):(t.global(f),c[f]||(c[f]=[]),Array.isArray(h)?h.forEach($=>i.conflicts(f,$)):c[f].push(h))},i.getConflicting=()=>c,i.conflicting=function(f){Object.keys(f).forEach(h=>{c[h]&&c[h].forEach($=>{$&&f[h]!==void 0&&f[$]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",h,$))})}),t.getInternalMethods().
175
- getParserConfiguration()["strip-dashed"]&&Object.keys(c).forEach(h=>{c[h].forEach($=>{$&&f[r.Parser.camelCase(h)]!==void 0&&f[r.Parser.camelCase($)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",h,$))})})},i.recommendCommands=function(f,h){h=h.sort((d,g)=>g.length-d.length);let b=null,y=1/0;for(let d=0,g;(g=h[d])!==void 0;d++){const p=Vm(f,g);p<=3&&p<y&&(y=p,b=g)}b&&e.fail(n("Did you mean %s?",b))},i.reset=function(f){return o=Er(o,h=>!f[h]),c=Er(c,h=>!f[h]),i};const l=[];return i.
176
- freeze=function(){l.push({implied:o,conflicting:c})},i.unfreeze=function(){const f=l.pop();Xe(f,void 0,r),{implied:o,conflicting:c}=f},i}let Ys=[],Rr;function Xs(t,e,r,n){Rr=n;let s={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if(typeof t.extends!="string")return s;const i=/\.json|\..*rc$/.test(t.extends);let o=null;if(i)o=Bm(e,t.extends);else try{o=require.resolve(t.extends)}catch{return t}Gm(o),Ys.push(o),s=i?JSON.parse(Rr.readFileSync(o,"utf8")):require(t.extends),delete t.extends,
177
- s=Xs(s,Rr.path.dirname(o),r,Rr)}return Ys=[],r?Qa(s,t):Object.assign({},s,t)}function Gm(t){if(Ys.indexOf(t)>-1)throw new Oe(`Circular extended configurations: '${t}'.`)}function Bm(t,e){return Rr.path.resolve(t,e)}function Qa(t,e){const r={};function n(s){return s&&typeof s=="object"&&!Array.isArray(s)}Object.assign(r,t);for(const s of Object.keys(e))n(e[s])&&n(r[s])?r[s]=Qa(t[s],e[s]):r[s]=e[s];return r}var ae=function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");
175
+ getParserConfiguration()["strip-dashed"]&&Object.keys(c).forEach(h=>{c[h].forEach($=>{$&&f[r.Parser.camelCase(h)]!==void 0&&f[r.Parser.camelCase($)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",h,$))})})},i.recommendCommands=function(f,h){h=h.sort((d,g)=>g.length-d.length);let b=null,y=1/0;for(let d=0,g;(g=h[d])!==void 0;d++){const p=zm(f,g);p<=3&&p<y&&(y=p,b=g)}b&&e.fail(n("Did you mean %s?",b))},i.reset=function(f){return o=Er(o,h=>!f[h]),c=Er(c,h=>!f[h]),i};const l=[];return i.
176
+ freeze=function(){l.push({implied:o,conflicting:c})},i.unfreeze=function(){const f=l.pop();Xe(f,void 0,r),{implied:o,conflicting:c}=f},i}let Ys=[],Rr;function Xs(t,e,r,n){Rr=n;let s={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if(typeof t.extends!="string")return s;const i=/\.json|\..*rc$/.test(t.extends);let o=null;if(i)o=Wm(e,t.extends);else try{o=require.resolve(t.extends)}catch{return t}Bm(o),Ys.push(o),s=i?JSON.parse(Rr.readFileSync(o,"utf8")):require(t.extends),delete t.extends,
177
+ s=Xs(s,Rr.path.dirname(o),r,Rr)}return Ys=[],r?Qa(s,t):Object.assign({},s,t)}function Bm(t){if(Ys.indexOf(t)>-1)throw new Oe(`Circular extended configurations: '${t}'.`)}function Wm(t,e){return Rr.path.resolve(t,e)}function Qa(t,e){const r={};function n(s){return s&&typeof s=="object"&&!Array.isArray(s)}Object.assign(r,t);for(const s of Object.keys(e))n(e[s])&&n(r[s])?r[s]=Qa(t[s],e[s]):r[s]=e[s];return r}var ae=function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");
178
178
  if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},O=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class d\
179
- id not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Re,Tt,Ar,Ve,ke,Qr,$t,jt,Zr,ze,en,Ge,st,xe,Be,tn,Xt,Ce,ue,rn,nn,Me,Lt,Jt,Dt,_t,sn,fe,kt,xt,Mt,de,on,it,Ee;function Wm(t){return(e=[],r=t.process.cwd(),n)=>{const s=new Km(e,r,n,t);return Object.defineProperty(s,"argv",{get:()=>s.parse(),enumerable:!0}),s.help(),s.version(),s}}const Za=Symbol("copyDoubleDash"),ec=Symbol("copyDoubleDash"),Js=Symbol("deleteFromParserHintObject"),tc=Symbol("emitWarning"),rc=Symbol("freeze"),nc=Symbol(
179
+ id not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Re,Tt,Ar,Ve,ke,Qr,$t,jt,Zr,ze,en,Ge,st,xe,Be,tn,Xt,Ce,ue,rn,nn,Me,Lt,Jt,Dt,_t,sn,fe,kt,xt,Mt,de,on,it,Ee;function Km(t){return(e=[],r=t.process.cwd(),n)=>{const s=new Ym(e,r,n,t);return Object.defineProperty(s,"argv",{get:()=>s.parse(),enumerable:!0}),s.help(),s.version(),s}}const Za=Symbol("copyDoubleDash"),ec=Symbol("copyDoubleDash"),Js=Symbol("deleteFromParserHintObject"),tc=Symbol("emitWarning"),rc=Symbol("freeze"),nc=Symbol(
180
180
  "getDollarZero"),qt=Symbol("getParserConfiguration"),sc=Symbol("getUsageConfiguration"),Qs=Symbol("guessLocale"),ic=Symbol("guessVersion"),oc=Symbol("parsePositionalNumbers"),Zs=Symbol("pkgUp"),vt=Symbol("populateParserHintArray"),Qt=Symbol("populateParserHintSingleValueDictionary"),ei=Symbol("populateParserHintArrayDictionary"),ti=Symbol("populateParserHintDictionary"),ri=Symbol("sanitizeKey"),ni=Symbol("setKey"),si=Symbol("unfreeze"),ac=Symbol("validateAsync"),cc=Symbol("getCommandInstance"),uc=Symbol(
181
- "getContext"),lc=Symbol("getHasOutput"),fc=Symbol("getLoggerInstance"),dc=Symbol("getParseContext"),hc=Symbol("getUsageInstance"),pc=Symbol("getValidationInstance"),an=Symbol("hasParseCallback"),mc=Symbol("isGlobalContext"),Ut=Symbol("postProcess"),gc=Symbol("rebase"),ii=Symbol("reset"),Or=Symbol("runYargsParserAndExecuteCommands"),oi=Symbol("runValidation"),yc=Symbol("setHasOutput"),Ht=Symbol("kTrackManuallySetKeys");class Km{constructor(e=[],r,n,s){this.customScriptName=!1,this.parsed=!1,Re.set(
181
+ "getContext"),lc=Symbol("getHasOutput"),fc=Symbol("getLoggerInstance"),dc=Symbol("getParseContext"),hc=Symbol("getUsageInstance"),pc=Symbol("getValidationInstance"),an=Symbol("hasParseCallback"),mc=Symbol("isGlobalContext"),Ut=Symbol("postProcess"),gc=Symbol("rebase"),ii=Symbol("reset"),Or=Symbol("runYargsParserAndExecuteCommands"),oi=Symbol("runValidation"),yc=Symbol("setHasOutput"),Ht=Symbol("kTrackManuallySetKeys");class Ym{constructor(e=[],r,n,s){this.customScriptName=!1,this.parsed=!1,Re.set(
182
182
  this,void 0),Tt.set(this,void 0),Ar.set(this,{commands:[],fullCommands:[]}),Ve.set(this,null),ke.set(this,null),Qr.set(this,"show-hidden"),$t.set(this,null),jt.set(this,!0),Zr.set(this,{}),ze.set(this,!0),en.set(this,[]),Ge.set(this,void 0),st.set(this,{}),xe.set(this,!1),Be.set(this,null),tn.set(this,!0),Xt.set(this,void 0),Ce.set(this,""),ue.set(this,void 0),rn.set(this,void 0),nn.set(this,{}),Me.set(this,null),Lt.set(this,null),Jt.set(this,{}),Dt.set(this,{}),_t.set(this,void 0),sn.set(this,!1),
183
- fe.set(this,void 0),kt.set(this,!1),xt.set(this,!1),Mt.set(this,!1),de.set(this,void 0),on.set(this,{}),it.set(this,null),Ee.set(this,void 0),ae(this,fe,s,"f"),ae(this,_t,e,"f"),ae(this,Tt,r,"f"),ae(this,rn,n,"f"),ae(this,Ge,new Rm(this),"f"),this.$0=this[nc](),this[ii](),ae(this,Re,O(this,Re,"f"),"f"),ae(this,de,O(this,de,"f"),"f"),ae(this,Ee,O(this,Ee,"f"),"f"),ae(this,ue,O(this,ue,"f"),"f"),O(this,ue,"f").showHiddenOpt=O(this,Qr,"f"),ae(this,Xt,this[ec](),"f")}addHelpOpt(e,r){const n="help";return ce(
183
+ fe.set(this,void 0),kt.set(this,!1),xt.set(this,!1),Mt.set(this,!1),de.set(this,void 0),on.set(this,{}),it.set(this,null),Ee.set(this,void 0),ae(this,fe,s,"f"),ae(this,_t,e,"f"),ae(this,Tt,r,"f"),ae(this,rn,n,"f"),ae(this,Ge,new Am(this),"f"),this.$0=this[nc](),this[ii](),ae(this,Re,O(this,Re,"f"),"f"),ae(this,de,O(this,de,"f"),"f"),ae(this,Ee,O(this,Ee,"f"),"f"),ae(this,ue,O(this,ue,"f"),"f"),O(this,ue,"f").showHiddenOpt=O(this,Qr,"f"),ae(this,Xt,this[ec](),"f")}addHelpOpt(e,r){const n="help";return ce(
184
184
  "[string|boolean] [string]",[e,r],arguments.length),O(this,Be,"f")&&(this[Js](O(this,Be,"f")),ae(this,Be,null,"f")),e===!1&&r===void 0?this:(ae(this,Be,typeof e=="string"?e:n,"f"),this.boolean(O(this,Be,"f")),this.describe(O(this,Be,"f"),r||O(this,de,"f").deferY18nLookup("Show help")),this)}help(e,r){return this.addHelpOpt(e,r)}addShowHiddenOpt(e,r){if(ce("[string|boolean] [string]",[e,r],arguments.length),e===!1&&r===void 0)return this;const n=typeof e=="string"?e:O(this,Qr,"f");return this.boolean(
185
185
  n),this.describe(n,r||O(this,de,"f").deferY18nLookup("Show hidden options")),O(this,ue,"f").showHiddenOpt=n,this}showHidden(e,r){return this.addShowHiddenOpt(e,r)}alias(e,r){return ce("<object|string|array> [string|array]",[e,r],arguments.length),this[ei](this.alias.bind(this),"alias",e,r),this}array(e){return ce("<array|string>",[e],arguments.length),this[vt]("array",e),this[Ht](e),this}boolean(e){return ce("<array|string>",[e],arguments.length),this[vt]("boolean",e),this[Ht](e),this}check(e,r){
186
186
  return ce("<function> [boolean]",[e,r],arguments.length),this.middleware((n,s)=>wr(()=>e(n,s.getOptions()),i=>(i?(typeof i=="string"||i instanceof Error)&&O(this,de,"f").fail(i.toString(),i):O(this,de,"f").fail(O(this,fe,"f").y18n.__("Argument check failed: %s",e.toString())),n),i=>(O(this,de,"f").fail(i.message?i.message:i.toString(),i),n)),!1,r),this}choices(e,r){return ce("<object|string|array> [string|array]",[e,r],arguments.length),this[ei](this.choices.bind(this),"choices",e,r),this}coerce(e,r){
@@ -226,16 +226,16 @@ ae(u,ke,y,"f")}}.value,parseFn:{set value(y){ae(f,Me,y,"f")}}.value,parseContext
226
226
  bind(this),getUsageConfiguration:this[sc].bind(this),getUsageInstance:this[hc].bind(this),getValidationInstance:this[pc].bind(this),hasParseCallback:this[an].bind(this),isGlobalContext:this[mc].bind(this),postProcess:this[Ut].bind(this),reset:this[ii].bind(this),runValidation:this[oi].bind(this),runYargsParserAndExecuteCommands:this[Or].bind(this),setHasOutput:this[yc].bind(this)}}[cc](){return O(this,Re,"f")}[uc](){return O(this,Ar,"f")}[lc](){return O(this,xe,"f")}[fc](){return O(this,Xt,"f")}[dc](){
227
227
  return O(this,Lt,"f")||{}}[hc](){return O(this,de,"f")}[pc](){return O(this,Ee,"f")}[an](){return!!O(this,Me,"f")}[mc](){return O(this,tn,"f")}[Ut](e,r,n,s){return n||Ae(e)||(r||(e=this[Za](e)),(this[qt]()["parse-positional-numbers"]||this[qt]()["parse-positional-numbers"]===void 0)&&(e=this[oc](e)),s&&(e=br(e,this,O(this,Ge,"f").getMiddleware(),!1))),e}[ii](e={}){ae(this,ue,O(this,ue,"f")||{},"f");const r={};r.local=O(this,ue,"f").local||[],r.configObjects=O(this,ue,"f").configObjects||[];const n={};
228
228
  r.local.forEach(o=>{n[o]=!0,(e[o]||[]).forEach(a=>{n[a]=!0})}),Object.assign(O(this,Dt,"f"),Object.keys(O(this,st,"f")).reduce((o,a)=>{const c=O(this,st,"f")[a].filter(l=>!(l in n));return c.length>0&&(o[a]=c),o},{})),ae(this,st,{},"f");const s=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],i=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return s.forEach(o=>{r[o]=(O(this,
229
- ue,"f")[o]||[]).filter(a=>!n[a])}),i.forEach(o=>{r[o]=Er(O(this,ue,"f")[o],a=>!n[a])}),r.envPrefix=O(this,ue,"f").envPrefix,ae(this,ue,r,"f"),ae(this,de,O(this,de,"f")?O(this,de,"f").reset(n):Dm(this,O(this,fe,"f")),"f"),ae(this,Ee,O(this,Ee,"f")?O(this,Ee,"f").reset(n):zm(this,O(this,de,"f"),O(this,fe,"f")),"f"),ae(this,Re,O(this,Re,"f")?O(this,Re,"f").reset():Im(O(this,de,"f"),O(this,Ee,"f"),O(this,Ge,"f"),O(this,fe,"f")),"f"),O(this,Ve,"f")||ae(this,Ve,Um(this,O(this,de,"f"),O(this,Re,"f"),O(
229
+ ue,"f")[o]||[]).filter(a=>!n[a])}),i.forEach(o=>{r[o]=Er(O(this,ue,"f")[o],a=>!n[a])}),r.envPrefix=O(this,ue,"f").envPrefix,ae(this,ue,r,"f"),ae(this,de,O(this,de,"f")?O(this,de,"f").reset(n):km(this,O(this,fe,"f")),"f"),ae(this,Ee,O(this,Ee,"f")?O(this,Ee,"f").reset(n):Gm(this,O(this,de,"f"),O(this,fe,"f")),"f"),ae(this,Re,O(this,Re,"f")?O(this,Re,"f").reset():Nm(O(this,de,"f"),O(this,Ee,"f"),O(this,Ge,"f"),O(this,fe,"f")),"f"),O(this,Ve,"f")||ae(this,Ve,Hm(this,O(this,de,"f"),O(this,Re,"f"),O(
230
230
  this,fe,"f")),"f"),O(this,Ge,"f").reset(),ae(this,ke,null,"f"),ae(this,Ce,"","f"),ae(this,$t,null,"f"),ae(this,xe,!1,"f"),this.parsed=!1,this}[gc](e,r){return O(this,fe,"f").path.relative(e,r)}[Or](e,r,n,s=0,i=!1){let o=!!n||i;e=e||O(this,_t,"f"),O(this,ue,"f").__=O(this,fe,"f").y18n.__,O(this,ue,"f").configuration=this[qt]();const a=!!O(this,ue,"f").configuration["populate--"],c=Object.assign({},O(this,ue,"f").configuration,{"populate--":!0}),l=O(this,fe,"f").Parser.detailed(e,Object.assign({},
231
231
  O(this,ue,"f"),{configuration:{"parse-positional-numbers":!1,...c}})),u=Object.assign(l.argv,O(this,Lt,"f"));let f;const h=l.aliases;let $=!1,b=!1;Object.keys(u).forEach(y=>{y===O(this,Be,"f")&&u[y]?$=!0:y===O(this,it,"f")&&u[y]&&(b=!0)}),u.$0=this.$0,this.parsed=l,s===0&&O(this,de,"f").clearCachedHelpMessage();try{if(this[Qs](),r)return this[Ut](u,a,!!n,!1);O(this,Be,"f")&&[O(this,Be,"f")].concat(h[O(this,Be,"f")]||[]).filter(m=>m.length>1).includes(""+u._[u._.length-1])&&(u._.pop(),$=!0),ae(this,
232
232
  tn,!1,"f");const y=O(this,Re,"f").getCommands(),d=O(this,Ve,"f").completionKey in u,g=$||d||i;if(u._.length){if(y.length){let p;for(let m=s||0,_;u._[m]!==void 0;m++)if(_=String(u._[m]),y.includes(_)&&_!==O(this,ke,"f")){const v=O(this,Re,"f").runCommand(_,this,l,m+1,i,$||b||i);return this[Ut](v,a,!!n,!1)}else if(!p&&_!==O(this,ke,"f")){p=_;break}!O(this,Re,"f").hasDefaultCommand()&&O(this,sn,"f")&&p&&!g&&O(this,Ee,"f").recommendCommands(p,y)}O(this,ke,"f")&&u._.includes(O(this,ke,"f"))&&!d&&(O(this,
233
233
  ze,"f")&&Sr(!0),this.showCompletionScript(),this.exit(0))}if(O(this,Re,"f").hasDefaultCommand()&&!g){const p=O(this,Re,"f").runCommand(null,this,l,0,i,$||b||i);return this[Ut](p,a,!!n,!1)}if(d){O(this,ze,"f")&&Sr(!0),e=[].concat(e);const p=e.slice(e.indexOf(`--${O(this,Ve,"f").completionKey}`)+1);return O(this,Ve,"f").getCompletion(p,(m,_)=>{if(m)throw new Oe(m.message);(_||[]).forEach(v=>{O(this,Xt,"f").log(v)}),this.exit(0)}),this[Ut](u,!a,!!n,!1)}if(O(this,xe,"f")||($?(O(this,ze,"f")&&Sr(!0),
234
234
  o=!0,this.showHelp("log"),this.exit(0)):b&&(O(this,ze,"f")&&Sr(!0),o=!0,O(this,de,"f").showVersion("log"),this.exit(0))),!o&&O(this,ue,"f").skipValidation.length>0&&(o=Object.keys(u).some(p=>O(this,ue,"f").skipValidation.indexOf(p)>=0&&u[p]===!0)),!o){if(l.error)throw new Oe(l.error.message);if(!d){const p=this[oi](h,{},l.error);n||(f=br(u,this,O(this,Ge,"f").getMiddleware(),!0)),f=this[ac](p,f??u),Ae(f)&&!n&&(f=f.then(()=>br(u,this,O(this,Ge,"f").getMiddleware(),!1)))}}}catch(y){if(y instanceof
235
235
  Oe)O(this,de,"f").fail(y.message,y);else throw y}return this[Ut](f??u,a,!!n,!0)}[oi](e,r,n,s){const i={...this.getDemandedOptions()};return o=>{if(n)throw new Oe(n.message);O(this,Ee,"f").nonOptionCount(o),O(this,Ee,"f").requiredArguments(o,i);let a=!1;O(this,xt,"f")&&(a=O(this,Ee,"f").unknownCommands(o)),O(this,kt,"f")&&!a?O(this,Ee,"f").unknownArguments(o,e,r,!!s):O(this,Mt,"f")&&O(this,Ee,"f").unknownArguments(o,e,{},!1,!1),O(this,Ee,"f").limitedChoices(o),O(this,Ee,"f").implications(o),O(this,
236
- Ee,"f").conflicting(o)}}[yc](){ae(this,xe,!0,"f")}[Ht](e){if(typeof e=="string")O(this,ue,"f").key[e]=!0;else for(const r of e)O(this,ue,"f").key[r]=!0}}function Ym(t){return!!t&&typeof t.getInternalMethods=="function"}const Xm=Wm(Em),Cr={type:"string",desc:"<directory> with LikeC4 sources (default is current directory)",normalize:!0,default:".",coerce:ge},We={alias:"use-dot-bin",boolean:!0,type:"boolean",desc:ut()?"enabled in container, disable by --no-use-dot":'use graphviz binaries ("dot" sho\
237
- uld be on PATH)',default:ut()},$c={boolean:!0,type:"boolean",desc:'use hash history for navigation, e.g. "/#/view" instead of "/view"'},Pr={alias:"o",type:"string",desc:"<directory> output directory",normalize:!0,coerce:ge},ai={alias:"w",type:"string",desc:'prefix for Webcomponents, e.g "c4" generates <c4-view ../>',default:"likec4"},Jm={alias:"t",type:"string",desc:'base title of the app pages (default is "LikeC4")',default:"LikeC4"},_c={alias:["base-url"],type:"string",desc:'base url the app i\
238
- s being served from, e.g. "/" or "/pages/"'},Qm={boolean:!0,type:"boolean",desc:"outputs a single self-contained HTML file with all required resources inlined"},Zm={alias:"l",type:"string",desc:ut()?"listen 0.0.0.0 by default in container":"ip address of the network interface to listen on",default:ut()?"0.0.0.0":"localhost"},vc=t=>t instanceof URL?wa(t):t;function eg(t,{cwd:e=Se.cwd(),type:r="file",stopAt:n}={}){let s=me.resolve(vc(e)??"");const{root:i}=me.parse(s);for(n=me.resolve(s,vc(n)??i);s&&
236
+ Ee,"f").conflicting(o)}}[yc](){ae(this,xe,!0,"f")}[Ht](e){if(typeof e=="string")O(this,ue,"f").key[e]=!0;else for(const r of e)O(this,ue,"f").key[r]=!0}}function Xm(t){return!!t&&typeof t.getInternalMethods=="function"}const Jm=Km(Sm),Cr={type:"string",desc:"<directory> with LikeC4 sources (default is current directory)",normalize:!0,default:".",coerce:ge},We={alias:"use-dot-bin",boolean:!0,type:"boolean",desc:ut()?"enabled in container, disable by --no-use-dot":'use graphviz binaries ("dot" sho\
237
+ uld be on PATH)',default:ut()},$c={boolean:!0,type:"boolean",desc:'use hash history for navigation, e.g. "/#/view" instead of "/view"'},Pr={alias:"o",type:"string",desc:"<directory> output directory",normalize:!0,coerce:ge},ai={alias:"w",type:"string",desc:'prefix for Webcomponents, e.g "c4" generates <c4-view ../>',default:"likec4"},_c={alias:"t",type:"string",desc:'base title of the app pages (default is "LikeC4")',default:"LikeC4"},vc={alias:["base-url"],type:"string",desc:'base url the app i\
238
+ s being served from, e.g. "/" or "/pages/"'},Qm={boolean:!0,type:"boolean",desc:"outputs a single self-contained HTML file with all required resources inlined"},Zm={alias:"l",type:"string",desc:ut()?"listen 0.0.0.0 by default in container":"ip address of the network interface to listen on",default:ut()?"0.0.0.0":"localhost"},bc=t=>t instanceof URL?wa(t):t;function eg(t,{cwd:e=Se.cwd(),type:r="file",stopAt:n}={}){let s=me.resolve(bc(e)??"");const{root:i}=me.parse(s);for(n=me.resolve(s,bc(n)??i);s&&
239
239
  s!==n&&s!==i;){const o=me.isAbsolute(t)?t:me.join(s,t);try{const a=he.statSync(o,{throwIfNoEntry:!1});if(r==="file"&&a?.isFile()||r==="directory"&&a?.isDirectory())return o}catch{}s=me.dirname(s)}}function tg({cwd:t=Se.cwd()}={}){return eg("package.json",{cwd:t})}const rg=He("vite"),cn=Pt(wa(import.meta.url)),ng=`
240
240
  /* prettier-ignore-start */
241
241
  /* eslint-disable */
@@ -248,52 +248,52 @@ s!==n&&s!==i;){const o=me.isAbsolute(t)?t:me.join(s,t);try{const a=he.statSync(o
248
248
  `.trimStart(),sg=`
249
249
 
250
250
  /* prettier-ignore-end */
251
- `,ci={banner:ng,footer:sg};function bc(){const t=tg({cwd:cn});if(!t)throw new Error("likec4 package folder not found");return Pt(t)}function ui(){const t=bc(),e=[ge(t,"__app__"),ge(cn,"../__app__"),ge(cn,"../../__app__"),ge(cn,"../../dist/__app__")],r=Dh(e,Ct);if(!r)throw At.error(`likec4 app root does not exist, tried:
251
+ `,ci={banner:ng,footer:sg};function wc(){const t=tg({cwd:cn});if(!t)throw new Error("likec4 package folder not found");return Pt(t)}function ui(){const t=wc(),e=[ge(t,"__app__"),ge(cn,"../__app__"),ge(cn,"../../__app__"),ge(cn,"../../dist/__app__")],r=kh(e,Ct);if(!r)throw At.error(`likec4 app root does not exist, tried:
252
252
  ${e.join(`
253
253
  `)}`),new Error("likec4 app root does not exist");return r}async function li(){const t=await Vr(fr(zr(),".likec4-public-"));return await It(fr(t,"likec4-views.js"),`// generated by likec4
254
- `),t}const fi=1e4;function di(){const t=bc();return{"likec4/icons":ge(t,"icons"),"likec4/react":ge(t,"react"),"likec4/model":ge(t,"dist/model")}}var hi={},wc;function pi(){return wc||(wc=1,function(t){t.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,t.find=(e,r)=>e.nodes.find(n=>n.type===r),t.exceedsLimit=(e,r,n=1,s)=>s===!1||!t.isInteger(e)||!t.isInteger(r)?!1:(Number(r)-Number(e))/Number(n)>=s,t.escapeNode=(e,r=0,n)=>{const s=e.
254
+ `),t}const fi=1e4;function di(){const t=wc();return{"likec4/icons":ge(t,"icons"),"likec4/react":ge(t,"react"),"likec4/model":ge(t,"dist/model")}}var hi={},Ec;function pi(){return Ec||(Ec=1,function(t){t.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,t.find=(e,r)=>e.nodes.find(n=>n.type===r),t.exceedsLimit=(e,r,n=1,s)=>s===!1||!t.isInteger(e)||!t.isInteger(r)?!1:(Number(r)-Number(e))/Number(n)>=s,t.escapeNode=(e,r=0,n)=>{const s=e.
255
255
  nodes[r];s&&(n&&s.type===n||s.type==="open"||s.type==="close")&&s.escaped!==!0&&(s.value="\\"+s.value,s.escaped=!0)},t.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1,t.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,t.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,t.reduce=e=>e.reduce((r,n)=>(n.type==="text"&&r.push(n.value),n.type===
256
- "range"&&(n.type="text"),r),[]),t.flatten=(...e)=>{const r=[],n=s=>{for(let i=0;i<s.length;i++){const o=s[i];if(Array.isArray(o)){n(o);continue}o!==void 0&&r.push(o)}return r};return n(e),r}}(hi)),hi}var mi,Ec;function gi(){if(Ec)return mi;Ec=1;const t=pi();return mi=(e,r={})=>{const n=(s,i={})=>{const o=r.escapeInvalid&&t.isInvalidBrace(i),a=s.invalid===!0&&r.escapeInvalid===!0;let c="";if(s.value)return(o||a)&&t.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(const l of s.
257
- nodes)c+=n(l);return c};return n(e)},mi}var yi,Sc;function ig(){return Sc||(Sc=1,yi=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}),yi}var $i,Rc;function og(){if(Rc)return $i;Rc=1;const t=ig(),e=(d,g,p)=>{if(t(d)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(g===void 0||d===g)return String(d);if(t(g)===!1)throw new TypeError("toRegexRange: expected the second argument t\
256
+ "range"&&(n.type="text"),r),[]),t.flatten=(...e)=>{const r=[],n=s=>{for(let i=0;i<s.length;i++){const o=s[i];if(Array.isArray(o)){n(o);continue}o!==void 0&&r.push(o)}return r};return n(e),r}}(hi)),hi}var mi,Sc;function gi(){if(Sc)return mi;Sc=1;const t=pi();return mi=(e,r={})=>{const n=(s,i={})=>{const o=r.escapeInvalid&&t.isInvalidBrace(i),a=s.invalid===!0&&r.escapeInvalid===!0;let c="";if(s.value)return(o||a)&&t.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(const l of s.
257
+ nodes)c+=n(l);return c};return n(e)},mi}var yi,Rc;function ig(){return Rc||(Rc=1,yi=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}),yi}var $i,Ac;function og(){if(Ac)return $i;Ac=1;const t=ig(),e=(d,g,p)=>{if(t(d)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(g===void 0||d===g)return String(d);if(t(g)===!1)throw new TypeError("toRegexRange: expected the second argument t\
258
258
  o be a number.");let m={relaxZeros:!0,...p};typeof m.strictZeros=="boolean"&&(m.relaxZeros=m.strictZeros===!1);let _=String(m.relaxZeros),v=String(m.shorthand),w=String(m.capture),S=String(m.wrap),I=d+":"+g+"="+_+v+w+S;if(e.cache.hasOwnProperty(I))return e.cache[I].result;let F=Math.min(d,g),B=Math.max(d,g);if(Math.abs(F-B)===1){let U=d+"|"+g;return m.capture?`(${U})`:m.wrap===!1?U:`(?:${U})`}let D=b(d)||b(g),M={min:d,max:g,a:F,b:B},j=[],k=[];if(D&&(M.isPadded=D,M.maxLen=String(M.max).length),F<
259
259
  0){let U=B<0?Math.abs(B):1;k=i(U,Math.abs(F),M,m),F=M.a=0}return B>=0&&(j=i(F,B,M,m)),M.negatives=k,M.positives=j,M.result=r(k,j),m.capture===!0?M.result=`(${M.result})`:m.wrap!==!1&&j.length+k.length>1&&(M.result=`(?:${M.result})`),e.cache[I]=M,M.result};function r(d,g,p){let m=o(d,g,"-",!1)||[],_=o(g,d,"",!1)||[],v=o(d,g,"-?",!0)||[];return m.concat(v).concat(_).join("|")}function n(d,g){let p=1,m=1,_=u(d,p),v=new Set([g]);for(;d<=_&&_<=g;)v.add(_),p+=1,_=u(d,p);for(_=f(g+1,m)-1;d<_&&_<=g;)v.add(
260
260
  _),m+=1,_=f(g+1,m)-1;return v=[...v],v.sort(c),v}function s(d,g,p){if(d===g)return{pattern:d,count:[],digits:0};let m=a(d,g),_=m.length,v="",w=0;for(let S=0;S<_;S++){let[I,F]=m[S];I===F?v+=I:I!=="0"||F!=="9"?v+=$(I,F):w++}return w&&(v+=p.shorthand===!0?"\\d":"[0-9]"),{pattern:v,count:[w],digits:_}}function i(d,g,p,m){let _=n(d,g),v=[],w=d,S;for(let I=0;I<_.length;I++){let F=_[I],B=s(String(w),String(F),m),D="";if(!p.isPadded&&S&&S.pattern===B.pattern){S.count.length>1&&S.count.pop(),S.count.push(
261
261
  B.count[0]),S.string=S.pattern+h(S.count),w=F+1;continue}p.isPadded&&(D=y(F,p,m)),B.string=D+B.pattern+h(B.count),v.push(B),w=F+1,S=B}return v}function o(d,g,p,m,_){let v=[];for(let w of d){let{string:S}=w;!m&&!l(g,"string",S)&&v.push(p+S),m&&l(g,"string",S)&&v.push(p+S)}return v}function a(d,g){let p=[];for(let m=0;m<d.length;m++)p.push([d[m],g[m]]);return p}function c(d,g){return d>g?1:g>d?-1:0}function l(d,g,p){return d.some(m=>m[g]===p)}function u(d,g){return Number(String(d).slice(0,-g)+"9".
262
262
  repeat(g))}function f(d,g){return d-d%Math.pow(10,g)}function h(d){let[g=0,p=""]=d;return p||g>1?`{${g+(p?","+p:"")}}`:""}function $(d,g,p){return`[${d}${g-d===1?"":"-"}${g}]`}function b(d){return/^-?(0+)\d/.test(d)}function y(d,g,p){if(!g.isPadded)return d;let m=Math.abs(g.maxLen-String(d).length),_=p.relaxZeros!==!1;switch(m){case 0:return"";case 1:return _?"0?":"0";case 2:return _?"0{0,2}":"00";default:return _?`0{0,${m}}`:`0{${m}}`}}return e.cache={},e.clearCache=()=>e.cache={},$i=e,$i}var _i,
263
- Ac;function Oc(){if(Ac)return _i;Ac=1;const t=_a,e=og(),r=m=>m!==null&&typeof m=="object"&&!Array.isArray(m),n=m=>_=>m===!0?Number(_):String(_),s=m=>typeof m=="number"||typeof m=="string"&&m!=="",i=m=>Number.isInteger(+m),o=m=>{let _=`${m}`,v=-1;if(_[0]==="-"&&(_=_.slice(1)),_==="0")return!1;for(;_[++v]==="0";);return v>0},a=(m,_,v)=>typeof m=="string"||typeof _=="string"?!0:v.stringify===!0,c=(m,_,v)=>{if(_>0){let w=m[0]==="-"?"-":"";w&&(m=m.slice(1)),m=w+m.padStart(w?_-1:_,"0")}return v===!1?String(
263
+ Oc;function Cc(){if(Oc)return _i;Oc=1;const t=_a,e=og(),r=m=>m!==null&&typeof m=="object"&&!Array.isArray(m),n=m=>_=>m===!0?Number(_):String(_),s=m=>typeof m=="number"||typeof m=="string"&&m!=="",i=m=>Number.isInteger(+m),o=m=>{let _=`${m}`,v=-1;if(_[0]==="-"&&(_=_.slice(1)),_==="0")return!1;for(;_[++v]==="0";);return v>0},a=(m,_,v)=>typeof m=="string"||typeof _=="string"?!0:v.stringify===!0,c=(m,_,v)=>{if(_>0){let w=m[0]==="-"?"-":"";w&&(m=m.slice(1)),m=w+m.padStart(w?_-1:_,"0")}return v===!1?String(
264
264
  m):m},l=(m,_)=>{let v=m[0]==="-"?"-":"";for(v&&(m=m.slice(1),_--);m.length<_;)m="0"+m;return v?"-"+m:m},u=(m,_,v)=>{m.negatives.sort((B,D)=>B<D?-1:B>D?1:0),m.positives.sort((B,D)=>B<D?-1:B>D?1:0);let w=_.capture?"":"?:",S="",I="",F;return m.positives.length&&(S=m.positives.map(B=>l(String(B),v)).join("|")),m.negatives.length&&(I=`-(${w}${m.negatives.map(B=>l(String(B),v)).join("|")})`),S&&I?F=`${S}|${I}`:F=S||I,_.wrap?`(${w}${F})`:F},f=(m,_,v,w)=>{if(v)return e(m,_,{wrap:!1,...w});let S=String.fromCharCode(
265
265
  m);if(m===_)return S;let I=String.fromCharCode(_);return`[${S}-${I}]`},h=(m,_,v)=>{if(Array.isArray(m)){let w=v.wrap===!0,S=v.capture?"":"?:";return w?`(${S}${m.join("|")})`:m.join("|")}return e(m,_,v)},$=(...m)=>new RangeError("Invalid range arguments: "+t.inspect(...m)),b=(m,_,v)=>{if(v.strictRanges===!0)throw $([m,_]);return[]},y=(m,_)=>{if(_.strictRanges===!0)throw new TypeError(`Expected step "${m}" to be a number`);return[]},d=(m,_,v=1,w={})=>{let S=Number(m),I=Number(_);if(!Number.isInteger(
266
266
  S)||!Number.isInteger(I)){if(w.strictRanges===!0)throw $([m,_]);return[]}S===0&&(S=0),I===0&&(I=0);let F=S>I,B=String(m),D=String(_),M=String(v);v=Math.max(Math.abs(v),1);let j=o(B)||o(D)||o(M),k=j?Math.max(B.length,D.length,M.length):0,U=j===!1&&a(m,_,w)===!1,Y=w.transform||n(U);if(w.toRegex&&v===1)return f(l(m,k),l(_,k),!0,w);let G={negatives:[],positives:[]},J=A=>G[A<0?"negatives":"positives"].push(Math.abs(A)),se=[],H=0;for(;F?S>=I:S<=I;)w.toRegex===!0&&v>1?J(S):se.push(c(Y(S,H),k,U)),S=F?S-
267
267
  v:S+v,H++;return w.toRegex===!0?v>1?u(G,w,k):h(se,null,{wrap:!1,...w}):se},g=(m,_,v=1,w={})=>{if(!i(m)&&m.length>1||!i(_)&&_.length>1)return b(m,_,w);let S=w.transform||(U=>String.fromCharCode(U)),I=`${m}`.charCodeAt(0),F=`${_}`.charCodeAt(0),B=I>F,D=Math.min(I,F),M=Math.max(I,F);if(w.toRegex&&v===1)return f(D,M,!1,w);let j=[],k=0;for(;B?I>=F:I<=F;)j.push(S(I,k)),I=B?I-v:I+v,k++;return w.toRegex===!0?h(j,null,{wrap:!1,options:w}):j},p=(m,_,v,w={})=>{if(_==null&&s(m))return[m];if(!s(m)||!s(_))return b(
268
- m,_,w);if(typeof v=="function")return p(m,_,1,{transform:v});if(r(v))return p(m,_,0,v);let S={...w};return S.capture===!0&&(S.wrap=!0),v=v||S.step||1,i(v)?i(m)&&i(_)?d(m,_,v,S):g(m,_,Math.max(Math.abs(v),1),S):v!=null&&!r(v)?y(v,S):p(m,_,1,v)};return _i=p,_i}var vi,Cc;function ag(){if(Cc)return vi;Cc=1;const t=Oc(),e=pi();return vi=(n,s={})=>{const i=(o,a={})=>{const c=e.isInvalidBrace(a),l=o.invalid===!0&&s.escapeInvalid===!0,u=c===!0||l===!0,f=s.escapeInvalid===!0?"\\":"";let h="";if(o.isOpen===
268
+ m,_,w);if(typeof v=="function")return p(m,_,1,{transform:v});if(r(v))return p(m,_,0,v);let S={...w};return S.capture===!0&&(S.wrap=!0),v=v||S.step||1,i(v)?i(m)&&i(_)?d(m,_,v,S):g(m,_,Math.max(Math.abs(v),1),S):v!=null&&!r(v)?y(v,S):p(m,_,1,v)};return _i=p,_i}var vi,Pc;function ag(){if(Pc)return vi;Pc=1;const t=Cc(),e=pi();return vi=(n,s={})=>{const i=(o,a={})=>{const c=e.isInvalidBrace(a),l=o.invalid===!0&&s.escapeInvalid===!0,u=c===!0||l===!0,f=s.escapeInvalid===!0?"\\":"";let h="";if(o.isOpen===
269
269
  !0)return f+o.value;if(o.isClose===!0)return console.log("node.isClose",f,o.value),f+o.value;if(o.type==="open")return u?f+o.value:"(";if(o.type==="close")return u?f+o.value:")";if(o.type==="comma")return o.prev.type==="comma"?"":u?o.value:"|";if(o.value)return o.value;if(o.nodes&&o.ranges>0){const $=e.reduce(o.nodes),b=t(...$,{...s,wrap:!1,toRegex:!0,strictZeros:!0});if(b.length!==0)return $.length>1&&b.length>1?`(${b})`:b}if(o.nodes)for(const $ of o.nodes)h+=i($,o);return h};return i(n)},vi}var bi,
270
- Pc;function cg(){if(Pc)return bi;Pc=1;const t=Oc(),e=gi(),r=pi(),n=(i="",o="",a=!1)=>{const c=[];if(i=[].concat(i),o=[].concat(o),!o.length)return i;if(!i.length)return a?r.flatten(o).map(l=>`{${l}}`):o;for(const l of i)if(Array.isArray(l))for(const u of l)c.push(n(u,o,a));else for(let u of o)a===!0&&typeof u=="string"&&(u=`{${u}}`),c.push(Array.isArray(u)?n(l,u,a):l+u);return r.flatten(c)};return bi=(i,o={})=>{const a=o.rangeLimit===void 0?1e3:o.rangeLimit,c=(l,u={})=>{l.queue=[];let f=u,h=u.queue;
270
+ Ic;function cg(){if(Ic)return bi;Ic=1;const t=Cc(),e=gi(),r=pi(),n=(i="",o="",a=!1)=>{const c=[];if(i=[].concat(i),o=[].concat(o),!o.length)return i;if(!i.length)return a?r.flatten(o).map(l=>`{${l}}`):o;for(const l of i)if(Array.isArray(l))for(const u of l)c.push(n(u,o,a));else for(let u of o)a===!0&&typeof u=="string"&&(u=`{${u}}`),c.push(Array.isArray(u)?n(l,u,a):l+u);return r.flatten(c)};return bi=(i,o={})=>{const a=o.rangeLimit===void 0?1e3:o.rangeLimit,c=(l,u={})=>{l.queue=[];let f=u,h=u.queue;
271
271
  for(;f.type!=="brace"&&f.type!=="root"&&f.parent;)f=f.parent,h=f.queue;if(l.invalid||l.dollar){h.push(n(h.pop(),e(l,o)));return}if(l.type==="brace"&&l.invalid!==!0&&l.nodes.length===2){h.push(n(h.pop(),["{}"]));return}if(l.nodes&&l.ranges>0){const d=r.reduce(l.nodes);if(r.exceedsLimit(...d,o.step,a))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let g=t(...d,o);g.length===0&&(g=e(l,o)),h.push(n(h.pop(),g)),l.nodes=[];return}
272
- const $=r.encloseBrace(l);let b=l.queue,y=l;for(;y.type!=="brace"&&y.type!=="root"&&y.parent;)y=y.parent,b=y.queue;for(let d=0;d<l.nodes.length;d++){const g=l.nodes[d];if(g.type==="comma"&&l.type==="brace"){d===1&&b.push(""),b.push("");continue}if(g.type==="close"){h.push(n(h.pop(),b,$));continue}if(g.value&&g.type!=="open"){b.push(n(b.pop(),g.value));continue}g.nodes&&c(g,l)}return b};return r.flatten(c(i))},bi}var wi,Ic;function ug(){return Ic||(Ic=1,wi={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"\
272
+ const $=r.encloseBrace(l);let b=l.queue,y=l;for(;y.type!=="brace"&&y.type!=="root"&&y.parent;)y=y.parent,b=y.queue;for(let d=0;d<l.nodes.length;d++){const g=l.nodes[d];if(g.type==="comma"&&l.type==="brace"){d===1&&b.push(""),b.push("");continue}if(g.type==="close"){h.push(n(h.pop(),b,$));continue}if(g.value&&g.type!=="open"){b.push(n(b.pop(),g.value));continue}g.nodes&&c(g,l)}return b};return r.flatten(c(i))},bi}var wi,Nc;function ug(){return Nc||(Nc=1,wi={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"\
273
273
  A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"\
274
274
  {",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
275
- `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}),wi}var Ei,Nc;function lg(){if(Nc)return Ei;Nc=1;const t=gi(),{MAX_LENGTH:e,CHAR_BACKSLASH:r,CHAR_BACKTICK:n,CHAR_COMMA:s,CHAR_DOT:i,CHAR_LEFT_PARENTHESES:o,CHAR_RIGHT_PARENTHESES:a,
275
+ `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}),wi}var Ei,Tc;function lg(){if(Tc)return Ei;Tc=1;const t=gi(),{MAX_LENGTH:e,CHAR_BACKSLASH:r,CHAR_BACKTICK:n,CHAR_COMMA:s,CHAR_DOT:i,CHAR_LEFT_PARENTHESES:o,CHAR_RIGHT_PARENTHESES:a,
276
276
  CHAR_LEFT_CURLY_BRACE:c,CHAR_RIGHT_CURLY_BRACE:l,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_RIGHT_SQUARE_BRACKET:f,CHAR_DOUBLE_QUOTE:h,CHAR_SINGLE_QUOTE:$,CHAR_NO_BREAK_SPACE:b,CHAR_ZERO_WIDTH_NOBREAK_SPACE:y}=ug();return Ei=(g,p={})=>{if(typeof g!="string")throw new TypeError("Expected a string");const m=p||{},_=typeof m.maxLength=="number"?Math.min(e,m.maxLength):e;if(g.length>_)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${_})`);const v={type:"root",input:g,nodes:[]},w=[v];
277
277
  let S=v,I=v,F=0;const B=g.length;let D=0,M=0,j;const k=()=>g[D++],U=Y=>{if(Y.type==="text"&&I.type==="dot"&&(I.type="text"),I&&I.type==="text"&&Y.type==="text"){I.value+=Y.value;return}return S.nodes.push(Y),Y.parent=S,Y.prev=I,I=Y,Y};for(U({type:"bos"});D<B;)if(S=w[w.length-1],j=k(),!(j===y||j===b)){if(j===r){U({type:"text",value:(p.keepEscaping?j:"")+k()});continue}if(j===f){U({type:"text",value:"\\"+j});continue}if(j===u){F++;let Y;for(;D<B&&(Y=k());){if(j+=Y,Y===u){F++;continue}if(Y===r){j+=
278
278
  k();continue}if(Y===f&&(F--,F===0))break}U({type:"text",value:j});continue}if(j===o){S=U({type:"paren",nodes:[]}),w.push(S),U({type:"text",value:j});continue}if(j===a){if(S.type!=="paren"){U({type:"text",value:j});continue}S=w.pop(),U({type:"text",value:j}),S=w[w.length-1];continue}if(j===h||j===$||j===n){const Y=j;let G;for(p.keepQuotes!==!0&&(j="");D<B&&(G=k());){if(G===r){j+=G+k();continue}if(G===Y){p.keepQuotes===!0&&(j+=G);break}j+=G}U({type:"text",value:j});continue}if(j===c){M++;const G={
279
279
  type:"brace",open:!0,close:!1,dollar:I.value&&I.value.slice(-1)==="$"||S.dollar===!0,depth:M,commas:0,ranges:0,nodes:[]};S=U(G),w.push(S),U({type:"open",value:j});continue}if(j===l){if(S.type!=="brace"){U({type:"text",value:j});continue}const Y="close";S=w.pop(),S.close=!0,U({type:Y,value:j}),M--,S=w[w.length-1];continue}if(j===s&&M>0){if(S.ranges>0){S.ranges=0;const Y=S.nodes.shift();S.nodes=[Y,{type:"text",value:t(S)}]}U({type:"comma",value:j}),S.commas++;continue}if(j===i&&M>0&&S.commas===0){
280
280
  const Y=S.nodes;if(M===0||Y.length===0){U({type:"text",value:j});continue}if(I.type==="dot"){if(S.range=[],I.value+=j,I.type="range",S.nodes.length!==3&&S.nodes.length!==5){S.invalid=!0,S.ranges=0,I.type="text";continue}S.ranges++,S.args=[];continue}if(I.type==="range"){Y.pop();const G=Y[Y.length-1];G.value+=I.value+j,I=G,S.ranges--;continue}U({type:"dot",value:j});continue}U({type:"text",value:j})}do if(S=w.pop(),S.type!=="root"){S.nodes.forEach(J=>{J.nodes||(J.type==="open"&&(J.isOpen=!0),J.type===
281
- "close"&&(J.isClose=!0),J.nodes||(J.type="text"),J.invalid=!0)});const Y=w[w.length-1],G=Y.nodes.indexOf(S);Y.nodes.splice(G,1,...S.nodes)}while(w.length>0);return U({type:"eos"}),v},Ei}var Si,Tc;function fg(){if(Tc)return Si;Tc=1;const t=gi(),e=ag(),r=cg(),n=lg(),s=(i,o={})=>{let a=[];if(Array.isArray(i))for(const c of i){const l=s.create(c,o);Array.isArray(l)?a.push(...l):a.push(l)}else a=[].concat(s.create(i,o));return o&&o.expand===!0&&o.nodupes===!0&&(a=[...new Set(a)]),a};return s.parse=(i,o={})=>n(
282
- i,o),s.stringify=(i,o={})=>t(typeof i=="string"?s.parse(i,o):i,o),s.compile=(i,o={})=>(typeof i=="string"&&(i=s.parse(i,o)),e(i,o)),s.expand=(i,o={})=>{typeof i=="string"&&(i=s.parse(i,o));let a=r(i,o);return o.noempty===!0&&(a=a.filter(Boolean)),o.nodupes===!0&&(a=[...new Set(a)]),a},s.create=(i,o={})=>i===""||i.length<3?[i]:o.expand!==!0?s.compile(i,o):s.expand(i,o),Si=s,Si}var Ri={},Ai,jc;function un(){if(jc)return Ai;jc=1;const t=Ts,e="\\\\/",r=`[^${e}]`,n="\\.",s="\\+",i="\\?",o="\\/",a="(?\
281
+ "close"&&(J.isClose=!0),J.nodes||(J.type="text"),J.invalid=!0)});const Y=w[w.length-1],G=Y.nodes.indexOf(S);Y.nodes.splice(G,1,...S.nodes)}while(w.length>0);return U({type:"eos"}),v},Ei}var Si,jc;function fg(){if(jc)return Si;jc=1;const t=gi(),e=ag(),r=cg(),n=lg(),s=(i,o={})=>{let a=[];if(Array.isArray(i))for(const c of i){const l=s.create(c,o);Array.isArray(l)?a.push(...l):a.push(l)}else a=[].concat(s.create(i,o));return o&&o.expand===!0&&o.nodupes===!0&&(a=[...new Set(a)]),a};return s.parse=(i,o={})=>n(
282
+ i,o),s.stringify=(i,o={})=>t(typeof i=="string"?s.parse(i,o):i,o),s.compile=(i,o={})=>(typeof i=="string"&&(i=s.parse(i,o)),e(i,o)),s.expand=(i,o={})=>{typeof i=="string"&&(i=s.parse(i,o));let a=r(i,o);return o.noempty===!0&&(a=a.filter(Boolean)),o.nodupes===!0&&(a=[...new Set(a)]),a},s.create=(i,o={})=>i===""||i.length<3?[i]:o.expand!==!0?s.compile(i,o):s.expand(i,o),Si=s,Si}var Ri={},Ai,Lc;function un(){if(Lc)return Ai;Lc=1;const t=Ts,e="\\\\/",r=`[^${e}]`,n="\\.",s="\\+",i="\\?",o="\\/",a="(?\
283
283
  =.)",c="[^/]",l=`(?:${o}|$)`,u=`(?:^|${o})`,f=`${n}{1,2}${l}`,h=`(?!${n})`,$=`(?!${u}${f})`,b=`(?!${n}{0,1}${l})`,y=`(?!${f})`,d=`[^.${o}]`,g=`${c}*?`,p={DOT_LITERAL:n,PLUS_LITERAL:s,QMARK_LITERAL:i,SLASH_LITERAL:o,ONE_CHAR:a,QMARK:c,END_ANCHOR:l,DOTS_SLASH:f,NO_DOT:h,NO_DOTS:$,NO_DOT_SLASH:b,NO_DOTS_SLASH:y,QMARK_NO_DOT:d,STAR:g,START_ANCHOR:u},m={...p,SLASH_LITERAL:`[${e}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,
284
284
  NO_DOT_SLASH:`(?!${n}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`},_={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return Ai={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:_,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,
285
285
  REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,
286
286
  CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,
287
- CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:t.sep,extglobChars(v){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${v.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(v){return v===!0?m:p}},Ai}var Lc;function ln(){return Lc||(Lc=1,function(t){const e=Ts,r=process.
287
+ CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:t.sep,extglobChars(v){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${v.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(v){return v===!0?m:p}},Ai}var Dc;function ln(){return Dc||(Dc=1,function(t){const e=Ts,r=process.
288
288
  platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:o}=un();t.isObject=a=>a!==null&&typeof a=="object"&&!Array.isArray(a),t.hasRegexChars=a=>i.test(a),t.isRegexChar=a=>a.length===1&&t.hasRegexChars(a),t.escapeRegex=a=>a.replace(o,"\\$1"),t.toPosixSlashes=a=>a.replace(n,"/"),t.removeBackslashes=a=>a.replace(s,c=>c==="\\"?"":c),t.supportsLookbehinds=()=>{const a=process.version.slice(1).split(".").map(Number);return a.length===3&&a[0]>=9||
289
- a[0]===8&&a[1]>=10},t.isWindows=a=>a&&typeof a.windows=="boolean"?a.windows:r===!0||e.sep==="\\",t.escapeLast=(a,c,l)=>{const u=a.lastIndexOf(c,l);return u===-1?a:a[u-1]==="\\"?t.escapeLast(a,c,u-1):`${a.slice(0,u)}\\${a.slice(u)}`},t.removePrefix=(a,c={})=>{let l=a;return l.startsWith("./")&&(l=l.slice(2),c.prefix="./"),l},t.wrapOutput=(a,c={},l={})=>{const u=l.contains?"":"^",f=l.contains?"":"$";let h=`${u}(?:${a})${f}`;return c.negated===!0&&(h=`(?:^(?!${h}).*$)`),h}}(Ri)),Ri}var Oi,Dc;function dg(){
290
- if(Dc)return Oi;Dc=1;const t=ln(),{CHAR_ASTERISK:e,CHAR_AT:r,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:s,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:l,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:f,CHAR_QUESTION_MARK:h,CHAR_RIGHT_CURLY_BRACE:$,CHAR_RIGHT_PARENTHESES:b,CHAR_RIGHT_SQUARE_BRACKET:y}=un(),d=m=>m===a||m===n,g=m=>{m.isPrefix!==!0&&(m.depth=m.isGlobstar?1/0:1)};return Oi=(m,_)=>{const v=_||{},w=m.length-1,S=v.parts===!0||v.scanToEnd===!0,I=[],F=[],
289
+ a[0]===8&&a[1]>=10},t.isWindows=a=>a&&typeof a.windows=="boolean"?a.windows:r===!0||e.sep==="\\",t.escapeLast=(a,c,l)=>{const u=a.lastIndexOf(c,l);return u===-1?a:a[u-1]==="\\"?t.escapeLast(a,c,u-1):`${a.slice(0,u)}\\${a.slice(u)}`},t.removePrefix=(a,c={})=>{let l=a;return l.startsWith("./")&&(l=l.slice(2),c.prefix="./"),l},t.wrapOutput=(a,c={},l={})=>{const u=l.contains?"":"^",f=l.contains?"":"$";let h=`${u}(?:${a})${f}`;return c.negated===!0&&(h=`(?:^(?!${h}).*$)`),h}}(Ri)),Ri}var Oi,kc;function dg(){
290
+ if(kc)return Oi;kc=1;const t=ln(),{CHAR_ASTERISK:e,CHAR_AT:r,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:s,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:l,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:f,CHAR_QUESTION_MARK:h,CHAR_RIGHT_CURLY_BRACE:$,CHAR_RIGHT_PARENTHESES:b,CHAR_RIGHT_SQUARE_BRACKET:y}=un(),d=m=>m===a||m===n,g=m=>{m.isPrefix!==!0&&(m.depth=m.isGlobstar?1/0:1)};return Oi=(m,_)=>{const v=_||{},w=m.length-1,S=v.parts===!0||v.scanToEnd===!0,I=[],F=[],
291
291
  B=[];let D=m,M=-1,j=0,k=0,U=!1,Y=!1,G=!1,J=!1,se=!1,H=!1,A=!1,V=!1,x=!1,E=!1,R=0,C,X,Z={value:"",depth:0,isGlob:!1};const ie=()=>M>=w,oe=()=>D.charCodeAt(M+1),L=()=>(C=X,D.charCodeAt(++M));for(;M<w;){X=L();let T;if(X===n){A=Z.backslashes=!0,X=L(),X===c&&(H=!0);continue}if(H===!0||X===c){for(R++;ie()!==!0&&(X=L());){if(X===n){A=Z.backslashes=!0,L();continue}if(X===c){R++;continue}if(H!==!0&&X===i&&(X=L())===i){if(U=Z.isBrace=!0,G=Z.isGlob=!0,E=!0,S===!0)continue;break}if(H!==!0&&X===s){if(U=Z.isBrace=
292
292
  !0,G=Z.isGlob=!0,E=!0,S===!0)continue;break}if(X===$&&(R--,R===0)){H=!1,U=Z.isBrace=!0,E=!0;break}}if(S===!0)continue;break}if(X===a){if(I.push(M),F.push(Z),Z={value:"",depth:0,isGlob:!1},E===!0)continue;if(C===i&&M===j+1){j+=2;continue}k=M+1;continue}if(v.noext!==!0&&(X===f||X===r||X===e||X===h||X===o)===!0&&oe()===l){if(G=Z.isGlob=!0,J=Z.isExtglob=!0,E=!0,X===o&&M===j&&(x=!0),S===!0){for(;ie()!==!0&&(X=L());){if(X===n){A=Z.backslashes=!0,X=L();continue}if(X===b){G=Z.isGlob=!0,E=!0;break}}continue}
293
293
  break}if(X===e){if(C===e&&(se=Z.isGlobstar=!0),G=Z.isGlob=!0,E=!0,S===!0)continue;break}if(X===h){if(G=Z.isGlob=!0,E=!0,S===!0)continue;break}if(X===u){for(;ie()!==!0&&(T=L());){if(T===n){A=Z.backslashes=!0,L();continue}if(T===y){Y=Z.isBracket=!0,G=Z.isGlob=!0,E=!0;break}}if(S===!0)continue;break}if(v.nonegate!==!0&&X===o&&M===j){V=Z.negated=!0,j++;continue}if(v.noparen!==!0&&X===l){if(G=Z.isGlob=!0,S===!0){for(;ie()!==!0&&(X=L());){if(X===l){A=Z.backslashes=!0,X=L();continue}if(X===b){E=!0;break}}
294
294
  continue}break}if(G===!0){if(E=!0,S===!0)continue;break}}v.noext===!0&&(J=!1,G=!1);let q=D,Q="",ne="";j>0&&(Q=D.slice(0,j),D=D.slice(j),k-=j),q&&G===!0&&k>0?(q=D.slice(0,k),ne=D.slice(k)):G===!0?(q="",ne=D):q=D,q&&q!==""&&q!=="/"&&q!==D&&d(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),v.unescape===!0&&(ne&&(ne=t.removeBackslashes(ne)),q&&A===!0&&(q=t.removeBackslashes(q)));const P={prefix:Q,input:m,start:j,base:q,glob:ne,isBrace:U,isBracket:Y,isGlob:G,isExtglob:J,isGlobstar:se,negated:V,negatedExtglob:x};
295
- if(v.tokens===!0&&(P.maxDepth=0,d(X)||F.push(Z),P.tokens=F),v.parts===!0||v.tokens===!0){let T;for(let ee=0;ee<I.length;ee++){const W=T?T+1:j,N=I[ee],te=m.slice(W,N);v.tokens&&(ee===0&&j!==0?(F[ee].isPrefix=!0,F[ee].value=Q):F[ee].value=te,g(F[ee]),P.maxDepth+=F[ee].depth),(ee!==0||te!=="")&&B.push(te),T=N}if(T&&T+1<m.length){const ee=m.slice(T+1);B.push(ee),v.tokens&&(F[F.length-1].value=ee,g(F[F.length-1]),P.maxDepth+=F[F.length-1].depth)}P.slashes=I,P.parts=B}return P},Oi}var Ci,kc;function hg(){
296
- if(kc)return Ci;kc=1;const t=un(),e=ln(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:o}=t,a=(u,f)=>{if(typeof f.expandRange=="function")return f.expandRange(...u,f);u.sort();const h=`[${u.join("-")}]`;try{new RegExp(h)}catch{return u.map(b=>e.escapeRegex(b)).join("..")}return h},c=(u,f)=>`Missing ${u}: "${f}" - use "\\\\${f}" to match literal characters`,l=(u,f)=>{if(typeof u!="string")throw new TypeError("Expected a string");u=o[u]||u;
295
+ if(v.tokens===!0&&(P.maxDepth=0,d(X)||F.push(Z),P.tokens=F),v.parts===!0||v.tokens===!0){let T;for(let ee=0;ee<I.length;ee++){const W=T?T+1:j,N=I[ee],te=m.slice(W,N);v.tokens&&(ee===0&&j!==0?(F[ee].isPrefix=!0,F[ee].value=Q):F[ee].value=te,g(F[ee]),P.maxDepth+=F[ee].depth),(ee!==0||te!=="")&&B.push(te),T=N}if(T&&T+1<m.length){const ee=m.slice(T+1);B.push(ee),v.tokens&&(F[F.length-1].value=ee,g(F[F.length-1]),P.maxDepth+=F[F.length-1].depth)}P.slashes=I,P.parts=B}return P},Oi}var Ci,xc;function hg(){
296
+ if(xc)return Ci;xc=1;const t=un(),e=ln(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:o}=t,a=(u,f)=>{if(typeof f.expandRange=="function")return f.expandRange(...u,f);u.sort();const h=`[${u.join("-")}]`;try{new RegExp(h)}catch{return u.map(b=>e.escapeRegex(b)).join("..")}return h},c=(u,f)=>`Missing ${u}: "${f}" - use "\\\\${f}" to match literal characters`,l=(u,f)=>{if(typeof u!="string")throw new TypeError("Expected a string");u=o[u]||u;
297
297
  const h={...f},$=typeof h.maxLength=="number"?Math.min(r,h.maxLength):r;let b=u.length;if(b>$)throw new SyntaxError(`Input length: ${b}, exceeds maximum allowed length: ${$}`);const y={type:"bos",value:"",output:h.prepend||""},d=[y],g=h.capture?"":"?:",p=e.isWindows(f),m=t.globChars(p),_=t.extglobChars(m),{DOT_LITERAL:v,PLUS_LITERAL:w,SLASH_LITERAL:S,ONE_CHAR:I,DOTS_SLASH:F,NO_DOT:B,NO_DOT_SLASH:D,NO_DOTS_SLASH:M,QMARK:j,QMARK_NO_DOT:k,STAR:U,START_ANCHOR:Y}=m,G=N=>`(${g}(?:(?!${Y}${N.dot?F:v}).\
298
298
  )*?)`,J=h.dot?"":B,se=h.dot?j:k;let H=h.bash===!0?G(h):U;h.capture&&(H=`(${H})`),typeof h.noext=="boolean"&&(h.noextglob=h.noext);const A={input:u,index:-1,start:0,dot:h.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:d};u=e.removePrefix(u,A),b=u.length;const V=[],x=[],E=[];let R=y,C;const X=()=>A.index===b-1,Z=A.peek=(N=1)=>u[A.index+N],ie=A.advance=()=>u[++A.index]||"",oe=()=>u.slice(A.index+1),L=(N="",te=0)=>{A.consumed+=
299
299
  N,A.index+=te},q=N=>{A.output+=N.output!=null?N.output:N.value,L(N.value)},Q=()=>{let N=1;for(;Z()==="!"&&(Z(2)!=="("||Z(3)==="?");)ie(),A.start++,N++;return N%2===0?!1:(A.negated=!0,A.start++,!0)},ne=N=>{A[N]++,E.push(N)},P=N=>{A[N]--,E.pop()},T=N=>{if(R.type==="globstar"){const te=A.braces>0&&(N.type==="comma"||N.type==="brace"),z=N.extglob===!0||V.length&&(N.type==="pipe"||N.type==="paren");N.type!=="slash"&&N.type!=="paren"&&!te&&!z&&(A.output=A.output.slice(0,-R.output.length),R.type="star",
@@ -317,23 +317,23 @@ te.output=".*?",(R.type==="bos"||R.type==="slash")&&(te.output=J+te.output),T(te
317
317
  P("brackets")}for(;A.parens>0;){if(h.strictBrackets===!0)throw new SyntaxError(c("closing",")"));A.output=e.escapeLast(A.output,"("),P("parens")}for(;A.braces>0;){if(h.strictBrackets===!0)throw new SyntaxError(c("closing","}"));A.output=e.escapeLast(A.output,"{"),P("braces")}if(h.strictSlashes!==!0&&(R.type==="star"||R.type==="bracket")&&T({type:"maybe_slash",value:"",output:`${S}?`}),A.backtrack===!0){A.output="";for(const N of A.tokens)A.output+=N.output!=null?N.output:N.value,N.suffix&&(A.output+=
318
318
  N.suffix)}return A};return l.fastpaths=(u,f)=>{const h={...f},$=typeof h.maxLength=="number"?Math.min(r,h.maxLength):r,b=u.length;if(b>$)throw new SyntaxError(`Input length: ${b}, exceeds maximum allowed length: ${$}`);u=o[u]||u;const y=e.isWindows(f),{DOT_LITERAL:d,SLASH_LITERAL:g,ONE_CHAR:p,DOTS_SLASH:m,NO_DOT:_,NO_DOTS:v,NO_DOTS_SLASH:w,STAR:S,START_ANCHOR:I}=t.globChars(y),F=h.dot?v:_,B=h.dot?w:_,D=h.capture?"":"?:",M={negated:!1,prefix:""};let j=h.bash===!0?".*?":S;h.capture&&(j=`(${j})`);const k=J=>J.
319
319
  noglobstar===!0?j:`(${D}(?:(?!${I}${J.dot?m:d}).)*?)`,U=J=>{switch(J){case"*":return`${F}${p}${j}`;case".*":return`${d}${p}${j}`;case"*.*":return`${F}${j}${d}${p}${j}`;case"*/*":return`${F}${j}${g}${p}${B}${j}`;case"**":return F+k(h);case"**/*":return`(?:${F}${k(h)}${g})?${B}${p}${j}`;case"**/*.*":return`(?:${F}${k(h)}${g})?${B}${j}${d}${p}${j}`;case"**/.*":return`(?:${F}${k(h)}${g})?${d}${p}${j}`;default:{const se=/^(.*?)\.(\w+)$/.exec(J);if(!se)return;const H=U(se[1]);return H?H+d+se[2]:void 0}}},
320
- Y=e.removePrefix(u,M);let G=U(Y);return G&&h.strictSlashes!==!0&&(G+=`${g}?`),G},Ci=l,Ci}var Pi,xc;function pg(){if(xc)return Pi;xc=1;const t=Ts,e=dg(),r=hg(),n=ln(),s=un(),i=a=>a&&typeof a=="object"&&!Array.isArray(a),o=(a,c,l=!1)=>{if(Array.isArray(a)){const g=a.map(m=>o(m,c,l));return m=>{for(const _ of g){const v=_(m);if(v)return v}return!1}}const u=i(a)&&a.tokens&&a.input;if(a===""||typeof a!="string"&&!u)throw new TypeError("Expected pattern to be a non-empty string");const f=c||{},h=n.isWindows(
320
+ Y=e.removePrefix(u,M);let G=U(Y);return G&&h.strictSlashes!==!0&&(G+=`${g}?`),G},Ci=l,Ci}var Pi,Mc;function pg(){if(Mc)return Pi;Mc=1;const t=Ts,e=dg(),r=hg(),n=ln(),s=un(),i=a=>a&&typeof a=="object"&&!Array.isArray(a),o=(a,c,l=!1)=>{if(Array.isArray(a)){const g=a.map(m=>o(m,c,l));return m=>{for(const _ of g){const v=_(m);if(v)return v}return!1}}const u=i(a)&&a.tokens&&a.input;if(a===""||typeof a!="string"&&!u)throw new TypeError("Expected pattern to be a non-empty string");const f=c||{},h=n.isWindows(
321
321
  c),$=u?o.compileRe(a,c):o.makeRe(a,c,!1,!0),b=$.state;delete $.state;let y=()=>!1;if(f.ignore){const g={...c,ignore:null,onMatch:null,onResult:null};y=o(f.ignore,g,l)}const d=(g,p=!1)=>{const{isMatch:m,match:_,output:v}=o.test(g,$,c,{glob:a,posix:h}),w={glob:a,state:b,regex:$,posix:h,input:g,output:v,match:_,isMatch:m};return typeof f.onResult=="function"&&f.onResult(w),m===!1?(w.isMatch=!1,p?w:!1):y(g)?(typeof f.onIgnore=="function"&&f.onIgnore(w),w.isMatch=!1,p?w:!1):(typeof f.onMatch=="functi\
322
322
  on"&&f.onMatch(w),p?w:!0)};return l&&(d.state=b),d};return o.test=(a,c,l,{glob:u,posix:f}={})=>{if(typeof a!="string")throw new TypeError("Expected input to be a string");if(a==="")return{isMatch:!1,output:""};const h=l||{},$=h.format||(f?n.toPosixSlashes:null);let b=a===u,y=b&&$?$(a):a;return b===!1&&(y=$?$(a):a,b=y===u),(b===!1||h.capture===!0)&&(h.matchBase===!0||h.basename===!0?b=o.matchBase(a,c,l,f):b=c.exec(y)),{isMatch:!!b,match:b,output:y}},o.matchBase=(a,c,l,u=n.isWindows(l))=>(c instanceof
323
323
  RegExp?c:o.makeRe(c,l)).test(t.basename(a)),o.isMatch=(a,c,l)=>o(c,l)(a),o.parse=(a,c)=>Array.isArray(a)?a.map(l=>o.parse(l,c)):r(a,{...c,fastpaths:!1}),o.scan=(a,c)=>e(a,c),o.compileRe=(a,c,l=!1,u=!1)=>{if(l===!0)return a.output;const f=c||{},h=f.contains?"":"^",$=f.contains?"":"$";let b=`${h}(?:${a.output})${$}`;a&&a.negated===!0&&(b=`^(?!${b}).*$`);const y=o.toRegex(b,c);return u===!0&&(y.state=a),y},o.makeRe=(a,c={},l=!1,u=!1)=>{if(!a||typeof a!="string")throw new TypeError("Expected a non-e\
324
- mpty string");let f={negated:!1,fastpaths:!0};return c.fastpaths!==!1&&(a[0]==="."||a[0]==="*")&&(f.output=r.fastpaths(a,c)),f.output||(f=r(a,c)),o.compileRe(f,c,l,u)},o.toRegex=(a,c)=>{try{const l=c||{};return new RegExp(a,l.flags||(l.nocase?"i":""))}catch(l){if(c&&c.debug===!0)throw l;return/$^/}},o.constants=s,Pi=o,Pi}var Ii,Mc;function mg(){return Mc||(Mc=1,Ii=pg()),Ii}var Ni,qc;function gg(){if(qc)return Ni;qc=1;const t=_a,e=fg(),r=mg(),n=ln(),s=a=>a===""||a==="./",i=a=>{const c=a.indexOf("\
324
+ mpty string");let f={negated:!1,fastpaths:!0};return c.fastpaths!==!1&&(a[0]==="."||a[0]==="*")&&(f.output=r.fastpaths(a,c)),f.output||(f=r(a,c)),o.compileRe(f,c,l,u)},o.toRegex=(a,c)=>{try{const l=c||{};return new RegExp(a,l.flags||(l.nocase?"i":""))}catch(l){if(c&&c.debug===!0)throw l;return/$^/}},o.constants=s,Pi=o,Pi}var Ii,qc;function mg(){return qc||(qc=1,Ii=pg()),Ii}var Ni,Uc;function gg(){if(Uc)return Ni;Uc=1;const t=_a,e=fg(),r=mg(),n=ln(),s=a=>a===""||a==="./",i=a=>{const c=a.indexOf("\
325
325
  {");return c>-1&&a.indexOf("}",c)>-1},o=(a,c,l)=>{c=[].concat(c),a=[].concat(a);let u=new Set,f=new Set,h=new Set,$=0,b=g=>{h.add(g.output),l&&l.onResult&&l.onResult(g)};for(let g=0;g<c.length;g++){let p=r(String(c[g]),{...l,onResult:b},!0),m=p.state.negated||p.state.negatedExtglob;m&&$++;for(let _ of a){let v=p(_,!0);(m?!v.isMatch:v.isMatch)&&(m?u.add(v.output):(u.delete(v.output),f.add(v.output)))}}let d=($===c.length?[...h]:[...f]).filter(g=>!u.has(g));if(l&&d.length===0){if(l.failglob===!0)throw new Error(
326
326
  `No matches found for "${c.join(", ")}"`);if(l.nonull===!0||l.nullglob===!0)return l.unescape?c.map(g=>g.replace(/\\/g,"")):c}return d};return o.match=o,o.matcher=(a,c)=>r(a,c),o.isMatch=(a,c,l)=>r(c,l)(a),o.any=o.isMatch,o.not=(a,c,l={})=>{c=[].concat(c).map(String);let u=new Set,f=[],h=b=>{l.onResult&&l.onResult(b),f.push(b.output)},$=new Set(o(a,c,{...l,onResult:h}));for(let b of f)$.has(b)||u.add(b);return[...u]},o.contains=(a,c,l)=>{if(typeof a!="string")throw new TypeError(`Expected a stri\
327
327
  ng: "${t.inspect(a)}"`);if(Array.isArray(c))return c.some(u=>o.contains(a,u,l));if(typeof c=="string"){if(s(a)||s(c))return!1;if(a.includes(c)||a.startsWith("./")&&a.slice(2).includes(c))return!0}return o.isMatch(a,c,{...l,contains:!0})},o.matchKeys=(a,c,l)=>{if(!n.isObject(a))throw new TypeError("Expected the first argument to be an object");let u=o(Object.keys(a),c,l),f={};for(let h of u)f[h]=a[h];return f},o.some=(a,c,l)=>{let u=[].concat(a);for(let f of[].concat(c)){let h=r(String(f),l);if(u.
328
328
  some($=>h($)))return!0}return!1},o.every=(a,c,l)=>{let u=[].concat(a);for(let f of[].concat(c)){let h=r(String(f),l);if(!u.every($=>h($)))return!1}return!0},o.all=(a,c,l)=>{if(typeof a!="string")throw new TypeError(`Expected a string: "${t.inspect(a)}"`);return[].concat(c).every(u=>r(u,l)(a))},o.capture=(a,c,l)=>{let u=n.isWindows(l),h=r.makeRe(String(a),{...l,capture:!0}).exec(u?n.toPosixSlashes(c):c);if(h)return h.slice(1).map($=>$===void 0?"":$)},o.makeRe=(...a)=>r.makeRe(...a),o.scan=(...a)=>r.
329
- scan(...a),o.parse=(a,c)=>{let l=[];for(let u of[].concat(a||[]))for(let f of e(String(u),c))l.push(r.parse(f,c));return l},o.braces=(a,c)=>{if(typeof a!="string")throw new TypeError("Expected a string");return c&&c.nobrace===!0||!i(a)?[a]:e(a,c)},o.braceExpand=(a,c)=>{if(typeof a!="string")throw new TypeError("Expected a string");return o.braces(a,{...c,expand:!0})},o.hasBraces=i,Ni=o,Ni}var yg=gg();const Uc=Ur(yg),$g={useRecommendedBuildConfig:!0,removeViteModuleLoader:!1,deleteInlinedFiles:!0};
329
+ scan(...a),o.parse=(a,c)=>{let l=[];for(let u of[].concat(a||[]))for(let f of e(String(u),c))l.push(r.parse(f,c));return l},o.braces=(a,c)=>{if(typeof a!="string")throw new TypeError("Expected a string");return c&&c.nobrace===!0||!i(a)?[a]:e(a,c)},o.braceExpand=(a,c)=>{if(typeof a!="string")throw new TypeError("Expected a string");return o.braces(a,{...c,expand:!0})},o.hasBraces=i,Ni=o,Ni}var yg=gg();const Hc=Ur(yg),$g={useRecommendedBuildConfig:!0,removeViteModuleLoader:!1,deleteInlinedFiles:!0};
330
330
  function _g(t,e,r,n=!1){const s=e.replaceAll(".","\\."),i=new RegExp(`<script([^>]*?) src="(?:[^"]*?/)?${s}"([^>]*)></script>`),o=/"?__VITE_PRELOAD__"?/g,a=r.replace(o,"void 0").replace(/<(\/script>|!--)/g,"\\x3C$1"),c=t.replace(i,(l,u,f)=>`<script${u}${f}>${a.trim()}</script>`);return n?Rg(c):c}function vg(t,e,r){const n=e.replaceAll(".","\\."),s=new RegExp(`<link([^>]*?) href="(?:[^"]*?/)?${n}"([^>]*)>`),i=r.replace('@charset "UTF-8";',"");return t.replace(s,(a,c,l)=>`<style${c}${l}>${i.trim()}\
331
331
  </style>`)}const bg=/\.[mc]?js$/,wg=/\.css$/,Eg=/\.html?$/;function Sg({useRecommendedBuildConfig:t=!0,removeViteModuleLoader:e=!1,inlinePattern:r=[],deleteInlinedFiles:n=!0}=$g){return{name:"vite:singlefile",config:t?Ag:void 0,enforce:"post",generateBundle(s,i){const o=l=>this.info(`NOTE: asset not inlined: ${l}`);this.info(`
332
- `);const a={html:[],css:[],js:[],other:[]};for(const l of Object.keys(i))Eg.test(l)?a.html.push(l):wg.test(l)?a.css.push(l):bg.test(l)?a.js.push(l):a.other.push(l);const c=[];for(const l of a.html){const u=i[l];let f=u.source;for(const h of a.js){if(r.length&&!Uc.isMatch(h,r)){o(h);continue}const $=i[h];$.code!=null&&(this.info(`Inlining: ${h}`),c.push(h),f=_g(f,$.fileName,$.code,e))}for(const h of a.css){if(r.length&&!Uc.isMatch(h,r)){o(h);continue}const $=i[h];this.info(`Inlining: ${h}`),c.push(
332
+ `);const a={html:[],css:[],js:[],other:[]};for(const l of Object.keys(i))Eg.test(l)?a.html.push(l):wg.test(l)?a.css.push(l):bg.test(l)?a.js.push(l):a.other.push(l);const c=[];for(const l of a.html){const u=i[l];let f=u.source;for(const h of a.js){if(r.length&&!Hc.isMatch(h,r)){o(h);continue}const $=i[h];$.code!=null&&(this.info(`Inlining: ${h}`),c.push(h),f=_g(f,$.fileName,$.code,e))}for(const h of a.css){if(r.length&&!Hc.isMatch(h,r)){o(h);continue}const $=i[h];this.info(`Inlining: ${h}`),c.push(
333
333
  h),f=vg(f,$.fileName,$.source)}u.source=f}if(n)for(const l of c)delete i[l];for(const l of a.other)o(l)}}}const Rg=t=>t.replace(/(<script type="module" crossorigin>\s*)\(function(?: polyfill)?\(\)\s*\{[\s\S]*?\}\)\(\);/,'<script type="module">'),Ag=t=>{t.build||(t.build={}),t.build.assetsInlineLimit=()=>!0,t.build.chunkSizeWarningLimit=1e8,t.build.cssCodeSplit=!1,t.base="./",t.build.assetsDir="",t.build.rollupOptions||(t.build.rollupOptions={}),t.build.rollupOptions.output||(t.build.rollupOptions.
334
- output={});const e=r=>{r.inlineDynamicImports=!0};if(Array.isArray(t.build.rollupOptions.output))for(const r of t.build.rollupOptions.output)e(r);else e(t.build.rollupOptions.output)};function Zt(t){return t.length===0?"never":t.sort($p).map(e=>` | ${JSON.stringify(e)}`).join(`
335
- `).trimStart()}function Hc(t){const e=ua(t);return e.length===0?"never":kh(e,_p,xh(r=>` | ${JSON.stringify(r.id)}`)).join(`
336
- `).trimStart()}function Fc(t){return`
334
+ output={});const e=r=>{r.inlineDynamicImports=!0};if(Array.isArray(t.build.rollupOptions.output))for(const r of t.build.rollupOptions.output)e(r);else e(t.build.rollupOptions.output)};function Zt(t){return t.length===0?"never":t.sort(_p).map(e=>` | ${JSON.stringify(e)}`).join(`
335
+ `).trimStart()}function Fc(t){const e=ua(t);return e.length===0?"never":xh(e,vp,Mh(r=>` | ${JSON.stringify(r.id)}`)).join(`
336
+ `).trimStart()}function Vc(t){return`
337
337
  import type { Aux, SpecAux } from '@likec4/core/types';
338
338
 
339
339
  export type $Specs = SpecAux<
@@ -352,9 +352,9 @@ export type $Specs = SpecAux<
352
352
  export type $Aux = Aux<
353
353
  ${JSON.stringify(t.stage)},
354
354
  // Elements
355
- ${Hc(t.$data.elements)},
355
+ ${Fc(t.$data.elements)},
356
356
  // Deployments
357
- ${Hc(t.$data.deployments.elements)},
357
+ ${Fc(t.$data.deployments.elements)},
358
358
  // Views
359
359
  ${Zt(ur(t.$data.views))},
360
360
  // Project ID
@@ -372,7 +372,7 @@ export type $DeploymentKind = $Aux['DeploymentKind']
372
372
  export type $Tag = $Aux['Tag']
373
373
  export type $Tags = readonly $Aux['Tag'][]
374
374
  export type $MetadataKey = $Aux['MetadataKey']
375
- `.trimStart()}function Og(t){const e=Fc(t),r=Rp(t.stage)+"LikeC4ModelData";return`
375
+ `.trimStart()}function Og(t){const e=Vc(t),r=Ap(t.stage)+"LikeC4ModelData";return`
376
376
  /* prettier-ignore-start */
377
377
  /* eslint-disable */
378
378
 
@@ -388,7 +388,7 @@ ${e}
388
388
  export const likec4model: LikeC4Model<$Aux> = new LikeC4Model(<${r}<$Aux>>(${Bt.stringify(t.$data,{space:2,quote:"'"})} as unknown))
389
389
 
390
390
  /* prettier-ignore-end */
391
- `.trimStart()}function Cg(t){return Ea(t,e=>Sa`${Bt.stringify(e.id)}`,{separator:" | "})}function Pg(t){const e=Array.from(t),r=new fp;return r.appendTemplate`
391
+ `.trimStart()}function Cg(t){return Ea(t,e=>Sa`${Bt.stringify(e.id)}`,{separator:" | "})}function Pg(t){const e=Array.from(t),r=new dp;return r.appendTemplate`
392
392
  /******************************************************************************
393
393
  * This file was generated
394
394
  * DO NOT EDIT MANUALLY!
@@ -432,7 +432,7 @@ import type {
432
432
  ReactLikeC4Props as GenericReactLikeC4Props
433
433
  } from 'likec4/react'
434
434
 
435
- ${Fc(t)}
435
+ ${Vc(t)}
436
436
 
437
437
  declare function isLikeC4ViewId(value: unknown): value is $ViewId;
438
438
 
@@ -470,7 +470,7 @@ export {
470
470
  ReactLikeC4
471
471
  }
472
472
  /* prettier-ignore-end */
473
- `.trimStart()}const Ti=async({languageServices:t,likec4AssetsDir:e,...r})=>{const n=r.customLogger??rg,s=ui(),i=r?.useOverviewGraph===!0;n.info(`${K.cyan("likec4 app root")} ${K.dim(s)}`);const o=r.outputDir??ge(t.workspace,"dist");n.info(K.cyan("outDir")+" "+K.dim(o));let a="/";r.base&&(a=la(r.base),!Mh(a)&&a!=="./"&&(a=qh(a))),a!=="/"&&n.info(`${K.green("app base url")} ${K.dim(a)}`);const c=r.webcomponentPrefix??"likec4",l=r.title??"LikeC4",u=r.outputSingleFile??!1;return{isDev:!1,likec4AssetsDir:e,
473
+ `.trimStart()}const Ti=async({languageServices:t,likec4AssetsDir:e,...r})=>{const n=r.customLogger??rg,s=ui(),i=r?.useOverviewGraph===!0;n.info(`${K.cyan("likec4 app root")} ${K.dim(s)}`);const o=r.outputDir??ge(t.workspace,"dist");n.info(K.cyan("outDir")+" "+K.dim(o));let a="/";r.base&&(a=la(r.base),!qh(a)&&a!=="./"&&(a=Uh(a))),a!=="/"&&n.info(`${K.green("app base url")} ${K.dim(a)}`);const c=r.webcomponentPrefix??"likec4",l=r.title??"LikeC4",u=r.outputSingleFile??!1;return{isDev:!1,likec4AssetsDir:e,
474
474
  webcomponentPrefix:c,title:l,root:s,languageServices:t,clearScreen:!1,base:a,resolve:{conditions:["production"],dedupe:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client"],alias:{...di(),"likec4/previews":e}},configFile:!1,mode:"production",optimizeDeps:{include:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client","@likec4/core/types","@likec4/core/model","@likec4/core/compute-view/relationships","@likec4/core/utils","@likec4/core","\
475
475
  likec4/vite-plugin/internal"],noDiscovery:!0},esbuild:{tsconfigRaw:{compilerOptions:{target:"ESNext",jsx:"react-jsx"}}},define:{WEBCOMPONENT_PREFIX:JSON.stringify(c),PAGE_TITLE:JSON.stringify(l),__USE_OVERVIEW_GRAPH__:i?"true":"false",__USE_HASH_HISTORY__:r?.useHashHistory===!0?"true":"false","process.env.NODE_ENV":'"production"'},build:{outDir:o,modulePreload:!1,emptyOutDir:!1,sourcemap:!1,cssMinify:!0,minify:!0,copyPublicDir:!0,chunkSizeWarningLimit:fi,rollupOptions:{treeshake:{preset:"recomme\
476
476
  nded"},...!u&&{input:[ge(s,"index.html"),ge(s,"src","main.js"),ge(s,"src","fonts.css"),ge(s,"src","style.css")],output:{compact:!0,manualChunks:f=>{if(f.includes("/likec4/node_modules/"))return"vendors"}}}}},customLogger:n,plugins:[xs(),Ms({languageServices:t.languageServices,useOverviewGraph:i}),u?Sg():void 0].filter(Boolean)}};async function ji({languageServices:t,outDir:e,base:r,webcomponentPrefix:n="likec4",filename:s="likec4-views.js"}){const i=He(["vite","webcomponent"]),o=ui();return i.info(
@@ -478,46 +478,46 @@ K.cyan("outDir")+" "+K.dim(e)),{root:o,clearScreen:!1,base:r,configFile:!1,publi
478
478
  lib:{entry:"src/webcomponent.tsx",fileName(a,c){return s},formats:["iife"],name:"LikeC4Views"},rollupOptions:{treeshake:{preset:"recommended"},output:{format:"iife",hoistTransitiveImports:!1,compact:!0}}},customLogger:i,plugins:[xs(),Ms({languageServices:t.languageServices,useOverviewGraph:!1})]}}const Ng=["favicon.ico","robots.txt"],Tg=async({buildWebcomponent:t=!0,webcomponentPrefix:e="likec4",title:r,languageServices:n,likec4AssetsDir:s,outputSingleFile:i,...o})=>{s??=await Vr(fr(zr(),".likec\
479
479
  4-assets-"));const{isDev:a,...c}=await Ti({...o,languageServices:n,likec4AssetsDir:s,webcomponentPrefix:e,title:r,outputSingleFile:i}),l=await li();for(const f of Ng){const h=ge(c.root,f);Ct(h)&&ga(h,ge(l,f))}const u=n.languageServices.projects();if(u.length===1){const f=await n.viewsService.computedViews(),h=await n.diagrams();if(h.length===0)throw process.exitCode=1,new Error("no views found");h.length===f.length?c.customLogger.info(`${K.dim("workspace:")} ${K.green("\u2713 all views layouted")}`):
480
480
  c.customLogger.warn(`${K.dim("workspace:")} ${K.yellow(`\u2717 layouted ${h.length} of ${f.length} views`)}`),h.forEach($=>{$.hasLayoutDrift&&c.customLogger.warn(K.yellow("drift detected, manual layout can not be applied, view:")+" "+K.red($.id))})}else for(const f of u){const h=await n.viewsService.computedViews(f.id);h.length===0?c.customLogger.warn(`${K.dim("project:")} ${f.id} ${K.yellow("\u2717 no views found")}`):c.customLogger.info(`${K.dim("project:")} ${f.id} ${K.green(`${h.length} view\
481
- s`)}`)}if(t){const f=await ji({webcomponentPrefix:e,languageServices:n,outDir:l,base:c.base});await pr(f)}if(await pr({...c,publicDir:l,mode:"production"}),i)for(let f of Yh(ge(c.build.outDir)).filter(h=>h!=="index.html"))Is(ge(c.build.outDir,f),{recursive:!0});else{const f=ge(c.build.outDir,"index.html");Ct(f)&&ga(f,ge(c.build.outDir,"404.html"))}};function Li(t,e){return r=>r.length>1?[t,e,r[0],"--",...r.slice(1)]:[t,e,r[0]]}function jg(){return t=>["deno","run",`npm:${t[0]}`,...t.slice(1)]}const Lg={
482
- agent:["npm",0],run:Li("npm","run"),install:["npm","i",0],frozen:["npm","ci",0],global:["npm","i","-g",0],add:["npm","i",0],upgrade:["npm","update",0],"upgrade-interactive":null,execute:["npx",0],"execute-local":["npx",0],uninstall:["npm","uninstall",0],global_uninstall:["npm","uninstall","-g",0]},Vc={agent:["yarn",0],run:["yarn","run",0],install:["yarn","install",0],frozen:["yarn","install","--frozen-lockfile",0],global:["yarn","global","add",0],add:["yarn","add",0],upgrade:["yarn","upgrade",0],
483
- "upgrade-interactive":["yarn","upgrade-interactive",0],execute:["npx",0],"execute-local":Li("yarn","exec"),uninstall:["yarn","remove",0],global_uninstall:["yarn","global","remove",0]},Dg={...Vc,frozen:["yarn","install","--immutable",0],upgrade:["yarn","up",0],"upgrade-interactive":["yarn","up","-i",0],execute:["yarn","dlx",0],"execute-local":["yarn","exec",0],global:["npm","i","-g",0],global_uninstall:["npm","uninstall","-g",0]},zc={agent:["pnpm",0],run:["pnpm","run",0],install:["pnpm","i",0],frozen:[
481
+ s`)}`)}if(t){const f=await ji({webcomponentPrefix:e,languageServices:n,outDir:l,base:c.base});await pr(f)}if(await pr({...c,publicDir:l,mode:"production"}),i)for(let f of Xh(ge(c.build.outDir)).filter(h=>h!=="index.html"))Is(ge(c.build.outDir,f),{recursive:!0});else{const f=ge(c.build.outDir,"index.html");Ct(f)&&ga(f,ge(c.build.outDir,"404.html"))}};function Li(t,e){return r=>r.length>1?[t,e,r[0],"--",...r.slice(1)]:[t,e,r[0]]}function jg(){return t=>["deno","run",`npm:${t[0]}`,...t.slice(1)]}const Lg={
482
+ agent:["npm",0],run:Li("npm","run"),install:["npm","i",0],frozen:["npm","ci",0],global:["npm","i","-g",0],add:["npm","i",0],upgrade:["npm","update",0],"upgrade-interactive":null,execute:["npx",0],"execute-local":["npx",0],uninstall:["npm","uninstall",0],global_uninstall:["npm","uninstall","-g",0]},zc={agent:["yarn",0],run:["yarn","run",0],install:["yarn","install",0],frozen:["yarn","install","--frozen-lockfile",0],global:["yarn","global","add",0],add:["yarn","add",0],upgrade:["yarn","upgrade",0],
483
+ "upgrade-interactive":["yarn","upgrade-interactive",0],execute:["npx",0],"execute-local":Li("yarn","exec"),uninstall:["yarn","remove",0],global_uninstall:["yarn","global","remove",0]},Dg={...zc,frozen:["yarn","install","--immutable",0],upgrade:["yarn","up",0],"upgrade-interactive":["yarn","up","-i",0],execute:["yarn","dlx",0],"execute-local":["yarn","exec",0],global:["npm","i","-g",0],global_uninstall:["npm","uninstall","-g",0]},Gc={agent:["pnpm",0],run:["pnpm","run",0],install:["pnpm","i",0],frozen:[
484
484
  "pnpm","i","--frozen-lockfile",0],global:["pnpm","add","-g",0],add:["pnpm","add",0],upgrade:["pnpm","update",0],"upgrade-interactive":["pnpm","update","-i",0],execute:["pnpm","dlx",0],"execute-local":["pnpm","exec",0],uninstall:["pnpm","remove",0],global_uninstall:["pnpm","remove","--global",0]},kg={agent:["bun",0],run:["bun","run",0],install:["bun","install",0],frozen:["bun","install","--frozen-lockfile",0],global:["bun","add","-g",0],add:["bun","add",0],upgrade:["bun","update",0],"upgrade-inte\
485
485
  ractive":["bun","update",0],execute:["bun","x",0],"execute-local":["bun","x",0],uninstall:["bun","remove",0],global_uninstall:["bun","remove","-g",0]},xg={agent:["deno",0],run:["deno","task",0],install:["deno","install",0],frozen:["deno","install","--frozen",0],global:["deno","install","-g",0],add:["deno","add",0],upgrade:["deno","outdated","--update",0],"upgrade-interactive":["deno","outdated","--update",0],execute:jg(),"execute-local":["deno","task","--eval",0],uninstall:["deno","remove",0],global_uninstall:[
486
- "deno","uninstall","-g",0]},Mg={npm:Lg,yarn:Vc,"yarn@berry":Dg,pnpm:zc,"pnpm@6":{...zc,run:Li("pnpm","run")},bun:kg,deno:xg};function qg(t,e,r){const n=Mg[t][e];return Ug(n,r)}function Ug(t,e){if(t==null)return null;const r=typeof t=="function"?t(e):t.flatMap(n=>typeof n=="number"?e:[n]);return{command:r[0],args:r.slice(1)}}const Hg=["npm","yarn","yarn@berry","pnpm","pnpm@6","bun","deno"],Gc={"bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnp\
487
- m","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},Bc={"node_modules/.deno/":"deno","node_modules/.pnpm/":"pnpm","node_modules/.yarn-state.yml":"yarn","node_modules/.yarn_integrity":"yarn","node_modules/.package-lock.json":"npm",".pnp.cjs":"yarn",".pnp.js":"yarn","bun.lock":"bun","bun.lockb":"bun"};async function Di(t,e){try{const r=await ba.stat(t);return e==="file"?r.isFile():r.isDirectory()}catch{return!1}}function*Fg(t=Se.cwd()){let e=me.resolve(t);const{root:r}=me.
488
- parse(e);for(;e&&e!==r;)yield e,e=me.dirname(e)}async function Wc(t,e){return!t||!Di(t,"file")?null:await Gg(t,e)}async function Vg(t={}){const{cwd:e,strategies:r=["lockfile","packageManager-field","devEngines-field"],onUnknown:n}=t;let s;if(typeof t.stopDir=="string"){const i=me.resolve(t.stopDir);s=o=>o===i}else s=t.stopDir;for(const i of Fg(e)){for(const o of r)switch(o){case"lockfile":{for(const a of Object.keys(Gc))if(await Di(me.join(i,a),"file")){const c=Gc[a],l=await Wc(me.join(i,"packag\
489
- e.json"),n);return l||{name:c,agent:c}}break}case"packageManager-field":case"devEngines-field":{const a=await Wc(me.join(i,"package.json"),n);if(a)return a;break}case"install-metadata":{for(const a of Object.keys(Bc)){const c=a.endsWith("/")?"dir":"file";if(await Di(me.join(i,a),c)){const l=Bc[a],u=l==="yarn"?Bg(a)?"yarn":"yarn@berry":l;return{name:l,agent:u}}}break}}if(s?.(i))break}return null}function zg(t){const e=r=>r?.match(/\d+(\.\d+){0,2}/)?.[0]??r;if(typeof t.packageManager=="string"){const[
486
+ "deno","uninstall","-g",0]},Mg={npm:Lg,yarn:zc,"yarn@berry":Dg,pnpm:Gc,"pnpm@6":{...Gc,run:Li("pnpm","run")},bun:kg,deno:xg};function qg(t,e,r){const n=Mg[t][e];return Ug(n,r)}function Ug(t,e){if(t==null)return null;const r=typeof t=="function"?t(e):t.flatMap(n=>typeof n=="number"?e:[n]);return{command:r[0],args:r.slice(1)}}const Hg=["npm","yarn","yarn@berry","pnpm","pnpm@6","bun","deno"],Bc={"bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnp\
487
+ m","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},Wc={"node_modules/.deno/":"deno","node_modules/.pnpm/":"pnpm","node_modules/.yarn-state.yml":"yarn","node_modules/.yarn_integrity":"yarn","node_modules/.package-lock.json":"npm",".pnp.cjs":"yarn",".pnp.js":"yarn","bun.lock":"bun","bun.lockb":"bun"};async function Di(t,e){try{const r=await ba.stat(t);return e==="file"?r.isFile():r.isDirectory()}catch{return!1}}function*Fg(t=Se.cwd()){let e=me.resolve(t);const{root:r}=me.
488
+ parse(e);for(;e&&e!==r;)yield e,e=me.dirname(e)}async function Kc(t,e){return!t||!Di(t,"file")?null:await Gg(t,e)}async function Vg(t={}){const{cwd:e,strategies:r=["lockfile","packageManager-field","devEngines-field"],onUnknown:n}=t;let s;if(typeof t.stopDir=="string"){const i=me.resolve(t.stopDir);s=o=>o===i}else s=t.stopDir;for(const i of Fg(e)){for(const o of r)switch(o){case"lockfile":{for(const a of Object.keys(Bc))if(await Di(me.join(i,a),"file")){const c=Bc[a],l=await Kc(me.join(i,"packag\
489
+ e.json"),n);return l||{name:c,agent:c}}break}case"packageManager-field":case"devEngines-field":{const a=await Kc(me.join(i,"package.json"),n);if(a)return a;break}case"install-metadata":{for(const a of Object.keys(Wc)){const c=a.endsWith("/")?"dir":"file";if(await Di(me.join(i,a),c)){const l=Wc[a],u=l==="yarn"?Bg(a)?"yarn":"yarn@berry":l;return{name:l,agent:u}}}break}}if(s?.(i))break}return null}function zg(t){const e=r=>r?.match(/\d+(\.\d+){0,2}/)?.[0]??r;if(typeof t.packageManager=="string"){const[
490
490
  r,n]=t.packageManager.replace(/^\^/,"").split("@");return{name:r,ver:e(n)}}if(typeof t.devEngines?.packageManager?.name=="string")return{name:t.devEngines.packageManager.name,ver:e(t.devEngines.packageManager.version)}}async function Gg(t,e){try{const r=JSON.parse(await ba.readFile(t,"utf8"));let n;const s=zg(r);if(s){const i=s.name,o=s.ver;let a=o;return i==="yarn"&&o&&Number.parseInt(o)>1?(n="yarn@berry",a="berry",{name:i,agent:n,version:a}):i==="pnpm"&&o&&Number.parseInt(o)<7?(n="pnpm@6",{name:i,
491
- agent:n,version:a}):Hg.includes(i)?(n=i,{name:i,agent:n,version:a}):e?.(r.packageManager)??null}}catch{}return null}function Bg(t){return t.endsWith(".yarn_integrity")}function Kc(t){try{return!!yp.createRequire(import.meta.url).resolve(t)}catch(e){return at.debug(Hr(e)),!1}}async function Ir(){if(Kc("react")&&Kc("react-dom")){at.debug("react already installed");return}at.debug("react not installed");const t=await Vg();t||(at.error`Package manager not detected, please install dependencies manually: ${"\
492
- react"} ${"react-dom"}`,process.exit(1));const e=qg(t.agent,"add",["react","react-dom"]);e||(at.error`Please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1));try{await fa(e.command,e.args,{stdio:"inherit"})}catch(r){at.debug(Hr(r)),at.error`Please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1)}}var Wg=Uh();const Kg=Ur(Wg);function Yc(t){if(t.resolvedUrls)return da(t.resolvedUrls.network)??da(t.resolvedUrls.local)}function Xc(t){if(!t.resolvedUrls)
491
+ agent:n,version:a}):Hg.includes(i)?(n=i,{name:i,agent:n,version:a}):e?.(r.packageManager)??null}}catch{}return null}function Bg(t){return t.endsWith(".yarn_integrity")}function Yc(t){try{return!!$p.createRequire(import.meta.url).resolve(t)}catch(e){return at.debug(Hr(e)),!1}}async function Ir(){if(Yc("react")&&Yc("react-dom")){at.debug("react already installed");return}at.debug("react not installed");const t=await Vg();t||(at.error`Package manager not detected, please install dependencies manually: ${"\
492
+ react"} ${"react-dom"}`,process.exit(1));const e=qg(t.agent,"add",["react","react-dom"]);e||(at.error`Please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1));try{await fa(e.command,e.args,{stdio:"inherit"})}catch(r){at.debug(Hr(r)),at.error`Please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1)}}var Wg=Hh();const Kg=Ur(Wg);function Xc(t){if(t.resolvedUrls)return da(t.resolvedUrls.network)??da(t.resolvedUrls.local)}function Jc(t){if(!t.resolvedUrls)
493
493
  throw new Error("Vite server is not ready, no resolvedUrls");Ot([K.green("LikeC4 served at:"),"",K.dim("Local: ")+t.resolvedUrls.local.join(`
494
494
  `+"".padEnd(9," ")),t.resolvedUrls.network.length?K.dim("Network: ")+t.resolvedUrls.network.join(`
495
- `+"".padEnd(9," ")):void 0].filter(e=>Hh(e)).join(`
496
- `))}class Jc extends Error{constructor(e){super(`${e} is locked`)}}const er={old:new Set,young:new Set},Yg=1e3*15,fn=1024,dn=65535;let Nr;const Xg=()=>{const t=hr.networkInterfaces(),e=new Set([void 0,"0.0.0.0"]);for(const r of Object.values(t))for(const n of r)e.add(n.address);return e},Qc=t=>new Promise((e,r)=>{const n=vp.createServer();n.unref(),n.on("error",r),n.listen(t,()=>{const{port:s}=n.address();n.close(()=>{e(s)})})}),Zc=async(t,e)=>{if(t.host||t.port===0)return Qc(t);for(const r of e)
497
- try{await Qc({port:t.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return t.port},Jg=function*(t){t&&(yield*t),yield 0};async function ki(t){let e,r=new Set;if(t&&(t.port&&(e=typeof t.port=="number"?[t.port]:t.port),t.exclude)){const s=t.exclude;if(typeof s[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(const i of s){if(typeof i!="number")throw new TypeError("Each item in the `exclude` option must be a number cor\
498
- responding to the port you want excluded.");if(!Number.isSafeInteger(i))throw new TypeError(`Number ${i} in the exclude option is not a safe integer and can't be used`)}r=new Set(s)}Nr===void 0&&(Nr=setTimeout(()=>{Nr=void 0,er.old=er.young,er.young=new Set},Yg),Nr.unref&&Nr.unref());const n=Xg();for(const s of Jg(e))try{if(r.has(s))continue;let i=await Zc({...t,port:s},n);for(;er.old.has(i)||er.young.has(i);){if(s!==0)throw new Jc(s);i=await Zc({...t,port:s},n)}return er.young.add(i),i}catch(i){
499
- if(!["EADDRINUSE","EACCES"].includes(i.code)&&!(i instanceof Jc))throw i}throw new Error("No available ports found")}function hn(t,e){if(!Number.isInteger(t)||!Number.isInteger(e))throw new TypeError("`from` and `to` must be integer numbers");if(t<fn||t>dn)throw new RangeError(`'from' must be between ${fn} and ${dn}`);if(e<fn||e>dn)throw new RangeError(`'to' must be between ${fn} and ${dn}`);if(t>e)throw new RangeError("`to` must be greater than or equal to `from`");return function*(n,s){for(let i=n;i<=
500
- s;i++)yield i}(t,e)}async function eu({buildWebcomponent:t=!0,hmr:e=!0,webcomponentPrefix:r="likec4",title:n,languageServices:s,likec4AssetsDir:i,openBrowser:o,listen:a,...c}){i??=await Vr(fr(zr(),".likec4-assets-"));const{isDev:l,...u}=await Ti({...c,languageServices:s,likec4AssetsDir:i,webcomponentPrefix:r,title:n}),f=u.customLogger,h=await ki({port:[5173,...hn(61e3,61010),...hn(62002,62010)]}),$=await ki({port:hn(24678,24690)}),b=await li(),y=a??(ut()?"0.0.0.0":"localhost");e&&(f.info(`Enabli\
501
- ng HMR: localhost:${$}`),ut()&&f.info(K.yellow(`ensure port ${$} is published from container`)));const d=await mp({...u,define:e?{...u.define,"process.env.NODE_ENV":'"development"'}:u.define,mode:e?"development":u.mode,publicDir:b,server:{host:y,allowedHosts:!0,port:h,hmr:e&&{overlay:!0,port:$},fs:{strict:!1},open:o??(!l&&!ut())}});return await d.listen(),t&&(async()=>{try{const g=await ji({webcomponentPrefix:r,languageServices:s,outDir:b,base:u.base});await pr({...g,logLevel:"warn"})}catch(g){f.
495
+ `+"".padEnd(9," ")):void 0].filter(e=>Fh(e)).join(`
496
+ `))}class Qc extends Error{constructor(e){super(`${e} is locked`)}}const er={old:new Set,young:new Set},Yg=1e3*15,fn=1024,dn=65535;let Nr;const Xg=()=>{const t=hr.networkInterfaces(),e=new Set([void 0,"0.0.0.0"]);for(const r of Object.values(t))for(const n of r)e.add(n.address);return e},Zc=t=>new Promise((e,r)=>{const n=bp.createServer();n.unref(),n.on("error",r),n.listen(t,()=>{const{port:s}=n.address();n.close(()=>{e(s)})})}),eu=async(t,e)=>{if(t.host||t.port===0)return Zc(t);for(const r of e)
497
+ try{await Zc({port:t.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return t.port},Jg=function*(t){t&&(yield*t),yield 0};async function ki(t){let e,r=new Set;if(t&&(t.port&&(e=typeof t.port=="number"?[t.port]:t.port),t.exclude)){const s=t.exclude;if(typeof s[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(const i of s){if(typeof i!="number")throw new TypeError("Each item in the `exclude` option must be a number cor\
498
+ responding to the port you want excluded.");if(!Number.isSafeInteger(i))throw new TypeError(`Number ${i} in the exclude option is not a safe integer and can't be used`)}r=new Set(s)}Nr===void 0&&(Nr=setTimeout(()=>{Nr=void 0,er.old=er.young,er.young=new Set},Yg),Nr.unref&&Nr.unref());const n=Xg();for(const s of Jg(e))try{if(r.has(s))continue;let i=await eu({...t,port:s},n);for(;er.old.has(i)||er.young.has(i);){if(s!==0)throw new Qc(s);i=await eu({...t,port:s},n)}return er.young.add(i),i}catch(i){
499
+ if(!["EADDRINUSE","EACCES"].includes(i.code)&&!(i instanceof Qc))throw i}throw new Error("No available ports found")}function hn(t,e){if(!Number.isInteger(t)||!Number.isInteger(e))throw new TypeError("`from` and `to` must be integer numbers");if(t<fn||t>dn)throw new RangeError(`'from' must be between ${fn} and ${dn}`);if(e<fn||e>dn)throw new RangeError(`'to' must be between ${fn} and ${dn}`);if(t>e)throw new RangeError("`to` must be greater than or equal to `from`");return function*(n,s){for(let i=n;i<=
500
+ s;i++)yield i}(t,e)}async function tu({buildWebcomponent:t=!0,hmr:e=!0,webcomponentPrefix:r="likec4",title:n,languageServices:s,likec4AssetsDir:i,openBrowser:o,listen:a,...c}){i??=await Vr(fr(zr(),".likec4-assets-"));const{isDev:l,...u}=await Ti({...c,languageServices:s,likec4AssetsDir:i,webcomponentPrefix:r,title:n}),f=u.customLogger,h=await ki({port:[5173,...hn(61e3,61010),...hn(62002,62010)]}),$=await ki({port:hn(24678,24690)}),b=await li(),y=a??(ut()?"0.0.0.0":"localhost");e&&(f.info(`Enabli\
501
+ ng HMR: localhost:${$}`),ut()&&f.info(K.yellow(`ensure port ${$} is published from container`)));const d=await gp({...u,define:e?{...u.define,"process.env.NODE_ENV":'"development"'}:u.define,mode:e?"development":u.mode,publicDir:b,server:{host:y,allowedHosts:!0,port:h,hmr:e&&{overlay:!0,port:$},fs:{strict:!1},open:o??(!l&&!ut())}});return await d.listen(),t&&(async()=>{try{const g=await ji({webcomponentPrefix:r,languageServices:s,outDir:b,base:u.base});await pr({...g,logLevel:"warn"})}catch(g){f.
502
502
  warn(Hr(g)),f.warn("webcomponent build failed, ignoring error and continue")}})(),d}async function Qg({browserContext:t,views:e,output:r,logger:n,timeout:s,maxAttempts:i,outputType:o,theme:a}){let c;const l=e.map(h=>({view:h,attempt:1})),u=[];let f;for(;f=l.shift();){const{view:h,attempt:$}=f,b=`export/${encodeURIComponent(h.id)}`;try{if($>1){c&&(c.close({runBeforeUnload:!0}).catch(m=>n.error(`failed to close page: ${m}`)),c=void 0);const p=ha($*200,{min:200,max:1e3});n.info(K.cyan(b)+K.dim(` at\
503
- tempt ${$} of ${i} after ${p}ms`)),await bp(p)}else h.hasLayoutDrift&&n.warn(K.yellow("Drift detected, manual layout can not be applied, view may be invalid: ")+K.red(h.id));let y=".";o==="relative"&&(y=h.relativePath??".",y.includes("/")?y=y.slice(0,y.lastIndexOf("/")):y=".");const d=ge(r,y,`${h.id}.png`);c??=await t.newPage();const g=16;await c.setViewportSize({width:h.bounds.width+20*2+g,height:h.bounds.height+20*2+g}),await c.goto(b+`?padding=20&theme=${a}`),n.info(K.cyan(b)+K.dim(` -> ${gt(
504
- r,d)}`)),await c.waitForSelector(".react-flow.initialized"),h.nodes.some(p=>Fh(p.icon)&&p.icon.toLowerCase().startsWith("http"))&&await Zg(c,s),await c.getByTestId("export-page").screenshot({animations:"disabled",path:d,omitBackground:!0}),u.push({view:h,path:d})}catch(y){c?.close({runBeforeUnload:!0}).catch(d=>n.error(`failed to close page: ${d}`)),n.error(K.red("failed "+b+`
505
- `+y)),$<i&&(l.push({view:h,attempt:$+1}),n.info(K.dim(`retry ${b}`))),c=void 0}}return u}async function Zg(t,e){let r=await t.locator("//img").all();if(!r.length)return;const n=r.map(s=>s.evaluate(i=>i.complete||new Promise(o=>{i.onload=o,i.onerror=o}),{timeout:Math.max(15e3,e)}));await Promise.allSettled(n)}async function tu({logger:t,serverUrl:e,theme:r="light",timeoutMs:n=15e3,views:s,output:i,outputType:o="relative",maxAttempts:a=3,chromiumSandbox:c=!1}){t.info(`${K.dim("output")} ${i}`),t.info(
503
+ tempt ${$} of ${i} after ${p}ms`)),await wp(p)}else h.hasLayoutDrift&&n.warn(K.yellow("Drift detected, manual layout can not be applied, view may be invalid: ")+K.red(h.id));let y=".";o==="relative"&&(y=h.relativePath??".",y.includes("/")?y=y.slice(0,y.lastIndexOf("/")):y=".");const d=ge(r,y,`${h.id}.png`);c??=await t.newPage();const g=16;await c.setViewportSize({width:h.bounds.width+20*2+g,height:h.bounds.height+20*2+g}),await c.goto(b+`?padding=20&theme=${a}`),n.info(K.cyan(b)+K.dim(` -> ${gt(
504
+ r,d)}`)),await c.waitForSelector(".react-flow.initialized"),h.nodes.some(p=>Vh(p.icon)&&p.icon.toLowerCase().startsWith("http"))&&await Zg(c,s),await c.getByTestId("export-page").screenshot({animations:"disabled",path:d,omitBackground:!0}),u.push({view:h,path:d})}catch(y){c?.close({runBeforeUnload:!0}).catch(d=>n.error(`failed to close page: ${d}`)),n.error(K.red("failed "+b+`
505
+ `+y)),$<i&&(l.push({view:h,attempt:$+1}),n.info(K.dim(`retry ${b}`))),c=void 0}}return u}async function Zg(t,e){let r=await t.locator("//img").all();if(!r.length)return;const n=r.map(s=>s.evaluate(i=>i.complete||new Promise(o=>{i.onload=o,i.onerror=o}),{timeout:Math.max(15e3,e)}));await Promise.allSettled(n)}async function ru({logger:t,serverUrl:e,theme:r="light",timeoutMs:n=15e3,views:s,output:i,outputType:o="relative",maxAttempts:a=3,chromiumSandbox:c=!1}){t.info(`${K.dim("output")} ${i}`),t.info(
506
506
  `${K.dim("base url")} ${e}
507
507
  `);const l=Ca.executablePath();t.info(K.cyan("Start chromium")+" "+K.dim(l));const u=await Ca.launch({chromiumSandbox:c,headless:!0});t.info(K.cyan("Color scheme: ")+r+`
508
- `);const f=await u.newContext({deviceScaleFactor:2,colorScheme:r,baseURL:e,bypassCSP:!0,ignoreHTTPSErrors:!0,isMobile:!1});f.setDefaultNavigationTimeout(n),f.setDefaultTimeout(n);try{return await Qg({browserContext:f,views:s,output:i,outputType:o,logger:t,maxAttempts:a,timeout:n,theme:r})}finally{t.info(K.cyan("close chromium")),await f.close(),await u.close()}}async function ru({path:t,useDotBin:e,theme:r="light",output:n,outputType:s,serverUrl:i,ignore:o=!1,timeoutMs:a=1e4,maxAttempts:c=3,filter:l,
509
- chromiumSandbox:u=!1}){const f=He("export"),h=Xh(),$=await rt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});n??=$.workspace;let b;const y=$.languageServices.projects();if(!i&&(f.info(K.cyan("start preview server")),b=await eu({languageServices:$,buildWebcomponent:!1,openBrowser:!1,useOverviewGraph:!1,hmr:!1}),i=Yc(b),!i))throw f.error("Vite server is not ready, no resolvedUrls"),new Error("Vite server is not ready, no resolvedUrls");for(const d of y){y.length>1&&(f.info(K.dim("----\
510
- -----")),f.info(`${K.dim("project:")} ${d.id}`),f.info(`${K.dim("folder:")} ${d.folder.fsPath}`));let g=await $.diagrams(d.id);if(l&&qs(l,1)&&qs(g,1)){const w=Kg(l);f.info(`${K.cyan("filter")} ${K.dim(JSON.stringify(l))}`),g=g.filter(S=>w(S.id)?(f.info(`${K.green("include")} ${S.id} \u2705`),!0):(f.info(`${K.gray("skip")} ${K.dim(S.id)}`),!1))}if(!qs(g,1)){f.warn("no views found");continue}let p=y.length>1?la(pa(i,"project",d.id)):i,m=y.length>1?pa(n,d.id):n;const _=await tu({logger:f,serverUrl:p,
511
- theme:r,timeoutMs:a,views:g,output:m,outputType:s,maxAttempts:c,chromiumSandbox:u}),{pretty:v}=Vh(h);if(_.length>0&&f.info(K.green(`exported ${_.length} views in ${v}`)+`
512
- `),_.length!==g.length&&(o&&_.length>0?f.info(K.dim("ignore")+" "+K.red(`failed ${g.length-_.length} out of ${g.length} views`)):f.error(K.red(`failed ${g.length-_.length} out of ${g.length} views`))),_.length!==g.length&&(_.length===0||!o))throw new Error(`Failed ${g.length-_.length} out of ${g.length} views`)}b&&(f.info(K.cyan("stop server")),await b.close().catch(d=>{f.error(d)}))}const{cyan:nu,dim:su}=K;async function ey({path:t,useDotBin:e,useHashHistory:r,webcomponentPrefix:n,title:s,useOverview:i=!1,
513
- output:o,outputSingleFile:a,base:c}){await Ir();const l=He("c4:build"),u=await rt.fromWorkspace(t,{graphviz:e?"binary":"wasm",logger:"vite"}),f=o??ge(u.workspace,"dist");let h=ge(f,"assets");if(i)try{h=ge(f,"assets","previews"),await ct(h,{recursive:!0}),l.info(`${nu("Generate previews")} ${su(h)}
514
- `),await ru({path:t,useDotBin:e,output:h,outputType:"flat",ignore:!0})}catch($){l.error(K.red("Failed to generate previews")),l.error($),l.warn(K.yellow("Ignore previews and continue build")),Is(h,{recursive:!0,force:!0}),i=!1}await Tg({base:c,useHashHistory:a||r,customLogger:l,useOverviewGraph:i,webcomponentPrefix:n,title:s,languageServices:u,likec4AssetsDir:h,outputDir:o,outputSingleFile:a}),i&&(l.info(`${nu("clean previews")} ${su(h)}`),Is(h,{recursive:!0,force:!0}))}const ty={command:"build \
515
- [path]",aliases:["bundle"],describe:"Build a static website",builder:t=>t.positional("path",Cr).option("output",{alias:"o",type:"string",desc:"output directory for production build",normalize:!0,coerce:ge}).option("base",_c).option("use-hash-history",$c).option("use-dot",We).option("webcomponent-prefix",ai).option("title",Jm).option("output-single-file",Qm).example(`${K.green("$0 build -o ./build ./src")}`,K.gray("Search for likec4 files in 'src' and output static site to 'build'")),handler:async t=>{
508
+ `);const f=await u.newContext({deviceScaleFactor:2,colorScheme:r,baseURL:e,bypassCSP:!0,ignoreHTTPSErrors:!0,isMobile:!1});f.setDefaultNavigationTimeout(n),f.setDefaultTimeout(n);try{return await Qg({browserContext:f,views:s,output:i,outputType:o,logger:t,maxAttempts:a,timeout:n,theme:r})}finally{t.info(K.cyan("close chromium")),await f.close(),await u.close()}}async function nu({path:t,useDotBin:e,theme:r="light",output:n,outputType:s,serverUrl:i,ignore:o=!1,timeoutMs:a=1e4,maxAttempts:c=3,filter:l,
509
+ chromiumSandbox:u=!1}){const f=He("export"),h=Jh(),$=await rt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});n??=$.workspace;let b;const y=$.languageServices.projects();if(!i&&(f.info(K.cyan("start preview server")),b=await tu({languageServices:$,buildWebcomponent:!1,openBrowser:!1,useOverviewGraph:!1,hmr:!1}),i=Xc(b),!i))throw f.error("Vite server is not ready, no resolvedUrls"),new Error("Vite server is not ready, no resolvedUrls");for(const d of y){y.length>1&&(f.info(K.dim("----\
510
+ -----")),f.info(`${K.dim("project:")} ${d.id}`),f.info(`${K.dim("folder:")} ${d.folder.fsPath}`));let g=await $.diagrams(d.id);if(l&&qs(l,1)&&qs(g,1)){const w=Kg(l);f.info(`${K.cyan("filter")} ${K.dim(JSON.stringify(l))}`),g=g.filter(S=>w(S.id)?(f.info(`${K.green("include")} ${S.id} \u2705`),!0):(f.info(`${K.gray("skip")} ${K.dim(S.id)}`),!1))}if(!qs(g,1)){f.warn("no views found");continue}let p=y.length>1?la(pa(i,"project",d.id)):i,m=y.length>1?pa(n,d.id):n;const _=await ru({logger:f,serverUrl:p,
511
+ theme:r,timeoutMs:a,views:g,output:m,outputType:s,maxAttempts:c,chromiumSandbox:u}),{pretty:v}=zh(h);if(_.length>0&&f.info(K.green(`exported ${_.length} views in ${v}`)+`
512
+ `),_.length!==g.length&&(o&&_.length>0?f.info(K.dim("ignore")+" "+K.red(`failed ${g.length-_.length} out of ${g.length} views`)):f.error(K.red(`failed ${g.length-_.length} out of ${g.length} views`))),_.length!==g.length&&(_.length===0||!o))throw new Error(`Failed ${g.length-_.length} out of ${g.length} views`)}b&&(f.info(K.cyan("stop server")),await b.close().catch(d=>{f.error(d)}))}const{cyan:su,dim:iu}=K;async function ey({path:t,useDotBin:e,useHashHistory:r,webcomponentPrefix:n,title:s,useOverview:i=!1,
513
+ output:o,outputSingleFile:a,base:c}){await Ir();const l=He("c4:build"),u=await rt.fromWorkspace(t,{graphviz:e?"binary":"wasm",logger:"vite"}),f=o??ge(u.workspace,"dist");let h=ge(f,"assets");if(i)try{h=ge(f,"assets","previews"),await ct(h,{recursive:!0}),l.info(`${su("Generate previews")} ${iu(h)}
514
+ `),await nu({path:t,useDotBin:e,output:h,outputType:"flat",ignore:!0})}catch($){l.error(K.red("Failed to generate previews")),l.error($),l.warn(K.yellow("Ignore previews and continue build")),Is(h,{recursive:!0,force:!0}),i=!1}await Tg({base:c,useHashHistory:a||r,customLogger:l,useOverviewGraph:i,webcomponentPrefix:n,title:s,languageServices:u,likec4AssetsDir:h,outputDir:o,outputSingleFile:a}),i&&(l.info(`${su("clean previews")} ${iu(h)}`),Is(h,{recursive:!0,force:!0}))}const ty={command:"build \
515
+ [path]",aliases:["bundle"],describe:"Build a static website",builder:t=>t.positional("path",Cr).option("output",{alias:"o",type:"string",desc:"output directory for production build",normalize:!0,coerce:ge}).option("base",vc).option("use-hash-history",$c).option("use-dot",We).option("webcomponent-prefix",ai).option("title",_c).option("output-single-file",Qm).example(`${K.green("$0 build -o ./build ./src")}`,K.gray("Search for likec4 files in 'src' and output static site to 'build'")),handler:async t=>{
516
516
  await ey({path:t.path,output:t.output,base:t.base,useHashHistory:t["use-hash-history"],useDotBin:t["use-dot"],webcomponentPrefix:t["webcomponent-prefix"],title:t.title,outputSingleFile:t["output-single-file"]??!1})}},Ft=t=>{const e=typeof t;return t!==null&&(e==="object"||e==="function")},xi=new Set(["__proto__","prototype","constructor"]),ry=new Set("0123456789");function pn(t){const e=[];let r="",n="start",s=!1;for(const i of t)switch(i){case"\\":{if(n==="index")throw new Error("Invalid charac\
517
517
  ter in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");s&&(r+=i),n="property",s=!s;break}case".":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(s){s=!1,r+=i;break}if(xi.has(r))return[];e.push(r),r="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(s){s=!1,r+=i;break}if(n==="property"){if(xi.has(r))return[];e.push(r),r=""}n="\
518
518
  index";break}case"]":{if(n==="index"){e.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!ry.has(i))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),s&&(s=!1,r+="\\"),r+=i}}switch(s&&(r+="\\"),n){case"property":{if(xi.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"\
519
- start":{e.push("");break}}return e}function Mi(t,e){if(typeof e!="number"&&Array.isArray(t)){const r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function iu(t,e){if(Mi(t,e))throw new Error("Cannot use string index")}function ny(t,e,r){if(!Ft(t)||typeof e!="string")return r===void 0?t:r;const n=pn(e);if(n.length===0)return r;for(let s=0;s<n.length;s++){const i=n[s];if(Mi(t,i)?t=s===n.length-1?void 0:null:t=t[i],t==null){if(s!==n.length-1)return r;break}}return t===void 0?
520
- r:t}function ou(t,e,r){if(!Ft(t)||typeof e!="string")return t;const n=t,s=pn(e);for(let i=0;i<s.length;i++){const o=s[i];iu(t,o),i===s.length-1?t[o]=r:Ft(t[o])||(t[o]=typeof s[i+1]=="number"?[]:{}),t=t[o]}return n}function sy(t,e){if(!Ft(t)||typeof e!="string")return!1;const r=pn(e);for(let n=0;n<r.length;n++){const s=r[n];if(iu(t,s),n===r.length-1)return delete t[s],!0;if(t=t[s],!Ft(t))return!1}}function iy(t,e){if(!Ft(t)||typeof e!="string")return!1;const r=pn(e);if(r.length===0)return!1;for(const n of r){
519
+ start":{e.push("");break}}return e}function Mi(t,e){if(typeof e!="number"&&Array.isArray(t)){const r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function ou(t,e){if(Mi(t,e))throw new Error("Cannot use string index")}function ny(t,e,r){if(!Ft(t)||typeof e!="string")return r===void 0?t:r;const n=pn(e);if(n.length===0)return r;for(let s=0;s<n.length;s++){const i=n[s];if(Mi(t,i)?t=s===n.length-1?void 0:null:t=t[i],t==null){if(s!==n.length-1)return r;break}}return t===void 0?
520
+ r:t}function au(t,e,r){if(!Ft(t)||typeof e!="string")return t;const n=t,s=pn(e);for(let i=0;i<s.length;i++){const o=s[i];ou(t,o),i===s.length-1?t[o]=r:Ft(t[o])||(t[o]=typeof s[i+1]=="number"?[]:{}),t=t[o]}return n}function sy(t,e){if(!Ft(t)||typeof e!="string")return!1;const r=pn(e);for(let n=0;n<r.length;n++){const s=r[n];if(ou(t,s),n===r.length-1)return delete t[s],!0;if(t=t[s],!Ft(t))return!1}}function iy(t,e){if(!Ft(t)||typeof e!="string")return!1;const r=pn(e);if(r.length===0)return!1;for(const n of r){
521
521
  if(!Ft(t)||!(n in t)||Mi(t,n))return!1;t=t[n]}return!0}const bt=hr.homedir(),qi=hr.tmpdir(),{env:tr}=Se,oy=t=>{const e=me.join(bt,"Library");return{data:me.join(e,"Application Support",t),config:me.join(e,"Preferences",t),cache:me.join(e,"Caches",t),log:me.join(e,"Logs",t),temp:me.join(qi,t)}},ay=t=>{const e=tr.APPDATA||me.join(bt,"AppData","Roaming"),r=tr.LOCALAPPDATA||me.join(bt,"AppData","Local");return{data:me.join(r,t,"Data"),config:me.join(e,t,"Config"),cache:me.join(r,t,"Cache"),log:me.join(
522
522
  r,t,"Log"),temp:me.join(qi,t)}},cy=t=>{const e=me.basename(bt);return{data:me.join(tr.XDG_DATA_HOME||me.join(bt,".local","share"),t),config:me.join(tr.XDG_CONFIG_HOME||me.join(bt,".config"),t),cache:me.join(tr.XDG_CACHE_HOME||me.join(bt,".cache"),t),log:me.join(tr.XDG_STATE_HOME||me.join(bt,".local","state"),t),temp:me.join(qi,e,t)}};function uy(t,{suffix:e="nodejs"}={}){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);return e&&(t+=`-${e}`),Se.platform==="darwin"?
523
523
  oy(t):Se.platform==="win32"?ay(t):cy(t)}const wt=(t,e)=>function(...n){return t.apply(void 0,n).catch(e)},ft=(t,e)=>function(...n){try{return t.apply(void 0,n)}catch(s){return e(s)}},ly=Se.getuid?!Se.getuid():!1,fy=1e4,qe=()=>{},be={isChangeErrorOk:t=>{if(!be.isNodeError(t))return!1;const{code:e}=t;return e==="ENOSYS"||!ly&&(e==="EINVAL"||e==="EPERM")},isNodeError:t=>t instanceof Error,isRetriableError:t=>{if(!be.isNodeError(t))return!1;const{code:e}=t;return e==="EMFILE"||e==="ENFILE"||e==="EAG\
@@ -526,24 +526,24 @@ this.queueActive.size<this.limit/2?this.tick():this.init()},this.remove=e=>{this
526
526
  return hy.schedule().then(o=>{const a=l=>(o(),l),c=l=>{if(o(),Date.now()>=n)throw l;if(e(l)){const u=Math.round(100*Math.random());return new Promise(h=>setTimeout(h,u)).then(()=>s.apply(void 0,i))}throw l};return t.apply(void 0,i).then(a,c)})}},St=(t,e)=>function(n){return function s(...i){try{return t.apply(void 0,i)}catch(o){if(Date.now()>n)throw o;if(e(o))return s.apply(void 0,i);throw o}}},Ne={attempt:{chmod:wt(Ie(he.chmod),be.onChangeError),chown:wt(Ie(he.chown),be.onChangeError),close:wt(
527
527
  Ie(he.close),qe),fsync:wt(Ie(he.fsync),qe),mkdir:wt(Ie(he.mkdir),qe),realpath:wt(Ie(he.realpath),qe),stat:wt(Ie(he.stat),qe),unlink:wt(Ie(he.unlink),qe),chmodSync:ft(he.chmodSync,be.onChangeError),chownSync:ft(he.chownSync,be.onChangeError),closeSync:ft(he.closeSync,qe),existsSync:ft(he.existsSync,qe),fsyncSync:ft(he.fsync,qe),mkdirSync:ft(he.mkdirSync,qe),realpathSync:ft(he.realpathSync,qe),statSync:ft(he.statSync,qe),unlinkSync:ft(he.unlinkSync,qe)},retry:{close:Et(Ie(he.close),be.isRetriableError),
528
528
  fsync:Et(Ie(he.fsync),be.isRetriableError),open:Et(Ie(he.open),be.isRetriableError),readFile:Et(Ie(he.readFile),be.isRetriableError),rename:Et(Ie(he.rename),be.isRetriableError),stat:Et(Ie(he.stat),be.isRetriableError),write:Et(Ie(he.write),be.isRetriableError),writeFile:Et(Ie(he.writeFile),be.isRetriableError),closeSync:St(he.closeSync,be.isRetriableError),fsyncSync:St(he.fsyncSync,be.isRetriableError),openSync:St(he.openSync,be.isRetriableError),readFileSync:St(he.readFileSync,be.isRetriableError),
529
- renameSync:St(he.renameSync,be.isRetriableError),statSync:St(he.statSync,be.isRetriableError),writeSync:St(he.writeSync,be.isRetriableError),writeFileSync:St(he.writeFileSync,be.isRetriableError)}},py="utf8",au=438,my=511,gy={},yy=hr.userInfo().uid,$y=hr.userInfo().gid,_y=1e3,vy=!!Se.getuid;Se.getuid&&Se.getuid();const cu=128,by=t=>t instanceof Error&&"code"in t,uu=t=>typeof t=="string",Ui=t=>t===void 0,wy=Se.platform==="linux",lu=Se.platform==="win32",Hi=["SIGABRT","SIGALRM","SIGHUP","SIGINT","\
530
- SIGTERM"];lu||Hi.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),wy&&Hi.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");class Ey{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=e=>{if(!this.exited){this.exited=!0;for(const r of this.callbacks)r();e&&(lu&&e!=="SIGINT"&&e!=="SIGTERM"&&e!=="SIGKILL"?Se.kill(Se.pid,"SIGTERM"):Se.kill(Se.pid,e))}},this.hook=()=>{Se.once("exit",()=>this.exit());for(const e of Hi)try{Se.once(e,()=>this.exit(e))}catch{}},
529
+ renameSync:St(he.renameSync,be.isRetriableError),statSync:St(he.statSync,be.isRetriableError),writeSync:St(he.writeSync,be.isRetriableError),writeFileSync:St(he.writeFileSync,be.isRetriableError)}},py="utf8",cu=438,my=511,gy={},yy=hr.userInfo().uid,$y=hr.userInfo().gid,_y=1e3,vy=!!Se.getuid;Se.getuid&&Se.getuid();const uu=128,by=t=>t instanceof Error&&"code"in t,lu=t=>typeof t=="string",Ui=t=>t===void 0,wy=Se.platform==="linux",fu=Se.platform==="win32",Hi=["SIGABRT","SIGALRM","SIGHUP","SIGINT","\
530
+ SIGTERM"];fu||Hi.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),wy&&Hi.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");class Ey{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=e=>{if(!this.exited){this.exited=!0;for(const r of this.callbacks)r();e&&(fu&&e!=="SIGINT"&&e!=="SIGTERM"&&e!=="SIGKILL"?Se.kill(Se.pid,"SIGTERM"):Se.kill(Se.pid,e))}},this.hook=()=>{Se.once("exit",()=>this.exit());for(const e of Hi)try{Se.once(e,()=>this.exit(e))}catch{}},
531
531
  this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}}const Sy=new Ey,Ry=Sy.register,Te={store:{},create:t=>{const e=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),s=`.tmp-${Date.now().toString().slice(-10)}${e}`;return`${t}${s}`},get:(t,e,r=!0)=>{const n=Te.truncate(e(t));return n in Te.store?Te.get(t,e,r):(Te.store[n]=r,[n,()=>delete Te.store[n]])},purge:t=>{Te.store[t]&&(delete Te.store[t],Ne.attempt.unlink(t))},purgeSync:t=>{Te.store[t]&&(delete Te.
532
- store[t],Ne.attempt.unlinkSync(t))},purgeSyncAll:()=>{for(const t in Te.store)Te.purgeSync(t)},truncate:t=>{const e=me.basename(t);if(e.length<=cu)return t;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(e);if(!r)return t;const n=e.length-cu;return`${t.slice(0,-e.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};Ry(Te.purgeSyncAll);function fu(t,e,r=gy){if(uu(r))return fu(t,e,{encoding:r});const n=Date.now()+((r.timeout??_y)||-1);let s=null,i=null,o=null;try{const a=Ne.attempt.realpathSync(
533
- t),c=!!a;t=a||t,[i,s]=Te.get(t,r.tmpCreate||Te.create,r.tmpPurge!==!1);const l=vy&&Ui(r.chown),u=Ui(r.mode);if(c&&(l||u)){const f=Ne.attempt.statSync(t);f&&(r={...r},l&&(r.chown={uid:f.uid,gid:f.gid}),u&&(r.mode=f.mode))}if(!c){const f=me.dirname(t);Ne.attempt.mkdirSync(f,{mode:my,recursive:!0})}o=Ne.retry.openSync(n)(i,"w",r.mode||au),r.tmpCreated&&r.tmpCreated(i),uu(e)?Ne.retry.writeSync(n)(o,e,0,r.encoding||py):Ui(e)||Ne.retry.writeSync(n)(o,e,0,e.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?Ne.
534
- retry.fsyncSync(n)(o):Ne.attempt.fsync(o)),Ne.retry.closeSync(n)(o),o=null,r.chown&&(r.chown.uid!==yy||r.chown.gid!==$y)&&Ne.attempt.chownSync(i,r.chown.uid,r.chown.gid),r.mode&&r.mode!==au&&Ne.attempt.chmodSync(i,r.mode);try{Ne.retry.renameSync(n)(i,t)}catch(f){if(!by(f)||f.code!=="ENAMETOOLONG")throw f;Ne.retry.renameSync(n)(i,Te.truncate(t))}s(),i=null}finally{o&&Ne.attempt.closeSync(o),i&&Te.purge(i)}}var mn={exports:{}},Fi={},dt={},Vt={},Vi={},zi={},Gi={},du;function gn(){return du||(du=1,function(t){
532
+ store[t],Ne.attempt.unlinkSync(t))},purgeSyncAll:()=>{for(const t in Te.store)Te.purgeSync(t)},truncate:t=>{const e=me.basename(t);if(e.length<=uu)return t;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(e);if(!r)return t;const n=e.length-uu;return`${t.slice(0,-e.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};Ry(Te.purgeSyncAll);function du(t,e,r=gy){if(lu(r))return du(t,e,{encoding:r});const n=Date.now()+((r.timeout??_y)||-1);let s=null,i=null,o=null;try{const a=Ne.attempt.realpathSync(
533
+ t),c=!!a;t=a||t,[i,s]=Te.get(t,r.tmpCreate||Te.create,r.tmpPurge!==!1);const l=vy&&Ui(r.chown),u=Ui(r.mode);if(c&&(l||u)){const f=Ne.attempt.statSync(t);f&&(r={...r},l&&(r.chown={uid:f.uid,gid:f.gid}),u&&(r.mode=f.mode))}if(!c){const f=me.dirname(t);Ne.attempt.mkdirSync(f,{mode:my,recursive:!0})}o=Ne.retry.openSync(n)(i,"w",r.mode||cu),r.tmpCreated&&r.tmpCreated(i),lu(e)?Ne.retry.writeSync(n)(o,e,0,r.encoding||py):Ui(e)||Ne.retry.writeSync(n)(o,e,0,e.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?Ne.
534
+ retry.fsyncSync(n)(o):Ne.attempt.fsync(o)),Ne.retry.closeSync(n)(o),o=null,r.chown&&(r.chown.uid!==yy||r.chown.gid!==$y)&&Ne.attempt.chownSync(i,r.chown.uid,r.chown.gid),r.mode&&r.mode!==cu&&Ne.attempt.chmodSync(i,r.mode);try{Ne.retry.renameSync(n)(i,t)}catch(f){if(!by(f)||f.code!=="ENAMETOOLONG")throw f;Ne.retry.renameSync(n)(i,Te.truncate(t))}s(),i=null}finally{o&&Ne.attempt.closeSync(o),i&&Te.purge(i)}}var mn={exports:{}},Fi={},dt={},Vt={},Vi={},zi={},Gi={},hu;function gn(){return hu||(hu=1,function(t){
535
535
  Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(p){if(super(),!t.IDENTIFIER.test(p))throw new Error("CodeGen: name must be a valid identifier");this.str=p}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=
536
536
  r;class n extends e{constructor(p){super(),this._items=typeof p=="string"?[p]:p}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const p=this._items[0];return p===""||p==='""'}get str(){var p;return(p=this._str)!==null&&p!==void 0?p:this._str=this._items.reduce((m,_)=>`${m}${_}`,"")}get names(){var p;return(p=this._names)!==null&&p!==void 0?p:this._names=this._items.reduce((m,_)=>(_ instanceof r&&(m[_.str]=(m[_.str]||0)+1),m),{})}}t._Code=n,t.nil=new n("");function s(g,...p){
537
537
  const m=[g[0]];let _=0;for(;_<p.length;)a(m,p[_]),m.push(g[++_]);return new n(m)}t._=s;const i=new n("+");function o(g,...p){const m=[$(g[0])];let _=0;for(;_<p.length;)m.push(i),a(m,p[_]),m.push(i,$(g[++_]));return c(m),new n(m)}t.str=o;function a(g,p){p instanceof n?g.push(...p._items):p instanceof r?g.push(p):g.push(f(p))}t.addCodeArg=a;function c(g){let p=1;for(;p<g.length-1;){if(g[p]===i){const m=l(g[p-1],g[p+1]);if(m!==void 0){g.splice(p-1,3,m);continue}g[p++]="+"}p++}}function l(g,p){if(p===
538
538
  '""')return g;if(g==='""')return p;if(typeof g=="string")return p instanceof r||g[g.length-1]!=='"'?void 0:typeof p!="string"?`${g.slice(0,-1)}${p}"`:p[0]==='"'?g.slice(0,-1)+p.slice(1):void 0;if(typeof p=="string"&&p[0]==='"'&&!(g instanceof r))return`"${g}${p.slice(1)}`}function u(g,p){return p.emptyStr()?g:g.emptyStr()?p:o`${g}${p}`}t.strConcat=u;function f(g){return typeof g=="number"||typeof g=="boolean"||g===null?g:$(Array.isArray(g)?g.join(","):g)}function h(g){return new n($(g))}t.stringify=
539
- h;function $(g){return JSON.stringify(g).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=$;function b(g){return typeof g=="string"&&t.IDENTIFIER.test(g)?new n(`.${g}`):s`[${g}]`}t.getProperty=b;function y(g){if(typeof g=="string"&&t.IDENTIFIER.test(g))return new n(`${g}`);throw new Error(`CodeGen: invalid export name: ${g}, use explicit $id name mapping`)}t.getEsmExportName=y;function d(g){return new n(g.toString())}t.regexpCode=d}(Gi)),Gi}var Bi={},hu;function pu(){return hu||
540
- (hu=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=gn();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class s{constructor({prefixes:l,parent:u}={}){this._names=
539
+ h;function $(g){return JSON.stringify(g).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=$;function b(g){return typeof g=="string"&&t.IDENTIFIER.test(g)?new n(`.${g}`):s`[${g}]`}t.getProperty=b;function y(g){if(typeof g=="string"&&t.IDENTIFIER.test(g))return new n(`${g}`);throw new Error(`CodeGen: invalid export name: ${g}, use explicit $id name mapping`)}t.getEsmExportName=y;function d(g){return new n(g.toString())}t.regexpCode=d}(Gi)),Gi}var Bi={},pu;function mu(){return pu||
540
+ (pu=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=gn();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class s{constructor({prefixes:l,parent:u}={}){this._names=
541
541
  {},this._prefixes=l,this._parent=u}toName(l){return l instanceof e.Name?l:this.name(l)}name(l){return new e.Name(this._newName(l))}_newName(l){const u=this._names[l]||this._nameGroup(l);return`${l}${u.index++}`}_nameGroup(l){var u,f;if(!((f=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||f===void 0)&&f.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}t.Scope=s;class i extends e.
542
542
  Name{constructor(l,u){super(u),this.prefix=l}setValue(l,{property:u,itemIndex:f}){this.value=l,this.scopePath=(0,e._)`.${new e.Name(u)}[${f}]`}}t.ValueScopeName=i;const o=(0,e._)`\n`;class a extends s{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?o:e.nil}}get(){return this._scope}name(l){return new i(l,this._newName(l))}value(l,u){var f;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const h=this.toName(l),{prefix:$}=h,b=(f=u.key)!==
543
543
  null&&f!==void 0?f:u.ref;let y=this._values[$];if(y){const p=y.get(b);if(p)return p}else y=this._values[$]=new Map;y.set(b,h);const d=this._scope[$]||(this._scope[$]=[]),g=d.length;return d[g]=u.ref,h.setValue(u,{property:$,itemIndex:g}),h}getValue(l,u){const f=this._values[l];if(f)return f.get(u)}scopeRefs(l,u=this._values){return this._reduceValues(u,f=>{if(f.scopePath===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return(0,e._)`${l}${f.scopePath}`})}scopeCode(l=this._values,u,f){
544
544
  return this._reduceValues(l,h=>{if(h.value===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return h.value.code},u,f)}_reduceValues(l,u,f={},h){let $=e.nil;for(const b in l){const y=l[b];if(!y)continue;const d=f[b]=f[b]||new Map;y.forEach(g=>{if(d.has(g))return;d.set(g,n.Started);let p=u(g);if(p){const m=this.opts.es5?t.varKinds.var:t.varKinds.const;$=(0,e._)`${$}${m} ${g} = ${p};${this.opts._n}`}else if(p=h?.(g))$=(0,e._)`${$}${p}${this.opts._n}`;else throw new r(g);d.set(g,n.Completed)})}
545
- return $}}t.ValueScope=a}(Bi)),Bi}var mu;function pe(){return mu||(mu=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=gn(),r=pu();var n=gn();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(
546
- t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var s=pu();
545
+ return $}}t.ValueScope=a}(Bi)),Bi}var gu;function pe(){return gu||(gu=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=gn(),r=mu();var n=gn();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(
546
+ t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var s=mu();
547
547
  Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e.
548
548
  _Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class i{optimizeNodes(){return this}optimizeNames(E,R){return this}}class o extends i{constructor(E,R,C){super(),this.varKind=E,this.name=R,this.rhs=C}render({es5:E,_n:R}){const C=E?r.varKinds.var:this.varKind,X=this.rhs===void 0?"":` = ${this.rhs}`;return`${C} ${this.name}${X};`+R}optimizeNames(E,R){if(E[this.name.str])return this.rhs&&(this.rhs=k(this.rhs,E,R)),this}get names(){return this.rhs instanceof e._CodeOrName?
549
549
  this.rhs.names:{}}}class a extends i{constructor(E,R,C){super(),this.lhs=E,this.rhs=R,this.sideEffects=C}render({_n:E}){return`${this.lhs} = ${this.rhs};`+E}optimizeNames(E,R){if(!(this.lhs instanceof e.Name&&!E[this.lhs.str]&&!this.sideEffects))return this.rhs=k(this.rhs,E,R),this}get names(){const E=this.lhs instanceof e.Name?{}:{...this.lhs.names};return j(E,this.rhs)}}class c extends a{constructor(E,R,C,X){super(E,C,X),this.op=R}render({_n:E}){return`${this.lhs} ${this.op}= ${this.rhs};`+E}}
@@ -565,26 +565,26 @@ atch" and "finally"');const X=new I;if(this._blockNode(X),this.code(E),R){const
565
565
  E!==void 0&&C!==E)throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${E} expected`);return this._nodes.length=R,this}func(E,R=e.nil,C,X){return this._blockNode(new w(E,R,C)),X&&this.code(X).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(E=1){for(;E-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(E){return this._currNode.nodes.push(E),this}_blockNode(E){this._currNode.nodes.push(E),this._nodes.push(E)}_endBlockNode(E,R){
566
566
  const C=this._currNode;if(C instanceof E||R&&C instanceof R)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${R?`${E.kind}/${R.kind}`:E.kind}"`)}_elseNode(E){const R=this._currNode;if(!(R instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=R.else=E,this}get _root(){return this._nodes[0]}get _currNode(){const E=this._nodes;return E[E.length-1]}set _currNode(E){const R=this._nodes;R[R.length-1]=E}}t.CodeGen=D;function M(x,E){for(const R in E)x[R]=
567
567
  (x[R]||0)+(E[R]||0);return x}function j(x,E){return E instanceof e._CodeOrName?M(x,E.names):x}function k(x,E,R){if(x instanceof e.Name)return C(x);if(!X(x))return x;return new e._Code(x._items.reduce((Z,ie)=>(ie instanceof e.Name&&(ie=C(ie)),ie instanceof e._Code?Z.push(...ie._items):Z.push(ie),Z),[]));function C(Z){const ie=R[Z.str];return ie===void 0||E[Z.str]!==1?Z:(delete E[Z.str],ie)}function X(Z){return Z instanceof e._Code&&Z._items.some(ie=>ie instanceof e.Name&&E[ie.str]===1&&R[ie.str]!==
568
- void 0)}}function U(x,E){for(const R in E)x[R]=(x[R]||0)-(E[R]||0)}function Y(x){return typeof x=="boolean"||typeof x=="number"||x===null?!x:(0,e._)`!${V(x)}`}t.not=Y;const G=A(t.operators.AND);function J(...x){return x.reduce(G)}t.and=J;const se=A(t.operators.OR);function H(...x){return x.reduce(se)}t.or=H;function A(x){return(E,R)=>E===e.nil?R:R===e.nil?E:(0,e._)`${V(E)} ${x} ${V(R)}`}function V(x){return x instanceof e.Name?x:(0,e._)`(${x})`}}(zi)),zi}var ye={},gu;function $e(){if(gu)return ye;
569
- gu=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.checkStrictMode=ye.getErrorPath=ye.Type=ye.useFunc=ye.setEvaluated=ye.evaluatedPropsToName=ye.mergeEvaluated=ye.eachItem=ye.unescapeJsonPointer=ye.escapeJsonPointer=ye.escapeFragment=ye.unescapeFragment=ye.schemaRefOrVal=ye.schemaHasRulesButRef=ye.schemaHasRules=ye.checkUnknownRules=ye.alwaysValidSchema=ye.toHash=void 0;const t=pe(),e=gn();function r(v){const w={};for(const S of v)w[S]=!0;return w}ye.toHash=r;function n(v,w){return typeof w==
568
+ void 0)}}function U(x,E){for(const R in E)x[R]=(x[R]||0)-(E[R]||0)}function Y(x){return typeof x=="boolean"||typeof x=="number"||x===null?!x:(0,e._)`!${V(x)}`}t.not=Y;const G=A(t.operators.AND);function J(...x){return x.reduce(G)}t.and=J;const se=A(t.operators.OR);function H(...x){return x.reduce(se)}t.or=H;function A(x){return(E,R)=>E===e.nil?R:R===e.nil?E:(0,e._)`${V(E)} ${x} ${V(R)}`}function V(x){return x instanceof e.Name?x:(0,e._)`(${x})`}}(zi)),zi}var ye={},yu;function $e(){if(yu)return ye;
569
+ yu=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.checkStrictMode=ye.getErrorPath=ye.Type=ye.useFunc=ye.setEvaluated=ye.evaluatedPropsToName=ye.mergeEvaluated=ye.eachItem=ye.unescapeJsonPointer=ye.escapeJsonPointer=ye.escapeFragment=ye.unescapeFragment=ye.schemaRefOrVal=ye.schemaHasRulesButRef=ye.schemaHasRules=ye.checkUnknownRules=ye.alwaysValidSchema=ye.toHash=void 0;const t=pe(),e=gn();function r(v){const w={};for(const S of v)w[S]=!0;return w}ye.toHash=r;function n(v,w){return typeof w==
570
570
  "boolean"?w:Object.keys(w).length===0?!0:(s(v,w),!i(w,v.self.RULES.all))}ye.alwaysValidSchema=n;function s(v,w=v.schema){const{opts:S,self:I}=v;if(!S.strictSchema||typeof w=="boolean")return;const F=I.RULES.keywords;for(const B in w)F[B]||_(v,`unknown keyword: "${B}"`)}ye.checkUnknownRules=s;function i(v,w){if(typeof v=="boolean")return!v;for(const S in v)if(w[S])return!0;return!1}ye.schemaHasRules=i;function o(v,w){if(typeof v=="boolean")return!v;for(const S in v)if(S!=="$ref"&&w.all[S])return!0;
571
571
  return!1}ye.schemaHasRulesButRef=o;function a({topSchemaRef:v,schemaPath:w},S,I,F){if(!F){if(typeof S=="number"||typeof S=="boolean")return S;if(typeof S=="string")return(0,t._)`${S}`}return(0,t._)`${v}${w}${(0,t.getProperty)(I)}`}ye.schemaRefOrVal=a;function c(v){return f(decodeURIComponent(v))}ye.unescapeFragment=c;function l(v){return encodeURIComponent(u(v))}ye.escapeFragment=l;function u(v){return typeof v=="number"?`${v}`:v.replace(/~/g,"~0").replace(/\//g,"~1")}ye.escapeJsonPointer=u;function f(v){
572
572
  return v.replace(/~1/g,"/").replace(/~0/g,"~")}ye.unescapeJsonPointer=f;function h(v,w){if(Array.isArray(v))for(const S of v)w(S);else w(v)}ye.eachItem=h;function $({mergeNames:v,mergeToName:w,mergeValues:S,resultToName:I}){return(F,B,D,M)=>{const j=D===void 0?B:D instanceof t.Name?(B instanceof t.Name?v(F,B,D):w(F,B,D),D):B instanceof t.Name?(w(F,D,B),B):S(B,D);return M===t.Name&&!(j instanceof t.Name)?I(F,j):j}}ye.mergeEvaluated={props:$({mergeNames:(v,w,S)=>v.if((0,t._)`${S} !== true && ${w} !== undefined`,
573
573
  ()=>{v.if((0,t._)`${w} === true`,()=>v.assign(S,!0),()=>v.assign(S,(0,t._)`${S} || {}`).code((0,t._)`Object.assign(${S}, ${w})`))}),mergeToName:(v,w,S)=>v.if((0,t._)`${S} !== true`,()=>{w===!0?v.assign(S,!0):(v.assign(S,(0,t._)`${S} || {}`),y(v,S,w))}),mergeValues:(v,w)=>v===!0?!0:{...v,...w},resultToName:b}),items:$({mergeNames:(v,w,S)=>v.if((0,t._)`${S} !== true && ${w} !== undefined`,()=>v.assign(S,(0,t._)`${w} === true ? true : ${S} > ${w} ? ${S} : ${w}`)),mergeToName:(v,w,S)=>v.if((0,t._)`${S} !== true`,
574
574
  ()=>v.assign(S,w===!0?!0:(0,t._)`${S} > ${w} ? ${S} : ${w}`)),mergeValues:(v,w)=>v===!0?!0:Math.max(v,w),resultToName:(v,w)=>v.var("items",w)})};function b(v,w){if(w===!0)return v.var("props",!0);const S=v.var("props",(0,t._)`{}`);return w!==void 0&&y(v,S,w),S}ye.evaluatedPropsToName=b;function y(v,w,S){Object.keys(S).forEach(I=>v.assign((0,t._)`${w}${(0,t.getProperty)(I)}`,!0))}ye.setEvaluated=y;const d={};function g(v,w){return v.scopeValue("func",{ref:w,code:d[w.code]||(d[w.code]=new e._Code(
575
575
  w.code))})}ye.useFunc=g;var p;(function(v){v[v.Num=0]="Num",v[v.Str=1]="Str"})(p||(ye.Type=p={}));function m(v,w,S){if(v instanceof t.Name){const I=w===p.Num;return S?I?(0,t._)`"[" + ${v} + "]"`:(0,t._)`"['" + ${v} + "']"`:I?(0,t._)`"/" + ${v}`:(0,t._)`"/" + ${v}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return S?(0,t.getProperty)(v).toString():"/"+u(v)}ye.getErrorPath=m;function _(v,w,S=v.opts.strictSchema){if(S){if(w=`strict mode: ${w}`,S===!0)throw new Error(w);v.self.logger.warn(w)}}return ye.
576
- checkStrictMode=_,ye}var yn={},yu;function Je(){if(yu)return yn;yu=1,Object.defineProperty(yn,"__esModule",{value:!0});const t=pe(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.
577
- Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return yn.default=e,yn}var $u;function $n(){return $u||($u=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=pe(),r=$e(),n=Je();t.keywordError={message:({keyword:d})=>(0,e.str)`must pass "${d}" keyword validation`},t.keyword$DataError={message:({
576
+ checkStrictMode=_,ye}var yn={},$u;function Je(){if($u)return yn;$u=1,Object.defineProperty(yn,"__esModule",{value:!0});const t=pe(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.
577
+ Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return yn.default=e,yn}var _u;function $n(){return _u||(_u=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=pe(),r=$e(),n=Je();t.keywordError={message:({keyword:d})=>(0,e.str)`must pass "${d}" keyword validation`},t.keyword$DataError={message:({
578
578
  keyword:d,schemaType:g})=>g?(0,e.str)`"${d}" keyword must be ${g} ($data)`:(0,e.str)`"${d}" keyword is invalid ($data)`};function s(d,g=t.keywordError,p,m){const{it:_}=d,{gen:v,compositeRule:w,allErrors:S}=_,I=f(d,g,p);m??(w||S)?c(v,I):l(_,(0,e._)`[${I}]`)}t.reportError=s;function i(d,g=t.keywordError,p){const{it:m}=d,{gen:_,compositeRule:v,allErrors:w}=m,S=f(d,g,p);c(_,S),v||w||l(m,n.default.vErrors)}t.reportExtraError=i;function o(d,g){d.assign(n.default.errors,g),d.if((0,e._)`${n.default.vErrors} !== null`,
579
579
  ()=>d.if(g,()=>d.assign((0,e._)`${n.default.vErrors}.length`,g),()=>d.assign(n.default.vErrors,null)))}t.resetErrorsCount=o;function a({gen:d,keyword:g,schemaValue:p,data:m,errsCount:_,it:v}){if(_===void 0)throw new Error("ajv implementation error");const w=d.name("err");d.forRange("i",_,n.default.errors,S=>{d.const(w,(0,e._)`${n.default.vErrors}[${S}]`),d.if((0,e._)`${w}.instancePath === undefined`,()=>d.assign((0,e._)`${w}.instancePath`,(0,e.strConcat)(n.default.instancePath,v.errorPath))),d.assign(
580
580
  (0,e._)`${w}.schemaPath`,(0,e.str)`${v.errSchemaPath}/${g}`),v.opts.verbose&&(d.assign((0,e._)`${w}.schema`,p),d.assign((0,e._)`${w}.data`,m))})}t.extendErrors=a;function c(d,g){const p=d.const("err",g);d.if((0,e._)`${n.default.vErrors} === null`,()=>d.assign(n.default.vErrors,(0,e._)`[${p}]`),(0,e._)`${n.default.vErrors}.push(${p})`),d.code((0,e._)`${n.default.errors}++`)}function l(d,g){const{gen:p,validateName:m,schemaEnv:_}=d;_.$async?p.throw((0,e._)`new ${d.ValidationError}(${g})`):(p.assign(
581
581
  (0,e._)`${m}.errors`,g),p.return(!1))}const u={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function f(d,g,p){const{createErrors:m}=d.it;return m===!1?(0,e._)`{}`:h(d,g,p)}function h(d,g,p={}){const{gen:m,it:_}=d,v=[$(_,p),b(d,p)];return y(d,g,v),m.object(...v)}function $({errorPath:d},{instancePath:g}){const p=g?
582
582
  (0,e.str)`${d}${(0,r.getErrorPath)(g,r.Type.Str)}`:d;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,p)]}function b({keyword:d,it:{errSchemaPath:g}},{schemaPath:p,parentSchema:m}){let _=m?g:(0,e.str)`${g}/${d}`;return p&&(_=(0,e.str)`${_}${(0,r.getErrorPath)(p,r.Type.Str)}`),[u.schemaPath,_]}function y(d,{params:g,message:p},m){const{keyword:_,data:v,schemaValue:w,it:S}=d,{opts:I,propertyName:F,topSchemaRef:B,schemaPath:D}=S;m.push([u.keyword,_],[u.params,typeof g=="function"?
583
- g(d):g||(0,e._)`{}`]),I.messages&&m.push([u.message,typeof p=="function"?p(d):p]),I.verbose&&m.push([u.schema,w],[u.parentSchema,(0,e._)`${B}${D}`],[n.default.data,v]),F&&m.push([u.propertyName,F])}}(Vi)),Vi}var _u;function Ay(){if(_u)return Vt;_u=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.boolOrEmptySchema=Vt.topBoolOrEmptySchema=void 0;const t=$n(),e=pe(),r=Je(),n={message:"boolean schema is false"};function s(a){const{gen:c,schema:l,validateName:u}=a;l===!1?o(a,!1):typeof l=="obje\
584
- ct"&&l.$async===!0?c.return(r.default.data):(c.assign((0,e._)`${u}.errors`,null),c.return(!0))}Vt.topBoolOrEmptySchema=s;function i(a,c){const{gen:l,schema:u}=a;u===!1?(l.var(c,!1),o(a)):l.var(c,!0)}Vt.boolOrEmptySchema=i;function o(a,c){const{gen:l,data:u}=a,f={gen:l,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,t.reportError)(f,n,void 0,c)}return Vt}var Pe={},zt={},vu;function bu(){if(vu)return zt;vu=1,Object.defineProperty(zt,"__esModule",{value:!0}),
583
+ g(d):g||(0,e._)`{}`]),I.messages&&m.push([u.message,typeof p=="function"?p(d):p]),I.verbose&&m.push([u.schema,w],[u.parentSchema,(0,e._)`${B}${D}`],[n.default.data,v]),F&&m.push([u.propertyName,F])}}(Vi)),Vi}var vu;function Ay(){if(vu)return Vt;vu=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.boolOrEmptySchema=Vt.topBoolOrEmptySchema=void 0;const t=$n(),e=pe(),r=Je(),n={message:"boolean schema is false"};function s(a){const{gen:c,schema:l,validateName:u}=a;l===!1?o(a,!1):typeof l=="obje\
584
+ ct"&&l.$async===!0?c.return(r.default.data):(c.assign((0,e._)`${u}.errors`,null),c.return(!0))}Vt.topBoolOrEmptySchema=s;function i(a,c){const{gen:l,schema:u}=a;u===!1?(l.var(c,!1),o(a)):l.var(c,!0)}Vt.boolOrEmptySchema=i;function o(a,c){const{gen:l,data:u}=a,f={gen:l,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,t.reportError)(f,n,void 0,c)}return Vt}var Pe={},zt={},bu;function wu(){if(bu)return zt;bu=1,Object.defineProperty(zt,"__esModule",{value:!0}),
585
585
  zt.getRules=zt.isJSONType=void 0;const t=["string","number","integer","boolean","null","object","array"],e=new Set(t);function r(s){return typeof s=="string"&&e.has(s)}zt.isJSONType=r;function n(){const s={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...s,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},s.number,s.string,s.array,s.object],post:{rules:[]},all:{},keywords:{}}}return zt.getRules=n,zt}var ht={},
586
- wu;function Eu(){if(wu)return ht;wu=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.shouldUseRule=ht.shouldUseGroup=ht.schemaHasRulesForType=void 0;function t({schema:n,self:s},i){const o=s.RULES.types[i];return o&&o!==!0&&e(n,o)}ht.schemaHasRulesForType=t;function e(n,s){return s.rules.some(i=>r(n,i))}ht.shouldUseGroup=e;function r(n,s){var i;return n[s.keyword]!==void 0||((i=s.definition.implements)===null||i===void 0?void 0:i.some(o=>n[o]!==void 0))}return ht.shouldUseRule=r,ht}var Su;
587
- function _n(){if(Su)return Pe;Su=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.reportTypeError=Pe.checkDataTypes=Pe.checkDataType=Pe.coerceAndCheckDataType=Pe.getJSONTypes=Pe.getSchemaTypes=Pe.DataType=void 0;const t=bu(),e=Eu(),r=$n(),n=pe(),s=$e();var i;(function(p){p[p.Correct=0]="Correct",p[p.Wrong=1]="Wrong"})(i||(Pe.DataType=i={}));function o(p){const m=a(p.type);if(m.includes("null")){if(p.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!m.length&&
586
+ Eu;function Su(){if(Eu)return ht;Eu=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.shouldUseRule=ht.shouldUseGroup=ht.schemaHasRulesForType=void 0;function t({schema:n,self:s},i){const o=s.RULES.types[i];return o&&o!==!0&&e(n,o)}ht.schemaHasRulesForType=t;function e(n,s){return s.rules.some(i=>r(n,i))}ht.shouldUseGroup=e;function r(n,s){var i;return n[s.keyword]!==void 0||((i=s.definition.implements)===null||i===void 0?void 0:i.some(o=>n[o]!==void 0))}return ht.shouldUseRule=r,ht}var Ru;
587
+ function _n(){if(Ru)return Pe;Ru=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.reportTypeError=Pe.checkDataTypes=Pe.checkDataType=Pe.coerceAndCheckDataType=Pe.getJSONTypes=Pe.getSchemaTypes=Pe.DataType=void 0;const t=wu(),e=Su(),r=$n(),n=pe(),s=$e();var i;(function(p){p[p.Correct=0]="Correct",p[p.Wrong=1]="Wrong"})(i||(Pe.DataType=i={}));function o(p){const m=a(p.type);if(m.includes("null")){if(p.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!m.length&&
588
588
  p.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');p.nullable===!0&&m.push("null")}return m}Pe.getSchemaTypes=o;function a(p){const m=Array.isArray(p)?p:p?[p]:[];if(m.every(t.isJSONType))return m;throw new Error("type must be JSONType or JSONType[]: "+m.join(","))}Pe.getJSONTypes=a;function c(p,m){const{gen:_,data:v,opts:w}=p,S=u(m,w.coerceTypes),I=m.length>0&&!(S.length===0&&m.length===1&&(0,e.schemaHasRulesForType)(p,m[0]));if(I){const F=b(m,v,w.strictNumbers,i.Wrong);
589
589
  _.if(F,()=>{S.length?f(p,m,S):d(p)})}return I}Pe.coerceAndCheckDataType=c;const l=new Set(["string","number","integer","boolean","null"]);function u(p,m){return m?p.filter(_=>l.has(_)||m==="array"&&_==="array"):[]}function f(p,m,_){const{gen:v,data:w,opts:S}=p,I=v.let("dataType",(0,n._)`typeof ${w}`),F=v.let("coerced",(0,n._)`undefined`);S.coerceTypes==="array"&&v.if((0,n._)`${I} == 'object' && Array.isArray(${w}) && ${w}.length == 1`,()=>v.assign(w,(0,n._)`${w}[0]`).assign(I,(0,n._)`typeof ${w}`).
590
590
  if(b(m,w,S.strictNumbers),()=>v.assign(F,w))),v.if((0,n._)`${F} !== undefined`);for(const D of _)(l.has(D)||D==="array"&&S.coerceTypes==="array")&&B(D);v.else(),d(p),v.endIf(),v.if((0,n._)`${F} !== undefined`,()=>{v.assign(w,F),h(p,F)});function B(D){switch(D){case"string":v.elseIf((0,n._)`${I} == "number" || ${I} == "boolean"`).assign(F,(0,n._)`"" + ${w}`).elseIf((0,n._)`${w} === null`).assign(F,(0,n._)`""`);return;case"number":v.elseIf((0,n._)`${I} == "boolean" || ${w} === null
@@ -593,31 +593,31 @@ if(b(m,w,S.strictNumbers),()=>v.assign(F,w))),v.if((0,n._)`${F} !== undefined`);
593
593
  || ${I} === "boolean" || ${w} === null`).assign(F,(0,n._)`[${w}]`)}}}function h({gen:p,parentData:m,parentDataProperty:_},v){p.if((0,n._)`${m} !== undefined`,()=>p.assign((0,n._)`${m}[${_}]`,v))}function $(p,m,_,v=i.Correct){const w=v===i.Correct?n.operators.EQ:n.operators.NEQ;let S;switch(p){case"null":return(0,n._)`${m} ${w} null`;case"array":S=(0,n._)`Array.isArray(${m})`;break;case"object":S=(0,n._)`${m} && typeof ${m} == "object" && !Array.isArray(${m})`;break;case"integer":S=
594
594
  I((0,n._)`!(${m} % 1) && !isNaN(${m})`);break;case"number":S=I();break;default:return(0,n._)`typeof ${m} ${w} ${p}`}return v===i.Correct?S:(0,n.not)(S);function I(F=n.nil){return(0,n.and)((0,n._)`typeof ${m} == "number"`,F,_?(0,n._)`isFinite(${m})`:n.nil)}}Pe.checkDataType=$;function b(p,m,_,v){if(p.length===1)return $(p[0],m,_,v);let w;const S=(0,s.toHash)(p);if(S.array&&S.object){const I=(0,n._)`typeof ${m} != "object"`;w=S.null?I:(0,n._)`!${m} || ${I}`,delete S.null,delete S.array,delete S.object}else
595
595
  w=n.nil;S.number&&delete S.integer;for(const I in S)w=(0,n.and)(w,$(I,m,_,v));return w}Pe.checkDataTypes=b;const y={message:({schema:p})=>`must be ${p}`,params:({schema:p,schemaValue:m})=>typeof p=="string"?(0,n._)`{type: ${p}}`:(0,n._)`{type: ${m}}`};function d(p){const m=g(p);(0,r.reportError)(m,y)}Pe.reportTypeError=d;function g(p){const{gen:m,data:_,schema:v}=p,w=(0,s.schemaRefOrVal)(p,v,"type");return{gen:m,keyword:"type",data:_,schema:v.type,schemaCode:w,schemaValue:w,parentSchema:v,params:{},
596
- it:p}}return Pe}var Tr={},Ru;function Oy(){if(Ru)return Tr;Ru=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.assignDefaults=void 0;const t=pe(),e=$e();function r(s,i){const{properties:o,items:a}=s.schema;if(i==="object"&&o)for(const c in o)n(s,c,o[c].default);else i==="array"&&Array.isArray(a)&&a.forEach((c,l)=>n(s,l,c.default))}Tr.assignDefaults=r;function n(s,i,o){const{gen:a,compositeRule:c,data:l,opts:u}=s;if(o===void 0)return;const f=(0,t._)`${l}${(0,t.getProperty)(i)}`;if(c){(0,e.checkStrictMode)(
597
- s,`default is ignored for: ${f}`);return}let h=(0,t._)`${f} === undefined`;u.useDefaults==="empty"&&(h=(0,t._)`${h} || ${f} === null || ${f} === ""`),a.if(h,(0,t._)`${f} = ${(0,t.stringify)(o)}`)}return Tr}var Qe={},ve={},Au;function Ze(){if(Au)return ve;Au=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.validateUnion=ve.validateArray=ve.usePattern=ve.callValidateCode=ve.schemaProperties=ve.allSchemaProperties=ve.noPropertyInData=ve.propertyInData=ve.isOwnProperty=ve.hasPropFunc=ve.reportMissingProp=
596
+ it:p}}return Pe}var Tr={},Au;function Oy(){if(Au)return Tr;Au=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.assignDefaults=void 0;const t=pe(),e=$e();function r(s,i){const{properties:o,items:a}=s.schema;if(i==="object"&&o)for(const c in o)n(s,c,o[c].default);else i==="array"&&Array.isArray(a)&&a.forEach((c,l)=>n(s,l,c.default))}Tr.assignDefaults=r;function n(s,i,o){const{gen:a,compositeRule:c,data:l,opts:u}=s;if(o===void 0)return;const f=(0,t._)`${l}${(0,t.getProperty)(i)}`;if(c){(0,e.checkStrictMode)(
597
+ s,`default is ignored for: ${f}`);return}let h=(0,t._)`${f} === undefined`;u.useDefaults==="empty"&&(h=(0,t._)`${h} || ${f} === null || ${f} === ""`),a.if(h,(0,t._)`${f} = ${(0,t.stringify)(o)}`)}return Tr}var Qe={},ve={},Ou;function Ze(){if(Ou)return ve;Ou=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.validateUnion=ve.validateArray=ve.usePattern=ve.callValidateCode=ve.schemaProperties=ve.allSchemaProperties=ve.noPropertyInData=ve.propertyInData=ve.isOwnProperty=ve.hasPropFunc=ve.reportMissingProp=
598
598
  ve.checkMissingProp=ve.checkReportMissingProp=void 0;const t=pe(),e=$e(),r=Je(),n=$e();function s(p,m){const{gen:_,data:v,it:w}=p;_.if(u(_,v,m,w.opts.ownProperties),()=>{p.setParams({missingProperty:(0,t._)`${m}`},!0),p.error()})}ve.checkReportMissingProp=s;function i({gen:p,data:m,it:{opts:_}},v,w){return(0,t.or)(...v.map(S=>(0,t.and)(u(p,m,S,_.ownProperties),(0,t._)`${w} = ${S}`)))}ve.checkMissingProp=i;function o(p,m){p.setParams({missingProperty:m},!0),p.error()}ve.reportMissingProp=o;function a(p){
599
599
  return p.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}ve.hasPropFunc=a;function c(p,m,_){return(0,t._)`${a(p)}.call(${m}, ${_})`}ve.isOwnProperty=c;function l(p,m,_,v){const w=(0,t._)`${m}${(0,t.getProperty)(_)} !== undefined`;return v?(0,t._)`${w} && ${c(p,m,_)}`:w}ve.propertyInData=l;function u(p,m,_,v){const w=(0,t._)`${m}${(0,t.getProperty)(_)} === undefined`;return v?(0,t.or)(w,(0,t.not)(c(p,m,_))):w}ve.noPropertyInData=u;function f(p){
600
600
  return p?Object.keys(p).filter(m=>m!=="__proto__"):[]}ve.allSchemaProperties=f;function h(p,m){return f(m).filter(_=>!(0,e.alwaysValidSchema)(p,m[_]))}ve.schemaProperties=h;function $({schemaCode:p,data:m,it:{gen:_,topSchemaRef:v,schemaPath:w,errorPath:S},it:I},F,B,D){const M=D?(0,t._)`${p}, ${m}, ${v}${w}`:m,j=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,S)],[r.default.parentData,I.parentData],[r.default.parentDataProperty,I.parentDataProperty],[r.default.rootData,r.default.rootData]];
601
601
  I.opts.dynamicRef&&j.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const k=(0,t._)`${M}, ${_.object(...j)}`;return B!==t.nil?(0,t._)`${F}.call(${B}, ${k})`:(0,t._)`${F}(${k})`}ve.callValidateCode=$;const b=(0,t._)`new RegExp`;function y({gen:p,it:{opts:m}},_){const v=m.unicodeRegExp?"u":"",{regExp:w}=m.code,S=w(_,v);return p.scopeValue("pattern",{key:S.toString(),ref:S,code:(0,t._)`${w.code==="new RegExp"?b:(0,n.useFunc)(p,w)}(${_}, ${v})`})}ve.usePattern=y;function d(p){const{gen:m,
602
602
  data:_,keyword:v,it:w}=p,S=m.name("valid");if(w.allErrors){const F=m.let("valid",!0);return I(()=>m.assign(F,!1)),F}return m.var(S,!0),I(()=>m.break()),S;function I(F){const B=m.const("len",(0,t._)`${_}.length`);m.forRange("i",0,B,D=>{p.subschema({keyword:v,dataProp:D,dataPropType:e.Type.Num},S),m.if((0,t.not)(S),F)})}}ve.validateArray=d;function g(p){const{gen:m,schema:_,keyword:v,it:w}=p;if(!Array.isArray(_))throw new Error("ajv implementation error");if(_.some(B=>(0,e.alwaysValidSchema)(w,B))&&
603
- !w.opts.unevaluated)return;const I=m.let("valid",!1),F=m.name("_valid");m.block(()=>_.forEach((B,D)=>{const M=p.subschema({keyword:v,schemaProp:D,compositeRule:!0},F);m.assign(I,(0,t._)`${I} || ${F}`),p.mergeValidEvaluated(M,F)||m.if((0,t.not)(I))})),p.result(I,()=>p.reset(),()=>p.error(!0))}return ve.validateUnion=g,ve}var Ou;function Cy(){if(Ou)return Qe;Ou=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.validateKeywordUsage=Qe.validSchemaType=Qe.funcKeywordCode=Qe.macroKeywordCode=void 0;
603
+ !w.opts.unevaluated)return;const I=m.let("valid",!1),F=m.name("_valid");m.block(()=>_.forEach((B,D)=>{const M=p.subschema({keyword:v,schemaProp:D,compositeRule:!0},F);m.assign(I,(0,t._)`${I} || ${F}`),p.mergeValidEvaluated(M,F)||m.if((0,t.not)(I))})),p.result(I,()=>p.reset(),()=>p.error(!0))}return ve.validateUnion=g,ve}var Cu;function Cy(){if(Cu)return Qe;Cu=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.validateKeywordUsage=Qe.validSchemaType=Qe.funcKeywordCode=Qe.macroKeywordCode=void 0;
604
604
  const t=pe(),e=Je(),r=Ze(),n=$n();function s(h,$){const{gen:b,keyword:y,schema:d,parentSchema:g,it:p}=h,m=$.macro.call(p.self,d,g,p),_=l(b,y,m);p.opts.validateSchema!==!1&&p.self.validateSchema(m,!0);const v=b.name("valid");h.subschema({schema:m,schemaPath:t.nil,errSchemaPath:`${p.errSchemaPath}/${y}`,topSchemaRef:_,compositeRule:!0},v),h.pass(v,()=>h.error(!0))}Qe.macroKeywordCode=s;function i(h,$){var b;const{gen:y,keyword:d,schema:g,parentSchema:p,$data:m,it:_}=h;c(_,$);const v=!m&&$.compile?
605
605
  $.compile.call(_.self,g,p,_):$.validate,w=l(y,d,v),S=y.let("valid");h.block$data(S,I),h.ok((b=$.valid)!==null&&b!==void 0?b:S);function I(){if($.errors===!1)D(),$.modifying&&o(h),M(()=>h.error());else{const j=$.async?F():B();$.modifying&&o(h),M(()=>a(h,j))}}function F(){const j=y.let("ruleErrs",null);return y.try(()=>D((0,t._)`await `),k=>y.assign(S,!1).if((0,t._)`${k} instanceof ${_.ValidationError}`,()=>y.assign(j,(0,t._)`${k}.errors`),()=>y.throw(k))),j}function B(){const j=(0,t._)`${w}.errors`;
606
606
  return y.assign(j,null),D(t.nil),j}function D(j=$.async?(0,t._)`await `:t.nil){const k=_.opts.passContext?e.default.this:e.default.self,U=!("compile"in $&&!m||$.schema===!1);y.assign(S,(0,t._)`${j}${(0,r.callValidateCode)(h,w,k,U)}`,$.modifying)}function M(j){var k;y.if((0,t.not)((k=$.valid)!==null&&k!==void 0?k:S),j)}}Qe.funcKeywordCode=i;function o(h){const{gen:$,data:b,it:y}=h;$.if(y.parentData,()=>$.assign(b,(0,t._)`${y.parentData}[${y.parentDataProperty}]`))}function a(h,$){const{gen:b}=h;b.
607
607
  if((0,t._)`Array.isArray(${$})`,()=>{b.assign(e.default.vErrors,(0,t._)`${e.default.vErrors} === null ? ${$} : ${e.default.vErrors}.concat(${$})`).assign(e.default.errors,(0,t._)`${e.default.vErrors}.length`),(0,n.extendErrors)(h)},()=>h.error())}function c({schemaEnv:h},$){if($.async&&!h.$async)throw new Error("async keyword in sync schema")}function l(h,$,b){if(b===void 0)throw new Error(`keyword "${$}" failed to compile`);return h.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,t.
608
608
  stringify)(b)})}function u(h,$,b=!1){return!$.length||$.some(y=>y==="array"?Array.isArray(h):y==="object"?h&&typeof h=="object"&&!Array.isArray(h):typeof h==y||b&&typeof h>"u")}Qe.validSchemaType=u;function f({schema:h,opts:$,self:b,errSchemaPath:y},d,g){if(Array.isArray(d.keyword)?!d.keyword.includes(g):d.keyword!==g)throw new Error("ajv implementation error");const p=d.dependencies;if(p?.some(m=>!Object.prototype.hasOwnProperty.call(h,m)))throw new Error(`parent schema must have dependencies o\
609
- f ${g}: ${p.join(",")}`);if(d.validateSchema&&!d.validateSchema(h[g])){const _=`keyword "${g}" value is invalid at path "${y}": `+b.errorsText(d.validateSchema.errors);if($.validateSchema==="log")b.logger.error(_);else throw new Error(_)}}return Qe.validateKeywordUsage=f,Qe}var pt={},Cu;function Py(){if(Cu)return pt;Cu=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.extendSubschemaMode=pt.extendSubschemaData=pt.getSubschema=void 0;const t=pe(),e=$e();function r(i,{keyword:o,schemaProp:a,schema:c,
609
+ f ${g}: ${p.join(",")}`);if(d.validateSchema&&!d.validateSchema(h[g])){const _=`keyword "${g}" value is invalid at path "${y}": `+b.errorsText(d.validateSchema.errors);if($.validateSchema==="log")b.logger.error(_);else throw new Error(_)}}return Qe.validateKeywordUsage=f,Qe}var pt={},Pu;function Py(){if(Pu)return pt;Pu=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.extendSubschemaMode=pt.extendSubschemaData=pt.getSubschema=void 0;const t=pe(),e=$e();function r(i,{keyword:o,schemaProp:a,schema:c,
610
610
  schemaPath:l,errSchemaPath:u,topSchemaRef:f}){if(o!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(o!==void 0){const h=i.schema[o];return a===void 0?{schema:h,schemaPath:(0,t._)`${i.schemaPath}${(0,t.getProperty)(o)}`,errSchemaPath:`${i.errSchemaPath}/${o}`}:{schema:h[a],schemaPath:(0,t._)`${i.schemaPath}${(0,t.getProperty)(o)}${(0,t.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${o}/${(0,e.escapeFragment)(a)}`}}if(c!==void 0){if(l===void 0||
611
611
  u===void 0||f===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:l,topSchemaRef:f,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}pt.getSubschema=r;function n(i,o,{dataProp:a,dataPropType:c,data:l,dataTypes:u,propertyName:f}){if(l!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:h}=o;if(a!==void 0){const{errorPath:b,dataPathArr:y,opts:d}=o,
612
612
  g=h.let("data",(0,t._)`${o.data}${(0,t.getProperty)(a)}`,!0);$(g),i.errorPath=(0,t.str)`${b}${(0,e.getErrorPath)(a,c,d.jsPropertySyntax)}`,i.parentDataProperty=(0,t._)`${a}`,i.dataPathArr=[...y,i.parentDataProperty]}if(l!==void 0){const b=l instanceof t.Name?l:h.let("data",l,!0);$(b),f!==void 0&&(i.propertyName=f)}u&&(i.dataTypes=u);function $(b){i.data=b,i.dataLevel=o.dataLevel+1,i.dataTypes=[],o.definedProperties=new Set,i.parentData=o.data,i.dataNames=[...o.dataNames,b]}}pt.extendSubschemaData=
613
- n;function s(i,{jtdDiscriminator:o,jtdMetadata:a,compositeRule:c,createErrors:l,allErrors:u}){c!==void 0&&(i.compositeRule=c),l!==void 0&&(i.createErrors=l),u!==void 0&&(i.allErrors=u),i.jtdDiscriminator=o,i.jtdMetadata=a}return pt.extendSubschemaMode=s,pt}var je={},Wi={exports:{}},Pu;function Iy(){if(Pu)return Wi.exports;Pu=1;var t=Wi.exports=function(n,s,i){typeof s=="function"&&(i=s,s={}),i=s.cb||i;var o=typeof i=="function"?i:i.pre||function(){},a=i.post||function(){};e(s,o,a,n,"",n)};t.keywords=
613
+ n;function s(i,{jtdDiscriminator:o,jtdMetadata:a,compositeRule:c,createErrors:l,allErrors:u}){c!==void 0&&(i.compositeRule=c),l!==void 0&&(i.createErrors=l),u!==void 0&&(i.allErrors=u),i.jtdDiscriminator=o,i.jtdMetadata=a}return pt.extendSubschemaMode=s,pt}var je={},Wi={exports:{}},Iu;function Iy(){if(Iu)return Wi.exports;Iu=1;var t=Wi.exports=function(n,s,i){typeof s=="function"&&(i=s,s={}),i=s.cb||i;var o=typeof i=="function"?i:i.pre||function(){},a=i.post||function(){};e(s,o,a,n,"",n)};t.keywords=
614
614
  {additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};
615
615
  function e(n,s,i,o,a,c,l,u,f,h){if(o&&typeof o=="object"&&!Array.isArray(o)){s(o,a,c,l,u,f,h);for(var $ in o){var b=o[$];if(Array.isArray(b)){if($ in t.arrayKeywords)for(var y=0;y<b.length;y++)e(n,s,i,b[y],a+"/"+$+"/"+y,c,a,$,o,y)}else if($ in t.propsKeywords){if(b&&typeof b=="object")for(var d in b)e(n,s,i,b[d],a+"/"+$+"/"+r(d),c,a,$,o,d)}else($ in t.keywords||n.allKeys&&!($ in t.skipKeywords))&&e(n,s,i,b,a+"/"+$,c,a,$,o)}i(o,a,c,l,u,f,h)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,
616
- "~1")}return Wi.exports}var Iu;function vn(){if(Iu)return je;Iu=1,Object.defineProperty(je,"__esModule",{value:!0}),je.getSchemaRefs=je.resolveUrl=je.normalizeId=je._getFullPath=je.getFullPath=je.inlineRef=void 0;const t=$e(),e=Ia(),r=Iy(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function s(y,d=!0){return typeof y=="boolean"?!0:d===!0?!o(y):d?a(y)<=
616
+ "~1")}return Wi.exports}var Nu;function vn(){if(Nu)return je;Nu=1,Object.defineProperty(je,"__esModule",{value:!0}),je.getSchemaRefs=je.resolveUrl=je.normalizeId=je._getFullPath=je.getFullPath=je.inlineRef=void 0;const t=$e(),e=Ia(),r=Iy(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function s(y,d=!0){return typeof y=="boolean"?!0:d===!0?!o(y):d?a(y)<=
617
617
  d:!1}je.inlineRef=s;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o(y){for(const d in y){if(i.has(d))return!0;const g=y[d];if(Array.isArray(g)&&g.some(o)||typeof g=="object"&&o(g))return!0}return!1}function a(y){let d=0;for(const g in y){if(g==="$ref")return 1/0;if(d++,!n.has(g)&&(typeof y[g]=="object"&&(0,t.eachItem)(y[g],p=>d+=a(p)),d===1/0))return 1/0}return d}function c(y,d="",g){g!==!1&&(d=f(d));const p=y.parse(d);return l(y,p)}je.getFullPath=
618
618
  c;function l(y,d){return y.serialize(d).split("#")[0]+"#"}je._getFullPath=l;const u=/#\/?$/;function f(y){return y?y.replace(u,""):""}je.normalizeId=f;function h(y,d,g){return g=f(g),y.resolve(d,g)}je.resolveUrl=h;const $=/^[a-z_][-a-z0-9._]*$/i;function b(y,d){if(typeof y=="boolean")return{};const{schemaId:g,uriResolver:p}=this.opts,m=f(y[g]||d),_={"":m},v=c(p,m,!1),w={},S=new Set;return r(y,{allKeys:!0},(B,D,M,j)=>{if(j===void 0)return;const k=v+D;let U=_[j];typeof B[g]=="string"&&(U=Y.call(this,
619
619
  B[g])),G.call(this,B.$anchor),G.call(this,B.$dynamicAnchor),_[D]=U;function Y(J){const se=this.opts.uriResolver.resolve;if(J=f(U?se(U,J):J),S.has(J))throw F(J);S.add(J);let H=this.refs[J];return typeof H=="string"&&(H=this.refs[H]),typeof H=="object"?I(B,H.schema,J):J!==f(k)&&(J[0]==="#"?(I(B,w[J],J),w[J]=B):this.refs[J]=k),J}function G(J){if(typeof J=="string"){if(!$.test(J))throw new Error(`invalid anchor "${J}"`);Y.call(this,`#${J}`)}}}),w;function I(B,D,M){if(D!==void 0&&!e(B,D))throw F(M)}function F(B){
620
- return new Error(`reference "${B}" resolves to more than one schema`)}}return je.getSchemaRefs=b,je}var Nu;function jr(){if(Nu)return dt;Nu=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.getData=dt.KeywordCxt=dt.validateFunctionCode=void 0;const t=Ay(),e=_n(),r=Eu(),n=_n(),s=Oy(),i=Cy(),o=Py(),a=pe(),c=Je(),l=vn(),u=$e(),f=$n();function h(L){if(v(L)&&(S(L),_(L))){d(L);return}$(L,()=>(0,t.topBoolOrEmptySchema)(L))}dt.validateFunctionCode=h;function $({gen:L,validateName:q,schema:Q,schemaEnv:ne,
620
+ return new Error(`reference "${B}" resolves to more than one schema`)}}return je.getSchemaRefs=b,je}var Tu;function jr(){if(Tu)return dt;Tu=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.getData=dt.KeywordCxt=dt.validateFunctionCode=void 0;const t=Ay(),e=_n(),r=Su(),n=_n(),s=Oy(),i=Cy(),o=Py(),a=pe(),c=Je(),l=vn(),u=$e(),f=$n();function h(L){if(v(L)&&(S(L),_(L))){d(L);return}$(L,()=>(0,t.topBoolOrEmptySchema)(L))}dt.validateFunctionCode=h;function $({gen:L,validateName:q,schema:Q,schemaEnv:ne,
621
621
  opts:P},T){P.code.es5?L.func(q,(0,a._)`${c.default.data}, ${c.default.valCxt}`,ne.$async,()=>{L.code((0,a._)`"use strict"; ${p(Q,P)}`),y(L,P),L.code(T)}):L.func(q,(0,a._)`${c.default.data}, ${b(P)}`,ne.$async,()=>L.code(p(Q,P)).code(T))}function b(L){return(0,a._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${L.dynamicRef?(0,a._)`, ${c.default.dynamicAnchors}={}`:a.nil}}={}`}function y(L,q){L.if(c.default.valCxt,
622
622
  ()=>{L.var(c.default.instancePath,(0,a._)`${c.default.valCxt}.${c.default.instancePath}`),L.var(c.default.parentData,(0,a._)`${c.default.valCxt}.${c.default.parentData}`),L.var(c.default.parentDataProperty,(0,a._)`${c.default.valCxt}.${c.default.parentDataProperty}`),L.var(c.default.rootData,(0,a._)`${c.default.valCxt}.${c.default.rootData}`),q.dynamicRef&&L.var(c.default.dynamicAnchors,(0,a._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{L.var(c.default.instancePath,(0,a._)`""`),L.var(
623
623
  c.default.parentData,(0,a._)`undefined`),L.var(c.default.parentDataProperty,(0,a._)`undefined`),L.var(c.default.rootData,c.default.data),q.dynamicRef&&L.var(c.default.dynamicAnchors,(0,a._)`{}`)})}function d(L){const{schema:q,opts:Q,gen:ne}=L;$(L,()=>{Q.$comment&&q.$comment&&j(L),B(L),ne.let(c.default.vErrors,null),ne.let(c.default.errors,0),Q.unevaluated&&g(L),I(L),k(L)})}function g(L){const{gen:q,validateName:Q}=L;L.evaluated=q.const("evaluated",(0,a._)`${Q}.evaluated`),q.if((0,a._)`${L.evaluated}.dynamicProps`,
@@ -637,8 +637,8 @@ const{gen:ne,schemaCode:P,schemaType:T,def:ee}=this;ne.if((0,a.or)((0,a._)`${P}
637
637
  N,Q,T.opts.strictNumbers,n.DataType.Wrong)}`}return a.nil}function W(){if(P.validateSchema){const N=q.scopeValue("validate$data",{ref:P.validateSchema});return(0,a._)`!${N}(${Q})`}return a.nil}}subschema(q,Q){const ne=(0,o.getSubschema)(this.it,q);(0,o.extendSubschemaData)(ne,this.it,q),(0,o.extendSubschemaMode)(ne,q);const P={...this.it,...ne,items:void 0,props:void 0};return m(P,Q),P}mergeEvaluated(q,Q){const{it:ne,gen:P}=this;ne.opts.unevaluated&&(ne.props!==!0&&q.props!==void 0&&(ne.props=u.
638
638
  mergeEvaluated.props(P,q.props,ne.props,Q)),ne.items!==!0&&q.items!==void 0&&(ne.items=u.mergeEvaluated.items(P,q.items,ne.items,Q)))}mergeValidEvaluated(q,Q){const{it:ne,gen:P}=this;if(ne.opts.unevaluated&&(ne.props!==!0||ne.items!==!0))return P.if(Q,()=>this.mergeEvaluated(q,a.Name)),!0}}dt.KeywordCxt=C;function X(L,q,Q,ne){const P=new C(L,Q,q);"code"in Q?Q.code(P,ne):P.$data&&Q.validate?(0,i.funcKeywordCode)(P,Q):"macro"in Q?(0,i.macroKeywordCode)(P,Q):(Q.compile||Q.validate)&&(0,i.funcKeywordCode)(
639
639
  P,Q)}const Z=/^\/(?:[^~]|~0|~1)*$/,ie=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function oe(L,{dataLevel:q,dataNames:Q,dataPathArr:ne}){let P,T;if(L==="")return c.default.rootData;if(L[0]==="/"){if(!Z.test(L))throw new Error(`Invalid JSON-pointer: ${L}`);P=L,T=c.default.rootData}else{const te=ie.exec(L);if(!te)throw new Error(`Invalid JSON-pointer: ${L}`);const z=+te[1];if(P=te[2],P==="#"){if(z>=q)throw new Error(N("property/index",z));return ne[q-z]}if(z>q)throw new Error(N("data",z));if(T=Q[q-z],!P)return T}
640
- let ee=T;const W=P.split("/");for(const te of W)te&&(T=(0,a._)`${T}${(0,a.getProperty)((0,u.unescapeJsonPointer)(te))}`,ee=(0,a._)`${ee} && ${T}`);return ee;function N(te,z){return`Cannot access ${te} ${z} levels up, current level is ${q}`}}return dt.getData=oe,dt}var bn={},Tu;function wn(){if(Tu)return bn;Tu=1,Object.defineProperty(bn,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return bn.default=t,bn}var En={},
641
- ju;function Lr(){if(ju)return En;ju=1,Object.defineProperty(En,"__esModule",{value:!0});const t=vn();class e extends Error{constructor(n,s,i,o){super(o||`can't resolve reference ${i} from id ${s}`),this.missingRef=(0,t.resolveUrl)(n,s,i),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(n,this.missingRef))}}return En.default=e,En}var Ue={},Lu;function Sn(){if(Lu)return Ue;Lu=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.resolveSchema=Ue.getCompilingSchema=Ue.resolveRef=Ue.compileSchema=
640
+ let ee=T;const W=P.split("/");for(const te of W)te&&(T=(0,a._)`${T}${(0,a.getProperty)((0,u.unescapeJsonPointer)(te))}`,ee=(0,a._)`${ee} && ${T}`);return ee;function N(te,z){return`Cannot access ${te} ${z} levels up, current level is ${q}`}}return dt.getData=oe,dt}var bn={},ju;function wn(){if(ju)return bn;ju=1,Object.defineProperty(bn,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return bn.default=t,bn}var En={},
641
+ Lu;function Lr(){if(Lu)return En;Lu=1,Object.defineProperty(En,"__esModule",{value:!0});const t=vn();class e extends Error{constructor(n,s,i,o){super(o||`can't resolve reference ${i} from id ${s}`),this.missingRef=(0,t.resolveUrl)(n,s,i),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(n,this.missingRef))}}return En.default=e,En}var Ue={},Du;function Sn(){if(Du)return Ue;Du=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.resolveSchema=Ue.getCompilingSchema=Ue.resolveRef=Ue.compileSchema=
642
642
  Ue.SchemaEnv=void 0;const t=pe(),e=wn(),r=Je(),n=vn(),s=$e(),i=jr();class o{constructor(g){var p;this.refs={},this.dynamicAnchors={};let m;typeof g.schema=="object"&&(m=g.schema),this.schema=g.schema,this.schemaId=g.schemaId,this.root=g.root||this,this.baseId=(p=g.baseId)!==null&&p!==void 0?p:(0,n.normalizeId)(m?.[g.schemaId||"$id"]),this.schemaPath=g.schemaPath,this.localRefs=g.localRefs,this.meta=g.meta,this.$async=m?.$async,this.refs={}}}Ue.SchemaEnv=o;function a(d){const g=u.call(this,d);if(g)
643
643
  return g;const p=(0,n.getFullPath)(this.opts.uriResolver,d.root.baseId),{es5:m,lines:_}=this.opts.code,{ownProperties:v}=this.opts,w=new t.CodeGen(this.scope,{es5:m,lines:_,ownProperties:v});let S;d.$async&&(S=w.scopeValue("Error",{ref:e.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));const I=w.scopeName("validate");d.validateName=I;const F={gen:w,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,
644
644
  dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:w.scopeValue("schema",this.opts.code.source===!0?{ref:d.schema,code:(0,t.stringify)(d.schema)}:{ref:d.schema}),validateName:I,ValidationError:S,schema:d.schema,schemaEnv:d,rootId:p,baseId:d.baseId||p,schemaPath:t.nil,errSchemaPath:d.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};let B;try{this._compilations.add(d),(0,i.validateFunctionCode)(F),w.optimize(
@@ -648,17 +648,17 @@ p);if(v===void 0){const w=(m=d.localRefs)===null||m===void 0?void 0:m[p],{schema
648
648
  let p;for(;typeof(p=this.refs[g])=="string";)g=p;return p||this.schemas[g]||$.call(this,d,g)}function $(d,g){const p=this.opts.uriResolver.parse(g),m=(0,n._getFullPath)(this.opts.uriResolver,p);let _=(0,n.getFullPath)(this.opts.uriResolver,d.baseId,void 0);if(Object.keys(d.schema).length>0&&m===_)return y.call(this,p,d);const v=(0,n.normalizeId)(m),w=this.refs[v]||this.schemas[v];if(typeof w=="string"){const S=$.call(this,d,w);return typeof S?.schema!="object"?void 0:y.call(this,p,S)}if(typeof w?.
649
649
  schema=="object"){if(w.validate||a.call(this,w),v===(0,n.normalizeId)(g)){const{schema:S}=w,{schemaId:I}=this.opts,F=S[I];return F&&(_=(0,n.resolveUrl)(this.opts.uriResolver,_,F)),new o({schema:S,schemaId:I,root:d,baseId:_})}return y.call(this,p,w)}}Ue.resolveSchema=$;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(d,{baseId:g,schema:p,root:m}){var _;if(((_=d.fragment)===null||_===void 0?void 0:_[0])!=="/")return;for(const S of d.fragment.slice(
650
650
  1).split("/")){if(typeof p=="boolean")return;const I=p[(0,s.unescapeFragment)(S)];if(I===void 0)return;p=I;const F=typeof p=="object"&&p[this.opts.schemaId];!b.has(S)&&F&&(g=(0,n.resolveUrl)(this.opts.uriResolver,g,F))}let v;if(typeof p!="boolean"&&p.$ref&&!(0,s.schemaHasRulesButRef)(p,this.RULES)){const S=(0,n.resolveUrl)(this.opts.uriResolver,g,p.$ref);v=$.call(this,m,S)}const{schemaId:w}=this.opts;if(v=v||new o({schema:p,schemaId:w,root:m,baseId:g}),v.schema!==v.root.schema)return v}return Ue}
651
- const Du="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",ku="Meta-schema for $data reference (JSON AnySchema extension proposal)",xu="object",Mu=["$data"],qu={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Uu=!1,Ny={$id:Du,description:ku,type:xu,required:Mu,properties:qu,additionalProperties:Uu},Ty={__proto__:null,$id:Du,additionalProperties:Uu,default:Ny,description:ku,properties:qu,required:Mu,type:xu},jy=nt(Ty);var Rn={},
652
- Dr={exports:{}},Ki,Hu;function Ly(){return Hu||(Hu=1,Ki={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),Ki}var Yi,Fu;function Dy(){if(Fu)return Yi;Fu=1;const{HEX:t}=Ly(),e=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function r(y){if(a(y,".")<3)return{host:y,isIPV4:!1};const d=y.match(e)||[],[g]=d;return g?{host:o(g,"."),isIPV4:!0}:{host:y,isIPV4:!1}}function n(y,d=!1){let g="",p=!0;for(const m of y){
651
+ const ku="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",xu="Meta-schema for $data reference (JSON AnySchema extension proposal)",Mu="object",qu=["$data"],Uu={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Hu=!1,Ny={$id:ku,description:xu,type:Mu,required:qu,properties:Uu,additionalProperties:Hu},Ty={__proto__:null,$id:ku,additionalProperties:Hu,default:Ny,description:xu,properties:Uu,required:qu,type:Mu},jy=nt(Ty);var Rn={},
652
+ Dr={exports:{}},Ki,Fu;function Ly(){return Fu||(Fu=1,Ki={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),Ki}var Yi,Vu;function Dy(){if(Vu)return Yi;Vu=1;const{HEX:t}=Ly(),e=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function r(y){if(a(y,".")<3)return{host:y,isIPV4:!1};const d=y.match(e)||[],[g]=d;return g?{host:o(g,"."),isIPV4:!0}:{host:y,isIPV4:!1}}function n(y,d=!1){let g="",p=!0;for(const m of y){
653
653
  if(t[m]===void 0)return;m!=="0"&&p===!0&&(p=!1),p||(g+=m)}return d&&g.length===0&&(g="0"),g}function s(y){let d=0;const g={error:!1,address:"",zone:""},p=[],m=[];let _=!1,v=!1,w=!1;function S(){if(m.length){if(_===!1){const I=n(m);if(I!==void 0)p.push(I);else return g.error=!0,!1}m.length=0}return!0}for(let I=0;I<y.length;I++){const F=y[I];if(!(F==="["||F==="]"))if(F===":"){if(v===!0&&(w=!0),!S())break;if(d++,p.push(":"),d>7){g.error=!0;break}I-1>=0&&y[I-1]===":"&&(v=!0);continue}else if(F==="%"){
654
654
  if(!S())break;_=!0}else{m.push(F);continue}}return m.length&&(_?g.zone=m.join(""):w?p.push(m.join("")):p.push(n(m))),g.address=p.join(""),g}function i(y){if(a(y,":")<2)return{host:y,isIPV6:!1};const d=s(y);if(d.error)return{host:y,isIPV6:!1};{let g=d.address,p=d.address;return d.zone&&(g+="%"+d.zone,p+="%25"+d.zone),{host:g,escapedHost:p,isIPV6:!0}}}function o(y,d){let g="",p=!0;const m=y.length;for(let _=0;_<m;_++){const v=y[_];v==="0"&&p?(_+1<=m&&y[_+1]===d||_+1===m)&&(g+=v,p=!1):(v===d?p=!0:p=
655
655
  !1,g+=v)}return g}function a(y,d){let g=0;for(let p=0;p<y.length;p++)y[p]===d&&g++;return g}const c=/^\.\.?\//u,l=/^\/\.(?:\/|$)/u,u=/^\/\.\.(?:\/|$)/u,f=/^\/?(?:.|\n)*?(?=\/|$)/u;function h(y){const d=[];for(;y.length;)if(y.match(c))y=y.replace(c,"");else if(y.match(l))y=y.replace(l,"/");else if(y.match(u))y=y.replace(u,"/"),d.pop();else if(y==="."||y==="..")y="";else{const g=y.match(f);if(g){const p=g[0];y=y.slice(p.length),d.push(p)}else throw new Error("Unexpected dot segment condition")}return d.
656
656
  join("")}function $(y,d){const g=d!==!0?escape:unescape;return y.scheme!==void 0&&(y.scheme=g(y.scheme)),y.userinfo!==void 0&&(y.userinfo=g(y.userinfo)),y.host!==void 0&&(y.host=g(y.host)),y.path!==void 0&&(y.path=g(y.path)),y.query!==void 0&&(y.query=g(y.query)),y.fragment!==void 0&&(y.fragment=g(y.fragment)),y}function b(y){const d=[];if(y.userinfo!==void 0&&(d.push(y.userinfo),d.push("@")),y.host!==void 0){let g=unescape(y.host);const p=r(g);if(p.isIPV4)g=p.host;else{const m=i(p.host);m.isIPV6===
657
- !0?g=`[${m.escapedHost}]`:g=y.host}d.push(g)}return(typeof y.port=="number"||typeof y.port=="string")&&(d.push(":"),d.push(String(y.port))),d.length?d.join(""):void 0}return Yi={recomposeAuthority:b,normalizeComponentEncoding:$,removeDotSegments:h,normalizeIPv4:r,normalizeIPv6:i,stringArrayToHexStripped:n},Yi}var Xi,Vu;function ky(){if(Vu)return Xi;Vu=1;const t=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(p){
657
+ !0?g=`[${m.escapedHost}]`:g=y.host}d.push(g)}return(typeof y.port=="number"||typeof y.port=="string")&&(d.push(":"),d.push(String(y.port))),d.length?d.join(""):void 0}return Yi={recomposeAuthority:b,normalizeComponentEncoding:$,removeDotSegments:h,normalizeIPv4:r,normalizeIPv6:i,stringArrayToHexStripped:n},Yi}var Xi,zu;function ky(){if(zu)return Xi;zu=1;const t=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(p){
658
658
  return typeof p.secure=="boolean"?p.secure:String(p.scheme).toLowerCase()==="wss"}function n(p){return p.host||(p.error=p.error||"HTTP URIs must have a host."),p}function s(p){const m=String(p.scheme).toLowerCase()==="https";return(p.port===(m?443:80)||p.port==="")&&(p.port=void 0),p.path||(p.path="/"),p}function i(p){return p.secure=r(p),p.resourceName=(p.path||"/")+(p.query?"?"+p.query:""),p.path=void 0,p.query=void 0,p}function o(p){if((p.port===(r(p)?443:80)||p.port==="")&&(p.port=void 0),typeof p.
659
659
  secure=="boolean"&&(p.scheme=p.secure?"wss":"ws",p.secure=void 0),p.resourceName){const[m,_]=p.resourceName.split("?");p.path=m&&m!=="/"?m:void 0,p.query=_,p.resourceName=void 0}return p.fragment=void 0,p}function a(p,m){if(!p.path)return p.error="URN can not be parsed",p;const _=p.path.match(e);if(_){const v=m.scheme||p.scheme||"urn";p.nid=_[1].toLowerCase(),p.nss=_[2];const w=`${v}:${m.nid||p.nid}`,S=g[w];p.path=void 0,S&&(p=S.parse(p,m))}else p.error=p.error||"URN can not be parsed.";return p}
660
660
  function c(p,m){const _=m.scheme||p.scheme||"urn",v=p.nid.toLowerCase(),w=`${_}:${m.nid||v}`,S=g[w];S&&(p=S.serialize(p,m));const I=p,F=p.nss;return I.path=`${v||m.nid}:${F}`,m.skipEscape=!0,I}function l(p,m){const _=p;return _.uuid=_.nss,_.nss=void 0,!m.tolerant&&(!_.uuid||!t.test(_.uuid))&&(_.error=_.error||"UUID is not valid."),_}function u(p){const m=p;return m.nss=(p.uuid||"").toLowerCase(),m}const f={scheme:"http",domainHost:!0,parse:n,serialize:s},h={scheme:"https",domainHost:f.domainHost,
661
- parse:n,serialize:s},$={scheme:"ws",domainHost:!0,parse:i,serialize:o},b={scheme:"wss",domainHost:$.domainHost,parse:$.parse,serialize:$.serialize},g={http:f,https:h,ws:$,wss:b,urn:{scheme:"urn",parse:a,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:l,serialize:u,skipNormalize:!0}};return Xi=g,Xi}var zu;function xy(){if(zu)return Dr.exports;zu=1;const{normalizeIPv6:t,normalizeIPv4:e,removeDotSegments:r,recomposeAuthority:n,normalizeComponentEncoding:s}=Dy(),i=ky();function o(d,g){
661
+ parse:n,serialize:s},$={scheme:"ws",domainHost:!0,parse:i,serialize:o},b={scheme:"wss",domainHost:$.domainHost,parse:$.parse,serialize:$.serialize},g={http:f,https:h,ws:$,wss:b,urn:{scheme:"urn",parse:a,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:l,serialize:u,skipNormalize:!0}};return Xi=g,Xi}var Gu;function xy(){if(Gu)return Dr.exports;Gu=1;const{normalizeIPv6:t,normalizeIPv4:e,removeDotSegments:r,recomposeAuthority:n,normalizeComponentEncoding:s}=Dy(),i=ky();function o(d,g){
662
662
  return typeof d=="string"?d=u(b(d,g),g):typeof d=="object"&&(d=b(u(d,g),g)),d}function a(d,g,p){const m=Object.assign({scheme:"null"},p),_=c(b(d,m),b(g,m),m,!0);return u(_,{...m,skipEscape:!0})}function c(d,g,p,m){const _={};return m||(d=b(u(d,p),p),g=b(u(g,p),p)),p=p||{},!p.tolerant&&g.scheme?(_.scheme=g.scheme,_.userinfo=g.userinfo,_.host=g.host,_.port=g.port,_.path=r(g.path||""),_.query=g.query):(g.userinfo!==void 0||g.host!==void 0||g.port!==void 0?(_.userinfo=g.userinfo,_.host=g.host,_.port=
663
663
  g.port,_.path=r(g.path||""),_.query=g.query):(g.path?(g.path.charAt(0)==="/"?_.path=r(g.path):((d.userinfo!==void 0||d.host!==void 0||d.port!==void 0)&&!d.path?_.path="/"+g.path:d.path?_.path=d.path.slice(0,d.path.lastIndexOf("/")+1)+g.path:_.path=g.path,_.path=r(_.path)),_.query=g.query):(_.path=d.path,g.query!==void 0?_.query=g.query:_.query=d.query),_.userinfo=d.userinfo,_.host=d.host,_.port=d.port),_.scheme=d.scheme),_.fragment=g.fragment,_}function l(d,g,p){return typeof d=="string"?(d=unescape(
664
664
  d),d=u(s(b(d,p),!0),{...p,skipEscape:!0})):typeof d=="object"&&(d=u(s(d,!0),{...p,skipEscape:!0})),typeof g=="string"?(g=unescape(g),g=u(s(b(g,p),!0),{...p,skipEscape:!0})):typeof g=="object"&&(g=u(s(g,!0),{...p,skipEscape:!0})),d.toLowerCase()===g.toLowerCase()}function u(d,g){const p={host:d.host,scheme:d.scheme,userinfo:d.userinfo,port:d.port,path:d.path,query:d.query,nid:d.nid,nss:d.nss,uuid:d.uuid,fragment:d.fragment,reference:d.reference,resourceName:d.resourceName,secure:d.secure,error:""},
@@ -667,14 +667,14 @@ void 0&&(S=S.replace(/^\/\//u,"/%2F")),_.push(S)}return p.query!==void 0&&_.push
667
667
  const p=Object.assign({},g),m={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},_=d.indexOf("%")!==-1;let v=!1;p.reference==="suffix"&&(d=(p.scheme?p.scheme+":":"")+"//"+d);const w=d.match($);if(w){if(m.scheme=w[1],m.userinfo=w[3],m.host=w[4],m.port=parseInt(w[5],10),m.path=w[6]||"",m.query=w[7],m.fragment=w[8],isNaN(m.port)&&(m.port=w[5]),m.host){const I=e(m.host);if(I.isIPV4===!1){const F=t(I.host);m.host=F.host.toLowerCase(),v=F.isIPV6}else m.host=I.host,
668
668
  v=!0}m.scheme===void 0&&m.userinfo===void 0&&m.host===void 0&&m.port===void 0&&m.query===void 0&&!m.path?m.reference="same-document":m.scheme===void 0?m.reference="relative":m.fragment===void 0?m.reference="absolute":m.reference="uri",p.reference&&p.reference!=="suffix"&&p.reference!==m.reference&&(m.error=m.error||"URI is not a "+p.reference+" reference.");const S=i[(p.scheme||m.scheme||"").toLowerCase()];if(!p.unicodeSupport&&(!S||!S.unicodeSupport)&&m.host&&(p.domainHost||S&&S.domainHost)&&v===
669
669
  !1&&h(m.host))try{m.host=URL.domainToASCII(m.host.toLowerCase())}catch(I){m.error=m.error||"Host's domain name can not be converted to ASCII: "+I}(!S||S&&!S.skipNormalize)&&(_&&m.scheme!==void 0&&(m.scheme=unescape(m.scheme)),_&&m.host!==void 0&&(m.host=unescape(m.host)),m.path&&(m.path=escape(unescape(m.path))),m.fragment&&(m.fragment=encodeURI(decodeURIComponent(m.fragment)))),S&&S.parse&&S.parse(m,p)}else m.error=m.error||"URI can not be parsed.";return m}const y={SCHEMES:i,normalize:o,resolve:a,
670
- resolveComponents:c,equal:l,serialize:u,parse:b};return Dr.exports=y,Dr.exports.default=y,Dr.exports.fastUri=y,Dr.exports}var Gu;function My(){if(Gu)return Rn;Gu=1,Object.defineProperty(Rn,"__esModule",{value:!0});const t=xy();return t.code='require("ajv/dist/runtime/uri").default',Rn.default=t,Rn}var Bu;function Wu(){return Bu||(Bu=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=jr();Object.defineProperty(t,"K\
670
+ resolveComponents:c,equal:l,serialize:u,parse:b};return Dr.exports=y,Dr.exports.default=y,Dr.exports.fastUri=y,Dr.exports}var Bu;function My(){if(Bu)return Rn;Bu=1,Object.defineProperty(Rn,"__esModule",{value:!0});const t=xy();return t.code='require("ajv/dist/runtime/uri").default',Rn.default=t,Rn}var Wu;function Ku(){return Wu||(Wu=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=jr();Object.defineProperty(t,"K\
671
671
  eywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=pe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{
672
- enumerable:!0,get:function(){return r.CodeGen}});const n=wn(),s=Lr(),i=bu(),o=Sn(),a=pe(),c=vn(),l=_n(),u=$e(),f=jy,h=My(),$=(H,A)=>new RegExp(H,A);$.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),d={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"\
672
+ enumerable:!0,get:function(){return r.CodeGen}});const n=wn(),s=Lr(),i=wu(),o=Sn(),a=pe(),c=vn(),l=_n(),u=$e(),f=jy,h=My(),$=(H,A)=>new RegExp(H,A);$.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),d={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"\
673
673
  Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"\
674
674
  Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},p=200;function m(H){var A,V,x,E,R,C,X,Z,ie,oe,L,q,Q,ne,P,T,ee,W,N,te,z,re,le,_e,we;const ot=H.strict,mt=(A=H.code)===null||A===void 0?void 0:A.optimize,aa=mt===
675
- !0||mt===void 0?1:mt||0,ca=(x=(V=H.code)===null||V===void 0?void 0:V.regExp)!==null&&x!==void 0?x:$,Lh=(E=H.uriResolver)!==null&&E!==void 0?E:h.default;return{strictSchema:(C=(R=H.strictSchema)!==null&&R!==void 0?R:ot)!==null&&C!==void 0?C:!0,strictNumbers:(Z=(X=H.strictNumbers)!==null&&X!==void 0?X:ot)!==null&&Z!==void 0?Z:!0,strictTypes:(oe=(ie=H.strictTypes)!==null&&ie!==void 0?ie:ot)!==null&&oe!==void 0?oe:"log",strictTuples:(q=(L=H.strictTuples)!==null&&L!==void 0?L:ot)!==null&&q!==void 0?q:
675
+ !0||mt===void 0?1:mt||0,ca=(x=(V=H.code)===null||V===void 0?void 0:V.regExp)!==null&&x!==void 0?x:$,Dh=(E=H.uriResolver)!==null&&E!==void 0?E:h.default;return{strictSchema:(C=(R=H.strictSchema)!==null&&R!==void 0?R:ot)!==null&&C!==void 0?C:!0,strictNumbers:(Z=(X=H.strictNumbers)!==null&&X!==void 0?X:ot)!==null&&Z!==void 0?Z:!0,strictTypes:(oe=(ie=H.strictTypes)!==null&&ie!==void 0?ie:ot)!==null&&oe!==void 0?oe:"log",strictTuples:(q=(L=H.strictTuples)!==null&&L!==void 0?L:ot)!==null&&q!==void 0?q:
676
676
  "log",strictRequired:(ne=(Q=H.strictRequired)!==null&&Q!==void 0?Q:ot)!==null&&ne!==void 0?ne:!1,code:H.code?{...H.code,optimize:aa,regExp:ca}:{optimize:aa,regExp:ca},loopRequired:(P=H.loopRequired)!==null&&P!==void 0?P:p,loopEnum:(T=H.loopEnum)!==null&&T!==void 0?T:p,meta:(ee=H.meta)!==null&&ee!==void 0?ee:!0,messages:(W=H.messages)!==null&&W!==void 0?W:!0,inlineRefs:(N=H.inlineRefs)!==null&&N!==void 0?N:!0,schemaId:(te=H.schemaId)!==null&&te!==void 0?te:"$id",addUsedSchema:(z=H.addUsedSchema)!==
677
- null&&z!==void 0?z:!0,validateSchema:(re=H.validateSchema)!==null&&re!==void 0?re:!0,validateFormats:(le=H.validateFormats)!==null&&le!==void 0?le:!0,unicodeRegExp:(_e=H.unicodeRegExp)!==null&&_e!==void 0?_e:!0,int32range:(we=H.int32range)!==null&&we!==void 0?we:!0,uriResolver:Lh}}class _{constructor(A={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,A=this.opts={...A,...m(A)};const{es5:V,lines:x}=this.opts.code;this.scope=new a.ValueScope(
677
+ null&&z!==void 0?z:!0,validateSchema:(re=H.validateSchema)!==null&&re!==void 0?re:!0,validateFormats:(le=H.validateFormats)!==null&&le!==void 0?le:!0,unicodeRegExp:(_e=H.unicodeRegExp)!==null&&_e!==void 0?_e:!0,int32range:(we=H.int32range)!==null&&we!==void 0?we:!0,uriResolver:Dh}}class _{constructor(A={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,A=this.opts={...A,...m(A)};const{es5:V,lines:x}=this.opts.code;this.scope=new a.ValueScope(
678
678
  {scope:{},prefixes:y,es5:V,lines:x}),this.logger=M(A.logger);const E=A.validateFormats;A.validateFormats=!1,this.RULES=(0,i.getRules)(),v.call(this,d,A,"NOT SUPPORTED"),v.call(this,g,A,"DEPRECATED","warn"),this._metaOpts=B.call(this),A.formats&&I.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),A.keywords&&F.call(this,A.keywords),typeof A.meta=="object"&&this.addMetaSchema(A.meta),S.call(this),A.validateFormats=E}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){
679
679
  const{$data:A,meta:V,schemaId:x}=this.opts;let E=f;x==="id"&&(E={...f},E.id=E.$id,delete E.$id),V&&A&&this.addMetaSchema(E,E[x],!1)}defaultMeta(){const{meta:A,schemaId:V}=this.opts;return this.opts.defaultMeta=typeof A=="object"?A[V]||A:void 0}validate(A,V){let x;if(typeof A=="string"){if(x=this.getSchema(A),!x)throw new Error(`no schema with key or ref "${A}"`)}else x=this.compile(A);const E=x(V);return"$async"in x||(this.errors=x.errors),E}compile(A,V){const x=this._addSchema(A,V);return x.validate||
680
680
  this._compileSchemaEnv(x)}compileAsync(A,V){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:x}=this.opts;return E.call(this,A,V);async function E(oe,L){await R.call(this,oe.$schema);const q=this._addSchema(oe,L);return q.validate||C.call(this,q)}async function R(oe){oe&&!this.getSchema(oe)&&await E.call(this,{$ref:oe},!0)}async function C(oe){try{return this._compileSchemaEnv(oe)}catch(L){if(!(L instanceof s.default))throw L;
@@ -692,104 +692,104 @@ const R=E;R in A&&this.logger[x](`${V}: option ${E}. ${H[R]}`)}}function w(H){re
692
692
  const V=H[A];V.keyword||(V.keyword=A),this.addKeyword(V)}}function B(){const H={...this.opts};for(const A of b)delete H[A];return H}const D={log(){},warn(){},error(){}};function M(H){if(H===!1)return D;if(H===void 0)return console;if(H.log&&H.warn&&H.error)return H;throw new Error("logger must implement log, warn and error methods")}const j=/^[a-z_$][a-z0-9_$:-]*$/i;function k(H,A){const{RULES:V}=this;if((0,u.eachItem)(H,x=>{if(V.keywords[x])throw new Error(`Keyword ${x} is already defined`);if(!j.
693
693
  test(x))throw new Error(`Keyword ${x} has invalid name`)}),!!A&&A.$data&&!("code"in A||"validate"in A))throw new Error('$data keyword must have "code" or "validate" function')}function U(H,A,V){var x;const E=A?.post;if(V&&E)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:R}=this;let C=E?R.post:R.rules.find(({type:Z})=>Z===V);if(C||(C={type:V,rules:[]},R.rules.push(C)),R.keywords[H]=!0,!A)return;const X={keyword:H,definition:{...A,type:(0,l.getJSONTypes)(A.type),schemaType:(0,l.
694
694
  getJSONTypes)(A.schemaType)}};A.before?Y.call(this,C,X,A.before):C.rules.push(X),R.all[H]=X,(x=A.implements)===null||x===void 0||x.forEach(Z=>this.addKeyword(Z))}function Y(H,A,V){const x=H.rules.findIndex(E=>E.keyword===V);x>=0?H.rules.splice(x,0,A):(H.rules.push(A),this.logger.warn(`rule ${V} is not defined`))}function G(H){let{metaSchema:A}=H;A!==void 0&&(H.$data&&this.opts.$data&&(A=se(A)),H.validateSchema=this.compile(A,!0))}const J={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv\
695
- /master/lib/refs/data.json#"};function se(H){return{anyOf:[H,J]}}}(Fi)),Fi}var An={},On={},Cn={},Ku;function qy(){if(Ku)return Cn;Ku=1,Object.defineProperty(Cn,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Cn.default=t,Cn}var Rt={},Yu;function Ji(){if(Yu)return Rt;Yu=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.callRef=Rt.getValidate=void 0;const t=Lr(),e=Ze(),r=pe(),n=Je(),s=Sn(),i=$e(),o={keyword:"\
695
+ /master/lib/refs/data.json#"};function se(H){return{anyOf:[H,J]}}}(Fi)),Fi}var An={},On={},Cn={},Yu;function qy(){if(Yu)return Cn;Yu=1,Object.defineProperty(Cn,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Cn.default=t,Cn}var Rt={},Xu;function Ji(){if(Xu)return Rt;Xu=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.callRef=Rt.getValidate=void 0;const t=Lr(),e=Ze(),r=pe(),n=Je(),s=Sn(),i=$e(),o={keyword:"\
696
696
  $ref",schemaType:"string",code(l){const{gen:u,schema:f,it:h}=l,{baseId:$,schemaEnv:b,validateName:y,opts:d,self:g}=h,{root:p}=b;if((f==="#"||f==="#/")&&$===p.baseId)return _();const m=s.resolveRef.call(g,p,$,f);if(m===void 0)throw new t.default(h.opts.uriResolver,$,f);if(m instanceof s.SchemaEnv)return v(m);return w(m);function _(){if(b===p)return c(l,y,b,b.$async);const S=u.scopeValue("root",{ref:p});return c(l,(0,r._)`${S}.validate`,p,p.$async)}function v(S){const I=a(l,S);c(l,I,S,S.$async)}function w(S){
697
697
  const I=u.scopeValue("schema",d.code.source===!0?{ref:S,code:(0,r.stringify)(S)}:{ref:S}),F=u.name("valid"),B=l.subschema({schema:S,dataTypes:[],schemaPath:r.nil,topSchemaRef:I,errSchemaPath:f},F);l.mergeEvaluated(B),l.ok(F)}}};function a(l,u){const{gen:f}=l;return u.validate?f.scopeValue("validate",{ref:u.validate}):(0,r._)`${f.scopeValue("wrapper",{ref:u})}.validate`}Rt.getValidate=a;function c(l,u,f,h){const{gen:$,it:b}=l,{allErrors:y,schemaEnv:d,opts:g}=b,p=g.passContext?n.default.this:r.nil;
698
698
  h?m():_();function m(){if(!d.$async)throw new Error("async schema referenced by sync schema");const S=$.let("valid");$.try(()=>{$.code((0,r._)`await ${(0,e.callValidateCode)(l,u,p)}`),w(u),y||$.assign(S,!0)},I=>{$.if((0,r._)`!(${I} instanceof ${b.ValidationError})`,()=>$.throw(I)),v(I),y||$.assign(S,!1)}),l.ok(S)}function _(){l.result((0,e.callValidateCode)(l,u,p),()=>w(u),()=>v(u))}function v(S){const I=(0,r._)`${S}.errors`;$.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${I} : ${n.
699
699
  default.vErrors}.concat(${I})`),$.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function w(S){var I;if(!b.opts.unevaluated)return;const F=(I=f?.validate)===null||I===void 0?void 0:I.evaluated;if(b.props!==!0)if(F&&!F.dynamicProps)F.props!==void 0&&(b.props=i.mergeEvaluated.props($,F.props,b.props));else{const B=$.var("props",(0,r._)`${S}.evaluated.props`);b.props=i.mergeEvaluated.props($,B,b.props,r.Name)}if(b.items!==!0)if(F&&!F.dynamicItems)F.items!==void 0&&(b.items=i.mergeEvaluated.
700
- items($,F.items,b.items));else{const B=$.var("items",(0,r._)`${S}.evaluated.items`);b.items=i.mergeEvaluated.items($,B,b.items,r.Name)}}}return Rt.callRef=c,Rt.default=o,Rt}var Xu;function Ju(){if(Xu)return On;Xu=1,Object.defineProperty(On,"__esModule",{value:!0});const t=qy(),e=Ji(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return On.default=r,On}var Pn={},In={},Qu;function Uy(){if(Qu)return In;Qu=1,Object.defineProperty(In,"__esModule",{value:!0});
700
+ items($,F.items,b.items));else{const B=$.var("items",(0,r._)`${S}.evaluated.items`);b.items=i.mergeEvaluated.items($,B,b.items,r.Name)}}}return Rt.callRef=c,Rt.default=o,Rt}var Ju;function Qu(){if(Ju)return On;Ju=1,Object.defineProperty(On,"__esModule",{value:!0});const t=qy(),e=Ji(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return On.default=r,On}var Pn={},In={},Zu;function Uy(){if(Zu)return In;Zu=1,Object.defineProperty(In,"__esModule",{value:!0});
701
701
  const t=pe(),e=t.operators,r={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},n={message:({keyword:i,schemaCode:o})=>(0,t.str)`must be ${r[i].okStr} ${o}`,params:({keyword:i,schemaCode:o})=>(0,t._)`{comparison: ${r[i].okStr}, limit: ${o}}`},s={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(i){const{keyword:o,data:a,schemaCode:c}=i;i.fail$data(
702
- (0,t._)`${a} ${r[o].fail} ${c} || isNaN(${a})`)}};return In.default=s,In}var Nn={},Zu;function Hy(){if(Zu)return Nn;Zu=1,Object.defineProperty(Nn,"__esModule",{value:!0});const t=pe(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,t._)`{multipleOf: ${n}}`},code(n){const{gen:s,data:i,schemaCode:o,it:a}=n,c=a.opts.multipleOfPrecision,l=s.let("res"),u=c?(0,t._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${c}`:
703
- (0,t._)`${l} !== parseInt(${l})`;n.fail$data((0,t._)`(${o} === 0 || (${l} = ${i}/${o}, ${u}))`)}};return Nn.default=r,Nn}var Tn={},jn={},el;function Fy(){if(el)return jn;el=1,Object.defineProperty(jn,"__esModule",{value:!0});function t(e){const r=e.length;let n=0,s=0,i;for(;s<r;)n++,i=e.charCodeAt(s++),i>=55296&&i<=56319&&s<r&&(i=e.charCodeAt(s),(i&64512)===56320&&s++);return n}return jn.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',jn}var tl;function Vy(){if(tl)return Tn;tl=
702
+ (0,t._)`${a} ${r[o].fail} ${c} || isNaN(${a})`)}};return In.default=s,In}var Nn={},el;function Hy(){if(el)return Nn;el=1,Object.defineProperty(Nn,"__esModule",{value:!0});const t=pe(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,t._)`{multipleOf: ${n}}`},code(n){const{gen:s,data:i,schemaCode:o,it:a}=n,c=a.opts.multipleOfPrecision,l=s.let("res"),u=c?(0,t._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${c}`:
703
+ (0,t._)`${l} !== parseInt(${l})`;n.fail$data((0,t._)`(${o} === 0 || (${l} = ${i}/${o}, ${u}))`)}};return Nn.default=r,Nn}var Tn={},jn={},tl;function Fy(){if(tl)return jn;tl=1,Object.defineProperty(jn,"__esModule",{value:!0});function t(e){const r=e.length;let n=0,s=0,i;for(;s<r;)n++,i=e.charCodeAt(s++),i>=55296&&i<=56319&&s<r&&(i=e.charCodeAt(s),(i&64512)===56320&&s++);return n}return jn.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',jn}var rl;function Vy(){if(rl)return Tn;rl=
704
704
  1,Object.defineProperty(Tn,"__esModule",{value:!0});const t=pe(),e=$e(),r=Fy(),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:o}){const a=i==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${a} than ${o} characters`},params:({schemaCode:i})=>(0,t._)`{limit: ${i}}`},code(i){const{keyword:o,data:a,schemaCode:c,it:l}=i,u=o==="maxLength"?t.operators.GT:t.operators.LT,f=l.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,e.
705
- useFunc)(i.gen,r.default)}(${a})`;i.fail$data((0,t._)`${f} ${u} ${c}`)}};return Tn.default=s,Tn}var Ln={},rl;function zy(){if(rl)return Ln;rl=1,Object.defineProperty(Ln,"__esModule",{value:!0});const t=Ze(),e=pe(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,e.str)`must match pattern "${s}"`,params:({schemaCode:s})=>(0,e._)`{pattern: ${s}}`},code(s){const{data:i,$data:o,schema:a,schemaCode:c,it:l}=s,u=l.opts.unicodeRegExp?"u":"",f=o?(0,e._)`(new RegExp(${c}, ${u}))`:
706
- (0,t.usePattern)(s,a);s.fail$data((0,e._)`!${f}.test(${i})`)}};return Ln.default=n,Ln}var Dn={},nl;function Gy(){if(nl)return Dn;nl=1,Object.defineProperty(Dn,"__esModule",{value:!0});const t=pe(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const i=n==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${i} than ${s} properties`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:s,
707
- data:i,schemaCode:o}=n,a=s==="maxProperties"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`Object.keys(${i}).length ${a} ${o}`)}};return Dn.default=r,Dn}var kn={},sl;function By(){if(sl)return kn;sl=1,Object.defineProperty(kn,"__esModule",{value:!0});const t=Ze(),e=pe(),r=$e(),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,e.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,e._)`{missingProperty: ${i}}`},
705
+ useFunc)(i.gen,r.default)}(${a})`;i.fail$data((0,t._)`${f} ${u} ${c}`)}};return Tn.default=s,Tn}var Ln={},nl;function zy(){if(nl)return Ln;nl=1,Object.defineProperty(Ln,"__esModule",{value:!0});const t=Ze(),e=pe(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,e.str)`must match pattern "${s}"`,params:({schemaCode:s})=>(0,e._)`{pattern: ${s}}`},code(s){const{data:i,$data:o,schema:a,schemaCode:c,it:l}=s,u=l.opts.unicodeRegExp?"u":"",f=o?(0,e._)`(new RegExp(${c}, ${u}))`:
706
+ (0,t.usePattern)(s,a);s.fail$data((0,e._)`!${f}.test(${i})`)}};return Ln.default=n,Ln}var Dn={},sl;function Gy(){if(sl)return Dn;sl=1,Object.defineProperty(Dn,"__esModule",{value:!0});const t=pe(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const i=n==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${i} than ${s} properties`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:s,
707
+ data:i,schemaCode:o}=n,a=s==="maxProperties"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`Object.keys(${i}).length ${a} ${o}`)}};return Dn.default=r,Dn}var kn={},il;function By(){if(il)return kn;il=1,Object.defineProperty(kn,"__esModule",{value:!0});const t=Ze(),e=pe(),r=$e(),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,e.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,e._)`{missingProperty: ${i}}`},
708
708
  code(i){const{gen:o,schema:a,schemaCode:c,data:l,$data:u,it:f}=i,{opts:h}=f;if(!u&&a.length===0)return;const $=a.length>=h.loopRequired;if(f.allErrors?b():y(),h.strictRequired){const p=i.parentSchema.properties,{definedProperties:m}=i.it;for(const _ of a)if(p?.[_]===void 0&&!m.has(_)){const v=f.schemaEnv.baseId+f.errSchemaPath,w=`required property "${_}" is not defined at "${v}" (strictRequired)`;(0,r.checkStrictMode)(f,w,f.opts.strictRequired)}}function b(){if($||u)i.block$data(e.nil,d);else for(const p of a)
709
709
  (0,t.checkReportMissingProp)(i,p)}function y(){const p=o.let("missing");if($||u){const m=o.let("valid",!0);i.block$data(m,()=>g(p,m)),i.ok(m)}else o.if((0,t.checkMissingProp)(i,a,p)),(0,t.reportMissingProp)(i,p),o.else()}function d(){o.forOf("prop",c,p=>{i.setParams({missingProperty:p}),o.if((0,t.noPropertyInData)(o,l,p,h.ownProperties),()=>i.error())})}function g(p,m){i.setParams({missingProperty:p}),o.forOf(p,c,()=>{o.assign(m,(0,t.propertyInData)(o,l,p,h.ownProperties)),o.if((0,e.not)(m),()=>{
710
- i.error(),o.break()})},e.nil)}}};return kn.default=s,kn}var xn={},il;function Wy(){if(il)return xn;il=1,Object.defineProperty(xn,"__esModule",{value:!0});const t=pe(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const i=n==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${i} than ${s} items`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:s,data:i,schemaCode:o}=n,a=s==="maxItems"?t.operators.
711
- GT:t.operators.LT;n.fail$data((0,t._)`${i}.length ${a} ${o}`)}};return xn.default=r,xn}var Mn={},qn={},ol;function Qi(){if(ol)return qn;ol=1,Object.defineProperty(qn,"__esModule",{value:!0});const t=Ia();return t.code='require("ajv/dist/runtime/equal").default',qn.default=t,qn}var al;function Ky(){if(al)return Mn;al=1,Object.defineProperty(Mn,"__esModule",{value:!0});const t=_n(),e=pe(),r=$e(),n=Qi(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:o,
710
+ i.error(),o.break()})},e.nil)}}};return kn.default=s,kn}var xn={},ol;function Wy(){if(ol)return xn;ol=1,Object.defineProperty(xn,"__esModule",{value:!0});const t=pe(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const i=n==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${i} than ${s} items`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:s,data:i,schemaCode:o}=n,a=s==="maxItems"?t.operators.
711
+ GT:t.operators.LT;n.fail$data((0,t._)`${i}.length ${a} ${o}`)}};return xn.default=r,xn}var Mn={},qn={},al;function Qi(){if(al)return qn;al=1,Object.defineProperty(qn,"__esModule",{value:!0});const t=Ia();return t.code='require("ajv/dist/runtime/equal").default',qn.default=t,qn}var cl;function Ky(){if(cl)return Mn;cl=1,Object.defineProperty(Mn,"__esModule",{value:!0});const t=_n(),e=pe(),r=$e(),n=Qi(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:o,
712
712
  j:a}})=>(0,e.str)`must NOT have duplicate items (items ## ${a} and ${o} are identical)`,params:({params:{i:o,j:a}})=>(0,e._)`{i: ${o}, j: ${a}}`},code(o){const{gen:a,data:c,$data:l,schema:u,parentSchema:f,schemaCode:h,it:$}=o;if(!l&&!u)return;const b=a.let("valid"),y=f.items?(0,t.getSchemaTypes)(f.items):[];o.block$data(b,d,(0,e._)`${h} === false`),o.ok(b);function d(){const _=a.let("i",(0,e._)`${c}.length`),v=a.let("j");o.setParams({i:_,j:v}),a.assign(b,!0),a.if((0,e._)`${_} > 1`,()=>(g()?p:m)(
713
713
  _,v))}function g(){return y.length>0&&!y.some(_=>_==="object"||_==="array")}function p(_,v){const w=a.name("item"),S=(0,t.checkDataTypes)(y,w,$.opts.strictNumbers,t.DataType.Wrong),I=a.const("indices",(0,e._)`{}`);a.for((0,e._)`;${_}--;`,()=>{a.let(w,(0,e._)`${c}[${_}]`),a.if(S,(0,e._)`continue`),y.length>1&&a.if((0,e._)`typeof ${w} == "string"`,(0,e._)`${w} += "_"`),a.if((0,e._)`typeof ${I}[${w}] == "number"`,()=>{a.assign(v,(0,e._)`${I}[${w}]`),o.error(),a.assign(b,!1).break()}).code((0,e._)`${I}[${w}] = ${_}`)})}
714
- function m(_,v){const w=(0,r.useFunc)(a,n.default),S=a.name("outer");a.label(S).for((0,e._)`;${_}--;`,()=>a.for((0,e._)`${v} = ${_}; ${v}--;`,()=>a.if((0,e._)`${w}(${c}[${_}], ${c}[${v}])`,()=>{o.error(),a.assign(b,!1).break(S)})))}}};return Mn.default=i,Mn}var Un={},cl;function Yy(){if(cl)return Un;cl=1,Object.defineProperty(Un,"__esModule",{value:!0});const t=pe(),e=$e(),r=Qi(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,t._)`{allowedValue: ${i}}`},
715
- code(i){const{gen:o,data:a,$data:c,schemaCode:l,schema:u}=i;c||u&&typeof u=="object"?i.fail$data((0,t._)`!${(0,e.useFunc)(o,r.default)}(${a}, ${l})`):i.fail((0,t._)`${u} !== ${a}`)}};return Un.default=s,Un}var Hn={},ul;function Xy(){if(ul)return Hn;ul=1,Object.defineProperty(Hn,"__esModule",{value:!0});const t=pe(),e=$e(),r=Qi(),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,t._)`{allowedValues: ${i}}`},code(i){
714
+ function m(_,v){const w=(0,r.useFunc)(a,n.default),S=a.name("outer");a.label(S).for((0,e._)`;${_}--;`,()=>a.for((0,e._)`${v} = ${_}; ${v}--;`,()=>a.if((0,e._)`${w}(${c}[${_}], ${c}[${v}])`,()=>{o.error(),a.assign(b,!1).break(S)})))}}};return Mn.default=i,Mn}var Un={},ul;function Yy(){if(ul)return Un;ul=1,Object.defineProperty(Un,"__esModule",{value:!0});const t=pe(),e=$e(),r=Qi(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,t._)`{allowedValue: ${i}}`},
715
+ code(i){const{gen:o,data:a,$data:c,schemaCode:l,schema:u}=i;c||u&&typeof u=="object"?i.fail$data((0,t._)`!${(0,e.useFunc)(o,r.default)}(${a}, ${l})`):i.fail((0,t._)`${u} !== ${a}`)}};return Un.default=s,Un}var Hn={},ll;function Xy(){if(ll)return Hn;ll=1,Object.defineProperty(Hn,"__esModule",{value:!0});const t=pe(),e=$e(),r=Qi(),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,t._)`{allowedValues: ${i}}`},code(i){
716
716
  const{gen:o,data:a,$data:c,schema:l,schemaCode:u,it:f}=i;if(!c&&l.length===0)throw new Error("enum must have non-empty array");const h=l.length>=f.opts.loopEnum;let $;const b=()=>$??($=(0,e.useFunc)(o,r.default));let y;if(h||c)y=o.let("valid"),i.block$data(y,d);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const p=o.const("vSchema",u);y=(0,t.or)(...l.map((m,_)=>g(p,_)))}i.pass(y);function d(){o.assign(y,!1),o.forOf("v",u,p=>o.if((0,t._)`${b()}(${a}, ${p})`,()=>o.assign(y,
717
- !0).break()))}function g(p,m){const _=l[m];return typeof _=="object"&&_!==null?(0,t._)`${b()}(${a}, ${p}[${m}])`:(0,t._)`${a} === ${_}`}}};return Hn.default=s,Hn}var ll;function fl(){if(ll)return Pn;ll=1,Object.defineProperty(Pn,"__esModule",{value:!0});const t=Uy(),e=Hy(),r=Vy(),n=zy(),s=Gy(),i=By(),o=Wy(),a=Ky(),c=Yy(),l=Xy(),u=[t.default,e.default,r.default,n.default,s.default,i.default,o.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},
718
- c.default,l.default];return Pn.default=u,Pn}var Fn={},rr={},dl;function hl(){if(dl)return rr;dl=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.validateAdditionalItems=void 0;const t=pe(),e=$e(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,t.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,t._)`{limit: ${i}}`},code(i){const{parentSchema:o,it:a}=i,{items:c}=o;if(!Array.isArray(c)){
717
+ !0).break()))}function g(p,m){const _=l[m];return typeof _=="object"&&_!==null?(0,t._)`${b()}(${a}, ${p}[${m}])`:(0,t._)`${a} === ${_}`}}};return Hn.default=s,Hn}var fl;function dl(){if(fl)return Pn;fl=1,Object.defineProperty(Pn,"__esModule",{value:!0});const t=Uy(),e=Hy(),r=Vy(),n=zy(),s=Gy(),i=By(),o=Wy(),a=Ky(),c=Yy(),l=Xy(),u=[t.default,e.default,r.default,n.default,s.default,i.default,o.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},
718
+ c.default,l.default];return Pn.default=u,Pn}var Fn={},rr={},hl;function pl(){if(hl)return rr;hl=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.validateAdditionalItems=void 0;const t=pe(),e=$e(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,t.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,t._)`{limit: ${i}}`},code(i){const{parentSchema:o,it:a}=i,{items:c}=o;if(!Array.isArray(c)){
719
719
  (0,e.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(i,c)}};function s(i,o){const{gen:a,schema:c,data:l,keyword:u,it:f}=i;f.items=!0;const h=a.const("len",(0,t._)`${l}.length`);if(c===!1)i.setParams({len:o.length}),i.pass((0,t._)`${h} <= ${o.length}`);else if(typeof c=="object"&&!(0,e.alwaysValidSchema)(f,c)){const b=a.var("valid",(0,t._)`${h} <= ${o.length}`);a.if((0,t.not)(b),()=>$(b)),i.ok(b)}function $(b){a.forRange("i",o.length,h,y=>{i.subschema(
720
- {keyword:u,dataProp:y,dataPropType:e.Type.Num},b),f.allErrors||a.if((0,t.not)(b),()=>a.break())})}}return rr.validateAdditionalItems=s,rr.default=n,rr}var Vn={},nr={},pl;function ml(){if(pl)return nr;pl=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.validateTuple=void 0;const t=pe(),e=$e(),r=Ze(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:o,it:a}=i;if(Array.isArray(o))return s(i,"additionalItems",o);a.items=!0,!(0,e.alwaysValidSchema)(
720
+ {keyword:u,dataProp:y,dataPropType:e.Type.Num},b),f.allErrors||a.if((0,t.not)(b),()=>a.break())})}}return rr.validateAdditionalItems=s,rr.default=n,rr}var Vn={},nr={},ml;function gl(){if(ml)return nr;ml=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.validateTuple=void 0;const t=pe(),e=$e(),r=Ze(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:o,it:a}=i;if(Array.isArray(o))return s(i,"additionalItems",o);a.items=!0,!(0,e.alwaysValidSchema)(
721
721
  a,o)&&i.ok((0,r.validateArray)(i))}};function s(i,o,a=i.schema){const{gen:c,parentSchema:l,data:u,keyword:f,it:h}=i;y(l),h.opts.unevaluated&&a.length&&h.items!==!0&&(h.items=e.mergeEvaluated.items(c,a.length,h.items));const $=c.name("valid"),b=c.const("len",(0,t._)`${u}.length`);a.forEach((d,g)=>{(0,e.alwaysValidSchema)(h,d)||(c.if((0,t._)`${b} > ${g}`,()=>i.subschema({keyword:f,schemaProp:g,dataProp:g},$)),i.ok($))});function y(d){const{opts:g,errSchemaPath:p}=h,m=a.length,_=m===d.minItems&&(m===
722
- d.maxItems||d[o]===!1);if(g.strictTuples&&!_){const v=`"${f}" is ${m}-tuple, but minItems or maxItems/${o} are not specified or different at path "${p}"`;(0,e.checkStrictMode)(h,v,g.strictTuples)}}}return nr.validateTuple=s,nr.default=n,nr}var gl;function Jy(){if(gl)return Vn;gl=1,Object.defineProperty(Vn,"__esModule",{value:!0});const t=ml(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return Vn.default=e,Vn}var zn={},yl;
723
- function Qy(){if(yl)return zn;yl=1,Object.defineProperty(zn,"__esModule",{value:!0});const t=pe(),e=$e(),r=Ze(),n=hl(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,t.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,t._)`{limit: ${o}}`},code(o){const{schema:a,parentSchema:c,it:l}=o,{prefixItems:u}=c;l.items=!0,!(0,e.alwaysValidSchema)(l,a)&&(u?(0,n.validateAdditionalItems)(o,u):o.ok((0,r.validateArray)(
724
- o)))}};return zn.default=i,zn}var Gn={},$l;function Zy(){if($l)return Gn;$l=1,Object.defineProperty(Gn,"__esModule",{value:!0});const t=pe(),e=$e(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:i}})=>i===void 0?(0,t.str)`must contain at least ${s} valid item(s)`:(0,t.str)`must contain at least ${s} and no more than ${i} valid item(s)`,params:({params:{min:s,max:i}})=>i===void 0?(0,t._)`{minContains: ${s}}`:
722
+ d.maxItems||d[o]===!1);if(g.strictTuples&&!_){const v=`"${f}" is ${m}-tuple, but minItems or maxItems/${o} are not specified or different at path "${p}"`;(0,e.checkStrictMode)(h,v,g.strictTuples)}}}return nr.validateTuple=s,nr.default=n,nr}var yl;function Jy(){if(yl)return Vn;yl=1,Object.defineProperty(Vn,"__esModule",{value:!0});const t=gl(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return Vn.default=e,Vn}var zn={},$l;
723
+ function Qy(){if($l)return zn;$l=1,Object.defineProperty(zn,"__esModule",{value:!0});const t=pe(),e=$e(),r=Ze(),n=pl(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,t.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,t._)`{limit: ${o}}`},code(o){const{schema:a,parentSchema:c,it:l}=o,{prefixItems:u}=c;l.items=!0,!(0,e.alwaysValidSchema)(l,a)&&(u?(0,n.validateAdditionalItems)(o,u):o.ok((0,r.validateArray)(
724
+ o)))}};return zn.default=i,zn}var Gn={},_l;function Zy(){if(_l)return Gn;_l=1,Object.defineProperty(Gn,"__esModule",{value:!0});const t=pe(),e=$e(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:i}})=>i===void 0?(0,t.str)`must contain at least ${s} valid item(s)`:(0,t.str)`must contain at least ${s} and no more than ${i} valid item(s)`,params:({params:{min:s,max:i}})=>i===void 0?(0,t._)`{minContains: ${s}}`:
725
725
  (0,t._)`{minContains: ${s}, maxContains: ${i}}`},code(s){const{gen:i,schema:o,parentSchema:a,data:c,it:l}=s;let u,f;const{minContains:h,maxContains:$}=a;l.opts.next?(u=h===void 0?1:h,f=$):u=1;const b=i.const("len",(0,t._)`${c}.length`);if(s.setParams({min:u,max:f}),f===void 0&&u===0){(0,e.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(f!==void 0&&u>f){(0,e.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,e.
726
726
  alwaysValidSchema)(l,o)){let m=(0,t._)`${b} >= ${u}`;f!==void 0&&(m=(0,t._)`${m} && ${b} <= ${f}`),s.pass(m);return}l.items=!0;const y=i.name("valid");f===void 0&&u===1?g(y,()=>i.if(y,()=>i.break())):u===0?(i.let(y,!0),f!==void 0&&i.if((0,t._)`${c}.length > 0`,d)):(i.let(y,!1),d()),s.result(y,()=>s.reset());function d(){const m=i.name("_valid"),_=i.let("count",0);g(m,()=>i.if(m,()=>p(_)))}function g(m,_){i.forRange("i",0,b,v=>{s.subschema({keyword:"contains",dataProp:v,dataPropType:e.Type.Num,compositeRule:!0},
727
- m),_()})}function p(m){i.code((0,t._)`${m}++`),f===void 0?i.if((0,t._)`${m} >= ${u}`,()=>i.assign(y,!0).break()):(i.if((0,t._)`${m} > ${f}`,()=>i.assign(y,!1).break()),u===1?i.assign(y,!0):i.if((0,t._)`${m} >= ${u}`,()=>i.assign(y,!0)))}}};return Gn.default=n,Gn}var Zi={},_l;function eo(){return _l||(_l=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=pe(),r=$e(),n=Ze();t.error={message:({params:{property:c,depsCount:l,
727
+ m),_()})}function p(m){i.code((0,t._)`${m}++`),f===void 0?i.if((0,t._)`${m} >= ${u}`,()=>i.assign(y,!0).break()):(i.if((0,t._)`${m} > ${f}`,()=>i.assign(y,!1).break()),u===1?i.assign(y,!0):i.if((0,t._)`${m} >= ${u}`,()=>i.assign(y,!0)))}}};return Gn.default=n,Gn}var Zi={},vl;function eo(){return vl||(vl=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=pe(),r=$e(),n=Ze();t.error={message:({params:{property:c,depsCount:l,
728
728
  deps:u}})=>{const f=l===1?"property":"properties";return(0,e.str)`must have ${f} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:l,deps:u,missingProperty:f}})=>(0,e._)`{property: ${c},
729
729
  missingProperty: ${f},
730
730
  depsCount: ${l},
731
731
  deps: ${u}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(c){const[l,u]=i(c);o(c,l),a(c,u)}};function i({schema:c}){const l={},u={};for(const f in c){if(f==="__proto__")continue;const h=Array.isArray(c[f])?l:u;h[f]=c[f]}return[l,u]}function o(c,l=c.schema){const{gen:u,data:f,it:h}=c;if(Object.keys(l).length===0)return;const $=u.let("missing");for(const b in l){const y=l[b];if(y.length===0)continue;const d=(0,n.propertyInData)(u,f,b,h.opts.ownProperties);
732
732
  c.setParams({property:b,depsCount:y.length,deps:y.join(", ")}),h.allErrors?u.if(d,()=>{for(const g of y)(0,n.checkReportMissingProp)(c,g)}):(u.if((0,e._)`${d} && (${(0,n.checkMissingProp)(c,y,$)})`),(0,n.reportMissingProp)(c,$),u.else())}}t.validatePropertyDeps=o;function a(c,l=c.schema){const{gen:u,data:f,keyword:h,it:$}=c,b=u.name("valid");for(const y in l)(0,r.alwaysValidSchema)($,l[y])||(u.if((0,n.propertyInData)(u,f,y,$.opts.ownProperties),()=>{const d=c.subschema({keyword:h,schemaProp:y},b);
733
- c.mergeValidEvaluated(d,b)},()=>u.var(b,!0)),c.ok(b))}t.validateSchemaDeps=a,t.default=s}(Zi)),Zi}var Bn={},vl;function e$(){if(vl)return Bn;vl=1,Object.defineProperty(Bn,"__esModule",{value:!0});const t=pe(),e=$e(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>(0,t._)`{propertyName: ${s.propertyName}}`},code(s){const{gen:i,schema:o,data:a,it:c}=s;if((0,e.alwaysValidSchema)(c,o))return;const l=i.name("va\
734
- lid");i.forIn("key",a,u=>{s.setParams({propertyName:u}),s.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},l),i.if((0,t.not)(l),()=>{s.error(!0),c.allErrors||i.break()})}),s.ok(l)}};return Bn.default=n,Bn}var Wn={},bl;function wl(){if(bl)return Wn;bl=1,Object.defineProperty(Wn,"__esModule",{value:!0});const t=Ze(),e=pe(),r=Je(),n=$e(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{
733
+ c.mergeValidEvaluated(d,b)},()=>u.var(b,!0)),c.ok(b))}t.validateSchemaDeps=a,t.default=s}(Zi)),Zi}var Bn={},bl;function e$(){if(bl)return Bn;bl=1,Object.defineProperty(Bn,"__esModule",{value:!0});const t=pe(),e=$e(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>(0,t._)`{propertyName: ${s.propertyName}}`},code(s){const{gen:i,schema:o,data:a,it:c}=s;if((0,e.alwaysValidSchema)(c,o))return;const l=i.name("va\
734
+ lid");i.forIn("key",a,u=>{s.setParams({propertyName:u}),s.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},l),i.if((0,t.not)(l),()=>{s.error(!0),c.allErrors||i.break()})}),s.ok(l)}};return Bn.default=n,Bn}var Wn={},wl;function El(){if(wl)return Wn;wl=1,Object.defineProperty(Wn,"__esModule",{value:!0});const t=Ze(),e=pe(),r=Je(),n=$e(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{
735
735
  message:"must NOT have additional properties",params:({params:o})=>(0,e._)`{additionalProperty: ${o.additionalProperty}}`},code(o){const{gen:a,schema:c,parentSchema:l,data:u,errsCount:f,it:h}=o;if(!f)throw new Error("ajv implementation error");const{allErrors:$,opts:b}=h;if(h.props=!0,b.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(h,c))return;const y=(0,t.allSchemaProperties)(l.properties),d=(0,t.allSchemaProperties)(l.patternProperties);g(),o.ok((0,e._)`${f} === ${r.default.errors}`);function g(){
736
736
  a.forIn("key",u,w=>{!y.length&&!d.length?_(w):a.if(p(w),()=>_(w))})}function p(w){let S;if(y.length>8){const I=(0,n.schemaRefOrVal)(h,l.properties,"properties");S=(0,t.isOwnProperty)(a,I,w)}else y.length?S=(0,e.or)(...y.map(I=>(0,e._)`${w} === ${I}`)):S=e.nil;return d.length&&(S=(0,e.or)(S,...d.map(I=>(0,e._)`${(0,t.usePattern)(o,I)}.test(${w})`))),(0,e.not)(S)}function m(w){a.code((0,e._)`delete ${u}[${w}]`)}function _(w){if(b.removeAdditional==="all"||b.removeAdditional&&c===!1){m(w);return}if(c===
737
- !1){o.setParams({additionalProperty:w}),o.error(),$||a.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(h,c)){const S=a.name("valid");b.removeAdditional==="failing"?(v(w,S,!1),a.if((0,e.not)(S),()=>{o.reset(),m(w)})):(v(w,S),$||a.if((0,e.not)(S),()=>a.break()))}}function v(w,S,I){const F={keyword:"additionalProperties",dataProp:w,dataPropType:n.Type.Str};I===!1&&Object.assign(F,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(F,S)}}};return Wn.default=i,Wn}var Kn={},El;
738
- function t$(){if(El)return Kn;El=1,Object.defineProperty(Kn,"__esModule",{value:!0});const t=jr(),e=Ze(),r=$e(),n=wl(),s={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:o,schema:a,parentSchema:c,data:l,it:u}=i;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(u,n.default,"additionalProperties"));const f=(0,e.allSchemaProperties)(a);for(const d of f)u.definedProperties.add(d);u.opts.unevaluated&&f.length&&u.props!==!0&&(u.props=
737
+ !1){o.setParams({additionalProperty:w}),o.error(),$||a.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(h,c)){const S=a.name("valid");b.removeAdditional==="failing"?(v(w,S,!1),a.if((0,e.not)(S),()=>{o.reset(),m(w)})):(v(w,S),$||a.if((0,e.not)(S),()=>a.break()))}}function v(w,S,I){const F={keyword:"additionalProperties",dataProp:w,dataPropType:n.Type.Str};I===!1&&Object.assign(F,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(F,S)}}};return Wn.default=i,Wn}var Kn={},Sl;
738
+ function t$(){if(Sl)return Kn;Sl=1,Object.defineProperty(Kn,"__esModule",{value:!0});const t=jr(),e=Ze(),r=$e(),n=El(),s={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:o,schema:a,parentSchema:c,data:l,it:u}=i;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(u,n.default,"additionalProperties"));const f=(0,e.allSchemaProperties)(a);for(const d of f)u.definedProperties.add(d);u.opts.unevaluated&&f.length&&u.props!==!0&&(u.props=
739
739
  r.mergeEvaluated.props(o,(0,r.toHash)(f),u.props));const h=f.filter(d=>!(0,r.alwaysValidSchema)(u,a[d]));if(h.length===0)return;const $=o.name("valid");for(const d of h)b(d)?y(d):(o.if((0,e.propertyInData)(o,l,d,u.opts.ownProperties)),y(d),u.allErrors||o.else().var($,!0),o.endIf()),i.it.definedProperties.add(d),i.ok($);function b(d){return u.opts.useDefaults&&!u.compositeRule&&a[d].default!==void 0}function y(d){i.subschema({keyword:"properties",schemaProp:d,dataProp:d},$)}}};return Kn.default=s,
740
- Kn}var Yn={},Sl;function r$(){if(Sl)return Yn;Sl=1,Object.defineProperty(Yn,"__esModule",{value:!0});const t=Ze(),e=pe(),r=$e(),n=$e(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:o,schema:a,data:c,parentSchema:l,it:u}=i,{opts:f}=u,h=(0,t.allSchemaProperties)(a),$=h.filter(_=>(0,r.alwaysValidSchema)(u,a[_]));if(h.length===0||$.length===h.length&&(!u.opts.unevaluated||u.props===!0))return;const b=f.strictSchema&&!f.allowMatchingProperties&&l.properties,y=o.name(
740
+ Kn}var Yn={},Rl;function r$(){if(Rl)return Yn;Rl=1,Object.defineProperty(Yn,"__esModule",{value:!0});const t=Ze(),e=pe(),r=$e(),n=$e(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:o,schema:a,data:c,parentSchema:l,it:u}=i,{opts:f}=u,h=(0,t.allSchemaProperties)(a),$=h.filter(_=>(0,r.alwaysValidSchema)(u,a[_]));if(h.length===0||$.length===h.length&&(!u.opts.unevaluated||u.props===!0))return;const b=f.strictSchema&&!f.allowMatchingProperties&&l.properties,y=o.name(
741
741
  "valid");u.props!==!0&&!(u.props instanceof e.Name)&&(u.props=(0,n.evaluatedPropsToName)(o,u.props));const{props:d}=u;g();function g(){for(const _ of h)b&&p(_),u.allErrors?m(_):(o.var(y,!0),m(_),o.if(y))}function p(_){for(const v in b)new RegExp(_).test(v)&&(0,r.checkStrictMode)(u,`property ${v} matches pattern ${_} (use allowMatchingProperties)`)}function m(_){o.forIn("key",c,v=>{o.if((0,e._)`${(0,t.usePattern)(i,_)}.test(${v})`,()=>{const w=$.includes(_);w||i.subschema({keyword:"patternPropert\
742
- ies",schemaProp:_,dataProp:v,dataPropType:n.Type.Str},y),u.opts.unevaluated&&d!==!0?o.assign((0,e._)`${d}[${v}]`,!0):!w&&!u.allErrors&&o.if((0,e.not)(y),()=>o.break())})})}}};return Yn.default=s,Yn}var Xn={},Rl;function n$(){if(Rl)return Xn;Rl=1,Object.defineProperty(Xn,"__esModule",{value:!0});const t=$e(),e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:s,it:i}=r;if((0,t.alwaysValidSchema)(i,s)){r.fail();return}const o=n.name("valid");r.subschema({keyword:"\
743
- not",compositeRule:!0,createErrors:!1,allErrors:!1},o),r.failResult(o,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Xn.default=e,Xn}var Jn={},Al;function s$(){if(Al)return Jn;Al=1,Object.defineProperty(Jn,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ze().validateUnion,error:{message:"must match a schema in anyOf"}};return Jn.default=e,Jn}var Qn={},Ol;function i$(){if(Ol)return Qn;Ol=1,Object.defineProperty(Qn,"__esModule",{value:!0});
742
+ ies",schemaProp:_,dataProp:v,dataPropType:n.Type.Str},y),u.opts.unevaluated&&d!==!0?o.assign((0,e._)`${d}[${v}]`,!0):!w&&!u.allErrors&&o.if((0,e.not)(y),()=>o.break())})})}}};return Yn.default=s,Yn}var Xn={},Al;function n$(){if(Al)return Xn;Al=1,Object.defineProperty(Xn,"__esModule",{value:!0});const t=$e(),e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:s,it:i}=r;if((0,t.alwaysValidSchema)(i,s)){r.fail();return}const o=n.name("valid");r.subschema({keyword:"\
743
+ not",compositeRule:!0,createErrors:!1,allErrors:!1},o),r.failResult(o,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Xn.default=e,Xn}var Jn={},Ol;function s$(){if(Ol)return Jn;Ol=1,Object.defineProperty(Jn,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ze().validateUnion,error:{message:"must match a schema in anyOf"}};return Jn.default=e,Jn}var Qn={},Cl;function i$(){if(Cl)return Qn;Cl=1,Object.defineProperty(Qn,"__esModule",{value:!0});
744
744
  const t=pe(),e=$e(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:s})=>(0,t._)`{passingSchemas: ${s.passing}}`},code(s){const{gen:i,schema:o,parentSchema:a,it:c}=s;if(!Array.isArray(o))throw new Error("ajv implementation error");if(c.opts.discriminator&&a.discriminator)return;const l=o,u=i.let("valid",!1),f=i.let("passing",null),h=i.name("_valid");s.setParams({passing:f}),i.block($),s.result(u,()=>s.reset(),()=>s.error(
745
- !0));function $(){l.forEach((b,y)=>{let d;(0,e.alwaysValidSchema)(c,b)?i.var(h,!0):d=s.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},h),y>0&&i.if((0,t._)`${h} && ${u}`).assign(u,!1).assign(f,(0,t._)`[${f}, ${y}]`).else(),i.if(h,()=>{i.assign(u,!0),i.assign(f,y),d&&s.mergeEvaluated(d,t.Name)})})}}};return Qn.default=n,Qn}var Zn={},Cl;function o$(){if(Cl)return Zn;Cl=1,Object.defineProperty(Zn,"__esModule",{value:!0});const t=$e(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,
746
- schema:s,it:i}=r;if(!Array.isArray(s))throw new Error("ajv implementation error");const o=n.name("valid");s.forEach((a,c)=>{if((0,t.alwaysValidSchema)(i,a))return;const l=r.subschema({keyword:"allOf",schemaProp:c},o);r.ok(o),r.mergeEvaluated(l)})}};return Zn.default=e,Zn}var es={},Pl;function a$(){if(Pl)return es;Pl=1,Object.defineProperty(es,"__esModule",{value:!0});const t=pe(),e=$e(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,t.str)`must match "${i.
745
+ !0));function $(){l.forEach((b,y)=>{let d;(0,e.alwaysValidSchema)(c,b)?i.var(h,!0):d=s.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},h),y>0&&i.if((0,t._)`${h} && ${u}`).assign(u,!1).assign(f,(0,t._)`[${f}, ${y}]`).else(),i.if(h,()=>{i.assign(u,!0),i.assign(f,y),d&&s.mergeEvaluated(d,t.Name)})})}}};return Qn.default=n,Qn}var Zn={},Pl;function o$(){if(Pl)return Zn;Pl=1,Object.defineProperty(Zn,"__esModule",{value:!0});const t=$e(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,
746
+ schema:s,it:i}=r;if(!Array.isArray(s))throw new Error("ajv implementation error");const o=n.name("valid");s.forEach((a,c)=>{if((0,t.alwaysValidSchema)(i,a))return;const l=r.subschema({keyword:"allOf",schemaProp:c},o);r.ok(o),r.mergeEvaluated(l)})}};return Zn.default=e,Zn}var es={},Il;function a$(){if(Il)return es;Il=1,Object.defineProperty(es,"__esModule",{value:!0});const t=pe(),e=$e(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,t.str)`must match "${i.
747
747
  ifClause}" schema`,params:({params:i})=>(0,t._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:o,parentSchema:a,it:c}=i;a.then===void 0&&a.else===void 0&&(0,e.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const l=s(c,"then"),u=s(c,"else");if(!l&&!u)return;const f=o.let("valid",!0),h=o.name("_valid");if($(),i.reset(),l&&u){const y=o.let("ifClause");i.setParams({ifClause:y}),o.if(h,b("then",y),b("else",y))}else l?o.if(h,b("then")):o.if((0,t.not)(h),b("else"));i.pass(f,()=>i.
748
- error(!0));function $(){const y=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},h);i.mergeEvaluated(y)}function b(y,d){return()=>{const g=i.subschema({keyword:y},h);o.assign(f,h),i.mergeValidEvaluated(g,f),d?o.assign(d,(0,t._)`${y}`):i.setParams({ifClause:y})}}}};function s(i,o){const a=i.schema[o];return a!==void 0&&!(0,e.alwaysValidSchema)(i,a)}return es.default=n,es}var ts={},Il;function c$(){if(Il)return ts;Il=1,Object.defineProperty(ts,"__esModule",{value:!0});const t=$e(),
749
- e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:s}){n.if===void 0&&(0,t.checkStrictMode)(s,`"${r}" without "if" is ignored`)}};return ts.default=e,ts}var Nl;function Tl(){if(Nl)return Fn;Nl=1,Object.defineProperty(Fn,"__esModule",{value:!0});const t=hl(),e=Jy(),r=ml(),n=Qy(),s=Zy(),i=eo(),o=e$(),a=wl(),c=t$(),l=r$(),u=n$(),f=s$(),h=i$(),$=o$(),b=a$(),y=c$();function d(g=!1){const p=[u.default,f.default,h.default,$.default,b.default,y.default,o.default,
750
- a.default,i.default,c.default,l.default];return g?p.push(e.default,n.default):p.push(t.default,r.default),p.push(s.default),p}return Fn.default=d,Fn}var rs={},sr={},jl;function Ll(){if(jl)return sr;jl=1,Object.defineProperty(sr,"__esModule",{value:!0}),sr.dynamicAnchor=void 0;const t=pe(),e=Je(),r=Sn(),n=Ji(),s={keyword:"$dynamicAnchor",schemaType:"string",code:a=>i(a,a.schema)};function i(a,c){const{gen:l,it:u}=a;u.schemaEnv.root.dynamicAnchors[c]=!0;const f=(0,t._)`${e.default.dynamicAnchors}${(0,t.
751
- getProperty)(c)}`,h=u.errSchemaPath==="#"?u.validateName:o(a);l.if((0,t._)`!${f}`,()=>l.assign(f,h))}sr.dynamicAnchor=i;function o(a){const{schemaEnv:c,schema:l,self:u}=a.it,{root:f,baseId:h,localRefs:$,meta:b}=c.root,{schemaId:y}=u.opts,d=new r.SchemaEnv({schema:l,schemaId:y,root:f,baseId:h,localRefs:$,meta:b});return r.compileSchema.call(u,d),(0,n.getValidate)(a,d)}return sr.default=s,sr}var ir={},Dl;function kl(){if(Dl)return ir;Dl=1,Object.defineProperty(ir,"__esModule",{value:!0}),ir.dynamicRef=
748
+ error(!0));function $(){const y=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},h);i.mergeEvaluated(y)}function b(y,d){return()=>{const g=i.subschema({keyword:y},h);o.assign(f,h),i.mergeValidEvaluated(g,f),d?o.assign(d,(0,t._)`${y}`):i.setParams({ifClause:y})}}}};function s(i,o){const a=i.schema[o];return a!==void 0&&!(0,e.alwaysValidSchema)(i,a)}return es.default=n,es}var ts={},Nl;function c$(){if(Nl)return ts;Nl=1,Object.defineProperty(ts,"__esModule",{value:!0});const t=$e(),
749
+ e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:s}){n.if===void 0&&(0,t.checkStrictMode)(s,`"${r}" without "if" is ignored`)}};return ts.default=e,ts}var Tl;function jl(){if(Tl)return Fn;Tl=1,Object.defineProperty(Fn,"__esModule",{value:!0});const t=pl(),e=Jy(),r=gl(),n=Qy(),s=Zy(),i=eo(),o=e$(),a=El(),c=t$(),l=r$(),u=n$(),f=s$(),h=i$(),$=o$(),b=a$(),y=c$();function d(g=!1){const p=[u.default,f.default,h.default,$.default,b.default,y.default,o.default,
750
+ a.default,i.default,c.default,l.default];return g?p.push(e.default,n.default):p.push(t.default,r.default),p.push(s.default),p}return Fn.default=d,Fn}var rs={},sr={},Ll;function Dl(){if(Ll)return sr;Ll=1,Object.defineProperty(sr,"__esModule",{value:!0}),sr.dynamicAnchor=void 0;const t=pe(),e=Je(),r=Sn(),n=Ji(),s={keyword:"$dynamicAnchor",schemaType:"string",code:a=>i(a,a.schema)};function i(a,c){const{gen:l,it:u}=a;u.schemaEnv.root.dynamicAnchors[c]=!0;const f=(0,t._)`${e.default.dynamicAnchors}${(0,t.
751
+ getProperty)(c)}`,h=u.errSchemaPath==="#"?u.validateName:o(a);l.if((0,t._)`!${f}`,()=>l.assign(f,h))}sr.dynamicAnchor=i;function o(a){const{schemaEnv:c,schema:l,self:u}=a.it,{root:f,baseId:h,localRefs:$,meta:b}=c.root,{schemaId:y}=u.opts,d=new r.SchemaEnv({schema:l,schemaId:y,root:f,baseId:h,localRefs:$,meta:b});return r.compileSchema.call(u,d),(0,n.getValidate)(a,d)}return sr.default=s,sr}var ir={},kl;function xl(){if(kl)return ir;kl=1,Object.defineProperty(ir,"__esModule",{value:!0}),ir.dynamicRef=
752
752
  void 0;const t=pe(),e=Je(),r=Ji(),n={keyword:"$dynamicRef",schemaType:"string",code:i=>s(i,i.schema)};function s(i,o){const{gen:a,keyword:c,it:l}=i;if(o[0]!=="#")throw new Error(`"${c}" only supports hash fragment reference`);const u=o.slice(1);if(l.allErrors)f();else{const $=a.let("valid",!1);f($),i.ok($)}function f($){if(l.schemaEnv.root.dynamicAnchors[u]){const b=a.let("_v",(0,t._)`${e.default.dynamicAnchors}${(0,t.getProperty)(u)}`);a.if(b,h(b,$),h(l.validateName,$))}else h(l.validateName,$)()}
753
- function h($,b){return b?()=>a.block(()=>{(0,r.callRef)(i,$),a.let(b,!0)}):()=>(0,r.callRef)(i,$)}}return ir.dynamicRef=s,ir.default=n,ir}var ns={},xl;function u$(){if(xl)return ns;xl=1,Object.defineProperty(ns,"__esModule",{value:!0});const t=Ll(),e=$e(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,t.dynamicAnchor)(n,""):(0,e.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return ns.default=r,ns}var ss={},Ml;function l$(){if(Ml)return ss;Ml=1,Object.defineProperty(
754
- ss,"__esModule",{value:!0});const t=kl(),e={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,t.dynamicRef)(r,r.schema)};return ss.default=e,ss}var ql;function f$(){if(ql)return rs;ql=1,Object.defineProperty(rs,"__esModule",{value:!0});const t=Ll(),e=kl(),r=u$(),n=l$(),s=[t.default,e.default,r.default,n.default];return rs.default=s,rs}var is={},os={},Ul;function d$(){if(Ul)return os;Ul=1,Object.defineProperty(os,"__esModule",{value:!0});const t=eo(),e={keyword:"dependentRequired",type:"obje\
755
- ct",schemaType:"object",error:t.error,code:r=>(0,t.validatePropertyDeps)(r)};return os.default=e,os}var as={},Hl;function h$(){if(Hl)return as;Hl=1,Object.defineProperty(as,"__esModule",{value:!0});const t=eo(),e={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,t.validateSchemaDeps)(r)};return as.default=e,as}var cs={},Fl;function p$(){if(Fl)return cs;Fl=1,Object.defineProperty(cs,"__esModule",{value:!0});const t=$e(),e={keyword:["maxContains","minContains"],type:"array",
756
- schemaType:"number",code({keyword:r,parentSchema:n,it:s}){n.contains===void 0&&(0,t.checkStrictMode)(s,`"${r}" without "contains" is ignored`)}};return cs.default=e,cs}var Vl;function m$(){if(Vl)return is;Vl=1,Object.defineProperty(is,"__esModule",{value:!0});const t=d$(),e=h$(),r=p$(),n=[t.default,e.default,r.default];return is.default=n,is}var us={},ls={},zl;function g$(){if(zl)return ls;zl=1,Object.defineProperty(ls,"__esModule",{value:!0});const t=pe(),e=$e(),r=Je(),s={keyword:"unevaluatedPr\
753
+ function h($,b){return b?()=>a.block(()=>{(0,r.callRef)(i,$),a.let(b,!0)}):()=>(0,r.callRef)(i,$)}}return ir.dynamicRef=s,ir.default=n,ir}var ns={},Ml;function u$(){if(Ml)return ns;Ml=1,Object.defineProperty(ns,"__esModule",{value:!0});const t=Dl(),e=$e(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,t.dynamicAnchor)(n,""):(0,e.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return ns.default=r,ns}var ss={},ql;function l$(){if(ql)return ss;ql=1,Object.defineProperty(
754
+ ss,"__esModule",{value:!0});const t=xl(),e={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,t.dynamicRef)(r,r.schema)};return ss.default=e,ss}var Ul;function f$(){if(Ul)return rs;Ul=1,Object.defineProperty(rs,"__esModule",{value:!0});const t=Dl(),e=xl(),r=u$(),n=l$(),s=[t.default,e.default,r.default,n.default];return rs.default=s,rs}var is={},os={},Hl;function d$(){if(Hl)return os;Hl=1,Object.defineProperty(os,"__esModule",{value:!0});const t=eo(),e={keyword:"dependentRequired",type:"obje\
755
+ ct",schemaType:"object",error:t.error,code:r=>(0,t.validatePropertyDeps)(r)};return os.default=e,os}var as={},Fl;function h$(){if(Fl)return as;Fl=1,Object.defineProperty(as,"__esModule",{value:!0});const t=eo(),e={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,t.validateSchemaDeps)(r)};return as.default=e,as}var cs={},Vl;function p$(){if(Vl)return cs;Vl=1,Object.defineProperty(cs,"__esModule",{value:!0});const t=$e(),e={keyword:["maxContains","minContains"],type:"array",
756
+ schemaType:"number",code({keyword:r,parentSchema:n,it:s}){n.contains===void 0&&(0,t.checkStrictMode)(s,`"${r}" without "contains" is ignored`)}};return cs.default=e,cs}var zl;function m$(){if(zl)return is;zl=1,Object.defineProperty(is,"__esModule",{value:!0});const t=d$(),e=h$(),r=p$(),n=[t.default,e.default,r.default];return is.default=n,is}var us={},ls={},Gl;function g$(){if(Gl)return ls;Gl=1,Object.defineProperty(ls,"__esModule",{value:!0});const t=pe(),e=$e(),r=Je(),s={keyword:"unevaluatedPr\
757
757
  operties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:i})=>(0,t._)`{unevaluatedProperty: ${i.unevaluatedProperty}}`},code(i){const{gen:o,schema:a,data:c,errsCount:l,it:u}=i;if(!l)throw new Error("ajv implementation error");const{allErrors:f,props:h}=u;h instanceof t.Name?o.if((0,t._)`${h} !== true`,()=>o.forIn("key",c,d=>o.if(b(h,d),()=>$(d)))):h!==!0&&o.forIn("key",c,d=>h===void 0?$(d):o.if(y(h,d),()=>$(d))),
758
758
  u.props=!0,i.ok((0,t._)`${l} === ${r.default.errors}`);function $(d){if(a===!1){i.setParams({unevaluatedProperty:d}),i.error(),f||o.break();return}if(!(0,e.alwaysValidSchema)(u,a)){const g=o.name("valid");i.subschema({keyword:"unevaluatedProperties",dataProp:d,dataPropType:e.Type.Str},g),f||o.if((0,t.not)(g),()=>o.break())}}function b(d,g){return(0,t._)`!${d} || !${d}[${g}]`}function y(d,g){const p=[];for(const m in d)d[m]===!0&&p.push((0,t._)`${g} !== ${m}`);return(0,t.and)(...p)}}};return ls.default=
759
- s,ls}var fs={},Gl;function y$(){if(Gl)return fs;Gl=1,Object.defineProperty(fs,"__esModule",{value:!0});const t=pe(),e=$e(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:s}})=>(0,t.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,t._)`{limit: ${s}}`},code(s){const{gen:i,schema:o,data:a,it:c}=s,l=c.items||0;if(l===!0)return;const u=i.const("len",(0,t._)`${a}.length`);if(o===!1)s.setParams({len:l}),s.fail((0,t._)`${u} > ${l}`);else if(typeof o==
760
- "object"&&!(0,e.alwaysValidSchema)(c,o)){const h=i.var("valid",(0,t._)`${u} <= ${l}`);i.if((0,t.not)(h),()=>f(h,l)),s.ok(h)}c.items=!0;function f(h,$){i.forRange("i",$,u,b=>{s.subschema({keyword:"unevaluatedItems",dataProp:b,dataPropType:e.Type.Num},h),c.allErrors||i.if((0,t.not)(h),()=>i.break())})}}};return fs.default=n,fs}var Bl;function $$(){if(Bl)return us;Bl=1,Object.defineProperty(us,"__esModule",{value:!0});const t=g$(),e=y$(),r=[t.default,e.default];return us.default=r,us}var ds={},hs={},
761
- Wl;function _$(){if(Wl)return hs;Wl=1,Object.defineProperty(hs,"__esModule",{value:!0});const t=pe(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,t._)`{format: ${n}}`},code(n,s){const{gen:i,data:o,$data:a,schema:c,schemaCode:l,it:u}=n,{opts:f,errSchemaPath:h,schemaEnv:$,self:b}=u;if(!f.validateFormats)return;a?y():d();function y(){const g=i.scopeValue("formats",{ref:b.formats,
759
+ s,ls}var fs={},Bl;function y$(){if(Bl)return fs;Bl=1,Object.defineProperty(fs,"__esModule",{value:!0});const t=pe(),e=$e(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:s}})=>(0,t.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,t._)`{limit: ${s}}`},code(s){const{gen:i,schema:o,data:a,it:c}=s,l=c.items||0;if(l===!0)return;const u=i.const("len",(0,t._)`${a}.length`);if(o===!1)s.setParams({len:l}),s.fail((0,t._)`${u} > ${l}`);else if(typeof o==
760
+ "object"&&!(0,e.alwaysValidSchema)(c,o)){const h=i.var("valid",(0,t._)`${u} <= ${l}`);i.if((0,t.not)(h),()=>f(h,l)),s.ok(h)}c.items=!0;function f(h,$){i.forRange("i",$,u,b=>{s.subschema({keyword:"unevaluatedItems",dataProp:b,dataPropType:e.Type.Num},h),c.allErrors||i.if((0,t.not)(h),()=>i.break())})}}};return fs.default=n,fs}var Wl;function $$(){if(Wl)return us;Wl=1,Object.defineProperty(us,"__esModule",{value:!0});const t=g$(),e=y$(),r=[t.default,e.default];return us.default=r,us}var ds={},hs={},
761
+ Kl;function _$(){if(Kl)return hs;Kl=1,Object.defineProperty(hs,"__esModule",{value:!0});const t=pe(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,t._)`{format: ${n}}`},code(n,s){const{gen:i,data:o,$data:a,schema:c,schemaCode:l,it:u}=n,{opts:f,errSchemaPath:h,schemaEnv:$,self:b}=u;if(!f.validateFormats)return;a?y():d();function y(){const g=i.scopeValue("formats",{ref:b.formats,
762
762
  code:f.code.formats}),p=i.const("fDef",(0,t._)`${g}[${l}]`),m=i.let("fType"),_=i.let("format");i.if((0,t._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>i.assign(m,(0,t._)`${p}.type || "string"`).assign(_,(0,t._)`${p}.validate`),()=>i.assign(m,(0,t._)`"string"`).assign(_,p)),n.fail$data((0,t.or)(v(),w()));function v(){return f.strictSchema===!1?t.nil:(0,t._)`${l} && !${_}`}function w(){const S=$.$async?(0,t._)`(${p}.async ? await ${_}(${o}) : ${_}(${o}))`:(0,t._)`${_}(${o})`,I=(0,t.
763
763
  _)`(typeof ${_} == "function" ? ${S} : ${_}.test(${o}))`;return(0,t._)`${_} && ${_} !== true && ${m} === ${s} && !${I}`}}function d(){const g=b.formats[c];if(!g){v();return}if(g===!0)return;const[p,m,_]=w(g);p===s&&n.pass(S());function v(){if(f.strictSchema===!1){b.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${c}" ignored in schema at path "${h}"`}}function w(I){const F=I instanceof RegExp?(0,t.regexpCode)(I):f.code.formats?(0,t._)`${f.code.formats}${(0,t.getProperty)(
764
- c)}`:void 0,B=i.scopeValue("formats",{key:c,ref:I,code:F});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,t._)`${B}.validate`]:["string",I,B]}function S(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!$.$async)throw new Error("async format in sync schema");return(0,t._)`await ${_}(${o})`}return typeof m=="function"?(0,t._)`${_}(${o})`:(0,t._)`${_}.test(${o})`}}}};return hs.default=r,hs}var Kl;function Yl(){if(Kl)return ds;Kl=1,Object.defineProperty(
765
- ds,"__esModule",{value:!0});const e=[_$().default];return ds.default=e,ds}var Gt={},Xl;function Jl(){return Xl||(Xl=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.contentVocabulary=Gt.metadataVocabulary=void 0,Gt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Gt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Gt}var Ql;function v$(){if(Ql)return An;Ql=1,Object.defineProperty(An,"__esModule",{value:!0});const t=Ju(),
766
- e=fl(),r=Tl(),n=f$(),s=m$(),i=$$(),o=Yl(),a=Jl(),c=[n.default,t.default,e.default,(0,r.default)(!0),o.default,a.metadataVocabulary,a.contentVocabulary,s.default,i.default];return An.default=c,An}var ps={},kr={},Zl;function b$(){if(Zl)return kr;Zl=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.DiscrError=void 0;var t;return function(e){e.Tag="tag",e.Mapping="mapping"}(t||(kr.DiscrError=t={})),kr}var ef;function tf(){if(ef)return ps;ef=1,Object.defineProperty(ps,"__esModule",{value:!0});const t=pe(),
764
+ c)}`:void 0,B=i.scopeValue("formats",{key:c,ref:I,code:F});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,t._)`${B}.validate`]:["string",I,B]}function S(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!$.$async)throw new Error("async format in sync schema");return(0,t._)`await ${_}(${o})`}return typeof m=="function"?(0,t._)`${_}(${o})`:(0,t._)`${_}.test(${o})`}}}};return hs.default=r,hs}var Yl;function Xl(){if(Yl)return ds;Yl=1,Object.defineProperty(
765
+ ds,"__esModule",{value:!0});const e=[_$().default];return ds.default=e,ds}var Gt={},Jl;function Ql(){return Jl||(Jl=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.contentVocabulary=Gt.metadataVocabulary=void 0,Gt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Gt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Gt}var Zl;function v$(){if(Zl)return An;Zl=1,Object.defineProperty(An,"__esModule",{value:!0});const t=Qu(),
766
+ e=dl(),r=jl(),n=f$(),s=m$(),i=$$(),o=Xl(),a=Ql(),c=[n.default,t.default,e.default,(0,r.default)(!0),o.default,a.metadataVocabulary,a.contentVocabulary,s.default,i.default];return An.default=c,An}var ps={},kr={},ef;function b$(){if(ef)return kr;ef=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.DiscrError=void 0;var t;return function(e){e.Tag="tag",e.Mapping="mapping"}(t||(kr.DiscrError=t={})),kr}var tf;function rf(){if(tf)return ps;tf=1,Object.defineProperty(ps,"__esModule",{value:!0});const t=pe(),
767
767
  e=b$(),r=Sn(),n=Lr(),s=$e(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:c}})=>a===e.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:a,tag:c,tagName:l}})=>(0,t._)`{error: ${a}, tag: ${l}, tagValue: ${c}}`},code(a){const{gen:c,data:l,schema:u,parentSchema:f,it:h}=a,{oneOf:$}=f;if(!h.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=u.
768
768
  propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!$)throw new Error("discriminator: requires oneOf keyword");const y=c.let("valid",!1),d=c.const("tag",(0,t._)`${l}${(0,t.getProperty)(b)}`);c.if((0,t._)`typeof ${d} == "string"`,()=>g(),()=>a.error(!1,{discrError:e.DiscrError.Tag,tag:d,tagName:b})),a.ok(y);function g(){const _=m();c.if(!1);for(const v in _)c.elseIf((0,t._)`${d} === ${v}`),
769
769
  c.assign(y,p(_[v]));c.else(),a.error(!1,{discrError:e.DiscrError.Mapping,tag:d,tagName:b}),c.endIf()}function p(_){const v=c.name("valid"),w=a.subschema({keyword:"oneOf",schemaProp:_},v);return a.mergeEvaluated(w,t.Name),v}function m(){var _;const v={},w=I(f);let S=!0;for(let D=0;D<$.length;D++){let M=$[D];if(M?.$ref&&!(0,s.schemaHasRulesButRef)(M,h.self.RULES)){const k=M.$ref;if(M=r.resolveRef.call(h.self,h.schemaEnv.root,h.baseId,k),M instanceof r.SchemaEnv&&(M=M.schema),M===void 0)throw new n.
770
770
  default(h.opts.uriResolver,h.baseId,k)}const j=(_=M?.properties)===null||_===void 0?void 0:_[b];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);S=S&&(w||I(M)),F(j,D)}if(!S)throw new Error(`discriminator: "${b}" must be required`);return v;function I({required:D}){return Array.isArray(D)&&D.includes(b)}function F(D,M){if(D.const)B(D.const,M);else if(D.enum)for(const j of D.enum)B(j,M);else throw new Error(`discriminator:\
771
- "properties/${b}" must have "const" or "enum"`)}function B(D,M){if(typeof D!="string"||D in v)throw new Error(`discriminator: "${b}" values must be unique strings`);v[D]=M}}}};return ps.default=o,ps}var ms={};const rf="https://json-schema.org/draft/2020-12/schema",nf="https://json-schema.org/draft/2020-12/schema",sf={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"http\
772
- s://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},of="meta",af="Core and Validation specifications meta-schema",cf=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],uf=["object","boolean"],
773
- lf="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",ff={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{
774
- anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},w$={$schema:rf,$id:nf,$vocabulary:sf,$dynamicAnchor:of,title:af,allOf:cf,type:uf,$comment:lf,properties:ff},E$={__proto__:null,
775
- $comment:lf,$dynamicAnchor:of,$id:nf,$schema:rf,$vocabulary:sf,allOf:cf,default:w$,properties:ff,title:af,type:uf},S$=nt(E$),df="https://json-schema.org/draft/2020-12/schema",hf="https://json-schema.org/draft/2020-12/meta/applicator",pf={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},mf="meta",gf="Applicator vocabulary meta-schema",yf=["object","boolean"],$f={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"\
771
+ "properties/${b}" must have "const" or "enum"`)}function B(D,M){if(typeof D!="string"||D in v)throw new Error(`discriminator: "${b}" values must be unique strings`);v[D]=M}}}};return ps.default=o,ps}var ms={};const nf="https://json-schema.org/draft/2020-12/schema",sf="https://json-schema.org/draft/2020-12/schema",of={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"http\
772
+ s://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},af="meta",cf="Core and Validation specifications meta-schema",uf=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],lf=["object","boolean"],
773
+ ff="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",df={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{
774
+ anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},w$={$schema:nf,$id:sf,$vocabulary:of,$dynamicAnchor:af,title:cf,allOf:uf,type:lf,$comment:ff,properties:df},E$={__proto__:null,
775
+ $comment:ff,$dynamicAnchor:af,$id:sf,$schema:nf,$vocabulary:of,allOf:uf,default:w$,properties:df,title:cf,type:lf},S$=nt(E$),hf="https://json-schema.org/draft/2020-12/schema",pf="https://json-schema.org/draft/2020-12/meta/applicator",mf={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},gf="meta",yf="Applicator vocabulary meta-schema",$f=["object","boolean"],_f={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"\
776
776
  #meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs\
777
- /schemaArray"},not:{$dynamicRef:"#meta"}},_f={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},R$={$schema:df,$id:hf,$vocabulary:pf,$dynamicAnchor:mf,title:gf,type:yf,properties:$f,$defs:_f},A$={__proto__:null,$defs:_f,$dynamicAnchor:mf,$id:hf,$schema:df,$vocabulary:pf,default:R$,properties:$f,title:gf,type:yf},O$=nt(A$),vf="https://json-schema.org/draft/2020-12/schema",bf="https://json-schema.org/draft/2020-12/meta/unevaluated",wf={"https://json-schema.org/draft/2020-12/vocab/\
778
- unevaluated":!0},Ef="meta",Sf="Unevaluated applicator vocabulary meta-schema",Rf=["object","boolean"],Af={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},C$={$schema:vf,$id:bf,$vocabulary:wf,$dynamicAnchor:Ef,title:Sf,type:Rf,properties:Af},P$={__proto__:null,$dynamicAnchor:Ef,$id:bf,$schema:vf,$vocabulary:wf,default:C$,properties:Af,title:Sf,type:Rf},I$=nt(P$),Of="https://json-schema.org/draft/2020-12/schema",Cf="https://json-schema.org/draft/2020-12/meta/con\
779
- tent",Pf={"https://json-schema.org/draft/2020-12/vocab/content":!0},If="meta",Nf="Content vocabulary meta-schema",Tf=["object","boolean"],jf={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},N$={$schema:Of,$id:Cf,$vocabulary:Pf,$dynamicAnchor:If,title:Nf,type:Tf,properties:jf},T$={__proto__:null,$dynamicAnchor:If,$id:Cf,$schema:Of,$vocabulary:Pf,default:N$,properties:jf,title:Nf,type:Tf},j$=nt(T$),Lf="https://json-schema.org/draft/2020-12/sche\
780
- ma",Df="https://json-schema.org/draft/2020-12/meta/core",kf={"https://json-schema.org/draft/2020-12/vocab/core":!0},xf="meta",Mf="Core vocabulary meta-schema",qf=["object","boolean"],Uf={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{
781
- type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},Hf={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},L$={$schema:Lf,$id:Df,$vocabulary:kf,$dynamicAnchor:xf,title:Mf,type:qf,properties:Uf,$defs:Hf},D$={__proto__:null,$defs:Hf,$dynamicAnchor:xf,$id:Df,
782
- $schema:Lf,$vocabulary:kf,default:L$,properties:Uf,title:Mf,type:qf},k$=nt(D$),Ff="https://json-schema.org/draft/2020-12/schema",Vf="https://json-schema.org/draft/2020-12/meta/format-annotation",zf={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},Gf="meta",Bf="Format vocabulary meta-schema for annotation results",Wf=["object","boolean"],Kf={format:{type:"string"}},x$={$schema:Ff,$id:Vf,$vocabulary:zf,$dynamicAnchor:Gf,title:Bf,type:Wf,properties:Kf},M$={__proto__:null,$dynamicAnchor:Gf,
783
- $id:Vf,$schema:Ff,$vocabulary:zf,default:x$,properties:Kf,title:Bf,type:Wf},q$=nt(M$),Yf="https://json-schema.org/draft/2020-12/schema",Xf="https://json-schema.org/draft/2020-12/meta/meta-data",Jf={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},Qf="meta",Zf="Meta-data vocabulary meta-schema",ed=["object","boolean"],td={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},
784
- examples:{type:"array",items:!0}},U$={$schema:Yf,$id:Xf,$vocabulary:Jf,$dynamicAnchor:Qf,title:Zf,type:ed,properties:td},H$={__proto__:null,$dynamicAnchor:Qf,$id:Xf,$schema:Yf,$vocabulary:Jf,default:U$,properties:td,title:Zf,type:ed},F$=nt(H$),rd="https://json-schema.org/draft/2020-12/schema",nd="https://json-schema.org/draft/2020-12/meta/validation",sd={"https://json-schema.org/draft/2020-12/vocab/validation":!0},id="meta",od="Validation vocabulary meta-schema",ad=["object","boolean"],cd={type:{
777
+ /schemaArray"},not:{$dynamicRef:"#meta"}},vf={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},R$={$schema:hf,$id:pf,$vocabulary:mf,$dynamicAnchor:gf,title:yf,type:$f,properties:_f,$defs:vf},A$={__proto__:null,$defs:vf,$dynamicAnchor:gf,$id:pf,$schema:hf,$vocabulary:mf,default:R$,properties:_f,title:yf,type:$f},O$=nt(A$),bf="https://json-schema.org/draft/2020-12/schema",wf="https://json-schema.org/draft/2020-12/meta/unevaluated",Ef={"https://json-schema.org/draft/2020-12/vocab/\
778
+ unevaluated":!0},Sf="meta",Rf="Unevaluated applicator vocabulary meta-schema",Af=["object","boolean"],Of={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},C$={$schema:bf,$id:wf,$vocabulary:Ef,$dynamicAnchor:Sf,title:Rf,type:Af,properties:Of},P$={__proto__:null,$dynamicAnchor:Sf,$id:wf,$schema:bf,$vocabulary:Ef,default:C$,properties:Of,title:Rf,type:Af},I$=nt(P$),Cf="https://json-schema.org/draft/2020-12/schema",Pf="https://json-schema.org/draft/2020-12/meta/con\
779
+ tent",If={"https://json-schema.org/draft/2020-12/vocab/content":!0},Nf="meta",Tf="Content vocabulary meta-schema",jf=["object","boolean"],Lf={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},N$={$schema:Cf,$id:Pf,$vocabulary:If,$dynamicAnchor:Nf,title:Tf,type:jf,properties:Lf},T$={__proto__:null,$dynamicAnchor:Nf,$id:Pf,$schema:Cf,$vocabulary:If,default:N$,properties:Lf,title:Tf,type:jf},j$=nt(T$),Df="https://json-schema.org/draft/2020-12/sche\
780
+ ma",kf="https://json-schema.org/draft/2020-12/meta/core",xf={"https://json-schema.org/draft/2020-12/vocab/core":!0},Mf="meta",qf="Core vocabulary meta-schema",Uf=["object","boolean"],Hf={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{
781
+ type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},Ff={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},L$={$schema:Df,$id:kf,$vocabulary:xf,$dynamicAnchor:Mf,title:qf,type:Uf,properties:Hf,$defs:Ff},D$={__proto__:null,$defs:Ff,$dynamicAnchor:Mf,$id:kf,
782
+ $schema:Df,$vocabulary:xf,default:L$,properties:Hf,title:qf,type:Uf},k$=nt(D$),Vf="https://json-schema.org/draft/2020-12/schema",zf="https://json-schema.org/draft/2020-12/meta/format-annotation",Gf={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},Bf="meta",Wf="Format vocabulary meta-schema for annotation results",Kf=["object","boolean"],Yf={format:{type:"string"}},x$={$schema:Vf,$id:zf,$vocabulary:Gf,$dynamicAnchor:Bf,title:Wf,type:Kf,properties:Yf},M$={__proto__:null,$dynamicAnchor:Bf,
783
+ $id:zf,$schema:Vf,$vocabulary:Gf,default:x$,properties:Yf,title:Wf,type:Kf},q$=nt(M$),Xf="https://json-schema.org/draft/2020-12/schema",Jf="https://json-schema.org/draft/2020-12/meta/meta-data",Qf={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},Zf="meta",ed="Meta-data vocabulary meta-schema",td=["object","boolean"],rd={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},
784
+ examples:{type:"array",items:!0}},U$={$schema:Xf,$id:Jf,$vocabulary:Qf,$dynamicAnchor:Zf,title:ed,type:td,properties:rd},H$={__proto__:null,$dynamicAnchor:Zf,$id:Jf,$schema:Xf,$vocabulary:Qf,default:U$,properties:rd,title:ed,type:td},F$=nt(H$),nd="https://json-schema.org/draft/2020-12/schema",sd="https://json-schema.org/draft/2020-12/meta/validation",id={"https://json-schema.org/draft/2020-12/vocab/validation":!0},od="meta",ad="Validation vocabulary meta-schema",cd=["object","boolean"],ud={type:{
785
785
  anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{
786
- $ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},ud={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"\
787
- #/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},V$={$schema:rd,$id:nd,$vocabulary:sd,$dynamicAnchor:id,title:od,type:ad,properties:cd,$defs:ud},z$={__proto__:null,$defs:ud,$dynamicAnchor:id,$id:nd,$schema:rd,$vocabulary:sd,default:V$,properties:cd,title:od,type:ad},G$=nt(z$);var ld;function B$(){if(ld)return ms;ld=1,Object.defineProperty(ms,"__esMo\
788
- dule",{value:!0});const t=S$,e=O$,r=I$,n=j$,s=k$,i=q$,o=F$,a=G$,c=["/properties"];function l(u){return[t,e,r,n,s,f(this,i),o,f(this,a)].forEach(h=>this.addMetaSchema(h,void 0,!1)),this;function f(h,$){return u?h.$dataMetaSchema($,c):$}}return ms.default=l,ms}var fd;function W$(){return fd||(fd=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;const r=Wu(),n=v$(),s=tf(),i=B$(),
786
+ $ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},ld={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"\
787
+ #/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},V$={$schema:nd,$id:sd,$vocabulary:id,$dynamicAnchor:od,title:ad,type:cd,properties:ud,$defs:ld},z$={__proto__:null,$defs:ld,$dynamicAnchor:od,$id:sd,$schema:nd,$vocabulary:id,default:V$,properties:ud,title:ad,type:cd},G$=nt(z$);var fd;function B$(){if(fd)return ms;fd=1,Object.defineProperty(ms,"__esMo\
788
+ dule",{value:!0});const t=S$,e=O$,r=I$,n=j$,s=k$,i=q$,o=F$,a=G$,c=["/properties"];function l(u){return[t,e,r,n,s,f(this,i),o,f(this,a)].forEach(h=>this.addMetaSchema(h,void 0,!1)),this;function f(h,$){return u?h.$dataMetaSchema($,c):$}}return ms.default=l,ms}var dd;function W$(){return dd||(dd=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;const r=Ku(),n=v$(),s=rf(),i=B$(),
789
789
  o="https://json-schema.org/draft/2020-12/schema";class a extends r.default{constructor($={}){super({...$,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach($=>this.addVocabulary($)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:$,meta:b}=this.opts;b&&(i.default.call(this,$),this.refs["http://json-schema.org/schema"]=o)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||
790
790
  (this.getSchema(o)?o:void 0)}}e.Ajv2020=a,t.exports=e=a,t.exports.Ajv2020=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var c=jr();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=pe();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(
791
- e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var u=wn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return u.default}});var f=Lr();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}(mn,mn.exports)),mn.exports}var K$=W$(),gs={exports:{}},to={},dd;function Y$(){
792
- return dd||(dd=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(D,M){return{validate:D,compare:M}}t.fullFormats={date:e(i,o),time:e(c(!0),l),"date-time":e(h(!0),$),"iso-time":e(c(),u),"iso-date-time":e(h(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:g,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
791
+ e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var u=wn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return u.default}});var f=Lr();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}(mn,mn.exports)),mn.exports}var K$=W$(),gs={exports:{}},to={},hd;function Y$(){
792
+ return hd||(hd=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(D,M){return{validate:D,compare:M}}t.fullFormats={date:e(i,o),time:e(c(!0),l),"date-time":e(h(!0),$),"iso-time":e(c(),u),"iso-date-time":e(h(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:g,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
793
793
  "uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,
794
794
  email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
795
795
  regex:B,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:m,int32:{type:"number",validate:w},int64:{type:"number",validate:S},float:{type:"number",validate:I},double:{type:"number",validate:I},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,
@@ -797,34 +797,34 @@ o),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d
797
797
  email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function r(D){return D%4===0&&(D%100!==0||D%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(D){const M=n.exec(D);if(!M)return!1;const j=+M[1],k=+M[2],U=+M[3];return k>=1&&k<=12&&U>=1&&U<=(k===2&&r(j)?29:s[k])}function o(D,M){if(D&&M)return D>M?1:D<M?-1:0}const a=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
798
798
  function c(D){return function(j){const k=a.exec(j);if(!k)return!1;const U=+k[1],Y=+k[2],G=+k[3],J=k[4],se=k[5]==="-"?-1:1,H=+(k[6]||0),A=+(k[7]||0);if(H>23||A>59||D&&!J)return!1;if(U<=23&&Y<=59&&G<60)return!0;const V=Y-A*se,x=U-H*se-(V<0?1:0);return(x===23||x===-1)&&(V===59||V===-1)&&G<61}}function l(D,M){if(!(D&&M))return;const j=new Date("2020-01-01T"+D).valueOf(),k=new Date("2020-01-01T"+M).valueOf();if(j&&k)return j-k}function u(D,M){if(!(D&&M))return;const j=a.exec(D),k=a.exec(M);if(j&&k)return D=
799
799
  j[1]+j[2]+j[3],M=k[1]+k[2]+k[3],D>M?1:D<M?-1:0}const f=/t|\s/i;function h(D){const M=c(D);return function(k){const U=k.split(f);return U.length===2&&i(U[0])&&M(U[1])}}function $(D,M){if(!(D&&M))return;const j=new Date(D).valueOf(),k=new Date(M).valueOf();if(j&&k)return j-k}function b(D,M){if(!(D&&M))return;const[j,k]=D.split(f),[U,Y]=M.split(f),G=o(j,U);if(G!==void 0)return G||l(k,Y)}const y=/\/|:/,d=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
800
- function g(D){return y.test(D)&&d.test(D)}const p=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function m(D){return p.lastIndex=0,p.test(D)}const _=-2147483648,v=2**31-1;function w(D){return Number.isInteger(D)&&D<=v&&D>=_}function S(D){return Number.isInteger(D)}function I(){return!0}const F=/[^\\]\\Z/;function B(D){if(F.test(D))return!1;try{return new RegExp(D),!0}catch{return!1}}}(to)),to}var ro={},ys={exports:{}},$s={},hd;function X$(){if(hd)return $s;hd=1,Object.defineProperty(
801
- $s,"__esModule",{value:!0});const t=Ju(),e=fl(),r=Tl(),n=Yl(),s=Jl(),i=[t.default,e.default,(0,r.default)(),n.default,s.metadataVocabulary,s.contentVocabulary];return $s.default=i,$s}const pd="http://json-schema.org/draft-07/schema#",md="http://json-schema.org/draft-07/schema#",gd="Core schema meta-schema",yd={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},
802
- simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},$d=["object","boolean"],_d={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},
800
+ function g(D){return y.test(D)&&d.test(D)}const p=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function m(D){return p.lastIndex=0,p.test(D)}const _=-2147483648,v=2**31-1;function w(D){return Number.isInteger(D)&&D<=v&&D>=_}function S(D){return Number.isInteger(D)}function I(){return!0}const F=/[^\\]\\Z/;function B(D){if(F.test(D))return!1;try{return new RegExp(D),!0}catch{return!1}}}(to)),to}var ro={},ys={exports:{}},$s={},pd;function X$(){if(pd)return $s;pd=1,Object.defineProperty(
801
+ $s,"__esModule",{value:!0});const t=Qu(),e=dl(),r=jl(),n=Xl(),s=Ql(),i=[t.default,e.default,(0,r.default)(),n.default,s.metadataVocabulary,s.contentVocabulary];return $s.default=i,$s}const md="http://json-schema.org/draft-07/schema#",gd="http://json-schema.org/draft-07/schema#",yd="Core schema meta-schema",$d={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},
802
+ simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},_d=["object","boolean"],vd={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},
803
803
  maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolea\
804
804
  n",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"\
805
805
  object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/def\
806
- initions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},J$={$schema:pd,$id:md,title:gd,definitions:yd,type:$d,properties:_d,default:!0},Q$={__proto__:null,$id:md,$schema:pd,default:J$,definitions:yd,properties:_d,title:gd,type:$d},Z$=nt(Q$);var vd;function e0(){return vd||(vd=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=Wu(),n=X$(),s=tf(),
806
+ initions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},J$={$schema:md,$id:gd,title:yd,definitions:$d,type:_d,properties:vd,default:!0},Q$={__proto__:null,$id:gd,$schema:md,default:J$,definitions:$d,properties:vd,title:yd,type:_d},Z$=nt(Q$);var bd;function e0(){return bd||(bd=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=Ku(),n=X$(),s=rf(),
807
807
  i=Z$,o=["/properties"],a="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(b,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||
808
808
  (this.getSchema(a)?a:void 0)}}e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var l=jr();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=pe();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,
809
- "nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var f=wn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var h=Lr();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return h.default}})}(ys,ys.exports)),ys.exports}var bd;function t0(){return bd||(bd=1,function(t){Object.
809
+ "nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var f=wn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var h=Lr();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return h.default}})}(ys,ys.exports)),ys.exports}var wd;function t0(){return wd||(wd=1,function(t){Object.
810
810
  defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=e0(),r=pe(),n=r.operators,s={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},i={message:({keyword:a,schemaCode:c})=>(0,r.str)`should be ${s[a].okStr} ${c}`,params:({keyword:a,schemaCode:c})=>(0,r._)`{comparison: ${s[a].okStr}, limit: ${c}}`};t.formatLimitDefinition=
811
811
  {keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:i,code(a){const{gen:c,data:l,schemaCode:u,keyword:f,it:h}=a,{opts:$,self:b}=h;if(!$.validateFormats)return;const y=new e.KeywordCxt(h,b.RULES.all.format.definition,"format");y.$data?d():g();function d(){const m=c.scopeValue("formats",{ref:b.formats,code:$.code.formats}),_=c.const("fmt",(0,r._)`${m}[${y.schemaCode}]`);a.fail$data((0,r.or)((0,r._)`typeof ${_} != "object"`,(0,r._)`${_} instanceof RegExp`,(0,r._)`typeof ${_}.compare != "function"`,
812
812
  p(_)))}function g(){const m=y.schema,_=b.formats[m];if(!_||_===!0)return;if(typeof _!="object"||_ instanceof RegExp||typeof _.compare!="function")throw new Error(`"${f}": format "${m}" does not define "compare" function`);const v=c.scopeValue("formats",{key:m,ref:_,code:$.code.formats?(0,r._)`${$.code.formats}${(0,r.getProperty)(m)}`:void 0});a.fail$data(p(v))}function p(m){return(0,r._)`${m}.compare(${l}, ${u}) ${s[f].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(t.formatLimitDefinition),
813
- a);t.default=o}(ro)),ro}var wd;function r0(){return wd||(wd=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Y$(),n=t0(),s=pe(),i=new s.Name("fullFormats"),o=new s.Name("fastFormats"),a=(l,u={keywords:!0})=>{if(Array.isArray(u))return c(l,u,r.fullFormats,i),l;const[f,h]=u.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,i],$=u.formats||r.formatNames;return c(l,$,f,h),u.keywords&&(0,n.default)(l),l};a.get=(l,u="full")=>{const h=(u==="fast"?r.fastFormats:r.fullFormats)[l];if(!h)
813
+ a);t.default=o}(ro)),ro}var Ed;function r0(){return Ed||(Ed=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Y$(),n=t0(),s=pe(),i=new s.Name("fullFormats"),o=new s.Name("fastFormats"),a=(l,u={keywords:!0})=>{if(Array.isArray(u))return c(l,u,r.fullFormats,i),l;const[f,h]=u.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,i],$=u.formats||r.formatNames;return c(l,$,f,h),u.keywords&&(0,n.default)(l),l};a.get=(l,u="full")=>{const h=(u==="fast"?r.fastFormats:r.fullFormats)[l];if(!h)
814
814
  throw new Error(`Unknown format "${l}"`);return h};function c(l,u,f,h){var $,b;($=(b=l.opts.code).formats)!==null&&$!==void 0||(b.formats=(0,s._)`require("ajv-formats/dist/formats").${h}`);for(const y of u)l.addFormat(y,f[y])}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a}(gs,gs.exports)),gs.exports}var n0=r0();const s0=Ur(n0),i0=(t,e,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;const s=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(
815
815
  e,r);!o0(s,i)&&n||Object.defineProperty(t,r,i)},o0=function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},a0=(t,e)=>{const r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)},c0=(t,e)=>`/* Wrapped ${t}*/
816
816
  ${e}`,u0=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),l0=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),f0=(t,e,r)=>{const n=r===""?"":`with ${r.trim()}() `,s=c0.bind(null,n,e.toString());Object.defineProperty(s,"name",l0);const{writable:i,enumerable:o,configurable:a}=u0;Object.defineProperty(t,"toString",{value:s,writable:i,enumerable:o,configurable:a})};function d0(t,e,{ignoreNonConfigurable:r=!1}={}){const{name:n}=t;for(const s of Reflect.ownKeys(e))i0(t,
817
- e,s,r);return a0(t,e),f0(t,e,n),t}const Ed=(t,e={})=>{if(typeof t!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof t}\``);const{wait:r=0,maxWait:n=Number.POSITIVE_INFINITY,before:s=!1,after:i=!0}=e;if(r<0||n<0)throw new RangeError("`wait` and `maxWait` must not be negative.");if(!s&&!i)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let o,a,c;const l=function(...u){const f=this,h=()=>{o=void 0,a&&(clearTimeout(a),a=
818
- void 0),i&&(c=t.apply(f,u))},$=()=>{a=void 0,o&&(clearTimeout(o),o=void 0),i&&(c=t.apply(f,u))},b=s&&!o;return clearTimeout(o),o=setTimeout(h,r),n>0&&n!==Number.POSITIVE_INFINITY&&!a&&(a=setTimeout($,n)),b&&(c=t.apply(f,u)),c};return d0(l,t),l.cancel=()=>{o&&(clearTimeout(o),o=void 0),a&&(clearTimeout(a),a=void 0)},l};var _s={exports:{}},no,Sd;function vs(){if(Sd)return no;Sd=1;const t="2.0.0",e=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,s=e-6;return no={MAX_LENGTH:e,MAX_SAFE_COMPONENT_LENGTH:n,
819
- MAX_SAFE_BUILD_LENGTH:s,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},no}var so,Rd;function bs(){return Rd||(Rd=1,so=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}),so}var Ad;function xr(){return Ad||(Ad=1,function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,
817
+ e,s,r);return a0(t,e),f0(t,e,n),t}const Sd=(t,e={})=>{if(typeof t!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof t}\``);const{wait:r=0,maxWait:n=Number.POSITIVE_INFINITY,before:s=!1,after:i=!0}=e;if(r<0||n<0)throw new RangeError("`wait` and `maxWait` must not be negative.");if(!s&&!i)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let o,a,c;const l=function(...u){const f=this,h=()=>{o=void 0,a&&(clearTimeout(a),a=
818
+ void 0),i&&(c=t.apply(f,u))},$=()=>{a=void 0,o&&(clearTimeout(o),o=void 0),i&&(c=t.apply(f,u))},b=s&&!o;return clearTimeout(o),o=setTimeout(h,r),n>0&&n!==Number.POSITIVE_INFINITY&&!a&&(a=setTimeout($,n)),b&&(c=t.apply(f,u)),c};return d0(l,t),l.cancel=()=>{o&&(clearTimeout(o),o=void 0),a&&(clearTimeout(a),a=void 0)},l};var _s={exports:{}},no,Rd;function vs(){if(Rd)return no;Rd=1;const t="2.0.0",e=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,s=e-6;return no={MAX_LENGTH:e,MAX_SAFE_COMPONENT_LENGTH:n,
819
+ MAX_SAFE_BUILD_LENGTH:s,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},no}var so,Ad;function bs(){return Ad||(Ad=1,so=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}),so}var Od;function xr(){return Od||(Od=1,function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,
820
820
  MAX_LENGTH:s}=vs(),i=bs();e=t.exports={};const o=e.re=[],a=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={};let f=0;const h="[a-zA-Z0-9-]",$=[["\\s",1],["\\d",s],[h,n]],b=d=>{for(const[g,p]of $)d=d.split(`${g}*`).join(`${g}{0,${p}}`).split(`${g}+`).join(`${g}{1,${p}}`);return d},y=(d,g,p)=>{const m=b(g),_=f++;i(d,_,g),u[d]=_,c[_]=g,l[_]=m,o[_]=new RegExp(g,p?"g":void 0),a[_]=new RegExp(m,p?"g":void 0)};y("NUMERICIDENTIFIER","0|[1-9]\\d*"),y("NUMERICIDENTIFIERLOOSE","\\d+"),y("NONNUMERICIDENTIFIER",
821
821
  `\\d*[a-zA-Z-]${h}*`),y("MAINVERSION",`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),y("MAINVERSIONLOOSE",`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),y("PRERELEASEIDENTIFIER",`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),y("PRERELEASEIDENTIFIERLOOSE",`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),y("PRERELEASE",`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.
822
822
  PRERELEASEIDENTIFIER]})*))`),y("PRERELEASELOOSE",`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),y("BUILDIDENTIFIER",`${h}+`),y("BUILD",`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),y("FULLPLAIN",`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),y("FULL",`^${c[u.FULLPLAIN]}$`),y("LOOSEPLAIN",`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),y("LOOSE",`^${c[u.LOOSEPLAIN]}$`),y("GTLT","((?:<|>)?=?)"),y("XRAN\
823
823
  GEIDENTIFIERLOOSE",`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),y("XRANGEIDENTIFIER",`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),y("XRANGEPLAIN",`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),y("XRANGEPLAINLOOSE",`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),y("XRANGE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}\
824
824
  $`),y("XRANGELOOSE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),y("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),y("COERCE",`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),y("COERCEFULL",c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),y("COERCERTL",c[u.COERCE],!0),y("COERCERTLFULL",c[u.COERCEFULL],!0),y("LONETILDE","(?:~>?)"),y("TILDETRIM",`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",y("TILDE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}\
825
825
  $`),y("TILDELOOSE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),y("LONECARET","(?:\\^)"),y("CARETTRIM",`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",y("CARET",`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),y("CARETLOOSE",`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),y("COMPARATORLOOSE",`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),y("COMPARATOR",`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),y("COMPARATORTRIM",`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=
826
- "$1$2$3",y("HYPHENRANGE",`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),y("HYPHENRANGELOOSE",`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),y("STAR","(<|>)?=?\\s*\\*"),y("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),y("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(_s,_s.exports)),_s.exports}var io,Od;function oo(){if(Od)return io;Od=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return io=n=>n?typeof n!="object"?t:n:e,io}var ao,Cd;function Pd(){if(Cd)return ao;
827
- Cd=1;const t=/^[0-9]+$/,e=(n,s)=>{const i=t.test(n),o=t.test(s);return i&&o&&(n=+n,s=+s),n===s?0:i&&!o?-1:o&&!i?1:n<s?-1:1};return ao={compareIdentifiers:e,rcompareIdentifiers:(n,s)=>e(s,n)},ao}var co,Id;function Le(){if(Id)return co;Id=1;const t=bs(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:r}=vs(),{safeRe:n,t:s}=xr(),i=oo(),{compareIdentifiers:o}=Pd();class a{constructor(l,u){if(u=i(u),l instanceof a){if(l.loose===!!u.loose&&l.includePrerelease===!!u.includePrerelease)return l;l=l.version}else if(typeof l!=
826
+ "$1$2$3",y("HYPHENRANGE",`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),y("HYPHENRANGELOOSE",`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),y("STAR","(<|>)?=?\\s*\\*"),y("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),y("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(_s,_s.exports)),_s.exports}var io,Cd;function oo(){if(Cd)return io;Cd=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return io=n=>n?typeof n!="object"?t:n:e,io}var ao,Pd;function Id(){if(Pd)return ao;
827
+ Pd=1;const t=/^[0-9]+$/,e=(n,s)=>{const i=t.test(n),o=t.test(s);return i&&o&&(n=+n,s=+s),n===s?0:i&&!o?-1:o&&!i?1:n<s?-1:1};return ao={compareIdentifiers:e,rcompareIdentifiers:(n,s)=>e(s,n)},ao}var co,Nd;function Le(){if(Nd)return co;Nd=1;const t=bs(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:r}=vs(),{safeRe:n,t:s}=xr(),i=oo(),{compareIdentifiers:o}=Id();class a{constructor(l,u){if(u=i(u),l instanceof a){if(l.loose===!!u.loose&&l.includePrerelease===!!u.includePrerelease)return l;l=l.version}else if(typeof l!=
828
828
  "string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof l}".`);if(l.length>e)throw new TypeError(`version is longer than ${e} characters`);t("SemVer",l,u),this.options=u,this.loose=!!u.loose,this.includePrerelease=!!u.includePrerelease;const f=l.trim().match(u.loose?n[s.LOOSE]:n[s.FULL]);if(!f)throw new TypeError(`Invalid Version: ${l}`);if(this.raw=l,this.major=+f[1],this.minor=+f[2],this.patch=+f[3],this.major>r||this.major<0)throw new TypeError("Invalid major versi\
829
829
  on");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");f[4]?this.prerelease=f[4].split(".").map(h=>{if(/^[0-9]+$/.test(h)){const $=+h;if($>=0&&$<r)return $}return h}):this.prerelease=[],this.build=f[5]?f[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){
830
830
  return this.version}compare(l){if(t("SemVer.compare",this.version,this.options,l),!(l instanceof a)){if(typeof l=="string"&&l===this.version)return 0;l=new a(l,this.options)}return l.version===this.version?0:this.compareMain(l)||this.comparePre(l)}compareMain(l){return l instanceof a||(l=new a(l,this.options)),o(this.major,l.major)||o(this.minor,l.minor)||o(this.patch,l.patch)}comparePre(l){if(l instanceof a||(l=new a(l,this.options)),this.prerelease.length&&!l.prerelease.length)return-1;if(!this.
@@ -832,16 +832,16 @@ prerelease.length&&l.prerelease.length)return 1;if(!this.prerelease.length&&!l.p
832
832
  if(f===void 0)return-1;if(f===h)continue;return o(f,h)}while(++u)}inc(l,u,f){if(l.startsWith("pre")){if(!u&&f===!1)throw new Error("invalid increment argument: identifier is empty");if(u){const h=`-${u}`.match(this.options.loose?n[s.PRERELEASELOOSE]:n[s.PRERELEASE]);if(!h||h[1]!==u)throw new Error(`invalid identifier: ${u}`)}}switch(l){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",u,f);break;case"preminor":this.prerelease.length=0,this.patch=0,this.
833
833
  minor++,this.inc("pre",u,f);break;case"prepatch":this.prerelease.length=0,this.inc("patch",u,f),this.inc("pre",u,f);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",u,f),this.inc("pre",u,f);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.
834
834
  patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const h=Number(f)?1:0;if(this.prerelease.length===0)this.prerelease=[h];else{let $=this.prerelease.length;for(;--$>=0;)typeof this.prerelease[$]=="number"&&(this.prerelease[$]++,$=-2);if($===-1){if(u===this.prerelease.join(".")&&f===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.
835
- push(h)}}if(u){let $=[u,h];f===!1&&($=[u]),o(this.prerelease[0],u)===0?isNaN(this.prerelease[1])&&(this.prerelease=$):this.prerelease=$}break}default:throw new Error(`invalid increment argument: ${l}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return co=a,co}var uo,Nd;function or(){if(Nd)return uo;Nd=1;const t=Le();return uo=(r,n,s=!1)=>{if(r instanceof t)return r;try{return new t(r,n)}catch(i){if(!s)return null;throw i}},uo}var lo,Td;function h0(){
836
- if(Td)return lo;Td=1;const t=or();return lo=(r,n)=>{const s=t(r,n);return s?s.version:null},lo}var fo,jd;function p0(){if(jd)return fo;jd=1;const t=or();return fo=(r,n)=>{const s=t(r.trim().replace(/^[=v]+/,""),n);return s?s.version:null},fo}var ho,Ld;function m0(){if(Ld)return ho;Ld=1;const t=Le();return ho=(r,n,s,i,o)=>{typeof s=="string"&&(o=i,i=s,s=void 0);try{return new t(r instanceof t?r.version:r,s).inc(n,i,o).version}catch{return null}},ho}var po,Dd;function g0(){if(Dd)return po;Dd=1;const t=or();
837
- return po=(r,n)=>{const s=t(r,null,!0),i=t(n,null,!0),o=s.compare(i);if(o===0)return null;const a=o>0,c=a?s:i,l=a?i:s,u=!!c.prerelease.length;if(!!l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(l.compareMain(c)===0)return l.minor&&!l.patch?"minor":"patch"}const h=u?"pre":"";return s.major!==i.major?h+"major":s.minor!==i.minor?h+"minor":s.patch!==i.patch?h+"patch":"prerelease"},po}var mo,kd;function y0(){if(kd)return mo;kd=1;const t=Le();return mo=(r,n)=>new t(r,n).major,mo}var go,
838
- xd;function $0(){if(xd)return go;xd=1;const t=Le();return go=(r,n)=>new t(r,n).minor,go}var yo,Md;function _0(){if(Md)return yo;Md=1;const t=Le();return yo=(r,n)=>new t(r,n).patch,yo}var $o,qd;function v0(){if(qd)return $o;qd=1;const t=or();return $o=(r,n)=>{const s=t(r,n);return s&&s.prerelease.length?s.prerelease:null},$o}var _o,Ud;function et(){if(Ud)return _o;Ud=1;const t=Le();return _o=(r,n,s)=>new t(r,s).compare(new t(n,s)),_o}var vo,Hd;function b0(){if(Hd)return vo;Hd=1;const t=et();return vo=
839
- (r,n,s)=>t(n,r,s),vo}var bo,Fd;function w0(){if(Fd)return bo;Fd=1;const t=et();return bo=(r,n)=>t(r,n,!0),bo}var wo,Vd;function Eo(){if(Vd)return wo;Vd=1;const t=Le();return wo=(r,n,s)=>{const i=new t(r,s),o=new t(n,s);return i.compare(o)||i.compareBuild(o)},wo}var So,zd;function E0(){if(zd)return So;zd=1;const t=Eo();return So=(r,n)=>r.sort((s,i)=>t(s,i,n)),So}var Ro,Gd;function S0(){if(Gd)return Ro;Gd=1;const t=Eo();return Ro=(r,n)=>r.sort((s,i)=>t(i,s,n)),Ro}var Ao,Bd;function ws(){if(Bd)return Ao;
840
- Bd=1;const t=et();return Ao=(r,n,s)=>t(r,n,s)>0,Ao}var Oo,Wd;function Co(){if(Wd)return Oo;Wd=1;const t=et();return Oo=(r,n,s)=>t(r,n,s)<0,Oo}var Po,Kd;function Yd(){if(Kd)return Po;Kd=1;const t=et();return Po=(r,n,s)=>t(r,n,s)===0,Po}var Io,Xd;function Jd(){if(Xd)return Io;Xd=1;const t=et();return Io=(r,n,s)=>t(r,n,s)!==0,Io}var No,Qd;function To(){if(Qd)return No;Qd=1;const t=et();return No=(r,n,s)=>t(r,n,s)>=0,No}var jo,Zd;function Lo(){if(Zd)return jo;Zd=1;const t=et();return jo=(r,n,s)=>t(r,
841
- n,s)<=0,jo}var Do,eh;function th(){if(eh)return Do;eh=1;const t=Yd(),e=Jd(),r=ws(),n=To(),s=Co(),i=Lo();return Do=(a,c,l,u)=>{switch(c){case"===":return typeof a=="object"&&(a=a.version),typeof l=="object"&&(l=l.version),a===l;case"!==":return typeof a=="object"&&(a=a.version),typeof l=="object"&&(l=l.version),a!==l;case"":case"=":case"==":return t(a,l,u);case"!=":return e(a,l,u);case">":return r(a,l,u);case">=":return n(a,l,u);case"<":return s(a,l,u);case"<=":return i(a,l,u);default:throw new TypeError(
842
- `Invalid operator: ${c}`)}},Do}var ko,rh;function R0(){if(rh)return ko;rh=1;const t=Le(),e=or(),{safeRe:r,t:n}=xr();return ko=(i,o)=>{if(i instanceof t)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;o=o||{};let a=null;if(!o.rtl)a=i.match(o.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const $=o.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let b;for(;(b=$.exec(i))&&(!a||a.index+a[0].length!==i.length);)(!a||b.index+b[0].length!==a.index+a[0].length)&&(a=
843
- b),$.lastIndex=b.index+b[1].length+b[2].length;$.lastIndex=-1}if(a===null)return null;const c=a[2],l=a[3]||"0",u=a[4]||"0",f=o.includePrerelease&&a[5]?`-${a[5]}`:"",h=o.includePrerelease&&a[6]?`+${a[6]}`:"";return e(`${c}.${l}.${u}${f}${h}`,o)},ko}var xo,nh;function A0(){if(nh)return xo;nh=1;class t{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&
844
- n!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(r,n)}return this}}return xo=t,xo}var Mo,sh;function tt(){if(sh)return Mo;sh=1;const t=/\s+/g;class e{constructor(U,Y){if(Y=s(Y),U instanceof e)return U.loose===!!Y.loose&&U.includePrerelease===!!Y.includePrerelease?U:new e(U.raw,Y);if(U instanceof i)return this.raw=U.value,this.set=[[U]],this.formatted=void 0,this;if(this.options=Y,this.loose=!!Y.loose,this.includePrerelease=!!Y.includePrerelease,
835
+ push(h)}}if(u){let $=[u,h];f===!1&&($=[u]),o(this.prerelease[0],u)===0?isNaN(this.prerelease[1])&&(this.prerelease=$):this.prerelease=$}break}default:throw new Error(`invalid increment argument: ${l}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return co=a,co}var uo,Td;function or(){if(Td)return uo;Td=1;const t=Le();return uo=(r,n,s=!1)=>{if(r instanceof t)return r;try{return new t(r,n)}catch(i){if(!s)return null;throw i}},uo}var lo,jd;function h0(){
836
+ if(jd)return lo;jd=1;const t=or();return lo=(r,n)=>{const s=t(r,n);return s?s.version:null},lo}var fo,Ld;function p0(){if(Ld)return fo;Ld=1;const t=or();return fo=(r,n)=>{const s=t(r.trim().replace(/^[=v]+/,""),n);return s?s.version:null},fo}var ho,Dd;function m0(){if(Dd)return ho;Dd=1;const t=Le();return ho=(r,n,s,i,o)=>{typeof s=="string"&&(o=i,i=s,s=void 0);try{return new t(r instanceof t?r.version:r,s).inc(n,i,o).version}catch{return null}},ho}var po,kd;function g0(){if(kd)return po;kd=1;const t=or();
837
+ return po=(r,n)=>{const s=t(r,null,!0),i=t(n,null,!0),o=s.compare(i);if(o===0)return null;const a=o>0,c=a?s:i,l=a?i:s,u=!!c.prerelease.length;if(!!l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(l.compareMain(c)===0)return l.minor&&!l.patch?"minor":"patch"}const h=u?"pre":"";return s.major!==i.major?h+"major":s.minor!==i.minor?h+"minor":s.patch!==i.patch?h+"patch":"prerelease"},po}var mo,xd;function y0(){if(xd)return mo;xd=1;const t=Le();return mo=(r,n)=>new t(r,n).major,mo}var go,
838
+ Md;function $0(){if(Md)return go;Md=1;const t=Le();return go=(r,n)=>new t(r,n).minor,go}var yo,qd;function _0(){if(qd)return yo;qd=1;const t=Le();return yo=(r,n)=>new t(r,n).patch,yo}var $o,Ud;function v0(){if(Ud)return $o;Ud=1;const t=or();return $o=(r,n)=>{const s=t(r,n);return s&&s.prerelease.length?s.prerelease:null},$o}var _o,Hd;function et(){if(Hd)return _o;Hd=1;const t=Le();return _o=(r,n,s)=>new t(r,s).compare(new t(n,s)),_o}var vo,Fd;function b0(){if(Fd)return vo;Fd=1;const t=et();return vo=
839
+ (r,n,s)=>t(n,r,s),vo}var bo,Vd;function w0(){if(Vd)return bo;Vd=1;const t=et();return bo=(r,n)=>t(r,n,!0),bo}var wo,zd;function Eo(){if(zd)return wo;zd=1;const t=Le();return wo=(r,n,s)=>{const i=new t(r,s),o=new t(n,s);return i.compare(o)||i.compareBuild(o)},wo}var So,Gd;function E0(){if(Gd)return So;Gd=1;const t=Eo();return So=(r,n)=>r.sort((s,i)=>t(s,i,n)),So}var Ro,Bd;function S0(){if(Bd)return Ro;Bd=1;const t=Eo();return Ro=(r,n)=>r.sort((s,i)=>t(i,s,n)),Ro}var Ao,Wd;function ws(){if(Wd)return Ao;
840
+ Wd=1;const t=et();return Ao=(r,n,s)=>t(r,n,s)>0,Ao}var Oo,Kd;function Co(){if(Kd)return Oo;Kd=1;const t=et();return Oo=(r,n,s)=>t(r,n,s)<0,Oo}var Po,Yd;function Xd(){if(Yd)return Po;Yd=1;const t=et();return Po=(r,n,s)=>t(r,n,s)===0,Po}var Io,Jd;function Qd(){if(Jd)return Io;Jd=1;const t=et();return Io=(r,n,s)=>t(r,n,s)!==0,Io}var No,Zd;function To(){if(Zd)return No;Zd=1;const t=et();return No=(r,n,s)=>t(r,n,s)>=0,No}var jo,eh;function Lo(){if(eh)return jo;eh=1;const t=et();return jo=(r,n,s)=>t(r,
841
+ n,s)<=0,jo}var Do,th;function rh(){if(th)return Do;th=1;const t=Xd(),e=Qd(),r=ws(),n=To(),s=Co(),i=Lo();return Do=(a,c,l,u)=>{switch(c){case"===":return typeof a=="object"&&(a=a.version),typeof l=="object"&&(l=l.version),a===l;case"!==":return typeof a=="object"&&(a=a.version),typeof l=="object"&&(l=l.version),a!==l;case"":case"=":case"==":return t(a,l,u);case"!=":return e(a,l,u);case">":return r(a,l,u);case">=":return n(a,l,u);case"<":return s(a,l,u);case"<=":return i(a,l,u);default:throw new TypeError(
842
+ `Invalid operator: ${c}`)}},Do}var ko,nh;function R0(){if(nh)return ko;nh=1;const t=Le(),e=or(),{safeRe:r,t:n}=xr();return ko=(i,o)=>{if(i instanceof t)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;o=o||{};let a=null;if(!o.rtl)a=i.match(o.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const $=o.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let b;for(;(b=$.exec(i))&&(!a||a.index+a[0].length!==i.length);)(!a||b.index+b[0].length!==a.index+a[0].length)&&(a=
843
+ b),$.lastIndex=b.index+b[1].length+b[2].length;$.lastIndex=-1}if(a===null)return null;const c=a[2],l=a[3]||"0",u=a[4]||"0",f=o.includePrerelease&&a[5]?`-${a[5]}`:"",h=o.includePrerelease&&a[6]?`+${a[6]}`:"";return e(`${c}.${l}.${u}${f}${h}`,o)},ko}var xo,sh;function A0(){if(sh)return xo;sh=1;class t{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&
844
+ n!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(r,n)}return this}}return xo=t,xo}var Mo,ih;function tt(){if(ih)return Mo;ih=1;const t=/\s+/g;class e{constructor(U,Y){if(Y=s(Y),U instanceof e)return U.loose===!!Y.loose&&U.includePrerelease===!!Y.includePrerelease?U:new e(U.raw,Y);if(U instanceof i)return this.raw=U.value,this.set=[[U]],this.formatted=void 0,this;if(this.options=Y,this.loose=!!Y.loose,this.includePrerelease=!!Y.includePrerelease,
845
845
  this.raw=U.trim().replace(t," "),this.set=this.raw.split("||").map(G=>this.parseRange(G.trim())).filter(G=>G.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const G=this.set[0];if(this.set=this.set.filter(J=>!y(J[0])),this.set.length===0)this.set=[G];else if(this.set.length>1){for(const J of this.set)if(J.length===1&&d(J[0])){this.set=[J];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let U=0;U<this.
846
846
  set.length;U++){U>0&&(this.formatted+="||");const Y=this.set[U];for(let G=0;G<Y.length;G++)G>0&&(this.formatted+=" "),this.formatted+=Y[G].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(U){const G=((this.options.includePrerelease&&$)|(this.options.loose&&b))+":"+U,J=n.get(G);if(J)return J;const se=this.options.loose,H=se?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];U=U.replace(H,M(this.options.includePrerelease)),o("hyphen replace",U),U=U.replace(
847
847
  c[l.COMPARATORTRIM],u),o("comparator trim",U),U=U.replace(c[l.TILDETRIM],f),o("tilde trim",U),U=U.replace(c[l.CARETTRIM],h),o("caret trim",U);let A=U.split(" ").map(R=>p(R,this.options)).join(" ").split(/\s+/).map(R=>D(R,this.options));se&&(A=A.filter(R=>(o("loose invalid filter",R,this.options),!!R.match(c[l.COMPARATORLOOSE])))),o("range list",A);const V=new Map,x=A.map(R=>new i(R,this.options));for(const R of x){if(y(R))return[R];V.set(R.value,R)}V.size>1&&V.has("")&&V.delete("");const E=[...V.
@@ -851,63 +851,63 @@ o("tilde",k,G,J,se,H,A);let V;return m(J)?V="":m(se)?V=`>=${J}.0.0 <${+J+1}.0.0-
851
851
  m(H)?x=`>=${se}.0.0${G} <${+se+1}.0.0-0`:m(A)?se==="0"?x=`>=${se}.${H}.0${G} <${se}.${+H+1}.0-0`:x=`>=${se}.${H}.0${G} <${+se+1}.0.0-0`:V?(o("replaceCaret pr",V),se==="0"?H==="0"?x=`>=${se}.${H}.${A}-${V} <${se}.${H}.${+A+1}-0`:x=`>=${se}.${H}.${A}-${V} <${se}.${+H+1}.0-0`:x=`>=${se}.${H}.${A}-${V} <${+se+1}.0.0-0`):(o("no pr"),se==="0"?H==="0"?x=`>=${se}.${H}.${A}${G} <${se}.${H}.${+A+1}-0`:x=`>=${se}.${H}.${A}${G} <${se}.${+H+1}.0-0`:x=`>=${se}.${H}.${A} <${+se+1}.0.0-0`),o("caret return",x),x})},
852
852
  I=(k,U)=>(o("replaceXRanges",k,U),k.split(/\s+/).map(Y=>F(Y,U)).join(" ")),F=(k,U)=>{k=k.trim();const Y=U.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return k.replace(Y,(G,J,se,H,A,V)=>{o("xRange",k,G,J,se,H,A,V);const x=m(se),E=x||m(H),R=E||m(A),C=R;return J==="="&&C&&(J=""),V=U.includePrerelease?"-0":"",x?J===">"||J==="<"?G="<0.0.0-0":G="*":J&&C?(E&&(H=0),A=0,J===">"?(J=">=",E?(se=+se+1,H=0,A=0):(H=+H+1,A=0)):J==="<="&&(J="<",E?se=+se+1:H=+H+1),J==="<"&&(V="-0"),G=`${J+se}.${H}.${A}${V}`):E?G=`>=${se}.\
853
853
  0.0${V} <${+se+1}.0.0-0`:R&&(G=`>=${se}.${H}.0${V} <${se}.${+H+1}.0-0`),o("xRange return",G),G})},B=(k,U)=>(o("replaceStars",k,U),k.trim().replace(c[l.STAR],"")),D=(k,U)=>(o("replaceGTE0",k,U),k.trim().replace(c[U.includePrerelease?l.GTE0PRE:l.GTE0],"")),M=k=>(U,Y,G,J,se,H,A,V,x,E,R,C)=>(m(G)?Y="":m(J)?Y=`>=${G}.0.0${k?"-0":""}`:m(se)?Y=`>=${G}.${J}.0${k?"-0":""}`:H?Y=`>=${Y}`:Y=`>=${Y}${k?"-0":""}`,m(x)?V="":m(E)?V=`<${+x+1}.0.0-0`:m(R)?V=`<${x}.${+E+1}.0-0`:C?V=`<=${x}.${E}.${R}-${C}`:k?V=`<${x}\
854
- .${E}.${+R+1}-0`:V=`<=${V}`,`${Y} ${V}`.trim()),j=(k,U,Y)=>{for(let G=0;G<k.length;G++)if(!k[G].test(U))return!1;if(U.prerelease.length&&!Y.includePrerelease){for(let G=0;G<k.length;G++)if(o(k[G].semver),k[G].semver!==i.ANY&&k[G].semver.prerelease.length>0){const J=k[G].semver;if(J.major===U.major&&J.minor===U.minor&&J.patch===U.patch)return!0}return!1}return!0};return Mo}var qo,ih;function Es(){if(ih)return qo;ih=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(u,f){
854
+ .${E}.${+R+1}-0`:V=`<=${V}`,`${Y} ${V}`.trim()),j=(k,U,Y)=>{for(let G=0;G<k.length;G++)if(!k[G].test(U))return!1;if(U.prerelease.length&&!Y.includePrerelease){for(let G=0;G<k.length;G++)if(o(k[G].semver),k[G].semver!==i.ANY&&k[G].semver.prerelease.length>0){const J=k[G].semver;if(J.major===U.major&&J.minor===U.minor&&J.patch===U.patch)return!0}return!1}return!0};return Mo}var qo,oh;function Es(){if(oh)return qo;oh=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(u,f){
855
855
  if(f=r(f),u instanceof e){if(u.loose===!!f.loose)return u;u=u.value}u=u.trim().split(/\s+/).join(" "),o("comparator",u,f),this.options=f,this.loose=!!f.loose,this.parse(u),this.semver===t?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(u){const f=this.options.loose?n[s.COMPARATORLOOSE]:n[s.COMPARATOR],h=u.match(f);if(!h)throw new TypeError(`Invalid comparator: ${u}`);this.operator=h[1]!==void 0?h[1]:"",this.operator==="="&&(this.operator=""),h[2]?this.semver=new a(
856
856
  h[2],this.options.loose):this.semver=t}toString(){return this.value}test(u){if(o("Comparator.test",u,this.options.loose),this.semver===t||u===t)return!0;if(typeof u=="string")try{u=new a(u,this.options)}catch{return!1}return i(u,this.operator,this.semver,this.options)}intersects(u,f){if(!(u instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new c(u.value,f).test(this.value):u.operator===""?u.value===""?!0:new c(this.value,f).test(u.semver):
857
857
  (f=r(f),f.includePrerelease&&(this.value==="<0.0.0-0"||u.value==="<0.0.0-0")||!f.includePrerelease&&(this.value.startsWith("<0.0.0")||u.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&u.operator.startsWith(">")||this.operator.startsWith("<")&&u.operator.startsWith("<")||this.semver.version===u.semver.version&&this.operator.includes("=")&&u.operator.includes("=")||i(this.semver,"<",u.semver,f)&&this.operator.startsWith(">")&&u.operator.startsWith("<")||i(this.semver,">",u.semver,
858
- f)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}qo=e;const r=oo(),{safeRe:n,t:s}=xr(),i=th(),o=bs(),a=Le(),c=tt();return qo}var Uo,oh;function Ss(){if(oh)return Uo;oh=1;const t=tt();return Uo=(r,n,s)=>{try{n=new t(n,s)}catch{return!1}return n.test(r)},Uo}var Ho,ah;function O0(){if(ah)return Ho;ah=1;const t=tt();return Ho=(r,n)=>new t(r,n).set.map(s=>s.map(i=>i.value).join(" ").trim().split(" ")),Ho}var Fo,ch;function C0(){if(ch)return Fo;ch=1;const t=Le(),e=tt();return Fo=(n,s,i)=>{
859
- let o=null,a=null,c=null;try{c=new e(s,i)}catch{return null}return n.forEach(l=>{c.test(l)&&(!o||a.compare(l)===-1)&&(o=l,a=new t(o,i))}),o},Fo}var Vo,uh;function P0(){if(uh)return Vo;uh=1;const t=Le(),e=tt();return Vo=(n,s,i)=>{let o=null,a=null,c=null;try{c=new e(s,i)}catch{return null}return n.forEach(l=>{c.test(l)&&(!o||a.compare(l)===1)&&(o=l,a=new t(o,i))}),o},Vo}var zo,lh;function I0(){if(lh)return zo;lh=1;const t=Le(),e=tt(),r=ws();return zo=(s,i)=>{s=new e(s,i);let o=new t("0.0.0");if(s.
860
- test(o)||(o=new t("0.0.0-0"),s.test(o)))return o;o=null;for(let a=0;a<s.set.length;++a){const c=s.set[a];let l=null;c.forEach(u=>{const f=new t(u.semver.version);switch(u.operator){case">":f.prerelease.length===0?f.patch++:f.prerelease.push(0),f.raw=f.format();case"":case">=":(!l||r(f,l))&&(l=f);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),l&&(!o||r(o,l))&&(o=l)}return o&&s.test(o)?o:null},zo}var Go,fh;function N0(){if(fh)return Go;fh=1;const t=tt();
861
- return Go=(r,n)=>{try{return new t(r,n).range||"*"}catch{return null}},Go}var Bo,dh;function Wo(){if(dh)return Bo;dh=1;const t=Le(),e=Es(),{ANY:r}=e,n=tt(),s=Ss(),i=ws(),o=Co(),a=Lo(),c=To();return Bo=(u,f,h,$)=>{u=new t(u,$),f=new n(f,$);let b,y,d,g,p;switch(h){case">":b=i,y=a,d=o,g=">",p=">=";break;case"<":b=o,y=c,d=i,g="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(u,f,$))return!1;for(let m=0;m<f.set.length;++m){const _=f.set[m];let v=null,w=null;if(_.
862
- forEach(S=>{S.semver===r&&(S=new e(">=0.0.0")),v=v||S,w=w||S,b(S.semver,v.semver,$)?v=S:d(S.semver,w.semver,$)&&(w=S)}),v.operator===g||v.operator===p||(!w.operator||w.operator===g)&&y(u,w.semver))return!1;if(w.operator===p&&d(u,w.semver))return!1}return!0},Bo}var Ko,hh;function T0(){if(hh)return Ko;hh=1;const t=Wo();return Ko=(r,n,s)=>t(r,n,">",s),Ko}var Yo,ph;function j0(){if(ph)return Yo;ph=1;const t=Wo();return Yo=(r,n,s)=>t(r,n,"<",s),Yo}var Xo,mh;function L0(){if(mh)return Xo;mh=1;const t=tt();
863
- return Xo=(r,n,s)=>(r=new t(r,s),n=new t(n,s),r.intersects(n,s)),Xo}var Jo,gh;function D0(){if(gh)return Jo;gh=1;const t=Ss(),e=et();return Jo=(r,n,s)=>{const i=[];let o=null,a=null;const c=r.sort((h,$)=>e(h,$,s));for(const h of c)t(h,n,s)?(a=h,o||(o=h)):(a&&i.push([o,a]),a=null,o=null);o&&i.push([o,null]);const l=[];for(const[h,$]of i)h===$?l.push(h):!$&&h===c[0]?l.push("*"):$?h===c[0]?l.push(`<=${$}`):l.push(`${h} - ${$}`):l.push(`>=${h}`);const u=l.join(" || "),f=typeof n.raw=="string"?n.raw:
864
- String(n);return u.length<f.length?u:n},Jo}var Qo,yh;function k0(){if(yh)return Qo;yh=1;const t=tt(),e=Es(),{ANY:r}=e,n=Ss(),s=et(),i=(f,h,$={})=>{if(f===h)return!0;f=new t(f,$),h=new t(h,$);let b=!1;e:for(const y of f.set){for(const d of h.set){const g=c(y,d,$);if(b=b||g!==null,g)continue e}if(b)return!1}return!0},o=[new e(">=0.0.0-0")],a=[new e(">=0.0.0")],c=(f,h,$)=>{if(f===h)return!0;if(f.length===1&&f[0].semver===r){if(h.length===1&&h[0].semver===r)return!0;$.includePrerelease?f=o:f=a}if(h.
858
+ f)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}qo=e;const r=oo(),{safeRe:n,t:s}=xr(),i=rh(),o=bs(),a=Le(),c=tt();return qo}var Uo,ah;function Ss(){if(ah)return Uo;ah=1;const t=tt();return Uo=(r,n,s)=>{try{n=new t(n,s)}catch{return!1}return n.test(r)},Uo}var Ho,ch;function O0(){if(ch)return Ho;ch=1;const t=tt();return Ho=(r,n)=>new t(r,n).set.map(s=>s.map(i=>i.value).join(" ").trim().split(" ")),Ho}var Fo,uh;function C0(){if(uh)return Fo;uh=1;const t=Le(),e=tt();return Fo=(n,s,i)=>{
859
+ let o=null,a=null,c=null;try{c=new e(s,i)}catch{return null}return n.forEach(l=>{c.test(l)&&(!o||a.compare(l)===-1)&&(o=l,a=new t(o,i))}),o},Fo}var Vo,lh;function P0(){if(lh)return Vo;lh=1;const t=Le(),e=tt();return Vo=(n,s,i)=>{let o=null,a=null,c=null;try{c=new e(s,i)}catch{return null}return n.forEach(l=>{c.test(l)&&(!o||a.compare(l)===1)&&(o=l,a=new t(o,i))}),o},Vo}var zo,fh;function I0(){if(fh)return zo;fh=1;const t=Le(),e=tt(),r=ws();return zo=(s,i)=>{s=new e(s,i);let o=new t("0.0.0");if(s.
860
+ test(o)||(o=new t("0.0.0-0"),s.test(o)))return o;o=null;for(let a=0;a<s.set.length;++a){const c=s.set[a];let l=null;c.forEach(u=>{const f=new t(u.semver.version);switch(u.operator){case">":f.prerelease.length===0?f.patch++:f.prerelease.push(0),f.raw=f.format();case"":case">=":(!l||r(f,l))&&(l=f);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),l&&(!o||r(o,l))&&(o=l)}return o&&s.test(o)?o:null},zo}var Go,dh;function N0(){if(dh)return Go;dh=1;const t=tt();
861
+ return Go=(r,n)=>{try{return new t(r,n).range||"*"}catch{return null}},Go}var Bo,hh;function Wo(){if(hh)return Bo;hh=1;const t=Le(),e=Es(),{ANY:r}=e,n=tt(),s=Ss(),i=ws(),o=Co(),a=Lo(),c=To();return Bo=(u,f,h,$)=>{u=new t(u,$),f=new n(f,$);let b,y,d,g,p;switch(h){case">":b=i,y=a,d=o,g=">",p=">=";break;case"<":b=o,y=c,d=i,g="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(u,f,$))return!1;for(let m=0;m<f.set.length;++m){const _=f.set[m];let v=null,w=null;if(_.
862
+ forEach(S=>{S.semver===r&&(S=new e(">=0.0.0")),v=v||S,w=w||S,b(S.semver,v.semver,$)?v=S:d(S.semver,w.semver,$)&&(w=S)}),v.operator===g||v.operator===p||(!w.operator||w.operator===g)&&y(u,w.semver))return!1;if(w.operator===p&&d(u,w.semver))return!1}return!0},Bo}var Ko,ph;function T0(){if(ph)return Ko;ph=1;const t=Wo();return Ko=(r,n,s)=>t(r,n,">",s),Ko}var Yo,mh;function j0(){if(mh)return Yo;mh=1;const t=Wo();return Yo=(r,n,s)=>t(r,n,"<",s),Yo}var Xo,gh;function L0(){if(gh)return Xo;gh=1;const t=tt();
863
+ return Xo=(r,n,s)=>(r=new t(r,s),n=new t(n,s),r.intersects(n,s)),Xo}var Jo,yh;function D0(){if(yh)return Jo;yh=1;const t=Ss(),e=et();return Jo=(r,n,s)=>{const i=[];let o=null,a=null;const c=r.sort((h,$)=>e(h,$,s));for(const h of c)t(h,n,s)?(a=h,o||(o=h)):(a&&i.push([o,a]),a=null,o=null);o&&i.push([o,null]);const l=[];for(const[h,$]of i)h===$?l.push(h):!$&&h===c[0]?l.push("*"):$?h===c[0]?l.push(`<=${$}`):l.push(`${h} - ${$}`):l.push(`>=${h}`);const u=l.join(" || "),f=typeof n.raw=="string"?n.raw:
864
+ String(n);return u.length<f.length?u:n},Jo}var Qo,$h;function k0(){if($h)return Qo;$h=1;const t=tt(),e=Es(),{ANY:r}=e,n=Ss(),s=et(),i=(f,h,$={})=>{if(f===h)return!0;f=new t(f,$),h=new t(h,$);let b=!1;e:for(const y of f.set){for(const d of h.set){const g=c(y,d,$);if(b=b||g!==null,g)continue e}if(b)return!1}return!0},o=[new e(">=0.0.0-0")],a=[new e(">=0.0.0")],c=(f,h,$)=>{if(f===h)return!0;if(f.length===1&&f[0].semver===r){if(h.length===1&&h[0].semver===r)return!0;$.includePrerelease?f=o:f=a}if(h.
865
865
  length===1&&h[0].semver===r){if($.includePrerelease)return!0;h=a}const b=new Set;let y,d;for(const I of f)I.operator===">"||I.operator===">="?y=l(y,I,$):I.operator==="<"||I.operator==="<="?d=u(d,I,$):b.add(I.semver);if(b.size>1)return null;let g;if(y&&d){if(g=s(y.semver,d.semver,$),g>0)return null;if(g===0&&(y.operator!==">="||d.operator!=="<="))return null}for(const I of b){if(y&&!n(I,String(y),$)||d&&!n(I,String(d),$))return null;for(const F of h)if(!n(I,String(F),$))return!1;return!0}let p,m,
866
866
  _,v,w=d&&!$.includePrerelease&&d.semver.prerelease.length?d.semver:!1,S=y&&!$.includePrerelease&&y.semver.prerelease.length?y.semver:!1;w&&w.prerelease.length===1&&d.operator==="<"&&w.prerelease[0]===0&&(w=!1);for(const I of h){if(v=v||I.operator===">"||I.operator===">=",_=_||I.operator==="<"||I.operator==="<=",y){if(S&&I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===S.major&&I.semver.minor===S.minor&&I.semver.patch===S.patch&&(S=!1),I.operator===">"||I.operator===">="){if(p=l(
867
867
  y,I,$),p===I&&p!==y)return!1}else if(y.operator===">="&&!n(y.semver,String(I),$))return!1}if(d){if(w&&I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===w.major&&I.semver.minor===w.minor&&I.semver.patch===w.patch&&(w=!1),I.operator==="<"||I.operator==="<="){if(m=u(d,I,$),m===I&&m!==d)return!1}else if(d.operator==="<="&&!n(d.semver,String(I),$))return!1}if(!I.operator&&(d||y)&&g!==0)return!1}return!(y&&_&&!d&&g!==0||d&&v&&!y&&g!==0||S||w)},l=(f,h,$)=>{if(!f)return h;const b=s(f.semver,
868
- h.semver,$);return b>0?f:b<0||h.operator===">"&&f.operator===">="?h:f},u=(f,h,$)=>{if(!f)return h;const b=s(f.semver,h.semver,$);return b<0?f:b>0||h.operator==="<"&&f.operator==="<="?h:f};return Qo=i,Qo}var Zo,$h;function x0(){if($h)return Zo;$h=1;const t=xr(),e=vs(),r=Le(),n=Pd(),s=or(),i=h0(),o=p0(),a=m0(),c=g0(),l=y0(),u=$0(),f=_0(),h=v0(),$=et(),b=b0(),y=w0(),d=Eo(),g=E0(),p=S0(),m=ws(),_=Co(),v=Yd(),w=Jd(),S=To(),I=Lo(),F=th(),B=R0(),D=Es(),M=tt(),j=Ss(),k=O0(),U=C0(),Y=P0(),G=I0(),J=N0(),se=Wo(),
868
+ h.semver,$);return b>0?f:b<0||h.operator===">"&&f.operator===">="?h:f},u=(f,h,$)=>{if(!f)return h;const b=s(f.semver,h.semver,$);return b<0?f:b>0||h.operator==="<"&&f.operator==="<="?h:f};return Qo=i,Qo}var Zo,_h;function x0(){if(_h)return Zo;_h=1;const t=xr(),e=vs(),r=Le(),n=Id(),s=or(),i=h0(),o=p0(),a=m0(),c=g0(),l=y0(),u=$0(),f=_0(),h=v0(),$=et(),b=b0(),y=w0(),d=Eo(),g=E0(),p=S0(),m=ws(),_=Co(),v=Xd(),w=Qd(),S=To(),I=Lo(),F=rh(),B=R0(),D=Es(),M=tt(),j=Ss(),k=O0(),U=C0(),Y=P0(),G=I0(),J=N0(),se=Wo(),
869
869
  H=T0(),A=j0(),V=L0(),x=D0(),E=k0();return Zo={parse:s,valid:i,clean:o,inc:a,diff:c,major:l,minor:u,patch:f,prerelease:h,compare:$,rcompare:b,compareLoose:y,compareBuild:d,sort:g,rsort:p,gt:m,lt:_,eq:v,neq:w,gte:S,lte:I,cmp:F,coerce:B,Comparator:D,Range:M,satisfies:j,toComparators:k,maxSatisfying:U,minSatisfying:Y,minVersion:G,validRange:J,outside:se,gtr:H,ltr:A,intersects:V,simplifyRange:x,subset:E,SemVer:r,re:t.re,src:t.src,tokens:t.t,SEMVER_SPEC_VERSION:e.SEMVER_SPEC_VERSION,RELEASE_TYPES:e.RELEASE_TYPES,
870
- compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},Zo}var ea=x0();const ar=Ur(ea),M0=Object.prototype.toString,q0="[object Uint8Array]",U0="[object ArrayBuffer]";function _h(t,e,r){return t?t.constructor===e?!0:M0.call(t)===r:!1}function vh(t){return _h(t,Uint8Array,q0)}function H0(t){return _h(t,ArrayBuffer,U0)}function F0(t){return vh(t)||H0(t)}function V0(t){if(!vh(t))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof t}\``)}function z0(t){if(!F0(t))throw new TypeError(
871
- `Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``)}function bh(t,e){if(t.length===0)return new Uint8Array(0);e??=t.reduce((s,i)=>s+i.length,0);const r=new Uint8Array(e);let n=0;for(const s of t)V0(s),r.set(s,n),n+=s.length;return r}const wh={utf8:new globalThis.TextDecoder("utf8")};function Eh(t,e="utf8"){return z0(t),wh[e]??=new globalThis.TextDecoder(e),wh[e].decode(t)}function G0(t){if(typeof t!="string")throw new TypeError(`Expected \`string\`, got \`${typeof t}\``)}const B0=new globalThis.
872
- TextEncoder;function ta(t){return G0(t),B0.encode(t)}Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));const W0=s0.default,Sh="aes-256-cbc",cr=()=>Object.create(null),K0=t=>t!=null,Y0=(t,e)=>{const r=new Set(["undefined","symbol","function"]),n=typeof e;if(r.has(n))throw new TypeError(`Setting a value of type \`${n}\` for key \`${t}\` is not allowed as it's not supported by JSON`)},Rs="__internal__",ra=`${Rs}.migrations.version`;class X0{path;events;#n;#t;#e;#r={};constructor(e={}){
870
+ compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},Zo}var ea=x0();const ar=Ur(ea),M0=Object.prototype.toString,q0="[object Uint8Array]",U0="[object ArrayBuffer]";function vh(t,e,r){return t?t.constructor===e?!0:M0.call(t)===r:!1}function bh(t){return vh(t,Uint8Array,q0)}function H0(t){return vh(t,ArrayBuffer,U0)}function F0(t){return bh(t)||H0(t)}function V0(t){if(!bh(t))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof t}\``)}function z0(t){if(!F0(t))throw new TypeError(
871
+ `Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``)}function wh(t,e){if(t.length===0)return new Uint8Array(0);e??=t.reduce((s,i)=>s+i.length,0);const r=new Uint8Array(e);let n=0;for(const s of t)V0(s),r.set(s,n),n+=s.length;return r}const Eh={utf8:new globalThis.TextDecoder("utf8")};function Sh(t,e="utf8"){return z0(t),Eh[e]??=new globalThis.TextDecoder(e),Eh[e].decode(t)}function G0(t){if(typeof t!="string")throw new TypeError(`Expected \`string\`, got \`${typeof t}\``)}const B0=new globalThis.
872
+ TextEncoder;function ta(t){return G0(t),B0.encode(t)}Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));const W0=s0.default,Rh="aes-256-cbc",cr=()=>Object.create(null),K0=t=>t!=null,Y0=(t,e)=>{const r=new Set(["undefined","symbol","function"]),n=typeof e;if(r.has(n))throw new TypeError(`Setting a value of type \`${n}\` for key \`${t}\` is not allowed as it's not supported by JSON`)},Rs="__internal__",ra=`${Rs}.migrations.version`;class X0{path;events;#n;#t;#e;#r={};constructor(e={}){
873
873
  const r={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...e};if(!r.cwd){if(!r.projectName)throw new Error("Please specify the `projectName` option.");r.cwd=uy(r.projectName,{suffix:r.projectSuffix}).config}if(this.#e=r,r.schema??r.ajvOptions??r.rootSchema){if(r.schema&&typeof r.schema!="object")throw new TypeError("The `schema` option must be an object.");const o=new K$.Ajv2020({allErrors:!0,useDefaults:!0,
874
874
  ...r.ajvOptions});W0(o);const a={...r.rootSchema,type:"object",properties:r.schema};this.#n=o.compile(a);for(const[c,l]of Object.entries(r.schema??{}))l?.default&&(this.#r[c]=l.default)}r.defaults&&(this.#r={...this.#r,...r.defaults}),r.serialize&&(this._serialize=r.serialize),r.deserialize&&(this._deserialize=r.deserialize),this.events=new EventTarget,this.#t=r.encryptionKey;const n=r.fileExtension?`.${r.fileExtension}`:"";this.path=me.resolve(r.cwd,`${r.configName??"config"}${n}`);const s=this.
875
- store,i=Object.assign(cr(),r.defaults,s);if(r.migrations){if(!r.projectVersion)throw new Error("Please specify the `projectVersion` option.");this._migrate(r.migrations,r.projectVersion,r.beforeEachMigration)}this._validate(i);try{Ep.deepEqual(s,i)}catch{this.store=i}r.watch&&this._watch()}get(e,r){if(this.#e.accessPropertiesByDotNotation)return this._get(e,r);const{store:n}=this;return e in n?n[e]:r}set(e,r){if(typeof e!="string"&&typeof e!="object")throw new TypeError(`Expected \`key\` to be of \
876
- type \`string\` or \`object\`, got ${typeof e}`);if(typeof e!="object"&&r===void 0)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw new TypeError(`Please don't use the ${Rs} key, as it's used to manage this module internal operations.`);const{store:n}=this,s=(i,o)=>{Y0(i,o),this.#e.accessPropertiesByDotNotation?ou(n,i,o):n[i]=o};if(typeof e=="object"){const i=e;for(const[o,a]of Object.entries(i))s(o,a)}else s(e,r);this.store=n}has(e){return this.#e.accessPropertiesByDotNotation?
875
+ store,i=Object.assign(cr(),r.defaults,s);if(r.migrations){if(!r.projectVersion)throw new Error("Please specify the `projectVersion` option.");this._migrate(r.migrations,r.projectVersion,r.beforeEachMigration)}this._validate(i);try{Sp.deepEqual(s,i)}catch{this.store=i}r.watch&&this._watch()}get(e,r){if(this.#e.accessPropertiesByDotNotation)return this._get(e,r);const{store:n}=this;return e in n?n[e]:r}set(e,r){if(typeof e!="string"&&typeof e!="object")throw new TypeError(`Expected \`key\` to be of \
876
+ type \`string\` or \`object\`, got ${typeof e}`);if(typeof e!="object"&&r===void 0)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw new TypeError(`Please don't use the ${Rs} key, as it's used to manage this module internal operations.`);const{store:n}=this,s=(i,o)=>{Y0(i,o),this.#e.accessPropertiesByDotNotation?au(n,i,o):n[i]=o};if(typeof e=="object"){const i=e;for(const[o,a]of Object.entries(i))s(o,a)}else s(e,r);this.store=n}has(e){return this.#e.accessPropertiesByDotNotation?
877
877
  iy(this.store,e):e in this.store}reset(...e){for(const r of e)K0(this.#r[r])&&this.set(r,this.#r[r])}delete(e){const{store:r}=this;this.#e.accessPropertiesByDotNotation?sy(r,e):delete r[e],this.store=r}clear(){this.store=cr();for(const e of Object.keys(this.#r))this.reset(e)}onDidChange(e,r){if(typeof e!="string")throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof e}`);if(typeof r!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof r}`);
878
878
  return this._handleChange(()=>this.get(e),r)}onDidAnyChange(e){if(typeof e!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof e}`);return this._handleChange(()=>this.store,e)}get size(){return Object.keys(this.store).length}get store(){try{const e=he.readFileSync(this.path,this.#t?null:"utf8"),r=this._encryptData(e),n=this._deserialize(r);return this._validate(n),Object.assign(cr(),n)}catch(e){if(e?.code==="ENOENT")return this._ensureDirectory(),cr();
879
- if(this.#e.clearInvalidConfig&&e.name==="SyntaxError")return cr();throw e}}set store(e){this._ensureDirectory(),this._validate(e),this._write(e),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(const[e,r]of Object.entries(this.store))yield[e,r]}_encryptData(e){if(!this.#t)return typeof e=="string"?e:Eh(e);try{const r=e.slice(0,16),n=mr.pbkdf2Sync(this.#t,r.toString(),1e4,32,"sha512"),s=mr.createDecipheriv(Sh,n,r),i=e.slice(17),o=typeof i=="string"?ta(i):i;return Eh(bh([s.update(
880
- o),s.final()]))}catch{}return e.toString()}_handleChange(e,r){let n=e();const s=()=>{const i=n,o=e();wp(o,i)||(n=o,r.call(this,o,i))};return this.events.addEventListener("change",s),()=>{this.events.removeEventListener("change",s)}}_deserialize=e=>JSON.parse(e);_serialize=e=>JSON.stringify(e,void 0," ");_validate(e){if(!this.#n||this.#n(e)||!this.#n.errors)return;const n=this.#n.errors.map(({instancePath:s,message:i=""})=>`\`${s.slice(1)}\` ${i}`);throw new Error("Config schema violation: "+n.join(
881
- "; "))}_ensureDirectory(){he.mkdirSync(me.dirname(this.path),{recursive:!0})}_write(e){let r=this._serialize(e);if(this.#t){const n=mr.randomBytes(16),s=mr.pbkdf2Sync(this.#t,n.toString(),1e4,32,"sha512"),i=mr.createCipheriv(Sh,s,n);r=bh([n,ta(":"),i.update(ta(r)),i.final()])}if(Se.env.SNAP)he.writeFileSync(this.path,r,{mode:this.#e.configFileMode});else try{fu(this.path,r,{mode:this.#e.configFileMode})}catch(n){if(n?.code==="EXDEV"){he.writeFileSync(this.path,r,{mode:this.#e.configFileMode});return}
882
- throw n}}_watch(){this._ensureDirectory(),he.existsSync(this.path)||this._write(cr()),Se.platform==="win32"?he.watch(this.path,{persistent:!1},Ed(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100})):he.watchFile(this.path,{persistent:!1},Ed(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5e3}))}_migrate(e,r,n){let s=this._get(ra,"0.0.0");const i=Object.keys(e).filter(a=>this._shouldPerformMigration(a,s,r));let o={...this.store};for(const a of i)try{n&&n(this,{fromVersion:s,
879
+ if(this.#e.clearInvalidConfig&&e.name==="SyntaxError")return cr();throw e}}set store(e){this._ensureDirectory(),this._validate(e),this._write(e),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(const[e,r]of Object.entries(this.store))yield[e,r]}_encryptData(e){if(!this.#t)return typeof e=="string"?e:Sh(e);try{const r=e.slice(0,16),n=mr.pbkdf2Sync(this.#t,r.toString(),1e4,32,"sha512"),s=mr.createDecipheriv(Rh,n,r),i=e.slice(17),o=typeof i=="string"?ta(i):i;return Sh(wh([s.update(
880
+ o),s.final()]))}catch{}return e.toString()}_handleChange(e,r){let n=e();const s=()=>{const i=n,o=e();Ep(o,i)||(n=o,r.call(this,o,i))};return this.events.addEventListener("change",s),()=>{this.events.removeEventListener("change",s)}}_deserialize=e=>JSON.parse(e);_serialize=e=>JSON.stringify(e,void 0," ");_validate(e){if(!this.#n||this.#n(e)||!this.#n.errors)return;const n=this.#n.errors.map(({instancePath:s,message:i=""})=>`\`${s.slice(1)}\` ${i}`);throw new Error("Config schema violation: "+n.join(
881
+ "; "))}_ensureDirectory(){he.mkdirSync(me.dirname(this.path),{recursive:!0})}_write(e){let r=this._serialize(e);if(this.#t){const n=mr.randomBytes(16),s=mr.pbkdf2Sync(this.#t,n.toString(),1e4,32,"sha512"),i=mr.createCipheriv(Rh,s,n);r=wh([n,ta(":"),i.update(ta(r)),i.final()])}if(Se.env.SNAP)he.writeFileSync(this.path,r,{mode:this.#e.configFileMode});else try{du(this.path,r,{mode:this.#e.configFileMode})}catch(n){if(n?.code==="EXDEV"){he.writeFileSync(this.path,r,{mode:this.#e.configFileMode});return}
882
+ throw n}}_watch(){this._ensureDirectory(),he.existsSync(this.path)||this._write(cr()),Se.platform==="win32"?he.watch(this.path,{persistent:!1},Sd(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100})):he.watchFile(this.path,{persistent:!1},Sd(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5e3}))}_migrate(e,r,n){let s=this._get(ra,"0.0.0");const i=Object.keys(e).filter(a=>this._shouldPerformMigration(a,s,r));let o={...this.store};for(const a of i)try{n&&n(this,{fromVersion:s,
883
883
  toVersion:a,finalVersion:r,versions:i});const c=e[a];c?.(this),this._set(ra,a),s=a,o={...this.store}}catch(c){throw this.store=o,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${c}`)}(this._isVersionInRangeFormat(s)||!ar.eq(s,r))&&this._set(ra,r)}_containsReservedKey(e){return typeof e=="object"&&Object.keys(e)[0]===Rs?!0:typeof e!="string"?!1:this.#e.accessPropertiesByDotNotation?!!e.startsWith(`${Rs}.`):!1}_isVersionInRangeFormat(e){
884
- return ar.clean(e)===null}_shouldPerformMigration(e,r,n){return this._isVersionInRangeFormat(e)?r!=="0.0.0"&&ar.satisfies(r,e)?!1:ar.satisfies(n,e):!(ar.lte(e,r)||ar.gt(e,n))}_get(e,r){return ny(this.store,e,r)}_set(e,r){const{store:n}=this;ou(n,e,r),this.store=n}}class Rh extends Error{response;request;options;constructor(e,r,n){const s=e.status||e.status===0?e.status:"",i=e.statusText||"",o=`${s} ${i}`.trim(),a=o?`status code ${o}`:"an unknown error";super(`Request failed with ${a}: ${r.method}\
885
- ${r.url}`),this.name="HTTPError",this.response=e,this.request=r,this.options=n}}class Ah extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}}const Oh=(()=>{let t=!1,e=!1;const r=typeof globalThis.ReadableStream=="function",n=typeof globalThis.Request=="function";if(r&&n)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Co\
886
- ntent-Type")}catch(s){if(s instanceof Error&&s.message==="unsupported BodyInit type")return!1;throw s}return t&&!e})(),J0=typeof globalThis.AbortController=="function",Q0=typeof globalThis.ReadableStream=="function",Z0=typeof globalThis.FormData=="function",Ch=["get","post","put","patch","head","delete"],e_={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},na=2147483647,t_=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,
887
- Ph=Symbol("stop"),r_={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},n_={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},s_=t=>{if(!t)return 0;if(t instanceof FormData){let e=0;for(const[r,n]of t)e+=t_,e+=new TextEncoder().encode(`Content-Dis\
884
+ return ar.clean(e)===null}_shouldPerformMigration(e,r,n){return this._isVersionInRangeFormat(e)?r!=="0.0.0"&&ar.satisfies(r,e)?!1:ar.satisfies(n,e):!(ar.lte(e,r)||ar.gt(e,n))}_get(e,r){return ny(this.store,e,r)}_set(e,r){const{store:n}=this;au(n,e,r),this.store=n}}class Ah extends Error{response;request;options;constructor(e,r,n){const s=e.status||e.status===0?e.status:"",i=e.statusText||"",o=`${s} ${i}`.trim(),a=o?`status code ${o}`:"an unknown error";super(`Request failed with ${a}: ${r.method}\
885
+ ${r.url}`),this.name="HTTPError",this.response=e,this.request=r,this.options=n}}class Oh extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}}const Ch=(()=>{let t=!1,e=!1;const r=typeof globalThis.ReadableStream=="function",n=typeof globalThis.Request=="function";if(r&&n)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Co\
886
+ ntent-Type")}catch(s){if(s instanceof Error&&s.message==="unsupported BodyInit type")return!1;throw s}return t&&!e})(),J0=typeof globalThis.AbortController=="function",Q0=typeof globalThis.ReadableStream=="function",Z0=typeof globalThis.FormData=="function",Ph=["get","post","put","patch","head","delete"],e_={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},na=2147483647,t_=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,
887
+ Ih=Symbol("stop"),r_={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},n_={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},s_=t=>{if(!t)return 0;if(t instanceof FormData){let e=0;for(const[r,n]of t)e+=t_,e+=new TextEncoder().encode(`Content-Dis\
888
888
  position: form-data; name="${r}"`).length,e+=typeof n=="string"?new TextEncoder().encode(n).length:n.size;return e}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength;if(typeof t=="string")return new TextEncoder().encode(t).length;if(t instanceof URLSearchParams)return new TextEncoder().encode(t.toString()).length;if("byteLength"in t)return t.byteLength;if(typeof t=="object"&&t!==null)try{const e=JSON.stringify(t);return new TextEncoder().encode(e).length}catch{return 0}
889
889
  return 0},i_=(t,e)=>{const r=Number(t.headers.get("content-length"))||0;let n=0;return t.status===204?(e&&e({percent:1,totalBytes:r,transferredBytes:n},new Uint8Array),new Response(null,{status:t.status,statusText:t.statusText,headers:t.headers})):new Response(new ReadableStream({async start(s){const i=t.body.getReader();e&&e({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array);async function o(){const{done:a,value:c}=await i.read();if(a){s.close();return}if(e){n+=c.byteLength;const l=r===
890
890
  0?0:n/r;e({percent:l,transferredBytes:n,totalBytes:r},c)}s.enqueue(c),await o()}await o()}}),{status:t.status,statusText:t.statusText,headers:t.headers})},o_=(t,e)=>{const r=s_(t.body);let n=0;return new Request(t,{duplex:"half",body:new ReadableStream({async start(s){const i=t.body instanceof ReadableStream?t.body.getReader():new Response("").body.getReader();async function o(){const{done:a,value:c}=await i.read();if(a){e&&e({percent:1,transferredBytes:n,totalBytes:Math.max(r,n)},new Uint8Array),
891
- s.close();return}n+=c.byteLength;let l=r===0?0:n/r;(r<n||l===1)&&(l=.99),e&&e({percent:Number(l.toFixed(2)),transferredBytes:n,totalBytes:r},c),s.enqueue(c),await o()}await o()}})})},Mr=t=>t!==null&&typeof t=="object",As=(...t)=>{for(const e of t)if((!Mr(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return sa({},...t)},Ih=(t={},e={})=>{const r=new globalThis.Headers(t),n=e instanceof globalThis.Headers,s=new globalThis.Headers(e);for(const[i,o]of s.
892
- entries())n&&o==="undefined"||o===void 0?r.delete(i):r.set(i,o);return r};function Os(t,e,r){return Object.hasOwn(e,r)&&e[r]===void 0?[]:sa(t[r]??[],e[r]??[])}const Nh=(t={},e={})=>({beforeRequest:Os(t,e,"beforeRequest"),beforeRetry:Os(t,e,"beforeRetry"),afterResponse:Os(t,e,"afterResponse"),beforeError:Os(t,e,"beforeError")}),sa=(...t)=>{let e={},r={},n={};for(const s of t)if(Array.isArray(s))Array.isArray(e)||(e=[]),e=[...e,...s];else if(Mr(s)){for(let[i,o]of Object.entries(s))Mr(o)&&i in e&&(o=
893
- sa(e[i],o)),e={...e,[i]:o};Mr(s.hooks)&&(n=Nh(n,s.hooks),e.hooks=n),Mr(s.headers)&&(r=Ih(r,s.headers),e.headers=r)}return e},a_=t=>Ch.includes(t)?t.toUpperCase():t,c_=["get","put","head","delete","options","trace"],u_=[408,413,429,500,502,503,504],l_=[413,429,503],Th={limit:2,methods:c_,statusCodes:u_,afterStatusCodes:l_,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},f_=(t={})=>{if(typeof t=="number")return{...Th,limit:t};if(t.methods&&!Array.
894
- isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...Th,...t}};async function d_(t,e,r,n){return new Promise((s,i)=>{const o=setTimeout(()=>{r&&r.abort(),i(new Ah(t))},n.timeout);n.fetch(t,e).then(s).catch(i).then(()=>{clearTimeout(o)})})}async function h_(t,{signal:e}){return new Promise((r,n)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",s,{once:!0}));function s(){
891
+ s.close();return}n+=c.byteLength;let l=r===0?0:n/r;(r<n||l===1)&&(l=.99),e&&e({percent:Number(l.toFixed(2)),transferredBytes:n,totalBytes:r},c),s.enqueue(c),await o()}await o()}})})},Mr=t=>t!==null&&typeof t=="object",As=(...t)=>{for(const e of t)if((!Mr(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return sa({},...t)},Nh=(t={},e={})=>{const r=new globalThis.Headers(t),n=e instanceof globalThis.Headers,s=new globalThis.Headers(e);for(const[i,o]of s.
892
+ entries())n&&o==="undefined"||o===void 0?r.delete(i):r.set(i,o);return r};function Os(t,e,r){return Object.hasOwn(e,r)&&e[r]===void 0?[]:sa(t[r]??[],e[r]??[])}const Th=(t={},e={})=>({beforeRequest:Os(t,e,"beforeRequest"),beforeRetry:Os(t,e,"beforeRetry"),afterResponse:Os(t,e,"afterResponse"),beforeError:Os(t,e,"beforeError")}),sa=(...t)=>{let e={},r={},n={};for(const s of t)if(Array.isArray(s))Array.isArray(e)||(e=[]),e=[...e,...s];else if(Mr(s)){for(let[i,o]of Object.entries(s))Mr(o)&&i in e&&(o=
893
+ sa(e[i],o)),e={...e,[i]:o};Mr(s.hooks)&&(n=Th(n,s.hooks),e.hooks=n),Mr(s.headers)&&(r=Nh(r,s.headers),e.headers=r)}return e},a_=t=>Ph.includes(t)?t.toUpperCase():t,c_=["get","put","head","delete","options","trace"],u_=[408,413,429,500,502,503,504],l_=[413,429,503],jh={limit:2,methods:c_,statusCodes:u_,afterStatusCodes:l_,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},f_=(t={})=>{if(typeof t=="number")return{...jh,limit:t};if(t.methods&&!Array.
894
+ isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...jh,...t}};async function d_(t,e,r,n){return new Promise((s,i)=>{const o=setTimeout(()=>{r&&r.abort(),i(new Oh(t))},n.timeout);n.fetch(t,e).then(s).catch(i).then(()=>{clearTimeout(o)})})}async function h_(t,{signal:e}){return new Promise((r,n)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",s,{once:!0}));function s(){
895
895
  clearTimeout(i),n(e.reason)}const i=setTimeout(()=>{e?.removeEventListener("abort",s),r()},t)})}const p_=(t,e)=>{const r={};for(const n in e)!(n in n_)&&!(n in r_)&&!(n in t)&&(r[n]=e[n]);return r};class Cs{static create(e,r){const n=new Cs(e,r),s=async()=>{if(typeof n._options.timeout=="number"&&n._options.timeout>na)throw new RangeError(`The \`timeout\` option cannot be greater than ${na}`);await Promise.resolve();let a=await n._fetch();for(const c of n._options.hooks.afterResponse){const l=await c(
896
- n.request,n._options,n._decorateResponse(a.clone()));l instanceof globalThis.Response&&(a=l)}if(n._decorateResponse(a),!a.ok&&n._options.throwHttpErrors){let c=new Rh(a,n.request,n._options);for(const l of n._options.hooks.beforeError)c=await l(c);throw c}if(n._options.onDownloadProgress){if(typeof n._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!Q0)throw new Error("Streams are not supported in your environment. `ReadableStre\
896
+ n.request,n._options,n._decorateResponse(a.clone()));l instanceof globalThis.Response&&(a=l)}if(n._decorateResponse(a),!a.ok&&n._options.throwHttpErrors){let c=new Ah(a,n.request,n._options);for(const l of n._options.hooks.beforeError)c=await l(c);throw c}if(n._options.onDownloadProgress){if(typeof n._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!Q0)throw new Error("Streams are not supported in your environment. `ReadableStre\
897
897
  am` is missing.");return i_(a.clone(),n._options.onDownloadProgress)}return a},o=(n._options.retry.methods.includes(n.request.method.toLowerCase())?n._retry(s):s()).finally(async()=>{n.request.bodyUsed||await n.request.body?.cancel()});for(const[a,c]of Object.entries(e_))o[a]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||c);const l=await o;if(a==="json"){if(l.status===204||(await l.clone().arrayBuffer()).byteLength===0)return"";if(r.parseJson)return r.parseJson(await l.
898
- text())}return l[a]()};return o}request;abortController;_retryCount=0;_input;_options;constructor(e,r={}){if(this._input=e,this._options={...r,headers:Ih(this._input.headers,r.headers),hooks:Nh({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:a_(r.method??this._input.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:f_(r.retry),throwHttpErrors:r.throwHttpErrors!==!1,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!=
898
+ text())}return l[a]()};return o}request;abortController;_retryCount=0;_input;_options;constructor(e,r={}){if(this._input=e,this._options={...r,headers:Nh(this._input.headers,r.headers),hooks:Th({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:a_(r.method??this._input.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:f_(r.retry),throwHttpErrors:r.throwHttpErrors!==!1,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!=
899
899
  "string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(J0){const n=this._options.signal??this._input.signal;this.abortController=
900
- new globalThis.AbortController,this._options.signal=n?AbortSignal.any([n,this.abortController.signal]):this.abortController.signal}if(Oh&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=this._options.stringifyJson?.(this._options.json)??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const s="\
900
+ new globalThis.AbortController,this._options.signal=n?AbortSignal.any([n,this.abortController.signal]):this.abortController.signal}if(Ch&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=this._options.stringifyJson?.(this._options.json)??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const s="\
901
901
  ?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),i=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,s);(Z0&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(i,{...this.request}),this.
902
- _options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Oh)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=o_(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof Ah)throw e;
903
- if(e instanceof Rh){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;const n=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(n&&this._options.retry.afterStatusCodes.includes(e.response.status)){let s=Number(n)*1e3;Number.isNaN(s)?s=Date.parse(n)-Date.now():s>=Date.parse("2024-01-01")&&(s-=Date.now());const i=this._options.retry.maxRetryAfter??s;return s<
902
+ _options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Ch)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=o_(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof Oh)throw e;
903
+ if(e instanceof Ah){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;const n=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(n&&this._options.retry.afterStatusCodes.includes(e.response.status)){let s=Number(n)*1e3;Number.isNaN(s)?s=Date.parse(n)-Date.now():s>=Date.parse("2024-01-01")&&(s-=Date.now());const i=this._options.retry.maxRetryAfter??s;return s<
904
904
  i?s:i}if(e.response.status===413)throw e}const r=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,r)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(r){const n=Math.min(this._calculateRetryDelay(r),na);if(this._retryCount<1)throw r;await h_(n,{signal:this._options.signal});for(const s of this._options.hooks.beforeRetry)if(await s({request:this.request,
905
- options:this._options,error:r,retryCount:this._retryCount})===Ph)return;return this._retry(e)}}async _fetch(){for(const n of this._options.hooks.beforeRequest){const s=await n(this.request,this._options);if(s instanceof Request){this.request=s;break}if(s instanceof Response)return s}const e=p_(this.request,this._options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,e):d_(r,e,this.abortController,this._options)}}const ia=t=>{const e=(r,n)=>Cs.create(
906
- r,As(t,n));for(const r of Ch)e[r]=(n,s)=>Cs.create(n,As(t,s,{method:r}));return e.create=r=>ia(As(r)),e.extend=r=>(typeof r=="function"&&(r=r(t??{})),ia(As(t,r))),e.stop=Ph,e},m_=ia(),oa=new X0({projectName:zh,serialize:t=>Bt.stringify(t,null,2),deserialize:t=>Bt.parse(t)}),g_=1e3*60*60*24,jh="check-update";function y_(){if(kp||Wr===jh)return;const t=oa.get("lastUpdateCheck"),e=oa.get("latestVersion");if(Gh(e)||Bh(t)||t+g_<Date.now())try{fa("likec4",["check-update"],{stdio:"ignore",preferLocal:!0,
907
- detached:!0,env:{NODE_ENV:jh}}).catch(()=>{})}catch{}e&&ea.gt(e,Wt)&&Ot(["Update available: ",K.dim(Wt),K.reset(" \u2192 "),K.green(e)].join(""))}async function $_(){try{const t=await __();Gr(t,"No version found in latest npm"),oa.set({lastUpdateCheck:Date.now(),latestVersion:t}),ea.gt(t,Wt)?Ot(["Update available: ",K.dim(Wt),K.reset(" \u2192 "),K.green(t)].join("")):Ot(K.dim("Up to date: ")+" "+K.green(Wt))}catch(t){at.error(Hr(t))}}async function __(){return(await m_("https://registry.npmjs.or\
905
+ options:this._options,error:r,retryCount:this._retryCount})===Ih)return;return this._retry(e)}}async _fetch(){for(const n of this._options.hooks.beforeRequest){const s=await n(this.request,this._options);if(s instanceof Request){this.request=s;break}if(s instanceof Response)return s}const e=p_(this.request,this._options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,e):d_(r,e,this.abortController,this._options)}}const ia=t=>{const e=(r,n)=>Cs.create(
906
+ r,As(t,n));for(const r of Ph)e[r]=(n,s)=>Cs.create(n,As(t,s,{method:r}));return e.create=r=>ia(As(r)),e.extend=r=>(typeof r=="function"&&(r=r(t??{})),ia(As(t,r))),e.stop=Ih,e},m_=ia(),oa=new X0({projectName:Gh,serialize:t=>Bt.stringify(t,null,2),deserialize:t=>Bt.parse(t)}),g_=1e3*60*60*24,Lh="check-update";function y_(){if(xp||Wr===Lh)return;const t=oa.get("lastUpdateCheck"),e=oa.get("latestVersion");if(Bh(e)||Wh(t)||t+g_<Date.now())try{fa("likec4",["check-update"],{stdio:"ignore",preferLocal:!0,
907
+ detached:!0,env:{NODE_ENV:Lh}}).catch(()=>{})}catch{}e&&ea.gt(e,Wt)&&Ot(["Update available: ",K.dim(Wt),K.reset(" \u2192 "),K.green(e)].join(""))}async function $_(){try{const t=await __();Gr(t,"No version found in latest npm"),oa.set({lastUpdateCheck:Date.now(),latestVersion:t}),ea.gt(t,Wt)?Ot(["Update available: ",K.dim(Wt),K.reset(" \u2192 "),K.green(t)].join("")):Ot(K.dim("Up to date: ")+" "+K.green(Wt))}catch(t){at.error(Hr(t))}}async function __(){return(await m_("https://registry.npmjs.or\
908
908
  g/likec4/latest",{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},keepalive:!0}).json()).version}async function v_(t,e,r){const n=".ts";e=e??ge(t.workspace,"likec4.generated"+n),dr(e)!==n&&(e=e+n),await ct(Pt(e),{recursive:!0});const s=await t.diagrams(),i=Pg([...s]);await It(e,i),r.info(`${K.dim("generated")} ${gt(process.cwd(),e)}`)}async function b_(t,e,r){await ct(e,{recursive:!0}),r.info(`${K.dim("format")} ${K.green("dot")}`),r.info(`${K.dim("out\
909
909
  dir")} ${e}`);const n=new Set,s=t.computedModel(),i=ua(s.$data.views);let o=0;for(const a of i)try{const c=await t.viewsService.layouter.dot({view:a,specification:s.specification});let l=a.relativePath??".";l.includes("/")?l=l.slice(0,l.lastIndexOf("/")):l=".",l!==""&&!n.has(l)&&(await ct(ge(e,l),{recursive:!0}),n.add(l));const u=ge(e,l,a.id+".dot");await It(u,c),r.info(`${K.dim("generated")} ${gt(process.cwd(),u)}`),o++}catch(c){at.error(`error while generating ${a.id}`,{error:c})}o>0&&r.info(`${K.
910
- dim("total")} ${o} files`)}async function w_(t,e,r,n){await ct(r,{recursive:!0}),n.info(`${K.dim("format")} ${K.green(e)}`),n.info(`${K.dim("outdir")} ${r}`);let s,i;switch(e){case"d2":s=".d2",i=pp;break;case"mermaid":s=".mmd",i=hp;break;case"plantuml":s=".puml",i=dp;break;default:Aa(e)}const o=new Set,a=await t.layoutedModel();let c=0;for(const l of a.views()){const u=l.$view;try{let f=u.relativePath??".";f.includes("/")?f=f.slice(0,f.lastIndexOf("/")):f=".",f!==""&&!o.has(f)&&(await ct(ge(r,f),
910
+ dim("total")} ${o} files`)}async function w_(t,e,r,n){await ct(r,{recursive:!0}),n.info(`${K.dim("format")} ${K.green(e)}`),n.info(`${K.dim("outdir")} ${r}`);let s,i;switch(e){case"d2":s=".d2",i=mp;break;case"mermaid":s=".mmd",i=pp;break;case"plantuml":s=".puml",i=hp;break;default:Aa(e)}const o=new Set,a=await t.layoutedModel();let c=0;for(const l of a.views()){const u=l.$view;try{let f=u.relativePath??".";f.includes("/")?f=f.slice(0,f.lastIndexOf("/")):f=".",f!==""&&!o.has(f)&&(await ct(ge(r,f),
911
911
  {recursive:!0}),o.add(f));const h=ge(r,f,u.id+s),$=i(l);await It(h,$),n.info(`${K.dim("generated")} ${gt(process.cwd(),h)}`),c++}catch(f){n.error(`error while generating ${u.id}`,{error:f})}}c>0&&n.info(`${K.dim("total")} ${c} files`)}async function qr({path:t,useDotBin:e,...r}){const n=He("c4:codegen"),s=lr(n),i=await rt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});if(i.ensureSingleProject(),(await i.viewsService.computedViews()).length===0)throw n.warn("no views found"),process.
912
912
  exitCode=1,new Error("no views found");switch(r.format){case"views":{await v_(i,r.outfile,n);break}case"dot":{await b_(i,r.outdir??t,n);break}case"d2":case"mermaid":case"plantuml":{await w_(i,r.format,r.outdir??t,n);break}default:Aa(r)}s.stopAndLog()}async function E_({path:t,useDotBin:e,outfile:r}){const n=He("c4:codegen"),s=lr(n),i=await rt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});i.ensureSingleProject(),n.info(`${K.dim("format")} ${K.green("model")}`);const o=await i.layoutedModel();
913
913
  for(const f of o.views())f.$view.hasLayoutDrift&&n.warn(K.yellow("drift detected, manual layout can not be applied, view:")+" "+K.red(f.id));let a=ge(i.workspace,"likec4-model.ts");if(r&&(a=Ds(r)?r:ge(r),Ct(r)&&(await ks(r)).isDirectory()))throw new Error(`output file is a directory: ${r}`);const c=Fr(a);n.info(`${K.dim("filename")} ${c}`);const l=dr(c).toLocaleLowerCase();if(![".ts",".mts",".cts"].includes(l))throw n.error(`output file ${r} has extension "${l}"`),new Error(`output file ${r} mus\
@@ -929,7 +929,7 @@ diagrams();if(o.length===0)throw process.exitCode=1,new Error("no views found");
929
929
  ${K.underline("https://likec4.dev/tooling/code-generation/react/")}
930
930
  `),{padding:2,borderColor:"green",borderStyle:"round"}),s.stopAndLog()}async function A_({path:t,useDotBin:e,webcomponentPrefix:r="likec4",outfile:n}){await Ir();const s=He("c4:codegen"),i=lr(s),o=await rt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});o.ensureSingleProject(),s.info(`${K.dim("format")} ${K.green("webcomponent")}`);const a=await o.diagrams();if(!ma(a,1))throw s.warn("no views found"),process.exitCode=1,new Error("no views found");a.forEach(b=>{b.hasLayoutDrift&&s.warn(
931
931
  K.yellow("drift detected, manual layout can not be applied, view:")+" "+K.red(b.id))});let c=ge(o.workspace,"likec4-views.js");if(n&&(c=Ds(n)?n:ge(n),Ct(n)&&(await ks(n)).isDirectory()))throw new Error(`output file is a directory: ${n}`);At.debug(`${K.dim("outfilepath")} ${c}`);const l=Fr(c);At.debug(`${K.dim("filename")} ${l}`);const u=dr(l).toLocaleLowerCase();if(u!==".js"&&u!==".mjs")throw At.warn(`output file ${n} has extension "${u}"`),new Error(`output file ${n} must be a .js or .mjs`);const f=await li();
932
- At.debug(`${K.dim("created temp public")} ${f}`);const h=await ji({languageServices:o,outDir:f,filename:l,webcomponentPrefix:r,base:"/"});At.debug(`${K.dim("vite build webcomponent")}`),await pr({...h,logLevel:"warn"});const $=ge(f,l);if(!Ct($))throw new Error(`output file not found: ${$}`);await ct(Pt(c),{recursive:!0}),await up($,c),s.info(`${K.dim("generated")} ${c}`),At.debug(`${K.dim("remove temp public")}`),await lp(f,{recursive:!0,force:!0}),Ot(Ps(`
932
+ At.debug(`${K.dim("created temp public")} ${f}`);const h=await ji({languageServices:o,outDir:f,filename:l,webcomponentPrefix:r,base:"/"});At.debug(`${K.dim("vite build webcomponent")}`),await pr({...h,logLevel:"warn"});const $=ge(f,l);if(!Ct($))throw new Error(`output file not found: ${$}`);await ct(Pt(c),{recursive:!0}),await lp($,c),s.info(`${K.dim("generated")} ${c}`),At.debug(`${K.dim("remove temp public")}`),await fp(f,{recursive:!0,force:!0}),Ot(Ps(`
933
933
  ${K.dim("Webcomponents generated to:")}
934
934
  ${gt(Ns(),c)}
935
935
 
@@ -961,19 +961,20 @@ see Playwright docs`,default:!1}}).epilog(`${K.bold("Examples:")}
961
961
 
962
962
  ${K.green('$0 export png -f "team1*" -f "team2*" --flat -o ./png src/likec4')}
963
963
  ${K.gray("Export views matching team1* or team2* only")}
964
- `),handler:async e=>{Gr(e.timeout>=1,"timeout must be >= 1"),Gr(e["max-attempts"]>=1,"max-attempts must be >= 1"),await Ir(),await ru({path:e.path,useDotBin:e.useDotBin,output:e.output,timeoutMs:e.timeout*1e3,maxAttempts:e.maxAttempts,ignore:e.ignore===!0,outputType:e.flat?"flat":"relative",serverUrl:e.serverUrl,theme:e.theme??"light",filter:e.filter,chromiumSandbox:e["chromium-sandbox"]})}}).command({command:"json [path]",describe:"export model to JSON",builder:e=>e.option("outfile",{alias:"o",
964
+ `),handler:async e=>{Gr(e.timeout>=1,"timeout must be >= 1"),Gr(e["max-attempts"]>=1,"max-attempts must be >= 1"),await Ir(),await nu({path:e.path,useDotBin:e.useDotBin,output:e.output,timeoutMs:e.timeout*1e3,maxAttempts:e.maxAttempts,ignore:e.ignore===!0,outputType:e.flat?"flat":"relative",serverUrl:e.serverUrl,theme:e.theme??"light",filter:e.filter,chromiumSandbox:e["chromium-sandbox"]})}}).command({command:"json [path]",describe:"export model to JSON",builder:e=>e.option("outfile",{alias:"o",
965
965
  type:"string",desc:"<file> output .json file",default:"likec4.json",normalize:!0,coerce:ge}).option("use-dot",We).epilog(`${K.bold("Examples:")}
966
966
  ${K.green("$0 export json")}
967
967
  ${K.gray("Search for likec4 files in current directory and output JSON to likec4.json")}
968
968
 
969
969
  ${K.green("$0 export json -o ./generated/likec4.json src/likec4 ")}
970
970
  ${K.gray("Search for likec4 files in src/likec4 and output JSON to generated/likec4.json")}
971
- `),handler:async e=>{await C_({path:e.path,useDotBin:e.useDotBin,outfile:e.outfile})}}).updateStrings({"Commands:":K.bold("Formats:")}),handler:()=>{}};async function I_(t){const{isDev:e,...r}=await Ti({...t,likec4AssetsDir:"",webcomponentPrefix:void 0}),n=await ki({port:hn(62001,62010)}),s=t?.open??!1;return await gp({...r,mode:"production",preview:{host:t.listen??"127.0.0.1",allowedHosts:!0,port:n,open:s}})}async function N_({path:t,output:e,base:r,listen:n}){const s=await rt.fromWorkspace(t,{
972
- logger:"vite"}),i=await I_({base:r,languageServices:s,outputDir:e,open:!ut(),listen:n});Xc(i)}const T_={command:"preview [path]",describe:"Start local server to preview production build",builder:t=>t.positional("path",{type:"string",desc:`Directory with LikeC4 source files
971
+ `),handler:async e=>{await C_({path:e.path,useDotBin:e.useDotBin,outfile:e.outfile})}}).updateStrings({"Commands:":K.bold("Formats:")}),handler:()=>{}};async function I_(t){const{isDev:e,...r}=await Ti({...t,likec4AssetsDir:"",webcomponentPrefix:void 0}),n=await ki({port:hn(62001,62010)}),s=t?.open??!1;return await yp({...r,mode:"production",preview:{host:t.listen??"127.0.0.1",allowedHosts:!0,port:n,open:s}})}async function N_({path:t,output:e,base:r,listen:n}){const s=await rt.fromWorkspace(t,{
972
+ logger:"vite"}),i=await I_({base:r,languageServices:s,outputDir:e,open:!ut(),listen:n});Jc(i)}const T_={command:"preview [path]",describe:"Start local server to preview production build",builder:t=>t.positional("path",{type:"string",desc:`Directory with LikeC4 source files
973
973
  if not specified search in current directory`,normalize:!0}).options({output:{alias:"o",type:"string",desc:"output directory from production build",normalize:!0},base:{type:"string",desc:"base url the app is being served from"},listen:{alias:"l",type:"string",desc:"ip address of the network interface to listen on"}}).coerce(["path","output"],Fe).default("path",Fe("."),".").default("listen","127.0.0.1","localhost"),async handler(t){await N_(t)}};async function j_({path:t,useDotBin:e,webcomponentPrefix:r,
974
- useHashHistory:n,useOverview:s=!1,base:i,listen:o}){process.env.NODE_ENV="development";const a=await rt.fromWorkspace(t,{graphviz:e?"binary":"wasm"}),c=await Vr(fr(zr(),".likec4-assets-")),l=await eu({buildWebcomponent:!0,hmr:!0,base:i,webcomponentPrefix:r,languageServices:a,useHashHistory:n,useOverviewGraph:s,likec4AssetsDir:c,listen:o});if(l.config.logger.clearScreen("info"),Xc(l),!s)return;const u=await a.diagrams();if(ma(u,1)){const f=He("c4:export"),h=Yc(l);if(!h){f.error("no preview server\
975
- url");return}f.info(K.cyan("wait 5sec before generating previews")),await Oa(5e3);try{await tu({serverUrl:h,logger:f,views:u,theme:"light",output:c,outputType:"flat"}),await Oa(1e3),f.info(K.yellow("Note: changes in sources do not trigger preview updates, restart is required"))}catch($){f.error(K.red("Failed to generate previews")),f.error($)}}else l.config.logger.warn("no views found, no previews generated")}const L_={command:"start [path]",aliases:["serve","dev"],describe:"Start local dev ser\
976
- ver to preview LikeC4 views",builder:t=>t.positional("path",Cr).option("base",_c).option("webcomponent-prefix",ai).option("use-hash-history",$c).option("use-dot",We).option("listen",Zm),handler:async t=>{await Ir(),await j_({path:t.path,useDotBin:t["use-dot"],base:t.base,webcomponentPrefix:t["webcomponent-prefix"],useHashHistory:t["use-hash-history"],listen:t.listen})}};async function D_({path:t,ignoreLayout:e}){const r=await rt.fromWorkspace(t,{logger:"vite"}),n=He("c4:views");let s=!0;return s=
977
- await i(r)&&s,s=(e||await o(r,n))&&s,s?0:ya(1);function i(a){return a.getErrors().length===0}async function o(a,c){const l=await a.diagrams();let u=!1;for(const f of l)f.hasLayoutDrift===!0&&(u=!0,c.error(K.red(`Layout drift detected on view '${f.id}' at ${ge(t,f.relativePath??".")}`)));return!u}}const k_={command:"validate [path]",aliases:[],describe:"Validate model syntax and manual layout",builder:t=>t.positional("path",Cr).option("ignore-layout",{alias:["skip-layout"],boolean:!0,default:!1,description:"\
978
- do not validate layout of views"}),handler:async t=>{await D_({path:t.path,ignoreLayout:t["ignore-layout"]})}};Wh({sinks:{console:Kh()},loggers:[{category:"likec4",sinks:["console"],lowestLevel:Dp?"debug":"info"}]});async function x_(){return!ut()&&y_(),await Xm(mm(Qh)).scriptName("likec4").usage("Usage: $0 <command>").command(L_).command(ty).command(O_).command(P_).command(T_).command(k_).command({command:"check-update",describe:"Check for updates",handler:async()=>{await $_()}}).help("help").version(
979
- Wt).alias("v","version").alias("h","help").demandCommand(1,"Please run with valid command").strict().recommendCommands().showHelpOnFail(!0,"Something is wrong, run with --help").updateStrings({"Options:":K.bold("Options:"),"Positionals:":K.bold("Arguments:"),"Commands:":K.bold("Commands:"),"Examples:":K.bold("Examples:")}).wrap(ha(Jh.columns-20,{min:80,max:120})).parseAsync()}x_().catch(()=>{ya(1)}),process.on("unhandledRejection",t=>{console.error("Unhandled rejection",t)});
974
+ title:n,useHashHistory:s,useOverview:i=!1,base:o,listen:a}){process.env.NODE_ENV="development";const c=await rt.fromWorkspace(t,{graphviz:e?"binary":"wasm"}),l=await Vr(fr(zr(),".likec4-assets-")),u=await tu({buildWebcomponent:!0,hmr:!0,base:o,webcomponentPrefix:r,title:n,languageServices:c,useHashHistory:s,useOverviewGraph:i,likec4AssetsDir:l,listen:a});if(u.config.logger.clearScreen("info"),Jc(u),!i)return;const f=await c.diagrams();if(ma(f,1)){const h=He("c4:export"),$=Xc(u);if(!$){h.error("n\
975
+ o preview server url");return}h.info(K.cyan("wait 5sec before generating previews")),await Oa(5e3);try{await ru({serverUrl:$,logger:h,views:f,theme:"light",output:l,outputType:"flat"}),await Oa(1e3),h.info(K.yellow("Note: changes in sources do not trigger preview updates, restart is required"))}catch(b){h.error(K.red("Failed to generate previews")),h.error(b)}}else u.config.logger.warn("no views found, no previews generated")}const L_={command:"start [path]",aliases:["serve","dev"],describe:"Sta\
976
+ rt local dev server to preview LikeC4 views",builder:t=>t.positional("path",Cr).option("base",vc).option("webcomponent-prefix",ai).option("title",_c).option("use-hash-history",$c).option("use-dot",We).option("listen",Zm),handler:async t=>{await Ir(),await j_({path:t.path,useDotBin:t["use-dot"],base:t.base,webcomponentPrefix:t["webcomponent-prefix"],title:t.title,useHashHistory:t["use-hash-history"],listen:t.listen})}};async function D_({path:t,ignoreLayout:e}){const r=await rt.fromWorkspace(t,{logger:"\
977
+ vite"}),n=He("c4:views");let s=!0;return s=await i(r)&&s,s=(e||await o(r,n))&&s,s?0:ya(1);function i(a){return a.getErrors().length===0}async function o(a,c){const l=await a.diagrams();let u=!1;for(const f of l)f.hasLayoutDrift===!0&&(u=!0,c.error(K.red(`Layout drift detected on view '${f.id}' at ${ge(t,f.relativePath??".")}`)));return!u}}const k_={command:"validate [path]",aliases:[],describe:"Validate model syntax and manual layout",builder:t=>t.positional("path",Cr).option("ignore-layout",{alias:[
978
+ "skip-layout"],boolean:!0,default:!1,description:"do not validate layout of views"}),handler:async t=>{await D_({path:t.path,ignoreLayout:t["ignore-layout"]})}};Kh({sinks:{console:Yh()},loggers:[{category:"likec4",sinks:["console"],lowestLevel:kp?"debug":"info"}]});async function x_(){return!ut()&&y_(),await Jm(gm(Zh)).scriptName("likec4").usage("Usage: $0 <command>").command(L_).command(ty).command(O_).command(P_).command(T_).command(k_).command({command:"check-update",describe:"Check for updat\
979
+ es",handler:async()=>{await $_()}}).help("help").version(Wt).alias("v","version").alias("h","help").demandCommand(1,"Please run with valid command").strict().recommendCommands().showHelpOnFail(!0,"Something is wrong, run with --help").updateStrings({"Options:":K.bold("Options:"),"Positionals:":K.bold("Arguments:"),"Commands:":K.bold("Commands:"),"Examples:":K.bold("Examples:")}).wrap(ha(Qh.columns-20,{min:80,max:120})).parseAsync()}x_().catch(()=>{ya(1)}),process.on("unhandledRejection",t=>{console.
980
+ error("Unhandled rejection",t)});