likec4 1.32.1 → 1.33.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,101 +1,103 @@
1
1
  #!/usr/bin/env node
2
- import{k as Dh,o as tt,q as xh,r as at,s as qr,t as cr,v as oa,C as kh,e as Mh,d as Gt,u as K,w as aa,x as qh,y as Uh,z as ct,A as ca,B as As,D as Hh,E as At,F as Fh,h as ua,G as la,c as Vh,L as rt,j as fa,H as zh,I as nt,J as Gh,K as Bh,n as Wh,M as Bt,O as ur,P as Os,Q as da,R as Kh,S as Yh}from"../shared/likec4.CbTFhAsc.mjs";import Se,{hrtime as Xh,cwd as Cs,exit as ha,stdout as Jh,argv as Qh}from"node:process";import{strictEqual as Zh,notStrictEqual as ep}from"assert";import Ps,{resolve as He,
3
- dirname as Is,normalize as tp,relative as rp,extname as np,basename as sp}from"path";import{statSync as pa,readdirSync as ip,readFileSync as Ns,writeFile as op}from"fs";import ma,{format as ga,inspect as ap}from"util";import{fileURLToPath as cp}from"url";import me,{resolve as ye,dirname as Ot,join as lr,relative as gt,extname as fr,isAbsolute as Ts,basename as Ur}from"node:path";import pe,{existsSync as Ct,copyFileSync as ya,readdirSync as up,rmSync as js}from"node:fs";import $a,{mkdtemp as Hr,writeFile as Pt,
4
- mkdir as ut,stat as Ls,copyFile as lp,rm as fp}from"node:fs/promises";import dr,{tmpdir as Fr}from"node:os";import{fileURLToPath as _a}from"node:url";import Ds from"@vitejs/plugin-react";import{C as va,t as xs,j as ba,e as wa,N as Wt,L as ks,g as dp,a as hp,b as pp}from"../shared/likec4.B20Ey-3l.mjs";import{build as hr,createServer as mp,preview as gp}from"vite";import yp from"node:module";import{compareNatural as $p,sortNaturalByFqn as _p,invariant as Vr,hasAtLeast as Ms,nonexhaustive as Ea,delay as Sa}from"@likec4/core";
5
- import{chromium as Ra}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 pr from"node:crypto";import Ep from"node:assert";import"tty";import"os";import"crypto";import"net";import"child_process";import"@likec4/core/types";import"events";import"@likec4/core/model";import"buffer";import"@hpcc-js/wasm-graphviz";import"@likec4/core/compute-view";import"@likec4/core/utils";import"boxen";import"node:child_process";
6
- import"node:events";import"node:stream/promises";import"node:readline/promises";import"fs/promises";function Sp(...t){return Dh(Rp,t)}var Rp=t=>`${t[0]?.toUpperCase()??""}${t.slice(1)}`;const Ap={right:Tp,center:jp},Op=0,zr=1,Cp=2,Gr=3;class Pp{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]==
7
- "string")return this.applyLayoutDSL(e[0]);const r=e.map(n=>typeof n=="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(`
2
+ import{k as tt,o as Dh,q as at,r as qr,t as cr,s as aa,C as xh,e as kh,d as Gt,u as K,w as ca,v as Mh,x as qh,y as ct,z as ua,A as As,B as Uh,D as At,E as Hh,h as la,F as fa,c as Fh,L as rt,j as da,G as Vh,H as nt,I as zh,J as Gh,n as Bh,K as Bt,M as ur,O as Os,P as ha,Q as Wh,R as Kh}from"../shared/likec4.Bo8Klpk_.mjs";import Se,{hrtime as Yh,cwd as Cs,exit as pa,stdout as Xh,argv as Jh}from"node:process";import{strictEqual as Qh,notStrictEqual as Zh}from"assert";import Ps,{resolve as He,dirname as Is,
3
+ normalize as ep,relative as tp,extname as rp,basename as np}from"path";import{statSync as ma,readdirSync as sp,readFileSync as Ns,writeFile as ip}from"fs";import ga,{format as ya,inspect as op}from"util";import{fileURLToPath as ap}from"url";import pe,{resolve as ye,dirname as Ot,join as lr,relative as gt,extname as fr,isAbsolute as Ts,basename as Ur}from"node:path";import me,{existsSync as Ct,copyFileSync as $a,readdirSync as cp,rmSync as js}from"node:fs";import _a,{mkdtemp as Hr,writeFile as Pt,
4
+ mkdir as ut,stat as Ls,copyFile as up,rm as lp}from"node:fs/promises";import dr,{tmpdir as Fr}from"node:os";import{fileURLToPath as va}from"node:url";import Ds from"@vitejs/plugin-react";import{C as ba,t as xs,j as wa,e as Ea,N as Wt,L as ks,g as fp,a as dp,b as hp}from"../shared/likec4.qcW0JcqE.mjs";import{build as hr,createServer as pp,preview as mp}from"vite";import gp from"node:module";import{compareNatural as yp,sortNaturalByFqn as $p,invariant as Vr,hasAtLeast as Ms,nonexhaustive as Sa,delay as Ra}from"@likec4/core";
5
+ import{chromium as Aa}from"playwright";import _p from"node:net";import{setTimeout as vp}from"node:timers/promises";import{promisify as Ie,isDeepStrictEqual as bp}from"node:util";import pr from"node:crypto";import wp from"node:assert";import{u as Ep}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 Sp(...t){return Ep(Rp,t)}var Rp=t=>`${t[0]?.toUpperCase()??""}${t.slice(1)}`,qs,Oa;function Ca(){return Oa||(Oa=1,qs=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}),qs}const Ap={right:Tp,
8
+ center:jp},Op=0,zr=1,Cp=2,Gr=3;class Pp{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=="string"?this.colFromString(n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]=="st\
9
+ ring"&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){const r=e.split(`
8
10
  `).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.
9
11
  rows.forEach(r=>{this.rowToString(r,e)}),e.filter(r=>!r.hidden).map(r=>r.text).join(`
10
- `)}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 p=Ap[e[a].align];u=p(u,l),De.stringWidth(u)<l&&(u+=" ".repeat((c||0)-De.stringWidth(u)-1))}const f=e[a].padding||[0,0,0,0];f[Gr]&&(i+=" ".repeat(f[Gr])),i+=Aa(e[a],u,"| "),i+=u,i+=Aa(e[a],u," |"),f[zr]&&(i+=" ".repeat(f[zr])),s===0&&r.length>0&&(i=
12
+ `)}rowToString(e,r){return this.rasterize(e).forEach((n,s)=>{let i="";n.forEach((o,a)=>{const{width:u}=e[a],l=this.negatePadding(e[a]);let c=o;if(l>De.stringWidth(o)&&(c+=" ".repeat(l-De.stringWidth(o))),e[a].align&&e[a].align!=="left"&&this.wrap){const p=Ap[e[a].align];c=p(c,l),De.stringWidth(c)<l&&(c+=" ".repeat((u||0)-De.stringWidth(c)-1))}const f=e[a].padding||[0,0,0,0];f[Gr]&&(i+=" ".repeat(f[Gr])),i+=Pa(e[a],c,"| "),i+=c,i+=Pa(e[a],c," |"),f[zr]&&(i+=" ".repeat(f[zr])),s===0&&r.length>0&&(i=
11
13
  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(`
12
14
  `):s=i.text.split(`
13
- `),i.border&&(s.unshift("."+"-".repeat(this.negatePadding(i)+2)+"."),s.push("'"+"-".repeat(this.negatePadding(i)+2)+"'")),i.padding&&(s.unshift(...new Array(i.padding[Op]||0).fill("")),s.push(...new Array(i.padding[Cp]||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[Gr]||0)+(e.padding[zr]||0)),e.border&&(r-=4),r}columnWidths(e){if(!this.wrap)return e.map(
14
- 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,Ip(e[a])):o)}}function Aa(t,e,r){return t.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?r:" ":""}function Ip(t){const e=t.padding||[],r=1+(e[Gr]||0)+(e[zr]||0);return t.border?r+4:r}function Np(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Tp(t,e){
15
- t=t.trim();const r=De.stringWidth(t);return r<e?" ".repeat(e-r)+t:t}function jp(t,e){t=t.trim();const r=De.stringWidth(t);return r>=e?t:" ".repeat(e-r>>1)+t}let De;function Lp(t,e){return De=e,new Pp({width:t?.width||Np(),wrap:t?.wrap})}const Oa=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function Ca(t){return t.replace(Oa,"")}function Dp(t,e){const[r,n]=t.match(Oa)||["",""];t=Ca(t);let s="";for(let i=0;i<t.length;i++)i!==0&&i%e===0&&(s+=
15
+ `),i.border&&(s.unshift("."+"-".repeat(this.negatePadding(i)+2)+"."),s.push("'"+"-".repeat(this.negatePadding(i)+2)+"'")),i.padding&&(s.unshift(...new Array(i.padding[Op]||0).fill("")),s.push(...new Array(i.padding[Cp]||0).fill(""))),s.forEach((a,u)=>{r[u]||r.push([]);const l=r[u];for(let c=0;c<o;c++)l[c]===void 0&&l.push("");l.push(a)})}),r}negatePadding(e){let r=e.width||0;return e.padding&&(r-=(e.padding[Gr]||0)+(e.padding[zr]||0)),e.border&&(r-=4),r}columnWidths(e){if(!this.wrap)return e.map(
16
+ 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,Ip(e[a])):o)}}function Pa(t,e,r){return t.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?r:" ":""}function Ip(t){const e=t.padding||[],r=1+(e[Gr]||0)+(e[zr]||0);return t.border?r+4:r}function Np(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Tp(t,e){
17
+ t=t.trim();const r=De.stringWidth(t);return r<e?" ".repeat(e-r)+t:t}function jp(t,e){t=t.trim();const r=De.stringWidth(t);return r>=e?t:" ".repeat(e-r>>1)+t}let De;function Lp(t,e){return De=e,new Pp({width:t?.width||Np(),wrap:t?.wrap})}const Ia=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function Na(t){return t.replace(Ia,"")}function Dp(t,e){const[r,n]=t.match(Ia)||["",""];t=Na(t);let s="";for(let i=0;i<t.length;i++)i!==0&&i%e===0&&(s+=
16
18
  `
17
- `),s+=t.charAt(i);return r&&n&&(s=`${r}${s}${n}`),s}function xp(t){return Lp(t,{stringWidth:e=>[...e].length,stripAnsi:Ca,wrap:Dp})}function kp(t,e){let r=He(".",t),n;for(pa(r).isDirectory()||(r=Is(r));;){if(n=e(r,ip(r)),n)return He(r,n);if(r=Is(n=r),n===r)break}}function mr(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,
18
- o=o.toUpperCase()),i!==0&&(o==="-"||o==="_")?n=!0:o!=="-"&&o!=="_"&&(r+=o)}return r}}function Pa(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 Ia(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 Mp(t){if(Array.isArray(t))return t.map(o=>typeof o!="string"?o+"":o);t=t.trim();let e=0,
19
+ `),s+=t.charAt(i);return r&&n&&(s=`${r}${s}${n}`),s}function xp(t){return Lp(t,{stringWidth:e=>[...e].length,stripAnsi:Na,wrap:Dp})}function kp(t,e){let r=He(".",t),n;for(ma(r).isDirectory()||(r=Is(r));;){if(n=e(r,sp(r)),n)return He(r,n);if(r=Is(n=r),n===r)break}}function mr(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,
20
+ o=o.toUpperCase()),i!==0&&(o==="-"||o==="_")?n=!0:o!=="-"&&o!=="_"&&(r+=o)}return r}}function Ta(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 ja(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 Mp(t){if(Array.isArray(t))return t.map(o=>typeof o!="string"?o+"":o);t=t.trim();let e=0,
19
21
  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 We;(function(t){t.BOOLEAN="boolean",t.STRING="string",t.NUMBER="number",t.ARRAY="array"})(We||(We={}));let lt;class qp{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,
20
22
  envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),s=Mp(e),i=typeof e=="string",o=Up(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\
21
- 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--"],p=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),
23
+ t-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),u=Object.assign(Object.create(null),n.default),l=n.configObjects||[],c=n.envPrefix,f=a["populate--"],p=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),
22
24
  configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},g=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,h=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){
23
25
  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]=
24
- T,d.keys.push(P))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([P,T])=>{typeof T=="function"&&(d.coercions[P]=T,d.keys.push(P))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(P){d.configs[P]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([P,T])=>{(typeof T=="boolean"||typeof T=="function")&&(d.configs[P]=T)})),k(n.key,o,n.default,d.arrays),Object.keys(c).forEach(function(P){(d.aliases[P]||
25
- []).forEach(function(T){c[T]=c[P]})});let m=null;ne();let _=[];const v=Object.assign(Object.create(null),{_:[]}),w={};for(let P=0;P<s.length;P++){const T=s[P],ee=T.replace(/^-{3,}/,"---");let W,N,te,z,re,le;if(T!=="--"&&/^-/.test(T)&&Z(T))S(T);else if(ee.match(/^---+(=|$)/)){S(T);continue}else if(T.match(/^--.+=/)||!a["short-option-groups"]&&T.match(/^-.+=/))z=T.match(/^--?([^=]+)=([\s\S]*)$/),z!==null&&Array.isArray(z)&&z.length>=3&&(E(z[1],d.arrays)?P=F(P,z[1],s,z[2]):E(z[1],d.nargs)!==!1?P=I(
26
+ T,d.keys.push(P))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([P,T])=>{typeof T=="function"&&(d.coercions[P]=T,d.keys.push(P))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(P){d.configs[P]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([P,T])=>{(typeof T=="boolean"||typeof T=="function")&&(d.configs[P]=T)})),k(n.key,o,n.default,d.arrays),Object.keys(u).forEach(function(P){(d.aliases[P]||
27
+ []).forEach(function(T){u[T]=u[P]})});let m=null;ne();let _=[];const v=Object.assign(Object.create(null),{_:[]}),w={};for(let P=0;P<s.length;P++){const T=s[P],ee=T.replace(/^-{3,}/,"---");let W,N,te,z,re,le;if(T!=="--"&&/^-/.test(T)&&Z(T))S(T);else if(ee.match(/^---+(=|$)/)){S(T);continue}else if(T.match(/^--.+=/)||!a["short-option-groups"]&&T.match(/^-.+=/))z=T.match(/^--?([^=]+)=([\s\S]*)$/),z!==null&&Array.isArray(z)&&z.length>=3&&(E(z[1],d.arrays)?P=F(P,z[1],s,z[2]):E(z[1],d.nargs)!==!1?P=I(
26
28
  P,z[1],s,z[2]):B(z[1],z[2],!0));else if(T.match(h)&&a["boolean-negation"])z=T.match(h),z!==null&&Array.isArray(z)&&z.length>=2&&(N=z[1],B(N,E(N,d.arrays)?[!1]:!1));else if(T.match(/^--.+/)||!a["short-option-groups"]&&T.match(/^-[^-]+/))z=T.match(/^--?(.+)/),z!==null&&Array.isArray(z)&&z.length>=2&&(N=z[1],E(N,d.arrays)?P=F(P,N,s):E(N,d.nargs)!==!1?P=I(P,N,s):(re=s[P+1],re!==void 0&&(!re.match(/^-/)||re.match(g))&&!E(N,d.bools)&&!E(N,d.counts)||/^(true|false)$/.test(re)?(B(N,re),P++):B(N,oe(N))));else if(T.
27
29
  match(/^-.\..+=/))z=T.match(/^-([^=]+)=([\s\S]*)$/),z!==null&&Array.isArray(z)&&z.length>=3&&B(z[1],z[2]);else if(T.match(/^-.\..+/)&&!T.match(g))re=s[P+1],z=T.match(/^-(.\..+)/),z!==null&&Array.isArray(z)&&z.length>=2&&(N=z[1],re!==void 0&&!re.match(/^-/)&&!E(N,d.bools)&&!E(N,d.counts)?(B(N,re),P++):B(N,oe(N)));else if(T.match(/^-[^-]+/)&&!T.match(g)){te=T.slice(1,-1).split(""),W=!1;for(let _e=0;_e<te.length;_e++){if(re=T.slice(_e+2),te[_e+1]&&te[_e+1]==="="){le=T.slice(_e+3),N=te[_e],E(N,d.arrays)?
28
30
  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(te[_e],re);continue}if(/[A-Za-z]/.test(te[_e])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(re)&&E(re,d.bools)===!1){B(te[_e],re),W=!0;break}if(te[_e+1]&&te[_e+1].match(/\W/)){B(te[_e],re),W=!0;break}else B(te[_e],oe(te[_e]))}N=T.slice(-1)[0],!W&&N!=="-"&&(E(N,d.arrays)?P=F(P,N,s):E(N,d.nargs)!==!1?P=I(P,N,s):(re=s[P+1],re!==void 0&&(!/^(-|--)[^-]/.test(re)||re.match(g))&&!E(N,d.bools)&&!E(N,d.counts)||/^(true|false)$/.test(re)?
29
- (B(N,re),P++):B(N,oe(N))))}else if(T.match(/^-[0-9]$/)&&T.match(g)&&E(T.slice(1),d.bools))N=T.slice(1),B(N,oe(N));else if(T==="--"){_=s.slice(P+1);break}else if(a["halt-at-non-option"]){_=s.slice(P);break}else S(T)}G(v,!0),G(v,!1),x(v),Y(),H(v,d.aliases,c,!0),J(v),a["set-placeholder-key"]&&se(v),Object.keys(d.counts).forEach(function(P){A(v,P.split("."))||B(P,0)}),f&&_.length&&(v[p]=[]),_.forEach(function(P){v[p].push(P)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(v).filter(P=>P!==
31
+ (B(N,re),P++):B(N,oe(N))))}else if(T.match(/^-[0-9]$/)&&T.match(g)&&E(T.slice(1),d.bools))N=T.slice(1),B(N,oe(N));else if(T==="--"){_=s.slice(P+1);break}else if(a["halt-at-non-option"]){_=s.slice(P);break}else S(T)}G(v,!0),G(v,!1),x(v),Y(),H(v,d.aliases,u,!0),J(v),a["set-placeholder-key"]&&se(v),Object.keys(d.counts).forEach(function(P){A(v,P.split("."))||B(P,0)}),f&&_.length&&(v[p]=[]),_.forEach(function(P){v[p].push(P)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(v).filter(P=>P!==
30
32
  "--"&&P.includes("-")).forEach(P=>{delete v[P]}),a["strip-aliased"]&&[].concat(...Object.keys(o).map(P=>o[P])).forEach(P=>{a["camel-case-expansion"]&&P.includes("-")&&delete v[P.split(".").map(T=>mr(T)).join(".")],delete v[P]});function S(P){const T=j("_",P);(typeof T=="string"||typeof T=="number")&&v._.push(T)}function I(P,T,ee,W){let N,te=E(T,d.nargs);if(te=typeof te!="number"||isNaN(te)?1:te,te===0)return Q(W)||(m=Error(y("Argument unexpected for: %s",T))),B(T,oe(T)),P;let z=Q(W)?0:1;if(a["na\
31
33
  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.
32
- 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(".").
34
+ test(te)&&!Z(te)){if(u[T]!==void 0){const re=u[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(".").
33
35
  map(function(z){return mr(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},
34
- 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=Hp(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=qs()),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){
35
- return!a["parse-positional-numbers"]&&P==="_"||!E(P,d.strings)&&!E(P,d.bools)&&!Array.isArray(T)&&(Ia(T)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${T}`)))||!Q(T)&&E(P,d.numbers))&&(T=Number(T)),T}function x(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
36
- 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(
36
+ 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=Hp(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=Us()),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){
37
+ return!a["parse-positional-numbers"]&&P==="_"||!E(P,d.strings)&&!E(P,d.bools)&&!Array.isArray(T)&&(ja(T)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${T}`)))||!Q(T)&&E(P,d.numbers))&&(T=Number(T)),T}function x(P){const T=Object.create(null);H(T,d.aliases,u),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
38
+ 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 c>"u")return;const ee=typeof c=="string"?c:"",W=lt.env();Object.keys(W).forEach(
37
39
  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)),mr(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(".")||
38
40
  typeof P[T]>"u"&&(P[T]=void 0)}),P}function H(P,T,ee,W=!1){Object.keys(ee).forEach(function(N){A(P,N.split("."))||(V(P,N.split("."),ee[N]),W&&(b[N]=!0),(T[N]||[]).forEach(function(te){A(P,te.split("."))||V(P,te.split("."),ee[N])}))})}function A(P,T){let ee=P;a["dot-notation"]||(T=[T.join(".")]),T.slice(0,-1).forEach(function(N){ee=ee[N]||{}});const W=T[T.length-1];return typeof ee!="object"?!1:W in ee}function V(P,T,ee){let W=P;a["dot-notation"]||(T=[T.join(".")]),T.slice(0,-1).forEach(function(le){
39
- le=Na(le),typeof W=="object"&&W[le]===void 0&&(W[le]={}),typeof W[le]!="object"||Array.isArray(W[le])?(Array.isArray(W[le])?W[le].push({}):W[le]=[W[le],{}],W=W[le][W[le].length-1]):W=W[le]});const N=Na(T[T.length-1]),te=E(T.join("."),d.arrays),z=Array.isArray(ee);let re=a["duplicate-arguments-array"];!re&&E(N,d.nargs)&&(re=!0,(!Q(W[N])&&d.nargs[N]===1||Array.isArray(W[N])&&W[N].length===d.nargs[N])&&(W[N]=void 0)),ee===qs()?W[N]=qs(W[N]):Array.isArray(W[N])?re&&te&&z?W[N]=a["flatten-duplicate-ar\
41
+ le=La(le),typeof W=="object"&&W[le]===void 0&&(W[le]={}),typeof W[le]!="object"||Array.isArray(W[le])?(Array.isArray(W[le])?W[le].push({}):W[le]=[W[le],{}],W=W[le][W[le].length-1]):W=W[le]});const N=La(T[T.length-1]),te=E(T.join("."),d.arrays),z=Array.isArray(ee);let re=a["duplicate-arguments-array"];!re&&E(N,d.nargs)&&(re=!0,(!Q(W[N])&&d.nargs[N]===1||Array.isArray(W[N])&&W[N].length===d.nargs[N])&&(W[N]=void 0)),ee===Us()?W[N]=Us(W[N]):Array.isArray(W[N])?re&&te&&z?W[N]=a["flatten-duplicate-ar\
40
42
  rays"]?W[N].concat(ee):(Array.isArray(W[N][0])?W[N]:[W[N]]).concat([ee]):!re&&!!te==!!z?W[N]=ee:W[N]=W[N].concat([ee]):W[N]===void 0&&te?W[N]=z?ee:[ee]:re&&!(W[N]===void 0||E(N,d.counts)||E(N,d.bools))?W[N]=[W[N],ee]:W[N]=ee}function k(...P){P.forEach(function(T){Object.keys(T||{}).forEach(function(ee){d.aliases[ee]||(d.aliases[ee]=[].concat(o[ee]||[]),d.aliases[ee].concat(ee).forEach(function(W){if(/-/.test(W)&&a["camel-case-expansion"]){const N=mr(W);N!==ee&&d.aliases[ee].indexOf(N)===-1&&(d.aliases[ee].
41
- 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=Pa(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(
43
+ 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=Ta(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(
42
44
  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["\
43
- unknown-options-as-args"]&&ie(P)}function ie(P){return P=P.replace(/^-{3,}/,"--"),P.match(g)||X(P)?!1:!C(P,/^-+([^=]+?)=[\s\S]*$/,h,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\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{[We.BOOLEAN]:!0,[We.STRING]:"",[We.NUMBER]:void 0,[We.ARRAY]:[]}[P]}function q(P){let T=We.BOOLEAN;return E(P,d.strings)?T=We.STRING:E(P,d.numbers)?T=We.NUMBER:E(P,d.bools)?T=We.BOOLEAN:E(P,d.arrays)&&
45
+ unknown-options-as-args"]&&ie(P)}function ie(P){return P=P.replace(/^-{3,}/,"--"),P.match(g)||X(P)?!1:!C(P,/^-+([^=]+?)=[\s\S]*$/,h,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function oe(P){return!E(P,d.bools)&&!E(P,d.counts)&&`${P}`in u?u[P]:L(q(P))}function L(P){return{[We.BOOLEAN]:!0,[We.STRING]:"",[We.NUMBER]:void 0,[We.ARRAY]:[]}[P]}function q(P){let T=We.BOOLEAN;return E(P,d.strings)?T=We.STRING:E(P,d.numbers)?T=We.NUMBER:E(P,d.bools)?T=We.BOOLEAN:E(P,d.arrays)&&
44
46
  (T=We.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 Up(t){const e=[],r=Object.create(null);let n=!0;for(Object.
45
- 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 qs(t){return t!==void 0?t+1:1}function Na(t){return t==="__proto__"?"___proto___":t}function Hp(t){return typeof t==
46
- "string"&&(t[0]==="'"||t[0]==='"')&&t[t.length-1]===t[0]?t.substring(1,t.length-1):t}var Us,Hs,Fs;const Ta=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,ja=(Hs=(Us=process==null?void 0:process.versions)===null||Us===void 0?void 0:Us.node)!==null&&Hs!==void 0?Hs:(Fs=process==null?void 0:process.version)===null||Fs===void 0?void 0:Fs.slice(1);if(ja&&Number(ja.match(/^([^.]+)/)[1])<Ta)throw Error(`yargs parser supports a minimum Node.js versi\
47
- on of ${Ta}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const Fp=process?process.env:{},La=new qp({cwd:process.cwd,env:()=>Fp,format:ga,normalize:tp,resolve:He,require:t=>{if(typeof require<"u")return require(t);if(t.match(/\.json$/))return JSON.parse(Ns(t,"utf8"));throw Error("only .json config files are supported in ESM")}}),gr=function(e,r){return La.parse(e.slice(),r).argv};gr.detailed=function(t,e){return La.parse(t.slice(),e)},gr.camelCase=
48
- mr,gr.decamelize=Pa,gr.looksLikeNumber=Ia;function Da(){return Vp()?0:1}function Vp(){return zp()&&!process.defaultApp}function zp(){return!!process.versions.electron}function Gp(t){return t.slice(Da()+1)}function Bp(){return process.argv[Da()]}class Oe extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,Oe)}}const Wp={fs:{readFileSync:Ns,writeFile:op},format:ga,resolve:He,exists:t=>{try{return pa(t).isFile()}catch{return!1}}};
47
+ 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,u){return u.indexOf(o)===a});const i=s.pop();i!==void 0&&typeof i=="string"&&(r[i]=s)}),r}function Us(t){return t!==void 0?t+1:1}function La(t){return t==="__proto__"?"___proto___":t}function Hp(t){return typeof t==
48
+ "string"&&(t[0]==="'"||t[0]==='"')&&t[t.length-1]===t[0]?t.substring(1,t.length-1):t}var Hs,Fs,Vs;const Da=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,xa=(Fs=(Hs=process==null?void 0:process.versions)===null||Hs===void 0?void 0:Hs.node)!==null&&Fs!==void 0?Fs:(Vs=process==null?void 0:process.version)===null||Vs===void 0?void 0:Vs.slice(1);if(xa&&Number(xa.match(/^([^.]+)/)[1])<Da)throw Error(`yargs parser supports a minimum Node.js versi\
49
+ on of ${Da}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const Fp=process?process.env:{},ka=new qp({cwd:process.cwd,env:()=>Fp,format:ya,normalize:ep,resolve:He,require:t=>{if(typeof require<"u")return require(t);if(t.match(/\.json$/))return JSON.parse(Ns(t,"utf8"));throw Error("only .json config files are supported in ESM")}}),gr=function(e,r){return ka.parse(e.slice(),r).argv};gr.detailed=function(t,e){return ka.parse(t.slice(),e)},gr.camelCase=
50
+ mr,gr.decamelize=Ta,gr.looksLikeNumber=ja;function Ma(){return Vp()?0:1}function Vp(){return zp()&&!process.defaultApp}function zp(){return!!process.versions.electron}function Gp(t){return t.slice(Ma()+1)}function Bp(){return process.argv[Ma()]}class Oe extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,Oe)}}const Wp={fs:{readFileSync:Ns,writeFile:ip},format:ya,resolve:He,exists:t=>{try{return ma(t).isFile()}catch{return!1}}};
49
51
  let Ke;class Kp{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||
50
52
  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(),Ke.format.apply(Ke.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.
51
53
  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),Ke.format.apply(Ke.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(
52
- 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);Ke.fs.writeFile(o,a,"utf-8",function(c){e.writeQueue.
53
- shift(),e.writeQueue.length>0&&e._processWriteQueue(),i(c)})}_readLocaleFile(){let e={};const r=this._resolveLocaleFile(this.directory,this.locale);try{Ke.fs.readFileSync&&(e=JSON.parse(Ke.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=Ke.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){const s=Ke.resolve(
54
- e,"./",r.split("_")[0]+".json");this._fileExistsSync(s)&&(n=s)}return n}_fileExistsSync(e){return Ke.exists(e)}}function Yp(t,e){Ke=e;const r=new Kp(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 Xp=t=>Yp(t,Wp),Jp="require is not supported by ESM",xa="loading a directory of commands is not supported yet for ESM";let yr;try{yr=cp(import.meta.url)}catch{yr=process.cwd()}const Qp=yr.substring(
55
- 0,yr.lastIndexOf("node_modules")),Zp={assert:{notStrictEqual:ep,strictEqual:Zh},cliui:xp,findUp:kp,getEnv:t=>process.env[t],inspect:ap,getCallerFile:()=>{throw new Oe(xa)},getProcessArgvBin:Bp,mainFilename:Qp||process.cwd(),Parser:gr,path:{basename:sp,dirname:Is,extname:np,relative:rp,resolve:He},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<
56
- "u"?process.stdout.columns:null},readFileSync:Ns,require:()=>{throw new Oe(Jp)},requireDirectory:()=>{throw new Oe(xa)},stringWidth:t=>[...t].length,y18n:Xp({directory:He(yr,"../../../locales"),updateFiles:!1})};function Ye(t,e,r,n){r.assert.notStrictEqual(t,e,n)}function ka(t,e){e.assert.strictEqual(typeof t,"string")}function Br(t){return Object.keys(t)}function Ae(t){return!!t&&!!t.then&&typeof t.then=="function"}function $r(t){const r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,
57
- 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 em=["first","second","third","fourth","fifth","sixth"];function ce(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},
58
- t,e]:[$r(`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 p=c.shift(),$=Ma(p);f.cmd.filter(y=>y===$||y==="*").length===0&&qa($,f.
59
- cmd,s),s+=1}),i.optional.forEach(f=>{if(c.length===0)return;const p=c.shift(),$=Ma(p);f.cmd.filter(y=>y===$||y==="*").length===0&&qa($,f.cmd,s),s+=1})}catch(s){console.warn(s.stack)}}function Ma(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function qa(t,e,r){throw new Oe(`Invalid ${em[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}class tm{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,s=!1){if(ce("<array|funct\
54
+ 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);Ke.fs.writeFile(o,a,"utf-8",function(u){e.writeQueue.
55
+ shift(),e.writeQueue.length>0&&e._processWriteQueue(),i(u)})}_readLocaleFile(){let e={};const r=this._resolveLocaleFile(this.directory,this.locale);try{Ke.fs.readFileSync&&(e=JSON.parse(Ke.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=Ke.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){const s=Ke.resolve(
56
+ e,"./",r.split("_")[0]+".json");this._fileExistsSync(s)&&(n=s)}return n}_fileExistsSync(e){return Ke.exists(e)}}function Yp(t,e){Ke=e;const r=new Kp(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 Xp=t=>Yp(t,Wp),Jp="require is not supported by ESM",qa="loading a directory of commands is not supported yet for ESM";let yr;try{yr=ap(import.meta.url)}catch{yr=process.cwd()}const Qp=yr.substring(
57
+ 0,yr.lastIndexOf("node_modules")),Zp={assert:{notStrictEqual:Zh,strictEqual:Qh},cliui:xp,findUp:kp,getEnv:t=>process.env[t],inspect:op,getCallerFile:()=>{throw new Oe(qa)},getProcessArgvBin:Bp,mainFilename:Qp||process.cwd(),Parser:gr,path:{basename:np,dirname:Is,extname:rp,relative:tp,resolve:He},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<
58
+ "u"?process.stdout.columns:null},readFileSync:Ns,require:()=>{throw new Oe(Jp)},requireDirectory:()=>{throw new Oe(qa)},stringWidth:t=>[...t].length,y18n:Xp({directory:He(yr,"../../../locales"),updateFiles:!1})};function Ye(t,e,r,n){r.assert.notStrictEqual(t,e,n)}function Ua(t,e){e.assert.strictEqual(typeof t,"string")}function Br(t){return Object.keys(t)}function Ae(t){return!!t&&!!t.then&&typeof t.then=="function"}function $r(t){const r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,
59
+ 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 u=!1;o=o.replace(/\s/g,""),/\.+[\]>]/.test(o)&&a===r.length-1&&(u=!0),/^\[/.test(o)?i.optional.push({cmd:o.replace(n,"").split("|"),variadic:u}):i.demanded.push({cmd:o.replace(n,"").split("|"),variadic:u})}),i}const em=["first","second","third","fourth","fifth","sixth"];function ce(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},
60
+ t,e]:[$r(`cmd ${t}`),e,r]}try{let s=0;const[i,o,a]=n(),u=[].slice.call(o);for(;u.length&&u[u.length-1]===void 0;)u.pop();const l=a||u.length;if(l<i.demanded.length)throw new Oe(`Not enough arguments provided. Expected ${i.demanded.length} but received ${u.length}.`);const c=i.demanded.length+i.optional.length;if(l>c)throw new Oe(`Too many arguments provided. Expected max ${c} but received ${l}.`);i.demanded.forEach(f=>{const p=u.shift(),$=Ha(p);f.cmd.filter(y=>y===$||y==="*").length===0&&Fa($,f.
61
+ cmd,s),s+=1}),i.optional.forEach(f=>{if(u.length===0)return;const p=u.shift(),$=Ha(p);f.cmd.filter(y=>y===$||y==="*").length===0&&Fa($,f.cmd,s),s+=1})}catch(s){console.warn(s.stack)}}function Ha(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function Fa(t,e,r){throw new Oe(`Invalid ${em[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}class tm{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,s=!1){if(ce("<array|funct\
60
62
  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=
61
63
  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 rm(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}function _r(t,e,r,n){return r.reduce((s,i)=>{
62
64
  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 vr(t,e,r=n=>{throw n}){try{const n=nm(t)?t():t;return Ae(n)?n.then(s=>e(s)):e(n)}catch(n){return r(n)}}function nm(t){return typeof t=="function"}function sm(t){if(typeof require>"u")return null;for(let e=0,r=Object.keys(require.cache),
63
- n;e<r.length;e++)if(n=require.cache[r[e]],n.exports===t)return n;return null}const Kt=/(^\*)|(^\$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.
64
- 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=rm(i);if(s=s||(()=>{}),Array.isArray(e))if(am(e))[e,...a]=e;else for(const l of e)this.addHandler(l);else if(um(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);
65
- return}else if(Ua(n)){this.addHandler([e].concat(a),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){const l=$r(e);a=a.map(p=>$r(p).cmd);let u=!1;const f=[l.cmd].concat(a).filter(p=>Kt.test(p)?(u=!0,!1):!0);f.length===0&&u&&f.push("$0"),u&&(l.cmd=f[0],a=f.slice(1),e=e.replace(Kt,l.cmd)),a.forEach(p=>{this.aliasMap[p]=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.
66
- 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(
67
- u,a,r,n.aliases,l,s,i,o);return Ae(f)?f.then(p=>this.applyMiddlewareAndGetResult(u,a,p.innerArgv,c,i,p.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(Vs(l)){n.getInternalMethods().getUsageInstance().freeze();const f=l(n.getInternalMethods().reset(s),c);if(Ae(f))return f.then(p=>(u=Rm(p)?p:n,this.parseAndUpdateUsage(e,r,u,i,o,a)))}else cm(l)&&(n.getInternalMethods().getUsageInstance().freeze(),
68
- 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})):
69
- {aliases:n.parsed.aliases,innerArgv:a}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,r){const n=Kt.test(r.original)?r.original.replace(Kt,"").trim():r.original,s=e.filter(i=>!Kt.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(
70
- i,c,o.parsed.error,e);n=vr(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=_r(n,o,a,!1),n=vr(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{}})}
71
- return e||(s.commands.pop(),s.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,r,n,s,i,o,a){let c={};if(i)return n;a.getInternalMethods().getHasOutput()||(c=this.populatePositionals(r,n,s,a));const l=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),u=_r(n,a,l,!0);return Ae(u)?u.then(f=>this.handleValidationAndGetResult(e,r,f,s,o,a,l,c)):this.handleValidationAndGetResult(e,r,u,s,o,a,l,c)}populatePositionals(e,r,n,s){r._=r._.slice(n.commands.length);const i=e.demanded.slice(
72
- 0),o=e.optional.slice(0),a={};for(this.validation.positionalCount(i.length,r._.length);i.length;){const c=i.shift();this.populatePositional(c,r,a)}for(;o.length;){const c=o.shift();this.populatePositional(c,r,a)}return r._=n.commands.concat(r._.map(c=>""+c)),this.postProcessPositionals(r,a,this.cmdToParseOptions(e.original),s),a}populatePositional(e,r,n){const s=e.cmd[0];e.variadic?n[s]=r._.splice(0).map(String):r._.length&&(n[s]=[String(r._.shift())])}cmdToParseOptions(e){const r={array:[],default:{},
65
+ n;e<r.length;e++)if(n=require.cache[r[e]],n.exports===t)return n;return null}const Kt=/(^\*)|(^\$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,u)=>{const l=i(o,a,u);if(l){if(this.requireCache.
66
+ 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 u=rm(i);if(s=s||(()=>{}),Array.isArray(e))if(am(e))[e,...a]=e;else for(const l of e)this.addHandler(l);else if(um(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);
67
+ return}else if(Va(n)){this.addHandler([e].concat(a),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){const l=$r(e);a=a.map(p=>$r(p).cmd);let c=!1;const f=[l.cmd].concat(a).filter(p=>Kt.test(p)?(c=!0,!1):!0);f.length===0&&c&&f.push("$0"),c&&(l.cmd=f[0],a=f.slice(1),e=e.replace(Kt,l.cmd)),a.forEach(p=>{this.aliasMap[p]=l.cmd}),r!==!1&&this.usage.command(e,r,c,a,o),this.handlers[l.cmd]={original:e,description:r,handler:s,builder:n||{},middlewares:u,deprecated:o,demanded:l.
68
+ demanded,optional:l.optional},c&&(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,u=r.getInternalMethods().getContext(),l=u.commands.slice(),c=!e;e&&(u.commands.push(e),u.fullCommands.push(a.original));const f=this.applyBuilderUpdateUsageAndParse(
69
+ c,a,r,n.aliases,l,s,i,o);return Ae(f)?f.then(p=>this.applyMiddlewareAndGetResult(c,a,p.innerArgv,u,i,p.aliases,r)):this.applyMiddlewareAndGetResult(c,a,f.innerArgv,u,i,f.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,s,i,o,a,u){const l=r.builder;let c=n;if(zs(l)){n.getInternalMethods().getUsageInstance().freeze();const f=l(n.getInternalMethods().reset(s),u);if(Ae(f))return f.then(p=>(c=Rm(p)?p:n,this.parseAndUpdateUsage(e,r,c,i,o,a)))}else cm(l)&&(n.getInternalMethods().getUsageInstance().freeze(),
70
+ c=n.getInternalMethods().reset(s),Object.keys(r.builder).forEach(f=>{c.option(f,l[f])}));return this.parseAndUpdateUsage(e,r,c,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(u=>({aliases:n.parsed.aliases,innerArgv:u})):
71
+ {aliases:n.parsed.aliases,innerArgv:a}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,r){const n=Kt.test(r.original)?r.original.replace(Kt,"").trim():r.original,s=e.filter(i=>!Kt.test(i));return s.push(n),`$0 ${s.join(" ")}`}handleValidationAndGetResult(e,r,n,s,i,o,a,u){if(!o.getInternalMethods().getHasOutput()){const l=o.getInternalMethods().runValidation(
72
+ i,u,o.parsed.error,e);n=vr(n,c=>(l(c),c))}if(r.handler&&!o.getInternalMethods().getHasOutput()){o.getInternalMethods().setHasOutput();const l=!!o.getOptions().configuration["populate--"];o.getInternalMethods().postProcess(n,l,!1,!1),n=_r(n,o,a,!1),n=vr(n,c=>{const f=r.handler(c);return Ae(f)?f.then(()=>c):c}),e||o.getInternalMethods().getUsageInstance().cacheHelpMessage(),Ae(n)&&!o.getInternalMethods().hasParseCallback()&&n.catch(c=>{try{o.getInternalMethods().getUsageInstance().fail(null,c)}catch{}})}
73
+ return e||(s.commands.pop(),s.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,r,n,s,i,o,a){let u={};if(i)return n;a.getInternalMethods().getHasOutput()||(u=this.populatePositionals(r,n,s,a));const l=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),c=_r(n,a,l,!0);return Ae(c)?c.then(f=>this.handleValidationAndGetResult(e,r,f,s,o,a,l,u)):this.handleValidationAndGetResult(e,r,c,s,o,a,l,u)}populatePositionals(e,r,n,s){r._=r._.slice(n.commands.length);const i=e.demanded.slice(
74
+ 0),o=e.optional.slice(0),a={};for(this.validation.positionalCount(i.length,r._.length);i.length;){const u=i.shift();this.populatePositional(u,r,a)}for(;o.length;){const u=o.shift();this.populatePositional(u,r,a)}return r._=n.commands.concat(r._.map(u=>""+u)),this.postProcessPositionals(r,a,this.cmdToParseOptions(e.original),s),a}populatePositional(e,r,n){const s=e.cmd[0];e.variadic?n[s]=r._.splice(0).map(String):r._.length&&(n[s]=[String(r._.shift())])}cmdToParseOptions(e){const r={array:[],default:{},
73
75
  alias:{},demand:{}},n=$r(e);return n.demanded.forEach(s=>{const[i,...o]=s.cmd;s.variadic&&(r.array.push(i),r.default[i]=[]),r.alias[i]=o,r.demand[i]=!0}),n.optional.forEach(s=>{const[i,...o]=s.cmd;s.variadic&&(r.array.push(i),r.default[i]=[]),r.alias[i]=o}),r}postProcessPositionals(e,r,n,s){const i=Object.assign({},s.getOptions());i.default=Object.assign(n.default,i.default);for(const l of Object.keys(n.alias))i.alias[l]=(i.alias[l]||[]).concat(n.alias[l]);i.array=i.array.concat(n.array),i.config=
74
- {};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)&&
75
- (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.
76
- 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=Kt.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(Vs(r))return r(e,!0);Ua(r)||Object.keys(r).forEach(
76
+ {};const o=[];if(Object.keys(r).forEach(l=>{r[l].map(c=>{i.configuration["unknown-options-as-args"]&&(i.key[l]=!0),o.push(`--${l}`),o.push(c)})}),!o.length)return;const a=Object.assign({},i.configuration,{"populate--":!1}),u=this.shim.Parser.detailed(o,Object.assign({},i,{configuration:a}));if(u.error)s.getInternalMethods().getUsageInstance().fail(u.error.message,u.error);else{const l=Object.keys(r);Object.keys(r).forEach(c=>{l.push(...u.aliases[c])}),Object.keys(u.argv).forEach(c=>{l.includes(c)&&
77
+ (r[c]||(r[c]=u.argv[c]),!this.isInConfigs(s,c)&&!this.isDefaulted(s,c)&&Object.prototype.hasOwnProperty.call(e,c)&&Object.prototype.hasOwnProperty.call(u.argv,c)&&(Array.isArray(e[c])||Array.isArray(u.argv[c]))?e[c]=[].concat(e[c],u.argv[c]):e[c]=u.argv[c])})}}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.
78
+ 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=Kt.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(zs(r))return r(e,!0);Va(r)||Object.keys(r).forEach(
77
79
  n=>{e.option(n,r[n])})}moduleName(e){const r=sm(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;Ye(s,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){
78
- const e=this.frozens.pop();Ye(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 om(t,e,r,n){return new im(t,e,r,n)}function Ua(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function am(t){return t.every(e=>typeof e=="string")}function Vs(t){return typeof t=="function"}function cm(t){return typeof t=="\
80
+ const e=this.frozens.pop();Ye(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 om(t,e,r,n){return new im(t,e,r,n)}function Va(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function am(t){return t.every(e=>typeof e=="string")}function zs(t){return typeof t=="function"}function cm(t){return typeof t=="\
79
81
  object"}function um(t){return typeof t=="object"&&!Array.isArray(t)}function br(t={},e=()=>!0){const r={};return Br(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}function wr(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 fm(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){
80
- const[x,U]=typeof M=="string"?[!0,M]:[M,j];return t.getInternalMethods().isGlobalContext()&&(o=U),i=U,a=x,n};let c=!1;n.fail=function(M,j){const x=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()&&wr(!0),!c){c=!0,a&&(t.showHelp("error"),x.error()),(M||j)&&x.error(M||j);const U=i||o;U&&((M||j)&&x.error(""),x.error(U))}if(j=j||new Oe(M),t.getExitProcess())return t.exit(
81
- 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 p=[];n.command=function(M,j,x,U,Y=!1){x&&(p=p.map(G=>(G[2]=!1,G))),p.push([M,j||"",x,U,Y])},n.getCommands=()=>p;let $={};n.describe=function(M,j){Array.isArray(M)?M.forEach(x=>{n.describe(x,j)}):typeof M==
82
+ const[x,U]=typeof M=="string"?[!0,M]:[M,j];return t.getInternalMethods().isGlobalContext()&&(o=U),i=U,a=x,n};let u=!1;n.fail=function(M,j){const x=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()&&wr(!0),!u){u=!0,a&&(t.showHelp("error"),x.error()),(M||j)&&x.error(M||j);const U=i||o;U&&((M||j)&&x.error(""),x.error(U))}if(j=j||new Oe(M),t.getExitProcess())return t.exit(
83
+ 1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,j);throw j}};let l=[],c=!1;n.usage=(D,M)=>D===null?(c=!0,l=[],n):(c=!1,l.push([D,M||""]),n),n.getUsage=()=>l,n.getUsageDisabled=()=>c,n.getPositionalGroupName=()=>r("Positionals:");let f=[];n.example=(D,M)=>{f.push([D,M||""])};let p=[];n.command=function(M,j,x,U,Y=!1){x&&(p=p.map(G=>(G[2]=!1,G))),p.push([M,j||"",x,U,Y])},n.getCommands=()=>p;let $={};n.describe=function(M,j){Array.isArray(M)?M.forEach(x=>{n.describe(x,j)}):typeof M==
82
84
  "object"?Object.keys(M).forEach(x=>{n.describe(x,M[x])}):$[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(),x=t.getDemandedCommands(),U=t.getDeprecatedOptions(),Y=t.getGroups(),G=t.getOptions();let J=[];J=J.concat(Object.
83
- keys($)),J=J.concat(Object.keys(j)),J=J.concat(Object.keys(x)),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(p.length){let C=null;x._?C=`${M} <${r("command")}>
85
+ keys($)),J=J.concat(Object.keys(j)),J=J.concat(Object.keys(x)),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(!c){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(p.length){let C=null;x._?C=`${M} <${r("command")}>
84
86
  `:C=`${M} [${r("command")}]
85
87
  `,H.div(`${C}`)}}if(p.length>1||p.length===1&&!p[0][2]){H.div(r("Commands:"));const C=t.getInternalMethods().getContext(),X=C.commands.length?`${C.commands.join(" ")} `:"";t.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(p=p.sort((ie,oe)=>ie[0].localeCompare(oe[0])));const Z=M?`${M} `:"";p.forEach(ie=>{const oe=`${Z}${X}${ie[0].replace(/^\$0 ?/,"")}`;H.span({text:oe,padding:[0,2,0,2],width:h(p,se,`${M}${X}`)+4},{text:ie[1]});const L=[];ie[2]&&L.push(`[${r("default")}]`),ie[3]&&
86
88
  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 k=C=>/^--/.test(Wr(C)),
87
89
  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(
88
90
  (L,q)=>k(L)===k(q)?0:k(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=>k(X[Z])))&&E.filter(({groupName:C})=>C!==n.getPositionalGroupName()).forEach(({normalizedKeys:C,switches:X})=>{C.forEach(Z=>{k(X[Z])&&(X[Z]=dm(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)&&
89
91
  (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(
90
- G.choices[ie])}]`:null,S(G.default[ie],G.defaultDescription[ie])].filter(Boolean).join(" ");H.span({text:Wr(oe),padding:[0,2,0,2+Ha(oe)],width:h(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:h(f,se)+4},{text:C[1]})}),
92
+ G.choices[ie])}]`:null,S(G.default[ie],G.defaultDescription[ie])].filter(Boolean).join(" ");H.span({text:Wr(oe),padding:[0,2,0,2+za(oe)],width:h(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:h(f,se)+4},{text:C[1]})}),
91
93
  H.div()),b.length>0){const C=b.map(X=>X.replace(/\$0/g,M)).join(`
92
94
  `);H.div(`${C}
93
- `)}return H.toString().replace(/\s*$/,"")};function h(D,M,j){let x=0;return Array.isArray(D)||(D=Object.values(D).map(U=>[U])),D.forEach(U=>{x=Math.max(e.stringWidth(j?`${j} ${Wr(U[0])}`:Wr(U[0]))+Ha(U[0]),x)}),M&&(x=Math.min(x,parseInt((M*.5).toString(),10))),x}function m(){const D=t.getDemandedOptions(),M=t.getOptions();(Object.keys(M.alias)||[]).forEach(j=>{M.alias[j].forEach(x=>{$[x]&&n.describe(j,$[x]),x in D&&t.demandOption(j,D[x]),M.boolean.includes(x)&&t.boolean(j),M.count.includes(x)&&t.
95
+ `)}return H.toString().replace(/\s*$/,"")};function h(D,M,j){let x=0;return Array.isArray(D)||(D=Object.values(D).map(U=>[U])),D.forEach(U=>{x=Math.max(e.stringWidth(j?`${j} ${Wr(U[0])}`:Wr(U[0]))+za(U[0]),x)}),M&&(x=Math.min(x,parseInt((M*.5).toString(),10))),x}function m(){const D=t.getDemandedOptions(),M=t.getOptions();(Object.keys(M.alias)||[]).forEach(j=>{M.alias[j].forEach(x=>{$[x]&&n.describe(j,$[x]),x in D&&t.demandOption(j,D[x]),M.boolean.includes(x)&&t.boolean(j),M.count.includes(x)&&t.
94
96
  count(j),M.string.includes(x)&&t.string(j),M.normalize.includes(x)&&t.normalize(j),M.array.includes(x)&&t.array(j),M.number.includes(x)&&t.number(j)})})}let _;n.cacheHelpMessage=function(){_=this.help()},n.clearCachedHelpMessage=function(){_=void 0},n.hasCachedHelpMessage=function(){return!!_};function v(D,M,j,x){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[x].push(G)}),U}function w(D){return t.getOptions().
95
97
  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 x="";const U=j||", ",Y=[].concat(M);return!M||!Y.length||Y.forEach(G=>{x.length&&(x+=U),x+=JSON.stringify(G)}),x};function S(D,M){let j=`[${r("default:")} `;if(D===
96
- 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=[],p=[],$=br($,j=>!M[j]),n};const B=[];return n.freeze=function(){
97
- B.push({failMessage:i,failureOutput:c,usages:l,usageDisabled:u,epilogs:b,examples:f,commands:p,descriptions:$})},n.unfreeze=function(M=!1){const j=B.pop();j&&(M?($={...j.descriptions,...$},p=[...j.commands,...p],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:p,descriptions:$}=j)},n}function zs(t){return typeof t=="object"}function dm(t,e){return zs(t)?{text:t.text,indentation:t.indentation+e}:
98
- {text:t,indentation:e}}function Ha(t){return zs(t)?t.indentation:0}function Wr(t){return zs(t)?t.text:t}const hm=`###-begin-{{app_name}}-completions-###
98
+ 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,u=!1,l=[],c=!1,b=[],f=[],p=[],$=br($,j=>!M[j]),n};const B=[];return n.freeze=function(){
99
+ B.push({failMessage:i,failureOutput:u,usages:l,usageDisabled:c,epilogs:b,examples:f,commands:p,descriptions:$})},n.unfreeze=function(M=!1){const j=B.pop();j&&(M?($={...j.descriptions,...$},p=[...j.commands,...p],l=[...j.usages,...l],f=[...j.examples,...f],b=[...j.epilogs,...b]):{failMessage:i,failureOutput:u,usages:l,usageDisabled:c,epilogs:b,examples:f,commands:p,descriptions:$}=j)},n}function Gs(t){return typeof t=="object"}function dm(t,e){return Gs(t)?{text:t.text,indentation:t.indentation+e}:
100
+ {text:t,indentation:e}}function za(t){return Gs(t)?t.indentation:0}function Wr(t){return Gs(t)?t.text:t}const hm=`###-begin-{{app_name}}-completions-###
99
101
  #
100
102
  # yargs command completion script
101
103
  #
@@ -142,92 +144,92 @@ _{{app_name}}_yargs_completions()
142
144
  }
143
145
  compdef _{{app_name}}_yargs_completions {{app_name}}
144
146
  ###-end-{{app_name}}-completions-###
145
- `;class mm{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.
146
- length;a<c;++a)if(i[e[a]]&&i[e[a]].builder){const l=i[e[a]].builder;if(Vs(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(
147
- r)&&this.usage.getCommands().forEach(i=>{const o=$r(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.
148
- 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().
149
- 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.
150
- 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===
151
- void 0?void 0:this.aliases)===null||i===void 0?void 0:i[e])===null||o===void 0?void 0:o.find(g=>{const h=$[g];return typeof h=="string"&&h.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($),p=!u(n)&&f(e)?"-":"--";r.push(p+l),s&&r.push(p+"no-"+l)}customCompletion(e,r,n,s){if(Ye(this.customCompletionFunction,null,this.
147
+ `;class mm{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,u=e.
148
+ length;a<u;++a)if(i[e[a]]&&i[e[a]].builder){const l=i[e[a]].builder;if(zs(l)){this.indexAfterLastReset=a+1;const c=this.yargs.getInternalMethods().reset();return l(c,!0),c.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(
149
+ r)&&this.usage.getCommands().forEach(i=>{const o=$r(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 u=!!i.configuration["boolean-negation"]&&i.boolean.includes(a);!o.includes(a)&&!i.hiddenOptions.
150
+ includes(a)&&!this.argsContainKey(r,a,u)&&this.completeOptionKey(a,e,s,u&&!!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().
151
+ getContext().commands.length+1),a=i[n._.length-o-1];if(!a)return;const u=this.yargs.getOptions().choices[a]||[];for(const l of u)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 u of o)if(Object.prototype.hasOwnProperty.call(i.key,u)&&Array.
152
+ isArray(i.choices[u])){a=i.choices[u];break}if(a)return a.filter(u=>!n||u.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,u;let l=e;if(this.zshShell){const $=this.usage.getDescriptions(),b=(o=(i=this===null||this===
153
+ void 0?void 0:this.aliases)===null||i===void 0?void 0:i[e])===null||o===void 0?void 0:o.find(g=>{const h=$[g];return typeof h=="string"&&h.length>0}),y=b?$[b]:void 0,d=(u=(a=$[e])!==null&&a!==void 0?a:y)!==null&&u!==void 0?u:"";l=`${e.replace(/:/g,"\\:")}:${d.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}const c=$=>/^--/.test($),f=$=>/^[^0-9]$/.test($),p=!c(n)&&f(e)?"-":"--";r.push(p+l),s&&r.push(p+"no-"+l)}customCompletion(e,r,n,s){if(Ye(this.customCompletionFunction,null,this.
152
154
  shim),ym(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 $m(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?
153
155
  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?pm:hm;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 gm(t,e,r,n){return new mm(t,e,r,n)}function ym(t){return t.length<3}function $m(t){
154
- return t.length>3}function _m(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 Fa=["$0","--","_"];
156
+ return t.length>3}function _m(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 Ga=["$0","--","_"];
155
157
  function vm(t,e,r){const n=r.y18n.__,s=r.y18n.__n,i={};i.nonOptionCount=function(f){const p=t.getDemandedCommands(),b=f._.length+(f["--"]?f["--"].length:0)-t.getInternalMethods().getContext().commands.length;p._&&(b<p._.min||b>p._.max)&&(b<p._.min?p._.minMsg!==void 0?e.fail(p._.minMsg?p._.minMsg.replace(/\$0/g,b.toString()).replace(/\$1/,p._.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(),
156
158
  p._.min.toString())):b>p._.max&&(p._.maxMsg!==void 0?e.fail(p._.maxMsg?p._.maxMsg.replace(/\$0/g,b.toString()).replace(/\$1/,p._.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(),p._.max.toString()))))},i.positionalCount=function(f,p){p<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",p,p+"",f+""))},i.requiredArguments=
157
159
  function(f,p){let $=null;for(const b of Object.keys(p))(!Object.prototype.hasOwnProperty.call(f,b)||typeof f[b]>"u")&&($=$||{},$[b]=p[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?`
158
160
  ${b.join(`
159
- `)}`:"";e.fail(s("Missing required argument: %s","Missing required arguments: %s",Object.keys($).length,Object.keys($).join(", ")+y))}},i.unknownArguments=function(f,p,$,b,y=!0){var d;const g=t.getInternalMethods().getCommandInstance().getCommands(),h=[],m=t.getInternalMethods().getContext();if(Object.keys(f).forEach(_=>{!Fa.includes(_)&&!Object.prototype.hasOwnProperty.call($,_)&&!Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),_)&&!i.isValidAndSomeAliasIsNotNew(_,
161
+ `)}`:"";e.fail(s("Missing required argument: %s","Missing required arguments: %s",Object.keys($).length,Object.keys($).join(", ")+y))}},i.unknownArguments=function(f,p,$,b,y=!0){var d;const g=t.getInternalMethods().getCommandInstance().getCommands(),h=[],m=t.getInternalMethods().getContext();if(Object.keys(f).forEach(_=>{!Ga.includes(_)&&!Object.prototype.hasOwnProperty.call($,_)&&!Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),_)&&!i.isValidAndSomeAliasIsNotNew(_,
160
162
  p)&&h.push(_)}),y&&(m.commands.length>0||g.length>0||b)&&f._.slice(m.commands.length).forEach(_=>{g.includes(""+_)||h.push(""+_)}),y){const v=((d=t.getDemandedCommands()._)===null||d===void 0?void 0:d.max)||0,w=m.commands.length+v;w<f._.length&&f._.slice(w).forEach(S=>{S=String(S),!m.commands.includes(S)&&!h.includes(S)&&h.push(S)})}h.length&&e.fail(s("Unknown argument: %s","Unknown arguments: %s",h.length,h.map(_=>_.trim()?_:`"${_}"`).join(", ")))},i.unknownCommands=function(f){const p=t.getInternalMethods().
161
163
  getCommandInstance().getCommands(),$=[],b=t.getInternalMethods().getContext();return(b.commands.length>0||p.length>0)&&f._.slice(b.commands.length).forEach(y=>{p.includes(""+y)||$.push(""+y)}),$.length>0?(e.fail(s("Unknown command: %s","Unknown commands: %s",$.length,$.join(", "))),!0):!1},i.isValidAndSomeAliasIsNotNew=function(f,p){if(!Object.prototype.hasOwnProperty.call(p,f))return!1;const $=t.parsed.newAliases;return[f,...p[f]].some(b=>!Object.prototype.hasOwnProperty.call($,b)||!$[f])},i.limitedChoices=
162
- function(f){const p=t.getOptions(),$={};if(!Object.keys(p.choices).length)return;Object.keys(f).forEach(d=>{Fa.indexOf(d)===-1&&Object.prototype.hasOwnProperty.call(p.choices,d)&&[].concat(f[d]).forEach(g=>{p.choices[d].indexOf(g)===-1&&g!==void 0&&($[d]=($[d]||[]).concat(g))})});const b=Object.keys($);if(!b.length)return;let y=n("Invalid values:");b.forEach(d=>{y+=`
163
- ${n("Argument: %s, Given: %s, Choices: %s",d,e.stringifiedValues($[d]),e.stringifiedValues(p.choices[d]))}`}),e.fail(y)};let o={};i.implies=function(f,p){ce("<string|object> [array|number|string]",[f,p],arguments.length),typeof f=="object"?Object.keys(f).forEach($=>{i.implies($,f[$])}):(t.global(f),o[f]||(o[f]=[]),Array.isArray(p)?p.forEach($=>i.implies(f,$)):(Ye(p,void 0,r),o[f].push(p)))},i.getImplied=function(){return o};function a(u,f){const p=Number(f);return f=isNaN(p)?f:p,typeof f=="num\
164
- 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 p=[];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&&p.push(` ${b} -> ${g}`)})}),p.length){let $=`${n("Implications failed:")}
165
- `;p.forEach(b=>{$+=b}),e.fail($)}};let c={};i.conflicts=function(f,p){ce("<string|object> [array|string]",[f,p],arguments.length),typeof f=="object"?Object.keys(f).forEach($=>{i.conflicts($,f[$])}):(t.global(f),c[f]||(c[f]=[]),Array.isArray(p)?p.forEach($=>i.conflicts(f,$)):c[f].push(p))},i.getConflicting=()=>c,i.conflicting=function(f){Object.keys(f).forEach(p=>{c[p]&&c[p].forEach($=>{$&&f[p]!==void 0&&f[$]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",p,$))})}),t.getInternalMethods().
166
- getParserConfiguration()["strip-dashed"]&&Object.keys(c).forEach(p=>{c[p].forEach($=>{$&&f[r.Parser.camelCase(p)]!==void 0&&f[r.Parser.camelCase($)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",p,$))})})},i.recommendCommands=function(f,p){p=p.sort((d,g)=>g.length-d.length);let b=null,y=1/0;for(let d=0,g;(g=p[d])!==void 0;d++){const h=_m(f,g);h<=3&&h<y&&(y=h,b=g)}b&&e.fail(n("Did you mean %s?",b))},i.reset=function(f){return o=br(o,p=>!f[p]),c=br(c,p=>!f[p]),i};const l=[];return i.
167
- freeze=function(){l.push({implied:o,conflicting:c})},i.unfreeze=function(){const f=l.pop();Ye(f,void 0,r),{implied:o,conflicting:c}=f},i}let Gs=[],Er;function Bs(t,e,r,n){Er=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),Gs.push(o),s=i?JSON.parse(Er.readFileSync(o,"utf8")):require(t.extends),delete t.extends,
168
- s=Bs(s,Er.path.dirname(o),r,Er)}return Gs=[],r?Va(s,t):Object.assign({},s,t)}function bm(t){if(Gs.indexOf(t)>-1)throw new Oe(`Circular extended configurations: '${t}'.`)}function wm(t,e){return Er.path.resolve(t,e)}function Va(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]=Va(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");
164
+ function(f){const p=t.getOptions(),$={};if(!Object.keys(p.choices).length)return;Object.keys(f).forEach(d=>{Ga.indexOf(d)===-1&&Object.prototype.hasOwnProperty.call(p.choices,d)&&[].concat(f[d]).forEach(g=>{p.choices[d].indexOf(g)===-1&&g!==void 0&&($[d]=($[d]||[]).concat(g))})});const b=Object.keys($);if(!b.length)return;let y=n("Invalid values:");b.forEach(d=>{y+=`
165
+ ${n("Argument: %s, Given: %s, Choices: %s",d,e.stringifiedValues($[d]),e.stringifiedValues(p.choices[d]))}`}),e.fail(y)};let o={};i.implies=function(f,p){ce("<string|object> [array|number|string]",[f,p],arguments.length),typeof f=="object"?Object.keys(f).forEach($=>{i.implies($,f[$])}):(t.global(f),o[f]||(o[f]=[]),Array.isArray(p)?p.forEach($=>i.implies(f,$)):(Ye(p,void 0,r),o[f].push(p)))},i.getImplied=function(){return o};function a(c,f){const p=Number(f);return f=isNaN(p)?f:p,typeof f=="num\
166
+ ber"?f=c._.length>=f:f.match(/^--no-.+/)?(f=f.match(/^--no-(.+)/)[1],f=!Object.prototype.hasOwnProperty.call(c,f)):f=Object.prototype.hasOwnProperty.call(c,f),f}i.implications=function(f){const p=[];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&&p.push(` ${b} -> ${g}`)})}),p.length){let $=`${n("Implications failed:")}
167
+ `;p.forEach(b=>{$+=b}),e.fail($)}};let u={};i.conflicts=function(f,p){ce("<string|object> [array|string]",[f,p],arguments.length),typeof f=="object"?Object.keys(f).forEach($=>{i.conflicts($,f[$])}):(t.global(f),u[f]||(u[f]=[]),Array.isArray(p)?p.forEach($=>i.conflicts(f,$)):u[f].push(p))},i.getConflicting=()=>u,i.conflicting=function(f){Object.keys(f).forEach(p=>{u[p]&&u[p].forEach($=>{$&&f[p]!==void 0&&f[$]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",p,$))})}),t.getInternalMethods().
168
+ getParserConfiguration()["strip-dashed"]&&Object.keys(u).forEach(p=>{u[p].forEach($=>{$&&f[r.Parser.camelCase(p)]!==void 0&&f[r.Parser.camelCase($)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",p,$))})})},i.recommendCommands=function(f,p){p=p.sort((d,g)=>g.length-d.length);let b=null,y=1/0;for(let d=0,g;(g=p[d])!==void 0;d++){const h=_m(f,g);h<=3&&h<y&&(y=h,b=g)}b&&e.fail(n("Did you mean %s?",b))},i.reset=function(f){return o=br(o,p=>!f[p]),u=br(u,p=>!f[p]),i};const l=[];return i.
169
+ freeze=function(){l.push({implied:o,conflicting:u})},i.unfreeze=function(){const f=l.pop();Ye(f,void 0,r),{implied:o,conflicting:u}=f},i}let Bs=[],Er;function Ws(t,e,r,n){Er=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),Bs.push(o),s=i?JSON.parse(Er.readFileSync(o,"utf8")):require(t.extends),delete t.extends,
170
+ s=Ws(s,Er.path.dirname(o),r,Er)}return Bs=[],r?Ba(s,t):Object.assign({},s,t)}function bm(t){if(Bs.indexOf(t)>-1)throw new Oe(`Circular extended configurations: '${t}'.`)}function wm(t,e){return Er.path.resolve(t,e)}function Ba(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]=Ba(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");
169
171
  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\
170
- id not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Re,It,Sr,Fe,xe,Kr,yt,Nt,Yr,Ve,Xr,ze,st,ke,Ge,Jr,Yt,Ce,ue,Qr,Zr,Me,Tt,Xt,jt,$t,en,fe,Lt,Dt,xt,de,tn,it,Ee;function Em(t){return(e=[],r=t.process.cwd(),n)=>{const s=new Sm(e,r,n,t);return Object.defineProperty(s,"argv",{get:()=>s.parse(),enumerable:!0}),s.help(),s.version(),s}}const za=Symbol("copyDoubleDash"),Ga=Symbol("copyDoubleDash"),Ws=Symbol("deleteFromParserHintObject"),Ba=Symbol("emitWarning"),Wa=Symbol("freeze"),Ka=Symbol(
171
- "getDollarZero"),kt=Symbol("getParserConfiguration"),Ya=Symbol("getUsageConfiguration"),Ks=Symbol("guessLocale"),Xa=Symbol("guessVersion"),Ja=Symbol("parsePositionalNumbers"),Ys=Symbol("pkgUp"),_t=Symbol("populateParserHintArray"),Jt=Symbol("populateParserHintSingleValueDictionary"),Xs=Symbol("populateParserHintArrayDictionary"),Js=Symbol("populateParserHintDictionary"),Qs=Symbol("sanitizeKey"),Zs=Symbol("setKey"),ei=Symbol("unfreeze"),Qa=Symbol("validateAsync"),Za=Symbol("getCommandInstance"),ec=Symbol(
172
- "getContext"),tc=Symbol("getHasOutput"),rc=Symbol("getLoggerInstance"),nc=Symbol("getParseContext"),sc=Symbol("getUsageInstance"),ic=Symbol("getValidationInstance"),rn=Symbol("hasParseCallback"),oc=Symbol("isGlobalContext"),Mt=Symbol("postProcess"),ac=Symbol("rebase"),ti=Symbol("reset"),Rr=Symbol("runYargsParserAndExecuteCommands"),ri=Symbol("runValidation"),cc=Symbol("setHasOutput"),qt=Symbol("kTrackManuallySetKeys");class Sm{constructor(e=[],r,n,s){this.customScriptName=!1,this.parsed=!1,Re.set(
172
+ id not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Re,It,Sr,Fe,xe,Kr,yt,Nt,Yr,Ve,Xr,ze,st,ke,Ge,Jr,Yt,Ce,ue,Qr,Zr,Me,Tt,Xt,jt,$t,en,fe,Lt,Dt,xt,de,tn,it,Ee;function Em(t){return(e=[],r=t.process.cwd(),n)=>{const s=new Sm(e,r,n,t);return Object.defineProperty(s,"argv",{get:()=>s.parse(),enumerable:!0}),s.help(),s.version(),s}}const Wa=Symbol("copyDoubleDash"),Ka=Symbol("copyDoubleDash"),Ks=Symbol("deleteFromParserHintObject"),Ya=Symbol("emitWarning"),Xa=Symbol("freeze"),Ja=Symbol(
173
+ "getDollarZero"),kt=Symbol("getParserConfiguration"),Qa=Symbol("getUsageConfiguration"),Ys=Symbol("guessLocale"),Za=Symbol("guessVersion"),ec=Symbol("parsePositionalNumbers"),Xs=Symbol("pkgUp"),_t=Symbol("populateParserHintArray"),Jt=Symbol("populateParserHintSingleValueDictionary"),Js=Symbol("populateParserHintArrayDictionary"),Qs=Symbol("populateParserHintDictionary"),Zs=Symbol("sanitizeKey"),ei=Symbol("setKey"),ti=Symbol("unfreeze"),tc=Symbol("validateAsync"),rc=Symbol("getCommandInstance"),nc=Symbol(
174
+ "getContext"),sc=Symbol("getHasOutput"),ic=Symbol("getLoggerInstance"),oc=Symbol("getParseContext"),ac=Symbol("getUsageInstance"),cc=Symbol("getValidationInstance"),rn=Symbol("hasParseCallback"),uc=Symbol("isGlobalContext"),Mt=Symbol("postProcess"),lc=Symbol("rebase"),ri=Symbol("reset"),Rr=Symbol("runYargsParserAndExecuteCommands"),ni=Symbol("runValidation"),fc=Symbol("setHasOutput"),qt=Symbol("kTrackManuallySetKeys");class Sm{constructor(e=[],r,n,s){this.customScriptName=!1,this.parsed=!1,Re.set(
173
175
  this,void 0),It.set(this,void 0),Sr.set(this,{commands:[],fullCommands:[]}),Fe.set(this,null),xe.set(this,null),Kr.set(this,"show-hidden"),yt.set(this,null),Nt.set(this,!0),Yr.set(this,{}),Ve.set(this,!0),Xr.set(this,[]),ze.set(this,void 0),st.set(this,{}),ke.set(this,!1),Ge.set(this,null),Jr.set(this,!0),Yt.set(this,void 0),Ce.set(this,""),ue.set(this,void 0),Qr.set(this,void 0),Zr.set(this,{}),Me.set(this,null),Tt.set(this,null),Xt.set(this,{}),jt.set(this,{}),$t.set(this,void 0),en.set(this,!1),
174
- fe.set(this,void 0),Lt.set(this,!1),Dt.set(this,!1),xt.set(this,!1),de.set(this,void 0),tn.set(this,{}),it.set(this,null),Ee.set(this,void 0),ae(this,fe,s,"f"),ae(this,$t,e,"f"),ae(this,It,r,"f"),ae(this,Qr,n,"f"),ae(this,ze,new tm(this),"f"),this.$0=this[Ka](),this[ti](),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,Kr,"f"),ae(this,Yt,this[Ga](),"f")}addHelpOpt(e,r){const n="help";return ce(
175
- "[string|boolean] [string]",[e,r],arguments.length),O(this,Ge,"f")&&(this[Ws](O(this,Ge,"f")),ae(this,Ge,null,"f")),e===!1&&r===void 0?this:(ae(this,Ge,typeof e=="string"?e:n,"f"),this.boolean(O(this,Ge,"f")),this.describe(O(this,Ge,"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,Kr,"f");return this.boolean(
176
- 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[Xs](this.alias.bind(this),"alias",e,r),this}array(e){return ce("<array|string>",[e],arguments.length),this[_t]("array",e),this[qt](e),this}boolean(e){return ce("<array|string>",[e],arguments.length),this[_t]("boolean",e),this[qt](e),this}check(e,r){
177
- return ce("<function> [boolean]",[e,r],arguments.length),this.middleware((n,s)=>vr(()=>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[Xs](this.choices.bind(this),"choices",e,r),this}coerce(e,r){
176
+ fe.set(this,void 0),Lt.set(this,!1),Dt.set(this,!1),xt.set(this,!1),de.set(this,void 0),tn.set(this,{}),it.set(this,null),Ee.set(this,void 0),ae(this,fe,s,"f"),ae(this,$t,e,"f"),ae(this,It,r,"f"),ae(this,Qr,n,"f"),ae(this,ze,new tm(this),"f"),this.$0=this[Ja](),this[ri](),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,Kr,"f"),ae(this,Yt,this[Ka](),"f")}addHelpOpt(e,r){const n="help";return ce(
177
+ "[string|boolean] [string]",[e,r],arguments.length),O(this,Ge,"f")&&(this[Ks](O(this,Ge,"f")),ae(this,Ge,null,"f")),e===!1&&r===void 0?this:(ae(this,Ge,typeof e=="string"?e:n,"f"),this.boolean(O(this,Ge,"f")),this.describe(O(this,Ge,"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,Kr,"f");return this.boolean(
178
+ 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[Js](this.alias.bind(this),"alias",e,r),this}array(e){return ce("<array|string>",[e],arguments.length),this[_t]("array",e),this[qt](e),this}boolean(e){return ce("<array|string>",[e],arguments.length),this[_t]("boolean",e),this[qt](e),this}check(e,r){
179
+ return ce("<function> [boolean]",[e,r],arguments.length),this.middleware((n,s)=>vr(()=>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[Js](this.choices.bind(this),"choices",e,r),this}coerce(e,r){
178
180
  if(ce("<object|string|array> [function]",[e,r],arguments.length),Array.isArray(e)){if(!r)throw new Oe("coerce callback must be provided");for(const n of e)this.coerce(n,r);return this}else if(typeof e=="object"){for(const n of Object.keys(e))this.coerce(n,e[n]);return this}if(!r)throw new Oe("coerce callback must be provided");return O(this,ue,"f").key[e]=!0,O(this,ze,"f").addCoerceMiddleware((n,s)=>{let i;return Object.prototype.hasOwnProperty.call(n,e)?vr(()=>(i=s.getAliases(),r(n[e])),a=>{n[e]=
179
- a;const c=s.getInternalMethods().getParserConfiguration()["strip-aliased"];if(i[e]&&c!==!0)for(const l of i[e])n[l]=a;return n},a=>{throw new Oe(a.message)}):n},e),this}conflicts(e,r){return ce("<string|object> [string|array]",[e,r],arguments.length),O(this,Ee,"f").conflicts(e,r),this}config(e="config",r,n){return ce("[object|string] [string|function] [function]",[e,r,n],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=Bs(e,O(this,It,"f"),this[kt]()["deep-merge-config"]||!1,O(this,fe,"\
181
+ a;const u=s.getInternalMethods().getParserConfiguration()["strip-aliased"];if(i[e]&&u!==!0)for(const l of i[e])n[l]=a;return n},a=>{throw new Oe(a.message)}):n},e),this}conflicts(e,r){return ce("<string|object> [string|array]",[e,r],arguments.length),O(this,Ee,"f").conflicts(e,r),this}config(e="config",r,n){return ce("[object|string] [string|function] [function]",[e,r,n],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=Ws(e,O(this,It,"f"),this[kt]()["deep-merge-config"]||!1,O(this,fe,"\
180
182
  f")),O(this,ue,"f").configObjects=(O(this,ue,"f").configObjects||[]).concat(e),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(e,r||O(this,de,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(s=>{O(this,ue,"f").config[s]=n||!0}),this)}completion(e,r,n){return ce("[string] [string|boolean|function] [function]",[e,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),ae(this,xe,e||O(this,xe,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion\
181
183
  script"),this.command(O(this,xe,"f"),r),n&&O(this,Fe,"f").registerFunction(n),this}command(e,r,n,s,i,o){return ce("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,r,n,s,i,o],arguments.length),O(this,Re,"f").addHandler(e,r,n,s,i,o),this}commands(e,r,n,s,i,o){return this.command(e,r,n,s,i,o)}commandDir(e,r){ce("<string> [object]",[e,r],arguments.length);const n=O(this,Qr,"f")||O(this,fe,"f").require;return O(this,Re,"f").addDirectory(e,n,O(this,fe,
182
- "f").getCallerFile(),r),this}count(e){return ce("<array|string>",[e],arguments.length),this[_t]("count",e),this[qt](e),this}default(e,r,n){return ce("<object|string|array> [*] [string]",[e,r,n],arguments.length),n&&(ka(e,O(this,fe,"f")),O(this,ue,"f").defaultDescription[e]=n),typeof r=="function"&&(ka(e,O(this,fe,"f")),O(this,ue,"f").defaultDescription[e]||(O(this,ue,"f").defaultDescription[e]=O(this,de,"f").functionDescription(r)),r=r.call()),this[Jt](this.default.bind(this),"default",e,r),this}defaults(e,r,n){
184
+ "f").getCallerFile(),r),this}count(e){return ce("<array|string>",[e],arguments.length),this[_t]("count",e),this[qt](e),this}default(e,r,n){return ce("<object|string|array> [*] [string]",[e,r,n],arguments.length),n&&(Ua(e,O(this,fe,"f")),O(this,ue,"f").defaultDescription[e]=n),typeof r=="function"&&(Ua(e,O(this,fe,"f")),O(this,ue,"f").defaultDescription[e]||(O(this,ue,"f").defaultDescription[e]=O(this,de,"f").functionDescription(r)),r=r.call()),this[Jt](this.default.bind(this),"default",e,r),this}defaults(e,r,n){
183
185
  return this.default(e,r,n)}demandCommand(e=1,r,n,s){return ce("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,r,n,s],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),O(this,ue,"f").demandedCommands._={min:e,max:r,minMsg:n,maxMsg:s},this}demand(e,r,n){return Array.isArray(r)?(r.forEach(s=>{Ye(n,!0,O(this,fe,"f")),this.demandOption(s,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof e=="number"?(Ye(n,!0,O(this,fe,"f")),this.demandCommand(e,r,n,n)):
184
186
  Array.isArray(e)?e.forEach(s=>{Ye(n,!0,O(this,fe,"f")),this.demandOption(s,n)}):typeof n=="string"?this.demandOption(e,n):(n===!0||typeof n>"u")&&this.demandOption(e),this}demandOption(e,r){return ce("<object|string|array> [string]",[e,r],arguments.length),this[Jt](this.demandOption.bind(this),"demandedOptions",e,r),this}deprecateOption(e,r){return ce("<string> [string|boolean]",[e,r],arguments.length),O(this,ue,"f").deprecatedOptions[e]=r,this}describe(e,r){return ce("<object|string|array> [str\
185
- ing]",[e,r],arguments.length),this[Zs](e,!0),O(this,de,"f").describe(e,r),this}detectLocale(e){return ce("<boolean>",[e],arguments.length),ae(this,Nt,e,"f"),this}env(e){return ce("[string|boolean]",[e],arguments.length),e===!1?delete O(this,ue,"f").envPrefix:O(this,ue,"f").envPrefix=e||"",this}epilogue(e){return ce("<string>",[e],arguments.length),O(this,de,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,r){return ce("<string|array> [string]",[e,r],arguments.length),Array.isArray(
187
+ ing]",[e,r],arguments.length),this[ei](e,!0),O(this,de,"f").describe(e,r),this}detectLocale(e){return ce("<boolean>",[e],arguments.length),ae(this,Nt,e,"f"),this}env(e){return ce("[string|boolean]",[e],arguments.length),e===!1?delete O(this,ue,"f").envPrefix:O(this,ue,"f").envPrefix=e||"",this}epilogue(e){return ce("<string>",[e],arguments.length),O(this,de,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,r){return ce("<string|array> [string]",[e,r],arguments.length),Array.isArray(
186
188
  e)?e.forEach(n=>this.example(...n)):O(this,de,"f").example(e,r),this}exit(e,r){ae(this,ke,!0,"f"),ae(this,yt,r,"f"),O(this,Ve,"f")&&O(this,fe,"f").process.exit(e)}exitProcess(e=!0){return ce("[boolean]",[e],arguments.length),ae(this,Ve,e,"f"),this}fail(e){if(ce("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new Oe("Invalid first argument. Expected function or boolean 'false'");return O(this,de,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,r){
187
189
  return ce("<array> [function]",[e,r],arguments.length),r?O(this,Fe,"f").getCompletion(e,r):new Promise((n,s)=>{O(this,Fe,"f").getCompletion(e,(i,o)=>{i?s(i):n(o)})})}getDemandedOptions(){return ce([],0),O(this,ue,"f").demandedOptions}getDemandedCommands(){return ce([],0),O(this,ue,"f").demandedCommands}getDeprecatedOptions(){return ce([],0),O(this,ue,"f").deprecatedOptions}getDetectLocale(){return O(this,Nt,"f")}getExitProcess(){return O(this,Ve,"f")}getGroups(){return Object.assign({},O(this,st,
188
190
  "f"),O(this,jt,"f"))}getHelp(){if(ae(this,ke,!0,"f"),!O(this,de,"f").hasCachedHelpMessage()){if(!this.parsed){const r=this[Rr](O(this,$t,"f"),void 0,void 0,0,!0);if(Ae(r))return r.then(()=>O(this,de,"f").help())}const e=O(this,Re,"f").runDefaultBuilderOn(this);if(Ae(e))return e.then(()=>O(this,de,"f").help())}return Promise.resolve(O(this,de,"f").help())}getOptions(){return O(this,ue,"f")}getStrict(){return O(this,Lt,"f")}getStrictCommands(){return O(this,Dt,"f")}getStrictOptions(){return O(this,
189
191
  xt,"f")}global(e,r){return ce("<string|array> [boolean]",[e,r],arguments.length),e=[].concat(e),r!==!1?O(this,ue,"f").local=O(this,ue,"f").local.filter(n=>e.indexOf(n)===-1):e.forEach(n=>{O(this,ue,"f").local.includes(n)||O(this,ue,"f").local.push(n)}),this}group(e,r){ce("<string|array> <string>",[e,r],arguments.length);const n=O(this,jt,"f")[r]||O(this,st,"f")[r];O(this,jt,"f")[r]&&delete O(this,jt,"f")[r];const s={};return O(this,st,"f")[r]=(n||[]).concat(e).filter(i=>s[i]?!1:s[i]=!0),this}hide(e){
190
- return ce("<string>",[e],arguments.length),O(this,ue,"f").hiddenOptions.push(e),this}implies(e,r){return ce("<string|object> [number|string|array]",[e,r],arguments.length),O(this,Ee,"f").implies(e,r),this}locale(e){return ce("[string]",[e],arguments.length),e===void 0?(this[Ks](),O(this,fe,"f").y18n.getLocale()):(ae(this,Nt,!1,"f"),O(this,fe,"f").y18n.setLocale(e),this)}middleware(e,r,n){return O(this,ze,"f").addMiddleware(e,!!r,n)}nargs(e,r){return ce("<string|object|array> [number]",[e,r],arguments.
191
- length),this[Jt](this.nargs.bind(this),"narg",e,r),this}normalize(e){return ce("<array|string>",[e],arguments.length),this[_t]("normalize",e),this}number(e){return ce("<array|string>",[e],arguments.length),this[_t]("number",e),this[qt](e),this}option(e,r){if(ce("<string|object> [object]",[e,r],arguments.length),typeof e=="object")Object.keys(e).forEach(n=>{this.options(n,e[n])});else{typeof r!="object"&&(r={}),this[qt](e),O(this,it,"f")&&(e==="version"||r?.alias==="version")&&this[Ba](['"version\
192
+ return ce("<string>",[e],arguments.length),O(this,ue,"f").hiddenOptions.push(e),this}implies(e,r){return ce("<string|object> [number|string|array]",[e,r],arguments.length),O(this,Ee,"f").implies(e,r),this}locale(e){return ce("[string]",[e],arguments.length),e===void 0?(this[Ys](),O(this,fe,"f").y18n.getLocale()):(ae(this,Nt,!1,"f"),O(this,fe,"f").y18n.setLocale(e),this)}middleware(e,r,n){return O(this,ze,"f").addMiddleware(e,!!r,n)}nargs(e,r){return ce("<string|object|array> [number]",[e,r],arguments.
193
+ length),this[Jt](this.nargs.bind(this),"narg",e,r),this}normalize(e){return ce("<array|string>",[e],arguments.length),this[_t]("normalize",e),this}number(e){return ce("<array|string>",[e],arguments.length),this[_t]("number",e),this[qt](e),this}option(e,r){if(ce("<string|object> [object]",[e,r],arguments.length),typeof e=="object")Object.keys(e).forEach(n=>{this.options(n,e[n])});else{typeof r!="object"&&(r={}),this[qt](e),O(this,it,"f")&&(e==="version"||r?.alias==="version")&&this[Ya](['"version\
192
194
  " is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
193
195
  `),void 0,"versionWarning"),O(this,ue,"f").key[e]=!0,r.alias&&this.alias(e,r.alias);const n=r.deprecate||r.deprecated;n&&this.deprecateOption(e,n);const s=r.demand||r.required||r.require;s&&this.demand(e,s),r.demandOption&&this.demandOption(e,typeof r.demandOption=="string"?r.demandOption:void 0),r.conflicts&&this.conflicts(e,r.conflicts),"default"in r&&this.default(e,r.default),r.implies!==void 0&&this.implies(e,r.implies),r.nargs!==void 0&&this.nargs(e,r.nargs),r.config&&this.config(e,r.configParser),
194
196
  r.normalize&&this.normalize(e),r.choices&&this.choices(e,r.choices),r.coerce&&this.coerce(e,r.coerce),r.group&&this.group(e,r.group),(r.boolean||r.type==="boolean")&&(this.boolean(e),r.alias&&this.boolean(r.alias)),(r.array||r.type==="array")&&(this.array(e),r.alias&&this.array(r.alias)),(r.number||r.type==="number")&&(this.number(e),r.alias&&this.number(r.alias)),(r.string||r.type==="string")&&(this.string(e),r.alias&&this.string(r.alias)),(r.count||r.type==="count")&&this.count(e),typeof r.global==
195
197
  "boolean"&&this.global(e,r.global),r.defaultDescription&&(O(this,ue,"f").defaultDescription[e]=r.defaultDescription),r.skipValidation&&this.skipValidation(e);const i=r.describe||r.description||r.desc,o=O(this,de,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(o,e)||typeof i=="string")&&this.describe(e,i),r.hidden&&this.hide(e),r.requiresArg&&this.requiresArg(e)}return this}options(e,r){return this.option(e,r)}parse(e,r,n){ce("[string|array] [function|boolean|object] [function]",[e,
196
- r,n],arguments.length),this[Wa](),typeof e>"u"&&(e=O(this,$t,"f")),typeof r=="object"&&(ae(this,Tt,r,"f"),r=n),typeof r=="function"&&(ae(this,Me,r,"f"),r=!1),r||ae(this,$t,e,"f"),O(this,Me,"f")&&ae(this,Ve,!1,"f");const s=this[Rr](e,!!r),i=this.parsed;return O(this,Fe,"f").setParsed(this.parsed),Ae(s)?s.then(o=>(O(this,Me,"f")&&O(this,Me,"f").call(this,O(this,yt,"f"),o,O(this,Ce,"f")),o)).catch(o=>{throw O(this,Me,"f")&&O(this,Me,"f")(o,this.parsed.argv,O(this,Ce,"f")),o}).finally(()=>{this[ei](),
197
- this.parsed=i}):(O(this,Me,"f")&&O(this,Me,"f").call(this,O(this,yt,"f"),s,O(this,Ce,"f")),this[ei](),this.parsed=i,s)}parseAsync(e,r,n){const s=this.parse(e,r,n);return Ae(s)?s:Promise.resolve(s)}parseSync(e,r,n){const s=this.parse(e,r,n);if(Ae(s))throw new Oe(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return s}parserConfiguration(e){return ce("<object>",[e],arguments.length),ae(this,Zr,e,"f"),this}pkgConf(e,r){ce("<string> [string]",[e,r],arguments.length);
198
- let n=null;const s=this[Ys](r||O(this,It,"f"));return s[e]&&typeof s[e]=="object"&&(n=Bs(s[e],r||O(this,It,"f"),this[kt]()["deep-merge-config"]||!1,O(this,fe,"f")),O(this,ue,"f").configObjects=(O(this,ue,"f").configObjects||[]).concat(n)),this}positional(e,r){ce("<string> <object>",[e,r],arguments.length);const n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=br(r,(o,a)=>o==="type"&&!["string","number","boole\
198
+ r,n],arguments.length),this[Xa](),typeof e>"u"&&(e=O(this,$t,"f")),typeof r=="object"&&(ae(this,Tt,r,"f"),r=n),typeof r=="function"&&(ae(this,Me,r,"f"),r=!1),r||ae(this,$t,e,"f"),O(this,Me,"f")&&ae(this,Ve,!1,"f");const s=this[Rr](e,!!r),i=this.parsed;return O(this,Fe,"f").setParsed(this.parsed),Ae(s)?s.then(o=>(O(this,Me,"f")&&O(this,Me,"f").call(this,O(this,yt,"f"),o,O(this,Ce,"f")),o)).catch(o=>{throw O(this,Me,"f")&&O(this,Me,"f")(o,this.parsed.argv,O(this,Ce,"f")),o}).finally(()=>{this[ti](),
199
+ this.parsed=i}):(O(this,Me,"f")&&O(this,Me,"f").call(this,O(this,yt,"f"),s,O(this,Ce,"f")),this[ti](),this.parsed=i,s)}parseAsync(e,r,n){const s=this.parse(e,r,n);return Ae(s)?s:Promise.resolve(s)}parseSync(e,r,n){const s=this.parse(e,r,n);if(Ae(s))throw new Oe(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return s}parserConfiguration(e){return ce("<object>",[e],arguments.length),ae(this,Zr,e,"f"),this}pkgConf(e,r){ce("<string> [string]",[e,r],arguments.length);
200
+ let n=null;const s=this[Xs](r||O(this,It,"f"));return s[e]&&typeof s[e]=="object"&&(n=Ws(s[e],r||O(this,It,"f"),this[kt]()["deep-merge-config"]||!1,O(this,fe,"f")),O(this,ue,"f").configObjects=(O(this,ue,"f").configObjects||[]).concat(n)),this}positional(e,r){ce("<string> <object>",[e,r],arguments.length);const n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=br(r,(o,a)=>o==="type"&&!["string","number","boole\
199
201
  an"].includes(a)?!1:n.includes(o));const s=O(this,Sr,"f").fullCommands[O(this,Sr,"f").fullCommands.length-1],i=s?O(this,Re,"f").cmdToParseOptions(s):{array:[],alias:{},default:{},demand:{}};return Br(i).forEach(o=>{const a=i[o];Array.isArray(a)?a.indexOf(e)!==-1&&(r[o]=!0):a[e]&&!(o in r)&&(r[o]=a[e])}),this.group(e,O(this,de,"f").getPositionalGroupName()),this.option(e,r)}recommendCommands(e=!0){return ce("[boolean]",[e],arguments.length),ae(this,en,e,"f"),this}required(e,r,n){return this.demand(
200
202
  e,r,n)}require(e,r,n){return this.demand(e,r,n)}requiresArg(e){return ce("<array|string|object> [number]",[e],arguments.length),typeof e=="string"&&O(this,ue,"f").narg[e]?this:(this[Jt](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,r){return ce("[string] [string]",[e,r],arguments.length),e=e||this.$0,O(this,Yt,"f").log(O(this,Fe,"f").generateCompletionScript(e,r||O(this,xe,"f")||"completion")),this}showHelp(e){if(ce("[string|function]",[e],arguments.length),ae(this,ke,!0,
201
203
  "f"),!O(this,de,"f").hasCachedHelpMessage()){if(!this.parsed){const n=this[Rr](O(this,$t,"f"),void 0,void 0,0,!0);if(Ae(n))return n.then(()=>{O(this,de,"f").showHelp(e)}),this}const r=O(this,Re,"f").runDefaultBuilderOn(this);if(Ae(r))return r.then(()=>{O(this,de,"f").showHelp(e)}),this}return O(this,de,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,r){return ce("[boolean|string] [string]",[e,r],arguments.length),O(this,de,"f").showHelpOnFail(e,
202
204
  r),this}showVersion(e){return ce("[string|function]",[e],arguments.length),O(this,de,"f").showVersion(e),this}skipValidation(e){return ce("<array|string>",[e],arguments.length),this[_t]("skipValidation",e),this}strict(e){return ce("[boolean]",[e],arguments.length),ae(this,Lt,e!==!1,"f"),this}strictCommands(e){return ce("[boolean]",[e],arguments.length),ae(this,Dt,e!==!1,"f"),this}strictOptions(e){return ce("[boolean]",[e],arguments.length),ae(this,xt,e!==!1,"f"),this}string(e){return ce("<array|\
203
205
  string>",[e],arguments.length),this[_t]("string",e),this[qt](e),this}terminalWidth(){return ce([],0),O(this,fe,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return ce("<object>",[e],arguments.length),ae(this,Nt,!1,"f"),O(this,fe,"f").y18n.updateLocale(e),this}usage(e,r,n,s){if(ce("<string|null|undefined> [string|boolean] [function|object] [function]",[e,r,n,s],arguments.length),r!==void 0){if(Ye(e,null,O(this,fe,"f")),(e||"").match(/^\$0( |$)/))return this.
204
- command(e,r,n,s);throw new Oe(".usage() description must start with $0 if being used as alias for .command()")}else return O(this,de,"f").usage(e),this}usageConfiguration(e){return ce("<object>",[e],arguments.length),ae(this,tn,e,"f"),this}version(e,r,n){const s="version";if(ce("[boolean|string] [string] [string]",[e,r,n],arguments.length),O(this,it,"f")&&(this[Ws](O(this,it,"f")),O(this,de,"f").version(void 0),ae(this,it,null,"f")),arguments.length===0)n=this[Xa](),e=s;else if(arguments.length===
206
+ command(e,r,n,s);throw new Oe(".usage() description must start with $0 if being used as alias for .command()")}else return O(this,de,"f").usage(e),this}usageConfiguration(e){return ce("<object>",[e],arguments.length),ae(this,tn,e,"f"),this}version(e,r,n){const s="version";if(ce("[boolean|string] [string] [string]",[e,r,n],arguments.length),O(this,it,"f")&&(this[Ks](O(this,it,"f")),O(this,de,"f").version(void 0),ae(this,it,null,"f")),arguments.length===0)n=this[Za](),e=s;else if(arguments.length===
205
207
  1){if(e===!1)return this;n=e,e=s}else arguments.length===2&&(n=r,r=void 0);return ae(this,it,typeof e=="string"?e:s,"f"),r=r||O(this,de,"f").deferY18nLookup("Show version number"),O(this,de,"f").version(n||void 0),this.boolean(O(this,it,"f")),this.describe(O(this,it,"f"),r),this}wrap(e){return ce("<number|null|undefined>",[e],arguments.length),O(this,de,"f").wrap(e),this}[(Re=new WeakMap,It=new WeakMap,Sr=new WeakMap,Fe=new WeakMap,xe=new WeakMap,Kr=new WeakMap,yt=new WeakMap,Nt=new WeakMap,Yr=new WeakMap,
206
- Ve=new WeakMap,Xr=new WeakMap,ze=new WeakMap,st=new WeakMap,ke=new WeakMap,Ge=new WeakMap,Jr=new WeakMap,Yt=new WeakMap,Ce=new WeakMap,ue=new WeakMap,Qr=new WeakMap,Zr=new WeakMap,Me=new WeakMap,Tt=new WeakMap,Xt=new WeakMap,jt=new WeakMap,$t=new WeakMap,en=new WeakMap,fe=new WeakMap,Lt=new WeakMap,Dt=new WeakMap,xt=new WeakMap,de=new WeakMap,tn=new WeakMap,it=new WeakMap,Ee=new WeakMap,za)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[Ga](){return{
208
+ Ve=new WeakMap,Xr=new WeakMap,ze=new WeakMap,st=new WeakMap,ke=new WeakMap,Ge=new WeakMap,Jr=new WeakMap,Yt=new WeakMap,Ce=new WeakMap,ue=new WeakMap,Qr=new WeakMap,Zr=new WeakMap,Me=new WeakMap,Tt=new WeakMap,Xt=new WeakMap,jt=new WeakMap,$t=new WeakMap,en=new WeakMap,fe=new WeakMap,Lt=new WeakMap,Dt=new WeakMap,xt=new WeakMap,de=new WeakMap,tn=new WeakMap,it=new WeakMap,Ee=new WeakMap,Wa)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[Ka](){return{
207
209
  log:(...e)=>{this[rn]()||console.log(...e),ae(this,ke,!0,"f"),O(this,Ce,"f").length&&ae(this,Ce,O(this,Ce,"f")+`
208
210
  `,"f"),ae(this,Ce,O(this,Ce,"f")+e.join(" "),"f")},error:(...e)=>{this[rn]()||console.error(...e),ae(this,ke,!0,"f"),O(this,Ce,"f").length&&ae(this,Ce,O(this,Ce,"f")+`
209
- `,"f"),ae(this,Ce,O(this,Ce,"f")+e.join(" "),"f")}}}[Ws](e){Br(O(this,ue,"f")).forEach(r=>{if((s=>s==="configObjects")(r))return;const n=O(this,ue,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete O(this,de,"f").getDescriptions()[e]}[Ba](e,r,n){O(this,Yr,"f")[n]||(O(this,fe,"f").process.emitWarning(e,r),O(this,Yr,"f")[n]=!0)}[Wa](){O(this,Xr,"f").push({options:O(this,ue,"f"),configObjects:O(this,ue,"f").configObjects.slice(0),exitProcess:O(
210
- this,Ve,"f"),groups:O(this,st,"f"),strict:O(this,Lt,"f"),strictCommands:O(this,Dt,"f"),strictOptions:O(this,xt,"f"),completionCommand:O(this,xe,"f"),output:O(this,Ce,"f"),exitError:O(this,yt,"f"),hasOutput:O(this,ke,"f"),parsed:this.parsed,parseFn:O(this,Me,"f"),parseContext:O(this,Tt,"f")}),O(this,de,"f").freeze(),O(this,Ee,"f").freeze(),O(this,Re,"f").freeze(),O(this,ze,"f").freeze()}[Ka](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(O(this,fe,"f").process.argv()[0])?r=O(this,fe,"f").
211
- process.argv().slice(1,2):r=O(this,fe,"f").process.argv().slice(0,1),e=r.map(n=>{const s=this[ac](O(this,It,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&s.length<n.length?s:n}).join(" ").trim(),O(this,fe,"f").getEnv("_")&&O(this,fe,"f").getProcessArgvBin()===O(this,fe,"f").getEnv("_")&&(e=O(this,fe,"f").getEnv("_").replace(`${O(this,fe,"f").path.dirname(O(this,fe,"f").process.execPath())}/`,"")),e}[kt](){return O(this,Zr,"f")}[Ya](){return O(this,tn,"f")}[Ks](){if(!O(this,Nt,"f"))return;const e=O(
212
- this,fe,"f").getEnv("LC_ALL")||O(this,fe,"f").getEnv("LC_MESSAGES")||O(this,fe,"f").getEnv("LANG")||O(this,fe,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[Xa](){return this[Ys]().version||"unknown"}[Ja](e){const r=e["--"]?e["--"]:e._;for(let n=0,s;(s=r[n])!==void 0;n++)O(this,fe,"f").Parser.looksLikeNumber(s)&&Number.isSafeInteger(Math.floor(parseFloat(`${s}`)))&&(r[n]=Number(s));return e}[Ys](e){const r=e||"*";if(O(this,Xt,"f")[r])return O(this,Xt,"f")[r];let n={};try{let s=e||
213
- O(this,fe,"f").mainFilename;!e&&O(this,fe,"f").path.extname(s)&&(s=O(this,fe,"f").path.dirname(s));const i=O(this,fe,"f").findUp(s,(o,a)=>{if(a.includes("package.json"))return"package.json"});Ye(i,void 0,O(this,fe,"f")),n=JSON.parse(O(this,fe,"f").readFileSync(i,"utf8"))}catch{}return O(this,Xt,"f")[r]=n||{},O(this,Xt,"f")[r]}[_t](e,r){r=[].concat(r),r.forEach(n=>{n=this[Qs](n),O(this,ue,"f")[e].push(n)})}[Jt](e,r,n,s){this[Js](e,r,n,s,(i,o,a)=>{O(this,ue,"f")[i][o]=a})}[Xs](e,r,n,s){this[Js](e,
214
- r,n,s,(i,o,a)=>{O(this,ue,"f")[i][o]=(O(this,ue,"f")[i][o]||[]).concat(a)})}[Js](e,r,n,s,i){if(Array.isArray(n))n.forEach(o=>{e(o,s)});else if((o=>typeof o=="object")(n))for(const o of Br(n))e(o,n[o]);else i(r,this[Qs](n),s)}[Qs](e){return e==="__proto__"?"___proto___":e}[Zs](e,r){return this[Jt](this[Zs].bind(this),"key",e,r),this}[ei](){var e,r,n,s,i,o,a,c,l,u,f,p;const $=O(this,Xr,"f").pop();Ye($,void 0,O(this,fe,"f"));let b;e=this,r=this,n=this,s=this,i=this,o=this,a=this,c=this,l=this,u=this,
215
- f=this,p=this,{options:{set value(y){ae(e,ue,y,"f")}}.value,configObjects:b,exitProcess:{set value(y){ae(r,Ve,y,"f")}}.value,groups:{set value(y){ae(n,st,y,"f")}}.value,output:{set value(y){ae(s,Ce,y,"f")}}.value,exitError:{set value(y){ae(i,yt,y,"f")}}.value,hasOutput:{set value(y){ae(o,ke,y,"f")}}.value,parsed:this.parsed,strict:{set value(y){ae(a,Lt,y,"f")}}.value,strictCommands:{set value(y){ae(c,Dt,y,"f")}}.value,strictOptions:{set value(y){ae(l,xt,y,"f")}}.value,completionCommand:{set value(y){
216
- ae(u,xe,y,"f")}}.value,parseFn:{set value(y){ae(f,Me,y,"f")}}.value,parseContext:{set value(y){ae(p,Tt,y,"f")}}.value}=$,O(this,ue,"f").configObjects=b,O(this,de,"f").unfreeze(),O(this,Ee,"f").unfreeze(),O(this,Re,"f").unfreeze(),O(this,ze,"f").unfreeze()}[Qa](e,r){return vr(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[Za].bind(this),getContext:this[ec].bind(this),getHasOutput:this[tc].bind(this),getLoggerInstance:this[rc].bind(this),getParseContext:this[nc].bind(this),getParserConfiguration:this[kt].
217
- bind(this),getUsageConfiguration:this[Ya].bind(this),getUsageInstance:this[sc].bind(this),getValidationInstance:this[ic].bind(this),hasParseCallback:this[rn].bind(this),isGlobalContext:this[oc].bind(this),postProcess:this[Mt].bind(this),reset:this[ti].bind(this),runValidation:this[ri].bind(this),runYargsParserAndExecuteCommands:this[Rr].bind(this),setHasOutput:this[cc].bind(this)}}[Za](){return O(this,Re,"f")}[ec](){return O(this,Sr,"f")}[tc](){return O(this,ke,"f")}[rc](){return O(this,Yt,"f")}[nc](){
218
- return O(this,Tt,"f")||{}}[sc](){return O(this,de,"f")}[ic](){return O(this,Ee,"f")}[rn](){return!!O(this,Me,"f")}[oc](){return O(this,Jr,"f")}[Mt](e,r,n,s){return n||Ae(e)||(r||(e=this[za](e)),(this[kt]()["parse-positional-numbers"]||this[kt]()["parse-positional-numbers"]===void 0)&&(e=this[Ja](e)),s&&(e=_r(e,this,O(this,ze,"f").getMiddleware(),!1))),e}[ti](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={};
219
- r.local.forEach(o=>{n[o]=!0,(e[o]||[]).forEach(a=>{n[a]=!0})}),Object.assign(O(this,jt,"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,
211
+ `,"f"),ae(this,Ce,O(this,Ce,"f")+e.join(" "),"f")}}}[Ks](e){Br(O(this,ue,"f")).forEach(r=>{if((s=>s==="configObjects")(r))return;const n=O(this,ue,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete O(this,de,"f").getDescriptions()[e]}[Ya](e,r,n){O(this,Yr,"f")[n]||(O(this,fe,"f").process.emitWarning(e,r),O(this,Yr,"f")[n]=!0)}[Xa](){O(this,Xr,"f").push({options:O(this,ue,"f"),configObjects:O(this,ue,"f").configObjects.slice(0),exitProcess:O(
212
+ this,Ve,"f"),groups:O(this,st,"f"),strict:O(this,Lt,"f"),strictCommands:O(this,Dt,"f"),strictOptions:O(this,xt,"f"),completionCommand:O(this,xe,"f"),output:O(this,Ce,"f"),exitError:O(this,yt,"f"),hasOutput:O(this,ke,"f"),parsed:this.parsed,parseFn:O(this,Me,"f"),parseContext:O(this,Tt,"f")}),O(this,de,"f").freeze(),O(this,Ee,"f").freeze(),O(this,Re,"f").freeze(),O(this,ze,"f").freeze()}[Ja](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(O(this,fe,"f").process.argv()[0])?r=O(this,fe,"f").
213
+ process.argv().slice(1,2):r=O(this,fe,"f").process.argv().slice(0,1),e=r.map(n=>{const s=this[lc](O(this,It,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&s.length<n.length?s:n}).join(" ").trim(),O(this,fe,"f").getEnv("_")&&O(this,fe,"f").getProcessArgvBin()===O(this,fe,"f").getEnv("_")&&(e=O(this,fe,"f").getEnv("_").replace(`${O(this,fe,"f").path.dirname(O(this,fe,"f").process.execPath())}/`,"")),e}[kt](){return O(this,Zr,"f")}[Qa](){return O(this,tn,"f")}[Ys](){if(!O(this,Nt,"f"))return;const e=O(
214
+ this,fe,"f").getEnv("LC_ALL")||O(this,fe,"f").getEnv("LC_MESSAGES")||O(this,fe,"f").getEnv("LANG")||O(this,fe,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[Za](){return this[Xs]().version||"unknown"}[ec](e){const r=e["--"]?e["--"]:e._;for(let n=0,s;(s=r[n])!==void 0;n++)O(this,fe,"f").Parser.looksLikeNumber(s)&&Number.isSafeInteger(Math.floor(parseFloat(`${s}`)))&&(r[n]=Number(s));return e}[Xs](e){const r=e||"*";if(O(this,Xt,"f")[r])return O(this,Xt,"f")[r];let n={};try{let s=e||
215
+ O(this,fe,"f").mainFilename;!e&&O(this,fe,"f").path.extname(s)&&(s=O(this,fe,"f").path.dirname(s));const i=O(this,fe,"f").findUp(s,(o,a)=>{if(a.includes("package.json"))return"package.json"});Ye(i,void 0,O(this,fe,"f")),n=JSON.parse(O(this,fe,"f").readFileSync(i,"utf8"))}catch{}return O(this,Xt,"f")[r]=n||{},O(this,Xt,"f")[r]}[_t](e,r){r=[].concat(r),r.forEach(n=>{n=this[Zs](n),O(this,ue,"f")[e].push(n)})}[Jt](e,r,n,s){this[Qs](e,r,n,s,(i,o,a)=>{O(this,ue,"f")[i][o]=a})}[Js](e,r,n,s){this[Qs](e,
216
+ r,n,s,(i,o,a)=>{O(this,ue,"f")[i][o]=(O(this,ue,"f")[i][o]||[]).concat(a)})}[Qs](e,r,n,s,i){if(Array.isArray(n))n.forEach(o=>{e(o,s)});else if((o=>typeof o=="object")(n))for(const o of Br(n))e(o,n[o]);else i(r,this[Zs](n),s)}[Zs](e){return e==="__proto__"?"___proto___":e}[ei](e,r){return this[Jt](this[ei].bind(this),"key",e,r),this}[ti](){var e,r,n,s,i,o,a,u,l,c,f,p;const $=O(this,Xr,"f").pop();Ye($,void 0,O(this,fe,"f"));let b;e=this,r=this,n=this,s=this,i=this,o=this,a=this,u=this,l=this,c=this,
217
+ f=this,p=this,{options:{set value(y){ae(e,ue,y,"f")}}.value,configObjects:b,exitProcess:{set value(y){ae(r,Ve,y,"f")}}.value,groups:{set value(y){ae(n,st,y,"f")}}.value,output:{set value(y){ae(s,Ce,y,"f")}}.value,exitError:{set value(y){ae(i,yt,y,"f")}}.value,hasOutput:{set value(y){ae(o,ke,y,"f")}}.value,parsed:this.parsed,strict:{set value(y){ae(a,Lt,y,"f")}}.value,strictCommands:{set value(y){ae(u,Dt,y,"f")}}.value,strictOptions:{set value(y){ae(l,xt,y,"f")}}.value,completionCommand:{set value(y){
218
+ ae(c,xe,y,"f")}}.value,parseFn:{set value(y){ae(f,Me,y,"f")}}.value,parseContext:{set value(y){ae(p,Tt,y,"f")}}.value}=$,O(this,ue,"f").configObjects=b,O(this,de,"f").unfreeze(),O(this,Ee,"f").unfreeze(),O(this,Re,"f").unfreeze(),O(this,ze,"f").unfreeze()}[tc](e,r){return vr(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[rc].bind(this),getContext:this[nc].bind(this),getHasOutput:this[sc].bind(this),getLoggerInstance:this[ic].bind(this),getParseContext:this[oc].bind(this),getParserConfiguration:this[kt].
219
+ bind(this),getUsageConfiguration:this[Qa].bind(this),getUsageInstance:this[ac].bind(this),getValidationInstance:this[cc].bind(this),hasParseCallback:this[rn].bind(this),isGlobalContext:this[uc].bind(this),postProcess:this[Mt].bind(this),reset:this[ri].bind(this),runValidation:this[ni].bind(this),runYargsParserAndExecuteCommands:this[Rr].bind(this),setHasOutput:this[fc].bind(this)}}[rc](){return O(this,Re,"f")}[nc](){return O(this,Sr,"f")}[sc](){return O(this,ke,"f")}[ic](){return O(this,Yt,"f")}[oc](){
220
+ return O(this,Tt,"f")||{}}[ac](){return O(this,de,"f")}[cc](){return O(this,Ee,"f")}[rn](){return!!O(this,Me,"f")}[uc](){return O(this,Jr,"f")}[Mt](e,r,n,s){return n||Ae(e)||(r||(e=this[Wa](e)),(this[kt]()["parse-positional-numbers"]||this[kt]()["parse-positional-numbers"]===void 0)&&(e=this[ec](e)),s&&(e=_r(e,this,O(this,ze,"f").getMiddleware(),!1))),e}[ri](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={};
221
+ r.local.forEach(o=>{n[o]=!0,(e[o]||[]).forEach(a=>{n[a]=!0})}),Object.assign(O(this,jt,"f"),Object.keys(O(this,st,"f")).reduce((o,a)=>{const u=O(this,st,"f")[a].filter(l=>!(l in n));return u.length>0&&(o[a]=u),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,
220
222
  ue,"f")[o]||[]).filter(a=>!n[a])}),i.forEach(o=>{r[o]=br(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):fm(this,O(this,fe,"f")),"f"),ae(this,Ee,O(this,Ee,"f")?O(this,Ee,"f").reset(n):vm(this,O(this,de,"f"),O(this,fe,"f")),"f"),ae(this,Re,O(this,Re,"f")?O(this,Re,"f").reset():om(O(this,de,"f"),O(this,Ee,"f"),O(this,ze,"f"),O(this,fe,"f")),"f"),O(this,Fe,"f")||ae(this,Fe,gm(this,O(this,de,"f"),O(this,Re,"f"),O(
221
- this,fe,"f")),"f"),O(this,ze,"f").reset(),ae(this,xe,null,"f"),ae(this,Ce,"","f"),ae(this,yt,null,"f"),ae(this,ke,!1,"f"),this.parsed=!1,this}[ac](e,r){return O(this,fe,"f").path.relative(e,r)}[Rr](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[kt]();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({},
222
- O(this,ue,"f"),{configuration:{"parse-positional-numbers":!1,...c}})),u=Object.assign(l.argv,O(this,Tt,"f"));let f;const p=l.aliases;let $=!1,b=!1;Object.keys(u).forEach(y=>{y===O(this,Ge,"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[Ks](),r)return this[Mt](u,a,!!n,!1);O(this,Ge,"f")&&[O(this,Ge,"f")].concat(p[O(this,Ge,"f")]||[]).filter(m=>m.length>1).includes(""+u._[u._.length-1])&&(u._.pop(),$=!0),ae(this,
223
- Jr,!1,"f");const y=O(this,Re,"f").getCommands(),d=O(this,Fe,"f").completionKey in u,g=$||d||i;if(u._.length){if(y.length){let h;for(let m=s||0,_;u._[m]!==void 0;m++)if(_=String(u._[m]),y.includes(_)&&_!==O(this,xe,"f")){const v=O(this,Re,"f").runCommand(_,this,l,m+1,i,$||b||i);return this[Mt](v,a,!!n,!1)}else if(!h&&_!==O(this,xe,"f")){h=_;break}!O(this,Re,"f").hasDefaultCommand()&&O(this,en,"f")&&h&&!g&&O(this,Ee,"f").recommendCommands(h,y)}O(this,xe,"f")&&u._.includes(O(this,xe,"f"))&&!d&&(O(this,
224
- Ve,"f")&&wr(!0),this.showCompletionScript(),this.exit(0))}if(O(this,Re,"f").hasDefaultCommand()&&!g){const h=O(this,Re,"f").runCommand(null,this,l,0,i,$||b||i);return this[Mt](h,a,!!n,!1)}if(d){O(this,Ve,"f")&&wr(!0),e=[].concat(e);const h=e.slice(e.indexOf(`--${O(this,Fe,"f").completionKey}`)+1);return O(this,Fe,"f").getCompletion(h,(m,_)=>{if(m)throw new Oe(m.message);(_||[]).forEach(v=>{O(this,Yt,"f").log(v)}),this.exit(0)}),this[Mt](u,!a,!!n,!1)}if(O(this,ke,"f")||($?(O(this,Ve,"f")&&wr(!0),
225
- o=!0,this.showHelp("log"),this.exit(0)):b&&(O(this,Ve,"f")&&wr(!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(h=>O(this,ue,"f").skipValidation.indexOf(h)>=0&&u[h]===!0)),!o){if(l.error)throw new Oe(l.error.message);if(!d){const h=this[ri](p,{},l.error);n||(f=_r(u,this,O(this,ze,"f").getMiddleware(),!0)),f=this[Qa](h,f??u),Ae(f)&&!n&&(f=f.then(()=>_r(u,this,O(this,ze,"f").getMiddleware(),!1)))}}}catch(y){if(y instanceof
226
- Oe)O(this,de,"f").fail(y.message,y);else throw y}return this[Mt](f??u,a,!!n,!0)}[ri](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,Dt,"f")&&(a=O(this,Ee,"f").unknownCommands(o)),O(this,Lt,"f")&&!a?O(this,Ee,"f").unknownArguments(o,e,r,!!s):O(this,xt,"f")&&O(this,Ee,"f").unknownArguments(o,e,{},!1,!1),O(this,Ee,"f").limitedChoices(o),O(this,Ee,"f").implications(o),O(this,
227
- Ee,"f").conflicting(o)}}[cc](){ae(this,ke,!0,"f")}[qt](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 Rm(t){return!!t&&typeof t.getInternalMethods=="function"}const Am=Em(Zp),Ar={type:"string",desc:"<directory> with LikeC4 sources (default is current directory)",normalize:!0,default:".",coerce:ye},Be={alias:"use-dot-bin",boolean:!0,type:"boolean",desc:'use graphviz binaries ("dot" should be on PATH)',default:!1},uc={boolean:!0,type:"boo\
228
- lean",desc:'use hash history for navigation, e.g. "/#/view" instead of "/view"'},Or={alias:"o",type:"string",desc:"<directory> output directory",normalize:!0,coerce:ye},ni={alias:"w",type:"string",desc:'prefix for Webcomponents, e.g "c4" generates <c4-view ../>',default:"likec4"},lc={alias:["base-url"],type:"string",desc:'base url the app is being served from, e.g. "/" or "/pages/"'},fc={boolean:!0,type:"boolean",desc:"overview all diagrams as graph [experimental]",default:!1},Om={boolean:!0,type:"\
229
- boolean",desc:"outputs a single self-contained HTML file with all required resources inlined"},Cm={alias:"l",type:"string",desc:"ip address of the network interface to listen on",default:"localhost"},dc=t=>t instanceof URL?_a(t):t;function Pm(t,{cwd:e=Se.cwd(),type:r="file",stopAt:n}={}){let s=me.resolve(dc(e)??"");const{root:i}=me.parse(s);for(n=me.resolve(s,dc(n)??i);s&&s!==n&&s!==i;){const o=me.isAbsolute(t)?t:me.join(s,t);try{const a=pe.statSync(o,{throwIfNoEntry:!1});if(r==="file"&&a?.isFile()||
230
- r==="directory"&&a?.isDirectory())return o}catch{}s=me.dirname(s)}}function Im({cwd:t=Se.cwd()}={}){return Pm("package.json",{cwd:t})}const si=tt("vite"),nn=Ot(_a(import.meta.url)),Nm=`
223
+ this,fe,"f")),"f"),O(this,ze,"f").reset(),ae(this,xe,null,"f"),ae(this,Ce,"","f"),ae(this,yt,null,"f"),ae(this,ke,!1,"f"),this.parsed=!1,this}[lc](e,r){return O(this,fe,"f").path.relative(e,r)}[Rr](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[kt]();const a=!!O(this,ue,"f").configuration["populate--"],u=Object.assign({},O(this,ue,"f").configuration,{"populate--":!0}),l=O(this,fe,"f").Parser.detailed(e,Object.assign({},
224
+ O(this,ue,"f"),{configuration:{"parse-positional-numbers":!1,...u}})),c=Object.assign(l.argv,O(this,Tt,"f"));let f;const p=l.aliases;let $=!1,b=!1;Object.keys(c).forEach(y=>{y===O(this,Ge,"f")&&c[y]?$=!0:y===O(this,it,"f")&&c[y]&&(b=!0)}),c.$0=this.$0,this.parsed=l,s===0&&O(this,de,"f").clearCachedHelpMessage();try{if(this[Ys](),r)return this[Mt](c,a,!!n,!1);O(this,Ge,"f")&&[O(this,Ge,"f")].concat(p[O(this,Ge,"f")]||[]).filter(m=>m.length>1).includes(""+c._[c._.length-1])&&(c._.pop(),$=!0),ae(this,
225
+ Jr,!1,"f");const y=O(this,Re,"f").getCommands(),d=O(this,Fe,"f").completionKey in c,g=$||d||i;if(c._.length){if(y.length){let h;for(let m=s||0,_;c._[m]!==void 0;m++)if(_=String(c._[m]),y.includes(_)&&_!==O(this,xe,"f")){const v=O(this,Re,"f").runCommand(_,this,l,m+1,i,$||b||i);return this[Mt](v,a,!!n,!1)}else if(!h&&_!==O(this,xe,"f")){h=_;break}!O(this,Re,"f").hasDefaultCommand()&&O(this,en,"f")&&h&&!g&&O(this,Ee,"f").recommendCommands(h,y)}O(this,xe,"f")&&c._.includes(O(this,xe,"f"))&&!d&&(O(this,
226
+ Ve,"f")&&wr(!0),this.showCompletionScript(),this.exit(0))}if(O(this,Re,"f").hasDefaultCommand()&&!g){const h=O(this,Re,"f").runCommand(null,this,l,0,i,$||b||i);return this[Mt](h,a,!!n,!1)}if(d){O(this,Ve,"f")&&wr(!0),e=[].concat(e);const h=e.slice(e.indexOf(`--${O(this,Fe,"f").completionKey}`)+1);return O(this,Fe,"f").getCompletion(h,(m,_)=>{if(m)throw new Oe(m.message);(_||[]).forEach(v=>{O(this,Yt,"f").log(v)}),this.exit(0)}),this[Mt](c,!a,!!n,!1)}if(O(this,ke,"f")||($?(O(this,Ve,"f")&&wr(!0),
227
+ o=!0,this.showHelp("log"),this.exit(0)):b&&(O(this,Ve,"f")&&wr(!0),o=!0,O(this,de,"f").showVersion("log"),this.exit(0))),!o&&O(this,ue,"f").skipValidation.length>0&&(o=Object.keys(c).some(h=>O(this,ue,"f").skipValidation.indexOf(h)>=0&&c[h]===!0)),!o){if(l.error)throw new Oe(l.error.message);if(!d){const h=this[ni](p,{},l.error);n||(f=_r(c,this,O(this,ze,"f").getMiddleware(),!0)),f=this[tc](h,f??c),Ae(f)&&!n&&(f=f.then(()=>_r(c,this,O(this,ze,"f").getMiddleware(),!1)))}}}catch(y){if(y instanceof
228
+ Oe)O(this,de,"f").fail(y.message,y);else throw y}return this[Mt](f??c,a,!!n,!0)}[ni](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,Dt,"f")&&(a=O(this,Ee,"f").unknownCommands(o)),O(this,Lt,"f")&&!a?O(this,Ee,"f").unknownArguments(o,e,r,!!s):O(this,xt,"f")&&O(this,Ee,"f").unknownArguments(o,e,{},!1,!1),O(this,Ee,"f").limitedChoices(o),O(this,Ee,"f").implications(o),O(this,
229
+ Ee,"f").conflicting(o)}}[fc](){ae(this,ke,!0,"f")}[qt](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 Rm(t){return!!t&&typeof t.getInternalMethods=="function"}const Am=Em(Zp),Ar={type:"string",desc:"<directory> with LikeC4 sources (default is current directory)",normalize:!0,default:".",coerce:ye},Be={alias:"use-dot-bin",boolean:!0,type:"boolean",desc:'use graphviz binaries ("dot" should be on PATH)',default:!1},dc={boolean:!0,type:"boo\
230
+ lean",desc:'use hash history for navigation, e.g. "/#/view" instead of "/view"'},Or={alias:"o",type:"string",desc:"<directory> output directory",normalize:!0,coerce:ye},si={alias:"w",type:"string",desc:'prefix for Webcomponents, e.g "c4" generates <c4-view ../>',default:"likec4"},hc={alias:["base-url"],type:"string",desc:'base url the app is being served from, e.g. "/" or "/pages/"'},pc={boolean:!0,type:"boolean",desc:"overview all diagrams as graph [experimental]",default:!1},Om={boolean:!0,type:"\
231
+ boolean",desc:"outputs a single self-contained HTML file with all required resources inlined"},Cm={alias:"l",type:"string",desc:"ip address of the network interface to listen on",default:"localhost"},mc=t=>t instanceof URL?va(t):t;function Pm(t,{cwd:e=Se.cwd(),type:r="file",stopAt:n}={}){let s=pe.resolve(mc(e)??"");const{root:i}=pe.parse(s);for(n=pe.resolve(s,mc(n)??i);s&&s!==n&&s!==i;){const o=pe.isAbsolute(t)?t:pe.join(s,t);try{const a=me.statSync(o,{throwIfNoEntry:!1});if(r==="file"&&a?.isFile()||
232
+ r==="directory"&&a?.isDirectory())return o}catch{}s=pe.dirname(s)}}function Im({cwd:t=Se.cwd()}={}){return Pm("package.json",{cwd:t})}const ii=tt("vite"),nn=Ot(va(import.meta.url)),Nm=`
231
233
  /* prettier-ignore-start */
232
234
  /* eslint-disable */
233
235
 
@@ -239,92 +241,92 @@ r==="directory"&&a?.isDirectory())return o}catch{}s=me.dirname(s)}}function Im({
239
241
  `.trimStart(),Tm=`
240
242
 
241
243
  /* prettier-ignore-end */
242
- `,ii={banner:Nm,footer:Tm};function hc(){const t=Im({cwd:nn});if(!t)throw new Error("likec4 package folder not found");return Ot(t)}function oi(){const t=hc(),e=[ye(t,"__app__"),ye(nn,"../__app__"),ye(nn,"../../__app__"),ye(nn,"../../dist/__app__")],r=xh(e,Ct);if(!r)throw at.error(`likec4 app root does not exist, tried:
244
+ `,oi={banner:Nm,footer:Tm};function gc(){const t=Im({cwd:nn});if(!t)throw new Error("likec4 package folder not found");return Ot(t)}function ai(){const t=gc(),e=[ye(t,"__app__"),ye(nn,"../__app__"),ye(nn,"../../__app__"),ye(nn,"../../dist/__app__")],r=Dh(e,Ct);if(!r)throw at.error(`likec4 app root does not exist, tried:
243
245
  ${e.join(`
244
- `)}`),new Error("likec4 app root does not exist");return r}async function ai(){const t=await Hr(lr(Fr(),".likec4-public-"));return await Pt(lr(t,"likec4-views.js"),`// generated by likec4
245
- `),t}const ci=1e4;function ui(){const t=hc();return{"likec4/icons":ye(t,"icons"),"likec4/react":ye(t,"react"),"likec4/model":ye(t,"dist/model")}}var li={},pc;function fi(){return pc||(pc=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.
246
+ `)}`),new Error("likec4 app root does not exist");return r}async function ci(){const t=await Hr(lr(Fr(),".likec4-public-"));return await Pt(lr(t,"likec4-views.js"),`// generated by likec4
247
+ `),t}const ui=1e4;function li(){const t=gc();return{"likec4/icons":ye(t,"icons"),"likec4/react":ye(t,"react"),"likec4/model":ye(t,"dist/model")}}var fi={},yc;function di(){return yc||(yc=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.
246
248
  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===
247
- "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}}(li)),li}var di,mc;function hi(){if(mc)return di;mc=1;const t=fi();return di=(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.
248
- nodes)c+=n(l);return c};return n(e)},di}var pi,gc;function jm(){return gc||(gc=1,pi=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}),pi}var mi,yc;function Lm(){if(yc)return mi;yc=1;const t=jm(),e=(d,g,h)=>{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\
249
+ "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}}(fi)),fi}var hi,$c;function pi(){if($c)return hi;$c=1;const t=di();return hi=(e,r={})=>{const n=(s,i={})=>{const o=r.escapeInvalid&&t.isInvalidBrace(i),a=s.invalid===!0&&r.escapeInvalid===!0;let u="";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.
250
+ nodes)u+=n(l);return u};return n(e)},hi}var mi,_c;function jm(){return _c||(_c=1,mi=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}),mi}var gi,vc;function Lm(){if(vc)return gi;vc=1;const t=jm(),e=(d,g,h)=>{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\
249
251
  o be a number.");let m={relaxZeros:!0,...h};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=[],x=[];if(D&&(M.isPadded=D,M.maxLen=String(M.max).length),F<
250
- 0){let U=B<0?Math.abs(B):1;x=i(U,Math.abs(F),M,m),F=M.a=0}return B>=0&&(j=i(F,B,M,m)),M.negatives=x,M.positives=j,M.result=r(x,j),m.capture===!0?M.result=`(${M.result})`:m.wrap!==!1&&j.length+x.length>1&&(M.result=`(?:${M.result})`),e.cache[I]=M,M.result};function r(d,g,h){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 h=1,m=1,_=u(d,h),v=new Set([g]);for(;d<=_&&_<=g;)v.add(_),h+=1,_=u(d,h);for(_=f(g+1,m)-1;d<_&&_<=g;)v.add(
251
- _),m+=1,_=f(g+1,m)-1;return v=[...v],v.sort(c),v}function s(d,g,h){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+=h.shorthand===!0?"\\d":"[0-9]"),{pattern:v,count:[w],digits:_}}function i(d,g,h,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(!h.isPadded&&S&&S.pattern===B.pattern){S.count.length>1&&S.count.pop(),S.count.push(
252
- B.count[0]),S.string=S.pattern+p(S.count),w=F+1;continue}h.isPadded&&(D=y(F,h,m)),B.string=D+B.pattern+p(B.count),v.push(B),w=F+1,S=B}return v}function o(d,g,h,m,_){let v=[];for(let w of d){let{string:S}=w;!m&&!l(g,"string",S)&&v.push(h+S),m&&l(g,"string",S)&&v.push(h+S)}return v}function a(d,g){let h=[];for(let m=0;m<d.length;m++)h.push([d[m],g[m]]);return h}function c(d,g){return d>g?1:g>d?-1:0}function l(d,g,h){return d.some(m=>m[g]===h)}function u(d,g){return Number(String(d).slice(0,-g)+"9".
253
- repeat(g))}function f(d,g){return d-d%Math.pow(10,g)}function p(d){let[g=0,h=""]=d;return h||g>1?`{${g+(h?","+h:"")}}`:""}function $(d,g,h){return`[${d}${g-d===1?"":"-"}${g}]`}function b(d){return/^-?(0+)\d/.test(d)}function y(d,g,h){if(!g.isPadded)return d;let m=Math.abs(g.maxLen-String(d).length),_=h.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={},mi=e,mi}var gi,
254
- $c;function _c(){if($c)return gi;$c=1;const t=ma,e=Lm(),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(
255
- 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(
252
+ 0){let U=B<0?Math.abs(B):1;x=i(U,Math.abs(F),M,m),F=M.a=0}return B>=0&&(j=i(F,B,M,m)),M.negatives=x,M.positives=j,M.result=r(x,j),m.capture===!0?M.result=`(${M.result})`:m.wrap!==!1&&j.length+x.length>1&&(M.result=`(?:${M.result})`),e.cache[I]=M,M.result};function r(d,g,h){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 h=1,m=1,_=c(d,h),v=new Set([g]);for(;d<=_&&_<=g;)v.add(_),h+=1,_=c(d,h);for(_=f(g+1,m)-1;d<_&&_<=g;)v.add(
253
+ _),m+=1,_=f(g+1,m)-1;return v=[...v],v.sort(u),v}function s(d,g,h){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+=h.shorthand===!0?"\\d":"[0-9]"),{pattern:v,count:[w],digits:_}}function i(d,g,h,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(!h.isPadded&&S&&S.pattern===B.pattern){S.count.length>1&&S.count.pop(),S.count.push(
254
+ B.count[0]),S.string=S.pattern+p(S.count),w=F+1;continue}h.isPadded&&(D=y(F,h,m)),B.string=D+B.pattern+p(B.count),v.push(B),w=F+1,S=B}return v}function o(d,g,h,m,_){let v=[];for(let w of d){let{string:S}=w;!m&&!l(g,"string",S)&&v.push(h+S),m&&l(g,"string",S)&&v.push(h+S)}return v}function a(d,g){let h=[];for(let m=0;m<d.length;m++)h.push([d[m],g[m]]);return h}function u(d,g){return d>g?1:g>d?-1:0}function l(d,g,h){return d.some(m=>m[g]===h)}function c(d,g){return Number(String(d).slice(0,-g)+"9".
255
+ repeat(g))}function f(d,g){return d-d%Math.pow(10,g)}function p(d){let[g=0,h=""]=d;return h||g>1?`{${g+(h?","+h:"")}}`:""}function $(d,g,h){return`[${d}${g-d===1?"":"-"}${g}]`}function b(d){return/^-?(0+)\d/.test(d)}function y(d,g,h){if(!g.isPadded)return d;let m=Math.abs(g.maxLen-String(d).length),_=h.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={},gi=e,gi}var yi,
256
+ bc;function wc(){if(bc)return yi;bc=1;const t=ga,e=Lm(),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,u=(m,_,v)=>{if(_>0){let w=m[0]==="-"?"-":"";w&&(m=m.slice(1)),m=w+m.padStart(w?_-1:_,"0")}return v===!1?String(
257
+ m):m},l=(m,_)=>{let v=m[0]==="-"?"-":"";for(v&&(m=m.slice(1),_--);m.length<_;)m="0"+m;return v?"-"+m:m},c=(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(
256
258
  m);if(m===_)return S;let I=String.fromCharCode(_);return`[${S}-${I}]`},p=(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(
257
- 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),x=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,x),l(_,x),!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),x,U)),S=F?S-
258
- v:S+v,H++;return w.toRegex===!0?v>1?u(G,w,x):p(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=[],x=0;for(;B?I>=F:I<=F;)j.push(S(I,x)),I=B?I-v:I+v,x++;return w.toRegex===!0?p(j,null,{wrap:!1,options:w}):j},h=(m,_,v,w={})=>{if(_==null&&s(m))return[m];if(!s(m)||!s(_))return b(
259
- m,_,w);if(typeof v=="function")return h(m,_,1,{transform:v});if(r(v))return h(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):h(m,_,1,v)};return gi=h,gi}var yi,vc;function Dm(){if(vc)return yi;vc=1;const t=_c(),e=fi();return yi=(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 p="";if(o.isOpen===
260
- !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)p+=i($,o);return p};return i(n)},yi}var $i,
261
- bc;function xm(){if(bc)return $i;bc=1;const t=_c(),e=hi(),r=fi(),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 $i=(i,o={})=>{const a=o.rangeLimit===void 0?1e3:o.rangeLimit,c=(l,u={})=>{l.queue=[];let f=u,p=u.queue;
259
+ 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),x=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,x),l(_,x),!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(u(Y(S,H),x,U)),S=F?S-
260
+ v:S+v,H++;return w.toRegex===!0?v>1?c(G,w,x):p(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=[],x=0;for(;B?I>=F:I<=F;)j.push(S(I,x)),I=B?I-v:I+v,x++;return w.toRegex===!0?p(j,null,{wrap:!1,options:w}):j},h=(m,_,v,w={})=>{if(_==null&&s(m))return[m];if(!s(m)||!s(_))return b(
261
+ m,_,w);if(typeof v=="function")return h(m,_,1,{transform:v});if(r(v))return h(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):h(m,_,1,v)};return yi=h,yi}var $i,Ec;function Dm(){if(Ec)return $i;Ec=1;const t=wc(),e=di();return $i=(n,s={})=>{const i=(o,a={})=>{const u=e.isInvalidBrace(a),l=o.invalid===!0&&s.escapeInvalid===!0,c=u===!0||l===!0,f=s.escapeInvalid===!0?"\\":"";let p="";if(o.isOpen===
262
+ !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 c?f+o.value:"(";if(o.type==="close")return c?f+o.value:")";if(o.type==="comma")return o.prev.type==="comma"?"":c?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)p+=i($,o);return p};return i(n)},$i}var _i,
263
+ Sc;function xm(){if(Sc)return _i;Sc=1;const t=wc(),e=pi(),r=di(),n=(i="",o="",a=!1)=>{const u=[];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 c of l)u.push(n(c,o,a));else for(let c of o)a===!0&&typeof c=="string"&&(c=`{${c}}`),u.push(Array.isArray(c)?n(l,c,a):l+c);return r.flatten(u)};return _i=(i,o={})=>{const a=o.rangeLimit===void 0?1e3:o.rangeLimit,u=(l,c={})=>{l.queue=[];let f=c,p=c.queue;
262
264
  for(;f.type!=="brace"&&f.type!=="root"&&f.parent;)f=f.parent,p=f.queue;if(l.invalid||l.dollar){p.push(n(p.pop(),e(l,o)));return}if(l.type==="brace"&&l.invalid!==!0&&l.nodes.length===2){p.push(n(p.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)),p.push(n(p.pop(),g)),l.nodes=[];return}
263
- 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"){p.push(n(p.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))},$i}var _i,wc;function km(){return wc||(wc=1,_i={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"\
265
+ 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"){p.push(n(p.pop(),b,$));continue}if(g.value&&g.type!=="open"){b.push(n(b.pop(),g.value));continue}g.nodes&&u(g,l)}return b};return r.flatten(u(i))},_i}var vi,Rc;function km(){return Rc||(Rc=1,vi={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"\
264
266
  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:"\
265
267
  {",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
266
- `,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"}),_i}var vi,Ec;function Mm(){if(Ec)return vi;Ec=1;const t=hi(),{MAX_LENGTH:e,CHAR_BACKSLASH:r,CHAR_BACKTICK:n,CHAR_COMMA:s,CHAR_DOT:i,CHAR_LEFT_PARENTHESES:o,CHAR_RIGHT_PARENTHESES:a,
267
- CHAR_LEFT_CURLY_BRACE:c,CHAR_RIGHT_CURLY_BRACE:l,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_RIGHT_SQUARE_BRACKET:f,CHAR_DOUBLE_QUOTE:p,CHAR_SINGLE_QUOTE:$,CHAR_NO_BREAK_SPACE:b,CHAR_ZERO_WIDTH_NOBREAK_SPACE:y}=km();return vi=(g,h={})=>{if(typeof g!="string")throw new TypeError("Expected a string");const m=h||{},_=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];
268
- let S=v,I=v,F=0;const B=g.length;let D=0,M=0,j;const x=()=>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=x(),!(j===y||j===b)){if(j===r){U({type:"text",value:(h.keepEscaping?j:"")+x()});continue}if(j===f){U({type:"text",value:"\\"+j});continue}if(j===u){F++;let Y;for(;D<B&&(Y=x());){if(j+=Y,Y===u){F++;continue}if(Y===r){j+=
269
- x();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===p||j===$||j===n){const Y=j;let G;for(h.keepQuotes!==!0&&(j="");D<B&&(G=x());){if(G===r){j+=G+x();continue}if(G===Y){h.keepQuotes===!0&&(j+=G);break}j+=G}U({type:"text",value:j});continue}if(j===c){M++;const G={
268
+ `,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"}),vi}var bi,Ac;function Mm(){if(Ac)return bi;Ac=1;const t=pi(),{MAX_LENGTH:e,CHAR_BACKSLASH:r,CHAR_BACKTICK:n,CHAR_COMMA:s,CHAR_DOT:i,CHAR_LEFT_PARENTHESES:o,CHAR_RIGHT_PARENTHESES:a,
269
+ CHAR_LEFT_CURLY_BRACE:u,CHAR_RIGHT_CURLY_BRACE:l,CHAR_LEFT_SQUARE_BRACKET:c,CHAR_RIGHT_SQUARE_BRACKET:f,CHAR_DOUBLE_QUOTE:p,CHAR_SINGLE_QUOTE:$,CHAR_NO_BREAK_SPACE:b,CHAR_ZERO_WIDTH_NOBREAK_SPACE:y}=km();return bi=(g,h={})=>{if(typeof g!="string")throw new TypeError("Expected a string");const m=h||{},_=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];
270
+ let S=v,I=v,F=0;const B=g.length;let D=0,M=0,j;const x=()=>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=x(),!(j===y||j===b)){if(j===r){U({type:"text",value:(h.keepEscaping?j:"")+x()});continue}if(j===f){U({type:"text",value:"\\"+j});continue}if(j===c){F++;let Y;for(;D<B&&(Y=x());){if(j+=Y,Y===c){F++;continue}if(Y===r){j+=
271
+ x();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===p||j===$||j===n){const Y=j;let G;for(h.keepQuotes!==!0&&(j="");D<B&&(G=x());){if(G===r){j+=G+x();continue}if(G===Y){h.keepQuotes===!0&&(j+=G);break}j+=G}U({type:"text",value:j});continue}if(j===u){M++;const G={
270
272
  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){
271
273
  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===
272
- "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},vi}var bi,Sc;function qm(){if(Sc)return bi;Sc=1;const t=hi(),e=Dm(),r=xm(),n=Mm(),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(
273
- 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),bi=s,bi}var wi={},Ei,Rc;function sn(){if(Rc)return Ei;Rc=1;const t=Ps,e="\\\\/",r=`[^${e}]`,n="\\.",s="\\+",i="\\?",o="\\/",a="(?\
274
- =.)",c="[^/]",l=`(?:${o}|$)`,u=`(?:^|${o})`,f=`${n}{1,2}${l}`,p=`(?!${n})`,$=`(?!${u}${f})`,b=`(?!${n}{0,1}${l})`,y=`(?!${f})`,d=`[^.${o}]`,g=`${c}*?`,h={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:p,NO_DOTS:$,NO_DOT_SLASH:b,NO_DOTS_SLASH:y,QMARK_NO_DOT:d,STAR:g,START_ANCHOR:u},m={...h,SLASH_LITERAL:`[${e}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,
275
- 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 Ei={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:_,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,
274
+ "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},bi}var wi,Oc;function qm(){if(Oc)return wi;Oc=1;const t=pi(),e=Dm(),r=xm(),n=Mm(),s=(i,o={})=>{let a=[];if(Array.isArray(i))for(const u of i){const l=s.create(u,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(
275
+ 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),wi=s,wi}var Ei={},Si,Cc;function sn(){if(Cc)return Si;Cc=1;const t=Ps,e="\\\\/",r=`[^${e}]`,n="\\.",s="\\+",i="\\?",o="\\/",a="(?\
276
+ =.)",u="[^/]",l=`(?:${o}|$)`,c=`(?:^|${o})`,f=`${n}{1,2}${l}`,p=`(?!${n})`,$=`(?!${c}${f})`,b=`(?!${n}{0,1}${l})`,y=`(?!${f})`,d=`[^.${o}]`,g=`${u}*?`,h={DOT_LITERAL:n,PLUS_LITERAL:s,QMARK_LITERAL:i,SLASH_LITERAL:o,ONE_CHAR:a,QMARK:u,END_ANCHOR:l,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:$,NO_DOT_SLASH:b,NO_DOTS_SLASH:y,QMARK_NO_DOT:d,STAR:g,START_ANCHOR:c},m={...h,SLASH_LITERAL:`[${e}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,
277
+ 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 Si={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:_,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,
276
278
  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,
277
279
  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,
278
- 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:h}},Ei}var Ac;function on(){return Ac||(Ac=1,function(t){const e=Ps,r=process.
279
- platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:o}=sn();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||
280
- 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 p=`${u}(?:${a})${f}`;return c.negated===!0&&(p=`(?:^(?!${p}).*$)`),p}}(wi)),wi}var Si,Oc;function Um(){
281
- if(Oc)return Si;Oc=1;const t=on(),{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:p,CHAR_RIGHT_CURLY_BRACE:$,CHAR_RIGHT_PARENTHESES:b,CHAR_RIGHT_SQUARE_BRACKET:y}=sn(),d=m=>m===a||m===n,g=m=>{m.isPrefix!==!0&&(m.depth=m.isGlobstar?1/0:1)};return Si=(m,_)=>{const v=_||{},w=m.length-1,S=v.parts===!0||v.scanToEnd===!0,I=[],F=[],
282
- B=[];let D=m,M=-1,j=0,x=0,U=!1,Y=!1,G=!1,J=!1,se=!1,H=!1,A=!1,V=!1,k=!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=
280
+ 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:h}},Si}var Pc;function on(){return Pc||(Pc=1,function(t){const e=Ps,r=process.
281
+ platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:o}=sn();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,u=>u==="\\"?"":u),t.supportsLookbehinds=()=>{const a=process.version.slice(1).split(".").map(Number);return a.length===3&&a[0]>=9||
282
+ a[0]===8&&a[1]>=10},t.isWindows=a=>a&&typeof a.windows=="boolean"?a.windows:r===!0||e.sep==="\\",t.escapeLast=(a,u,l)=>{const c=a.lastIndexOf(u,l);return c===-1?a:a[c-1]==="\\"?t.escapeLast(a,u,c-1):`${a.slice(0,c)}\\${a.slice(c)}`},t.removePrefix=(a,u={})=>{let l=a;return l.startsWith("./")&&(l=l.slice(2),u.prefix="./"),l},t.wrapOutput=(a,u={},l={})=>{const c=l.contains?"":"^",f=l.contains?"":"$";let p=`${c}(?:${a})${f}`;return u.negated===!0&&(p=`(?:^(?!${p}).*$)`),p}}(Ei)),Ei}var Ri,Ic;function Um(){
283
+ if(Ic)return Ri;Ic=1;const t=on(),{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:u,CHAR_LEFT_PARENTHESES:l,CHAR_LEFT_SQUARE_BRACKET:c,CHAR_PLUS:f,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:$,CHAR_RIGHT_PARENTHESES:b,CHAR_RIGHT_SQUARE_BRACKET:y}=sn(),d=m=>m===a||m===n,g=m=>{m.isPrefix!==!0&&(m.depth=m.isGlobstar?1/0:1)};return Ri=(m,_)=>{const v=_||{},w=m.length-1,S=v.parts===!0||v.scanToEnd===!0,I=[],F=[],
284
+ B=[];let D=m,M=-1,j=0,x=0,U=!1,Y=!1,G=!1,J=!1,se=!1,H=!1,A=!1,V=!1,k=!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===u&&(H=!0);continue}if(H===!0||X===u){for(R++;ie()!==!0&&(X=L());){if(X===n){A=Z.backslashes=!0,L();continue}if(X===u){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=
283
285
  !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}x=M+1;continue}if(v.noext!==!0&&(X===f||X===r||X===e||X===p||X===o)===!0&&oe()===l){if(G=Z.isGlob=!0,J=Z.isExtglob=!0,E=!0,X===o&&M===j&&(k=!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}
284
- break}if(X===e){if(C===e&&(se=Z.isGlobstar=!0),G=Z.isGlob=!0,E=!0,S===!0)continue;break}if(X===p){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}}
286
+ break}if(X===e){if(C===e&&(se=Z.isGlobstar=!0),G=Z.isGlob=!0,E=!0,S===!0)continue;break}if(X===p){if(G=Z.isGlob=!0,E=!0,S===!0)continue;break}if(X===c){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}}
285
287
  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),x-=j),q&&G===!0&&x>0?(q=D.slice(0,x),ne=D.slice(x)):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:k};
286
- 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},Si}var Ri,Cc;function Hm(){
287
- if(Cc)return Ri;Cc=1;const t=sn(),e=on(),{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 p=`[${u.join("-")}]`;try{new RegExp(p)}catch{return u.map(b=>e.escapeRegex(b)).join("..")}return p},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;
288
- const p={...f},$=typeof p.maxLength=="number"?Math.min(r,p.maxLength):r;let b=u.length;if(b>$)throw new SyntaxError(`Input length: ${b}, exceeds maximum allowed length: ${$}`);const y={type:"bos",value:"",output:p.prepend||""},d=[y],g=p.capture?"":"?:",h=e.isWindows(f),m=t.globChars(h),_=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:x,STAR:U,START_ANCHOR:Y}=m,G=N=>`(${g}(?:(?!${Y}${N.dot?F:v}).\
289
- )*?)`,J=p.dot?"":B,se=p.dot?j:x;let H=p.bash===!0?G(p):U;p.capture&&(H=`(${H})`),typeof p.noext=="boolean"&&(p.noextglob=p.noext);const A={input:u,index:-1,start:0,dot:p.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=[],k=[],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+=
288
+ 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},Ri}var Ai,Nc;function Hm(){
289
+ if(Nc)return Ai;Nc=1;const t=sn(),e=on(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:o}=t,a=(c,f)=>{if(typeof f.expandRange=="function")return f.expandRange(...c,f);c.sort();const p=`[${c.join("-")}]`;try{new RegExp(p)}catch{return c.map(b=>e.escapeRegex(b)).join("..")}return p},u=(c,f)=>`Missing ${c}: "${f}" - use "\\\\${f}" to match literal characters`,l=(c,f)=>{if(typeof c!="string")throw new TypeError("Expected a string");c=o[c]||c;
290
+ const p={...f},$=typeof p.maxLength=="number"?Math.min(r,p.maxLength):r;let b=c.length;if(b>$)throw new SyntaxError(`Input length: ${b}, exceeds maximum allowed length: ${$}`);const y={type:"bos",value:"",output:p.prepend||""},d=[y],g=p.capture?"":"?:",h=e.isWindows(f),m=t.globChars(h),_=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:x,STAR:U,START_ANCHOR:Y}=m,G=N=>`(${g}(?:(?!${Y}${N.dot?F:v}).\
291
+ )*?)`,J=p.dot?"":B,se=p.dot?j:x;let H=p.bash===!0?G(p):U;p.capture&&(H=`(${H})`),typeof p.noext=="boolean"&&(p.noextglob=p.noext);const A={input:c,index:-1,start:0,dot:p.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:d};c=e.removePrefix(c,A),b=c.length;const V=[],k=[],E=[];let R=y,C;const X=()=>A.index===b-1,Z=A.peek=(N=1)=>c[A.index+N],ie=A.advance=()=>c[++A.index]||"",oe=()=>c.slice(A.index+1),L=(N="",te=0)=>{A.consumed+=
290
292
  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",
291
293
  R.value="*",R.output=H,A.output+=R.output)}if(V.length&&N.type!=="paren"&&(V[V.length-1].inner+=N.value),(N.value||N.output)&&q(N),R&&R.type==="text"&&N.type==="text"){R.value+=N.value,R.output=(R.output||"")+N.value;return}N.prev=R,d.push(N),R=N},ee=(N,te)=>{const z={..._[te],conditions:1,inner:""};z.prev=R,z.parens=A.parens,z.output=A.output;const re=(p.capture?"(":"")+z.open;ne("parens"),T({type:N,value:te,output:A.output?"":I}),T({type:"paren",extglob:!0,value:ie(),output:re}),V.push(z)},W=N=>{
292
- let te=N.close+(p.capture?")":""),z;if(N.type==="negate"){let re=H;if(N.inner&&N.inner.length>1&&N.inner.includes("/")&&(re=G(p)),(re!==H||X()||/^\)+$/.test(oe()))&&(te=N.close=`)$))${re}`),N.inner.includes("*")&&(z=oe())&&/^\.[^\\/.]+$/.test(z)){const le=l(z,{...f,fastpaths:!1}).output;te=N.close=`)${le})${re})`}N.prev.type==="bos"&&(A.negatedExtglob=!0)}T({type:"paren",extglob:!0,value:C,output:te}),P("parens")};if(p.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(u)){let N=!1,te=u.replace(i,(z,re,le,_e,we,ot)=>_e===
293
- "\\"?(N=!0,z):_e==="?"?re?re+_e+(we?j.repeat(we.length):""):ot===0?se+(we?j.repeat(we.length):""):j.repeat(le.length):_e==="."?v.repeat(le.length):_e==="*"?re?re+_e+(we?H:""):H:re?z:`\\${z}`);return N===!0&&(p.unescape===!0?te=te.replace(/\\/g,""):te=te.replace(/\\+/g,z=>z.length%2===0?"\\\\":z?"\\":"")),te===u&&p.contains===!0?(A.output=u,A):(A.output=e.wrapOutput(te,A,f),A)}for(;!X();){if(C=ie(),C==="\0")continue;if(C==="\\"){const z=Z();if(z==="/"&&p.bash!==!0||z==="."||z===";")continue;if(!z){
294
+ let te=N.close+(p.capture?")":""),z;if(N.type==="negate"){let re=H;if(N.inner&&N.inner.length>1&&N.inner.includes("/")&&(re=G(p)),(re!==H||X()||/^\)+$/.test(oe()))&&(te=N.close=`)$))${re}`),N.inner.includes("*")&&(z=oe())&&/^\.[^\\/.]+$/.test(z)){const le=l(z,{...f,fastpaths:!1}).output;te=N.close=`)${le})${re})`}N.prev.type==="bos"&&(A.negatedExtglob=!0)}T({type:"paren",extglob:!0,value:C,output:te}),P("parens")};if(p.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(c)){let N=!1,te=c.replace(i,(z,re,le,_e,we,ot)=>_e===
295
+ "\\"?(N=!0,z):_e==="?"?re?re+_e+(we?j.repeat(we.length):""):ot===0?se+(we?j.repeat(we.length):""):j.repeat(le.length):_e==="."?v.repeat(le.length):_e==="*"?re?re+_e+(we?H:""):H:re?z:`\\${z}`);return N===!0&&(p.unescape===!0?te=te.replace(/\\/g,""):te=te.replace(/\\+/g,z=>z.length%2===0?"\\\\":z?"\\":"")),te===c&&p.contains===!0?(A.output=c,A):(A.output=e.wrapOutput(te,A,f),A)}for(;!X();){if(C=ie(),C==="\0")continue;if(C==="\\"){const z=Z();if(z==="/"&&p.bash!==!0||z==="."||z===";")continue;if(!z){
294
296
  C+="\\",T({type:"text",value:C});continue}const re=/^\\+/.exec(oe());let le=0;if(re&&re[0].length>2&&(le=re[0].length,A.index+=le,le%2!==0&&(C+="\\")),p.unescape===!0?C=ie():C+=ie(),A.brackets===0){T({type:"text",value:C});continue}}if(A.brackets>0&&(C!=="]"||R.value==="["||R.value==="[^")){if(p.posix!==!1&&C===":"){const z=R.value.slice(1);if(z.includes("[")&&(R.posix=!0,z.includes(":"))){const re=R.value.lastIndexOf("["),le=R.value.slice(0,re),_e=R.value.slice(re+2),we=n[_e];if(we){R.value=le+
295
297
  we,A.backtrack=!0,ie(),!y.output&&d.indexOf(R)===1&&(y.output=I);continue}}}(C==="["&&Z()!==":"||C==="-"&&Z()==="]")&&(C=`\\${C}`),C==="]"&&(R.value==="["||R.value==="[^")&&(C=`\\${C}`),p.posix===!0&&C==="!"&&R.value==="["&&(C="^"),R.value+=C,q({value:C});continue}if(A.quotes===1&&C!=='"'){C=e.escapeRegex(C),R.value+=C,q({value:C});continue}if(C==='"'){A.quotes=A.quotes===1?0:1,p.keepQuotes===!0&&T({type:"text",value:C});continue}if(C==="("){ne("parens"),T({type:"paren",value:C});continue}if(C===
296
- ")"){if(A.parens===0&&p.strictBrackets===!0)throw new SyntaxError(c("opening","("));const z=V[V.length-1];if(z&&A.parens===z.parens+1){W(V.pop());continue}T({type:"paren",value:C,output:A.parens?")":"\\)"}),P("parens");continue}if(C==="["){if(p.nobracket===!0||!oe().includes("]")){if(p.nobracket!==!0&&p.strictBrackets===!0)throw new SyntaxError(c("closing","]"));C=`\\${C}`}else ne("brackets");T({type:"bracket",value:C});continue}if(C==="]"){if(p.nobracket===!0||R&&R.type==="bracket"&&R.value.length===
297
- 1){T({type:"text",value:C,output:`\\${C}`});continue}if(A.brackets===0){if(p.strictBrackets===!0)throw new SyntaxError(c("opening","["));T({type:"text",value:C,output:`\\${C}`});continue}P("brackets");const z=R.value.slice(1);if(R.posix!==!0&&z[0]==="^"&&!z.includes("/")&&(C=`/${C}`),R.value+=C,q({value:C}),p.literalBrackets===!1||e.hasRegexChars(z))continue;const re=e.escapeRegex(R.value);if(A.output=A.output.slice(0,-R.value.length),p.literalBrackets===!0){A.output+=re,R.value=re;continue}R.value=
298
+ ")"){if(A.parens===0&&p.strictBrackets===!0)throw new SyntaxError(u("opening","("));const z=V[V.length-1];if(z&&A.parens===z.parens+1){W(V.pop());continue}T({type:"paren",value:C,output:A.parens?")":"\\)"}),P("parens");continue}if(C==="["){if(p.nobracket===!0||!oe().includes("]")){if(p.nobracket!==!0&&p.strictBrackets===!0)throw new SyntaxError(u("closing","]"));C=`\\${C}`}else ne("brackets");T({type:"bracket",value:C});continue}if(C==="]"){if(p.nobracket===!0||R&&R.type==="bracket"&&R.value.length===
299
+ 1){T({type:"text",value:C,output:`\\${C}`});continue}if(A.brackets===0){if(p.strictBrackets===!0)throw new SyntaxError(u("opening","["));T({type:"text",value:C,output:`\\${C}`});continue}P("brackets");const z=R.value.slice(1);if(R.posix!==!0&&z[0]==="^"&&!z.includes("/")&&(C=`/${C}`),R.value+=C,q({value:C}),p.literalBrackets===!1||e.hasRegexChars(z))continue;const re=e.escapeRegex(R.value);if(A.output=A.output.slice(0,-R.value.length),p.literalBrackets===!0){A.output+=re,R.value=re;continue}R.value=
298
300
  `(${g}${re}|${R.value})`,A.output+=R.value;continue}if(C==="{"&&p.nobrace!==!0){ne("braces");const z={type:"brace",value:C,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};k.push(z),T(z);continue}if(C==="}"){const z=k[k.length-1];if(p.nobrace===!0||!z){T({type:"text",value:C,output:C});continue}let re=")";if(z.dots===!0){const le=d.slice(),_e=[];for(let we=le.length-1;we>=0&&(d.pop(),le[we].type!=="brace");we--)le[we].type!=="dots"&&_e.unshift(le[we].value);re=a(_e,p),A.backtrack=
299
301
  !0}if(z.comma!==!0&&z.dots!==!0){const le=A.output.slice(0,z.outputIndex),_e=A.tokens.slice(z.tokensIndex);z.value=z.output="\\{",C=re="\\}",A.output=le;for(const we of _e)A.output+=we.output||we.value}T({type:"brace",value:C,output:re}),P("braces"),k.pop();continue}if(C==="|"){V.length>0&&V[V.length-1].conditions++,T({type:"text",value:C});continue}if(C===","){let z=C;const re=k[k.length-1];re&&E[E.length-1]==="braces"&&(re.comma=!0,z="|"),T({type:"comma",value:C,output:z});continue}if(C==="/"){
300
302
  if(R.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",d.pop(),R=y;continue}T({type:"slash",value:C,output:S});continue}if(C==="."){if(A.braces>0&&R.type==="dot"){R.value==="."&&(R.output=v);const z=k[k.length-1];R.type="dots",R.output+=C,R.value+=C,z.dots=!0;continue}if(A.braces+A.parens===0&&R.type!=="bos"&&R.type!=="slash"){T({type:"text",value:C,output:v});continue}T({type:"dot",value:C,output:v});continue}if(C==="?"){if(!(R&&R.value==="(")&&p.noextglob!==!0&&Z()===
301
303
  "("&&Z(2)!=="?"){ee("qmark",C);continue}if(R&&R.type==="paren"){const re=Z();let le=C;if(re==="<"&&!e.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(R.value==="("&&!/[!=<:]/.test(re)||re==="<"&&!/<([!=]|\w+>)/.test(oe()))&&(le=`\\${C}`),T({type:"text",value:C,output:le});continue}if(p.dot!==!0&&(R.type==="slash"||R.type==="bos")){T({type:"qmark",value:C,output:x});continue}T({type:"qmark",value:C,output:j});continue}if(C==="!"){if(p.noextglob!==
302
304
  !0&&Z()==="("&&(Z(2)!=="?"||!/[!=<:]/.test(Z(3)))){ee("negate",C);continue}if(p.nonegate!==!0&&A.index===0){Q();continue}}if(C==="+"){if(p.noextglob!==!0&&Z()==="("&&Z(2)!=="?"){ee("plus",C);continue}if(R&&R.value==="("||p.regex===!1){T({type:"plus",value:C,output:w});continue}if(R&&(R.type==="bracket"||R.type==="paren"||R.type==="brace")||A.parens>0){T({type:"plus",value:C});continue}T({type:"plus",value:w});continue}if(C==="@"){if(p.noextglob!==!0&&Z()==="("&&Z(2)!=="?"){T({type:"at",extglob:!0,
303
305
  value:C,output:""});continue}T({type:"text",value:C});continue}if(C!=="*"){(C==="$"||C==="^")&&(C=`\\${C}`);const z=s.exec(oe());z&&(C+=z[0],A.index+=z[0].length),T({type:"text",value:C});continue}if(R&&(R.type==="globstar"||R.star===!0)){R.type="star",R.star=!0,R.value+=C,R.output=H,A.backtrack=!0,A.globstar=!0,L(C);continue}let N=oe();if(p.noextglob!==!0&&/^\([^?]/.test(N)){ee("star",C);continue}if(R.type==="star"){if(p.noglobstar===!0){L(C);continue}const z=R.prev,re=z.prev,le=z.type==="slash"||
304
- z.type==="bos",_e=re&&(re.type==="star"||re.type==="globstar");if(p.bash===!0&&(!le||N[0]&&N[0]!=="/")){T({type:"star",value:C,output:""});continue}const we=A.braces>0&&(z.type==="comma"||z.type==="brace"),ot=V.length&&(z.type==="pipe"||z.type==="paren");if(!le&&z.type!=="paren"&&!we&&!ot){T({type:"star",value:C,output:""});continue}for(;N.slice(0,3)==="/**";){const mt=u[A.index+4];if(mt&&mt!=="/")break;N=N.slice(3),L("/**",3)}if(z.type==="bos"&&X()){R.type="globstar",R.value+=C,R.output=G(p),A.
306
+ z.type==="bos",_e=re&&(re.type==="star"||re.type==="globstar");if(p.bash===!0&&(!le||N[0]&&N[0]!=="/")){T({type:"star",value:C,output:""});continue}const we=A.braces>0&&(z.type==="comma"||z.type==="brace"),ot=V.length&&(z.type==="pipe"||z.type==="paren");if(!le&&z.type!=="paren"&&!we&&!ot){T({type:"star",value:C,output:""});continue}for(;N.slice(0,3)==="/**";){const mt=c[A.index+4];if(mt&&mt!=="/")break;N=N.slice(3),L("/**",3)}if(z.type==="bos"&&X()){R.type="globstar",R.value+=C,R.output=G(p),A.
305
307
  output=R.output,A.globstar=!0,L(C);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&!_e&&X()){A.output=A.output.slice(0,-(z.output+R.output).length),z.output=`(?:${z.output}`,R.type="globstar",R.output=G(p)+(p.strictSlashes?")":"|$)"),R.value+=C,A.globstar=!0,A.output+=z.output+R.output,L(C);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&N[0]==="/"){const mt=N[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(z.output+R.output).length),z.output=`(?:${z.output}`,R.type="globstar",R.output=`${G(
306
308
  p)}${S}|${S}${mt})`,R.value+=C,A.output+=z.output+R.output,A.globstar=!0,L(C+ie()),T({type:"slash",value:"/",output:""});continue}if(z.type==="bos"&&N[0]==="/"){R.type="globstar",R.value+=C,R.output=`(?:^|${S}|${G(p)}${S})`,A.output=R.output,A.globstar=!0,L(C+ie()),T({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-R.output.length),R.type="globstar",R.output=G(p),R.value+=C,A.output+=R.output,A.globstar=!0,L(C);continue}const te={type:"star",value:C,output:H};if(p.bash===!0){
307
- te.output=".*?",(R.type==="bos"||R.type==="slash")&&(te.output=J+te.output),T(te);continue}if(R&&(R.type==="bracket"||R.type==="paren")&&p.regex===!0){te.output=C,T(te);continue}(A.index===A.start||R.type==="slash"||R.type==="dot")&&(R.type==="dot"?(A.output+=D,R.output+=D):p.dot===!0?(A.output+=M,R.output+=M):(A.output+=J,R.output+=J),Z()!=="*"&&(A.output+=I,R.output+=I)),T(te)}for(;A.brackets>0;){if(p.strictBrackets===!0)throw new SyntaxError(c("closing","]"));A.output=e.escapeLast(A.output,"["),
308
- P("brackets")}for(;A.parens>0;){if(p.strictBrackets===!0)throw new SyntaxError(c("closing",")"));A.output=e.escapeLast(A.output,"("),P("parens")}for(;A.braces>0;){if(p.strictBrackets===!0)throw new SyntaxError(c("closing","}"));A.output=e.escapeLast(A.output,"{"),P("braces")}if(p.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+=
309
- N.suffix)}return A};return l.fastpaths=(u,f)=>{const p={...f},$=typeof p.maxLength=="number"?Math.min(r,p.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:h,DOTS_SLASH:m,NO_DOT:_,NO_DOTS:v,NO_DOTS_SLASH:w,STAR:S,START_ANCHOR:I}=t.globChars(y),F=p.dot?v:_,B=p.dot?w:_,D=p.capture?"":"?:",M={negated:!1,prefix:""};let j=p.bash===!0?".*?":S;p.capture&&(j=`(${j})`);const x=J=>J.
309
+ te.output=".*?",(R.type==="bos"||R.type==="slash")&&(te.output=J+te.output),T(te);continue}if(R&&(R.type==="bracket"||R.type==="paren")&&p.regex===!0){te.output=C,T(te);continue}(A.index===A.start||R.type==="slash"||R.type==="dot")&&(R.type==="dot"?(A.output+=D,R.output+=D):p.dot===!0?(A.output+=M,R.output+=M):(A.output+=J,R.output+=J),Z()!=="*"&&(A.output+=I,R.output+=I)),T(te)}for(;A.brackets>0;){if(p.strictBrackets===!0)throw new SyntaxError(u("closing","]"));A.output=e.escapeLast(A.output,"["),
310
+ P("brackets")}for(;A.parens>0;){if(p.strictBrackets===!0)throw new SyntaxError(u("closing",")"));A.output=e.escapeLast(A.output,"("),P("parens")}for(;A.braces>0;){if(p.strictBrackets===!0)throw new SyntaxError(u("closing","}"));A.output=e.escapeLast(A.output,"{"),P("braces")}if(p.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+=
311
+ N.suffix)}return A};return l.fastpaths=(c,f)=>{const p={...f},$=typeof p.maxLength=="number"?Math.min(r,p.maxLength):r,b=c.length;if(b>$)throw new SyntaxError(`Input length: ${b}, exceeds maximum allowed length: ${$}`);c=o[c]||c;const y=e.isWindows(f),{DOT_LITERAL:d,SLASH_LITERAL:g,ONE_CHAR:h,DOTS_SLASH:m,NO_DOT:_,NO_DOTS:v,NO_DOTS_SLASH:w,STAR:S,START_ANCHOR:I}=t.globChars(y),F=p.dot?v:_,B=p.dot?w:_,D=p.capture?"":"?:",M={negated:!1,prefix:""};let j=p.bash===!0?".*?":S;p.capture&&(j=`(${j})`);const x=J=>J.
310
312
  noglobstar===!0?j:`(${D}(?:(?!${I}${J.dot?m:d}).)*?)`,U=J=>{switch(J){case"*":return`${F}${h}${j}`;case".*":return`${d}${h}${j}`;case"*.*":return`${F}${j}${d}${h}${j}`;case"*/*":return`${F}${j}${g}${h}${B}${j}`;case"**":return F+x(p);case"**/*":return`(?:${F}${x(p)}${g})?${B}${h}${j}`;case"**/*.*":return`(?:${F}${x(p)}${g})?${B}${j}${d}${h}${j}`;case"**/.*":return`(?:${F}${x(p)}${g})?${d}${h}${j}`;default:{const se=/^(.*?)\.(\w+)$/.exec(J);if(!se)return;const H=U(se[1]);return H?H+d+se[2]:void 0}}},
311
- Y=e.removePrefix(u,M);let G=U(Y);return G&&p.strictSlashes!==!0&&(G+=`${g}?`),G},Ri=l,Ri}var Ai,Pc;function Fm(){if(Pc)return Ai;Pc=1;const t=Ps,e=Um(),r=Hm(),n=on(),s=sn(),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||{},p=n.isWindows(
312
- 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,h=!1)=>{const{isMatch:m,match:_,output:v}=o.test(g,$,c,{glob:a,posix:p}),w={glob:a,state:b,regex:$,posix:p,input:g,output:v,match:_,isMatch:m};return typeof f.onResult=="function"&&f.onResult(w),m===!1?(w.isMatch=!1,h?w:!1):y(g)?(typeof f.onIgnore=="function"&&f.onIgnore(w),w.isMatch=!1,h?w:!1):(typeof f.onMatch=="functi\
313
- on"&&f.onMatch(w),h?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 p=l||{},$=p.format||(f?n.toPosixSlashes:null);let b=a===u,y=b&&$?$(a):a;return b===!1&&(y=$?$(a):a,b=y===u),(b===!1||p.capture===!0)&&(p.matchBase===!0||p.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
314
- 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||{},p=f.contains?"":"^",$=f.contains?"":"$";let b=`${p}(?:${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\
315
- 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,Ai=o,Ai}var Oi,Ic;function Vm(){return Ic||(Ic=1,Oi=Fm()),Oi}var Ci,Nc;function zm(){if(Nc)return Ci;Nc=1;const t=ma,e=qm(),r=Vm(),n=on(),s=a=>a===""||a==="./",i=a=>{const c=a.indexOf("\
316
- {");return c>-1&&a.indexOf("}",c)>-1},o=(a,c,l)=>{c=[].concat(c),a=[].concat(a);let u=new Set,f=new Set,p=new Set,$=0,b=g=>{p.add(g.output),l&&l.onResult&&l.onResult(g)};for(let g=0;g<c.length;g++){let h=r(String(c[g]),{...l,onResult:b},!0),m=h.state.negated||h.state.negatedExtglob;m&&$++;for(let _ of a){let v=h(_,!0);(m?!v.isMatch:v.isMatch)&&(m?u.add(v.output):(u.delete(v.output),f.add(v.output)))}}let d=($===c.length?[...p]:[...f]).filter(g=>!u.has(g));if(l&&d.length===0){if(l.failglob===!0)throw new Error(
317
- `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=[],p=b=>{l.onResult&&l.onResult(b),f.push(b.output)},$=new Set(o(a,c,{...l,onResult:p}));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\
318
- 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 p of u)f[p]=a[p];return f},o.some=(a,c,l)=>{let u=[].concat(a);for(let f of[].concat(c)){let p=r(String(f),l);if(u.
319
- some($=>p($)))return!0}return!1},o.every=(a,c,l)=>{let u=[].concat(a);for(let f of[].concat(c)){let p=r(String(f),l);if(!u.every($=>p($)))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),p=r.makeRe(String(a),{...l,capture:!0}).exec(u?n.toPosixSlashes(c):c);if(p)return p.slice(1).map($=>$===void 0?"":$)},o.makeRe=(...a)=>r.makeRe(...a),o.scan=(...a)=>r.
320
- 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,Ci=o,Ci}var Gm=zm();const Tc=qr(Gm),Bm={useRecommendedBuildConfig:!0,removeViteModuleLoader:!1,deleteInlinedFiles:!0};
321
- function Wm(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?Zm(c):c}function Km(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()}\
313
+ Y=e.removePrefix(c,M);let G=U(Y);return G&&p.strictSlashes!==!0&&(G+=`${g}?`),G},Ai=l,Ai}var Oi,Tc;function Fm(){if(Tc)return Oi;Tc=1;const t=Ps,e=Um(),r=Hm(),n=on(),s=sn(),i=a=>a&&typeof a=="object"&&!Array.isArray(a),o=(a,u,l=!1)=>{if(Array.isArray(a)){const g=a.map(m=>o(m,u,l));return m=>{for(const _ of g){const v=_(m);if(v)return v}return!1}}const c=i(a)&&a.tokens&&a.input;if(a===""||typeof a!="string"&&!c)throw new TypeError("Expected pattern to be a non-empty string");const f=u||{},p=n.isWindows(
314
+ u),$=c?o.compileRe(a,u):o.makeRe(a,u,!1,!0),b=$.state;delete $.state;let y=()=>!1;if(f.ignore){const g={...u,ignore:null,onMatch:null,onResult:null};y=o(f.ignore,g,l)}const d=(g,h=!1)=>{const{isMatch:m,match:_,output:v}=o.test(g,$,u,{glob:a,posix:p}),w={glob:a,state:b,regex:$,posix:p,input:g,output:v,match:_,isMatch:m};return typeof f.onResult=="function"&&f.onResult(w),m===!1?(w.isMatch=!1,h?w:!1):y(g)?(typeof f.onIgnore=="function"&&f.onIgnore(w),w.isMatch=!1,h?w:!1):(typeof f.onMatch=="functi\
315
+ on"&&f.onMatch(w),h?w:!0)};return l&&(d.state=b),d};return o.test=(a,u,l,{glob:c,posix:f}={})=>{if(typeof a!="string")throw new TypeError("Expected input to be a string");if(a==="")return{isMatch:!1,output:""};const p=l||{},$=p.format||(f?n.toPosixSlashes:null);let b=a===c,y=b&&$?$(a):a;return b===!1&&(y=$?$(a):a,b=y===c),(b===!1||p.capture===!0)&&(p.matchBase===!0||p.basename===!0?b=o.matchBase(a,u,l,f):b=u.exec(y)),{isMatch:!!b,match:b,output:y}},o.matchBase=(a,u,l,c=n.isWindows(l))=>(u instanceof
316
+ RegExp?u:o.makeRe(u,l)).test(t.basename(a)),o.isMatch=(a,u,l)=>o(u,l)(a),o.parse=(a,u)=>Array.isArray(a)?a.map(l=>o.parse(l,u)):r(a,{...u,fastpaths:!1}),o.scan=(a,u)=>e(a,u),o.compileRe=(a,u,l=!1,c=!1)=>{if(l===!0)return a.output;const f=u||{},p=f.contains?"":"^",$=f.contains?"":"$";let b=`${p}(?:${a.output})${$}`;a&&a.negated===!0&&(b=`^(?!${b}).*$`);const y=o.toRegex(b,u);return c===!0&&(y.state=a),y},o.makeRe=(a,u={},l=!1,c=!1)=>{if(!a||typeof a!="string")throw new TypeError("Expected a non-e\
317
+ mpty string");let f={negated:!1,fastpaths:!0};return u.fastpaths!==!1&&(a[0]==="."||a[0]==="*")&&(f.output=r.fastpaths(a,u)),f.output||(f=r(a,u)),o.compileRe(f,u,l,c)},o.toRegex=(a,u)=>{try{const l=u||{};return new RegExp(a,l.flags||(l.nocase?"i":""))}catch(l){if(u&&u.debug===!0)throw l;return/$^/}},o.constants=s,Oi=o,Oi}var Ci,jc;function Vm(){return jc||(jc=1,Ci=Fm()),Ci}var Pi,Lc;function zm(){if(Lc)return Pi;Lc=1;const t=ga,e=qm(),r=Vm(),n=on(),s=a=>a===""||a==="./",i=a=>{const u=a.indexOf("\
318
+ {");return u>-1&&a.indexOf("}",u)>-1},o=(a,u,l)=>{u=[].concat(u),a=[].concat(a);let c=new Set,f=new Set,p=new Set,$=0,b=g=>{p.add(g.output),l&&l.onResult&&l.onResult(g)};for(let g=0;g<u.length;g++){let h=r(String(u[g]),{...l,onResult:b},!0),m=h.state.negated||h.state.negatedExtglob;m&&$++;for(let _ of a){let v=h(_,!0);(m?!v.isMatch:v.isMatch)&&(m?c.add(v.output):(c.delete(v.output),f.add(v.output)))}}let d=($===u.length?[...p]:[...f]).filter(g=>!c.has(g));if(l&&d.length===0){if(l.failglob===!0)throw new Error(
319
+ `No matches found for "${u.join(", ")}"`);if(l.nonull===!0||l.nullglob===!0)return l.unescape?u.map(g=>g.replace(/\\/g,"")):u}return d};return o.match=o,o.matcher=(a,u)=>r(a,u),o.isMatch=(a,u,l)=>r(u,l)(a),o.any=o.isMatch,o.not=(a,u,l={})=>{u=[].concat(u).map(String);let c=new Set,f=[],p=b=>{l.onResult&&l.onResult(b),f.push(b.output)},$=new Set(o(a,u,{...l,onResult:p}));for(let b of f)$.has(b)||c.add(b);return[...c]},o.contains=(a,u,l)=>{if(typeof a!="string")throw new TypeError(`Expected a stri\
320
+ ng: "${t.inspect(a)}"`);if(Array.isArray(u))return u.some(c=>o.contains(a,c,l));if(typeof u=="string"){if(s(a)||s(u))return!1;if(a.includes(u)||a.startsWith("./")&&a.slice(2).includes(u))return!0}return o.isMatch(a,u,{...l,contains:!0})},o.matchKeys=(a,u,l)=>{if(!n.isObject(a))throw new TypeError("Expected the first argument to be an object");let c=o(Object.keys(a),u,l),f={};for(let p of c)f[p]=a[p];return f},o.some=(a,u,l)=>{let c=[].concat(a);for(let f of[].concat(u)){let p=r(String(f),l);if(c.
321
+ some($=>p($)))return!0}return!1},o.every=(a,u,l)=>{let c=[].concat(a);for(let f of[].concat(u)){let p=r(String(f),l);if(!c.every($=>p($)))return!1}return!0},o.all=(a,u,l)=>{if(typeof a!="string")throw new TypeError(`Expected a string: "${t.inspect(a)}"`);return[].concat(u).every(c=>r(c,l)(a))},o.capture=(a,u,l)=>{let c=n.isWindows(l),p=r.makeRe(String(a),{...l,capture:!0}).exec(c?n.toPosixSlashes(u):u);if(p)return p.slice(1).map($=>$===void 0?"":$)},o.makeRe=(...a)=>r.makeRe(...a),o.scan=(...a)=>r.
322
+ scan(...a),o.parse=(a,u)=>{let l=[];for(let c of[].concat(a||[]))for(let f of e(String(c),u))l.push(r.parse(f,u));return l},o.braces=(a,u)=>{if(typeof a!="string")throw new TypeError("Expected a string");return u&&u.nobrace===!0||!i(a)?[a]:e(a,u)},o.braceExpand=(a,u)=>{if(typeof a!="string")throw new TypeError("Expected a string");return o.braces(a,{...u,expand:!0})},o.hasBraces=i,Pi=o,Pi}var Gm=zm();const Dc=qr(Gm),Bm={useRecommendedBuildConfig:!0,removeViteModuleLoader:!1,deleteInlinedFiles:!0};
323
+ function Wm(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"),u=t.replace(i,(l,c,f)=>`<script${c}${f}>${a.trim()}</script>`);return n?Zm(u):u}function Km(t,e,r){const n=e.replaceAll(".","\\."),s=new RegExp(`<link([^>]*?) href="(?:[^"]*?/)?${n}"([^>]*)>`),i=r.replace('@charset "UTF-8";',"");return t.replace(s,(a,u,l)=>`<style${u}${l}>${i.trim()}\
322
324
  </style>`)}const Ym=/\.[mc]?js$/,Xm=/\.css$/,Jm=/\.html?$/;function Qm({useRecommendedBuildConfig:t=!0,removeViteModuleLoader:e=!1,inlinePattern:r=[],deleteInlinedFiles:n=!0}=Bm){return{name:"vite:singlefile",config:t?eg:void 0,enforce:"post",generateBundle(s,i){const o=l=>this.info(`NOTE: asset not inlined: ${l}`);this.info(`
323
- `);const a={html:[],css:[],js:[],other:[]};for(const l of Object.keys(i))Jm.test(l)?a.html.push(l):Xm.test(l)?a.css.push(l):Ym.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 p of a.js){if(r.length&&!Tc.isMatch(p,r)){o(p);continue}const $=i[p];$.code!=null&&(this.info(`Inlining: ${p}`),c.push(p),f=Wm(f,$.fileName,$.code,e))}for(const p of a.css){if(r.length&&!Tc.isMatch(p,r)){o(p);continue}const $=i[p];this.info(`Inlining: ${p}`),c.push(
324
- p),f=Km(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 Zm=t=>t.replace(/(<script type="module" crossorigin>\s*)\(function(?: polyfill)?\(\)\s*\{[\s\S]*?\}\)\(\);/,'<script type="module">'),eg=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.
325
- 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 Qt(t){return t.length===0?"never":t.sort($p).map(e=>` | ${JSON.stringify(e)}`).join(`
326
- `).trimStart()}function jc(t){const e=oa(t);return e.length===0?"never":kh(e,_p,Mh(r=>` | ${JSON.stringify(r.id)}`)).join(`
327
- `).trimStart()}function Lc(t){return`
325
+ `);const a={html:[],css:[],js:[],other:[]};for(const l of Object.keys(i))Jm.test(l)?a.html.push(l):Xm.test(l)?a.css.push(l):Ym.test(l)?a.js.push(l):a.other.push(l);const u=[];for(const l of a.html){const c=i[l];let f=c.source;for(const p of a.js){if(r.length&&!Dc.isMatch(p,r)){o(p);continue}const $=i[p];$.code!=null&&(this.info(`Inlining: ${p}`),u.push(p),f=Wm(f,$.fileName,$.code,e))}for(const p of a.css){if(r.length&&!Dc.isMatch(p,r)){o(p);continue}const $=i[p];this.info(`Inlining: ${p}`),u.push(
326
+ p),f=Km(f,$.fileName,$.source)}c.source=f}if(n)for(const l of u)delete i[l];for(const l of a.other)o(l)}}}const Zm=t=>t.replace(/(<script type="module" crossorigin>\s*)\(function(?: polyfill)?\(\)\s*\{[\s\S]*?\}\)\(\);/,'<script type="module">'),eg=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.
327
+ 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 Qt(t){return t.length===0?"never":t.sort(yp).map(e=>` | ${JSON.stringify(e)}`).join(`
328
+ `).trimStart()}function xc(t){const e=aa(t);return e.length===0?"never":xh(e,$p,kh(r=>` | ${JSON.stringify(r.id)}`)).join(`
329
+ `).trimStart()}function kc(t){return`
328
330
  import type { Aux, SpecAux } from '@likec4/core/types';
329
331
 
330
332
  export type $Specs = SpecAux<
@@ -343,9 +345,9 @@ export type $Specs = SpecAux<
343
345
  export type $Aux = Aux<
344
346
  ${JSON.stringify(t.stage)},
345
347
  // Elements
346
- ${jc(t.$data.elements)},
348
+ ${xc(t.$data.elements)},
347
349
  // Deployments
348
- ${jc(t.$data.deployments.elements)},
350
+ ${xc(t.$data.deployments.elements)},
349
351
  // Views
350
352
  ${Qt(cr(t.$data.views))},
351
353
  // Project ID
@@ -363,7 +365,7 @@ export type $DeploymentKind = $Aux['DeploymentKind']
363
365
  export type $Tag = $Aux['Tag']
364
366
  export type $Tags = readonly $Aux['Tag'][]
365
367
  export type $MetadataKey = $Aux['MetadataKey']
366
- `.trimStart()}function tg(t){const e=new va,r=Lc(t),n=Sp(t.stage)+"LikeC4ModelData";return e.appendTemplate`
368
+ `.trimStart()}function tg(t){const e=new ba,r=kc(t),n=Sp(t.stage)+"LikeC4ModelData";return e.appendTemplate`
367
369
  /* prettier-ignore-start */
368
370
  /* eslint-disable */
369
371
 
@@ -379,7 +381,7 @@ export type $MetadataKey = $Aux['MetadataKey']
379
381
  export const likec4model: LikeC4Model<$Aux> = new LikeC4Model(<${n}<$Aux>>(${Gt.stringify(t.$data,{space:2,quote:"'"})} as unknown))
380
382
 
381
383
  /* prettier-ignore-end */
382
- `,xs(e)}function rg(t){return ba(t,e=>wa`${Gt.stringify(e.id)}`,{separator:" | "})}function ng(t){const e=Array.from(t),r=new va;return r.appendTemplate`
384
+ `,xs(e)}function rg(t){return wa(t,e=>Ea`${Gt.stringify(e.id)}`,{separator:" | "})}function ng(t){const e=Array.from(t),r=new ba;return r.appendTemplate`
383
385
  /******************************************************************************
384
386
  * This file was generated
385
387
  * DO NOT EDIT MANUALLY!
@@ -393,7 +395,7 @@ export type $MetadataKey = $Aux['MetadataKey']
393
395
  `.append(Wt,Wt),e.length===0?(r.append("export {}",Wt),xs(r)):(r.appendTemplate`
394
396
  export type LikeC4ViewId = ${rg(e)};
395
397
  export const LikeC4Views = {
396
- `.indent({indentation:2,indentedChildren(n){n.appendNewLineIf(e.length>1).append(ba(e,s=>wa`${Gt.stringify(s.id)}: (${Gt.stringify(s)} as unknown) as DiagramView`,{separator:",",appendNewLineIfNotEmpty:!0}))}}).append("} as const satisfies Record<LikeC4ViewId, DiagramView>",Wt,Wt).appendTemplate`
398
+ `.indent({indentation:2,indentedChildren(n){n.appendNewLineIf(e.length>1).append(wa(e,s=>Ea`${Gt.stringify(s.id)}: (${Gt.stringify(s)} as unknown) as DiagramView`,{separator:",",appendNewLineIfNotEmpty:!0}))}}).append("} as const satisfies Record<LikeC4ViewId, DiagramView>",Wt,Wt).appendTemplate`
397
399
  export type LikeC4Views = typeof LikeC4Views
398
400
 
399
401
  export function isLikeC4ViewId(value: unknown): value is LikeC4ViewId {
@@ -423,7 +425,7 @@ import type {
423
425
  ReactLikeC4Props as GenericReactLikeC4Props
424
426
  } from 'likec4/react'
425
427
 
426
- ${Lc(t)}
428
+ ${kc(t)}
427
429
 
428
430
  declare function isLikeC4ViewId(value: unknown): value is $ViewId;
429
431
 
@@ -461,82 +463,83 @@ export {
461
463
  ReactLikeC4
462
464
  }
463
465
  /* prettier-ignore-end */
464
- `.trimStart()}const Pi=async({languageServices:t,likec4AssetsDir:e,...r})=>{const n=r.customLogger??si,s=oi(),i=r?.useOverviewGraph===!0;n.info(`${K.cyan("likec4 app root")} ${K.dim(s)}`);const o=r.outputDir??ye(t.workspace,"dist");n.info(K.cyan("output")+" "+K.dim(o));let a="/";r.base&&(a=aa(r.base),!qh(a)&&a!=="./"&&(a=Uh(a))),a!=="/"&&n.info(`${K.green("app base url")} ${K.dim(a)}`);const c=r.webcomponentPrefix??"likec4";return{isDev:!1,likec4AssetsDir:e,webcomponentPrefix:c,root:s,languageServices:t,
465
- clearScreen:!1,base:a,resolve:{conditions:["production"],dedupe:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client"],alias:{...ui(),"likec4/previews":e}},configFile:!1,mode:"production",optimizeDeps:{force:!0,include:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react/jsx-dev-runtime","react-dom/client"]},define:{WEBCOMPONENT_PREFIX:JSON.stringify(c),__USE_OVERVIEW_GRAPH__:i?"true":"false",__USE_HASH_HISTORY__:r?.useHashHistory===!0?"true":"fal\
466
- se","process.env.NODE_ENV":'"production"'},build:{outDir:o,modulePreload:!1,emptyOutDir:!1,sourcemap:!1,cssCodeSplit:!0,cssMinify:!0,minify:!0,copyPublicDir:!0,chunkSizeWarningLimit:ci,rollupOptions:{treeshake:{preset:"recommended"},output:{hoistTransitiveImports:!1,compact:!0}}},customLogger:n,plugins:[Ds(),ks({languageServices:t.languageServices,useOverviewGraph:i})].concat(r.outputSingleFile?[Qm()]:[])}};async function Ii({languageServices:t,outDir:e,base:r,webcomponentPrefix:n="likec4",filename:s="\
467
- likec4-views.js"}){const i=si,o=oi();return i.info(K.cyan("outDir")+" "+K.dim(e)),{root:o,clearScreen:!1,base:r,configFile:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:ui()},define:{WEBCOMPONENT_PREFIX:JSON.stringify(n),"process.env.NODE_ENV":'"production"'},esbuild:{...ii},build:{outDir:e,emptyOutDir:!1,sourcemap:!1,minify:!0,assetsInlineLimit:100*1024,chunkSizeWarningLimit:ci,lib:{entry:"src/webcomponent.tsx",fileName(a,c){return s},formats:["iife"],name:"LikeC4Vi\
468
- ews"},rollupOptions:{treeshake:{preset:"recommended"},output:{format:"iife",hoistTransitiveImports:!1,compact:!0}}},customLogger:i,plugins:[Ds(),ks({languageServices:t.languageServices,useOverviewGraph:!1})]}}const ig=["favicon.ico","robots.txt"],og=async({buildWebcomponent:t=!0,webcomponentPrefix:e="likec4",languageServices:r,likec4AssetsDir:n,outputSingleFile:s,...i})=>{n??=await Hr(lr(Fr(),".likec4-assets-"));const{isDev:o,...a}=await Pi({...i,languageServices:r,likec4AssetsDir:n,webcomponentPrefix:e,
469
- outputSingleFile:s}),c=await ai();for(const u of ig){const f=ye(a.root,u);Ct(f)&&ya(f,ye(c,u))}const l=r.languageServices.projects();if(l.length===1){const u=await r.viewsService.computedViews(),f=await r.diagrams();if(f.length===0)throw process.exitCode=1,new Error("no views found");if(f.length===u.length?a.customLogger.info(`${K.dim("workspace:")} ${K.green("\u2713 all views layouted")}`):a.customLogger.warn(`${K.dim("workspace:")} ${K.yellow(`\u2717 layouted ${f.length} of ${u.length} views`)}`),
470
- f.forEach(p=>{p.hasLayoutDrift&&a.customLogger.warn(K.yellow("drift detected, manual layout can not be applied, view:")+" "+K.red(p.id))}),t){const p=await Ii({webcomponentPrefix:e,languageServices:r,outDir:c,base:a.base});await hr(p)}}else for(const u of l){const f=await r.viewsService.computedViews(u.id);f.length===0?a.customLogger.warn(`${K.dim("project:")} ${u.id} ${K.yellow("\u2717 no views found")}`):a.customLogger.info(`${K.dim("project:")} ${u.id} ${K.green(`${f.length} views`)}`)}if(await hr(
471
- {...a,publicDir:c,mode:"production"}),s)for(let u of up(ye(a.build.outDir)).filter(f=>f!=="index.html"))js(ye(a.build.outDir,u),{recursive:!0});else{const u=ye(a.build.outDir,"index.html");Ct(u)&&ya(u,ye(a.build.outDir,"404.html"))}};function Dc(t){return e=>e.length>1?[t,"run",e[0],"--",...e.slice(1)]:[t,"run",e[0]]}function ag(){return t=>["deno","run",`npm:${t[0]}`,...t.slice(1)]}const cg={agent:["npm",0],run:Dc("npm"),install:["npm","i",0],frozen:["npm","ci",0],global:["npm","i","-g",0],add:[
472
- "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]},xc={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],"upgrade-interactive":["yarn","upgrade-interactive",0],execute:["npx",0],"execute-local":["yarn","exec",0],uninstall:[
473
- "yarn","remove",0],global_uninstall:["yarn","global","remove",0]},ug={...xc,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]},kc={agent:["pnpm",0],run:["pnpm","run",0],install:["pnpm","i",0],frozen:["pnpm","i","--frozen-lockfile",0],global:["pnpm","add","-g",0],add:["pnpm","add",0],upgrade:["pnpm","update",0],
474
- "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]},lg={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-interactive":["bun","update",0],execute:["bun","x",0],"execute-local":["bun","x",0],uninstall:["bun","remove",0],global_uninstall:[
475
- "bun","remove","-g",0]},fg={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:ag(),"execute-local":["deno","task","--eval",0],uninstall:["deno","remove",0],global_uninstall:["deno","uninstall","-g",0]},dg={npm:cg,yarn:xc,"yarn@berry":ug,pnpm:kc,"pnpm@6":{...kc,run:Dc("pnpm")},bun:lg,deno:fg};
476
- function hg(t,e,r){const n=dg[t][e];return pg(n,r)}function pg(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 mg=["npm","yarn","yarn@berry","pnpm","pnpm@6","bun","deno"],Mc={"bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},qc={"node_modules/.deno/":"deno","node_modules/.\
477
- 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 Ni(t,e){try{const r=await $a.stat(t);return e==="file"?r.isFile():r.isDirectory()}catch{return!1}}function*gg(t=Se.cwd()){let e=me.resolve(t);const{root:r}=me.parse(e);for(;e&&e!==r;)yield e,e=me.dirname(e)}async function Uc(t,e){return!t||!Ni(t,"file")?null:await _g(t,e)}async function yg(t={}){
478
- const{cwd:e,strategies:r=["lockfile","packageManager-field","devEngines-field"],onUnknown:n}=t;for(const s of gg(e))for(const i of r)switch(i){case"lockfile":{for(const o of Object.keys(Mc))if(await Ni(me.join(s,o),"file")){const a=Mc[o],c=await Uc(me.join(s,"package.json"),n);return c||{name:a,agent:a}}break}case"packageManager-field":case"devEngines-field":{const o=await Uc(me.join(s,"package.json"),n);if(o)return o;break}case"install-metadata":{for(const o of Object.keys(qc)){const a=o.endsWith(
479
- "/")?"dir":"file";if(await Ni(me.join(s,o),a)){const c=qc[o],l=c==="yarn"?vg(o)?"yarn":"yarn@berry":c;return{name:c,agent:l}}}break}}return null}function $g(t){const e=r=>r?.match(/\d+(\.\d+){0,2}/)?.[0]??r;if(typeof t.packageManager=="string"){const[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 _g(t,e){try{const r=JSON.
480
- parse(await $a.readFile(t,"utf8"));let n;const s=$g(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,agent:n,version:a}):mg.includes(i)?(n=i,{name:i,agent:n,version:a}):e?.(r.packageManager)??null}}catch{}return null}function vg(t){return t.endsWith(".yarn_integrity")}function Hc(t){try{return!!yp.createRequire(import.meta.url).resolve(t)}catch(e){return ct.
481
- debug(As(e)),!1}}async function Cr(){if(Hc("react")&&Hc("react-dom")){ct.debug("react already installed");return}ct.debug("react not installed");const t=await yg();t||(ct.error`Package manager not detected, please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1));const e=hg(t.agent,"add",["react","react-dom"]);e||(ct.error`Please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1));try{await ca(e.command,e.args,{stdio:"inherit"})}catch(r){ct.debug(As(
482
- r)),ct.error`Please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1)}}var bg=Hh();const wg=qr(bg);function Fc(t){if(t.resolvedUrls)return ua(t.resolvedUrls.network)??ua(t.resolvedUrls.local)}function Vc(t){if(!t.resolvedUrls)throw new Error("Vite server is not ready, no resolvedUrls");At([K.green("LikeC4 served at:"),"",K.dim("Local: ")+t.resolvedUrls.local.join(`
466
+ `.trimStart()}const Ii=async({languageServices:t,likec4AssetsDir:e,...r})=>{const n=r.customLogger??ii,s=ai(),i=r?.useOverviewGraph===!0;n.info(`${K.cyan("likec4 app root")} ${K.dim(s)}`);const o=r.outputDir??ye(t.workspace,"dist");n.info(K.cyan("output")+" "+K.dim(o));let a="/";r.base&&(a=ca(r.base),!Mh(a)&&a!=="./"&&(a=qh(a))),a!=="/"&&n.info(`${K.green("app base url")} ${K.dim(a)}`);const u=r.webcomponentPrefix??"likec4";return{isDev:!1,likec4AssetsDir:e,webcomponentPrefix:u,root:s,languageServices:t,
467
+ clearScreen:!1,base:a,resolve:{conditions:["production"],dedupe:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client"],alias:{...li(),"likec4/previews":e}},configFile:!1,mode:"production",optimizeDeps:{force:!0},esbuild:{tsconfigRaw:{compilerOptions:{target:"ESNext",jsx:"react-jsx"}}},define:{WEBCOMPONENT_PREFIX:JSON.stringify(u),__USE_OVERVIEW_GRAPH__:i?"true":"false",__USE_HASH_HISTORY__:r?.useHashHistory===!0?"true":"false","process.env.NODE_ENV":'"production"'},
468
+ build:{outDir:o,modulePreload:!1,emptyOutDir:!1,sourcemap:!1,cssCodeSplit:!0,cssMinify:!0,minify:!0,copyPublicDir:!0,chunkSizeWarningLimit:ui,rollupOptions:{treeshake:{preset:"recommended"},output:{hoistTransitiveImports:!1,compact:!0}}},customLogger:n,plugins:[Ds(),ks({languageServices:t.languageServices,useOverviewGraph:i})].concat(r.outputSingleFile?[Qm()]:[])}};async function Ni({languageServices:t,outDir:e,base:r,webcomponentPrefix:n="likec4",filename:s="likec4-views.js"}){const i=ii,o=ai();
469
+ return i.info(K.cyan("outDir")+" "+K.dim(e)),{root:o,clearScreen:!1,base:r,configFile:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:li()},define:{WEBCOMPONENT_PREFIX:JSON.stringify(n),"process.env.NODE_ENV":'"production"'},esbuild:{...oi},build:{outDir:e,emptyOutDir:!1,sourcemap:!1,minify:!0,assetsInlineLimit:100*1024,chunkSizeWarningLimit:ui,lib:{entry:"src/webcomponent.tsx",fileName(a,u){return s},formats:["iife"],name:"LikeC4Views"},rollupOptions:{treeshake:{preset:"\
470
+ recommended"},output:{format:"iife",hoistTransitiveImports:!1,compact:!0}}},customLogger:i,plugins:[Ds(),ks({languageServices:t.languageServices,useOverviewGraph:!1})]}}const ig=["favicon.ico","robots.txt"],og=async({buildWebcomponent:t=!0,webcomponentPrefix:e="likec4",languageServices:r,likec4AssetsDir:n,outputSingleFile:s,...i})=>{n??=await Hr(lr(Fr(),".likec4-assets-"));const{isDev:o,...a}=await Ii({...i,languageServices:r,likec4AssetsDir:n,webcomponentPrefix:e,outputSingleFile:s}),u=await ci();
471
+ for(const c of ig){const f=ye(a.root,c);Ct(f)&&$a(f,ye(u,c))}const l=r.languageServices.projects();if(l.length===1){const c=await r.viewsService.computedViews(),f=await r.diagrams();if(f.length===0)throw process.exitCode=1,new Error("no views found");if(f.length===c.length?a.customLogger.info(`${K.dim("workspace:")} ${K.green("\u2713 all views layouted")}`):a.customLogger.warn(`${K.dim("workspace:")} ${K.yellow(`\u2717 layouted ${f.length} of ${c.length} views`)}`),f.forEach(p=>{p.hasLayoutDrift&&
472
+ a.customLogger.warn(K.yellow("drift detected, manual layout can not be applied, view:")+" "+K.red(p.id))}),t){const p=await Ni({webcomponentPrefix:e,languageServices:r,outDir:u,base:a.base});await hr(p)}}else for(const c of l){const f=await r.viewsService.computedViews(c.id);f.length===0?a.customLogger.warn(`${K.dim("project:")} ${c.id} ${K.yellow("\u2717 no views found")}`):a.customLogger.info(`${K.dim("project:")} ${c.id} ${K.green(`${f.length} views`)}`)}if(await hr({...a,publicDir:u,mode:"pr\
473
+ oduction"}),s)for(let c of cp(ye(a.build.outDir)).filter(f=>f!=="index.html"))js(ye(a.build.outDir,c),{recursive:!0});else{const c=ye(a.build.outDir,"index.html");Ct(c)&&$a(c,ye(a.build.outDir,"404.html"))}};function Ti(t,e){return r=>r.length>1?[t,e,r[0],"--",...r.slice(1)]:[t,e,r[0]]}function ag(){return t=>["deno","run",`npm:${t[0]}`,...t.slice(1)]}const cg={agent:["npm",0],run:Ti("npm","run"),install:["npm","i",0],frozen:["npm","ci",0],global:["npm","i","-g",0],add:["npm","i",0],upgrade:["np\
474
+ m","update",0],"upgrade-interactive":null,execute:["npx",0],"execute-local":["npx",0],uninstall:["npm","uninstall",0],global_uninstall:["npm","uninstall","-g",0]},Mc={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],"upgrade-interactive":["yarn","upgrade-interactive",0],execute:["npx",0],"execute-local":Ti("yarn","exec"),uninstall:["yarn","remove",0],
475
+ global_uninstall:["yarn","global","remove",0]},ug={...Mc,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]},qc={agent:["pnpm",0],run:["pnpm","run",0],install:["pnpm","i",0],frozen:["pnpm","i","--frozen-lockfile",0],global:["pnpm","add","-g",0],add:["pnpm","add",0],upgrade:["pnpm","update",0],"upgrade-interactiv\
476
+ e":["pnpm","update","-i",0],execute:["pnpm","dlx",0],"execute-local":["pnpm","exec",0],uninstall:["pnpm","remove",0],global_uninstall:["pnpm","remove","--global",0]},lg={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-interactive":["bun","update",0],execute:["bun","x",0],"execute-local":["bun","x",0],uninstall:["bun","remove",0],global_uninstall:["bun",
477
+ "remove","-g",0]},fg={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:ag(),"execute-local":["deno","task","--eval",0],uninstall:["deno","remove",0],global_uninstall:["deno","uninstall","-g",0]},dg={npm:cg,yarn:Mc,"yarn@berry":ug,pnpm:qc,"pnpm@6":{...qc,run:Ti("pnpm","run")},bun:lg,deno:fg};
478
+ function hg(t,e,r){const n=dg[t][e];return pg(n,r)}function pg(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 mg=["npm","yarn","yarn@berry","pnpm","pnpm@6","bun","deno"],Uc={"bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},Hc={"node_modules/.deno/":"deno","node_modules/.\
479
+ 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 ji(t,e){try{const r=await _a.stat(t);return e==="file"?r.isFile():r.isDirectory()}catch{return!1}}function*gg(t=Se.cwd()){let e=pe.resolve(t);const{root:r}=pe.parse(e);for(;e&&e!==r;)yield e,e=pe.dirname(e)}async function Fc(t,e){return!t||!ji(t,"file")?null:await _g(t,e)}async function yg(t={}){
480
+ const{cwd:e,strategies:r=["lockfile","packageManager-field","devEngines-field"],onUnknown:n}=t;let s;if(typeof t.stopDir=="string"){const i=pe.resolve(t.stopDir);s=o=>o===i}else s=t.stopDir;for(const i of gg(e)){for(const o of r)switch(o){case"lockfile":{for(const a of Object.keys(Uc))if(await ji(pe.join(i,a),"file")){const u=Uc[a],l=await Fc(pe.join(i,"package.json"),n);return l||{name:u,agent:u}}break}case"packageManager-field":case"devEngines-field":{const a=await Fc(pe.join(i,"package.json"),
481
+ n);if(a)return a;break}case"install-metadata":{for(const a of Object.keys(Hc)){const u=a.endsWith("/")?"dir":"file";if(await ji(pe.join(i,a),u)){const l=Hc[a],c=l==="yarn"?vg(a)?"yarn":"yarn@berry":l;return{name:l,agent:c}}}break}}if(s?.(i))break}return null}function $g(t){const e=r=>r?.match(/\d+(\.\d+){0,2}/)?.[0]??r;if(typeof t.packageManager=="string"){const[r,n]=t.packageManager.replace(/^\^/,"").split("@");return{name:r,ver:e(n)}}if(typeof t.devEngines?.packageManager?.name=="string")return{
482
+ name:t.devEngines.packageManager.name,ver:e(t.devEngines.packageManager.version)}}async function _g(t,e){try{const r=JSON.parse(await _a.readFile(t,"utf8"));let n;const s=$g(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,agent:n,version:a}):mg.includes(i)?(n=i,{name:i,agent:n,version:a}):e?.(r.packageManager)??null}}catch{}return null}function vg(t){return t.
483
+ endsWith(".yarn_integrity")}function Vc(t){try{return!!gp.createRequire(import.meta.url).resolve(t)}catch(e){return ct.debug(As(e)),!1}}async function Cr(){if(Vc("react")&&Vc("react-dom")){ct.debug("react already installed");return}ct.debug("react not installed");const t=await yg();t||(ct.error`Package manager not detected, please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1));const e=hg(t.agent,"add",["react","react-dom"]);e||(ct.error`Please install dependencies manually: ${"\
484
+ react"} ${"react-dom"}`,process.exit(1));try{await ua(e.command,e.args,{stdio:"inherit"})}catch(r){ct.debug(As(r)),ct.error`Please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1)}}var bg=Uh();const wg=qr(bg);function zc(t){if(t.resolvedUrls)return la(t.resolvedUrls.network)??la(t.resolvedUrls.local)}function Gc(t){if(!t.resolvedUrls)throw new Error("Vite server is not ready, no resolvedUrls");At([K.green("LikeC4 served at:"),"",K.dim("Local: ")+t.resolvedUrls.local.join(
485
+ `
483
486
  `+"".padEnd(9," ")),t.resolvedUrls.network.length?K.dim("Network: ")+t.resolvedUrls.network.join(`
484
- `+"".padEnd(9," ")):void 0].filter(e=>Fh(e)).join(`
485
- `))}class zc extends Error{constructor(e){super(`${e} is locked`)}}const Zt={old:new Set,young:new Set},Eg=1e3*15,an=1024,cn=65535;let Pr;const Sg=()=>{const t=dr.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},Gc=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)})})}),Bc=async(t,e)=>{if(t.host||t.port===0)return Gc(t);for(const r of e)
486
- try{await Gc({port:t.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return t.port},Rg=function*(t){t&&(yield*t),yield 0};async function Ti(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\
487
- 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)}Pr===void 0&&(Pr=setTimeout(()=>{Pr=void 0,Zt.old=Zt.young,Zt.young=new Set},Eg),Pr.unref&&Pr.unref());const n=Sg();for(const s of Rg(e))try{if(r.has(s))continue;let i=await Bc({...t,port:s},n);for(;Zt.old.has(i)||Zt.young.has(i);){if(s!==0)throw new zc(s);i=await Bc({...t,port:s},n)}return Zt.young.add(i),i}catch(i){
488
- if(!["EADDRINUSE","EACCES"].includes(i.code)&&!(i instanceof zc))throw i}throw new Error("No available ports found")}function un(t,e){if(!Number.isInteger(t)||!Number.isInteger(e))throw new TypeError("`from` and `to` must be integer numbers");if(t<an||t>cn)throw new RangeError(`'from' must be between ${an} and ${cn}`);if(e<an||e>cn)throw new RangeError(`'to' must be between ${an} and ${cn}`);if(t>e)throw new RangeError("`to` must be greater than or equal to `from`");return function*(n,s){for(let i=n;i<=
489
- s;i++)yield i}(t,e)}async function Wc({buildWebcomponent:t=!0,hmr:e=!0,webcomponentPrefix:r="likec4",languageServices:n,likec4AssetsDir:s,openBrowser:i,listen:o,...a}){s??=await Hr(lr(Fr(),".likec4-assets-"));const{isDev:c,...l}=await Pi({...a,languageServices:n,likec4AssetsDir:s,webcomponentPrefix:r}),u=await Ti({port:[5173,...un(61e3,61010),...un(62002,62010)]}),f=await Ti({port:un(24678,24690)}),p=await ai();let $;if(t){const y=await Ii({webcomponentPrefix:r,languageServices:n,outDir:p,base:l.
490
- base});$=hr({...y,logLevel:"warn"}).catch(d=>(at.warn("webcomponent build failed",{err:d}),at.warn("Ignoring error and continuing"),Promise.resolve()))}const b=await mp({...l,define:Object.assign({},l.define,e&&{"process.env.NODE_ENV":'"development"'}),mode:e?"development":l.mode,publicDir:p,server:{host:o??"127.0.0.1",allowedHosts:!0,port:u,hmr:e&&{overlay:!0,port:f},fs:{strict:!1},open:i??!c}});return await b.listen(),$&&await $,b}async function Ag({browserContext:t,views:e,output:r,logger:n,timeout:s,
491
- maxAttempts:i,outputType:o,theme:a}){let c;const l=e.map(p=>({view:p,attempt:1})),u=[];let f;for(;f=l.shift();){const{view:p,attempt:$}=f,b=`export/${encodeURIComponent(p.id)}`;try{if($>1){c&&(c.close({runBeforeUnload:!0}).catch(m=>n.error(`failed to close page: ${m}`)),c=void 0);const h=la($*200,{min:200,max:1e3});n.info(K.cyan(b)+K.dim(` attempt ${$} of ${i} after ${h}ms`)),await bp(h)}else p.hasLayoutDrift&&n.warn(K.yellow("Drift detected, manual layout can not be applied, view may be invalid\
492
- : ")+K.red(p.id));let y=".";o==="relative"&&(y=p.relativePath??".",y.includes("/")?y=y.slice(0,y.lastIndexOf("/")):y=".");const d=ye(r,y,`${p.id}.png`);c??=await t.newPage();const g=16;await c.setViewportSize({width:p.bounds.width+20*2+g,height:p.bounds.height+20*2+g}),await c.goto(b+`?padding=20&theme=${a}`),n.info(K.cyan(b)+K.dim(` -> ${gt(r,d)}`)),p.nodes.some(h=>Vh(h.icon)&&h.icon.toLowerCase().startsWith("http"))&&await Og(c,s),await c.waitForSelector(".react-flow.initialized"),await c.screenshot(
493
- {animations:"disabled",path:d,omitBackground:!0}),u.push({view:p,path:d})}catch(y){c?.close({runBeforeUnload:!0}).catch(d=>n.error(`failed to close page: ${d}`)),n.error(K.red("failed "+b+`
494
- `+y)),$<i&&(l.push({view:p,attempt:$+1}),n.info(K.dim(`retry ${b}`))),c=void 0}}return u}async function Og(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,a)=>{i.onload=o,i.onerror=a}),{timeout:Math.max(3e4,e)}));await Promise.allSettled(n)}async function Kc({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}`),
487
+ `+"".padEnd(9," ")):void 0].filter(e=>Hh(e)).join(`
488
+ `))}class Bc extends Error{constructor(e){super(`${e} is locked`)}}const Zt={old:new Set,young:new Set},Eg=1e3*15,an=1024,cn=65535;let Pr;const Sg=()=>{const t=dr.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},Wc=t=>new Promise((e,r)=>{const n=_p.createServer();n.unref(),n.on("error",r),n.listen(t,()=>{const{port:s}=n.address();n.close(()=>{e(s)})})}),Kc=async(t,e)=>{if(t.host||t.port===0)return Wc(t);for(const r of e)
489
+ try{await Wc({port:t.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return t.port},Rg=function*(t){t&&(yield*t),yield 0};async function Li(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\
490
+ 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)}Pr===void 0&&(Pr=setTimeout(()=>{Pr=void 0,Zt.old=Zt.young,Zt.young=new Set},Eg),Pr.unref&&Pr.unref());const n=Sg();for(const s of Rg(e))try{if(r.has(s))continue;let i=await Kc({...t,port:s},n);for(;Zt.old.has(i)||Zt.young.has(i);){if(s!==0)throw new Bc(s);i=await Kc({...t,port:s},n)}return Zt.young.add(i),i}catch(i){
491
+ if(!["EADDRINUSE","EACCES"].includes(i.code)&&!(i instanceof Bc))throw i}throw new Error("No available ports found")}function un(t,e){if(!Number.isInteger(t)||!Number.isInteger(e))throw new TypeError("`from` and `to` must be integer numbers");if(t<an||t>cn)throw new RangeError(`'from' must be between ${an} and ${cn}`);if(e<an||e>cn)throw new RangeError(`'to' must be between ${an} and ${cn}`);if(t>e)throw new RangeError("`to` must be greater than or equal to `from`");return function*(n,s){for(let i=n;i<=
492
+ s;i++)yield i}(t,e)}async function Yc({buildWebcomponent:t=!0,hmr:e=!0,webcomponentPrefix:r="likec4",languageServices:n,likec4AssetsDir:s,openBrowser:i,listen:o,...a}){s??=await Hr(lr(Fr(),".likec4-assets-"));const{isDev:u,...l}=await Ii({...a,languageServices:n,likec4AssetsDir:s,webcomponentPrefix:r}),c=await Li({port:[5173,...un(61e3,61010),...un(62002,62010)]}),f=await Li({port:un(24678,24690)}),p=await ci();let $;if(t){const y=await Ni({webcomponentPrefix:r,languageServices:n,outDir:p,base:l.
493
+ base});$=hr({...y,logLevel:"warn"}).catch(d=>(at.warn("webcomponent build failed",{err:d}),at.warn("Ignoring error and continuing"),Promise.resolve()))}const b=await pp({...l,define:Object.assign({},l.define,e&&{"process.env.NODE_ENV":'"development"'}),mode:e?"development":l.mode,publicDir:p,server:{host:o??"127.0.0.1",allowedHosts:!0,port:c,hmr:e&&{overlay:!0,port:f},fs:{strict:!1},open:i??!u}});return await b.listen(),$&&await $,b}async function Ag({browserContext:t,views:e,output:r,logger:n,timeout:s,
494
+ maxAttempts:i,outputType:o,theme:a}){let u;const l=e.map(p=>({view:p,attempt:1})),c=[];let f;for(;f=l.shift();){const{view:p,attempt:$}=f,b=`export/${encodeURIComponent(p.id)}`;try{if($>1){u&&(u.close({runBeforeUnload:!0}).catch(m=>n.error(`failed to close page: ${m}`)),u=void 0);const h=fa($*200,{min:200,max:1e3});n.info(K.cyan(b)+K.dim(` attempt ${$} of ${i} after ${h}ms`)),await vp(h)}else p.hasLayoutDrift&&n.warn(K.yellow("Drift detected, manual layout can not be applied, view may be invalid\
495
+ : ")+K.red(p.id));let y=".";o==="relative"&&(y=p.relativePath??".",y.includes("/")?y=y.slice(0,y.lastIndexOf("/")):y=".");const d=ye(r,y,`${p.id}.png`);u??=await t.newPage();const g=16;await u.setViewportSize({width:p.bounds.width+20*2+g,height:p.bounds.height+20*2+g}),await u.goto(b+`?padding=20&theme=${a}`),n.info(K.cyan(b)+K.dim(` -> ${gt(r,d)}`)),p.nodes.some(h=>Fh(h.icon)&&h.icon.toLowerCase().startsWith("http"))&&await Og(u,s),await u.waitForSelector(".react-flow.initialized"),await u.screenshot(
496
+ {animations:"disabled",path:d,omitBackground:!0}),c.push({view:p,path:d})}catch(y){u?.close({runBeforeUnload:!0}).catch(d=>n.error(`failed to close page: ${d}`)),n.error(K.red("failed "+b+`
497
+ `+y)),$<i&&(l.push({view:p,attempt:$+1}),n.info(K.dim(`retry ${b}`))),u=void 0}}return c}async function Og(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,a)=>{i.onload=o,i.onerror=a}),{timeout:Math.max(3e4,e)}));await Promise.allSettled(n)}async function Xc({logger:t,serverUrl:e,theme:r="light",timeoutMs:n=15e3,views:s,output:i,outputType:o="relative",maxAttempts:a=3,chromiumSandbox:u=!1}){t.info(`${K.dim("output")} ${i}`),
495
498
  t.info(`${K.dim("base url")} ${e}
496
- `);const l=Ra.executablePath();t.info(K.cyan("Start chromium")+" "+K.dim(l));const u=await Ra.launch({chromiumSandbox:c,headless:!0});t.info(K.cyan("Color scheme: ")+r+`
497
- `);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 Ag({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 Yc({path:t,useDotBin:e,theme:r="light",output:n,outputType:s,serverUrl:i,ignore:o=!1,timeoutMs:a=1e4,maxAttempts:c=3,filter:l,
498
- chromiumSandbox:u=!1}){const f=tt("export"),p=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 Wc({languageServices:$,buildWebcomponent:!1,openBrowser:!1,useOverviewGraph:!1,hmr:!1}),i=Fc(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("----\
499
- -----")),f.info(`${K.dim("project:")} ${d.id}`),f.info(`${K.dim("folder:")} ${d.folder.fsPath}`));let g=await $.diagrams(d.id);if(l&&Ms(l,1)&&Ms(g,1)){const w=wg(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(!Ms(g,1)){f.warn("no views found");continue}let h=y.length>1?aa(fa(i,"project",d.id)):i,m=y.length>1?fa(n,d.id):n;const _=await Kc({logger:f,serverUrl:h,
500
- theme:r,timeoutMs:a,views:g,output:m,outputType:s,maxAttempts:c,chromiumSandbox:u}),{pretty:v}=zh(p);if(_.length>0&&f.info(K.green(`exported ${_.length} views in ${v}`)+`
501
- `),_.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:Xc,dim:Jc}=K;async function Cg({path:t,useDotBin:e,useHashHistory:r,webcomponentPrefix:n,useOverview:s=!1,
502
- output:i,outputSingleFile:o,base:a}){await Cr();const c=tt("c4:build"),l=await rt.fromWorkspace(t,{graphviz:e?"binary":"wasm",logger:"vite"}),u=i??ye(l.workspace,"dist");let f=ye(u,"assets");if(s)try{f=ye(u,"assets","previews"),await ut(f,{recursive:!0}),c.info(`${Xc("Generate previews")} ${Jc(f)}
503
- `),await Yc({path:t,useDotBin:e,output:f,outputType:"flat",ignore:!0})}catch(p){c.error(K.red("Failed to generate previews")),c.error(p),c.warn(K.yellow("Ignore previews and continue build")),js(f,{recursive:!0,force:!0}),s=!1}await og({base:a,useHashHistory:o||r,customLogger:c,useOverviewGraph:s,webcomponentPrefix:n,languageServices:l,likec4AssetsDir:f,outputDir:i,outputSingleFile:o}),s&&(c.info(`${Xc("clean previews")} ${Jc(f)}`),js(f,{recursive:!0,force:!0}))}const Pg={command:"build [path]",
504
- aliases:["bundle"],describe:"Build a static website",builder:t=>t.positional("path",Ar).option("output",{alias:"o",type:"string",desc:"output directory for production build",normalize:!0,coerce:ye}).option("base",lc).option("use-hash-history",uc).option("use-dot",Be).option("webcomponent-prefix",ni).option("use-overview",fc).option("output-single-file",Om).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=>{
505
- await Cg({path:t.path,output:t.output,base:t.base,useHashHistory:t["use-hash-history"],useDotBin:t["use-dot"],useOverview:t["use-overview"]??!1,webcomponentPrefix:t["webcomponent-prefix"],outputSingleFile:t["output-single-file"]??!1})}},Ut=t=>{const e=typeof t;return t!==null&&(e==="object"||e==="function")},ji=new Set(["__proto__","prototype","constructor"]),Ig=new Set("0123456789");function ln(t){const e=[];let r="",n="start",s=!1;for(const i of t)switch(i){case"\\":{if(n==="index")throw new Error(
506
- "Invalid character 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(ji.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(ji.has(r))return[];e.push(
507
- r),r=""}n="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"&&!Ig.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(ji.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not \
508
- closed");case"start":{e.push("");break}}return e}function Li(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 Qc(t,e){if(Li(t,e))throw new Error("Cannot use string index")}function Ng(t,e,r){if(!Ut(t)||typeof e!="string")return r===void 0?t:r;const n=ln(e);if(n.length===0)return r;for(let s=0;s<n.length;s++){const i=n[s];if(Li(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===
509
- void 0?r:t}function Zc(t,e,r){if(!Ut(t)||typeof e!="string")return t;const n=t,s=ln(e);for(let i=0;i<s.length;i++){const o=s[i];Qc(t,o),i===s.length-1?t[o]=r:Ut(t[o])||(t[o]=typeof s[i+1]=="number"?[]:{}),t=t[o]}return n}function Tg(t,e){if(!Ut(t)||typeof e!="string")return!1;const r=ln(e);for(let n=0;n<r.length;n++){const s=r[n];if(Qc(t,s),n===r.length-1)return delete t[s],!0;if(t=t[s],!Ut(t))return!1}}function jg(t,e){if(!Ut(t)||typeof e!="string")return!1;const r=ln(e);if(r.length===0)return!1;
510
- for(const n of r){if(!Ut(t)||!(n in t)||Li(t,n))return!1;t=t[n]}return!0}const vt=dr.homedir(),Di=dr.tmpdir(),{env:er}=Se,Lg=t=>{const e=me.join(vt,"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(Di,t)}},Dg=t=>{const e=er.APPDATA||me.join(vt,"AppData","Roaming"),r=er.LOCALAPPDATA||me.join(vt,"AppData","Local");return{data:me.join(r,t,"Data"),config:me.join(e,t,"Config"),cache:me.join(r,t,
511
- "Cache"),log:me.join(r,t,"Log"),temp:me.join(Di,t)}},xg=t=>{const e=me.basename(vt);return{data:me.join(er.XDG_DATA_HOME||me.join(vt,".local","share"),t),config:me.join(er.XDG_CONFIG_HOME||me.join(vt,".config"),t),cache:me.join(er.XDG_CACHE_HOME||me.join(vt,".cache"),t),log:me.join(er.XDG_STATE_HOME||me.join(vt,".local","state"),t),temp:me.join(Di,e,t)}};function kg(t,{suffix:e="nodejs"}={}){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);return e&&(t+=`-${e}`),Se.
499
+ `);const l=Aa.executablePath();t.info(K.cyan("Start chromium")+" "+K.dim(l));const c=await Aa.launch({chromiumSandbox:u,headless:!0});t.info(K.cyan("Color scheme: ")+r+`
500
+ `);const f=await c.newContext({deviceScaleFactor:2,colorScheme:r,baseURL:e,bypassCSP:!0,ignoreHTTPSErrors:!0,isMobile:!1});f.setDefaultNavigationTimeout(n),f.setDefaultTimeout(n);try{return await Ag({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 c.close()}}async function Jc({path:t,useDotBin:e,theme:r="light",output:n,outputType:s,serverUrl:i,ignore:o=!1,timeoutMs:a=1e4,maxAttempts:u=3,filter:l,
501
+ chromiumSandbox:c=!1}){const f=tt("export"),p=Yh(),$=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 Yc({languageServices:$,buildWebcomponent:!1,openBrowser:!1,useOverviewGraph:!1,hmr:!1}),i=zc(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("----\
502
+ -----")),f.info(`${K.dim("project:")} ${d.id}`),f.info(`${K.dim("folder:")} ${d.folder.fsPath}`));let g=await $.diagrams(d.id);if(l&&Ms(l,1)&&Ms(g,1)){const w=wg(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(!Ms(g,1)){f.warn("no views found");continue}let h=y.length>1?ca(da(i,"project",d.id)):i,m=y.length>1?da(n,d.id):n;const _=await Xc({logger:f,serverUrl:h,
503
+ theme:r,timeoutMs:a,views:g,output:m,outputType:s,maxAttempts:u,chromiumSandbox:c}),{pretty:v}=Vh(p);if(_.length>0&&f.info(K.green(`exported ${_.length} views in ${v}`)+`
504
+ `),_.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:Qc,dim:Zc}=K;async function Cg({path:t,useDotBin:e,useHashHistory:r,webcomponentPrefix:n,useOverview:s=!1,
505
+ output:i,outputSingleFile:o,base:a}){await Cr();const u=tt("c4:build"),l=await rt.fromWorkspace(t,{graphviz:e?"binary":"wasm",logger:"vite"}),c=i??ye(l.workspace,"dist");let f=ye(c,"assets");if(s)try{f=ye(c,"assets","previews"),await ut(f,{recursive:!0}),u.info(`${Qc("Generate previews")} ${Zc(f)}
506
+ `),await Jc({path:t,useDotBin:e,output:f,outputType:"flat",ignore:!0})}catch(p){u.error(K.red("Failed to generate previews")),u.error(p),u.warn(K.yellow("Ignore previews and continue build")),js(f,{recursive:!0,force:!0}),s=!1}await og({base:a,useHashHistory:o||r,customLogger:u,useOverviewGraph:s,webcomponentPrefix:n,languageServices:l,likec4AssetsDir:f,outputDir:i,outputSingleFile:o}),s&&(u.info(`${Qc("clean previews")} ${Zc(f)}`),js(f,{recursive:!0,force:!0}))}const Pg={command:"build [path]",
507
+ aliases:["bundle"],describe:"Build a static website",builder:t=>t.positional("path",Ar).option("output",{alias:"o",type:"string",desc:"output directory for production build",normalize:!0,coerce:ye}).option("base",hc).option("use-hash-history",dc).option("use-dot",Be).option("webcomponent-prefix",si).option("use-overview",pc).option("output-single-file",Om).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
+ await Cg({path:t.path,output:t.output,base:t.base,useHashHistory:t["use-hash-history"],useDotBin:t["use-dot"],useOverview:t["use-overview"]??!1,webcomponentPrefix:t["webcomponent-prefix"],outputSingleFile:t["output-single-file"]??!1})}},Ut=t=>{const e=typeof t;return t!==null&&(e==="object"||e==="function")},Di=new Set(["__proto__","prototype","constructor"]),Ig=new Set("0123456789");function ln(t){const e=[];let r="",n="start",s=!1;for(const i of t)switch(i){case"\\":{if(n==="index")throw new Error(
509
+ "Invalid character 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(Di.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(Di.has(r))return[];e.push(
510
+ r),r=""}n="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"&&!Ig.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(Di.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not \
511
+ closed");case"start":{e.push("");break}}return e}function xi(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 eu(t,e){if(xi(t,e))throw new Error("Cannot use string index")}function Ng(t,e,r){if(!Ut(t)||typeof e!="string")return r===void 0?t:r;const n=ln(e);if(n.length===0)return r;for(let s=0;s<n.length;s++){const i=n[s];if(xi(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===
512
+ void 0?r:t}function tu(t,e,r){if(!Ut(t)||typeof e!="string")return t;const n=t,s=ln(e);for(let i=0;i<s.length;i++){const o=s[i];eu(t,o),i===s.length-1?t[o]=r:Ut(t[o])||(t[o]=typeof s[i+1]=="number"?[]:{}),t=t[o]}return n}function Tg(t,e){if(!Ut(t)||typeof e!="string")return!1;const r=ln(e);for(let n=0;n<r.length;n++){const s=r[n];if(eu(t,s),n===r.length-1)return delete t[s],!0;if(t=t[s],!Ut(t))return!1}}function jg(t,e){if(!Ut(t)||typeof e!="string")return!1;const r=ln(e);if(r.length===0)return!1;
513
+ for(const n of r){if(!Ut(t)||!(n in t)||xi(t,n))return!1;t=t[n]}return!0}const vt=dr.homedir(),ki=dr.tmpdir(),{env:er}=Se,Lg=t=>{const e=pe.join(vt,"Library");return{data:pe.join(e,"Application Support",t),config:pe.join(e,"Preferences",t),cache:pe.join(e,"Caches",t),log:pe.join(e,"Logs",t),temp:pe.join(ki,t)}},Dg=t=>{const e=er.APPDATA||pe.join(vt,"AppData","Roaming"),r=er.LOCALAPPDATA||pe.join(vt,"AppData","Local");return{data:pe.join(r,t,"Data"),config:pe.join(e,t,"Config"),cache:pe.join(r,t,
514
+ "Cache"),log:pe.join(r,t,"Log"),temp:pe.join(ki,t)}},xg=t=>{const e=pe.basename(vt);return{data:pe.join(er.XDG_DATA_HOME||pe.join(vt,".local","share"),t),config:pe.join(er.XDG_CONFIG_HOME||pe.join(vt,".config"),t),cache:pe.join(er.XDG_CACHE_HOME||pe.join(vt,".cache"),t),log:pe.join(er.XDG_STATE_HOME||pe.join(vt,".local","state"),t),temp:pe.join(ki,e,t)}};function kg(t,{suffix:e="nodejs"}={}){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);return e&&(t+=`-${e}`),Se.
512
515
  platform==="darwin"?Lg(t):Se.platform==="win32"?Dg(t):xg(t)}const bt=(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)}},Mg=Se.getuid?!Se.getuid():!1,qg=1e4,qe=()=>{},be={isChangeErrorOk:t=>{if(!be.isNodeError(t))return!1;const{code:e}=t;return e==="ENOSYS"||!Mg&&(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===
513
516
  "ENFILE"||e==="EAGAIN"||e==="EBUSY"||e==="EACCESS"||e==="EACCES"||e==="EACCS"||e==="EPERM"},onChangeError:t=>{if(!be.isNodeError(t))throw t;if(!be.isChangeErrorOk(t))throw t}};class Ug{constructor(){this.interval=25,this.intervalId=void 0,this.limit=qg,this.queueActive=new Set,this.queueWaiting=new Set,this.init=()=>{this.intervalId||(this.intervalId=setInterval(this.tick,this.interval))},this.reset=()=>{this.intervalId&&(clearInterval(this.intervalId),delete this.intervalId)},this.add=e=>{this.
514
517
  queueWaiting.add(e),this.queueActive.size<this.limit/2?this.tick():this.init()},this.remove=e=>{this.queueWaiting.delete(e),this.queueActive.delete(e)},this.schedule=()=>new Promise(e=>{const r=()=>this.remove(n),n=()=>e(r);this.add(n)}),this.tick=()=>{if(!(this.queueActive.size>=this.limit)){if(!this.queueWaiting.size)return this.reset();for(const e of this.queueWaiting){if(this.queueActive.size>=this.limit)break;this.queueWaiting.delete(e),this.queueActive.add(e),e()}}}}}const Hg=new Ug,wt=(t,e)=>function(n){
515
- return function s(...i){return Hg.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(p=>setTimeout(p,u)).then(()=>s.apply(void 0,i))}throw l};return t.apply(void 0,i).then(a,c)})}},Et=(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:bt(Ie(pe.chmod),be.onChangeError),chown:bt(Ie(pe.chown),be.
516
- onChangeError),close:bt(Ie(pe.close),qe),fsync:bt(Ie(pe.fsync),qe),mkdir:bt(Ie(pe.mkdir),qe),realpath:bt(Ie(pe.realpath),qe),stat:bt(Ie(pe.stat),qe),unlink:bt(Ie(pe.unlink),qe),chmodSync:ft(pe.chmodSync,be.onChangeError),chownSync:ft(pe.chownSync,be.onChangeError),closeSync:ft(pe.closeSync,qe),existsSync:ft(pe.existsSync,qe),fsyncSync:ft(pe.fsync,qe),mkdirSync:ft(pe.mkdirSync,qe),realpathSync:ft(pe.realpathSync,qe),statSync:ft(pe.statSync,qe),unlinkSync:ft(pe.unlinkSync,qe)},retry:{close:wt(Ie(pe.
517
- close),be.isRetriableError),fsync:wt(Ie(pe.fsync),be.isRetriableError),open:wt(Ie(pe.open),be.isRetriableError),readFile:wt(Ie(pe.readFile),be.isRetriableError),rename:wt(Ie(pe.rename),be.isRetriableError),stat:wt(Ie(pe.stat),be.isRetriableError),write:wt(Ie(pe.write),be.isRetriableError),writeFile:wt(Ie(pe.writeFile),be.isRetriableError),closeSync:Et(pe.closeSync,be.isRetriableError),fsyncSync:Et(pe.fsyncSync,be.isRetriableError),openSync:Et(pe.openSync,be.isRetriableError),readFileSync:Et(pe.readFileSync,
518
- be.isRetriableError),renameSync:Et(pe.renameSync,be.isRetriableError),statSync:Et(pe.statSync,be.isRetriableError),writeSync:Et(pe.writeSync,be.isRetriableError),writeFileSync:Et(pe.writeFileSync,be.isRetriableError)}},Fg="utf8",eu=438,Vg=511,zg={},Gg=dr.userInfo().uid,Bg=dr.userInfo().gid,Wg=1e3,Kg=!!Se.getuid;Se.getuid&&Se.getuid();const tu=128,Yg=t=>t instanceof Error&&"code"in t,ru=t=>typeof t=="string",xi=t=>t===void 0,Xg=Se.platform==="linux",nu=Se.platform==="win32",ki=["SIGABRT","SIGALRM",
519
- "SIGHUP","SIGINT","SIGTERM"];nu||ki.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),Xg&&ki.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");class Jg{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&&(nu&&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 ki)try{Se.once(
518
+ return function s(...i){return Hg.schedule().then(o=>{const a=l=>(o(),l),u=l=>{if(o(),Date.now()>=n)throw l;if(e(l)){const c=Math.round(100*Math.random());return new Promise(p=>setTimeout(p,c)).then(()=>s.apply(void 0,i))}throw l};return t.apply(void 0,i).then(a,u)})}},Et=(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:bt(Ie(me.chmod),be.onChangeError),chown:bt(Ie(me.chown),be.
519
+ onChangeError),close:bt(Ie(me.close),qe),fsync:bt(Ie(me.fsync),qe),mkdir:bt(Ie(me.mkdir),qe),realpath:bt(Ie(me.realpath),qe),stat:bt(Ie(me.stat),qe),unlink:bt(Ie(me.unlink),qe),chmodSync:ft(me.chmodSync,be.onChangeError),chownSync:ft(me.chownSync,be.onChangeError),closeSync:ft(me.closeSync,qe),existsSync:ft(me.existsSync,qe),fsyncSync:ft(me.fsync,qe),mkdirSync:ft(me.mkdirSync,qe),realpathSync:ft(me.realpathSync,qe),statSync:ft(me.statSync,qe),unlinkSync:ft(me.unlinkSync,qe)},retry:{close:wt(Ie(me.
520
+ close),be.isRetriableError),fsync:wt(Ie(me.fsync),be.isRetriableError),open:wt(Ie(me.open),be.isRetriableError),readFile:wt(Ie(me.readFile),be.isRetriableError),rename:wt(Ie(me.rename),be.isRetriableError),stat:wt(Ie(me.stat),be.isRetriableError),write:wt(Ie(me.write),be.isRetriableError),writeFile:wt(Ie(me.writeFile),be.isRetriableError),closeSync:Et(me.closeSync,be.isRetriableError),fsyncSync:Et(me.fsyncSync,be.isRetriableError),openSync:Et(me.openSync,be.isRetriableError),readFileSync:Et(me.readFileSync,
521
+ be.isRetriableError),renameSync:Et(me.renameSync,be.isRetriableError),statSync:Et(me.statSync,be.isRetriableError),writeSync:Et(me.writeSync,be.isRetriableError),writeFileSync:Et(me.writeFileSync,be.isRetriableError)}},Fg="utf8",ru=438,Vg=511,zg={},Gg=dr.userInfo().uid,Bg=dr.userInfo().gid,Wg=1e3,Kg=!!Se.getuid;Se.getuid&&Se.getuid();const nu=128,Yg=t=>t instanceof Error&&"code"in t,su=t=>typeof t=="string",Mi=t=>t===void 0,Xg=Se.platform==="linux",iu=Se.platform==="win32",qi=["SIGABRT","SIGALRM",
522
+ "SIGHUP","SIGINT","SIGTERM"];iu||qi.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),Xg&&qi.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");class Jg{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&&(iu&&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 qi)try{Se.once(
520
523
  e,()=>this.exit(e))}catch{}},this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}}const Qg=new Jg,Zg=Qg.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))},
521
- purgeSync:t=>{Te.store[t]&&(delete Te.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<=tu)return t;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(e);if(!r)return t;const n=e.length-tu;return`${t.slice(0,-e.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};Zg(Te.purgeSyncAll);function su(t,e,r=zg){if(ru(r))return su(t,e,{encoding:r});const n=Date.now()+((r.timeout??Wg)||-1);let s=null,
522
- i=null,o=null;try{const a=Ne.attempt.realpathSync(t),c=!!a;t=a||t,[i,s]=Te.get(t,r.tmpCreate||Te.create,r.tmpPurge!==!1);const l=Kg&&xi(r.chown),u=xi(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:Vg,recursive:!0})}o=Ne.retry.openSync(n)(i,"w",r.mode||eu),r.tmpCreated&&r.tmpCreated(i),ru(e)?Ne.retry.writeSync(n)(o,e,0,r.encoding||Fg):xi(e)||Ne.retry.writeSync(n)(o,e,
523
- 0,e.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?Ne.retry.fsyncSync(n)(o):Ne.attempt.fsync(o)),Ne.retry.closeSync(n)(o),o=null,r.chown&&(r.chown.uid!==Gg||r.chown.gid!==Bg)&&Ne.attempt.chownSync(i,r.chown.uid,r.chown.gid),r.mode&&r.mode!==eu&&Ne.attempt.chmodSync(i,r.mode);try{Ne.retry.renameSync(n)(i,t)}catch(f){if(!Yg(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 fn={exports:{}},Mi={},dt={},Ht={},qi={},
524
- Ui={},Hi={},iu;function dn(){return iu||(iu=1,function(t){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(h){if(super(),!t.IDENTIFIER.test(h))throw new Error("CodeGen: name must be a valid identifier");this.str=h}toString(){return this.str}emptyStr(){
524
+ purgeSync:t=>{Te.store[t]&&(delete Te.store[t],Ne.attempt.unlinkSync(t))},purgeSyncAll:()=>{for(const t in Te.store)Te.purgeSync(t)},truncate:t=>{const e=pe.basename(t);if(e.length<=nu)return t;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(e);if(!r)return t;const n=e.length-nu;return`${t.slice(0,-e.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};Zg(Te.purgeSyncAll);function ou(t,e,r=zg){if(su(r))return ou(t,e,{encoding:r});const n=Date.now()+((r.timeout??Wg)||-1);let s=null,
525
+ i=null,o=null;try{const a=Ne.attempt.realpathSync(t),u=!!a;t=a||t,[i,s]=Te.get(t,r.tmpCreate||Te.create,r.tmpPurge!==!1);const l=Kg&&Mi(r.chown),c=Mi(r.mode);if(u&&(l||c)){const f=Ne.attempt.statSync(t);f&&(r={...r},l&&(r.chown={uid:f.uid,gid:f.gid}),c&&(r.mode=f.mode))}if(!u){const f=pe.dirname(t);Ne.attempt.mkdirSync(f,{mode:Vg,recursive:!0})}o=Ne.retry.openSync(n)(i,"w",r.mode||ru),r.tmpCreated&&r.tmpCreated(i),su(e)?Ne.retry.writeSync(n)(o,e,0,r.encoding||Fg):Mi(e)||Ne.retry.writeSync(n)(o,e,
526
+ 0,e.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?Ne.retry.fsyncSync(n)(o):Ne.attempt.fsync(o)),Ne.retry.closeSync(n)(o),o=null,r.chown&&(r.chown.uid!==Gg||r.chown.gid!==Bg)&&Ne.attempt.chownSync(i,r.chown.uid,r.chown.gid),r.mode&&r.mode!==ru&&Ne.attempt.chmodSync(i,r.mode);try{Ne.retry.renameSync(n)(i,t)}catch(f){if(!Yg(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 fn={exports:{}},Ui={},dt={},Ht={},Hi={},
527
+ Fi={},Vi={},au;function dn(){return au||(au=1,function(t){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(h){if(super(),!t.IDENTIFIER.test(h))throw new Error("CodeGen: name must be a valid identifier");this.str=h}toString(){return this.str}emptyStr(){
525
528
  return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(h){super(),this._items=typeof h=="string"?[h]:h}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const h=this._items[0];return h===""||h==='""'}get str(){var h;return(h=this._str)!==null&&h!==void 0?h:this._str=this._items.reduce((m,_)=>`${m}${_}`,"")}get names(){var h;return(h=this._names)!==null&&h!==void 0?h:this._names=this._items.reduce((m,_)=>(_ instanceof r&&(m[_.str]=(m[_.str]||0)+1),m),
526
- {})}}t._Code=n,t.nil=new n("");function s(g,...h){const m=[g[0]];let _=0;for(;_<h.length;)a(m,h[_]),m.push(g[++_]);return new n(m)}t._=s;const i=new n("+");function o(g,...h){const m=[$(g[0])];let _=0;for(;_<h.length;)m.push(i),a(m,h[_]),m.push(i,$(g[++_]));return c(m),new n(m)}t.str=o;function a(g,h){h instanceof n?g.push(...h._items):h instanceof r?g.push(h):g.push(f(h))}t.addCodeArg=a;function c(g){let h=1;for(;h<g.length-1;){if(g[h]===i){const m=l(g[h-1],g[h+1]);if(m!==void 0){g.splice(h-1,3,
527
- m);continue}g[h++]="+"}h++}}function l(g,h){if(h==='""')return g;if(g==='""')return h;if(typeof g=="string")return h instanceof r||g[g.length-1]!=='"'?void 0:typeof h!="string"?`${g.slice(0,-1)}${h}"`:h[0]==='"'?g.slice(0,-1)+h.slice(1):void 0;if(typeof h=="string"&&h[0]==='"'&&!(g instanceof r))return`"${g}${h.slice(1)}`}function u(g,h){return h.emptyStr()?g:g.emptyStr()?h:o`${g}${h}`}t.strConcat=u;function f(g){return typeof g=="number"||typeof g=="boolean"||g===null?g:$(Array.isArray(g)?g.join(
529
+ {})}}t._Code=n,t.nil=new n("");function s(g,...h){const m=[g[0]];let _=0;for(;_<h.length;)a(m,h[_]),m.push(g[++_]);return new n(m)}t._=s;const i=new n("+");function o(g,...h){const m=[$(g[0])];let _=0;for(;_<h.length;)m.push(i),a(m,h[_]),m.push(i,$(g[++_]));return u(m),new n(m)}t.str=o;function a(g,h){h instanceof n?g.push(...h._items):h instanceof r?g.push(h):g.push(f(h))}t.addCodeArg=a;function u(g){let h=1;for(;h<g.length-1;){if(g[h]===i){const m=l(g[h-1],g[h+1]);if(m!==void 0){g.splice(h-1,3,
530
+ m);continue}g[h++]="+"}h++}}function l(g,h){if(h==='""')return g;if(g==='""')return h;if(typeof g=="string")return h instanceof r||g[g.length-1]!=='"'?void 0:typeof h!="string"?`${g.slice(0,-1)}${h}"`:h[0]==='"'?g.slice(0,-1)+h.slice(1):void 0;if(typeof h=="string"&&h[0]==='"'&&!(g instanceof r))return`"${g}${h.slice(1)}`}function c(g,h){return h.emptyStr()?g:g.emptyStr()?h:o`${g}${h}`}t.strConcat=c;function f(g){return typeof g=="number"||typeof g=="boolean"||g===null?g:$(Array.isArray(g)?g.join(
528
531
  ","):g)}function p(g){return new n($(g))}t.stringify=p;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.
529
- regexpCode=d}(Hi)),Hi}var Fi={},ou;function au(){return ou||(ou=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=dn();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")};
530
- class s{constructor({prefixes:l,parent:u}={}){this._names={},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.
531
- _names[l]={prefix:l,index:0}}}t.Scope=s;class i extends e.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\
532
- in value");const p=this.toName(l),{prefix:$}=p,b=(f=u.key)!==null&&f!==void 0?f:u.ref;let y=this._values[$];if(y){const h=y.get(b);if(h)return h}else y=this._values[$]=new Map;y.set(b,p);const d=this._scope[$]||(this._scope[$]=[]),g=d.length;return d[g]=u.ref,p.setValue(u,{property:$,itemIndex:g}),p}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.
533
- _)`${l}${f.scopePath}`})}scopeCode(l=this._values,u,f){return this._reduceValues(l,p=>{if(p.value===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return p.value.code},u,f)}_reduceValues(l,u,f={},p){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 h=u(g);if(h){const m=this.opts.es5?t.varKinds.var:t.varKinds.const;$=(0,e._)`${$}${m} ${g} = ${h};${this.opts._n}`}else if(h=p?.(g))$=(0,e._)`${$}${h}${this.
534
- opts._n}`;else throw new r(g);d.set(g,n.Completed)})}return $}}t.ValueScope=a}(Fi)),Fi}var cu;function he(){return cu||(cu=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=dn(),r=au();var n=dn();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,
532
+ regexpCode=d}(Vi)),Vi}var zi={},cu;function uu(){return cu||(cu=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=dn();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};
533
+ class s{constructor({prefixes:l,parent:c}={}){this._names={},this._prefixes=l,this._parent=c}toName(l){return l instanceof e.Name?l:this.name(l)}name(l){return new e.Name(this._newName(l))}_newName(l){const c=this._names[l]||this._nameGroup(l);return`${l}${c.index++}`}_nameGroup(l){var c,f;if(!((f=(c=this._parent)===null||c===void 0?void 0:c._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.
534
+ _names[l]={prefix:l,index:0}}}t.Scope=s;class i extends e.Name{constructor(l,c){super(c),this.prefix=l}setValue(l,{property:c,itemIndex:f}){this.value=l,this.scopePath=(0,e._)`.${new e.Name(c)}[${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,c){var f;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed\
535
+ in value");const p=this.toName(l),{prefix:$}=p,b=(f=c.key)!==null&&f!==void 0?f:c.ref;let y=this._values[$];if(y){const h=y.get(b);if(h)return h}else y=this._values[$]=new Map;y.set(b,p);const d=this._scope[$]||(this._scope[$]=[]),g=d.length;return d[g]=c.ref,p.setValue(c,{property:$,itemIndex:g}),p}getValue(l,c){const f=this._values[l];if(f)return f.get(c)}scopeRefs(l,c=this._values){return this._reduceValues(c,f=>{if(f.scopePath===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return(0,e.
536
+ _)`${l}${f.scopePath}`})}scopeCode(l=this._values,c,f){return this._reduceValues(l,p=>{if(p.value===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return p.value.code},c,f)}_reduceValues(l,c,f={},p){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 h=c(g);if(h){const m=this.opts.es5?t.varKinds.var:t.varKinds.const;$=(0,e._)`${$}${m} ${g} = ${h};${this.opts._n}`}else if(h=p?.(g))$=(0,e._)`${$}${h}${this.
537
+ opts._n}`;else throw new r(g);d.set(g,n.Completed)})}return $}}t.ValueScope=a}(zi)),zi}var lu;function he(){return lu||(lu=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=dn(),r=uu();var n=dn();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,
535
538
  get:function(){return n.str}}),Object.defineProperty(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,
536
- get:function(){return n.Name}});var s=au();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.
539
+ get:function(){return n.Name}});var s=uu();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.
537
540
  _Code("==="),NEQ:new e._Code("!=="),NOT:new e._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=x(this.rhs,E,R)),this}get names(){
538
- return this.rhs instanceof e._CodeOrName?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=x(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.
539
- lhs} ${this.op}= ${this.rhs};`+E}}class l extends i{constructor(E){super(),this.label=E,this.names={}}render({_n:E}){return`${this.label}:`+E}}class u extends i{constructor(E){super(),this.label=E,this.names={}}render({_n:E}){return`break${this.label?` ${this.label}`:""};`+E}}class f extends i{constructor(E){super(),this.error=E}render({_n:E}){return`throw ${this.error};`+E}get names(){return this.error.names}}class p extends i{constructor(E){super(),this.code=E}render({_n:E}){return`${this.code}\
541
+ return this.rhs instanceof e._CodeOrName?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=x(this.rhs,E,R),this}get names(){const E=this.lhs instanceof e.Name?{}:{...this.lhs.names};return j(E,this.rhs)}}class u extends a{constructor(E,R,C,X){super(E,C,X),this.op=R}render({_n:E}){return`${this.
542
+ lhs} ${this.op}= ${this.rhs};`+E}}class l extends i{constructor(E){super(),this.label=E,this.names={}}render({_n:E}){return`${this.label}:`+E}}class c extends i{constructor(E){super(),this.label=E,this.names={}}render({_n:E}){return`break${this.label?` ${this.label}`:""};`+E}}class f extends i{constructor(E){super(),this.error=E}render({_n:E}){return`throw ${this.error};`+E}get names(){return this.error.names}}class p extends i{constructor(E){super(),this.code=E}render({_n:E}){return`${this.code}\
540
543
  ;`+E}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(E,R){return this.code=x(this.code,E,R),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class $ extends i{constructor(E=[]){super(),this.nodes=E}render(E){return this.nodes.reduce((R,C)=>R+C.render(E),"")}optimizeNodes(){const{nodes:E}=this;let R=E.length;for(;R--;){const C=E[R].optimizeNodes();Array.isArray(C)?E.splice(R,1,...C):C?E[R]=C:E.splice(R,1)}return E.length>0?this:void 0}optimizeNames(E,R){
541
544
  const{nodes:C}=this;let X=C.length;for(;X--;){const Z=C[X];Z.optimizeNames(E,R)||(U(E,Z.names),C.splice(X,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((E,R)=>M(E,R.names),{})}}class b extends ${render(E){return"{"+E._n+super.render(E)+"}"+E._n}}class y extends ${}class d extends b{}d.kind="else";class g extends b{constructor(E,R){super(R),this.condition=E}render(E){let R=`if(${this.condition})`+super.render(E);return this.else&&(R+="else "+this.else.render(E)),R}optimizeNodes(){
542
545
  super.optimizeNodes();const E=this.condition;if(E===!0)return this.nodes;let R=this.else;if(R){const C=R.optimizeNodes();R=this.else=Array.isArray(C)?new d(C):C}if(R)return E===!1?R instanceof g?R:R.nodes:this.nodes.length?this:new g(Y(E),R instanceof g?[R]:R.nodes);if(!(E===!1||!this.nodes.length))return this}optimizeNames(E,R){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(E,R),!!(super.optimizeNames(E,R)||this.else))return this.condition=x(this.condition,E,R),this}get names(){
@@ -546,218 +549,216 @@ super.names,this.iterable.names)}}class w extends b{constructor(E,R,C){super(),t
546
549
  (E=this.catch)===null||E===void 0||E.optimizeNodes(),(R=this.finally)===null||R===void 0||R.optimizeNodes(),this}optimizeNames(E,R){var C,X;return super.optimizeNames(E,R),(C=this.catch)===null||C===void 0||C.optimizeNames(E,R),(X=this.finally)===null||X===void 0||X.optimizeNames(E,R),this}get names(){const E=super.names;return this.catch&&M(E,this.catch.names),this.finally&&M(E,this.finally.names),E}}class F extends b{constructor(E){super(),this.error=E}render(E){return`catch(${this.error})`+super.
547
550
  render(E)}}F.kind="catch";class B extends b{render(E){return"finally"+super.render(E)}}B.kind="finally";class D{constructor(E,R={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...R,_n:R.lines?`
548
551
  `:""},this._extScope=E,this._scope=new r.Scope({parent:E}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(E){return this._scope.name(E)}scopeName(E){return this._extScope.name(E)}scopeValue(E,R){const C=this._extScope.value(E,R);return(this._values[C.prefix]||(this._values[C.prefix]=new Set)).add(C),C}getScopeValue(E,R){return this._extScope.getValue(E,R)}scopeRefs(E){return this._extScope.scopeRefs(E,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(E,R,C,X){
549
- const Z=this._scope.toName(R);return C!==void 0&&X&&(this._constants[Z.str]=C),this._leafNode(new o(E,Z,C)),Z}const(E,R,C){return this._def(r.varKinds.const,E,R,C)}let(E,R,C){return this._def(r.varKinds.let,E,R,C)}var(E,R,C){return this._def(r.varKinds.var,E,R,C)}assign(E,R,C){return this._leafNode(new a(E,R,C))}add(E,R){return this._leafNode(new c(E,t.operators.ADD,R))}code(E){return typeof E=="function"?E():E!==e.nil&&this._leafNode(new p(E)),this}object(...E){const R=["{"];for(const[C,X]of E)
552
+ const Z=this._scope.toName(R);return C!==void 0&&X&&(this._constants[Z.str]=C),this._leafNode(new o(E,Z,C)),Z}const(E,R,C){return this._def(r.varKinds.const,E,R,C)}let(E,R,C){return this._def(r.varKinds.let,E,R,C)}var(E,R,C){return this._def(r.varKinds.var,E,R,C)}assign(E,R,C){return this._leafNode(new a(E,R,C))}add(E,R){return this._leafNode(new u(E,t.operators.ADD,R))}code(E){return typeof E=="function"?E():E!==e.nil&&this._leafNode(new p(E)),this}object(...E){const R=["{"];for(const[C,X]of E)
550
553
  R.length>1&&R.push(","),R.push(C),(C!==X||this.opts.es5)&&(R.push(":"),(0,e.addCodeArg)(R,X));return R.push("}"),new e._Code(R)}if(E,R,C){if(this._blockNode(new g(E)),R&&C)this.code(R).else().code(C).endIf();else if(R)this.code(R).endIf();else if(C)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(E){return this._elseNode(new g(E))}else(){return this._elseNode(new d)}endIf(){return this._endBlockNode(g,d)}_for(E,R){return this._blockNode(E),R&&this.code(R).endFor(),this}for(E,R){
551
554
  return this._for(new m(E),R)}forRange(E,R,C,X,Z=this.opts.es5?r.varKinds.var:r.varKinds.let){const ie=this._scope.toName(E);return this._for(new _(Z,ie,R,C),()=>X(ie))}forOf(E,R,C,X=r.varKinds.const){const Z=this._scope.toName(E);if(this.opts.es5){const ie=R instanceof e.Name?R:this.var("_arr",R);return this.forRange("_i",0,(0,e._)`${ie}.length`,oe=>{this.var(Z,(0,e._)`${ie}[${oe}]`),C(Z)})}return this._for(new v("of",X,Z,R),()=>C(Z))}forIn(E,R,C,X=this.opts.es5?r.varKinds.var:r.varKinds.const){
552
- if(this.opts.ownProperties)return this.forOf(E,(0,e._)`Object.keys(${R})`,C);const Z=this._scope.toName(E);return this._for(new v("in",X,Z,R),()=>C(Z))}endFor(){return this._endBlockNode(h)}label(E){return this._leafNode(new l(E))}break(E){return this._leafNode(new u(E))}return(E){const R=new S;if(this._blockNode(R),this.code(E),R.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try(E,R,C){if(!R&&!C)throw new Error('CodeGen: "try" without "c\
555
+ if(this.opts.ownProperties)return this.forOf(E,(0,e._)`Object.keys(${R})`,C);const Z=this._scope.toName(E);return this._for(new v("in",X,Z,R),()=>C(Z))}endFor(){return this._endBlockNode(h)}label(E){return this._leafNode(new l(E))}break(E){return this._leafNode(new c(E))}return(E){const R=new S;if(this._blockNode(R),this.code(E),R.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try(E,R,C){if(!R&&!C)throw new Error('CodeGen: "try" without "c\
553
556
  atch" and "finally"');const X=new I;if(this._blockNode(X),this.code(E),R){const Z=this.name("e");this._currNode=X.catch=new F(Z),R(Z)}return C&&(this._currNode=X.finally=new B,this.code(C)),this._endBlockNode(F,B)}throw(E){return this._leafNode(new f(E))}block(E,R){return this._blockStarts.push(this._nodes.length),E&&this.code(E).endBlock(R),this}endBlock(E){const R=this._blockStarts.pop();if(R===void 0)throw new Error("CodeGen: not in self-balancing block");const C=this._nodes.length-R;if(C<0||
554
557
  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){
555
558
  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(k,E){for(const R in E)k[R]=
556
559
  (k[R]||0)+(E[R]||0);return k}function j(k,E){return E instanceof e._CodeOrName?M(k,E.names):k}function x(k,E,R){if(k instanceof e.Name)return C(k);if(!X(k))return k;return new e._Code(k._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]!==
557
- void 0)}}function U(k,E){for(const R in E)k[R]=(k[R]||0)-(E[R]||0)}function Y(k){return typeof k=="boolean"||typeof k=="number"||k===null?!k:(0,e._)`!${V(k)}`}t.not=Y;const G=A(t.operators.AND);function J(...k){return k.reduce(G)}t.and=J;const se=A(t.operators.OR);function H(...k){return k.reduce(se)}t.or=H;function A(k){return(E,R)=>E===e.nil?R:R===e.nil?E:(0,e._)`${V(E)} ${k} ${V(R)}`}function V(k){return k instanceof e.Name?k:(0,e._)`(${k})`}}(Ui)),Ui}var ge={},uu;function $e(){if(uu)return ge;
558
- uu=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.checkStrictMode=ge.getErrorPath=ge.Type=ge.useFunc=ge.setEvaluated=ge.evaluatedPropsToName=ge.mergeEvaluated=ge.eachItem=ge.unescapeJsonPointer=ge.escapeJsonPointer=ge.escapeFragment=ge.unescapeFragment=ge.schemaRefOrVal=ge.schemaHasRulesButRef=ge.schemaHasRules=ge.checkUnknownRules=ge.alwaysValidSchema=ge.toHash=void 0;const t=he(),e=dn();function r(v){const w={};for(const S of v)w[S]=!0;return w}ge.toHash=r;function n(v,w){return typeof w==
560
+ void 0)}}function U(k,E){for(const R in E)k[R]=(k[R]||0)-(E[R]||0)}function Y(k){return typeof k=="boolean"||typeof k=="number"||k===null?!k:(0,e._)`!${V(k)}`}t.not=Y;const G=A(t.operators.AND);function J(...k){return k.reduce(G)}t.and=J;const se=A(t.operators.OR);function H(...k){return k.reduce(se)}t.or=H;function A(k){return(E,R)=>E===e.nil?R:R===e.nil?E:(0,e._)`${V(E)} ${k} ${V(R)}`}function V(k){return k instanceof e.Name?k:(0,e._)`(${k})`}}(Fi)),Fi}var ge={},fu;function $e(){if(fu)return ge;
561
+ fu=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.checkStrictMode=ge.getErrorPath=ge.Type=ge.useFunc=ge.setEvaluated=ge.evaluatedPropsToName=ge.mergeEvaluated=ge.eachItem=ge.unescapeJsonPointer=ge.escapeJsonPointer=ge.escapeFragment=ge.unescapeFragment=ge.schemaRefOrVal=ge.schemaHasRulesButRef=ge.schemaHasRules=ge.checkUnknownRules=ge.alwaysValidSchema=ge.toHash=void 0;const t=he(),e=dn();function r(v){const w={};for(const S of v)w[S]=!0;return w}ge.toHash=r;function n(v,w){return typeof w==
559
562
  "boolean"?w:Object.keys(w).length===0?!0:(s(v,w),!i(w,v.self.RULES.all))}ge.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}"`)}ge.checkUnknownRules=s;function i(v,w){if(typeof v=="boolean")return!v;for(const S in v)if(w[S])return!0;return!1}ge.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;
560
- return!1}ge.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)}`}ge.schemaRefOrVal=a;function c(v){return f(decodeURIComponent(v))}ge.unescapeFragment=c;function l(v){return encodeURIComponent(u(v))}ge.escapeFragment=l;function u(v){return typeof v=="number"?`${v}`:v.replace(/~/g,"~0").replace(/\//g,"~1")}ge.escapeJsonPointer=u;function f(v){
563
+ return!1}ge.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)}`}ge.schemaRefOrVal=a;function u(v){return f(decodeURIComponent(v))}ge.unescapeFragment=u;function l(v){return encodeURIComponent(c(v))}ge.escapeFragment=l;function c(v){return typeof v=="number"?`${v}`:v.replace(/~/g,"~0").replace(/\//g,"~1")}ge.escapeJsonPointer=c;function f(v){
561
564
  return v.replace(/~1/g,"/").replace(/~0/g,"~")}ge.unescapeJsonPointer=f;function p(v,w){if(Array.isArray(v))for(const S of v)w(S);else w(v)}ge.eachItem=p;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}}ge.mergeEvaluated={props:$({mergeNames:(v,w,S)=>v.if((0,t._)`${S} !== true && ${w} !== undefined`,
562
565
  ()=>{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`,
563
566
  ()=>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}ge.evaluatedPropsToName=b;function y(v,w,S){Object.keys(S).forEach(I=>v.assign((0,t._)`${w}${(0,t.getProperty)(I)}`,!0))}ge.setEvaluated=y;const d={};function g(v,w){return v.scopeValue("func",{ref:w,code:d[w.code]||(d[w.code]=new e._Code(
564
- w.code))})}ge.useFunc=g;var h;(function(v){v[v.Num=0]="Num",v[v.Str=1]="Str"})(h||(ge.Type=h={}));function m(v,w,S){if(v instanceof t.Name){const I=w===h.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)}ge.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 ge.
565
- checkStrictMode=_,ge}var hn={},lu;function Xe(){if(lu)return hn;lu=1,Object.defineProperty(hn,"__esModule",{value:!0});const t=he(),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.
566
- Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return hn.default=e,hn}var fu;function pn(){return fu||(fu=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=he(),r=$e(),n=Xe();t.keywordError={message:({keyword:d})=>(0,e.str)`must pass "${d}" keyword validation`},t.keyword$DataError={message:({
567
- 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,h,m){const{it:_}=d,{gen:v,compositeRule:w,allErrors:S}=_,I=f(d,g,h);m??(w||S)?c(v,I):l(_,(0,e._)`[${I}]`)}t.reportError=s;function i(d,g=t.keywordError,h){const{it:m}=d,{gen:_,compositeRule:v,allErrors:w}=m,S=f(d,g,h);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`,
567
+ w.code))})}ge.useFunc=g;var h;(function(v){v[v.Num=0]="Num",v[v.Str=1]="Str"})(h||(ge.Type=h={}));function m(v,w,S){if(v instanceof t.Name){const I=w===h.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():"/"+c(v)}ge.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 ge.
568
+ checkStrictMode=_,ge}var hn={},du;function Xe(){if(du)return hn;du=1,Object.defineProperty(hn,"__esModule",{value:!0});const t=he(),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.
569
+ Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return hn.default=e,hn}var hu;function pn(){return hu||(hu=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=he(),r=$e(),n=Xe();t.keywordError={message:({keyword:d})=>(0,e.str)`must pass "${d}" keyword validation`},t.keyword$DataError={message:({
570
+ 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,h,m){const{it:_}=d,{gen:v,compositeRule:w,allErrors:S}=_,I=f(d,g,h);m??(w||S)?u(v,I):l(_,(0,e._)`[${I}]`)}t.reportError=s;function i(d,g=t.keywordError,h){const{it:m}=d,{gen:_,compositeRule:v,allErrors:w}=m,S=f(d,g,h);u(_,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`,
568
571
  ()=>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:h,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(
569
- (0,e._)`${w}.schemaPath`,(0,e.str)`${v.errSchemaPath}/${g}`),v.opts.verbose&&(d.assign((0,e._)`${w}.schema`,h),d.assign((0,e._)`${w}.data`,m))})}t.extendErrors=a;function c(d,g){const h=d.const("err",g);d.if((0,e._)`${n.default.vErrors} === null`,()=>d.assign(n.default.vErrors,(0,e._)`[${h}]`),(0,e._)`${n.default.vErrors}.push(${h})`),d.code((0,e._)`${n.default.errors}++`)}function l(d,g){const{gen:h,validateName:m,schemaEnv:_}=d;_.$async?h.throw((0,e._)`new ${d.ValidationError}(${g})`):(h.assign(
570
- (0,e._)`${m}.errors`,g),h.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,h){const{createErrors:m}=d.it;return m===!1?(0,e._)`{}`:p(d,g,h)}function p(d,g,h={}){const{gen:m,it:_}=d,v=[$(_,h),b(d,h)];return y(d,g,v),m.object(...v)}function $({errorPath:d},{instancePath:g}){const h=g?
571
- (0,e.str)`${d}${(0,r.getErrorPath)(g,r.Type.Str)}`:d;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,h)]}function b({keyword:d,it:{errSchemaPath:g}},{schemaPath:h,parentSchema:m}){let _=m?g:(0,e.str)`${g}/${d}`;return h&&(_=(0,e.str)`${_}${(0,r.getErrorPath)(h,r.Type.Str)}`),[u.schemaPath,_]}function y(d,{params:g,message:h},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"?
572
- g(d):g||(0,e._)`{}`]),I.messages&&m.push([u.message,typeof h=="function"?h(d):h]),I.verbose&&m.push([u.schema,w],[u.parentSchema,(0,e._)`${B}${D}`],[n.default.data,v]),F&&m.push([u.propertyName,F])}}(qi)),qi}var du;function ey(){if(du)return Ht;du=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.boolOrEmptySchema=Ht.topBoolOrEmptySchema=void 0;const t=pn(),e=he(),r=Xe(),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\
573
- ct"&&l.$async===!0?c.return(r.default.data):(c.assign((0,e._)`${u}.errors`,null),c.return(!0))}Ht.topBoolOrEmptySchema=s;function i(a,c){const{gen:l,schema:u}=a;u===!1?(l.var(c,!1),o(a)):l.var(c,!0)}Ht.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 Ht}var Pe={},Ft={},hu;function pu(){if(hu)return Ft;hu=1,Object.defineProperty(Ft,"__esModule",{value:!0}),
572
+ (0,e._)`${w}.schemaPath`,(0,e.str)`${v.errSchemaPath}/${g}`),v.opts.verbose&&(d.assign((0,e._)`${w}.schema`,h),d.assign((0,e._)`${w}.data`,m))})}t.extendErrors=a;function u(d,g){const h=d.const("err",g);d.if((0,e._)`${n.default.vErrors} === null`,()=>d.assign(n.default.vErrors,(0,e._)`[${h}]`),(0,e._)`${n.default.vErrors}.push(${h})`),d.code((0,e._)`${n.default.errors}++`)}function l(d,g){const{gen:h,validateName:m,schemaEnv:_}=d;_.$async?h.throw((0,e._)`new ${d.ValidationError}(${g})`):(h.assign(
573
+ (0,e._)`${m}.errors`,g),h.return(!1))}const c={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,h){const{createErrors:m}=d.it;return m===!1?(0,e._)`{}`:p(d,g,h)}function p(d,g,h={}){const{gen:m,it:_}=d,v=[$(_,h),b(d,h)];return y(d,g,v),m.object(...v)}function $({errorPath:d},{instancePath:g}){const h=g?
574
+ (0,e.str)`${d}${(0,r.getErrorPath)(g,r.Type.Str)}`:d;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,h)]}function b({keyword:d,it:{errSchemaPath:g}},{schemaPath:h,parentSchema:m}){let _=m?g:(0,e.str)`${g}/${d}`;return h&&(_=(0,e.str)`${_}${(0,r.getErrorPath)(h,r.Type.Str)}`),[c.schemaPath,_]}function y(d,{params:g,message:h},m){const{keyword:_,data:v,schemaValue:w,it:S}=d,{opts:I,propertyName:F,topSchemaRef:B,schemaPath:D}=S;m.push([c.keyword,_],[c.params,typeof g=="function"?
575
+ g(d):g||(0,e._)`{}`]),I.messages&&m.push([c.message,typeof h=="function"?h(d):h]),I.verbose&&m.push([c.schema,w],[c.parentSchema,(0,e._)`${B}${D}`],[n.default.data,v]),F&&m.push([c.propertyName,F])}}(Hi)),Hi}var pu;function ey(){if(pu)return Ht;pu=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.boolOrEmptySchema=Ht.topBoolOrEmptySchema=void 0;const t=pn(),e=he(),r=Xe(),n={message:"boolean schema is false"};function s(a){const{gen:u,schema:l,validateName:c}=a;l===!1?o(a,!1):typeof l=="obje\
576
+ ct"&&l.$async===!0?u.return(r.default.data):(u.assign((0,e._)`${c}.errors`,null),u.return(!0))}Ht.topBoolOrEmptySchema=s;function i(a,u){const{gen:l,schema:c}=a;c===!1?(l.var(u,!1),o(a)):l.var(u,!0)}Ht.boolOrEmptySchema=i;function o(a,u){const{gen:l,data:c}=a,f={gen:l,keyword:"false schema",data:c,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,t.reportError)(f,n,void 0,u)}return Ht}var Pe={},Ft={},mu;function gu(){if(mu)return Ft;mu=1,Object.defineProperty(Ft,"__esModule",{value:!0}),
574
577
  Ft.getRules=Ft.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)}Ft.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 Ft.getRules=n,Ft}var ht={},
575
- mu;function gu(){if(mu)return ht;mu=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 yu;
576
- function mn(){if(yu)return Pe;yu=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=pu(),e=gu(),r=pn(),n=he(),s=$e();var i;(function(h){h[h.Correct=0]="Correct",h[h.Wrong=1]="Wrong"})(i||(Pe.DataType=i={}));function o(h){const m=a(h.type);if(m.includes("null")){if(h.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!m.length&&
577
- h.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');h.nullable===!0&&m.push("null")}return m}Pe.getSchemaTypes=o;function a(h){const m=Array.isArray(h)?h:h?[h]:[];if(m.every(t.isJSONType))return m;throw new Error("type must be JSONType or JSONType[]: "+m.join(","))}Pe.getJSONTypes=a;function c(h,m){const{gen:_,data:v,opts:w}=h,S=u(m,w.coerceTypes),I=m.length>0&&!(S.length===0&&m.length===1&&(0,e.schemaHasRulesForType)(h,m[0]));if(I){const F=b(m,v,w.strictNumbers,i.Wrong);
578
- _.if(F,()=>{S.length?f(h,m,S):d(h)})}return I}Pe.coerceAndCheckDataType=c;const l=new Set(["string","number","integer","boolean","null"]);function u(h,m){return m?h.filter(_=>l.has(_)||m==="array"&&_==="array"):[]}function f(h,m,_){const{gen:v,data:w,opts:S}=h,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}`).
578
+ yu;function $u(){if(yu)return ht;yu=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 _u;
579
+ function mn(){if(_u)return Pe;_u=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=gu(),e=$u(),r=pn(),n=he(),s=$e();var i;(function(h){h[h.Correct=0]="Correct",h[h.Wrong=1]="Wrong"})(i||(Pe.DataType=i={}));function o(h){const m=a(h.type);if(m.includes("null")){if(h.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!m.length&&
580
+ h.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');h.nullable===!0&&m.push("null")}return m}Pe.getSchemaTypes=o;function a(h){const m=Array.isArray(h)?h:h?[h]:[];if(m.every(t.isJSONType))return m;throw new Error("type must be JSONType or JSONType[]: "+m.join(","))}Pe.getJSONTypes=a;function u(h,m){const{gen:_,data:v,opts:w}=h,S=c(m,w.coerceTypes),I=m.length>0&&!(S.length===0&&m.length===1&&(0,e.schemaHasRulesForType)(h,m[0]));if(I){const F=b(m,v,w.strictNumbers,i.Wrong);
581
+ _.if(F,()=>{S.length?f(h,m,S):d(h)})}return I}Pe.coerceAndCheckDataType=u;const l=new Set(["string","number","integer","boolean","null"]);function c(h,m){return m?h.filter(_=>l.has(_)||m==="array"&&_==="array"):[]}function f(h,m,_){const{gen:v,data:w,opts:S}=h,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}`).
579
582
  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(h),v.endIf(),v.if((0,n._)`${F} !== undefined`,()=>{v.assign(w,F),p(h,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
580
583
  || (${I} == "string" && ${w} && ${w} == +${w})`).assign(F,(0,n._)`+${w}`);return;case"integer":v.elseIf((0,n._)`${I} === "boolean" || ${w} === null
581
584
  || (${I} === "string" && ${w} && ${w} == +${w} && !(${w} % 1))`).assign(F,(0,n._)`+${w}`);return;case"boolean":v.elseIf((0,n._)`${w} === "false" || ${w} === 0 || ${w} === null`).assign(F,!1).elseIf((0,n._)`${w} === "true" || ${w} === 1`).assign(F,!0);return;case"null":v.elseIf((0,n._)`${w} === "" || ${w} === 0 || ${w} === false`),v.assign(F,null);return;case"array":v.elseIf((0,n._)`${I} === "string" || ${I} === "number"
582
585
  || ${I} === "boolean" || ${w} === null`).assign(F,(0,n._)`[${w}]`)}}}function p({gen:h,parentData:m,parentDataProperty:_},v){h.if((0,n._)`${m} !== undefined`,()=>h.assign((0,n._)`${m}[${_}]`,v))}function $(h,m,_,v=i.Correct){const w=v===i.Correct?n.operators.EQ:n.operators.NEQ;let S;switch(h){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=
583
586
  I((0,n._)`!(${m} % 1) && !isNaN(${m})`);break;case"number":S=I();break;default:return(0,n._)`typeof ${m} ${w} ${h}`}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(h,m,_,v){if(h.length===1)return $(h[0],m,_,v);let w;const S=(0,s.toHash)(h);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
584
587
  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:h})=>`must be ${h}`,params:({schema:h,schemaValue:m})=>typeof h=="string"?(0,n._)`{type: ${h}}`:(0,n._)`{type: ${m}}`};function d(h){const m=g(h);(0,r.reportError)(m,y)}Pe.reportTypeError=d;function g(h){const{gen:m,data:_,schema:v}=h,w=(0,s.schemaRefOrVal)(h,v,"type");return{gen:m,keyword:"type",data:_,schema:v.type,schemaCode:w,schemaValue:w,parentSchema:v,params:{},
585
- it:h}}return Pe}var Ir={},$u;function ty(){if($u)return Ir;$u=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.assignDefaults=void 0;const t=he(),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))}Ir.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)(
586
- s,`default is ignored for: ${f}`);return}let p=(0,t._)`${f} === undefined`;u.useDefaults==="empty"&&(p=(0,t._)`${p} || ${f} === null || ${f} === ""`),a.if(p,(0,t._)`${f} = ${(0,t.stringify)(o)}`)}return Ir}var Je={},ve={},_u;function Qe(){if(_u)return ve;_u=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=
587
- ve.checkMissingProp=ve.checkReportMissingProp=void 0;const t=he(),e=$e(),r=Xe(),n=$e();function s(h,m){const{gen:_,data:v,it:w}=h;_.if(u(_,v,m,w.opts.ownProperties),()=>{h.setParams({missingProperty:(0,t._)`${m}`},!0),h.error()})}ve.checkReportMissingProp=s;function i({gen:h,data:m,it:{opts:_}},v,w){return(0,t.or)(...v.map(S=>(0,t.and)(u(h,m,S,_.ownProperties),(0,t._)`${w} = ${S}`)))}ve.checkMissingProp=i;function o(h,m){h.setParams({missingProperty:m},!0),h.error()}ve.reportMissingProp=o;function a(h){
588
- return h.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}ve.hasPropFunc=a;function c(h,m,_){return(0,t._)`${a(h)}.call(${m}, ${_})`}ve.isOwnProperty=c;function l(h,m,_,v){const w=(0,t._)`${m}${(0,t.getProperty)(_)} !== undefined`;return v?(0,t._)`${w} && ${c(h,m,_)}`:w}ve.propertyInData=l;function u(h,m,_,v){const w=(0,t._)`${m}${(0,t.getProperty)(_)} === undefined`;return v?(0,t.or)(w,(0,t.not)(c(h,m,_))):w}ve.noPropertyInData=u;function f(h){
588
+ it:h}}return Pe}var Ir={},vu;function ty(){if(vu)return Ir;vu=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.assignDefaults=void 0;const t=he(),e=$e();function r(s,i){const{properties:o,items:a}=s.schema;if(i==="object"&&o)for(const u in o)n(s,u,o[u].default);else i==="array"&&Array.isArray(a)&&a.forEach((u,l)=>n(s,l,u.default))}Ir.assignDefaults=r;function n(s,i,o){const{gen:a,compositeRule:u,data:l,opts:c}=s;if(o===void 0)return;const f=(0,t._)`${l}${(0,t.getProperty)(i)}`;if(u){(0,e.checkStrictMode)(
589
+ s,`default is ignored for: ${f}`);return}let p=(0,t._)`${f} === undefined`;c.useDefaults==="empty"&&(p=(0,t._)`${p} || ${f} === null || ${f} === ""`),a.if(p,(0,t._)`${f} = ${(0,t.stringify)(o)}`)}return Ir}var Je={},ve={},bu;function Qe(){if(bu)return ve;bu=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=
590
+ ve.checkMissingProp=ve.checkReportMissingProp=void 0;const t=he(),e=$e(),r=Xe(),n=$e();function s(h,m){const{gen:_,data:v,it:w}=h;_.if(c(_,v,m,w.opts.ownProperties),()=>{h.setParams({missingProperty:(0,t._)`${m}`},!0),h.error()})}ve.checkReportMissingProp=s;function i({gen:h,data:m,it:{opts:_}},v,w){return(0,t.or)(...v.map(S=>(0,t.and)(c(h,m,S,_.ownProperties),(0,t._)`${w} = ${S}`)))}ve.checkMissingProp=i;function o(h,m){h.setParams({missingProperty:m},!0),h.error()}ve.reportMissingProp=o;function a(h){
591
+ return h.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}ve.hasPropFunc=a;function u(h,m,_){return(0,t._)`${a(h)}.call(${m}, ${_})`}ve.isOwnProperty=u;function l(h,m,_,v){const w=(0,t._)`${m}${(0,t.getProperty)(_)} !== undefined`;return v?(0,t._)`${w} && ${u(h,m,_)}`:w}ve.propertyInData=l;function c(h,m,_,v){const w=(0,t._)`${m}${(0,t.getProperty)(_)} === undefined`;return v?(0,t.or)(w,(0,t.not)(u(h,m,_))):w}ve.noPropertyInData=c;function f(h){
589
592
  return h?Object.keys(h).filter(m=>m!=="__proto__"):[]}ve.allSchemaProperties=f;function p(h,m){return f(m).filter(_=>!(0,e.alwaysValidSchema)(h,m[_]))}ve.schemaProperties=p;function $({schemaCode:h,data:m,it:{gen:_,topSchemaRef:v,schemaPath:w,errorPath:S},it:I},F,B,D){const M=D?(0,t._)`${h}, ${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]];
590
593
  I.opts.dynamicRef&&j.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const x=(0,t._)`${M}, ${_.object(...j)}`;return B!==t.nil?(0,t._)`${F}.call(${B}, ${x})`:(0,t._)`${F}(${x})`}ve.callValidateCode=$;const b=(0,t._)`new RegExp`;function y({gen:h,it:{opts:m}},_){const v=m.unicodeRegExp?"u":"",{regExp:w}=m.code,S=w(_,v);return h.scopeValue("pattern",{key:S.toString(),ref:S,code:(0,t._)`${w.code==="new RegExp"?b:(0,n.useFunc)(h,w)}(${_}, ${v})`})}ve.usePattern=y;function d(h){const{gen:m,
591
594
  data:_,keyword:v,it:w}=h,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=>{h.subschema({keyword:v,dataProp:D,dataPropType:e.Type.Num},S),m.if((0,t.not)(S),F)})}}ve.validateArray=d;function g(h){const{gen:m,schema:_,keyword:v,it:w}=h;if(!Array.isArray(_))throw new Error("ajv implementation error");if(_.some(B=>(0,e.alwaysValidSchema)(w,B))&&
592
- !w.opts.unevaluated)return;const I=m.let("valid",!1),F=m.name("_valid");m.block(()=>_.forEach((B,D)=>{const M=h.subschema({keyword:v,schemaProp:D,compositeRule:!0},F);m.assign(I,(0,t._)`${I} || ${F}`),h.mergeValidEvaluated(M,F)||m.if((0,t.not)(I))})),h.result(I,()=>h.reset(),()=>h.error(!0))}return ve.validateUnion=g,ve}var vu;function ry(){if(vu)return Je;vu=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.validateKeywordUsage=Je.validSchemaType=Je.funcKeywordCode=Je.macroKeywordCode=void 0;
593
- const t=he(),e=Xe(),r=Qe(),n=pn();function s(p,$){const{gen:b,keyword:y,schema:d,parentSchema:g,it:h}=p,m=$.macro.call(h.self,d,g,h),_=l(b,y,m);h.opts.validateSchema!==!1&&h.self.validateSchema(m,!0);const v=b.name("valid");p.subschema({schema:m,schemaPath:t.nil,errSchemaPath:`${h.errSchemaPath}/${y}`,topSchemaRef:_,compositeRule:!0},v),p.pass(v,()=>p.error(!0))}Je.macroKeywordCode=s;function i(p,$){var b;const{gen:y,keyword:d,schema:g,parentSchema:h,$data:m,it:_}=p;c(_,$);const v=!m&&$.compile?
595
+ !w.opts.unevaluated)return;const I=m.let("valid",!1),F=m.name("_valid");m.block(()=>_.forEach((B,D)=>{const M=h.subschema({keyword:v,schemaProp:D,compositeRule:!0},F);m.assign(I,(0,t._)`${I} || ${F}`),h.mergeValidEvaluated(M,F)||m.if((0,t.not)(I))})),h.result(I,()=>h.reset(),()=>h.error(!0))}return ve.validateUnion=g,ve}var wu;function ry(){if(wu)return Je;wu=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.validateKeywordUsage=Je.validSchemaType=Je.funcKeywordCode=Je.macroKeywordCode=void 0;
596
+ const t=he(),e=Xe(),r=Qe(),n=pn();function s(p,$){const{gen:b,keyword:y,schema:d,parentSchema:g,it:h}=p,m=$.macro.call(h.self,d,g,h),_=l(b,y,m);h.opts.validateSchema!==!1&&h.self.validateSchema(m,!0);const v=b.name("valid");p.subschema({schema:m,schemaPath:t.nil,errSchemaPath:`${h.errSchemaPath}/${y}`,topSchemaRef:_,compositeRule:!0},v),p.pass(v,()=>p.error(!0))}Je.macroKeywordCode=s;function i(p,$){var b;const{gen:y,keyword:d,schema:g,parentSchema:h,$data:m,it:_}=p;u(_,$);const v=!m&&$.compile?
594
597
  $.compile.call(_.self,g,h,_):$.validate,w=l(y,d,v),S=y.let("valid");p.block$data(S,I),p.ok((b=$.valid)!==null&&b!==void 0?b:S);function I(){if($.errors===!1)D(),$.modifying&&o(p),M(()=>p.error());else{const j=$.async?F():B();$.modifying&&o(p),M(()=>a(p,j))}}function F(){const j=y.let("ruleErrs",null);return y.try(()=>D((0,t._)`await `),x=>y.assign(S,!1).if((0,t._)`${x} instanceof ${_.ValidationError}`,()=>y.assign(j,(0,t._)`${x}.errors`),()=>y.throw(x))),j}function B(){const j=(0,t._)`${w}.errors`;
595
598
  return y.assign(j,null),D(t.nil),j}function D(j=$.async?(0,t._)`await `:t.nil){const x=_.opts.passContext?e.default.this:e.default.self,U=!("compile"in $&&!m||$.schema===!1);y.assign(S,(0,t._)`${j}${(0,r.callValidateCode)(p,w,x,U)}`,$.modifying)}function M(j){var x;y.if((0,t.not)((x=$.valid)!==null&&x!==void 0?x:S),j)}}Je.funcKeywordCode=i;function o(p){const{gen:$,data:b,it:y}=p;$.if(y.parentData,()=>$.assign(b,(0,t._)`${y.parentData}[${y.parentDataProperty}]`))}function a(p,$){const{gen:b}=p;b.
596
- 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)(p)},()=>p.error())}function c({schemaEnv:p},$){if($.async&&!p.$async)throw new Error("async keyword in sync schema")}function l(p,$,b){if(b===void 0)throw new Error(`keyword "${$}" failed to compile`);return p.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,t.
597
- stringify)(b)})}function u(p,$,b=!1){return!$.length||$.some(y=>y==="array"?Array.isArray(p):y==="object"?p&&typeof p=="object"&&!Array.isArray(p):typeof p==y||b&&typeof p>"u")}Je.validSchemaType=u;function f({schema:p,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 h=d.dependencies;if(h?.some(m=>!Object.prototype.hasOwnProperty.call(p,m)))throw new Error(`parent schema must have dependencies o\
598
- f ${g}: ${h.join(",")}`);if(d.validateSchema&&!d.validateSchema(p[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 Je.validateKeywordUsage=f,Je}var pt={},bu;function ny(){if(bu)return pt;bu=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.extendSubschemaMode=pt.extendSubschemaData=pt.getSubschema=void 0;const t=he(),e=$e();function r(i,{keyword:o,schemaProp:a,schema:c,
599
- 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 p=i.schema[o];return a===void 0?{schema:p,schemaPath:(0,t._)`${i.schemaPath}${(0,t.getProperty)(o)}`,errSchemaPath:`${i.errSchemaPath}/${o}`}:{schema:p[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||
600
- 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:p}=o;if(a!==void 0){const{errorPath:b,dataPathArr:y,opts:d}=o,
601
- g=p.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:p.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=
602
- 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={},Vi,wu;function Eu(){return wu||(wu=1,Vi=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=
603
- n;s--!==0;)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}),Vi}var zi={
604
- exports:{}},Su;function sy(){if(Su)return zi.exports;Su=1;var t=zi.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={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=
605
- {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};function e(n,s,i,o,a,c,l,u,f,p){if(o&&typeof o=="object"&&!Array.isArray(o)){s(o,a,c,l,u,f,p);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&&
606
- 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,p)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return zi.exports}var Ru;function gn(){if(Ru)return je;Ru=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=Eu(),r=sy(),n=new Set(["type","format",
607
- "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)<=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){
608
- 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],h=>d+=a(h)),d===1/0))return 1/0}return d}function c(y,d="",g){g!==!1&&(d=f(d));const h=y.parse(d);return l(y,h)}je.getFullPath=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 p(y,d,g){return g=f(g),y.resolve(d,g)}je.resolveUrl=p;const $=/^[a-z_][-a-z0-9._]*$/i;function b(y,d){
609
- if(typeof y=="boolean")return{};const{schemaId:g,uriResolver:h}=this.opts,m=f(y[g]||d),_={"":m},v=c(h,m,!1),w={},S=new Set;return r(y,{allKeys:!0},(B,D,M,j)=>{if(j===void 0)return;const x=v+D;let U=_[j];typeof B[g]=="string"&&(U=Y.call(this,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,
610
- J):J!==f(x)&&(J[0]==="#"?(I(B,w[J],J),w[J]=B):this.refs[J]=x),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){return new Error(`reference "${B}" resolves to more than one schema`)}}return je.getSchemaRefs=b,je}var Au;function Nr(){if(Au)return dt;Au=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.getData=dt.KeywordCxt=dt.validateFunctionCode=void 0;const t=ey(),
611
- e=mn(),r=gu(),n=mn(),s=ty(),i=ry(),o=ny(),a=he(),c=Xe(),l=gn(),u=$e(),f=pn();function p(L){if(v(L)&&(S(L),_(L))){d(L);return}$(L,()=>(0,t.topBoolOrEmptySchema)(L))}dt.validateFunctionCode=p;function $({gen:L,validateName:q,schema:Q,schemaEnv:ne,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"; ${h(Q,P)}`),y(L,P),L.code(T)}):L.func(q,(0,a._)`${c.default.data}, ${b(P)}`,ne.$async,()=>L.code(h(Q,P)).code(T))}function b(L){return(0,a.
612
- _)`{${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,()=>{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}`),
613
- 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(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.
614
- $comment&&j(L),B(L),ne.let(c.default.vErrors,null),ne.let(c.default.errors,0),Q.unevaluated&&g(L),I(L),x(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`,()=>q.assign((0,a._)`${L.evaluated}.props`,(0,a._)`undefined`)),q.if((0,a._)`${L.evaluated}.dynamicItems`,()=>q.assign((0,a._)`${L.evaluated}.items`,(0,a._)`undefined`))}function h(L,q){const Q=typeof L=="object"&&L[q.schemaId];return Q&&(q.code.source||
615
- q.code.process)?(0,a._)`/*# sourceURL=${Q} */`:a.nil}function m(L,q){if(v(L)&&(S(L),_(L))){w(L,q);return}(0,t.boolOrEmptySchema)(L,q)}function _({schema:L,self:q}){if(typeof L=="boolean")return!L;for(const Q in L)if(q.RULES.all[Q])return!0;return!1}function v(L){return typeof L.schema!="boolean"}function w(L,q){const{schema:Q,gen:ne,opts:P}=L;P.$comment&&Q.$comment&&j(L),D(L),M(L);const T=ne.const("_errs",c.default.errors);I(L,T),ne.var(q,(0,a._)`${T} === ${c.default.errors}`)}function S(L){(0,u.
616
- checkUnknownRules)(L),F(L)}function I(L,q){if(L.opts.jtd)return Y(L,[],!1,q);const Q=(0,e.getSchemaTypes)(L.schema),ne=(0,e.coerceAndCheckDataType)(L,Q);Y(L,Q,!ne,q)}function F(L){const{schema:q,errSchemaPath:Q,opts:ne,self:P}=L;q.$ref&&ne.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(q,P.RULES)&&P.logger.warn(`$ref: keywords ignored in schema at path "${Q}"`)}function B(L){const{schema:q,opts:Q}=L;q.default!==void 0&&Q.useDefaults&&Q.strictSchema&&(0,u.checkStrictMode)(L,"default is ignored\
617
- in the schema root")}function D(L){const q=L.schema[L.opts.schemaId];q&&(L.baseId=(0,l.resolveUrl)(L.opts.uriResolver,L.baseId,q))}function M(L){if(L.schema.$async&&!L.schemaEnv.$async)throw new Error("async schema in sync schema")}function j({gen:L,schemaEnv:q,schema:Q,errSchemaPath:ne,opts:P}){const T=Q.$comment;if(P.$comment===!0)L.code((0,a._)`${c.default.self}.logger.log(${T})`);else if(typeof P.$comment=="function"){const ee=(0,a.str)`${ne}/$comment`,W=L.scopeValue("root",{ref:q.root});L.
618
- code((0,a._)`${c.default.self}.opts.$comment(${T}, ${ee}, ${W}.schema)`)}}function x(L){const{gen:q,schemaEnv:Q,validateName:ne,ValidationError:P,opts:T}=L;Q.$async?q.if((0,a._)`${c.default.errors} === 0`,()=>q.return(c.default.data),()=>q.throw((0,a._)`new ${P}(${c.default.vErrors})`)):(q.assign((0,a._)`${ne}.errors`,c.default.vErrors),T.unevaluated&&U(L),q.return((0,a._)`${c.default.errors} === 0`))}function U({gen:L,evaluated:q,props:Q,items:ne}){Q instanceof a.Name&&L.assign((0,a._)`${q}.props`,
619
- Q),ne instanceof a.Name&&L.assign((0,a._)`${q}.items`,ne)}function Y(L,q,Q,ne){const{gen:P,schema:T,data:ee,allErrors:W,opts:N,self:te}=L,{RULES:z}=te;if(T.$ref&&(N.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(T,z))){P.block(()=>X(L,"$ref",z.all.$ref.definition));return}N.jtd||J(L,q),P.block(()=>{for(const le of z.rules)re(le);re(z.post)});function re(le){(0,r.shouldUseGroup)(T,le)&&(le.type?(P.if((0,n.checkDataType)(le.type,ee,N.strictNumbers)),G(L,le),q.length===1&&q[0]===le.type&&Q&&(P.
620
- else(),(0,n.reportTypeError)(L)),P.endIf()):G(L,le),W||P.if((0,a._)`${c.default.errors} === ${ne||0}`))}}function G(L,q){const{gen:Q,schema:ne,opts:{useDefaults:P}}=L;P&&(0,s.assignDefaults)(L,q.type),Q.block(()=>{for(const T of q.rules)(0,r.shouldUseRule)(ne,T)&&X(L,T.keyword,T.definition,q.type)})}function J(L,q){L.schemaEnv.meta||!L.opts.strictTypes||(se(L,q),L.opts.allowUnionTypes||H(L,q),A(L,L.dataTypes))}function se(L,q){if(q.length){if(!L.dataTypes.length){L.dataTypes=q;return}q.forEach(Q=>{
621
- k(L.dataTypes,Q)||R(L,`type "${Q}" not allowed by context "${L.dataTypes.join(",")}"`)}),E(L,q)}}function H(L,q){q.length>1&&!(q.length===2&&q.includes("null"))&&R(L,"use allowUnionTypes to allow union type keyword")}function A(L,q){const Q=L.self.RULES.all;for(const ne in Q){const P=Q[ne];if(typeof P=="object"&&(0,r.shouldUseRule)(L.schema,P)){const{type:T}=P.definition;T.length&&!T.some(ee=>V(q,ee))&&R(L,`missing type "${T.join(",")}" for keyword "${ne}"`)}}}function V(L,q){return L.includes(q)||
622
- q==="number"&&L.includes("integer")}function k(L,q){return L.includes(q)||q==="integer"&&L.includes("number")}function E(L,q){const Q=[];for(const ne of L.dataTypes)k(q,ne)?Q.push(ne):q.includes("integer")&&ne==="number"&&Q.push("integer");L.dataTypes=Q}function R(L,q){const Q=L.schemaEnv.baseId+L.errSchemaPath;q+=` at "${Q}" (strictTypes)`,(0,u.checkStrictMode)(L,q,L.opts.strictTypes)}class C{constructor(q,Q,ne){if((0,i.validateKeywordUsage)(q,Q,ne),this.gen=q.gen,this.allErrors=q.allErrors,this.
623
- keyword=ne,this.data=q.data,this.schema=q.schema[ne],this.$data=Q.$data&&q.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(q,this.schema,ne,this.$data),this.schemaType=Q.schemaType,this.parentSchema=q.schema,this.params={},this.it=q,this.def=Q,this.$data)this.schemaCode=q.gen.const("vSchema",oe(this.$data,q));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,Q.schemaType,Q.allowUndefined))throw new Error(`${ne} value must be ${JSON.stringify(
624
- Q.schemaType)}`);("code"in Q?Q.trackErrors:Q.errors!==!1)&&(this.errsCount=q.gen.const("_errs",c.default.errors))}result(q,Q,ne){this.failResult((0,a.not)(q),Q,ne)}failResult(q,Q,ne){this.gen.if(q),ne?ne():this.error(),Q?(this.gen.else(),Q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(q,Q){this.failResult((0,a.not)(q),void 0,Q)}fail(q){if(q===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(q),this.error(),this.allErrors?this.gen.
625
- endIf():this.gen.else()}fail$data(q){if(!this.$data)return this.fail(q);const{schemaCode:Q}=this;this.fail((0,a._)`${Q} !== undefined && (${(0,a.or)(this.invalid$data(),q)})`)}error(q,Q,ne){if(Q){this.setParams(Q),this._error(q,ne),this.setParams({});return}this._error(q,ne)}_error(q,Q){(q?f.reportExtraError:f.reportError)(this,this.def.error,Q)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to k\
626
- eyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(q){this.allErrors||this.gen.if(q)}setParams(q,Q){Q?Object.assign(this.params,q):this.params=q}block$data(q,Q,ne=a.nil){this.gen.block(()=>{this.check$data(q,ne),Q()})}check$data(q=a.nil,Q=a.nil){if(!this.$data)return;const{gen:ne,schemaCode:P,schemaType:T,def:ee}=this;ne.if((0,a.or)((0,a._)`${P} === undefined`,Q)),q!==a.nil&&ne.assign(q,!0),(T.length||ee.validateSchema)&&(ne.elseIf(this.invalid$data()),this.$dataError(),q!==a.
627
- nil&&ne.assign(q,!1)),ne.else()}invalid$data(){const{gen:q,schemaCode:Q,schemaType:ne,def:P,it:T}=this;return(0,a.or)(ee(),W());function ee(){if(ne.length){if(!(Q instanceof a.Name))throw new Error("ajv implementation error");const N=Array.isArray(ne)?ne:[ne];return(0,a._)`${(0,n.checkDataTypes)(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){
628
- 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.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.
629
- 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)(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(
630
- `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}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} leve\
631
- ls up, current level is ${q}`}}return dt.getData=oe,dt}var yn={},Ou;function $n(){if(Ou)return yn;Ou=1,Object.defineProperty(yn,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return yn.default=t,yn}var _n={},Cu;function Tr(){if(Cu)return _n;Cu=1,Object.defineProperty(_n,"__esModule",{value:!0});const t=gn();class e extends Error{constructor(n,s,i,o){super(o||`can't resolve reference ${i} from id ${s}`),this.missingRef=
632
- (0,t.resolveUrl)(n,s,i),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(n,this.missingRef))}}return _n.default=e,_n}var Ue={},Pu;function vn(){if(Pu)return Ue;Pu=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.resolveSchema=Ue.getCompilingSchema=Ue.resolveRef=Ue.compileSchema=Ue.SchemaEnv=void 0;const t=he(),e=$n(),r=Xe(),n=gn(),s=$e(),i=Nr();class o{constructor(g){var h;this.refs={},this.dynamicAnchors={};let m;typeof g.schema=="object"&&(m=g.schema),this.schema=g.schema,this.schemaId=
633
- g.schemaId,this.root=g.root||this,this.baseId=(h=g.baseId)!==null&&h!==void 0?h:(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)return g;const h=(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.
634
- 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,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)}:
635
- {ref:d.schema}),validateName:I,ValidationError:S,schema:d.schema,schemaEnv:d,rootId:h,baseId:d.baseId||h,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(this.opts.code.optimize);const D=w.toString();B=`${w.scopeRefs(r.default.scope)}return ${D}`,this.opts.code.process&&(B=this.opts.code.process(B,d));const j=new Function(`${r.default.self}`,`${r.default.
636
- scope}`,B)(this,this.scope.get());if(this.scope.value(I,{ref:j}),j.errors=null,j.schema=d.schema,j.schemaEnv=d,d.$async&&(j.$async=!0),this.opts.code.source===!0&&(j.source={validateName:I,validateCode:D,scopeValues:w._values}),this.opts.unevaluated){const{props:x,items:U}=F;j.evaluated={props:x instanceof t.Name?void 0:x,items:U instanceof t.Name?void 0:U,dynamicProps:x instanceof t.Name,dynamicItems:U instanceof t.Name},j.source&&(j.source.evaluated=(0,t.stringify)(j.evaluated))}return d.validate=
637
- j,d}catch(D){throw delete d.validate,delete d.validateName,B&&this.logger.error("Error compiling schema, function code:",B),D}finally{this._compilations.delete(d)}}Ue.compileSchema=a;function c(d,g,h){var m;h=(0,n.resolveUrl)(this.opts.uriResolver,g,h);const _=d.refs[h];if(_)return _;let v=p.call(this,d,h);if(v===void 0){const w=(m=d.localRefs)===null||m===void 0?void 0:m[h],{schemaId:S}=this.opts;w&&(v=new o({schema:w,schemaId:S,root:d,baseId:g}))}if(v!==void 0)return d.refs[h]=l.call(this,v)}Ue.
638
- resolveRef=c;function l(d){return(0,n.inlineRef)(d.schema,this.opts.inlineRefs)?d.schema:d.validate?d:a.call(this,d)}function u(d){for(const g of this._compilations)if(f(g,d))return g}Ue.getCompilingSchema=u;function f(d,g){return d.schema===g.schema&&d.root===g.root&&d.baseId===g.baseId}function p(d,g){let h;for(;typeof(h=this.refs[g])=="string";)g=h;return h||this.schemas[g]||$.call(this,d,g)}function $(d,g){const h=this.opts.uriResolver.parse(g),m=(0,n._getFullPath)(this.opts.uriResolver,h);let _=(0,n.
639
- getFullPath)(this.opts.uriResolver,d.baseId,void 0);if(Object.keys(d.schema).length>0&&m===_)return y.call(this,h,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,h,S)}if(typeof w?.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,
640
- root:d,baseId:_})}return y.call(this,h,w)}}Ue.resolveSchema=$;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(d,{baseId:g,schema:h,root:m}){var _;if(((_=d.fragment)===null||_===void 0?void 0:_[0])!=="/")return;for(const S of d.fragment.slice(1).split("/")){if(typeof h=="boolean")return;const I=h[(0,s.unescapeFragment)(S)];if(I===void 0)return;h=I;const F=typeof h=="object"&&h[this.opts.schemaId];!b.has(S)&&F&&(g=(0,n.resolveUrl)(this.opts.uriResolver,
641
- g,F))}let v;if(typeof h!="boolean"&&h.$ref&&!(0,s.schemaHasRulesButRef)(h,this.RULES)){const S=(0,n.resolveUrl)(this.opts.uriResolver,g,h.$ref);v=$.call(this,m,S)}const{schemaId:w}=this.opts;if(v=v||new o({schema:h,schemaId:w,root:m,baseId:g}),v.schema!==v.root.schema)return v}return Ue}const Iu="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Nu="Meta-schema for $data reference (JSON AnySchema extension proposal)",Tu="object",ju=["$data"],Lu={$data:{type:"string",
642
- anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Du=!1,iy={$id:Iu,description:Nu,type:Tu,required:ju,properties:Lu,additionalProperties:Du},oy={__proto__:null,$id:Iu,additionalProperties:Du,default:iy,description:Nu,properties:Lu,required:ju,type:Tu},ay=nt(oy);var bn={},jr={exports:{}},Gi,xu;function cy(){return xu||(xu=1,Gi={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}}),Gi}var Bi,ku;function uy(){if(ku)return Bi;ku=
643
- 1;const{HEX:t}=cy(),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="",h=!0;for(const m of y){if(t[m]===void 0)return;m!=="0"&&h===!0&&(h=!1),h||(g+=m)}return d&&g.length===0&&(g="0"),g}function s(y){let d=0;const g={error:!1,address:"",zone:""},h=[],m=[];let _=!1,v=!1,w=!1;function S(){if(m.length){
644
- if(_===!1){const I=n(m);if(I!==void 0)h.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++,h.push(":"),d>7){g.error=!0;break}I-1>=0&&y[I-1]===":"&&(v=!0);continue}else if(F==="%"){if(!S())break;_=!0}else{m.push(F);continue}}return m.length&&(_?g.zone=m.join(""):w?h.push(m.join("")):h.push(n(m))),g.address=h.join(""),g}function i(y){if(a(y,":")<2)return{host:y,isIPV6:!1};const d=s(y);
645
- if(d.error)return{host:y,isIPV6:!1};{let g=d.address,h=d.address;return d.zone&&(g+="%"+d.zone,h+="%25"+d.zone),{host:g,escapedHost:h,isIPV6:!0}}}function o(y,d){let g="",h=!0;const m=y.length;for(let _=0;_<m;_++){const v=y[_];v==="0"&&h?(_+1<=m&&y[_+1]===d||_+1===m)&&(g+=v,h=!1):(v===d?h=!0:h=!1,g+=v)}return g}function a(y,d){let g=0;for(let h=0;h<y.length;h++)y[h]===d&&g++;return g}const c=/^\.\.?\//u,l=/^\/\.(?:\/|$)/u,u=/^\/\.\.(?:\/|$)/u,f=/^\/?(?:.|\n)*?(?=\/|$)/u;function p(y){const d=[];
646
- 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 h=g[0];y=y.slice(h.length),d.push(h)}else throw new Error("Unexpected dot segment condition")}return d.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&&
647
- (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 h=r(g);if(h.isIPV4)g=h.host;else{const m=i(h.host);m.isIPV6===!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 Bi={recomposeAuthority:b,normalizeComponentEncoding:$,
648
- removeDotSegments:p,normalizeIPv4:r,normalizeIPv6:i,stringArrayToHexStripped:n},Bi}var Wi,Mu;function ly(){if(Mu)return Wi;Mu=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(h){return typeof h.secure=="boolean"?h.secure:String(h.scheme).toLowerCase()==="wss"}function n(h){return h.host||(h.error=h.error||"HTTP URIs must have a host."),h}function s(h){const m=String(h.scheme).toLowerCase()==="\
649
- https";return(h.port===(m?443:80)||h.port==="")&&(h.port=void 0),h.path||(h.path="/"),h}function i(h){return h.secure=r(h),h.resourceName=(h.path||"/")+(h.query?"?"+h.query:""),h.path=void 0,h.query=void 0,h}function o(h){if((h.port===(r(h)?443:80)||h.port==="")&&(h.port=void 0),typeof h.secure=="boolean"&&(h.scheme=h.secure?"wss":"ws",h.secure=void 0),h.resourceName){const[m,_]=h.resourceName.split("?");h.path=m&&m!=="/"?m:void 0,h.query=_,h.resourceName=void 0}return h.fragment=void 0,h}function a(h,m){
650
- if(!h.path)return h.error="URN can not be parsed",h;const _=h.path.match(e);if(_){const v=m.scheme||h.scheme||"urn";h.nid=_[1].toLowerCase(),h.nss=_[2];const w=`${v}:${m.nid||h.nid}`,S=g[w];h.path=void 0,S&&(h=S.parse(h,m))}else h.error=h.error||"URN can not be parsed.";return h}function c(h,m){const _=m.scheme||h.scheme||"urn",v=h.nid.toLowerCase(),w=`${_}:${m.nid||v}`,S=g[w];S&&(h=S.serialize(h,m));const I=h,F=h.nss;return I.path=`${v||m.nid}:${F}`,m.skipEscape=!0,I}function l(h,m){const _=h;return _.
651
- uuid=_.nss,_.nss=void 0,!m.tolerant&&(!_.uuid||!t.test(_.uuid))&&(_.error=_.error||"UUID is not valid."),_}function u(h){const m=h;return m.nss=(h.uuid||"").toLowerCase(),m}const f={scheme:"http",domainHost:!0,parse:n,serialize:s},p={scheme:"https",domainHost:f.domainHost,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:p,ws:$,wss:b,urn:{scheme:"urn",parse:a,serialize:c,skipNormalize:!0},
652
- "urn:uuid":{scheme:"urn:uuid",parse:l,serialize:u,skipNormalize:!0}};return Wi=g,Wi}var qu;function fy(){if(qu)return jr.exports;qu=1;const{normalizeIPv6:t,normalizeIPv4:e,removeDotSegments:r,recomposeAuthority:n,normalizeComponentEncoding:s}=uy(),i=ly();function o(d,g){return typeof d=="string"?d=u(b(d,g),g):typeof d=="object"&&(d=b(u(d,g),g)),d}function a(d,g,h){const m=Object.assign({scheme:"null"},h),_=c(b(d,m),b(g,m),m,!0);return u(_,{...m,skipEscape:!0})}function c(d,g,h,m){const _={};return m||
653
- (d=b(u(d,h),h),g=b(u(g,h),h)),h=h||{},!h.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=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)+
654
- 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,h){return typeof d=="string"?(d=unescape(d),d=u(s(b(d,h),!0),{...h,skipEscape:!0})):typeof d=="object"&&(d=u(s(d,!0),{...h,skipEscape:!0})),typeof g=="string"?(g=unescape(g),g=u(s(b(g,h),!0),{...h,skipEscape:!0})):typeof g=="object"&&(g=u(s(g,!0),{...h,skipEscape:!0})),
655
- d.toLowerCase()===g.toLowerCase()}function u(d,g){const h={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:""},m=Object.assign({},g),_=[],v=i[(m.scheme||h.scheme||"").toLowerCase()];v&&v.serialize&&v.serialize(h,m),h.path!==void 0&&(m.skipEscape?h.path=unescape(h.path):(h.path=escape(h.path),h.scheme!==void 0&&(h.path=h.path.split("%3A").
656
- join(":")))),m.reference!=="suffix"&&h.scheme&&_.push(h.scheme,":");const w=n(h);if(w!==void 0&&(m.reference!=="suffix"&&_.push("//"),_.push(w),h.path&&h.path.charAt(0)!=="/"&&_.push("/")),h.path!==void 0){let S=h.path;!m.absolutePath&&(!v||!v.absolutePath)&&(S=r(S)),w===void 0&&(S=S.replace(/^\/\//u,"/%2F")),_.push(S)}return h.query!==void 0&&_.push("?",h.query),h.fragment!==void 0&&_.push("#",h.fragment),_.join("")}const f=Array.from({length:127},(d,g)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.
657
- fromCharCode(g)));function p(d){let g=0;for(let h=0,m=d.length;h<m;++h)if(g=d.charCodeAt(h),g>126||f[g])return!0;return!1}const $=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(d,g){const h=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;h.reference==="suffix"&&(d=(h.scheme?h.scheme+":":"")+"//"+d);const w=d.match(
658
- $);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,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=
659
- "uri",h.reference&&h.reference!=="suffix"&&h.reference!==m.reference&&(m.error=m.error||"URI is not a "+h.reference+" reference.");const S=i[(h.scheme||m.scheme||"").toLowerCase()];if(!h.unicodeSupport&&(!S||!S.unicodeSupport)&&m.host&&(h.domainHost||S&&S.domainHost)&&v===!1&&p(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)),_&&
660
- 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,h)}else m.error=m.error||"URI can not be parsed.";return m}const y={SCHEMES:i,normalize:o,resolve:a,resolveComponents:c,equal:l,serialize:u,parse:b};return jr.exports=y,jr.exports.default=y,jr.exports.fastUri=y,jr.exports}var Uu;function dy(){if(Uu)return bn;Uu=1,Object.defineProperty(bn,"__esModule",{value:!0});const t=fy();
661
- return t.code='require("ajv/dist/runtime/uri").default',bn.default=t,bn}var Hu;function Fu(){return Hu||(Hu=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=Nr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=he();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.
662
- 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",{enumerable:!0,get:function(){return r.CodeGen}});const n=$n(),s=Tr(),i=pu(),o=vn(),a=he(),c=gn(),l=mn(),u=$e(),f=ay,p=dy(),$=(H,A)=>new RegExp(H,A);$.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],y=new Set(
663
- ["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:"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:\
664
- {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:"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."},
665
- g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},h=200;function m(H){var A,V,k,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,sa=mt===!0||mt===void 0?1:mt||0,ia=(k=(V=H.code)===null||V===void 0?void 0:V.regExp)!==null&&k!==void 0?k:$,Lh=(E=H.uriResolver)!==null&&E!==void 0?E:p.default;return{strictSchema:(C=(R=H.strictSchema)!==null&&R!==void 0?R:
666
- 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:"log",strictRequired:(ne=(Q=H.strictRequired)!==null&&Q!==void 0?Q:ot)!==null&&ne!==void 0?ne:!1,code:H.code?{...H.code,optimize:sa,regExp:ia}:{optimize:sa,regExp:ia},loopRequired:(P=H.loopRequired)!==null&&P!==void 0?
667
- P:h,loopEnum:(T=H.loopEnum)!==null&&T!==void 0?T:h,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)!==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=
668
- 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:k}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:y,es5:V,lines:k}),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=
669
- 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(){const{$data:A,meta:V,schemaId:k}=this.opts;let E=f;k==="id"&&(E={...f},E.id=E.$id,delete E.$id),V&&A&&this.addMetaSchema(E,E[k],!1)}defaultMeta(){const{meta:A,schemaId:V}=this.opts;return this.opts.defaultMeta=typeof A==
670
- "object"?A[V]||A:void 0}validate(A,V){let k;if(typeof A=="string"){if(k=this.getSchema(A),!k)throw new Error(`no schema with key or ref "${A}"`)}else k=this.compile(A);const E=k(V);return"$async"in k||(this.errors=k.errors),E}compile(A,V){const k=this._addSchema(A,V);return k.validate||this._compileSchemaEnv(k)}compileAsync(A,V){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:k}=this.opts;return E.call(this,A,V);async function E(oe,L){
671
- 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;return X.call(this,L),await Z.call(this,L.missingSchema),C.call(this,oe)}}function X({missingSchema:oe,missingRef:L}){if(this.refs[oe])throw new Error(`AnySchema ${oe} is loaded but ${L} cannot be resolved`)}async function Z(oe){
672
- const L=await ie.call(this,oe);this.refs[oe]||await R.call(this,L.$schema),this.refs[oe]||this.addSchema(L,oe,V)}async function ie(oe){const L=this._loading[oe];if(L)return L;try{return await(this._loading[oe]=k(oe))}finally{delete this._loading[oe]}}}addSchema(A,V,k,E=this.opts.validateSchema){if(Array.isArray(A)){for(const C of A)this.addSchema(C,void 0,k,E);return this}let R;if(typeof A=="object"){const{schemaId:C}=this.opts;if(R=A[C],R!==void 0&&typeof R!="string")throw new Error(`schema ${C}\
673
- must be string`)}return V=(0,c.normalizeId)(V||R),this._checkUnique(V),this.schemas[V]=this._addSchema(A,k,V,E,!0),this}addMetaSchema(A,V,k=this.opts.validateSchema){return this.addSchema(A,V,!0,k),this}validateSchema(A,V){if(typeof A=="boolean")return!0;let k;if(k=A.$schema,k!==void 0&&typeof k!="string")throw new Error("$schema must be a string");if(k=k||this.opts.defaultMeta||this.defaultMeta(),!k)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const E=this.validate(
674
- k,A);if(!E&&V){const R="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(R);else throw new Error(R)}return E}getSchema(A){let V;for(;typeof(V=w.call(this,A))=="string";)A=V;if(V===void 0){const{schemaId:k}=this.opts,E=new o.SchemaEnv({schema:{},schemaId:k});if(V=o.resolveSchema.call(this,E,A),!V)return;this.refs[A]=V}return V.validate||this._compileSchemaEnv(V)}removeSchema(A){if(A instanceof RegExp)return this._removeAllSchemas(this.schemas,A),this._removeAllSchemas(
675
- this.refs,A),this;switch(typeof A){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const V=w.call(this,A);return typeof V=="object"&&this._cache.delete(V.schema),delete this.schemas[A],delete this.refs[A],this}case"object":{const V=A;this._cache.delete(V);let k=A[this.opts.schemaId];return k&&(k=(0,c.normalizeId)(k),delete this.schemas[k],delete this.refs[k]),this}default:throw new Error("ajv.removeSchema: inval\
676
- id parameter")}}addVocabulary(A){for(const V of A)this.addKeyword(V);return this}addKeyword(A,V){let k;if(typeof A=="string")k=A,typeof V=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),V.keyword=k);else if(typeof A=="object"&&V===void 0){if(V=A,k=V.keyword,Array.isArray(k)&&!k.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(x.call(this,k,V),!V)return(0,u.eachItem)(
677
- k,R=>U.call(this,R)),this;G.call(this,V);const E={...V,type:(0,l.getJSONTypes)(V.type),schemaType:(0,l.getJSONTypes)(V.schemaType)};return(0,u.eachItem)(k,E.type.length===0?R=>U.call(this,R,E):R=>E.type.forEach(C=>U.call(this,R,E,C))),this}getKeyword(A){const V=this.RULES.all[A];return typeof V=="object"?V.definition:!!V}removeKeyword(A){const{RULES:V}=this;delete V.keywords[A],delete V.all[A];for(const k of V.rules){const E=k.rules.findIndex(R=>R.keyword===A);E>=0&&k.rules.splice(E,1)}return this}addFormat(A,V){
678
- return typeof V=="string"&&(V=new RegExp(V)),this.formats[A]=V,this}errorsText(A=this.errors,{separator:V=", ",dataVar:k="data"}={}){return!A||A.length===0?"No errors":A.map(E=>`${k}${E.instancePath} ${E.message}`).reduce((E,R)=>E+V+R)}$dataMetaSchema(A,V){const k=this.RULES.all;A=JSON.parse(JSON.stringify(A));for(const E of V){const R=E.split("/").slice(1);let C=A;for(const X of R)C=C[X];for(const X in k){const Z=k[X];if(typeof Z!="object")continue;const{$data:ie}=Z.definition,oe=C[X];ie&&oe&&(C[X]=
679
- se(oe))}}return A}_removeAllSchemas(A,V){for(const k in A){const E=A[k];(!V||V.test(k))&&(typeof E=="string"?delete A[k]:E&&!E.meta&&(this._cache.delete(E.schema),delete A[k]))}}_addSchema(A,V,k,E=this.opts.validateSchema,R=this.opts.addUsedSchema){let C;const{schemaId:X}=this.opts;if(typeof A=="object")C=A[X];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof A!="boolean")throw new Error("schema must be object or boolean")}let Z=this._cache.get(A);if(Z!==void 0)return Z;k=
680
- (0,c.normalizeId)(C||k);const ie=c.getSchemaRefs.call(this,A,k);return Z=new o.SchemaEnv({schema:A,schemaId:X,meta:V,baseId:k,localRefs:ie}),this._cache.set(Z.schema,Z),R&&!k.startsWith("#")&&(k&&this._checkUnique(k),this.refs[k]=Z),E&&this.validateSchema(A,!0),Z}_checkUnique(A){if(this.schemas[A]||this.refs[A])throw new Error(`schema with key or id "${A}" already exists`)}_compileSchemaEnv(A){if(A.meta?this._compileMetaSchema(A):o.compileSchema.call(this,A),!A.validate)throw new Error("ajv impl\
681
- ementation error");return A.validate}_compileMetaSchema(A){const V=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,A)}finally{this.opts=V}}}_.ValidationError=n.default,_.MissingRefError=s.default,t.default=_;function v(H,A,V,k="error"){for(const E in H){const R=E;R in A&&this.logger[k](`${V}: option ${E}. ${H[R]}`)}}function w(H){return H=(0,c.normalizeId)(H),this.schemas[H]||this.refs[H]}function S(){const H=this.opts.schemas;if(H)if(Array.isArray(H))this.addSchema(H);else for(const A in H)
682
- this.addSchema(H[A],A)}function I(){for(const H in this.opts.formats){const A=this.opts.formats[H];A&&this.addFormat(H,A)}}function F(H){if(Array.isArray(H)){this.addVocabulary(H);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const A in H){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;
683
- 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 x(H,A){const{RULES:V}=this;if((0,u.eachItem)(H,k=>{if(V.keywords[k])throw new Error(`Keyword ${k} is already defined`);if(!j.test(k))throw new Error(`Keyword ${k} 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 k;const E=A?.post;if(V&&E)throw new Error(
684
- '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.getJSONTypes)(A.schemaType)}};A.before?Y.call(this,C,X,A.before):C.rules.push(X),R.all[H]=X,(k=A.implements)===null||k===void 0||k.forEach(Z=>this.addKeyword(Z))}function Y(H,A,V){const k=H.rules.findIndex(E=>E.keyword===V);k>=0?H.
685
- rules.splice(k,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/master/lib/refs/data.json#"};function se(H){return{anyOf:[H,J]}}}(Mi)),Mi}var wn={},En={},Sn={},Vu;function hy(){if(Vu)return Sn;Vu=1,Object.defineProperty(Sn,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('\
686
- NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Sn.default=t,Sn}var St={},zu;function Ki(){if(zu)return St;zu=1,Object.defineProperty(St,"__esModule",{value:!0}),St.callRef=St.getValidate=void 0;const t=Tr(),e=Qe(),r=he(),n=Xe(),s=vn(),i=$e(),o={keyword:"$ref",schemaType:"string",code(l){const{gen:u,schema:f,it:p}=l,{baseId:$,schemaEnv:b,validateName:y,opts:d,self:g}=p,{root:h}=b;if((f==="#"||f==="#/")&&$===h.baseId)return _();const m=s.resolveRef.call(g,h,$,f);if(m===void 0)throw new t.
687
- default(p.opts.uriResolver,$,f);if(m instanceof s.SchemaEnv)return v(m);return w(m);function _(){if(b===h)return c(l,y,b,b.$async);const S=u.scopeValue("root",{ref:h});return c(l,(0,r._)`${S}.validate`,h,h.$async)}function v(S){const I=a(l,S);c(l,I,S,S.$async)}function w(S){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)}}};
688
- 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`}St.getValidate=a;function c(l,u,f,p){const{gen:$,it:b}=l,{allErrors:y,schemaEnv:d,opts:g}=b,h=g.passContext?n.default.this:r.nil;p?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,h)}`),w(u),y||$.assign(S,!0)},I=>{$.if((0,r._)`!(${I} instanceof ${b.
689
- ValidationError})`,()=>$.throw(I)),v(I),y||$.assign(S,!1)}),l.ok(S)}function _(){l.result((0,e.callValidateCode)(l,u,h),()=>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.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)
690
- 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.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 St.callRef=c,St.default=o,St}var Gu;function Bu(){if(Gu)return En;Gu=1,Object.defineProperty(En,
691
- "__esModule",{value:!0});const t=hy(),e=Ki(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return En.default=r,En}var Rn={},An={},Wu;function py(){if(Wu)return An;Wu=1,Object.defineProperty(An,"__esModule",{value:!0});const t=he(),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.
692
- 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((0,t._)`${a} ${r[o].fail} ${c} || isNaN(${a})`)}};return An.default=s,An}var On={},Ku;function my(){if(Ku)return On;Ku=1,Object.defineProperty(On,"__esModule",{value:!0});const t=he(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,
693
- 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}`:(0,t._)`${l} !== parseInt(${l})`;n.fail$data((0,t._)`(${o} === 0 || (${l} = ${i}/${o}, ${u}))`)}};return On.default=r,On}var Cn={},Pn={},Yu;function gy(){if(Yu)return Pn;Yu=1,Object.defineProperty(Pn,"__esModule",{value:!0});function t(e){
694
- 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 Pn.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',Pn}var Xu;function yy(){if(Xu)return Cn;Xu=1,Object.defineProperty(Cn,"__esModule",{value:!0});const t=he(),e=$e(),r=gy(),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:o}){const a=i==="maxLength"?"more":"fewer";
695
- 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.useFunc)(i.gen,r.default)}(${a})`;i.fail$data((0,t._)`${f} ${u} ${c}`)}};return Cn.default=s,Cn}var In={},Ju;function $y(){if(Ju)return In;Ju=1,Object.defineProperty(In,"__esModule",{value:!0});const t=Qe(),e=he(),n={keyword:"pattern",
696
- 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}))`:(0,t.usePattern)(s,a);s.fail$data((0,e._)`!${f}.test(${i})`)}};return In.default=n,In}var Nn={},Qu;function _y(){if(Qu)return Nn;Qu=1,Object.defineProperty(Nn,"__esModule",{value:!0});const t=he(),r={keyword:[
697
- "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,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 Nn.default=r,Nn}var Tn={},Zu;function vy(){if(Zu)return Tn;Zu=1,Object.
698
- defineProperty(Tn,"__esModule",{value:!0});const t=Qe(),e=he(),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}}`},code(i){const{gen:o,schema:a,schemaCode:c,data:l,$data:u,it:f}=i,{opts:p}=f;if(!u&&a.length===0)return;const $=a.length>=p.loopRequired;if(f.allErrors?b():y(),p.strictRequired){const h=i.parentSchema.
699
- properties,{definedProperties:m}=i.it;for(const _ of a)if(h?.[_]===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 h of a)(0,t.checkReportMissingProp)(i,h)}function y(){const h=o.let("missing");if($||u){const m=o.let("valid",!0);i.block$data(m,()=>g(h,m)),i.ok(m)}else o.if((0,t.checkMissingProp)(i,a,h)),(0,t.
700
- reportMissingProp)(i,h),o.else()}function d(){o.forOf("prop",c,h=>{i.setParams({missingProperty:h}),o.if((0,t.noPropertyInData)(o,l,h,p.ownProperties),()=>i.error())})}function g(h,m){i.setParams({missingProperty:h}),o.forOf(h,c,()=>{o.assign(m,(0,t.propertyInData)(o,l,h,p.ownProperties)),o.if((0,e.not)(m),()=>{i.error(),o.break()})},e.nil)}}};return Tn.default=s,Tn}var jn={},el;function by(){if(el)return jn;el=1,Object.defineProperty(jn,"__esModule",{value:!0});const t=he(),r={keyword:["maxItem\
701
- s","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.GT:t.operators.LT;n.fail$data((0,t._)`${i}.length ${a} ${o}`)}};return jn.default=r,jn}var Ln={},Dn={},tl;function Yi(){if(tl)return Dn;tl=1,Object.defineProperty(Dn,"__esModule",{value:!0});
702
- const t=Eu();return t.code='require("ajv/dist/runtime/equal").default',Dn.default=t,Dn}var rl;function wy(){if(rl)return Ln;rl=1,Object.defineProperty(Ln,"__esModule",{value:!0});const t=mn(),e=he(),r=$e(),n=Yi(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:o,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,
703
- parentSchema:f,schemaCode:p,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._)`${p} === 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()?h:m)(_,v))}function g(){return y.length>0&&!y.some(_=>_==="object"||_==="array")}function h(_,v){const w=a.name("item"),S=(0,t.checkDataTypes)(y,w,$.opts.strictNumbers,t.DataType.Wrong),I=a.const(
704
- "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}] = ${_}`)})}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}])`,
705
- ()=>{o.error(),a.assign(b,!1).break(S)})))}}};return Ln.default=i,Ln}var xn={},nl;function Ey(){if(nl)return xn;nl=1,Object.defineProperty(xn,"__esModule",{value:!0});const t=he(),e=$e(),r=Yi(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,t._)`{allowedValue: ${i}}`},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}`)}};
706
- return xn.default=s,xn}var kn={},sl;function Sy(){if(sl)return kn;sl=1,Object.defineProperty(kn,"__esModule",{value:!0});const t=he(),e=$e(),r=Yi(),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){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 p=l.length>=f.opts.loopEnum;let $;const b=()=>$??
707
- ($=(0,e.useFunc)(o,r.default));let y;if(p||c)y=o.let("valid"),i.block$data(y,d);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const h=o.const("vSchema",u);y=(0,t.or)(...l.map((m,_)=>g(h,_)))}i.pass(y);function d(){o.assign(y,!1),o.forOf("v",u,h=>o.if((0,t._)`${b()}(${a}, ${h})`,()=>o.assign(y,!0).break()))}function g(h,m){const _=l[m];return typeof _=="object"&&_!==null?(0,t._)`${b()}(${a}, ${h}[${m}])`:(0,t._)`${a} === ${_}`}}};return kn.default=s,kn}var il;function ol(){
708
- if(il)return Rn;il=1,Object.defineProperty(Rn,"__esModule",{value:!0});const t=py(),e=my(),r=yy(),n=$y(),s=_y(),i=vy(),o=by(),a=wy(),c=Ey(),l=Sy(),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"},c.default,l.default];return Rn.default=u,Rn}var Mn={},tr={},al;function cl(){if(al)return tr;al=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.validateAdditionalItems=void 0;
709
- const t=he(),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)){(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=
710
- !0;const p=a.const("len",(0,t._)`${l}.length`);if(c===!1)i.setParams({len:o.length}),i.pass((0,t._)`${p} <= ${o.length}`);else if(typeof c=="object"&&!(0,e.alwaysValidSchema)(f,c)){const b=a.var("valid",(0,t._)`${p} <= ${o.length}`);a.if((0,t.not)(b),()=>$(b)),i.ok(b)}function $(b){a.forRange("i",o.length,p,y=>{i.subschema({keyword:u,dataProp:y,dataPropType:e.Type.Num},b),f.allErrors||a.if((0,t.not)(b),()=>a.break())})}}return tr.validateAdditionalItems=s,tr.default=n,tr}var qn={},rr={},ul;function ll(){
711
- if(ul)return rr;ul=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.validateTuple=void 0;const t=he(),e=$e(),r=Qe(),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)(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:p}=i;y(l),p.opts.unevaluated&&a.length&&p.items!==!0&&(p.
712
- items=e.mergeEvaluated.items(c,a.length,p.items));const $=c.name("valid"),b=c.const("len",(0,t._)`${u}.length`);a.forEach((d,g)=>{(0,e.alwaysValidSchema)(p,d)||(c.if((0,t._)`${b} > ${g}`,()=>i.subschema({keyword:f,schemaProp:g,dataProp:g},$)),i.ok($))});function y(d){const{opts:g,errSchemaPath:h}=p,m=a.length,_=m===d.minItems&&(m===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 "${h}"`;(0,e.checkStrictMode)(
713
- p,v,g.strictTuples)}}}return rr.validateTuple=s,rr.default=n,rr}var fl;function Ry(){if(fl)return qn;fl=1,Object.defineProperty(qn,"__esModule",{value:!0});const t=ll(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return qn.default=e,qn}var Un={},dl;function Ay(){if(dl)return Un;dl=1,Object.defineProperty(Un,"__esModule",{value:!0});const t=he(),e=$e(),r=Qe(),n=cl(),i={keyword:"items",type:"array",schemaType:["object","bo\
714
- olean"],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)(o)))}};return Un.default=i,Un}var Hn={},hl;function Oy(){if(hl)return Hn;hl=1,Object.defineProperty(Hn,"__esModule",{value:!0});const t=he(),e=$e(),n={keyword:"contains",
715
- 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}}`:(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:p,maxContains:$}=a;l.opts.next?(u=
716
- p===void 0?1:p,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.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&&
717
- 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,()=>h(_)))}function g(m,_){i.forRange("i",0,b,v=>{s.subschema({keyword:"contains",dataProp:v,dataPropType:e.Type.Num,compositeRule:!0},m),_()})}function h(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(
718
- y,!1).break()),u===1?i.assign(y,!0):i.if((0,t._)`${m} >= ${u}`,()=>i.assign(y,!0)))}}};return Hn.default=n,Hn}var Xi={},pl;function Ji(){return pl||(pl=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=he(),r=$e(),n=Qe();t.error={message:({params:{property:c,depsCount:l,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,
719
- deps:u,missingProperty:f}})=>(0,e._)`{property: ${c},
599
+ 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)(p)},()=>p.error())}function u({schemaEnv:p},$){if($.async&&!p.$async)throw new Error("async keyword in sync schema")}function l(p,$,b){if(b===void 0)throw new Error(`keyword "${$}" failed to compile`);return p.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,t.
600
+ stringify)(b)})}function c(p,$,b=!1){return!$.length||$.some(y=>y==="array"?Array.isArray(p):y==="object"?p&&typeof p=="object"&&!Array.isArray(p):typeof p==y||b&&typeof p>"u")}Je.validSchemaType=c;function f({schema:p,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 h=d.dependencies;if(h?.some(m=>!Object.prototype.hasOwnProperty.call(p,m)))throw new Error(`parent schema must have dependencies o\
601
+ f ${g}: ${h.join(",")}`);if(d.validateSchema&&!d.validateSchema(p[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 Je.validateKeywordUsage=f,Je}var pt={},Eu;function ny(){if(Eu)return pt;Eu=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.extendSubschemaMode=pt.extendSubschemaData=pt.getSubschema=void 0;const t=he(),e=$e();function r(i,{keyword:o,schemaProp:a,schema:u,
602
+ schemaPath:l,errSchemaPath:c,topSchemaRef:f}){if(o!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(o!==void 0){const p=i.schema[o];return a===void 0?{schema:p,schemaPath:(0,t._)`${i.schemaPath}${(0,t.getProperty)(o)}`,errSchemaPath:`${i.errSchemaPath}/${o}`}:{schema:p[a],schemaPath:(0,t._)`${i.schemaPath}${(0,t.getProperty)(o)}${(0,t.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${o}/${(0,e.escapeFragment)(a)}`}}if(u!==void 0){if(l===void 0||
603
+ c===void 0||f===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:l,topSchemaRef:f,errSchemaPath:c}}throw new Error('either "keyword" or "schema" must be passed')}pt.getSubschema=r;function n(i,o,{dataProp:a,dataPropType:u,data:l,dataTypes:c,propertyName:f}){if(l!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:p}=o;if(a!==void 0){const{errorPath:b,dataPathArr:y,opts:d}=o,
604
+ g=p.let("data",(0,t._)`${o.data}${(0,t.getProperty)(a)}`,!0);$(g),i.errorPath=(0,t.str)`${b}${(0,e.getErrorPath)(a,u,d.jsPropertySyntax)}`,i.parentDataProperty=(0,t._)`${a}`,i.dataPathArr=[...y,i.parentDataProperty]}if(l!==void 0){const b=l instanceof t.Name?l:p.let("data",l,!0);$(b),f!==void 0&&(i.propertyName=f)}c&&(i.dataTypes=c);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=
605
+ n;function s(i,{jtdDiscriminator:o,jtdMetadata:a,compositeRule:u,createErrors:l,allErrors:c}){u!==void 0&&(i.compositeRule=u),l!==void 0&&(i.createErrors=l),c!==void 0&&(i.allErrors=c),i.jtdDiscriminator=o,i.jtdMetadata=a}return pt.extendSubschemaMode=s,pt}var je={},Gi={exports:{}},Su;function sy(){if(Su)return Gi.exports;Su=1;var t=Gi.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=
606
+ {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};
607
+ function e(n,s,i,o,a,u,l,c,f,p){if(o&&typeof o=="object"&&!Array.isArray(o)){s(o,a,u,l,c,f,p);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,u,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),u,a,$,o,d)}else($ in t.keywords||n.allKeys&&!($ in t.skipKeywords))&&e(n,s,i,b,a+"/"+$,u,a,$,o)}i(o,a,u,l,c,f,p)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,
608
+ "~1")}return Gi.exports}var Ru;function gn(){if(Ru)return je;Ru=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=Ca(),r=sy(),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)<=
609
+ 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],h=>d+=a(h)),d===1/0))return 1/0}return d}function u(y,d="",g){g!==!1&&(d=f(d));const h=y.parse(d);return l(y,h)}je.getFullPath=
610
+ u;function l(y,d){return y.serialize(d).split("#")[0]+"#"}je._getFullPath=l;const c=/#\/?$/;function f(y){return y?y.replace(c,""):""}je.normalizeId=f;function p(y,d,g){return g=f(g),y.resolve(d,g)}je.resolveUrl=p;const $=/^[a-z_][-a-z0-9._]*$/i;function b(y,d){if(typeof y=="boolean")return{};const{schemaId:g,uriResolver:h}=this.opts,m=f(y[g]||d),_={"":m},v=u(h,m,!1),w={},S=new Set;return r(y,{allKeys:!0},(B,D,M,j)=>{if(j===void 0)return;const x=v+D;let U=_[j];typeof B[g]=="string"&&(U=Y.call(this,
611
+ 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(x)&&(J[0]==="#"?(I(B,w[J],J),w[J]=B):this.refs[J]=x),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){
612
+ return new Error(`reference "${B}" resolves to more than one schema`)}}return je.getSchemaRefs=b,je}var Au;function Nr(){if(Au)return dt;Au=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.getData=dt.KeywordCxt=dt.validateFunctionCode=void 0;const t=ey(),e=mn(),r=$u(),n=mn(),s=ty(),i=ry(),o=ny(),a=he(),u=Xe(),l=gn(),c=$e(),f=pn();function p(L){if(v(L)&&(S(L),_(L))){d(L);return}$(L,()=>(0,t.topBoolOrEmptySchema)(L))}dt.validateFunctionCode=p;function $({gen:L,validateName:q,schema:Q,schemaEnv:ne,
613
+ opts:P},T){P.code.es5?L.func(q,(0,a._)`${u.default.data}, ${u.default.valCxt}`,ne.$async,()=>{L.code((0,a._)`"use strict"; ${h(Q,P)}`),y(L,P),L.code(T)}):L.func(q,(0,a._)`${u.default.data}, ${b(P)}`,ne.$async,()=>L.code(h(Q,P)).code(T))}function b(L){return(0,a._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${L.dynamicRef?(0,a._)`, ${u.default.dynamicAnchors}={}`:a.nil}}={}`}function y(L,q){L.if(u.default.valCxt,
614
+ ()=>{L.var(u.default.instancePath,(0,a._)`${u.default.valCxt}.${u.default.instancePath}`),L.var(u.default.parentData,(0,a._)`${u.default.valCxt}.${u.default.parentData}`),L.var(u.default.parentDataProperty,(0,a._)`${u.default.valCxt}.${u.default.parentDataProperty}`),L.var(u.default.rootData,(0,a._)`${u.default.valCxt}.${u.default.rootData}`),q.dynamicRef&&L.var(u.default.dynamicAnchors,(0,a._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{L.var(u.default.instancePath,(0,a._)`""`),L.var(
615
+ u.default.parentData,(0,a._)`undefined`),L.var(u.default.parentDataProperty,(0,a._)`undefined`),L.var(u.default.rootData,u.default.data),q.dynamicRef&&L.var(u.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(u.default.vErrors,null),ne.let(u.default.errors,0),Q.unevaluated&&g(L),I(L),x(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`,
616
+ ()=>q.assign((0,a._)`${L.evaluated}.props`,(0,a._)`undefined`)),q.if((0,a._)`${L.evaluated}.dynamicItems`,()=>q.assign((0,a._)`${L.evaluated}.items`,(0,a._)`undefined`))}function h(L,q){const Q=typeof L=="object"&&L[q.schemaId];return Q&&(q.code.source||q.code.process)?(0,a._)`/*# sourceURL=${Q} */`:a.nil}function m(L,q){if(v(L)&&(S(L),_(L))){w(L,q);return}(0,t.boolOrEmptySchema)(L,q)}function _({schema:L,self:q}){if(typeof L=="boolean")return!L;for(const Q in L)if(q.RULES.all[Q])return!0;return!1}
617
+ function v(L){return typeof L.schema!="boolean"}function w(L,q){const{schema:Q,gen:ne,opts:P}=L;P.$comment&&Q.$comment&&j(L),D(L),M(L);const T=ne.const("_errs",u.default.errors);I(L,T),ne.var(q,(0,a._)`${T} === ${u.default.errors}`)}function S(L){(0,c.checkUnknownRules)(L),F(L)}function I(L,q){if(L.opts.jtd)return Y(L,[],!1,q);const Q=(0,e.getSchemaTypes)(L.schema),ne=(0,e.coerceAndCheckDataType)(L,Q);Y(L,Q,!ne,q)}function F(L){const{schema:q,errSchemaPath:Q,opts:ne,self:P}=L;q.$ref&&ne.ignoreKeywordsWithRef&&
618
+ (0,c.schemaHasRulesButRef)(q,P.RULES)&&P.logger.warn(`$ref: keywords ignored in schema at path "${Q}"`)}function B(L){const{schema:q,opts:Q}=L;q.default!==void 0&&Q.useDefaults&&Q.strictSchema&&(0,c.checkStrictMode)(L,"default is ignored in the schema root")}function D(L){const q=L.schema[L.opts.schemaId];q&&(L.baseId=(0,l.resolveUrl)(L.opts.uriResolver,L.baseId,q))}function M(L){if(L.schema.$async&&!L.schemaEnv.$async)throw new Error("async schema in sync schema")}function j({gen:L,schemaEnv:q,
619
+ schema:Q,errSchemaPath:ne,opts:P}){const T=Q.$comment;if(P.$comment===!0)L.code((0,a._)`${u.default.self}.logger.log(${T})`);else if(typeof P.$comment=="function"){const ee=(0,a.str)`${ne}/$comment`,W=L.scopeValue("root",{ref:q.root});L.code((0,a._)`${u.default.self}.opts.$comment(${T}, ${ee}, ${W}.schema)`)}}function x(L){const{gen:q,schemaEnv:Q,validateName:ne,ValidationError:P,opts:T}=L;Q.$async?q.if((0,a._)`${u.default.errors} === 0`,()=>q.return(u.default.data),()=>q.throw((0,a._)`new ${P}(${u.
620
+ default.vErrors})`)):(q.assign((0,a._)`${ne}.errors`,u.default.vErrors),T.unevaluated&&U(L),q.return((0,a._)`${u.default.errors} === 0`))}function U({gen:L,evaluated:q,props:Q,items:ne}){Q instanceof a.Name&&L.assign((0,a._)`${q}.props`,Q),ne instanceof a.Name&&L.assign((0,a._)`${q}.items`,ne)}function Y(L,q,Q,ne){const{gen:P,schema:T,data:ee,allErrors:W,opts:N,self:te}=L,{RULES:z}=te;if(T.$ref&&(N.ignoreKeywordsWithRef||!(0,c.schemaHasRulesButRef)(T,z))){P.block(()=>X(L,"$ref",z.all.$ref.definition));
621
+ return}N.jtd||J(L,q),P.block(()=>{for(const le of z.rules)re(le);re(z.post)});function re(le){(0,r.shouldUseGroup)(T,le)&&(le.type?(P.if((0,n.checkDataType)(le.type,ee,N.strictNumbers)),G(L,le),q.length===1&&q[0]===le.type&&Q&&(P.else(),(0,n.reportTypeError)(L)),P.endIf()):G(L,le),W||P.if((0,a._)`${u.default.errors} === ${ne||0}`))}}function G(L,q){const{gen:Q,schema:ne,opts:{useDefaults:P}}=L;P&&(0,s.assignDefaults)(L,q.type),Q.block(()=>{for(const T of q.rules)(0,r.shouldUseRule)(ne,T)&&X(L,T.
622
+ keyword,T.definition,q.type)})}function J(L,q){L.schemaEnv.meta||!L.opts.strictTypes||(se(L,q),L.opts.allowUnionTypes||H(L,q),A(L,L.dataTypes))}function se(L,q){if(q.length){if(!L.dataTypes.length){L.dataTypes=q;return}q.forEach(Q=>{k(L.dataTypes,Q)||R(L,`type "${Q}" not allowed by context "${L.dataTypes.join(",")}"`)}),E(L,q)}}function H(L,q){q.length>1&&!(q.length===2&&q.includes("null"))&&R(L,"use allowUnionTypes to allow union type keyword")}function A(L,q){const Q=L.self.RULES.all;for(const ne in Q){
623
+ const P=Q[ne];if(typeof P=="object"&&(0,r.shouldUseRule)(L.schema,P)){const{type:T}=P.definition;T.length&&!T.some(ee=>V(q,ee))&&R(L,`missing type "${T.join(",")}" for keyword "${ne}"`)}}}function V(L,q){return L.includes(q)||q==="number"&&L.includes("integer")}function k(L,q){return L.includes(q)||q==="integer"&&L.includes("number")}function E(L,q){const Q=[];for(const ne of L.dataTypes)k(q,ne)?Q.push(ne):q.includes("integer")&&ne==="number"&&Q.push("integer");L.dataTypes=Q}function R(L,q){const Q=L.
624
+ schemaEnv.baseId+L.errSchemaPath;q+=` at "${Q}" (strictTypes)`,(0,c.checkStrictMode)(L,q,L.opts.strictTypes)}class C{constructor(q,Q,ne){if((0,i.validateKeywordUsage)(q,Q,ne),this.gen=q.gen,this.allErrors=q.allErrors,this.keyword=ne,this.data=q.data,this.schema=q.schema[ne],this.$data=Q.$data&&q.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c.schemaRefOrVal)(q,this.schema,ne,this.$data),this.schemaType=Q.schemaType,this.parentSchema=q.schema,this.params={},this.it=q,this.def=Q,this.
625
+ $data)this.schemaCode=q.gen.const("vSchema",oe(this.$data,q));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,Q.schemaType,Q.allowUndefined))throw new Error(`${ne} value must be ${JSON.stringify(Q.schemaType)}`);("code"in Q?Q.trackErrors:Q.errors!==!1)&&(this.errsCount=q.gen.const("_errs",u.default.errors))}result(q,Q,ne){this.failResult((0,a.not)(q),Q,ne)}failResult(q,Q,ne){this.gen.if(q),ne?ne():this.error(),Q?(this.gen.else(),Q(),this.allErrors&&this.gen.endIf()):this.
626
+ allErrors?this.gen.endIf():this.gen.else()}pass(q,Q){this.failResult((0,a.not)(q),void 0,Q)}fail(q){if(q===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(q),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(q){if(!this.$data)return this.fail(q);const{schemaCode:Q}=this;this.fail((0,a._)`${Q} !== undefined && (${(0,a.or)(this.invalid$data(),q)})`)}error(q,Q,ne){if(Q){this.setParams(Q),this._error(q,ne),this.setParams({});return}this._error(q,ne)}_error(q,Q){
627
+ (q?f.reportExtraError:f.reportError)(this,this.def.error,Q)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(q){this.allErrors||this.gen.if(q)}setParams(q,Q){Q?Object.assign(this.params,q):this.params=q}block$data(q,Q,ne=a.nil){this.gen.block(()=>{this.check$data(q,ne),Q()})}check$data(q=a.nil,Q=a.nil){if(!this.$data)return;
628
+ const{gen:ne,schemaCode:P,schemaType:T,def:ee}=this;ne.if((0,a.or)((0,a._)`${P} === undefined`,Q)),q!==a.nil&&ne.assign(q,!0),(T.length||ee.validateSchema)&&(ne.elseIf(this.invalid$data()),this.$dataError(),q!==a.nil&&ne.assign(q,!1)),ne.else()}invalid$data(){const{gen:q,schemaCode:Q,schemaType:ne,def:P,it:T}=this;return(0,a.or)(ee(),W());function ee(){if(ne.length){if(!(Q instanceof a.Name))throw new Error("ajv implementation error");const N=Array.isArray(ne)?ne:[ne];return(0,a._)`${(0,n.checkDataTypes)(
629
+ 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=c.
630
+ mergeEvaluated.props(P,q.props,ne.props,Q)),ne.items!==!0&&q.items!==void 0&&(ne.items=c.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)(
631
+ 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 u.default.rootData;if(L[0]==="/"){if(!Z.test(L))throw new Error(`Invalid JSON-pointer: ${L}`);P=L,T=u.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}
632
+ let ee=T;const W=P.split("/");for(const te of W)te&&(T=(0,a._)`${T}${(0,a.getProperty)((0,c.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 yn={},Ou;function $n(){if(Ou)return yn;Ou=1,Object.defineProperty(yn,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return yn.default=t,yn}var _n={},
633
+ Cu;function Tr(){if(Cu)return _n;Cu=1,Object.defineProperty(_n,"__esModule",{value:!0});const t=gn();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 _n.default=e,_n}var Ue={},Pu;function vn(){if(Pu)return Ue;Pu=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.resolveSchema=Ue.getCompilingSchema=Ue.resolveRef=Ue.compileSchema=
634
+ Ue.SchemaEnv=void 0;const t=he(),e=$n(),r=Xe(),n=gn(),s=$e(),i=Nr();class o{constructor(g){var h;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=(h=g.baseId)!==null&&h!==void 0?h:(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=c.call(this,d);if(g)
635
+ return g;const h=(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,
636
+ 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:h,baseId:d.baseId||h,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(
637
+ this.opts.code.optimize);const D=w.toString();B=`${w.scopeRefs(r.default.scope)}return ${D}`,this.opts.code.process&&(B=this.opts.code.process(B,d));const j=new Function(`${r.default.self}`,`${r.default.scope}`,B)(this,this.scope.get());if(this.scope.value(I,{ref:j}),j.errors=null,j.schema=d.schema,j.schemaEnv=d,d.$async&&(j.$async=!0),this.opts.code.source===!0&&(j.source={validateName:I,validateCode:D,scopeValues:w._values}),this.opts.unevaluated){const{props:x,items:U}=F;j.evaluated={props:x instanceof
638
+ t.Name?void 0:x,items:U instanceof t.Name?void 0:U,dynamicProps:x instanceof t.Name,dynamicItems:U instanceof t.Name},j.source&&(j.source.evaluated=(0,t.stringify)(j.evaluated))}return d.validate=j,d}catch(D){throw delete d.validate,delete d.validateName,B&&this.logger.error("Error compiling schema, function code:",B),D}finally{this._compilations.delete(d)}}Ue.compileSchema=a;function u(d,g,h){var m;h=(0,n.resolveUrl)(this.opts.uriResolver,g,h);const _=d.refs[h];if(_)return _;let v=p.call(this,d,
639
+ h);if(v===void 0){const w=(m=d.localRefs)===null||m===void 0?void 0:m[h],{schemaId:S}=this.opts;w&&(v=new o({schema:w,schemaId:S,root:d,baseId:g}))}if(v!==void 0)return d.refs[h]=l.call(this,v)}Ue.resolveRef=u;function l(d){return(0,n.inlineRef)(d.schema,this.opts.inlineRefs)?d.schema:d.validate?d:a.call(this,d)}function c(d){for(const g of this._compilations)if(f(g,d))return g}Ue.getCompilingSchema=c;function f(d,g){return d.schema===g.schema&&d.root===g.root&&d.baseId===g.baseId}function p(d,g){
640
+ let h;for(;typeof(h=this.refs[g])=="string";)g=h;return h||this.schemas[g]||$.call(this,d,g)}function $(d,g){const h=this.opts.uriResolver.parse(g),m=(0,n._getFullPath)(this.opts.uriResolver,h);let _=(0,n.getFullPath)(this.opts.uriResolver,d.baseId,void 0);if(Object.keys(d.schema).length>0&&m===_)return y.call(this,h,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,h,S)}if(typeof w?.
641
+ 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,h,w)}}Ue.resolveSchema=$;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(d,{baseId:g,schema:h,root:m}){var _;if(((_=d.fragment)===null||_===void 0?void 0:_[0])!=="/")return;for(const S of d.fragment.slice(
642
+ 1).split("/")){if(typeof h=="boolean")return;const I=h[(0,s.unescapeFragment)(S)];if(I===void 0)return;h=I;const F=typeof h=="object"&&h[this.opts.schemaId];!b.has(S)&&F&&(g=(0,n.resolveUrl)(this.opts.uriResolver,g,F))}let v;if(typeof h!="boolean"&&h.$ref&&!(0,s.schemaHasRulesButRef)(h,this.RULES)){const S=(0,n.resolveUrl)(this.opts.uriResolver,g,h.$ref);v=$.call(this,m,S)}const{schemaId:w}=this.opts;if(v=v||new o({schema:h,schemaId:w,root:m,baseId:g}),v.schema!==v.root.schema)return v}return Ue}
643
+ const Iu="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Nu="Meta-schema for $data reference (JSON AnySchema extension proposal)",Tu="object",ju=["$data"],Lu={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Du=!1,iy={$id:Iu,description:Nu,type:Tu,required:ju,properties:Lu,additionalProperties:Du},oy={__proto__:null,$id:Iu,additionalProperties:Du,default:iy,description:Nu,properties:Lu,required:ju,type:Tu},ay=nt(oy);var bn={},
644
+ jr={exports:{}},Bi,xu;function cy(){return xu||(xu=1,Bi={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}}),Bi}var Wi,ku;function uy(){if(ku)return Wi;ku=1;const{HEX:t}=cy(),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="",h=!0;for(const m of y){
645
+ if(t[m]===void 0)return;m!=="0"&&h===!0&&(h=!1),h||(g+=m)}return d&&g.length===0&&(g="0"),g}function s(y){let d=0;const g={error:!1,address:"",zone:""},h=[],m=[];let _=!1,v=!1,w=!1;function S(){if(m.length){if(_===!1){const I=n(m);if(I!==void 0)h.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++,h.push(":"),d>7){g.error=!0;break}I-1>=0&&y[I-1]===":"&&(v=!0);continue}else if(F==="%"){
646
+ if(!S())break;_=!0}else{m.push(F);continue}}return m.length&&(_?g.zone=m.join(""):w?h.push(m.join("")):h.push(n(m))),g.address=h.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,h=d.address;return d.zone&&(g+="%"+d.zone,h+="%25"+d.zone),{host:g,escapedHost:h,isIPV6:!0}}}function o(y,d){let g="",h=!0;const m=y.length;for(let _=0;_<m;_++){const v=y[_];v==="0"&&h?(_+1<=m&&y[_+1]===d||_+1===m)&&(g+=v,h=!1):(v===d?h=!0:h=
647
+ !1,g+=v)}return g}function a(y,d){let g=0;for(let h=0;h<y.length;h++)y[h]===d&&g++;return g}const u=/^\.\.?\//u,l=/^\/\.(?:\/|$)/u,c=/^\/\.\.(?:\/|$)/u,f=/^\/?(?:.|\n)*?(?=\/|$)/u;function p(y){const d=[];for(;y.length;)if(y.match(u))y=y.replace(u,"");else if(y.match(l))y=y.replace(l,"/");else if(y.match(c))y=y.replace(c,"/"),d.pop();else if(y==="."||y==="..")y="";else{const g=y.match(f);if(g){const h=g[0];y=y.slice(h.length),d.push(h)}else throw new Error("Unexpected dot segment condition")}return d.
648
+ 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 h=r(g);if(h.isIPV4)g=h.host;else{const m=i(h.host);m.isIPV6===
649
+ !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 Wi={recomposeAuthority:b,normalizeComponentEncoding:$,removeDotSegments:p,normalizeIPv4:r,normalizeIPv6:i,stringArrayToHexStripped:n},Wi}var Ki,Mu;function ly(){if(Mu)return Ki;Mu=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(h){
650
+ return typeof h.secure=="boolean"?h.secure:String(h.scheme).toLowerCase()==="wss"}function n(h){return h.host||(h.error=h.error||"HTTP URIs must have a host."),h}function s(h){const m=String(h.scheme).toLowerCase()==="https";return(h.port===(m?443:80)||h.port==="")&&(h.port=void 0),h.path||(h.path="/"),h}function i(h){return h.secure=r(h),h.resourceName=(h.path||"/")+(h.query?"?"+h.query:""),h.path=void 0,h.query=void 0,h}function o(h){if((h.port===(r(h)?443:80)||h.port==="")&&(h.port=void 0),typeof h.
651
+ secure=="boolean"&&(h.scheme=h.secure?"wss":"ws",h.secure=void 0),h.resourceName){const[m,_]=h.resourceName.split("?");h.path=m&&m!=="/"?m:void 0,h.query=_,h.resourceName=void 0}return h.fragment=void 0,h}function a(h,m){if(!h.path)return h.error="URN can not be parsed",h;const _=h.path.match(e);if(_){const v=m.scheme||h.scheme||"urn";h.nid=_[1].toLowerCase(),h.nss=_[2];const w=`${v}:${m.nid||h.nid}`,S=g[w];h.path=void 0,S&&(h=S.parse(h,m))}else h.error=h.error||"URN can not be parsed.";return h}
652
+ function u(h,m){const _=m.scheme||h.scheme||"urn",v=h.nid.toLowerCase(),w=`${_}:${m.nid||v}`,S=g[w];S&&(h=S.serialize(h,m));const I=h,F=h.nss;return I.path=`${v||m.nid}:${F}`,m.skipEscape=!0,I}function l(h,m){const _=h;return _.uuid=_.nss,_.nss=void 0,!m.tolerant&&(!_.uuid||!t.test(_.uuid))&&(_.error=_.error||"UUID is not valid."),_}function c(h){const m=h;return m.nss=(h.uuid||"").toLowerCase(),m}const f={scheme:"http",domainHost:!0,parse:n,serialize:s},p={scheme:"https",domainHost:f.domainHost,
653
+ 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:p,ws:$,wss:b,urn:{scheme:"urn",parse:a,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:l,serialize:c,skipNormalize:!0}};return Ki=g,Ki}var qu;function fy(){if(qu)return jr.exports;qu=1;const{normalizeIPv6:t,normalizeIPv4:e,removeDotSegments:r,recomposeAuthority:n,normalizeComponentEncoding:s}=uy(),i=ly();function o(d,g){
654
+ return typeof d=="string"?d=c(b(d,g),g):typeof d=="object"&&(d=b(c(d,g),g)),d}function a(d,g,h){const m=Object.assign({scheme:"null"},h),_=u(b(d,m),b(g,m),m,!0);return c(_,{...m,skipEscape:!0})}function u(d,g,h,m){const _={};return m||(d=b(c(d,h),h),g=b(c(g,h),h)),h=h||{},!h.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=
655
+ 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,h){return typeof d=="string"?(d=unescape(
656
+ d),d=c(s(b(d,h),!0),{...h,skipEscape:!0})):typeof d=="object"&&(d=c(s(d,!0),{...h,skipEscape:!0})),typeof g=="string"?(g=unescape(g),g=c(s(b(g,h),!0),{...h,skipEscape:!0})):typeof g=="object"&&(g=c(s(g,!0),{...h,skipEscape:!0})),d.toLowerCase()===g.toLowerCase()}function c(d,g){const h={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:""},
657
+ m=Object.assign({},g),_=[],v=i[(m.scheme||h.scheme||"").toLowerCase()];v&&v.serialize&&v.serialize(h,m),h.path!==void 0&&(m.skipEscape?h.path=unescape(h.path):(h.path=escape(h.path),h.scheme!==void 0&&(h.path=h.path.split("%3A").join(":")))),m.reference!=="suffix"&&h.scheme&&_.push(h.scheme,":");const w=n(h);if(w!==void 0&&(m.reference!=="suffix"&&_.push("//"),_.push(w),h.path&&h.path.charAt(0)!=="/"&&_.push("/")),h.path!==void 0){let S=h.path;!m.absolutePath&&(!v||!v.absolutePath)&&(S=r(S)),w===
658
+ void 0&&(S=S.replace(/^\/\//u,"/%2F")),_.push(S)}return h.query!==void 0&&_.push("?",h.query),h.fragment!==void 0&&_.push("#",h.fragment),_.join("")}const f=Array.from({length:127},(d,g)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(g)));function p(d){let g=0;for(let h=0,m=d.length;h<m;++h)if(g=d.charCodeAt(h),g>126||f[g])return!0;return!1}const $=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(d,g){
659
+ const h=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;h.reference==="suffix"&&(d=(h.scheme?h.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,
660
+ 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",h.reference&&h.reference!=="suffix"&&h.reference!==m.reference&&(m.error=m.error||"URI is not a "+h.reference+" reference.");const S=i[(h.scheme||m.scheme||"").toLowerCase()];if(!h.unicodeSupport&&(!S||!S.unicodeSupport)&&m.host&&(h.domainHost||S&&S.domainHost)&&v===
661
+ !1&&p(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,h)}else m.error=m.error||"URI can not be parsed.";return m}const y={SCHEMES:i,normalize:o,resolve:a,
662
+ resolveComponents:u,equal:l,serialize:c,parse:b};return jr.exports=y,jr.exports.default=y,jr.exports.fastUri=y,jr.exports}var Uu;function dy(){if(Uu)return bn;Uu=1,Object.defineProperty(bn,"__esModule",{value:!0});const t=fy();return t.code='require("ajv/dist/runtime/uri").default',bn.default=t,bn}var Hu;function Fu(){return Hu||(Hu=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=Nr();Object.defineProperty(t,"K\
663
+ eywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=he();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",{
664
+ enumerable:!0,get:function(){return r.CodeGen}});const n=$n(),s=Tr(),i=gu(),o=vn(),a=he(),u=gn(),l=mn(),c=$e(),f=ay,p=dy(),$=(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:"\
665
+ 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:"\
666
+ 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.'},h=200;function m(H){var A,V,k,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,ia=mt===
667
+ !0||mt===void 0?1:mt||0,oa=(k=(V=H.code)===null||V===void 0?void 0:V.regExp)!==null&&k!==void 0?k:$,Lh=(E=H.uriResolver)!==null&&E!==void 0?E:p.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:
668
+ "log",strictRequired:(ne=(Q=H.strictRequired)!==null&&Q!==void 0?Q:ot)!==null&&ne!==void 0?ne:!1,code:H.code?{...H.code,optimize:ia,regExp:oa}:{optimize:ia,regExp:oa},loopRequired:(P=H.loopRequired)!==null&&P!==void 0?P:h,loopEnum:(T=H.loopEnum)!==null&&T!==void 0?T:h,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)!==
669
+ 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:k}=this.opts.code;this.scope=new a.ValueScope(
670
+ {scope:{},prefixes:y,es5:V,lines:k}),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(){
671
+ const{$data:A,meta:V,schemaId:k}=this.opts;let E=f;k==="id"&&(E={...f},E.id=E.$id,delete E.$id),V&&A&&this.addMetaSchema(E,E[k],!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 k;if(typeof A=="string"){if(k=this.getSchema(A),!k)throw new Error(`no schema with key or ref "${A}"`)}else k=this.compile(A);const E=k(V);return"$async"in k||(this.errors=k.errors),E}compile(A,V){const k=this._addSchema(A,V);return k.validate||
672
+ this._compileSchemaEnv(k)}compileAsync(A,V){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:k}=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;
673
+ return X.call(this,L),await Z.call(this,L.missingSchema),C.call(this,oe)}}function X({missingSchema:oe,missingRef:L}){if(this.refs[oe])throw new Error(`AnySchema ${oe} is loaded but ${L} cannot be resolved`)}async function Z(oe){const L=await ie.call(this,oe);this.refs[oe]||await R.call(this,L.$schema),this.refs[oe]||this.addSchema(L,oe,V)}async function ie(oe){const L=this._loading[oe];if(L)return L;try{return await(this._loading[oe]=k(oe))}finally{delete this._loading[oe]}}}addSchema(A,V,k,E=this.
674
+ opts.validateSchema){if(Array.isArray(A)){for(const C of A)this.addSchema(C,void 0,k,E);return this}let R;if(typeof A=="object"){const{schemaId:C}=this.opts;if(R=A[C],R!==void 0&&typeof R!="string")throw new Error(`schema ${C} must be string`)}return V=(0,u.normalizeId)(V||R),this._checkUnique(V),this.schemas[V]=this._addSchema(A,k,V,E,!0),this}addMetaSchema(A,V,k=this.opts.validateSchema){return this.addSchema(A,V,!0,k),this}validateSchema(A,V){if(typeof A=="boolean")return!0;let k;if(k=A.$schema,
675
+ k!==void 0&&typeof k!="string")throw new Error("$schema must be a string");if(k=k||this.opts.defaultMeta||this.defaultMeta(),!k)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const E=this.validate(k,A);if(!E&&V){const R="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(R);else throw new Error(R)}return E}getSchema(A){let V;for(;typeof(V=w.call(this,A))=="string";)A=V;if(V===void 0){const{schemaId:k}=this.opts,E=new o.SchemaEnv(
676
+ {schema:{},schemaId:k});if(V=o.resolveSchema.call(this,E,A),!V)return;this.refs[A]=V}return V.validate||this._compileSchemaEnv(V)}removeSchema(A){if(A instanceof RegExp)return this._removeAllSchemas(this.schemas,A),this._removeAllSchemas(this.refs,A),this;switch(typeof A){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const V=w.call(this,A);return typeof V=="object"&&this._cache.delete(V.schema),delete this.schemas[A],
677
+ delete this.refs[A],this}case"object":{const V=A;this._cache.delete(V);let k=A[this.opts.schemaId];return k&&(k=(0,u.normalizeId)(k),delete this.schemas[k],delete this.refs[k]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(A){for(const V of A)this.addKeyword(V);return this}addKeyword(A,V){let k;if(typeof A=="string")k=A,typeof V=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),V.keyword=k);else if(typeof A=="object"&&V===
678
+ void 0){if(V=A,k=V.keyword,Array.isArray(k)&&!k.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(x.call(this,k,V),!V)return(0,c.eachItem)(k,R=>U.call(this,R)),this;G.call(this,V);const E={...V,type:(0,l.getJSONTypes)(V.type),schemaType:(0,l.getJSONTypes)(V.schemaType)};return(0,c.eachItem)(k,E.type.length===0?R=>U.call(this,R,E):R=>E.type.forEach(C=>U.call(this,R,E,C))),this}getKeyword(A){const V=this.RULES.
679
+ all[A];return typeof V=="object"?V.definition:!!V}removeKeyword(A){const{RULES:V}=this;delete V.keywords[A],delete V.all[A];for(const k of V.rules){const E=k.rules.findIndex(R=>R.keyword===A);E>=0&&k.rules.splice(E,1)}return this}addFormat(A,V){return typeof V=="string"&&(V=new RegExp(V)),this.formats[A]=V,this}errorsText(A=this.errors,{separator:V=", ",dataVar:k="data"}={}){return!A||A.length===0?"No errors":A.map(E=>`${k}${E.instancePath} ${E.message}`).reduce((E,R)=>E+V+R)}$dataMetaSchema(A,V){
680
+ const k=this.RULES.all;A=JSON.parse(JSON.stringify(A));for(const E of V){const R=E.split("/").slice(1);let C=A;for(const X of R)C=C[X];for(const X in k){const Z=k[X];if(typeof Z!="object")continue;const{$data:ie}=Z.definition,oe=C[X];ie&&oe&&(C[X]=se(oe))}}return A}_removeAllSchemas(A,V){for(const k in A){const E=A[k];(!V||V.test(k))&&(typeof E=="string"?delete A[k]:E&&!E.meta&&(this._cache.delete(E.schema),delete A[k]))}}_addSchema(A,V,k,E=this.opts.validateSchema,R=this.opts.addUsedSchema){let C;
681
+ const{schemaId:X}=this.opts;if(typeof A=="object")C=A[X];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof A!="boolean")throw new Error("schema must be object or boolean")}let Z=this._cache.get(A);if(Z!==void 0)return Z;k=(0,u.normalizeId)(C||k);const ie=u.getSchemaRefs.call(this,A,k);return Z=new o.SchemaEnv({schema:A,schemaId:X,meta:V,baseId:k,localRefs:ie}),this._cache.set(Z.schema,Z),R&&!k.startsWith("#")&&(k&&this._checkUnique(k),this.refs[k]=Z),E&&this.validateSchema(
682
+ A,!0),Z}_checkUnique(A){if(this.schemas[A]||this.refs[A])throw new Error(`schema with key or id "${A}" already exists`)}_compileSchemaEnv(A){if(A.meta?this._compileMetaSchema(A):o.compileSchema.call(this,A),!A.validate)throw new Error("ajv implementation error");return A.validate}_compileMetaSchema(A){const V=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,A)}finally{this.opts=V}}}_.ValidationError=n.default,_.MissingRefError=s.default,t.default=_;function v(H,A,V,k="error"){for(const E in H){
683
+ const R=E;R in A&&this.logger[k](`${V}: option ${E}. ${H[R]}`)}}function w(H){return H=(0,u.normalizeId)(H),this.schemas[H]||this.refs[H]}function S(){const H=this.opts.schemas;if(H)if(Array.isArray(H))this.addSchema(H);else for(const A in H)this.addSchema(H[A],A)}function I(){for(const H in this.opts.formats){const A=this.opts.formats[H];A&&this.addFormat(H,A)}}function F(H){if(Array.isArray(H)){this.addVocabulary(H);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const A in H){
684
+ 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 x(H,A){const{RULES:V}=this;if((0,c.eachItem)(H,k=>{if(V.keywords[k])throw new Error(`Keyword ${k} is already defined`);if(!j.
685
+ test(k))throw new Error(`Keyword ${k} 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 k;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.
686
+ getJSONTypes)(A.schemaType)}};A.before?Y.call(this,C,X,A.before):C.rules.push(X),R.all[H]=X,(k=A.implements)===null||k===void 0||k.forEach(Z=>this.addKeyword(Z))}function Y(H,A,V){const k=H.rules.findIndex(E=>E.keyword===V);k>=0?H.rules.splice(k,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\
687
+ /master/lib/refs/data.json#"};function se(H){return{anyOf:[H,J]}}}(Ui)),Ui}var wn={},En={},Sn={},Vu;function hy(){if(Vu)return Sn;Vu=1,Object.defineProperty(Sn,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Sn.default=t,Sn}var St={},zu;function Yi(){if(zu)return St;zu=1,Object.defineProperty(St,"__esModule",{value:!0}),St.callRef=St.getValidate=void 0;const t=Tr(),e=Qe(),r=he(),n=Xe(),s=vn(),i=$e(),o={keyword:"\
688
+ $ref",schemaType:"string",code(l){const{gen:c,schema:f,it:p}=l,{baseId:$,schemaEnv:b,validateName:y,opts:d,self:g}=p,{root:h}=b;if((f==="#"||f==="#/")&&$===h.baseId)return _();const m=s.resolveRef.call(g,h,$,f);if(m===void 0)throw new t.default(p.opts.uriResolver,$,f);if(m instanceof s.SchemaEnv)return v(m);return w(m);function _(){if(b===h)return u(l,y,b,b.$async);const S=c.scopeValue("root",{ref:h});return u(l,(0,r._)`${S}.validate`,h,h.$async)}function v(S){const I=a(l,S);u(l,I,S,S.$async)}function w(S){
689
+ const I=c.scopeValue("schema",d.code.source===!0?{ref:S,code:(0,r.stringify)(S)}:{ref:S}),F=c.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,c){const{gen:f}=l;return c.validate?f.scopeValue("validate",{ref:c.validate}):(0,r._)`${f.scopeValue("wrapper",{ref:c})}.validate`}St.getValidate=a;function u(l,c,f,p){const{gen:$,it:b}=l,{allErrors:y,schemaEnv:d,opts:g}=b,h=g.passContext?n.default.this:r.nil;
690
+ p?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,c,h)}`),w(c),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,c,h),()=>w(c),()=>v(c))}function v(S){const I=(0,r._)`${S}.errors`;$.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${I} : ${n.
691
+ 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.
692
+ 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 St.callRef=u,St.default=o,St}var Gu;function Bu(){if(Gu)return En;Gu=1,Object.defineProperty(En,"__esModule",{value:!0});const t=hy(),e=Yi(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return En.default=r,En}var Rn={},An={},Wu;function py(){if(Wu)return An;Wu=1,Object.defineProperty(An,"__esModule",{value:!0});
693
+ const t=he(),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:u}=i;i.fail$data(
694
+ (0,t._)`${a} ${r[o].fail} ${u} || isNaN(${a})`)}};return An.default=s,An}var On={},Ku;function my(){if(Ku)return On;Ku=1,Object.defineProperty(On,"__esModule",{value:!0});const t=he(),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,u=a.opts.multipleOfPrecision,l=s.let("res"),c=u?(0,t._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${u}`:
695
+ (0,t._)`${l} !== parseInt(${l})`;n.fail$data((0,t._)`(${o} === 0 || (${l} = ${i}/${o}, ${c}))`)}};return On.default=r,On}var Cn={},Pn={},Yu;function gy(){if(Yu)return Pn;Yu=1,Object.defineProperty(Pn,"__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 Pn.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',Pn}var Xu;function yy(){if(Xu)return Cn;Xu=
696
+ 1,Object.defineProperty(Cn,"__esModule",{value:!0});const t=he(),e=$e(),r=gy(),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:u,it:l}=i,c=o==="maxLength"?t.operators.GT:t.operators.LT,f=l.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,e.
697
+ useFunc)(i.gen,r.default)}(${a})`;i.fail$data((0,t._)`${f} ${c} ${u}`)}};return Cn.default=s,Cn}var In={},Ju;function $y(){if(Ju)return In;Ju=1,Object.defineProperty(In,"__esModule",{value:!0});const t=Qe(),e=he(),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:u,it:l}=s,c=l.opts.unicodeRegExp?"u":"",f=o?(0,e._)`(new RegExp(${u}, ${c}))`:
698
+ (0,t.usePattern)(s,a);s.fail$data((0,e._)`!${f}.test(${i})`)}};return In.default=n,In}var Nn={},Qu;function _y(){if(Qu)return Nn;Qu=1,Object.defineProperty(Nn,"__esModule",{value:!0});const t=he(),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,
699
+ 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 Nn.default=r,Nn}var Tn={},Zu;function vy(){if(Zu)return Tn;Zu=1,Object.defineProperty(Tn,"__esModule",{value:!0});const t=Qe(),e=he(),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}}`},
700
+ code(i){const{gen:o,schema:a,schemaCode:u,data:l,$data:c,it:f}=i,{opts:p}=f;if(!c&&a.length===0)return;const $=a.length>=p.loopRequired;if(f.allErrors?b():y(),p.strictRequired){const h=i.parentSchema.properties,{definedProperties:m}=i.it;for(const _ of a)if(h?.[_]===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($||c)i.block$data(e.nil,d);else for(const h of a)
701
+ (0,t.checkReportMissingProp)(i,h)}function y(){const h=o.let("missing");if($||c){const m=o.let("valid",!0);i.block$data(m,()=>g(h,m)),i.ok(m)}else o.if((0,t.checkMissingProp)(i,a,h)),(0,t.reportMissingProp)(i,h),o.else()}function d(){o.forOf("prop",u,h=>{i.setParams({missingProperty:h}),o.if((0,t.noPropertyInData)(o,l,h,p.ownProperties),()=>i.error())})}function g(h,m){i.setParams({missingProperty:h}),o.forOf(h,u,()=>{o.assign(m,(0,t.propertyInData)(o,l,h,p.ownProperties)),o.if((0,e.not)(m),()=>{
702
+ i.error(),o.break()})},e.nil)}}};return Tn.default=s,Tn}var jn={},el;function by(){if(el)return jn;el=1,Object.defineProperty(jn,"__esModule",{value:!0});const t=he(),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.
703
+ GT:t.operators.LT;n.fail$data((0,t._)`${i}.length ${a} ${o}`)}};return jn.default=r,jn}var Ln={},Dn={},tl;function Xi(){if(tl)return Dn;tl=1,Object.defineProperty(Dn,"__esModule",{value:!0});const t=Ca();return t.code='require("ajv/dist/runtime/equal").default',Dn.default=t,Dn}var rl;function wy(){if(rl)return Ln;rl=1,Object.defineProperty(Ln,"__esModule",{value:!0});const t=mn(),e=he(),r=$e(),n=Xi(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:o,
704
+ 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:u,$data:l,schema:c,parentSchema:f,schemaCode:p,it:$}=o;if(!l&&!c)return;const b=a.let("valid"),y=f.items?(0,t.getSchemaTypes)(f.items):[];o.block$data(b,d,(0,e._)`${p} === false`),o.ok(b);function d(){const _=a.let("i",(0,e._)`${u}.length`),v=a.let("j");o.setParams({i:_,j:v}),a.assign(b,!0),a.if((0,e._)`${_} > 1`,()=>(g()?h:m)(
705
+ _,v))}function g(){return y.length>0&&!y.some(_=>_==="object"||_==="array")}function h(_,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._)`${u}[${_}]`),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}] = ${_}`)})}
706
+ 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}(${u}[${_}], ${u}[${v}])`,()=>{o.error(),a.assign(b,!1).break(S)})))}}};return Ln.default=i,Ln}var xn={},nl;function Ey(){if(nl)return xn;nl=1,Object.defineProperty(xn,"__esModule",{value:!0});const t=he(),e=$e(),r=Xi(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,t._)`{allowedValue: ${i}}`},
707
+ code(i){const{gen:o,data:a,$data:u,schemaCode:l,schema:c}=i;u||c&&typeof c=="object"?i.fail$data((0,t._)`!${(0,e.useFunc)(o,r.default)}(${a}, ${l})`):i.fail((0,t._)`${c} !== ${a}`)}};return xn.default=s,xn}var kn={},sl;function Sy(){if(sl)return kn;sl=1,Object.defineProperty(kn,"__esModule",{value:!0});const t=he(),e=$e(),r=Xi(),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){
708
+ const{gen:o,data:a,$data:u,schema:l,schemaCode:c,it:f}=i;if(!u&&l.length===0)throw new Error("enum must have non-empty array");const p=l.length>=f.opts.loopEnum;let $;const b=()=>$??($=(0,e.useFunc)(o,r.default));let y;if(p||u)y=o.let("valid"),i.block$data(y,d);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const h=o.const("vSchema",c);y=(0,t.or)(...l.map((m,_)=>g(h,_)))}i.pass(y);function d(){o.assign(y,!1),o.forOf("v",c,h=>o.if((0,t._)`${b()}(${a}, ${h})`,()=>o.assign(y,
709
+ !0).break()))}function g(h,m){const _=l[m];return typeof _=="object"&&_!==null?(0,t._)`${b()}(${a}, ${h}[${m}])`:(0,t._)`${a} === ${_}`}}};return kn.default=s,kn}var il;function ol(){if(il)return Rn;il=1,Object.defineProperty(Rn,"__esModule",{value:!0});const t=py(),e=my(),r=yy(),n=$y(),s=_y(),i=vy(),o=by(),a=wy(),u=Ey(),l=Sy(),c=[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"},
710
+ u.default,l.default];return Rn.default=c,Rn}var Mn={},tr={},al;function cl(){if(al)return tr;al=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.validateAdditionalItems=void 0;const t=he(),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:u}=o;if(!Array.isArray(u)){
711
+ (0,e.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(i,u)}};function s(i,o){const{gen:a,schema:u,data:l,keyword:c,it:f}=i;f.items=!0;const p=a.const("len",(0,t._)`${l}.length`);if(u===!1)i.setParams({len:o.length}),i.pass((0,t._)`${p} <= ${o.length}`);else if(typeof u=="object"&&!(0,e.alwaysValidSchema)(f,u)){const b=a.var("valid",(0,t._)`${p} <= ${o.length}`);a.if((0,t.not)(b),()=>$(b)),i.ok(b)}function $(b){a.forRange("i",o.length,p,y=>{i.subschema(
712
+ {keyword:c,dataProp:y,dataPropType:e.Type.Num},b),f.allErrors||a.if((0,t.not)(b),()=>a.break())})}}return tr.validateAdditionalItems=s,tr.default=n,tr}var qn={},rr={},ul;function ll(){if(ul)return rr;ul=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.validateTuple=void 0;const t=he(),e=$e(),r=Qe(),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)(
713
+ a,o)&&i.ok((0,r.validateArray)(i))}};function s(i,o,a=i.schema){const{gen:u,parentSchema:l,data:c,keyword:f,it:p}=i;y(l),p.opts.unevaluated&&a.length&&p.items!==!0&&(p.items=e.mergeEvaluated.items(u,a.length,p.items));const $=u.name("valid"),b=u.const("len",(0,t._)`${c}.length`);a.forEach((d,g)=>{(0,e.alwaysValidSchema)(p,d)||(u.if((0,t._)`${b} > ${g}`,()=>i.subschema({keyword:f,schemaProp:g,dataProp:g},$)),i.ok($))});function y(d){const{opts:g,errSchemaPath:h}=p,m=a.length,_=m===d.minItems&&(m===
714
+ 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 "${h}"`;(0,e.checkStrictMode)(p,v,g.strictTuples)}}}return rr.validateTuple=s,rr.default=n,rr}var fl;function Ry(){if(fl)return qn;fl=1,Object.defineProperty(qn,"__esModule",{value:!0});const t=ll(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return qn.default=e,qn}var Un={},dl;
715
+ function Ay(){if(dl)return Un;dl=1,Object.defineProperty(Un,"__esModule",{value:!0});const t=he(),e=$e(),r=Qe(),n=cl(),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:u,it:l}=o,{prefixItems:c}=u;l.items=!0,!(0,e.alwaysValidSchema)(l,a)&&(c?(0,n.validateAdditionalItems)(o,c):o.ok((0,r.validateArray)(
716
+ o)))}};return Un.default=i,Un}var Hn={},hl;function Oy(){if(hl)return Hn;hl=1,Object.defineProperty(Hn,"__esModule",{value:!0});const t=he(),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}}`:
717
+ (0,t._)`{minContains: ${s}, maxContains: ${i}}`},code(s){const{gen:i,schema:o,parentSchema:a,data:u,it:l}=s;let c,f;const{minContains:p,maxContains:$}=a;l.opts.next?(c=p===void 0?1:p,f=$):c=1;const b=i.const("len",(0,t._)`${u}.length`);if(s.setParams({min:c,max:f}),f===void 0&&c===0){(0,e.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(f!==void 0&&c>f){(0,e.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,e.
718
+ alwaysValidSchema)(l,o)){let m=(0,t._)`${b} >= ${c}`;f!==void 0&&(m=(0,t._)`${m} && ${b} <= ${f}`),s.pass(m);return}l.items=!0;const y=i.name("valid");f===void 0&&c===1?g(y,()=>i.if(y,()=>i.break())):c===0?(i.let(y,!0),f!==void 0&&i.if((0,t._)`${u}.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,()=>h(_)))}function g(m,_){i.forRange("i",0,b,v=>{s.subschema({keyword:"contains",dataProp:v,dataPropType:e.Type.Num,compositeRule:!0},
719
+ m),_()})}function h(m){i.code((0,t._)`${m}++`),f===void 0?i.if((0,t._)`${m} >= ${c}`,()=>i.assign(y,!0).break()):(i.if((0,t._)`${m} > ${f}`,()=>i.assign(y,!1).break()),c===1?i.assign(y,!0):i.if((0,t._)`${m} >= ${c}`,()=>i.assign(y,!0)))}}};return Hn.default=n,Hn}var Ji={},pl;function Qi(){return pl||(pl=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=he(),r=$e(),n=Qe();t.error={message:({params:{property:u,depsCount:l,
720
+ deps:c}})=>{const f=l===1?"property":"properties";return(0,e.str)`must have ${f} ${c} when property ${u} is present`},params:({params:{property:u,depsCount:l,deps:c,missingProperty:f}})=>(0,e._)`{property: ${u},
720
721
  missingProperty: ${f},
721
722
  depsCount: ${l},
722
- 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 p=Array.isArray(c[f])?l:u;p[f]=c[f]}return[l,u]}function o(c,l=c.schema){const{gen:u,data:f,it:p}=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,p.opts.ownProperties);
723
- c.setParams({property:b,depsCount:y.length,deps:y.join(", ")}),p.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:p,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:p,schemaProp:y},b);
724
- c.mergeValidEvaluated(d,b)},()=>u.var(b,!0)),c.ok(b))}t.validateSchemaDeps=a,t.default=s}(Xi)),Xi}var Fn={},ml;function Cy(){if(ml)return Fn;ml=1,Object.defineProperty(Fn,"__esModule",{value:!0});const t=he(),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\
725
- 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 Fn.default=n,Fn}var Vn={},gl;function yl(){if(gl)return Vn;gl=1,Object.defineProperty(Vn,"__esModule",{value:!0});const t=Qe(),e=he(),r=Xe(),n=$e(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{
726
- 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:p}=o;if(!f)throw new Error("ajv implementation error");const{allErrors:$,opts:b}=p;if(p.props=!0,b.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(p,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(){
727
- a.forIn("key",u,w=>{!y.length&&!d.length?_(w):a.if(h(w),()=>_(w))})}function h(w){let S;if(y.length>8){const I=(0,n.schemaRefOrVal)(p,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===
728
- !1){o.setParams({additionalProperty:w}),o.error(),$||a.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(p,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 Vn.default=i,Vn}var zn={},$l;
729
- function Py(){if($l)return zn;$l=1,Object.defineProperty(zn,"__esModule",{value:!0});const t=Nr(),e=Qe(),r=$e(),n=yl(),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=
730
- r.mergeEvaluated.props(o,(0,r.toHash)(f),u.props));const p=f.filter(d=>!(0,r.alwaysValidSchema)(u,a[d]));if(p.length===0)return;const $=o.name("valid");for(const d of p)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 zn.default=s,
731
- zn}var Gn={},_l;function Iy(){if(_l)return Gn;_l=1,Object.defineProperty(Gn,"__esModule",{value:!0});const t=Qe(),e=he(),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,p=(0,t.allSchemaProperties)(a),$=p.filter(_=>(0,r.alwaysValidSchema)(u,a[_]));if(p.length===0||$.length===p.length&&(!u.opts.unevaluated||u.props===!0))return;const b=f.strictSchema&&!f.allowMatchingProperties&&l.properties,y=o.name(
732
- "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 p)b&&h(_),u.allErrors?m(_):(o.var(y,!0),m(_),o.if(y))}function h(_){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\
733
- 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 Gn.default=s,Gn}var Bn={},vl;function Ny(){if(vl)return Bn;vl=1,Object.defineProperty(Bn,"__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:"\
723
+ deps: ${c}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(u){const[l,c]=i(u);o(u,l),a(u,c)}};function i({schema:u}){const l={},c={};for(const f in u){if(f==="__proto__")continue;const p=Array.isArray(u[f])?l:c;p[f]=u[f]}return[l,c]}function o(u,l=u.schema){const{gen:c,data:f,it:p}=u;if(Object.keys(l).length===0)return;const $=c.let("missing");for(const b in l){const y=l[b];if(y.length===0)continue;const d=(0,n.propertyInData)(c,f,b,p.opts.ownProperties);
724
+ u.setParams({property:b,depsCount:y.length,deps:y.join(", ")}),p.allErrors?c.if(d,()=>{for(const g of y)(0,n.checkReportMissingProp)(u,g)}):(c.if((0,e._)`${d} && (${(0,n.checkMissingProp)(u,y,$)})`),(0,n.reportMissingProp)(u,$),c.else())}}t.validatePropertyDeps=o;function a(u,l=u.schema){const{gen:c,data:f,keyword:p,it:$}=u,b=c.name("valid");for(const y in l)(0,r.alwaysValidSchema)($,l[y])||(c.if((0,n.propertyInData)(c,f,y,$.opts.ownProperties),()=>{const d=u.subschema({keyword:p,schemaProp:y},b);
725
+ u.mergeValidEvaluated(d,b)},()=>c.var(b,!0)),u.ok(b))}t.validateSchemaDeps=a,t.default=s}(Ji)),Ji}var Fn={},ml;function Cy(){if(ml)return Fn;ml=1,Object.defineProperty(Fn,"__esModule",{value:!0});const t=he(),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:u}=s;if((0,e.alwaysValidSchema)(u,o))return;const l=i.name("va\
726
+ lid");i.forIn("key",a,c=>{s.setParams({propertyName:c}),s.subschema({keyword:"propertyNames",data:c,dataTypes:["string"],propertyName:c,compositeRule:!0},l),i.if((0,t.not)(l),()=>{s.error(!0),u.allErrors||i.break()})}),s.ok(l)}};return Fn.default=n,Fn}var Vn={},gl;function yl(){if(gl)return Vn;gl=1,Object.defineProperty(Vn,"__esModule",{value:!0});const t=Qe(),e=he(),r=Xe(),n=$e(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{
727
+ message:"must NOT have additional properties",params:({params:o})=>(0,e._)`{additionalProperty: ${o.additionalProperty}}`},code(o){const{gen:a,schema:u,parentSchema:l,data:c,errsCount:f,it:p}=o;if(!f)throw new Error("ajv implementation error");const{allErrors:$,opts:b}=p;if(p.props=!0,b.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(p,u))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(){
728
+ a.forIn("key",c,w=>{!y.length&&!d.length?_(w):a.if(h(w),()=>_(w))})}function h(w){let S;if(y.length>8){const I=(0,n.schemaRefOrVal)(p,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 ${c}[${w}]`)}function _(w){if(b.removeAdditional==="all"||b.removeAdditional&&u===!1){m(w);return}if(u===
729
+ !1){o.setParams({additionalProperty:w}),o.error(),$||a.break();return}if(typeof u=="object"&&!(0,n.alwaysValidSchema)(p,u)){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 Vn.default=i,Vn}var zn={},$l;
730
+ function Py(){if($l)return zn;$l=1,Object.defineProperty(zn,"__esModule",{value:!0});const t=Nr(),e=Qe(),r=$e(),n=yl(),s={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:o,schema:a,parentSchema:u,data:l,it:c}=i;c.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(c,n.default,"additionalProperties"));const f=(0,e.allSchemaProperties)(a);for(const d of f)c.definedProperties.add(d);c.opts.unevaluated&&f.length&&c.props!==!0&&(c.props=
731
+ r.mergeEvaluated.props(o,(0,r.toHash)(f),c.props));const p=f.filter(d=>!(0,r.alwaysValidSchema)(c,a[d]));if(p.length===0)return;const $=o.name("valid");for(const d of p)b(d)?y(d):(o.if((0,e.propertyInData)(o,l,d,c.opts.ownProperties)),y(d),c.allErrors||o.else().var($,!0),o.endIf()),i.it.definedProperties.add(d),i.ok($);function b(d){return c.opts.useDefaults&&!c.compositeRule&&a[d].default!==void 0}function y(d){i.subschema({keyword:"properties",schemaProp:d,dataProp:d},$)}}};return zn.default=s,
732
+ zn}var Gn={},_l;function Iy(){if(_l)return Gn;_l=1,Object.defineProperty(Gn,"__esModule",{value:!0});const t=Qe(),e=he(),r=$e(),n=$e(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:o,schema:a,data:u,parentSchema:l,it:c}=i,{opts:f}=c,p=(0,t.allSchemaProperties)(a),$=p.filter(_=>(0,r.alwaysValidSchema)(c,a[_]));if(p.length===0||$.length===p.length&&(!c.opts.unevaluated||c.props===!0))return;const b=f.strictSchema&&!f.allowMatchingProperties&&l.properties,y=o.name(
733
+ "valid");c.props!==!0&&!(c.props instanceof e.Name)&&(c.props=(0,n.evaluatedPropsToName)(o,c.props));const{props:d}=c;g();function g(){for(const _ of p)b&&h(_),c.allErrors?m(_):(o.var(y,!0),m(_),o.if(y))}function h(_){for(const v in b)new RegExp(_).test(v)&&(0,r.checkStrictMode)(c,`property ${v} matches pattern ${_} (use allowMatchingProperties)`)}function m(_){o.forIn("key",u,v=>{o.if((0,e._)`${(0,t.usePattern)(i,_)}.test(${v})`,()=>{const w=$.includes(_);w||i.subschema({keyword:"patternPropert\
734
+ ies",schemaProp:_,dataProp:v,dataPropType:n.Type.Str},y),c.opts.unevaluated&&d!==!0?o.assign((0,e._)`${d}[${v}]`,!0):!w&&!c.allErrors&&o.if((0,e.not)(y),()=>o.break())})})}}};return Gn.default=s,Gn}var Bn={},vl;function Ny(){if(vl)return Bn;vl=1,Object.defineProperty(Bn,"__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:"\
734
735
  not",compositeRule:!0,createErrors:!1,allErrors:!1},o),r.failResult(o,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Bn.default=e,Bn}var Wn={},bl;function Ty(){if(bl)return Wn;bl=1,Object.defineProperty(Wn,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Qe().validateUnion,error:{message:"must match a schema in anyOf"}};return Wn.default=e,Wn}var Kn={},wl;function jy(){if(wl)return Kn;wl=1,Object.defineProperty(Kn,"__esModule",{value:!0});
735
- const t=he(),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),p=i.name("_valid");s.setParams({passing:f}),i.block($),s.result(u,()=>s.reset(),()=>s.error(
736
- !0));function $(){l.forEach((b,y)=>{let d;(0,e.alwaysValidSchema)(c,b)?i.var(p,!0):d=s.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},p),y>0&&i.if((0,t._)`${p} && ${u}`).assign(u,!1).assign(f,(0,t._)`[${f}, ${y}]`).else(),i.if(p,()=>{i.assign(u,!0),i.assign(f,y),d&&s.mergeEvaluated(d,t.Name)})})}}};return Kn.default=n,Kn}var Yn={},El;function Ly(){if(El)return Yn;El=1,Object.defineProperty(Yn,"__esModule",{value:!0});const t=$e(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,
737
- 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 Yn.default=e,Yn}var Xn={},Sl;function Dy(){if(Sl)return Xn;Sl=1,Object.defineProperty(Xn,"__esModule",{value:!0});const t=he(),e=$e(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,t.str)`must match "${i.
738
- 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),p=o.name("_valid");if($(),i.reset(),l&&u){const y=o.let("ifClause");i.setParams({ifClause:y}),o.if(p,b("then",y),b("else",y))}else l?o.if(p,b("then")):o.if((0,t.not)(p),b("else"));i.pass(f,()=>i.
736
+ const t=he(),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:u}=s;if(!Array.isArray(o))throw new Error("ajv implementation error");if(u.opts.discriminator&&a.discriminator)return;const l=o,c=i.let("valid",!1),f=i.let("passing",null),p=i.name("_valid");s.setParams({passing:f}),i.block($),s.result(c,()=>s.reset(),()=>s.error(
737
+ !0));function $(){l.forEach((b,y)=>{let d;(0,e.alwaysValidSchema)(u,b)?i.var(p,!0):d=s.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},p),y>0&&i.if((0,t._)`${p} && ${c}`).assign(c,!1).assign(f,(0,t._)`[${f}, ${y}]`).else(),i.if(p,()=>{i.assign(c,!0),i.assign(f,y),d&&s.mergeEvaluated(d,t.Name)})})}}};return Kn.default=n,Kn}var Yn={},El;function Ly(){if(El)return Yn;El=1,Object.defineProperty(Yn,"__esModule",{value:!0});const t=$e(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,
738
+ schema:s,it:i}=r;if(!Array.isArray(s))throw new Error("ajv implementation error");const o=n.name("valid");s.forEach((a,u)=>{if((0,t.alwaysValidSchema)(i,a))return;const l=r.subschema({keyword:"allOf",schemaProp:u},o);r.ok(o),r.mergeEvaluated(l)})}};return Yn.default=e,Yn}var Xn={},Sl;function Dy(){if(Sl)return Xn;Sl=1,Object.defineProperty(Xn,"__esModule",{value:!0});const t=he(),e=$e(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,t.str)`must match "${i.
739
+ ifClause}" schema`,params:({params:i})=>(0,t._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:o,parentSchema:a,it:u}=i;a.then===void 0&&a.else===void 0&&(0,e.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const l=s(u,"then"),c=s(u,"else");if(!l&&!c)return;const f=o.let("valid",!0),p=o.name("_valid");if($(),i.reset(),l&&c){const y=o.let("ifClause");i.setParams({ifClause:y}),o.if(p,b("then",y),b("else",y))}else l?o.if(p,b("then")):o.if((0,t.not)(p),b("else"));i.pass(f,()=>i.
739
740
  error(!0));function $(){const y=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p);i.mergeEvaluated(y)}function b(y,d){return()=>{const g=i.subschema({keyword:y},p);o.assign(f,p),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 Xn.default=n,Xn}var Jn={},Rl;function xy(){if(Rl)return Jn;Rl=1,Object.defineProperty(Jn,"__esModule",{value:!0});const t=$e(),
740
- 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 Jn.default=e,Jn}var Al;function Ol(){if(Al)return Mn;Al=1,Object.defineProperty(Mn,"__esModule",{value:!0});const t=cl(),e=Ry(),r=ll(),n=Ay(),s=Oy(),i=Ji(),o=Cy(),a=yl(),c=Py(),l=Iy(),u=Ny(),f=Ty(),p=jy(),$=Ly(),b=Dy(),y=xy();function d(g=!1){const h=[u.default,f.default,p.default,$.default,b.default,y.default,o.default,
741
- a.default,i.default,c.default,l.default];return g?h.push(e.default,n.default):h.push(t.default,r.default),h.push(s.default),h}return Mn.default=d,Mn}var Qn={},nr={},Cl;function Pl(){if(Cl)return nr;Cl=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.dynamicAnchor=void 0;const t=he(),e=Xe(),r=vn(),n=Ki(),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.
742
- getProperty)(c)}`,p=u.errSchemaPath==="#"?u.validateName:o(a);l.if((0,t._)`!${f}`,()=>l.assign(f,p))}nr.dynamicAnchor=i;function o(a){const{schemaEnv:c,schema:l,self:u}=a.it,{root:f,baseId:p,localRefs:$,meta:b}=c.root,{schemaId:y}=u.opts,d=new r.SchemaEnv({schema:l,schemaId:y,root:f,baseId:p,localRefs:$,meta:b});return r.compileSchema.call(u,d),(0,n.getValidate)(a,d)}return nr.default=s,nr}var sr={},Il;function Nl(){if(Il)return sr;Il=1,Object.defineProperty(sr,"__esModule",{value:!0}),sr.dynamicRef=
743
- void 0;const t=he(),e=Xe(),r=Ki(),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,p(b,$),p(l.validateName,$))}else p(l.validateName,$)()}
741
+ 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 Jn.default=e,Jn}var Al;function Ol(){if(Al)return Mn;Al=1,Object.defineProperty(Mn,"__esModule",{value:!0});const t=cl(),e=Ry(),r=ll(),n=Ay(),s=Oy(),i=Qi(),o=Cy(),a=yl(),u=Py(),l=Iy(),c=Ny(),f=Ty(),p=jy(),$=Ly(),b=Dy(),y=xy();function d(g=!1){const h=[c.default,f.default,p.default,$.default,b.default,y.default,o.default,
742
+ a.default,i.default,u.default,l.default];return g?h.push(e.default,n.default):h.push(t.default,r.default),h.push(s.default),h}return Mn.default=d,Mn}var Qn={},nr={},Cl;function Pl(){if(Cl)return nr;Cl=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.dynamicAnchor=void 0;const t=he(),e=Xe(),r=vn(),n=Yi(),s={keyword:"$dynamicAnchor",schemaType:"string",code:a=>i(a,a.schema)};function i(a,u){const{gen:l,it:c}=a;c.schemaEnv.root.dynamicAnchors[u]=!0;const f=(0,t._)`${e.default.dynamicAnchors}${(0,t.
743
+ getProperty)(u)}`,p=c.errSchemaPath==="#"?c.validateName:o(a);l.if((0,t._)`!${f}`,()=>l.assign(f,p))}nr.dynamicAnchor=i;function o(a){const{schemaEnv:u,schema:l,self:c}=a.it,{root:f,baseId:p,localRefs:$,meta:b}=u.root,{schemaId:y}=c.opts,d=new r.SchemaEnv({schema:l,schemaId:y,root:f,baseId:p,localRefs:$,meta:b});return r.compileSchema.call(c,d),(0,n.getValidate)(a,d)}return nr.default=s,nr}var sr={},Il;function Nl(){if(Il)return sr;Il=1,Object.defineProperty(sr,"__esModule",{value:!0}),sr.dynamicRef=
744
+ void 0;const t=he(),e=Xe(),r=Yi(),n={keyword:"$dynamicRef",schemaType:"string",code:i=>s(i,i.schema)};function s(i,o){const{gen:a,keyword:u,it:l}=i;if(o[0]!=="#")throw new Error(`"${u}" only supports hash fragment reference`);const c=o.slice(1);if(l.allErrors)f();else{const $=a.let("valid",!1);f($),i.ok($)}function f($){if(l.schemaEnv.root.dynamicAnchors[c]){const b=a.let("_v",(0,t._)`${e.default.dynamicAnchors}${(0,t.getProperty)(c)}`);a.if(b,p(b,$),p(l.validateName,$))}else p(l.validateName,$)()}
744
745
  function p($,b){return b?()=>a.block(()=>{(0,r.callRef)(i,$),a.let(b,!0)}):()=>(0,r.callRef)(i,$)}}return sr.dynamicRef=s,sr.default=n,sr}var Zn={},Tl;function ky(){if(Tl)return Zn;Tl=1,Object.defineProperty(Zn,"__esModule",{value:!0});const t=Pl(),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 Zn.default=r,Zn}var es={},jl;function My(){if(jl)return es;jl=1,Object.defineProperty(
745
- es,"__esModule",{value:!0});const t=Nl(),e={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,t.dynamicRef)(r,r.schema)};return es.default=e,es}var Ll;function qy(){if(Ll)return Qn;Ll=1,Object.defineProperty(Qn,"__esModule",{value:!0});const t=Pl(),e=Nl(),r=ky(),n=My(),s=[t.default,e.default,r.default,n.default];return Qn.default=s,Qn}var ts={},rs={},Dl;function Uy(){if(Dl)return rs;Dl=1,Object.defineProperty(rs,"__esModule",{value:!0});const t=Ji(),e={keyword:"dependentRequired",type:"obje\
746
- ct",schemaType:"object",error:t.error,code:r=>(0,t.validatePropertyDeps)(r)};return rs.default=e,rs}var ns={},xl;function Hy(){if(xl)return ns;xl=1,Object.defineProperty(ns,"__esModule",{value:!0});const t=Ji(),e={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,t.validateSchemaDeps)(r)};return ns.default=e,ns}var ss={},kl;function Fy(){if(kl)return ss;kl=1,Object.defineProperty(ss,"__esModule",{value:!0});const t=$e(),e={keyword:["maxContains","minContains"],type:"array",
746
+ es,"__esModule",{value:!0});const t=Nl(),e={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,t.dynamicRef)(r,r.schema)};return es.default=e,es}var Ll;function qy(){if(Ll)return Qn;Ll=1,Object.defineProperty(Qn,"__esModule",{value:!0});const t=Pl(),e=Nl(),r=ky(),n=My(),s=[t.default,e.default,r.default,n.default];return Qn.default=s,Qn}var ts={},rs={},Dl;function Uy(){if(Dl)return rs;Dl=1,Object.defineProperty(rs,"__esModule",{value:!0});const t=Qi(),e={keyword:"dependentRequired",type:"obje\
747
+ ct",schemaType:"object",error:t.error,code:r=>(0,t.validatePropertyDeps)(r)};return rs.default=e,rs}var ns={},xl;function Hy(){if(xl)return ns;xl=1,Object.defineProperty(ns,"__esModule",{value:!0});const t=Qi(),e={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,t.validateSchemaDeps)(r)};return ns.default=e,ns}var ss={},kl;function Fy(){if(kl)return ss;kl=1,Object.defineProperty(ss,"__esModule",{value:!0});const t=$e(),e={keyword:["maxContains","minContains"],type:"array",
747
748
  schemaType:"number",code({keyword:r,parentSchema:n,it:s}){n.contains===void 0&&(0,t.checkStrictMode)(s,`"${r}" without "contains" is ignored`)}};return ss.default=e,ss}var Ml;function Vy(){if(Ml)return ts;Ml=1,Object.defineProperty(ts,"__esModule",{value:!0});const t=Uy(),e=Hy(),r=Fy(),n=[t.default,e.default,r.default];return ts.default=n,ts}var is={},os={},ql;function zy(){if(ql)return os;ql=1,Object.defineProperty(os,"__esModule",{value:!0});const t=he(),e=$e(),r=Xe(),s={keyword:"unevaluatedPr\
748
- 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:p}=u;p instanceof t.Name?o.if((0,t._)`${p} !== true`,()=>o.forIn("key",c,d=>o.if(b(p,d),()=>$(d)))):p!==!0&&o.forIn("key",c,d=>p===void 0?$(d):o.if(y(p,d),()=>$(d))),
749
- 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 h=[];for(const m in d)d[m]===!0&&h.push((0,t._)`${g} !== ${m}`);return(0,t.and)(...h)}}};return os.default=
750
- s,os}var as={},Ul;function Gy(){if(Ul)return as;Ul=1,Object.defineProperty(as,"__esModule",{value:!0});const t=he(),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==
751
- "object"&&!(0,e.alwaysValidSchema)(c,o)){const p=i.var("valid",(0,t._)`${u} <= ${l}`);i.if((0,t.not)(p),()=>f(p,l)),s.ok(p)}c.items=!0;function f(p,$){i.forRange("i",$,u,b=>{s.subschema({keyword:"unevaluatedItems",dataProp:b,dataPropType:e.Type.Num},p),c.allErrors||i.if((0,t.not)(p),()=>i.break())})}}};return as.default=n,as}var Hl;function By(){if(Hl)return is;Hl=1,Object.defineProperty(is,"__esModule",{value:!0});const t=zy(),e=Gy(),r=[t.default,e.default];return is.default=r,is}var cs={},us={},
752
- Fl;function Wy(){if(Fl)return us;Fl=1,Object.defineProperty(us,"__esModule",{value:!0});const t=he(),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:p,schemaEnv:$,self:b}=u;if(!f.validateFormats)return;a?y():d();function y(){const g=i.scopeValue("formats",{ref:b.formats,
749
+ 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:u,errsCount:l,it:c}=i;if(!l)throw new Error("ajv implementation error");const{allErrors:f,props:p}=c;p instanceof t.Name?o.if((0,t._)`${p} !== true`,()=>o.forIn("key",u,d=>o.if(b(p,d),()=>$(d)))):p!==!0&&o.forIn("key",u,d=>p===void 0?$(d):o.if(y(p,d),()=>$(d))),
750
+ c.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)(c,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 h=[];for(const m in d)d[m]===!0&&h.push((0,t._)`${g} !== ${m}`);return(0,t.and)(...h)}}};return os.default=
751
+ s,os}var as={},Ul;function Gy(){if(Ul)return as;Ul=1,Object.defineProperty(as,"__esModule",{value:!0});const t=he(),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:u}=s,l=u.items||0;if(l===!0)return;const c=i.const("len",(0,t._)`${a}.length`);if(o===!1)s.setParams({len:l}),s.fail((0,t._)`${c} > ${l}`);else if(typeof o==
752
+ "object"&&!(0,e.alwaysValidSchema)(u,o)){const p=i.var("valid",(0,t._)`${c} <= ${l}`);i.if((0,t.not)(p),()=>f(p,l)),s.ok(p)}u.items=!0;function f(p,$){i.forRange("i",$,c,b=>{s.subschema({keyword:"unevaluatedItems",dataProp:b,dataPropType:e.Type.Num},p),u.allErrors||i.if((0,t.not)(p),()=>i.break())})}}};return as.default=n,as}var Hl;function By(){if(Hl)return is;Hl=1,Object.defineProperty(is,"__esModule",{value:!0});const t=zy(),e=Gy(),r=[t.default,e.default];return is.default=r,is}var cs={},us={},
753
+ Fl;function Wy(){if(Fl)return us;Fl=1,Object.defineProperty(us,"__esModule",{value:!0});const t=he(),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:u,schemaCode:l,it:c}=n,{opts:f,errSchemaPath:p,schemaEnv:$,self:b}=c;if(!f.validateFormats)return;a?y():d();function y(){const g=i.scopeValue("formats",{ref:b.formats,
753
754
  code:f.code.formats}),h=i.const("fDef",(0,t._)`${g}[${l}]`),m=i.let("fType"),_=i.let("format");i.if((0,t._)`typeof ${h} == "object" && !(${h} instanceof RegExp)`,()=>i.assign(m,(0,t._)`${h}.type || "string"`).assign(_,(0,t._)`${h}.validate`),()=>i.assign(m,(0,t._)`"string"`).assign(_,h)),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._)`(${h}.async ? await ${_}(${o}) : ${_}(${o}))`:(0,t._)`${_}(${o})`,I=(0,t.
754
- _)`(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[h,m,_]=w(g);h===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 "${p}"`}}function w(I){const F=I instanceof RegExp?(0,t.regexpCode)(I):f.code.formats?(0,t._)`${f.code.formats}${(0,t.getProperty)(
755
- 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 us.default=r,us}var Vl;function zl(){if(Vl)return cs;Vl=1,Object.defineProperty(
755
+ _)`(typeof ${_} == "function" ? ${S} : ${_}.test(${o}))`;return(0,t._)`${_} && ${_} !== true && ${m} === ${s} && !${I}`}}function d(){const g=b.formats[u];if(!g){v();return}if(g===!0)return;const[h,m,_]=w(g);h===s&&n.pass(S());function v(){if(f.strictSchema===!1){b.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${u}" ignored in schema at path "${p}"`}}function w(I){const F=I instanceof RegExp?(0,t.regexpCode)(I):f.code.formats?(0,t._)`${f.code.formats}${(0,t.getProperty)(
756
+ u)}`:void 0,B=i.scopeValue("formats",{key:u,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 us.default=r,us}var Vl;function zl(){if(Vl)return cs;Vl=1,Object.defineProperty(
756
757
  cs,"__esModule",{value:!0});const e=[Wy().default];return cs.default=e,cs}var Vt={},Gl;function Bl(){return Gl||(Gl=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.contentVocabulary=Vt.metadataVocabulary=void 0,Vt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Vt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Vt}var Wl;function Ky(){if(Wl)return wn;Wl=1,Object.defineProperty(wn,"__esModule",{value:!0});const t=Bu(),
757
- e=ol(),r=Ol(),n=qy(),s=Vy(),i=By(),o=zl(),a=Bl(),c=[n.default,t.default,e.default,(0,r.default)(!0),o.default,a.metadataVocabulary,a.contentVocabulary,s.default,i.default];return wn.default=c,wn}var ls={},Lr={},Kl;function Yy(){if(Kl)return Lr;Kl=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.DiscrError=void 0;var t;return function(e){e.Tag="tag",e.Mapping="mapping"}(t||(Lr.DiscrError=t={})),Lr}var Yl;function Xl(){if(Yl)return ls;Yl=1,Object.defineProperty(ls,"__esModule",{value:!0});const t=he(),
758
- e=Yy(),r=vn(),n=Tr(),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:p}=a,{oneOf:$}=f;if(!p.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=u.
759
- 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}`),
760
- c.assign(y,h(_[v]));c.else(),a.error(!1,{discrError:e.DiscrError.Mapping,tag:d,tagName:b}),c.endIf()}function h(_){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,p.self.RULES)){const x=M.$ref;if(M=r.resolveRef.call(p.self,p.schemaEnv.root,p.baseId,x),M instanceof r.SchemaEnv&&(M=M.schema),M===void 0)throw new n.
758
+ e=ol(),r=Ol(),n=qy(),s=Vy(),i=By(),o=zl(),a=Bl(),u=[n.default,t.default,e.default,(0,r.default)(!0),o.default,a.metadataVocabulary,a.contentVocabulary,s.default,i.default];return wn.default=u,wn}var ls={},Lr={},Kl;function Yy(){if(Kl)return Lr;Kl=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.DiscrError=void 0;var t;return function(e){e.Tag="tag",e.Mapping="mapping"}(t||(Lr.DiscrError=t={})),Lr}var Yl;function Xl(){if(Yl)return ls;Yl=1,Object.defineProperty(ls,"__esModule",{value:!0});const t=he(),
759
+ e=Yy(),r=vn(),n=Tr(),s=$e(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:u}})=>a===e.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:a,tag:u,tagName:l}})=>(0,t._)`{error: ${a}, tag: ${l}, tagValue: ${u}}`},code(a){const{gen:u,data:l,schema:c,parentSchema:f,it:p}=a,{oneOf:$}=f;if(!p.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=c.
760
+ propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!$)throw new Error("discriminator: requires oneOf keyword");const y=u.let("valid",!1),d=u.const("tag",(0,t._)`${l}${(0,t.getProperty)(b)}`);u.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();u.if(!1);for(const v in _)u.elseIf((0,t._)`${d} === ${v}`),
761
+ u.assign(y,h(_[v]));u.else(),a.error(!1,{discrError:e.DiscrError.Mapping,tag:d,tagName:b}),u.endIf()}function h(_){const v=u.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,p.self.RULES)){const x=M.$ref;if(M=r.resolveRef.call(p.self,p.schemaEnv.root,p.baseId,x),M instanceof r.SchemaEnv&&(M=M.schema),M===void 0)throw new n.
761
762
  default(p.opts.uriResolver,p.baseId,x)}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:\
762
763
  "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 ls.default=o,ls}var fs={};const Jl="https://json-schema.org/draft/2020-12/schema",Ql="https://json-schema.org/draft/2020-12/schema",Zl={"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\
763
764
  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},ef="meta",tf="Core and Validation specifications meta-schema",rf=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],nf=["object","boolean"],
@@ -776,164 +777,164 @@ examples:{type:"array",items:!0}},p$={$schema:zf,$id:Gf,$vocabulary:Bf,$dynamicA
776
777
  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:{
777
778
  $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"}}},sd={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"\
778
779
  #/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},y$={$schema:Jf,$id:Qf,$vocabulary:Zf,$dynamicAnchor:ed,title:td,type:rd,properties:nd,$defs:sd},$$={__proto__:null,$defs:sd,$dynamicAnchor:ed,$id:Qf,$schema:Jf,$vocabulary:Zf,default:y$,properties:nd,title:td,type:rd},_$=nt($$);var id;function v$(){if(id)return fs;id=1,Object.defineProperty(fs,"__esMo\
779
- dule",{value:!0});const t=Qy,e=t$,r=s$,n=a$,s=l$,i=h$,o=g$,a=_$,c=["/properties"];function l(u){return[t,e,r,n,s,f(this,i),o,f(this,a)].forEach(p=>this.addMetaSchema(p,void 0,!1)),this;function f(p,$){return u?p.$dataMetaSchema($,c):$}}return fs.default=l,fs}var od;function b$(){return od||(od=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=Fu(),n=Ky(),s=Xl(),i=v$(),
780
+ dule",{value:!0});const t=Qy,e=t$,r=s$,n=a$,s=l$,i=h$,o=g$,a=_$,u=["/properties"];function l(c){return[t,e,r,n,s,f(this,i),o,f(this,a)].forEach(p=>this.addMetaSchema(p,void 0,!1)),this;function f(p,$){return c?p.$dataMetaSchema($,u):$}}return fs.default=l,fs}var od;function b$(){return od||(od=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=Fu(),n=Ky(),s=Xl(),i=v$(),
780
781
  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()||
781
- (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=Nr();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=he();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(
782
- 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=$n();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return u.default}});var f=Tr();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}(fn,fn.exports)),fn.exports}var w$=b$(),ds={exports:{}},Qi={},ad;function E$(){
783
- return ad||(ad=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(p(!0),$),"iso-time":e(c(),u),"iso-date-time":e(p(),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,
782
+ (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 u=Nr();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=he();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(
783
+ 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 c=$n();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return c.default}});var f=Tr();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}(fn,fn.exports)),fn.exports}var w$=b$(),ds={exports:{}},Zi={},ad;function E$(){
784
+ return ad||(ad=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(u(!0),l),"date-time":e(p(!0),$),"iso-time":e(u(),c),"iso-date-time":e(p(),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,
784
785
  "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,
785
786
  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,
786
787
  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$/,
787
- o),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,$),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
788
+ o),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,$),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"iso-date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
788
789
  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],x=+M[2],U=+M[3];return x>=1&&x<=12&&U>=1&&U<=(x===2&&r(j)?29:s[x])}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;
789
- function c(D){return function(j){const x=a.exec(j);if(!x)return!1;const U=+x[1],Y=+x[2],G=+x[3],J=x[4],se=x[5]==="-"?-1:1,H=+(x[6]||0),A=+(x[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,k=U-H*se-(V<0?1:0);return(k===23||k===-1)&&(V===59||V===-1)&&G<61}}function l(D,M){if(!(D&&M))return;const j=new Date("2020-01-01T"+D).valueOf(),x=new Date("2020-01-01T"+M).valueOf();if(j&&x)return j-x}function u(D,M){if(!(D&&M))return;const j=a.exec(D),x=a.exec(M);if(j&&x)return D=
790
- j[1]+j[2]+j[3],M=x[1]+x[2]+x[3],D>M?1:D<M?-1:0}const f=/t|\s/i;function p(D){const M=c(D);return function(x){const U=x.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(),x=new Date(M).valueOf();if(j&&x)return j-x}function b(D,M){if(!(D&&M))return;const[j,x]=D.split(f),[U,Y]=M.split(f),G=o(j,U);if(G!==void 0)return G||l(x,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;
791
- function g(D){return y.test(D)&&d.test(D)}const h=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function m(D){return h.lastIndex=0,h.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}}}(Qi)),Qi}var Zi={},hs={exports:{}},ps={},cd;function S$(){if(cd)return ps;cd=1,Object.defineProperty(
790
+ function u(D){return function(j){const x=a.exec(j);if(!x)return!1;const U=+x[1],Y=+x[2],G=+x[3],J=x[4],se=x[5]==="-"?-1:1,H=+(x[6]||0),A=+(x[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,k=U-H*se-(V<0?1:0);return(k===23||k===-1)&&(V===59||V===-1)&&G<61}}function l(D,M){if(!(D&&M))return;const j=new Date("2020-01-01T"+D).valueOf(),x=new Date("2020-01-01T"+M).valueOf();if(j&&x)return j-x}function c(D,M){if(!(D&&M))return;const j=a.exec(D),x=a.exec(M);if(j&&x)return D=
791
+ j[1]+j[2]+j[3],M=x[1]+x[2]+x[3],D>M?1:D<M?-1:0}const f=/t|\s/i;function p(D){const M=u(D);return function(x){const U=x.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(),x=new Date(M).valueOf();if(j&&x)return j-x}function b(D,M){if(!(D&&M))return;const[j,x]=D.split(f),[U,Y]=M.split(f),G=o(j,U);if(G!==void 0)return G||l(x,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;
792
+ function g(D){return y.test(D)&&d.test(D)}const h=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function m(D){return h.lastIndex=0,h.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}}}(Zi)),Zi}var eo={},hs={exports:{}},ps={},cd;function S$(){if(cd)return ps;cd=1,Object.defineProperty(
792
793
  ps,"__esModule",{value:!0});const t=Bu(),e=ol(),r=Ol(),n=zl(),s=Bl(),i=[t.default,e.default,(0,r.default)(),n.default,s.metadataVocabulary,s.contentVocabulary];return ps.default=i,ps}const ud="http://json-schema.org/draft-07/schema#",ld="http://json-schema.org/draft-07/schema#",fd="Core schema meta-schema",dd={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},
793
794
  simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},hd=["object","boolean"],pd={$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},
794
795
  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\
795
796
  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:"\
796
797
  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\
797
798
  initions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},R$={$schema:ud,$id:ld,title:fd,definitions:dd,type:hd,properties:pd,default:!0},A$={__proto__:null,$id:ld,$schema:ud,default:R$,definitions:dd,properties:pd,title:fd,type:hd},O$=nt(A$);var md;function C$(){return md||(md=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=Fu(),n=S$(),s=Xl(),
798
- i=O$,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()||
799
- (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=Nr();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=he();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,
800
- "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=$n();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=Tr();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}(hs,hs.exports)),hs.exports}var gd;function P$(){return gd||(gd=1,function(t){Object.
801
- defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=C$(),r=he(),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=
802
- {keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:i,code(a){const{gen:c,data:l,schemaCode:u,keyword:f,it:p}=a,{opts:$,self:b}=p;if(!$.validateFormats)return;const y=new e.KeywordCxt(p,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"`,
803
- h(_)))}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(h(v))}function h(m){return(0,r._)`${m}.compare(${l}, ${u}) ${s[f].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(t.formatLimitDefinition),
804
- a);t.default=o}(Zi)),Zi}var yd;function I$(){return yd||(yd=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=E$(),n=P$(),s=he(),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,p]=u.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,i],$=u.formats||r.formatNames;return c(l,$,f,p),u.keywords&&(0,n.default)(l),l};a.get=(l,u="full")=>{const p=(u==="fast"?r.fastFormats:r.fullFormats)[l];if(!p)
805
- throw new Error(`Unknown format "${l}"`);return p};function c(l,u,f,p){var $,b;($=(b=l.opts.code).formats)!==null&&$!==void 0||(b.formats=(0,s._)`require("ajv-formats/dist/formats").${p}`);for(const y of u)l.addFormat(y,f[y])}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a}(ds,ds.exports)),ds.exports}var N$=I$();const T$=qr(N$),j$=(t,e,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;const s=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(
799
+ i=O$,o=["/properties"],a="http://json-schema.org/draft-07/schema";class u 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()||
800
+ (this.getSchema(a)?a:void 0)}}e.Ajv=u,t.exports=e=u,t.exports.Ajv=u,Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var l=Nr();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=he();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,
801
+ "nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var f=$n();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=Tr();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}(hs,hs.exports)),hs.exports}var gd;function P$(){return gd||(gd=1,function(t){Object.
802
+ defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=C$(),r=he(),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:u})=>(0,r.str)`should be ${s[a].okStr} ${u}`,params:({keyword:a,schemaCode:u})=>(0,r._)`{comparison: ${s[a].okStr}, limit: ${u}}`};t.formatLimitDefinition=
803
+ {keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:i,code(a){const{gen:u,data:l,schemaCode:c,keyword:f,it:p}=a,{opts:$,self:b}=p;if(!$.validateFormats)return;const y=new e.KeywordCxt(p,b.RULES.all.format.definition,"format");y.$data?d():g();function d(){const m=u.scopeValue("formats",{ref:b.formats,code:$.code.formats}),_=u.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"`,
804
+ h(_)))}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=u.scopeValue("formats",{key:m,ref:_,code:$.code.formats?(0,r._)`${$.code.formats}${(0,r.getProperty)(m)}`:void 0});a.fail$data(h(v))}function h(m){return(0,r._)`${m}.compare(${l}, ${c}) ${s[f].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(t.formatLimitDefinition),
805
+ a);t.default=o}(eo)),eo}var yd;function I$(){return yd||(yd=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=E$(),n=P$(),s=he(),i=new s.Name("fullFormats"),o=new s.Name("fastFormats"),a=(l,c={keywords:!0})=>{if(Array.isArray(c))return u(l,c,r.fullFormats,i),l;const[f,p]=c.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,i],$=c.formats||r.formatNames;return u(l,$,f,p),c.keywords&&(0,n.default)(l),l};a.get=(l,c="full")=>{const p=(c==="fast"?r.fastFormats:r.fullFormats)[l];if(!p)
806
+ throw new Error(`Unknown format "${l}"`);return p};function u(l,c,f,p){var $,b;($=(b=l.opts.code).formats)!==null&&$!==void 0||(b.formats=(0,s._)`require("ajv-formats/dist/formats").${p}`);for(const y of c)l.addFormat(y,f[y])}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a}(ds,ds.exports)),ds.exports}var N$=I$();const T$=qr(N$),j$=(t,e,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;const s=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(
806
807
  e,r);!L$(s,i)&&n||Object.defineProperty(t,r,i)},L$=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)},D$=(t,e)=>{const r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)},x$=(t,e)=>`/* Wrapped ${t}*/
807
808
  ${e}`,k$=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),M$=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),q$=(t,e,r)=>{const n=r===""?"":`with ${r.trim()}() `,s=x$.bind(null,n,e.toString());Object.defineProperty(s,"name",M$);const{writable:i,enumerable:o,configurable:a}=k$;Object.defineProperty(t,"toString",{value:s,writable:i,enumerable:o,configurable:a})};function U$(t,e,{ignoreNonConfigurable:r=!1}={}){const{name:n}=t;for(const s of Reflect.ownKeys(e))j$(t,
808
- e,s,r);return D$(t,e),q$(t,e,n),t}const $d=(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,p=()=>{o=void 0,a&&(clearTimeout(a),a=
809
- 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(p,r),n>0&&n!==Number.POSITIVE_INFINITY&&!a&&(a=setTimeout($,n)),b&&(c=t.apply(f,u)),c};return U$(l,t),l.cancel=()=>{o&&(clearTimeout(o),o=void 0),a&&(clearTimeout(a),a=void 0)},l};var ms={exports:{}},eo,_d;function gs(){if(_d)return eo;_d=1;const t="2.0.0",e=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,s=e-6;return eo={MAX_LENGTH:e,MAX_SAFE_COMPONENT_LENGTH:n,
810
- 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},eo}var to,vd;function ys(){return vd||(vd=1,to=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}),to}var bd;function Dr(){return bd||(bd=1,function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,
811
- MAX_LENGTH:s}=gs(),i=ys();e=t.exports={};const o=e.re=[],a=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={};let f=0;const p="[a-zA-Z0-9-]",$=[["\\s",1],["\\d",s],[p,n]],b=d=>{for(const[g,h]of $)d=d.split(`${g}*`).join(`${g}{0,${h}}`).split(`${g}+`).join(`${g}{1,${h}}`);return d},y=(d,g,h)=>{const m=b(g),_=f++;i(d,_,g),u[d]=_,c[_]=g,l[_]=m,o[_]=new RegExp(g,h?"g":void 0),a[_]=new RegExp(m,h?"g":void 0)};y("NUMERICIDENTIFIER","0|[1-9]\\d*"),y("NUMERICIDENTIFIERLOOSE","\\d+"),y("NONNUMERICIDENTIFIER",
812
- `\\d*[a-zA-Z-]${p}*`),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.
813
- PRERELEASEIDENTIFIER]})*))`),y("PRERELEASELOOSE",`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),y("BUILDIDENTIFIER",`${p}+`),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\
814
- 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]}\
815
- $`),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]}\
816
- $`),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=
817
- "$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*$")}(ms,ms.exports)),ms.exports}var ro,wd;function no(){if(wd)return ro;wd=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return ro=n=>n?typeof n!="object"?t:n:e,ro}var so,Ed;function Sd(){if(Ed)return so;
818
- Ed=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 so={compareIdentifiers:e,rcompareIdentifiers:(n,s)=>e(s,n)},so}var io,Rd;function Le(){if(Rd)return io;Rd=1;const t=ys(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:r}=gs(),{safeRe:n,t:s}=Dr(),i=no(),{compareIdentifiers:o}=Sd();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!=
819
- "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\
809
+ e,s,r);return D$(t,e),q$(t,e,n),t}const $d=(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,u;const l=function(...c){const f=this,p=()=>{o=void 0,a&&(clearTimeout(a),a=
810
+ void 0),i&&(u=t.apply(f,c))},$=()=>{a=void 0,o&&(clearTimeout(o),o=void 0),i&&(u=t.apply(f,c))},b=s&&!o;return clearTimeout(o),o=setTimeout(p,r),n>0&&n!==Number.POSITIVE_INFINITY&&!a&&(a=setTimeout($,n)),b&&(u=t.apply(f,c)),u};return U$(l,t),l.cancel=()=>{o&&(clearTimeout(o),o=void 0),a&&(clearTimeout(a),a=void 0)},l};var ms={exports:{}},to,_d;function gs(){if(_d)return to;_d=1;const t="2.0.0",e=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,s=e-6;return to={MAX_LENGTH:e,MAX_SAFE_COMPONENT_LENGTH:n,
811
+ 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},to}var ro,vd;function ys(){return vd||(vd=1,ro=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}),ro}var bd;function Dr(){return bd||(bd=1,function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,
812
+ MAX_LENGTH:s}=gs(),i=ys();e=t.exports={};const o=e.re=[],a=e.safeRe=[],u=e.src=[],l=e.safeSrc=[],c=e.t={};let f=0;const p="[a-zA-Z0-9-]",$=[["\\s",1],["\\d",s],[p,n]],b=d=>{for(const[g,h]of $)d=d.split(`${g}*`).join(`${g}{0,${h}}`).split(`${g}+`).join(`${g}{1,${h}}`);return d},y=(d,g,h)=>{const m=b(g),_=f++;i(d,_,g),c[d]=_,u[_]=g,l[_]=m,o[_]=new RegExp(g,h?"g":void 0),a[_]=new RegExp(m,h?"g":void 0)};y("NUMERICIDENTIFIER","0|[1-9]\\d*"),y("NUMERICIDENTIFIERLOOSE","\\d+"),y("NONNUMERICIDENTIFIER",
813
+ `\\d*[a-zA-Z-]${p}*`),y("MAINVERSION",`(${u[c.NUMERICIDENTIFIER]})\\.(${u[c.NUMERICIDENTIFIER]})\\.(${u[c.NUMERICIDENTIFIER]})`),y("MAINVERSIONLOOSE",`(${u[c.NUMERICIDENTIFIERLOOSE]})\\.(${u[c.NUMERICIDENTIFIERLOOSE]})\\.(${u[c.NUMERICIDENTIFIERLOOSE]})`),y("PRERELEASEIDENTIFIER",`(?:${u[c.NONNUMERICIDENTIFIER]}|${u[c.NUMERICIDENTIFIER]})`),y("PRERELEASEIDENTIFIERLOOSE",`(?:${u[c.NONNUMERICIDENTIFIER]}|${u[c.NUMERICIDENTIFIERLOOSE]})`),y("PRERELEASE",`(?:-(${u[c.PRERELEASEIDENTIFIER]}(?:\\.${u[c.
814
+ PRERELEASEIDENTIFIER]})*))`),y("PRERELEASELOOSE",`(?:-?(${u[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[c.PRERELEASEIDENTIFIERLOOSE]})*))`),y("BUILDIDENTIFIER",`${p}+`),y("BUILD",`(?:\\+(${u[c.BUILDIDENTIFIER]}(?:\\.${u[c.BUILDIDENTIFIER]})*))`),y("FULLPLAIN",`v?${u[c.MAINVERSION]}${u[c.PRERELEASE]}?${u[c.BUILD]}?`),y("FULL",`^${u[c.FULLPLAIN]}$`),y("LOOSEPLAIN",`[v=\\s]*${u[c.MAINVERSIONLOOSE]}${u[c.PRERELEASELOOSE]}?${u[c.BUILD]}?`),y("LOOSE",`^${u[c.LOOSEPLAIN]}$`),y("GTLT","((?:<|>)?=?)"),y("XRAN\
815
+ GEIDENTIFIERLOOSE",`${u[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),y("XRANGEIDENTIFIER",`${u[c.NUMERICIDENTIFIER]}|x|X|\\*`),y("XRANGEPLAIN",`[v=\\s]*(${u[c.XRANGEIDENTIFIER]})(?:\\.(${u[c.XRANGEIDENTIFIER]})(?:\\.(${u[c.XRANGEIDENTIFIER]})(?:${u[c.PRERELEASE]})?${u[c.BUILD]}?)?)?`),y("XRANGEPLAINLOOSE",`[v=\\s]*(${u[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[c.XRANGEIDENTIFIERLOOSE]})(?:${u[c.PRERELEASELOOSE]})?${u[c.BUILD]}?)?)?`),y("XRANGE",`^${u[c.GTLT]}\\s*${u[c.XRANGEPLAIN]}\
816
+ $`),y("XRANGELOOSE",`^${u[c.GTLT]}\\s*${u[c.XRANGEPLAINLOOSE]}$`),y("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),y("COERCE",`${u[c.COERCEPLAIN]}(?:$|[^\\d])`),y("COERCEFULL",u[c.COERCEPLAIN]+`(?:${u[c.PRERELEASE]})?(?:${u[c.BUILD]})?(?:$|[^\\d])`),y("COERCERTL",u[c.COERCE],!0),y("COERCERTLFULL",u[c.COERCEFULL],!0),y("LONETILDE","(?:~>?)"),y("TILDETRIM",`(\\s*)${u[c.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",y("TILDE",`^${u[c.LONETILDE]}${u[c.XRANGEPLAIN]}\
817
+ $`),y("TILDELOOSE",`^${u[c.LONETILDE]}${u[c.XRANGEPLAINLOOSE]}$`),y("LONECARET","(?:\\^)"),y("CARETTRIM",`(\\s*)${u[c.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",y("CARET",`^${u[c.LONECARET]}${u[c.XRANGEPLAIN]}$`),y("CARETLOOSE",`^${u[c.LONECARET]}${u[c.XRANGEPLAINLOOSE]}$`),y("COMPARATORLOOSE",`^${u[c.GTLT]}\\s*(${u[c.LOOSEPLAIN]})$|^$`),y("COMPARATOR",`^${u[c.GTLT]}\\s*(${u[c.FULLPLAIN]})$|^$`),y("COMPARATORTRIM",`(\\s*)${u[c.GTLT]}\\s*(${u[c.LOOSEPLAIN]}|${u[c.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=
818
+ "$1$2$3",y("HYPHENRANGE",`^\\s*(${u[c.XRANGEPLAIN]})\\s+-\\s+(${u[c.XRANGEPLAIN]})\\s*$`),y("HYPHENRANGELOOSE",`^\\s*(${u[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[c.XRANGEPLAINLOOSE]})\\s*$`),y("STAR","(<|>)?=?\\s*\\*"),y("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),y("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(ms,ms.exports)),ms.exports}var no,wd;function so(){if(wd)return no;wd=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return no=n=>n?typeof n!="object"?t:n:e,no}var io,Ed;function Sd(){if(Ed)return io;
819
+ Ed=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 io={compareIdentifiers:e,rcompareIdentifiers:(n,s)=>e(s,n)},io}var oo,Rd;function Le(){if(Rd)return oo;Rd=1;const t=ys(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:r}=gs(),{safeRe:n,t:s}=Dr(),i=so(),{compareIdentifiers:o}=Sd();class a{constructor(l,c){if(c=i(c),l instanceof a){if(l.loose===!!c.loose&&l.includePrerelease===!!c.includePrerelease)return l;l=l.version}else if(typeof l!=
820
+ "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,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;const f=l.trim().match(c.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\
820
821
  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(p=>{if(/^[0-9]+$/.test(p)){const $=+p;if($>=0&&$<r)return $}return p}):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(){
821
822
  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.
822
- prerelease.length&&l.prerelease.length)return 1;if(!this.prerelease.length&&!l.prerelease.length)return 0;let u=0;do{const f=this.prerelease[u],p=l.prerelease[u];if(t("prerelease compare",u,f,p),f===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(f===void 0)return-1;if(f===p)continue;return o(f,p)}while(++u)}compareBuild(l){l instanceof a||(l=new a(l,this.options));let u=0;do{const f=this.build[u],p=l.build[u];if(t("build compare",u,f,p),f===void 0&&p===void 0)return 0;if(p===void 0)return 1;
823
- if(f===void 0)return-1;if(f===p)continue;return o(f,p)}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 p=`-${u}`.match(this.options.loose?n[s.PRERELEASELOOSE]:n[s.PRERELEASE]);if(!p||p[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.
824
- 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.
825
- 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 p=Number(f)?1:0;if(this.prerelease.length===0)this.prerelease=[p];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.
826
- push(p)}}if(u){let $=[u,p];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 io=a,io}var oo,Ad;function ir(){if(Ad)return oo;Ad=1;const t=Le();return oo=(r,n,s=!1)=>{if(r instanceof t)return r;try{return new t(r,n)}catch(i){if(!s)return null;throw i}},oo}var ao,Od;function H$(){
827
- if(Od)return ao;Od=1;const t=ir();return ao=(r,n)=>{const s=t(r,n);return s?s.version:null},ao}var co,Cd;function F$(){if(Cd)return co;Cd=1;const t=ir();return co=(r,n)=>{const s=t(r.trim().replace(/^[=v]+/,""),n);return s?s.version:null},co}var uo,Pd;function V$(){if(Pd)return uo;Pd=1;const t=Le();return uo=(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}},uo}var lo,Id;function z$(){if(Id)return lo;Id=1;const t=ir();
828
- return lo=(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 p=u?"pre":"";return s.major!==i.major?p+"major":s.minor!==i.minor?p+"minor":s.patch!==i.patch?p+"patch":"prerelease"},lo}var fo,Nd;function G$(){if(Nd)return fo;Nd=1;const t=Le();return fo=(r,n)=>new t(r,n).major,fo}var ho,
829
- Td;function B$(){if(Td)return ho;Td=1;const t=Le();return ho=(r,n)=>new t(r,n).minor,ho}var po,jd;function W$(){if(jd)return po;jd=1;const t=Le();return po=(r,n)=>new t(r,n).patch,po}var mo,Ld;function K$(){if(Ld)return mo;Ld=1;const t=ir();return mo=(r,n)=>{const s=t(r,n);return s&&s.prerelease.length?s.prerelease:null},mo}var go,Dd;function Ze(){if(Dd)return go;Dd=1;const t=Le();return go=(r,n,s)=>new t(r,s).compare(new t(n,s)),go}var yo,xd;function Y$(){if(xd)return yo;xd=1;const t=Ze();return yo=
830
- (r,n,s)=>t(n,r,s),yo}var $o,kd;function X$(){if(kd)return $o;kd=1;const t=Ze();return $o=(r,n)=>t(r,n,!0),$o}var _o,Md;function vo(){if(Md)return _o;Md=1;const t=Le();return _o=(r,n,s)=>{const i=new t(r,s),o=new t(n,s);return i.compare(o)||i.compareBuild(o)},_o}var bo,qd;function J$(){if(qd)return bo;qd=1;const t=vo();return bo=(r,n)=>r.sort((s,i)=>t(s,i,n)),bo}var wo,Ud;function Q$(){if(Ud)return wo;Ud=1;const t=vo();return wo=(r,n)=>r.sort((s,i)=>t(i,s,n)),wo}var Eo,Hd;function $s(){if(Hd)return Eo;
831
- Hd=1;const t=Ze();return Eo=(r,n,s)=>t(r,n,s)>0,Eo}var So,Fd;function Ro(){if(Fd)return So;Fd=1;const t=Ze();return So=(r,n,s)=>t(r,n,s)<0,So}var Ao,Vd;function zd(){if(Vd)return Ao;Vd=1;const t=Ze();return Ao=(r,n,s)=>t(r,n,s)===0,Ao}var Oo,Gd;function Bd(){if(Gd)return Oo;Gd=1;const t=Ze();return Oo=(r,n,s)=>t(r,n,s)!==0,Oo}var Co,Wd;function Po(){if(Wd)return Co;Wd=1;const t=Ze();return Co=(r,n,s)=>t(r,n,s)>=0,Co}var Io,Kd;function No(){if(Kd)return Io;Kd=1;const t=Ze();return Io=(r,n,s)=>t(r,
832
- n,s)<=0,Io}var To,Yd;function Xd(){if(Yd)return To;Yd=1;const t=zd(),e=Bd(),r=$s(),n=Po(),s=Ro(),i=No();return To=(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(
833
- `Invalid operator: ${c}`)}},To}var jo,Jd;function Z$(){if(Jd)return jo;Jd=1;const t=Le(),e=ir(),{safeRe:r,t:n}=Dr();return jo=(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=
834
- 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]}`:"",p=o.includePrerelease&&a[6]?`+${a[6]}`:"";return e(`${c}.${l}.${u}${f}${p}`,o)},jo}var Lo,Qd;function e_(){if(Qd)return Lo;Qd=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)&&
835
- 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 Lo=t,Lo}var Do,Zd;function et(){if(Zd)return Do;Zd=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,
823
+ prerelease.length&&l.prerelease.length)return 1;if(!this.prerelease.length&&!l.prerelease.length)return 0;let c=0;do{const f=this.prerelease[c],p=l.prerelease[c];if(t("prerelease compare",c,f,p),f===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(f===void 0)return-1;if(f===p)continue;return o(f,p)}while(++c)}compareBuild(l){l instanceof a||(l=new a(l,this.options));let c=0;do{const f=this.build[c],p=l.build[c];if(t("build compare",c,f,p),f===void 0&&p===void 0)return 0;if(p===void 0)return 1;
824
+ if(f===void 0)return-1;if(f===p)continue;return o(f,p)}while(++c)}inc(l,c,f){if(l.startsWith("pre")){if(!c&&f===!1)throw new Error("invalid increment argument: identifier is empty");if(c){const p=`-${c}`.match(this.options.loose?n[s.PRERELEASELOOSE]:n[s.PRERELEASE]);if(!p||p[1]!==c)throw new Error(`invalid identifier: ${c}`)}}switch(l){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",c,f);break;case"preminor":this.prerelease.length=0,this.patch=0,this.
825
+ minor++,this.inc("pre",c,f);break;case"prepatch":this.prerelease.length=0,this.inc("patch",c,f),this.inc("pre",c,f);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",c,f),this.inc("pre",c,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.
826
+ 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 p=Number(f)?1:0;if(this.prerelease.length===0)this.prerelease=[p];else{let $=this.prerelease.length;for(;--$>=0;)typeof this.prerelease[$]=="number"&&(this.prerelease[$]++,$=-2);if($===-1){if(c===this.prerelease.join(".")&&f===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.
827
+ push(p)}}if(c){let $=[c,p];f===!1&&($=[c]),o(this.prerelease[0],c)===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 oo=a,oo}var ao,Ad;function ir(){if(Ad)return ao;Ad=1;const t=Le();return ao=(r,n,s=!1)=>{if(r instanceof t)return r;try{return new t(r,n)}catch(i){if(!s)return null;throw i}},ao}var co,Od;function H$(){
828
+ if(Od)return co;Od=1;const t=ir();return co=(r,n)=>{const s=t(r,n);return s?s.version:null},co}var uo,Cd;function F$(){if(Cd)return uo;Cd=1;const t=ir();return uo=(r,n)=>{const s=t(r.trim().replace(/^[=v]+/,""),n);return s?s.version:null},uo}var lo,Pd;function V$(){if(Pd)return lo;Pd=1;const t=Le();return lo=(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}},lo}var fo,Id;function z$(){if(Id)return fo;Id=1;const t=ir();
829
+ return fo=(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,u=a?s:i,l=a?i:s,c=!!u.prerelease.length;if(!!l.prerelease.length&&!c){if(!l.patch&&!l.minor)return"major";if(l.compareMain(u)===0)return l.minor&&!l.patch?"minor":"patch"}const p=c?"pre":"";return s.major!==i.major?p+"major":s.minor!==i.minor?p+"minor":s.patch!==i.patch?p+"patch":"prerelease"},fo}var ho,Nd;function G$(){if(Nd)return ho;Nd=1;const t=Le();return ho=(r,n)=>new t(r,n).major,ho}var po,
830
+ Td;function B$(){if(Td)return po;Td=1;const t=Le();return po=(r,n)=>new t(r,n).minor,po}var mo,jd;function W$(){if(jd)return mo;jd=1;const t=Le();return mo=(r,n)=>new t(r,n).patch,mo}var go,Ld;function K$(){if(Ld)return go;Ld=1;const t=ir();return go=(r,n)=>{const s=t(r,n);return s&&s.prerelease.length?s.prerelease:null},go}var yo,Dd;function Ze(){if(Dd)return yo;Dd=1;const t=Le();return yo=(r,n,s)=>new t(r,s).compare(new t(n,s)),yo}var $o,xd;function Y$(){if(xd)return $o;xd=1;const t=Ze();return $o=
831
+ (r,n,s)=>t(n,r,s),$o}var _o,kd;function X$(){if(kd)return _o;kd=1;const t=Ze();return _o=(r,n)=>t(r,n,!0),_o}var vo,Md;function bo(){if(Md)return vo;Md=1;const t=Le();return vo=(r,n,s)=>{const i=new t(r,s),o=new t(n,s);return i.compare(o)||i.compareBuild(o)},vo}var wo,qd;function J$(){if(qd)return wo;qd=1;const t=bo();return wo=(r,n)=>r.sort((s,i)=>t(s,i,n)),wo}var Eo,Ud;function Q$(){if(Ud)return Eo;Ud=1;const t=bo();return Eo=(r,n)=>r.sort((s,i)=>t(i,s,n)),Eo}var So,Hd;function $s(){if(Hd)return So;
832
+ Hd=1;const t=Ze();return So=(r,n,s)=>t(r,n,s)>0,So}var Ro,Fd;function Ao(){if(Fd)return Ro;Fd=1;const t=Ze();return Ro=(r,n,s)=>t(r,n,s)<0,Ro}var Oo,Vd;function zd(){if(Vd)return Oo;Vd=1;const t=Ze();return Oo=(r,n,s)=>t(r,n,s)===0,Oo}var Co,Gd;function Bd(){if(Gd)return Co;Gd=1;const t=Ze();return Co=(r,n,s)=>t(r,n,s)!==0,Co}var Po,Wd;function Io(){if(Wd)return Po;Wd=1;const t=Ze();return Po=(r,n,s)=>t(r,n,s)>=0,Po}var No,Kd;function To(){if(Kd)return No;Kd=1;const t=Ze();return No=(r,n,s)=>t(r,
833
+ n,s)<=0,No}var jo,Yd;function Xd(){if(Yd)return jo;Yd=1;const t=zd(),e=Bd(),r=$s(),n=Io(),s=Ao(),i=To();return jo=(a,u,l,c)=>{switch(u){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,c);case"!=":return e(a,l,c);case">":return r(a,l,c);case">=":return n(a,l,c);case"<":return s(a,l,c);case"<=":return i(a,l,c);default:throw new TypeError(
834
+ `Invalid operator: ${u}`)}},jo}var Lo,Jd;function Z$(){if(Jd)return Lo;Jd=1;const t=Le(),e=ir(),{safeRe:r,t:n}=Dr();return Lo=(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=
835
+ b),$.lastIndex=b.index+b[1].length+b[2].length;$.lastIndex=-1}if(a===null)return null;const u=a[2],l=a[3]||"0",c=a[4]||"0",f=o.includePrerelease&&a[5]?`-${a[5]}`:"",p=o.includePrerelease&&a[6]?`+${a[6]}`:"";return e(`${u}.${l}.${c}${f}${p}`,o)},Lo}var Do,Qd;function e_(){if(Qd)return Do;Qd=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)&&
836
+ 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 Do=t,Do}var xo,Zd;function et(){if(Zd)return xo;Zd=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,
836
837
  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.
837
- 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(
838
- 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],p),o("caret trim",U);let A=U.split(" ").map(R=>h(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,k=A.map(R=>new i(R,this.options));for(const R of k){if(y(R))return[R];V.set(R.value,R)}V.size>1&&V.has("")&&V.delete("");const E=[...V.
839
- values()];return n.set(G,E),E}intersects(U,Y){if(!(U instanceof e))throw new TypeError("a Range is required");return this.set.some(G=>g(G,Y)&&U.set.some(J=>g(J,Y)&&G.every(se=>J.every(H=>se.intersects(H,Y)))))}test(U){if(!U)return!1;if(typeof U=="string")try{U=new a(U,this.options)}catch{return!1}for(let Y=0;Y<this.set.length;Y++)if(j(this.set[Y],U,this.options))return!0;return!1}}Do=e;const r=e_(),n=new r,s=no(),i=_s(),o=ys(),a=Le(),{safeRe:c,t:l,comparatorTrimReplace:u,tildeTrimReplace:f,caretTrimReplace:p}=Dr(),
840
- {FLAG_INCLUDE_PRERELEASE:$,FLAG_LOOSE:b}=gs(),y=x=>x.value==="<0.0.0-0",d=x=>x.value==="",g=(x,U)=>{let Y=!0;const G=x.slice();let J=G.pop();for(;Y&&G.length;)Y=G.every(se=>J.intersects(se,U)),J=G.pop();return Y},h=(x,U)=>(o("comp",x,U),x=w(x,U),o("caret",x),x=_(x,U),o("tildes",x),x=I(x,U),o("xrange",x),x=B(x,U),o("stars",x),x),m=x=>!x||x.toLowerCase()==="x"||x==="*",_=(x,U)=>x.trim().split(/\s+/).map(Y=>v(Y,U)).join(" "),v=(x,U)=>{const Y=U.loose?c[l.TILDELOOSE]:c[l.TILDE];return x.replace(Y,(G,J,se,H,A)=>{
841
- o("tilde",x,G,J,se,H,A);let V;return m(J)?V="":m(se)?V=`>=${J}.0.0 <${+J+1}.0.0-0`:m(H)?V=`>=${J}.${se}.0 <${J}.${+se+1}.0-0`:A?(o("replaceTilde pr",A),V=`>=${J}.${se}.${H}-${A} <${J}.${+se+1}.0-0`):V=`>=${J}.${se}.${H} <${J}.${+se+1}.0-0`,o("tilde return",V),V})},w=(x,U)=>x.trim().split(/\s+/).map(Y=>S(Y,U)).join(" "),S=(x,U)=>{o("caret",x,U);const Y=U.loose?c[l.CARETLOOSE]:c[l.CARET],G=U.includePrerelease?"-0":"";return x.replace(Y,(J,se,H,A,V)=>{o("caret",x,J,se,H,A,V);let k;return m(se)?k="":
838
+ 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?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];U=U.replace(H,M(this.options.includePrerelease)),o("hyphen replace",U),U=U.replace(
839
+ u[l.COMPARATORTRIM],c),o("comparator trim",U),U=U.replace(u[l.TILDETRIM],f),o("tilde trim",U),U=U.replace(u[l.CARETTRIM],p),o("caret trim",U);let A=U.split(" ").map(R=>h(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(u[l.COMPARATORLOOSE])))),o("range list",A);const V=new Map,k=A.map(R=>new i(R,this.options));for(const R of k){if(y(R))return[R];V.set(R.value,R)}V.size>1&&V.has("")&&V.delete("");const E=[...V.
840
+ values()];return n.set(G,E),E}intersects(U,Y){if(!(U instanceof e))throw new TypeError("a Range is required");return this.set.some(G=>g(G,Y)&&U.set.some(J=>g(J,Y)&&G.every(se=>J.every(H=>se.intersects(H,Y)))))}test(U){if(!U)return!1;if(typeof U=="string")try{U=new a(U,this.options)}catch{return!1}for(let Y=0;Y<this.set.length;Y++)if(j(this.set[Y],U,this.options))return!0;return!1}}xo=e;const r=e_(),n=new r,s=so(),i=_s(),o=ys(),a=Le(),{safeRe:u,t:l,comparatorTrimReplace:c,tildeTrimReplace:f,caretTrimReplace:p}=Dr(),
841
+ {FLAG_INCLUDE_PRERELEASE:$,FLAG_LOOSE:b}=gs(),y=x=>x.value==="<0.0.0-0",d=x=>x.value==="",g=(x,U)=>{let Y=!0;const G=x.slice();let J=G.pop();for(;Y&&G.length;)Y=G.every(se=>J.intersects(se,U)),J=G.pop();return Y},h=(x,U)=>(o("comp",x,U),x=w(x,U),o("caret",x),x=_(x,U),o("tildes",x),x=I(x,U),o("xrange",x),x=B(x,U),o("stars",x),x),m=x=>!x||x.toLowerCase()==="x"||x==="*",_=(x,U)=>x.trim().split(/\s+/).map(Y=>v(Y,U)).join(" "),v=(x,U)=>{const Y=U.loose?u[l.TILDELOOSE]:u[l.TILDE];return x.replace(Y,(G,J,se,H,A)=>{
842
+ o("tilde",x,G,J,se,H,A);let V;return m(J)?V="":m(se)?V=`>=${J}.0.0 <${+J+1}.0.0-0`:m(H)?V=`>=${J}.${se}.0 <${J}.${+se+1}.0-0`:A?(o("replaceTilde pr",A),V=`>=${J}.${se}.${H}-${A} <${J}.${+se+1}.0-0`):V=`>=${J}.${se}.${H} <${J}.${+se+1}.0-0`,o("tilde return",V),V})},w=(x,U)=>x.trim().split(/\s+/).map(Y=>S(Y,U)).join(" "),S=(x,U)=>{o("caret",x,U);const Y=U.loose?u[l.CARETLOOSE]:u[l.CARET],G=U.includePrerelease?"-0":"";return x.replace(Y,(J,se,H,A,V)=>{o("caret",x,J,se,H,A,V);let k;return m(se)?k="":
842
843
  m(H)?k=`>=${se}.0.0${G} <${+se+1}.0.0-0`:m(A)?se==="0"?k=`>=${se}.${H}.0${G} <${se}.${+H+1}.0-0`:k=`>=${se}.${H}.0${G} <${+se+1}.0.0-0`:V?(o("replaceCaret pr",V),se==="0"?H==="0"?k=`>=${se}.${H}.${A}-${V} <${se}.${H}.${+A+1}-0`:k=`>=${se}.${H}.${A}-${V} <${se}.${+H+1}.0-0`:k=`>=${se}.${H}.${A}-${V} <${+se+1}.0.0-0`):(o("no pr"),se==="0"?H==="0"?k=`>=${se}.${H}.${A}${G} <${se}.${H}.${+A+1}-0`:k=`>=${se}.${H}.${A}${G} <${se}.${+H+1}.0-0`:k=`>=${se}.${H}.${A} <${+se+1}.0.0-0`),o("caret return",k),k})},
843
- I=(x,U)=>(o("replaceXRanges",x,U),x.split(/\s+/).map(Y=>F(Y,U)).join(" ")),F=(x,U)=>{x=x.trim();const Y=U.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return x.replace(Y,(G,J,se,H,A,V)=>{o("xRange",x,G,J,se,H,A,V);const k=m(se),E=k||m(H),R=E||m(A),C=R;return J==="="&&C&&(J=""),V=U.includePrerelease?"-0":"",k?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}.\
844
- 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=(x,U)=>(o("replaceStars",x,U),x.trim().replace(c[l.STAR],"")),D=(x,U)=>(o("replaceGTE0",x,U),x.trim().replace(c[U.includePrerelease?l.GTE0PRE:l.GTE0],"")),M=x=>(U,Y,G,J,se,H,A,V,k,E,R,C)=>(m(G)?Y="":m(J)?Y=`>=${G}.0.0${x?"-0":""}`:m(se)?Y=`>=${G}.${J}.0${x?"-0":""}`:H?Y=`>=${Y}`:Y=`>=${Y}${x?"-0":""}`,m(k)?V="":m(E)?V=`<${+k+1}.0.0-0`:m(R)?V=`<${k}.${+E+1}.0-0`:C?V=`<=${k}.${E}.${R}-${C}`:x?V=`<${k}\
845
- .${E}.${+R+1}-0`:V=`<=${V}`,`${Y} ${V}`.trim()),j=(x,U,Y)=>{for(let G=0;G<x.length;G++)if(!x[G].test(U))return!1;if(U.prerelease.length&&!Y.includePrerelease){for(let G=0;G<x.length;G++)if(o(x[G].semver),x[G].semver!==i.ANY&&x[G].semver.prerelease.length>0){const J=x[G].semver;if(J.major===U.major&&J.minor===U.minor&&J.patch===U.patch)return!0}return!1}return!0};return Do}var xo,eh;function _s(){if(eh)return xo;eh=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(u,f){
846
- 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],p=u.match(f);if(!p)throw new TypeError(`Invalid comparator: ${u}`);this.operator=p[1]!==void 0?p[1]:"",this.operator==="="&&(this.operator=""),p[2]?this.semver=new a(
847
- p[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):
848
- (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,
849
- f)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}xo=e;const r=no(),{safeRe:n,t:s}=Dr(),i=Xd(),o=ys(),a=Le(),c=et();return xo}var ko,th;function vs(){if(th)return ko;th=1;const t=et();return ko=(r,n,s)=>{try{n=new t(n,s)}catch{return!1}return n.test(r)},ko}var Mo,rh;function t_(){if(rh)return Mo;rh=1;const t=et();return Mo=(r,n)=>new t(r,n).set.map(s=>s.map(i=>i.value).join(" ").trim().split(" ")),Mo}var qo,nh;function r_(){if(nh)return qo;nh=1;const t=Le(),e=et();return qo=(n,s,i)=>{
850
- 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},qo}var Uo,sh;function n_(){if(sh)return Uo;sh=1;const t=Le(),e=et();return Uo=(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},Uo}var Ho,ih;function s_(){if(ih)return Ho;ih=1;const t=Le(),e=et(),r=$s();return Ho=(s,i)=>{s=new e(s,i);let o=new t("0.0.0");if(s.
851
- 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},Ho}var Fo,oh;function i_(){if(oh)return Fo;oh=1;const t=et();
852
- return Fo=(r,n)=>{try{return new t(r,n).range||"*"}catch{return null}},Fo}var Vo,ah;function zo(){if(ah)return Vo;ah=1;const t=Le(),e=_s(),{ANY:r}=e,n=et(),s=vs(),i=$s(),o=Ro(),a=No(),c=Po();return Vo=(u,f,p,$)=>{u=new t(u,$),f=new n(f,$);let b,y,d,g,h;switch(p){case">":b=i,y=a,d=o,g=">",h=">=";break;case"<":b=o,y=c,d=i,g="<",h="<=";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(_.
853
- 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===h||(!w.operator||w.operator===g)&&y(u,w.semver))return!1;if(w.operator===h&&d(u,w.semver))return!1}return!0},Vo}var Go,ch;function o_(){if(ch)return Go;ch=1;const t=zo();return Go=(r,n,s)=>t(r,n,">",s),Go}var Bo,uh;function a_(){if(uh)return Bo;uh=1;const t=zo();return Bo=(r,n,s)=>t(r,n,"<",s),Bo}var Wo,lh;function c_(){if(lh)return Wo;lh=1;const t=et();
854
- return Wo=(r,n,s)=>(r=new t(r,s),n=new t(n,s),r.intersects(n,s)),Wo}var Ko,fh;function u_(){if(fh)return Ko;fh=1;const t=vs(),e=Ze();return Ko=(r,n,s)=>{const i=[];let o=null,a=null;const c=r.sort((p,$)=>e(p,$,s));for(const p of c)t(p,n,s)?(a=p,o||(o=p)):(a&&i.push([o,a]),a=null,o=null);o&&i.push([o,null]);const l=[];for(const[p,$]of i)p===$?l.push(p):!$&&p===c[0]?l.push("*"):$?p===c[0]?l.push(`<=${$}`):l.push(`${p} - ${$}`):l.push(`>=${p}`);const u=l.join(" || "),f=typeof n.raw=="string"?n.raw:
855
- String(n);return u.length<f.length?u:n},Ko}var Yo,dh;function l_(){if(dh)return Yo;dh=1;const t=et(),e=_s(),{ANY:r}=e,n=vs(),s=Ze(),i=(f,p,$={})=>{if(f===p)return!0;f=new t(f,$),p=new t(p,$);let b=!1;e:for(const y of f.set){for(const d of p.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,p,$)=>{if(f===p)return!0;if(f.length===1&&f[0].semver===r){if(p.length===1&&p[0].semver===r)return!0;$.includePrerelease?f=o:f=a}if(p.
856
- length===1&&p[0].semver===r){if($.includePrerelease)return!0;p=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 p)if(!n(I,String(F),$))return!1;return!0}let h,m,
844
+ I=(x,U)=>(o("replaceXRanges",x,U),x.split(/\s+/).map(Y=>F(Y,U)).join(" ")),F=(x,U)=>{x=x.trim();const Y=U.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return x.replace(Y,(G,J,se,H,A,V)=>{o("xRange",x,G,J,se,H,A,V);const k=m(se),E=k||m(H),R=E||m(A),C=R;return J==="="&&C&&(J=""),V=U.includePrerelease?"-0":"",k?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}.\
845
+ 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=(x,U)=>(o("replaceStars",x,U),x.trim().replace(u[l.STAR],"")),D=(x,U)=>(o("replaceGTE0",x,U),x.trim().replace(u[U.includePrerelease?l.GTE0PRE:l.GTE0],"")),M=x=>(U,Y,G,J,se,H,A,V,k,E,R,C)=>(m(G)?Y="":m(J)?Y=`>=${G}.0.0${x?"-0":""}`:m(se)?Y=`>=${G}.${J}.0${x?"-0":""}`:H?Y=`>=${Y}`:Y=`>=${Y}${x?"-0":""}`,m(k)?V="":m(E)?V=`<${+k+1}.0.0-0`:m(R)?V=`<${k}.${+E+1}.0-0`:C?V=`<=${k}.${E}.${R}-${C}`:x?V=`<${k}\
846
+ .${E}.${+R+1}-0`:V=`<=${V}`,`${Y} ${V}`.trim()),j=(x,U,Y)=>{for(let G=0;G<x.length;G++)if(!x[G].test(U))return!1;if(U.prerelease.length&&!Y.includePrerelease){for(let G=0;G<x.length;G++)if(o(x[G].semver),x[G].semver!==i.ANY&&x[G].semver.prerelease.length>0){const J=x[G].semver;if(J.major===U.major&&J.minor===U.minor&&J.patch===U.patch)return!0}return!1}return!0};return xo}var ko,eh;function _s(){if(eh)return ko;eh=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(c,f){
847
+ if(f=r(f),c instanceof e){if(c.loose===!!f.loose)return c;c=c.value}c=c.trim().split(/\s+/).join(" "),o("comparator",c,f),this.options=f,this.loose=!!f.loose,this.parse(c),this.semver===t?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(c){const f=this.options.loose?n[s.COMPARATORLOOSE]:n[s.COMPARATOR],p=c.match(f);if(!p)throw new TypeError(`Invalid comparator: ${c}`);this.operator=p[1]!==void 0?p[1]:"",this.operator==="="&&(this.operator=""),p[2]?this.semver=new a(
848
+ p[2],this.options.loose):this.semver=t}toString(){return this.value}test(c){if(o("Comparator.test",c,this.options.loose),this.semver===t||c===t)return!0;if(typeof c=="string")try{c=new a(c,this.options)}catch{return!1}return i(c,this.operator,this.semver,this.options)}intersects(c,f){if(!(c instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new u(c.value,f).test(this.value):c.operator===""?c.value===""?!0:new u(this.value,f).test(c.semver):
849
+ (f=r(f),f.includePrerelease&&(this.value==="<0.0.0-0"||c.value==="<0.0.0-0")||!f.includePrerelease&&(this.value.startsWith("<0.0.0")||c.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&c.operator.startsWith(">")||this.operator.startsWith("<")&&c.operator.startsWith("<")||this.semver.version===c.semver.version&&this.operator.includes("=")&&c.operator.includes("=")||i(this.semver,"<",c.semver,f)&&this.operator.startsWith(">")&&c.operator.startsWith("<")||i(this.semver,">",c.semver,
850
+ f)&&this.operator.startsWith("<")&&c.operator.startsWith(">")))}}ko=e;const r=so(),{safeRe:n,t:s}=Dr(),i=Xd(),o=ys(),a=Le(),u=et();return ko}var Mo,th;function vs(){if(th)return Mo;th=1;const t=et();return Mo=(r,n,s)=>{try{n=new t(n,s)}catch{return!1}return n.test(r)},Mo}var qo,rh;function t_(){if(rh)return qo;rh=1;const t=et();return qo=(r,n)=>new t(r,n).set.map(s=>s.map(i=>i.value).join(" ").trim().split(" ")),qo}var Uo,nh;function r_(){if(nh)return Uo;nh=1;const t=Le(),e=et();return Uo=(n,s,i)=>{
851
+ let o=null,a=null,u=null;try{u=new e(s,i)}catch{return null}return n.forEach(l=>{u.test(l)&&(!o||a.compare(l)===-1)&&(o=l,a=new t(o,i))}),o},Uo}var Ho,sh;function n_(){if(sh)return Ho;sh=1;const t=Le(),e=et();return Ho=(n,s,i)=>{let o=null,a=null,u=null;try{u=new e(s,i)}catch{return null}return n.forEach(l=>{u.test(l)&&(!o||a.compare(l)===1)&&(o=l,a=new t(o,i))}),o},Ho}var Fo,ih;function s_(){if(ih)return Fo;ih=1;const t=Le(),e=et(),r=$s();return Fo=(s,i)=>{s=new e(s,i);let o=new t("0.0.0");if(s.
852
+ 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 u=s.set[a];let l=null;u.forEach(c=>{const f=new t(c.semver.version);switch(c.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: ${c.operator}`)}}),l&&(!o||r(o,l))&&(o=l)}return o&&s.test(o)?o:null},Fo}var Vo,oh;function i_(){if(oh)return Vo;oh=1;const t=et();
853
+ return Vo=(r,n)=>{try{return new t(r,n).range||"*"}catch{return null}},Vo}var zo,ah;function Go(){if(ah)return zo;ah=1;const t=Le(),e=_s(),{ANY:r}=e,n=et(),s=vs(),i=$s(),o=Ao(),a=To(),u=Io();return zo=(c,f,p,$)=>{c=new t(c,$),f=new n(f,$);let b,y,d,g,h;switch(p){case">":b=i,y=a,d=o,g=">",h=">=";break;case"<":b=o,y=u,d=i,g="<",h="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(c,f,$))return!1;for(let m=0;m<f.set.length;++m){const _=f.set[m];let v=null,w=null;if(_.
854
+ 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===h||(!w.operator||w.operator===g)&&y(c,w.semver))return!1;if(w.operator===h&&d(c,w.semver))return!1}return!0},zo}var Bo,ch;function o_(){if(ch)return Bo;ch=1;const t=Go();return Bo=(r,n,s)=>t(r,n,">",s),Bo}var Wo,uh;function a_(){if(uh)return Wo;uh=1;const t=Go();return Wo=(r,n,s)=>t(r,n,"<",s),Wo}var Ko,lh;function c_(){if(lh)return Ko;lh=1;const t=et();
855
+ return Ko=(r,n,s)=>(r=new t(r,s),n=new t(n,s),r.intersects(n,s)),Ko}var Yo,fh;function u_(){if(fh)return Yo;fh=1;const t=vs(),e=Ze();return Yo=(r,n,s)=>{const i=[];let o=null,a=null;const u=r.sort((p,$)=>e(p,$,s));for(const p of u)t(p,n,s)?(a=p,o||(o=p)):(a&&i.push([o,a]),a=null,o=null);o&&i.push([o,null]);const l=[];for(const[p,$]of i)p===$?l.push(p):!$&&p===u[0]?l.push("*"):$?p===u[0]?l.push(`<=${$}`):l.push(`${p} - ${$}`):l.push(`>=${p}`);const c=l.join(" || "),f=typeof n.raw=="string"?n.raw:
856
+ String(n);return c.length<f.length?c:n},Yo}var Xo,dh;function l_(){if(dh)return Xo;dh=1;const t=et(),e=_s(),{ANY:r}=e,n=vs(),s=Ze(),i=(f,p,$={})=>{if(f===p)return!0;f=new t(f,$),p=new t(p,$);let b=!1;e:for(const y of f.set){for(const d of p.set){const g=u(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")],u=(f,p,$)=>{if(f===p)return!0;if(f.length===1&&f[0].semver===r){if(p.length===1&&p[0].semver===r)return!0;$.includePrerelease?f=o:f=a}if(p.
857
+ length===1&&p[0].semver===r){if($.includePrerelease)return!0;p=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=c(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 p)if(!n(I,String(F),$))return!1;return!0}let h,m,
857
858
  _,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 p){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(h=l(
858
- y,I,$),h===I&&h!==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,p,$)=>{if(!f)return p;const b=s(f.semver,
859
- p.semver,$);return b>0?f:b<0||p.operator===">"&&f.operator===">="?p:f},u=(f,p,$)=>{if(!f)return p;const b=s(f.semver,p.semver,$);return b<0?f:b>0||p.operator==="<"&&f.operator==="<="?p:f};return Yo=i,Yo}var Xo,hh;function f_(){if(hh)return Xo;hh=1;const t=Dr(),e=gs(),r=Le(),n=Sd(),s=ir(),i=H$(),o=F$(),a=V$(),c=z$(),l=G$(),u=B$(),f=W$(),p=K$(),$=Ze(),b=Y$(),y=X$(),d=vo(),g=J$(),h=Q$(),m=$s(),_=Ro(),v=zd(),w=Bd(),S=Po(),I=No(),F=Xd(),B=Z$(),D=_s(),M=et(),j=vs(),x=t_(),U=r_(),Y=n_(),G=s_(),J=i_(),se=zo(),
860
- H=o_(),A=a_(),V=c_(),k=u_(),E=l_();return Xo={parse:s,valid:i,clean:o,inc:a,diff:c,major:l,minor:u,patch:f,prerelease:p,compare:$,rcompare:b,compareLoose:y,compareBuild:d,sort:g,rsort:h,gt:m,lt:_,eq:v,neq:w,gte:S,lte:I,cmp:F,coerce:B,Comparator:D,Range:M,satisfies:j,toComparators:x,maxSatisfying:U,minSatisfying:Y,minVersion:G,validRange:J,outside:se,gtr:H,ltr:A,intersects:V,simplifyRange:k,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,
861
- compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},Xo}var Jo=f_();const or=qr(Jo),d_=Object.prototype.toString,h_="[object Uint8Array]",p_="[object ArrayBuffer]";function ph(t,e,r){return t?t.constructor===e?!0:d_.call(t)===r:!1}function mh(t){return ph(t,Uint8Array,h_)}function m_(t){return ph(t,ArrayBuffer,p_)}function g_(t){return mh(t)||m_(t)}function y_(t){if(!mh(t))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof t}\``)}function $_(t){if(!g_(t))throw new TypeError(
859
+ y,I,$),h===I&&h!==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=c(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,p,$)=>{if(!f)return p;const b=s(f.semver,
860
+ p.semver,$);return b>0?f:b<0||p.operator===">"&&f.operator===">="?p:f},c=(f,p,$)=>{if(!f)return p;const b=s(f.semver,p.semver,$);return b<0?f:b>0||p.operator==="<"&&f.operator==="<="?p:f};return Xo=i,Xo}var Jo,hh;function f_(){if(hh)return Jo;hh=1;const t=Dr(),e=gs(),r=Le(),n=Sd(),s=ir(),i=H$(),o=F$(),a=V$(),u=z$(),l=G$(),c=B$(),f=W$(),p=K$(),$=Ze(),b=Y$(),y=X$(),d=bo(),g=J$(),h=Q$(),m=$s(),_=Ao(),v=zd(),w=Bd(),S=Io(),I=To(),F=Xd(),B=Z$(),D=_s(),M=et(),j=vs(),x=t_(),U=r_(),Y=n_(),G=s_(),J=i_(),se=Go(),
861
+ H=o_(),A=a_(),V=c_(),k=u_(),E=l_();return Jo={parse:s,valid:i,clean:o,inc:a,diff:u,major:l,minor:c,patch:f,prerelease:p,compare:$,rcompare:b,compareLoose:y,compareBuild:d,sort:g,rsort:h,gt:m,lt:_,eq:v,neq:w,gte:S,lte:I,cmp:F,coerce:B,Comparator:D,Range:M,satisfies:j,toComparators:x,maxSatisfying:U,minSatisfying:Y,minVersion:G,validRange:J,outside:se,gtr:H,ltr:A,intersects:V,simplifyRange:k,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,
862
+ compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},Jo}var Qo=f_();const or=qr(Qo),d_=Object.prototype.toString,h_="[object Uint8Array]",p_="[object ArrayBuffer]";function ph(t,e,r){return t?t.constructor===e?!0:d_.call(t)===r:!1}function mh(t){return ph(t,Uint8Array,h_)}function m_(t){return ph(t,ArrayBuffer,p_)}function g_(t){return mh(t)||m_(t)}function y_(t){if(!mh(t))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof t}\``)}function $_(t){if(!g_(t))throw new TypeError(
862
863
  `Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``)}function gh(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)y_(s),r.set(s,n),n+=s.length;return r}const yh={utf8:new globalThis.TextDecoder("utf8")};function $h(t,e="utf8"){return $_(t),yh[e]??=new globalThis.TextDecoder(e),yh[e].decode(t)}function __(t){if(typeof t!="string")throw new TypeError(`Expected \`string\`, got \`${typeof t}\``)}const v_=new globalThis.
863
- TextEncoder;function Qo(t){return __(t),v_.encode(t)}Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));const b_=T$.default,_h="aes-256-cbc",ar=()=>Object.create(null),w_=t=>t!=null,E_=(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`)},bs="__internal__",Zo=`${bs}.migrations.version`;class S_{path;events;#n;#t;#e;#r={};constructor(e={}){
864
+ TextEncoder;function Zo(t){return __(t),v_.encode(t)}Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));const b_=T$.default,_h="aes-256-cbc",ar=()=>Object.create(null),w_=t=>t!=null,E_=(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`)},bs="__internal__",ea=`${bs}.migrations.version`;class S_{path;events;#n;#t;#e;#r={};constructor(e={}){
864
865
  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=kg(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 w$.Ajv2020({allErrors:!0,useDefaults:!0,
865
- ...r.ajvOptions});b_(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.
866
- store,i=Object.assign(ar(),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 \
867
- 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 ${bs} key, as it's used to manage this module internal operations.`);const{store:n}=this,s=(i,o)=>{E_(i,o),this.#e.accessPropertiesByDotNotation?Zc(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?
866
+ ...r.ajvOptions});b_(o);const a={...r.rootSchema,type:"object",properties:r.schema};this.#n=o.compile(a);for(const[u,l]of Object.entries(r.schema??{}))l?.default&&(this.#r[u]=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=pe.resolve(r.cwd,`${r.configName??"config"}${n}`);const s=this.
867
+ store,i=Object.assign(ar(),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{wp.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 \
868
+ 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 ${bs} key, as it's used to manage this module internal operations.`);const{store:n}=this,s=(i,o)=>{E_(i,o),this.#e.accessPropertiesByDotNotation?tu(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?
868
869
  jg(this.store,e):e in this.store}reset(...e){for(const r of e)w_(this.#r[r])&&this.set(r,this.#r[r])}delete(e){const{store:r}=this;this.#e.accessPropertiesByDotNotation?Tg(r,e):delete r[e],this.store=r}clear(){this.store=ar();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}`);
869
- 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=pe.readFileSync(this.path,this.#t?null:"utf8"),r=this._encryptData(e),n=this._deserialize(r);return this._validate(n),Object.assign(ar(),n)}catch(e){if(e?.code==="ENOENT")return this._ensureDirectory(),ar();
870
- if(this.#e.clearInvalidConfig&&e.name==="SyntaxError")return ar();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:$h(e);try{const r=e.slice(0,16),n=pr.pbkdf2Sync(this.#t,r.toString(),1e4,32,"sha512"),s=pr.createDecipheriv(_h,n,r),i=e.slice(17),o=typeof i=="string"?Qo(i):i;return $h(gh([s.update(
871
- 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(
872
- "; "))}_ensureDirectory(){pe.mkdirSync(me.dirname(this.path),{recursive:!0})}_write(e){let r=this._serialize(e);if(this.#t){const n=pr.randomBytes(16),s=pr.pbkdf2Sync(this.#t,n.toString(),1e4,32,"sha512"),i=pr.createCipheriv(_h,s,n);r=gh([n,Qo(":"),i.update(Qo(r)),i.final()])}if(Se.env.SNAP)pe.writeFileSync(this.path,r,{mode:this.#e.configFileMode});else try{su(this.path,r,{mode:this.#e.configFileMode})}catch(n){if(n?.code==="EXDEV"){pe.writeFileSync(this.path,r,{mode:this.#e.configFileMode});return}
873
- throw n}}_watch(){this._ensureDirectory(),pe.existsSync(this.path)||this._write(ar()),Se.platform==="win32"?pe.watch(this.path,{persistent:!1},$d(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100})):pe.watchFile(this.path,{persistent:!1},$d(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5e3}))}_migrate(e,r,n){let s=this._get(Zo,"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,
874
- toVersion:a,finalVersion:r,versions:i});const c=e[a];c?.(this),this._set(Zo,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)||!or.eq(s,r))&&this._set(Zo,r)}_containsReservedKey(e){return typeof e=="object"&&Object.keys(e)[0]===bs?!0:typeof e!="string"?!1:this.#e.accessPropertiesByDotNotation?!!e.startsWith(`${bs}.`):!1}_isVersionInRangeFormat(e){
875
- return or.clean(e)===null}_shouldPerformMigration(e,r,n){return this._isVersionInRangeFormat(e)?r!=="0.0.0"&&or.satisfies(r,e)?!1:or.satisfies(n,e):!(or.lte(e,r)||or.gt(e,n))}_get(e,r){return Ng(this.store,e,r)}_set(e,r){const{store:n}=this;Zc(n,e,r),this.store=n}}class vh 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}\
870
+ 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=me.readFileSync(this.path,this.#t?null:"utf8"),r=this._encryptData(e),n=this._deserialize(r);return this._validate(n),Object.assign(ar(),n)}catch(e){if(e?.code==="ENOENT")return this._ensureDirectory(),ar();
871
+ if(this.#e.clearInvalidConfig&&e.name==="SyntaxError")return ar();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:$h(e);try{const r=e.slice(0,16),n=pr.pbkdf2Sync(this.#t,r.toString(),1e4,32,"sha512"),s=pr.createDecipheriv(_h,n,r),i=e.slice(17),o=typeof i=="string"?Zo(i):i;return $h(gh([s.update(
872
+ o),s.final()]))}catch{}return e.toString()}_handleChange(e,r){let n=e();const s=()=>{const i=n,o=e();bp(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(
873
+ "; "))}_ensureDirectory(){me.mkdirSync(pe.dirname(this.path),{recursive:!0})}_write(e){let r=this._serialize(e);if(this.#t){const n=pr.randomBytes(16),s=pr.pbkdf2Sync(this.#t,n.toString(),1e4,32,"sha512"),i=pr.createCipheriv(_h,s,n);r=gh([n,Zo(":"),i.update(Zo(r)),i.final()])}if(Se.env.SNAP)me.writeFileSync(this.path,r,{mode:this.#e.configFileMode});else try{ou(this.path,r,{mode:this.#e.configFileMode})}catch(n){if(n?.code==="EXDEV"){me.writeFileSync(this.path,r,{mode:this.#e.configFileMode});return}
874
+ throw n}}_watch(){this._ensureDirectory(),me.existsSync(this.path)||this._write(ar()),Se.platform==="win32"?me.watch(this.path,{persistent:!1},$d(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100})):me.watchFile(this.path,{persistent:!1},$d(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5e3}))}_migrate(e,r,n){let s=this._get(ea,"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,
875
+ toVersion:a,finalVersion:r,versions:i});const u=e[a];u?.(this),this._set(ea,a),s=a,o={...this.store}}catch(u){throw this.store=o,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${u}`)}(this._isVersionInRangeFormat(s)||!or.eq(s,r))&&this._set(ea,r)}_containsReservedKey(e){return typeof e=="object"&&Object.keys(e)[0]===bs?!0:typeof e!="string"?!1:this.#e.accessPropertiesByDotNotation?!!e.startsWith(`${bs}.`):!1}_isVersionInRangeFormat(e){
876
+ return or.clean(e)===null}_shouldPerformMigration(e,r,n){return this._isVersionInRangeFormat(e)?r!=="0.0.0"&&or.satisfies(r,e)?!1:or.satisfies(n,e):!(or.lte(e,r)||or.gt(e,n))}_get(e,r){return Ng(this.store,e,r)}_set(e,r){const{store:n}=this;tu(n,e,r),this.store=n}}class vh 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}\
876
877
  ${r.url}`),this.name="HTTPError",this.response=e,this.request=r,this.options=n}}class bh extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}}const wh=(()=>{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\
877
- ntent-Type")}catch(s){if(s instanceof Error&&s.message==="unsupported BodyInit type")return!1;throw s}return t&&!e})(),R_=typeof globalThis.AbortController=="function",A_=typeof globalThis.ReadableStream=="function",O_=typeof globalThis.FormData=="function",Eh=["get","post","put","patch","head","delete"],C_={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},ea=2147483647,P_=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,
878
+ ntent-Type")}catch(s){if(s instanceof Error&&s.message==="unsupported BodyInit type")return!1;throw s}return t&&!e})(),R_=typeof globalThis.AbortController=="function",A_=typeof globalThis.ReadableStream=="function",O_=typeof globalThis.FormData=="function",Eh=["get","post","put","patch","head","delete"],C_={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},ta=2147483647,P_=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,
878
879
  Sh=Symbol("stop"),I_={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},T_=t=>{if(!t)return 0;if(t instanceof FormData){let e=0;for(const[r,n]of t)e+=P_,e+=new TextEncoder().encode(`Content-Dis\
879
880
  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}
880
- return 0},j_=(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===
881
- 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})},L_=(t,e)=>{const r=T_(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),
882
- 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()}})})},xr=t=>t!==null&&typeof t=="object",ws=(...t)=>{for(const e of t)if((!xr(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return ta({},...t)},Rh=(t={},e={})=>{const r=new globalThis.Headers(t),n=e instanceof globalThis.Headers,s=new globalThis.Headers(e);for(const[i,o]of s.
883
- entries())n&&o==="undefined"||o===void 0?r.delete(i):r.set(i,o);return r};function Es(t,e,r){return Object.hasOwn(e,r)&&e[r]===void 0?[]:ta(t[r]??[],e[r]??[])}const Ah=(t={},e={})=>({beforeRequest:Es(t,e,"beforeRequest"),beforeRetry:Es(t,e,"beforeRetry"),afterResponse:Es(t,e,"afterResponse"),beforeError:Es(t,e,"beforeError")}),ta=(...t)=>{let e={},r={},n={};for(const s of t)if(Array.isArray(s))Array.isArray(e)||(e=[]),e=[...e,...s];else if(xr(s)){for(let[i,o]of Object.entries(s))xr(o)&&i in e&&(o=
884
- ta(e[i],o)),e={...e,[i]:o};xr(s.hooks)&&(n=Ah(n,s.hooks),e.hooks=n),xr(s.headers)&&(r=Rh(r,s.headers),e.headers=r)}return e},D_=t=>Eh.includes(t)?t.toUpperCase():t,x_=["get","put","head","delete","options","trace"],k_=[408,413,429,500,502,503,504],M_=[413,429,503],Oh={limit:2,methods:x_,statusCodes:k_,afterStatusCodes:M_,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},q_=(t={})=>{if(typeof t=="number")return{...Oh,limit:t};if(t.methods&&!Array.
881
+ return 0},j_=(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:u}=await i.read();if(a){s.close();return}if(e){n+=u.byteLength;const l=r===
882
+ 0?0:n/r;e({percent:l,transferredBytes:n,totalBytes:r},u)}s.enqueue(u),await o()}await o()}}),{status:t.status,statusText:t.statusText,headers:t.headers})},L_=(t,e)=>{const r=T_(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:u}=await i.read();if(a){e&&e({percent:1,transferredBytes:n,totalBytes:Math.max(r,n)},new Uint8Array),
883
+ s.close();return}n+=u.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},u),s.enqueue(u),await o()}await o()}})})},xr=t=>t!==null&&typeof t=="object",ws=(...t)=>{for(const e of t)if((!xr(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return ra({},...t)},Rh=(t={},e={})=>{const r=new globalThis.Headers(t),n=e instanceof globalThis.Headers,s=new globalThis.Headers(e);for(const[i,o]of s.
884
+ entries())n&&o==="undefined"||o===void 0?r.delete(i):r.set(i,o);return r};function Es(t,e,r){return Object.hasOwn(e,r)&&e[r]===void 0?[]:ra(t[r]??[],e[r]??[])}const Ah=(t={},e={})=>({beforeRequest:Es(t,e,"beforeRequest"),beforeRetry:Es(t,e,"beforeRetry"),afterResponse:Es(t,e,"afterResponse"),beforeError:Es(t,e,"beforeError")}),ra=(...t)=>{let e={},r={},n={};for(const s of t)if(Array.isArray(s))Array.isArray(e)||(e=[]),e=[...e,...s];else if(xr(s)){for(let[i,o]of Object.entries(s))xr(o)&&i in e&&(o=
885
+ ra(e[i],o)),e={...e,[i]:o};xr(s.hooks)&&(n=Ah(n,s.hooks),e.hooks=n),xr(s.headers)&&(r=Rh(r,s.headers),e.headers=r)}return e},D_=t=>Eh.includes(t)?t.toUpperCase():t,x_=["get","put","head","delete","options","trace"],k_=[408,413,429,500,502,503,504],M_=[413,429,503],Oh={limit:2,methods:x_,statusCodes:k_,afterStatusCodes:M_,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},q_=(t={})=>{if(typeof t=="number")return{...Oh,limit:t};if(t.methods&&!Array.
885
886
  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{...Oh,...t}};async function U_(t,e,r,n){return new Promise((s,i)=>{const o=setTimeout(()=>{r&&r.abort(),i(new bh(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(){
886
- clearTimeout(i),n(e.reason)}const i=setTimeout(()=>{e?.removeEventListener("abort",s),r()},t)})}const F_=(t,e)=>{const r={};for(const n in e)!(n in N_)&&!(n in I_)&&!(n in t)&&(r[n]=e[n]);return r};class Rs{static create(e,r){const n=new Rs(e,r),s=async()=>{if(typeof n._options.timeout=="number"&&n._options.timeout>ea)throw new RangeError(`The \`timeout\` option cannot be greater than ${ea}`);await Promise.resolve();let a=await n._fetch();for(const c of n._options.hooks.afterResponse){const l=await c(
887
- 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 vh(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(!A_)throw new Error("Streams are not supported in your environment. `ReadableStre\
888
- am` is missing.");return j_(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(C_))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.
887
+ clearTimeout(i),n(e.reason)}const i=setTimeout(()=>{e?.removeEventListener("abort",s),r()},t)})}const F_=(t,e)=>{const r={};for(const n in e)!(n in N_)&&!(n in I_)&&!(n in t)&&(r[n]=e[n]);return r};class Rs{static create(e,r){const n=new Rs(e,r),s=async()=>{if(typeof n._options.timeout=="number"&&n._options.timeout>ta)throw new RangeError(`The \`timeout\` option cannot be greater than ${ta}`);await Promise.resolve();let a=await n._fetch();for(const u of n._options.hooks.afterResponse){const l=await u(
888
+ n.request,n._options,n._decorateResponse(a.clone()));l instanceof globalThis.Response&&(a=l)}if(n._decorateResponse(a),!a.ok&&n._options.throwHttpErrors){let u=new vh(a,n.request,n._options);for(const l of n._options.hooks.beforeError)u=await l(u);throw u}if(n._options.onDownloadProgress){if(typeof n._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!A_)throw new Error("Streams are not supported in your environment. `ReadableStre\
889
+ am` is missing.");return j_(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,u]of Object.entries(C_))o[a]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||u);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.
889
890
  text())}return l[a]()};return o}request;abortController;_retryCount=0;_input;_options;constructor(e,r={}){if(this._input=e,this._options={...r,headers:Rh(this._input.headers,r.headers),hooks:Ah({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:D_(r.method??this._input.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:q_(r.retry),throwHttpErrors:r.throwHttpErrors!==!1,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!=
890
891
  "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(R_){const n=this._options.signal??this._input.signal;this.abortController=
891
892
  new globalThis.AbortController,this._options.signal=n?AbortSignal.any([n,this.abortController.signal]):this.abortController.signal}if(wh&&(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="\
892
893
  ?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),i=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,s);(O_&&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.
893
894
  _options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!wh)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=L_(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof bh)throw e;
894
895
  if(e instanceof vh){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<
895
- 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),ea);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,
896
- options:this._options,error:r,retryCount:this._retryCount})===Sh)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=F_(this.request,this._options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,e):U_(r,e,this.abortController,this._options)}}const ra=t=>{const e=(r,n)=>Rs.create(
897
- r,ws(t,n));for(const r of Eh)e[r]=(n,s)=>Rs.create(n,ws(t,s,{method:r}));return e.create=r=>ra(ws(r)),e.extend=r=>(typeof r=="function"&&(r=r(t??{})),ra(ws(t,r))),e.stop=Sh,e},V_=ra(),Ss=Object.create(null),kr=t=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?Ss:globalThis),Rt=new Proxy(Ss,{get(t,e){return kr()[e]??Ss[e]},has(t,e){const r=kr();return e in r||e in Ss},set(t,e,r){const n=kr(!0);return n[e]=r,!0},deleteProperty(t,e){if(!e)return!1;
896
+ 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),ta);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,
897
+ options:this._options,error:r,retryCount:this._retryCount})===Sh)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=F_(this.request,this._options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,e):U_(r,e,this.abortController,this._options)}}const na=t=>{const e=(r,n)=>Rs.create(
898
+ r,ws(t,n));for(const r of Eh)e[r]=(n,s)=>Rs.create(n,ws(t,s,{method:r}));return e.create=r=>na(ws(r)),e.extend=r=>(typeof r=="function"&&(r=r(t??{})),na(ws(t,r))),e.stop=Sh,e},V_=na(),Ss=Object.create(null),kr=t=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?Ss:globalThis),Rt=new Proxy(Ss,{get(t,e){return kr()[e]??Ss[e]},has(t,e){const r=kr();return e in r||e in Ss},set(t,e,r){const n=kr(!0);return n[e]=r,!0},deleteProperty(t,e){if(!e)return!1;
898
899
  const r=kr(!0);return delete r[e],!0},ownKeys(){const t=kr(!0);return Object.keys(t)}}),Ch=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",z_=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],[
899
900
  "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"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],
900
901
  ["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"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT\
901
902
  _ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function G_(){if(globalThis.process?.env)for(const t of z_){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",ci:!1}:{name:"",ci:!1}}const Ph=G_();Ph.name;function zt(t){return t?t!=="false":!1}const B_=globalThis.process?.platform||"",Ih=zt(Rt.CI)||Ph.ci!==!1,Nh=zt(globalThis.process?.
902
903
  stdout&&globalThis.process?.stdout.isTTY);zt(Rt.DEBUG);const W_=Ch==="test"||zt(Rt.TEST),K_=zt(Rt.MINIMAL)||Ih||W_||!Nh,Y_=/^win/i.test(B_);!zt(Rt.NO_COLOR)&&(zt(Rt.FORCE_COLOR)||(Nh||Y_)&&Rt.TERM);const X_=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(X_?.split(".")[0]);const J_=globalThis.process||Object.create(null),Th={versions:{}};new Proxy(J_,{get(t,e){if(e==="env")return Rt;if(e in t)return t[e];if(e in Th)return Th[e]}});const Q_=globalThis.process?.release?.name===
903
- "node",Z_=!!globalThis.Bun||!!globalThis.process?.versions?.bun,e0=!!globalThis.Deno,t0=!!globalThis.fastly,r0=!!globalThis.Netlify,n0=!!globalThis.EdgeRuntime,s0=globalThis.navigator?.userAgent==="Cloudflare-Workers",i0=[[r0,"netlify"],[n0,"edge-light"],[s0,"workerd"],[t0,"fastly"],[e0,"deno"],[Z_,"bun"],[Q_,"node"]];function o0(){const t=i0.find(e=>e[0]);if(t)return{name:t[1]}}const a0=o0();a0?.name;const na=new S_({projectName:Gh,serialize:t=>Gt.stringify(t,null,2),deserialize:t=>Gt.parse(t)}),
904
- c0=1e3*60*60*24,jh="check-update";function u0(){if(K_||Ch===jh)return;const t=na.get("lastUpdateCheck"),e=na.get("latestVersion");if(Bh(e)||Wh(t)||t+c0<Date.now())try{ca("likec4",["check-update"],{stdio:"ignore",preferLocal:!0,detached:!0,env:{NODE_ENV:jh}}).catch(()=>{})}catch{}e&&Jo.gt(e,Bt)&&At(["Update available: ",K.dim(Bt),K.reset(" \u2192 "),K.green(e)].join(""))}async function l0(){try{const t=await f0();Vr(t,"No version found in latest npm"),na.set({lastUpdateCheck:Date.now(),latestVersion:t}),
905
- Jo.gt(t,Bt)?At(["Update available: ",K.dim(Bt),K.reset(" \u2192 "),K.green(t)].join("")):At(K.dim("Up to date: ")+" "+K.green(Bt))}catch(t){ct.error(As(t))}}async function f0(){return(await V_("https://registry.npmjs.org/likec4/latest",{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},keepalive:!0}).json()).version}async function d0(t,e,r){const n=".ts";e=e??ye(t.workspace,"likec4.generated"+n),fr(e)!==n&&(e=e+n),await ut(Ot(e),{recursive:!0});const s=await t.
906
- diagrams(),i=ng([...s]);await Pt(e,i),r.info(`${K.dim("generated")} ${gt(process.cwd(),e)}`)}async function h0(t,e,r){await ut(e,{recursive:!0}),r.info(`${K.dim("format")} ${K.green("dot")}`),r.info(`${K.dim("outdir")} ${e}`);const n=new Set,s=t.computedModel(),i=oa(s.$data.views);let o=0;for(const a of i)try{const c=await t.viewsService.layouter.dot({view:a,specification:s.specification}),l=a.relativePath??"";l!==""&&!n.has(l)&&(await ut(ye(e,l),{recursive:!0}),n.add(l));const u=ye(e,l,a.id+".d\
907
- ot");await Pt(u,c),r.info(`${K.dim("generated")} ${gt(process.cwd(),u)}`),o++}catch(c){ct.error(`error while generating ${a.id}`,{error:c})}o>0&&r.info(`${K.dim("total")} ${o} files`)}async function p0(t,e,r,n){await ut(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:Ea(e)}const o=new Set,a=await t.layoutedModel();let c=0;for(const l of a.
908
- views()){const u=l.$view;try{let f=u.relativePath??".";f.includes("/")?f=f.slice(0,f.lastIndexOf("/")):f=".",f!==""&&!o.has(f)&&(await ut(ye(r,f),{recursive:!0}),o.add(f));const p=ye(r,f,u.id+s),$=i(l);await Pt(p,$),n.info(`${K.dim("generated")} ${gt(process.cwd(),p)}`),c++}catch(f){n.error(`error while generating ${u.id}`,{error:f})}}c>0&&n.info(`${K.dim("total")} ${c} files`)}async function Mr({path:t,useDotBin:e,...r}){const n=tt("c4:codegen"),s=ur(n),i=await rt.fromWorkspace(t,{logger:"vite",
909
- graphviz:e?"binary":"wasm"});if(i.ensureSingleProject(),(await i.viewsService.computedViews()).length===0)throw n.warn("no views found"),process.exitCode=1,new Error("no views found");switch(r.format){case"views":{await d0(i,r.outfile,n);break}case"dot":{await h0(i,r.outdir??t,n);break}case"d2":case"mermaid":case"plantuml":{await p0(i,r.format,r.outdir??t,n);break}default:Ea(r)}s.stopAndLog()}async function m0({path:t,useDotBin:e,outfile:r}){const n=tt("c4:codegen"),s=ur(n),i=await rt.fromWorkspace(
910
- t,{logger:"vite",graphviz:e?"binary":"wasm"});i.ensureSingleProject(),n.info(`${K.dim("format")} ${K.green("model")}`);const o=await i.layoutedModel();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=ye(i.workspace,"likec4-model.ts");if(r&&(a=Ts(r)?r:ye(r),Ct(r)&&(await Ls(r)).isDirectory()))throw new Error(`output file is a directory: ${r}`);const c=Ur(a);n.info(`${K.dim("filename")} ${c}`);const l=fr(
911
- c).toLocaleLowerCase();if(![".ts",".mts",".cts"].includes(l))throw n.error(`output file ${r} has extension "${l}"`),new Error(`output file ${r} must be a .ts, .mts or .cts file`);const u=Ot(a);n.info(`${K.dim("outdir")} ${u}`),await ut(u,{recursive:!0}),await Pt(a,tg(o),{encoding:"utf-8"}),At(Os(`
904
+ "node",Z_=!!globalThis.Bun||!!globalThis.process?.versions?.bun,e0=!!globalThis.Deno,t0=!!globalThis.fastly,r0=!!globalThis.Netlify,n0=!!globalThis.EdgeRuntime,s0=globalThis.navigator?.userAgent==="Cloudflare-Workers",i0=[[r0,"netlify"],[n0,"edge-light"],[s0,"workerd"],[t0,"fastly"],[e0,"deno"],[Z_,"bun"],[Q_,"node"]];function o0(){const t=i0.find(e=>e[0]);if(t)return{name:t[1]}}const a0=o0();a0?.name;const sa=new S_({projectName:zh,serialize:t=>Gt.stringify(t,null,2),deserialize:t=>Gt.parse(t)}),
905
+ c0=1e3*60*60*24,jh="check-update";function u0(){if(K_||Ch===jh)return;const t=sa.get("lastUpdateCheck"),e=sa.get("latestVersion");if(Gh(e)||Bh(t)||t+c0<Date.now())try{ua("likec4",["check-update"],{stdio:"ignore",preferLocal:!0,detached:!0,env:{NODE_ENV:jh}}).catch(()=>{})}catch{}e&&Qo.gt(e,Bt)&&At(["Update available: ",K.dim(Bt),K.reset(" \u2192 "),K.green(e)].join(""))}async function l0(){try{const t=await f0();Vr(t,"No version found in latest npm"),sa.set({lastUpdateCheck:Date.now(),latestVersion:t}),
906
+ Qo.gt(t,Bt)?At(["Update available: ",K.dim(Bt),K.reset(" \u2192 "),K.green(t)].join("")):At(K.dim("Up to date: ")+" "+K.green(Bt))}catch(t){ct.error(As(t))}}async function f0(){return(await V_("https://registry.npmjs.org/likec4/latest",{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},keepalive:!0}).json()).version}async function d0(t,e,r){const n=".ts";e=e??ye(t.workspace,"likec4.generated"+n),fr(e)!==n&&(e=e+n),await ut(Ot(e),{recursive:!0});const s=await t.
907
+ diagrams(),i=ng([...s]);await Pt(e,i),r.info(`${K.dim("generated")} ${gt(process.cwd(),e)}`)}async function h0(t,e,r){await ut(e,{recursive:!0}),r.info(`${K.dim("format")} ${K.green("dot")}`),r.info(`${K.dim("outdir")} ${e}`);const n=new Set,s=t.computedModel(),i=aa(s.$data.views);let o=0;for(const a of i)try{const u=await t.viewsService.layouter.dot({view:a,specification:s.specification}),l=a.relativePath??"";l!==""&&!n.has(l)&&(await ut(ye(e,l),{recursive:!0}),n.add(l));const c=ye(e,l,a.id+".d\
908
+ ot");await Pt(c,u),r.info(`${K.dim("generated")} ${gt(process.cwd(),c)}`),o++}catch(u){ct.error(`error while generating ${a.id}`,{error:u})}o>0&&r.info(`${K.dim("total")} ${o} files`)}async function p0(t,e,r,n){await ut(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=hp;break;case"mermaid":s=".mmd",i=dp;break;case"plantuml":s=".puml",i=fp;break;default:Sa(e)}const o=new Set,a=await t.layoutedModel();let u=0;for(const l of a.
909
+ views()){const c=l.$view;try{let f=c.relativePath??".";f.includes("/")?f=f.slice(0,f.lastIndexOf("/")):f=".",f!==""&&!o.has(f)&&(await ut(ye(r,f),{recursive:!0}),o.add(f));const p=ye(r,f,c.id+s),$=i(l);await Pt(p,$),n.info(`${K.dim("generated")} ${gt(process.cwd(),p)}`),u++}catch(f){n.error(`error while generating ${c.id}`,{error:f})}}u>0&&n.info(`${K.dim("total")} ${u} files`)}async function Mr({path:t,useDotBin:e,...r}){const n=tt("c4:codegen"),s=ur(n),i=await rt.fromWorkspace(t,{logger:"vite",
910
+ graphviz:e?"binary":"wasm"});if(i.ensureSingleProject(),(await i.viewsService.computedViews()).length===0)throw n.warn("no views found"),process.exitCode=1,new Error("no views found");switch(r.format){case"views":{await d0(i,r.outfile,n);break}case"dot":{await h0(i,r.outdir??t,n);break}case"d2":case"mermaid":case"plantuml":{await p0(i,r.format,r.outdir??t,n);break}default:Sa(r)}s.stopAndLog()}async function m0({path:t,useDotBin:e,outfile:r}){const n=tt("c4:codegen"),s=ur(n),i=await rt.fromWorkspace(
911
+ t,{logger:"vite",graphviz:e?"binary":"wasm"});i.ensureSingleProject(),n.info(`${K.dim("format")} ${K.green("model")}`);const o=await i.layoutedModel();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=ye(i.workspace,"likec4-model.ts");if(r&&(a=Ts(r)?r:ye(r),Ct(r)&&(await Ls(r)).isDirectory()))throw new Error(`output file is a directory: ${r}`);const u=Ur(a);n.info(`${K.dim("filename")} ${u}`);const l=fr(
912
+ u).toLocaleLowerCase();if(![".ts",".mts",".cts"].includes(l))throw n.error(`output file ${r} has extension "${l}"`),new Error(`output file ${r} must be a .ts, .mts or .cts file`);const c=Ot(a);n.info(`${K.dim("outdir")} ${c}`),await ut(c,{recursive:!0}),await Pt(a,tg(o),{encoding:"utf-8"}),At(Os(`
912
913
  ${K.dim("Source with LikeC4Model generated:")}
913
914
  ${gt(Cs(),a)}
914
915
 
915
916
  ${K.dim("How to use:")}
916
917
  ${K.underline("https://likec4.dev/tooling/code-generation/model/")}
917
- `).trim(),{padding:2,borderColor:"green",borderStyle:"round"}),s.stopAndLog()}async function g0({languageServices:t,outDir:e,filename:r="likec4-react.mjs"}){const n=si,s=oi();return n.info(`${K.cyan("likec4 app root")} ${K.dim(s)}`),n.info(K.cyan("outDir")+" "+K.dim(e)),{customLogger:n,root:s,configFile:!1,clearScreen:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:ui()},esbuild:{banner:`'use client'
918
- `+ii.banner,footer:ii.footer,jsx:"transform",jsxDev:!1,jsxSideEffects:!1,minifyIdentifiers:!1,minifySyntax:!1,minifyWhitespace:!1,tsconfigRaw:{compilerOptions:{target:"ES2022",useDefineForClassFields:!0,verbatimModuleSyntax:!0,jsx:"react-jsx"}}},build:{outDir:e,emptyOutDir:!1,sourcemap:!1,minify:!1,target:"es2022",copyPublicDir:!1,chunkSizeWarningLimit:ci,lib:{entry:"react/likec4.tsx",fileName(i,o){return r},formats:["es"]},rollupOptions:{output:{compact:!1,exports:"named"},external:["likec4/rea\
918
+ `).trim(),{padding:2,borderColor:"green",borderStyle:"round"}),s.stopAndLog()}async function g0({languageServices:t,outDir:e,filename:r="likec4-react.mjs"}){const n=ii,s=ai();return n.info(`${K.cyan("likec4 app root")} ${K.dim(s)}`),n.info(K.cyan("outDir")+" "+K.dim(e)),{customLogger:n,root:s,configFile:!1,clearScreen:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:li()},esbuild:{banner:`'use client'
919
+ `+oi.banner,footer:oi.footer,jsx:"transform",jsxDev:!1,jsxSideEffects:!1,minifyIdentifiers:!1,minifySyntax:!1,minifyWhitespace:!1,tsconfigRaw:{compilerOptions:{target:"ES2022",useDefineForClassFields:!0,verbatimModuleSyntax:!0,jsx:"react-jsx"}}},build:{outDir:e,emptyOutDir:!1,sourcemap:!1,minify:!1,target:"es2022",copyPublicDir:!1,chunkSizeWarningLimit:ui,lib:{entry:"react/likec4.tsx",fileName(i,o){return r},formats:["es"]},rollupOptions:{output:{compact:!1,exports:"named"},external:["likec4/rea\
919
920
  ct","likec4/model","react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client",/likec4\/icons\/.*/],onwarn(i,o){i.code!=="SOURCEMAP_ERROR"&&o(i)}}},plugins:[Ds({}),ks({languageServices:t.languageServices,useOverviewGraph:!1})]}}async function y0({path:t,useDotBin:e,outfile:r}){await Cr();const n=tt("c4:codegen"),s=ur(n),i=await rt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});i.ensureSingleProject(),n.info(`${K.dim("format")} ${K.green("react")}`);const o=await i.
920
- diagrams();if(o.length===0)throw process.exitCode=1,new Error("no views found");o.forEach($=>{$.hasLayoutDrift&&n.warn(K.yellow("drift detected, manual layout can not be applied, view:")+" "+K.red($.id))});let a=ye(i.workspace,"likec4-views.js");if(r&&(a=Ts(r)?r:ye(r),Ct(r)&&(await Ls(r)).isDirectory()))throw new Error(`output file is a directory: ${r}`);const c=Ot(a);n.info(`${K.dim("outdir")} ${c}`);const l=Ur(a);n.info(`${K.dim("filename")} ${l}`);const u=fr(l).toLocaleLowerCase();if(![".js",
921
- ".mjs",".jsx"].includes(u))throw n.error(`output file ${r} has extension "${u}"`),new Error(`output file ${r} must be a .js, .jsx or .mjs`);const f=await g0({languageServices:i,outDir:c,filename:l});await hr({...f,logLevel:"warn"});const p=await i.layoutedModel();await Pt(ye(c,Ur(a,u)+(u===".mjs"?".d.mts":".d.ts")),sg(p)),At(Os(`
921
+ diagrams();if(o.length===0)throw process.exitCode=1,new Error("no views found");o.forEach($=>{$.hasLayoutDrift&&n.warn(K.yellow("drift detected, manual layout can not be applied, view:")+" "+K.red($.id))});let a=ye(i.workspace,"likec4-views.js");if(r&&(a=Ts(r)?r:ye(r),Ct(r)&&(await Ls(r)).isDirectory()))throw new Error(`output file is a directory: ${r}`);const u=Ot(a);n.info(`${K.dim("outdir")} ${u}`);const l=Ur(a);n.info(`${K.dim("filename")} ${l}`);const c=fr(l).toLocaleLowerCase();if(![".js",
922
+ ".mjs",".jsx"].includes(c))throw n.error(`output file ${r} has extension "${c}"`),new Error(`output file ${r} must be a .js, .jsx or .mjs`);const f=await g0({languageServices:i,outDir:u,filename:l});await hr({...f,logLevel:"warn"});const p=await i.layoutedModel();await Pt(ye(u,Ur(a,c)+(c===".mjs"?".d.mts":".d.ts")),sg(p)),At(Os(`
922
923
  ${K.dim("Source generated:")}
923
924
  ${gt(Cs(),a)}
924
925
 
925
926
  ${K.dim("How to use:")}
926
927
  ${K.underline("https://likec4.dev/tooling/code-generation/react/")}
927
- `),{padding:2,borderColor:"green",borderStyle:"round"}),s.stopAndLog()}async function $0({path:t,useDotBin:e,webcomponentPrefix:r="likec4",outfile:n}){await Cr();const s=tt("c4:codegen"),i=ur(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(!da(a,1))throw s.warn("no views found"),process.exitCode=1,new Error("no views found");a.forEach(b=>{b.hasLayoutDrift&&s.warn(
928
- K.yellow("drift detected, manual layout can not be applied, view:")+" "+K.red(b.id))});let c=ye(o.workspace,"likec4-views.js");if(n&&(c=Ts(n)?n:ye(n),Ct(n)&&(await Ls(n)).isDirectory()))throw new Error(`output file is a directory: ${n}`);at.debug(`${K.dim("outfilepath")} ${c}`);const l=Ur(c);at.debug(`${K.dim("filename")} ${l}`);const u=fr(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 ai();
929
- at.debug(`${K.dim("created temp public")} ${f}`);const p=await Ii({languageServices:o,outDir:f,filename:l,webcomponentPrefix:r,base:"/"});at.debug(`${K.dim("vite build webcomponent")}`),await hr({...p,logLevel:"warn"});const $=ye(f,l);if(!Ct($))throw new Error(`output file not found: ${$}`);await ut(Ot(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}),At(Os(`
928
+ `),{padding:2,borderColor:"green",borderStyle:"round"}),s.stopAndLog()}async function $0({path:t,useDotBin:e,webcomponentPrefix:r="likec4",outfile:n}){await Cr();const s=tt("c4:codegen"),i=ur(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(!ha(a,1))throw s.warn("no views found"),process.exitCode=1,new Error("no views found");a.forEach(b=>{b.hasLayoutDrift&&s.warn(
929
+ K.yellow("drift detected, manual layout can not be applied, view:")+" "+K.red(b.id))});let u=ye(o.workspace,"likec4-views.js");if(n&&(u=Ts(n)?n:ye(n),Ct(n)&&(await Ls(n)).isDirectory()))throw new Error(`output file is a directory: ${n}`);at.debug(`${K.dim("outfilepath")} ${u}`);const l=Ur(u);at.debug(`${K.dim("filename")} ${l}`);const c=fr(l).toLocaleLowerCase();if(c!==".js"&&c!==".mjs")throw at.warn(`output file ${n} has extension "${c}"`),new Error(`output file ${n} must be a .js or .mjs`);const f=await ci();
930
+ at.debug(`${K.dim("created temp public")} ${f}`);const p=await Ni({languageServices:o,outDir:f,filename:l,webcomponentPrefix:r,base:"/"});at.debug(`${K.dim("vite build webcomponent")}`),await hr({...p,logLevel:"warn"});const $=ye(f,l);if(!Ct($))throw new Error(`output file not found: ${$}`);await ut(Ot(u),{recursive:!0}),await up($,u),s.info(`${K.dim("generated")} ${u}`),at.debug(`${K.dim("remove temp public")}`),await lp(f,{recursive:!0,force:!0}),At(Os(`
930
931
  ${K.dim("Webcomponents generated to:")}
931
- ${gt(Cs(),c)}
932
+ ${gt(Cs(),u)}
932
933
 
933
934
  ${K.dim("Setup and usage instructions:")}
934
935
  ${K.blue("https://likec4.dev/tooling/code-generation/webcomponent/")}
935
936
  `)),i.stopAndLog()}const _0={command:"codegen <command> [path]",aliases:["generate","gen"],describe:"Generate various artifacts from LikeC4 sources",builder:t=>t.positional("path",Ar).command("react [path]","generate react component to render likec4 view",e=>e.option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.jsx, .mjs or .js)",normalize:!0,coerce:He}).option("use-dot",Be),async e=>{await y0({useDotBin:e.useDotBin,path:e.path,outfile:e.outfile})}).command({command:"w\
936
- ebcomponent [path]",aliases:["wc","webcomp"],describe:"generate js with webcomponents",builder:e=>e.option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.mjs or .js)",normalize:!0,coerce:He}).option("webcomponent-prefix",ni).option("use-dot",Be),handler:async e=>{await $0({useDotBin:e.useDotBin,path:e.path,outfile:e.outfile,webcomponentPrefix:e.webcomponentPrefix})}}).command({command:"model [path]",aliases:["ts"],describe:"generate LikeC4Model (.ts)",builder:e=>e.option("\
937
+ ebcomponent [path]",aliases:["wc","webcomp"],describe:"generate js with webcomponents",builder:e=>e.option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.mjs or .js)",normalize:!0,coerce:He}).option("webcomponent-prefix",si).option("use-dot",Be),handler:async e=>{await $0({useDotBin:e.useDotBin,path:e.path,outfile:e.outfile,webcomponentPrefix:e.webcomponentPrefix})}}).command({command:"model [path]",aliases:["ts"],describe:"generate LikeC4Model (.ts)",builder:e=>e.option("\
937
938
  outfile",{alias:"o",type:"string",desc:"<file> path to output file (.ts)",normalize:!0,coerce:He}).option("use-dot",Be),handler:async e=>{await m0({path:e.path,useDotBin:e.useDotBin,outfile:e.outfile})}}).command({command:"views-data [path]",aliases:["views"],describe:"generate likec4 views data (.ts)",builder:e=>e.option("outfile",{alias:"o",type:"string",desc:"<file> output .ts file",normalize:!0,coerce:He}).option("use-dot",Be),handler:async e=>{await Mr({format:"views",path:e.path,useDotBin:e.
938
939
  useDotBin,outfile:e.outfile})}}).command({command:"dot [path]",describe:"generate graphviz files (.dot)",builder:e=>e.option("outdir",Or).option("use-dot",Be),handler:async e=>{await Mr({format:"dot",path:e.path,useDotBin:e.useDotBin,outdir:e.outdir})}}).command({command:"d2 [path]",describe:"generate D2 files (.d2)",builder:e=>e.option("outdir",Or).option("use-dot",Be),handler:async e=>{await Mr({format:"d2",path:e.path,useDotBin:e.useDotBin,outdir:e.outdir})}}).command({command:"mermaid [path]",
939
940
  aliases:["mmd"],describe:"generate Mermaid files (.mmd)",builder:e=>e.option("outdir",Or).option("use-dot",Be),handler:async e=>{await Mr({format:"mermaid",useDotBin:e.useDotBin,path:e.path,outdir:e.outdir})}}).command({command:"plantuml [path]",aliases:["puml"],describe:"generate PlantUML files (.puml)",builder:e=>e.option("outdir",Or).option("use-dot",Be),handler:async e=>{await Mr({format:"plantuml",useDotBin:e.useDotBin,path:e.path,outdir:e.outdir})}}).epilog(`${K.bold("Examples:")}
@@ -958,20 +959,20 @@ see Playwright docs`,default:!1}}).epilog(`${K.bold("Examples:")}
958
959
 
959
960
  ${K.green('$0 export png -f "team1*" -f "team2*" --flat -o ./png src/likec4')}
960
961
  ${K.gray("Export views matching team1* or team2* only")}
961
- `),handler:async e=>{Vr(e.timeout>=1,"timeout must be >= 1"),Vr(e["max-attempts"]>=1,"max-attempts must be >= 1"),await Cr(),await Yc({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",
962
+ `),handler:async e=>{Vr(e.timeout>=1,"timeout must be >= 1"),Vr(e["max-attempts"]>=1,"max-attempts must be >= 1"),await Cr(),await Jc({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",
962
963
  type:"string",desc:"<file> output .json file",default:"likec4.json",normalize:!0,coerce:ye}).option("use-dot",Be).epilog(`${K.bold("Examples:")}
963
964
  ${K.green("$0 export json")}
964
965
  ${K.gray("Search for likec4 files in current directory and output JSON to likec4.json")}
965
966
 
966
967
  ${K.green("$0 export json -o ./generated/likec4.json src/likec4 ")}
967
968
  ${K.gray("Search for likec4 files in src/likec4 and output JSON to generated/likec4.json")}
968
- `),handler:async e=>{await v0({path:e.path,useDotBin:e.useDotBin,outfile:e.outfile})}}).updateStrings({"Commands:":K.bold("Formats:")}),handler:()=>{}};async function w0(t){const{isDev:e,...r}=await Pi({...t,likec4AssetsDir:"",webcomponentPrefix:void 0}),n=await Ti({port:un(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 E0({path:t,output:e,base:r,listen:n}){const s=await rt.fromWorkspace(t,{
969
- logger:"vite"}),i=await w0({base:r,languageServices:s,outputDir:e,open:!0,listen:n});Vc(i)}const S0={command:"preview [path]",describe:"Start local server to preview production build",builder:t=>t.positional("path",{type:"string",desc:`Directory with LikeC4 source files
969
+ `),handler:async e=>{await v0({path:e.path,useDotBin:e.useDotBin,outfile:e.outfile})}}).updateStrings({"Commands:":K.bold("Formats:")}),handler:()=>{}};async function w0(t){const{isDev:e,...r}=await Ii({...t,likec4AssetsDir:"",webcomponentPrefix:void 0}),n=await Li({port:un(62001,62010)}),s=t?.open??!1;return await mp({...r,mode:"production",preview:{host:t.listen??"127.0.0.1",allowedHosts:!0,port:n,open:s}})}async function E0({path:t,output:e,base:r,listen:n}){const s=await rt.fromWorkspace(t,{
970
+ logger:"vite"}),i=await w0({base:r,languageServices:s,outputDir:e,open:!0,listen:n});Gc(i)}const S0={command:"preview [path]",describe:"Start local server to preview production build",builder:t=>t.positional("path",{type:"string",desc:`Directory with LikeC4 source files
970
971
  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"],He).default("path",He("."),".").default("listen","127.0.0.1","localhost"),async handler(t){await E0(t)}};async function R0({path:t,useDotBin:e,webcomponentPrefix:r,
971
- 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 Hr(lr(Fr(),".likec4-assets-")),l=await Wc({buildWebcomponent:!0,hmr:!0,base:i,webcomponentPrefix:r,languageServices:a,useHashHistory:n,useOverviewGraph:s,likec4AssetsDir:c,listen:o});if(l.config.logger.clearScreen("info"),Vc(l),!s)return;const u=await a.diagrams();if(da(u,1)){const f=tt("c4:export"),p=Fc(l);if(!p){f.error("no preview server\
972
- url");return}f.info(K.cyan("wait 5sec before generating previews")),await Sa(5e3);try{await Kc({serverUrl:p,logger:f,views:u,theme:"light",output:c,outputType:"flat"}),await Sa(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 A0={command:"start [path]",aliases:["serve","dev"],describe:"Start local dev ser\
973
- ver to preview LikeC4 views",builder:t=>t.positional("path",Ar).option("base",lc).option("webcomponent-prefix",ni).option("use-hash-history",uc).option("use-overview",fc).option("use-dot",Be).option("listen",Cm),handler:async t=>{await Cr(),await R0({path:t.path,useDotBin:t["use-dot"],base:t.base,useOverview:t["use-overview"]??!1,webcomponentPrefix:t["webcomponent-prefix"],useHashHistory:t["use-hash-history"],listen:t.listen})}};async function O0({path:t,ignoreLayout:e}){const r=await rt.fromWorkspace(
974
- t,{logger:"vite"}),n=tt("c4:views");let s=!0;return s=await i(r)&&s,s=(e||await o(r,n))&&s,s?0:ha(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 ${ye(t,f.relativePath??".")}`)));return!u}}const C0={command:"validate [path]",aliases:[],describe:"Validate model syntax and manual layout",builder:t=>t.positional("path",Ar).option("ignore-\
975
- layout",{alias:["skip-layout"],boolean:!0,default:!1,description:"do not validate layout of views"}),handler:async t=>{await O0({path:t.path,ignoreLayout:t["ignore-layout"]})}};Kh({sinks:{console:Yh()},loggers:[{category:"likec4",sinks:["console"],lowestLevel:"info"}]});async function P0(){return u0(),await Am(Gp(Qh)).scriptName("likec4").usage("Usage: $0 <command>").command(A0).command(Pg).command(_0).command(b0).command(S0).command(C0).command({command:"check-update",describe:"Check for update\
976
- s",handler:async()=>{await l0()}}).help("help").version(Bt).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(la(Jh.columns-20,{min:80,max:120})).parseAsync()}P0().catch(()=>{ha(1)}),process.on("unhandledRejection",t=>{console.
972
+ useHashHistory:n,useOverview:s=!1,base:i,listen:o}){process.env.NODE_ENV="development";const a=await rt.fromWorkspace(t,{graphviz:e?"binary":"wasm"}),u=await Hr(lr(Fr(),".likec4-assets-")),l=await Yc({buildWebcomponent:!0,hmr:!0,base:i,webcomponentPrefix:r,languageServices:a,useHashHistory:n,useOverviewGraph:s,likec4AssetsDir:u,listen:o});if(l.config.logger.clearScreen("info"),Gc(l),!s)return;const c=await a.diagrams();if(ha(c,1)){const f=tt("c4:export"),p=zc(l);if(!p){f.error("no preview server\
973
+ url");return}f.info(K.cyan("wait 5sec before generating previews")),await Ra(5e3);try{await Xc({serverUrl:p,logger:f,views:c,theme:"light",output:u,outputType:"flat"}),await Ra(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 A0={command:"start [path]",aliases:["serve","dev"],describe:"Start local dev ser\
974
+ ver to preview LikeC4 views",builder:t=>t.positional("path",Ar).option("base",hc).option("webcomponent-prefix",si).option("use-hash-history",dc).option("use-overview",pc).option("use-dot",Be).option("listen",Cm),handler:async t=>{await Cr(),await R0({path:t.path,useDotBin:t["use-dot"],base:t.base,useOverview:t["use-overview"]??!1,webcomponentPrefix:t["webcomponent-prefix"],useHashHistory:t["use-hash-history"],listen:t.listen})}};async function O0({path:t,ignoreLayout:e}){const r=await rt.fromWorkspace(
975
+ t,{logger:"vite"}),n=tt("c4:views");let s=!0;return s=await i(r)&&s,s=(e||await o(r,n))&&s,s?0:pa(1);function i(a){return a.getErrors().length===0}async function o(a,u){const l=await a.diagrams();let c=!1;for(const f of l)f.hasLayoutDrift===!0&&(c=!0,u.error(K.red(`Layout drift detected on view '${f.id}' at ${ye(t,f.relativePath??".")}`)));return!c}}const C0={command:"validate [path]",aliases:[],describe:"Validate model syntax and manual layout",builder:t=>t.positional("path",Ar).option("ignore-\
976
+ layout",{alias:["skip-layout"],boolean:!0,default:!1,description:"do not validate layout of views"}),handler:async t=>{await O0({path:t.path,ignoreLayout:t["ignore-layout"]})}};Wh({sinks:{console:Kh()},loggers:[{category:"likec4",sinks:["console"],lowestLevel:"info"}]});async function P0(){return u0(),await Am(Gp(Jh)).scriptName("likec4").usage("Usage: $0 <command>").command(A0).command(Pg).command(_0).command(b0).command(S0).command(C0).command({command:"check-update",describe:"Check for update\
977
+ s",handler:async()=>{await l0()}}).help("help").version(Bt).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(fa(Xh.columns-20,{min:80,max:120})).parseAsync()}P0().catch(()=>{pa(1)}),process.on("unhandledRejection",t=>{console.
977
978
  error("Unhandled rejection",t)});