likec4 1.25.0 → 1.26.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,101 @@
1
1
  #!/usr/bin/env node
2
- import{c as pt,f as Ep,m as mt,g as Ji,a as Dp,b as Ba,T as vp,N as xa,i as $p,n as Xi,C as _p,d as wp,e as Ma,h as qa,t as Ua,p as bp,u as K,l as Ap,w as Cp,j as Sp,k as Rp,o as zt,q as Ha,r as Va,L as gt,s as Op,v as yt,x as Ip,y as Fp,z as Pp,A as dr,B as za,D as Np,E as Sr,F as Qi,G as Ga,H as Tp,Q as Lp}from"../shared/likec4.DX7xzn9M.mjs";import Te,{hrtime as jp,cwd as Zi,exit as Wa,stdout as kp,argv as Bp}from"node:process";import{strictEqual as xp,notStrictEqual as Mp}from"assert";import es,{
3
- resolve as Qe,dirname as ts,normalize as qp,relative as Up,extname as Hp,basename as Vp}from"path";import{statSync as Ka,readdirSync as zp,readFileSync as rs,writeFile as Gp}from"fs";import Ya,{format as Ja,inspect as Wp}from"util";import{fileURLToPath as Kp}from"url";import be,{resolve as De,dirname as Gt,join as Rr,relative as Wt,extname as Or,isAbsolute as ns,basename as on}from"node:path";import ge,{existsSync as Pt,copyFileSync as Xa,readdirSync as Yp,rmSync as is}from"node:fs";import{mkdtemp as an,
4
- writeFile as Kt,mkdir as $t,stat as ss,copyFile as Jp,rm as Xp}from"node:fs/promises";import Ir,{tmpdir as un}from"node:os";import{fileURLToPath as Qa}from"node:url";import Za from"@vitejs/plugin-react";import{sortNaturalByFqn as eu,compareNatural as Qp,hasAtLeast as Zp,invariant as os,nonexhaustive as tu,delay as ru}from"@likec4/core";import{build as Fr,createServer as em,preview as tm}from"vite";import{chromium as nu}from"playwright";import rm from"node:net";import{setTimeout as nm}from"node:timers/promises";
5
- import{promisify as Me,isDeepStrictEqual as im}from"node:util";import Pr from"node:crypto";import sm from"node:assert";import"tty";import"os";import"crypto";import"net";import"child_process";import"@likec4/core/types";import"events";import"buffer";import"@hpcc-js/wasm-graphviz";import"@likec4/core/compute-view";import"@likec4/core/utils";import"boxen";import"node:child_process";import"node:events";import"node:stream/promises";import"fs/promises";import"@likec4/core/model";const om={right:dm,center:hm},
6
- am=0,cn=1,um=2,ln=3;class cm{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]=="string"&&/[\t\n]/.
7
- test(e[0])}applyLayoutDSL(e){const r=e.split(`
8
- `).map(i=>i.split(" "));let n=0;return r.forEach(i=>{i.length>1&&Ge.stringWidth(i[0])>n&&(n=Math.min(Math.floor(this.width*.5),Ge.stringWidth(i[0])))}),r.forEach(i=>{this.div(...i.map((s,o)=>({text:s.trim(),padding:this.measurePadding(s),width:o===0&&i.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){const r=Ge.stripAnsi(e);return[0,r.match(/\s*$/)[0].length,0,r.match(/^\s*/)[0].length]}toString(){const e=[];return this.
2
+ import{h as tt,k as uh,o as at,q as _s,u as ee,w as lh,r as fh,s as dh,v as St,t as hh,e as Yo,x as Xo,d as ph,L as rt,y as mh,z as nt,l as Jo,A as gh,B as yh,n as _h,D as $h,E as Vt,F as Qo,G as vh,H as sr,I as $s,J as Zo,K as bh,Q as wh}from"../shared/likec4.C0X7XZt3.mjs";import Re,{hrtime as Eh,cwd as vs,exit as ea,stdout as Sh,argv as Rh}from"node:process";import{strictEqual as Ah,notStrictEqual as Oh}from"assert";import bs,{resolve as Ue,dirname as ws,normalize as Ch,relative as Ph,extname as Ih,
3
+ basename as Nh}from"path";import{statSync as ta,readdirSync as Th,readFileSync as Es,writeFile as jh}from"fs";import ra,{format as na,inspect as Lh}from"util";import{fileURLToPath as Dh}from"url";import $e,{resolve as ge,dirname as Rt,join as ir,relative as At,extname as or,isAbsolute as Ss,basename as Nr}from"node:path";import pe,{existsSync as Ot,copyFileSync as sa,readdirSync as xh,rmSync as Rs}from"node:fs";import{mkdtemp as Tr,writeFile as Ct,mkdir as ct,stat as As,copyFile as Mh,rm as kh}from"node:fs/promises";
4
+ import ar,{tmpdir as jr}from"node:os";import{fileURLToPath as ia}from"node:url";import oa from"@vitejs/plugin-react";import{L as Os,J as qh,S as Hh,P as Uh,q as Fh,Y as zh}from"../shared/likec4.Cz9mPeTQ.mjs";import{build as cr,createServer as Vh,preview as Gh}from"vite";import{hasAtLeast as Bh,invariant as Cs,nonexhaustive as aa,delay as ca}from"@likec4/core";import{chromium as ua}from"playwright";import Wh from"node:net";import{setTimeout as Kh}from"node:timers/promises";import{promisify as Ie,
5
+ isDeepStrictEqual as Yh}from"node:util";import ur from"node:crypto";import Xh from"node:assert";import"tty";import"os";import"crypto";import"net";import"child_process";import"@likec4/core/types";import"events";import"buffer";import"@hpcc-js/wasm-graphviz";import"@likec4/core/compute-view";import"@likec4/core/utils";import"boxen";import"node:child_process";import"node:events";import"node:stream/promises";import"fs/promises";import"@likec4/core/model";const Jh={right:np,center:sp},Qh=0,Lr=1,Zh=2,Dr=3;
6
+ class ep{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]=="string"&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){
7
+ const r=e.split(`
8
+ `).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
9
  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,i)=>{let s="";n.forEach((o,a)=>{const{width:u}=e[a],l=this.negatePadding(e[a]);let c=o;if(l>Ge.stringWidth(o)&&(c+=" ".repeat(l-Ge.stringWidth(o))),e[a].align&&e[a].align!=="left"&&this.wrap){const h=om[e[a].align];c=h(c,l),Ge.stringWidth(c)<l&&(c+=" ".repeat((u||0)-Ge.stringWidth(c)-1))}const d=e[a].padding||[0,0,0,0];d[ln]&&(s+=" ".repeat(d[ln])),s+=iu(e[a],c,"| "),s+=c,s+=iu(e[a],c," |"),d[cn]&&(s+=" ".repeat(d[cn])),i===0&&r.length>0&&(s=
11
- this.renderInline(s,r[r.length-1]))}),r.push({text:s.replace(/ +$/,""),span:e.span})}),r}renderInline(e,r){const n=e.match(/^ */),i=n?n[0].length:0,s=r.text,o=Ge.stringWidth(s.trimRight());return r.span?this.wrap?i<o?e:(r.hidden=!0,s.trimRight()+" ".repeat(i-o)+e.trimLeft()):(r.hidden=!0,s+e):e}rasterize(e){const r=[],n=this.columnWidths(e);let i;return e.forEach((s,o)=>{s.width=n[o],this.wrap?i=Ge.wrap(s.text,this.negatePadding(s),{hard:!0}).split(`
12
- `):i=s.text.split(`
13
- `),s.border&&(i.unshift("."+"-".repeat(this.negatePadding(s)+2)+"."),i.push("'"+"-".repeat(this.negatePadding(s)+2)+"'")),s.padding&&(i.unshift(...new Array(s.padding[am]||0).fill("")),i.push(...new Array(s.padding[um]||0).fill(""))),i.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[ln]||0)+(e.padding[cn]||0)),e.border&&(r-=4),r}columnWidths(e){if(!this.wrap)return e.map(
14
- o=>o.width||Ge.stringWidth(o.text));let r=e.length,n=this.width;const i=e.map(o=>{if(o.width)return r--,n-=o.width,o.width}),s=r?Math.floor(n/r):0;return i.map((o,a)=>o===void 0?Math.max(s,lm(e[a])):o)}}function iu(t,e,r){return t.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?r:" ":""}function lm(t){const e=t.padding||[],r=1+(e[ln]||0)+(e[cn]||0);return t.border?r+4:r}function fm(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function dm(t,e){
15
- t=t.trim();const r=Ge.stringWidth(t);return r<e?" ".repeat(e-r)+t:t}function hm(t,e){t=t.trim();const r=Ge.stringWidth(t);return r>=e?t:" ".repeat(e-r>>1)+t}let Ge;function pm(t,e){return Ge=e,new cm({width:t?.width||fm(),wrap:t?.wrap})}const su=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function ou(t){return t.replace(su,"")}function mm(t,e){const[r,n]=t.match(su)||["",""];t=ou(t);let i="";for(let s=0;s<t.length;s++)s!==0&&s%e===0&&(i+=
10
+ `)}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 h=Jh[e[a].align];c=h(c,l),De.stringWidth(c)<l&&(c+=" ".repeat((u||0)-De.stringWidth(c)-1))}const d=e[a].padding||[0,0,0,0];d[Dr]&&(i+=" ".repeat(d[Dr])),i+=la(e[a],c,"| "),i+=c,i+=la(e[a],c," |"),d[Lr]&&(i+=" ".repeat(d[Lr])),s===0&&r.length>0&&(i=
11
+ 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
+ `):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[Qh]||0).fill("")),s.push(...new Array(i.padding[Zh]||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[Dr]||0)+(e.padding[Lr]||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,tp(e[a])):o)}}function la(t,e,r){return t.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?r:" ":""}function tp(t){const e=t.padding||[],r=1+(e[Dr]||0)+(e[Lr]||0);return t.border?r+4:r}function rp(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function np(t,e){
15
+ t=t.trim();const r=De.stringWidth(t);return r<e?" ".repeat(e-r)+t:t}function sp(t,e){t=t.trim();const r=De.stringWidth(t);return r>=e?t:" ".repeat(e-r>>1)+t}let De;function ip(t,e){return De=e,new ep({width:t?.width||rp(),wrap:t?.wrap})}const fa=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function da(t){return t.replace(fa,"")}function op(t,e){const[r,n]=t.match(fa)||["",""];t=da(t);let s="";for(let i=0;i<t.length;i++)i!==0&&i%e===0&&(s+=
16
16
  `
17
- `),i+=t.charAt(s);return r&&n&&(i=`${r}${i}${n}`),i}function gm(t){return pm(t,{stringWidth:e=>[...e].length,stripAnsi:ou,wrap:mm})}function ym(t,e){let r=Qe(".",t),n;for(Ka(r).isDirectory()||(r=ts(r));;){if(n=e(r,zp(r)),n)return Qe(r,n);if(r=ts(n=r),n===r)break}}function Nr(t){if(t!==t.toLowerCase()&&t!==t.toUpperCase()||(t=t.toLowerCase()),t.indexOf("-")===-1&&t.indexOf("_")===-1)return t;{let r="",n=!1;const i=t.match(/^-+/);for(let s=i?i[0].length:0;s<t.length;s++){let o=t.charAt(s);n&&(n=!1,
18
- o=o.toUpperCase()),s!==0&&(o==="-"||o==="_")?n=!0:o!=="-"&&o!=="_"&&(r+=o)}return r}}function au(t,e){const r=t.toLowerCase();e=e||"-";let n="";for(let i=0;i<t.length;i++){const s=r.charAt(i),o=t.charAt(i);s!==o&&i>0?n+=`${e}${r.charAt(i)}`:n+=o}return n}function uu(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 Em(t){if(Array.isArray(t))return t.map(o=>typeof o!="string"?o+"":o);t=t.trim();let e=0,
19
- r=null,n=null,i=null;const s=[];for(let o=0;o<t.length;o++){if(r=n,n=t.charAt(o),n===" "&&!i){r!==" "&&e++;continue}n===i?i=null:(n==="'"||n==='"')&&!i&&(i=n),s[e]||(s[e]=""),s[e]+=n}return s}var it;(function(t){t.BOOLEAN="boolean",t.STRING="string",t.NUMBER="number",t.ARRAY="array"})(it||(it={}));let _t;class Dm{constructor(e){_t=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
- envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),i=Em(e),s=typeof e=="string",o=vm(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),u=Object.assign(Object.create(null),n.default),l=n.configObjects||[],c=n.envPrefix,d=a["populate--"],h=d?"--":"_",E=Object.create(null),$=Object.create(null),y=n.__||_t.format,f={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
- configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},g=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,p=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(O){const P=typeof O=="object"?O.key:O,ee=Object.keys(O).map(function(W){return{boolean:"bools",string:"strings",number:"numbers"}[W]}).filter(Boolean).pop();ee&&(f[ee][P]=!0),f.arrays[P]=!0,f.keys.push(P)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(O){
23
- f.bools[O]=!0,f.keys.push(O)}),[].concat(n.string||[]).filter(Boolean).forEach(function(O){f.strings[O]=!0,f.keys.push(O)}),[].concat(n.number||[]).filter(Boolean).forEach(function(O){f.numbers[O]=!0,f.keys.push(O)}),[].concat(n.count||[]).filter(Boolean).forEach(function(O){f.counts[O]=!0,f.keys.push(O)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(O){f.normalize[O]=!0,f.keys.push(O)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([O,P])=>{typeof P=="number"&&(f.nargs[O]=
24
- P,f.keys.push(O))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([O,P])=>{typeof P=="function"&&(f.coercions[O]=P,f.keys.push(O))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(O){f.configs[O]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([O,P])=>{(typeof P=="boolean"||typeof P=="function")&&(f.configs[O]=P)})),k(n.key,o,n.default,f.arrays),Object.keys(u).forEach(function(O){(f.aliases[O]||
25
- []).forEach(function(P){u[P]=u[O]})});let m=null;ie();let D=[];const v=Object.assign(Object.create(null),{_:[]}),_={};for(let O=0;O<i.length;O++){const P=i[O],ee=P.replace(/^-{3,}/,"---");let W,F,re,V,ne,fe;if(P!=="--"&&/^-/.test(P)&&Z(P))b(P);else if(ee.match(/^---+(=|$)/)){b(P);continue}else if(P.match(/^--.+=/)||!a["short-option-groups"]&&P.match(/^-.+=/))V=P.match(/^--?([^=]+)=([\s\S]*)$/),V!==null&&Array.isArray(V)&&V.length>=3&&(w(V[1],f.arrays)?O=U(O,V[1],i,V[2]):w(V[1],f.nargs)!==!1?O=I(
26
- O,V[1],i,V[2]):G(V[1],V[2],!0));else if(P.match(p)&&a["boolean-negation"])V=P.match(p),V!==null&&Array.isArray(V)&&V.length>=2&&(F=V[1],G(F,w(F,f.arrays)?[!1]:!1));else if(P.match(/^--.+/)||!a["short-option-groups"]&&P.match(/^-[^-]+/))V=P.match(/^--?(.+)/),V!==null&&Array.isArray(V)&&V.length>=2&&(F=V[1],w(F,f.arrays)?O=U(O,F,i):w(F,f.nargs)!==!1?O=I(O,F,i):(ne=i[O+1],ne!==void 0&&(!ne.match(/^-/)||ne.match(g))&&!w(F,f.bools)&&!w(F,f.counts)||/^(true|false)$/.test(ne)?(G(F,ne),O++):G(F,ae(F))));else if(P.
27
- match(/^-.\..+=/))V=P.match(/^-([^=]+)=([\s\S]*)$/),V!==null&&Array.isArray(V)&&V.length>=3&&G(V[1],V[2]);else if(P.match(/^-.\..+/)&&!P.match(g))ne=i[O+1],V=P.match(/^-(.\..+)/),V!==null&&Array.isArray(V)&&V.length>=2&&(F=V[1],ne!==void 0&&!ne.match(/^-/)&&!w(F,f.bools)&&!w(F,f.counts)?(G(F,ne),O++):G(F,ae(F)));else if(P.match(/^-[^-]+/)&&!P.match(g)){re=P.slice(1,-1).split(""),W=!1;for(let we=0;we<re.length;we++){if(ne=P.slice(we+2),re[we+1]&&re[we+1]==="="){fe=P.slice(we+3),F=re[we],w(F,f.arrays)?
28
- O=U(O,F,i,fe):w(F,f.nargs)!==!1?O=I(O,F,i,fe):G(F,fe),W=!0;break}if(ne==="-"){G(re[we],ne);continue}if(/[A-Za-z]/.test(re[we])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(ne)&&w(ne,f.bools)===!1){G(re[we],ne),W=!0;break}if(re[we+1]&&re[we+1].match(/\W/)){G(re[we],ne),W=!0;break}else G(re[we],ae(re[we]))}F=P.slice(-1)[0],!W&&F!=="-"&&(w(F,f.arrays)?O=U(O,F,i):w(F,f.nargs)!==!1?O=I(O,F,i):(ne=i[O+1],ne!==void 0&&(!/^(-|--)[^-]/.test(ne)||ne.match(g))&&!w(F,f.bools)&&!w(F,f.counts)||/^(true|false)$/.test(ne)?
29
- (G(F,ne),O++):G(F,ae(F))))}else if(P.match(/^-[0-9]$/)&&P.match(g)&&w(P.slice(1),f.bools))F=P.slice(1),G(F,ae(F));else if(P==="--"){D=i.slice(O+1);break}else if(a["halt-at-non-option"]){D=i.slice(O);break}else b(P)}z(v,!0),z(v,!1),j(v),Y(),q(v,f.aliases,u,!0),X(v),a["set-placeholder-key"]&&se(v),Object.keys(f.counts).forEach(function(O){C(v,O.split("."))||G(O,0)}),d&&D.length&&(v[h]=[]),D.forEach(function(O){v[h].push(O)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(v).filter(O=>O!==
30
- "--"&&O.includes("-")).forEach(O=>{delete v[O]}),a["strip-aliased"]&&[].concat(...Object.keys(o).map(O=>o[O])).forEach(O=>{a["camel-case-expansion"]&&O.includes("-")&&delete v[O.split(".").map(P=>Nr(P)).join(".")],delete v[O]});function b(O){const P=N("_",O);(typeof P=="string"||typeof P=="number")&&v._.push(P)}function I(O,P,ee,W){let F,re=w(P,f.nargs);if(re=typeof re!="number"||isNaN(re)?1:re,re===0)return Q(W)||(m=Error(y("Argument unexpected for: %s",P))),G(P,ae(P)),O;let V=Q(W)?0:1;if(a["na\
31
- rgs-eats-options"])ee.length-(O+1)+V<re&&(m=Error(y("Not enough arguments following: %s",P))),V=re;else{for(F=O+1;F<ee.length&&(!ee[F].match(/^-[^0-9]/)||ee[F].match(g)||Z(ee[F]));F++)V++;V<re&&(m=Error(y("Not enough arguments following: %s",P)))}let ne=Math.min(V,re);for(!Q(W)&&ne>0&&(G(P,W),ne--),F=O+1;F<ne+O+1;F++)G(P,ee[F]);return O+ne}function U(O,P,ee,W){let F=[],re=W||ee[O+1];const V=w(P,f.nargs);if(w(P,f.bools)&&!/^(true|false)$/.test(re))F.push(!0);else if(Q(re)||Q(W)&&/^-/.test(re)&&!g.
32
- test(re)&&!Z(re)){if(u[P]!==void 0){const ne=u[P];F=Array.isArray(ne)?ne:[ne]}}else{Q(W)||F.push(B(P,W,!0));for(let ne=O+1;ne<ee.length&&!(!a["greedy-arrays"]&&F.length>0||V&&typeof V=="number"&&F.length>=V||(re=ee[ne],/^-/.test(re)&&!g.test(re)&&!Z(re)));ne++)O=ne,F.push(B(P,re,s))}return typeof V=="number"&&(V&&F.length<V||isNaN(V)&&F.length===0)&&(m=Error(y("Not enough arguments following: %s",P))),G(P,F),O}function G(O,P,ee=s){if(/-/.test(O)&&a["camel-case-expansion"]){const re=O.split(".").
33
- map(function(V){return Nr(V)}).join(".");L(O,re)}const W=B(O,P,ee),F=O.split(".");H(v,F,W),f.aliases[O]&&f.aliases[O].forEach(function(re){const V=re.split(".");H(v,V,W)}),F.length>1&&a["dot-notation"]&&(f.aliases[F[0]]||[]).forEach(function(re){let V=re.split(".");const ne=[].concat(F);ne.shift(),V=V.concat(ne),(f.aliases[O]||[]).includes(V.join("."))||H(v,V,W)}),w(O,f.normalize)&&!w(O,f.arrays)&&[O].concat(f.aliases[O]||[]).forEach(function(V){Object.defineProperty(_,V,{enumerable:!0,get(){return P},
34
- set(ne){P=typeof ne=="string"?_t.normalize(ne):ne}})})}function L(O,P){f.aliases[O]&&f.aliases[O].length||(f.aliases[O]=[P],E[P]=!0),f.aliases[P]&&f.aliases[P].length||L(P,O)}function B(O,P,ee){ee&&(P=$m(P)),(w(O,f.bools)||w(O,f.counts))&&typeof P=="string"&&(P=P==="true");let W=Array.isArray(P)?P.map(function(F){return N(O,F)}):N(O,P);return w(O,f.counts)&&(Q(W)||typeof W=="boolean")&&(W=as()),w(O,f.normalize)&&w(O,f.arrays)&&(Array.isArray(P)?W=P.map(F=>_t.normalize(F)):W=_t.normalize(P)),W}function N(O,P){
35
- return!a["parse-positional-numbers"]&&O==="_"||!w(O,f.strings)&&!w(O,f.bools)&&!Array.isArray(P)&&(uu(P)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${P}`)))||!Q(P)&&w(O,f.numbers))&&(P=Number(P)),P}function j(O){const P=Object.create(null);q(P,f.aliases,u),Object.keys(f.configs).forEach(function(ee){const W=O[ee]||P[ee];if(W)try{let F=null;const re=_t.resolve(_t.cwd(),W),V=f.configs[ee];if(typeof V=="function"){try{F=V(re)}catch(ne){F=ne}if(F instanceof Error){m=F;return}}else
36
- F=_t.require(re);M(F)}catch(F){F.name==="PermissionDenied"?m=F:O[ee]&&(m=Error(y("Invalid JSON config file: %s",W)))}})}function M(O,P){Object.keys(O).forEach(function(ee){const W=O[ee],F=P?P+"."+ee:ee;typeof W=="object"&&W!==null&&!Array.isArray(W)&&a["dot-notation"]?M(W,F):(!C(v,F.split("."))||w(F,f.arrays)&&a["combine-arrays"])&&G(F,W)})}function Y(){typeof l<"u"&&l.forEach(function(O){M(O)})}function z(O,P){if(typeof c>"u")return;const ee=typeof c=="string"?c:"",W=_t.env();Object.keys(W).forEach(
37
- function(F){if(ee===""||F.lastIndexOf(ee,0)===0){const re=F.split("__").map(function(V,ne){return ne===0&&(V=V.substring(ee.length)),Nr(V)});(P&&f.configs[re.join(".")]||!P)&&!C(O,re)&&G(re.join("."),W[F])}})}function X(O){let P;const ee=new Set;Object.keys(O).forEach(function(W){if(!ee.has(W)&&(P=w(W,f.coercions),typeof P=="function"))try{const F=N(W,P(O[W]));[].concat(f.aliases[W]||[],W).forEach(re=>{ee.add(re),O[re]=F})}catch(F){m=F}})}function se(O){return f.keys.forEach(P=>{~P.indexOf(".")||
38
- typeof O[P]>"u"&&(O[P]=void 0)}),O}function q(O,P,ee,W=!1){Object.keys(ee).forEach(function(F){C(O,F.split("."))||(H(O,F.split("."),ee[F]),W&&($[F]=!0),(P[F]||[]).forEach(function(re){C(O,re.split("."))||H(O,re.split("."),ee[F])}))})}function C(O,P){let ee=O;a["dot-notation"]||(P=[P.join(".")]),P.slice(0,-1).forEach(function(F){ee=ee[F]||{}});const W=P[P.length-1];return typeof ee!="object"?!1:W in ee}function H(O,P,ee){let W=O;a["dot-notation"]||(P=[P.join(".")]),P.slice(0,-1).forEach(function(fe){
39
- fe=cu(fe),typeof W=="object"&&W[fe]===void 0&&(W[fe]={}),typeof W[fe]!="object"||Array.isArray(W[fe])?(Array.isArray(W[fe])?W[fe].push({}):W[fe]=[W[fe],{}],W=W[fe][W[fe].length-1]):W=W[fe]});const F=cu(P[P.length-1]),re=w(P.join("."),f.arrays),V=Array.isArray(ee);let ne=a["duplicate-arguments-array"];!ne&&w(F,f.nargs)&&(ne=!0,(!Q(W[F])&&f.nargs[F]===1||Array.isArray(W[F])&&W[F].length===f.nargs[F])&&(W[F]=void 0)),ee===as()?W[F]=as(W[F]):Array.isArray(W[F])?ne&&re&&V?W[F]=a["flatten-duplicate-ar\
40
- rays"]?W[F].concat(ee):(Array.isArray(W[F][0])?W[F]:[W[F]]).concat([ee]):!ne&&!!re==!!V?W[F]=ee:W[F]=W[F].concat([ee]):W[F]===void 0&&re?W[F]=V?ee:[ee]:ne&&!(W[F]===void 0||w(F,f.counts)||w(F,f.bools))?W[F]=[W[F],ee]:W[F]=ee}function k(...O){O.forEach(function(P){Object.keys(P||{}).forEach(function(ee){f.aliases[ee]||(f.aliases[ee]=[].concat(o[ee]||[]),f.aliases[ee].concat(ee).forEach(function(W){if(/-/.test(W)&&a["camel-case-expansion"]){const F=Nr(W);F!==ee&&f.aliases[ee].indexOf(F)===-1&&(f.aliases[ee].
41
- push(F),E[F]=!0)}}),f.aliases[ee].concat(ee).forEach(function(W){if(W.length>1&&/[A-Z]/.test(W)&&a["camel-case-expansion"]){const F=au(W,"-");F!==ee&&f.aliases[ee].indexOf(F)===-1&&(f.aliases[ee].push(F),E[F]=!0)}}),f.aliases[ee].forEach(function(W){f.aliases[W]=[ee].concat(f.aliases[ee].filter(function(F){return W!==F}))}))})})}function w(O,P){const ee=[].concat(f.aliases[O]||[],O),W=Object.keys(P),F=ee.find(re=>W.includes(re));return F?P[F]:!1}function A(O){const P=Object.keys(f);return[].concat(
42
- P.map(W=>f[W])).some(function(W){return Array.isArray(W)?W.includes(O):W[O]})}function R(O,...P){return[].concat(...P).some(function(W){const F=O.match(W);return F&&A(F[1])})}function J(O){if(O.match(g)||!O.match(/^-[^-]+/))return!1;let P=!0,ee;const W=O.slice(1).split("");for(let F=0;F<W.length;F++){if(ee=O.slice(F+2),!A(W[F])){P=!1;break}if(W[F+1]&&W[F+1]==="="||ee==="-"||/[A-Za-z]/.test(W[F])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(ee)||W[F+1]&&W[F+1].match(/\W/))break}return P}function Z(O){return a["\
43
- unknown-options-as-args"]&&oe(O)}function oe(O){return O=O.replace(/^-{3,}/,"--"),O.match(g)||J(O)?!1:!R(O,/^-+([^=]+?)=[\s\S]*$/,p,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function ae(O){return!w(O,f.bools)&&!w(O,f.counts)&&`${O}`in u?u[O]:T(x(O))}function T(O){return{[it.BOOLEAN]:!0,[it.STRING]:"",[it.NUMBER]:void 0,[it.ARRAY]:[]}[O]}function x(O){let P=it.BOOLEAN;return w(O,f.strings)?P=it.STRING:w(O,f.numbers)?P=it.NUMBER:w(O,f.bools)?P=it.BOOLEAN:w(O,f.arrays)&&
44
- (P=it.ARRAY),P}function Q(O){return O===void 0}function ie(){Object.keys(f.counts).find(O=>w(O,f.arrays)?(m=Error(y("Invalid configuration: %s, opts.count excludes opts.array.",O)),!0):w(O,f.nargs)?(m=Error(y("Invalid configuration: %s, opts.count excludes opts.narg.",O)),!0):!1)}return{aliases:Object.assign({},f.aliases),argv:Object.assign(_,v),configuration:a,defaulted:Object.assign({},$),error:m,newAliases:Object.assign({},E)}}}function vm(t){const e=[],r=Object.create(null);let n=!0;for(Object.
45
- keys(t).forEach(function(i){e.push([].concat(t[i],i))});n;){n=!1;for(let i=0;i<e.length;i++)for(let s=i+1;s<e.length;s++)if(e[i].filter(function(a){return e[s].indexOf(a)!==-1}).length){e[i]=e[i].concat(e[s]),e.splice(s,1),n=!0;break}}return e.forEach(function(i){i=i.filter(function(o,a,u){return u.indexOf(o)===a});const s=i.pop();s!==void 0&&typeof s=="string"&&(r[s]=i)}),r}function as(t){return t!==void 0?t+1:1}function cu(t){return t==="__proto__"?"___proto___":t}function $m(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,cs,ls;const lu=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,fu=(cs=(us=process==null?void 0:process.versions)===null||us===void 0?void 0:us.node)!==null&&cs!==void 0?cs:(ls=process==null?void 0:process.version)===null||ls===void 0?void 0:ls.slice(1);if(fu&&Number(fu.match(/^([^.]+)/)[1])<lu)throw Error(`yargs parser supports a minimum Node.js versi\
47
- on of ${lu}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const _m=process?process.env:{},du=new Dm({cwd:process.cwd,env:()=>_m,format:Ja,normalize:qp,resolve:Qe,require:t=>{if(typeof require<"u")return require(t);if(t.match(/\.json$/))return JSON.parse(rs(t,"utf8"));throw Error("only .json config files are supported in ESM")}}),Tr=function(e,r){return du.parse(e.slice(),r).argv};Tr.detailed=function(t,e){return du.parse(t.slice(),e)},Tr.camelCase=
48
- Nr,Tr.decamelize=au,Tr.looksLikeNumber=uu;function hu(){return wm()?0:1}function wm(){return bm()&&!process.defaultApp}function bm(){return!!process.versions.electron}function Am(t){return t.slice(hu()+1)}function Cm(){return process.argv[hu()]}class je extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,je)}}const Sm={fs:{readFileSync:rs,writeFile:Gp},format:Ja,resolve:Qe,exists:t=>{try{return Ka(t).isFile()}catch{return!1}}};
49
- let st;class Rm{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
- 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(),st.format.apply(st.format,[this.cache[this.locale][r]||r].concat(e))}__n(){const e=Array.prototype.slice.call(arguments),r=e.shift(),n=e.shift(),i=e.shift();let s=function(){};typeof e[e.length-1]=="function"&&(s=e.pop()),this.cache[this.locale]||this._readLocaleFile();let o=i===1?r:n;this.
51
- cache[this.locale][r]&&(o=this.cache[this.locale][r][i===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:s})):s();const a=[o];return~o.indexOf("%d")&&a.push(i),st.format.apply(st.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(i,s){const o=r[s+1];n+=i,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,i=r.locale,s=r.cb,o=this._resolveLocaleFile(n,i),a=JSON.stringify(this.cache[i],null,2);st.fs.writeFile(o,a,"utf-8",function(u){e.writeQueue.
53
- shift(),e.writeQueue.length>0&&e._processWriteQueue(),s(u)})}_readLocaleFile(){let e={};const r=this._resolveLocaleFile(this.directory,this.locale);try{st.fs.readFileSync&&(e=JSON.parse(st.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=st.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){const i=st.resolve(
54
- e,"./",r.split("_")[0]+".json");this._fileExistsSync(i)&&(n=i)}return n}_fileExistsSync(e){return st.exists(e)}}function Om(t,e){st=e;const r=new Rm(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 Im=t=>Om(t,Sm),Fm="require is not supported by ESM",pu="loading a directory of commands is not supported yet for ESM";let Lr;try{Lr=Kp(import.meta.url)}catch{Lr=process.cwd()}const Pm=Lr.substring(
55
- 0,Lr.lastIndexOf("node_modules")),Nm={assert:{notStrictEqual:Mp,strictEqual:xp},cliui:gm,findUp:ym,getEnv:t=>process.env[t],inspect:Wp,getCallerFile:()=>{throw new je(pu)},getProcessArgvBin:Cm,mainFilename:Pm||process.cwd(),Parser:Tr,path:{basename:Vp,dirname:ts,extname:Hp,relative:Up,resolve:Qe},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:rs,require:()=>{throw new je(Fm)},requireDirectory:()=>{throw new je(pu)},stringWidth:t=>[...t].length,y18n:Im({directory:Qe(Lr,"../../../locales"),updateFiles:!1})};function ot(t,e,r,n){r.assert.notStrictEqual(t,e,n)}function mu(t,e){e.assert.strictEqual(typeof t,"string")}function fn(t){return Object.keys(t)}function Le(t){return!!t&&!!t.then&&typeof t.then=="function"}function jr(t){const r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,
57
- i=r.shift();if(!i)throw new Error(`No command found in: ${t}`);const s={cmd:i.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)?s.optional.push({cmd:o.replace(n,"").split("|"),variadic:u}):s.demanded.push({cmd:o.replace(n,"").split("|"),variadic:u})}),s}const Tm=["first","second","third","fourth","fifth","sixth"];function ce(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},
58
- t,e]:[jr(`cmd ${t}`),e,r]}try{let i=0;const[s,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<s.demanded.length)throw new je(`Not enough arguments provided. Expected ${s.demanded.length} but received ${u.length}.`);const c=s.demanded.length+s.optional.length;if(l>c)throw new je(`Too many arguments provided. Expected max ${c} but received ${l}.`);s.demanded.forEach(d=>{const h=u.shift(),E=gu(h);d.cmd.filter(y=>y===E||y==="*").length===0&&yu(E,d.
59
- cmd,i),i+=1}),s.optional.forEach(d=>{if(u.length===0)return;const h=u.shift(),E=gu(h);d.cmd.filter(y=>y===E||y==="*").length===0&&yu(E,d.cmd,i),i+=1})}catch(i){console.warn(i.stack)}}function gu(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function yu(t,e,r){throw new je(`Invalid ${Tm[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}class Lm{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,i=!1){if(ce("<array|funct\
60
- ion> [boolean] [boolean] [boolean]",[e,r,n],arguments.length),Array.isArray(e)){for(let s=0;s<e.length;s++){if(typeof e[s]!="function")throw Error("middleware must be a function");const o=e[s];o.applyBeforeValidation=r,o.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){const s=e;s.applyBeforeValidation=r,s.global=n,s.mutates=i,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,r){const n=this.yargs.getAliases();return this.globalMiddleware=
61
- this.globalMiddleware.filter(i=>{const s=[...n[r]||[],r];return i.option?!s.includes(i.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 jm(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}function kr(t,e,r,n){return r.reduce((i,s)=>{
62
- if(s.applyBeforeValidation!==n)return i;if(s.mutates){if(s.applied)return i;s.applied=!0}if(Le(i))return i.then(o=>Promise.all([o,s(o,e)])).then(([o,a])=>Object.assign(o,a));{const o=s(i,e);return Le(o)?o.then(a=>Object.assign(i,a)):Object.assign(i,o)}},t)}function Br(t,e,r=n=>{throw n}){try{const n=km(t)?t():t;return Le(n)?n.then(i=>e(i)):e(n)}catch(n){return r(n)}}function km(t){return typeof t=="function"}function Bm(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 hr=/(^\*)|(^\$0)/;class xm{constructor(e,r,n,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=e,this.globalMiddleware=n,this.validation=r}addDirectory(e,r,n,i){i=i||{},typeof i.recurse!="boolean"&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);const s=typeof i.visit=="function"?i.visit:o=>o;i.visit=(o,a,u)=>{const l=s(o,a,u);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,i)}addHandler(e,r,n,i,s,o){let a=[];const u=jm(s);if(i=i||(()=>{}),Array.isArray(e))if(qm(e))[e,...a]=e;else for(const l of e)this.addHandler(l);else if(Hm(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(Eu(n)){this.addHandler([e].concat(a),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){const l=jr(e);a=a.map(h=>jr(h).cmd);let c=!1;const d=[l.cmd].concat(a).filter(h=>hr.test(h)?(c=!0,!1):!0);d.length===0&&c&&d.push("$0"),c&&(l.cmd=d[0],a=d.slice(1),e=e.replace(hr,l.cmd)),a.forEach(h=>{this.aliasMap[h]=l.cmd}),r!==!1&&this.usage.command(e,r,c,a,o),this.handlers[l.cmd]={original:e,description:r,handler:i,builder:n||{},middlewares:u,deprecated:o,demanded:l.
66
- 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,i,s,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 d=this.applyBuilderUpdateUsageAndParse(
67
- c,a,r,n.aliases,l,i,s,o);return Le(d)?d.then(h=>this.applyMiddlewareAndGetResult(c,a,h.innerArgv,u,s,h.aliases,r)):this.applyMiddlewareAndGetResult(c,a,d.innerArgv,u,s,d.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,i,s,o,a,u){const l=r.builder;let c=n;if(fs(l)){n.getInternalMethods().getUsageInstance().freeze();const d=l(n.getInternalMethods().reset(i),u);if(Le(d))return d.then(h=>(c=s0(h)?h:n,this.parseAndUpdateUsage(e,r,c,s,o,a)))}else Um(l)&&(n.getInternalMethods().getUsageInstance().freeze(),
68
- c=n.getInternalMethods().reset(i),Object.keys(r.builder).forEach(d=>{c.option(d,l[d])}));return this.parseAndUpdateUsage(e,r,c,s,o,a)}parseAndUpdateUsage(e,r,n,i,s,o){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,r),r.description);const a=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,s,o);return Le(a)?a.then(u=>({aliases:n.parsed.aliases,innerArgv:u})):
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=hr.test(r.original)?r.original.replace(hr,"").trim():r.original,i=e.filter(s=>!hr.test(s));return i.push(n),`$0 ${i.join(" ")}`}handleValidationAndGetResult(e,r,n,i,s,o,a,u){if(!o.getInternalMethods().getHasOutput()){const l=o.getInternalMethods().runValidation(
70
- s,u,o.parsed.error,e);n=Br(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=kr(n,o,a,!1),n=Br(n,c=>{const d=r.handler(c);return Le(d)?d.then(()=>c):c}),e||o.getInternalMethods().getUsageInstance().cacheHelpMessage(),Le(n)&&!o.getInternalMethods().hasParseCallback()&&n.catch(c=>{try{o.getInternalMethods().getUsageInstance().fail(null,c)}catch{}})}
71
- return e||(i.commands.pop(),i.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,r,n,i,s,o,a){let u={};if(s)return n;a.getInternalMethods().getHasOutput()||(u=this.populatePositionals(r,n,i,a));const l=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),c=kr(n,a,l,!0);return Le(c)?c.then(d=>this.handleValidationAndGetResult(e,r,d,i,o,a,l,u)):this.handleValidationAndGetResult(e,r,c,i,o,a,l,u)}populatePositionals(e,r,n,i){r._=r._.slice(n.commands.length);const s=e.demanded.slice(
72
- 0),o=e.optional.slice(0),a={};for(this.validation.positionalCount(s.length,r._.length);s.length;){const u=s.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),i),a}populatePositional(e,r,n){const i=e.cmd[0];e.variadic?n[i]=r._.splice(0).map(String):r._.length&&(n[i]=[String(r._.shift())])}cmdToParseOptions(e){const r={array:[],default:{},
73
- alias:{},demand:{}},n=jr(e);return n.demanded.forEach(i=>{const[s,...o]=i.cmd;i.variadic&&(r.array.push(s),r.default[s]=[]),r.alias[s]=o,r.demand[s]=!0}),n.optional.forEach(i=>{const[s,...o]=i.cmd;i.variadic&&(r.array.push(s),r.default[s]=[]),r.alias[s]=o}),r}postProcessPositionals(e,r,n,i){const s=Object.assign({},i.getOptions());s.default=Object.assign(n.default,s.default);for(const l of Object.keys(n.alias))s.alias[l]=(s.alias[l]||[]).concat(n.alias[l]);s.array=s.array.concat(n.array),s.config=
74
- {};const o=[];if(Object.keys(r).forEach(l=>{r[l].map(c=>{s.configuration["unknown-options-as-args"]&&(s.key[l]=!0),o.push(`--${l}`),o.push(c)})}),!o.length)return;const a=Object.assign({},s.configuration,{"populate--":!1}),u=this.shim.Parser.detailed(o,Object.assign({},s,{configuration:a}));if(u.error)i.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)&&
75
- (r[c]||(r[c]=u.argv[c]),!this.isInConfigs(i,c)&&!this.isDefaulted(i,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(i=>Object.
76
- prototype.hasOwnProperty.call(i,r))||n.some(i=>Object.prototype.hasOwnProperty.call(i,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){const n=hr.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(fs(r))return r(e,!0);Eu(r)||Object.keys(r).forEach(
77
- n=>{e.option(n,r[n])})}moduleName(e){const r=Bm(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 i of[e,r,n]){if(typeof i=="string"||i===!1)return i;ot(i,!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();ot(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 Mm(t,e,r,n){return new xm(t,e,r,n)}function Eu(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function qm(t){return t.every(e=>typeof e=="string")}function fs(t){return typeof t=="function"}function Um(t){return typeof t=="\
79
- object"}function Hm(t){return typeof t=="object"&&!Array.isArray(t)}function xr(t={},e=()=>!0){const r={};return fn(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}function Mr(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 Vm(t){return typeof t=="boolean"}function zm(t,e){const r=e.y18n.__,n={},i=[];n.failFn=function(B){i.push(B)};let s=null,o=null,a=!0;n.showHelpOnFail=function(B=!0,N){
80
- const[j,M]=typeof B=="string"?[!0,B]:[B,N];return t.getInternalMethods().isGlobalContext()&&(o=M),s=M,a=j,n};let u=!1;n.fail=function(B,N){const j=t.getInternalMethods().getLoggerInstance();if(i.length)for(let M=i.length-1;M>=0;--M){const Y=i[M];if(Vm(Y)){if(N)throw N;if(B)throw Error(B)}else Y(B,N,n)}else{if(t.getExitProcess()&&Mr(!0),!u){u=!0,a&&(t.showHelp("error"),j.error()),(B||N)&&j.error(B||N);const M=s||o;M&&((B||N)&&j.error(""),j.error(M))}if(N=N||new je(B),t.getExitProcess())return t.exit(
81
- 1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,N);throw N}};let l=[],c=!1;n.usage=(L,B)=>L===null?(c=!0,l=[],n):(c=!1,l.push([L,B||""]),n),n.getUsage=()=>l,n.getUsageDisabled=()=>c,n.getPositionalGroupName=()=>r("Positionals:");let d=[];n.example=(L,B)=>{d.push([L,B||""])};let h=[];n.command=function(B,N,j,M,Y=!1){j&&(h=h.map(z=>(z[2]=!1,z))),h.push([B,N||"",j,M,Y])},n.getCommands=()=>h;let E={};n.describe=function(B,N){Array.isArray(B)?B.forEach(j=>{n.describe(j,N)}):typeof B==
82
- "object"?Object.keys(B).forEach(j=>{n.describe(j,B[j])}):E[B]=N},n.getDescriptions=()=>E;let $=[];n.epilog=L=>{$.push(L)};let y=!1,f;n.wrap=L=>{y=!0,f=L},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(y||(f=I(),y=!0),f);const g="__yargsString__:";n.deferY18nLookup=L=>g+L,n.help=function(){if(D)return D;m();const B=t.customScriptName?t.$0:e.path.basename(t.$0),N=t.getDemandedOptions(),j=t.getDemandedCommands(),M=t.getDeprecatedOptions(),Y=t.getGroups(),z=t.getOptions();let X=[];X=X.concat(Object.
83
- keys(E)),X=X.concat(Object.keys(N)),X=X.concat(Object.keys(j)),X=X.concat(Object.keys(z.default)),X=X.filter(_),X=Object.keys(X.reduce((R,J)=>(J!=="_"&&(R[J]=!0),R),{}));const se=n.getWrap(),q=e.cliui({width:se,wrap:!!se});if(!c){if(l.length)l.forEach(R=>{q.div({text:`${R[0].replace(/\$0/g,B)}`}),R[1]&&q.div({text:`${R[1]}`,padding:[1,0,0,0]})}),q.div();else if(h.length){let R=null;j._?R=`${B} <${r("command")}>
84
- `:R=`${B} [${r("command")}]
85
- `,q.div(`${R}`)}}if(h.length>1||h.length===1&&!h[0][2]){q.div(r("Commands:"));const R=t.getInternalMethods().getContext(),J=R.commands.length?`${R.commands.join(" ")} `:"";t.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(h=h.sort((oe,ae)=>oe[0].localeCompare(ae[0])));const Z=B?`${B} `:"";h.forEach(oe=>{const ae=`${Z}${J}${oe[0].replace(/^\$0 ?/,"")}`;q.span({text:ae,padding:[0,2,0,2],width:p(h,se,`${B}${J}`)+4},{text:oe[1]});const T=[];oe[2]&&T.push(`[${r("default")}]`),oe[3]&&
86
- oe[3].length&&T.push(`[${r("aliases:")} ${oe[3].join(", ")}]`),oe[4]&&(typeof oe[4]=="string"?T.push(`[${r("deprecated: %s",oe[4])}]`):T.push(`[${r("deprecated")}]`)),T.length?q.div({text:T.join(" "),padding:[0,0,0,2],align:"right"}):q.div()}),q.div()}const C=(Object.keys(z.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);X=X.filter(R=>!t.parsed.newAliases[R]&&C.every(J=>(z.alias[J]||[]).indexOf(R)===-1));const H=r("Options:");Y[H]||(Y[H]=[]),v(X,z.alias,Y,H);const k=R=>/^--/.test(dn(R)),
87
- w=Object.keys(Y).filter(R=>Y[R].length>0).map(R=>{const J=Y[R].filter(_).map(Z=>{if(C.includes(Z))return Z;for(let oe=0,ae;(ae=C[oe])!==void 0;oe++)if((z.alias[ae]||[]).includes(Z))return ae;return Z});return{groupName:R,normalizedKeys:J}}).filter(({normalizedKeys:R})=>R.length>0).map(({groupName:R,normalizedKeys:J})=>{const Z=J.reduce((oe,ae)=>(oe[ae]=[ae].concat(z.alias[ae]||[]).map(T=>R===n.getPositionalGroupName()?T:(/^[0-9]$/.test(T)?z.boolean.includes(ae)?"-":"--":T.length>1?"--":"-")+T).sort(
88
- (T,x)=>k(T)===k(x)?0:k(T)?1:-1).join(", "),oe),{});return{groupName:R,normalizedKeys:J,switches:Z}});if(w.filter(({groupName:R})=>R!==n.getPositionalGroupName()).some(({normalizedKeys:R,switches:J})=>!R.every(Z=>k(J[Z])))&&w.filter(({groupName:R})=>R!==n.getPositionalGroupName()).forEach(({normalizedKeys:R,switches:J})=>{R.forEach(Z=>{k(J[Z])&&(J[Z]=Gm(J[Z],4))})}),w.forEach(({groupName:R,normalizedKeys:J,switches:Z})=>{q.div(R),J.forEach(oe=>{const ae=Z[oe];let T=E[oe]||"",x=null;T.includes(g)&&
89
- (T=r(T.substring(g.length))),z.boolean.includes(oe)&&(x=`[${r("boolean")}]`),z.count.includes(oe)&&(x=`[${r("count")}]`),z.string.includes(oe)&&(x=`[${r("string")}]`),z.normalize.includes(oe)&&(x=`[${r("string")}]`),z.array.includes(oe)&&(x=`[${r("array")}]`),z.number.includes(oe)&&(x=`[${r("number")}]`);const Q=P=>typeof P=="string"?`[${r("deprecated: %s",P)}]`:`[${r("deprecated")}]`,ie=[oe in M?Q(M[oe]):null,x,oe in N?`[${r("required")}]`:null,z.choices&&z.choices[oe]?`[${r("choices:")} ${n.stringifiedValues(
90
- z.choices[oe])}]`:null,b(z.default[oe],z.defaultDescription[oe])].filter(Boolean).join(" ");q.span({text:dn(ae),padding:[0,2,0,2+Du(ae)],width:p(Z,se)+4},T);const O=t.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;ie&&!O?q.div({text:ie,padding:[0,0,0,2],align:"right"}):q.div()}),q.div()}),d.length&&(q.div(r("Examples:")),d.forEach(R=>{R[0]=R[0].replace(/\$0/g,B)}),d.forEach(R=>{R[1]===""?q.div({text:R[0],padding:[0,2,0,2]}):q.div({text:R[0],padding:[0,2,0,2],width:p(d,se)+4},{text:R[1]})}),
91
- q.div()),$.length>0){const R=$.map(J=>J.replace(/\$0/g,B)).join(`
92
- `);q.div(`${R}
93
- `)}return q.toString().replace(/\s*$/,"")};function p(L,B,N){let j=0;return Array.isArray(L)||(L=Object.values(L).map(M=>[M])),L.forEach(M=>{j=Math.max(e.stringWidth(N?`${N} ${dn(M[0])}`:dn(M[0]))+Du(M[0]),j)}),B&&(j=Math.min(j,parseInt((B*.5).toString(),10))),j}function m(){const L=t.getDemandedOptions(),B=t.getOptions();(Object.keys(B.alias)||[]).forEach(N=>{B.alias[N].forEach(j=>{E[j]&&n.describe(N,E[j]),j in L&&t.demandOption(N,L[j]),B.boolean.includes(j)&&t.boolean(N),B.count.includes(j)&&t.
94
- count(N),B.string.includes(j)&&t.string(N),B.normalize.includes(j)&&t.normalize(N),B.array.includes(j)&&t.array(N),B.number.includes(j)&&t.number(N)})})}let D;n.cacheHelpMessage=function(){D=this.help()},n.clearCachedHelpMessage=function(){D=void 0},n.hasCachedHelpMessage=function(){return!!D};function v(L,B,N,j){let M=[],Y=null;return Object.keys(N).forEach(z=>{M=M.concat(N[z])}),L.forEach(z=>{Y=[z].concat(B[z]),Y.some(X=>M.indexOf(X)!==-1)||N[j].push(z)}),M}function _(L){return t.getOptions().
95
- hiddenOptions.indexOf(L)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}n.showHelp=L=>{const B=t.getInternalMethods().getLoggerInstance();L||(L="error"),(typeof L=="function"?L:B[L])(n.help())},n.functionDescription=L=>["(",L.name?e.Parser.decamelize(L.name,"-"):r("generated-value"),")"].join(""),n.stringifiedValues=function(B,N){let j="";const M=N||", ",Y=[].concat(B);return!B||!Y.length||Y.forEach(z=>{j.length&&(j+=M),j+=JSON.stringify(z)}),j};function b(L,B){let N=`[${r("default:")} `;if(L===
96
- void 0&&!B)return null;if(B)N+=B;else switch(typeof L){case"string":N+=`"${L}"`;break;case"object":N+=JSON.stringify(L);break;default:N+=L}return`${N}]`}function I(){return e.process.stdColumns?Math.min(80,e.process.stdColumns):80}let U=null;n.version=L=>{U=L},n.showVersion=L=>{const B=t.getInternalMethods().getLoggerInstance();L||(L="error"),(typeof L=="function"?L:B[L])(U)},n.reset=function(B){return s=null,u=!1,l=[],c=!1,$=[],d=[],h=[],E=xr(E,N=>!B[N]),n};const G=[];return n.freeze=function(){
97
- G.push({failMessage:s,failureOutput:u,usages:l,usageDisabled:c,epilogs:$,examples:d,commands:h,descriptions:E})},n.unfreeze=function(B=!1){const N=G.pop();N&&(B?(E={...N.descriptions,...E},h=[...N.commands,...h],l=[...N.usages,...l],d=[...N.examples,...d],$=[...N.epilogs,...$]):{failMessage:s,failureOutput:u,usages:l,usageDisabled:c,epilogs:$,examples:d,commands:h,descriptions:E}=N)},n}function ds(t){return typeof t=="object"}function Gm(t,e){return ds(t)?{text:t.text,indentation:t.indentation+e}:
98
- {text:t,indentation:e}}function Du(t){return ds(t)?t.indentation:0}function dn(t){return ds(t)?t.text:t}const Wm=`###-begin-{{app_name}}-completions-###
17
+ `),s+=t.charAt(i);return r&&n&&(s=`${r}${s}${n}`),s}function ap(t){return ip(t,{stringWidth:e=>[...e].length,stripAnsi:da,wrap:op})}function cp(t,e){let r=Ue(".",t),n;for(ta(r).isDirectory()||(r=ws(r));;){if(n=e(r,Th(r)),n)return Ue(r,n);if(r=ws(n=r),n===r)break}}function lr(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 ha(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 pa(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 up(t){if(Array.isArray(t))return t.map(o=>typeof o!="string"?o+"":o);t=t.trim();let e=0,
19
+ 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 Be;(function(t){t.BOOLEAN="boolean",t.STRING="string",t.NUMBER="number",t.ARRAY="array"})(Be||(Be={}));let ut;class lp{constructor(e){ut=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
+ envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),s=up(e),i=typeof e=="string",o=fp(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),u=Object.assign(Object.create(null),n.default),l=n.configObjects||[],c=n.envPrefix,d=a["populate--"],h=d?"--":"_",y=Object.create(null),b=Object.create(null),_=n.__||ut.format,f={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
+ configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},g=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,p=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(P){const T=typeof P=="object"?P.key:P,Z=Object.keys(P).map(function(W){return{boolean:"bools",string:"strings",number:"numbers"}[W]}).filter(Boolean).pop();Z&&(f[Z][T]=!0),f.arrays[T]=!0,f.keys.push(T)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(P){f.
23
+ bools[P]=!0,f.keys.push(P)}),[].concat(n.string||[]).filter(Boolean).forEach(function(P){f.strings[P]=!0,f.keys.push(P)}),[].concat(n.number||[]).filter(Boolean).forEach(function(P){f.numbers[P]=!0,f.keys.push(P)}),[].concat(n.count||[]).filter(Boolean).forEach(function(P){f.counts[P]=!0,f.keys.push(P)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(P){f.normalize[P]=!0,f.keys.push(P)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([P,T])=>{typeof T=="number"&&(f.nargs[P]=
24
+ T,f.keys.push(P))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([P,T])=>{typeof T=="function"&&(f.coercions[P]=T,f.keys.push(P))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(P){f.configs[P]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([P,T])=>{(typeof T=="boolean"||typeof T=="function")&&(f.configs[P]=T)})),M(n.key,o,n.default,f.arrays),Object.keys(u).forEach(function(P){(f.aliases[P]||
25
+ []).forEach(function(T){u[T]=u[P]})});let m=null;ne();let $=[];const v=Object.assign(Object.create(null),{_:[]}),E={};for(let P=0;P<s.length;P++){const T=s[P],Z=T.replace(/^-{3,}/,"---");let W,N,te,V,re,le;if(T!=="--"&&/^-/.test(T)&&Q(T))S(T);else if(Z.match(/^---+(=|$)/)){S(T);continue}else if(T.match(/^--.+=/)||!a["short-option-groups"]&&T.match(/^-.+=/))V=T.match(/^--?([^=]+)=([\s\S]*)$/),V!==null&&Array.isArray(V)&&V.length>=3&&(w(V[1],f.arrays)?P=F(P,V[1],s,V[2]):w(V[1],f.nargs)!==!1?P=I(P,
26
+ V[1],s,V[2]):B(V[1],V[2],!0));else if(T.match(p)&&a["boolean-negation"])V=T.match(p),V!==null&&Array.isArray(V)&&V.length>=2&&(N=V[1],B(N,w(N,f.arrays)?[!1]:!1));else if(T.match(/^--.+/)||!a["short-option-groups"]&&T.match(/^-[^-]+/))V=T.match(/^--?(.+)/),V!==null&&Array.isArray(V)&&V.length>=2&&(N=V[1],w(N,f.arrays)?P=F(P,N,s):w(N,f.nargs)!==!1?P=I(P,N,s):(re=s[P+1],re!==void 0&&(!re.match(/^-/)||re.match(g))&&!w(N,f.bools)&&!w(N,f.counts)||/^(true|false)$/.test(re)?(B(N,re),P++):B(N,oe(N))));else if(T.
27
+ match(/^-.\..+=/))V=T.match(/^-([^=]+)=([\s\S]*)$/),V!==null&&Array.isArray(V)&&V.length>=3&&B(V[1],V[2]);else if(T.match(/^-.\..+/)&&!T.match(g))re=s[P+1],V=T.match(/^-(.\..+)/),V!==null&&Array.isArray(V)&&V.length>=2&&(N=V[1],re!==void 0&&!re.match(/^-/)&&!w(N,f.bools)&&!w(N,f.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],w(N,f.arrays)?
28
+ P=F(P,N,s,le):w(N,f.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)&&w(re,f.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!=="-"&&(w(N,f.arrays)?P=F(P,N,s):w(N,f.nargs)!==!1?P=I(P,N,s):(re=s[P+1],re!==void 0&&(!/^(-|--)[^-]/.test(re)||re.match(g))&&!w(N,f.bools)&&!w(N,f.counts)||/^(true|false)$/.test(re)?
29
+ (B(N,re),P++):B(N,oe(N))))}else if(T.match(/^-[0-9]$/)&&T.match(g)&&w(T.slice(1),f.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),K(),U(v,f.aliases,u,!0),X(v),a["set-placeholder-key"]&&se(v),Object.keys(f.counts).forEach(function(P){A(v,P.split("."))||B(P,0)}),d&&$.length&&(v[h]=[]),$.forEach(function(P){v[h].push(P)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(v).filter(P=>P!==
30
+ "--"&&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=>lr(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,Z,W){let N,te=w(T,f.nargs);if(te=typeof te!="number"||isNaN(te)?1:te,te===0)return J(W)||(m=Error(_("Argument unexpected for: %s",T))),B(T,oe(T)),P;let V=J(W)?0:1;if(a["nar\
31
+ gs-eats-options"])Z.length-(P+1)+V<te&&(m=Error(_("Not enough arguments following: %s",T))),V=te;else{for(N=P+1;N<Z.length&&(!Z[N].match(/^-[^0-9]/)||Z[N].match(g)||Q(Z[N]));N++)V++;V<te&&(m=Error(_("Not enough arguments following: %s",T)))}let re=Math.min(V,te);for(!J(W)&&re>0&&(B(T,W),re--),N=P+1;N<re+P+1;N++)B(T,Z[N]);return P+re}function F(P,T,Z,W){let N=[],te=W||Z[P+1];const V=w(T,f.nargs);if(w(T,f.bools)&&!/^(true|false)$/.test(te))N.push(!0);else if(J(te)||J(W)&&/^-/.test(te)&&!g.test(te)&&
32
+ !Q(te)){if(u[T]!==void 0){const re=u[T];N=Array.isArray(re)?re:[re]}}else{J(W)||N.push(k(T,W,!0));for(let re=P+1;re<Z.length&&!(!a["greedy-arrays"]&&N.length>0||V&&typeof V=="number"&&N.length>=V||(te=Z[re],/^-/.test(te)&&!g.test(te)&&!Q(te)));re++)P=re,N.push(k(T,te,i))}return typeof V=="number"&&(V&&N.length<V||isNaN(V)&&N.length===0)&&(m=Error(_("Not enough arguments following: %s",T))),B(T,N),P}function B(P,T,Z=i){if(/-/.test(P)&&a["camel-case-expansion"]){const te=P.split(".").map(function(V){
33
+ return lr(V)}).join(".");D(P,te)}const W=k(P,T,Z),N=P.split(".");z(v,N,W),f.aliases[P]&&f.aliases[P].forEach(function(te){const V=te.split(".");z(v,V,W)}),N.length>1&&a["dot-notation"]&&(f.aliases[N[0]]||[]).forEach(function(te){let V=te.split(".");const re=[].concat(N);re.shift(),V=V.concat(re),(f.aliases[P]||[]).includes(V.join("."))||z(v,V,W)}),w(P,f.normalize)&&!w(P,f.arrays)&&[P].concat(f.aliases[P]||[]).forEach(function(V){Object.defineProperty(E,V,{enumerable:!0,get(){return T},set(re){T=
34
+ typeof re=="string"?ut.normalize(re):re}})})}function D(P,T){f.aliases[P]&&f.aliases[P].length||(f.aliases[P]=[T],y[T]=!0),f.aliases[T]&&f.aliases[T].length||D(T,P)}function k(P,T,Z){Z&&(T=dp(T)),(w(P,f.bools)||w(P,f.counts))&&typeof T=="string"&&(T=T==="true");let W=Array.isArray(T)?T.map(function(N){return j(P,N)}):j(P,T);return w(P,f.counts)&&(J(W)||typeof W=="boolean")&&(W=Ps()),w(P,f.normalize)&&w(P,f.arrays)&&(Array.isArray(T)?W=T.map(N=>ut.normalize(N)):W=ut.normalize(T)),W}function j(P,T){
35
+ return!a["parse-positional-numbers"]&&P==="_"||!w(P,f.strings)&&!w(P,f.bools)&&!Array.isArray(T)&&(pa(T)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${T}`)))||!J(T)&&w(P,f.numbers))&&(T=Number(T)),T}function x(P){const T=Object.create(null);U(T,f.aliases,u),Object.keys(f.configs).forEach(function(Z){const W=P[Z]||T[Z];if(W)try{let N=null;const te=ut.resolve(ut.cwd(),W),V=f.configs[Z];if(typeof V=="function"){try{N=V(te)}catch(re){N=re}if(N instanceof Error){m=N;return}}else N=
36
+ ut.require(te);H(N)}catch(N){N.name==="PermissionDenied"?m=N:P[Z]&&(m=Error(_("Invalid JSON config file: %s",W)))}})}function H(P,T){Object.keys(P).forEach(function(Z){const W=P[Z],N=T?T+"."+Z:Z;typeof W=="object"&&W!==null&&!Array.isArray(W)&&a["dot-notation"]?H(W,N):(!A(v,N.split("."))||w(N,f.arrays)&&a["combine-arrays"])&&B(N,W)})}function K(){typeof l<"u"&&l.forEach(function(P){H(P)})}function G(P,T){if(typeof c>"u")return;const Z=typeof c=="string"?c:"",W=ut.env();Object.keys(W).forEach(function(N){
37
+ if(Z===""||N.lastIndexOf(Z,0)===0){const te=N.split("__").map(function(V,re){return re===0&&(V=V.substring(Z.length)),lr(V)});(T&&f.configs[te.join(".")]||!T)&&!A(P,te)&&B(te.join("."),W[N])}})}function X(P){let T;const Z=new Set;Object.keys(P).forEach(function(W){if(!Z.has(W)&&(T=w(W,f.coercions),typeof T=="function"))try{const N=j(W,T(P[W]));[].concat(f.aliases[W]||[],W).forEach(te=>{Z.add(te),P[te]=N})}catch(N){m=N}})}function se(P){return f.keys.forEach(T=>{~T.indexOf(".")||typeof P[T]>"u"&&
38
+ (P[T]=void 0)}),P}function U(P,T,Z,W=!1){Object.keys(Z).forEach(function(N){A(P,N.split("."))||(z(P,N.split("."),Z[N]),W&&(b[N]=!0),(T[N]||[]).forEach(function(te){A(P,te.split("."))||z(P,te.split("."),Z[N])}))})}function A(P,T){let Z=P;a["dot-notation"]||(T=[T.join(".")]),T.slice(0,-1).forEach(function(N){Z=Z[N]||{}});const W=T[T.length-1];return typeof Z!="object"?!1:W in Z}function z(P,T,Z){let W=P;a["dot-notation"]||(T=[T.join(".")]),T.slice(0,-1).forEach(function(le){le=ma(le),typeof W=="ob\
39
+ ject"&&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=ma(T[T.length-1]),te=w(T.join("."),f.arrays),V=Array.isArray(Z);let re=a["duplicate-arguments-array"];!re&&w(N,f.nargs)&&(re=!0,(!J(W[N])&&f.nargs[N]===1||Array.isArray(W[N])&&W[N].length===f.nargs[N])&&(W[N]=void 0)),Z===Ps()?W[N]=Ps(W[N]):Array.isArray(W[N])?re&&te&&V?W[N]=a["flatten-duplicate-arrays"]?W[N].concat(Z):(Array.
40
+ isArray(W[N][0])?W[N]:[W[N]]).concat([Z]):!re&&!!te==!!V?W[N]=Z:W[N]=W[N].concat([Z]):W[N]===void 0&&te?W[N]=V?Z:[Z]:re&&!(W[N]===void 0||w(N,f.counts)||w(N,f.bools))?W[N]=[W[N],Z]:W[N]=Z}function M(...P){P.forEach(function(T){Object.keys(T||{}).forEach(function(Z){f.aliases[Z]||(f.aliases[Z]=[].concat(o[Z]||[]),f.aliases[Z].concat(Z).forEach(function(W){if(/-/.test(W)&&a["camel-case-expansion"]){const N=lr(W);N!==Z&&f.aliases[Z].indexOf(N)===-1&&(f.aliases[Z].push(N),y[N]=!0)}}),f.aliases[Z].concat(
41
+ Z).forEach(function(W){if(W.length>1&&/[A-Z]/.test(W)&&a["camel-case-expansion"]){const N=ha(W,"-");N!==Z&&f.aliases[Z].indexOf(N)===-1&&(f.aliases[Z].push(N),y[N]=!0)}}),f.aliases[Z].forEach(function(W){f.aliases[W]=[Z].concat(f.aliases[Z].filter(function(N){return W!==N}))}))})})}function w(P,T){const Z=[].concat(f.aliases[P]||[],P),W=Object.keys(T),N=Z.find(te=>W.includes(te));return N?T[N]:!1}function R(P){const T=Object.keys(f);return[].concat(T.map(W=>f[W])).some(function(W){return Array.isArray(
42
+ 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 Y(P){if(P.match(g)||!P.match(/^-[^-]+/))return!1;let T=!0,Z;const W=P.slice(1).split("");for(let N=0;N<W.length;N++){if(Z=P.slice(N+2),!R(W[N])){T=!1;break}if(W[N+1]&&W[N+1]==="="||Z==="-"||/[A-Za-z]/.test(W[N])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(Z)||W[N+1]&&W[N+1].match(/\W/))break}return T}function Q(P){return a["unknown-options-as-args"]&&ie(P)}function ie(P){return P=
43
+ P.replace(/^-{3,}/,"--"),P.match(g)||Y(P)?!1:!C(P,/^-+([^=]+?)=[\s\S]*$/,p,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function oe(P){return!w(P,f.bools)&&!w(P,f.counts)&&`${P}`in u?u[P]:L(q(P))}function L(P){return{[Be.BOOLEAN]:!0,[Be.STRING]:"",[Be.NUMBER]:void 0,[Be.ARRAY]:[]}[P]}function q(P){let T=Be.BOOLEAN;return w(P,f.strings)?T=Be.STRING:w(P,f.numbers)?T=Be.NUMBER:w(P,f.bools)?T=Be.BOOLEAN:w(P,f.arrays)&&(T=Be.ARRAY),T}function J(P){return P===void 0}function ne(){
44
+ Object.keys(f.counts).find(P=>w(P,f.arrays)?(m=Error(_("Invalid configuration: %s, opts.count excludes opts.array.",P)),!0):w(P,f.nargs)?(m=Error(_("Invalid configuration: %s, opts.count excludes opts.narg.",P)),!0):!1)}return{aliases:Object.assign({},f.aliases),argv:Object.assign(E,v),configuration:a,defaulted:Object.assign({},b),error:m,newAliases:Object.assign({},y)}}}function fp(t){const e=[],r=Object.create(null);let n=!0;for(Object.keys(t).forEach(function(s){e.push([].concat(t[s],s))});n;){
45
+ 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 Ps(t){return t!==void 0?t+1:1}function ma(t){return t==="__proto__"?"___proto___":t}function dp(t){return typeof t=="string"&&(t[0]==="'"||t[0]==='"')&&t[t.length-1]===t[0]?
46
+ t.substring(1,t.length-1):t}var Is,Ns,Ts;const ga=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,ya=(Ns=(Is=process==null?void 0:process.versions)===null||Is===void 0?void 0:Is.node)!==null&&Ns!==void 0?Ns:(Ts=process==null?void 0:process.version)===null||Ts===void 0?void 0:Ts.slice(1);if(ya&&Number(ya.match(/^([^.]+)/)[1])<ga)throw Error(`yargs parser supports a minimum Node.js version of ${ga}. Read our version support policy: https://git\
47
+ hub.com/yargs/yargs-parser#supported-nodejs-versions`);const hp=process?process.env:{},_a=new lp({cwd:process.cwd,env:()=>hp,format:na,normalize:Ch,resolve:Ue,require:t=>{if(typeof require<"u")return require(t);if(t.match(/\.json$/))return JSON.parse(Es(t,"utf8"));throw Error("only .json config files are supported in ESM")}}),fr=function(e,r){return _a.parse(e.slice(),r).argv};fr.detailed=function(t,e){return _a.parse(t.slice(),e)},fr.camelCase=lr,fr.decamelize=ha,fr.looksLikeNumber=pa;function $a(){
48
+ return pp()?0:1}function pp(){return mp()&&!process.defaultApp}function mp(){return!!process.versions.electron}function gp(t){return t.slice($a()+1)}function yp(){return process.argv[$a()]}class Oe extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,Oe)}}const _p={fs:{readFileSync:Es,writeFile:jh},format:na,resolve:Ue,exists:t=>{try{return ta(t).isFile()}catch{return!1}}};let We;class $p{constructor(e){e=e||{},this.directory=
49
+ 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||function(){},this.cache[this.locale]||this._readLocaleFile(),
50
+ !this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),We.format.apply(We.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.cache[this.locale][r]&&(o=this.cache[this.locale][r][s===
51
+ 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),We.format.apply(We.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(e,r)&&(this.cache[this.locale][r]=e[r])}_taggedLiteral(e,...r){
52
+ 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);We.fs.writeFile(o,a,"utf-8",function(u){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),i(u)})}_readLocaleFile(){
53
+ let e={};const r=this._resolveLocaleFile(this.directory,this.locale);try{We.fs.readFileSync&&(e=JSON.parse(We.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=We.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){const s=We.resolve(e,"./",r.split("_")[0]+".json");this._fileExistsSync(s)&&(n=s)}return n}_fileExistsSync(e){
54
+ return We.exists(e)}}function vp(t,e){We=e;const r=new $p(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 bp=t=>vp(t,_p),wp="require is not supported by ESM",va="loading a directory of commands is not supported yet for ESM";let dr;try{dr=Dh(import.meta.url)}catch{dr=process.cwd()}const Ep=dr.substring(0,dr.lastIndexOf("node_modules")),Sp={assert:{notStrictEqual:Oh,strictEqual:Ah},cliui:ap,
55
+ findUp:cp,getEnv:t=>process.env[t],inspect:Lh,getCallerFile:()=>{throw new Oe(va)},getProcessArgvBin:yp,mainFilename:Ep||process.cwd(),Parser:fr,path:{basename:Nh,dirname:ws,extname:Ih,relative:Ph,resolve:Ue},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<"u"?process.stdout.columns:null},readFileSync:Es,require:()=>{throw new Oe(wp)},requireDirectory:()=>{
56
+ throw new Oe(va)},stringWidth:t=>[...t].length,y18n:bp({directory:Ue(dr,"../../../locales"),updateFiles:!1})};function Ke(t,e,r,n){r.assert.notStrictEqual(t,e,n)}function ba(t,e){e.assert.strictEqual(typeof t,"string")}function xr(t){return Object.keys(t)}function Ae(t){return!!t&&!!t.then&&typeof t.then=="function"}function hr(t){const r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,s=r.shift();if(!s)throw new Error(`No command found in: ${t}`);const i={cmd:s.replace(n,
57
+ ""),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 Rp=["first","second","third","fourth","fifth","sixth"];function ce(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},t,e]:[hr(`cmd ${t}`),e,r]}try{let s=0;const[i,o,a]=n(),u=[].slice.call(o);for(;u.length&&
58
+ 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(d=>{const h=u.shift(),y=wa(h);d.cmd.filter(_=>_===y||_==="*").length===0&&Ea(y,d.cmd,s),s+=1}),i.optional.forEach(d=>{if(u.length===0)return;const h=u.shift(),y=wa(h);d.cmd.
59
+ filter(_=>_===y||_==="*").length===0&&Ea(y,d.cmd,s),s+=1})}catch(s){console.warn(s.stack)}}function wa(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function Ea(t,e,r){throw new Oe(`Invalid ${Rp[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}class Ap{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,s=!1){if(ce("<array|function> [boolean] [boolean] [boolean]",[e,r,n],arguments.length),Array.isArray(e)){for(let i=0;i<
60
+ 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=this.globalMiddleware.filter(s=>{const i=[...n[r]||[],r];return s.option?!i.includes(s.option):
61
+ !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 Op(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}function pr(t,e,r,n){return r.reduce((s,i)=>{if(i.applyBeforeValidation!==n)return s;if(i.mutates){if(i.applied)return s;i.applied=!0}if(Ae(
62
+ 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 mr(t,e,r=n=>{throw n}){try{const n=Cp(t)?t():t;return Ae(n)?n.then(s=>e(s)):e(n)}catch(n){return r(n)}}function Cp(t){return typeof t=="function"}function Pp(t){if(typeof require>"u")return null;for(let e=0,r=Object.keys(require.cache),n;e<r.length;e++)if(n=require.cache[r[e]],n.exports===t)return n;return null}const Gt=/(^\*)|(^\$0)/;
63
+ class Ip{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.has(a))return l;this.requireCache.add(a),this.addHandler(l)}return l},this.shim.requireDirectory(
64
+ {require:r,filename:n},e,s)}addHandler(e,r,n,s,i,o){let a=[];const u=Op(i);if(s=s||(()=>{}),Array.isArray(e))if(Tp(e))[e,...a]=e;else for(const l of e)this.addHandler(l);else if(Lp(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);return}else if(Sa(n)){this.addHandler([e].concat(a),r,n.builder,n.handler,n.middlewares,n.deprecated);
65
+ return}if(typeof e=="string"){const l=hr(e);a=a.map(h=>hr(h).cmd);let c=!1;const d=[l.cmd].concat(a).filter(h=>Gt.test(h)?(c=!0,!1):!0);d.length===0&&c&&d.push("$0"),c&&(l.cmd=d[0],a=d.slice(1),e=e.replace(Gt,l.cmd)),a.forEach(h=>{this.aliasMap[h]=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.demanded,optional:l.optional},c&&(this.defaultCommand=this.handlers[l.cmd])}}getCommandHandlers(){
66
+ 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 d=this.applyBuilderUpdateUsageAndParse(c,a,r,n.aliases,l,s,i,o);return Ae(d)?d.then(h=>this.applyMiddlewareAndGetResult(
67
+ c,a,h.innerArgv,u,i,h.aliases,r)):this.applyMiddlewareAndGetResult(c,a,d.innerArgv,u,i,d.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,s,i,o,a,u){const l=r.builder;let c=n;if(js(l)){n.getInternalMethods().getUsageInstance().freeze();const d=l(n.getInternalMethods().reset(s),u);if(Ae(d))return d.then(h=>(c=Xp(h)?h:n,this.parseAndUpdateUsage(e,r,c,i,o,a)))}else jp(l)&&(n.getInternalMethods().getUsageInstance().freeze(),c=n.getInternalMethods().reset(s),Object.keys(r.builder).forEach(d=>{c.option(
68
+ d,l[d])}));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})):{aliases:n.parsed.aliases,innerArgv:a}}shouldUpdateUsage(e){return!e.
69
+ getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,r){const n=Gt.test(r.original)?r.original.replace(Gt,"").trim():r.original,s=e.filter(i=>!Gt.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(i,u,o.parsed.error,e);n=mr(n,c=>(l(c),c))}if(r.handler&&!o.getInternalMethods().
70
+ getHasOutput()){o.getInternalMethods().setHasOutput();const l=!!o.getOptions().configuration["populate--"];o.getInternalMethods().postProcess(n,l,!1,!1),n=pr(n,o,a,!1),n=mr(n,c=>{const d=r.handler(c);return Ae(d)?d.then(()=>c):c}),e||o.getInternalMethods().getUsageInstance().cacheHelpMessage(),Ae(n)&&!o.getInternalMethods().hasParseCallback()&&n.catch(c=>{try{o.getInternalMethods().getUsageInstance().fail(null,c)}catch{}})}return e||(s.commands.pop(),s.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,r,n,s,i,o,a){
71
+ 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=pr(n,a,l,!0);return Ae(c)?c.then(d=>this.handleValidationAndGetResult(e,r,d,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(0),o=e.optional.slice(0),a={};for(this.validation.positionalCount(i.length,r._.length);i.length;){
72
+ 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:{},alias:{},demand:{}},n=hr(e);return n.demanded.forEach(s=>{const[i,...o]=s.cmd;s.variadic&&(r.
73
+ 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={};const o=[];if(Object.keys(r).forEach(l=>{r[l].map(c=>{i.configuration["unknown-options-a\
74
+ s-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)&&(r[c]||(r[c]=u.argv[c]),!this.isInConfigs(s,c)&&!this.isDefaulted(s,c)&&Object.prototype.
75
+ 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.prototype.hasOwnProperty.call(s,r))||n.some(s=>Object.prototype.hasOwnProperty.call(
76
+ s,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){const n=Gt.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(js(r))return r(e,!0);Sa(r)||Object.keys(r).forEach(n=>{e.option(n,r[n])})}moduleName(e){const r=Pp(e);if(!r)throw new Error(`No \
77
+ 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;Ke(s,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){const e=this.frozens.pop();Ke(e,void 0,this.shim),{handlers:this.
78
+ handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}}function Np(t,e,r,n){return new Ip(t,e,r,n)}function Sa(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function Tp(t){return t.every(e=>typeof e=="string")}function js(t){return typeof t=="function"}function jp(t){return typeof t=="object"}function Lp(t){return typeof t=="object"&&!Array.isArray(
79
+ t)}function gr(t={},e=()=>!0){const r={};return xr(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}function yr(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 Dp(t){return typeof t=="boolean"}function xp(t,e){const r=e.y18n.__,n={},s=[];n.failFn=function(k){s.push(k)};let i=null,o=null,a=!0;n.showHelpOnFail=function(k=!0,j){const[x,H]=typeof k=="string"?[!0,k]:[k,j];return t.getInternalMethods().
80
+ isGlobalContext()&&(o=H),i=H,a=x,n};let u=!1;n.fail=function(k,j){const x=t.getInternalMethods().getLoggerInstance();if(s.length)for(let H=s.length-1;H>=0;--H){const K=s[H];if(Dp(K)){if(j)throw j;if(k)throw Error(k)}else K(k,j,n)}else{if(t.getExitProcess()&&yr(!0),!u){u=!0,a&&(t.showHelp("error"),x.error()),(k||j)&&x.error(k||j);const H=i||o;H&&((k||j)&&x.error(""),x.error(H))}if(j=j||new Oe(k),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,j);throw j}};
81
+ let l=[],c=!1;n.usage=(D,k)=>D===null?(c=!0,l=[],n):(c=!1,l.push([D,k||""]),n),n.getUsage=()=>l,n.getUsageDisabled=()=>c,n.getPositionalGroupName=()=>r("Positionals:");let d=[];n.example=(D,k)=>{d.push([D,k||""])};let h=[];n.command=function(k,j,x,H,K=!1){x&&(h=h.map(G=>(G[2]=!1,G))),h.push([k,j||"",x,H,K])},n.getCommands=()=>h;let y={};n.describe=function(k,j){Array.isArray(k)?k.forEach(x=>{n.describe(x,j)}):typeof k=="object"?Object.keys(k).forEach(x=>{n.describe(x,k[x])}):y[k]=j},n.getDescriptions=
82
+ ()=>y;let b=[];n.epilog=D=>{b.push(D)};let _=!1,f;n.wrap=D=>{_=!0,f=D},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(_||(f=I(),_=!0),f);const g="__yargsString__:";n.deferY18nLookup=D=>g+D,n.help=function(){if($)return $;m();const k=t.customScriptName?t.$0:e.path.basename(t.$0),j=t.getDemandedOptions(),x=t.getDemandedCommands(),H=t.getDeprecatedOptions(),K=t.getGroups(),G=t.getOptions();let X=[];X=X.concat(Object.keys(y)),X=X.concat(Object.keys(j)),X=X.concat(Object.keys(x)),X=X.concat(Object.
83
+ keys(G.default)),X=X.filter(E),X=Object.keys(X.reduce((C,Y)=>(Y!=="_"&&(C[Y]=!0),C),{}));const se=n.getWrap(),U=e.cliui({width:se,wrap:!!se});if(!c){if(l.length)l.forEach(C=>{U.div({text:`${C[0].replace(/\$0/g,k)}`}),C[1]&&U.div({text:`${C[1]}`,padding:[1,0,0,0]})}),U.div();else if(h.length){let C=null;x._?C=`${k} <${r("command")}>
84
+ `:C=`${k} [${r("command")}]
85
+ `,U.div(`${C}`)}}if(h.length>1||h.length===1&&!h[0][2]){U.div(r("Commands:"));const C=t.getInternalMethods().getContext(),Y=C.commands.length?`${C.commands.join(" ")} `:"";t.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(h=h.sort((ie,oe)=>ie[0].localeCompare(oe[0])));const Q=k?`${k} `:"";h.forEach(ie=>{const oe=`${Q}${Y}${ie[0].replace(/^\$0 ?/,"")}`;U.span({text:oe,padding:[0,2,0,2],width:p(h,se,`${k}${Y}`)+4},{text:ie[1]});const L=[];ie[2]&&L.push(`[${r("default")}]`),ie[3]&&
86
+ 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?U.div({text:L.join(" "),padding:[0,0,0,2],align:"right"}):U.div()}),U.div()}const A=(Object.keys(G.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);X=X.filter(C=>!t.parsed.newAliases[C]&&A.every(Y=>(G.alias[Y]||[]).indexOf(C)===-1));const z=r("Options:");K[z]||(K[z]=[]),v(X,G.alias,K,z);const M=C=>/^--/.test(Mr(C)),
87
+ w=Object.keys(K).filter(C=>K[C].length>0).map(C=>{const Y=K[C].filter(E).map(Q=>{if(A.includes(Q))return Q;for(let ie=0,oe;(oe=A[ie])!==void 0;ie++)if((G.alias[oe]||[]).includes(Q))return oe;return Q});return{groupName:C,normalizedKeys:Y}}).filter(({normalizedKeys:C})=>C.length>0).map(({groupName:C,normalizedKeys:Y})=>{const Q=Y.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
+ (L,q)=>M(L)===M(q)?0:M(L)?1:-1).join(", "),ie),{});return{groupName:C,normalizedKeys:Y,switches:Q}});if(w.filter(({groupName:C})=>C!==n.getPositionalGroupName()).some(({normalizedKeys:C,switches:Y})=>!C.every(Q=>M(Y[Q])))&&w.filter(({groupName:C})=>C!==n.getPositionalGroupName()).forEach(({normalizedKeys:C,switches:Y})=>{C.forEach(Q=>{M(Y[Q])&&(Y[Q]=Mp(Y[Q],4))})}),w.forEach(({groupName:C,normalizedKeys:Y,switches:Q})=>{U.div(C),Y.forEach(ie=>{const oe=Q[ie];let L=y[ie]||"",q=null;L.includes(g)&&
89
+ (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 J=T=>typeof T=="string"?`[${r("deprecated: %s",T)}]`:`[${r("deprecated")}]`,ne=[ie in H?J(H[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(" ");U.span({text:Mr(oe),padding:[0,2,0,2+Ra(oe)],width:p(Q,se)+4},L);const P=t.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;ne&&!P?U.div({text:ne,padding:[0,0,0,2],align:"right"}):U.div()}),U.div()}),d.length&&(U.div(r("Examples:")),d.forEach(C=>{C[0]=C[0].replace(/\$0/g,k)}),d.forEach(C=>{C[1]===""?U.div({text:C[0],padding:[0,2,0,2]}):U.div({text:C[0],padding:[0,2,0,2],width:p(d,se)+4},{text:C[1]})}),
91
+ U.div()),b.length>0){const C=b.map(Y=>Y.replace(/\$0/g,k)).join(`
92
+ `);U.div(`${C}
93
+ `)}return U.toString().replace(/\s*$/,"")};function p(D,k,j){let x=0;return Array.isArray(D)||(D=Object.values(D).map(H=>[H])),D.forEach(H=>{x=Math.max(e.stringWidth(j?`${j} ${Mr(H[0])}`:Mr(H[0]))+Ra(H[0]),x)}),k&&(x=Math.min(x,parseInt((k*.5).toString(),10))),x}function m(){const D=t.getDemandedOptions(),k=t.getOptions();(Object.keys(k.alias)||[]).forEach(j=>{k.alias[j].forEach(x=>{y[x]&&n.describe(j,y[x]),x in D&&t.demandOption(j,D[x]),k.boolean.includes(x)&&t.boolean(j),k.count.includes(x)&&t.
94
+ count(j),k.string.includes(x)&&t.string(j),k.normalize.includes(x)&&t.normalize(j),k.array.includes(x)&&t.array(j),k.number.includes(x)&&t.number(j)})})}let $;n.cacheHelpMessage=function(){$=this.help()},n.clearCachedHelpMessage=function(){$=void 0},n.hasCachedHelpMessage=function(){return!!$};function v(D,k,j,x){let H=[],K=null;return Object.keys(j).forEach(G=>{H=H.concat(j[G])}),D.forEach(G=>{K=[G].concat(k[G]),K.some(X=>H.indexOf(X)!==-1)||j[x].push(G)}),H}function E(D){return t.getOptions().
95
+ hiddenOptions.indexOf(D)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}n.showHelp=D=>{const k=t.getInternalMethods().getLoggerInstance();D||(D="error"),(typeof D=="function"?D:k[D])(n.help())},n.functionDescription=D=>["(",D.name?e.Parser.decamelize(D.name,"-"):r("generated-value"),")"].join(""),n.stringifiedValues=function(k,j){let x="";const H=j||", ",K=[].concat(k);return!k||!K.length||K.forEach(G=>{x.length&&(x+=H),x+=JSON.stringify(G)}),x};function S(D,k){let j=`[${r("default:")} `;if(D===
96
+ void 0&&!k)return null;if(k)j+=k;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 k=t.getInternalMethods().getLoggerInstance();D||(D="error"),(typeof D=="function"?D:k[D])(F)},n.reset=function(k){return i=null,u=!1,l=[],c=!1,b=[],d=[],h=[],y=gr(y,j=>!k[j]),n};const B=[];return n.freeze=function(){
97
+ B.push({failMessage:i,failureOutput:u,usages:l,usageDisabled:c,epilogs:b,examples:d,commands:h,descriptions:y})},n.unfreeze=function(k=!1){const j=B.pop();j&&(k?(y={...j.descriptions,...y},h=[...j.commands,...h],l=[...j.usages,...l],d=[...j.examples,...d],b=[...j.epilogs,...b]):{failMessage:i,failureOutput:u,usages:l,usageDisabled:c,epilogs:b,examples:d,commands:h,descriptions:y}=j)},n}function Ls(t){return typeof t=="object"}function Mp(t,e){return Ls(t)?{text:t.text,indentation:t.indentation+e}:
98
+ {text:t,indentation:e}}function Ra(t){return Ls(t)?t.indentation:0}function Mr(t){return Ls(t)?t.text:t}const kp=`###-begin-{{app_name}}-completions-###
99
99
  #
100
100
  # yargs command completion script
101
101
  #
@@ -123,7 +123,7 @@ _{{app_name}}_yargs_completions()
123
123
  }
124
124
  complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
125
125
  ###-end-{{app_name}}-completions-###
126
- `,Km=`#compdef {{app_name}}
126
+ `,qp=`#compdef {{app_name}}
127
127
  ###-begin-{{app_name}}-completions-###
128
128
  #
129
129
  # yargs command completion script
@@ -142,92 +142,92 @@ _{{app_name}}_yargs_completions()
142
142
  }
143
143
  compdef _{{app_name}}_yargs_completions {{app_name}}
144
144
  ###-end-{{app_name}}-completions-###
145
- `;class Ym{constructor(e,r,n,i){var s,o,a;this.yargs=e,this.usage=r,this.command=n,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(a=((s=this.shim.getEnv("SHELL"))===null||s===void 0?void 0:s.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,i){const s=this.command.getCommandHandlers();for(let a=0,u=e.
146
- length;a<u;++a)if(s[e[a]]&&s[e[a]].builder){const l=s[e[a]].builder;if(fs(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),i(null,o)}commandCompletions(e,r,n){const i=this.yargs.getInternalMethods().getContext().commands;!n.match(/^-/)&&i[i.length-1]!==n&&!this.previousArgHasChoices(
147
- r)&&this.usage.getCommands().forEach(s=>{const o=jr(s[0]).cmd;if(r.indexOf(o)===-1)if(!this.zshShell)e.push(o);else{const a=s[1]||"";e.push(o.replace(/:/g,"\\:")+":"+a)}})}optionCompletions(e,r,n,i){if((i.match(/^-/)||i===""&&e.length===0)&&!this.previousArgHasChoices(r)){const s=this.yargs.getOptions(),o=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(s.key).forEach(a=>{const u=!!s.configuration["boolean-negation"]&&s.boolean.includes(a);!o.includes(a)&&!s.hiddenOptions.
148
- includes(a)&&!this.argsContainKey(r,a,u)&&this.completeOptionKey(a,e,i,u&&!!s.default[a])})}}choicesFromOptionsCompletions(e,r,n,i){if(this.previousArgHasChoices(r)){const s=this.getPreviousArgChoices(r);s&&s.length>0&&e.push(...s.map(o=>o.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(e,r,n,i){if(i===""&&e.length>0&&this.previousArgHasChoices(r))return;const s=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],o=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().
149
- getContext().commands.length+1),a=s[n._.length-o-1];if(!a)return;const u=this.yargs.getOptions().choices[a]||[];for(const l of u)l.startsWith(i)&&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 i=r.replace(/^-+/,""),s=this.yargs.getOptions(),o=[i,...this.yargs.getAliases()[i]||[]];let a;for(const u of o)if(Object.prototype.hasOwnProperty.call(s.key,u)&&Array.
150
- isArray(s.choices[u])){a=s.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 i=s=>e.indexOf((/^[^0-9]$/.test(s)?"-":"--")+s)!==-1;if(i(r)||n&&i(`no-${r}`))return!0;if(this.aliases){for(const s of this.aliases[r])if(i(s))return!0}return!1}completeOptionKey(e,r,n,i){var s,o,a,u;let l=e;if(this.zshShell){const E=this.usage.getDescriptions(),$=(o=(s=this===null||this===
151
- void 0?void 0:this.aliases)===null||s===void 0?void 0:s[e])===null||o===void 0?void 0:o.find(g=>{const p=E[g];return typeof p=="string"&&p.length>0}),y=$?E[$]:void 0,f=(u=(a=E[e])!==null&&a!==void 0?a:y)!==null&&u!==void 0?u:"";l=`${e.replace(/:/g,"\\:")}:${f.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}const c=E=>/^--/.test(E),d=E=>/^[^0-9]$/.test(E),h=!c(n)&&d(e)?"-":"--";r.push(h+l),i&&r.push(h+"no-"+l)}customCompletion(e,r,n,i){if(ot(this.customCompletionFunction,null,this.
152
- shim),Xm(this.customCompletionFunction)){const s=this.customCompletionFunction(n,r);return Le(s)?s.then(o=>{this.shim.process.nextTick(()=>{i(null,o)})}).catch(o=>{this.shim.process.nextTick(()=>{i(o,void 0)})}):i(null,s)}else return Qm(this.customCompletionFunction)?this.customCompletionFunction(n,r,(s=i)=>this.defaultCompletion(e,r,n,s),s=>{i(null,s)}):this.customCompletionFunction(n,r,s=>{i(null,s)})}getCompletion(e,r){const n=e.length?e[e.length-1]:"",i=this.yargs.parse(e,!0),s=this.customCompletionFunction?
153
- o=>this.customCompletion(e,o,n,r):o=>this.defaultCompletion(e,o,n,r);return Le(i)?i.then(s):s(i)}generateCompletionScript(e,r){let n=this.zshShell?Km:Wm;const i=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,i),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 Jm(t,e,r,n){return new Ym(t,e,r,n)}function Xm(t){return t.length<3}function Qm(t){
154
- return t.length>3}function Zm(t,e){if(t.length===0)return e.length;if(e.length===0)return t.length;const r=[];let n;for(n=0;n<=e.length;n++)r[n]=[n];let i;for(i=0;i<=t.length;i++)r[0][i]=i;for(n=1;n<=e.length;n++)for(i=1;i<=t.length;i++)e.charAt(n-1)===t.charAt(i-1)?r[n][i]=r[n-1][i-1]:n>1&&i>1&&e.charAt(n-2)===t.charAt(i-1)&&e.charAt(n-1)===t.charAt(i-2)?r[n][i]=r[n-2][i-2]+1:r[n][i]=Math.min(r[n-1][i-1]+1,Math.min(r[n][i-1]+1,r[n-1][i]+1));return r[e.length][t.length]}const vu=["$0","--","_"];
155
- function e0(t,e,r){const n=r.y18n.__,i=r.y18n.__n,s={};s.nonOptionCount=function(d){const h=t.getDemandedCommands(),$=d._.length+(d["--"]?d["--"].length:0)-t.getInternalMethods().getContext().commands.length;h._&&($<h._.min||$>h._.max)&&($<h._.min?h._.minMsg!==void 0?e.fail(h._.minMsg?h._.minMsg.replace(/\$0/g,$.toString()).replace(/\$1/,h._.min.toString()):null):e.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",$,$.toString(),
156
- h._.min.toString())):$>h._.max&&(h._.maxMsg!==void 0?e.fail(h._.maxMsg?h._.maxMsg.replace(/\$0/g,$.toString()).replace(/\$1/,h._.max.toString()):null):e.fail(i("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",$,$.toString(),h._.max.toString()))))},s.positionalCount=function(d,h){h<d&&e.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",h,h+"",d+""))},s.requiredArguments=
157
- function(d,h){let E=null;for(const $ of Object.keys(h))(!Object.prototype.hasOwnProperty.call(d,$)||typeof d[$]>"u")&&(E=E||{},E[$]=h[$]);if(E){const $=[];for(const f of Object.keys(E)){const g=E[f];g&&$.indexOf(g)<0&&$.push(g)}const y=$.length?`
158
- ${$.join(`
159
- `)}`:"";e.fail(i("Missing required argument: %s","Missing required arguments: %s",Object.keys(E).length,Object.keys(E).join(", ")+y))}},s.unknownArguments=function(d,h,E,$,y=!0){var f;const g=t.getInternalMethods().getCommandInstance().getCommands(),p=[],m=t.getInternalMethods().getContext();if(Object.keys(d).forEach(D=>{!vu.includes(D)&&!Object.prototype.hasOwnProperty.call(E,D)&&!Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),D)&&!s.isValidAndSomeAliasIsNotNew(D,
160
- h)&&p.push(D)}),y&&(m.commands.length>0||g.length>0||$)&&d._.slice(m.commands.length).forEach(D=>{g.includes(""+D)||p.push(""+D)}),y){const v=((f=t.getDemandedCommands()._)===null||f===void 0?void 0:f.max)||0,_=m.commands.length+v;_<d._.length&&d._.slice(_).forEach(b=>{b=String(b),!m.commands.includes(b)&&!p.includes(b)&&p.push(b)})}p.length&&e.fail(i("Unknown argument: %s","Unknown arguments: %s",p.length,p.map(D=>D.trim()?D:`"${D}"`).join(", ")))},s.unknownCommands=function(d){const h=t.getInternalMethods().
161
- getCommandInstance().getCommands(),E=[],$=t.getInternalMethods().getContext();return($.commands.length>0||h.length>0)&&d._.slice($.commands.length).forEach(y=>{h.includes(""+y)||E.push(""+y)}),E.length>0?(e.fail(i("Unknown command: %s","Unknown commands: %s",E.length,E.join(", "))),!0):!1},s.isValidAndSomeAliasIsNotNew=function(d,h){if(!Object.prototype.hasOwnProperty.call(h,d))return!1;const E=t.parsed.newAliases;return[d,...h[d]].some($=>!Object.prototype.hasOwnProperty.call(E,$)||!E[d])},s.limitedChoices=
162
- function(d){const h=t.getOptions(),E={};if(!Object.keys(h.choices).length)return;Object.keys(d).forEach(f=>{vu.indexOf(f)===-1&&Object.prototype.hasOwnProperty.call(h.choices,f)&&[].concat(d[f]).forEach(g=>{h.choices[f].indexOf(g)===-1&&g!==void 0&&(E[f]=(E[f]||[]).concat(g))})});const $=Object.keys(E);if(!$.length)return;let y=n("Invalid values:");$.forEach(f=>{y+=`
163
- ${n("Argument: %s, Given: %s, Choices: %s",f,e.stringifiedValues(E[f]),e.stringifiedValues(h.choices[f]))}`}),e.fail(y)};let o={};s.implies=function(d,h){ce("<string|object> [array|number|string]",[d,h],arguments.length),typeof d=="object"?Object.keys(d).forEach(E=>{s.implies(E,d[E])}):(t.global(d),o[d]||(o[d]=[]),Array.isArray(h)?h.forEach(E=>s.implies(d,E)):(ot(h,void 0,r),o[d].push(h)))},s.getImplied=function(){return o};function a(c,d){const h=Number(d);return d=isNaN(h)?d:h,typeof d=="num\
164
- ber"?d=c._.length>=d:d.match(/^--no-.+/)?(d=d.match(/^--no-(.+)/)[1],d=!Object.prototype.hasOwnProperty.call(c,d)):d=Object.prototype.hasOwnProperty.call(c,d),d}s.implications=function(d){const h=[];if(Object.keys(o).forEach(E=>{const $=E;(o[E]||[]).forEach(y=>{let f=$;const g=y;f=a(d,f),y=a(d,y),f&&!y&&h.push(` ${$} -> ${g}`)})}),h.length){let E=`${n("Implications failed:")}
165
- `;h.forEach($=>{E+=$}),e.fail(E)}};let u={};s.conflicts=function(d,h){ce("<string|object> [array|string]",[d,h],arguments.length),typeof d=="object"?Object.keys(d).forEach(E=>{s.conflicts(E,d[E])}):(t.global(d),u[d]||(u[d]=[]),Array.isArray(h)?h.forEach(E=>s.conflicts(d,E)):u[d].push(h))},s.getConflicting=()=>u,s.conflicting=function(d){Object.keys(d).forEach(h=>{u[h]&&u[h].forEach(E=>{E&&d[h]!==void 0&&d[E]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",h,E))})}),t.getInternalMethods().
166
- getParserConfiguration()["strip-dashed"]&&Object.keys(u).forEach(h=>{u[h].forEach(E=>{E&&d[r.Parser.camelCase(h)]!==void 0&&d[r.Parser.camelCase(E)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",h,E))})})},s.recommendCommands=function(d,h){h=h.sort((f,g)=>g.length-f.length);let $=null,y=1/0;for(let f=0,g;(g=h[f])!==void 0;f++){const p=Zm(d,g);p<=3&&p<y&&(y=p,$=g)}$&&e.fail(n("Did you mean %s?",$))},s.reset=function(d){return o=xr(o,h=>!d[h]),u=xr(u,h=>!d[h]),s};const l=[];return s.
167
- freeze=function(){l.push({implied:o,conflicting:u})},s.unfreeze=function(){const d=l.pop();ot(d,void 0,r),{implied:o,conflicting:u}=d},s}let hs=[],qr;function ps(t,e,r,n){qr=n;let i={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if(typeof t.extends!="string")return i;const s=/\.json|\..*rc$/.test(t.extends);let o=null;if(s)o=r0(e,t.extends);else try{o=require.resolve(t.extends)}catch{return t}t0(o),hs.push(o),i=s?JSON.parse(qr.readFileSync(o,"utf8")):require(t.extends),delete t.extends,
168
- i=ps(i,qr.path.dirname(o),r,qr)}return hs=[],r?$u(i,t):Object.assign({},i,t)}function t0(t){if(hs.indexOf(t)>-1)throw new je(`Circular extended configurations: '${t}'.`)}function r0(t,e){return qr.path.resolve(t,e)}function $u(t,e){const r={};function n(i){return i&&typeof i=="object"&&!Array.isArray(i)}Object.assign(r,t);for(const i of Object.keys(e))n(e[i])&&n(r[i])?r[i]=$u(t[i],e[i]):r[i]=e[i];return r}var ue=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");
169
- if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},S=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)},Fe,Yt,Ur,Ze,We,hn,Nt,Jt,pn,et,mn,tt,Et,Ke,rt,gn,pr,ke,le,yn,En,Ye,Xt,mr,Qt,Tt,Dn,de,Zt,er,tr,he,vn,Dt,Ie;function n0(t){return(e=[],r=t.process.cwd(),n)=>{const i=new i0(e,r,n,t);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}const _u=Symbol("copyDoubleDash"),wu=Symbol("copyDoubleDash"),ms=Symbol("deleteFromParserHintObject"),bu=Symbol("emitWarning"),Au=Symbol("freeze"),Cu=Symbol(
171
- "getDollarZero"),rr=Symbol("getParserConfiguration"),Su=Symbol("getUsageConfiguration"),gs=Symbol("guessLocale"),Ru=Symbol("guessVersion"),Ou=Symbol("parsePositionalNumbers"),ys=Symbol("pkgUp"),Lt=Symbol("populateParserHintArray"),gr=Symbol("populateParserHintSingleValueDictionary"),Es=Symbol("populateParserHintArrayDictionary"),Ds=Symbol("populateParserHintDictionary"),vs=Symbol("sanitizeKey"),$s=Symbol("setKey"),_s=Symbol("unfreeze"),Iu=Symbol("validateAsync"),Fu=Symbol("getCommandInstance"),Pu=Symbol(
172
- "getContext"),Nu=Symbol("getHasOutput"),Tu=Symbol("getLoggerInstance"),Lu=Symbol("getParseContext"),ju=Symbol("getUsageInstance"),ku=Symbol("getValidationInstance"),$n=Symbol("hasParseCallback"),Bu=Symbol("isGlobalContext"),nr=Symbol("postProcess"),xu=Symbol("rebase"),ws=Symbol("reset"),Hr=Symbol("runYargsParserAndExecuteCommands"),bs=Symbol("runValidation"),Mu=Symbol("setHasOutput"),ir=Symbol("kTrackManuallySetKeys");class i0{constructor(e=[],r,n,i){this.customScriptName=!1,this.parsed=!1,Fe.set(
173
- this,void 0),Yt.set(this,void 0),Ur.set(this,{commands:[],fullCommands:[]}),Ze.set(this,null),We.set(this,null),hn.set(this,"show-hidden"),Nt.set(this,null),Jt.set(this,!0),pn.set(this,{}),et.set(this,!0),mn.set(this,[]),tt.set(this,void 0),Et.set(this,{}),Ke.set(this,!1),rt.set(this,null),gn.set(this,!0),pr.set(this,void 0),ke.set(this,""),le.set(this,void 0),yn.set(this,void 0),En.set(this,{}),Ye.set(this,null),Xt.set(this,null),mr.set(this,{}),Qt.set(this,{}),Tt.set(this,void 0),Dn.set(this,!1),
174
- de.set(this,void 0),Zt.set(this,!1),er.set(this,!1),tr.set(this,!1),he.set(this,void 0),vn.set(this,{}),Dt.set(this,null),Ie.set(this,void 0),ue(this,de,i,"f"),ue(this,Tt,e,"f"),ue(this,Yt,r,"f"),ue(this,yn,n,"f"),ue(this,tt,new Lm(this),"f"),this.$0=this[Cu](),this[ws](),ue(this,Fe,S(this,Fe,"f"),"f"),ue(this,he,S(this,he,"f"),"f"),ue(this,Ie,S(this,Ie,"f"),"f"),ue(this,le,S(this,le,"f"),"f"),S(this,le,"f").showHiddenOpt=S(this,hn,"f"),ue(this,pr,this[wu](),"f")}addHelpOpt(e,r){const n="help";return ce(
175
- "[string|boolean] [string]",[e,r],arguments.length),S(this,rt,"f")&&(this[ms](S(this,rt,"f")),ue(this,rt,null,"f")),e===!1&&r===void 0?this:(ue(this,rt,typeof e=="string"?e:n,"f"),this.boolean(S(this,rt,"f")),this.describe(S(this,rt,"f"),r||S(this,he,"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:S(this,hn,"f");return this.boolean(
176
- n),this.describe(n,r||S(this,he,"f").deferY18nLookup("Show hidden options")),S(this,le,"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[Es](this.alias.bind(this),"alias",e,r),this}array(e){return ce("<array|string>",[e],arguments.length),this[Lt]("array",e),this[ir](e),this}boolean(e){return ce("<array|string>",[e],arguments.length),this[Lt]("boolean",e),this[ir](e),this}check(e,r){
177
- return ce("<function> [boolean]",[e,r],arguments.length),this.middleware((n,i)=>Br(()=>e(n,i.getOptions()),s=>(s?(typeof s=="string"||s instanceof Error)&&S(this,he,"f").fail(s.toString(),s):S(this,he,"f").fail(S(this,de,"f").y18n.__("Argument check failed: %s",e.toString())),n),s=>(S(this,he,"f").fail(s.message?s.message:s.toString(),s),n)),!1,r),this}choices(e,r){return ce("<object|string|array> [string|array]",[e,r],arguments.length),this[Es](this.choices.bind(this),"choices",e,r),this}coerce(e,r){
178
- if(ce("<object|string|array> [function]",[e,r],arguments.length),Array.isArray(e)){if(!r)throw new je("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 je("coerce callback must be provided");return S(this,le,"f").key[e]=!0,S(this,tt,"f").addCoerceMiddleware((n,i)=>{let s;return Object.prototype.hasOwnProperty.call(n,e)?Br(()=>(s=i.getAliases(),r(n[e])),a=>{n[e]=
179
- a;const u=i.getInternalMethods().getParserConfiguration()["strip-aliased"];if(s[e]&&u!==!0)for(const l of s[e])n[l]=a;return n},a=>{throw new je(a.message)}):n},e),this}conflicts(e,r){return ce("<string|object> [string|array]",[e,r],arguments.length),S(this,Ie,"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=ps(e,S(this,Yt,"f"),this[rr]()["deep-merge-config"]||!1,S(this,de,"\
180
- f")),S(this,le,"f").configObjects=(S(this,le,"f").configObjects||[]).concat(e),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(e,r||S(this,he,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(i=>{S(this,le,"f").config[i]=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),ue(this,We,e||S(this,We,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion\
181
- script"),this.command(S(this,We,"f"),r),n&&S(this,Ze,"f").registerFunction(n),this}command(e,r,n,i,s,o){return ce("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,r,n,i,s,o],arguments.length),S(this,Fe,"f").addHandler(e,r,n,i,s,o),this}commands(e,r,n,i,s,o){return this.command(e,r,n,i,s,o)}commandDir(e,r){ce("<string> [object]",[e,r],arguments.length);const n=S(this,yn,"f")||S(this,de,"f").require;return S(this,Fe,"f").addDirectory(e,n,S(this,de,
182
- "f").getCallerFile(),r),this}count(e){return ce("<array|string>",[e],arguments.length),this[Lt]("count",e),this[ir](e),this}default(e,r,n){return ce("<object|string|array> [*] [string]",[e,r,n],arguments.length),n&&(mu(e,S(this,de,"f")),S(this,le,"f").defaultDescription[e]=n),typeof r=="function"&&(mu(e,S(this,de,"f")),S(this,le,"f").defaultDescription[e]||(S(this,le,"f").defaultDescription[e]=S(this,he,"f").functionDescription(r)),r=r.call()),this[gr](this.default.bind(this),"default",e,r),this}defaults(e,r,n){
183
- return this.default(e,r,n)}demandCommand(e=1,r,n,i){return ce("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,r,n,i],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),S(this,le,"f").demandedCommands._={min:e,max:r,minMsg:n,maxMsg:i},this}demand(e,r,n){return Array.isArray(r)?(r.forEach(i=>{ot(n,!0,S(this,de,"f")),this.demandOption(i,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof e=="number"?(ot(n,!0,S(this,de,"f")),this.demandCommand(e,r,n,n)):
184
- Array.isArray(e)?e.forEach(i=>{ot(n,!0,S(this,de,"f")),this.demandOption(i,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[gr](this.demandOption.bind(this),"demandedOptions",e,r),this}deprecateOption(e,r){return ce("<string> [string|boolean]",[e,r],arguments.length),S(this,le,"f").deprecatedOptions[e]=r,this}describe(e,r){return ce("<object|string|array> [str\
185
- ing]",[e,r],arguments.length),this[$s](e,!0),S(this,he,"f").describe(e,r),this}detectLocale(e){return ce("<boolean>",[e],arguments.length),ue(this,Jt,e,"f"),this}env(e){return ce("[string|boolean]",[e],arguments.length),e===!1?delete S(this,le,"f").envPrefix:S(this,le,"f").envPrefix=e||"",this}epilogue(e){return ce("<string>",[e],arguments.length),S(this,he,"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
- e)?e.forEach(n=>this.example(...n)):S(this,he,"f").example(e,r),this}exit(e,r){ue(this,Ke,!0,"f"),ue(this,Nt,r,"f"),S(this,et,"f")&&S(this,de,"f").process.exit(e)}exitProcess(e=!0){return ce("[boolean]",[e],arguments.length),ue(this,et,e,"f"),this}fail(e){if(ce("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new je("Invalid first argument. Expected function or boolean 'false'");return S(this,he,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,r){
187
- return ce("<array> [function]",[e,r],arguments.length),r?S(this,Ze,"f").getCompletion(e,r):new Promise((n,i)=>{S(this,Ze,"f").getCompletion(e,(s,o)=>{s?i(s):n(o)})})}getDemandedOptions(){return ce([],0),S(this,le,"f").demandedOptions}getDemandedCommands(){return ce([],0),S(this,le,"f").demandedCommands}getDeprecatedOptions(){return ce([],0),S(this,le,"f").deprecatedOptions}getDetectLocale(){return S(this,Jt,"f")}getExitProcess(){return S(this,et,"f")}getGroups(){return Object.assign({},S(this,Et,
188
- "f"),S(this,Qt,"f"))}getHelp(){if(ue(this,Ke,!0,"f"),!S(this,he,"f").hasCachedHelpMessage()){if(!this.parsed){const r=this[Hr](S(this,Tt,"f"),void 0,void 0,0,!0);if(Le(r))return r.then(()=>S(this,he,"f").help())}const e=S(this,Fe,"f").runDefaultBuilderOn(this);if(Le(e))return e.then(()=>S(this,he,"f").help())}return Promise.resolve(S(this,he,"f").help())}getOptions(){return S(this,le,"f")}getStrict(){return S(this,Zt,"f")}getStrictCommands(){return S(this,er,"f")}getStrictOptions(){return S(this,
189
- tr,"f")}global(e,r){return ce("<string|array> [boolean]",[e,r],arguments.length),e=[].concat(e),r!==!1?S(this,le,"f").local=S(this,le,"f").local.filter(n=>e.indexOf(n)===-1):e.forEach(n=>{S(this,le,"f").local.includes(n)||S(this,le,"f").local.push(n)}),this}group(e,r){ce("<string|array> <string>",[e,r],arguments.length);const n=S(this,Qt,"f")[r]||S(this,Et,"f")[r];S(this,Qt,"f")[r]&&delete S(this,Qt,"f")[r];const i={};return S(this,Et,"f")[r]=(n||[]).concat(e).filter(s=>i[s]?!1:i[s]=!0),this}hide(e){
190
- return ce("<string>",[e],arguments.length),S(this,le,"f").hiddenOptions.push(e),this}implies(e,r){return ce("<string|object> [number|string|array]",[e,r],arguments.length),S(this,Ie,"f").implies(e,r),this}locale(e){return ce("[string]",[e],arguments.length),e===void 0?(this[gs](),S(this,de,"f").y18n.getLocale()):(ue(this,Jt,!1,"f"),S(this,de,"f").y18n.setLocale(e),this)}middleware(e,r,n){return S(this,tt,"f").addMiddleware(e,!!r,n)}nargs(e,r){return ce("<string|object|array> [number]",[e,r],arguments.
191
- length),this[gr](this.nargs.bind(this),"narg",e,r),this}normalize(e){return ce("<array|string>",[e],arguments.length),this[Lt]("normalize",e),this}number(e){return ce("<array|string>",[e],arguments.length),this[Lt]("number",e),this[ir](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[ir](e),S(this,Dt,"f")&&(e==="version"||r?.alias==="version")&&this[bu](['"version\
145
+ `;class Hp{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.
146
+ length;a<u;++a)if(i[e[a]]&&i[e[a]].builder){const l=i[e[a]].builder;if(js(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(
147
+ r)&&this.usage.getCommands().forEach(i=>{const o=hr(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.
148
+ 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().
149
+ 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.
150
+ 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 y=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 p=y[g];return typeof p=="string"&&p.length>0}),_=b?y[b]:void 0,f=(u=(a=y[e])!==null&&a!==void 0?a:_)!==null&&u!==void 0?u:"";l=`${e.replace(/:/g,"\\:")}:${f.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}const c=y=>/^--/.test(y),d=y=>/^[^0-9]$/.test(y),h=!c(n)&&d(e)?"-":"--";r.push(h+l),s&&r.push(h+"no-"+l)}customCompletion(e,r,n,s){if(Ke(this.customCompletionFunction,null,this.
152
+ shim),Fp(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 zp(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
+ 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?qp:kp;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 Up(t,e,r,n){return new Hp(t,e,r,n)}function Fp(t){return t.length<3}function zp(t){
154
+ return t.length>3}function Vp(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 Aa=["$0","--","_"];
155
+ function Gp(t,e,r){const n=r.y18n.__,s=r.y18n.__n,i={};i.nonOptionCount=function(d){const h=t.getDemandedCommands(),b=d._.length+(d["--"]?d["--"].length:0)-t.getInternalMethods().getContext().commands.length;h._&&(b<h._.min||b>h._.max)&&(b<h._.min?h._.minMsg!==void 0?e.fail(h._.minMsg?h._.minMsg.replace(/\$0/g,b.toString()).replace(/\$1/,h._.min.toString()):null):e.fail(s("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",b,b.toString(),
156
+ h._.min.toString())):b>h._.max&&(h._.maxMsg!==void 0?e.fail(h._.maxMsg?h._.maxMsg.replace(/\$0/g,b.toString()).replace(/\$1/,h._.max.toString()):null):e.fail(s("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",b,b.toString(),h._.max.toString()))))},i.positionalCount=function(d,h){h<d&&e.fail(s("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",h,h+"",d+""))},i.requiredArguments=
157
+ function(d,h){let y=null;for(const b of Object.keys(h))(!Object.prototype.hasOwnProperty.call(d,b)||typeof d[b]>"u")&&(y=y||{},y[b]=h[b]);if(y){const b=[];for(const f of Object.keys(y)){const g=y[f];g&&b.indexOf(g)<0&&b.push(g)}const _=b.length?`
158
+ ${b.join(`
159
+ `)}`:"";e.fail(s("Missing required argument: %s","Missing required arguments: %s",Object.keys(y).length,Object.keys(y).join(", ")+_))}},i.unknownArguments=function(d,h,y,b,_=!0){var f;const g=t.getInternalMethods().getCommandInstance().getCommands(),p=[],m=t.getInternalMethods().getContext();if(Object.keys(d).forEach($=>{!Aa.includes($)&&!Object.prototype.hasOwnProperty.call(y,$)&&!Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),$)&&!i.isValidAndSomeAliasIsNotNew($,
160
+ h)&&p.push($)}),_&&(m.commands.length>0||g.length>0||b)&&d._.slice(m.commands.length).forEach($=>{g.includes(""+$)||p.push(""+$)}),_){const v=((f=t.getDemandedCommands()._)===null||f===void 0?void 0:f.max)||0,E=m.commands.length+v;E<d._.length&&d._.slice(E).forEach(S=>{S=String(S),!m.commands.includes(S)&&!p.includes(S)&&p.push(S)})}p.length&&e.fail(s("Unknown argument: %s","Unknown arguments: %s",p.length,p.map($=>$.trim()?$:`"${$}"`).join(", ")))},i.unknownCommands=function(d){const h=t.getInternalMethods().
161
+ getCommandInstance().getCommands(),y=[],b=t.getInternalMethods().getContext();return(b.commands.length>0||h.length>0)&&d._.slice(b.commands.length).forEach(_=>{h.includes(""+_)||y.push(""+_)}),y.length>0?(e.fail(s("Unknown command: %s","Unknown commands: %s",y.length,y.join(", "))),!0):!1},i.isValidAndSomeAliasIsNotNew=function(d,h){if(!Object.prototype.hasOwnProperty.call(h,d))return!1;const y=t.parsed.newAliases;return[d,...h[d]].some(b=>!Object.prototype.hasOwnProperty.call(y,b)||!y[d])},i.limitedChoices=
162
+ function(d){const h=t.getOptions(),y={};if(!Object.keys(h.choices).length)return;Object.keys(d).forEach(f=>{Aa.indexOf(f)===-1&&Object.prototype.hasOwnProperty.call(h.choices,f)&&[].concat(d[f]).forEach(g=>{h.choices[f].indexOf(g)===-1&&g!==void 0&&(y[f]=(y[f]||[]).concat(g))})});const b=Object.keys(y);if(!b.length)return;let _=n("Invalid values:");b.forEach(f=>{_+=`
163
+ ${n("Argument: %s, Given: %s, Choices: %s",f,e.stringifiedValues(y[f]),e.stringifiedValues(h.choices[f]))}`}),e.fail(_)};let o={};i.implies=function(d,h){ce("<string|object> [array|number|string]",[d,h],arguments.length),typeof d=="object"?Object.keys(d).forEach(y=>{i.implies(y,d[y])}):(t.global(d),o[d]||(o[d]=[]),Array.isArray(h)?h.forEach(y=>i.implies(d,y)):(Ke(h,void 0,r),o[d].push(h)))},i.getImplied=function(){return o};function a(c,d){const h=Number(d);return d=isNaN(h)?d:h,typeof d=="num\
164
+ ber"?d=c._.length>=d:d.match(/^--no-.+/)?(d=d.match(/^--no-(.+)/)[1],d=!Object.prototype.hasOwnProperty.call(c,d)):d=Object.prototype.hasOwnProperty.call(c,d),d}i.implications=function(d){const h=[];if(Object.keys(o).forEach(y=>{const b=y;(o[y]||[]).forEach(_=>{let f=b;const g=_;f=a(d,f),_=a(d,_),f&&!_&&h.push(` ${b} -> ${g}`)})}),h.length){let y=`${n("Implications failed:")}
165
+ `;h.forEach(b=>{y+=b}),e.fail(y)}};let u={};i.conflicts=function(d,h){ce("<string|object> [array|string]",[d,h],arguments.length),typeof d=="object"?Object.keys(d).forEach(y=>{i.conflicts(y,d[y])}):(t.global(d),u[d]||(u[d]=[]),Array.isArray(h)?h.forEach(y=>i.conflicts(d,y)):u[d].push(h))},i.getConflicting=()=>u,i.conflicting=function(d){Object.keys(d).forEach(h=>{u[h]&&u[h].forEach(y=>{y&&d[h]!==void 0&&d[y]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",h,y))})}),t.getInternalMethods().
166
+ getParserConfiguration()["strip-dashed"]&&Object.keys(u).forEach(h=>{u[h].forEach(y=>{y&&d[r.Parser.camelCase(h)]!==void 0&&d[r.Parser.camelCase(y)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",h,y))})})},i.recommendCommands=function(d,h){h=h.sort((f,g)=>g.length-f.length);let b=null,_=1/0;for(let f=0,g;(g=h[f])!==void 0;f++){const p=Vp(d,g);p<=3&&p<_&&(_=p,b=g)}b&&e.fail(n("Did you mean %s?",b))},i.reset=function(d){return o=gr(o,h=>!d[h]),u=gr(u,h=>!d[h]),i};const l=[];return i.
167
+ freeze=function(){l.push({implied:o,conflicting:u})},i.unfreeze=function(){const d=l.pop();Ke(d,void 0,r),{implied:o,conflicting:u}=d},i}let Ds=[],_r;function xs(t,e,r,n){_r=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=Wp(e,t.extends);else try{o=require.resolve(t.extends)}catch{return t}Bp(o),Ds.push(o),s=i?JSON.parse(_r.readFileSync(o,"utf8")):require(t.extends),delete t.extends,
168
+ s=xs(s,_r.path.dirname(o),r,_r)}return Ds=[],r?Oa(s,t):Object.assign({},s,t)}function Bp(t){if(Ds.indexOf(t)>-1)throw new Oe(`Circular extended configurations: '${t}'.`)}function Wp(t,e){return _r.path.resolve(t,e)}function Oa(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]=Oa(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
+ 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)},Se,Pt,$r,Fe,xe,kr,mt,It,qr,ze,Hr,Ve,st,Me,Ge,Ur,Bt,Ce,ue,Fr,zr,ke,Nt,Wt,Tt,gt,Vr,fe,jt,Lt,Dt,de,Gr,it,Ee;function Kp(t){return(e=[],r=t.process.cwd(),n)=>{const s=new Yp(e,r,n,t);return Object.defineProperty(s,"argv",{get:()=>s.parse(),enumerable:!0}),s.help(),s.version(),s}}const Ca=Symbol("copyDoubleDash"),Pa=Symbol("copyDoubleDash"),Ms=Symbol("deleteFromParserHintObject"),Ia=Symbol("emitWarning"),Na=Symbol("freeze"),Ta=Symbol(
171
+ "getDollarZero"),xt=Symbol("getParserConfiguration"),ja=Symbol("getUsageConfiguration"),ks=Symbol("guessLocale"),La=Symbol("guessVersion"),Da=Symbol("parsePositionalNumbers"),qs=Symbol("pkgUp"),yt=Symbol("populateParserHintArray"),Kt=Symbol("populateParserHintSingleValueDictionary"),Hs=Symbol("populateParserHintArrayDictionary"),Us=Symbol("populateParserHintDictionary"),Fs=Symbol("sanitizeKey"),zs=Symbol("setKey"),Vs=Symbol("unfreeze"),xa=Symbol("validateAsync"),Ma=Symbol("getCommandInstance"),ka=Symbol(
172
+ "getContext"),qa=Symbol("getHasOutput"),Ha=Symbol("getLoggerInstance"),Ua=Symbol("getParseContext"),Fa=Symbol("getUsageInstance"),za=Symbol("getValidationInstance"),Br=Symbol("hasParseCallback"),Va=Symbol("isGlobalContext"),Mt=Symbol("postProcess"),Ga=Symbol("rebase"),Gs=Symbol("reset"),vr=Symbol("runYargsParserAndExecuteCommands"),Bs=Symbol("runValidation"),Ba=Symbol("setHasOutput"),kt=Symbol("kTrackManuallySetKeys");class Yp{constructor(e=[],r,n,s){this.customScriptName=!1,this.parsed=!1,Se.set(
173
+ this,void 0),Pt.set(this,void 0),$r.set(this,{commands:[],fullCommands:[]}),Fe.set(this,null),xe.set(this,null),kr.set(this,"show-hidden"),mt.set(this,null),It.set(this,!0),qr.set(this,{}),ze.set(this,!0),Hr.set(this,[]),Ve.set(this,void 0),st.set(this,{}),Me.set(this,!1),Ge.set(this,null),Ur.set(this,!0),Bt.set(this,void 0),Ce.set(this,""),ue.set(this,void 0),Fr.set(this,void 0),zr.set(this,{}),ke.set(this,null),Nt.set(this,null),Wt.set(this,{}),Tt.set(this,{}),gt.set(this,void 0),Vr.set(this,!1),
174
+ fe.set(this,void 0),jt.set(this,!1),Lt.set(this,!1),Dt.set(this,!1),de.set(this,void 0),Gr.set(this,{}),it.set(this,null),Ee.set(this,void 0),ae(this,fe,s,"f"),ae(this,gt,e,"f"),ae(this,Pt,r,"f"),ae(this,Fr,n,"f"),ae(this,Ve,new Ap(this),"f"),this.$0=this[Ta](),this[Gs](),ae(this,Se,O(this,Se,"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,Bt,this[Pa](),"f")}addHelpOpt(e,r){const n="help";return ce(
175
+ "[string|boolean] [string]",[e,r],arguments.length),O(this,Ge,"f")&&(this[Ms](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[Hs](this.alias.bind(this),"alias",e,r),this}array(e){return ce("<array|string>",[e],arguments.length),this[yt]("array",e),this[kt](e),this}boolean(e){return ce("<array|string>",[e],arguments.length),this[yt]("boolean",e),this[kt](e),this}check(e,r){
177
+ return ce("<function> [boolean]",[e,r],arguments.length),this.middleware((n,s)=>mr(()=>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[Hs](this.choices.bind(this),"choices",e,r),this}coerce(e,r){
178
+ 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,Ve,"f").addCoerceMiddleware((n,s)=>{let i;return Object.prototype.hasOwnProperty.call(n,e)?mr(()=>(i=s.getAliases(),r(n[e])),a=>{n[e]=
179
+ 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=xs(e,O(this,Pt,"f"),this[xt]()["deep-merge-config"]||!1,O(this,fe,"\
180
+ 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
+ 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,Se,"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,Fr,"f")||O(this,fe,"f").require;return O(this,Se,"f").addDirectory(e,n,O(this,fe,
182
+ "f").getCallerFile(),r),this}count(e){return ce("<array|string>",[e],arguments.length),this[yt]("count",e),this[kt](e),this}default(e,r,n){return ce("<object|string|array> [*] [string]",[e,r,n],arguments.length),n&&(ba(e,O(this,fe,"f")),O(this,ue,"f").defaultDescription[e]=n),typeof r=="function"&&(ba(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[Kt](this.default.bind(this),"default",e,r),this}defaults(e,r,n){
183
+ 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=>{Ke(n,!0,O(this,fe,"f")),this.demandOption(s,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof e=="number"?(Ke(n,!0,O(this,fe,"f")),this.demandCommand(e,r,n,n)):
184
+ Array.isArray(e)?e.forEach(s=>{Ke(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[Kt](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,It,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
+ e)?e.forEach(n=>this.example(...n)):O(this,de,"f").example(e,r),this}exit(e,r){ae(this,Me,!0,"f"),ae(this,mt,r,"f"),O(this,ze,"f")&&O(this,fe,"f").process.exit(e)}exitProcess(e=!0){return ce("[boolean]",[e],arguments.length),ae(this,ze,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
+ 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,It,"f")}getExitProcess(){return O(this,ze,"f")}getGroups(){return Object.assign({},O(this,st,
188
+ "f"),O(this,Tt,"f"))}getHelp(){if(ae(this,Me,!0,"f"),!O(this,de,"f").hasCachedHelpMessage()){if(!this.parsed){const r=this[vr](O(this,gt,"f"),void 0,void 0,0,!0);if(Ae(r))return r.then(()=>O(this,de,"f").help())}const e=O(this,Se,"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,jt,"f")}getStrictCommands(){return O(this,Lt,"f")}getStrictOptions(){return O(this,
189
+ Dt,"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,Tt,"f")[r]||O(this,st,"f")[r];O(this,Tt,"f")[r]&&delete O(this,Tt,"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,It,!1,"f"),O(this,fe,"f").y18n.setLocale(e),this)}middleware(e,r,n){return O(this,Ve,"f").addMiddleware(e,!!r,n)}nargs(e,r){return ce("<string|object|array> [number]",[e,r],arguments.
191
+ length),this[Kt](this.nargs.bind(this),"narg",e,r),this}normalize(e){return ce("<array|string>",[e],arguments.length),this[yt]("normalize",e),this}number(e){return ce("<array|string>",[e],arguments.length),this[yt]("number",e),this[kt](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[kt](e),O(this,it,"f")&&(e==="version"||r?.alias==="version")&&this[Ia](['"version\
192
192
  " 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
- `),void 0,"versionWarning"),S(this,le,"f").key[e]=!0,r.alias&&this.alias(e,r.alias);const n=r.deprecate||r.deprecated;n&&this.deprecateOption(e,n);const i=r.demand||r.required||r.require;i&&this.demand(e,i),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),
193
+ `),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
194
  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
- "boolean"&&this.global(e,r.global),r.defaultDescription&&(S(this,le,"f").defaultDescription[e]=r.defaultDescription),r.skipValidation&&this.skipValidation(e);const s=r.describe||r.description||r.desc,o=S(this,he,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(o,e)||typeof s=="string")&&this.describe(e,s),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[Au](),typeof e>"u"&&(e=S(this,Tt,"f")),typeof r=="object"&&(ue(this,Xt,r,"f"),r=n),typeof r=="function"&&(ue(this,Ye,r,"f"),r=!1),r||ue(this,Tt,e,"f"),S(this,Ye,"f")&&ue(this,et,!1,"f");const i=this[Hr](e,!!r),s=this.parsed;return S(this,Ze,"f").setParsed(this.parsed),Le(i)?i.then(o=>(S(this,Ye,"f")&&S(this,Ye,"f").call(this,S(this,Nt,"f"),o,S(this,ke,"f")),o)).catch(o=>{throw S(this,Ye,"f")&&S(this,Ye,"f")(o,this.parsed.argv,S(this,ke,"f")),o}).finally(()=>{this[_s](),
197
- this.parsed=s}):(S(this,Ye,"f")&&S(this,Ye,"f").call(this,S(this,Nt,"f"),i,S(this,ke,"f")),this[_s](),this.parsed=s,i)}parseAsync(e,r,n){const i=this.parse(e,r,n);return Le(i)?i:Promise.resolve(i)}parseSync(e,r,n){const i=this.parse(e,r,n);if(Le(i))throw new je(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return i}parserConfiguration(e){return ce("<object>",[e],arguments.length),ue(this,En,e,"f"),this}pkgConf(e,r){ce("<string> [string]",[e,r],arguments.length);
198
- let n=null;const i=this[ys](r||S(this,Yt,"f"));return i[e]&&typeof i[e]=="object"&&(n=ps(i[e],r||S(this,Yt,"f"),this[rr]()["deep-merge-config"]||!1,S(this,de,"f")),S(this,le,"f").configObjects=(S(this,le,"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=xr(r,(o,a)=>o==="type"&&!["string","number","boole\
199
- an"].includes(a)?!1:n.includes(o));const i=S(this,Ur,"f").fullCommands[S(this,Ur,"f").fullCommands.length-1],s=i?S(this,Fe,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return fn(s).forEach(o=>{const a=s[o];Array.isArray(a)?a.indexOf(e)!==-1&&(r[o]=!0):a[e]&&!(o in r)&&(r[o]=a[e])}),this.group(e,S(this,he,"f").getPositionalGroupName()),this.option(e,r)}recommendCommands(e=!0){return ce("[boolean]",[e],arguments.length),ue(this,Dn,e,"f"),this}required(e,r,n){return this.demand(
200
- 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"&&S(this,le,"f").narg[e]?this:(this[gr](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,r){return ce("[string] [string]",[e,r],arguments.length),e=e||this.$0,S(this,pr,"f").log(S(this,Ze,"f").generateCompletionScript(e,r||S(this,We,"f")||"completion")),this}showHelp(e){if(ce("[string|function]",[e],arguments.length),ue(this,Ke,!0,
201
- "f"),!S(this,he,"f").hasCachedHelpMessage()){if(!this.parsed){const n=this[Hr](S(this,Tt,"f"),void 0,void 0,0,!0);if(Le(n))return n.then(()=>{S(this,he,"f").showHelp(e)}),this}const r=S(this,Fe,"f").runDefaultBuilderOn(this);if(Le(r))return r.then(()=>{S(this,he,"f").showHelp(e)}),this}return S(this,he,"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),S(this,he,"f").showHelpOnFail(e,
202
- r),this}showVersion(e){return ce("[string|function]",[e],arguments.length),S(this,he,"f").showVersion(e),this}skipValidation(e){return ce("<array|string>",[e],arguments.length),this[Lt]("skipValidation",e),this}strict(e){return ce("[boolean]",[e],arguments.length),ue(this,Zt,e!==!1,"f"),this}strictCommands(e){return ce("[boolean]",[e],arguments.length),ue(this,er,e!==!1,"f"),this}strictOptions(e){return ce("[boolean]",[e],arguments.length),ue(this,tr,e!==!1,"f"),this}string(e){return ce("<array|\
203
- string>",[e],arguments.length),this[Lt]("string",e),this[ir](e),this}terminalWidth(){return ce([],0),S(this,de,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return ce("<object>",[e],arguments.length),ue(this,Jt,!1,"f"),S(this,de,"f").y18n.updateLocale(e),this}usage(e,r,n,i){if(ce("<string|null|undefined> [string|boolean] [function|object] [function]",[e,r,n,i],arguments.length),r!==void 0){if(ot(e,null,S(this,de,"f")),(e||"").match(/^\$0( |$)/))return this.
204
- command(e,r,n,i);throw new je(".usage() description must start with $0 if being used as alias for .command()")}else return S(this,he,"f").usage(e),this}usageConfiguration(e){return ce("<object>",[e],arguments.length),ue(this,vn,e,"f"),this}version(e,r,n){const i="version";if(ce("[boolean|string] [string] [string]",[e,r,n],arguments.length),S(this,Dt,"f")&&(this[ms](S(this,Dt,"f")),S(this,he,"f").version(void 0),ue(this,Dt,null,"f")),arguments.length===0)n=this[Ru](),e=i;else if(arguments.length===
205
- 1){if(e===!1)return this;n=e,e=i}else arguments.length===2&&(n=r,r=void 0);return ue(this,Dt,typeof e=="string"?e:i,"f"),r=r||S(this,he,"f").deferY18nLookup("Show version number"),S(this,he,"f").version(n||void 0),this.boolean(S(this,Dt,"f")),this.describe(S(this,Dt,"f"),r),this}wrap(e){return ce("<number|null|undefined>",[e],arguments.length),S(this,he,"f").wrap(e),this}[(Fe=new WeakMap,Yt=new WeakMap,Ur=new WeakMap,Ze=new WeakMap,We=new WeakMap,hn=new WeakMap,Nt=new WeakMap,Jt=new WeakMap,pn=new WeakMap,
206
- et=new WeakMap,mn=new WeakMap,tt=new WeakMap,Et=new WeakMap,Ke=new WeakMap,rt=new WeakMap,gn=new WeakMap,pr=new WeakMap,ke=new WeakMap,le=new WeakMap,yn=new WeakMap,En=new WeakMap,Ye=new WeakMap,Xt=new WeakMap,mr=new WeakMap,Qt=new WeakMap,Tt=new WeakMap,Dn=new WeakMap,de=new WeakMap,Zt=new WeakMap,er=new WeakMap,tr=new WeakMap,he=new WeakMap,vn=new WeakMap,Dt=new WeakMap,Ie=new WeakMap,_u)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[wu](){return{
207
- log:(...e)=>{this[$n]()||console.log(...e),ue(this,Ke,!0,"f"),S(this,ke,"f").length&&ue(this,ke,S(this,ke,"f")+`
208
- `,"f"),ue(this,ke,S(this,ke,"f")+e.join(" "),"f")},error:(...e)=>{this[$n]()||console.error(...e),ue(this,Ke,!0,"f"),S(this,ke,"f").length&&ue(this,ke,S(this,ke,"f")+`
209
- `,"f"),ue(this,ke,S(this,ke,"f")+e.join(" "),"f")}}}[ms](e){fn(S(this,le,"f")).forEach(r=>{if((i=>i==="configObjects")(r))return;const n=S(this,le,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete S(this,he,"f").getDescriptions()[e]}[bu](e,r,n){S(this,pn,"f")[n]||(S(this,de,"f").process.emitWarning(e,r),S(this,pn,"f")[n]=!0)}[Au](){S(this,mn,"f").push({options:S(this,le,"f"),configObjects:S(this,le,"f").configObjects.slice(0),exitProcess:S(
210
- this,et,"f"),groups:S(this,Et,"f"),strict:S(this,Zt,"f"),strictCommands:S(this,er,"f"),strictOptions:S(this,tr,"f"),completionCommand:S(this,We,"f"),output:S(this,ke,"f"),exitError:S(this,Nt,"f"),hasOutput:S(this,Ke,"f"),parsed:this.parsed,parseFn:S(this,Ye,"f"),parseContext:S(this,Xt,"f")}),S(this,he,"f").freeze(),S(this,Ie,"f").freeze(),S(this,Fe,"f").freeze(),S(this,tt,"f").freeze()}[Cu](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(S(this,de,"f").process.argv()[0])?r=S(this,de,"f").
211
- process.argv().slice(1,2):r=S(this,de,"f").process.argv().slice(0,1),e=r.map(n=>{const i=this[xu](S(this,Yt,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&i.length<n.length?i:n}).join(" ").trim(),S(this,de,"f").getEnv("_")&&S(this,de,"f").getProcessArgvBin()===S(this,de,"f").getEnv("_")&&(e=S(this,de,"f").getEnv("_").replace(`${S(this,de,"f").path.dirname(S(this,de,"f").process.execPath())}/`,"")),e}[rr](){return S(this,En,"f")}[Su](){return S(this,vn,"f")}[gs](){if(!S(this,Jt,"f"))return;const e=S(
212
- this,de,"f").getEnv("LC_ALL")||S(this,de,"f").getEnv("LC_MESSAGES")||S(this,de,"f").getEnv("LANG")||S(this,de,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[Ru](){return this[ys]().version||"unknown"}[Ou](e){const r=e["--"]?e["--"]:e._;for(let n=0,i;(i=r[n])!==void 0;n++)S(this,de,"f").Parser.looksLikeNumber(i)&&Number.isSafeInteger(Math.floor(parseFloat(`${i}`)))&&(r[n]=Number(i));return e}[ys](e){const r=e||"*";if(S(this,mr,"f")[r])return S(this,mr,"f")[r];let n={};try{let i=e||
213
- S(this,de,"f").mainFilename;!e&&S(this,de,"f").path.extname(i)&&(i=S(this,de,"f").path.dirname(i));const s=S(this,de,"f").findUp(i,(o,a)=>{if(a.includes("package.json"))return"package.json"});ot(s,void 0,S(this,de,"f")),n=JSON.parse(S(this,de,"f").readFileSync(s,"utf8"))}catch{}return S(this,mr,"f")[r]=n||{},S(this,mr,"f")[r]}[Lt](e,r){r=[].concat(r),r.forEach(n=>{n=this[vs](n),S(this,le,"f")[e].push(n)})}[gr](e,r,n,i){this[Ds](e,r,n,i,(s,o,a)=>{S(this,le,"f")[s][o]=a})}[Es](e,r,n,i){this[Ds](e,
214
- r,n,i,(s,o,a)=>{S(this,le,"f")[s][o]=(S(this,le,"f")[s][o]||[]).concat(a)})}[Ds](e,r,n,i,s){if(Array.isArray(n))n.forEach(o=>{e(o,i)});else if((o=>typeof o=="object")(n))for(const o of fn(n))e(o,n[o]);else s(r,this[vs](n),i)}[vs](e){return e==="__proto__"?"___proto___":e}[$s](e,r){return this[gr](this[$s].bind(this),"key",e,r),this}[_s](){var e,r,n,i,s,o,a,u,l,c,d,h;const E=S(this,mn,"f").pop();ot(E,void 0,S(this,de,"f"));let $;e=this,r=this,n=this,i=this,s=this,o=this,a=this,u=this,l=this,c=this,
215
- d=this,h=this,{options:{set value(y){ue(e,le,y,"f")}}.value,configObjects:$,exitProcess:{set value(y){ue(r,et,y,"f")}}.value,groups:{set value(y){ue(n,Et,y,"f")}}.value,output:{set value(y){ue(i,ke,y,"f")}}.value,exitError:{set value(y){ue(s,Nt,y,"f")}}.value,hasOutput:{set value(y){ue(o,Ke,y,"f")}}.value,parsed:this.parsed,strict:{set value(y){ue(a,Zt,y,"f")}}.value,strictCommands:{set value(y){ue(u,er,y,"f")}}.value,strictOptions:{set value(y){ue(l,tr,y,"f")}}.value,completionCommand:{set value(y){
216
- ue(c,We,y,"f")}}.value,parseFn:{set value(y){ue(d,Ye,y,"f")}}.value,parseContext:{set value(y){ue(h,Xt,y,"f")}}.value}=E,S(this,le,"f").configObjects=$,S(this,he,"f").unfreeze(),S(this,Ie,"f").unfreeze(),S(this,Fe,"f").unfreeze(),S(this,tt,"f").unfreeze()}[Iu](e,r){return Br(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[Fu].bind(this),getContext:this[Pu].bind(this),getHasOutput:this[Nu].bind(this),getLoggerInstance:this[Tu].bind(this),getParseContext:this[Lu].bind(this),getParserConfiguration:this[rr].
217
- bind(this),getUsageConfiguration:this[Su].bind(this),getUsageInstance:this[ju].bind(this),getValidationInstance:this[ku].bind(this),hasParseCallback:this[$n].bind(this),isGlobalContext:this[Bu].bind(this),postProcess:this[nr].bind(this),reset:this[ws].bind(this),runValidation:this[bs].bind(this),runYargsParserAndExecuteCommands:this[Hr].bind(this),setHasOutput:this[Mu].bind(this)}}[Fu](){return S(this,Fe,"f")}[Pu](){return S(this,Ur,"f")}[Nu](){return S(this,Ke,"f")}[Tu](){return S(this,pr,"f")}[Lu](){
218
- return S(this,Xt,"f")||{}}[ju](){return S(this,he,"f")}[ku](){return S(this,Ie,"f")}[$n](){return!!S(this,Ye,"f")}[Bu](){return S(this,gn,"f")}[nr](e,r,n,i){return n||Le(e)||(r||(e=this[_u](e)),(this[rr]()["parse-positional-numbers"]||this[rr]()["parse-positional-numbers"]===void 0)&&(e=this[Ou](e)),i&&(e=kr(e,this,S(this,tt,"f").getMiddleware(),!1))),e}[ws](e={}){ue(this,le,S(this,le,"f")||{},"f");const r={};r.local=S(this,le,"f").local||[],r.configObjects=S(this,le,"f").configObjects||[];const n={};
219
- r.local.forEach(o=>{n[o]=!0,(e[o]||[]).forEach(a=>{n[a]=!0})}),Object.assign(S(this,Qt,"f"),Object.keys(S(this,Et,"f")).reduce((o,a)=>{const u=S(this,Et,"f")[a].filter(l=>!(l in n));return u.length>0&&(o[a]=u),o},{})),ue(this,Et,{},"f");const i=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return i.forEach(o=>{r[o]=(S(this,
220
- le,"f")[o]||[]).filter(a=>!n[a])}),s.forEach(o=>{r[o]=xr(S(this,le,"f")[o],a=>!n[a])}),r.envPrefix=S(this,le,"f").envPrefix,ue(this,le,r,"f"),ue(this,he,S(this,he,"f")?S(this,he,"f").reset(n):zm(this,S(this,de,"f")),"f"),ue(this,Ie,S(this,Ie,"f")?S(this,Ie,"f").reset(n):e0(this,S(this,he,"f"),S(this,de,"f")),"f"),ue(this,Fe,S(this,Fe,"f")?S(this,Fe,"f").reset():Mm(S(this,he,"f"),S(this,Ie,"f"),S(this,tt,"f"),S(this,de,"f")),"f"),S(this,Ze,"f")||ue(this,Ze,Jm(this,S(this,he,"f"),S(this,Fe,"f"),S(
221
- this,de,"f")),"f"),S(this,tt,"f").reset(),ue(this,We,null,"f"),ue(this,ke,"","f"),ue(this,Nt,null,"f"),ue(this,Ke,!1,"f"),this.parsed=!1,this}[xu](e,r){return S(this,de,"f").path.relative(e,r)}[Hr](e,r,n,i=0,s=!1){let o=!!n||s;e=e||S(this,Tt,"f"),S(this,le,"f").__=S(this,de,"f").y18n.__,S(this,le,"f").configuration=this[rr]();const a=!!S(this,le,"f").configuration["populate--"],u=Object.assign({},S(this,le,"f").configuration,{"populate--":!0}),l=S(this,de,"f").Parser.detailed(e,Object.assign({},
222
- S(this,le,"f"),{configuration:{"parse-positional-numbers":!1,...u}})),c=Object.assign(l.argv,S(this,Xt,"f"));let d;const h=l.aliases;let E=!1,$=!1;Object.keys(c).forEach(y=>{y===S(this,rt,"f")&&c[y]?E=!0:y===S(this,Dt,"f")&&c[y]&&($=!0)}),c.$0=this.$0,this.parsed=l,i===0&&S(this,he,"f").clearCachedHelpMessage();try{if(this[gs](),r)return this[nr](c,a,!!n,!1);S(this,rt,"f")&&[S(this,rt,"f")].concat(h[S(this,rt,"f")]||[]).filter(m=>m.length>1).includes(""+c._[c._.length-1])&&(c._.pop(),E=!0),ue(this,
223
- gn,!1,"f");const y=S(this,Fe,"f").getCommands(),f=S(this,Ze,"f").completionKey in c,g=E||f||s;if(c._.length){if(y.length){let p;for(let m=i||0,D;c._[m]!==void 0;m++)if(D=String(c._[m]),y.includes(D)&&D!==S(this,We,"f")){const v=S(this,Fe,"f").runCommand(D,this,l,m+1,s,E||$||s);return this[nr](v,a,!!n,!1)}else if(!p&&D!==S(this,We,"f")){p=D;break}!S(this,Fe,"f").hasDefaultCommand()&&S(this,Dn,"f")&&p&&!g&&S(this,Ie,"f").recommendCommands(p,y)}S(this,We,"f")&&c._.includes(S(this,We,"f"))&&!f&&(S(this,
224
- et,"f")&&Mr(!0),this.showCompletionScript(),this.exit(0))}if(S(this,Fe,"f").hasDefaultCommand()&&!g){const p=S(this,Fe,"f").runCommand(null,this,l,0,s,E||$||s);return this[nr](p,a,!!n,!1)}if(f){S(this,et,"f")&&Mr(!0),e=[].concat(e);const p=e.slice(e.indexOf(`--${S(this,Ze,"f").completionKey}`)+1);return S(this,Ze,"f").getCompletion(p,(m,D)=>{if(m)throw new je(m.message);(D||[]).forEach(v=>{S(this,pr,"f").log(v)}),this.exit(0)}),this[nr](c,!a,!!n,!1)}if(S(this,Ke,"f")||(E?(S(this,et,"f")&&Mr(!0),
225
- o=!0,this.showHelp("log"),this.exit(0)):$&&(S(this,et,"f")&&Mr(!0),o=!0,S(this,he,"f").showVersion("log"),this.exit(0))),!o&&S(this,le,"f").skipValidation.length>0&&(o=Object.keys(c).some(p=>S(this,le,"f").skipValidation.indexOf(p)>=0&&c[p]===!0)),!o){if(l.error)throw new je(l.error.message);if(!f){const p=this[bs](h,{},l.error);n||(d=kr(c,this,S(this,tt,"f").getMiddleware(),!0)),d=this[Iu](p,d??c),Le(d)&&!n&&(d=d.then(()=>kr(c,this,S(this,tt,"f").getMiddleware(),!1)))}}}catch(y){if(y instanceof
226
- je)S(this,he,"f").fail(y.message,y);else throw y}return this[nr](d??c,a,!!n,!0)}[bs](e,r,n,i){const s={...this.getDemandedOptions()};return o=>{if(n)throw new je(n.message);S(this,Ie,"f").nonOptionCount(o),S(this,Ie,"f").requiredArguments(o,s);let a=!1;S(this,er,"f")&&(a=S(this,Ie,"f").unknownCommands(o)),S(this,Zt,"f")&&!a?S(this,Ie,"f").unknownArguments(o,e,r,!!i):S(this,tr,"f")&&S(this,Ie,"f").unknownArguments(o,e,{},!1,!1),S(this,Ie,"f").limitedChoices(o),S(this,Ie,"f").implications(o),S(this,
227
- Ie,"f").conflicting(o)}}[Mu](){ue(this,Ke,!0,"f")}[ir](e){if(typeof e=="string")S(this,le,"f").key[e]=!0;else for(const r of e)S(this,le,"f").key[r]=!0}}function s0(t){return!!t&&typeof t.getInternalMethods=="function"}const o0=n0(Nm),Vr={type:"string",desc:"<directory> with LikeC4 sources (default is current directory)",normalize:!0,default:".",coerce:De},at={alias:"use-dot-bin",boolean:!0,type:"boolean",desc:'use graphviz binaries ("dot" should be on PATH)',default:!1},qu={boolean:!0,type:"boo\
228
- lean",desc:'use hash history for navigation, e.g. "/#/view" instead of "/view"'},_n={alias:"o",type:"string",desc:"<directory> output directory",normalize:!0,coerce:De},As={alias:"w",type:"string",desc:'prefix for Webcomponents, e.g "c4" generates <c4-view ../>',default:"likec4"},Uu={alias:["base-url"],type:"string",desc:'base url the app is being served from, e.g. "/" or "/pages/"'},Hu={boolean:!0,type:"boolean",desc:"overview all diagrams as graph [experimental]",default:!1},a0={boolean:!0,type:"\
229
- boolean",desc:"outputs a single self-contained HTML file with all required resources inlined"},u0={alias:"l",type:"string",desc:"ip address of the network interface to listen on",default:"127.0.0.1"},Vu=t=>t instanceof URL?Qa(t):t;function c0(t,{cwd:e=Te.cwd(),type:r="file",stopAt:n}={}){let i=be.resolve(Vu(e)??"");const{root:s}=be.parse(i);for(n=be.resolve(i,Vu(n)??s);i&&i!==n&&i!==s;){const o=be.isAbsolute(t)?t:be.join(i,t);try{const a=ge.statSync(o,{throwIfNoEntry:!1});if(r==="file"&&a?.isFile()||
230
- r==="directory"&&a?.isDirectory())return o}catch{}i=be.dirname(i)}}function l0({cwd:t=Te.cwd()}={}){return c0("package.json",{cwd:t})}const Cs=pt("vite"),wn=Gt(Qa(import.meta.url)),f0=`
195
+ "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[Na](),typeof e>"u"&&(e=O(this,gt,"f")),typeof r=="object"&&(ae(this,Nt,r,"f"),r=n),typeof r=="function"&&(ae(this,ke,r,"f"),r=!1),r||ae(this,gt,e,"f"),O(this,ke,"f")&&ae(this,ze,!1,"f");const s=this[vr](e,!!r),i=this.parsed;return O(this,Fe,"f").setParsed(this.parsed),Ae(s)?s.then(o=>(O(this,ke,"f")&&O(this,ke,"f").call(this,O(this,mt,"f"),o,O(this,Ce,"f")),o)).catch(o=>{throw O(this,ke,"f")&&O(this,ke,"f")(o,this.parsed.argv,O(this,Ce,"f")),o}).finally(()=>{this[Vs](),
197
+ this.parsed=i}):(O(this,ke,"f")&&O(this,ke,"f").call(this,O(this,mt,"f"),s,O(this,Ce,"f")),this[Vs](),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[qs](r||O(this,Pt,"f"));return s[e]&&typeof s[e]=="object"&&(n=xs(s[e],r||O(this,Pt,"f"),this[xt]()["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=gr(r,(o,a)=>o==="type"&&!["string","number","boole\
199
+ an"].includes(a)?!1:n.includes(o));const s=O(this,$r,"f").fullCommands[O(this,$r,"f").fullCommands.length-1],i=s?O(this,Se,"f").cmdToParseOptions(s):{array:[],alias:{},default:{},demand:{}};return xr(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,Vr,e,"f"),this}required(e,r,n){return this.demand(
200
+ 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[Kt](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,Bt,"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,Me,!0,
201
+ "f"),!O(this,de,"f").hasCachedHelpMessage()){if(!this.parsed){const n=this[vr](O(this,gt,"f"),void 0,void 0,0,!0);if(Ae(n))return n.then(()=>{O(this,de,"f").showHelp(e)}),this}const r=O(this,Se,"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
+ 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[yt]("skipValidation",e),this}strict(e){return ce("[boolean]",[e],arguments.length),ae(this,jt,e!==!1,"f"),this}strictCommands(e){return ce("[boolean]",[e],arguments.length),ae(this,Lt,e!==!1,"f"),this}strictOptions(e){return ce("[boolean]",[e],arguments.length),ae(this,Dt,e!==!1,"f"),this}string(e){return ce("<array|\
203
+ string>",[e],arguments.length),this[yt]("string",e),this[kt](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,It,!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(Ke(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,Gr,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[Ms](O(this,it,"f")),O(this,de,"f").version(void 0),ae(this,it,null,"f")),arguments.length===0)n=this[La](),e=s;else if(arguments.length===
205
+ 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}[(Se=new WeakMap,Pt=new WeakMap,$r=new WeakMap,Fe=new WeakMap,xe=new WeakMap,kr=new WeakMap,mt=new WeakMap,It=new WeakMap,qr=new WeakMap,
206
+ ze=new WeakMap,Hr=new WeakMap,Ve=new WeakMap,st=new WeakMap,Me=new WeakMap,Ge=new WeakMap,Ur=new WeakMap,Bt=new WeakMap,Ce=new WeakMap,ue=new WeakMap,Fr=new WeakMap,zr=new WeakMap,ke=new WeakMap,Nt=new WeakMap,Wt=new WeakMap,Tt=new WeakMap,gt=new WeakMap,Vr=new WeakMap,fe=new WeakMap,jt=new WeakMap,Lt=new WeakMap,Dt=new WeakMap,de=new WeakMap,Gr=new WeakMap,it=new WeakMap,Ee=new WeakMap,Ca)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[Pa](){return{
207
+ log:(...e)=>{this[Br]()||console.log(...e),ae(this,Me,!0,"f"),O(this,Ce,"f").length&&ae(this,Ce,O(this,Ce,"f")+`
208
+ `,"f"),ae(this,Ce,O(this,Ce,"f")+e.join(" "),"f")},error:(...e)=>{this[Br]()||console.error(...e),ae(this,Me,!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")}}}[Ms](e){xr(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]}[Ia](e,r,n){O(this,qr,"f")[n]||(O(this,fe,"f").process.emitWarning(e,r),O(this,qr,"f")[n]=!0)}[Na](){O(this,Hr,"f").push({options:O(this,ue,"f"),configObjects:O(this,ue,"f").configObjects.slice(0),exitProcess:O(
210
+ this,ze,"f"),groups:O(this,st,"f"),strict:O(this,jt,"f"),strictCommands:O(this,Lt,"f"),strictOptions:O(this,Dt,"f"),completionCommand:O(this,xe,"f"),output:O(this,Ce,"f"),exitError:O(this,mt,"f"),hasOutput:O(this,Me,"f"),parsed:this.parsed,parseFn:O(this,ke,"f"),parseContext:O(this,Nt,"f")}),O(this,de,"f").freeze(),O(this,Ee,"f").freeze(),O(this,Se,"f").freeze(),O(this,Ve,"f").freeze()}[Ta](){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[Ga](O(this,Pt,"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}[xt](){return O(this,zr,"f")}[ja](){return O(this,Gr,"f")}[ks](){if(!O(this,It,"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(/[.:].*/,""))}[La](){return this[qs]().version||"unknown"}[Da](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}[qs](e){const r=e||"*";if(O(this,Wt,"f")[r])return O(this,Wt,"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"});Ke(i,void 0,O(this,fe,"f")),n=JSON.parse(O(this,fe,"f").readFileSync(i,"utf8"))}catch{}return O(this,Wt,"f")[r]=n||{},O(this,Wt,"f")[r]}[yt](e,r){r=[].concat(r),r.forEach(n=>{n=this[Fs](n),O(this,ue,"f")[e].push(n)})}[Kt](e,r,n,s){this[Us](e,r,n,s,(i,o,a)=>{O(this,ue,"f")[i][o]=a})}[Hs](e,r,n,s){this[Us](e,
214
+ r,n,s,(i,o,a)=>{O(this,ue,"f")[i][o]=(O(this,ue,"f")[i][o]||[]).concat(a)})}[Us](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 xr(n))e(o,n[o]);else i(r,this[Fs](n),s)}[Fs](e){return e==="__proto__"?"___proto___":e}[zs](e,r){return this[Kt](this[zs].bind(this),"key",e,r),this}[Vs](){var e,r,n,s,i,o,a,u,l,c,d,h;const y=O(this,Hr,"f").pop();Ke(y,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,
215
+ d=this,h=this,{options:{set value(_){ae(e,ue,_,"f")}}.value,configObjects:b,exitProcess:{set value(_){ae(r,ze,_,"f")}}.value,groups:{set value(_){ae(n,st,_,"f")}}.value,output:{set value(_){ae(s,Ce,_,"f")}}.value,exitError:{set value(_){ae(i,mt,_,"f")}}.value,hasOutput:{set value(_){ae(o,Me,_,"f")}}.value,parsed:this.parsed,strict:{set value(_){ae(a,jt,_,"f")}}.value,strictCommands:{set value(_){ae(u,Lt,_,"f")}}.value,strictOptions:{set value(_){ae(l,Dt,_,"f")}}.value,completionCommand:{set value(_){
216
+ ae(c,xe,_,"f")}}.value,parseFn:{set value(_){ae(d,ke,_,"f")}}.value,parseContext:{set value(_){ae(h,Nt,_,"f")}}.value}=y,O(this,ue,"f").configObjects=b,O(this,de,"f").unfreeze(),O(this,Ee,"f").unfreeze(),O(this,Se,"f").unfreeze(),O(this,Ve,"f").unfreeze()}[xa](e,r){return mr(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[Ma].bind(this),getContext:this[ka].bind(this),getHasOutput:this[qa].bind(this),getLoggerInstance:this[Ha].bind(this),getParseContext:this[Ua].bind(this),getParserConfiguration:this[xt].
217
+ bind(this),getUsageConfiguration:this[ja].bind(this),getUsageInstance:this[Fa].bind(this),getValidationInstance:this[za].bind(this),hasParseCallback:this[Br].bind(this),isGlobalContext:this[Va].bind(this),postProcess:this[Mt].bind(this),reset:this[Gs].bind(this),runValidation:this[Bs].bind(this),runYargsParserAndExecuteCommands:this[vr].bind(this),setHasOutput:this[Ba].bind(this)}}[Ma](){return O(this,Se,"f")}[ka](){return O(this,$r,"f")}[qa](){return O(this,Me,"f")}[Ha](){return O(this,Bt,"f")}[Ua](){
218
+ return O(this,Nt,"f")||{}}[Fa](){return O(this,de,"f")}[za](){return O(this,Ee,"f")}[Br](){return!!O(this,ke,"f")}[Va](){return O(this,Ur,"f")}[Mt](e,r,n,s){return n||Ae(e)||(r||(e=this[Ca](e)),(this[xt]()["parse-positional-numbers"]||this[xt]()["parse-positional-numbers"]===void 0)&&(e=this[Da](e)),s&&(e=pr(e,this,O(this,Ve,"f").getMiddleware(),!1))),e}[Gs](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,Tt,"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
+ ue,"f")[o]||[]).filter(a=>!n[a])}),i.forEach(o=>{r[o]=gr(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):xp(this,O(this,fe,"f")),"f"),ae(this,Ee,O(this,Ee,"f")?O(this,Ee,"f").reset(n):Gp(this,O(this,de,"f"),O(this,fe,"f")),"f"),ae(this,Se,O(this,Se,"f")?O(this,Se,"f").reset():Np(O(this,de,"f"),O(this,Ee,"f"),O(this,Ve,"f"),O(this,fe,"f")),"f"),O(this,Fe,"f")||ae(this,Fe,Up(this,O(this,de,"f"),O(this,Se,"f"),O(
221
+ this,fe,"f")),"f"),O(this,Ve,"f").reset(),ae(this,xe,null,"f"),ae(this,Ce,"","f"),ae(this,mt,null,"f"),ae(this,Me,!1,"f"),this.parsed=!1,this}[Ga](e,r){return O(this,fe,"f").path.relative(e,r)}[vr](e,r,n,s=0,i=!1){let o=!!n||i;e=e||O(this,gt,"f"),O(this,ue,"f").__=O(this,fe,"f").y18n.__,O(this,ue,"f").configuration=this[xt]();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({},
222
+ O(this,ue,"f"),{configuration:{"parse-positional-numbers":!1,...u}})),c=Object.assign(l.argv,O(this,Nt,"f"));let d;const h=l.aliases;let y=!1,b=!1;Object.keys(c).forEach(_=>{_===O(this,Ge,"f")&&c[_]?y=!0:_===O(this,it,"f")&&c[_]&&(b=!0)}),c.$0=this.$0,this.parsed=l,s===0&&O(this,de,"f").clearCachedHelpMessage();try{if(this[ks](),r)return this[Mt](c,a,!!n,!1);O(this,Ge,"f")&&[O(this,Ge,"f")].concat(h[O(this,Ge,"f")]||[]).filter(m=>m.length>1).includes(""+c._[c._.length-1])&&(c._.pop(),y=!0),ae(this,
223
+ Ur,!1,"f");const _=O(this,Se,"f").getCommands(),f=O(this,Fe,"f").completionKey in c,g=y||f||i;if(c._.length){if(_.length){let p;for(let m=s||0,$;c._[m]!==void 0;m++)if($=String(c._[m]),_.includes($)&&$!==O(this,xe,"f")){const v=O(this,Se,"f").runCommand($,this,l,m+1,i,y||b||i);return this[Mt](v,a,!!n,!1)}else if(!p&&$!==O(this,xe,"f")){p=$;break}!O(this,Se,"f").hasDefaultCommand()&&O(this,Vr,"f")&&p&&!g&&O(this,Ee,"f").recommendCommands(p,_)}O(this,xe,"f")&&c._.includes(O(this,xe,"f"))&&!f&&(O(this,
224
+ ze,"f")&&yr(!0),this.showCompletionScript(),this.exit(0))}if(O(this,Se,"f").hasDefaultCommand()&&!g){const p=O(this,Se,"f").runCommand(null,this,l,0,i,y||b||i);return this[Mt](p,a,!!n,!1)}if(f){O(this,ze,"f")&&yr(!0),e=[].concat(e);const p=e.slice(e.indexOf(`--${O(this,Fe,"f").completionKey}`)+1);return O(this,Fe,"f").getCompletion(p,(m,$)=>{if(m)throw new Oe(m.message);($||[]).forEach(v=>{O(this,Bt,"f").log(v)}),this.exit(0)}),this[Mt](c,!a,!!n,!1)}if(O(this,Me,"f")||(y?(O(this,ze,"f")&&yr(!0),
225
+ o=!0,this.showHelp("log"),this.exit(0)):b&&(O(this,ze,"f")&&yr(!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(p=>O(this,ue,"f").skipValidation.indexOf(p)>=0&&c[p]===!0)),!o){if(l.error)throw new Oe(l.error.message);if(!f){const p=this[Bs](h,{},l.error);n||(d=pr(c,this,O(this,Ve,"f").getMiddleware(),!0)),d=this[xa](p,d??c),Ae(d)&&!n&&(d=d.then(()=>pr(c,this,O(this,Ve,"f").getMiddleware(),!1)))}}}catch(_){if(_ instanceof
226
+ Oe)O(this,de,"f").fail(_.message,_);else throw _}return this[Mt](d??c,a,!!n,!0)}[Bs](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,Lt,"f")&&(a=O(this,Ee,"f").unknownCommands(o)),O(this,jt,"f")&&!a?O(this,Ee,"f").unknownArguments(o,e,r,!!s):O(this,Dt,"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)}}[Ba](){ae(this,Me,!0,"f")}[kt](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 Xp(t){return!!t&&typeof t.getInternalMethods=="function"}const Jp=Kp(Sp),br={type:"string",desc:"<directory> with LikeC4 sources (default is current directory)",normalize:!0,default:".",coerce:ge},Ye={alias:"use-dot-bin",boolean:!0,type:"boolean",desc:'use graphviz binaries ("dot" should be on PATH)',default:!1},Wa={boolean:!0,type:"boo\
228
+ lean",desc:'use hash history for navigation, e.g. "/#/view" instead of "/view"'},Wr={alias:"o",type:"string",desc:"<directory> output directory",normalize:!0,coerce:ge},Ws={alias:"w",type:"string",desc:'prefix for Webcomponents, e.g "c4" generates <c4-view ../>',default:"likec4"},Ka={alias:["base-url"],type:"string",desc:'base url the app is being served from, e.g. "/" or "/pages/"'},Ya={boolean:!0,type:"boolean",desc:"overview all diagrams as graph [experimental]",default:!1},Qp={boolean:!0,type:"\
229
+ boolean",desc:"outputs a single self-contained HTML file with all required resources inlined"},Zp={alias:"l",type:"string",desc:"ip address of the network interface to listen on",default:"127.0.0.1"},Xa=t=>t instanceof URL?ia(t):t;function em(t,{cwd:e=Re.cwd(),type:r="file",stopAt:n}={}){let s=$e.resolve(Xa(e)??"");const{root:i}=$e.parse(s);for(n=$e.resolve(s,Xa(n)??i);s&&s!==n&&s!==i;){const o=$e.isAbsolute(t)?t:$e.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=$e.dirname(s)}}function tm({cwd:t=Re.cwd()}={}){return em("package.json",{cwd:t})}const Ks=tt("vite"),Kr=Rt(ia(import.meta.url)),rm=`
231
231
  /* prettier-ignore-start */
232
232
  /* eslint-disable */
233
233
 
@@ -236,937 +236,552 @@ r==="directory"&&a?.isDirectory())return o}catch{}i=be.dirname(i)}}function l0({
236
236
  * DO NOT EDIT MANUALLY!
237
237
  ******************************************************************************/
238
238
 
239
- `.trimStart(),d0=`
239
+ `.trimStart(),nm=`
240
240
 
241
241
  /* prettier-ignore-end */
242
- `,Ss={banner:f0,footer:d0};function zu(){const t=l0({cwd:wn});if(!t)throw new Error("likec4 package folder not found");return Gt(t)}function Rs(){const t=zu(),e=[De(t,"__app__"),De(wn,"../__app__"),De(wn,"../../__app__"),De(wn,"../../dist/__app__")],r=Ep(e,Pt);if(!r)throw mt.error(`likec4 app root does not exist, tried:
242
+ `,Ys={banner:rm,footer:nm};function Ja(){const t=tm({cwd:Kr});if(!t)throw new Error("likec4 package folder not found");return Rt(t)}function Xs(){const t=Ja(),e=[ge(t,"__app__"),ge(Kr,"../__app__"),ge(Kr,"../../__app__"),ge(Kr,"../../dist/__app__")],r=uh(e,Ot);if(!r)throw at.error(`likec4 app root does not exist, tried:
243
243
  ${e.join(`
244
- `)}`),new Error("likec4 app root does not exist");return r}async function Os(){const t=await an(Rr(un(),".likec4-public-"));return await Kt(Rr(t,"likec4-views.js"),`// generated by likec4
245
- `),t}const Is=1e4;function Fs(){const t=zu();return{"likec4/icons":De(t,"icons"),"likec4/react":De(t,"react"),"likec4/model":De(t,"dist/model")}}var Ps={},Gu;function Ns(){return Gu||(Gu=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,i)=>i===!1||!t.isInteger(e)||!t.isInteger(r)?!1:(Number(r)-Number(e))/Number(n)>=i,t.escapeNode=(e,r=0,n)=>{const i=e.
246
- nodes[r];i&&(n&&i.type===n||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.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=i=>{for(let s=0;s<i.length;s++){const o=i[s];if(Array.isArray(o)){n(o);continue}o!==void 0&&r.push(o)}return r};return n(e),r}}(Ps)),Ps}var Ts,Wu;function Ls(){if(Wu)return Ts;Wu=1;const t=Ns();return Ts=(e,r={})=>{const n=(i,s={})=>{const o=r.escapeInvalid&&t.isInvalidBrace(s),a=i.invalid===!0&&r.escapeInvalid===!0;let u="";if(i.value)return(o||a)&&t.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(const l of i.
248
- nodes)u+=n(l);return u};return n(e)},Ts}var js,Ku;function h0(){return Ku||(Ku=1,js=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}),js}var ks,Yu;function p0(){if(Yu)return ks;Yu=1;const t=h0(),e=(f,g,p)=>{if(t(f)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(g===void 0||f===g)return String(f);if(t(g)===!1)throw new TypeError("toRegexRange: expected the second argument t\
249
- o be a number.");let m={relaxZeros:!0,...p};typeof m.strictZeros=="boolean"&&(m.relaxZeros=m.strictZeros===!1);let D=String(m.relaxZeros),v=String(m.shorthand),_=String(m.capture),b=String(m.wrap),I=f+":"+g+"="+D+v+_+b;if(e.cache.hasOwnProperty(I))return e.cache[I].result;let U=Math.min(f,g),G=Math.max(f,g);if(Math.abs(U-G)===1){let M=f+"|"+g;return m.capture?`(${M})`:m.wrap===!1?M:`(?:${M})`}let L=$(f)||$(g),B={min:f,max:g,a:U,b:G},N=[],j=[];if(L&&(B.isPadded=L,B.maxLen=String(B.max).length),U<
250
- 0){let M=G<0?Math.abs(G):1;j=s(M,Math.abs(U),B,m),U=B.a=0}return G>=0&&(N=s(U,G,B,m)),B.negatives=j,B.positives=N,B.result=r(j,N),m.capture===!0?B.result=`(${B.result})`:m.wrap!==!1&&N.length+j.length>1&&(B.result=`(?:${B.result})`),e.cache[I]=B,B.result};function r(f,g,p){let m=o(f,g,"-",!1)||[],D=o(g,f,"",!1)||[],v=o(f,g,"-?",!0)||[];return m.concat(v).concat(D).join("|")}function n(f,g){let p=1,m=1,D=c(f,p),v=new Set([g]);for(;f<=D&&D<=g;)v.add(D),p+=1,D=c(f,p);for(D=d(g+1,m)-1;f<D&&D<=g;)v.add(
251
- D),m+=1,D=d(g+1,m)-1;return v=[...v],v.sort(u),v}function i(f,g,p){if(f===g)return{pattern:f,count:[],digits:0};let m=a(f,g),D=m.length,v="",_=0;for(let b=0;b<D;b++){let[I,U]=m[b];I===U?v+=I:I!=="0"||U!=="9"?v+=E(I,U):_++}return _&&(v+=p.shorthand===!0?"\\d":"[0-9]"),{pattern:v,count:[_],digits:D}}function s(f,g,p,m){let D=n(f,g),v=[],_=f,b;for(let I=0;I<D.length;I++){let U=D[I],G=i(String(_),String(U),m),L="";if(!p.isPadded&&b&&b.pattern===G.pattern){b.count.length>1&&b.count.pop(),b.count.push(
252
- G.count[0]),b.string=b.pattern+h(b.count),_=U+1;continue}p.isPadded&&(L=y(U,p,m)),G.string=L+G.pattern+h(G.count),v.push(G),_=U+1,b=G}return v}function o(f,g,p,m,D){let v=[];for(let _ of f){let{string:b}=_;!m&&!l(g,"string",b)&&v.push(p+b),m&&l(g,"string",b)&&v.push(p+b)}return v}function a(f,g){let p=[];for(let m=0;m<f.length;m++)p.push([f[m],g[m]]);return p}function u(f,g){return f>g?1:g>f?-1:0}function l(f,g,p){return f.some(m=>m[g]===p)}function c(f,g){return Number(String(f).slice(0,-g)+"9".
253
- repeat(g))}function d(f,g){return f-f%Math.pow(10,g)}function h(f){let[g=0,p=""]=f;return p||g>1?`{${g+(p?","+p:"")}}`:""}function E(f,g,p){return`[${f}${g-f===1?"":"-"}${g}]`}function $(f){return/^-?(0+)\d/.test(f)}function y(f,g,p){if(!g.isPadded)return f;let m=Math.abs(g.maxLen-String(f).length),D=p.relaxZeros!==!1;switch(m){case 0:return"";case 1:return D?"0?":"0";case 2:return D?"0{0,2}":"00";default:return D?`0{0,${m}}`:`0{${m}}`}}return e.cache={},e.clearCache=()=>e.cache={},ks=e,ks}var Bs,
254
- Ju;function Xu(){if(Ju)return Bs;Ju=1;const t=Ya,e=p0(),r=m=>m!==null&&typeof m=="object"&&!Array.isArray(m),n=m=>D=>m===!0?Number(D):String(D),i=m=>typeof m=="number"||typeof m=="string"&&m!=="",s=m=>Number.isInteger(+m),o=m=>{let D=`${m}`,v=-1;if(D[0]==="-"&&(D=D.slice(1)),D==="0")return!1;for(;D[++v]==="0";);return v>0},a=(m,D,v)=>typeof m=="string"||typeof D=="string"?!0:v.stringify===!0,u=(m,D,v)=>{if(D>0){let _=m[0]==="-"?"-":"";_&&(m=m.slice(1)),m=_+m.padStart(_?D-1:D,"0")}return v===!1?String(
255
- m):m},l=(m,D)=>{let v=m[0]==="-"?"-":"";for(v&&(m=m.slice(1),D--);m.length<D;)m="0"+m;return v?"-"+m:m},c=(m,D,v)=>{m.negatives.sort((G,L)=>G<L?-1:G>L?1:0),m.positives.sort((G,L)=>G<L?-1:G>L?1:0);let _=D.capture?"":"?:",b="",I="",U;return m.positives.length&&(b=m.positives.map(G=>l(String(G),v)).join("|")),m.negatives.length&&(I=`-(${_}${m.negatives.map(G=>l(String(G),v)).join("|")})`),b&&I?U=`${b}|${I}`:U=b||I,D.wrap?`(${_}${U})`:U},d=(m,D,v,_)=>{if(v)return e(m,D,{wrap:!1,..._});let b=String.fromCharCode(
256
- m);if(m===D)return b;let I=String.fromCharCode(D);return`[${b}-${I}]`},h=(m,D,v)=>{if(Array.isArray(m)){let _=v.wrap===!0,b=v.capture?"":"?:";return _?`(${b}${m.join("|")})`:m.join("|")}return e(m,D,v)},E=(...m)=>new RangeError("Invalid range arguments: "+t.inspect(...m)),$=(m,D,v)=>{if(v.strictRanges===!0)throw E([m,D]);return[]},y=(m,D)=>{if(D.strictRanges===!0)throw new TypeError(`Expected step "${m}" to be a number`);return[]},f=(m,D,v=1,_={})=>{let b=Number(m),I=Number(D);if(!Number.isInteger(
257
- b)||!Number.isInteger(I)){if(_.strictRanges===!0)throw E([m,D]);return[]}b===0&&(b=0),I===0&&(I=0);let U=b>I,G=String(m),L=String(D),B=String(v);v=Math.max(Math.abs(v),1);let N=o(G)||o(L)||o(B),j=N?Math.max(G.length,L.length,B.length):0,M=N===!1&&a(m,D,_)===!1,Y=_.transform||n(M);if(_.toRegex&&v===1)return d(l(m,j),l(D,j),!0,_);let z={negatives:[],positives:[]},X=C=>z[C<0?"negatives":"positives"].push(Math.abs(C)),se=[],q=0;for(;U?b>=I:b<=I;)_.toRegex===!0&&v>1?X(b):se.push(u(Y(b,q),j,M)),b=U?b-
258
- v:b+v,q++;return _.toRegex===!0?v>1?c(z,_,j):h(se,null,{wrap:!1,..._}):se},g=(m,D,v=1,_={})=>{if(!s(m)&&m.length>1||!s(D)&&D.length>1)return $(m,D,_);let b=_.transform||(M=>String.fromCharCode(M)),I=`${m}`.charCodeAt(0),U=`${D}`.charCodeAt(0),G=I>U,L=Math.min(I,U),B=Math.max(I,U);if(_.toRegex&&v===1)return d(L,B,!1,_);let N=[],j=0;for(;G?I>=U:I<=U;)N.push(b(I,j)),I=G?I-v:I+v,j++;return _.toRegex===!0?h(N,null,{wrap:!1,options:_}):N},p=(m,D,v,_={})=>{if(D==null&&i(m))return[m];if(!i(m)||!i(D))return $(
259
- m,D,_);if(typeof v=="function")return p(m,D,1,{transform:v});if(r(v))return p(m,D,0,v);let b={..._};return b.capture===!0&&(b.wrap=!0),v=v||b.step||1,s(v)?s(m)&&s(D)?f(m,D,v,b):g(m,D,Math.max(Math.abs(v),1),b):v!=null&&!r(v)?y(v,b):p(m,D,1,v)};return Bs=p,Bs}var xs,Qu;function m0(){if(Qu)return xs;Qu=1;const t=Xu(),e=Ns();return xs=(n,i={})=>{const s=(o,a={})=>{const u=e.isInvalidBrace(a),l=o.invalid===!0&&i.escapeInvalid===!0,c=u===!0||l===!0,d=i.escapeInvalid===!0?"\\":"";let h="";if(o.isOpen===
260
- !0)return d+o.value;if(o.isClose===!0)return console.log("node.isClose",d,o.value),d+o.value;if(o.type==="open")return c?d+o.value:"(";if(o.type==="close")return c?d+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=e.reduce(o.nodes),$=t(...E,{...i,wrap:!1,toRegex:!0,strictZeros:!0});if($.length!==0)return E.length>1&&$.length>1?`(${$})`:$}if(o.nodes)for(const E of o.nodes)h+=s(E,o);return h};return s(n)},xs}var Ms,
261
- Zu;function g0(){if(Zu)return Ms;Zu=1;const t=Xu(),e=Ls(),r=Ns(),n=(s="",o="",a=!1)=>{const u=[];if(s=[].concat(s),o=[].concat(o),!o.length)return s;if(!s.length)return a?r.flatten(o).map(l=>`{${l}}`):o;for(const l of s)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 Ms=(s,o={})=>{const a=o.rangeLimit===void 0?1e3:o.rangeLimit,u=(l,c={})=>{l.queue=[];let d=c,h=c.queue;
244
+ `)}`),new Error("likec4 app root does not exist");return r}async function Js(){const t=await Tr(ir(jr(),".likec4-public-"));return await Ct(ir(t,"likec4-views.js"),`// generated by likec4
245
+ `),t}const Qs=1e4;function Zs(){const t=Ja();return{"likec4/icons":ge(t,"icons"),"likec4/react":ge(t,"react"),"likec4/model":ge(t,"dist/model")}}var ei={},Qa;function ti(){return Qa||(Qa=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
+ 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}}(ei)),ei}var ri,Za;function ni(){if(Za)return ri;Za=1;const t=ti();return ri=(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.
248
+ nodes)u+=n(l);return u};return n(e)},ri}var si,ec;function sm(){return ec||(ec=1,si=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}),si}var ii,tc;function im(){if(tc)return ii;tc=1;const t=sm(),e=(f,g,p)=>{if(t(f)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(g===void 0||f===g)return String(f);if(t(g)===!1)throw new TypeError("toRegexRange: expected the second argument t\
249
+ o be a number.");let m={relaxZeros:!0,...p};typeof m.strictZeros=="boolean"&&(m.relaxZeros=m.strictZeros===!1);let $=String(m.relaxZeros),v=String(m.shorthand),E=String(m.capture),S=String(m.wrap),I=f+":"+g+"="+$+v+E+S;if(e.cache.hasOwnProperty(I))return e.cache[I].result;let F=Math.min(f,g),B=Math.max(f,g);if(Math.abs(F-B)===1){let H=f+"|"+g;return m.capture?`(${H})`:m.wrap===!1?H:`(?:${H})`}let D=b(f)||b(g),k={min:f,max:g,a:F,b:B},j=[],x=[];if(D&&(k.isPadded=D,k.maxLen=String(k.max).length),F<
250
+ 0){let H=B<0?Math.abs(B):1;x=i(H,Math.abs(F),k,m),F=k.a=0}return B>=0&&(j=i(F,B,k,m)),k.negatives=x,k.positives=j,k.result=r(x,j),m.capture===!0?k.result=`(${k.result})`:m.wrap!==!1&&j.length+x.length>1&&(k.result=`(?:${k.result})`),e.cache[I]=k,k.result};function r(f,g,p){let m=o(f,g,"-",!1)||[],$=o(g,f,"",!1)||[],v=o(f,g,"-?",!0)||[];return m.concat(v).concat($).join("|")}function n(f,g){let p=1,m=1,$=c(f,p),v=new Set([g]);for(;f<=$&&$<=g;)v.add($),p+=1,$=c(f,p);for($=d(g+1,m)-1;f<$&&$<=g;)v.add(
251
+ $),m+=1,$=d(g+1,m)-1;return v=[...v],v.sort(u),v}function s(f,g,p){if(f===g)return{pattern:f,count:[],digits:0};let m=a(f,g),$=m.length,v="",E=0;for(let S=0;S<$;S++){let[I,F]=m[S];I===F?v+=I:I!=="0"||F!=="9"?v+=y(I,F):E++}return E&&(v+=p.shorthand===!0?"\\d":"[0-9]"),{pattern:v,count:[E],digits:$}}function i(f,g,p,m){let $=n(f,g),v=[],E=f,S;for(let I=0;I<$.length;I++){let F=$[I],B=s(String(E),String(F),m),D="";if(!p.isPadded&&S&&S.pattern===B.pattern){S.count.length>1&&S.count.pop(),S.count.push(
252
+ B.count[0]),S.string=S.pattern+h(S.count),E=F+1;continue}p.isPadded&&(D=_(F,p,m)),B.string=D+B.pattern+h(B.count),v.push(B),E=F+1,S=B}return v}function o(f,g,p,m,$){let v=[];for(let E of f){let{string:S}=E;!m&&!l(g,"string",S)&&v.push(p+S),m&&l(g,"string",S)&&v.push(p+S)}return v}function a(f,g){let p=[];for(let m=0;m<f.length;m++)p.push([f[m],g[m]]);return p}function u(f,g){return f>g?1:g>f?-1:0}function l(f,g,p){return f.some(m=>m[g]===p)}function c(f,g){return Number(String(f).slice(0,-g)+"9".
253
+ repeat(g))}function d(f,g){return f-f%Math.pow(10,g)}function h(f){let[g=0,p=""]=f;return p||g>1?`{${g+(p?","+p:"")}}`:""}function y(f,g,p){return`[${f}${g-f===1?"":"-"}${g}]`}function b(f){return/^-?(0+)\d/.test(f)}function _(f,g,p){if(!g.isPadded)return f;let m=Math.abs(g.maxLen-String(f).length),$=p.relaxZeros!==!1;switch(m){case 0:return"";case 1:return $?"0?":"0";case 2:return $?"0{0,2}":"00";default:return $?`0{0,${m}}`:`0{${m}}`}}return e.cache={},e.clearCache=()=>e.cache={},ii=e,ii}var oi,
254
+ rc;function nc(){if(rc)return oi;rc=1;const t=ra,e=im(),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 E=m[0]==="-"?"-":"";E&&(m=m.slice(1)),m=E+m.padStart(E?$-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},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 E=$.capture?"":"?:",S="",I="",F;return m.positives.length&&(S=m.positives.map(B=>l(String(B),v)).join("|")),m.negatives.length&&(I=`-(${E}${m.negatives.map(B=>l(String(B),v)).join("|")})`),S&&I?F=`${S}|${I}`:F=S||I,$.wrap?`(${E}${F})`:F},d=(m,$,v,E)=>{if(v)return e(m,$,{wrap:!1,...E});let S=String.fromCharCode(
256
+ m);if(m===$)return S;let I=String.fromCharCode($);return`[${S}-${I}]`},h=(m,$,v)=>{if(Array.isArray(m)){let E=v.wrap===!0,S=v.capture?"":"?:";return E?`(${S}${m.join("|")})`:m.join("|")}return e(m,$,v)},y=(...m)=>new RangeError("Invalid range arguments: "+t.inspect(...m)),b=(m,$,v)=>{if(v.strictRanges===!0)throw y([m,$]);return[]},_=(m,$)=>{if($.strictRanges===!0)throw new TypeError(`Expected step "${m}" to be a number`);return[]},f=(m,$,v=1,E={})=>{let S=Number(m),I=Number($);if(!Number.isInteger(
257
+ S)||!Number.isInteger(I)){if(E.strictRanges===!0)throw y([m,$]);return[]}S===0&&(S=0),I===0&&(I=0);let F=S>I,B=String(m),D=String($),k=String(v);v=Math.max(Math.abs(v),1);let j=o(B)||o(D)||o(k),x=j?Math.max(B.length,D.length,k.length):0,H=j===!1&&a(m,$,E)===!1,K=E.transform||n(H);if(E.toRegex&&v===1)return d(l(m,x),l($,x),!0,E);let G={negatives:[],positives:[]},X=A=>G[A<0?"negatives":"positives"].push(Math.abs(A)),se=[],U=0;for(;F?S>=I:S<=I;)E.toRegex===!0&&v>1?X(S):se.push(u(K(S,U),x,H)),S=F?S-
258
+ v:S+v,U++;return E.toRegex===!0?v>1?c(G,E,x):h(se,null,{wrap:!1,...E}):se},g=(m,$,v=1,E={})=>{if(!i(m)&&m.length>1||!i($)&&$.length>1)return b(m,$,E);let S=E.transform||(H=>String.fromCharCode(H)),I=`${m}`.charCodeAt(0),F=`${$}`.charCodeAt(0),B=I>F,D=Math.min(I,F),k=Math.max(I,F);if(E.toRegex&&v===1)return d(D,k,!1,E);let j=[],x=0;for(;B?I>=F:I<=F;)j.push(S(I,x)),I=B?I-v:I+v,x++;return E.toRegex===!0?h(j,null,{wrap:!1,options:E}):j},p=(m,$,v,E={})=>{if($==null&&s(m))return[m];if(!s(m)||!s($))return b(
259
+ m,$,E);if(typeof v=="function")return p(m,$,1,{transform:v});if(r(v))return p(m,$,0,v);let S={...E};return S.capture===!0&&(S.wrap=!0),v=v||S.step||1,i(v)?i(m)&&i($)?f(m,$,v,S):g(m,$,Math.max(Math.abs(v),1),S):v!=null&&!r(v)?_(v,S):p(m,$,1,v)};return oi=p,oi}var ai,sc;function om(){if(sc)return ai;sc=1;const t=nc(),e=ti();return ai=(n,s={})=>{const i=(o,a={})=>{const u=e.isInvalidBrace(a),l=o.invalid===!0&&s.escapeInvalid===!0,c=u===!0||l===!0,d=s.escapeInvalid===!0?"\\":"";let h="";if(o.isOpen===
260
+ !0)return d+o.value;if(o.isClose===!0)return console.log("node.isClose",d,o.value),d+o.value;if(o.type==="open")return c?d+o.value:"(";if(o.type==="close")return c?d+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 y=e.reduce(o.nodes),b=t(...y,{...s,wrap:!1,toRegex:!0,strictZeros:!0});if(b.length!==0)return y.length>1&&b.length>1?`(${b})`:b}if(o.nodes)for(const y of o.nodes)h+=i(y,o);return h};return i(n)},ai}var ci,
261
+ ic;function am(){if(ic)return ci;ic=1;const t=nc(),e=ni(),r=ti(),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 ci=(i,o={})=>{const a=o.rangeLimit===void 0?1e3:o.rangeLimit,u=(l,c={})=>{l.queue=[];let d=c,h=c.queue;
262
262
  for(;d.type!=="brace"&&d.type!=="root"&&d.parent;)d=d.parent,h=d.queue;if(l.invalid||l.dollar){h.push(n(h.pop(),e(l,o)));return}if(l.type==="brace"&&l.invalid!==!0&&l.nodes.length===2){h.push(n(h.pop(),["{}"]));return}if(l.nodes&&l.ranges>0){const f=r.reduce(l.nodes);if(r.exceedsLimit(...f,o.step,a))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let g=t(...f,o);g.length===0&&(g=e(l,o)),h.push(n(h.pop(),g)),l.nodes=[];return}
263
- const E=r.encloseBrace(l);let $=l.queue,y=l;for(;y.type!=="brace"&&y.type!=="root"&&y.parent;)y=y.parent,$=y.queue;for(let f=0;f<l.nodes.length;f++){const g=l.nodes[f];if(g.type==="comma"&&l.type==="brace"){f===1&&$.push(""),$.push("");continue}if(g.type==="close"){h.push(n(h.pop(),$,E));continue}if(g.value&&g.type!=="open"){$.push(n($.pop(),g.value));continue}g.nodes&&u(g,l)}return $};return r.flatten(u(s))},Ms}var qs,ec;function y0(){return ec||(ec=1,qs={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"\
263
+ const y=r.encloseBrace(l);let b=l.queue,_=l;for(;_.type!=="brace"&&_.type!=="root"&&_.parent;)_=_.parent,b=_.queue;for(let f=0;f<l.nodes.length;f++){const g=l.nodes[f];if(g.type==="comma"&&l.type==="brace"){f===1&&b.push(""),b.push("");continue}if(g.type==="close"){h.push(n(h.pop(),b,y));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))},ci}var ui,oc;function cm(){return oc||(oc=1,ui={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"\
264
264
  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
265
  {",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"}),qs}var Us,tc;function E0(){if(tc)return Us;tc=1;const t=Ls(),{MAX_LENGTH:e,CHAR_BACKSLASH:r,CHAR_BACKTICK:n,CHAR_COMMA:i,CHAR_DOT:s,CHAR_LEFT_PARENTHESES:o,CHAR_RIGHT_PARENTHESES:a,
267
- CHAR_LEFT_CURLY_BRACE:u,CHAR_RIGHT_CURLY_BRACE:l,CHAR_LEFT_SQUARE_BRACKET:c,CHAR_RIGHT_SQUARE_BRACKET:d,CHAR_DOUBLE_QUOTE:h,CHAR_SINGLE_QUOTE:E,CHAR_NO_BREAK_SPACE:$,CHAR_ZERO_WIDTH_NOBREAK_SPACE:y}=y0();return Us=(g,p={})=>{if(typeof g!="string")throw new TypeError("Expected a string");const m=p||{},D=typeof m.maxLength=="number"?Math.min(e,m.maxLength):e;if(g.length>D)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${D})`);const v={type:"root",input:g,nodes:[]},_=[v];
268
- let b=v,I=v,U=0;const G=g.length;let L=0,B=0,N;const j=()=>g[L++],M=Y=>{if(Y.type==="text"&&I.type==="dot"&&(I.type="text"),I&&I.type==="text"&&Y.type==="text"){I.value+=Y.value;return}return b.nodes.push(Y),Y.parent=b,Y.prev=I,I=Y,Y};for(M({type:"bos"});L<G;)if(b=_[_.length-1],N=j(),!(N===y||N===$)){if(N===r){M({type:"text",value:(p.keepEscaping?N:"")+j()});continue}if(N===d){M({type:"text",value:"\\"+N});continue}if(N===c){U++;let Y;for(;L<G&&(Y=j());){if(N+=Y,Y===c){U++;continue}if(Y===r){N+=
269
- j();continue}if(Y===d&&(U--,U===0))break}M({type:"text",value:N});continue}if(N===o){b=M({type:"paren",nodes:[]}),_.push(b),M({type:"text",value:N});continue}if(N===a){if(b.type!=="paren"){M({type:"text",value:N});continue}b=_.pop(),M({type:"text",value:N}),b=_[_.length-1];continue}if(N===h||N===E||N===n){const Y=N;let z;for(p.keepQuotes!==!0&&(N="");L<G&&(z=j());){if(z===r){N+=z+j();continue}if(z===Y){p.keepQuotes===!0&&(N+=z);break}N+=z}M({type:"text",value:N});continue}if(N===u){B++;const z={
270
- type:"brace",open:!0,close:!1,dollar:I.value&&I.value.slice(-1)==="$"||b.dollar===!0,depth:B,commas:0,ranges:0,nodes:[]};b=M(z),_.push(b),M({type:"open",value:N});continue}if(N===l){if(b.type!=="brace"){M({type:"text",value:N});continue}const Y="close";b=_.pop(),b.close=!0,M({type:Y,value:N}),B--,b=_[_.length-1];continue}if(N===i&&B>0){if(b.ranges>0){b.ranges=0;const Y=b.nodes.shift();b.nodes=[Y,{type:"text",value:t(b)}]}M({type:"comma",value:N}),b.commas++;continue}if(N===s&&B>0&&b.commas===0){
271
- const Y=b.nodes;if(B===0||Y.length===0){M({type:"text",value:N});continue}if(I.type==="dot"){if(b.range=[],I.value+=N,I.type="range",b.nodes.length!==3&&b.nodes.length!==5){b.invalid=!0,b.ranges=0,I.type="text";continue}b.ranges++,b.args=[];continue}if(I.type==="range"){Y.pop();const z=Y[Y.length-1];z.value+=I.value+N,I=z,b.ranges--;continue}M({type:"dot",value:N});continue}M({type:"text",value:N})}do if(b=_.pop(),b.type!=="root"){b.nodes.forEach(X=>{X.nodes||(X.type==="open"&&(X.isOpen=!0),X.type===
272
- "close"&&(X.isClose=!0),X.nodes||(X.type="text"),X.invalid=!0)});const Y=_[_.length-1],z=Y.nodes.indexOf(b);Y.nodes.splice(z,1,...b.nodes)}while(_.length>0);return M({type:"eos"}),v},Us}var Hs,rc;function D0(){if(rc)return Hs;rc=1;const t=Ls(),e=m0(),r=g0(),n=E0(),i=(s,o={})=>{let a=[];if(Array.isArray(s))for(const u of s){const l=i.create(u,o);Array.isArray(l)?a.push(...l):a.push(l)}else a=[].concat(i.create(s,o));return o&&o.expand===!0&&o.nodupes===!0&&(a=[...new Set(a)]),a};return i.parse=(s,o={})=>n(
273
- s,o),i.stringify=(s,o={})=>t(typeof s=="string"?i.parse(s,o):s,o),i.compile=(s,o={})=>(typeof s=="string"&&(s=i.parse(s,o)),e(s,o)),i.expand=(s,o={})=>{typeof s=="string"&&(s=i.parse(s,o));let a=r(s,o);return o.noempty===!0&&(a=a.filter(Boolean)),o.nodupes===!0&&(a=[...new Set(a)]),a},i.create=(s,o={})=>s===""||s.length<3?[s]:o.expand!==!0?i.compile(s,o):i.expand(s,o),Hs=i,Hs}var Vs={},zs,nc;function bn(){if(nc)return zs;nc=1;const t=es,e="\\\\/",r=`[^${e}]`,n="\\.",i="\\+",s="\\?",o="\\/",a="(?\
274
- =.)",u="[^/]",l=`(?:${o}|$)`,c=`(?:^|${o})`,d=`${n}{1,2}${l}`,h=`(?!${n})`,E=`(?!${c}${d})`,$=`(?!${n}{0,1}${l})`,y=`(?!${d})`,f=`[^.${o}]`,g=`${u}*?`,p={DOT_LITERAL:n,PLUS_LITERAL:i,QMARK_LITERAL:s,SLASH_LITERAL:o,ONE_CHAR:a,QMARK:u,END_ANCHOR:l,DOTS_SLASH:d,NO_DOT:h,NO_DOTS:E,NO_DOT_SLASH:$,NO_DOTS_SLASH:y,QMARK_NO_DOT:f,STAR:g,START_ANCHOR:c},m={...p,SLASH_LITERAL:`[${e}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,
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}]|$)`},D={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 zs={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:D,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,
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"}),ui}var li,ac;function um(){if(ac)return li;ac=1;const t=ni(),{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:u,CHAR_RIGHT_CURLY_BRACE:l,CHAR_LEFT_SQUARE_BRACKET:c,CHAR_RIGHT_SQUARE_BRACKET:d,CHAR_DOUBLE_QUOTE:h,CHAR_SINGLE_QUOTE:y,CHAR_NO_BREAK_SPACE:b,CHAR_ZERO_WIDTH_NOBREAK_SPACE:_}=cm();return li=(g,p={})=>{if(typeof g!="string")throw new TypeError("Expected a string");const m=p||{},$=typeof m.maxLength=="number"?Math.min(e,m.maxLength):e;if(g.length>$)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${$})`);const v={type:"root",input:g,nodes:[]},E=[v];
268
+ let S=v,I=v,F=0;const B=g.length;let D=0,k=0,j;const x=()=>g[D++],H=K=>{if(K.type==="text"&&I.type==="dot"&&(I.type="text"),I&&I.type==="text"&&K.type==="text"){I.value+=K.value;return}return S.nodes.push(K),K.parent=S,K.prev=I,I=K,K};for(H({type:"bos"});D<B;)if(S=E[E.length-1],j=x(),!(j===_||j===b)){if(j===r){H({type:"text",value:(p.keepEscaping?j:"")+x()});continue}if(j===d){H({type:"text",value:"\\"+j});continue}if(j===c){F++;let K;for(;D<B&&(K=x());){if(j+=K,K===c){F++;continue}if(K===r){j+=
269
+ x();continue}if(K===d&&(F--,F===0))break}H({type:"text",value:j});continue}if(j===o){S=H({type:"paren",nodes:[]}),E.push(S),H({type:"text",value:j});continue}if(j===a){if(S.type!=="paren"){H({type:"text",value:j});continue}S=E.pop(),H({type:"text",value:j}),S=E[E.length-1];continue}if(j===h||j===y||j===n){const K=j;let G;for(p.keepQuotes!==!0&&(j="");D<B&&(G=x());){if(G===r){j+=G+x();continue}if(G===K){p.keepQuotes===!0&&(j+=G);break}j+=G}H({type:"text",value:j});continue}if(j===u){k++;const G={
270
+ type:"brace",open:!0,close:!1,dollar:I.value&&I.value.slice(-1)==="$"||S.dollar===!0,depth:k,commas:0,ranges:0,nodes:[]};S=H(G),E.push(S),H({type:"open",value:j});continue}if(j===l){if(S.type!=="brace"){H({type:"text",value:j});continue}const K="close";S=E.pop(),S.close=!0,H({type:K,value:j}),k--,S=E[E.length-1];continue}if(j===s&&k>0){if(S.ranges>0){S.ranges=0;const K=S.nodes.shift();S.nodes=[K,{type:"text",value:t(S)}]}H({type:"comma",value:j}),S.commas++;continue}if(j===i&&k>0&&S.commas===0){
271
+ const K=S.nodes;if(k===0||K.length===0){H({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"){K.pop();const G=K[K.length-1];G.value+=I.value+j,I=G,S.ranges--;continue}H({type:"dot",value:j});continue}H({type:"text",value:j})}do if(S=E.pop(),S.type!=="root"){S.nodes.forEach(X=>{X.nodes||(X.type==="open"&&(X.isOpen=!0),X.type===
272
+ "close"&&(X.isClose=!0),X.nodes||(X.type="text"),X.invalid=!0)});const K=E[E.length-1],G=K.nodes.indexOf(S);K.nodes.splice(G,1,...S.nodes)}while(E.length>0);return H({type:"eos"}),v},li}var fi,cc;function lm(){if(cc)return fi;cc=1;const t=ni(),e=om(),r=am(),n=um(),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(
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),fi=s,fi}var di={},hi,uc;function Yr(){if(uc)return hi;uc=1;const t=bs,e="\\\\/",r=`[^${e}]`,n="\\.",s="\\+",i="\\?",o="\\/",a="(?\
274
+ =.)",u="[^/]",l=`(?:${o}|$)`,c=`(?:^|${o})`,d=`${n}{1,2}${l}`,h=`(?!${n})`,y=`(?!${c}${d})`,b=`(?!${n}{0,1}${l})`,_=`(?!${d})`,f=`[^.${o}]`,g=`${u}*?`,p={DOT_LITERAL:n,PLUS_LITERAL:s,QMARK_LITERAL:i,SLASH_LITERAL:o,ONE_CHAR:a,QMARK:u,END_ANCHOR:l,DOTS_SLASH:d,NO_DOT:h,NO_DOTS:y,NO_DOT_SLASH:b,NO_DOTS_SLASH:_,QMARK_NO_DOT:f,STAR:g,START_ANCHOR:c},m={...p,SLASH_LITERAL:`[${e}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,
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 hi={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:$,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,
276
276
  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
277
  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:p}},zs}var ic;function An(){return ic||(ic=1,function(t){const e=es,r=process.
279
- platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:o}=bn();t.isObject=a=>a!==null&&typeof a=="object"&&!Array.isArray(a),t.hasRegexChars=a=>s.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(i,u=>u==="\\"?"":u),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,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?"":"^",d=l.contains?"":"$";let h=`${c}(?:${a})${d}`;return u.negated===!0&&(h=`(?:^(?!${h}).*$)`),h}}(Vs)),Vs}var Gs,sc;function v0(){
281
- if(sc)return Gs;sc=1;const t=An(),{CHAR_ASTERISK:e,CHAR_AT:r,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:i,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:l,CHAR_LEFT_SQUARE_BRACKET:c,CHAR_PLUS:d,CHAR_QUESTION_MARK:h,CHAR_RIGHT_CURLY_BRACE:E,CHAR_RIGHT_PARENTHESES:$,CHAR_RIGHT_SQUARE_BRACKET:y}=bn(),f=m=>m===a||m===n,g=m=>{m.isPrefix!==!0&&(m.depth=m.isGlobstar?1/0:1)};return Gs=(m,D)=>{const v=D||{},_=m.length-1,b=v.parts===!0||v.scanToEnd===!0,I=[],U=[],
282
- G=[];let L=m,B=-1,N=0,j=0,M=!1,Y=!1,z=!1,X=!1,se=!1,q=!1,C=!1,H=!1,k=!1,w=!1,A=0,R,J,Z={value:"",depth:0,isGlob:!1};const oe=()=>B>=_,ae=()=>L.charCodeAt(B+1),T=()=>(R=J,L.charCodeAt(++B));for(;B<_;){J=T();let P;if(J===n){C=Z.backslashes=!0,J=T(),J===u&&(q=!0);continue}if(q===!0||J===u){for(A++;oe()!==!0&&(J=T());){if(J===n){C=Z.backslashes=!0,T();continue}if(J===u){A++;continue}if(q!==!0&&J===s&&(J=T())===s){if(M=Z.isBrace=!0,z=Z.isGlob=!0,w=!0,b===!0)continue;break}if(q!==!0&&J===i){if(M=Z.isBrace=
283
- !0,z=Z.isGlob=!0,w=!0,b===!0)continue;break}if(J===E&&(A--,A===0)){q=!1,M=Z.isBrace=!0,w=!0;break}}if(b===!0)continue;break}if(J===a){if(I.push(B),U.push(Z),Z={value:"",depth:0,isGlob:!1},w===!0)continue;if(R===s&&B===N+1){N+=2;continue}j=B+1;continue}if(v.noext!==!0&&(J===d||J===r||J===e||J===h||J===o)===!0&&ae()===l){if(z=Z.isGlob=!0,X=Z.isExtglob=!0,w=!0,J===o&&B===N&&(k=!0),b===!0){for(;oe()!==!0&&(J=T());){if(J===n){C=Z.backslashes=!0,J=T();continue}if(J===$){z=Z.isGlob=!0,w=!0;break}}continue}
284
- break}if(J===e){if(R===e&&(se=Z.isGlobstar=!0),z=Z.isGlob=!0,w=!0,b===!0)continue;break}if(J===h){if(z=Z.isGlob=!0,w=!0,b===!0)continue;break}if(J===c){for(;oe()!==!0&&(P=T());){if(P===n){C=Z.backslashes=!0,T();continue}if(P===y){Y=Z.isBracket=!0,z=Z.isGlob=!0,w=!0;break}}if(b===!0)continue;break}if(v.nonegate!==!0&&J===o&&B===N){H=Z.negated=!0,N++;continue}if(v.noparen!==!0&&J===l){if(z=Z.isGlob=!0,b===!0){for(;oe()!==!0&&(J=T());){if(J===l){C=Z.backslashes=!0,J=T();continue}if(J===$){w=!0;break}}
285
- continue}break}if(z===!0){if(w=!0,b===!0)continue;break}}v.noext===!0&&(X=!1,z=!1);let x=L,Q="",ie="";N>0&&(Q=L.slice(0,N),L=L.slice(N),j-=N),x&&z===!0&&j>0?(x=L.slice(0,j),ie=L.slice(j)):z===!0?(x="",ie=L):x=L,x&&x!==""&&x!=="/"&&x!==L&&f(x.charCodeAt(x.length-1))&&(x=x.slice(0,-1)),v.unescape===!0&&(ie&&(ie=t.removeBackslashes(ie)),x&&C===!0&&(x=t.removeBackslashes(x)));const O={prefix:Q,input:m,start:N,base:x,glob:ie,isBrace:M,isBracket:Y,isGlob:z,isExtglob:X,isGlobstar:se,negated:H,negatedExtglob:k};
286
- if(v.tokens===!0&&(O.maxDepth=0,f(J)||U.push(Z),O.tokens=U),v.parts===!0||v.tokens===!0){let P;for(let ee=0;ee<I.length;ee++){const W=P?P+1:N,F=I[ee],re=m.slice(W,F);v.tokens&&(ee===0&&N!==0?(U[ee].isPrefix=!0,U[ee].value=Q):U[ee].value=re,g(U[ee]),O.maxDepth+=U[ee].depth),(ee!==0||re!=="")&&G.push(re),P=F}if(P&&P+1<m.length){const ee=m.slice(P+1);G.push(ee),v.tokens&&(U[U.length-1].value=ee,g(U[U.length-1]),O.maxDepth+=U[U.length-1].depth)}O.slashes=I,O.parts=G}return O},Gs}var Ws,oc;function $0(){
287
- if(oc)return Ws;oc=1;const t=bn(),e=An(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:o}=t,a=(c,d)=>{if(typeof d.expandRange=="function")return d.expandRange(...c,d);c.sort();const h=`[${c.join("-")}]`;try{new RegExp(h)}catch{return c.map($=>e.escapeRegex($)).join("..")}return h},u=(c,d)=>`Missing ${c}: "${d}" - use "\\\\${d}" to match literal characters`,l=(c,d)=>{if(typeof c!="string")throw new TypeError("Expected a string");c=o[c]||c;
288
- const h={...d},E=typeof h.maxLength=="number"?Math.min(r,h.maxLength):r;let $=c.length;if($>E)throw new SyntaxError(`Input length: ${$}, exceeds maximum allowed length: ${E}`);const y={type:"bos",value:"",output:h.prepend||""},f=[y],g=h.capture?"":"?:",p=e.isWindows(d),m=t.globChars(p),D=t.extglobChars(m),{DOT_LITERAL:v,PLUS_LITERAL:_,SLASH_LITERAL:b,ONE_CHAR:I,DOTS_SLASH:U,NO_DOT:G,NO_DOT_SLASH:L,NO_DOTS_SLASH:B,QMARK:N,QMARK_NO_DOT:j,STAR:M,START_ANCHOR:Y}=m,z=F=>`(${g}(?:(?!${Y}${F.dot?U:v}).\
289
- )*?)`,X=h.dot?"":G,se=h.dot?N:j;let q=h.bash===!0?z(h):M;h.capture&&(q=`(${q})`),typeof h.noext=="boolean"&&(h.noextglob=h.noext);const C={input:c,index:-1,start:0,dot:h.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:f};c=e.removePrefix(c,C),$=c.length;const H=[],k=[],w=[];let A=y,R;const J=()=>C.index===$-1,Z=C.peek=(F=1)=>c[C.index+F],oe=C.advance=()=>c[++C.index]||"",ae=()=>c.slice(C.index+1),T=(F="",re=0)=>{C.consumed+=
290
- F,C.index+=re},x=F=>{C.output+=F.output!=null?F.output:F.value,T(F.value)},Q=()=>{let F=1;for(;Z()==="!"&&(Z(2)!=="("||Z(3)==="?");)oe(),C.start++,F++;return F%2===0?!1:(C.negated=!0,C.start++,!0)},ie=F=>{C[F]++,w.push(F)},O=F=>{C[F]--,w.pop()},P=F=>{if(A.type==="globstar"){const re=C.braces>0&&(F.type==="comma"||F.type==="brace"),V=F.extglob===!0||H.length&&(F.type==="pipe"||F.type==="paren");F.type!=="slash"&&F.type!=="paren"&&!re&&!V&&(C.output=C.output.slice(0,-A.output.length),A.type="star",
291
- A.value="*",A.output=q,C.output+=A.output)}if(H.length&&F.type!=="paren"&&(H[H.length-1].inner+=F.value),(F.value||F.output)&&x(F),A&&A.type==="text"&&F.type==="text"){A.value+=F.value,A.output=(A.output||"")+F.value;return}F.prev=A,f.push(F),A=F},ee=(F,re)=>{const V={...D[re],conditions:1,inner:""};V.prev=A,V.parens=C.parens,V.output=C.output;const ne=(h.capture?"(":"")+V.open;ie("parens"),P({type:F,value:re,output:C.output?"":I}),P({type:"paren",extglob:!0,value:oe(),output:ne}),H.push(V)},W=F=>{
292
- let re=F.close+(h.capture?")":""),V;if(F.type==="negate"){let ne=q;if(F.inner&&F.inner.length>1&&F.inner.includes("/")&&(ne=z(h)),(ne!==q||J()||/^\)+$/.test(ae()))&&(re=F.close=`)$))${ne}`),F.inner.includes("*")&&(V=ae())&&/^\.[^\\/.]+$/.test(V)){const fe=l(V,{...d,fastpaths:!1}).output;re=F.close=`)${fe})${ne})`}F.prev.type==="bos"&&(C.negatedExtglob=!0)}P({type:"paren",extglob:!0,value:R,output:re}),O("parens")};if(h.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(c)){let F=!1,re=c.replace(s,(V,ne,fe,we,Oe,vt)=>we===
293
- "\\"?(F=!0,V):we==="?"?ne?ne+we+(Oe?N.repeat(Oe.length):""):vt===0?se+(Oe?N.repeat(Oe.length):""):N.repeat(fe.length):we==="."?v.repeat(fe.length):we==="*"?ne?ne+we+(Oe?q:""):q:ne?V:`\\${V}`);return F===!0&&(h.unescape===!0?re=re.replace(/\\/g,""):re=re.replace(/\\+/g,V=>V.length%2===0?"\\\\":V?"\\":"")),re===c&&h.contains===!0?(C.output=c,C):(C.output=e.wrapOutput(re,C,d),C)}for(;!J();){if(R=oe(),R==="\0")continue;if(R==="\\"){const V=Z();if(V==="/"&&h.bash!==!0||V==="."||V===";")continue;if(!V){
294
- R+="\\",P({type:"text",value:R});continue}const ne=/^\\+/.exec(ae());let fe=0;if(ne&&ne[0].length>2&&(fe=ne[0].length,C.index+=fe,fe%2!==0&&(R+="\\")),h.unescape===!0?R=oe():R+=oe(),C.brackets===0){P({type:"text",value:R});continue}}if(C.brackets>0&&(R!=="]"||A.value==="["||A.value==="[^")){if(h.posix!==!1&&R===":"){const V=A.value.slice(1);if(V.includes("[")&&(A.posix=!0,V.includes(":"))){const ne=A.value.lastIndexOf("["),fe=A.value.slice(0,ne),we=A.value.slice(ne+2),Oe=n[we];if(Oe){A.value=fe+
295
- Oe,C.backtrack=!0,oe(),!y.output&&f.indexOf(A)===1&&(y.output=I);continue}}}(R==="["&&Z()!==":"||R==="-"&&Z()==="]")&&(R=`\\${R}`),R==="]"&&(A.value==="["||A.value==="[^")&&(R=`\\${R}`),h.posix===!0&&R==="!"&&A.value==="["&&(R="^"),A.value+=R,x({value:R});continue}if(C.quotes===1&&R!=='"'){R=e.escapeRegex(R),A.value+=R,x({value:R});continue}if(R==='"'){C.quotes=C.quotes===1?0:1,h.keepQuotes===!0&&P({type:"text",value:R});continue}if(R==="("){ie("parens"),P({type:"paren",value:R});continue}if(R===
296
- ")"){if(C.parens===0&&h.strictBrackets===!0)throw new SyntaxError(u("opening","("));const V=H[H.length-1];if(V&&C.parens===V.parens+1){W(H.pop());continue}P({type:"paren",value:R,output:C.parens?")":"\\)"}),O("parens");continue}if(R==="["){if(h.nobracket===!0||!ae().includes("]")){if(h.nobracket!==!0&&h.strictBrackets===!0)throw new SyntaxError(u("closing","]"));R=`\\${R}`}else ie("brackets");P({type:"bracket",value:R});continue}if(R==="]"){if(h.nobracket===!0||A&&A.type==="bracket"&&A.value.length===
297
- 1){P({type:"text",value:R,output:`\\${R}`});continue}if(C.brackets===0){if(h.strictBrackets===!0)throw new SyntaxError(u("opening","["));P({type:"text",value:R,output:`\\${R}`});continue}O("brackets");const V=A.value.slice(1);if(A.posix!==!0&&V[0]==="^"&&!V.includes("/")&&(R=`/${R}`),A.value+=R,x({value:R}),h.literalBrackets===!1||e.hasRegexChars(V))continue;const ne=e.escapeRegex(A.value);if(C.output=C.output.slice(0,-A.value.length),h.literalBrackets===!0){C.output+=ne,A.value=ne;continue}A.value=
298
- `(${g}${ne}|${A.value})`,C.output+=A.value;continue}if(R==="{"&&h.nobrace!==!0){ie("braces");const V={type:"brace",value:R,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};k.push(V),P(V);continue}if(R==="}"){const V=k[k.length-1];if(h.nobrace===!0||!V){P({type:"text",value:R,output:R});continue}let ne=")";if(V.dots===!0){const fe=f.slice(),we=[];for(let Oe=fe.length-1;Oe>=0&&(f.pop(),fe[Oe].type!=="brace");Oe--)fe[Oe].type!=="dots"&&we.unshift(fe[Oe].value);ne=a(we,h),C.backtrack=
299
- !0}if(V.comma!==!0&&V.dots!==!0){const fe=C.output.slice(0,V.outputIndex),we=C.tokens.slice(V.tokensIndex);V.value=V.output="\\{",R=ne="\\}",C.output=fe;for(const Oe of we)C.output+=Oe.output||Oe.value}P({type:"brace",value:R,output:ne}),O("braces"),k.pop();continue}if(R==="|"){H.length>0&&H[H.length-1].conditions++,P({type:"text",value:R});continue}if(R===","){let V=R;const ne=k[k.length-1];ne&&w[w.length-1]==="braces"&&(ne.comma=!0,V="|"),P({type:"comma",value:R,output:V});continue}if(R==="/"){
300
- if(A.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",f.pop(),A=y;continue}P({type:"slash",value:R,output:b});continue}if(R==="."){if(C.braces>0&&A.type==="dot"){A.value==="."&&(A.output=v);const V=k[k.length-1];A.type="dots",A.output+=R,A.value+=R,V.dots=!0;continue}if(C.braces+C.parens===0&&A.type!=="bos"&&A.type!=="slash"){P({type:"text",value:R,output:v});continue}P({type:"dot",value:R,output:v});continue}if(R==="?"){if(!(A&&A.value==="(")&&h.noextglob!==!0&&Z()===
301
- "("&&Z(2)!=="?"){ee("qmark",R);continue}if(A&&A.type==="paren"){const ne=Z();let fe=R;if(ne==="<"&&!e.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(A.value==="("&&!/[!=<:]/.test(ne)||ne==="<"&&!/<([!=]|\w+>)/.test(ae()))&&(fe=`\\${R}`),P({type:"text",value:R,output:fe});continue}if(h.dot!==!0&&(A.type==="slash"||A.type==="bos")){P({type:"qmark",value:R,output:j});continue}P({type:"qmark",value:R,output:N});continue}if(R==="!"){if(h.noextglob!==
302
- !0&&Z()==="("&&(Z(2)!=="?"||!/[!=<:]/.test(Z(3)))){ee("negate",R);continue}if(h.nonegate!==!0&&C.index===0){Q();continue}}if(R==="+"){if(h.noextglob!==!0&&Z()==="("&&Z(2)!=="?"){ee("plus",R);continue}if(A&&A.value==="("||h.regex===!1){P({type:"plus",value:R,output:_});continue}if(A&&(A.type==="bracket"||A.type==="paren"||A.type==="brace")||C.parens>0){P({type:"plus",value:R});continue}P({type:"plus",value:_});continue}if(R==="@"){if(h.noextglob!==!0&&Z()==="("&&Z(2)!=="?"){P({type:"at",extglob:!0,
303
- value:R,output:""});continue}P({type:"text",value:R});continue}if(R!=="*"){(R==="$"||R==="^")&&(R=`\\${R}`);const V=i.exec(ae());V&&(R+=V[0],C.index+=V[0].length),P({type:"text",value:R});continue}if(A&&(A.type==="globstar"||A.star===!0)){A.type="star",A.star=!0,A.value+=R,A.output=q,C.backtrack=!0,C.globstar=!0,T(R);continue}let F=ae();if(h.noextglob!==!0&&/^\([^?]/.test(F)){ee("star",R);continue}if(A.type==="star"){if(h.noglobstar===!0){T(R);continue}const V=A.prev,ne=V.prev,fe=V.type==="slash"||
304
- V.type==="bos",we=ne&&(ne.type==="star"||ne.type==="globstar");if(h.bash===!0&&(!fe||F[0]&&F[0]!=="/")){P({type:"star",value:R,output:""});continue}const Oe=C.braces>0&&(V.type==="comma"||V.type==="brace"),vt=H.length&&(V.type==="pipe"||V.type==="paren");if(!fe&&V.type!=="paren"&&!Oe&&!vt){P({type:"star",value:R,output:""});continue}for(;F.slice(0,3)==="/**";){const Ft=c[C.index+4];if(Ft&&Ft!=="/")break;F=F.slice(3),T("/**",3)}if(V.type==="bos"&&J()){A.type="globstar",A.value+=R,A.output=z(h),C.
305
- output=A.output,C.globstar=!0,T(R);continue}if(V.type==="slash"&&V.prev.type!=="bos"&&!we&&J()){C.output=C.output.slice(0,-(V.output+A.output).length),V.output=`(?:${V.output}`,A.type="globstar",A.output=z(h)+(h.strictSlashes?")":"|$)"),A.value+=R,C.globstar=!0,C.output+=V.output+A.output,T(R);continue}if(V.type==="slash"&&V.prev.type!=="bos"&&F[0]==="/"){const Ft=F[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(V.output+A.output).length),V.output=`(?:${V.output}`,A.type="globstar",A.output=`${z(
306
- h)}${b}|${b}${Ft})`,A.value+=R,C.output+=V.output+A.output,C.globstar=!0,T(R+oe()),P({type:"slash",value:"/",output:""});continue}if(V.type==="bos"&&F[0]==="/"){A.type="globstar",A.value+=R,A.output=`(?:^|${b}|${z(h)}${b})`,C.output=A.output,C.globstar=!0,T(R+oe()),P({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-A.output.length),A.type="globstar",A.output=z(h),A.value+=R,C.output+=A.output,C.globstar=!0,T(R);continue}const re={type:"star",value:R,output:q};if(h.bash===!0){
307
- re.output=".*?",(A.type==="bos"||A.type==="slash")&&(re.output=X+re.output),P(re);continue}if(A&&(A.type==="bracket"||A.type==="paren")&&h.regex===!0){re.output=R,P(re);continue}(C.index===C.start||A.type==="slash"||A.type==="dot")&&(A.type==="dot"?(C.output+=L,A.output+=L):h.dot===!0?(C.output+=B,A.output+=B):(C.output+=X,A.output+=X),Z()!=="*"&&(C.output+=I,A.output+=I)),P(re)}for(;C.brackets>0;){if(h.strictBrackets===!0)throw new SyntaxError(u("closing","]"));C.output=e.escapeLast(C.output,"["),
308
- O("brackets")}for(;C.parens>0;){if(h.strictBrackets===!0)throw new SyntaxError(u("closing",")"));C.output=e.escapeLast(C.output,"("),O("parens")}for(;C.braces>0;){if(h.strictBrackets===!0)throw new SyntaxError(u("closing","}"));C.output=e.escapeLast(C.output,"{"),O("braces")}if(h.strictSlashes!==!0&&(A.type==="star"||A.type==="bracket")&&P({type:"maybe_slash",value:"",output:`${b}?`}),C.backtrack===!0){C.output="";for(const F of C.tokens)C.output+=F.output!=null?F.output:F.value,F.suffix&&(C.output+=
309
- F.suffix)}return C};return l.fastpaths=(c,d)=>{const h={...d},E=typeof h.maxLength=="number"?Math.min(r,h.maxLength):r,$=c.length;if($>E)throw new SyntaxError(`Input length: ${$}, exceeds maximum allowed length: ${E}`);c=o[c]||c;const y=e.isWindows(d),{DOT_LITERAL:f,SLASH_LITERAL:g,ONE_CHAR:p,DOTS_SLASH:m,NO_DOT:D,NO_DOTS:v,NO_DOTS_SLASH:_,STAR:b,START_ANCHOR:I}=t.globChars(y),U=h.dot?v:D,G=h.dot?_:D,L=h.capture?"":"?:",B={negated:!1,prefix:""};let N=h.bash===!0?".*?":b;h.capture&&(N=`(${N})`);const j=X=>X.
310
- noglobstar===!0?N:`(${L}(?:(?!${I}${X.dot?m:f}).)*?)`,M=X=>{switch(X){case"*":return`${U}${p}${N}`;case".*":return`${f}${p}${N}`;case"*.*":return`${U}${N}${f}${p}${N}`;case"*/*":return`${U}${N}${g}${p}${G}${N}`;case"**":return U+j(h);case"**/*":return`(?:${U}${j(h)}${g})?${G}${p}${N}`;case"**/*.*":return`(?:${U}${j(h)}${g})?${G}${N}${f}${p}${N}`;case"**/.*":return`(?:${U}${j(h)}${g})?${f}${p}${N}`;default:{const se=/^(.*?)\.(\w+)$/.exec(X);if(!se)return;const q=M(se[1]);return q?q+f+se[2]:void 0}}},
311
- Y=e.removePrefix(c,B);let z=M(Y);return z&&h.strictSlashes!==!0&&(z+=`${g}?`),z},Ws=l,Ws}var Ks,ac;function _0(){if(ac)return Ks;ac=1;const t=es,e=v0(),r=$0(),n=An(),i=bn(),s=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 D of g){const v=D(m);if(v)return v}return!1}}const c=s(a)&&a.tokens&&a.input;if(a===""||typeof a!="string"&&!c)throw new TypeError("Expected pattern to be a non-empty string");const d=u||{},h=n.isWindows(
312
- u),E=c?o.compileRe(a,u):o.makeRe(a,u,!1,!0),$=E.state;delete E.state;let y=()=>!1;if(d.ignore){const g={...u,ignore:null,onMatch:null,onResult:null};y=o(d.ignore,g,l)}const f=(g,p=!1)=>{const{isMatch:m,match:D,output:v}=o.test(g,E,u,{glob:a,posix:h}),_={glob:a,state:$,regex:E,posix:h,input:g,output:v,match:D,isMatch:m};return typeof d.onResult=="function"&&d.onResult(_),m===!1?(_.isMatch=!1,p?_:!1):y(g)?(typeof d.onIgnore=="function"&&d.onIgnore(_),_.isMatch=!1,p?_:!1):(typeof d.onMatch=="functi\
313
- on"&&d.onMatch(_),p?_:!0)};return l&&(f.state=$),f};return o.test=(a,u,l,{glob:c,posix:d}={})=>{if(typeof a!="string")throw new TypeError("Expected input to be a string");if(a==="")return{isMatch:!1,output:""};const h=l||{},E=h.format||(d?n.toPosixSlashes:null);let $=a===c,y=$&&E?E(a):a;return $===!1&&(y=E?E(a):a,$=y===c),($===!1||h.capture===!0)&&(h.matchBase===!0||h.basename===!0?$=o.matchBase(a,u,l,d):$=u.exec(y)),{isMatch:!!$,match:$,output:y}},o.matchBase=(a,u,l,c=n.isWindows(l))=>(u instanceof
314
- 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 d=u||{},h=d.contains?"":"^",E=d.contains?"":"$";let $=`${h}(?:${a.output})${E}`;a&&a.negated===!0&&($=`^(?!${$}).*$`);const y=o.toRegex($,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\
315
- mpty string");let d={negated:!1,fastpaths:!0};return u.fastpaths!==!1&&(a[0]==="."||a[0]==="*")&&(d.output=r.fastpaths(a,u)),d.output||(d=r(a,u)),o.compileRe(d,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=i,Ks=o,Ks}var Ys,uc;function w0(){return uc||(uc=1,Ys=_0()),Ys}var Js,cc;function b0(){if(cc)return Js;cc=1;const t=Ya,e=D0(),r=w0(),n=An(),i=a=>a===""||a==="./",s=a=>{const u=a.indexOf("\
316
- {");return u>-1&&a.indexOf("}",u)>-1},o=(a,u,l)=>{u=[].concat(u),a=[].concat(a);let c=new Set,d=new Set,h=new Set,E=0,$=g=>{h.add(g.output),l&&l.onResult&&l.onResult(g)};for(let g=0;g<u.length;g++){let p=r(String(u[g]),{...l,onResult:$},!0),m=p.state.negated||p.state.negatedExtglob;m&&E++;for(let D of a){let v=p(D,!0);(m?!v.isMatch:v.isMatch)&&(m?c.add(v.output):(c.delete(v.output),d.add(v.output)))}}let f=(E===u.length?[...h]:[...d]).filter(g=>!c.has(g));if(l&&f.length===0){if(l.failglob===!0)throw new Error(
317
- `No matches found for "${u.join(", ")}"`);if(l.nonull===!0||l.nullglob===!0)return l.unescape?u.map(g=>g.replace(/\\/g,"")):u}return f};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,d=[],h=$=>{l.onResult&&l.onResult($),d.push($.output)},E=new Set(o(a,u,{...l,onResult:h}));for(let $ of d)E.has($)||c.add($);return[...c]},o.contains=(a,u,l)=>{if(typeof a!="string")throw new TypeError(`Expected a stri\
318
- ng: "${t.inspect(a)}"`);if(Array.isArray(u))return u.some(c=>o.contains(a,c,l));if(typeof u=="string"){if(i(a)||i(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),d={};for(let h of c)d[h]=a[h];return d},o.some=(a,u,l)=>{let c=[].concat(a);for(let d of[].concat(u)){let h=r(String(d),l);if(c.
319
- some(E=>h(E)))return!0}return!1},o.every=(a,u,l)=>{let c=[].concat(a);for(let d of[].concat(u)){let h=r(String(d),l);if(!c.every(E=>h(E)))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),h=r.makeRe(String(a),{...l,capture:!0}).exec(c?n.toPosixSlashes(u):u);if(h)return h.slice(1).map(E=>E===void 0?"":E)},o.makeRe=(...a)=>r.makeRe(...a),o.scan=(...a)=>r.
320
- scan(...a),o.parse=(a,u)=>{let l=[];for(let c of[].concat(a||[]))for(let d of e(String(c),u))l.push(r.parse(d,u));return l},o.braces=(a,u)=>{if(typeof a!="string")throw new TypeError("Expected a string");return u&&u.nobrace===!0||!s(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=s,Js=o,Js}var A0=b0();const lc=Ji(A0),C0={useRecommendedBuildConfig:!0,removeViteModuleLoader:!1,deleteInlinedFiles:!0};
321
- function S0(t,e,r,n=!1){const i=new RegExp(`<script([^>]*?) src="[./]*${e}"([^>]*)></script>`),s=/"?__VITE_PRELOAD__"?/g,o=r.replace(s,"void 0").replace(/<(\/script>|!--)/g,"\\x3C$1"),a=t.replace(i,(u,l,c)=>`<script${l}${c}>${o.trim()}</script>`);return n?N0(a):a}function R0(t,e,r){const n=new RegExp(`<link([^>]*?) href="[./]*${e}"([^>]*?)>`),i=r.replace('@charset "UTF-8";',"");return t.replace(n,(o,a,u)=>`<style${a}${u}>${i.trim()}</style>`)}const O0=/\.[mc]?js$/,I0=/\.css$/,F0=/\.html?$/;function P0({
322
- useRecommendedBuildConfig:t=!0,removeViteModuleLoader:e=!1,inlinePattern:r=[],deleteInlinedFiles:n=!0}=C0){function i(s){console.debug(`NOTE: asset not inlined: ${s}`)}return{name:"vite:singlefile",config:t?T0:void 0,enforce:"post",generateBundle:(s,o)=>{console.debug(`
323
- `);const a={html:[],css:[],js:[],other:[]};for(const l of Object.keys(o))F0.test(l)?a.html.push(l):I0.test(l)?a.css.push(l):O0.test(l)?a.js.push(l):a.other.push(l);const u=[];for(const l of a.html){const c=o[l];let d=c.source;for(const h of a.js){if(r.length&&!lc.isMatch(h,r)){i(h);continue}const E=o[h];E.code!=null&&(console.debug(`Inlining: ${h}`),u.push(h),d=S0(d,E.fileName,E.code,e))}for(const h of a.css){if(r.length&&!lc.isMatch(h,r)){i(h);continue}const E=o[h];console.debug(`Inlining: ${h}`),
324
- u.push(h),d=R0(d,E.fileName,E.source)}c.source=d}if(n)for(const l of u)delete o[l];for(const l of a.other)i(l)}}}const N0=t=>t.replace(/(<script type="module" crossorigin>\s*)\(function(?: polyfill)?\(\)\s*\{[\s\S]*?\}\)\(\);/,'<script type="module">'),T0=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 L0(t){var e,r;if(t){if("astNode"in t)return B0(t);if(Array.isArray(t))return t.reduce(fc,void 0);{const n=t,i=j0(n)?k0((r=(e=n?.root)===null||e===void 0?void 0:e.astNode)!==null&&r!==void 0?r:n?.astNode):void 0;return yr(n,i)}}else return}function j0(t){return typeof t<"u"&&"element"in t&&"text"in t}function k0(t){
326
- try{return Ba(t).uri.toString()}catch{return}}function B0(t){var e,r;const{astNode:n,property:i,index:s}=t??{},o=(e=n?.$cstNode)!==null&&e!==void 0?e:n?.$textRegion;if(!(n===void 0||o===void 0)){if(i===void 0)return yr(o,Xs(n));{const a=u=>s!==void 0&&s>-1&&Array.isArray(n[i])?s<u.length?u[s]:void 0:u.reduce(fc,void 0);if(!((r=o.assignments)===null||r===void 0)&&r[i]){const u=a(o.assignments[i]);return u&&yr(u,Xs(n))}else if(n.$cstNode){const u=a(Dp(n.$cstNode,i));return u&&yr(u,Xs(n))}else return}}}
327
- function Xs(t){var e,r,n,i;return t.$cstNode?(r=(e=Ba(t))===null||e===void 0?void 0:e.uri)===null||r===void 0?void 0:r.toString():t.$textRegion?t.$textRegion.documentURI||((i=(n=new vp(t,s=>s.$container?[s.$container]:[]).find(s=>{var o;return(o=s.$textRegion)===null||o===void 0?void 0:o.documentURI}))===null||n===void 0?void 0:n.$textRegion)===null||i===void 0?void 0:i.documentURI):void 0}function yr(t,e){var r,n;const i={offset:t.offset,end:(r=t.end)!==null&&r!==void 0?r:t.offset+t.length,length:(n=
328
- t.length)!==null&&n!==void 0?n:t.end-t.offset};return t.range&&(i.range=t.range),e??(e=t.fileURI),e&&(i.fileURI=e),i}function fc(t,e){var r,n;if(t){if(!e)return t&&yr(t)}else return e&&yr(e);const i=(r=t.end)!==null&&r!==void 0?r:t.offset+t.length,s=(n=e.end)!==null&&n!==void 0?n:e.offset+e.length,o=Math.min(t.offset,e.offset),a=Math.max(i,s),u=a-o,l={offset:o,end:a,length:u};if(t.range&&e.range&&(l.range={start:e.range.start.line<t.range.start.line||e.range.start.line===t.range.start.line&&e.range.
329
- start.character<t.range.start.character?e.range.start:t.range.start,end:e.range.end.line>t.range.end.line||e.range.end.line===t.range.end.line&&e.range.end.character>t.range.end.character?e.range.end:t.range.end}),t.fileURI||e.fileURI){const c=t.fileURI,d=e.fileURI,h=c&&d&&c!==d?`<unmergable text regions of ${c}, ${d}>`:c??d;l.fileURI=h}return l}class x0{constructor(e){this.defaultIndentation=" ",this.pendingIndent=!0,this.currentIndents=[],this.recentNonImmediateIndents=[],this.traceData=[],
330
- this.lines=[[]],this.length=0,typeof e=="string"?this.defaultIndentation=e:typeof e=="number"&&(this.defaultIndentation="".padStart(e))}get content(){return this.lines.map(e=>e.join("")).join("")}get contentLength(){return this.length}get currentLineNumber(){return this.lines.length-1}get currentLineContent(){return this.lines[this.currentLineNumber].join("")}get currentPosition(){return{offset:this.contentLength,line:this.currentLineNumber,character:this.currentLineContent.length}}append(e,r){if(e.
331
- length>0){const n=r&&this.currentPosition;this.lines[this.currentLineNumber].push(e),this.length+=e.length,n&&this.indentPendingTraceRegions(n)}}indentPendingTraceRegions(e){for(let r=this.traceData.length-1;r>=0;r--){const n=this.traceData[r];n.targetStart&&n.targetStart.offset===e.offset&&(n.targetStart=this.currentPosition)}}increaseIndent(e){this.currentIndents.push(e),e.indentImmediately||this.recentNonImmediateIndents.push(e)}decreaseIndent(){this.currentIndents.pop()}get relevantIndents(){
332
- return this.currentIndents.filter(e=>!this.recentNonImmediateIndents.includes(e))}resetCurrentLine(){this.length-=this.lines[this.currentLineNumber].join("").length,this.lines[this.currentLineNumber]=[],this.pendingIndent=!0}addNewLine(){this.pendingIndent=!0,this.lines.push([]),this.recentNonImmediateIndents.length=0}pushTraceRegion(e){const r=M0(e,this.currentPosition,n=>{var i,s;return(s=(i=this.traceData[this.traceData.length-1])===null||i===void 0?void 0:i.children)===null||s===void 0?void 0:
333
- s.push(n)});return this.traceData.push(r),r}popTraceRegion(e){const r=this.traceData.pop();return this.assertTrue(r===e,"Trace region mismatch!"),r}getParentTraceSourceFileURI(){var e;for(let r=this.traceData.length-1;r>-1;r--){const n=(e=this.traceData[r].sourceRegion)===null||e===void 0?void 0:e.fileURI;if(n)return n}}assertTrue(e,r){if(!e)throw new Error(r)}}function M0(t,e,r){const n={sourceRegion:t,targetRegion:void 0,children:[],targetStart:e,complete:i=>{var s,o;return n.targetRegion={offset:n.
334
- targetStart.offset,end:i.offset,length:i.offset-n.targetStart.offset,range:{start:{line:n.targetStart.line,character:n.targetStart.character},end:{line:i.line,character:i.character}}},delete n.targetStart,((s=n.children)===null||s===void 0?void 0:s.length)===0&&delete n.children,!((o=n.targetRegion)===null||o===void 0)&&o.length&&r(n),delete n.complete,n}};return n}function q0(t,e){const r=new x0(e),n=r.pushTraceRegion(void 0);dc(t,r),r.popTraceRegion(n),n.complete&&n.complete(r.currentPosition);
335
- const i=n.children&&n.children.length===1?n.children[0]:void 0,s=i?.targetRegion,o=n.targetRegion;return s&&i.sourceRegion&&s.offset===o.offset&&s.length===o.length?{text:r.content,trace:i}:{text:r.content,trace:n}}function dc(t,e){typeof t=="string"?U0(t,e):t instanceof Zs?H0(t,e):t instanceof Ne?mc(t,e):t instanceof Gr&&V0(t,e)}function hc(t,e){return typeof t=="string"?t.length!==0:t instanceof Ne?t.contents.some(r=>hc(r,e)):t instanceof Gr?!(t.ifNotEmpty&&e.currentLineContent.length===0):!1}
336
- function U0(t,e){t&&(e.pendingIndent&&pc(e,!1),e.append(t))}function pc(t,e){var r;let n="";for(const i of t.relevantIndents.filter(s=>s.indentEmptyLines||!e))n+=(r=i.indentation)!==null&&r!==void 0?r:t.defaultIndentation;t.append(n,!0),t.pendingIndent=!1}function mc(t,e){let r;const n=L0(t.tracedSource);n&&(r=e.pushTraceRegion(n));for(const i of t.contents)dc(i,e);if(r){e.popTraceRegion(r);const i=e.getParentTraceSourceFileURI();i&&n?.fileURI===i&&delete n.fileURI,r.complete&&r.complete(e.currentPosition)}}
337
- function H0(t,e){var r;if(hc(t,e)){t.indentImmediately&&!e.pendingIndent&&e.append((r=t.indentation)!==null&&r!==void 0?r:e.defaultIndentation,!0);try{e.increaseIndent(t),mc(t,e)}finally{e.decreaseIndent()}}}function V0(t,e){t.ifNotEmpty&&!z0(e.currentLineContent)?e.resetCurrentLine():(e.pendingIndent&&pc(e,!0),e.append(t.lineDelimiter),e.addNewLine())}function z0(t){return t.trimStart()!==""}Object.freeze("__\xABSKIP^NEW^LINE^IF^EMPTY\xBB__");const G0=/\S|$/;function W0(t){const e=t.filter(n=>n.
338
- length>0).map(n=>n.search(G0)),r=e.length===0?0:Math.min(...e);return Math.max(0,r)}function jt(t,...e){const r=Y0(t),n=J0(t,e,r);return Q0(n)}function K0(t,e,r){return(n,...i)=>eg(t,e,r)(jt(n,...i))}function Y0(t){const e=t.join("_").split(xa),r=e.length>1&&e[0].trim().length===0,n=r&&e.length>1&&e[e.length-1].trim().length===0;if(e.length===1||e.length!==0&&e[0].trim().length!==0||e.length===2&&e[1].trim().length===0)return{indentation:0,omitFirstLine:r,omitLastLine:n,trimLastLine:e.length!==1&&
339
- e[e.length-1].trim().length===0};{let i=r?e.slice(1):e;i=n?i.slice(0,i.length-1):i,i=i.filter(o=>o.length!==0);const s=W0(i);return{indentation:s,omitFirstLine:r,omitLastLine:n&&(e[e.length-1].length<s||!e[e.length-1].startsWith(i[0].substring(0,s)))}}}function J0(t,e,{indentation:r,omitFirstLine:n,omitLastLine:i,trimLastLine:s}){const o=[];t.forEach((l,c)=>{o.push(...l.split(xa).map((d,h)=>h===0||d.length<r?d:d.substring(r)).reduce(c===0?(d,h,E)=>E===0?n?[]:[h]:E===1&&d.length===0?[h]:d.concat(
340
- Cn,h):(d,h,E)=>E===0?[h]:d.concat(Cn,h),[]).filter(d=>!(typeof d=="string"&&d.length===0)).concat(zr(e[c])?e[c]:e[c]!==void 0?{content:String(e[c])}:c<e.length?gc:[]))});const a=o.length,u=a!==0?o[a-1]:void 0;return(i||s)&&typeof u=="string"&&u.trim().length===0?n&&a!==1&&o[a-2]===Cn?o.slice(0,a-2):o.slice(0,a-1):o}const Cn={isNewLine:!0},gc={isUndefinedSegment:!0},yc=t=>t===Cn,Qs=t=>t===gc,X0=t=>t.content!==void 0;function Q0(t){return t.reduce((r,n,i)=>Qs(n)?r:yc(n)?{node:i!==0&&(Qs(t[i-1])||zr(
341
- t[i-1]))||i>1&&typeof t[i-1]=="string"&&(Qs(t[i-2])||zr(t[i-2]))?r.node.appendNewLineIfNotEmpty():r.node.appendNewLine()}:(()=>{var s;const o=(i===0||yc(t[i-1]))&&typeof n=="string"&&n.length!==0?"".padStart(n.length-n.trimStart().length):"",a=X0(n)?n.content:n;let u;return{node:r.indented?r.node:o.length!==0?r.node.indent({indentation:o,indentImmediately:!1,indentedChildren:l=>u=l.append(a)}):r.node.append(a),indented:u??((s=r.indented)===null||s===void 0?void 0:s.append(a))}})(),{node:new Ne}).
342
- node}const Z0=typeof process>"u"?`
343
- `:process.platform==="win32"?`\r
344
- `:`
345
- `;function zr(t){return t instanceof Ne||t instanceof Zs||t instanceof Gr}function kt(t,e){return zr(t)?q0(t,e).text:String(t)}class Ne{constructor(...e){this.contents=[],this.append(...e)}isEmpty(){return this.contents.length===0}trace(e,r,n){if($p(e)){if(this.tracedSource={astNode:e,property:r,index:n},this.tracedSource.property===void 0&&this.tracedSource.index!==void 0&&this.tracedSource.index>-1)throw new Error("Generation support: 'property' argument must not be 'undefined' if a non-negati\
346
- ve value is assigned to 'index' in 'CompositeGeneratorNode.trace(...)'.")}else this.tracedSource=e;return this}append(...e){for(const r of e)typeof r=="function"?r(this):r&&this.contents.push(r);return this}appendIf(e,...r){return e?this.append(...r):this}appendNewLine(){return this.append(ve)}appendNewLineIf(e){return e?this.append(ve):this}appendNewLineIfNotEmpty(){return this.append(tg)}appendNewLineIfNotEmptyIf(e){return e?this.appendNewLineIfNotEmpty():this}appendTemplate(e,...r){return this.
347
- append(jt(e,...r))}appendTemplateIf(e){return e?(r,...n)=>this.appendTemplate(r,...n):()=>this}indent(e){const{indentedChildren:r,indentation:n,indentEmptyLines:i,indentImmediately:s}=Array.isArray(e)||typeof e=="function"?{indentedChildren:e}:typeof e=="object"?e:{},o=new Zs(n,s,i);return this.contents.push(o),Array.isArray(r)?o.append(...r):r&&o.append(r),this}appendTraced(e,r,n){return i=>this.append(new Ne().trace(e,r,n).append(i))}appendTracedIf(e,r,n,i){return e?this.appendTraced(typeof r==
348
- "function"?r():r,n,i):()=>this}appendTracedTemplate(e,r,n){return(i,...s)=>this.append(K0(e,r,n)(i,...s))}appendTracedTemplateIf(e,r,n,i){return e?this.appendTracedTemplate(typeof r=="function"?r():r,n,i):()=>this}}function eg(t,e,r){return n=>n instanceof Ne&&n.tracedSource===void 0?n.trace(t,e,r):new Ne().trace(t,e,r).append(n)}class Zs extends Ne{constructor(e,r=!0,n=!1){super(),this.indentImmediately=!0,this.indentEmptyLines=!1,typeof e=="string"?this.indentation=e:typeof e=="number"&&(this.
349
- indentation="".padStart(e)),this.indentImmediately=r,this.indentEmptyLines=n}}class Gr{constructor(e,r=!1){this.ifNotEmpty=!1,this.lineDelimiter=e??Z0,this.ifNotEmpty=r}}const ve=new Gr,tg=new Gr(void 0,!0),Ec=t=>t===void 0||typeof t=="string"||zr(t)?t:String(t);function nt(t,e=Ec,r={}){const n=typeof e=="function"?e:Ec,{filter:i,prefix:s,suffix:o,separator:a,appendNewLineIfNotEmpty:u,skipNewLineAfterLastItem:l}=typeof e=="object"?e:r,c=typeof s=="function"?s:()=>s,d=typeof o=="function"?o:()=>o;
350
- return rg(t,(h,E,$,y)=>{if(i&&!i(E,$,y))return h;const f=n(E,$,y);return f===void 0?h:(h??(h=new Ne)).append(c(E,$,y)).append(f).append(d(E,$,y)).appendIf(!y,a).appendNewLineIfNotEmptyIf(!h.isEmpty()&&!!u&&(!y||!l))})}function rg(t,e,r){const n=t[Symbol.iterator]();let i=n.next(),s=0,o=r;for(;!i.done;){const a=n.next();o=e(o,i.value,s,!!a.done),i=a,s++}return o}var ng=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ig=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,
351
- sg=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,
352
- eo={Space_Separator:ng,ID_Start:ig,ID_Continue:sg},Pe={isSpaceSeparator(t){return typeof t=="string"&&eo.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||eo.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||eo.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t==
353
- "string"&&/[0-9A-Fa-f]/.test(t)}};let to,He,wt,Sn,Bt,ut,Be,ro,Wr;var og=function(e,r){to=String(e),He="start",wt=[],Sn=0,Bt=1,ut=0,Be=void 0,ro=void 0,Wr=void 0;do Be=ag(),lg[He]();while(Be.type!=="eof");return typeof r=="function"?no({"":Wr},"",r):Wr};function no(t,e,r){const n=t[e];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let i=0;i<n.length;i++){const s=String(i),o=no(n,s,r);o===void 0?delete n[s]:Object.defineProperty(n,s,{value:o,writable:!0,enumerable:!0,configurable:!0})}else
354
- for(const i in n){const s=no(n,i,r);s===void 0?delete n[i]:Object.defineProperty(n,i,{value:s,writable:!0,enumerable:!0,configurable:!0})}return r.call(t,e,n)}let ye,me,Kr,bt,$e;function ag(){for(ye="default",me="",Kr=!1,bt=1;;){$e=At();const t=Dc[ye]();if(t)return t}}function At(){if(to[Sn])return String.fromCodePoint(to.codePointAt(Sn))}function te(){const t=At();return t===`
355
- `?(Bt++,ut=0):t?ut+=t.length:ut++,t&&(Sn+=t.length),t}const Dc={default(){switch($e){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
356
- `:case"\r":case"\u2028":case"\u2029":te();return;case"/":te(),ye="comment";return;case void 0:return te(),Ce("eof")}if(Pe.isSpaceSeparator($e)){te();return}return Dc[He]()},comment(){switch($e){case"*":te(),ye="multiLineComment";return;case"/":te(),ye="singleLineComment";return}throw Se(te())},multiLineComment(){switch($e){case"*":te(),ye="multiLineCommentAsterisk";return;case void 0:throw Se(te())}te()},multiLineCommentAsterisk(){switch($e){case"*":te();return;case"/":te(),ye="default";return;case void 0:
357
- throw Se(te())}te(),ye="multiLineComment"},singleLineComment(){switch($e){case`
358
- `:case"\r":case"\u2028":case"\u2029":te(),ye="default";return;case void 0:return te(),Ce("eof")}te()},value(){switch($e){case"{":case"[":return Ce("punctuator",te());case"n":return te(),sr("ull"),Ce("null",null);case"t":return te(),sr("rue"),Ce("boolean",!0);case"f":return te(),sr("alse"),Ce("boolean",!1);case"-":case"+":te()==="-"&&(bt=-1),ye="sign";return;case".":me=te(),ye="decimalPointLeading";return;case"0":me=te(),ye="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"\
359
- 8":case"9":me=te(),ye="decimalInteger";return;case"I":return te(),sr("nfinity"),Ce("numeric",1/0);case"N":return te(),sr("aN"),Ce("numeric",NaN);case'"':case"'":Kr=te()==='"',me="",ye="string";return}throw Se(te())},identifierNameStartEscape(){if($e!=="u")throw Se(te());te();const t=io();switch(t){case"$":case"_":break;default:if(!Pe.isIdStartChar(t))throw vc();break}me+=t,ye="identifierName"},identifierName(){switch($e){case"$":case"_":case"\u200C":case"\u200D":me+=te();return;case"\\":te(),ye=
360
- "identifierNameEscape";return}if(Pe.isIdContinueChar($e)){me+=te();return}return Ce("identifier",me)},identifierNameEscape(){if($e!=="u")throw Se(te());te();const t=io();switch(t){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!Pe.isIdContinueChar(t))throw vc();break}me+=t,ye="identifierName"},sign(){switch($e){case".":me=te(),ye="decimalPointLeading";return;case"0":me=te(),ye="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":me=te(),ye="decimalInt\
361
- eger";return;case"I":return te(),sr("nfinity"),Ce("numeric",bt*(1/0));case"N":return te(),sr("aN"),Ce("numeric",NaN)}throw Se(te())},zero(){switch($e){case".":me+=te(),ye="decimalPoint";return;case"e":case"E":me+=te(),ye="decimalExponent";return;case"x":case"X":me+=te(),ye="hexadecimal";return}return Ce("numeric",bt*0)},decimalInteger(){switch($e){case".":me+=te(),ye="decimalPoint";return;case"e":case"E":me+=te(),ye="decimalExponent";return}if(Pe.isDigit($e)){me+=te();return}return Ce("numeric",
362
- bt*Number(me))},decimalPointLeading(){if(Pe.isDigit($e)){me+=te(),ye="decimalFraction";return}throw Se(te())},decimalPoint(){switch($e){case"e":case"E":me+=te(),ye="decimalExponent";return}if(Pe.isDigit($e)){me+=te(),ye="decimalFraction";return}return Ce("numeric",bt*Number(me))},decimalFraction(){switch($e){case"e":case"E":me+=te(),ye="decimalExponent";return}if(Pe.isDigit($e)){me+=te();return}return Ce("numeric",bt*Number(me))},decimalExponent(){switch($e){case"+":case"-":me+=te(),ye="decimalE\
363
- xponentSign";return}if(Pe.isDigit($e)){me+=te(),ye="decimalExponentInteger";return}throw Se(te())},decimalExponentSign(){if(Pe.isDigit($e)){me+=te(),ye="decimalExponentInteger";return}throw Se(te())},decimalExponentInteger(){if(Pe.isDigit($e)){me+=te();return}return Ce("numeric",bt*Number(me))},hexadecimal(){if(Pe.isHexDigit($e)){me+=te(),ye="hexadecimalInteger";return}throw Se(te())},hexadecimalInteger(){if(Pe.isHexDigit($e)){me+=te();return}return Ce("numeric",bt*Number(me))},string(){switch($e){case"\
364
- \\":te(),me+=ug();return;case'"':if(Kr)return te(),Ce("string",me);me+=te();return;case"'":if(!Kr)return te(),Ce("string",me);me+=te();return;case`
365
- `:case"\r":throw Se(te());case"\u2028":case"\u2029":fg($e);break;case void 0:throw Se(te())}me+=te()},start(){switch($e){case"{":case"[":return Ce("punctuator",te())}ye="value"},beforePropertyName(){switch($e){case"$":case"_":me=te(),ye="identifierName";return;case"\\":te(),ye="identifierNameStartEscape";return;case"}":return Ce("punctuator",te());case'"':case"'":Kr=te()==='"',ye="string";return}if(Pe.isIdStartChar($e)){me+=te(),ye="identifierName";return}throw Se(te())},afterPropertyName(){if($e===
366
- ":")return Ce("punctuator",te());throw Se(te())},beforePropertyValue(){ye="value"},afterPropertyValue(){switch($e){case",":case"}":return Ce("punctuator",te())}throw Se(te())},beforeArrayValue(){if($e==="]")return Ce("punctuator",te());ye="value"},afterArrayValue(){switch($e){case",":case"]":return Ce("punctuator",te())}throw Se(te())},end(){throw Se(te())}};function Ce(t,e){return{type:t,value:e,line:Bt,column:ut}}function sr(t){for(const e of t){if(At()!==e)throw Se(te());te()}}function ug(){switch(At()){case"\
367
- b":return te(),"\b";case"f":return te(),"\f";case"n":return te(),`
368
- `;case"r":return te(),"\r";case"t":return te()," ";case"v":return te(),"\v";case"0":if(te(),Pe.isDigit(At()))throw Se(te());return"\0";case"x":return te(),cg();case"u":return te(),io();case`
369
- `:case"\u2028":case"\u2029":return te(),"";case"\r":return te(),At()===`
370
- `&&te(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Se(te());case void 0:throw Se(te())}return te()}function cg(){let t="",e=At();if(!Pe.isHexDigit(e)||(t+=te(),e=At(),!Pe.isHexDigit(e)))throw Se(te());return t+=te(),String.fromCodePoint(parseInt(t,16))}function io(){let t="",e=4;for(;e-- >0;){const r=At();if(!Pe.isHexDigit(r))throw Se(te());t+=te()}return String.fromCodePoint(parseInt(t,16))}const lg={start(){if(Be.type==="eof")throw or();so()},beforePropertyName(){
371
- switch(Be.type){case"identifier":case"string":ro=Be.value,He="afterPropertyName";return;case"punctuator":Rn();return;case"eof":throw or()}},afterPropertyName(){if(Be.type==="eof")throw or();He="beforePropertyValue"},beforePropertyValue(){if(Be.type==="eof")throw or();so()},beforeArrayValue(){if(Be.type==="eof")throw or();if(Be.type==="punctuator"&&Be.value==="]"){Rn();return}so()},afterPropertyValue(){if(Be.type==="eof")throw or();switch(Be.value){case",":He="beforePropertyName";return;case"}":Rn()}},
372
- afterArrayValue(){if(Be.type==="eof")throw or();switch(Be.value){case",":He="beforeArrayValue";return;case"]":Rn()}},end(){}};function so(){let t;switch(Be.type){case"punctuator":switch(Be.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=Be.value;break}if(Wr===void 0)Wr=t;else{const e=wt[wt.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,ro,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")wt.
373
- push(t),Array.isArray(t)?He="beforeArrayValue":He="beforePropertyName";else{const e=wt[wt.length-1];e==null?He="end":Array.isArray(e)?He="afterArrayValue":He="afterPropertyValue"}}function Rn(){wt.pop();const t=wt[wt.length-1];t==null?He="end":Array.isArray(t)?He="afterArrayValue":He="afterPropertyValue"}function Se(t){return On(t===void 0?`JSON5: invalid end of input at ${Bt}:${ut}`:`JSON5: invalid character '${$c(t)}' at ${Bt}:${ut}`)}function or(){return On(`JSON5: invalid end of input at ${Bt}\
374
- :${ut}`)}function vc(){return ut-=5,On(`JSON5: invalid identifier character at ${Bt}:${ut}`)}function fg(t){console.warn(`JSON5: '${$c(t)}' in strings is not valid ECMAScript; consider escaping`)}function $c(t){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){const r=t.charCodeAt(0).toString(16);return"\\x"+("00"+r).substring(r.length)}return t}function On(t){const e=new SyntaxError(
375
- t);return e.lineNumber=Bt,e.columnNumber=ut,e}var dg=function(e,r,n){const i=[];let s="",o,a,u="",l;if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&(n=r.space,l=r.quote,r=r.replacer),typeof r=="function")a=r;else if(Array.isArray(r)){o=[];for(const y of r){let f;typeof y=="string"?f=y:(typeof y=="number"||y instanceof String||y instanceof Number)&&(f=String(y)),f!==void 0&&o.indexOf(f)<0&&o.push(f)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>
376
- 0&&(n=Math.min(10,Math.floor(n)),u=" ".substr(0,n)):typeof n=="string"&&(u=n.substr(0,10)),c("",{"":e});function c(y,f){let g=f[y];switch(g!=null&&(typeof g.toJSON5=="function"?g=g.toJSON5(y):typeof g.toJSON=="function"&&(g=g.toJSON(y))),a&&(g=a.call(f,y,g)),g instanceof Number?g=Number(g):g instanceof String?g=String(g):g instanceof Boolean&&(g=g.valueOf()),g){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof g=="string")return d(g);if(typeof g=="number")return String(
377
- g);if(typeof g=="object")return Array.isArray(g)?$(g):h(g)}function d(y){const f={"'":.1,'"':.2},g={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let p="";for(let D=0;D<y.length;D++){const v=y[D];switch(v){case"'":case'"':f[v]++,p+=v;continue;case"\0":if(Pe.isDigit(y[D+1])){p+="\\x00";continue}}if(g[v]){p+=g[v];continue}if(v<" "){let _=v.charCodeAt(0).toString(16);p+="\\x"+("00"+_).substring(_.length);
378
- continue}p+=v}const m=l||Object.keys(f).reduce((D,v)=>f[D]<f[v]?D:v);return p=p.replace(new RegExp(m,"g"),g[m]),m+p+m}function h(y){if(i.indexOf(y)>=0)throw TypeError("Converting circular structure to JSON5");i.push(y);let f=s;s=s+u;let g=o||Object.keys(y),p=[];for(const D of g){const v=c(D,y);if(v!==void 0){let _=E(D)+":";u!==""&&(_+=" "),_+=v,p.push(_)}}let m;if(p.length===0)m="{}";else{let D;if(u==="")D=p.join(","),m="{"+D+"}";else{let v=`,
379
- `+s;D=p.join(v),m=`{
380
- `+s+D+`,
381
- `+f+"}"}}return i.pop(),s=f,m}function E(y){if(y.length===0)return d(y);const f=String.fromCodePoint(y.codePointAt(0));if(!Pe.isIdStartChar(f))return d(y);for(let g=f.length;g<y.length;g++)if(!Pe.isIdContinueChar(String.fromCodePoint(y.codePointAt(g))))return d(y);return y}function $(y){if(i.indexOf(y)>=0)throw TypeError("Converting circular structure to JSON5");i.push(y);let f=s;s=s+u;let g=[];for(let m=0;m<y.length;m++){const D=c(String(m),y);g.push(D!==void 0?D:"null")}let p;if(g.length===0)p=
382
- "[]";else if(u==="")p="["+g.join(",")+"]";else{let m=`,
383
- `+s,D=g.join(m);p=`[
384
- `+s+D+`,
385
- `+f+"]"}return i.pop(),s=f,p}};const hg={parse:og,stringify:dg};var Ct=hg;const pg=t=>t.charAt(0).toLocaleUpperCase()+t.slice(1),mg=t=>t.split(".").map(pg).join(""),gg=t=>mg(t.parent?t.id.slice(t.parent.length+1):t.id),yg=({autoLayout:t})=>{switch(t.direction){case"TB":return"down";case"BT":return"up";case"LR":return"right";case"RL":return"left"}},Eg=({shape:t})=>{switch(t){case"queue":case"cylinder":case"rectangle":case"person":return t;case"storage":return"stored_data";case"mobile":case"browse\
386
- r":return"rectangle"}};function _c(t){const{nodes:e,edges:r}=t,n=new Map,i=(o,a)=>{const u=gg(o),l=(a?a+".":"")+u;n.set(o.id,l);const c=JSON.stringify(o.title),d=Eg(o);return new Ne().append(u,": {",ve).indent({indentedChildren:h=>h.append("label: ",c,ve).appendIf(d!=="rectangle","shape: ",d,ve).appendIf(o.children.length>0,ve,nt(e.filter(E=>E.parent===o.id),E=>i(E,l))),indentation:2}).append("}",ve)},s=o=>new Ne().append(n.get(o.source)," -> ",n.get(o.target)).append(a=>o.label&&a.append(": ",JSON.
387
- stringify(o.label)));return kt(new Ne().append("direction: ",yg(t),ve,ve).append(nt(e.filter(o=>Xi(o.parent)),o=>i(o),{appendNewLineIfNotEmpty:!0})).appendIf(r.length>0,ve,nt(r,o=>s(o),{appendNewLineIfNotEmpty:!0})))}const Dg=t=>t.charAt(0).toLocaleUpperCase()+t.slice(1),vg=t=>t.split(".").map(Dg).join(""),$g=t=>vg(t.parent?t.id.slice(t.parent.length+1):t.id),_g=({shape:t})=>{switch(t){case"queue":case"cylinder":return["[(",")]"];case"person":return["[fa:fa-user ","]"];case"storage":return["([",
388
- "])"];case"mobile":case"browser":case"rectangle":return["[","]"]}};function wc(t){const{nodes:e,edges:r}=t,n=new Map,i=(o,a)=>{const u=$g(o),l=(a?a+".":"")+u;n.set(o.id,l);const c=o.title.replaceAll(`
389
- `,"\\n"),d=_g(o),h=new Ne;return o.children.length>0?h.append("subgraph ",l,"[",JSON.stringify(o.title),"]",ve).indent({indentedChildren:[nt(e.filter(E=>E.parent===o.id),E=>i(E,l),{appendNewLineIfNotEmpty:!0})],indentation:2}).append("end",ve):h.append(l,d[0],c,d[1]),h},s=o=>new Ne().append(n.get(o.source)," -.",o.label?' "'+o.label.replaceAll(`
390
- `,"\\n")+'" .-':"-","> ",n.get(o.target));return kt(new Ne().appendIf(t.title!==null&&t.title.length>0,"---",ve,`title: ${JSON.stringify(t.title)}`,ve,"---",ve).append("graph ",t.autoLayout.direction,ve).indent({indentedChildren:o=>{o.append(nt(e.filter(a=>Xi(a.parent)),a=>i(a),{appendNewLineIfNotEmpty:!0})).appendIf(r.length>0,nt(r,a=>s(a),{appendNewLineIfNotEmpty:!0}))},indentation:2}))}function wg(t){const e=new Ne;return e.appendTemplate`
391
- /* prettier-ignore-start */
392
- /* eslint-disable */
393
-
394
- /******************************************************************************
395
- * This file was generated
396
- * DO NOT EDIT MANUALLY!
397
- ******************************************************************************/
398
-
399
- import { LikeC4Model } from 'likec4/model'
400
-
401
- export const likeC4Model = LikeC4Model.fromDump(${Ct.stringify(t.$model,{space:2,quote:"'"})})
402
-
403
- export type LikeC4ModelTypes = typeof likeC4Model.Aux
404
- export type LikeC4ElementId = LikeC4ModelTypes['Fqn']
405
- export type LikeC4DeploymentId = LikeC4ModelTypes['Deployment']
406
- export type LikeC4ViewId = LikeC4ModelTypes['ViewId']
407
-
408
- /* prettier-ignore-end */
409
- `,kt(e)}function bg(t){return nt(t,e=>jt`${Ct.stringify(e.id)}`,{separator:" | "})}function Ag(t){const e=Array.from(t),r=new Ne;return r.appendTemplate`
410
- /******************************************************************************
411
- * This file was generated
412
- * DO NOT EDIT MANUALLY!
413
- ******************************************************************************/
414
- /* prettier-ignore-start */
415
- /* eslint-disable */
416
-
417
- // @ts-nocheck
418
-
419
- import type { DiagramView } from 'likec4'
420
- `.append(ve,ve),e.length===0?(r.append("export {}",ve),kt(r)):(r.appendTemplate`
421
- export type LikeC4ViewId = ${bg(e)};
422
- export const LikeC4Views = {
423
- `.indent({indentation:2,indentedChildren(n){n.appendNewLineIf(e.length>1).append(nt(e,i=>jt`${Ct.stringify(i.id)}: (${Ct.stringify(i)} as unknown) as DiagramView`,{separator:",",appendNewLineIfNotEmpty:!0}))}}).append("} as const satisfies Record<LikeC4ViewId, DiagramView>",ve,ve).appendTemplate`
424
- export type LikeC4Views = typeof LikeC4Views
425
-
426
- export function isLikeC4ViewId(value: unknown): value is LikeC4ViewId {
427
- return (
428
- value != null &&
429
- typeof value === 'string' &&
430
- !!LikeC4Views[value]
431
- )
432
- }
433
-
434
- /* prettier-ignore-end */
435
- `.append(ve),kt(r))}function Yr(t){t instanceof Set&&(t=[...t].sort(Qp));const e=t.map(r=>` | ${JSON.stringify(r)}`);return e.length===0&&e.push(" never"),e.join(`
436
- `)+";"}function Cg(t){const{fqns:e,tags:r,kinds:n}=eu([...t.elements()]).reduce((o,a)=>(o.fqns.push(a.id),o.kinds.add(a.kind),o.tags.push(...a.tags),o),{fqns:[],kinds:new Set,tags:[]}),i=eu([...t.deployment.elements()]).map(o=>o.id),{viewIds:s}=[...t.views()].reduce((o,a)=>(o.viewIds.add(a.id),o.tags.push(...a.tags),o.tags.push(...a.includedTags),o),{viewIds:new Set,tags:r});return`
437
- /* prettier-ignore-start */
438
- /* eslint-disable */
439
-
440
- /******************************************************************************
441
- * This file was generated
442
- * DO NOT EDIT MANUALLY!
443
- ******************************************************************************/
444
-
445
- import type { PropsWithChildren } from 'react'
446
- import type { JSX } from 'react/jsx-runtime'
447
- import type {
448
- DiagramView,
449
- LikeC4Model as GenericLikeC4Model,
450
- } from 'likec4/model'
451
- import type {
452
- LikeC4ViewProps as GenericLikeC4ViewProps,
453
- ReactLikeC4Props as GenericReactLikeC4Props
454
- } from 'likec4/react'
455
-
456
- type LikeC4ElementId =
457
- ${Yr(e)}
458
-
459
- type LikeC4DeploymentId =
460
- ${Yr(i)}
461
-
462
- type LikeC4ViewId =
463
- ${Yr(s)}
464
-
465
- type LikeC4ElementKind =
466
- ${Yr(n)}
467
-
468
- type LikeC4Tag =
469
- ${Yr(new Set(r))}
470
-
471
- declare function isLikeC4ViewId(value: unknown): value is LikeC4ViewId;
472
-
473
- type Aux = GenericLikeC4Model.Typed<LikeC4ElementId, LikeC4DeploymentId, LikeC4ViewId, DiagramView<LikeC4ViewId>>;
474
- type LikeC4Model = GenericLikeC4Model<Aux>;
475
- type LikeC4ViewModel = GenericLikeC4Model.View<Aux>;
476
-
477
- declare const likeC4Model: LikeC4Model;
478
- declare function useLikeC4Model(): LikeC4Model;
479
- declare function useLikeC4View(viewId: LikeC4ViewId): DiagramView<LikeC4ViewId>;
480
- declare function useLikeC4ViewModel(viewId: LikeC4ViewId): LikeC4ViewModel;
481
-
482
- declare function LikeC4ModelProvider(props: PropsWithChildren): JSX.Element;
483
-
484
- type IconRendererProps = {
485
- node: {
486
- id: string
487
- title: string
488
- icon?: string | undefined
489
- }
490
- }
491
- declare function RenderIcon(props: IconRendererProps): JSX.Element;
492
-
493
- type LikeC4ViewProps = GenericLikeC4ViewProps<LikeC4ViewId, LikeC4Tag, LikeC4ElementKind>;
494
- declare function LikeC4View({viewId, ...props}: LikeC4ViewProps): JSX.Element;
495
-
496
- type ReactLikeC4Props = GenericReactLikeC4Props<LikeC4ViewId, LikeC4Tag, LikeC4ElementKind>
497
- declare function ReactLikeC4({viewId, ...props}: ReactLikeC4Props): JSX.Element;
498
-
499
- export {
500
- type LikeC4ElementId,
501
- type LikeC4DeploymentId,
502
- type LikeC4ViewId,
503
- type LikeC4Tag,
504
- type LikeC4ElementKind,
505
- type LikeC4ViewProps,
506
- type ReactLikeC4Props,
507
- type LikeC4Model,
508
- isLikeC4ViewId,
509
- useLikeC4Model,
510
- useLikeC4View,
511
- useLikeC4ViewModel,
512
- likeC4Model,
513
- LikeC4ModelProvider,
514
- LikeC4View,
515
- RenderIcon,
516
- ReactLikeC4
517
- }
518
- /* prettier-ignore-end */
519
- `.trimStart()}function Sg(t){const e=new Ne;return e.appendTemplate`
520
- /******************************************************************************
521
- * This file was generated
522
- * DO NOT EDIT MANUALLY!
523
- ******************************************************************************/
524
- /* eslint-disable */
525
-
526
- export function d2Source(viewId) {
527
- switch (viewId) {
528
- `.appendNewLine().indent({indentation:4,indentedChildren(r){r.append(nt(t,n=>jt`
529
- case ${JSON.stringify(n.id)}: {
530
- return ${JSON.stringify(_c(n))}
531
- }
532
- `,{appendNewLineIfNotEmpty:!0})).appendTemplate`
533
- default: {
534
- throw new Error('Unknown viewId: ' + viewId)
535
- }
536
- `}}).append(ve," }",ve).appendTemplate`
537
- }
538
- `.append(ve,ve),kt(e)}function Rg(t){const e=new Ne;return e.appendTemplate`
539
- /******************************************************************************
540
- * This file was generated
541
- * DO NOT EDIT MANUALLY!
542
- ******************************************************************************/
543
- /* eslint-disable */
544
-
545
- export function dotSource(viewId) {
546
- switch (viewId) {
547
- `.appendNewLine().indent({indentation:4,indentedChildren(r){r.append(nt(Object.keys(t),n=>jt`
548
- case ${JSON.stringify(n)}: {
549
- return ${JSON.stringify(t[n].dot)}
550
- }
551
- `,{appendNewLineIfNotEmpty:!0})).appendTemplate`
552
- default: {
553
- throw new Error('Unknown viewId: ' + viewId)
554
- }
555
- `}}).append(ve," }",ve).appendTemplate`
556
- }
557
-
558
- export function svgSource(viewId) {
559
- switch (viewId) {
560
- `.appendNewLine().indent({indentation:4,indentedChildren(r){r.append(nt(Object.keys(t),n=>jt`
561
- case ${JSON.stringify(n)}: {
562
- return ${JSON.stringify(t[n].svg)}
563
- }
564
- `,{appendNewLineIfNotEmpty:!0})).appendTemplate`
565
- default: {
566
- throw new Error('Unknown viewId: ' + viewId)
567
- }
568
- `}}).append(ve," }",ve,"}",ve,ve),kt(e)}function Og(t){const e=_p(t.flatMap(i=>i.nodes.map(s=>s.icon)),Ma(Ua),Ma(i=>qa(i)&&!i.toLowerCase().startsWith("http")),wp()).sort(),{imports:r,cases:n}=e.reduce((i,s,o)=>{const[a,u]=s.split(":"),l="Icon"+o.toString().padStart(2,"0");return i.imports.push(`import ${l} from 'likec4/icons/${a}/${u}'`),i.cases.push(` '${a}:${u}': ${l}`),i},{imports:[],cases:[]});return`
569
- ${r.join(`
570
- `)}
571
-
572
- export const Icons = {
573
- ${n.join(`,
574
- `)}
575
- }
576
-
577
- if (import.meta.hot) {
578
- import.meta.hot.accept(md => {
579
- const update = md.Icons
580
- if (update) {
581
- if (!import.meta.hot.data.icons) {
582
- import.meta.hot.data.icons = Icons
583
- }
584
- Object.assign(import.meta.hot.data.icons, update)
585
- } else {
586
- import.meta.hot.invalidate()
587
- }
588
- })
589
- }
590
- `}function Ig(t){const{views:e,...r}=t.$model;return`
591
- import { createLikeC4Model } from 'likec4/model'
592
- import { nano } from 'likec4/react'
593
-
594
- // This is needed for better tree shaking
595
- export const LikeC4Views = ${Ct.stringify(e)}
596
-
597
- export const likeC4Model = /* @__PURE__ */ createLikeC4Model(Object.assign(
598
- ${Ct.stringify(r)},
599
- {views: LikeC4Views}
600
- ))
601
-
602
- export const $likec4model = /* @__PURE__ */ nano.atom(likeC4Model)
603
-
604
- export function useLikeC4Model() {
605
- return /* @__PURE__ */ nano.useStore($likec4model)
606
- }
607
-
608
- if (import.meta.hot) {
609
- import.meta.hot.accept(md => {
610
- const update = md.$likec4model
611
- if (update) {
612
- if (!import.meta.hot.data.$current) {
613
- import.meta.hot.data.$current = $likec4model
614
- }
615
- import.meta.hot.data.$current.set(update.get())
616
- } else {
617
- import.meta.hot.invalidate()
618
- }
619
- })
620
- }
621
- `}function Fg(t){const e=new Ne;return e.appendTemplate`
622
- /******************************************************************************
623
- * This file was generated
624
- * DO NOT EDIT MANUALLY!
625
- ******************************************************************************/
626
- /* eslint-disable */
627
-
628
- export function mmdSource(viewId) {
629
- switch (viewId) {
630
- `.appendNewLine().indent({indentation:4,indentedChildren(r){r.append(nt(t,n=>jt`
631
- case ${JSON.stringify(n.id)}: {
632
- return ${JSON.stringify(wc(n))}
633
- }
634
- `,{appendNewLineIfNotEmpty:!0})).appendTemplate`
635
- default: {
636
- throw new Error('Unknown viewId: ' + viewId)
637
- }
638
- `}}).append(ve," }",ve).appendTemplate`
639
- }
640
-
641
- `.append(ve,ve),kt(e)}function bc(t){return`
642
- import { nano } from 'likec4/react'
643
-
644
- export const $graph = nano.atom(${Ct.stringify(t,null,2)})
645
-
646
- export const useOverviewGraph = () => {
647
- return nano.useStore($graph)
648
- }
649
-
650
- if (import.meta.hot) {
651
- import.meta.hot.accept(md => {
652
- const update = md.$graph
653
- if (update) {
654
- if (!import.meta.hot.data.graph) {
655
- import.meta.hot.data.graph = $graph
656
- }
657
- import.meta.hot.data.graph.set(update.value)
658
- } else {
659
- import.meta.hot.invalidate()
660
- }
661
- })
662
- }
663
- `}function Pg(t,e){const{imports:r,cases:n}=t.reduce((i,{id:s},o)=>{const a=De(e,`${s}.png`);if(!Pt(a))return i;const u="Png"+o.toString().padStart(2,"0");return i.imports.push(`import ${u} from 'likec4/previews/${s}.png'`),i.cases.push(` ${JSON.stringify(s)}: ${u}`),i},{imports:[],cases:[]});return`
664
- import { nano } from 'likec4/react'
665
- // assets dir: ${e}
666
-
667
- ${r.join(`
668
- `)}
669
-
670
- const Previews = {
671
- ${n.join(`,
672
- `)}
673
- }
674
-
675
- export let $previews = nano.map(Previews)
676
-
677
- export let usePreviewUrl = (id) => {
678
- const views = nano.useStore($previews, {
679
- keys: [id]
680
- })
681
- return views[id] ?? null
682
- }
683
-
684
- if (import.meta.hot) {
685
- import.meta.hot.accept(md => {
686
- const update = md.$previews
687
- if (update) {
688
- if (!import.meta.hot.data.$current) {
689
- import.meta.hot.data.$current = $previews
690
- }
691
- const oldKeys = new Set([...Object.keys(import.meta.hot.data.$current.get())])
692
- for (const [id, view] of Object.entries(update.get())) {
693
- oldKeys.delete(id)
694
- import.meta.hot.data.$current.setKey(id, view)
695
- }
696
-
697
- for (const key of oldKeys.values()) {
698
- import.meta.hot.data.$current.setKey(key, undefined)
699
- }
700
- } else {
701
- import.meta.hot.invalidate()
702
- }
703
- })
704
- }
705
- `}const Ng={id:"virtual:likec4/dot-sources",virtualId:"\0likec4-plugin/dot-sources.js",async load({likec4:t,logger:e}){e.info(K.dim("generating virtual:likec4/dot-sources"));const r=await t.viewsService.viewsAsGraphvizOut(),n=Ap(r,({id:i,svg:s,dot:o})=>[i,{dot:o,svg:s}]);return Rg(n)}},Tg={id:"virtual:likec4/d2-sources",virtualId:"\0likec4-plugin/d2-sources.js",async load({likec4:t,logger:e}){e.info(K.dim("generating virtual:likec4/d2-sources"));const r=await t.viewsService.computedViews();return Sg(
706
- r)}},Lg={id:"virtual:likec4/mmd-sources",virtualId:"\0likec4-plugin/mmd-sources.js",async load({likec4:t,logger:e}){e.info(K.dim("generating virtual:likec4/mmd-sources"));const r=await t.viewsService.computedViews();return Fg(r)}},jg={id:"virtual:likec4/icons",virtualId:"\0likec4-plugin/icons.js",async load({likec4:t,logger:e}){e.info(K.dim("generating virtual:likec4/icons"));const r=await t.viewsService.computedViews();return Og(r)}},kg={id:"virtual:likec4/overview-graph",virtualId:"\0likec4-plu\
707
- gin/overview-graph.js",async load({likec4:t,logger:e,useOverviewGraph:r}){if(r===!0)try{e.info(K.dim("generating virtual:likec4/overview-graph"));const n=await t.viewsService.overviewGraph();return bc(n)}catch(n){e.error(n)}return e.info(K.dim("generating empty virtual:likec4/overview-graph")),bc({nodes:[],edges:[],bounds:{x:0,y:0,width:10,height:10}})}},Ac={id:"virtual:likec4/previews",virtualId:"\0likec4-plugin/previews.js",async load({likec4:t,logger:e,assetsDir:r}){e.info(K.dim("generating v\
708
- irtual:likec4/previews"));const n=await t.viewsService.computedViews();return Pg(n,r)}},Bg={id:"virtual:likec4/model",virtualId:"\0likec4-plugin/model.js",async load({likec4:t,logger:e,assetsDir:r}){e.info(K.dim("generating virtual:likec4/model"));const n=await t.layoutedModel();return Ig(n)}},oo=[jg,Ng,Tg,Lg,kg,Ac,Bg],xg=t=>{const e=t.toLowerCase();return e.endsWith(".c4")||e.endsWith(".likec4")||e.endsWith(".like-c4")};function ao({useOverviewGraph:t=!1,languageServices:e}){let r,n=e.workspace;
709
- return{name:"vite-plugin-likec4",configResolved(i){if(r=i.logger,t){const s=i.resolve.alias.find(o=>o.find==="likec4/previews")?.replacement;s?(n=s,r.info(K.dim("likec4/previews alias")+" "+K.dim(n))):r.warn("likec4/previews alias not found")}},resolveId(i){const s=oo.find(o=>o.id===i);return s?s.virtualId:null},async load(i){const s=oo.find(o=>o.virtualId===i);return s?await s.load({logger:r,likec4:e,assetsDir:n,useOverviewGraph:t}):null},configureServer(i){const s=bp(1),o=()=>{s.clearQueue(),s(
710
- async()=>{const[l]=e.getErrors();if(l){i.ws.send({type:"error",err:{name:"LikeC4ValidationError",message:"Validation error: "+l.message.slice(0,500),stack:"",plugin:"vite-plugin-likec4",loc:{file:l.sourceFsPath,line:l.range.start.line+1,column:l.range.start.character+1}}});return}for(const c of oo){const d=i.moduleGraph.getModuleById(c.virtualId);if(d&&d.importers.size>0){r.info(`${K.green("trigger hmr")} ${K.dim(d.url)}`);try{await i.reloadModule(d)}catch(h){r.error(h)}}}})},a=e.workspace;r.info(
711
- `${K.dim("watch")} ${a}`);const u=l=>c=>{xg(c)&&e.notifyUpdate({[l]:c})};if(i.watcher.add(a).on("add",u("changed")).on("change",u("changed")).on("unlink",u("removed")),t&&!n.startsWith(e.workspace)){r.info(`${K.dim("watch")} ${n}`);const l=()=>{const c=i.moduleGraph.getModuleById(Ac.virtualId);c&&c.importers.size>0&&i.reloadModule(c)};i.watcher.add(n).on("add",l).on("change",l).on("unlink",l)}e.onModelUpdate(()=>{mt.debug("likec4 model update triggered"),o()})}}}const uo=async({languageServices:t,
712
- likec4AssetsDir:e,...r})=>{const n=r.customLogger??Cs,i=Rs(),s=r?.useOverviewGraph===!0;n.info(`${K.cyan("likec4 app root")} ${K.dim(i)}`);const o=r.outputDir??De(t.workspace,"dist");n.info(K.cyan("output")+" "+K.dim(o));let a="/";r.base&&(a=Cp(r.base),!Sp(a)&&a!=="./"&&(a=Rp(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:i,languageServices:t,clearScreen:!1,base:a,resolve:{conditions:[
713
- "production"],dedupe:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client"],alias:{...Fs(),"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(u),__USE_STYLE_BUNDLE__:"false",__USE_OVERVIEW_GRAPH__:s?"true":"false",__USE_HASH_HISTORY__:r?.useHashHistory===!0?"true":"false","process.e\
714
- nv.NODE_ENV":'"production"'},build:{outDir:o,modulePreload:!1,emptyOutDir:!1,cssCodeSplit:!1,sourcemap:!1,cssMinify:!0,minify:!0,copyPublicDir:!0,chunkSizeWarningLimit:Is,rollupOptions:{treeshake:{preset:"recommended"},output:{hoistTransitiveImports:!1,compact:!0}}},customLogger:n,plugins:[Za(),ao({languageServices:t,useOverviewGraph:s})].concat(r.outputSingleFile?[P0()]:[])}};async function co({languageServices:t,outDir:e,base:r,webcomponentPrefix:n="likec4",filename:i="likec4-views.js"}){const s=Cs,
715
- o=Rs();return s.info(K.cyan("outDir")+" "+K.dim(e)),{root:o,clearScreen:!1,base:r,configFile:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:Fs()},define:{WEBCOMPONENT_PREFIX:JSON.stringify(n),"process.env.NODE_ENV":'"production"'},esbuild:{...Ss},build:{outDir:e,emptyOutDir:!1,sourcemap:!1,minify:!0,assetsInlineLimit:100*1024,chunkSizeWarningLimit:Is,lib:{entry:"webcomponent/webcomponent.js",fileName(a,u){return i},formats:["iife"],name:"LikeC4Views"},commonjsOptions:{
716
- defaultIsModuleExports:a=>a.includes("react")?!0:"auto",requireReturnsDefault:"auto"},rollupOptions:{treeshake:{preset:"recommended"},output:{format:"iife",hoistTransitiveImports:!1,compact:!0}}},customLogger:s,plugins:[ao({languageServices:t,useOverviewGraph:!1})]}}const Mg=["favicon.ico","robots.txt"],qg=async({buildWebcomponent:t=!0,webcomponentPrefix:e="likec4",languageServices:r,likec4AssetsDir:n,outputSingleFile:i,...s})=>{n??=await an(Rr(un(),".likec4-assets-"));const{isDev:o,...a}=await uo(
717
- {...s,languageServices:r,likec4AssetsDir:n,webcomponentPrefix:e,outputSingleFile:i}),u=await Os();for(const d of Mg){const h=De(a.root,d);Pt(h)&&Xa(h,De(u,d))}const l=await r.viewsService.computedViews(),c=await r.diagrams();if(c.length===0)throw process.exitCode=1,new Error("no views found");if(c.length===l.length?a.customLogger.info(`${K.dim("workspace:")} ${K.green("\u2713 all views layouted")}`):a.customLogger.warn(`${K.dim("workspace:")} ${K.yellow(`\u2717 layouted ${c.length} of ${l.length}\
718
- views`)}`),c.forEach(d=>{d.hasLayoutDrift&&a.customLogger.warn(K.yellow("drift detected, manual layout can not be applied, view:")+" "+K.red(d.id))}),t){const d=await co({webcomponentPrefix:e,languageServices:r,outDir:u,base:a.base});await Fr(d)}if(await Fr({...a,publicDir:u,mode:"production"}),i)for(let d of Yp(De(a.build.outDir)).filter(h=>h!=="index.html"))is(De(a.build.outDir,d),{recursive:!0});else{const d=De(a.build.outDir,"index.html");Pt(d)&&Xa(d,De(a.build.outDir,"404.html"))}};function Cc(t){
719
- if(t.resolvedUrls)return Ha(t.resolvedUrls.network)??Ha(t.resolvedUrls.local)}function Sc(t){if(!t.resolvedUrls)throw new Error("Vite server is not ready, no resolvedUrls");zt([K.green("LikeC4 served at:"),"",K.dim("Local: ")+t.resolvedUrls.local.join(`
720
- `+"".padEnd(9," ")),t.resolvedUrls.network.length?K.dim("Network: ")+t.resolvedUrls.network.join(`
721
- `+"".padEnd(9," ")):void 0].filter(e=>Ua(e)).join(`
722
- `))}class Rc extends Error{constructor(e){super(`${e} is locked`)}}const Er={old:new Set,young:new Set},Ug=1e3*15,In=1024,Fn=65535;let Jr;const Hg=()=>{const t=Ir.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},Oc=t=>new Promise((e,r)=>{const n=rm.createServer();n.unref(),n.on("error",r),n.listen(t,()=>{const{port:i}=n.address();n.close(()=>{e(i)})})}),Ic=async(t,e)=>{if(t.host||t.port===0)return Oc(t);for(const r of e)
723
- try{await Oc({port:t.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return t.port},Vg=function*(t){t&&(yield*t),yield 0};async function lo(t){let e,r=new Set;if(t&&(t.port&&(e=typeof t.port=="number"?[t.port]:t.port),t.exclude)){const i=t.exclude;if(typeof i[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(const s of i){if(typeof s!="number")throw new TypeError("Each item in the `exclude` option must be a number cor\
724
- responding to the port you want excluded.");if(!Number.isSafeInteger(s))throw new TypeError(`Number ${s} in the exclude option is not a safe integer and can't be used`)}r=new Set(i)}Jr===void 0&&(Jr=setTimeout(()=>{Jr=void 0,Er.old=Er.young,Er.young=new Set},Ug),Jr.unref&&Jr.unref());const n=Hg();for(const i of Vg(e))try{if(r.has(i))continue;let s=await Ic({...t,port:i},n);for(;Er.old.has(s)||Er.young.has(s);){if(i!==0)throw new Rc(i);s=await Ic({...t,port:i},n)}return Er.young.add(s),s}catch(s){
725
- if(!["EADDRINUSE","EACCES"].includes(s.code)&&!(s instanceof Rc))throw s}throw new Error("No available ports found")}function Pn(t,e){if(!Number.isInteger(t)||!Number.isInteger(e))throw new TypeError("`from` and `to` must be integer numbers");if(t<In||t>Fn)throw new RangeError(`'from' must be between ${In} and ${Fn}`);if(e<In||e>Fn)throw new RangeError(`'to' must be between ${In} and ${Fn}`);if(t>e)throw new RangeError("`to` must be greater than or equal to `from`");return function*(n,i){for(let s=n;s<=
726
- i;s++)yield s}(t,e)}async function Fc({buildWebcomponent:t=!0,hmr:e=!0,webcomponentPrefix:r="likec4",languageServices:n,likec4AssetsDir:i,openBrowser:s,listen:o,...a}){i??=await an(Rr(un(),".likec4-assets-"));const{isDev:u,...l}=await uo({...a,languageServices:n,likec4AssetsDir:i,webcomponentPrefix:r}),c=await lo({port:[5173,...Pn(61e3,61010),...Pn(62002,62010)]}),d=await lo({port:Pn(24678,24690)}),h=await Os();let E;if(t){const y=await co({webcomponentPrefix:r,languageServices:n,outDir:h,base:l.
727
- base});E=Fr({...y,logLevel:"warn"}).catch(f=>(mt.warn("webcomponent build failed",{err:f}),mt.warn("Ignoring error and continuing"),Promise.resolve()))}const $=await em({...l,define:Object.assign({},l.define,e&&{"process.env.NODE_ENV":'"development"'}),mode:e?"development":l.mode,publicDir:h,server:{host:o??"127.0.0.1",allowedHosts:!0,port:c,hmr:e&&{overlay:!0,port:d},fs:{strict:!1},open:s??!u}});return await $.listen(),E&&await E,$}async function zg({browserContext:t,views:e,output:r,logger:n,timeout:i,
728
- maxAttempts:s,outputType:o,theme:a}){let u;const l=e.map(h=>({view:h,attempt:1})),c=[];let d;for(;d=l.shift();){const{view:h,attempt:E}=d,$=`/export/${encodeURIComponent(h.id)}`;try{if(E>1){u&&(u.close({runBeforeUnload:!0}).catch(m=>n.error(`failed to close page: ${m}`)),u=void 0);const p=Va(E*200,{min:200,max:1e3});n.info(K.cyan($)+K.dim(` attempt ${E} of ${s} after ${p}ms`)),await nm(p)}else h.hasLayoutDrift&&n.warn(K.yellow("Drift detected, manual layout can not be applied, view may be invali\
729
- d: ")+K.red(h.id)),n.info(K.cyan($));u??=await t.newPage(),await u.setViewportSize({width:h.bounds.width+20*2,height:h.bounds.height+20*2}),await u.goto($+`?padding=20&theme=${a}`);const y=u.getByRole("presentation");await y.waitFor(),h.nodes.some(p=>qa(p.icon)&&p.icon.toLowerCase().startsWith("http"))&&await Gg(u,i);let f=".";o==="relative"&&(f=h.relativePath??".",f.includes("/")?f=f.slice(0,f.lastIndexOf("/")):f=".");const g=De(r,f,`${h.id}.png`);await y.screenshot({path:g,omitBackground:!0}),
730
- c.push({view:h,path:g})}catch(y){u?.close({runBeforeUnload:!0}).catch(f=>n.error(`failed to close page: ${f}`)),n.error(K.red("failed "+$+`
731
- `+y)),E<s&&(l.push({view:h,attempt:E+1}),n.info(K.dim(`retry ${$}`))),u=void 0}}return c}async function Gg(t,e){let r=await t.locator("//img").all();if(!r.length)return;const n=r.map(i=>i.evaluate(s=>s.complete||new Promise((o,a)=>{s.onload=o,s.onerror=a}),{timeout:Math.max(3e4,e)}));await Promise.allSettled(n)}async function Pc({logger:t,serverUrl:e,theme:r="light",timeoutMs:n=15e3,views:i,output:s,outputType:o="relative",maxAttempts:a=3}){t.info(`${K.cyan("export output")} ${K.dim(s)}`),t.info(
732
- `${K.cyan("from server")} ${K.dim(e)}`);const u=nu.executablePath();t.info(K.cyan("Start chromium")),t.info(K.dim(u));const l=await nu.launch();t.info(K.cyan("Color scheme: ")+r);const c=await l.newContext({deviceScaleFactor:2,colorScheme:r,baseURL:e,ignoreHTTPSErrors:!0,reducedMotion:"reduce",isMobile:!1});c.setDefaultNavigationTimeout(n),c.setDefaultTimeout(n);try{return await zg({browserContext:c,views:i,output:s,outputType:o,logger:t,maxAttempts:a,timeout:n,theme:r})}finally{t.info(K.cyan("c\
733
- lose chromium")),await c.close(),await l.close()}}async function Nc({path:t,useDotBin:e,theme:r="light",output:n,outputType:i,serverUrl:s,ignore:o=!1,timeoutMs:a=1e4,maxAttempts:u=3}){const l=pt("c4:export"),c=jp(),d=await gt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});n??=d.workspace;const h=await d.diagrams();if(!Zp(h,1))throw l.warn("no views found"),new Error("no views found");let E;if(!s&&(l.info(K.cyan("start preview server")),E=await Fc({languageServices:d,buildWebcomponent:!1,
734
- openBrowser:!1,useOverviewGraph:!1,hmr:!1}),s=Cc(E),!s))throw l.error("Vite server is not ready, no resolvedUrls"),new Error("Vite server is not ready, no resolvedUrls");try{const $=await Pc({logger:l,serverUrl:s,theme:r,timeoutMs:a,views:h,output:n,outputType:i,maxAttempts:u}),{pretty:y}=Op(c);if($.length>0&&l.info(K.green(`exported ${$.length} views in ${y}`)),$.length!==h.length&&(o&&$.length>0?l.info(K.dim("ignore")+" "+K.red(`failed ${h.length-$.length} out of ${h.length} views`)):l.error(K.
735
- red(`failed ${h.length-$.length} out of ${h.length} views`))),$.length!==h.length&&($.length===0||!o))throw new Error(`Failed ${h.length-$.length} out of ${h.length} views`)}finally{E&&(l.info(K.cyan("stop server")),await E.close().catch($=>{l.error($)}))}}const{cyan:Tc,dim:Lc}=K;async function Wg({path:t,useDotBin:e,useHashHistory:r,webcomponentPrefix:n,useOverview:i=!1,output:s,outputSingleFile:o,base:a}){const u=pt("c4:build"),l=await gt.fromWorkspace(t,{graphviz:e?"binary":"wasm",logger:"vit\
736
- e"}),c=s??De(l.workspace,"dist");let d=De(c,"assets");if(i)try{d=De(c,"assets","previews"),await $t(d,{recursive:!0}),u.info(`${Tc("Generate previews")} ${Lc(d)}
737
- `),await Nc({path:t,useDotBin:e,output:d,outputType:"flat",ignore:!0})}catch(h){u.error(K.red("Failed to generate previews")),u.error(h),u.warn(K.yellow("Ignore previews and continue build")),is(d,{recursive:!0,force:!0}),i=!1}await qg({base:a,useHashHistory:o||r,customLogger:u,useOverviewGraph:i,webcomponentPrefix:n,languageServices:l,likec4AssetsDir:d,outputDir:s,outputSingleFile:o}),i&&(u.info(`${Tc("clean previews")} ${Lc(d)}`),is(d,{recursive:!0,force:!0}))}const Kg={command:"build [path]",
738
- aliases:["bundle"],describe:"Build a static website",builder:t=>t.positional("path",Vr).option("output",{alias:"o",type:"string",desc:"output directory for production build",normalize:!0,coerce:De}).option("base",Uu).option("use-hash-history",qu).option("use-dot",at).option("webcomponent-prefix",As).option("use-overview",Hu).option("output-single-file",a0).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=>{
739
- await Wg({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})}},ar=t=>{const e=typeof t;return t!==null&&(e==="object"||e==="function")},fo=new Set(["__proto__","prototype","constructor"]),Yg=new Set("0123456789");function Nn(t){const e=[];let r="",n="start",i=!1;for(const s of t)switch(s){case"\\":{if(n==="index")throw new Error(
740
- "Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");i&&(r+=s),n="property",i=!i;break}case".":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(i){i=!1,r+=s;break}if(fo.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(i){i=!1,r+=s;break}if(n==="property"){if(fo.has(r))return[];e.push(
741
- 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"&&!Yg.has(s))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),i&&(i=!1,r+="\\"),r+=s}}switch(i&&(r+="\\"),n){case"property":{if(fo.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not \
742
- closed");case"start":{e.push("");break}}return e}function ho(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 jc(t,e){if(ho(t,e))throw new Error("Cannot use string index")}function Jg(t,e,r){if(!ar(t)||typeof e!="string")return r===void 0?t:r;const n=Nn(e);if(n.length===0)return r;for(let i=0;i<n.length;i++){const s=n[i];if(ho(t,s)?t=i===n.length-1?void 0:null:t=t[s],t==null){if(i!==n.length-1)return r;break}}return t===
743
- void 0?r:t}function kc(t,e,r){if(!ar(t)||typeof e!="string")return t;const n=t,i=Nn(e);for(let s=0;s<i.length;s++){const o=i[s];jc(t,o),s===i.length-1?t[o]=r:ar(t[o])||(t[o]=typeof i[s+1]=="number"?[]:{}),t=t[o]}return n}function Xg(t,e){if(!ar(t)||typeof e!="string")return!1;const r=Nn(e);for(let n=0;n<r.length;n++){const i=r[n];if(jc(t,i),n===r.length-1)return delete t[i],!0;if(t=t[i],!ar(t))return!1}}function Qg(t,e){if(!ar(t)||typeof e!="string")return!1;const r=Nn(e);if(r.length===0)return!1;
744
- for(const n of r){if(!ar(t)||!(n in t)||ho(t,n))return!1;t=t[n]}return!0}const xt=Ir.homedir(),po=Ir.tmpdir(),{env:Dr}=Te,Zg=t=>{const e=be.join(xt,"Library");return{data:be.join(e,"Application Support",t),config:be.join(e,"Preferences",t),cache:be.join(e,"Caches",t),log:be.join(e,"Logs",t),temp:be.join(po,t)}},ey=t=>{const e=Dr.APPDATA||be.join(xt,"AppData","Roaming"),r=Dr.LOCALAPPDATA||be.join(xt,"AppData","Local");return{data:be.join(r,t,"Data"),config:be.join(e,t,"Config"),cache:be.join(r,t,
745
- "Cache"),log:be.join(r,t,"Log"),temp:be.join(po,t)}},ty=t=>{const e=be.basename(xt);return{data:be.join(Dr.XDG_DATA_HOME||be.join(xt,".local","share"),t),config:be.join(Dr.XDG_CONFIG_HOME||be.join(xt,".config"),t),cache:be.join(Dr.XDG_CACHE_HOME||be.join(xt,".cache"),t),log:be.join(Dr.XDG_STATE_HOME||be.join(xt,".local","state"),t),temp:be.join(po,e,t)}};function ry(t,{suffix:e="nodejs"}={}){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);return e&&(t+=`-${e}`),Te.
746
- platform==="darwin"?Zg(t):Te.platform==="win32"?ey(t):ty(t)}const Mt=(t,e)=>function(...n){return t.apply(void 0,n).catch(e)},St=(t,e)=>function(...n){try{return t.apply(void 0,n)}catch(i){return e(i)}},ny=Te.getuid?!Te.getuid():!1,iy=1e4,Je=()=>{},Re={isChangeErrorOk:t=>{if(!Re.isNodeError(t))return!1;const{code:e}=t;return e==="ENOSYS"||!ny&&(e==="EINVAL"||e==="EPERM")},isNodeError:t=>t instanceof Error,isRetriableError:t=>{if(!Re.isNodeError(t))return!1;const{code:e}=t;return e==="EMFILE"||e===
747
- "ENFILE"||e==="EAGAIN"||e==="EBUSY"||e==="EACCESS"||e==="EACCES"||e==="EACCS"||e==="EPERM"},onChangeError:t=>{if(!Re.isNodeError(t))throw t;if(!Re.isChangeErrorOk(t))throw t}};class sy{constructor(){this.interval=25,this.intervalId=void 0,this.limit=iy,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.
748
- 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 oy=new sy,qt=(t,e)=>function(n){
749
- return function i(...s){return oy.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(h=>setTimeout(h,c)).then(()=>i.apply(void 0,s))}throw l};return t.apply(void 0,s).then(a,u)})}},Ut=(t,e)=>function(n){return function i(...s){try{return t.apply(void 0,s)}catch(o){if(Date.now()>n)throw o;if(e(o))return i.apply(void 0,s);throw o}}},qe={attempt:{chmod:Mt(Me(ge.chmod),Re.onChangeError),chown:Mt(Me(ge.chown),Re.
750
- onChangeError),close:Mt(Me(ge.close),Je),fsync:Mt(Me(ge.fsync),Je),mkdir:Mt(Me(ge.mkdir),Je),realpath:Mt(Me(ge.realpath),Je),stat:Mt(Me(ge.stat),Je),unlink:Mt(Me(ge.unlink),Je),chmodSync:St(ge.chmodSync,Re.onChangeError),chownSync:St(ge.chownSync,Re.onChangeError),closeSync:St(ge.closeSync,Je),existsSync:St(ge.existsSync,Je),fsyncSync:St(ge.fsync,Je),mkdirSync:St(ge.mkdirSync,Je),realpathSync:St(ge.realpathSync,Je),statSync:St(ge.statSync,Je),unlinkSync:St(ge.unlinkSync,Je)},retry:{close:qt(Me(ge.
751
- close),Re.isRetriableError),fsync:qt(Me(ge.fsync),Re.isRetriableError),open:qt(Me(ge.open),Re.isRetriableError),readFile:qt(Me(ge.readFile),Re.isRetriableError),rename:qt(Me(ge.rename),Re.isRetriableError),stat:qt(Me(ge.stat),Re.isRetriableError),write:qt(Me(ge.write),Re.isRetriableError),writeFile:qt(Me(ge.writeFile),Re.isRetriableError),closeSync:Ut(ge.closeSync,Re.isRetriableError),fsyncSync:Ut(ge.fsyncSync,Re.isRetriableError),openSync:Ut(ge.openSync,Re.isRetriableError),readFileSync:Ut(ge.readFileSync,
752
- Re.isRetriableError),renameSync:Ut(ge.renameSync,Re.isRetriableError),statSync:Ut(ge.statSync,Re.isRetriableError),writeSync:Ut(ge.writeSync,Re.isRetriableError),writeFileSync:Ut(ge.writeFileSync,Re.isRetriableError)}},ay="utf8",Bc=438,uy=511,cy={},ly=Ir.userInfo().uid,fy=Ir.userInfo().gid,dy=1e3,hy=!!Te.getuid;Te.getuid&&Te.getuid();const xc=128,py=t=>t instanceof Error&&"code"in t,Mc=t=>typeof t=="string",mo=t=>t===void 0,my=Te.platform==="linux",qc=Te.platform==="win32",go=["SIGABRT","SIGALRM",
753
- "SIGHUP","SIGINT","SIGTERM"];qc||go.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),my&&go.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");class gy{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&&(qc&&e!=="SIGINT"&&e!=="SIGTERM"&&e!=="SIGKILL"?Te.kill(Te.pid,"SIGTERM"):Te.kill(Te.pid,e))}},this.hook=()=>{Te.once("exit",()=>this.exit());for(const e of go)try{Te.once(
754
- e,()=>this.exit(e))}catch{}},this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}}const yy=new gy,Ey=yy.register,Ue={store:{},create:t=>{const e=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),i=`.tmp-${Date.now().toString().slice(-10)}${e}`;return`${t}${i}`},get:(t,e,r=!0)=>{const n=Ue.truncate(e(t));return n in Ue.store?Ue.get(t,e,r):(Ue.store[n]=r,[n,()=>delete Ue.store[n]])},purge:t=>{Ue.store[t]&&(delete Ue.store[t],qe.attempt.unlink(t))},
755
- purgeSync:t=>{Ue.store[t]&&(delete Ue.store[t],qe.attempt.unlinkSync(t))},purgeSyncAll:()=>{for(const t in Ue.store)Ue.purgeSync(t)},truncate:t=>{const e=be.basename(t);if(e.length<=xc)return t;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(e);if(!r)return t;const n=e.length-xc;return`${t.slice(0,-e.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};Ey(Ue.purgeSyncAll);function Uc(t,e,r=cy){if(Mc(r))return Uc(t,e,{encoding:r});const n=Date.now()+((r.timeout??dy)||-1);let i=null,
756
- s=null,o=null;try{const a=qe.attempt.realpathSync(t),u=!!a;t=a||t,[s,i]=Ue.get(t,r.tmpCreate||Ue.create,r.tmpPurge!==!1);const l=hy&&mo(r.chown),c=mo(r.mode);if(u&&(l||c)){const d=qe.attempt.statSync(t);d&&(r={...r},l&&(r.chown={uid:d.uid,gid:d.gid}),c&&(r.mode=d.mode))}if(!u){const d=be.dirname(t);qe.attempt.mkdirSync(d,{mode:uy,recursive:!0})}o=qe.retry.openSync(n)(s,"w",r.mode||Bc),r.tmpCreated&&r.tmpCreated(s),Mc(e)?qe.retry.writeSync(n)(o,e,0,r.encoding||ay):mo(e)||qe.retry.writeSync(n)(o,e,
757
- 0,e.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?qe.retry.fsyncSync(n)(o):qe.attempt.fsync(o)),qe.retry.closeSync(n)(o),o=null,r.chown&&(r.chown.uid!==ly||r.chown.gid!==fy)&&qe.attempt.chownSync(s,r.chown.uid,r.chown.gid),r.mode&&r.mode!==Bc&&qe.attempt.chmodSync(s,r.mode);try{qe.retry.renameSync(n)(s,t)}catch(d){if(!py(d)||d.code!=="ENAMETOOLONG")throw d;qe.retry.renameSync(n)(s,Ue.truncate(t))}i(),s=null}finally{o&&qe.attempt.closeSync(o),s&&Ue.purge(s)}}var Tn={exports:{}},yo={},Rt={},ur={},Eo={},
758
- Do={},vo={},Hc;function Ln(){return Hc||(Hc=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(p){if(super(),!t.IDENTIFIER.test(p))throw new Error("CodeGen: name must be a valid identifier");this.str=p}toString(){return this.str}emptyStr(){
759
- return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(p){super(),this._items=typeof p=="string"?[p]:p}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const p=this._items[0];return p===""||p==='""'}get str(){var p;return(p=this._str)!==null&&p!==void 0?p:this._str=this._items.reduce((m,D)=>`${m}${D}`,"")}get names(){var p;return(p=this._names)!==null&&p!==void 0?p:this._names=this._items.reduce((m,D)=>(D instanceof r&&(m[D.str]=(m[D.str]||0)+1),m),
760
- {})}}t._Code=n,t.nil=new n("");function i(g,...p){const m=[g[0]];let D=0;for(;D<p.length;)a(m,p[D]),m.push(g[++D]);return new n(m)}t._=i;const s=new n("+");function o(g,...p){const m=[E(g[0])];let D=0;for(;D<p.length;)m.push(s),a(m,p[D]),m.push(s,E(g[++D]));return u(m),new n(m)}t.str=o;function a(g,p){p instanceof n?g.push(...p._items):p instanceof r?g.push(p):g.push(d(p))}t.addCodeArg=a;function u(g){let p=1;for(;p<g.length-1;){if(g[p]===s){const m=l(g[p-1],g[p+1]);if(m!==void 0){g.splice(p-1,3,
761
- m);continue}g[p++]="+"}p++}}function l(g,p){if(p==='""')return g;if(g==='""')return p;if(typeof g=="string")return p instanceof r||g[g.length-1]!=='"'?void 0:typeof p!="string"?`${g.slice(0,-1)}${p}"`:p[0]==='"'?g.slice(0,-1)+p.slice(1):void 0;if(typeof p=="string"&&p[0]==='"'&&!(g instanceof r))return`"${g}${p.slice(1)}`}function c(g,p){return p.emptyStr()?g:g.emptyStr()?p:o`${g}${p}`}t.strConcat=c;function d(g){return typeof g=="number"||typeof g=="boolean"||g===null?g:E(Array.isArray(g)?g.join(
762
- ","):g)}function h(g){return new n(E(g))}t.stringify=h;function E(g){return JSON.stringify(g).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=E;function $(g){return typeof g=="string"&&t.IDENTIFIER.test(g)?new n(`.${g}`):i`[${g}]`}t.getProperty=$;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 f(g){return new n(g.toString())}t.
763
- regexpCode=f}(vo)),vo}var $o={},Vc;function zc(){return Vc||(Vc=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=Ln();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")};
764
- class i{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,d;if(!((d=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||d===void 0)&&d.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this.
765
- _names[l]={prefix:l,index:0}}}t.Scope=i;class s extends e.Name{constructor(l,c){super(c),this.prefix=l}setValue(l,{property:c,itemIndex:d}){this.value=l,this.scopePath=(0,e._)`.${new e.Name(c)}[${d}]`}}t.ValueScopeName=s;const o=(0,e._)`\n`;class a extends i{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 s(l,this._newName(l))}value(l,c){var d;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed\
766
- in value");const h=this.toName(l),{prefix:E}=h,$=(d=c.key)!==null&&d!==void 0?d:c.ref;let y=this._values[E];if(y){const p=y.get($);if(p)return p}else y=this._values[E]=new Map;y.set($,h);const f=this._scope[E]||(this._scope[E]=[]),g=f.length;return f[g]=c.ref,h.setValue(c,{property:E,itemIndex:g}),h}getValue(l,c){const d=this._values[l];if(d)return d.get(c)}scopeRefs(l,c=this._values){return this._reduceValues(c,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e.
767
- _)`${l}${d.scopePath}`})}scopeCode(l=this._values,c,d){return this._reduceValues(l,h=>{if(h.value===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return h.value.code},c,d)}_reduceValues(l,c,d={},h){let E=e.nil;for(const $ in l){const y=l[$];if(!y)continue;const f=d[$]=d[$]||new Map;y.forEach(g=>{if(f.has(g))return;f.set(g,n.Started);let p=c(g);if(p){const m=this.opts.es5?t.varKinds.var:t.varKinds.const;E=(0,e._)`${E}${m} ${g} = ${p};${this.opts._n}`}else if(p=h?.(g))E=(0,e._)`${E}${p}${this.
768
- opts._n}`;else throw new r(g);f.set(g,n.Completed)})}return E}}t.ValueScope=a}($o)),$o}var Gc;function pe(){return Gc||(Gc=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=Ln(),r=zc();var n=Ln();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,
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:p}},hi}var lc;function Xr(){return lc||(lc=1,function(t){const e=bs,r=process.
279
+ platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:o}=Yr();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||
280
+ 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?"":"^",d=l.contains?"":"$";let h=`${c}(?:${a})${d}`;return u.negated===!0&&(h=`(?:^(?!${h}).*$)`),h}}(di)),di}var pi,fc;function fm(){
281
+ if(fc)return pi;fc=1;const t=Xr(),{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:d,CHAR_QUESTION_MARK:h,CHAR_RIGHT_CURLY_BRACE:y,CHAR_RIGHT_PARENTHESES:b,CHAR_RIGHT_SQUARE_BRACKET:_}=Yr(),f=m=>m===a||m===n,g=m=>{m.isPrefix!==!0&&(m.depth=m.isGlobstar?1/0:1)};return pi=(m,$)=>{const v=$||{},E=m.length-1,S=v.parts===!0||v.scanToEnd===!0,I=[],F=[],
282
+ B=[];let D=m,k=-1,j=0,x=0,H=!1,K=!1,G=!1,X=!1,se=!1,U=!1,A=!1,z=!1,M=!1,w=!1,R=0,C,Y,Q={value:"",depth:0,isGlob:!1};const ie=()=>k>=E,oe=()=>D.charCodeAt(k+1),L=()=>(C=Y,D.charCodeAt(++k));for(;k<E;){Y=L();let T;if(Y===n){A=Q.backslashes=!0,Y=L(),Y===u&&(U=!0);continue}if(U===!0||Y===u){for(R++;ie()!==!0&&(Y=L());){if(Y===n){A=Q.backslashes=!0,L();continue}if(Y===u){R++;continue}if(U!==!0&&Y===i&&(Y=L())===i){if(H=Q.isBrace=!0,G=Q.isGlob=!0,w=!0,S===!0)continue;break}if(U!==!0&&Y===s){if(H=Q.isBrace=
283
+ !0,G=Q.isGlob=!0,w=!0,S===!0)continue;break}if(Y===y&&(R--,R===0)){U=!1,H=Q.isBrace=!0,w=!0;break}}if(S===!0)continue;break}if(Y===a){if(I.push(k),F.push(Q),Q={value:"",depth:0,isGlob:!1},w===!0)continue;if(C===i&&k===j+1){j+=2;continue}x=k+1;continue}if(v.noext!==!0&&(Y===d||Y===r||Y===e||Y===h||Y===o)===!0&&oe()===l){if(G=Q.isGlob=!0,X=Q.isExtglob=!0,w=!0,Y===o&&k===j&&(M=!0),S===!0){for(;ie()!==!0&&(Y=L());){if(Y===n){A=Q.backslashes=!0,Y=L();continue}if(Y===b){G=Q.isGlob=!0,w=!0;break}}continue}
284
+ break}if(Y===e){if(C===e&&(se=Q.isGlobstar=!0),G=Q.isGlob=!0,w=!0,S===!0)continue;break}if(Y===h){if(G=Q.isGlob=!0,w=!0,S===!0)continue;break}if(Y===c){for(;ie()!==!0&&(T=L());){if(T===n){A=Q.backslashes=!0,L();continue}if(T===_){K=Q.isBracket=!0,G=Q.isGlob=!0,w=!0;break}}if(S===!0)continue;break}if(v.nonegate!==!0&&Y===o&&k===j){z=Q.negated=!0,j++;continue}if(v.noparen!==!0&&Y===l){if(G=Q.isGlob=!0,S===!0){for(;ie()!==!0&&(Y=L());){if(Y===l){A=Q.backslashes=!0,Y=L();continue}if(Y===b){w=!0;break}}
285
+ continue}break}if(G===!0){if(w=!0,S===!0)continue;break}}v.noext===!0&&(X=!1,G=!1);let q=D,J="",ne="";j>0&&(J=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&&f(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:J,input:m,start:j,base:q,glob:ne,isBrace:H,isBracket:K,isGlob:G,isExtglob:X,isGlobstar:se,negated:z,negatedExtglob:M};
286
+ if(v.tokens===!0&&(P.maxDepth=0,f(Y)||F.push(Q),P.tokens=F),v.parts===!0||v.tokens===!0){let T;for(let Z=0;Z<I.length;Z++){const W=T?T+1:j,N=I[Z],te=m.slice(W,N);v.tokens&&(Z===0&&j!==0?(F[Z].isPrefix=!0,F[Z].value=J):F[Z].value=te,g(F[Z]),P.maxDepth+=F[Z].depth),(Z!==0||te!=="")&&B.push(te),T=N}if(T&&T+1<m.length){const Z=m.slice(T+1);B.push(Z),v.tokens&&(F[F.length-1].value=Z,g(F[F.length-1]),P.maxDepth+=F[F.length-1].depth)}P.slashes=I,P.parts=B}return P},pi}var mi,dc;function dm(){if(dc)return mi;
287
+ dc=1;const t=Yr(),e=Xr(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:o}=t,a=(c,d)=>{if(typeof d.expandRange=="function")return d.expandRange(...c,d);c.sort();const h=`[${c.join("-")}]`;try{new RegExp(h)}catch{return c.map(b=>e.escapeRegex(b)).join("..")}return h},u=(c,d)=>`Missing ${c}: "${d}" - use "\\\\${d}" to match literal characters`,l=(c,d)=>{if(typeof c!="string")throw new TypeError("Expected a string");c=o[c]||c;const h={...d},y=typeof h.
288
+ maxLength=="number"?Math.min(r,h.maxLength):r;let b=c.length;if(b>y)throw new SyntaxError(`Input length: ${b}, exceeds maximum allowed length: ${y}`);const _={type:"bos",value:"",output:h.prepend||""},f=[_],g=h.capture?"":"?:",p=e.isWindows(d),m=t.globChars(p),$=t.extglobChars(m),{DOT_LITERAL:v,PLUS_LITERAL:E,SLASH_LITERAL:S,ONE_CHAR:I,DOTS_SLASH:F,NO_DOT:B,NO_DOT_SLASH:D,NO_DOTS_SLASH:k,QMARK:j,QMARK_NO_DOT:x,STAR:H,START_ANCHOR:K}=m,G=N=>`(${g}(?:(?!${K}${N.dot?F:v}).)*?)`,X=h.dot?"":B,se=h.dot?
289
+ j:x;let U=h.bash===!0?G(h):H;h.capture&&(U=`(${U})`),typeof h.noext=="boolean"&&(h.noextglob=h.noext);const A={input:c,index:-1,start:0,dot:h.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:f};c=e.removePrefix(c,A),b=c.length;const z=[],M=[],w=[];let R=_,C;const Y=()=>A.index===b-1,Q=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+=N,A.index+=te},q=N=>{A.output+=
290
+ N.output!=null?N.output:N.value,L(N.value)},J=()=>{let N=1;for(;Q()==="!"&&(Q(2)!=="("||Q(3)==="?");)ie(),A.start++,N++;return N%2===0?!1:(A.negated=!0,A.start++,!0)},ne=N=>{A[N]++,w.push(N)},P=N=>{A[N]--,w.pop()},T=N=>{if(R.type==="globstar"){const te=A.braces>0&&(N.type==="comma"||N.type==="brace"),V=N.extglob===!0||z.length&&(N.type==="pipe"||N.type==="paren");N.type!=="slash"&&N.type!=="paren"&&!te&&!V&&(A.output=A.output.slice(0,-R.output.length),R.type="star",R.value="*",R.output=U,A.output+=
291
+ R.output)}if(z.length&&N.type!=="paren"&&(z[z.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,f.push(N),R=N},Z=(N,te)=>{const V={...$[te],conditions:1,inner:""};V.prev=R,V.parens=A.parens,V.output=A.output;const re=(h.capture?"(":"")+V.open;ne("parens"),T({type:N,value:te,output:A.output?"":I}),T({type:"paren",extglob:!0,value:ie(),output:re}),z.push(V)},W=N=>{let te=N.close+(h.capture?")":""),
292
+ V;if(N.type==="negate"){let re=U;if(N.inner&&N.inner.length>1&&N.inner.includes("/")&&(re=G(h)),(re!==U||Y()||/^\)+$/.test(oe()))&&(te=N.close=`)$))${re}`),N.inner.includes("*")&&(V=oe())&&/^\.[^\\/.]+$/.test(V)){const le=l(V,{...d,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(h.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(c)){let N=!1,te=c.replace(i,(V,re,le,_e,we,ot)=>_e==="\\"?(N=!0,V):
293
+ _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?U:""):U:re?V:`\\${V}`);return N===!0&&(h.unescape===!0?te=te.replace(/\\/g,""):te=te.replace(/\\+/g,V=>V.length%2===0?"\\\\":V?"\\":"")),te===c&&h.contains===!0?(A.output=c,A):(A.output=e.wrapOutput(te,A,d),A)}for(;!Y();){if(C=ie(),C==="\0")continue;if(C==="\\"){const V=Q();if(V==="/"&&h.bash!==!0||V==="."||V===";")continue;if(!V){C+="\\",T({type:"\
294
+ 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+="\\")),h.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(h.posix!==!1&&C===":"){const V=R.value.slice(1);if(V.includes("[")&&(R.posix=!0,V.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+we,A.backtrack=!0,
295
+ ie(),!_.output&&f.indexOf(R)===1&&(_.output=I);continue}}}(C==="["&&Q()!==":"||C==="-"&&Q()==="]")&&(C=`\\${C}`),C==="]"&&(R.value==="["||R.value==="[^")&&(C=`\\${C}`),h.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,h.keepQuotes===!0&&T({type:"text",value:C});continue}if(C==="("){ne("parens"),T({type:"paren",value:C});continue}if(C===")"){if(A.parens===
296
+ 0&&h.strictBrackets===!0)throw new SyntaxError(u("opening","("));const V=z[z.length-1];if(V&&A.parens===V.parens+1){W(z.pop());continue}T({type:"paren",value:C,output:A.parens?")":"\\)"}),P("parens");continue}if(C==="["){if(h.nobracket===!0||!oe().includes("]")){if(h.nobracket!==!0&&h.strictBrackets===!0)throw new SyntaxError(u("closing","]"));C=`\\${C}`}else ne("brackets");T({type:"bracket",value:C});continue}if(C==="]"){if(h.nobracket===!0||R&&R.type==="bracket"&&R.value.length===1){T({type:"t\
297
+ ext",value:C,output:`\\${C}`});continue}if(A.brackets===0){if(h.strictBrackets===!0)throw new SyntaxError(u("opening","["));T({type:"text",value:C,output:`\\${C}`});continue}P("brackets");const V=R.value.slice(1);if(R.posix!==!0&&V[0]==="^"&&!V.includes("/")&&(C=`/${C}`),R.value+=C,q({value:C}),h.literalBrackets===!1||e.hasRegexChars(V))continue;const re=e.escapeRegex(R.value);if(A.output=A.output.slice(0,-R.value.length),h.literalBrackets===!0){A.output+=re,R.value=re;continue}R.value=`(${g}${re}\
298
+ |${R.value})`,A.output+=R.value;continue}if(C==="{"&&h.nobrace!==!0){ne("braces");const V={type:"brace",value:C,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};M.push(V),T(V);continue}if(C==="}"){const V=M[M.length-1];if(h.nobrace===!0||!V){T({type:"text",value:C,output:C});continue}let re=")";if(V.dots===!0){const le=f.slice(),_e=[];for(let we=le.length-1;we>=0&&(f.pop(),le[we].type!=="brace");we--)le[we].type!=="dots"&&_e.unshift(le[we].value);re=a(_e,h),A.backtrack=!0}if(V.
299
+ comma!==!0&&V.dots!==!0){const le=A.output.slice(0,V.outputIndex),_e=A.tokens.slice(V.tokensIndex);V.value=V.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"),M.pop();continue}if(C==="|"){z.length>0&&z[z.length-1].conditions++,T({type:"text",value:C});continue}if(C===","){let V=C;const re=M[M.length-1];re&&w[w.length-1]==="braces"&&(re.comma=!0,V="|"),T({type:"comma",value:C,output:V});continue}if(C==="/"){if(R.type===
300
+ "dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",f.pop(),R=_;continue}T({type:"slash",value:C,output:S});continue}if(C==="."){if(A.braces>0&&R.type==="dot"){R.value==="."&&(R.output=v);const V=M[M.length-1];R.type="dots",R.output+=C,R.value+=C,V.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==="(")&&h.noextglob!==!0&&Q()==="("&&Q(2)!==
301
+ "?"){Z("qmark",C);continue}if(R&&R.type==="paren"){const re=Q();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(h.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(h.noextglob!==!0&&Q()==="("&&
302
+ (Q(2)!=="?"||!/[!=<:]/.test(Q(3)))){Z("negate",C);continue}if(h.nonegate!==!0&&A.index===0){J();continue}}if(C==="+"){if(h.noextglob!==!0&&Q()==="("&&Q(2)!=="?"){Z("plus",C);continue}if(R&&R.value==="("||h.regex===!1){T({type:"plus",value:C,output:E});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:E});continue}if(C==="@"){if(h.noextglob!==!0&&Q()==="("&&Q(2)!=="?"){T({type:"at",extglob:!0,value:C,output:""});
303
+ continue}T({type:"text",value:C});continue}if(C!=="*"){(C==="$"||C==="^")&&(C=`\\${C}`);const V=s.exec(oe());V&&(C+=V[0],A.index+=V[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=U,A.backtrack=!0,A.globstar=!0,L(C);continue}let N=oe();if(h.noextglob!==!0&&/^\([^?]/.test(N)){Z("star",C);continue}if(R.type==="star"){if(h.noglobstar===!0){L(C);continue}const V=R.prev,re=V.prev,le=V.type==="slash"||V.type==="bos",_e=re&&
304
+ (re.type==="star"||re.type==="globstar");if(h.bash===!0&&(!le||N[0]&&N[0]!=="/")){T({type:"star",value:C,output:""});continue}const we=A.braces>0&&(V.type==="comma"||V.type==="brace"),ot=z.length&&(V.type==="pipe"||V.type==="paren");if(!le&&V.type!=="paren"&&!we&&!ot){T({type:"star",value:C,output:""});continue}for(;N.slice(0,3)==="/**";){const pt=c[A.index+4];if(pt&&pt!=="/")break;N=N.slice(3),L("/**",3)}if(V.type==="bos"&&Y()){R.type="globstar",R.value+=C,R.output=G(h),A.output=R.output,A.globstar=
305
+ !0,L(C);continue}if(V.type==="slash"&&V.prev.type!=="bos"&&!_e&&Y()){A.output=A.output.slice(0,-(V.output+R.output).length),V.output=`(?:${V.output}`,R.type="globstar",R.output=G(h)+(h.strictSlashes?")":"|$)"),R.value+=C,A.globstar=!0,A.output+=V.output+R.output,L(C);continue}if(V.type==="slash"&&V.prev.type!=="bos"&&N[0]==="/"){const pt=N[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(V.output+R.output).length),V.output=`(?:${V.output}`,R.type="globstar",R.output=`${G(h)}${S}|${S}${pt})`,R.value+=
306
+ C,A.output+=V.output+R.output,A.globstar=!0,L(C+ie()),T({type:"slash",value:"/",output:""});continue}if(V.type==="bos"&&N[0]==="/"){R.type="globstar",R.value+=C,R.output=`(?:^|${S}|${G(h)}${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(h),R.value+=C,A.output+=R.output,A.globstar=!0,L(C);continue}const te={type:"star",value:C,output:U};if(h.bash===!0){te.output=".*?",(R.type===
307
+ "bos"||R.type==="slash")&&(te.output=X+te.output),T(te);continue}if(R&&(R.type==="bracket"||R.type==="paren")&&h.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):h.dot===!0?(A.output+=k,R.output+=k):(A.output+=X,R.output+=X),Q()!=="*"&&(A.output+=I,R.output+=I)),T(te)}for(;A.brackets>0;){if(h.strictBrackets===!0)throw new SyntaxError(u("closing","]"));A.output=e.escapeLast(A.output,"["),P("brackets")}for(;A.parens>
308
+ 0;){if(h.strictBrackets===!0)throw new SyntaxError(u("closing",")"));A.output=e.escapeLast(A.output,"("),P("parens")}for(;A.braces>0;){if(h.strictBrackets===!0)throw new SyntaxError(u("closing","}"));A.output=e.escapeLast(A.output,"{"),P("braces")}if(h.strictSlashes!==!0&&(R.type==="star"||R.type==="bracket")&&T({type:"maybe_slash",value:"",output:`${S}?`}),A.backtrack===!0){A.output="";for(const N of A.tokens)A.output+=N.output!=null?N.output:N.value,N.suffix&&(A.output+=N.suffix)}return A};return l.
309
+ fastpaths=(c,d)=>{const h={...d},y=typeof h.maxLength=="number"?Math.min(r,h.maxLength):r,b=c.length;if(b>y)throw new SyntaxError(`Input length: ${b}, exceeds maximum allowed length: ${y}`);c=o[c]||c;const _=e.isWindows(d),{DOT_LITERAL:f,SLASH_LITERAL:g,ONE_CHAR:p,DOTS_SLASH:m,NO_DOT:$,NO_DOTS:v,NO_DOTS_SLASH:E,STAR:S,START_ANCHOR:I}=t.globChars(_),F=h.dot?v:$,B=h.dot?E:$,D=h.capture?"":"?:",k={negated:!1,prefix:""};let j=h.bash===!0?".*?":S;h.capture&&(j=`(${j})`);const x=X=>X.noglobstar===!0?j:
310
+ `(${D}(?:(?!${I}${X.dot?m:f}).)*?)`,H=X=>{switch(X){case"*":return`${F}${p}${j}`;case".*":return`${f}${p}${j}`;case"*.*":return`${F}${j}${f}${p}${j}`;case"*/*":return`${F}${j}${g}${p}${B}${j}`;case"**":return F+x(h);case"**/*":return`(?:${F}${x(h)}${g})?${B}${p}${j}`;case"**/*.*":return`(?:${F}${x(h)}${g})?${B}${j}${f}${p}${j}`;case"**/.*":return`(?:${F}${x(h)}${g})?${f}${p}${j}`;default:{const se=/^(.*?)\.(\w+)$/.exec(X);if(!se)return;const U=H(se[1]);return U?U+f+se[2]:void 0}}},K=e.removePrefix(
311
+ c,k);let G=H(K);return G&&h.strictSlashes!==!0&&(G+=`${g}?`),G},mi=l,mi}var gi,hc;function hm(){if(hc)return gi;hc=1;const t=bs,e=fm(),r=dm(),n=Xr(),s=Yr(),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 d=u||{},h=n.isWindows(u),y=c?o.compileRe(
312
+ a,u):o.makeRe(a,u,!1,!0),b=y.state;delete y.state;let _=()=>!1;if(d.ignore){const g={...u,ignore:null,onMatch:null,onResult:null};_=o(d.ignore,g,l)}const f=(g,p=!1)=>{const{isMatch:m,match:$,output:v}=o.test(g,y,u,{glob:a,posix:h}),E={glob:a,state:b,regex:y,posix:h,input:g,output:v,match:$,isMatch:m};return typeof d.onResult=="function"&&d.onResult(E),m===!1?(E.isMatch=!1,p?E:!1):_(g)?(typeof d.onIgnore=="function"&&d.onIgnore(E),E.isMatch=!1,p?E:!1):(typeof d.onMatch=="function"&&d.onMatch(E),p?
313
+ E:!0)};return l&&(f.state=b),f};return o.test=(a,u,l,{glob:c,posix:d}={})=>{if(typeof a!="string")throw new TypeError("Expected input to be a string");if(a==="")return{isMatch:!1,output:""};const h=l||{},y=h.format||(d?n.toPosixSlashes:null);let b=a===c,_=b&&y?y(a):a;return b===!1&&(_=y?y(a):a,b=_===c),(b===!1||h.capture===!0)&&(h.matchBase===!0||h.basename===!0?b=o.matchBase(a,u,l,d):b=u.exec(_)),{isMatch:!!b,match:b,output:_}},o.matchBase=(a,u,l,c=n.isWindows(l))=>(u instanceof RegExp?u:o.makeRe(
314
+ 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 d=u||{},h=d.contains?"":"^",y=d.contains?"":"$";let b=`${h}(?:${a.output})${y}`;a&&a.negated===!0&&(b=`^(?!${b}).*$`);const _=o.toRegex(b,u);return c===!0&&(_.state=a),_},o.makeRe=(a,u={},l=!1,c=!1)=>{if(!a||typeof a!="string")throw new TypeError("Expected a non-empty string");let d={
315
+ negated:!1,fastpaths:!0};return u.fastpaths!==!1&&(a[0]==="."||a[0]==="*")&&(d.output=r.fastpaths(a,u)),d.output||(d=r(a,u)),o.compileRe(d,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,gi=o,gi}var yi,pc;function pm(){return pc||(pc=1,yi=hm()),yi}var _i,mc;function mm(){if(mc)return _i;mc=1;const t=ra,e=lm(),r=pm(),n=Xr(),s=a=>a===""||a==="./",i=a=>{const u=a.indexOf("{");return u>-1&&a.indexOf(
316
+ "}",u)>-1},o=(a,u,l)=>{u=[].concat(u),a=[].concat(a);let c=new Set,d=new Set,h=new Set,y=0,b=g=>{h.add(g.output),l&&l.onResult&&l.onResult(g)};for(let g=0;g<u.length;g++){let p=r(String(u[g]),{...l,onResult:b},!0),m=p.state.negated||p.state.negatedExtglob;m&&y++;for(let $ of a){let v=p($,!0);(m?!v.isMatch:v.isMatch)&&(m?c.add(v.output):(c.delete(v.output),d.add(v.output)))}}let f=(y===u.length?[...h]:[...d]).filter(g=>!c.has(g));if(l&&f.length===0){if(l.failglob===!0)throw new Error(`No matches \
317
+ found for "${u.join(", ")}"`);if(l.nonull===!0||l.nullglob===!0)return l.unescape?u.map(g=>g.replace(/\\/g,"")):u}return f};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,d=[],h=b=>{l.onResult&&l.onResult(b),d.push(b.output)},y=new Set(o(a,u,{...l,onResult:h}));for(let b of d)y.has(b)||c.add(b);return[...c]},o.contains=(a,u,l)=>{if(typeof a!="string")throw new TypeError(`Expected a string: "${t.inspect(
318
+ 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),d={};for(let h of c)d[h]=a[h];return d},o.some=(a,u,l)=>{let c=[].concat(a);for(let d of[].concat(u)){let h=r(String(d),l);if(c.some(y=>h(y)))return!0}
319
+ return!1},o.every=(a,u,l)=>{let c=[].concat(a);for(let d of[].concat(u)){let h=r(String(d),l);if(!c.every(y=>h(y)))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),h=r.makeRe(String(a),{...l,capture:!0}).exec(c?n.toPosixSlashes(u):u);if(h)return h.slice(1).map(y=>y===void 0?"":y)},o.makeRe=(...a)=>r.makeRe(...a),o.scan=(...a)=>r.scan(...a),o.parse=(a,u)=>{
320
+ let l=[];for(let c of[].concat(a||[]))for(let d of e(String(c),u))l.push(r.parse(d,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,_i=o,_i}var gm=mm();const gc=_s(gm),ym={useRecommendedBuildConfig:!0,removeViteModuleLoader:!1,deleteInlinedFiles:!0};function _m(t,e,r,n=!1){const s=new RegExp(
321
+ `<script([^>]*?) src="[./]*${e}"([^>]*)></script>`),i=/"?__VITE_PRELOAD__"?/g,o=r.replace(i,"void 0").replace(/<(\/script>|!--)/g,"\\x3C$1"),a=t.replace(s,(u,l,c)=>`<script${l}${c}>${o.trim()}</script>`);return n?Sm(a):a}function $m(t,e,r){const n=new RegExp(`<link([^>]*?) href="[./]*${e}"([^>]*?)>`),s=r.replace('@charset "UTF-8";',"");return t.replace(n,(o,a,u)=>`<style${a}${u}>${s.trim()}</style>`)}const vm=/\.[mc]?js$/,bm=/\.css$/,wm=/\.html?$/;function Em({useRecommendedBuildConfig:t=!0,removeViteModuleLoader:e=!1,
322
+ inlinePattern:r=[],deleteInlinedFiles:n=!0}=ym){function s(i){console.debug(`NOTE: asset not inlined: ${i}`)}return{name:"vite:singlefile",config:t?Rm:void 0,enforce:"post",generateBundle:(i,o)=>{console.debug(`
323
+ `);const a={html:[],css:[],js:[],other:[]};for(const l of Object.keys(o))wm.test(l)?a.html.push(l):bm.test(l)?a.css.push(l):vm.test(l)?a.js.push(l):a.other.push(l);const u=[];for(const l of a.html){const c=o[l];let d=c.source;for(const h of a.js){if(r.length&&!gc.isMatch(h,r)){s(h);continue}const y=o[h];y.code!=null&&(console.debug(`Inlining: ${h}`),u.push(h),d=_m(d,y.fileName,y.code,e))}for(const h of a.css){if(r.length&&!gc.isMatch(h,r)){s(h);continue}const y=o[h];console.debug(`Inlining: ${h}`),
324
+ u.push(h),d=$m(d,y.fileName,y.source)}c.source=d}if(n)for(const l of u)delete o[l];for(const l of a.other)s(l)}}}const Sm=t=>t.replace(/(<script type="module" crossorigin>\s*)\(function(?: polyfill)?\(\)\s*\{[\s\S]*?\}\)\(\);/,'<script type="module">'),Rm=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)},$i=async({languageServices:t,likec4AssetsDir:e,...r})=>{const n=r.customLogger??Ks,s=Xs(),i=r?.useOverviewGraph===!0;n.info(`${ee.cyan("likec4 app root")} ${ee.dim(s)}`);const o=r.outputDir??ge(t.workspace,"dist");n.info(ee.cyan("output")+" "+ee.dim(o));let a="/";r.base&&(a=lh(r.base),!fh(a)&&a!=="./"&&(a=dh(a))),a!==
326
+ "/"&&n.info(`${ee.green("app base url")} ${ee.dim(a)}`);const u=r.webcomponentPrefix??"likec4";return{isDev:!1,likec4AssetsDir:e,webcomponentPrefix:u,root:s,languageServices:t,clearScreen:!1,base:a,resolve:{conditions:["production"],dedupe:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client"],alias:{...Zs(),"likec4/previews":e}},configFile:!1,mode:"production",optimizeDeps:{force:!0,include:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react/jsx\
327
+ -dev-runtime","react-dom/client"]},define:{WEBCOMPONENT_PREFIX:JSON.stringify(u),__USE_STYLE_BUNDLE__:"false",__USE_OVERVIEW_GRAPH__:i?"true":"false",__USE_HASH_HISTORY__:r?.useHashHistory===!0?"true":"false","process.env.NODE_ENV":'"production"'},build:{outDir:o,modulePreload:!1,emptyOutDir:!1,cssCodeSplit:!1,sourcemap:!1,cssMinify:!0,minify:!0,copyPublicDir:!0,chunkSizeWarningLimit:Qs,rollupOptions:{treeshake:{preset:"recommended"},output:{hoistTransitiveImports:!1,compact:!0}}},customLogger:n,
328
+ plugins:[oa(),Os({languageServices:t.languageServices,useOverviewGraph:i})].concat(r.outputSingleFile?[Em()]:[])}};async function vi({languageServices:t,outDir:e,base:r,webcomponentPrefix:n="likec4",filename:s="likec4-views.js"}){const i=Ks,o=Xs();return i.info(ee.cyan("outDir")+" "+ee.dim(e)),{root:o,clearScreen:!1,base:r,configFile:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:Zs()},define:{WEBCOMPONENT_PREFIX:JSON.stringify(n),"process.env.NODE_ENV":'"production"'},
329
+ esbuild:{...Ys},build:{outDir:e,emptyOutDir:!1,sourcemap:!1,minify:!0,assetsInlineLimit:100*1024,chunkSizeWarningLimit:Qs,lib:{entry:"webcomponent/webcomponent.js",fileName(a,u){return s},formats:["iife"],name:"LikeC4Views"},commonjsOptions:{defaultIsModuleExports:a=>a.includes("react")?!0:"auto",requireReturnsDefault:"auto"},rollupOptions:{treeshake:{preset:"recommended"},output:{format:"iife",hoistTransitiveImports:!1,compact:!0}}},customLogger:i,plugins:[Os({languageServices:t.languageServices,
330
+ useOverviewGraph:!1})]}}const Am=["favicon.ico","robots.txt"],Om=async({buildWebcomponent:t=!0,webcomponentPrefix:e="likec4",languageServices:r,likec4AssetsDir:n,outputSingleFile:s,...i})=>{n??=await Tr(ir(jr(),".likec4-assets-"));const{isDev:o,...a}=await $i({...i,languageServices:r,likec4AssetsDir:n,webcomponentPrefix:e,outputSingleFile:s}),u=await Js();for(const d of Am){const h=ge(a.root,d);Ot(h)&&sa(h,ge(u,d))}const l=await r.viewsService.computedViews(),c=await r.diagrams();if(c.length===0)
331
+ throw process.exitCode=1,new Error("no views found");if(c.length===l.length?a.customLogger.info(`${ee.dim("workspace:")} ${ee.green("\u2713 all views layouted")}`):a.customLogger.warn(`${ee.dim("workspace:")} ${ee.yellow(`\u2717 layouted ${c.length} of ${l.length} views`)}`),c.forEach(d=>{d.hasLayoutDrift&&a.customLogger.warn(ee.yellow("drift detected, manual layout can not be applied, view:")+" "+ee.red(d.id))}),t){const d=await vi({webcomponentPrefix:e,languageServices:r,outDir:u,base:a.base});
332
+ await cr(d)}if(await cr({...a,publicDir:u,mode:"production"}),s)for(let d of xh(ge(a.build.outDir)).filter(h=>h!=="index.html"))Rs(ge(a.build.outDir,d),{recursive:!0});else{const d=ge(a.build.outDir,"index.html");Ot(d)&&sa(d,ge(a.build.outDir,"404.html"))}};function yc(t){if(t.resolvedUrls)return Yo(t.resolvedUrls.network)??Yo(t.resolvedUrls.local)}function _c(t){if(!t.resolvedUrls)throw new Error("Vite server is not ready, no resolvedUrls");St([ee.green("LikeC4 served at:"),"",ee.dim("Local: ")+
333
+ t.resolvedUrls.local.join(`
334
+ `+"".padEnd(9," ")),t.resolvedUrls.network.length?ee.dim("Network: ")+t.resolvedUrls.network.join(`
335
+ `+"".padEnd(9," ")):void 0].filter(e=>hh(e)).join(`
336
+ `))}class $c extends Error{constructor(e){super(`${e} is locked`)}}const Yt={old:new Set,young:new Set},Cm=1e3*15,Jr=1024,Qr=65535;let wr;const Pm=()=>{const t=ar.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},vc=t=>new Promise((e,r)=>{const n=Wh.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 vc(t);for(const r of e)
337
+ try{await vc({port:t.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return t.port},Im=function*(t){t&&(yield*t),yield 0};async function bi(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\
338
+ 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)}wr===void 0&&(wr=setTimeout(()=>{wr=void 0,Yt.old=Yt.young,Yt.young=new Set},Cm),wr.unref&&wr.unref());const n=Pm();for(const s of Im(e))try{if(r.has(s))continue;let i=await bc({...t,port:s},n);for(;Yt.old.has(i)||Yt.young.has(i);){if(s!==0)throw new $c(s);i=await bc({...t,port:s},n)}return Yt.young.add(i),i}catch(i){
339
+ if(!["EADDRINUSE","EACCES"].includes(i.code)&&!(i instanceof $c))throw i}throw new Error("No available ports found")}function Zr(t,e){if(!Number.isInteger(t)||!Number.isInteger(e))throw new TypeError("`from` and `to` must be integer numbers");if(t<Jr||t>Qr)throw new RangeError(`'from' must be between ${Jr} and ${Qr}`);if(e<Jr||e>Qr)throw new RangeError(`'to' must be between ${Jr} and ${Qr}`);if(t>e)throw new RangeError("`to` must be greater than or equal to `from`");return function*(n,s){for(let i=n;i<=
340
+ 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 Tr(ir(jr(),".likec4-assets-"));const{isDev:u,...l}=await $i({...a,languageServices:n,likec4AssetsDir:s,webcomponentPrefix:r}),c=await bi({port:[5173,...Zr(61e3,61010),...Zr(62002,62010)]}),d=await bi({port:Zr(24678,24690)}),h=await Js();let y;if(t){const _=await vi({webcomponentPrefix:r,languageServices:n,outDir:h,base:l.
341
+ base});y=cr({..._,logLevel:"warn"}).catch(f=>(at.warn("webcomponent build failed",{err:f}),at.warn("Ignoring error and continuing"),Promise.resolve()))}const b=await Vh({...l,define:Object.assign({},l.define,e&&{"process.env.NODE_ENV":'"development"'}),mode:e?"development":l.mode,publicDir:h,server:{host:o??"127.0.0.1",allowedHosts:!0,port:c,hmr:e&&{overlay:!0,port:d},fs:{strict:!1},open:i??!u}});return await b.listen(),y&&await y,b}async function Nm({browserContext:t,views:e,output:r,logger:n,timeout:s,
342
+ maxAttempts:i,outputType:o,theme:a}){let u;const l=e.map(h=>({view:h,attempt:1})),c=[];let d;for(;d=l.shift();){const{view:h,attempt:y}=d,b=`/export/${encodeURIComponent(h.id)}`;try{if(y>1){u&&(u.close({runBeforeUnload:!0}).catch(m=>n.error(`failed to close page: ${m}`)),u=void 0);const p=Xo(y*200,{min:200,max:1e3});n.info(ee.cyan(b)+ee.dim(` attempt ${y} of ${i} after ${p}ms`)),await Kh(p)}else h.hasLayoutDrift&&n.warn(ee.yellow("Drift detected, manual layout can not be applied, view may be inv\
343
+ alid: ")+ee.red(h.id)),n.info(ee.cyan(b));u??=await t.newPage(),await u.setViewportSize({width:h.bounds.width+20*2,height:h.bounds.height+20*2}),await u.goto(b+`?padding=20&theme=${a}`);const _=u.getByRole("presentation");await _.waitFor(),h.nodes.some(p=>ph(p.icon)&&p.icon.toLowerCase().startsWith("http"))&&await Tm(u,s);let f=".";o==="relative"&&(f=h.relativePath??".",f.includes("/")?f=f.slice(0,f.lastIndexOf("/")):f=".");const g=ge(r,f,`${h.id}.png`);await _.screenshot({path:g,omitBackground:!0}),
344
+ c.push({view:h,path:g})}catch(_){u?.close({runBeforeUnload:!0}).catch(f=>n.error(`failed to close page: ${f}`)),n.error(ee.red("failed "+b+`
345
+ `+_)),y<i&&(l.push({view:h,attempt:y+1}),n.info(ee.dim(`retry ${b}`))),u=void 0}}return c}async function Tm(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 Ec({logger:t,serverUrl:e,theme:r="light",timeoutMs:n=15e3,views:s,output:i,outputType:o="relative",maxAttempts:a=3}){t.info(`${ee.cyan("export output")} ${ee.dim(i)}`),t.info(
346
+ `${ee.cyan("from server")} ${ee.dim(e)}`);const u=ua.executablePath();t.info(ee.cyan("Start chromium")),t.info(ee.dim(u));const l=await ua.launch();t.info(ee.cyan("Color scheme: ")+r);const c=await l.newContext({deviceScaleFactor:2,colorScheme:r,baseURL:e,ignoreHTTPSErrors:!0,reducedMotion:"reduce",isMobile:!1});c.setDefaultNavigationTimeout(n),c.setDefaultTimeout(n);try{return await Nm({browserContext:c,views:s,output:i,outputType:o,logger:t,maxAttempts:a,timeout:n,theme:r})}finally{t.info(ee.cyan(
347
+ "close chromium")),await c.close(),await l.close()}}async function Sc({path:t,useDotBin:e,theme:r="light",output:n,outputType:s,serverUrl:i,ignore:o=!1,timeoutMs:a=1e4,maxAttempts:u=3}){const l=tt("c4:export"),c=Eh(),d=await rt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});d.ensureSingleProject(),n??=d.workspace;const h=await d.diagrams();if(!Bh(h,1))throw l.warn("no views found"),new Error("no views found");let y;if(!i&&(l.info(ee.cyan("start preview server")),y=await wc({languageServices:d,
348
+ buildWebcomponent:!1,openBrowser:!1,useOverviewGraph:!1,hmr:!1}),i=yc(y),!i))throw l.error("Vite server is not ready, no resolvedUrls"),new Error("Vite server is not ready, no resolvedUrls");try{const b=await Ec({logger:l,serverUrl:i,theme:r,timeoutMs:a,views:h,output:n,outputType:s,maxAttempts:u}),{pretty:_}=mh(c);if(b.length>0&&l.info(ee.green(`exported ${b.length} views in ${_}`)),b.length!==h.length&&(o&&b.length>0?l.info(ee.dim("ignore")+" "+ee.red(`failed ${h.length-b.length} out of ${h.length}\
349
+ views`)):l.error(ee.red(`failed ${h.length-b.length} out of ${h.length} views`))),b.length!==h.length&&(b.length===0||!o))throw new Error(`Failed ${h.length-b.length} out of ${h.length} views`)}finally{y&&(l.info(ee.cyan("stop server")),await y.close().catch(b=>{l.error(b)}))}}const{cyan:Rc,dim:Ac}=ee;async function jm({path:t,useDotBin:e,useHashHistory:r,webcomponentPrefix:n,useOverview:s=!1,output:i,outputSingleFile:o,base:a}){const u=tt("c4:build"),l=await rt.fromWorkspace(t,{graphviz:e?"bin\
350
+ ary":"wasm",logger:"vite"}),c=i??ge(l.workspace,"dist");let d=ge(c,"assets");if(s)try{d=ge(c,"assets","previews"),await ct(d,{recursive:!0}),u.info(`${Rc("Generate previews")} ${Ac(d)}
351
+ `),await Sc({path:t,useDotBin:e,output:d,outputType:"flat",ignore:!0})}catch(h){u.error(ee.red("Failed to generate previews")),u.error(h),u.warn(ee.yellow("Ignore previews and continue build")),Rs(d,{recursive:!0,force:!0}),s=!1}await Om({base:a,useHashHistory:o||r,customLogger:u,useOverviewGraph:s,webcomponentPrefix:n,languageServices:l,likec4AssetsDir:d,outputDir:i,outputSingleFile:o}),s&&(u.info(`${Rc("clean previews")} ${Ac(d)}`),Rs(d,{recursive:!0,force:!0}))}const Lm={command:"build [path]",
352
+ aliases:["bundle"],describe:"Build a static website",builder:t=>t.positional("path",br).option("output",{alias:"o",type:"string",desc:"output directory for production build",normalize:!0,coerce:ge}).option("base",Ka).option("use-hash-history",Wa).option("use-dot",Ye).option("webcomponent-prefix",Ws).option("use-overview",Ya).option("output-single-file",Qp).example(`${ee.green("$0 build -o ./build ./src")}`,ee.gray("Search for likec4 files in 'src' and output static site to 'build'")),handler:async t=>{
353
+ await jm({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})}},qt=t=>{const e=typeof t;return t!==null&&(e==="object"||e==="function")},wi=new Set(["__proto__","prototype","constructor"]),Dm=new Set("0123456789");function en(t){const e=[];let r="",n="start",s=!1;for(const i of t)switch(i){case"\\":{if(n==="index")throw new Error(
354
+ "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(wi.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(wi.has(r))return[];e.push(
355
+ 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"&&!Dm.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(wi.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not \
356
+ closed");case"start":{e.push("");break}}return e}function Ei(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 Oc(t,e){if(Ei(t,e))throw new Error("Cannot use string index")}function xm(t,e,r){if(!qt(t)||typeof e!="string")return r===void 0?t:r;const n=en(e);if(n.length===0)return r;for(let s=0;s<n.length;s++){const i=n[s];if(Ei(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===
357
+ void 0?r:t}function Cc(t,e,r){if(!qt(t)||typeof e!="string")return t;const n=t,s=en(e);for(let i=0;i<s.length;i++){const o=s[i];Oc(t,o),i===s.length-1?t[o]=r:qt(t[o])||(t[o]=typeof s[i+1]=="number"?[]:{}),t=t[o]}return n}function Mm(t,e){if(!qt(t)||typeof e!="string")return!1;const r=en(e);for(let n=0;n<r.length;n++){const s=r[n];if(Oc(t,s),n===r.length-1)return delete t[s],!0;if(t=t[s],!qt(t))return!1}}function km(t,e){if(!qt(t)||typeof e!="string")return!1;const r=en(e);if(r.length===0)return!1;
358
+ for(const n of r){if(!qt(t)||!(n in t)||Ei(t,n))return!1;t=t[n]}return!0}const _t=ar.homedir(),Si=ar.tmpdir(),{env:Xt}=Re,qm=t=>{const e=$e.join(_t,"Library");return{data:$e.join(e,"Application Support",t),config:$e.join(e,"Preferences",t),cache:$e.join(e,"Caches",t),log:$e.join(e,"Logs",t),temp:$e.join(Si,t)}},Hm=t=>{const e=Xt.APPDATA||$e.join(_t,"AppData","Roaming"),r=Xt.LOCALAPPDATA||$e.join(_t,"AppData","Local");return{data:$e.join(r,t,"Data"),config:$e.join(e,t,"Config"),cache:$e.join(r,t,
359
+ "Cache"),log:$e.join(r,t,"Log"),temp:$e.join(Si,t)}},Um=t=>{const e=$e.basename(_t);return{data:$e.join(Xt.XDG_DATA_HOME||$e.join(_t,".local","share"),t),config:$e.join(Xt.XDG_CONFIG_HOME||$e.join(_t,".config"),t),cache:$e.join(Xt.XDG_CACHE_HOME||$e.join(_t,".cache"),t),log:$e.join(Xt.XDG_STATE_HOME||$e.join(_t,".local","state"),t),temp:$e.join(Si,e,t)}};function Fm(t,{suffix:e="nodejs"}={}){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);return e&&(t+=`-${e}`),Re.
360
+ platform==="darwin"?qm(t):Re.platform==="win32"?Hm(t):Um(t)}const $t=(t,e)=>function(...n){return t.apply(void 0,n).catch(e)},lt=(t,e)=>function(...n){try{return t.apply(void 0,n)}catch(s){return e(s)}},zm=Re.getuid?!Re.getuid():!1,Vm=1e4,qe=()=>{},be={isChangeErrorOk:t=>{if(!be.isNodeError(t))return!1;const{code:e}=t;return e==="ENOSYS"||!zm&&(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===
361
+ "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 Gm{constructor(){this.interval=25,this.intervalId=void 0,this.limit=Vm,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.
362
+ 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 Bm=new Gm,vt=(t,e)=>function(n){
363
+ return function s(...i){return Bm.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(h=>setTimeout(h,c)).then(()=>s.apply(void 0,i))}throw l};return t.apply(void 0,i).then(a,u)})}},bt=(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:$t(Ie(pe.chmod),be.onChangeError),chown:$t(Ie(pe.chown),be.
364
+ onChangeError),close:$t(Ie(pe.close),qe),fsync:$t(Ie(pe.fsync),qe),mkdir:$t(Ie(pe.mkdir),qe),realpath:$t(Ie(pe.realpath),qe),stat:$t(Ie(pe.stat),qe),unlink:$t(Ie(pe.unlink),qe),chmodSync:lt(pe.chmodSync,be.onChangeError),chownSync:lt(pe.chownSync,be.onChangeError),closeSync:lt(pe.closeSync,qe),existsSync:lt(pe.existsSync,qe),fsyncSync:lt(pe.fsync,qe),mkdirSync:lt(pe.mkdirSync,qe),realpathSync:lt(pe.realpathSync,qe),statSync:lt(pe.statSync,qe),unlinkSync:lt(pe.unlinkSync,qe)},retry:{close:vt(Ie(pe.
365
+ close),be.isRetriableError),fsync:vt(Ie(pe.fsync),be.isRetriableError),open:vt(Ie(pe.open),be.isRetriableError),readFile:vt(Ie(pe.readFile),be.isRetriableError),rename:vt(Ie(pe.rename),be.isRetriableError),stat:vt(Ie(pe.stat),be.isRetriableError),write:vt(Ie(pe.write),be.isRetriableError),writeFile:vt(Ie(pe.writeFile),be.isRetriableError),closeSync:bt(pe.closeSync,be.isRetriableError),fsyncSync:bt(pe.fsyncSync,be.isRetriableError),openSync:bt(pe.openSync,be.isRetriableError),readFileSync:bt(pe.readFileSync,
366
+ be.isRetriableError),renameSync:bt(pe.renameSync,be.isRetriableError),statSync:bt(pe.statSync,be.isRetriableError),writeSync:bt(pe.writeSync,be.isRetriableError),writeFileSync:bt(pe.writeFileSync,be.isRetriableError)}},Wm="utf8",Pc=438,Km=511,Ym={},Xm=ar.userInfo().uid,Jm=ar.userInfo().gid,Qm=1e3,Zm=!!Re.getuid;Re.getuid&&Re.getuid();const Ic=128,eg=t=>t instanceof Error&&"code"in t,Nc=t=>typeof t=="string",Ri=t=>t===void 0,tg=Re.platform==="linux",Tc=Re.platform==="win32",Ai=["SIGABRT","SIGALRM",
367
+ "SIGHUP","SIGINT","SIGTERM"];Tc||Ai.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),tg&&Ai.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");class rg{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&&(Tc&&e!=="SIGINT"&&e!=="SIGTERM"&&e!=="SIGKILL"?Re.kill(Re.pid,"SIGTERM"):Re.kill(Re.pid,e))}},this.hook=()=>{Re.once("exit",()=>this.exit());for(const e of Ai)try{Re.once(
368
+ e,()=>this.exit(e))}catch{}},this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}}const ng=new rg,sg=ng.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))},
369
+ 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=$e.basename(t);if(e.length<=Ic)return t;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(e);if(!r)return t;const n=e.length-Ic;return`${t.slice(0,-e.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};sg(Te.purgeSyncAll);function jc(t,e,r=Ym){if(Nc(r))return jc(t,e,{encoding:r});const n=Date.now()+((r.timeout??Qm)||-1);let s=null,
370
+ 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=Zm&&Ri(r.chown),c=Ri(r.mode);if(u&&(l||c)){const d=Ne.attempt.statSync(t);d&&(r={...r},l&&(r.chown={uid:d.uid,gid:d.gid}),c&&(r.mode=d.mode))}if(!u){const d=$e.dirname(t);Ne.attempt.mkdirSync(d,{mode:Km,recursive:!0})}o=Ne.retry.openSync(n)(i,"w",r.mode||Pc),r.tmpCreated&&r.tmpCreated(i),Nc(e)?Ne.retry.writeSync(n)(o,e,0,r.encoding||Wm):Ri(e)||Ne.retry.writeSync(n)(o,e,
371
+ 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!==Xm||r.chown.gid!==Jm)&&Ne.attempt.chownSync(i,r.chown.uid,r.chown.gid),r.mode&&r.mode!==Pc&&Ne.attempt.chmodSync(i,r.mode);try{Ne.retry.renameSync(n)(i,t)}catch(d){if(!eg(d)||d.code!=="ENAMETOOLONG")throw d;Ne.retry.renameSync(n)(i,Te.truncate(t))}s(),i=null}finally{o&&Ne.attempt.closeSync(o),i&&Te.purge(i)}}var tn={exports:{}},Oi={},ft={},Ht={},Ci={},
372
+ Pi={},Ii={},Lc;function rn(){return Lc||(Lc=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(p){if(super(),!t.IDENTIFIER.test(p))throw new Error("CodeGen: name must be a valid identifier");this.str=p}toString(){return this.str}emptyStr(){
373
+ return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(p){super(),this._items=typeof p=="string"?[p]:p}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const p=this._items[0];return p===""||p==='""'}get str(){var p;return(p=this._str)!==null&&p!==void 0?p:this._str=this._items.reduce((m,$)=>`${m}${$}`,"")}get names(){var p;return(p=this._names)!==null&&p!==void 0?p:this._names=this._items.reduce((m,$)=>($ instanceof r&&(m[$.str]=(m[$.str]||0)+1),m),
374
+ {})}}t._Code=n,t.nil=new n("");function s(g,...p){const m=[g[0]];let $=0;for(;$<p.length;)a(m,p[$]),m.push(g[++$]);return new n(m)}t._=s;const i=new n("+");function o(g,...p){const m=[y(g[0])];let $=0;for(;$<p.length;)m.push(i),a(m,p[$]),m.push(i,y(g[++$]));return u(m),new n(m)}t.str=o;function a(g,p){p instanceof n?g.push(...p._items):p instanceof r?g.push(p):g.push(d(p))}t.addCodeArg=a;function u(g){let p=1;for(;p<g.length-1;){if(g[p]===i){const m=l(g[p-1],g[p+1]);if(m!==void 0){g.splice(p-1,3,
375
+ m);continue}g[p++]="+"}p++}}function l(g,p){if(p==='""')return g;if(g==='""')return p;if(typeof g=="string")return p instanceof r||g[g.length-1]!=='"'?void 0:typeof p!="string"?`${g.slice(0,-1)}${p}"`:p[0]==='"'?g.slice(0,-1)+p.slice(1):void 0;if(typeof p=="string"&&p[0]==='"'&&!(g instanceof r))return`"${g}${p.slice(1)}`}function c(g,p){return p.emptyStr()?g:g.emptyStr()?p:o`${g}${p}`}t.strConcat=c;function d(g){return typeof g=="number"||typeof g=="boolean"||g===null?g:y(Array.isArray(g)?g.join(
376
+ ","):g)}function h(g){return new n(y(g))}t.stringify=h;function y(g){return JSON.stringify(g).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=y;function b(g){return typeof g=="string"&&t.IDENTIFIER.test(g)?new n(`.${g}`):s`[${g}]`}t.getProperty=b;function _(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=_;function f(g){return new n(g.toString())}t.
377
+ regexpCode=f}(Ii)),Ii}var Ni={},Dc;function xc(){return Dc||(Dc=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=rn();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")};
378
+ 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,d;if(!((d=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||d===void 0)&&d.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this.
379
+ _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:d}){this.value=l,this.scopePath=(0,e._)`.${new e.Name(c)}[${d}]`}}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 d;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed\
380
+ in value");const h=this.toName(l),{prefix:y}=h,b=(d=c.key)!==null&&d!==void 0?d:c.ref;let _=this._values[y];if(_){const p=_.get(b);if(p)return p}else _=this._values[y]=new Map;_.set(b,h);const f=this._scope[y]||(this._scope[y]=[]),g=f.length;return f[g]=c.ref,h.setValue(c,{property:y,itemIndex:g}),h}getValue(l,c){const d=this._values[l];if(d)return d.get(c)}scopeRefs(l,c=this._values){return this._reduceValues(c,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e.
381
+ _)`${l}${d.scopePath}`})}scopeCode(l=this._values,c,d){return this._reduceValues(l,h=>{if(h.value===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return h.value.code},c,d)}_reduceValues(l,c,d={},h){let y=e.nil;for(const b in l){const _=l[b];if(!_)continue;const f=d[b]=d[b]||new Map;_.forEach(g=>{if(f.has(g))return;f.set(g,n.Started);let p=c(g);if(p){const m=this.opts.es5?t.varKinds.var:t.varKinds.const;y=(0,e._)`${y}${m} ${g} = ${p};${this.opts._n}`}else if(p=h?.(g))y=(0,e._)`${y}${p}${this.
382
+ opts._n}`;else throw new r(g);f.set(g,n.Completed)})}return y}}t.ValueScope=a}(Ni)),Ni}var Mc;function he(){return Mc||(Mc=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=rn(),r=xc();var n=rn();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,
769
383
  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,
770
- get:function(){return n.Name}});var i=zc();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e.
771
- _Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class s{optimizeNodes(){return this}optimizeNames(w,A){return this}}class o extends s{constructor(w,A,R){super(),this.varKind=w,this.name=A,this.rhs=R}render({es5:w,_n:A}){const R=w?r.varKinds.var:this.varKind,J=this.rhs===void 0?"":` = ${this.rhs}`;return`${R} ${this.name}${J};`+A}optimizeNames(w,A){if(w[this.name.str])return this.rhs&&(this.rhs=j(this.rhs,w,A)),this}get names(){
772
- return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(w,A,R){super(),this.lhs=w,this.rhs=A,this.sideEffects=R}render({_n:w}){return`${this.lhs} = ${this.rhs};`+w}optimizeNames(w,A){if(!(this.lhs instanceof e.Name&&!w[this.lhs.str]&&!this.sideEffects))return this.rhs=j(this.rhs,w,A),this}get names(){const w=this.lhs instanceof e.Name?{}:{...this.lhs.names};return N(w,this.rhs)}}class u extends a{constructor(w,A,R,J){super(w,R,J),this.op=A}render({_n:w}){return`${this.
773
- lhs} ${this.op}= ${this.rhs};`+w}}class l extends s{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`${this.label}:`+w}}class c extends s{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`break${this.label?` ${this.label}`:""};`+w}}class d extends s{constructor(w){super(),this.error=w}render({_n:w}){return`throw ${this.error};`+w}get names(){return this.error.names}}class h extends s{constructor(w){super(),this.code=w}render({_n:w}){return`${this.code}\
774
- ;`+w}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(w,A){return this.code=j(this.code,w,A),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class E extends s{constructor(w=[]){super(),this.nodes=w}render(w){return this.nodes.reduce((A,R)=>A+R.render(w),"")}optimizeNodes(){const{nodes:w}=this;let A=w.length;for(;A--;){const R=w[A].optimizeNodes();Array.isArray(R)?w.splice(A,1,...R):R?w[A]=R:w.splice(A,1)}return w.length>0?this:void 0}optimizeNames(w,A){
775
- const{nodes:R}=this;let J=R.length;for(;J--;){const Z=R[J];Z.optimizeNames(w,A)||(M(w,Z.names),R.splice(J,1))}return R.length>0?this:void 0}get names(){return this.nodes.reduce((w,A)=>B(w,A.names),{})}}class $ extends E{render(w){return"{"+w._n+super.render(w)+"}"+w._n}}class y extends E{}class f extends ${}f.kind="else";class g extends ${constructor(w,A){super(A),this.condition=w}render(w){let A=`if(${this.condition})`+super.render(w);return this.else&&(A+="else "+this.else.render(w)),A}optimizeNodes(){
776
- super.optimizeNodes();const w=this.condition;if(w===!0)return this.nodes;let A=this.else;if(A){const R=A.optimizeNodes();A=this.else=Array.isArray(R)?new f(R):R}if(A)return w===!1?A instanceof g?A:A.nodes:this.nodes.length?this:new g(Y(w),A instanceof g?[A]:A.nodes);if(!(w===!1||!this.nodes.length))return this}optimizeNames(w,A){var R;if(this.else=(R=this.else)===null||R===void 0?void 0:R.optimizeNames(w,A),!!(super.optimizeNames(w,A)||this.else))return this.condition=j(this.condition,w,A),this}get names(){
777
- const w=super.names;return N(w,this.condition),this.else&&B(w,this.else.names),w}}g.kind="if";class p extends ${}p.kind="for";class m extends p{constructor(w){super(),this.iteration=w}render(w){return`for(${this.iteration})`+super.render(w)}optimizeNames(w,A){if(super.optimizeNames(w,A))return this.iteration=j(this.iteration,w,A),this}get names(){return B(super.names,this.iteration.names)}}class D extends p{constructor(w,A,R,J){super(),this.varKind=w,this.name=A,this.from=R,this.to=J}render(w){const A=w.
778
- es5?r.varKinds.var:this.varKind,{name:R,from:J,to:Z}=this;return`for(${A} ${R}=${J}; ${R}<${Z}; ${R}++)`+super.render(w)}get names(){const w=N(super.names,this.from);return N(w,this.to)}}class v extends p{constructor(w,A,R,J){super(),this.loop=w,this.varKind=A,this.name=R,this.iterable=J}render(w){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(w)}optimizeNames(w,A){if(super.optimizeNames(w,A))return this.iterable=j(this.iterable,w,A),this}get names(){return B(
779
- super.names,this.iterable.names)}}class _ extends ${constructor(w,A,R){super(),this.name=w,this.args=A,this.async=R}render(w){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(w)}}_.kind="func";class b extends E{render(w){return"return "+super.render(w)}}b.kind="return";class I extends ${render(w){let A="try"+super.render(w);return this.catch&&(A+=this.catch.render(w)),this.finally&&(A+=this.finally.render(w)),A}optimizeNodes(){var w,A;return super.optimizeNodes(),
780
- (w=this.catch)===null||w===void 0||w.optimizeNodes(),(A=this.finally)===null||A===void 0||A.optimizeNodes(),this}optimizeNames(w,A){var R,J;return super.optimizeNames(w,A),(R=this.catch)===null||R===void 0||R.optimizeNames(w,A),(J=this.finally)===null||J===void 0||J.optimizeNames(w,A),this}get names(){const w=super.names;return this.catch&&B(w,this.catch.names),this.finally&&B(w,this.finally.names),w}}class U extends ${constructor(w){super(),this.error=w}render(w){return`catch(${this.error})`+super.
781
- render(w)}}U.kind="catch";class G extends ${render(w){return"finally"+super.render(w)}}G.kind="finally";class L{constructor(w,A={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...A,_n:A.lines?`
782
- `:""},this._extScope=w,this._scope=new r.Scope({parent:w}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(w){return this._scope.name(w)}scopeName(w){return this._extScope.name(w)}scopeValue(w,A){const R=this._extScope.value(w,A);return(this._values[R.prefix]||(this._values[R.prefix]=new Set)).add(R),R}getScopeValue(w,A){return this._extScope.getValue(w,A)}scopeRefs(w){return this._extScope.scopeRefs(w,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(w,A,R,J){
783
- const Z=this._scope.toName(A);return R!==void 0&&J&&(this._constants[Z.str]=R),this._leafNode(new o(w,Z,R)),Z}const(w,A,R){return this._def(r.varKinds.const,w,A,R)}let(w,A,R){return this._def(r.varKinds.let,w,A,R)}var(w,A,R){return this._def(r.varKinds.var,w,A,R)}assign(w,A,R){return this._leafNode(new a(w,A,R))}add(w,A){return this._leafNode(new u(w,t.operators.ADD,A))}code(w){return typeof w=="function"?w():w!==e.nil&&this._leafNode(new h(w)),this}object(...w){const A=["{"];for(const[R,J]of w)
784
- A.length>1&&A.push(","),A.push(R),(R!==J||this.opts.es5)&&(A.push(":"),(0,e.addCodeArg)(A,J));return A.push("}"),new e._Code(A)}if(w,A,R){if(this._blockNode(new g(w)),A&&R)this.code(A).else().code(R).endIf();else if(A)this.code(A).endIf();else if(R)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(w){return this._elseNode(new g(w))}else(){return this._elseNode(new f)}endIf(){return this._endBlockNode(g,f)}_for(w,A){return this._blockNode(w),A&&this.code(A).endFor(),this}for(w,A){
785
- return this._for(new m(w),A)}forRange(w,A,R,J,Z=this.opts.es5?r.varKinds.var:r.varKinds.let){const oe=this._scope.toName(w);return this._for(new D(Z,oe,A,R),()=>J(oe))}forOf(w,A,R,J=r.varKinds.const){const Z=this._scope.toName(w);if(this.opts.es5){const oe=A instanceof e.Name?A:this.var("_arr",A);return this.forRange("_i",0,(0,e._)`${oe}.length`,ae=>{this.var(Z,(0,e._)`${oe}[${ae}]`),R(Z)})}return this._for(new v("of",J,Z,A),()=>R(Z))}forIn(w,A,R,J=this.opts.es5?r.varKinds.var:r.varKinds.const){
786
- if(this.opts.ownProperties)return this.forOf(w,(0,e._)`Object.keys(${A})`,R);const Z=this._scope.toName(w);return this._for(new v("in",J,Z,A),()=>R(Z))}endFor(){return this._endBlockNode(p)}label(w){return this._leafNode(new l(w))}break(w){return this._leafNode(new c(w))}return(w){const A=new b;if(this._blockNode(A),this.code(w),A.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(b)}try(w,A,R){if(!A&&!R)throw new Error('CodeGen: "try" without "c\
787
- atch" and "finally"');const J=new I;if(this._blockNode(J),this.code(w),A){const Z=this.name("e");this._currNode=J.catch=new U(Z),A(Z)}return R&&(this._currNode=J.finally=new G,this.code(R)),this._endBlockNode(U,G)}throw(w){return this._leafNode(new d(w))}block(w,A){return this._blockStarts.push(this._nodes.length),w&&this.code(w).endBlock(A),this}endBlock(w){const A=this._blockStarts.pop();if(A===void 0)throw new Error("CodeGen: not in self-balancing block");const R=this._nodes.length-A;if(R<0||
788
- w!==void 0&&R!==w)throw new Error(`CodeGen: wrong number of nodes: ${R} vs ${w} expected`);return this._nodes.length=A,this}func(w,A=e.nil,R,J){return this._blockNode(new _(w,A,R)),J&&this.code(J).endFunc(),this}endFunc(){return this._endBlockNode(_)}optimize(w=1){for(;w-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(w){return this._currNode.nodes.push(w),this}_blockNode(w){this._currNode.nodes.push(w),this._nodes.push(w)}_endBlockNode(w,A){
789
- const R=this._currNode;if(R instanceof w||A&&R instanceof A)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${A?`${w.kind}/${A.kind}`:w.kind}"`)}_elseNode(w){const A=this._currNode;if(!(A instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=A.else=w,this}get _root(){return this._nodes[0]}get _currNode(){const w=this._nodes;return w[w.length-1]}set _currNode(w){const A=this._nodes;A[A.length-1]=w}}t.CodeGen=L;function B(k,w){for(const A in w)k[A]=
790
- (k[A]||0)+(w[A]||0);return k}function N(k,w){return w instanceof e._CodeOrName?B(k,w.names):k}function j(k,w,A){if(k instanceof e.Name)return R(k);if(!J(k))return k;return new e._Code(k._items.reduce((Z,oe)=>(oe instanceof e.Name&&(oe=R(oe)),oe instanceof e._Code?Z.push(...oe._items):Z.push(oe),Z),[]));function R(Z){const oe=A[Z.str];return oe===void 0||w[Z.str]!==1?Z:(delete w[Z.str],oe)}function J(Z){return Z instanceof e._Code&&Z._items.some(oe=>oe instanceof e.Name&&w[oe.str]===1&&A[oe.str]!==
791
- void 0)}}function M(k,w){for(const A in w)k[A]=(k[A]||0)-(w[A]||0)}function Y(k){return typeof k=="boolean"||typeof k=="number"||k===null?!k:(0,e._)`!${H(k)}`}t.not=Y;const z=C(t.operators.AND);function X(...k){return k.reduce(z)}t.and=X;const se=C(t.operators.OR);function q(...k){return k.reduce(se)}t.or=q;function C(k){return(w,A)=>w===e.nil?A:A===e.nil?w:(0,e._)`${H(w)} ${k} ${H(A)}`}function H(k){return k instanceof e.Name?k:(0,e._)`(${k})`}}(Do)),Do}var Ee={},Wc;function _e(){if(Wc)return Ee;
792
- Wc=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.checkStrictMode=Ee.getErrorPath=Ee.Type=Ee.useFunc=Ee.setEvaluated=Ee.evaluatedPropsToName=Ee.mergeEvaluated=Ee.eachItem=Ee.unescapeJsonPointer=Ee.escapeJsonPointer=Ee.escapeFragment=Ee.unescapeFragment=Ee.schemaRefOrVal=Ee.schemaHasRulesButRef=Ee.schemaHasRules=Ee.checkUnknownRules=Ee.alwaysValidSchema=Ee.toHash=void 0;const t=pe(),e=Ln();function r(v){const _={};for(const b of v)_[b]=!0;return _}Ee.toHash=r;function n(v,_){return typeof _==
793
- "boolean"?_:Object.keys(_).length===0?!0:(i(v,_),!s(_,v.self.RULES.all))}Ee.alwaysValidSchema=n;function i(v,_=v.schema){const{opts:b,self:I}=v;if(!b.strictSchema||typeof _=="boolean")return;const U=I.RULES.keywords;for(const G in _)U[G]||D(v,`unknown keyword: "${G}"`)}Ee.checkUnknownRules=i;function s(v,_){if(typeof v=="boolean")return!v;for(const b in v)if(_[b])return!0;return!1}Ee.schemaHasRules=s;function o(v,_){if(typeof v=="boolean")return!v;for(const b in v)if(b!=="$ref"&&_.all[b])return!0;
794
- return!1}Ee.schemaHasRulesButRef=o;function a({topSchemaRef:v,schemaPath:_},b,I,U){if(!U){if(typeof b=="number"||typeof b=="boolean")return b;if(typeof b=="string")return(0,t._)`${b}`}return(0,t._)`${v}${_}${(0,t.getProperty)(I)}`}Ee.schemaRefOrVal=a;function u(v){return d(decodeURIComponent(v))}Ee.unescapeFragment=u;function l(v){return encodeURIComponent(c(v))}Ee.escapeFragment=l;function c(v){return typeof v=="number"?`${v}`:v.replace(/~/g,"~0").replace(/\//g,"~1")}Ee.escapeJsonPointer=c;function d(v){
795
- return v.replace(/~1/g,"/").replace(/~0/g,"~")}Ee.unescapeJsonPointer=d;function h(v,_){if(Array.isArray(v))for(const b of v)_(b);else _(v)}Ee.eachItem=h;function E({mergeNames:v,mergeToName:_,mergeValues:b,resultToName:I}){return(U,G,L,B)=>{const N=L===void 0?G:L instanceof t.Name?(G instanceof t.Name?v(U,G,L):_(U,G,L),L):G instanceof t.Name?(_(U,L,G),G):b(G,L);return B===t.Name&&!(N instanceof t.Name)?I(U,N):N}}Ee.mergeEvaluated={props:E({mergeNames:(v,_,b)=>v.if((0,t._)`${b} !== true && ${_} !== undefined`,
796
- ()=>{v.if((0,t._)`${_} === true`,()=>v.assign(b,!0),()=>v.assign(b,(0,t._)`${b} || {}`).code((0,t._)`Object.assign(${b}, ${_})`))}),mergeToName:(v,_,b)=>v.if((0,t._)`${b} !== true`,()=>{_===!0?v.assign(b,!0):(v.assign(b,(0,t._)`${b} || {}`),y(v,b,_))}),mergeValues:(v,_)=>v===!0?!0:{...v,..._},resultToName:$}),items:E({mergeNames:(v,_,b)=>v.if((0,t._)`${b} !== true && ${_} !== undefined`,()=>v.assign(b,(0,t._)`${_} === true ? true : ${b} > ${_} ? ${b} : ${_}`)),mergeToName:(v,_,b)=>v.if((0,t._)`${b} !== true`,
797
- ()=>v.assign(b,_===!0?!0:(0,t._)`${b} > ${_} ? ${b} : ${_}`)),mergeValues:(v,_)=>v===!0?!0:Math.max(v,_),resultToName:(v,_)=>v.var("items",_)})};function $(v,_){if(_===!0)return v.var("props",!0);const b=v.var("props",(0,t._)`{}`);return _!==void 0&&y(v,b,_),b}Ee.evaluatedPropsToName=$;function y(v,_,b){Object.keys(b).forEach(I=>v.assign((0,t._)`${_}${(0,t.getProperty)(I)}`,!0))}Ee.setEvaluated=y;const f={};function g(v,_){return v.scopeValue("func",{ref:_,code:f[_.code]||(f[_.code]=new e._Code(
798
- _.code))})}Ee.useFunc=g;var p;(function(v){v[v.Num=0]="Num",v[v.Str=1]="Str"})(p||(Ee.Type=p={}));function m(v,_,b){if(v instanceof t.Name){const I=_===p.Num;return b?I?(0,t._)`"[" + ${v} + "]"`:(0,t._)`"['" + ${v} + "']"`:I?(0,t._)`"/" + ${v}`:(0,t._)`"/" + ${v}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return b?(0,t.getProperty)(v).toString():"/"+c(v)}Ee.getErrorPath=m;function D(v,_,b=v.opts.strictSchema){if(b){if(_=`strict mode: ${_}`,b===!0)throw new Error(_);v.self.logger.warn(_)}}return Ee.
799
- checkStrictMode=D,Ee}var jn={},Kc;function ct(){if(Kc)return jn;Kc=1,Object.defineProperty(jn,"__esModule",{value:!0});const t=pe(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.
800
- Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return jn.default=e,jn}var Yc;function kn(){return Yc||(Yc=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=pe(),r=_e(),n=ct();t.keywordError={message:({keyword:f})=>(0,e.str)`must pass "${f}" keyword validation`},t.keyword$DataError={message:({
801
- keyword:f,schemaType:g})=>g?(0,e.str)`"${f}" keyword must be ${g} ($data)`:(0,e.str)`"${f}" keyword is invalid ($data)`};function i(f,g=t.keywordError,p,m){const{it:D}=f,{gen:v,compositeRule:_,allErrors:b}=D,I=d(f,g,p);m??(_||b)?u(v,I):l(D,(0,e._)`[${I}]`)}t.reportError=i;function s(f,g=t.keywordError,p){const{it:m}=f,{gen:D,compositeRule:v,allErrors:_}=m,b=d(f,g,p);u(D,b),v||_||l(m,n.default.vErrors)}t.reportExtraError=s;function o(f,g){f.assign(n.default.errors,g),f.if((0,e._)`${n.default.vErrors} !== null`,
802
- ()=>f.if(g,()=>f.assign((0,e._)`${n.default.vErrors}.length`,g),()=>f.assign(n.default.vErrors,null)))}t.resetErrorsCount=o;function a({gen:f,keyword:g,schemaValue:p,data:m,errsCount:D,it:v}){if(D===void 0)throw new Error("ajv implementation error");const _=f.name("err");f.forRange("i",D,n.default.errors,b=>{f.const(_,(0,e._)`${n.default.vErrors}[${b}]`),f.if((0,e._)`${_}.instancePath === undefined`,()=>f.assign((0,e._)`${_}.instancePath`,(0,e.strConcat)(n.default.instancePath,v.errorPath))),f.assign(
803
- (0,e._)`${_}.schemaPath`,(0,e.str)`${v.errSchemaPath}/${g}`),v.opts.verbose&&(f.assign((0,e._)`${_}.schema`,p),f.assign((0,e._)`${_}.data`,m))})}t.extendErrors=a;function u(f,g){const p=f.const("err",g);f.if((0,e._)`${n.default.vErrors} === null`,()=>f.assign(n.default.vErrors,(0,e._)`[${p}]`),(0,e._)`${n.default.vErrors}.push(${p})`),f.code((0,e._)`${n.default.errors}++`)}function l(f,g){const{gen:p,validateName:m,schemaEnv:D}=f;D.$async?p.throw((0,e._)`new ${f.ValidationError}(${g})`):(p.assign(
804
- (0,e._)`${m}.errors`,g),p.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 d(f,g,p){const{createErrors:m}=f.it;return m===!1?(0,e._)`{}`:h(f,g,p)}function h(f,g,p={}){const{gen:m,it:D}=f,v=[E(D,p),$(f,p)];return y(f,g,v),m.object(...v)}function E({errorPath:f},{instancePath:g}){const p=g?
805
- (0,e.str)`${f}${(0,r.getErrorPath)(g,r.Type.Str)}`:f;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,p)]}function $({keyword:f,it:{errSchemaPath:g}},{schemaPath:p,parentSchema:m}){let D=m?g:(0,e.str)`${g}/${f}`;return p&&(D=(0,e.str)`${D}${(0,r.getErrorPath)(p,r.Type.Str)}`),[c.schemaPath,D]}function y(f,{params:g,message:p},m){const{keyword:D,data:v,schemaValue:_,it:b}=f,{opts:I,propertyName:U,topSchemaRef:G,schemaPath:L}=b;m.push([c.keyword,D],[c.params,typeof g=="function"?
806
- g(f):g||(0,e._)`{}`]),I.messages&&m.push([c.message,typeof p=="function"?p(f):p]),I.verbose&&m.push([c.schema,_],[c.parentSchema,(0,e._)`${G}${L}`],[n.default.data,v]),U&&m.push([c.propertyName,U])}}(Eo)),Eo}var Jc;function Dy(){if(Jc)return ur;Jc=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.boolOrEmptySchema=ur.topBoolOrEmptySchema=void 0;const t=kn(),e=pe(),r=ct(),n={message:"boolean schema is false"};function i(a){const{gen:u,schema:l,validateName:c}=a;l===!1?o(a,!1):typeof l=="obje\
807
- ct"&&l.$async===!0?u.return(r.default.data):(u.assign((0,e._)`${c}.errors`,null),u.return(!0))}ur.topBoolOrEmptySchema=i;function s(a,u){const{gen:l,schema:c}=a;c===!1?(l.var(u,!1),o(a)):l.var(u,!0)}ur.boolOrEmptySchema=s;function o(a,u){const{gen:l,data:c}=a,d={gen:l,keyword:"false schema",data:c,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,t.reportError)(d,n,void 0,u)}return ur}var xe={},cr={},Xc;function Qc(){if(Xc)return cr;Xc=1,Object.defineProperty(cr,"__esModule",{value:!0}),
808
- cr.getRules=cr.isJSONType=void 0;const t=["string","number","integer","boolean","null","object","array"],e=new Set(t);function r(i){return typeof i=="string"&&e.has(i)}cr.isJSONType=r;function n(){const i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}return cr.getRules=n,cr}var Ot={},
809
- Zc;function el(){if(Zc)return Ot;Zc=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.shouldUseRule=Ot.shouldUseGroup=Ot.schemaHasRulesForType=void 0;function t({schema:n,self:i},s){const o=i.RULES.types[s];return o&&o!==!0&&e(n,o)}Ot.schemaHasRulesForType=t;function e(n,i){return i.rules.some(s=>r(n,s))}Ot.shouldUseGroup=e;function r(n,i){var s;return n[i.keyword]!==void 0||((s=i.definition.implements)===null||s===void 0?void 0:s.some(o=>n[o]!==void 0))}return Ot.shouldUseRule=r,Ot}var tl;
810
- function Bn(){if(tl)return xe;tl=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.reportTypeError=xe.checkDataTypes=xe.checkDataType=xe.coerceAndCheckDataType=xe.getJSONTypes=xe.getSchemaTypes=xe.DataType=void 0;const t=Qc(),e=el(),r=kn(),n=pe(),i=_e();var s;(function(p){p[p.Correct=0]="Correct",p[p.Wrong=1]="Wrong"})(s||(xe.DataType=s={}));function o(p){const m=a(p.type);if(m.includes("null")){if(p.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!m.length&&
811
- p.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');p.nullable===!0&&m.push("null")}return m}xe.getSchemaTypes=o;function a(p){const m=Array.isArray(p)?p:p?[p]:[];if(m.every(t.isJSONType))return m;throw new Error("type must be JSONType or JSONType[]: "+m.join(","))}xe.getJSONTypes=a;function u(p,m){const{gen:D,data:v,opts:_}=p,b=c(m,_.coerceTypes),I=m.length>0&&!(b.length===0&&m.length===1&&(0,e.schemaHasRulesForType)(p,m[0]));if(I){const U=$(m,v,_.strictNumbers,s.Wrong);
812
- D.if(U,()=>{b.length?d(p,m,b):f(p)})}return I}xe.coerceAndCheckDataType=u;const l=new Set(["string","number","integer","boolean","null"]);function c(p,m){return m?p.filter(D=>l.has(D)||m==="array"&&D==="array"):[]}function d(p,m,D){const{gen:v,data:_,opts:b}=p,I=v.let("dataType",(0,n._)`typeof ${_}`),U=v.let("coerced",(0,n._)`undefined`);b.coerceTypes==="array"&&v.if((0,n._)`${I} == 'object' && Array.isArray(${_}) && ${_}.length == 1`,()=>v.assign(_,(0,n._)`${_}[0]`).assign(I,(0,n._)`typeof ${_}`).
813
- if($(m,_,b.strictNumbers),()=>v.assign(U,_))),v.if((0,n._)`${U} !== undefined`);for(const L of D)(l.has(L)||L==="array"&&b.coerceTypes==="array")&&G(L);v.else(),f(p),v.endIf(),v.if((0,n._)`${U} !== undefined`,()=>{v.assign(_,U),h(p,U)});function G(L){switch(L){case"string":v.elseIf((0,n._)`${I} == "number" || ${I} == "boolean"`).assign(U,(0,n._)`"" + ${_}`).elseIf((0,n._)`${_} === null`).assign(U,(0,n._)`""`);return;case"number":v.elseIf((0,n._)`${I} == "boolean" || ${_} === null
814
- || (${I} == "string" && ${_} && ${_} == +${_})`).assign(U,(0,n._)`+${_}`);return;case"integer":v.elseIf((0,n._)`${I} === "boolean" || ${_} === null
815
- || (${I} === "string" && ${_} && ${_} == +${_} && !(${_} % 1))`).assign(U,(0,n._)`+${_}`);return;case"boolean":v.elseIf((0,n._)`${_} === "false" || ${_} === 0 || ${_} === null`).assign(U,!1).elseIf((0,n._)`${_} === "true" || ${_} === 1`).assign(U,!0);return;case"null":v.elseIf((0,n._)`${_} === "" || ${_} === 0 || ${_} === false`),v.assign(U,null);return;case"array":v.elseIf((0,n._)`${I} === "string" || ${I} === "number"
816
- || ${I} === "boolean" || ${_} === null`).assign(U,(0,n._)`[${_}]`)}}}function h({gen:p,parentData:m,parentDataProperty:D},v){p.if((0,n._)`${m} !== undefined`,()=>p.assign((0,n._)`${m}[${D}]`,v))}function E(p,m,D,v=s.Correct){const _=v===s.Correct?n.operators.EQ:n.operators.NEQ;let b;switch(p){case"null":return(0,n._)`${m} ${_} null`;case"array":b=(0,n._)`Array.isArray(${m})`;break;case"object":b=(0,n._)`${m} && typeof ${m} == "object" && !Array.isArray(${m})`;break;case"integer":b=
817
- I((0,n._)`!(${m} % 1) && !isNaN(${m})`);break;case"number":b=I();break;default:return(0,n._)`typeof ${m} ${_} ${p}`}return v===s.Correct?b:(0,n.not)(b);function I(U=n.nil){return(0,n.and)((0,n._)`typeof ${m} == "number"`,U,D?(0,n._)`isFinite(${m})`:n.nil)}}xe.checkDataType=E;function $(p,m,D,v){if(p.length===1)return E(p[0],m,D,v);let _;const b=(0,i.toHash)(p);if(b.array&&b.object){const I=(0,n._)`typeof ${m} != "object"`;_=b.null?I:(0,n._)`!${m} || ${I}`,delete b.null,delete b.array,delete b.object}else
818
- _=n.nil;b.number&&delete b.integer;for(const I in b)_=(0,n.and)(_,E(I,m,D,v));return _}xe.checkDataTypes=$;const y={message:({schema:p})=>`must be ${p}`,params:({schema:p,schemaValue:m})=>typeof p=="string"?(0,n._)`{type: ${p}}`:(0,n._)`{type: ${m}}`};function f(p){const m=g(p);(0,r.reportError)(m,y)}xe.reportTypeError=f;function g(p){const{gen:m,data:D,schema:v}=p,_=(0,i.schemaRefOrVal)(p,v,"type");return{gen:m,keyword:"type",data:D,schema:v.type,schemaCode:_,schemaValue:_,parentSchema:v,params:{},
819
- it:p}}return xe}var Xr={},rl;function vy(){if(rl)return Xr;rl=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.assignDefaults=void 0;const t=pe(),e=_e();function r(i,s){const{properties:o,items:a}=i.schema;if(s==="object"&&o)for(const u in o)n(i,u,o[u].default);else s==="array"&&Array.isArray(a)&&a.forEach((u,l)=>n(i,l,u.default))}Xr.assignDefaults=r;function n(i,s,o){const{gen:a,compositeRule:u,data:l,opts:c}=i;if(o===void 0)return;const d=(0,t._)`${l}${(0,t.getProperty)(s)}`;if(u){(0,e.checkStrictMode)(
820
- i,`default is ignored for: ${d}`);return}let h=(0,t._)`${d} === undefined`;c.useDefaults==="empty"&&(h=(0,t._)`${h} || ${d} === null || ${d} === ""`),a.if(h,(0,t._)`${d} = ${(0,t.stringify)(o)}`)}return Xr}var lt={},Ae={},nl;function ft(){if(nl)return Ae;nl=1,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.validateUnion=Ae.validateArray=Ae.usePattern=Ae.callValidateCode=Ae.schemaProperties=Ae.allSchemaProperties=Ae.noPropertyInData=Ae.propertyInData=Ae.isOwnProperty=Ae.hasPropFunc=Ae.reportMissingProp=
821
- Ae.checkMissingProp=Ae.checkReportMissingProp=void 0;const t=pe(),e=_e(),r=ct(),n=_e();function i(p,m){const{gen:D,data:v,it:_}=p;D.if(c(D,v,m,_.opts.ownProperties),()=>{p.setParams({missingProperty:(0,t._)`${m}`},!0),p.error()})}Ae.checkReportMissingProp=i;function s({gen:p,data:m,it:{opts:D}},v,_){return(0,t.or)(...v.map(b=>(0,t.and)(c(p,m,b,D.ownProperties),(0,t._)`${_} = ${b}`)))}Ae.checkMissingProp=s;function o(p,m){p.setParams({missingProperty:m},!0),p.error()}Ae.reportMissingProp=o;function a(p){
822
- return p.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}Ae.hasPropFunc=a;function u(p,m,D){return(0,t._)`${a(p)}.call(${m}, ${D})`}Ae.isOwnProperty=u;function l(p,m,D,v){const _=(0,t._)`${m}${(0,t.getProperty)(D)} !== undefined`;return v?(0,t._)`${_} && ${u(p,m,D)}`:_}Ae.propertyInData=l;function c(p,m,D,v){const _=(0,t._)`${m}${(0,t.getProperty)(D)} === undefined`;return v?(0,t.or)(_,(0,t.not)(u(p,m,D))):_}Ae.noPropertyInData=c;function d(p){
823
- return p?Object.keys(p).filter(m=>m!=="__proto__"):[]}Ae.allSchemaProperties=d;function h(p,m){return d(m).filter(D=>!(0,e.alwaysValidSchema)(p,m[D]))}Ae.schemaProperties=h;function E({schemaCode:p,data:m,it:{gen:D,topSchemaRef:v,schemaPath:_,errorPath:b},it:I},U,G,L){const B=L?(0,t._)`${p}, ${m}, ${v}${_}`:m,N=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,b)],[r.default.parentData,I.parentData],[r.default.parentDataProperty,I.parentDataProperty],[r.default.rootData,r.default.rootData]];
824
- I.opts.dynamicRef&&N.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const j=(0,t._)`${B}, ${D.object(...N)}`;return G!==t.nil?(0,t._)`${U}.call(${G}, ${j})`:(0,t._)`${U}(${j})`}Ae.callValidateCode=E;const $=(0,t._)`new RegExp`;function y({gen:p,it:{opts:m}},D){const v=m.unicodeRegExp?"u":"",{regExp:_}=m.code,b=_(D,v);return p.scopeValue("pattern",{key:b.toString(),ref:b,code:(0,t._)`${_.code==="new RegExp"?$:(0,n.useFunc)(p,_)}(${D}, ${v})`})}Ae.usePattern=y;function f(p){const{gen:m,
825
- data:D,keyword:v,it:_}=p,b=m.name("valid");if(_.allErrors){const U=m.let("valid",!0);return I(()=>m.assign(U,!1)),U}return m.var(b,!0),I(()=>m.break()),b;function I(U){const G=m.const("len",(0,t._)`${D}.length`);m.forRange("i",0,G,L=>{p.subschema({keyword:v,dataProp:L,dataPropType:e.Type.Num},b),m.if((0,t.not)(b),U)})}}Ae.validateArray=f;function g(p){const{gen:m,schema:D,keyword:v,it:_}=p;if(!Array.isArray(D))throw new Error("ajv implementation error");if(D.some(G=>(0,e.alwaysValidSchema)(_,G))&&
826
- !_.opts.unevaluated)return;const I=m.let("valid",!1),U=m.name("_valid");m.block(()=>D.forEach((G,L)=>{const B=p.subschema({keyword:v,schemaProp:L,compositeRule:!0},U);m.assign(I,(0,t._)`${I} || ${U}`),p.mergeValidEvaluated(B,U)||m.if((0,t.not)(I))})),p.result(I,()=>p.reset(),()=>p.error(!0))}return Ae.validateUnion=g,Ae}var il;function $y(){if(il)return lt;il=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.validateKeywordUsage=lt.validSchemaType=lt.funcKeywordCode=lt.macroKeywordCode=void 0;
827
- const t=pe(),e=ct(),r=ft(),n=kn();function i(h,E){const{gen:$,keyword:y,schema:f,parentSchema:g,it:p}=h,m=E.macro.call(p.self,f,g,p),D=l($,y,m);p.opts.validateSchema!==!1&&p.self.validateSchema(m,!0);const v=$.name("valid");h.subschema({schema:m,schemaPath:t.nil,errSchemaPath:`${p.errSchemaPath}/${y}`,topSchemaRef:D,compositeRule:!0},v),h.pass(v,()=>h.error(!0))}lt.macroKeywordCode=i;function s(h,E){var $;const{gen:y,keyword:f,schema:g,parentSchema:p,$data:m,it:D}=h;u(D,E);const v=!m&&E.compile?
828
- E.compile.call(D.self,g,p,D):E.validate,_=l(y,f,v),b=y.let("valid");h.block$data(b,I),h.ok(($=E.valid)!==null&&$!==void 0?$:b);function I(){if(E.errors===!1)L(),E.modifying&&o(h),B(()=>h.error());else{const N=E.async?U():G();E.modifying&&o(h),B(()=>a(h,N))}}function U(){const N=y.let("ruleErrs",null);return y.try(()=>L((0,t._)`await `),j=>y.assign(b,!1).if((0,t._)`${j} instanceof ${D.ValidationError}`,()=>y.assign(N,(0,t._)`${j}.errors`),()=>y.throw(j))),N}function G(){const N=(0,t._)`${_}.errors`;
829
- return y.assign(N,null),L(t.nil),N}function L(N=E.async?(0,t._)`await `:t.nil){const j=D.opts.passContext?e.default.this:e.default.self,M=!("compile"in E&&!m||E.schema===!1);y.assign(b,(0,t._)`${N}${(0,r.callValidateCode)(h,_,j,M)}`,E.modifying)}function B(N){var j;y.if((0,t.not)((j=E.valid)!==null&&j!==void 0?j:b),N)}}lt.funcKeywordCode=s;function o(h){const{gen:E,data:$,it:y}=h;E.if(y.parentData,()=>E.assign($,(0,t._)`${y.parentData}[${y.parentDataProperty}]`))}function a(h,E){const{gen:$}=h;$.
830
- if((0,t._)`Array.isArray(${E})`,()=>{$.assign(e.default.vErrors,(0,t._)`${e.default.vErrors} === null ? ${E} : ${e.default.vErrors}.concat(${E})`).assign(e.default.errors,(0,t._)`${e.default.vErrors}.length`),(0,n.extendErrors)(h)},()=>h.error())}function u({schemaEnv:h},E){if(E.async&&!h.$async)throw new Error("async keyword in sync schema")}function l(h,E,$){if($===void 0)throw new Error(`keyword "${E}" failed to compile`);return h.scopeValue("keyword",typeof $=="function"?{ref:$}:{ref:$,code:(0,t.
831
- stringify)($)})}function c(h,E,$=!1){return!E.length||E.some(y=>y==="array"?Array.isArray(h):y==="object"?h&&typeof h=="object"&&!Array.isArray(h):typeof h==y||$&&typeof h>"u")}lt.validSchemaType=c;function d({schema:h,opts:E,self:$,errSchemaPath:y},f,g){if(Array.isArray(f.keyword)?!f.keyword.includes(g):f.keyword!==g)throw new Error("ajv implementation error");const p=f.dependencies;if(p?.some(m=>!Object.prototype.hasOwnProperty.call(h,m)))throw new Error(`parent schema must have dependencies o\
832
- f ${g}: ${p.join(",")}`);if(f.validateSchema&&!f.validateSchema(h[g])){const D=`keyword "${g}" value is invalid at path "${y}": `+$.errorsText(f.validateSchema.errors);if(E.validateSchema==="log")$.logger.error(D);else throw new Error(D)}}return lt.validateKeywordUsage=d,lt}var It={},sl;function _y(){if(sl)return It;sl=1,Object.defineProperty(It,"__esModule",{value:!0}),It.extendSubschemaMode=It.extendSubschemaData=It.getSubschema=void 0;const t=pe(),e=_e();function r(s,{keyword:o,schemaProp:a,schema:u,
833
- schemaPath:l,errSchemaPath:c,topSchemaRef:d}){if(o!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(o!==void 0){const h=s.schema[o];return a===void 0?{schema:h,schemaPath:(0,t._)`${s.schemaPath}${(0,t.getProperty)(o)}`,errSchemaPath:`${s.errSchemaPath}/${o}`}:{schema:h[a],schemaPath:(0,t._)`${s.schemaPath}${(0,t.getProperty)(o)}${(0,t.getProperty)(a)}`,errSchemaPath:`${s.errSchemaPath}/${o}/${(0,e.escapeFragment)(a)}`}}if(u!==void 0){if(l===void 0||
834
- c===void 0||d===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:l,topSchemaRef:d,errSchemaPath:c}}throw new Error('either "keyword" or "schema" must be passed')}It.getSubschema=r;function n(s,o,{dataProp:a,dataPropType:u,data:l,dataTypes:c,propertyName:d}){if(l!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:h}=o;if(a!==void 0){const{errorPath:$,dataPathArr:y,opts:f}=o,
835
- g=h.let("data",(0,t._)`${o.data}${(0,t.getProperty)(a)}`,!0);E(g),s.errorPath=(0,t.str)`${$}${(0,e.getErrorPath)(a,u,f.jsPropertySyntax)}`,s.parentDataProperty=(0,t._)`${a}`,s.dataPathArr=[...y,s.parentDataProperty]}if(l!==void 0){const $=l instanceof t.Name?l:h.let("data",l,!0);E($),d!==void 0&&(s.propertyName=d)}c&&(s.dataTypes=c);function E($){s.data=$,s.dataLevel=o.dataLevel+1,s.dataTypes=[],o.definedProperties=new Set,s.parentData=o.data,s.dataNames=[...o.dataNames,$]}}It.extendSubschemaData=
836
- n;function i(s,{jtdDiscriminator:o,jtdMetadata:a,compositeRule:u,createErrors:l,allErrors:c}){u!==void 0&&(s.compositeRule=u),l!==void 0&&(s.createErrors=l),c!==void 0&&(s.allErrors=c),s.jtdDiscriminator=o,s.jtdMetadata=a}return It.extendSubschemaMode=i,It}var Ve={},_o,ol;function al(){return ol||(ol=1,_o=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,i,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=
837
- n;i--!==0;)if(!t(e[i],r[i]))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(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var o=s[i];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r}),_o}var wo={
838
- exports:{}},ul;function wy(){if(ul)return wo.exports;ul=1;var t=wo.exports=function(n,i,s){typeof i=="function"&&(s=i,i={}),s=i.cb||s;var o=typeof s=="function"?s:s.pre||function(){},a=s.post||function(){};e(i,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=
839
- {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,i,s,o,a,u,l,c,d,h){if(o&&typeof o=="object"&&!Array.isArray(o)){i(o,a,u,l,c,d,h);for(var E in o){var $=o[E];if(Array.isArray($)){if(E in t.arrayKeywords)for(var y=0;y<$.length;y++)e(n,i,s,$[y],a+"/"+E+"/"+y,u,a,E,o,y)}else if(E in t.propsKeywords){if($&&
840
- typeof $=="object")for(var f in $)e(n,i,s,$[f],a+"/"+E+"/"+r(f),u,a,E,o,f)}else(E in t.keywords||n.allKeys&&!(E in t.skipKeywords))&&e(n,i,s,$,a+"/"+E,u,a,E,o)}s(o,a,u,l,c,d,h)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return wo.exports}var cl;function xn(){if(cl)return Ve;cl=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.getSchemaRefs=Ve.resolveUrl=Ve.normalizeId=Ve._getFullPath=Ve.getFullPath=Ve.inlineRef=void 0;const t=_e(),e=al(),r=wy(),n=new Set(["type","format",
841
- "pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(y,f=!0){return typeof y=="boolean"?!0:f===!0?!o(y):f?a(y)<=f:!1}Ve.inlineRef=i;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o(y){for(const f in y){if(s.has(f))return!0;const g=y[f];if(Array.isArray(g)&&g.some(o)||typeof g=="object"&&o(g))return!0}return!1}function a(y){
842
- let f=0;for(const g in y){if(g==="$ref")return 1/0;if(f++,!n.has(g)&&(typeof y[g]=="object"&&(0,t.eachItem)(y[g],p=>f+=a(p)),f===1/0))return 1/0}return f}function u(y,f="",g){g!==!1&&(f=d(f));const p=y.parse(f);return l(y,p)}Ve.getFullPath=u;function l(y,f){return y.serialize(f).split("#")[0]+"#"}Ve._getFullPath=l;const c=/#\/?$/;function d(y){return y?y.replace(c,""):""}Ve.normalizeId=d;function h(y,f,g){return g=d(g),y.resolve(f,g)}Ve.resolveUrl=h;const E=/^[a-z_][-a-z0-9._]*$/i;function $(y,f){
843
- if(typeof y=="boolean")return{};const{schemaId:g,uriResolver:p}=this.opts,m=d(y[g]||f),D={"":m},v=u(p,m,!1),_={},b=new Set;return r(y,{allKeys:!0},(G,L,B,N)=>{if(N===void 0)return;const j=v+L;let M=D[N];typeof G[g]=="string"&&(M=Y.call(this,G[g])),z.call(this,G.$anchor),z.call(this,G.$dynamicAnchor),D[L]=M;function Y(X){const se=this.opts.uriResolver.resolve;if(X=d(M?se(M,X):X),b.has(X))throw U(X);b.add(X);let q=this.refs[X];return typeof q=="string"&&(q=this.refs[q]),typeof q=="object"?I(G,q.schema,
844
- X):X!==d(j)&&(X[0]==="#"?(I(G,_[X],X),_[X]=G):this.refs[X]=j),X}function z(X){if(typeof X=="string"){if(!E.test(X))throw new Error(`invalid anchor "${X}"`);Y.call(this,`#${X}`)}}}),_;function I(G,L,B){if(L!==void 0&&!e(G,L))throw U(B)}function U(G){return new Error(`reference "${G}" resolves to more than one schema`)}}return Ve.getSchemaRefs=$,Ve}var ll;function Qr(){if(ll)return Rt;ll=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.getData=Rt.KeywordCxt=Rt.validateFunctionCode=void 0;const t=Dy(),
845
- e=Bn(),r=el(),n=Bn(),i=vy(),s=$y(),o=_y(),a=pe(),u=ct(),l=xn(),c=_e(),d=kn();function h(T){if(v(T)&&(b(T),D(T))){f(T);return}E(T,()=>(0,t.topBoolOrEmptySchema)(T))}Rt.validateFunctionCode=h;function E({gen:T,validateName:x,schema:Q,schemaEnv:ie,opts:O},P){O.code.es5?T.func(x,(0,a._)`${u.default.data}, ${u.default.valCxt}`,ie.$async,()=>{T.code((0,a._)`"use strict"; ${p(Q,O)}`),y(T,O),T.code(P)}):T.func(x,(0,a._)`${u.default.data}, ${$(O)}`,ie.$async,()=>T.code(p(Q,O)).code(P))}function $(T){return(0,a.
846
- _)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${T.dynamicRef?(0,a._)`, ${u.default.dynamicAnchors}={}`:a.nil}}={}`}function y(T,x){T.if(u.default.valCxt,()=>{T.var(u.default.instancePath,(0,a._)`${u.default.valCxt}.${u.default.instancePath}`),T.var(u.default.parentData,(0,a._)`${u.default.valCxt}.${u.default.parentData}`),T.var(u.default.parentDataProperty,(0,a._)`${u.default.valCxt}.${u.default.parentDataProperty}`),
847
- T.var(u.default.rootData,(0,a._)`${u.default.valCxt}.${u.default.rootData}`),x.dynamicRef&&T.var(u.default.dynamicAnchors,(0,a._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{T.var(u.default.instancePath,(0,a._)`""`),T.var(u.default.parentData,(0,a._)`undefined`),T.var(u.default.parentDataProperty,(0,a._)`undefined`),T.var(u.default.rootData,u.default.data),x.dynamicRef&&T.var(u.default.dynamicAnchors,(0,a._)`{}`)})}function f(T){const{schema:x,opts:Q,gen:ie}=T;E(T,()=>{Q.$comment&&x.
848
- $comment&&N(T),G(T),ie.let(u.default.vErrors,null),ie.let(u.default.errors,0),Q.unevaluated&&g(T),I(T),j(T)})}function g(T){const{gen:x,validateName:Q}=T;T.evaluated=x.const("evaluated",(0,a._)`${Q}.evaluated`),x.if((0,a._)`${T.evaluated}.dynamicProps`,()=>x.assign((0,a._)`${T.evaluated}.props`,(0,a._)`undefined`)),x.if((0,a._)`${T.evaluated}.dynamicItems`,()=>x.assign((0,a._)`${T.evaluated}.items`,(0,a._)`undefined`))}function p(T,x){const Q=typeof T=="object"&&T[x.schemaId];return Q&&(x.code.source||
849
- x.code.process)?(0,a._)`/*# sourceURL=${Q} */`:a.nil}function m(T,x){if(v(T)&&(b(T),D(T))){_(T,x);return}(0,t.boolOrEmptySchema)(T,x)}function D({schema:T,self:x}){if(typeof T=="boolean")return!T;for(const Q in T)if(x.RULES.all[Q])return!0;return!1}function v(T){return typeof T.schema!="boolean"}function _(T,x){const{schema:Q,gen:ie,opts:O}=T;O.$comment&&Q.$comment&&N(T),L(T),B(T);const P=ie.const("_errs",u.default.errors);I(T,P),ie.var(x,(0,a._)`${P} === ${u.default.errors}`)}function b(T){(0,c.
850
- checkUnknownRules)(T),U(T)}function I(T,x){if(T.opts.jtd)return Y(T,[],!1,x);const Q=(0,e.getSchemaTypes)(T.schema),ie=(0,e.coerceAndCheckDataType)(T,Q);Y(T,Q,!ie,x)}function U(T){const{schema:x,errSchemaPath:Q,opts:ie,self:O}=T;x.$ref&&ie.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(x,O.RULES)&&O.logger.warn(`$ref: keywords ignored in schema at path "${Q}"`)}function G(T){const{schema:x,opts:Q}=T;x.default!==void 0&&Q.useDefaults&&Q.strictSchema&&(0,c.checkStrictMode)(T,"default is ignored\
851
- in the schema root")}function L(T){const x=T.schema[T.opts.schemaId];x&&(T.baseId=(0,l.resolveUrl)(T.opts.uriResolver,T.baseId,x))}function B(T){if(T.schema.$async&&!T.schemaEnv.$async)throw new Error("async schema in sync schema")}function N({gen:T,schemaEnv:x,schema:Q,errSchemaPath:ie,opts:O}){const P=Q.$comment;if(O.$comment===!0)T.code((0,a._)`${u.default.self}.logger.log(${P})`);else if(typeof O.$comment=="function"){const ee=(0,a.str)`${ie}/$comment`,W=T.scopeValue("root",{ref:x.root});T.
852
- code((0,a._)`${u.default.self}.opts.$comment(${P}, ${ee}, ${W}.schema)`)}}function j(T){const{gen:x,schemaEnv:Q,validateName:ie,ValidationError:O,opts:P}=T;Q.$async?x.if((0,a._)`${u.default.errors} === 0`,()=>x.return(u.default.data),()=>x.throw((0,a._)`new ${O}(${u.default.vErrors})`)):(x.assign((0,a._)`${ie}.errors`,u.default.vErrors),P.unevaluated&&M(T),x.return((0,a._)`${u.default.errors} === 0`))}function M({gen:T,evaluated:x,props:Q,items:ie}){Q instanceof a.Name&&T.assign((0,a._)`${x}.props`,
853
- Q),ie instanceof a.Name&&T.assign((0,a._)`${x}.items`,ie)}function Y(T,x,Q,ie){const{gen:O,schema:P,data:ee,allErrors:W,opts:F,self:re}=T,{RULES:V}=re;if(P.$ref&&(F.ignoreKeywordsWithRef||!(0,c.schemaHasRulesButRef)(P,V))){O.block(()=>J(T,"$ref",V.all.$ref.definition));return}F.jtd||X(T,x),O.block(()=>{for(const fe of V.rules)ne(fe);ne(V.post)});function ne(fe){(0,r.shouldUseGroup)(P,fe)&&(fe.type?(O.if((0,n.checkDataType)(fe.type,ee,F.strictNumbers)),z(T,fe),x.length===1&&x[0]===fe.type&&Q&&(O.
854
- else(),(0,n.reportTypeError)(T)),O.endIf()):z(T,fe),W||O.if((0,a._)`${u.default.errors} === ${ie||0}`))}}function z(T,x){const{gen:Q,schema:ie,opts:{useDefaults:O}}=T;O&&(0,i.assignDefaults)(T,x.type),Q.block(()=>{for(const P of x.rules)(0,r.shouldUseRule)(ie,P)&&J(T,P.keyword,P.definition,x.type)})}function X(T,x){T.schemaEnv.meta||!T.opts.strictTypes||(se(T,x),T.opts.allowUnionTypes||q(T,x),C(T,T.dataTypes))}function se(T,x){if(x.length){if(!T.dataTypes.length){T.dataTypes=x;return}x.forEach(Q=>{
855
- k(T.dataTypes,Q)||A(T,`type "${Q}" not allowed by context "${T.dataTypes.join(",")}"`)}),w(T,x)}}function q(T,x){x.length>1&&!(x.length===2&&x.includes("null"))&&A(T,"use allowUnionTypes to allow union type keyword")}function C(T,x){const Q=T.self.RULES.all;for(const ie in Q){const O=Q[ie];if(typeof O=="object"&&(0,r.shouldUseRule)(T.schema,O)){const{type:P}=O.definition;P.length&&!P.some(ee=>H(x,ee))&&A(T,`missing type "${P.join(",")}" for keyword "${ie}"`)}}}function H(T,x){return T.includes(x)||
856
- x==="number"&&T.includes("integer")}function k(T,x){return T.includes(x)||x==="integer"&&T.includes("number")}function w(T,x){const Q=[];for(const ie of T.dataTypes)k(x,ie)?Q.push(ie):x.includes("integer")&&ie==="number"&&Q.push("integer");T.dataTypes=Q}function A(T,x){const Q=T.schemaEnv.baseId+T.errSchemaPath;x+=` at "${Q}" (strictTypes)`,(0,c.checkStrictMode)(T,x,T.opts.strictTypes)}class R{constructor(x,Q,ie){if((0,s.validateKeywordUsage)(x,Q,ie),this.gen=x.gen,this.allErrors=x.allErrors,this.
857
- keyword=ie,this.data=x.data,this.schema=x.schema[ie],this.$data=Q.$data&&x.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c.schemaRefOrVal)(x,this.schema,ie,this.$data),this.schemaType=Q.schemaType,this.parentSchema=x.schema,this.params={},this.it=x,this.def=Q,this.$data)this.schemaCode=x.gen.const("vSchema",ae(this.$data,x));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,Q.schemaType,Q.allowUndefined))throw new Error(`${ie} value must be ${JSON.stringify(
858
- Q.schemaType)}`);("code"in Q?Q.trackErrors:Q.errors!==!1)&&(this.errsCount=x.gen.const("_errs",u.default.errors))}result(x,Q,ie){this.failResult((0,a.not)(x),Q,ie)}failResult(x,Q,ie){this.gen.if(x),ie?ie():this.error(),Q?(this.gen.else(),Q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(x,Q){this.failResult((0,a.not)(x),void 0,Q)}fail(x){if(x===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(x),this.error(),this.allErrors?this.gen.
859
- endIf():this.gen.else()}fail$data(x){if(!this.$data)return this.fail(x);const{schemaCode:Q}=this;this.fail((0,a._)`${Q} !== undefined && (${(0,a.or)(this.invalid$data(),x)})`)}error(x,Q,ie){if(Q){this.setParams(Q),this._error(x,ie),this.setParams({});return}this._error(x,ie)}_error(x,Q){(x?d.reportExtraError:d.reportError)(this,this.def.error,Q)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to k\
860
- eyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(x){this.allErrors||this.gen.if(x)}setParams(x,Q){Q?Object.assign(this.params,x):this.params=x}block$data(x,Q,ie=a.nil){this.gen.block(()=>{this.check$data(x,ie),Q()})}check$data(x=a.nil,Q=a.nil){if(!this.$data)return;const{gen:ie,schemaCode:O,schemaType:P,def:ee}=this;ie.if((0,a.or)((0,a._)`${O} === undefined`,Q)),x!==a.nil&&ie.assign(x,!0),(P.length||ee.validateSchema)&&(ie.elseIf(this.invalid$data()),this.$dataError(),x!==a.
861
- nil&&ie.assign(x,!1)),ie.else()}invalid$data(){const{gen:x,schemaCode:Q,schemaType:ie,def:O,it:P}=this;return(0,a.or)(ee(),W());function ee(){if(ie.length){if(!(Q instanceof a.Name))throw new Error("ajv implementation error");const F=Array.isArray(ie)?ie:[ie];return(0,a._)`${(0,n.checkDataTypes)(F,Q,P.opts.strictNumbers,n.DataType.Wrong)}`}return a.nil}function W(){if(O.validateSchema){const F=x.scopeValue("validate$data",{ref:O.validateSchema});return(0,a._)`!${F}(${Q})`}return a.nil}}subschema(x,Q){
862
- const ie=(0,o.getSubschema)(this.it,x);(0,o.extendSubschemaData)(ie,this.it,x),(0,o.extendSubschemaMode)(ie,x);const O={...this.it,...ie,items:void 0,props:void 0};return m(O,Q),O}mergeEvaluated(x,Q){const{it:ie,gen:O}=this;ie.opts.unevaluated&&(ie.props!==!0&&x.props!==void 0&&(ie.props=c.mergeEvaluated.props(O,x.props,ie.props,Q)),ie.items!==!0&&x.items!==void 0&&(ie.items=c.mergeEvaluated.items(O,x.items,ie.items,Q)))}mergeValidEvaluated(x,Q){const{it:ie,gen:O}=this;if(ie.opts.unevaluated&&(ie.
863
- props!==!0||ie.items!==!0))return O.if(Q,()=>this.mergeEvaluated(x,a.Name)),!0}}Rt.KeywordCxt=R;function J(T,x,Q,ie){const O=new R(T,Q,x);"code"in Q?Q.code(O,ie):O.$data&&Q.validate?(0,s.funcKeywordCode)(O,Q):"macro"in Q?(0,s.macroKeywordCode)(O,Q):(Q.compile||Q.validate)&&(0,s.funcKeywordCode)(O,Q)}const Z=/^\/(?:[^~]|~0|~1)*$/,oe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ae(T,{dataLevel:x,dataNames:Q,dataPathArr:ie}){let O,P;if(T==="")return u.default.rootData;if(T[0]==="/"){if(!Z.test(T))throw new Error(
864
- `Invalid JSON-pointer: ${T}`);O=T,P=u.default.rootData}else{const re=oe.exec(T);if(!re)throw new Error(`Invalid JSON-pointer: ${T}`);const V=+re[1];if(O=re[2],O==="#"){if(V>=x)throw new Error(F("property/index",V));return ie[x-V]}if(V>x)throw new Error(F("data",V));if(P=Q[x-V],!O)return P}let ee=P;const W=O.split("/");for(const re of W)re&&(P=(0,a._)`${P}${(0,a.getProperty)((0,c.unescapeJsonPointer)(re))}`,ee=(0,a._)`${ee} && ${P}`);return ee;function F(re,V){return`Cannot access ${re} ${V} leve\
865
- ls up, current level is ${x}`}}return Rt.getData=ae,Rt}var Mn={},fl;function qn(){if(fl)return Mn;fl=1,Object.defineProperty(Mn,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Mn.default=t,Mn}var Un={},dl;function Zr(){if(dl)return Un;dl=1,Object.defineProperty(Un,"__esModule",{value:!0});const t=xn();class e extends Error{constructor(n,i,s,o){super(o||`can't resolve reference ${s} from id ${i}`),this.missingRef=
866
- (0,t.resolveUrl)(n,i,s),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(n,this.missingRef))}}return Un.default=e,Un}var Xe={},hl;function Hn(){if(hl)return Xe;hl=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.resolveSchema=Xe.getCompilingSchema=Xe.resolveRef=Xe.compileSchema=Xe.SchemaEnv=void 0;const t=pe(),e=qn(),r=ct(),n=xn(),i=_e(),s=Qr();class o{constructor(g){var p;this.refs={},this.dynamicAnchors={};let m;typeof g.schema=="object"&&(m=g.schema),this.schema=g.schema,this.schemaId=
867
- g.schemaId,this.root=g.root||this,this.baseId=(p=g.baseId)!==null&&p!==void 0?p:(0,n.normalizeId)(m?.[g.schemaId||"$id"]),this.schemaPath=g.schemaPath,this.localRefs=g.localRefs,this.meta=g.meta,this.$async=m?.$async,this.refs={}}}Xe.SchemaEnv=o;function a(f){const g=c.call(this,f);if(g)return g;const p=(0,n.getFullPath)(this.opts.uriResolver,f.root.baseId),{es5:m,lines:D}=this.opts.code,{ownProperties:v}=this.opts,_=new t.CodeGen(this.scope,{es5:m,lines:D,ownProperties:v});let b;f.$async&&(b=_.
868
- scopeValue("Error",{ref:e.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));const I=_.scopeName("validate");f.validateName=I;const U={gen:_,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:_.scopeValue("schema",this.opts.code.source===!0?{ref:f.schema,code:(0,t.stringify)(f.schema)}:
869
- {ref:f.schema}),validateName:I,ValidationError:b,schema:f.schema,schemaEnv:f,rootId:p,baseId:f.baseId||p,schemaPath:t.nil,errSchemaPath:f.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};let G;try{this._compilations.add(f),(0,s.validateFunctionCode)(U),_.optimize(this.opts.code.optimize);const L=_.toString();G=`${_.scopeRefs(r.default.scope)}return ${L}`,this.opts.code.process&&(G=this.opts.code.process(G,f));const N=new Function(`${r.default.self}`,`${r.default.
870
- scope}`,G)(this,this.scope.get());if(this.scope.value(I,{ref:N}),N.errors=null,N.schema=f.schema,N.schemaEnv=f,f.$async&&(N.$async=!0),this.opts.code.source===!0&&(N.source={validateName:I,validateCode:L,scopeValues:_._values}),this.opts.unevaluated){const{props:j,items:M}=U;N.evaluated={props:j instanceof t.Name?void 0:j,items:M instanceof t.Name?void 0:M,dynamicProps:j instanceof t.Name,dynamicItems:M instanceof t.Name},N.source&&(N.source.evaluated=(0,t.stringify)(N.evaluated))}return f.validate=
871
- N,f}catch(L){throw delete f.validate,delete f.validateName,G&&this.logger.error("Error compiling schema, function code:",G),L}finally{this._compilations.delete(f)}}Xe.compileSchema=a;function u(f,g,p){var m;p=(0,n.resolveUrl)(this.opts.uriResolver,g,p);const D=f.refs[p];if(D)return D;let v=h.call(this,f,p);if(v===void 0){const _=(m=f.localRefs)===null||m===void 0?void 0:m[p],{schemaId:b}=this.opts;_&&(v=new o({schema:_,schemaId:b,root:f,baseId:g}))}if(v!==void 0)return f.refs[p]=l.call(this,v)}Xe.
872
- resolveRef=u;function l(f){return(0,n.inlineRef)(f.schema,this.opts.inlineRefs)?f.schema:f.validate?f:a.call(this,f)}function c(f){for(const g of this._compilations)if(d(g,f))return g}Xe.getCompilingSchema=c;function d(f,g){return f.schema===g.schema&&f.root===g.root&&f.baseId===g.baseId}function h(f,g){let p;for(;typeof(p=this.refs[g])=="string";)g=p;return p||this.schemas[g]||E.call(this,f,g)}function E(f,g){const p=this.opts.uriResolver.parse(g),m=(0,n._getFullPath)(this.opts.uriResolver,p);let D=(0,n.
873
- getFullPath)(this.opts.uriResolver,f.baseId,void 0);if(Object.keys(f.schema).length>0&&m===D)return y.call(this,p,f);const v=(0,n.normalizeId)(m),_=this.refs[v]||this.schemas[v];if(typeof _=="string"){const b=E.call(this,f,_);return typeof b?.schema!="object"?void 0:y.call(this,p,b)}if(typeof _?.schema=="object"){if(_.validate||a.call(this,_),v===(0,n.normalizeId)(g)){const{schema:b}=_,{schemaId:I}=this.opts,U=b[I];return U&&(D=(0,n.resolveUrl)(this.opts.uriResolver,D,U)),new o({schema:b,schemaId:I,
874
- root:f,baseId:D})}return y.call(this,p,_)}}Xe.resolveSchema=E;const $=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(f,{baseId:g,schema:p,root:m}){var D;if(((D=f.fragment)===null||D===void 0?void 0:D[0])!=="/")return;for(const b of f.fragment.slice(1).split("/")){if(typeof p=="boolean")return;const I=p[(0,i.unescapeFragment)(b)];if(I===void 0)return;p=I;const U=typeof p=="object"&&p[this.opts.schemaId];!$.has(b)&&U&&(g=(0,n.resolveUrl)(this.opts.uriResolver,
875
- g,U))}let v;if(typeof p!="boolean"&&p.$ref&&!(0,i.schemaHasRulesButRef)(p,this.RULES)){const b=(0,n.resolveUrl)(this.opts.uriResolver,g,p.$ref);v=E.call(this,m,b)}const{schemaId:_}=this.opts;if(v=v||new o({schema:p,schemaId:_,root:m,baseId:g}),v.schema!==v.root.schema)return v}return Xe}const pl="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",ml="Meta-schema for $data reference (JSON AnySchema extension proposal)",gl="object",yl=["$data"],El={$data:{type:"string",
876
- anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Dl=!1,by={$id:pl,description:ml,type:gl,required:yl,properties:El,additionalProperties:Dl},Ay={__proto__:null,$id:pl,additionalProperties:Dl,default:by,description:ml,properties:El,required:yl,type:gl},Cy=yt(Ay);var Vn={},en={exports:{}},bo,vl;function Sy(){return vl||(vl=1,bo={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}}),bo}var Ao,$l;function Ry(){if($l)return Ao;$l=
877
- 1;const{HEX:t}=Sy(),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 f=y.match(e)||[],[g]=f;return g?{host:o(g,"."),isIPV4:!0}:{host:y,isIPV4:!1}}function n(y,f=!1){let g="",p=!0;for(const m of y){if(t[m]===void 0)return;m!=="0"&&p===!0&&(p=!1),p||(g+=m)}return f&&g.length===0&&(g="0"),g}function i(y){let f=0;const g={error:!1,address:"",zone:""},p=[],m=[];let D=!1,v=!1,_=!1;function b(){if(m.length){
878
- if(D===!1){const I=n(m);if(I!==void 0)p.push(I);else return g.error=!0,!1}m.length=0}return!0}for(let I=0;I<y.length;I++){const U=y[I];if(!(U==="["||U==="]"))if(U===":"){if(v===!0&&(_=!0),!b())break;if(f++,p.push(":"),f>7){g.error=!0;break}I-1>=0&&y[I-1]===":"&&(v=!0);continue}else if(U==="%"){if(!b())break;D=!0}else{m.push(U);continue}}return m.length&&(D?g.zone=m.join(""):_?p.push(m.join("")):p.push(n(m))),g.address=p.join(""),g}function s(y){if(a(y,":")<2)return{host:y,isIPV6:!1};const f=i(y);
879
- if(f.error)return{host:y,isIPV6:!1};{let g=f.address,p=f.address;return f.zone&&(g+="%"+f.zone,p+="%25"+f.zone),{host:g,escapedHost:p,isIPV6:!0}}}function o(y,f){let g="",p=!0;const m=y.length;for(let D=0;D<m;D++){const v=y[D];v==="0"&&p?(D+1<=m&&y[D+1]===f||D+1===m)&&(g+=v,p=!1):(v===f?p=!0:p=!1,g+=v)}return g}function a(y,f){let g=0;for(let p=0;p<y.length;p++)y[p]===f&&g++;return g}const u=/^\.\.?\//u,l=/^\/\.(?:\/|$)/u,c=/^\/\.\.(?:\/|$)/u,d=/^\/?(?:.|\n)*?(?=\/|$)/u;function h(y){const f=[];
880
- 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,"/"),f.pop();else if(y==="."||y==="..")y="";else{const g=y.match(d);if(g){const p=g[0];y=y.slice(p.length),f.push(p)}else throw new Error("Unexpected dot segment condition")}return f.join("")}function E(y,f){const g=f!==!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&&
881
- (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 $(y){const f=[];if(y.userinfo!==void 0&&(f.push(y.userinfo),f.push("@")),y.host!==void 0){let g=unescape(y.host);const p=r(g);if(p.isIPV4)g=p.host;else{const m=s(p.host);m.isIPV6===!0?g=`[${m.escapedHost}]`:g=y.host}f.push(g)}return(typeof y.port=="number"||typeof y.port=="string")&&(f.push(":"),f.push(String(y.port))),f.length?f.join(""):void 0}return Ao={recomposeAuthority:$,normalizeComponentEncoding:E,
882
- removeDotSegments:h,normalizeIPv4:r,normalizeIPv6:s,stringArrayToHexStripped:n},Ao}var Co,_l;function Oy(){if(_l)return Co;_l=1;const t=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(p){return typeof p.secure=="boolean"?p.secure:String(p.scheme).toLowerCase()==="wss"}function n(p){return p.host||(p.error=p.error||"HTTP URIs must have a host."),p}function i(p){const m=String(p.scheme).toLowerCase()==="\
883
- https";return(p.port===(m?443:80)||p.port==="")&&(p.port=void 0),p.path||(p.path="/"),p}function s(p){return p.secure=r(p),p.resourceName=(p.path||"/")+(p.query?"?"+p.query:""),p.path=void 0,p.query=void 0,p}function o(p){if((p.port===(r(p)?443:80)||p.port==="")&&(p.port=void 0),typeof p.secure=="boolean"&&(p.scheme=p.secure?"wss":"ws",p.secure=void 0),p.resourceName){const[m,D]=p.resourceName.split("?");p.path=m&&m!=="/"?m:void 0,p.query=D,p.resourceName=void 0}return p.fragment=void 0,p}function a(p,m){
884
- if(!p.path)return p.error="URN can not be parsed",p;const D=p.path.match(e);if(D){const v=m.scheme||p.scheme||"urn";p.nid=D[1].toLowerCase(),p.nss=D[2];const _=`${v}:${m.nid||p.nid}`,b=g[_];p.path=void 0,b&&(p=b.parse(p,m))}else p.error=p.error||"URN can not be parsed.";return p}function u(p,m){const D=m.scheme||p.scheme||"urn",v=p.nid.toLowerCase(),_=`${D}:${m.nid||v}`,b=g[_];b&&(p=b.serialize(p,m));const I=p,U=p.nss;return I.path=`${v||m.nid}:${U}`,m.skipEscape=!0,I}function l(p,m){const D=p;return D.
885
- uuid=D.nss,D.nss=void 0,!m.tolerant&&(!D.uuid||!t.test(D.uuid))&&(D.error=D.error||"UUID is not valid."),D}function c(p){const m=p;return m.nss=(p.uuid||"").toLowerCase(),m}const d={scheme:"http",domainHost:!0,parse:n,serialize:i},h={scheme:"https",domainHost:d.domainHost,parse:n,serialize:i},E={scheme:"ws",domainHost:!0,parse:s,serialize:o},$={scheme:"wss",domainHost:E.domainHost,parse:E.parse,serialize:E.serialize},g={http:d,https:h,ws:E,wss:$,urn:{scheme:"urn",parse:a,serialize:u,skipNormalize:!0},
886
- "urn:uuid":{scheme:"urn:uuid",parse:l,serialize:c,skipNormalize:!0}};return Co=g,Co}var wl;function Iy(){if(wl)return en.exports;wl=1;const{normalizeIPv6:t,normalizeIPv4:e,removeDotSegments:r,recomposeAuthority:n,normalizeComponentEncoding:i}=Ry(),s=Oy();function o(f,g){return typeof f=="string"?f=c($(f,g),g):typeof f=="object"&&(f=$(c(f,g),g)),f}function a(f,g,p){const m=Object.assign({scheme:"null"},p),D=u($(f,m),$(g,m),m,!0);return c(D,{...m,skipEscape:!0})}function u(f,g,p,m){const D={};return m||
887
- (f=$(c(f,p),p),g=$(c(g,p),p)),p=p||{},!p.tolerant&&g.scheme?(D.scheme=g.scheme,D.userinfo=g.userinfo,D.host=g.host,D.port=g.port,D.path=r(g.path||""),D.query=g.query):(g.userinfo!==void 0||g.host!==void 0||g.port!==void 0?(D.userinfo=g.userinfo,D.host=g.host,D.port=g.port,D.path=r(g.path||""),D.query=g.query):(g.path?(g.path.charAt(0)==="/"?D.path=r(g.path):((f.userinfo!==void 0||f.host!==void 0||f.port!==void 0)&&!f.path?D.path="/"+g.path:f.path?D.path=f.path.slice(0,f.path.lastIndexOf("/")+1)+
888
- g.path:D.path=g.path,D.path=r(D.path)),D.query=g.query):(D.path=f.path,g.query!==void 0?D.query=g.query:D.query=f.query),D.userinfo=f.userinfo,D.host=f.host,D.port=f.port),D.scheme=f.scheme),D.fragment=g.fragment,D}function l(f,g,p){return typeof f=="string"?(f=unescape(f),f=c(i($(f,p),!0),{...p,skipEscape:!0})):typeof f=="object"&&(f=c(i(f,!0),{...p,skipEscape:!0})),typeof g=="string"?(g=unescape(g),g=c(i($(g,p),!0),{...p,skipEscape:!0})):typeof g=="object"&&(g=c(i(g,!0),{...p,skipEscape:!0})),
889
- f.toLowerCase()===g.toLowerCase()}function c(f,g){const p={host:f.host,scheme:f.scheme,userinfo:f.userinfo,port:f.port,path:f.path,query:f.query,nid:f.nid,nss:f.nss,uuid:f.uuid,fragment:f.fragment,reference:f.reference,resourceName:f.resourceName,secure:f.secure,error:""},m=Object.assign({},g),D=[],v=s[(m.scheme||p.scheme||"").toLowerCase()];v&&v.serialize&&v.serialize(p,m),p.path!==void 0&&(m.skipEscape?p.path=unescape(p.path):(p.path=escape(p.path),p.scheme!==void 0&&(p.path=p.path.split("%3A").
890
- join(":")))),m.reference!=="suffix"&&p.scheme&&D.push(p.scheme,":");const _=n(p);if(_!==void 0&&(m.reference!=="suffix"&&D.push("//"),D.push(_),p.path&&p.path.charAt(0)!=="/"&&D.push("/")),p.path!==void 0){let b=p.path;!m.absolutePath&&(!v||!v.absolutePath)&&(b=r(b)),_===void 0&&(b=b.replace(/^\/\//u,"/%2F")),D.push(b)}return p.query!==void 0&&D.push("?",p.query),p.fragment!==void 0&&D.push("#",p.fragment),D.join("")}const d=Array.from({length:127},(f,g)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.
891
- fromCharCode(g)));function h(f){let g=0;for(let p=0,m=f.length;p<m;++p)if(g=f.charCodeAt(p),g>126||d[g])return!0;return!1}const E=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function $(f,g){const p=Object.assign({},g),m={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},D=f.indexOf("%")!==-1;let v=!1;p.reference==="suffix"&&(f=(p.scheme?p.scheme+":":"")+"//"+f);const _=f.match(
892
- E);if(_){if(m.scheme=_[1],m.userinfo=_[3],m.host=_[4],m.port=parseInt(_[5],10),m.path=_[6]||"",m.query=_[7],m.fragment=_[8],isNaN(m.port)&&(m.port=_[5]),m.host){const I=e(m.host);if(I.isIPV4===!1){const U=t(I.host);m.host=U.host.toLowerCase(),v=U.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=
893
- "uri",p.reference&&p.reference!=="suffix"&&p.reference!==m.reference&&(m.error=m.error||"URI is not a "+p.reference+" reference.");const b=s[(p.scheme||m.scheme||"").toLowerCase()];if(!p.unicodeSupport&&(!b||!b.unicodeSupport)&&m.host&&(p.domainHost||b&&b.domainHost)&&v===!1&&h(m.host))try{m.host=URL.domainToASCII(m.host.toLowerCase())}catch(I){m.error=m.error||"Host's domain name can not be converted to ASCII: "+I}(!b||b&&!b.skipNormalize)&&(D&&m.scheme!==void 0&&(m.scheme=unescape(m.scheme)),D&&
894
- 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)))),b&&b.parse&&b.parse(m,p)}else m.error=m.error||"URI can not be parsed.";return m}const y={SCHEMES:s,normalize:o,resolve:a,resolveComponents:u,equal:l,serialize:c,parse:$};return en.exports=y,en.exports.default=y,en.exports.fastUri=y,en.exports}var bl;function Fy(){if(bl)return Vn;bl=1,Object.defineProperty(Vn,"__esModule",{value:!0});const t=Iy();
895
- return t.code='require("ajv/dist/runtime/uri").default',Vn.default=t,Vn}var Al;function Cl(){return Al||(Al=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=Qr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=pe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.
896
- 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=qn(),i=Zr(),s=Qc(),o=Hn(),a=pe(),u=xn(),l=Bn(),c=_e(),d=Cy,h=Fy(),E=(q,C)=>new RegExp(q,C);E.code="new RegExp";const $=["removeAdditional","useDefaults","coerceTypes"],y=new Set(
384
+ get:function(){return n.Name}});var s=xc();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.
385
+ _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(w,R){return this}}class o extends i{constructor(w,R,C){super(),this.varKind=w,this.name=R,this.rhs=C}render({es5:w,_n:R}){const C=w?r.varKinds.var:this.varKind,Y=this.rhs===void 0?"":` = ${this.rhs}`;return`${C} ${this.name}${Y};`+R}optimizeNames(w,R){if(w[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,w,R)),this}get names(){
386
+ return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class a extends i{constructor(w,R,C){super(),this.lhs=w,this.rhs=R,this.sideEffects=C}render({_n:w}){return`${this.lhs} = ${this.rhs};`+w}optimizeNames(w,R){if(!(this.lhs instanceof e.Name&&!w[this.lhs.str]&&!this.sideEffects))return this.rhs=x(this.rhs,w,R),this}get names(){const w=this.lhs instanceof e.Name?{}:{...this.lhs.names};return j(w,this.rhs)}}class u extends a{constructor(w,R,C,Y){super(w,C,Y),this.op=R}render({_n:w}){return`${this.
387
+ lhs} ${this.op}= ${this.rhs};`+w}}class l extends i{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`${this.label}:`+w}}class c extends i{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`break${this.label?` ${this.label}`:""};`+w}}class d extends i{constructor(w){super(),this.error=w}render({_n:w}){return`throw ${this.error};`+w}get names(){return this.error.names}}class h extends i{constructor(w){super(),this.code=w}render({_n:w}){return`${this.code}\
388
+ ;`+w}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(w,R){return this.code=x(this.code,w,R),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class y extends i{constructor(w=[]){super(),this.nodes=w}render(w){return this.nodes.reduce((R,C)=>R+C.render(w),"")}optimizeNodes(){const{nodes:w}=this;let R=w.length;for(;R--;){const C=w[R].optimizeNodes();Array.isArray(C)?w.splice(R,1,...C):C?w[R]=C:w.splice(R,1)}return w.length>0?this:void 0}optimizeNames(w,R){
389
+ const{nodes:C}=this;let Y=C.length;for(;Y--;){const Q=C[Y];Q.optimizeNames(w,R)||(H(w,Q.names),C.splice(Y,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((w,R)=>k(w,R.names),{})}}class b extends y{render(w){return"{"+w._n+super.render(w)+"}"+w._n}}class _ extends y{}class f extends b{}f.kind="else";class g extends b{constructor(w,R){super(R),this.condition=w}render(w){let R=`if(${this.condition})`+super.render(w);return this.else&&(R+="else "+this.else.render(w)),R}optimizeNodes(){
390
+ super.optimizeNodes();const w=this.condition;if(w===!0)return this.nodes;let R=this.else;if(R){const C=R.optimizeNodes();R=this.else=Array.isArray(C)?new f(C):C}if(R)return w===!1?R instanceof g?R:R.nodes:this.nodes.length?this:new g(K(w),R instanceof g?[R]:R.nodes);if(!(w===!1||!this.nodes.length))return this}optimizeNames(w,R){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(w,R),!!(super.optimizeNames(w,R)||this.else))return this.condition=x(this.condition,w,R),this}get names(){
391
+ const w=super.names;return j(w,this.condition),this.else&&k(w,this.else.names),w}}g.kind="if";class p extends b{}p.kind="for";class m extends p{constructor(w){super(),this.iteration=w}render(w){return`for(${this.iteration})`+super.render(w)}optimizeNames(w,R){if(super.optimizeNames(w,R))return this.iteration=x(this.iteration,w,R),this}get names(){return k(super.names,this.iteration.names)}}class $ extends p{constructor(w,R,C,Y){super(),this.varKind=w,this.name=R,this.from=C,this.to=Y}render(w){const R=w.
392
+ es5?r.varKinds.var:this.varKind,{name:C,from:Y,to:Q}=this;return`for(${R} ${C}=${Y}; ${C}<${Q}; ${C}++)`+super.render(w)}get names(){const w=j(super.names,this.from);return j(w,this.to)}}class v extends p{constructor(w,R,C,Y){super(),this.loop=w,this.varKind=R,this.name=C,this.iterable=Y}render(w){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(w)}optimizeNames(w,R){if(super.optimizeNames(w,R))return this.iterable=x(this.iterable,w,R),this}get names(){return k(
393
+ super.names,this.iterable.names)}}class E extends b{constructor(w,R,C){super(),this.name=w,this.args=R,this.async=C}render(w){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(w)}}E.kind="func";class S extends y{render(w){return"return "+super.render(w)}}S.kind="return";class I extends b{render(w){let R="try"+super.render(w);return this.catch&&(R+=this.catch.render(w)),this.finally&&(R+=this.finally.render(w)),R}optimizeNodes(){var w,R;return super.optimizeNodes(),
394
+ (w=this.catch)===null||w===void 0||w.optimizeNodes(),(R=this.finally)===null||R===void 0||R.optimizeNodes(),this}optimizeNames(w,R){var C,Y;return super.optimizeNames(w,R),(C=this.catch)===null||C===void 0||C.optimizeNames(w,R),(Y=this.finally)===null||Y===void 0||Y.optimizeNames(w,R),this}get names(){const w=super.names;return this.catch&&k(w,this.catch.names),this.finally&&k(w,this.finally.names),w}}class F extends b{constructor(w){super(),this.error=w}render(w){return`catch(${this.error})`+super.
395
+ render(w)}}F.kind="catch";class B extends b{render(w){return"finally"+super.render(w)}}B.kind="finally";class D{constructor(w,R={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...R,_n:R.lines?`
396
+ `:""},this._extScope=w,this._scope=new r.Scope({parent:w}),this._nodes=[new _]}toString(){return this._root.render(this.opts)}name(w){return this._scope.name(w)}scopeName(w){return this._extScope.name(w)}scopeValue(w,R){const C=this._extScope.value(w,R);return(this._values[C.prefix]||(this._values[C.prefix]=new Set)).add(C),C}getScopeValue(w,R){return this._extScope.getValue(w,R)}scopeRefs(w){return this._extScope.scopeRefs(w,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(w,R,C,Y){
397
+ const Q=this._scope.toName(R);return C!==void 0&&Y&&(this._constants[Q.str]=C),this._leafNode(new o(w,Q,C)),Q}const(w,R,C){return this._def(r.varKinds.const,w,R,C)}let(w,R,C){return this._def(r.varKinds.let,w,R,C)}var(w,R,C){return this._def(r.varKinds.var,w,R,C)}assign(w,R,C){return this._leafNode(new a(w,R,C))}add(w,R){return this._leafNode(new u(w,t.operators.ADD,R))}code(w){return typeof w=="function"?w():w!==e.nil&&this._leafNode(new h(w)),this}object(...w){const R=["{"];for(const[C,Y]of w)
398
+ R.length>1&&R.push(","),R.push(C),(C!==Y||this.opts.es5)&&(R.push(":"),(0,e.addCodeArg)(R,Y));return R.push("}"),new e._Code(R)}if(w,R,C){if(this._blockNode(new g(w)),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(w){return this._elseNode(new g(w))}else(){return this._elseNode(new f)}endIf(){return this._endBlockNode(g,f)}_for(w,R){return this._blockNode(w),R&&this.code(R).endFor(),this}for(w,R){
399
+ return this._for(new m(w),R)}forRange(w,R,C,Y,Q=this.opts.es5?r.varKinds.var:r.varKinds.let){const ie=this._scope.toName(w);return this._for(new $(Q,ie,R,C),()=>Y(ie))}forOf(w,R,C,Y=r.varKinds.const){const Q=this._scope.toName(w);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(Q,(0,e._)`${ie}[${oe}]`),C(Q)})}return this._for(new v("of",Y,Q,R),()=>C(Q))}forIn(w,R,C,Y=this.opts.es5?r.varKinds.var:r.varKinds.const){
400
+ if(this.opts.ownProperties)return this.forOf(w,(0,e._)`Object.keys(${R})`,C);const Q=this._scope.toName(w);return this._for(new v("in",Y,Q,R),()=>C(Q))}endFor(){return this._endBlockNode(p)}label(w){return this._leafNode(new l(w))}break(w){return this._leafNode(new c(w))}return(w){const R=new S;if(this._blockNode(R),this.code(w),R.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try(w,R,C){if(!R&&!C)throw new Error('CodeGen: "try" without "c\
401
+ atch" and "finally"');const Y=new I;if(this._blockNode(Y),this.code(w),R){const Q=this.name("e");this._currNode=Y.catch=new F(Q),R(Q)}return C&&(this._currNode=Y.finally=new B,this.code(C)),this._endBlockNode(F,B)}throw(w){return this._leafNode(new d(w))}block(w,R){return this._blockStarts.push(this._nodes.length),w&&this.code(w).endBlock(R),this}endBlock(w){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||
402
+ w!==void 0&&C!==w)throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${w} expected`);return this._nodes.length=R,this}func(w,R=e.nil,C,Y){return this._blockNode(new E(w,R,C)),Y&&this.code(Y).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(w=1){for(;w-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(w){return this._currNode.nodes.push(w),this}_blockNode(w){this._currNode.nodes.push(w),this._nodes.push(w)}_endBlockNode(w,R){
403
+ const C=this._currNode;if(C instanceof w||R&&C instanceof R)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${R?`${w.kind}/${R.kind}`:w.kind}"`)}_elseNode(w){const R=this._currNode;if(!(R instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=R.else=w,this}get _root(){return this._nodes[0]}get _currNode(){const w=this._nodes;return w[w.length-1]}set _currNode(w){const R=this._nodes;R[R.length-1]=w}}t.CodeGen=D;function k(M,w){for(const R in w)M[R]=
404
+ (M[R]||0)+(w[R]||0);return M}function j(M,w){return w instanceof e._CodeOrName?k(M,w.names):M}function x(M,w,R){if(M instanceof e.Name)return C(M);if(!Y(M))return M;return new e._Code(M._items.reduce((Q,ie)=>(ie instanceof e.Name&&(ie=C(ie)),ie instanceof e._Code?Q.push(...ie._items):Q.push(ie),Q),[]));function C(Q){const ie=R[Q.str];return ie===void 0||w[Q.str]!==1?Q:(delete w[Q.str],ie)}function Y(Q){return Q instanceof e._Code&&Q._items.some(ie=>ie instanceof e.Name&&w[ie.str]===1&&R[ie.str]!==
405
+ void 0)}}function H(M,w){for(const R in w)M[R]=(M[R]||0)-(w[R]||0)}function K(M){return typeof M=="boolean"||typeof M=="number"||M===null?!M:(0,e._)`!${z(M)}`}t.not=K;const G=A(t.operators.AND);function X(...M){return M.reduce(G)}t.and=X;const se=A(t.operators.OR);function U(...M){return M.reduce(se)}t.or=U;function A(M){return(w,R)=>w===e.nil?R:R===e.nil?w:(0,e._)`${z(w)} ${M} ${z(R)}`}function z(M){return M instanceof e.Name?M:(0,e._)`(${M})`}}(Pi)),Pi}var me={},kc;function ye(){if(kc)return me;
406
+ kc=1,Object.defineProperty(me,"__esModule",{value:!0}),me.checkStrictMode=me.getErrorPath=me.Type=me.useFunc=me.setEvaluated=me.evaluatedPropsToName=me.mergeEvaluated=me.eachItem=me.unescapeJsonPointer=me.escapeJsonPointer=me.escapeFragment=me.unescapeFragment=me.schemaRefOrVal=me.schemaHasRulesButRef=me.schemaHasRules=me.checkUnknownRules=me.alwaysValidSchema=me.toHash=void 0;const t=he(),e=rn();function r(v){const E={};for(const S of v)E[S]=!0;return E}me.toHash=r;function n(v,E){return typeof E==
407
+ "boolean"?E:Object.keys(E).length===0?!0:(s(v,E),!i(E,v.self.RULES.all))}me.alwaysValidSchema=n;function s(v,E=v.schema){const{opts:S,self:I}=v;if(!S.strictSchema||typeof E=="boolean")return;const F=I.RULES.keywords;for(const B in E)F[B]||$(v,`unknown keyword: "${B}"`)}me.checkUnknownRules=s;function i(v,E){if(typeof v=="boolean")return!v;for(const S in v)if(E[S])return!0;return!1}me.schemaHasRules=i;function o(v,E){if(typeof v=="boolean")return!v;for(const S in v)if(S!=="$ref"&&E.all[S])return!0;
408
+ return!1}me.schemaHasRulesButRef=o;function a({topSchemaRef:v,schemaPath:E},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}${E}${(0,t.getProperty)(I)}`}me.schemaRefOrVal=a;function u(v){return d(decodeURIComponent(v))}me.unescapeFragment=u;function l(v){return encodeURIComponent(c(v))}me.escapeFragment=l;function c(v){return typeof v=="number"?`${v}`:v.replace(/~/g,"~0").replace(/\//g,"~1")}me.escapeJsonPointer=c;function d(v){
409
+ return v.replace(/~1/g,"/").replace(/~0/g,"~")}me.unescapeJsonPointer=d;function h(v,E){if(Array.isArray(v))for(const S of v)E(S);else E(v)}me.eachItem=h;function y({mergeNames:v,mergeToName:E,mergeValues:S,resultToName:I}){return(F,B,D,k)=>{const j=D===void 0?B:D instanceof t.Name?(B instanceof t.Name?v(F,B,D):E(F,B,D),D):B instanceof t.Name?(E(F,D,B),B):S(B,D);return k===t.Name&&!(j instanceof t.Name)?I(F,j):j}}me.mergeEvaluated={props:y({mergeNames:(v,E,S)=>v.if((0,t._)`${S} !== true && ${E} !== undefined`,
410
+ ()=>{v.if((0,t._)`${E} === true`,()=>v.assign(S,!0),()=>v.assign(S,(0,t._)`${S} || {}`).code((0,t._)`Object.assign(${S}, ${E})`))}),mergeToName:(v,E,S)=>v.if((0,t._)`${S} !== true`,()=>{E===!0?v.assign(S,!0):(v.assign(S,(0,t._)`${S} || {}`),_(v,S,E))}),mergeValues:(v,E)=>v===!0?!0:{...v,...E},resultToName:b}),items:y({mergeNames:(v,E,S)=>v.if((0,t._)`${S} !== true && ${E} !== undefined`,()=>v.assign(S,(0,t._)`${E} === true ? true : ${S} > ${E} ? ${S} : ${E}`)),mergeToName:(v,E,S)=>v.if((0,t._)`${S} !== true`,
411
+ ()=>v.assign(S,E===!0?!0:(0,t._)`${S} > ${E} ? ${S} : ${E}`)),mergeValues:(v,E)=>v===!0?!0:Math.max(v,E),resultToName:(v,E)=>v.var("items",E)})};function b(v,E){if(E===!0)return v.var("props",!0);const S=v.var("props",(0,t._)`{}`);return E!==void 0&&_(v,S,E),S}me.evaluatedPropsToName=b;function _(v,E,S){Object.keys(S).forEach(I=>v.assign((0,t._)`${E}${(0,t.getProperty)(I)}`,!0))}me.setEvaluated=_;const f={};function g(v,E){return v.scopeValue("func",{ref:E,code:f[E.code]||(f[E.code]=new e._Code(
412
+ E.code))})}me.useFunc=g;var p;(function(v){v[v.Num=0]="Num",v[v.Str=1]="Str"})(p||(me.Type=p={}));function m(v,E,S){if(v instanceof t.Name){const I=E===p.Num;return S?I?(0,t._)`"[" + ${v} + "]"`:(0,t._)`"['" + ${v} + "']"`:I?(0,t._)`"/" + ${v}`:(0,t._)`"/" + ${v}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return S?(0,t.getProperty)(v).toString():"/"+c(v)}me.getErrorPath=m;function $(v,E,S=v.opts.strictSchema){if(S){if(E=`strict mode: ${E}`,S===!0)throw new Error(E);v.self.logger.warn(E)}}return me.
413
+ checkStrictMode=$,me}var nn={},qc;function Xe(){if(qc)return nn;qc=1,Object.defineProperty(nn,"__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.
414
+ Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return nn.default=e,nn}var Hc;function sn(){return Hc||(Hc=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=ye(),n=Xe();t.keywordError={message:({keyword:f})=>(0,e.str)`must pass "${f}" keyword validation`},t.keyword$DataError={message:({
415
+ keyword:f,schemaType:g})=>g?(0,e.str)`"${f}" keyword must be ${g} ($data)`:(0,e.str)`"${f}" keyword is invalid ($data)`};function s(f,g=t.keywordError,p,m){const{it:$}=f,{gen:v,compositeRule:E,allErrors:S}=$,I=d(f,g,p);m??(E||S)?u(v,I):l($,(0,e._)`[${I}]`)}t.reportError=s;function i(f,g=t.keywordError,p){const{it:m}=f,{gen:$,compositeRule:v,allErrors:E}=m,S=d(f,g,p);u($,S),v||E||l(m,n.default.vErrors)}t.reportExtraError=i;function o(f,g){f.assign(n.default.errors,g),f.if((0,e._)`${n.default.vErrors} !== null`,
416
+ ()=>f.if(g,()=>f.assign((0,e._)`${n.default.vErrors}.length`,g),()=>f.assign(n.default.vErrors,null)))}t.resetErrorsCount=o;function a({gen:f,keyword:g,schemaValue:p,data:m,errsCount:$,it:v}){if($===void 0)throw new Error("ajv implementation error");const E=f.name("err");f.forRange("i",$,n.default.errors,S=>{f.const(E,(0,e._)`${n.default.vErrors}[${S}]`),f.if((0,e._)`${E}.instancePath === undefined`,()=>f.assign((0,e._)`${E}.instancePath`,(0,e.strConcat)(n.default.instancePath,v.errorPath))),f.assign(
417
+ (0,e._)`${E}.schemaPath`,(0,e.str)`${v.errSchemaPath}/${g}`),v.opts.verbose&&(f.assign((0,e._)`${E}.schema`,p),f.assign((0,e._)`${E}.data`,m))})}t.extendErrors=a;function u(f,g){const p=f.const("err",g);f.if((0,e._)`${n.default.vErrors} === null`,()=>f.assign(n.default.vErrors,(0,e._)`[${p}]`),(0,e._)`${n.default.vErrors}.push(${p})`),f.code((0,e._)`${n.default.errors}++`)}function l(f,g){const{gen:p,validateName:m,schemaEnv:$}=f;$.$async?p.throw((0,e._)`new ${f.ValidationError}(${g})`):(p.assign(
418
+ (0,e._)`${m}.errors`,g),p.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 d(f,g,p){const{createErrors:m}=f.it;return m===!1?(0,e._)`{}`:h(f,g,p)}function h(f,g,p={}){const{gen:m,it:$}=f,v=[y($,p),b(f,p)];return _(f,g,v),m.object(...v)}function y({errorPath:f},{instancePath:g}){const p=g?
419
+ (0,e.str)`${f}${(0,r.getErrorPath)(g,r.Type.Str)}`:f;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,p)]}function b({keyword:f,it:{errSchemaPath:g}},{schemaPath:p,parentSchema:m}){let $=m?g:(0,e.str)`${g}/${f}`;return p&&($=(0,e.str)`${$}${(0,r.getErrorPath)(p,r.Type.Str)}`),[c.schemaPath,$]}function _(f,{params:g,message:p},m){const{keyword:$,data:v,schemaValue:E,it:S}=f,{opts:I,propertyName:F,topSchemaRef:B,schemaPath:D}=S;m.push([c.keyword,$],[c.params,typeof g=="function"?
420
+ g(f):g||(0,e._)`{}`]),I.messages&&m.push([c.message,typeof p=="function"?p(f):p]),I.verbose&&m.push([c.schema,E],[c.parentSchema,(0,e._)`${B}${D}`],[n.default.data,v]),F&&m.push([c.propertyName,F])}}(Ci)),Ci}var Uc;function ig(){if(Uc)return Ht;Uc=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.boolOrEmptySchema=Ht.topBoolOrEmptySchema=void 0;const t=sn(),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\
421
+ 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,d={gen:l,keyword:"false schema",data:c,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,t.reportError)(d,n,void 0,u)}return Ht}var Pe={},Ut={},Fc;function zc(){if(Fc)return Ut;Fc=1,Object.defineProperty(Ut,"__esModule",{value:!0}),
422
+ Ut.getRules=Ut.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)}Ut.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 Ut.getRules=n,Ut}var dt={},
423
+ Vc;function Gc(){if(Vc)return dt;Vc=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.shouldUseRule=dt.shouldUseGroup=dt.schemaHasRulesForType=void 0;function t({schema:n,self:s},i){const o=s.RULES.types[i];return o&&o!==!0&&e(n,o)}dt.schemaHasRulesForType=t;function e(n,s){return s.rules.some(i=>r(n,i))}dt.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 dt.shouldUseRule=r,dt}var Bc;
424
+ function on(){if(Bc)return Pe;Bc=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=zc(),e=Gc(),r=sn(),n=he(),s=ye();var i;(function(p){p[p.Correct=0]="Correct",p[p.Wrong=1]="Wrong"})(i||(Pe.DataType=i={}));function o(p){const m=a(p.type);if(m.includes("null")){if(p.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!m.length&&
425
+ p.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');p.nullable===!0&&m.push("null")}return m}Pe.getSchemaTypes=o;function a(p){const m=Array.isArray(p)?p:p?[p]:[];if(m.every(t.isJSONType))return m;throw new Error("type must be JSONType or JSONType[]: "+m.join(","))}Pe.getJSONTypes=a;function u(p,m){const{gen:$,data:v,opts:E}=p,S=c(m,E.coerceTypes),I=m.length>0&&!(S.length===0&&m.length===1&&(0,e.schemaHasRulesForType)(p,m[0]));if(I){const F=b(m,v,E.strictNumbers,i.Wrong);
426
+ $.if(F,()=>{S.length?d(p,m,S):f(p)})}return I}Pe.coerceAndCheckDataType=u;const l=new Set(["string","number","integer","boolean","null"]);function c(p,m){return m?p.filter($=>l.has($)||m==="array"&&$==="array"):[]}function d(p,m,$){const{gen:v,data:E,opts:S}=p,I=v.let("dataType",(0,n._)`typeof ${E}`),F=v.let("coerced",(0,n._)`undefined`);S.coerceTypes==="array"&&v.if((0,n._)`${I} == 'object' && Array.isArray(${E}) && ${E}.length == 1`,()=>v.assign(E,(0,n._)`${E}[0]`).assign(I,(0,n._)`typeof ${E}`).
427
+ if(b(m,E,S.strictNumbers),()=>v.assign(F,E))),v.if((0,n._)`${F} !== undefined`);for(const D of $)(l.has(D)||D==="array"&&S.coerceTypes==="array")&&B(D);v.else(),f(p),v.endIf(),v.if((0,n._)`${F} !== undefined`,()=>{v.assign(E,F),h(p,F)});function B(D){switch(D){case"string":v.elseIf((0,n._)`${I} == "number" || ${I} == "boolean"`).assign(F,(0,n._)`"" + ${E}`).elseIf((0,n._)`${E} === null`).assign(F,(0,n._)`""`);return;case"number":v.elseIf((0,n._)`${I} == "boolean" || ${E} === null
428
+ || (${I} == "string" && ${E} && ${E} == +${E})`).assign(F,(0,n._)`+${E}`);return;case"integer":v.elseIf((0,n._)`${I} === "boolean" || ${E} === null
429
+ || (${I} === "string" && ${E} && ${E} == +${E} && !(${E} % 1))`).assign(F,(0,n._)`+${E}`);return;case"boolean":v.elseIf((0,n._)`${E} === "false" || ${E} === 0 || ${E} === null`).assign(F,!1).elseIf((0,n._)`${E} === "true" || ${E} === 1`).assign(F,!0);return;case"null":v.elseIf((0,n._)`${E} === "" || ${E} === 0 || ${E} === false`),v.assign(F,null);return;case"array":v.elseIf((0,n._)`${I} === "string" || ${I} === "number"
430
+ || ${I} === "boolean" || ${E} === null`).assign(F,(0,n._)`[${E}]`)}}}function h({gen:p,parentData:m,parentDataProperty:$},v){p.if((0,n._)`${m} !== undefined`,()=>p.assign((0,n._)`${m}[${$}]`,v))}function y(p,m,$,v=i.Correct){const E=v===i.Correct?n.operators.EQ:n.operators.NEQ;let S;switch(p){case"null":return(0,n._)`${m} ${E} 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=
431
+ I((0,n._)`!(${m} % 1) && !isNaN(${m})`);break;case"number":S=I();break;default:return(0,n._)`typeof ${m} ${E} ${p}`}return v===i.Correct?S:(0,n.not)(S);function I(F=n.nil){return(0,n.and)((0,n._)`typeof ${m} == "number"`,F,$?(0,n._)`isFinite(${m})`:n.nil)}}Pe.checkDataType=y;function b(p,m,$,v){if(p.length===1)return y(p[0],m,$,v);let E;const S=(0,s.toHash)(p);if(S.array&&S.object){const I=(0,n._)`typeof ${m} != "object"`;E=S.null?I:(0,n._)`!${m} || ${I}`,delete S.null,delete S.array,delete S.object}else
432
+ E=n.nil;S.number&&delete S.integer;for(const I in S)E=(0,n.and)(E,y(I,m,$,v));return E}Pe.checkDataTypes=b;const _={message:({schema:p})=>`must be ${p}`,params:({schema:p,schemaValue:m})=>typeof p=="string"?(0,n._)`{type: ${p}}`:(0,n._)`{type: ${m}}`};function f(p){const m=g(p);(0,r.reportError)(m,_)}Pe.reportTypeError=f;function g(p){const{gen:m,data:$,schema:v}=p,E=(0,s.schemaRefOrVal)(p,v,"type");return{gen:m,keyword:"type",data:$,schema:v.type,schemaCode:E,schemaValue:E,parentSchema:v,params:{},
433
+ it:p}}return Pe}var Er={},Wc;function og(){if(Wc)return Er;Wc=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.assignDefaults=void 0;const t=he(),e=ye();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))}Er.assignDefaults=r;function n(s,i,o){const{gen:a,compositeRule:u,data:l,opts:c}=s;if(o===void 0)return;const d=(0,t._)`${l}${(0,t.getProperty)(i)}`;if(u){(0,e.checkStrictMode)(
434
+ s,`default is ignored for: ${d}`);return}let h=(0,t._)`${d} === undefined`;c.useDefaults==="empty"&&(h=(0,t._)`${h} || ${d} === null || ${d} === ""`),a.if(h,(0,t._)`${d} = ${(0,t.stringify)(o)}`)}return Er}var Je={},ve={},Kc;function Qe(){if(Kc)return ve;Kc=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=
435
+ ve.checkMissingProp=ve.checkReportMissingProp=void 0;const t=he(),e=ye(),r=Xe(),n=ye();function s(p,m){const{gen:$,data:v,it:E}=p;$.if(c($,v,m,E.opts.ownProperties),()=>{p.setParams({missingProperty:(0,t._)`${m}`},!0),p.error()})}ve.checkReportMissingProp=s;function i({gen:p,data:m,it:{opts:$}},v,E){return(0,t.or)(...v.map(S=>(0,t.and)(c(p,m,S,$.ownProperties),(0,t._)`${E} = ${S}`)))}ve.checkMissingProp=i;function o(p,m){p.setParams({missingProperty:m},!0),p.error()}ve.reportMissingProp=o;function a(p){
436
+ return p.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}ve.hasPropFunc=a;function u(p,m,$){return(0,t._)`${a(p)}.call(${m}, ${$})`}ve.isOwnProperty=u;function l(p,m,$,v){const E=(0,t._)`${m}${(0,t.getProperty)($)} !== undefined`;return v?(0,t._)`${E} && ${u(p,m,$)}`:E}ve.propertyInData=l;function c(p,m,$,v){const E=(0,t._)`${m}${(0,t.getProperty)($)} === undefined`;return v?(0,t.or)(E,(0,t.not)(u(p,m,$))):E}ve.noPropertyInData=c;function d(p){
437
+ return p?Object.keys(p).filter(m=>m!=="__proto__"):[]}ve.allSchemaProperties=d;function h(p,m){return d(m).filter($=>!(0,e.alwaysValidSchema)(p,m[$]))}ve.schemaProperties=h;function y({schemaCode:p,data:m,it:{gen:$,topSchemaRef:v,schemaPath:E,errorPath:S},it:I},F,B,D){const k=D?(0,t._)`${p}, ${m}, ${v}${E}`: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]];
438
+ I.opts.dynamicRef&&j.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const x=(0,t._)`${k}, ${$.object(...j)}`;return B!==t.nil?(0,t._)`${F}.call(${B}, ${x})`:(0,t._)`${F}(${x})`}ve.callValidateCode=y;const b=(0,t._)`new RegExp`;function _({gen:p,it:{opts:m}},$){const v=m.unicodeRegExp?"u":"",{regExp:E}=m.code,S=E($,v);return p.scopeValue("pattern",{key:S.toString(),ref:S,code:(0,t._)`${E.code==="new RegExp"?b:(0,n.useFunc)(p,E)}(${$}, ${v})`})}ve.usePattern=_;function f(p){const{gen:m,
439
+ data:$,keyword:v,it:E}=p,S=m.name("valid");if(E.allErrors){const F=m.let("valid",!0);return I(()=>m.assign(F,!1)),F}return m.var(S,!0),I(()=>m.break()),S;function I(F){const B=m.const("len",(0,t._)`${$}.length`);m.forRange("i",0,B,D=>{p.subschema({keyword:v,dataProp:D,dataPropType:e.Type.Num},S),m.if((0,t.not)(S),F)})}}ve.validateArray=f;function g(p){const{gen:m,schema:$,keyword:v,it:E}=p;if(!Array.isArray($))throw new Error("ajv implementation error");if($.some(B=>(0,e.alwaysValidSchema)(E,B))&&
440
+ !E.opts.unevaluated)return;const I=m.let("valid",!1),F=m.name("_valid");m.block(()=>$.forEach((B,D)=>{const k=p.subschema({keyword:v,schemaProp:D,compositeRule:!0},F);m.assign(I,(0,t._)`${I} || ${F}`),p.mergeValidEvaluated(k,F)||m.if((0,t.not)(I))})),p.result(I,()=>p.reset(),()=>p.error(!0))}return ve.validateUnion=g,ve}var Yc;function ag(){if(Yc)return Je;Yc=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.validateKeywordUsage=Je.validSchemaType=Je.funcKeywordCode=Je.macroKeywordCode=void 0;
441
+ const t=he(),e=Xe(),r=Qe(),n=sn();function s(h,y){const{gen:b,keyword:_,schema:f,parentSchema:g,it:p}=h,m=y.macro.call(p.self,f,g,p),$=l(b,_,m);p.opts.validateSchema!==!1&&p.self.validateSchema(m,!0);const v=b.name("valid");h.subschema({schema:m,schemaPath:t.nil,errSchemaPath:`${p.errSchemaPath}/${_}`,topSchemaRef:$,compositeRule:!0},v),h.pass(v,()=>h.error(!0))}Je.macroKeywordCode=s;function i(h,y){var b;const{gen:_,keyword:f,schema:g,parentSchema:p,$data:m,it:$}=h;u($,y);const v=!m&&y.compile?
442
+ y.compile.call($.self,g,p,$):y.validate,E=l(_,f,v),S=_.let("valid");h.block$data(S,I),h.ok((b=y.valid)!==null&&b!==void 0?b:S);function I(){if(y.errors===!1)D(),y.modifying&&o(h),k(()=>h.error());else{const j=y.async?F():B();y.modifying&&o(h),k(()=>a(h,j))}}function F(){const j=_.let("ruleErrs",null);return _.try(()=>D((0,t._)`await `),x=>_.assign(S,!1).if((0,t._)`${x} instanceof ${$.ValidationError}`,()=>_.assign(j,(0,t._)`${x}.errors`),()=>_.throw(x))),j}function B(){const j=(0,t._)`${E}.errors`;
443
+ return _.assign(j,null),D(t.nil),j}function D(j=y.async?(0,t._)`await `:t.nil){const x=$.opts.passContext?e.default.this:e.default.self,H=!("compile"in y&&!m||y.schema===!1);_.assign(S,(0,t._)`${j}${(0,r.callValidateCode)(h,E,x,H)}`,y.modifying)}function k(j){var x;_.if((0,t.not)((x=y.valid)!==null&&x!==void 0?x:S),j)}}Je.funcKeywordCode=i;function o(h){const{gen:y,data:b,it:_}=h;y.if(_.parentData,()=>y.assign(b,(0,t._)`${_.parentData}[${_.parentDataProperty}]`))}function a(h,y){const{gen:b}=h;b.
444
+ if((0,t._)`Array.isArray(${y})`,()=>{b.assign(e.default.vErrors,(0,t._)`${e.default.vErrors} === null ? ${y} : ${e.default.vErrors}.concat(${y})`).assign(e.default.errors,(0,t._)`${e.default.vErrors}.length`),(0,n.extendErrors)(h)},()=>h.error())}function u({schemaEnv:h},y){if(y.async&&!h.$async)throw new Error("async keyword in sync schema")}function l(h,y,b){if(b===void 0)throw new Error(`keyword "${y}" failed to compile`);return h.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,t.
445
+ stringify)(b)})}function c(h,y,b=!1){return!y.length||y.some(_=>_==="array"?Array.isArray(h):_==="object"?h&&typeof h=="object"&&!Array.isArray(h):typeof h==_||b&&typeof h>"u")}Je.validSchemaType=c;function d({schema:h,opts:y,self:b,errSchemaPath:_},f,g){if(Array.isArray(f.keyword)?!f.keyword.includes(g):f.keyword!==g)throw new Error("ajv implementation error");const p=f.dependencies;if(p?.some(m=>!Object.prototype.hasOwnProperty.call(h,m)))throw new Error(`parent schema must have dependencies o\
446
+ f ${g}: ${p.join(",")}`);if(f.validateSchema&&!f.validateSchema(h[g])){const $=`keyword "${g}" value is invalid at path "${_}": `+b.errorsText(f.validateSchema.errors);if(y.validateSchema==="log")b.logger.error($);else throw new Error($)}}return Je.validateKeywordUsage=d,Je}var ht={},Xc;function cg(){if(Xc)return ht;Xc=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.extendSubschemaMode=ht.extendSubschemaData=ht.getSubschema=void 0;const t=he(),e=ye();function r(i,{keyword:o,schemaProp:a,schema:u,
447
+ schemaPath:l,errSchemaPath:c,topSchemaRef:d}){if(o!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(o!==void 0){const h=i.schema[o];return a===void 0?{schema:h,schemaPath:(0,t._)`${i.schemaPath}${(0,t.getProperty)(o)}`,errSchemaPath:`${i.errSchemaPath}/${o}`}:{schema:h[a],schemaPath:(0,t._)`${i.schemaPath}${(0,t.getProperty)(o)}${(0,t.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${o}/${(0,e.escapeFragment)(a)}`}}if(u!==void 0){if(l===void 0||
448
+ c===void 0||d===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:l,topSchemaRef:d,errSchemaPath:c}}throw new Error('either "keyword" or "schema" must be passed')}ht.getSubschema=r;function n(i,o,{dataProp:a,dataPropType:u,data:l,dataTypes:c,propertyName:d}){if(l!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:h}=o;if(a!==void 0){const{errorPath:b,dataPathArr:_,opts:f}=o,
449
+ g=h.let("data",(0,t._)`${o.data}${(0,t.getProperty)(a)}`,!0);y(g),i.errorPath=(0,t.str)`${b}${(0,e.getErrorPath)(a,u,f.jsPropertySyntax)}`,i.parentDataProperty=(0,t._)`${a}`,i.dataPathArr=[..._,i.parentDataProperty]}if(l!==void 0){const b=l instanceof t.Name?l:h.let("data",l,!0);y(b),d!==void 0&&(i.propertyName=d)}c&&(i.dataTypes=c);function y(b){i.data=b,i.dataLevel=o.dataLevel+1,i.dataTypes=[],o.definedProperties=new Set,i.parentData=o.data,i.dataNames=[...o.dataNames,b]}}ht.extendSubschemaData=
450
+ 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 ht.extendSubschemaMode=s,ht}var je={},Ti,Jc;function Qc(){return Jc||(Jc=1,Ti=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=
451
+ 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}),Ti}var ji={
452
+ exports:{}},Zc;function ug(){if(Zc)return ji.exports;Zc=1;var t=ji.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=
453
+ {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,u,l,c,d,h){if(o&&typeof o=="object"&&!Array.isArray(o)){s(o,a,u,l,c,d,h);for(var y in o){var b=o[y];if(Array.isArray(b)){if(y in t.arrayKeywords)for(var _=0;_<b.length;_++)e(n,s,i,b[_],a+"/"+y+"/"+_,u,a,y,o,_)}else if(y in t.propsKeywords){if(b&&
454
+ typeof b=="object")for(var f in b)e(n,s,i,b[f],a+"/"+y+"/"+r(f),u,a,y,o,f)}else(y in t.keywords||n.allKeys&&!(y in t.skipKeywords))&&e(n,s,i,b,a+"/"+y,u,a,y,o)}i(o,a,u,l,c,d,h)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return ji.exports}var eu;function an(){if(eu)return je;eu=1,Object.defineProperty(je,"__esModule",{value:!0}),je.getSchemaRefs=je.resolveUrl=je.normalizeId=je._getFullPath=je.getFullPath=je.inlineRef=void 0;const t=ye(),e=Qc(),r=ug(),n=new Set(["type","format",
455
+ "pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function s(_,f=!0){return typeof _=="boolean"?!0:f===!0?!o(_):f?a(_)<=f:!1}je.inlineRef=s;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o(_){for(const f in _){if(i.has(f))return!0;const g=_[f];if(Array.isArray(g)&&g.some(o)||typeof g=="object"&&o(g))return!0}return!1}function a(_){
456
+ let f=0;for(const g in _){if(g==="$ref")return 1/0;if(f++,!n.has(g)&&(typeof _[g]=="object"&&(0,t.eachItem)(_[g],p=>f+=a(p)),f===1/0))return 1/0}return f}function u(_,f="",g){g!==!1&&(f=d(f));const p=_.parse(f);return l(_,p)}je.getFullPath=u;function l(_,f){return _.serialize(f).split("#")[0]+"#"}je._getFullPath=l;const c=/#\/?$/;function d(_){return _?_.replace(c,""):""}je.normalizeId=d;function h(_,f,g){return g=d(g),_.resolve(f,g)}je.resolveUrl=h;const y=/^[a-z_][-a-z0-9._]*$/i;function b(_,f){
457
+ if(typeof _=="boolean")return{};const{schemaId:g,uriResolver:p}=this.opts,m=d(_[g]||f),$={"":m},v=u(p,m,!1),E={},S=new Set;return r(_,{allKeys:!0},(B,D,k,j)=>{if(j===void 0)return;const x=v+D;let H=$[j];typeof B[g]=="string"&&(H=K.call(this,B[g])),G.call(this,B.$anchor),G.call(this,B.$dynamicAnchor),$[D]=H;function K(X){const se=this.opts.uriResolver.resolve;if(X=d(H?se(H,X):X),S.has(X))throw F(X);S.add(X);let U=this.refs[X];return typeof U=="string"&&(U=this.refs[U]),typeof U=="object"?I(B,U.schema,
458
+ X):X!==d(x)&&(X[0]==="#"?(I(B,E[X],X),E[X]=B):this.refs[X]=x),X}function G(X){if(typeof X=="string"){if(!y.test(X))throw new Error(`invalid anchor "${X}"`);K.call(this,`#${X}`)}}}),E;function I(B,D,k){if(D!==void 0&&!e(B,D))throw F(k)}function F(B){return new Error(`reference "${B}" resolves to more than one schema`)}}return je.getSchemaRefs=b,je}var tu;function Sr(){if(tu)return ft;tu=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.getData=ft.KeywordCxt=ft.validateFunctionCode=void 0;const t=ig(),
459
+ e=on(),r=Gc(),n=on(),s=og(),i=ag(),o=cg(),a=he(),u=Xe(),l=an(),c=ye(),d=sn();function h(L){if(v(L)&&(S(L),$(L))){f(L);return}y(L,()=>(0,t.topBoolOrEmptySchema)(L))}ft.validateFunctionCode=h;function y({gen:L,validateName:q,schema:J,schemaEnv:ne,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"; ${p(J,P)}`),_(L,P),L.code(T)}):L.func(q,(0,a._)`${u.default.data}, ${b(P)}`,ne.$async,()=>L.code(p(J,P)).code(T))}function b(L){return(0,a.
460
+ _)`{${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 _(L,q){L.if(u.default.valCxt,()=>{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}`),
461
+ 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(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 f(L){const{schema:q,opts:J,gen:ne}=L;y(L,()=>{J.$comment&&q.
462
+ $comment&&j(L),B(L),ne.let(u.default.vErrors,null),ne.let(u.default.errors,0),J.unevaluated&&g(L),I(L),x(L)})}function g(L){const{gen:q,validateName:J}=L;L.evaluated=q.const("evaluated",(0,a._)`${J}.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 p(L,q){const J=typeof L=="object"&&L[q.schemaId];return J&&(q.code.source||
463
+ q.code.process)?(0,a._)`/*# sourceURL=${J} */`:a.nil}function m(L,q){if(v(L)&&(S(L),$(L))){E(L,q);return}(0,t.boolOrEmptySchema)(L,q)}function $({schema:L,self:q}){if(typeof L=="boolean")return!L;for(const J in L)if(q.RULES.all[J])return!0;return!1}function v(L){return typeof L.schema!="boolean"}function E(L,q){const{schema:J,gen:ne,opts:P}=L;P.$comment&&J.$comment&&j(L),D(L),k(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.
464
+ checkUnknownRules)(L),F(L)}function I(L,q){if(L.opts.jtd)return K(L,[],!1,q);const J=(0,e.getSchemaTypes)(L.schema),ne=(0,e.coerceAndCheckDataType)(L,J);K(L,J,!ne,q)}function F(L){const{schema:q,errSchemaPath:J,opts:ne,self:P}=L;q.$ref&&ne.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(q,P.RULES)&&P.logger.warn(`$ref: keywords ignored in schema at path "${J}"`)}function B(L){const{schema:q,opts:J}=L;q.default!==void 0&&J.useDefaults&&J.strictSchema&&(0,c.checkStrictMode)(L,"default is ignored\
465
+ 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 k(L){if(L.schema.$async&&!L.schemaEnv.$async)throw new Error("async schema in sync schema")}function j({gen:L,schemaEnv:q,schema:J,errSchemaPath:ne,opts:P}){const T=J.$comment;if(P.$comment===!0)L.code((0,a._)`${u.default.self}.logger.log(${T})`);else if(typeof P.$comment=="function"){const Z=(0,a.str)`${ne}/$comment`,W=L.scopeValue("root",{ref:q.root});L.code(
466
+ (0,a._)`${u.default.self}.opts.$comment(${T}, ${Z}, ${W}.schema)`)}}function x(L){const{gen:q,schemaEnv:J,validateName:ne,ValidationError:P,opts:T}=L;J.$async?q.if((0,a._)`${u.default.errors} === 0`,()=>q.return(u.default.data),()=>q.throw((0,a._)`new ${P}(${u.default.vErrors})`)):(q.assign((0,a._)`${ne}.errors`,u.default.vErrors),T.unevaluated&&H(L),q.return((0,a._)`${u.default.errors} === 0`))}function H({gen:L,evaluated:q,props:J,items:ne}){J instanceof a.Name&&L.assign((0,a._)`${q}.props`,J),
467
+ ne instanceof a.Name&&L.assign((0,a._)`${q}.items`,ne)}function K(L,q,J,ne){const{gen:P,schema:T,data:Z,allErrors:W,opts:N,self:te}=L,{RULES:V}=te;if(T.$ref&&(N.ignoreKeywordsWithRef||!(0,c.schemaHasRulesButRef)(T,V))){P.block(()=>Y(L,"$ref",V.all.$ref.definition));return}N.jtd||X(L,q),P.block(()=>{for(const le of V.rules)re(le);re(V.post)});function re(le){(0,r.shouldUseGroup)(T,le)&&(le.type?(P.if((0,n.checkDataType)(le.type,Z,N.strictNumbers)),G(L,le),q.length===1&&q[0]===le.type&&J&&(P.else(),
468
+ (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:J,schema:ne,opts:{useDefaults:P}}=L;P&&(0,s.assignDefaults)(L,q.type),J.block(()=>{for(const T of q.rules)(0,r.shouldUseRule)(ne,T)&&Y(L,T.keyword,T.definition,q.type)})}function X(L,q){L.schemaEnv.meta||!L.opts.strictTypes||(se(L,q),L.opts.allowUnionTypes||U(L,q),A(L,L.dataTypes))}function se(L,q){if(q.length){if(!L.dataTypes.length){L.dataTypes=q;return}q.forEach(J=>{M(L.
469
+ dataTypes,J)||R(L,`type "${J}" not allowed by context "${L.dataTypes.join(",")}"`)}),w(L,q)}}function U(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 J=L.self.RULES.all;for(const ne in J){const P=J[ne];if(typeof P=="object"&&(0,r.shouldUseRule)(L.schema,P)){const{type:T}=P.definition;T.length&&!T.some(Z=>z(q,Z))&&R(L,`missing type "${T.join(",")}" for keyword "${ne}"`)}}}function z(L,q){return L.includes(q)||q===
470
+ "number"&&L.includes("integer")}function M(L,q){return L.includes(q)||q==="integer"&&L.includes("number")}function w(L,q){const J=[];for(const ne of L.dataTypes)M(q,ne)?J.push(ne):q.includes("integer")&&ne==="number"&&J.push("integer");L.dataTypes=J}function R(L,q){const J=L.schemaEnv.baseId+L.errSchemaPath;q+=` at "${J}" (strictTypes)`,(0,c.checkStrictMode)(L,q,L.opts.strictTypes)}class C{constructor(q,J,ne){if((0,i.validateKeywordUsage)(q,J,ne),this.gen=q.gen,this.allErrors=q.allErrors,this.keyword=
471
+ ne,this.data=q.data,this.schema=q.schema[ne],this.$data=J.$data&&q.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c.schemaRefOrVal)(q,this.schema,ne,this.$data),this.schemaType=J.schemaType,this.parentSchema=q.schema,this.params={},this.it=q,this.def=J,this.$data)this.schemaCode=q.gen.const("vSchema",oe(this.$data,q));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,J.schemaType,J.allowUndefined))throw new Error(`${ne} value must be ${JSON.stringify(J.schemaType)}`);
472
+ ("code"in J?J.trackErrors:J.errors!==!1)&&(this.errsCount=q.gen.const("_errs",u.default.errors))}result(q,J,ne){this.failResult((0,a.not)(q),J,ne)}failResult(q,J,ne){this.gen.if(q),ne?ne():this.error(),J?(this.gen.else(),J(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(q,J){this.failResult((0,a.not)(q),void 0,J)}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.
473
+ else()}fail$data(q){if(!this.$data)return this.fail(q);const{schemaCode:J}=this;this.fail((0,a._)`${J} !== undefined && (${(0,a.or)(this.invalid$data(),q)})`)}error(q,J,ne){if(J){this.setParams(J),this._error(q,ne),this.setParams({});return}this._error(q,ne)}_error(q,J){(q?d.reportExtraError:d.reportError)(this,this.def.error,J)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');
474
+ (0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(q){this.allErrors||this.gen.if(q)}setParams(q,J){J?Object.assign(this.params,q):this.params=q}block$data(q,J,ne=a.nil){this.gen.block(()=>{this.check$data(q,ne),J()})}check$data(q=a.nil,J=a.nil){if(!this.$data)return;const{gen:ne,schemaCode:P,schemaType:T,def:Z}=this;ne.if((0,a.or)((0,a._)`${P} === undefined`,J)),q!==a.nil&&ne.assign(q,!0),(T.length||Z.validateSchema)&&(ne.elseIf(this.invalid$data()),this.$dataError(),q!==a.nil&&ne.assign(q,!1)),
475
+ ne.else()}invalid$data(){const{gen:q,schemaCode:J,schemaType:ne,def:P,it:T}=this;return(0,a.or)(Z(),W());function Z(){if(ne.length){if(!(J instanceof a.Name))throw new Error("ajv implementation error");const N=Array.isArray(ne)?ne:[ne];return(0,a._)`${(0,n.checkDataTypes)(N,J,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}(${J})`}return a.nil}}subschema(q,J){const ne=(0,o.getSubschema)(
476
+ 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,J),P}mergeEvaluated(q,J){const{it:ne,gen:P}=this;ne.opts.unevaluated&&(ne.props!==!0&&q.props!==void 0&&(ne.props=c.mergeEvaluated.props(P,q.props,ne.props,J)),ne.items!==!0&&q.items!==void 0&&(ne.items=c.mergeEvaluated.items(P,q.items,ne.items,J)))}mergeValidEvaluated(q,J){const{it:ne,gen:P}=this;if(ne.opts.unevaluated&&(ne.props!==!0||ne.items!==!0))
477
+ return P.if(J,()=>this.mergeEvaluated(q,a.Name)),!0}}ft.KeywordCxt=C;function Y(L,q,J,ne){const P=new C(L,J,q);"code"in J?J.code(P,ne):P.$data&&J.validate?(0,i.funcKeywordCode)(P,J):"macro"in J?(0,i.macroKeywordCode)(P,J):(J.compile||J.validate)&&(0,i.funcKeywordCode)(P,J)}const Q=/^\/(?:[^~]|~0|~1)*$/,ie=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function oe(L,{dataLevel:q,dataNames:J,dataPathArr:ne}){let P,T;if(L==="")return u.default.rootData;if(L[0]==="/"){if(!Q.test(L))throw new Error(`Invalid JSON\
478
+ -pointer: ${L}`);P=L,T=u.default.rootData}else{const te=ie.exec(L);if(!te)throw new Error(`Invalid JSON-pointer: ${L}`);const V=+te[1];if(P=te[2],P==="#"){if(V>=q)throw new Error(N("property/index",V));return ne[q-V]}if(V>q)throw new Error(N("data",V));if(T=J[q-V],!P)return T}let Z=T;const W=P.split("/");for(const te of W)te&&(T=(0,a._)`${T}${(0,a.getProperty)((0,c.unescapeJsonPointer)(te))}`,Z=(0,a._)`${Z} && ${T}`);return Z;function N(te,V){return`Cannot access ${te} ${V} levels up, current le\
479
+ vel is ${q}`}}return ft.getData=oe,ft}var cn={},ru;function un(){if(ru)return cn;ru=1,Object.defineProperty(cn,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return cn.default=t,cn}var ln={},nu;function Rr(){if(nu)return ln;nu=1,Object.defineProperty(ln,"__esModule",{value:!0});const t=an();class e extends Error{constructor(n,s,i,o){super(o||`can't resolve reference ${i} from id ${s}`),this.missingRef=(0,t.resolveUrl)(
480
+ n,s,i),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(n,this.missingRef))}}return ln.default=e,ln}var He={},su;function fn(){if(su)return He;su=1,Object.defineProperty(He,"__esModule",{value:!0}),He.resolveSchema=He.getCompilingSchema=He.resolveRef=He.compileSchema=He.SchemaEnv=void 0;const t=he(),e=un(),r=Xe(),n=an(),s=ye(),i=Sr();class o{constructor(g){var p;this.refs={},this.dynamicAnchors={};let m;typeof g.schema=="object"&&(m=g.schema),this.schema=g.schema,this.schemaId=g.schemaId,this.
481
+ root=g.root||this,this.baseId=(p=g.baseId)!==null&&p!==void 0?p:(0,n.normalizeId)(m?.[g.schemaId||"$id"]),this.schemaPath=g.schemaPath,this.localRefs=g.localRefs,this.meta=g.meta,this.$async=m?.$async,this.refs={}}}He.SchemaEnv=o;function a(f){const g=c.call(this,f);if(g)return g;const p=(0,n.getFullPath)(this.opts.uriResolver,f.root.baseId),{es5:m,lines:$}=this.opts.code,{ownProperties:v}=this.opts,E=new t.CodeGen(this.scope,{es5:m,lines:$,ownProperties:v});let S;f.$async&&(S=E.scopeValue("Erro\
482
+ r",{ref:e.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));const I=E.scopeName("validate");f.validateName=I;const F={gen:E,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:E.scopeValue("schema",this.opts.code.source===!0?{ref:f.schema,code:(0,t.stringify)(f.schema)}:{ref:f.schema}),
483
+ validateName:I,ValidationError:S,schema:f.schema,schemaEnv:f,rootId:p,baseId:f.baseId||p,schemaPath:t.nil,errSchemaPath:f.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};let B;try{this._compilations.add(f),(0,i.validateFunctionCode)(F),E.optimize(this.opts.code.optimize);const D=E.toString();B=`${E.scopeRefs(r.default.scope)}return ${D}`,this.opts.code.process&&(B=this.opts.code.process(B,f));const j=new Function(`${r.default.self}`,`${r.default.scope}`,B)(this,
484
+ this.scope.get());if(this.scope.value(I,{ref:j}),j.errors=null,j.schema=f.schema,j.schemaEnv=f,f.$async&&(j.$async=!0),this.opts.code.source===!0&&(j.source={validateName:I,validateCode:D,scopeValues:E._values}),this.opts.unevaluated){const{props:x,items:H}=F;j.evaluated={props:x instanceof t.Name?void 0:x,items:H instanceof t.Name?void 0:H,dynamicProps:x instanceof t.Name,dynamicItems:H instanceof t.Name},j.source&&(j.source.evaluated=(0,t.stringify)(j.evaluated))}return f.validate=j,f}catch(D){
485
+ throw delete f.validate,delete f.validateName,B&&this.logger.error("Error compiling schema, function code:",B),D}finally{this._compilations.delete(f)}}He.compileSchema=a;function u(f,g,p){var m;p=(0,n.resolveUrl)(this.opts.uriResolver,g,p);const $=f.refs[p];if($)return $;let v=h.call(this,f,p);if(v===void 0){const E=(m=f.localRefs)===null||m===void 0?void 0:m[p],{schemaId:S}=this.opts;E&&(v=new o({schema:E,schemaId:S,root:f,baseId:g}))}if(v!==void 0)return f.refs[p]=l.call(this,v)}He.resolveRef=
486
+ u;function l(f){return(0,n.inlineRef)(f.schema,this.opts.inlineRefs)?f.schema:f.validate?f:a.call(this,f)}function c(f){for(const g of this._compilations)if(d(g,f))return g}He.getCompilingSchema=c;function d(f,g){return f.schema===g.schema&&f.root===g.root&&f.baseId===g.baseId}function h(f,g){let p;for(;typeof(p=this.refs[g])=="string";)g=p;return p||this.schemas[g]||y.call(this,f,g)}function y(f,g){const p=this.opts.uriResolver.parse(g),m=(0,n._getFullPath)(this.opts.uriResolver,p);let $=(0,n.getFullPath)(
487
+ this.opts.uriResolver,f.baseId,void 0);if(Object.keys(f.schema).length>0&&m===$)return _.call(this,p,f);const v=(0,n.normalizeId)(m),E=this.refs[v]||this.schemas[v];if(typeof E=="string"){const S=y.call(this,f,E);return typeof S?.schema!="object"?void 0:_.call(this,p,S)}if(typeof E?.schema=="object"){if(E.validate||a.call(this,E),v===(0,n.normalizeId)(g)){const{schema:S}=E,{schemaId:I}=this.opts,F=S[I];return F&&($=(0,n.resolveUrl)(this.opts.uriResolver,$,F)),new o({schema:S,schemaId:I,root:f,baseId:$})}
488
+ return _.call(this,p,E)}}He.resolveSchema=y;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function _(f,{baseId:g,schema:p,root:m}){var $;if((($=f.fragment)===null||$===void 0?void 0:$[0])!=="/")return;for(const S of f.fragment.slice(1).split("/")){if(typeof p=="boolean")return;const I=p[(0,s.unescapeFragment)(S)];if(I===void 0)return;p=I;const F=typeof p=="object"&&p[this.opts.schemaId];!b.has(S)&&F&&(g=(0,n.resolveUrl)(this.opts.uriResolver,g,F))}let v;
489
+ if(typeof p!="boolean"&&p.$ref&&!(0,s.schemaHasRulesButRef)(p,this.RULES)){const S=(0,n.resolveUrl)(this.opts.uriResolver,g,p.$ref);v=y.call(this,m,S)}const{schemaId:E}=this.opts;if(v=v||new o({schema:p,schemaId:E,root:m,baseId:g}),v.schema!==v.root.schema)return v}return He}const iu="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",ou="Meta-schema for $data reference (JSON AnySchema extension proposal)",au="object",cu=["$data"],uu={$data:{type:"string",anyOf:[{format:"\
490
+ relative-json-pointer"},{format:"json-pointer"}]}},lu=!1,lg={$id:iu,description:ou,type:au,required:cu,properties:uu,additionalProperties:lu},fg={__proto__:null,$id:iu,additionalProperties:lu,default:lg,description:ou,properties:uu,required:cu,type:au},dg=nt(fg);var dn={},Ar={exports:{}},Li,fu;function hg(){return fu||(fu=1,Li={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}}),Li}var Di,du;function pg(){if(du)return Di;du=1;const{HEX:t}=hg(),
491
+ 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(_){if(a(_,".")<3)return{host:_,isIPV4:!1};const f=_.match(e)||[],[g]=f;return g?{host:o(g,"."),isIPV4:!0}:{host:_,isIPV4:!1}}function n(_,f=!1){let g="",p=!0;for(const m of _){if(t[m]===void 0)return;m!=="0"&&p===!0&&(p=!1),p||(g+=m)}return f&&g.length===0&&(g="0"),g}function s(_){let f=0;const g={error:!1,address:"",zone:""},p=[],m=[];let $=!1,v=!1,E=!1;function S(){if(m.length){if($===!1){const I=n(
492
+ m);if(I!==void 0)p.push(I);else return g.error=!0,!1}m.length=0}return!0}for(let I=0;I<_.length;I++){const F=_[I];if(!(F==="["||F==="]"))if(F===":"){if(v===!0&&(E=!0),!S())break;if(f++,p.push(":"),f>7){g.error=!0;break}I-1>=0&&_[I-1]===":"&&(v=!0);continue}else if(F==="%"){if(!S())break;$=!0}else{m.push(F);continue}}return m.length&&($?g.zone=m.join(""):E?p.push(m.join("")):p.push(n(m))),g.address=p.join(""),g}function i(_){if(a(_,":")<2)return{host:_,isIPV6:!1};const f=s(_);if(f.error)return{host:_,
493
+ isIPV6:!1};{let g=f.address,p=f.address;return f.zone&&(g+="%"+f.zone,p+="%25"+f.zone),{host:g,escapedHost:p,isIPV6:!0}}}function o(_,f){let g="",p=!0;const m=_.length;for(let $=0;$<m;$++){const v=_[$];v==="0"&&p?($+1<=m&&_[$+1]===f||$+1===m)&&(g+=v,p=!1):(v===f?p=!0:p=!1,g+=v)}return g}function a(_,f){let g=0;for(let p=0;p<_.length;p++)_[p]===f&&g++;return g}const u=/^\.\.?\//u,l=/^\/\.(?:\/|$)/u,c=/^\/\.\.(?:\/|$)/u,d=/^\/?(?:.|\n)*?(?=\/|$)/u;function h(_){const f=[];for(;_.length;)if(_.match(
494
+ u))_=_.replace(u,"");else if(_.match(l))_=_.replace(l,"/");else if(_.match(c))_=_.replace(c,"/"),f.pop();else if(_==="."||_==="..")_="";else{const g=_.match(d);if(g){const p=g[0];_=_.slice(p.length),f.push(p)}else throw new Error("Unexpected dot segment condition")}return f.join("")}function y(_,f){const g=f!==!0?escape:unescape;return _.scheme!==void 0&&(_.scheme=g(_.scheme)),_.userinfo!==void 0&&(_.userinfo=g(_.userinfo)),_.host!==void 0&&(_.host=g(_.host)),_.path!==void 0&&(_.path=g(_.path)),
495
+ _.query!==void 0&&(_.query=g(_.query)),_.fragment!==void 0&&(_.fragment=g(_.fragment)),_}function b(_){const f=[];if(_.userinfo!==void 0&&(f.push(_.userinfo),f.push("@")),_.host!==void 0){let g=unescape(_.host);const p=r(g);if(p.isIPV4)g=p.host;else{const m=i(p.host);m.isIPV6===!0?g=`[${m.escapedHost}]`:g=_.host}f.push(g)}return(typeof _.port=="number"||typeof _.port=="string")&&(f.push(":"),f.push(String(_.port))),f.length?f.join(""):void 0}return Di={recomposeAuthority:b,normalizeComponentEncoding:y,
496
+ removeDotSegments:h,normalizeIPv4:r,normalizeIPv6:i,stringArrayToHexStripped:n},Di}var xi,hu;function mg(){if(hu)return xi;hu=1;const t=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(p){return typeof p.secure=="boolean"?p.secure:String(p.scheme).toLowerCase()==="wss"}function n(p){return p.host||(p.error=p.error||"HTTP URIs must have a host."),p}function s(p){const m=String(p.scheme).toLowerCase()==="\
497
+ https";return(p.port===(m?443:80)||p.port==="")&&(p.port=void 0),p.path||(p.path="/"),p}function i(p){return p.secure=r(p),p.resourceName=(p.path||"/")+(p.query?"?"+p.query:""),p.path=void 0,p.query=void 0,p}function o(p){if((p.port===(r(p)?443:80)||p.port==="")&&(p.port=void 0),typeof p.secure=="boolean"&&(p.scheme=p.secure?"wss":"ws",p.secure=void 0),p.resourceName){const[m,$]=p.resourceName.split("?");p.path=m&&m!=="/"?m:void 0,p.query=$,p.resourceName=void 0}return p.fragment=void 0,p}function a(p,m){
498
+ if(!p.path)return p.error="URN can not be parsed",p;const $=p.path.match(e);if($){const v=m.scheme||p.scheme||"urn";p.nid=$[1].toLowerCase(),p.nss=$[2];const E=`${v}:${m.nid||p.nid}`,S=g[E];p.path=void 0,S&&(p=S.parse(p,m))}else p.error=p.error||"URN can not be parsed.";return p}function u(p,m){const $=m.scheme||p.scheme||"urn",v=p.nid.toLowerCase(),E=`${$}:${m.nid||v}`,S=g[E];S&&(p=S.serialize(p,m));const I=p,F=p.nss;return I.path=`${v||m.nid}:${F}`,m.skipEscape=!0,I}function l(p,m){const $=p;return $.
499
+ uuid=$.nss,$.nss=void 0,!m.tolerant&&(!$.uuid||!t.test($.uuid))&&($.error=$.error||"UUID is not valid."),$}function c(p){const m=p;return m.nss=(p.uuid||"").toLowerCase(),m}const d={scheme:"http",domainHost:!0,parse:n,serialize:s},h={scheme:"https",domainHost:d.domainHost,parse:n,serialize:s},y={scheme:"ws",domainHost:!0,parse:i,serialize:o},b={scheme:"wss",domainHost:y.domainHost,parse:y.parse,serialize:y.serialize},g={http:d,https:h,ws:y,wss:b,urn:{scheme:"urn",parse:a,serialize:u,skipNormalize:!0},
500
+ "urn:uuid":{scheme:"urn:uuid",parse:l,serialize:c,skipNormalize:!0}};return xi=g,xi}var pu;function gg(){if(pu)return Ar.exports;pu=1;const{normalizeIPv6:t,normalizeIPv4:e,removeDotSegments:r,recomposeAuthority:n,normalizeComponentEncoding:s}=pg(),i=mg();function o(f,g){return typeof f=="string"?f=c(b(f,g),g):typeof f=="object"&&(f=b(c(f,g),g)),f}function a(f,g,p){const m=Object.assign({scheme:"null"},p),$=u(b(f,m),b(g,m),m,!0);return c($,{...m,skipEscape:!0})}function u(f,g,p,m){const $={};return m||
501
+ (f=b(c(f,p),p),g=b(c(g,p),p)),p=p||{},!p.tolerant&&g.scheme?($.scheme=g.scheme,$.userinfo=g.userinfo,$.host=g.host,$.port=g.port,$.path=r(g.path||""),$.query=g.query):(g.userinfo!==void 0||g.host!==void 0||g.port!==void 0?($.userinfo=g.userinfo,$.host=g.host,$.port=g.port,$.path=r(g.path||""),$.query=g.query):(g.path?(g.path.charAt(0)==="/"?$.path=r(g.path):((f.userinfo!==void 0||f.host!==void 0||f.port!==void 0)&&!f.path?$.path="/"+g.path:f.path?$.path=f.path.slice(0,f.path.lastIndexOf("/")+1)+
502
+ g.path:$.path=g.path,$.path=r($.path)),$.query=g.query):($.path=f.path,g.query!==void 0?$.query=g.query:$.query=f.query),$.userinfo=f.userinfo,$.host=f.host,$.port=f.port),$.scheme=f.scheme),$.fragment=g.fragment,$}function l(f,g,p){return typeof f=="string"?(f=unescape(f),f=c(s(b(f,p),!0),{...p,skipEscape:!0})):typeof f=="object"&&(f=c(s(f,!0),{...p,skipEscape:!0})),typeof g=="string"?(g=unescape(g),g=c(s(b(g,p),!0),{...p,skipEscape:!0})):typeof g=="object"&&(g=c(s(g,!0),{...p,skipEscape:!0})),
503
+ f.toLowerCase()===g.toLowerCase()}function c(f,g){const p={host:f.host,scheme:f.scheme,userinfo:f.userinfo,port:f.port,path:f.path,query:f.query,nid:f.nid,nss:f.nss,uuid:f.uuid,fragment:f.fragment,reference:f.reference,resourceName:f.resourceName,secure:f.secure,error:""},m=Object.assign({},g),$=[],v=i[(m.scheme||p.scheme||"").toLowerCase()];v&&v.serialize&&v.serialize(p,m),p.path!==void 0&&(m.skipEscape?p.path=unescape(p.path):(p.path=escape(p.path),p.scheme!==void 0&&(p.path=p.path.split("%3A").
504
+ join(":")))),m.reference!=="suffix"&&p.scheme&&$.push(p.scheme,":");const E=n(p);if(E!==void 0&&(m.reference!=="suffix"&&$.push("//"),$.push(E),p.path&&p.path.charAt(0)!=="/"&&$.push("/")),p.path!==void 0){let S=p.path;!m.absolutePath&&(!v||!v.absolutePath)&&(S=r(S)),E===void 0&&(S=S.replace(/^\/\//u,"/%2F")),$.push(S)}return p.query!==void 0&&$.push("?",p.query),p.fragment!==void 0&&$.push("#",p.fragment),$.join("")}const d=Array.from({length:127},(f,g)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.
505
+ fromCharCode(g)));function h(f){let g=0;for(let p=0,m=f.length;p<m;++p)if(g=f.charCodeAt(p),g>126||d[g])return!0;return!1}const y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(f,g){const p=Object.assign({},g),m={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},$=f.indexOf("%")!==-1;let v=!1;p.reference==="suffix"&&(f=(p.scheme?p.scheme+":":"")+"//"+f);const E=f.match(
506
+ y);if(E){if(m.scheme=E[1],m.userinfo=E[3],m.host=E[4],m.port=parseInt(E[5],10),m.path=E[6]||"",m.query=E[7],m.fragment=E[8],isNaN(m.port)&&(m.port=E[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=
507
+ "uri",p.reference&&p.reference!=="suffix"&&p.reference!==m.reference&&(m.error=m.error||"URI is not a "+p.reference+" reference.");const S=i[(p.scheme||m.scheme||"").toLowerCase()];if(!p.unicodeSupport&&(!S||!S.unicodeSupport)&&m.host&&(p.domainHost||S&&S.domainHost)&&v===!1&&h(m.host))try{m.host=URL.domainToASCII(m.host.toLowerCase())}catch(I){m.error=m.error||"Host's domain name can not be converted to ASCII: "+I}(!S||S&&!S.skipNormalize)&&($&&m.scheme!==void 0&&(m.scheme=unescape(m.scheme)),$&&
508
+ m.host!==void 0&&(m.host=unescape(m.host)),m.path&&(m.path=escape(unescape(m.path))),m.fragment&&(m.fragment=encodeURI(decodeURIComponent(m.fragment)))),S&&S.parse&&S.parse(m,p)}else m.error=m.error||"URI can not be parsed.";return m}const _={SCHEMES:i,normalize:o,resolve:a,resolveComponents:u,equal:l,serialize:c,parse:b};return Ar.exports=_,Ar.exports.default=_,Ar.exports.fastUri=_,Ar.exports}var mu;function yg(){if(mu)return dn;mu=1,Object.defineProperty(dn,"__esModule",{value:!0});const t=gg();
509
+ return t.code='require("ajv/dist/runtime/uri").default',dn.default=t,dn}var gu;function yu(){return gu||(gu=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=Sr();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.
510
+ 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=un(),s=Rr(),i=zc(),o=fn(),a=he(),u=an(),l=on(),c=ye(),d=dg,h=yg(),y=(U,A)=>new RegExp(U,A);y.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],_=new Set(
897
511
  ["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),f={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:\
898
512
  {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."},
899
- g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},p=200;function m(q){var C,H,k,w,A,R,J,Z,oe,ae,T,x,Q,ie,O,P,ee,W,F,re,V,ne,fe,we,Oe;const vt=q.strict,Ft=(C=q.code)===null||C===void 0?void 0:C.optimize,ja=Ft===!0||Ft===void 0?1:Ft||0,ka=(k=(H=q.code)===null||H===void 0?void 0:H.regExp)!==null&&k!==void 0?k:E,yp=(w=q.uriResolver)!==null&&w!==void 0?w:h.default;return{strictSchema:(R=(A=q.strictSchema)!==null&&A!==void 0?A:
900
- vt)!==null&&R!==void 0?R:!0,strictNumbers:(Z=(J=q.strictNumbers)!==null&&J!==void 0?J:vt)!==null&&Z!==void 0?Z:!0,strictTypes:(ae=(oe=q.strictTypes)!==null&&oe!==void 0?oe:vt)!==null&&ae!==void 0?ae:"log",strictTuples:(x=(T=q.strictTuples)!==null&&T!==void 0?T:vt)!==null&&x!==void 0?x:"log",strictRequired:(ie=(Q=q.strictRequired)!==null&&Q!==void 0?Q:vt)!==null&&ie!==void 0?ie:!1,code:q.code?{...q.code,optimize:ja,regExp:ka}:{optimize:ja,regExp:ka},loopRequired:(O=q.loopRequired)!==null&&O!==void 0?
901
- O:p,loopEnum:(P=q.loopEnum)!==null&&P!==void 0?P:p,meta:(ee=q.meta)!==null&&ee!==void 0?ee:!0,messages:(W=q.messages)!==null&&W!==void 0?W:!0,inlineRefs:(F=q.inlineRefs)!==null&&F!==void 0?F:!0,schemaId:(re=q.schemaId)!==null&&re!==void 0?re:"$id",addUsedSchema:(V=q.addUsedSchema)!==null&&V!==void 0?V:!0,validateSchema:(ne=q.validateSchema)!==null&&ne!==void 0?ne:!0,validateFormats:(fe=q.validateFormats)!==null&&fe!==void 0?fe:!0,unicodeRegExp:(we=q.unicodeRegExp)!==null&&we!==void 0?we:!0,int32range:(Oe=
902
- q.int32range)!==null&&Oe!==void 0?Oe:!0,uriResolver:yp}}class D{constructor(C={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,C=this.opts={...C,...m(C)};const{es5:H,lines:k}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:y,es5:H,lines:k}),this.logger=B(C.logger);const w=C.validateFormats;C.validateFormats=!1,this.RULES=(0,s.getRules)(),v.call(this,f,C,"NOT SUPPORTED"),v.call(this,g,C,"DEPRECATED","warn"),this._metaOpts=
903
- G.call(this),C.formats&&I.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),C.keywords&&U.call(this,C.keywords),typeof C.meta=="object"&&this.addMetaSchema(C.meta),b.call(this),C.validateFormats=w}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:C,meta:H,schemaId:k}=this.opts;let w=d;k==="id"&&(w={...d},w.id=w.$id,delete w.$id),H&&C&&this.addMetaSchema(w,w[k],!1)}defaultMeta(){const{meta:C,schemaId:H}=this.opts;return this.opts.defaultMeta=typeof C==
904
- "object"?C[H]||C:void 0}validate(C,H){let k;if(typeof C=="string"){if(k=this.getSchema(C),!k)throw new Error(`no schema with key or ref "${C}"`)}else k=this.compile(C);const w=k(H);return"$async"in k||(this.errors=k.errors),w}compile(C,H){const k=this._addSchema(C,H);return k.validate||this._compileSchemaEnv(k)}compileAsync(C,H){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:k}=this.opts;return w.call(this,C,H);async function w(ae,T){
905
- await A.call(this,ae.$schema);const x=this._addSchema(ae,T);return x.validate||R.call(this,x)}async function A(ae){ae&&!this.getSchema(ae)&&await w.call(this,{$ref:ae},!0)}async function R(ae){try{return this._compileSchemaEnv(ae)}catch(T){if(!(T instanceof i.default))throw T;return J.call(this,T),await Z.call(this,T.missingSchema),R.call(this,ae)}}function J({missingSchema:ae,missingRef:T}){if(this.refs[ae])throw new Error(`AnySchema ${ae} is loaded but ${T} cannot be resolved`)}async function Z(ae){
906
- const T=await oe.call(this,ae);this.refs[ae]||await A.call(this,T.$schema),this.refs[ae]||this.addSchema(T,ae,H)}async function oe(ae){const T=this._loading[ae];if(T)return T;try{return await(this._loading[ae]=k(ae))}finally{delete this._loading[ae]}}}addSchema(C,H,k,w=this.opts.validateSchema){if(Array.isArray(C)){for(const R of C)this.addSchema(R,void 0,k,w);return this}let A;if(typeof C=="object"){const{schemaId:R}=this.opts;if(A=C[R],A!==void 0&&typeof A!="string")throw new Error(`schema ${R}\
907
- must be string`)}return H=(0,u.normalizeId)(H||A),this._checkUnique(H),this.schemas[H]=this._addSchema(C,k,H,w,!0),this}addMetaSchema(C,H,k=this.opts.validateSchema){return this.addSchema(C,H,!0,k),this}validateSchema(C,H){if(typeof C=="boolean")return!0;let k;if(k=C.$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 w=this.validate(
908
- k,C);if(!w&&H){const A="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(A);else throw new Error(A)}return w}getSchema(C){let H;for(;typeof(H=_.call(this,C))=="string";)C=H;if(H===void 0){const{schemaId:k}=this.opts,w=new o.SchemaEnv({schema:{},schemaId:k});if(H=o.resolveSchema.call(this,w,C),!H)return;this.refs[C]=H}return H.validate||this._compileSchemaEnv(H)}removeSchema(C){if(C instanceof RegExp)return this._removeAllSchemas(this.schemas,C),this._removeAllSchemas(
909
- this.refs,C),this;switch(typeof C){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const H=_.call(this,C);return typeof H=="object"&&this._cache.delete(H.schema),delete this.schemas[C],delete this.refs[C],this}case"object":{const H=C;this._cache.delete(H);let k=C[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: inval\
910
- id parameter")}}addVocabulary(C){for(const H of C)this.addKeyword(H);return this}addKeyword(C,H){let k;if(typeof C=="string")k=C,typeof H=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),H.keyword=k);else if(typeof C=="object"&&H===void 0){if(H=C,k=H.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(j.call(this,k,H),!H)return(0,c.eachItem)(
911
- k,A=>M.call(this,A)),this;z.call(this,H);const w={...H,type:(0,l.getJSONTypes)(H.type),schemaType:(0,l.getJSONTypes)(H.schemaType)};return(0,c.eachItem)(k,w.type.length===0?A=>M.call(this,A,w):A=>w.type.forEach(R=>M.call(this,A,w,R))),this}getKeyword(C){const H=this.RULES.all[C];return typeof H=="object"?H.definition:!!H}removeKeyword(C){const{RULES:H}=this;delete H.keywords[C],delete H.all[C];for(const k of H.rules){const w=k.rules.findIndex(A=>A.keyword===C);w>=0&&k.rules.splice(w,1)}return this}addFormat(C,H){
912
- return typeof H=="string"&&(H=new RegExp(H)),this.formats[C]=H,this}errorsText(C=this.errors,{separator:H=", ",dataVar:k="data"}={}){return!C||C.length===0?"No errors":C.map(w=>`${k}${w.instancePath} ${w.message}`).reduce((w,A)=>w+H+A)}$dataMetaSchema(C,H){const k=this.RULES.all;C=JSON.parse(JSON.stringify(C));for(const w of H){const A=w.split("/").slice(1);let R=C;for(const J of A)R=R[J];for(const J in k){const Z=k[J];if(typeof Z!="object")continue;const{$data:oe}=Z.definition,ae=R[J];oe&&ae&&(R[J]=
913
- se(ae))}}return C}_removeAllSchemas(C,H){for(const k in C){const w=C[k];(!H||H.test(k))&&(typeof w=="string"?delete C[k]:w&&!w.meta&&(this._cache.delete(w.schema),delete C[k]))}}_addSchema(C,H,k,w=this.opts.validateSchema,A=this.opts.addUsedSchema){let R;const{schemaId:J}=this.opts;if(typeof C=="object")R=C[J];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof C!="boolean")throw new Error("schema must be object or boolean")}let Z=this._cache.get(C);if(Z!==void 0)return Z;k=
914
- (0,u.normalizeId)(R||k);const oe=u.getSchemaRefs.call(this,C,k);return Z=new o.SchemaEnv({schema:C,schemaId:J,meta:H,baseId:k,localRefs:oe}),this._cache.set(Z.schema,Z),A&&!k.startsWith("#")&&(k&&this._checkUnique(k),this.refs[k]=Z),w&&this.validateSchema(C,!0),Z}_checkUnique(C){if(this.schemas[C]||this.refs[C])throw new Error(`schema with key or id "${C}" already exists`)}_compileSchemaEnv(C){if(C.meta?this._compileMetaSchema(C):o.compileSchema.call(this,C),!C.validate)throw new Error("ajv impl\
915
- ementation error");return C.validate}_compileMetaSchema(C){const H=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,C)}finally{this.opts=H}}}D.ValidationError=n.default,D.MissingRefError=i.default,t.default=D;function v(q,C,H,k="error"){for(const w in q){const A=w;A in C&&this.logger[k](`${H}: option ${w}. ${q[A]}`)}}function _(q){return q=(0,u.normalizeId)(q),this.schemas[q]||this.refs[q]}function b(){const q=this.opts.schemas;if(q)if(Array.isArray(q))this.addSchema(q);else for(const C in q)
916
- this.addSchema(q[C],C)}function I(){for(const q in this.opts.formats){const C=this.opts.formats[q];C&&this.addFormat(q,C)}}function U(q){if(Array.isArray(q)){this.addVocabulary(q);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const C in q){const H=q[C];H.keyword||(H.keyword=C),this.addKeyword(H)}}function G(){const q={...this.opts};for(const C of $)delete q[C];return q}const L={log(){},warn(){},error(){}};function B(q){if(q===!1)return L;if(q===void 0)return console;
917
- if(q.log&&q.warn&&q.error)return q;throw new Error("logger must implement log, warn and error methods")}const N=/^[a-z_$][a-z0-9_$:-]*$/i;function j(q,C){const{RULES:H}=this;if((0,c.eachItem)(q,k=>{if(H.keywords[k])throw new Error(`Keyword ${k} is already defined`);if(!N.test(k))throw new Error(`Keyword ${k} has invalid name`)}),!!C&&C.$data&&!("code"in C||"validate"in C))throw new Error('$data keyword must have "code" or "validate" function')}function M(q,C,H){var k;const w=C?.post;if(H&&w)throw new Error(
918
- 'keyword with "post" flag cannot have "type"');const{RULES:A}=this;let R=w?A.post:A.rules.find(({type:Z})=>Z===H);if(R||(R={type:H,rules:[]},A.rules.push(R)),A.keywords[q]=!0,!C)return;const J={keyword:q,definition:{...C,type:(0,l.getJSONTypes)(C.type),schemaType:(0,l.getJSONTypes)(C.schemaType)}};C.before?Y.call(this,R,J,C.before):R.rules.push(J),A.all[q]=J,(k=C.implements)===null||k===void 0||k.forEach(Z=>this.addKeyword(Z))}function Y(q,C,H){const k=q.rules.findIndex(w=>w.keyword===H);k>=0?q.
919
- rules.splice(k,0,C):(q.rules.push(C),this.logger.warn(`rule ${H} is not defined`))}function z(q){let{metaSchema:C}=q;C!==void 0&&(q.$data&&this.opts.$data&&(C=se(C)),q.validateSchema=this.compile(C,!0))}const X={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function se(q){return{anyOf:[q,X]}}}(yo)),yo}var zn={},Gn={},Wn={},Sl;function Py(){if(Sl)return Wn;Sl=1,Object.defineProperty(Wn,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('\
920
- NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Wn.default=t,Wn}var Ht={},Rl;function So(){if(Rl)return Ht;Rl=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.callRef=Ht.getValidate=void 0;const t=Zr(),e=ft(),r=pe(),n=ct(),i=Hn(),s=_e(),o={keyword:"$ref",schemaType:"string",code(l){const{gen:c,schema:d,it:h}=l,{baseId:E,schemaEnv:$,validateName:y,opts:f,self:g}=h,{root:p}=$;if((d==="#"||d==="#/")&&E===p.baseId)return D();const m=i.resolveRef.call(g,p,E,d);if(m===void 0)throw new t.
921
- default(h.opts.uriResolver,E,d);if(m instanceof i.SchemaEnv)return v(m);return _(m);function D(){if($===p)return u(l,y,$,$.$async);const b=c.scopeValue("root",{ref:p});return u(l,(0,r._)`${b}.validate`,p,p.$async)}function v(b){const I=a(l,b);u(l,I,b,b.$async)}function _(b){const I=c.scopeValue("schema",f.code.source===!0?{ref:b,code:(0,r.stringify)(b)}:{ref:b}),U=c.name("valid"),G=l.subschema({schema:b,dataTypes:[],schemaPath:r.nil,topSchemaRef:I,errSchemaPath:d},U);l.mergeEvaluated(G),l.ok(U)}}};
922
- function a(l,c){const{gen:d}=l;return c.validate?d.scopeValue("validate",{ref:c.validate}):(0,r._)`${d.scopeValue("wrapper",{ref:c})}.validate`}Ht.getValidate=a;function u(l,c,d,h){const{gen:E,it:$}=l,{allErrors:y,schemaEnv:f,opts:g}=$,p=g.passContext?n.default.this:r.nil;h?m():D();function m(){if(!f.$async)throw new Error("async schema referenced by sync schema");const b=E.let("valid");E.try(()=>{E.code((0,r._)`await ${(0,e.callValidateCode)(l,c,p)}`),_(c),y||E.assign(b,!0)},I=>{E.if((0,r._)`!(${I} instanceof ${$.
923
- ValidationError})`,()=>E.throw(I)),v(I),y||E.assign(b,!1)}),l.ok(b)}function D(){l.result((0,e.callValidateCode)(l,c,p),()=>_(c),()=>v(c))}function v(b){const I=(0,r._)`${b}.errors`;E.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${I} : ${n.default.vErrors}.concat(${I})`),E.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function _(b){var I;if(!$.opts.unevaluated)return;const U=(I=d?.validate)===null||I===void 0?void 0:I.evaluated;if($.props!==!0)if(U&&!U.dynamicProps)
924
- U.props!==void 0&&($.props=s.mergeEvaluated.props(E,U.props,$.props));else{const G=E.var("props",(0,r._)`${b}.evaluated.props`);$.props=s.mergeEvaluated.props(E,G,$.props,r.Name)}if($.items!==!0)if(U&&!U.dynamicItems)U.items!==void 0&&($.items=s.mergeEvaluated.items(E,U.items,$.items));else{const G=E.var("items",(0,r._)`${b}.evaluated.items`);$.items=s.mergeEvaluated.items(E,G,$.items,r.Name)}}}return Ht.callRef=u,Ht.default=o,Ht}var Ol;function Il(){if(Ol)return Gn;Ol=1,Object.defineProperty(Gn,
925
- "__esModule",{value:!0});const t=Py(),e=So(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return Gn.default=r,Gn}var Kn={},Yn={},Fl;function Ny(){if(Fl)return Yn;Fl=1,Object.defineProperty(Yn,"__esModule",{value:!0});const t=pe(),e=t.operators,r={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},n={message:({keyword:s,schemaCode:o})=>(0,t.
926
- str)`must be ${r[s].okStr} ${o}`,params:({keyword:s,schemaCode:o})=>(0,t._)`{comparison: ${r[s].okStr}, limit: ${o}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(s){const{keyword:o,data:a,schemaCode:u}=s;s.fail$data((0,t._)`${a} ${r[o].fail} ${u} || isNaN(${a})`)}};return Yn.default=i,Yn}var Jn={},Pl;function Ty(){if(Pl)return Jn;Pl=1,Object.defineProperty(Jn,"__esModule",{value:!0});const t=pe(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,
927
- error:{message:({schemaCode:n})=>(0,t.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,t._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:s,schemaCode:o,it:a}=n,u=a.opts.multipleOfPrecision,l=i.let("res"),c=u?(0,t._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${u}`:(0,t._)`${l} !== parseInt(${l})`;n.fail$data((0,t._)`(${o} === 0 || (${l} = ${s}/${o}, ${c}))`)}};return Jn.default=r,Jn}var Xn={},Qn={},Nl;function Ly(){if(Nl)return Qn;Nl=1,Object.defineProperty(Qn,"__esModule",{value:!0});function t(e){
928
- const r=e.length;let n=0,i=0,s;for(;i<r;)n++,s=e.charCodeAt(i++),s>=55296&&s<=56319&&i<r&&(s=e.charCodeAt(i),(s&64512)===56320&&i++);return n}return Qn.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',Qn}var Tl;function jy(){if(Tl)return Xn;Tl=1,Object.defineProperty(Xn,"__esModule",{value:!0});const t=pe(),e=_e(),r=Ly(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:o}){const a=s==="maxLength"?"more":"fewer";
929
- return(0,t.str)`must NOT have ${a} than ${o} characters`},params:({schemaCode:s})=>(0,t._)`{limit: ${s}}`},code(s){const{keyword:o,data:a,schemaCode:u,it:l}=s,c=o==="maxLength"?t.operators.GT:t.operators.LT,d=l.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,e.useFunc)(s.gen,r.default)}(${a})`;s.fail$data((0,t._)`${d} ${c} ${u}`)}};return Xn.default=i,Xn}var Zn={},Ll;function ky(){if(Ll)return Zn;Ll=1,Object.defineProperty(Zn,"__esModule",{value:!0});const t=ft(),e=pe(),n={keyword:"pattern",
930
- type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,e._)`{pattern: ${i}}`},code(i){const{data:s,$data:o,schema:a,schemaCode:u,it:l}=i,c=l.opts.unicodeRegExp?"u":"",d=o?(0,e._)`(new RegExp(${u}, ${c}))`:(0,t.usePattern)(i,a);i.fail$data((0,e._)`!${d}.test(${s})`)}};return Zn.default=n,Zn}var ei={},jl;function By(){if(jl)return ei;jl=1,Object.defineProperty(ei,"__esModule",{value:!0});const t=pe(),r={keyword:[
931
- "maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const s=n==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${s} than ${i} properties`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:i,data:s,schemaCode:o}=n,a=i==="maxProperties"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`Object.keys(${s}).length ${a} ${o}`)}};return ei.default=r,ei}var ti={},kl;function xy(){if(kl)return ti;kl=1,Object.
932
- defineProperty(ti,"__esModule",{value:!0});const t=ft(),e=pe(),r=_e(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,e.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,e._)`{missingProperty: ${s}}`},code(s){const{gen:o,schema:a,schemaCode:u,data:l,$data:c,it:d}=s,{opts:h}=d;if(!c&&a.length===0)return;const E=a.length>=h.loopRequired;if(d.allErrors?$():y(),h.strictRequired){const p=s.parentSchema.
933
- properties,{definedProperties:m}=s.it;for(const D of a)if(p?.[D]===void 0&&!m.has(D)){const v=d.schemaEnv.baseId+d.errSchemaPath,_=`required property "${D}" is not defined at "${v}" (strictRequired)`;(0,r.checkStrictMode)(d,_,d.opts.strictRequired)}}function $(){if(E||c)s.block$data(e.nil,f);else for(const p of a)(0,t.checkReportMissingProp)(s,p)}function y(){const p=o.let("missing");if(E||c){const m=o.let("valid",!0);s.block$data(m,()=>g(p,m)),s.ok(m)}else o.if((0,t.checkMissingProp)(s,a,p)),(0,t.
934
- reportMissingProp)(s,p),o.else()}function f(){o.forOf("prop",u,p=>{s.setParams({missingProperty:p}),o.if((0,t.noPropertyInData)(o,l,p,h.ownProperties),()=>s.error())})}function g(p,m){s.setParams({missingProperty:p}),o.forOf(p,u,()=>{o.assign(m,(0,t.propertyInData)(o,l,p,h.ownProperties)),o.if((0,e.not)(m),()=>{s.error(),o.break()})},e.nil)}}};return ti.default=i,ti}var ri={},Bl;function My(){if(Bl)return ri;Bl=1,Object.defineProperty(ri,"__esModule",{value:!0});const t=pe(),r={keyword:["maxItem\
935
- s","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const s=n==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${s} than ${i} items`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:i,data:s,schemaCode:o}=n,a=i==="maxItems"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`${s}.length ${a} ${o}`)}};return ri.default=r,ri}var ni={},ii={},xl;function Ro(){if(xl)return ii;xl=1,Object.defineProperty(ii,"__esModule",{value:!0});
936
- const t=al();return t.code='require("ajv/dist/runtime/equal").default',ii.default=t,ii}var Ml;function qy(){if(Ml)return ni;Ml=1,Object.defineProperty(ni,"__esModule",{value:!0});const t=Bn(),e=pe(),r=_e(),n=Ro(),s={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:u,$data:l,schema:c,
937
- parentSchema:d,schemaCode:h,it:E}=o;if(!l&&!c)return;const $=a.let("valid"),y=d.items?(0,t.getSchemaTypes)(d.items):[];o.block$data($,f,(0,e._)`${h} === false`),o.ok($);function f(){const D=a.let("i",(0,e._)`${u}.length`),v=a.let("j");o.setParams({i:D,j:v}),a.assign($,!0),a.if((0,e._)`${D} > 1`,()=>(g()?p:m)(D,v))}function g(){return y.length>0&&!y.some(D=>D==="object"||D==="array")}function p(D,v){const _=a.name("item"),b=(0,t.checkDataTypes)(y,_,E.opts.strictNumbers,t.DataType.Wrong),I=a.const(
938
- "indices",(0,e._)`{}`);a.for((0,e._)`;${D}--;`,()=>{a.let(_,(0,e._)`${u}[${D}]`),a.if(b,(0,e._)`continue`),y.length>1&&a.if((0,e._)`typeof ${_} == "string"`,(0,e._)`${_} += "_"`),a.if((0,e._)`typeof ${I}[${_}] == "number"`,()=>{a.assign(v,(0,e._)`${I}[${_}]`),o.error(),a.assign($,!1).break()}).code((0,e._)`${I}[${_}] = ${D}`)})}function m(D,v){const _=(0,r.useFunc)(a,n.default),b=a.name("outer");a.label(b).for((0,e._)`;${D}--;`,()=>a.for((0,e._)`${v} = ${D}; ${v}--;`,()=>a.if((0,e._)`${_}(${u}[${D}], ${u}[${v}])`,
939
- ()=>{o.error(),a.assign($,!1).break(b)})))}}};return ni.default=s,ni}var si={},ql;function Uy(){if(ql)return si;ql=1,Object.defineProperty(si,"__esModule",{value:!0});const t=pe(),e=_e(),r=Ro(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,t._)`{allowedValue: ${s}}`},code(s){const{gen:o,data:a,$data:u,schemaCode:l,schema:c}=s;u||c&&typeof c=="object"?s.fail$data((0,t._)`!${(0,e.useFunc)(o,r.default)}(${a}, ${l})`):s.fail((0,t._)`${c} !== ${a}`)}};
940
- return si.default=i,si}var oi={},Ul;function Hy(){if(Ul)return oi;Ul=1,Object.defineProperty(oi,"__esModule",{value:!0});const t=pe(),e=_e(),r=Ro(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,t._)`{allowedValues: ${s}}`},code(s){const{gen:o,data:a,$data:u,schema:l,schemaCode:c,it:d}=s;if(!u&&l.length===0)throw new Error("enum must have non-empty array");const h=l.length>=d.opts.loopEnum;let E;const $=()=>E??
941
- (E=(0,e.useFunc)(o,r.default));let y;if(h||u)y=o.let("valid"),s.block$data(y,f);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const p=o.const("vSchema",c);y=(0,t.or)(...l.map((m,D)=>g(p,D)))}s.pass(y);function f(){o.assign(y,!1),o.forOf("v",c,p=>o.if((0,t._)`${$()}(${a}, ${p})`,()=>o.assign(y,!0).break()))}function g(p,m){const D=l[m];return typeof D=="object"&&D!==null?(0,t._)`${$()}(${a}, ${p}[${m}])`:(0,t._)`${a} === ${D}`}}};return oi.default=i,oi}var Hl;function Vl(){
942
- if(Hl)return Kn;Hl=1,Object.defineProperty(Kn,"__esModule",{value:!0});const t=Ny(),e=Ty(),r=jy(),n=ky(),i=By(),s=xy(),o=My(),a=qy(),u=Uy(),l=Hy(),c=[t.default,e.default,r.default,n.default,i.default,s.default,o.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,l.default];return Kn.default=c,Kn}var ai={},vr={},zl;function Gl(){if(zl)return vr;zl=1,Object.defineProperty(vr,"__esModule",{value:!0}),vr.validateAdditionalItems=void 0;
943
- const t=pe(),e=_e(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",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{parentSchema:o,it:a}=s,{items:u}=o;if(!Array.isArray(u)){(0,e.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(s,u)}};function i(s,o){const{gen:a,schema:u,data:l,keyword:c,it:d}=s;d.items=
944
- !0;const h=a.const("len",(0,t._)`${l}.length`);if(u===!1)s.setParams({len:o.length}),s.pass((0,t._)`${h} <= ${o.length}`);else if(typeof u=="object"&&!(0,e.alwaysValidSchema)(d,u)){const $=a.var("valid",(0,t._)`${h} <= ${o.length}`);a.if((0,t.not)($),()=>E($)),s.ok($)}function E($){a.forRange("i",o.length,h,y=>{s.subschema({keyword:c,dataProp:y,dataPropType:e.Type.Num},$),d.allErrors||a.if((0,t.not)($),()=>a.break())})}}return vr.validateAdditionalItems=i,vr.default=n,vr}var ui={},$r={},Wl;function Kl(){
945
- if(Wl)return $r;Wl=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.validateTuple=void 0;const t=pe(),e=_e(),r=ft(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:o,it:a}=s;if(Array.isArray(o))return i(s,"additionalItems",o);a.items=!0,!(0,e.alwaysValidSchema)(a,o)&&s.ok((0,r.validateArray)(s))}};function i(s,o,a=s.schema){const{gen:u,parentSchema:l,data:c,keyword:d,it:h}=s;y(l),h.opts.unevaluated&&a.length&&h.items!==!0&&(h.
946
- items=e.mergeEvaluated.items(u,a.length,h.items));const E=u.name("valid"),$=u.const("len",(0,t._)`${c}.length`);a.forEach((f,g)=>{(0,e.alwaysValidSchema)(h,f)||(u.if((0,t._)`${$} > ${g}`,()=>s.subschema({keyword:d,schemaProp:g,dataProp:g},E)),s.ok(E))});function y(f){const{opts:g,errSchemaPath:p}=h,m=a.length,D=m===f.minItems&&(m===f.maxItems||f[o]===!1);if(g.strictTuples&&!D){const v=`"${d}" is ${m}-tuple, but minItems or maxItems/${o} are not specified or different at path "${p}"`;(0,e.checkStrictMode)(
947
- h,v,g.strictTuples)}}}return $r.validateTuple=i,$r.default=n,$r}var Yl;function Vy(){if(Yl)return ui;Yl=1,Object.defineProperty(ui,"__esModule",{value:!0});const t=Kl(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return ui.default=e,ui}var ci={},Jl;function zy(){if(Jl)return ci;Jl=1,Object.defineProperty(ci,"__esModule",{value:!0});const t=pe(),e=_e(),r=ft(),n=Gl(),s={keyword:"items",type:"array",schemaType:["object","bo\
948
- 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: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)(o)))}};return ci.default=s,ci}var li={},Xl;function Gy(){if(Xl)return li;Xl=1,Object.defineProperty(li,"__esModule",{value:!0});const t=pe(),e=_e(),n={keyword:"contains",
949
- type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:s}})=>s===void 0?(0,t.str)`must contain at least ${i} valid item(s)`:(0,t.str)`must contain at least ${i} and no more than ${s} valid item(s)`,params:({params:{min:i,max:s}})=>s===void 0?(0,t._)`{minContains: ${i}}`:(0,t._)`{minContains: ${i}, maxContains: ${s}}`},code(i){const{gen:s,schema:o,parentSchema:a,data:u,it:l}=i;let c,d;const{minContains:h,maxContains:E}=a;l.opts.next?(c=
950
- h===void 0?1:h,d=E):c=1;const $=s.const("len",(0,t._)`${u}.length`);if(i.setParams({min:c,max:d}),d===void 0&&c===0){(0,e.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(d!==void 0&&c>d){(0,e.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,e.alwaysValidSchema)(l,o)){let m=(0,t._)`${$} >= ${c}`;d!==void 0&&(m=(0,t._)`${m} && ${$} <= ${d}`),i.pass(m);return}l.items=!0;const y=s.name("valid");d===void 0&&
951
- c===1?g(y,()=>s.if(y,()=>s.break())):c===0?(s.let(y,!0),d!==void 0&&s.if((0,t._)`${u}.length > 0`,f)):(s.let(y,!1),f()),i.result(y,()=>i.reset());function f(){const m=s.name("_valid"),D=s.let("count",0);g(m,()=>s.if(m,()=>p(D)))}function g(m,D){s.forRange("i",0,$,v=>{i.subschema({keyword:"contains",dataProp:v,dataPropType:e.Type.Num,compositeRule:!0},m),D()})}function p(m){s.code((0,t._)`${m}++`),d===void 0?s.if((0,t._)`${m} >= ${c}`,()=>s.assign(y,!0).break()):(s.if((0,t._)`${m} > ${d}`,()=>s.assign(
952
- y,!1).break()),c===1?s.assign(y,!0):s.if((0,t._)`${m} >= ${c}`,()=>s.assign(y,!0)))}}};return li.default=n,li}var Oo={},Ql;function Io(){return Ql||(Ql=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=pe(),r=_e(),n=ft();t.error={message:({params:{property:u,depsCount:l,deps:c}})=>{const d=l===1?"property":"properties";return(0,e.str)`must have ${d} ${c} when property ${u} is present`},params:({params:{property:u,depsCount:l,
513
+ g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},p=200;function m(U){var A,z,M,w,R,C,Y,Q,ie,oe,L,q,J,ne,P,T,Z,W,N,te,V,re,le,_e,we;const ot=U.strict,pt=(A=U.code)===null||A===void 0?void 0:A.optimize,Wo=pt===!0||pt===void 0?1:pt||0,Ko=(M=(z=U.code)===null||z===void 0?void 0:z.regExp)!==null&&M!==void 0?M:y,ch=(w=U.uriResolver)!==null&&w!==void 0?w:h.default;return{strictSchema:(C=(R=U.strictSchema)!==null&&R!==void 0?R:
514
+ ot)!==null&&C!==void 0?C:!0,strictNumbers:(Q=(Y=U.strictNumbers)!==null&&Y!==void 0?Y:ot)!==null&&Q!==void 0?Q:!0,strictTypes:(oe=(ie=U.strictTypes)!==null&&ie!==void 0?ie:ot)!==null&&oe!==void 0?oe:"log",strictTuples:(q=(L=U.strictTuples)!==null&&L!==void 0?L:ot)!==null&&q!==void 0?q:"log",strictRequired:(ne=(J=U.strictRequired)!==null&&J!==void 0?J:ot)!==null&&ne!==void 0?ne:!1,code:U.code?{...U.code,optimize:Wo,regExp:Ko}:{optimize:Wo,regExp:Ko},loopRequired:(P=U.loopRequired)!==null&&P!==void 0?
515
+ P:p,loopEnum:(T=U.loopEnum)!==null&&T!==void 0?T:p,meta:(Z=U.meta)!==null&&Z!==void 0?Z:!0,messages:(W=U.messages)!==null&&W!==void 0?W:!0,inlineRefs:(N=U.inlineRefs)!==null&&N!==void 0?N:!0,schemaId:(te=U.schemaId)!==null&&te!==void 0?te:"$id",addUsedSchema:(V=U.addUsedSchema)!==null&&V!==void 0?V:!0,validateSchema:(re=U.validateSchema)!==null&&re!==void 0?re:!0,validateFormats:(le=U.validateFormats)!==null&&le!==void 0?le:!0,unicodeRegExp:(_e=U.unicodeRegExp)!==null&&_e!==void 0?_e:!0,int32range:(we=
516
+ U.int32range)!==null&&we!==void 0?we:!0,uriResolver:ch}}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:z,lines:M}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:_,es5:z,lines:M}),this.logger=k(A.logger);const w=A.validateFormats;A.validateFormats=!1,this.RULES=(0,i.getRules)(),v.call(this,f,A,"NOT SUPPORTED"),v.call(this,g,A,"DEPRECATED","warn"),this._metaOpts=
517
+ 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=w}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:A,meta:z,schemaId:M}=this.opts;let w=d;M==="id"&&(w={...d},w.id=w.$id,delete w.$id),z&&A&&this.addMetaSchema(w,w[M],!1)}defaultMeta(){const{meta:A,schemaId:z}=this.opts;return this.opts.defaultMeta=typeof A==
518
+ "object"?A[z]||A:void 0}validate(A,z){let M;if(typeof A=="string"){if(M=this.getSchema(A),!M)throw new Error(`no schema with key or ref "${A}"`)}else M=this.compile(A);const w=M(z);return"$async"in M||(this.errors=M.errors),w}compile(A,z){const M=this._addSchema(A,z);return M.validate||this._compileSchemaEnv(M)}compileAsync(A,z){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:M}=this.opts;return w.call(this,A,z);async function w(oe,L){
519
+ 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 w.call(this,{$ref:oe},!0)}async function C(oe){try{return this._compileSchemaEnv(oe)}catch(L){if(!(L instanceof s.default))throw L;return Y.call(this,L),await Q.call(this,L.missingSchema),C.call(this,oe)}}function Y({missingSchema:oe,missingRef:L}){if(this.refs[oe])throw new Error(`AnySchema ${oe} is loaded but ${L} cannot be resolved`)}async function Q(oe){
520
+ const L=await ie.call(this,oe);this.refs[oe]||await R.call(this,L.$schema),this.refs[oe]||this.addSchema(L,oe,z)}async function ie(oe){const L=this._loading[oe];if(L)return L;try{return await(this._loading[oe]=M(oe))}finally{delete this._loading[oe]}}}addSchema(A,z,M,w=this.opts.validateSchema){if(Array.isArray(A)){for(const C of A)this.addSchema(C,void 0,M,w);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}\
521
+ must be string`)}return z=(0,u.normalizeId)(z||R),this._checkUnique(z),this.schemas[z]=this._addSchema(A,M,z,w,!0),this}addMetaSchema(A,z,M=this.opts.validateSchema){return this.addSchema(A,z,!0,M),this}validateSchema(A,z){if(typeof A=="boolean")return!0;let M;if(M=A.$schema,M!==void 0&&typeof M!="string")throw new Error("$schema must be a string");if(M=M||this.opts.defaultMeta||this.defaultMeta(),!M)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const w=this.validate(
522
+ M,A);if(!w&&z){const R="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(R);else throw new Error(R)}return w}getSchema(A){let z;for(;typeof(z=E.call(this,A))=="string";)A=z;if(z===void 0){const{schemaId:M}=this.opts,w=new o.SchemaEnv({schema:{},schemaId:M});if(z=o.resolveSchema.call(this,w,A),!z)return;this.refs[A]=z}return z.validate||this._compileSchemaEnv(z)}removeSchema(A){if(A instanceof RegExp)return this._removeAllSchemas(this.schemas,A),this._removeAllSchemas(
523
+ 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 z=E.call(this,A);return typeof z=="object"&&this._cache.delete(z.schema),delete this.schemas[A],delete this.refs[A],this}case"object":{const z=A;this._cache.delete(z);let M=A[this.opts.schemaId];return M&&(M=(0,u.normalizeId)(M),delete this.schemas[M],delete this.refs[M]),this}default:throw new Error("ajv.removeSchema: inval\
524
+ id parameter")}}addVocabulary(A){for(const z of A)this.addKeyword(z);return this}addKeyword(A,z){let M;if(typeof A=="string")M=A,typeof z=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),z.keyword=M);else if(typeof A=="object"&&z===void 0){if(z=A,M=z.keyword,Array.isArray(M)&&!M.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(x.call(this,M,z),!z)return(0,c.eachItem)(
525
+ M,R=>H.call(this,R)),this;G.call(this,z);const w={...z,type:(0,l.getJSONTypes)(z.type),schemaType:(0,l.getJSONTypes)(z.schemaType)};return(0,c.eachItem)(M,w.type.length===0?R=>H.call(this,R,w):R=>w.type.forEach(C=>H.call(this,R,w,C))),this}getKeyword(A){const z=this.RULES.all[A];return typeof z=="object"?z.definition:!!z}removeKeyword(A){const{RULES:z}=this;delete z.keywords[A],delete z.all[A];for(const M of z.rules){const w=M.rules.findIndex(R=>R.keyword===A);w>=0&&M.rules.splice(w,1)}return this}addFormat(A,z){
526
+ return typeof z=="string"&&(z=new RegExp(z)),this.formats[A]=z,this}errorsText(A=this.errors,{separator:z=", ",dataVar:M="data"}={}){return!A||A.length===0?"No errors":A.map(w=>`${M}${w.instancePath} ${w.message}`).reduce((w,R)=>w+z+R)}$dataMetaSchema(A,z){const M=this.RULES.all;A=JSON.parse(JSON.stringify(A));for(const w of z){const R=w.split("/").slice(1);let C=A;for(const Y of R)C=C[Y];for(const Y in M){const Q=M[Y];if(typeof Q!="object")continue;const{$data:ie}=Q.definition,oe=C[Y];ie&&oe&&(C[Y]=
527
+ se(oe))}}return A}_removeAllSchemas(A,z){for(const M in A){const w=A[M];(!z||z.test(M))&&(typeof w=="string"?delete A[M]:w&&!w.meta&&(this._cache.delete(w.schema),delete A[M]))}}_addSchema(A,z,M,w=this.opts.validateSchema,R=this.opts.addUsedSchema){let C;const{schemaId:Y}=this.opts;if(typeof A=="object")C=A[Y];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 Q=this._cache.get(A);if(Q!==void 0)return Q;M=
528
+ (0,u.normalizeId)(C||M);const ie=u.getSchemaRefs.call(this,A,M);return Q=new o.SchemaEnv({schema:A,schemaId:Y,meta:z,baseId:M,localRefs:ie}),this._cache.set(Q.schema,Q),R&&!M.startsWith("#")&&(M&&this._checkUnique(M),this.refs[M]=Q),w&&this.validateSchema(A,!0),Q}_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\
529
+ ementation error");return A.validate}_compileMetaSchema(A){const z=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,A)}finally{this.opts=z}}}$.ValidationError=n.default,$.MissingRefError=s.default,t.default=$;function v(U,A,z,M="error"){for(const w in U){const R=w;R in A&&this.logger[M](`${z}: option ${w}. ${U[R]}`)}}function E(U){return U=(0,u.normalizeId)(U),this.schemas[U]||this.refs[U]}function S(){const U=this.opts.schemas;if(U)if(Array.isArray(U))this.addSchema(U);else for(const A in U)
530
+ this.addSchema(U[A],A)}function I(){for(const U in this.opts.formats){const A=this.opts.formats[U];A&&this.addFormat(U,A)}}function F(U){if(Array.isArray(U)){this.addVocabulary(U);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const A in U){const z=U[A];z.keyword||(z.keyword=A),this.addKeyword(z)}}function B(){const U={...this.opts};for(const A of b)delete U[A];return U}const D={log(){},warn(){},error(){}};function k(U){if(U===!1)return D;if(U===void 0)return console;
531
+ if(U.log&&U.warn&&U.error)return U;throw new Error("logger must implement log, warn and error methods")}const j=/^[a-z_$][a-z0-9_$:-]*$/i;function x(U,A){const{RULES:z}=this;if((0,c.eachItem)(U,M=>{if(z.keywords[M])throw new Error(`Keyword ${M} is already defined`);if(!j.test(M))throw new Error(`Keyword ${M} has invalid name`)}),!!A&&A.$data&&!("code"in A||"validate"in A))throw new Error('$data keyword must have "code" or "validate" function')}function H(U,A,z){var M;const w=A?.post;if(z&&w)throw new Error(
532
+ 'keyword with "post" flag cannot have "type"');const{RULES:R}=this;let C=w?R.post:R.rules.find(({type:Q})=>Q===z);if(C||(C={type:z,rules:[]},R.rules.push(C)),R.keywords[U]=!0,!A)return;const Y={keyword:U,definition:{...A,type:(0,l.getJSONTypes)(A.type),schemaType:(0,l.getJSONTypes)(A.schemaType)}};A.before?K.call(this,C,Y,A.before):C.rules.push(Y),R.all[U]=Y,(M=A.implements)===null||M===void 0||M.forEach(Q=>this.addKeyword(Q))}function K(U,A,z){const M=U.rules.findIndex(w=>w.keyword===z);M>=0?U.
533
+ rules.splice(M,0,A):(U.rules.push(A),this.logger.warn(`rule ${z} is not defined`))}function G(U){let{metaSchema:A}=U;A!==void 0&&(U.$data&&this.opts.$data&&(A=se(A)),U.validateSchema=this.compile(A,!0))}const X={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function se(U){return{anyOf:[U,X]}}}(Oi)),Oi}var hn={},pn={},mn={},_u;function _g(){if(_u)return mn;_u=1,Object.defineProperty(mn,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('\
534
+ NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return mn.default=t,mn}var wt={},$u;function Mi(){if($u)return wt;$u=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.callRef=wt.getValidate=void 0;const t=Rr(),e=Qe(),r=he(),n=Xe(),s=fn(),i=ye(),o={keyword:"$ref",schemaType:"string",code(l){const{gen:c,schema:d,it:h}=l,{baseId:y,schemaEnv:b,validateName:_,opts:f,self:g}=h,{root:p}=b;if((d==="#"||d==="#/")&&y===p.baseId)return $();const m=s.resolveRef.call(g,p,y,d);if(m===void 0)throw new t.
535
+ default(h.opts.uriResolver,y,d);if(m instanceof s.SchemaEnv)return v(m);return E(m);function $(){if(b===p)return u(l,_,b,b.$async);const S=c.scopeValue("root",{ref:p});return u(l,(0,r._)`${S}.validate`,p,p.$async)}function v(S){const I=a(l,S);u(l,I,S,S.$async)}function E(S){const I=c.scopeValue("schema",f.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:d},F);l.mergeEvaluated(B),l.ok(F)}}};
536
+ function a(l,c){const{gen:d}=l;return c.validate?d.scopeValue("validate",{ref:c.validate}):(0,r._)`${d.scopeValue("wrapper",{ref:c})}.validate`}wt.getValidate=a;function u(l,c,d,h){const{gen:y,it:b}=l,{allErrors:_,schemaEnv:f,opts:g}=b,p=g.passContext?n.default.this:r.nil;h?m():$();function m(){if(!f.$async)throw new Error("async schema referenced by sync schema");const S=y.let("valid");y.try(()=>{y.code((0,r._)`await ${(0,e.callValidateCode)(l,c,p)}`),E(c),_||y.assign(S,!0)},I=>{y.if((0,r._)`!(${I} instanceof ${b.
537
+ ValidationError})`,()=>y.throw(I)),v(I),_||y.assign(S,!1)}),l.ok(S)}function $(){l.result((0,e.callValidateCode)(l,c,p),()=>E(c),()=>v(c))}function v(S){const I=(0,r._)`${S}.errors`;y.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${I} : ${n.default.vErrors}.concat(${I})`),y.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function E(S){var I;if(!b.opts.unevaluated)return;const F=(I=d?.validate)===null||I===void 0?void 0:I.evaluated;if(b.props!==!0)if(F&&!F.dynamicProps)
538
+ F.props!==void 0&&(b.props=i.mergeEvaluated.props(y,F.props,b.props));else{const B=y.var("props",(0,r._)`${S}.evaluated.props`);b.props=i.mergeEvaluated.props(y,B,b.props,r.Name)}if(b.items!==!0)if(F&&!F.dynamicItems)F.items!==void 0&&(b.items=i.mergeEvaluated.items(y,F.items,b.items));else{const B=y.var("items",(0,r._)`${S}.evaluated.items`);b.items=i.mergeEvaluated.items(y,B,b.items,r.Name)}}}return wt.callRef=u,wt.default=o,wt}var vu;function bu(){if(vu)return pn;vu=1,Object.defineProperty(pn,
539
+ "__esModule",{value:!0});const t=_g(),e=Mi(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return pn.default=r,pn}var gn={},yn={},wu;function $g(){if(wu)return yn;wu=1,Object.defineProperty(yn,"__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.
540
+ 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((0,t._)`${a} ${r[o].fail} ${u} || isNaN(${a})`)}};return yn.default=s,yn}var _n={},Eu;function vg(){if(Eu)return _n;Eu=1,Object.defineProperty(_n,"__esModule",{value:!0});const t=he(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,
541
+ 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}`:(0,t._)`${l} !== parseInt(${l})`;n.fail$data((0,t._)`(${o} === 0 || (${l} = ${i}/${o}, ${c}))`)}};return _n.default=r,_n}var $n={},vn={},Su;function bg(){if(Su)return vn;Su=1,Object.defineProperty(vn,"__esModule",{value:!0});function t(e){
542
+ 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 vn.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',vn}var Ru;function wg(){if(Ru)return $n;Ru=1,Object.defineProperty($n,"__esModule",{value:!0});const t=he(),e=ye(),r=bg(),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:o}){const a=i==="maxLength"?"more":"fewer";
543
+ 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,d=l.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,e.useFunc)(i.gen,r.default)}(${a})`;i.fail$data((0,t._)`${d} ${c} ${u}`)}};return $n.default=s,$n}var bn={},Au;function Eg(){if(Au)return bn;Au=1,Object.defineProperty(bn,"__esModule",{value:!0});const t=Qe(),e=he(),n={keyword:"pattern",
544
+ 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":"",d=o?(0,e._)`(new RegExp(${u}, ${c}))`:(0,t.usePattern)(s,a);s.fail$data((0,e._)`!${d}.test(${i})`)}};return bn.default=n,bn}var wn={},Ou;function Sg(){if(Ou)return wn;Ou=1,Object.defineProperty(wn,"__esModule",{value:!0});const t=he(),r={keyword:[
545
+ "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 wn.default=r,wn}var En={},Cu;function Rg(){if(Cu)return En;Cu=1,Object.
546
+ defineProperty(En,"__esModule",{value:!0});const t=Qe(),e=he(),r=ye(),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:u,data:l,$data:c,it:d}=i,{opts:h}=d;if(!c&&a.length===0)return;const y=a.length>=h.loopRequired;if(d.allErrors?b():_(),h.strictRequired){const p=i.parentSchema.
547
+ properties,{definedProperties:m}=i.it;for(const $ of a)if(p?.[$]===void 0&&!m.has($)){const v=d.schemaEnv.baseId+d.errSchemaPath,E=`required property "${$}" is not defined at "${v}" (strictRequired)`;(0,r.checkStrictMode)(d,E,d.opts.strictRequired)}}function b(){if(y||c)i.block$data(e.nil,f);else for(const p of a)(0,t.checkReportMissingProp)(i,p)}function _(){const p=o.let("missing");if(y||c){const m=o.let("valid",!0);i.block$data(m,()=>g(p,m)),i.ok(m)}else o.if((0,t.checkMissingProp)(i,a,p)),(0,t.
548
+ reportMissingProp)(i,p),o.else()}function f(){o.forOf("prop",u,p=>{i.setParams({missingProperty:p}),o.if((0,t.noPropertyInData)(o,l,p,h.ownProperties),()=>i.error())})}function g(p,m){i.setParams({missingProperty:p}),o.forOf(p,u,()=>{o.assign(m,(0,t.propertyInData)(o,l,p,h.ownProperties)),o.if((0,e.not)(m),()=>{i.error(),o.break()})},e.nil)}}};return En.default=s,En}var Sn={},Pu;function Ag(){if(Pu)return Sn;Pu=1,Object.defineProperty(Sn,"__esModule",{value:!0});const t=he(),r={keyword:["maxItem\
549
+ 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 Sn.default=r,Sn}var Rn={},An={},Iu;function ki(){if(Iu)return An;Iu=1,Object.defineProperty(An,"__esModule",{value:!0});
550
+ const t=Qc();return t.code='require("ajv/dist/runtime/equal").default',An.default=t,An}var Nu;function Og(){if(Nu)return Rn;Nu=1,Object.defineProperty(Rn,"__esModule",{value:!0});const t=on(),e=he(),r=ye(),n=ki(),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:u,$data:l,schema:c,
551
+ parentSchema:d,schemaCode:h,it:y}=o;if(!l&&!c)return;const b=a.let("valid"),_=d.items?(0,t.getSchemaTypes)(d.items):[];o.block$data(b,f,(0,e._)`${h} === false`),o.ok(b);function f(){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()?p:m)($,v))}function g(){return _.length>0&&!_.some($=>$==="object"||$==="array")}function p($,v){const E=a.name("item"),S=(0,t.checkDataTypes)(_,E,y.opts.strictNumbers,t.DataType.Wrong),I=a.const(
552
+ "indices",(0,e._)`{}`);a.for((0,e._)`;${$}--;`,()=>{a.let(E,(0,e._)`${u}[${$}]`),a.if(S,(0,e._)`continue`),_.length>1&&a.if((0,e._)`typeof ${E} == "string"`,(0,e._)`${E} += "_"`),a.if((0,e._)`typeof ${I}[${E}] == "number"`,()=>{a.assign(v,(0,e._)`${I}[${E}]`),o.error(),a.assign(b,!1).break()}).code((0,e._)`${I}[${E}] = ${$}`)})}function m($,v){const E=(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._)`${E}(${u}[${$}], ${u}[${v}])`,
553
+ ()=>{o.error(),a.assign(b,!1).break(S)})))}}};return Rn.default=i,Rn}var On={},Tu;function Cg(){if(Tu)return On;Tu=1,Object.defineProperty(On,"__esModule",{value:!0});const t=he(),e=ye(),r=ki(),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: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}`)}};
554
+ return On.default=s,On}var Cn={},ju;function Pg(){if(ju)return Cn;ju=1,Object.defineProperty(Cn,"__esModule",{value:!0});const t=he(),e=ye(),r=ki(),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:u,schema:l,schemaCode:c,it:d}=i;if(!u&&l.length===0)throw new Error("enum must have non-empty array");const h=l.length>=d.opts.loopEnum;let y;const b=()=>y??
555
+ (y=(0,e.useFunc)(o,r.default));let _;if(h||u)_=o.let("valid"),i.block$data(_,f);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const p=o.const("vSchema",c);_=(0,t.or)(...l.map((m,$)=>g(p,$)))}i.pass(_);function f(){o.assign(_,!1),o.forOf("v",c,p=>o.if((0,t._)`${b()}(${a}, ${p})`,()=>o.assign(_,!0).break()))}function g(p,m){const $=l[m];return typeof $=="object"&&$!==null?(0,t._)`${b()}(${a}, ${p}[${m}])`:(0,t._)`${a} === ${$}`}}};return Cn.default=s,Cn}var Lu;function Du(){
556
+ if(Lu)return gn;Lu=1,Object.defineProperty(gn,"__esModule",{value:!0});const t=$g(),e=vg(),r=wg(),n=Eg(),s=Sg(),i=Rg(),o=Ag(),a=Og(),u=Cg(),l=Pg(),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"},u.default,l.default];return gn.default=c,gn}var Pn={},Jt={},xu;function Mu(){if(xu)return Jt;xu=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.validateAdditionalItems=void 0;
557
+ const t=he(),e=ye(),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)){(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:d}=i;d.items=
558
+ !0;const h=a.const("len",(0,t._)`${l}.length`);if(u===!1)i.setParams({len:o.length}),i.pass((0,t._)`${h} <= ${o.length}`);else if(typeof u=="object"&&!(0,e.alwaysValidSchema)(d,u)){const b=a.var("valid",(0,t._)`${h} <= ${o.length}`);a.if((0,t.not)(b),()=>y(b)),i.ok(b)}function y(b){a.forRange("i",o.length,h,_=>{i.subschema({keyword:c,dataProp:_,dataPropType:e.Type.Num},b),d.allErrors||a.if((0,t.not)(b),()=>a.break())})}}return Jt.validateAdditionalItems=s,Jt.default=n,Jt}var In={},Qt={},ku;function qu(){
559
+ if(ku)return Qt;ku=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.validateTuple=void 0;const t=he(),e=ye(),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:u,parentSchema:l,data:c,keyword:d,it:h}=i;_(l),h.opts.unevaluated&&a.length&&h.items!==!0&&(h.
560
+ items=e.mergeEvaluated.items(u,a.length,h.items));const y=u.name("valid"),b=u.const("len",(0,t._)`${c}.length`);a.forEach((f,g)=>{(0,e.alwaysValidSchema)(h,f)||(u.if((0,t._)`${b} > ${g}`,()=>i.subschema({keyword:d,schemaProp:g,dataProp:g},y)),i.ok(y))});function _(f){const{opts:g,errSchemaPath:p}=h,m=a.length,$=m===f.minItems&&(m===f.maxItems||f[o]===!1);if(g.strictTuples&&!$){const v=`"${d}" is ${m}-tuple, but minItems or maxItems/${o} are not specified or different at path "${p}"`;(0,e.checkStrictMode)(
561
+ h,v,g.strictTuples)}}}return Qt.validateTuple=s,Qt.default=n,Qt}var Hu;function Ig(){if(Hu)return In;Hu=1,Object.defineProperty(In,"__esModule",{value:!0});const t=qu(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return In.default=e,In}var Nn={},Uu;function Ng(){if(Uu)return Nn;Uu=1,Object.defineProperty(Nn,"__esModule",{value:!0});const t=he(),e=ye(),r=Qe(),n=Mu(),i={keyword:"items",type:"array",schemaType:["object","bo\
562
+ 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: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)(o)))}};return Nn.default=i,Nn}var Tn={},Fu;function Tg(){if(Fu)return Tn;Fu=1,Object.defineProperty(Tn,"__esModule",{value:!0});const t=he(),e=ye(),n={keyword:"contains",
563
+ 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:u,it:l}=s;let c,d;const{minContains:h,maxContains:y}=a;l.opts.next?(c=
564
+ h===void 0?1:h,d=y):c=1;const b=i.const("len",(0,t._)`${u}.length`);if(s.setParams({min:c,max:d}),d===void 0&&c===0){(0,e.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(d!==void 0&&c>d){(0,e.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,e.alwaysValidSchema)(l,o)){let m=(0,t._)`${b} >= ${c}`;d!==void 0&&(m=(0,t._)`${m} && ${b} <= ${d}`),s.pass(m);return}l.items=!0;const _=i.name("valid");d===void 0&&
565
+ c===1?g(_,()=>i.if(_,()=>i.break())):c===0?(i.let(_,!0),d!==void 0&&i.if((0,t._)`${u}.length > 0`,f)):(i.let(_,!1),f()),s.result(_,()=>s.reset());function f(){const m=i.name("_valid"),$=i.let("count",0);g(m,()=>i.if(m,()=>p($)))}function g(m,$){i.forRange("i",0,b,v=>{s.subschema({keyword:"contains",dataProp:v,dataPropType:e.Type.Num,compositeRule:!0},m),$()})}function p(m){i.code((0,t._)`${m}++`),d===void 0?i.if((0,t._)`${m} >= ${c}`,()=>i.assign(_,!0).break()):(i.if((0,t._)`${m} > ${d}`,()=>i.assign(
566
+ _,!1).break()),c===1?i.assign(_,!0):i.if((0,t._)`${m} >= ${c}`,()=>i.assign(_,!0)))}}};return Tn.default=n,Tn}var qi={},zu;function Hi(){return zu||(zu=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=he(),r=ye(),n=Qe();t.error={message:({params:{property:u,depsCount:l,deps:c}})=>{const d=l===1?"property":"properties";return(0,e.str)`must have ${d} ${c} when property ${u} is present`},params:({params:{property:u,depsCount:l,
953
567
  deps:c,missingProperty:d}})=>(0,e._)`{property: ${u},
954
568
  missingProperty: ${d},
955
569
  depsCount: ${l},
956
- deps: ${c}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(u){const[l,c]=s(u);o(u,l),a(u,c)}};function s({schema:u}){const l={},c={};for(const d in u){if(d==="__proto__")continue;const h=Array.isArray(u[d])?l:c;h[d]=u[d]}return[l,c]}function o(u,l=u.schema){const{gen:c,data:d,it:h}=u;if(Object.keys(l).length===0)return;const E=c.let("missing");for(const $ in l){const y=l[$];if(y.length===0)continue;const f=(0,n.propertyInData)(c,d,$,h.opts.ownProperties);
957
- u.setParams({property:$,depsCount:y.length,deps:y.join(", ")}),h.allErrors?c.if(f,()=>{for(const g of y)(0,n.checkReportMissingProp)(u,g)}):(c.if((0,e._)`${f} && (${(0,n.checkMissingProp)(u,y,E)})`),(0,n.reportMissingProp)(u,E),c.else())}}t.validatePropertyDeps=o;function a(u,l=u.schema){const{gen:c,data:d,keyword:h,it:E}=u,$=c.name("valid");for(const y in l)(0,r.alwaysValidSchema)(E,l[y])||(c.if((0,n.propertyInData)(c,d,y,E.opts.ownProperties),()=>{const f=u.subschema({keyword:h,schemaProp:y},$);
958
- u.mergeValidEvaluated(f,$)},()=>c.var($,!0)),u.ok($))}t.validateSchemaDeps=a,t.default=i}(Oo)),Oo}var fi={},Zl;function Wy(){if(Zl)return fi;Zl=1,Object.defineProperty(fi,"__esModule",{value:!0});const t=pe(),e=_e(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,t._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:s,schema:o,data:a,it:u}=i;if((0,e.alwaysValidSchema)(u,o))return;const l=s.name("va\
959
- lid");s.forIn("key",a,c=>{i.setParams({propertyName:c}),i.subschema({keyword:"propertyNames",data:c,dataTypes:["string"],propertyName:c,compositeRule:!0},l),s.if((0,t.not)(l),()=>{i.error(!0),u.allErrors||s.break()})}),i.ok(l)}};return fi.default=n,fi}var di={},ef;function tf(){if(ef)return di;ef=1,Object.defineProperty(di,"__esModule",{value:!0});const t=ft(),e=pe(),r=ct(),n=_e(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{
960
- 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:d,it:h}=o;if(!d)throw new Error("ajv implementation error");const{allErrors:E,opts:$}=h;if(h.props=!0,$.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(h,u))return;const y=(0,t.allSchemaProperties)(l.properties),f=(0,t.allSchemaProperties)(l.patternProperties);g(),o.ok((0,e._)`${d} === ${r.default.errors}`);function g(){
961
- a.forIn("key",c,_=>{!y.length&&!f.length?D(_):a.if(p(_),()=>D(_))})}function p(_){let b;if(y.length>8){const I=(0,n.schemaRefOrVal)(h,l.properties,"properties");b=(0,t.isOwnProperty)(a,I,_)}else y.length?b=(0,e.or)(...y.map(I=>(0,e._)`${_} === ${I}`)):b=e.nil;return f.length&&(b=(0,e.or)(b,...f.map(I=>(0,e._)`${(0,t.usePattern)(o,I)}.test(${_})`))),(0,e.not)(b)}function m(_){a.code((0,e._)`delete ${c}[${_}]`)}function D(_){if($.removeAdditional==="all"||$.removeAdditional&&u===!1){m(_);return}if(u===
962
- !1){o.setParams({additionalProperty:_}),o.error(),E||a.break();return}if(typeof u=="object"&&!(0,n.alwaysValidSchema)(h,u)){const b=a.name("valid");$.removeAdditional==="failing"?(v(_,b,!1),a.if((0,e.not)(b),()=>{o.reset(),m(_)})):(v(_,b),E||a.if((0,e.not)(b),()=>a.break()))}}function v(_,b,I){const U={keyword:"additionalProperties",dataProp:_,dataPropType:n.Type.Str};I===!1&&Object.assign(U,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(U,b)}}};return di.default=s,di}var hi={},rf;
963
- function Ky(){if(rf)return hi;rf=1,Object.defineProperty(hi,"__esModule",{value:!0});const t=Qr(),e=ft(),r=_e(),n=tf(),i={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:o,schema:a,parentSchema:u,data:l,it:c}=s;c.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(c,n.default,"additionalProperties"));const d=(0,e.allSchemaProperties)(a);for(const f of d)c.definedProperties.add(f);c.opts.unevaluated&&d.length&&c.props!==!0&&(c.props=
964
- r.mergeEvaluated.props(o,(0,r.toHash)(d),c.props));const h=d.filter(f=>!(0,r.alwaysValidSchema)(c,a[f]));if(h.length===0)return;const E=o.name("valid");for(const f of h)$(f)?y(f):(o.if((0,e.propertyInData)(o,l,f,c.opts.ownProperties)),y(f),c.allErrors||o.else().var(E,!0),o.endIf()),s.it.definedProperties.add(f),s.ok(E);function $(f){return c.opts.useDefaults&&!c.compositeRule&&a[f].default!==void 0}function y(f){s.subschema({keyword:"properties",schemaProp:f,dataProp:f},E)}}};return hi.default=i,
965
- hi}var pi={},nf;function Yy(){if(nf)return pi;nf=1,Object.defineProperty(pi,"__esModule",{value:!0});const t=ft(),e=pe(),r=_e(),n=_e(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:o,schema:a,data:u,parentSchema:l,it:c}=s,{opts:d}=c,h=(0,t.allSchemaProperties)(a),E=h.filter(D=>(0,r.alwaysValidSchema)(c,a[D]));if(h.length===0||E.length===h.length&&(!c.opts.unevaluated||c.props===!0))return;const $=d.strictSchema&&!d.allowMatchingProperties&&l.properties,y=o.name(
966
- "valid");c.props!==!0&&!(c.props instanceof e.Name)&&(c.props=(0,n.evaluatedPropsToName)(o,c.props));const{props:f}=c;g();function g(){for(const D of h)$&&p(D),c.allErrors?m(D):(o.var(y,!0),m(D),o.if(y))}function p(D){for(const v in $)new RegExp(D).test(v)&&(0,r.checkStrictMode)(c,`property ${v} matches pattern ${D} (use allowMatchingProperties)`)}function m(D){o.forIn("key",u,v=>{o.if((0,e._)`${(0,t.usePattern)(s,D)}.test(${v})`,()=>{const _=E.includes(D);_||s.subschema({keyword:"patternPropert\
967
- ies",schemaProp:D,dataProp:v,dataPropType:n.Type.Str},y),c.opts.unevaluated&&f!==!0?o.assign((0,e._)`${f}[${v}]`,!0):!_&&!c.allErrors&&o.if((0,e.not)(y),()=>o.break())})})}}};return pi.default=i,pi}var mi={},sf;function Jy(){if(sf)return mi;sf=1,Object.defineProperty(mi,"__esModule",{value:!0});const t=_e(),e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:s}=r;if((0,t.alwaysValidSchema)(s,i)){r.fail();return}const o=n.name("valid");r.subschema({keyword:"\
968
- not",compositeRule:!0,createErrors:!1,allErrors:!1},o),r.failResult(o,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return mi.default=e,mi}var gi={},of;function Xy(){if(of)return gi;of=1,Object.defineProperty(gi,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ft().validateUnion,error:{message:"must match a schema in anyOf"}};return gi.default=e,gi}var yi={},af;function Qy(){if(af)return yi;af=1,Object.defineProperty(yi,"__esModule",{value:!0});
969
- const t=pe(),e=_e(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,t._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:s,schema:o,parentSchema:a,it:u}=i;if(!Array.isArray(o))throw new Error("ajv implementation error");if(u.opts.discriminator&&a.discriminator)return;const l=o,c=s.let("valid",!1),d=s.let("passing",null),h=s.name("_valid");i.setParams({passing:d}),s.block(E),i.result(c,()=>i.reset(),()=>i.error(
970
- !0));function E(){l.forEach(($,y)=>{let f;(0,e.alwaysValidSchema)(u,$)?s.var(h,!0):f=i.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},h),y>0&&s.if((0,t._)`${h} && ${c}`).assign(c,!1).assign(d,(0,t._)`[${d}, ${y}]`).else(),s.if(h,()=>{s.assign(c,!0),s.assign(d,y),f&&i.mergeEvaluated(f,t.Name)})})}}};return yi.default=n,yi}var Ei={},uf;function Zy(){if(uf)return Ei;uf=1,Object.defineProperty(Ei,"__esModule",{value:!0});const t=_e(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,
971
- schema:i,it:s}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const o=n.name("valid");i.forEach((a,u)=>{if((0,t.alwaysValidSchema)(s,a))return;const l=r.subschema({keyword:"allOf",schemaProp:u},o);r.ok(o),r.mergeEvaluated(l)})}};return Ei.default=e,Ei}var Di={},cf;function eE(){if(cf)return Di;cf=1,Object.defineProperty(Di,"__esModule",{value:!0});const t=pe(),e=_e(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,t.str)`must match "${s.
972
- ifClause}" schema`,params:({params:s})=>(0,t._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:o,parentSchema:a,it:u}=s;a.then===void 0&&a.else===void 0&&(0,e.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const l=i(u,"then"),c=i(u,"else");if(!l&&!c)return;const d=o.let("valid",!0),h=o.name("_valid");if(E(),s.reset(),l&&c){const y=o.let("ifClause");s.setParams({ifClause:y}),o.if(h,$("then",y),$("else",y))}else l?o.if(h,$("then")):o.if((0,t.not)(h),$("else"));s.pass(d,()=>s.
973
- error(!0));function E(){const y=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},h);s.mergeEvaluated(y)}function $(y,f){return()=>{const g=s.subschema({keyword:y},h);o.assign(d,h),s.mergeValidEvaluated(g,d),f?o.assign(f,(0,t._)`${y}`):s.setParams({ifClause:y})}}}};function i(s,o){const a=s.schema[o];return a!==void 0&&!(0,e.alwaysValidSchema)(s,a)}return Di.default=n,Di}var vi={},lf;function tE(){if(lf)return vi;lf=1,Object.defineProperty(vi,"__esModule",{value:!0});const t=_e(),
974
- e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,t.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return vi.default=e,vi}var ff;function df(){if(ff)return ai;ff=1,Object.defineProperty(ai,"__esModule",{value:!0});const t=Gl(),e=Vy(),r=Kl(),n=zy(),i=Gy(),s=Io(),o=Wy(),a=tf(),u=Ky(),l=Yy(),c=Jy(),d=Xy(),h=Qy(),E=Zy(),$=eE(),y=tE();function f(g=!1){const p=[c.default,d.default,h.default,E.default,$.default,y.default,o.default,
975
- a.default,s.default,u.default,l.default];return g?p.push(e.default,n.default):p.push(t.default,r.default),p.push(i.default),p}return ai.default=f,ai}var $i={},_r={},hf;function pf(){if(hf)return _r;hf=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.dynamicAnchor=void 0;const t=pe(),e=ct(),r=Hn(),n=So(),i={keyword:"$dynamicAnchor",schemaType:"string",code:a=>s(a,a.schema)};function s(a,u){const{gen:l,it:c}=a;c.schemaEnv.root.dynamicAnchors[u]=!0;const d=(0,t._)`${e.default.dynamicAnchors}${(0,t.
976
- getProperty)(u)}`,h=c.errSchemaPath==="#"?c.validateName:o(a);l.if((0,t._)`!${d}`,()=>l.assign(d,h))}_r.dynamicAnchor=s;function o(a){const{schemaEnv:u,schema:l,self:c}=a.it,{root:d,baseId:h,localRefs:E,meta:$}=u.root,{schemaId:y}=c.opts,f=new r.SchemaEnv({schema:l,schemaId:y,root:d,baseId:h,localRefs:E,meta:$});return r.compileSchema.call(c,f),(0,n.getValidate)(a,f)}return _r.default=i,_r}var wr={},mf;function gf(){if(mf)return wr;mf=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.dynamicRef=
977
- void 0;const t=pe(),e=ct(),r=So(),n={keyword:"$dynamicRef",schemaType:"string",code:s=>i(s,s.schema)};function i(s,o){const{gen:a,keyword:u,it:l}=s;if(o[0]!=="#")throw new Error(`"${u}" only supports hash fragment reference`);const c=o.slice(1);if(l.allErrors)d();else{const E=a.let("valid",!1);d(E),s.ok(E)}function d(E){if(l.schemaEnv.root.dynamicAnchors[c]){const $=a.let("_v",(0,t._)`${e.default.dynamicAnchors}${(0,t.getProperty)(c)}`);a.if($,h($,E),h(l.validateName,E))}else h(l.validateName,E)()}
978
- function h(E,$){return $?()=>a.block(()=>{(0,r.callRef)(s,E),a.let($,!0)}):()=>(0,r.callRef)(s,E)}}return wr.dynamicRef=i,wr.default=n,wr}var _i={},yf;function rE(){if(yf)return _i;yf=1,Object.defineProperty(_i,"__esModule",{value:!0});const t=pf(),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 _i.default=r,_i}var wi={},Ef;function nE(){if(Ef)return wi;Ef=1,Object.defineProperty(
979
- wi,"__esModule",{value:!0});const t=gf(),e={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,t.dynamicRef)(r,r.schema)};return wi.default=e,wi}var Df;function iE(){if(Df)return $i;Df=1,Object.defineProperty($i,"__esModule",{value:!0});const t=pf(),e=gf(),r=rE(),n=nE(),i=[t.default,e.default,r.default,n.default];return $i.default=i,$i}var bi={},Ai={},vf;function sE(){if(vf)return Ai;vf=1,Object.defineProperty(Ai,"__esModule",{value:!0});const t=Io(),e={keyword:"dependentRequired",type:"obje\
980
- ct",schemaType:"object",error:t.error,code:r=>(0,t.validatePropertyDeps)(r)};return Ai.default=e,Ai}var Ci={},$f;function oE(){if($f)return Ci;$f=1,Object.defineProperty(Ci,"__esModule",{value:!0});const t=Io(),e={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,t.validateSchemaDeps)(r)};return Ci.default=e,Ci}var Si={},_f;function aE(){if(_f)return Si;_f=1,Object.defineProperty(Si,"__esModule",{value:!0});const t=_e(),e={keyword:["maxContains","minContains"],type:"array",
981
- schemaType:"number",code({keyword:r,parentSchema:n,it:i}){n.contains===void 0&&(0,t.checkStrictMode)(i,`"${r}" without "contains" is ignored`)}};return Si.default=e,Si}var wf;function uE(){if(wf)return bi;wf=1,Object.defineProperty(bi,"__esModule",{value:!0});const t=sE(),e=oE(),r=aE(),n=[t.default,e.default,r.default];return bi.default=n,bi}var Ri={},Oi={},bf;function cE(){if(bf)return Oi;bf=1,Object.defineProperty(Oi,"__esModule",{value:!0});const t=pe(),e=_e(),r=ct(),i={keyword:"unevaluatedPr\
982
- operties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:s})=>(0,t._)`{unevaluatedProperty: ${s.unevaluatedProperty}}`},code(s){const{gen:o,schema:a,data:u,errsCount:l,it:c}=s;if(!l)throw new Error("ajv implementation error");const{allErrors:d,props:h}=c;h instanceof t.Name?o.if((0,t._)`${h} !== true`,()=>o.forIn("key",u,f=>o.if($(h,f),()=>E(f)))):h!==!0&&o.forIn("key",u,f=>h===void 0?E(f):o.if(y(h,f),()=>E(f))),
983
- c.props=!0,s.ok((0,t._)`${l} === ${r.default.errors}`);function E(f){if(a===!1){s.setParams({unevaluatedProperty:f}),s.error(),d||o.break();return}if(!(0,e.alwaysValidSchema)(c,a)){const g=o.name("valid");s.subschema({keyword:"unevaluatedProperties",dataProp:f,dataPropType:e.Type.Str},g),d||o.if((0,t.not)(g),()=>o.break())}}function $(f,g){return(0,t._)`!${f} || !${f}[${g}]`}function y(f,g){const p=[];for(const m in f)f[m]===!0&&p.push((0,t._)`${g} !== ${m}`);return(0,t.and)(...p)}}};return Oi.default=
984
- i,Oi}var Ii={},Af;function lE(){if(Af)return Ii;Af=1,Object.defineProperty(Ii,"__esModule",{value:!0});const t=pe(),e=_e(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],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{gen:s,schema:o,data:a,it:u}=i,l=u.items||0;if(l===!0)return;const c=s.const("len",(0,t._)`${a}.length`);if(o===!1)i.setParams({len:l}),i.fail((0,t._)`${c} > ${l}`);else if(typeof o==
985
- "object"&&!(0,e.alwaysValidSchema)(u,o)){const h=s.var("valid",(0,t._)`${c} <= ${l}`);s.if((0,t.not)(h),()=>d(h,l)),i.ok(h)}u.items=!0;function d(h,E){s.forRange("i",E,c,$=>{i.subschema({keyword:"unevaluatedItems",dataProp:$,dataPropType:e.Type.Num},h),u.allErrors||s.if((0,t.not)(h),()=>s.break())})}}};return Ii.default=n,Ii}var Cf;function fE(){if(Cf)return Ri;Cf=1,Object.defineProperty(Ri,"__esModule",{value:!0});const t=cE(),e=lE(),r=[t.default,e.default];return Ri.default=r,Ri}var Fi={},Pi={},
986
- Sf;function dE(){if(Sf)return Pi;Sf=1,Object.defineProperty(Pi,"__esModule",{value:!0});const t=pe(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,t._)`{format: ${n}}`},code(n,i){const{gen:s,data:o,$data:a,schema:u,schemaCode:l,it:c}=n,{opts:d,errSchemaPath:h,schemaEnv:E,self:$}=c;if(!d.validateFormats)return;a?y():f();function y(){const g=s.scopeValue("formats",{ref:$.formats,
987
- code:d.code.formats}),p=s.const("fDef",(0,t._)`${g}[${l}]`),m=s.let("fType"),D=s.let("format");s.if((0,t._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>s.assign(m,(0,t._)`${p}.type || "string"`).assign(D,(0,t._)`${p}.validate`),()=>s.assign(m,(0,t._)`"string"`).assign(D,p)),n.fail$data((0,t.or)(v(),_()));function v(){return d.strictSchema===!1?t.nil:(0,t._)`${l} && !${D}`}function _(){const b=E.$async?(0,t._)`(${p}.async ? await ${D}(${o}) : ${D}(${o}))`:(0,t._)`${D}(${o})`,I=(0,t.
988
- _)`(typeof ${D} == "function" ? ${b} : ${D}.test(${o}))`;return(0,t._)`${D} && ${D} !== true && ${m} === ${i} && !${I}`}}function f(){const g=$.formats[u];if(!g){v();return}if(g===!0)return;const[p,m,D]=_(g);p===i&&n.pass(b());function v(){if(d.strictSchema===!1){$.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${u}" ignored in schema at path "${h}"`}}function _(I){const U=I instanceof RegExp?(0,t.regexpCode)(I):d.code.formats?(0,t._)`${d.code.formats}${(0,t.getProperty)(
989
- u)}`:void 0,G=s.scopeValue("formats",{key:u,ref:I,code:U});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,t._)`${G}.validate`]:["string",I,G]}function b(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!E.$async)throw new Error("async format in sync schema");return(0,t._)`await ${D}(${o})`}return typeof m=="function"?(0,t._)`${D}(${o})`:(0,t._)`${D}.test(${o})`}}}};return Pi.default=r,Pi}var Rf;function Of(){if(Rf)return Fi;Rf=1,Object.defineProperty(
990
- Fi,"__esModule",{value:!0});const e=[dE().default];return Fi.default=e,Fi}var lr={},If;function Ff(){return If||(If=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.contentVocabulary=lr.metadataVocabulary=void 0,lr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],lr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),lr}var Pf;function hE(){if(Pf)return zn;Pf=1,Object.defineProperty(zn,"__esModule",{value:!0});const t=Il(),
991
- e=Vl(),r=df(),n=iE(),i=uE(),s=fE(),o=Of(),a=Ff(),u=[n.default,t.default,e.default,(0,r.default)(!0),o.default,a.metadataVocabulary,a.contentVocabulary,i.default,s.default];return zn.default=u,zn}var Ni={},tn={},Nf;function pE(){if(Nf)return tn;Nf=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.DiscrError=void 0;var t;return function(e){e.Tag="tag",e.Mapping="mapping"}(t||(tn.DiscrError=t={})),tn}var Tf;function Lf(){if(Tf)return Ni;Tf=1,Object.defineProperty(Ni,"__esModule",{value:!0});const t=pe(),
992
- e=pE(),r=Hn(),n=Zr(),i=_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:d,it:h}=a,{oneOf:E}=d;if(!h.opts.discriminator)throw new Error("discriminator: requires discriminator option");const $=c.
993
- propertyName;if(typeof $!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!E)throw new Error("discriminator: requires oneOf keyword");const y=u.let("valid",!1),f=u.const("tag",(0,t._)`${l}${(0,t.getProperty)($)}`);u.if((0,t._)`typeof ${f} == "string"`,()=>g(),()=>a.error(!1,{discrError:e.DiscrError.Tag,tag:f,tagName:$})),a.ok(y);function g(){const D=m();u.if(!1);for(const v in D)u.elseIf((0,t._)`${f} === ${v}`),
994
- u.assign(y,p(D[v]));u.else(),a.error(!1,{discrError:e.DiscrError.Mapping,tag:f,tagName:$}),u.endIf()}function p(D){const v=u.name("valid"),_=a.subschema({keyword:"oneOf",schemaProp:D},v);return a.mergeEvaluated(_,t.Name),v}function m(){var D;const v={},_=I(d);let b=!0;for(let L=0;L<E.length;L++){let B=E[L];if(B?.$ref&&!(0,i.schemaHasRulesButRef)(B,h.self.RULES)){const j=B.$ref;if(B=r.resolveRef.call(h.self,h.schemaEnv.root,h.baseId,j),B instanceof r.SchemaEnv&&(B=B.schema),B===void 0)throw new n.
995
- default(h.opts.uriResolver,h.baseId,j)}const N=(D=B?.properties)===null||D===void 0?void 0:D[$];if(typeof N!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${$}"`);b=b&&(_||I(B)),U(N,L)}if(!b)throw new Error(`discriminator: "${$}" must be required`);return v;function I({required:L}){return Array.isArray(L)&&L.includes($)}function U(L,B){if(L.const)G(L.const,B);else if(L.enum)for(const N of L.enum)G(N,B);else throw new Error(`discriminator:\
996
- "properties/${$}" must have "const" or "enum"`)}function G(L,B){if(typeof L!="string"||L in v)throw new Error(`discriminator: "${$}" values must be unique strings`);v[L]=B}}}};return Ni.default=o,Ni}var Ti={};const jf="https://json-schema.org/draft/2020-12/schema",kf="https://json-schema.org/draft/2020-12/schema",Bf={"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\
997
- 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},xf="meta",Mf="Core and Validation specifications meta-schema",qf=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],Uf=["object","boolean"],
998
- Hf="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",Vf={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{
999
- anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},mE={$schema:jf,$id:kf,$vocabulary:Bf,$dynamicAnchor:xf,title:Mf,allOf:qf,type:Uf,$comment:Hf,properties:Vf},gE={__proto__:null,
1000
- $comment:Hf,$dynamicAnchor:xf,$id:kf,$schema:jf,$vocabulary:Bf,allOf:qf,default:mE,properties:Vf,title:Mf,type:Uf},yE=yt(gE),zf="https://json-schema.org/draft/2020-12/schema",Gf="https://json-schema.org/draft/2020-12/meta/applicator",Wf={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},Kf="meta",Yf="Applicator vocabulary meta-schema",Jf=["object","boolean"],Xf={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"\
570
+ 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 d in u){if(d==="__proto__")continue;const h=Array.isArray(u[d])?l:c;h[d]=u[d]}return[l,c]}function o(u,l=u.schema){const{gen:c,data:d,it:h}=u;if(Object.keys(l).length===0)return;const y=c.let("missing");for(const b in l){const _=l[b];if(_.length===0)continue;const f=(0,n.propertyInData)(c,d,b,h.opts.ownProperties);
571
+ u.setParams({property:b,depsCount:_.length,deps:_.join(", ")}),h.allErrors?c.if(f,()=>{for(const g of _)(0,n.checkReportMissingProp)(u,g)}):(c.if((0,e._)`${f} && (${(0,n.checkMissingProp)(u,_,y)})`),(0,n.reportMissingProp)(u,y),c.else())}}t.validatePropertyDeps=o;function a(u,l=u.schema){const{gen:c,data:d,keyword:h,it:y}=u,b=c.name("valid");for(const _ in l)(0,r.alwaysValidSchema)(y,l[_])||(c.if((0,n.propertyInData)(c,d,_,y.opts.ownProperties),()=>{const f=u.subschema({keyword:h,schemaProp:_},b);
572
+ u.mergeValidEvaluated(f,b)},()=>c.var(b,!0)),u.ok(b))}t.validateSchemaDeps=a,t.default=s}(qi)),qi}var jn={},Vu;function jg(){if(Vu)return jn;Vu=1,Object.defineProperty(jn,"__esModule",{value:!0});const t=he(),e=ye(),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\
573
+ 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 jn.default=n,jn}var Ln={},Gu;function Bu(){if(Gu)return Ln;Gu=1,Object.defineProperty(Ln,"__esModule",{value:!0});const t=Qe(),e=he(),r=Xe(),n=ye(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{
574
+ 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:d,it:h}=o;if(!d)throw new Error("ajv implementation error");const{allErrors:y,opts:b}=h;if(h.props=!0,b.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(h,u))return;const _=(0,t.allSchemaProperties)(l.properties),f=(0,t.allSchemaProperties)(l.patternProperties);g(),o.ok((0,e._)`${d} === ${r.default.errors}`);function g(){
575
+ a.forIn("key",c,E=>{!_.length&&!f.length?$(E):a.if(p(E),()=>$(E))})}function p(E){let S;if(_.length>8){const I=(0,n.schemaRefOrVal)(h,l.properties,"properties");S=(0,t.isOwnProperty)(a,I,E)}else _.length?S=(0,e.or)(..._.map(I=>(0,e._)`${E} === ${I}`)):S=e.nil;return f.length&&(S=(0,e.or)(S,...f.map(I=>(0,e._)`${(0,t.usePattern)(o,I)}.test(${E})`))),(0,e.not)(S)}function m(E){a.code((0,e._)`delete ${c}[${E}]`)}function $(E){if(b.removeAdditional==="all"||b.removeAdditional&&u===!1){m(E);return}if(u===
576
+ !1){o.setParams({additionalProperty:E}),o.error(),y||a.break();return}if(typeof u=="object"&&!(0,n.alwaysValidSchema)(h,u)){const S=a.name("valid");b.removeAdditional==="failing"?(v(E,S,!1),a.if((0,e.not)(S),()=>{o.reset(),m(E)})):(v(E,S),y||a.if((0,e.not)(S),()=>a.break()))}}function v(E,S,I){const F={keyword:"additionalProperties",dataProp:E,dataPropType:n.Type.Str};I===!1&&Object.assign(F,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(F,S)}}};return Ln.default=i,Ln}var Dn={},Wu;
577
+ function Lg(){if(Wu)return Dn;Wu=1,Object.defineProperty(Dn,"__esModule",{value:!0});const t=Sr(),e=Qe(),r=ye(),n=Bu(),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 d=(0,e.allSchemaProperties)(a);for(const f of d)c.definedProperties.add(f);c.opts.unevaluated&&d.length&&c.props!==!0&&(c.props=
578
+ r.mergeEvaluated.props(o,(0,r.toHash)(d),c.props));const h=d.filter(f=>!(0,r.alwaysValidSchema)(c,a[f]));if(h.length===0)return;const y=o.name("valid");for(const f of h)b(f)?_(f):(o.if((0,e.propertyInData)(o,l,f,c.opts.ownProperties)),_(f),c.allErrors||o.else().var(y,!0),o.endIf()),i.it.definedProperties.add(f),i.ok(y);function b(f){return c.opts.useDefaults&&!c.compositeRule&&a[f].default!==void 0}function _(f){i.subschema({keyword:"properties",schemaProp:f,dataProp:f},y)}}};return Dn.default=s,
579
+ Dn}var xn={},Ku;function Dg(){if(Ku)return xn;Ku=1,Object.defineProperty(xn,"__esModule",{value:!0});const t=Qe(),e=he(),r=ye(),n=ye(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:o,schema:a,data:u,parentSchema:l,it:c}=i,{opts:d}=c,h=(0,t.allSchemaProperties)(a),y=h.filter($=>(0,r.alwaysValidSchema)(c,a[$]));if(h.length===0||y.length===h.length&&(!c.opts.unevaluated||c.props===!0))return;const b=d.strictSchema&&!d.allowMatchingProperties&&l.properties,_=o.name(
580
+ "valid");c.props!==!0&&!(c.props instanceof e.Name)&&(c.props=(0,n.evaluatedPropsToName)(o,c.props));const{props:f}=c;g();function g(){for(const $ of h)b&&p($),c.allErrors?m($):(o.var(_,!0),m($),o.if(_))}function p($){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 E=y.includes($);E||i.subschema({keyword:"patternPropert\
581
+ ies",schemaProp:$,dataProp:v,dataPropType:n.Type.Str},_),c.opts.unevaluated&&f!==!0?o.assign((0,e._)`${f}[${v}]`,!0):!E&&!c.allErrors&&o.if((0,e.not)(_),()=>o.break())})})}}};return xn.default=s,xn}var Mn={},Yu;function xg(){if(Yu)return Mn;Yu=1,Object.defineProperty(Mn,"__esModule",{value:!0});const t=ye(),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:"\
582
+ not",compositeRule:!0,createErrors:!1,allErrors:!1},o),r.failResult(o,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Mn.default=e,Mn}var kn={},Xu;function Mg(){if(Xu)return kn;Xu=1,Object.defineProperty(kn,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Qe().validateUnion,error:{message:"must match a schema in anyOf"}};return kn.default=e,kn}var qn={},Ju;function kg(){if(Ju)return qn;Ju=1,Object.defineProperty(qn,"__esModule",{value:!0});
583
+ const t=he(),e=ye(),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),d=i.let("passing",null),h=i.name("_valid");s.setParams({passing:d}),i.block(y),s.result(c,()=>s.reset(),()=>s.error(
584
+ !0));function y(){l.forEach((b,_)=>{let f;(0,e.alwaysValidSchema)(u,b)?i.var(h,!0):f=s.subschema({keyword:"oneOf",schemaProp:_,compositeRule:!0},h),_>0&&i.if((0,t._)`${h} && ${c}`).assign(c,!1).assign(d,(0,t._)`[${d}, ${_}]`).else(),i.if(h,()=>{i.assign(c,!0),i.assign(d,_),f&&s.mergeEvaluated(f,t.Name)})})}}};return qn.default=n,qn}var Hn={},Qu;function qg(){if(Qu)return Hn;Qu=1,Object.defineProperty(Hn,"__esModule",{value:!0});const t=ye(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,
585
+ 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 Hn.default=e,Hn}var Un={},Zu;function Hg(){if(Zu)return Un;Zu=1,Object.defineProperty(Un,"__esModule",{value:!0});const t=he(),e=ye(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,t.str)`must match "${i.
586
+ 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 d=o.let("valid",!0),h=o.name("_valid");if(y(),i.reset(),l&&c){const _=o.let("ifClause");i.setParams({ifClause:_}),o.if(h,b("then",_),b("else",_))}else l?o.if(h,b("then")):o.if((0,t.not)(h),b("else"));i.pass(d,()=>i.
587
+ error(!0));function y(){const _=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},h);i.mergeEvaluated(_)}function b(_,f){return()=>{const g=i.subschema({keyword:_},h);o.assign(d,h),i.mergeValidEvaluated(g,d),f?o.assign(f,(0,t._)`${_}`):i.setParams({ifClause:_})}}}};function s(i,o){const a=i.schema[o];return a!==void 0&&!(0,e.alwaysValidSchema)(i,a)}return Un.default=n,Un}var Fn={},el;function Ug(){if(el)return Fn;el=1,Object.defineProperty(Fn,"__esModule",{value:!0});const t=ye(),
588
+ 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 Fn.default=e,Fn}var tl;function rl(){if(tl)return Pn;tl=1,Object.defineProperty(Pn,"__esModule",{value:!0});const t=Mu(),e=Ig(),r=qu(),n=Ng(),s=Tg(),i=Hi(),o=jg(),a=Bu(),u=Lg(),l=Dg(),c=xg(),d=Mg(),h=kg(),y=qg(),b=Hg(),_=Ug();function f(g=!1){const p=[c.default,d.default,h.default,y.default,b.default,_.default,o.default,
589
+ a.default,i.default,u.default,l.default];return g?p.push(e.default,n.default):p.push(t.default,r.default),p.push(s.default),p}return Pn.default=f,Pn}var zn={},Zt={},nl;function sl(){if(nl)return Zt;nl=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.dynamicAnchor=void 0;const t=he(),e=Xe(),r=fn(),n=Mi(),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 d=(0,t._)`${e.default.dynamicAnchors}${(0,t.
590
+ getProperty)(u)}`,h=c.errSchemaPath==="#"?c.validateName:o(a);l.if((0,t._)`!${d}`,()=>l.assign(d,h))}Zt.dynamicAnchor=i;function o(a){const{schemaEnv:u,schema:l,self:c}=a.it,{root:d,baseId:h,localRefs:y,meta:b}=u.root,{schemaId:_}=c.opts,f=new r.SchemaEnv({schema:l,schemaId:_,root:d,baseId:h,localRefs:y,meta:b});return r.compileSchema.call(c,f),(0,n.getValidate)(a,f)}return Zt.default=s,Zt}var er={},il;function ol(){if(il)return er;il=1,Object.defineProperty(er,"__esModule",{value:!0}),er.dynamicRef=
591
+ void 0;const t=he(),e=Xe(),r=Mi(),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)d();else{const y=a.let("valid",!1);d(y),i.ok(y)}function d(y){if(l.schemaEnv.root.dynamicAnchors[c]){const b=a.let("_v",(0,t._)`${e.default.dynamicAnchors}${(0,t.getProperty)(c)}`);a.if(b,h(b,y),h(l.validateName,y))}else h(l.validateName,y)()}
592
+ function h(y,b){return b?()=>a.block(()=>{(0,r.callRef)(i,y),a.let(b,!0)}):()=>(0,r.callRef)(i,y)}}return er.dynamicRef=s,er.default=n,er}var Vn={},al;function Fg(){if(al)return Vn;al=1,Object.defineProperty(Vn,"__esModule",{value:!0});const t=sl(),e=ye(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,t.dynamicAnchor)(n,""):(0,e.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return Vn.default=r,Vn}var Gn={},cl;function zg(){if(cl)return Gn;cl=1,Object.defineProperty(
593
+ Gn,"__esModule",{value:!0});const t=ol(),e={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,t.dynamicRef)(r,r.schema)};return Gn.default=e,Gn}var ul;function Vg(){if(ul)return zn;ul=1,Object.defineProperty(zn,"__esModule",{value:!0});const t=sl(),e=ol(),r=Fg(),n=zg(),s=[t.default,e.default,r.default,n.default];return zn.default=s,zn}var Bn={},Wn={},ll;function Gg(){if(ll)return Wn;ll=1,Object.defineProperty(Wn,"__esModule",{value:!0});const t=Hi(),e={keyword:"dependentRequired",type:"obje\
594
+ ct",schemaType:"object",error:t.error,code:r=>(0,t.validatePropertyDeps)(r)};return Wn.default=e,Wn}var Kn={},fl;function Bg(){if(fl)return Kn;fl=1,Object.defineProperty(Kn,"__esModule",{value:!0});const t=Hi(),e={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,t.validateSchemaDeps)(r)};return Kn.default=e,Kn}var Yn={},dl;function Wg(){if(dl)return Yn;dl=1,Object.defineProperty(Yn,"__esModule",{value:!0});const t=ye(),e={keyword:["maxContains","minContains"],type:"array",
595
+ schemaType:"number",code({keyword:r,parentSchema:n,it:s}){n.contains===void 0&&(0,t.checkStrictMode)(s,`"${r}" without "contains" is ignored`)}};return Yn.default=e,Yn}var hl;function Kg(){if(hl)return Bn;hl=1,Object.defineProperty(Bn,"__esModule",{value:!0});const t=Gg(),e=Bg(),r=Wg(),n=[t.default,e.default,r.default];return Bn.default=n,Bn}var Xn={},Jn={},pl;function Yg(){if(pl)return Jn;pl=1,Object.defineProperty(Jn,"__esModule",{value:!0});const t=he(),e=ye(),r=Xe(),s={keyword:"unevaluatedPr\
596
+ 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:d,props:h}=c;h instanceof t.Name?o.if((0,t._)`${h} !== true`,()=>o.forIn("key",u,f=>o.if(b(h,f),()=>y(f)))):h!==!0&&o.forIn("key",u,f=>h===void 0?y(f):o.if(_(h,f),()=>y(f))),
597
+ c.props=!0,i.ok((0,t._)`${l} === ${r.default.errors}`);function y(f){if(a===!1){i.setParams({unevaluatedProperty:f}),i.error(),d||o.break();return}if(!(0,e.alwaysValidSchema)(c,a)){const g=o.name("valid");i.subschema({keyword:"unevaluatedProperties",dataProp:f,dataPropType:e.Type.Str},g),d||o.if((0,t.not)(g),()=>o.break())}}function b(f,g){return(0,t._)`!${f} || !${f}[${g}]`}function _(f,g){const p=[];for(const m in f)f[m]===!0&&p.push((0,t._)`${g} !== ${m}`);return(0,t.and)(...p)}}};return Jn.default=
598
+ s,Jn}var Qn={},ml;function Xg(){if(ml)return Qn;ml=1,Object.defineProperty(Qn,"__esModule",{value:!0});const t=he(),e=ye(),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==
599
+ "object"&&!(0,e.alwaysValidSchema)(u,o)){const h=i.var("valid",(0,t._)`${c} <= ${l}`);i.if((0,t.not)(h),()=>d(h,l)),s.ok(h)}u.items=!0;function d(h,y){i.forRange("i",y,c,b=>{s.subschema({keyword:"unevaluatedItems",dataProp:b,dataPropType:e.Type.Num},h),u.allErrors||i.if((0,t.not)(h),()=>i.break())})}}};return Qn.default=n,Qn}var gl;function Jg(){if(gl)return Xn;gl=1,Object.defineProperty(Xn,"__esModule",{value:!0});const t=Yg(),e=Xg(),r=[t.default,e.default];return Xn.default=r,Xn}var Zn={},es={},
600
+ yl;function Qg(){if(yl)return es;yl=1,Object.defineProperty(es,"__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:d,errSchemaPath:h,schemaEnv:y,self:b}=c;if(!d.validateFormats)return;a?_():f();function _(){const g=i.scopeValue("formats",{ref:b.formats,
601
+ code:d.code.formats}),p=i.const("fDef",(0,t._)`${g}[${l}]`),m=i.let("fType"),$=i.let("format");i.if((0,t._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>i.assign(m,(0,t._)`${p}.type || "string"`).assign($,(0,t._)`${p}.validate`),()=>i.assign(m,(0,t._)`"string"`).assign($,p)),n.fail$data((0,t.or)(v(),E()));function v(){return d.strictSchema===!1?t.nil:(0,t._)`${l} && !${$}`}function E(){const S=y.$async?(0,t._)`(${p}.async ? await ${$}(${o}) : ${$}(${o}))`:(0,t._)`${$}(${o})`,I=(0,t.
602
+ _)`(typeof ${$} == "function" ? ${S} : ${$}.test(${o}))`;return(0,t._)`${$} && ${$} !== true && ${m} === ${s} && !${I}`}}function f(){const g=b.formats[u];if(!g){v();return}if(g===!0)return;const[p,m,$]=E(g);p===s&&n.pass(S());function v(){if(d.strictSchema===!1){b.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${u}" ignored in schema at path "${h}"`}}function E(I){const F=I instanceof RegExp?(0,t.regexpCode)(I):d.code.formats?(0,t._)`${d.code.formats}${(0,t.getProperty)(
603
+ 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(!y.$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 es.default=r,es}var _l;function $l(){if(_l)return Zn;_l=1,Object.defineProperty(
604
+ Zn,"__esModule",{value:!0});const e=[Qg().default];return Zn.default=e,Zn}var Ft={},vl;function bl(){return vl||(vl=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.contentVocabulary=Ft.metadataVocabulary=void 0,Ft.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Ft.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Ft}var wl;function Zg(){if(wl)return hn;wl=1,Object.defineProperty(hn,"__esModule",{value:!0});const t=bu(),
605
+ e=Du(),r=rl(),n=Vg(),s=Kg(),i=Jg(),o=$l(),a=bl(),u=[n.default,t.default,e.default,(0,r.default)(!0),o.default,a.metadataVocabulary,a.contentVocabulary,s.default,i.default];return hn.default=u,hn}var ts={},Or={},El;function ey(){if(El)return Or;El=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.DiscrError=void 0;var t;return function(e){e.Tag="tag",e.Mapping="mapping"}(t||(Or.DiscrError=t={})),Or}var Sl;function Rl(){if(Sl)return ts;Sl=1,Object.defineProperty(ts,"__esModule",{value:!0});const t=he(),
606
+ e=ey(),r=fn(),n=Rr(),s=ye(),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:d,it:h}=a,{oneOf:y}=d;if(!h.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=c.
607
+ propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!y)throw new Error("discriminator: requires oneOf keyword");const _=u.let("valid",!1),f=u.const("tag",(0,t._)`${l}${(0,t.getProperty)(b)}`);u.if((0,t._)`typeof ${f} == "string"`,()=>g(),()=>a.error(!1,{discrError:e.DiscrError.Tag,tag:f,tagName:b})),a.ok(_);function g(){const $=m();u.if(!1);for(const v in $)u.elseIf((0,t._)`${f} === ${v}`),
608
+ u.assign(_,p($[v]));u.else(),a.error(!1,{discrError:e.DiscrError.Mapping,tag:f,tagName:b}),u.endIf()}function p($){const v=u.name("valid"),E=a.subschema({keyword:"oneOf",schemaProp:$},v);return a.mergeEvaluated(E,t.Name),v}function m(){var $;const v={},E=I(d);let S=!0;for(let D=0;D<y.length;D++){let k=y[D];if(k?.$ref&&!(0,s.schemaHasRulesButRef)(k,h.self.RULES)){const x=k.$ref;if(k=r.resolveRef.call(h.self,h.schemaEnv.root,h.baseId,x),k instanceof r.SchemaEnv&&(k=k.schema),k===void 0)throw new n.
609
+ default(h.opts.uriResolver,h.baseId,x)}const j=($=k?.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&&(E||I(k)),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,k){if(D.const)B(D.const,k);else if(D.enum)for(const j of D.enum)B(j,k);else throw new Error(`discriminator:\
610
+ "properties/${b}" must have "const" or "enum"`)}function B(D,k){if(typeof D!="string"||D in v)throw new Error(`discriminator: "${b}" values must be unique strings`);v[D]=k}}}};return ts.default=o,ts}var rs={};const Al="https://json-schema.org/draft/2020-12/schema",Ol="https://json-schema.org/draft/2020-12/schema",Cl={"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\
611
+ 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},Pl="meta",Il="Core and Validation specifications meta-schema",Nl=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],Tl=["object","boolean"],
612
+ jl="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",Ll={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{
613
+ anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},ty={$schema:Al,$id:Ol,$vocabulary:Cl,$dynamicAnchor:Pl,title:Il,allOf:Nl,type:Tl,$comment:jl,properties:Ll},ry={__proto__:null,
614
+ $comment:jl,$dynamicAnchor:Pl,$id:Ol,$schema:Al,$vocabulary:Cl,allOf:Nl,default:ty,properties:Ll,title:Il,type:Tl},ny=nt(ry),Dl="https://json-schema.org/draft/2020-12/schema",xl="https://json-schema.org/draft/2020-12/meta/applicator",Ml={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},kl="meta",ql="Applicator vocabulary meta-schema",Hl=["object","boolean"],Ul={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"\
1001
615
  #meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs\
1002
- /schemaArray"},not:{$dynamicRef:"#meta"}},Qf={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},EE={$schema:zf,$id:Gf,$vocabulary:Wf,$dynamicAnchor:Kf,title:Yf,type:Jf,properties:Xf,$defs:Qf},DE={__proto__:null,$defs:Qf,$dynamicAnchor:Kf,$id:Gf,$schema:zf,$vocabulary:Wf,default:EE,properties:Xf,title:Yf,type:Jf},vE=yt(DE),Zf="https://json-schema.org/draft/2020-12/schema",ed="https://json-schema.org/draft/2020-12/meta/unevaluated",td={"https://json-schema.org/draft/2020-12/vocab/\
1003
- unevaluated":!0},rd="meta",nd="Unevaluated applicator vocabulary meta-schema",id=["object","boolean"],sd={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},$E={$schema:Zf,$id:ed,$vocabulary:td,$dynamicAnchor:rd,title:nd,type:id,properties:sd},_E={__proto__:null,$dynamicAnchor:rd,$id:ed,$schema:Zf,$vocabulary:td,default:$E,properties:sd,title:nd,type:id},wE=yt(_E),od="https://json-schema.org/draft/2020-12/schema",ad="https://json-schema.org/draft/2020-12/meta/con\
1004
- tent",ud={"https://json-schema.org/draft/2020-12/vocab/content":!0},cd="meta",ld="Content vocabulary meta-schema",fd=["object","boolean"],dd={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},bE={$schema:od,$id:ad,$vocabulary:ud,$dynamicAnchor:cd,title:ld,type:fd,properties:dd},AE={__proto__:null,$dynamicAnchor:cd,$id:ad,$schema:od,$vocabulary:ud,default:bE,properties:dd,title:ld,type:fd},CE=yt(AE),hd="https://json-schema.org/draft/2020-12/sche\
1005
- ma",pd="https://json-schema.org/draft/2020-12/meta/core",md={"https://json-schema.org/draft/2020-12/vocab/core":!0},gd="meta",yd="Core vocabulary meta-schema",Ed=["object","boolean"],Dd={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{
1006
- type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},vd={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},SE={$schema:hd,$id:pd,$vocabulary:md,$dynamicAnchor:gd,title:yd,type:Ed,properties:Dd,$defs:vd},RE={__proto__:null,$defs:vd,$dynamicAnchor:gd,$id:pd,
1007
- $schema:hd,$vocabulary:md,default:SE,properties:Dd,title:yd,type:Ed},OE=yt(RE),$d="https://json-schema.org/draft/2020-12/schema",_d="https://json-schema.org/draft/2020-12/meta/format-annotation",wd={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},bd="meta",Ad="Format vocabulary meta-schema for annotation results",Cd=["object","boolean"],Sd={format:{type:"string"}},IE={$schema:$d,$id:_d,$vocabulary:wd,$dynamicAnchor:bd,title:Ad,type:Cd,properties:Sd},FE={__proto__:null,$dynamicAnchor:bd,
1008
- $id:_d,$schema:$d,$vocabulary:wd,default:IE,properties:Sd,title:Ad,type:Cd},PE=yt(FE),Rd="https://json-schema.org/draft/2020-12/schema",Od="https://json-schema.org/draft/2020-12/meta/meta-data",Id={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},Fd="meta",Pd="Meta-data vocabulary meta-schema",Nd=["object","boolean"],Td={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},
1009
- examples:{type:"array",items:!0}},NE={$schema:Rd,$id:Od,$vocabulary:Id,$dynamicAnchor:Fd,title:Pd,type:Nd,properties:Td},TE={__proto__:null,$dynamicAnchor:Fd,$id:Od,$schema:Rd,$vocabulary:Id,default:NE,properties:Td,title:Pd,type:Nd},LE=yt(TE),Ld="https://json-schema.org/draft/2020-12/schema",jd="https://json-schema.org/draft/2020-12/meta/validation",kd={"https://json-schema.org/draft/2020-12/vocab/validation":!0},Bd="meta",xd="Validation vocabulary meta-schema",Md=["object","boolean"],qd={type:{
616
+ /schemaArray"},not:{$dynamicRef:"#meta"}},Fl={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},sy={$schema:Dl,$id:xl,$vocabulary:Ml,$dynamicAnchor:kl,title:ql,type:Hl,properties:Ul,$defs:Fl},iy={__proto__:null,$defs:Fl,$dynamicAnchor:kl,$id:xl,$schema:Dl,$vocabulary:Ml,default:sy,properties:Ul,title:ql,type:Hl},oy=nt(iy),zl="https://json-schema.org/draft/2020-12/schema",Vl="https://json-schema.org/draft/2020-12/meta/unevaluated",Gl={"https://json-schema.org/draft/2020-12/vocab/\
617
+ unevaluated":!0},Bl="meta",Wl="Unevaluated applicator vocabulary meta-schema",Kl=["object","boolean"],Yl={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},ay={$schema:zl,$id:Vl,$vocabulary:Gl,$dynamicAnchor:Bl,title:Wl,type:Kl,properties:Yl},cy={__proto__:null,$dynamicAnchor:Bl,$id:Vl,$schema:zl,$vocabulary:Gl,default:ay,properties:Yl,title:Wl,type:Kl},uy=nt(cy),Xl="https://json-schema.org/draft/2020-12/schema",Jl="https://json-schema.org/draft/2020-12/meta/con\
618
+ tent",Ql={"https://json-schema.org/draft/2020-12/vocab/content":!0},Zl="meta",ef="Content vocabulary meta-schema",tf=["object","boolean"],rf={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},ly={$schema:Xl,$id:Jl,$vocabulary:Ql,$dynamicAnchor:Zl,title:ef,type:tf,properties:rf},fy={__proto__:null,$dynamicAnchor:Zl,$id:Jl,$schema:Xl,$vocabulary:Ql,default:ly,properties:rf,title:ef,type:tf},dy=nt(fy),nf="https://json-schema.org/draft/2020-12/sche\
619
+ ma",sf="https://json-schema.org/draft/2020-12/meta/core",of={"https://json-schema.org/draft/2020-12/vocab/core":!0},af="meta",cf="Core vocabulary meta-schema",uf=["object","boolean"],lf={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{
620
+ type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},ff={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},hy={$schema:nf,$id:sf,$vocabulary:of,$dynamicAnchor:af,title:cf,type:uf,properties:lf,$defs:ff},py={__proto__:null,$defs:ff,$dynamicAnchor:af,$id:sf,
621
+ $schema:nf,$vocabulary:of,default:hy,properties:lf,title:cf,type:uf},my=nt(py),df="https://json-schema.org/draft/2020-12/schema",hf="https://json-schema.org/draft/2020-12/meta/format-annotation",pf={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},mf="meta",gf="Format vocabulary meta-schema for annotation results",yf=["object","boolean"],_f={format:{type:"string"}},gy={$schema:df,$id:hf,$vocabulary:pf,$dynamicAnchor:mf,title:gf,type:yf,properties:_f},yy={__proto__:null,$dynamicAnchor:mf,
622
+ $id:hf,$schema:df,$vocabulary:pf,default:gy,properties:_f,title:gf,type:yf},_y=nt(yy),$f="https://json-schema.org/draft/2020-12/schema",vf="https://json-schema.org/draft/2020-12/meta/meta-data",bf={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},wf="meta",Ef="Meta-data vocabulary meta-schema",Sf=["object","boolean"],Rf={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},
623
+ examples:{type:"array",items:!0}},$y={$schema:$f,$id:vf,$vocabulary:bf,$dynamicAnchor:wf,title:Ef,type:Sf,properties:Rf},vy={__proto__:null,$dynamicAnchor:wf,$id:vf,$schema:$f,$vocabulary:bf,default:$y,properties:Rf,title:Ef,type:Sf},by=nt(vy),Af="https://json-schema.org/draft/2020-12/schema",Of="https://json-schema.org/draft/2020-12/meta/validation",Cf={"https://json-schema.org/draft/2020-12/vocab/validation":!0},Pf="meta",If="Validation vocabulary meta-schema",Nf=["object","boolean"],Tf={type:{
1010
624
  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:{
1011
- $ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},Ud={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"\
1012
- #/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},jE={$schema:Ld,$id:jd,$vocabulary:kd,$dynamicAnchor:Bd,title:xd,type:Md,properties:qd,$defs:Ud},kE={__proto__:null,$defs:Ud,$dynamicAnchor:Bd,$id:jd,$schema:Ld,$vocabulary:kd,default:jE,properties:qd,title:xd,type:Md},BE=yt(kE);var Hd;function xE(){if(Hd)return Ti;Hd=1,Object.defineProperty(Ti,"__esMo\
1013
- dule",{value:!0});const t=yE,e=vE,r=wE,n=CE,i=OE,s=PE,o=LE,a=BE,u=["/properties"];function l(c){return[t,e,r,n,i,d(this,s),o,d(this,a)].forEach(h=>this.addMetaSchema(h,void 0,!1)),this;function d(h,E){return c?h.$dataMetaSchema(E,u):E}}return Ti.default=l,Ti}var Vd;function ME(){return Vd||(Vd=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;const r=Cl(),n=hE(),i=Lf(),s=xE(),
1014
- o="https://json-schema.org/draft/2020-12/schema";class a extends r.default{constructor(E={}){super({...E,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(E=>this.addVocabulary(E)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:E,meta:$}=this.opts;$&&(s.default.call(this,E),this.refs["http://json-schema.org/schema"]=o)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||
1015
- (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=Qr();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=pe();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(
1016
- 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=qn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return c.default}});var d=Zr();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(Tn,Tn.exports)),Tn.exports}var qE=ME(),Li={exports:{}},Fo={},zd;function UE(){
1017
- return zd||(zd=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(L,B){return{validate:L,compare:B}}t.fullFormats={date:e(s,o),time:e(u(!0),l),"date-time":e(h(!0),E),"iso-time":e(u(),c),"iso-date-time":e(h(),$),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,
625
+ $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"}}},jf={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"\
626
+ #/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},wy={$schema:Af,$id:Of,$vocabulary:Cf,$dynamicAnchor:Pf,title:If,type:Nf,properties:Tf,$defs:jf},Ey={__proto__:null,$defs:jf,$dynamicAnchor:Pf,$id:Of,$schema:Af,$vocabulary:Cf,default:wy,properties:Tf,title:If,type:Nf},Sy=nt(Ey);var Lf;function Ry(){if(Lf)return rs;Lf=1,Object.defineProperty(rs,"__esMo\
627
+ dule",{value:!0});const t=ny,e=oy,r=uy,n=dy,s=my,i=_y,o=by,a=Sy,u=["/properties"];function l(c){return[t,e,r,n,s,d(this,i),o,d(this,a)].forEach(h=>this.addMetaSchema(h,void 0,!1)),this;function d(h,y){return c?h.$dataMetaSchema(y,u):y}}return rs.default=l,rs}var Df;function Ay(){return Df||(Df=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=yu(),n=Zg(),s=Rl(),i=Ry(),
628
+ o="https://json-schema.org/draft/2020-12/schema";class a extends r.default{constructor(y={}){super({...y,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(y=>this.addVocabulary(y)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:y,meta:b}=this.opts;b&&(i.default.call(this,y),this.refs["http://json-schema.org/schema"]=o)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||
629
+ (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=Sr();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(
630
+ 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=un();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return c.default}});var d=Rr();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(tn,tn.exports)),tn.exports}var Oy=Ay(),ns={exports:{}},Ui={},xf;function Cy(){
631
+ return xf||(xf=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(D,k){return{validate:D,compare:k}}t.fullFormats={date:e(i,o),time:e(u(!0),l),"date-time":e(h(!0),y),"iso-time":e(u(),c),"iso-date-time":e(h(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:g,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
1018
632
  "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,
1019
633
  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,
1020
- regex:G,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:_},int64:{type:"number",validate:b},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$/,
1021
- 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,E),"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,$),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
1022
- 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(L){return L%4===0&&(L%100!==0||L%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(L){const B=n.exec(L);if(!B)return!1;const N=+B[1],j=+B[2],M=+B[3];return j>=1&&j<=12&&M>=1&&M<=(j===2&&r(N)?29:i[j])}function o(L,B){if(L&&B)return L>B?1:L<B?-1:0}const a=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
1023
- function u(L){return function(N){const j=a.exec(N);if(!j)return!1;const M=+j[1],Y=+j[2],z=+j[3],X=j[4],se=j[5]==="-"?-1:1,q=+(j[6]||0),C=+(j[7]||0);if(q>23||C>59||L&&!X)return!1;if(M<=23&&Y<=59&&z<60)return!0;const H=Y-C*se,k=M-q*se-(H<0?1:0);return(k===23||k===-1)&&(H===59||H===-1)&&z<61}}function l(L,B){if(!(L&&B))return;const N=new Date("2020-01-01T"+L).valueOf(),j=new Date("2020-01-01T"+B).valueOf();if(N&&j)return N-j}function c(L,B){if(!(L&&B))return;const N=a.exec(L),j=a.exec(B);if(N&&j)return L=
1024
- N[1]+N[2]+N[3],B=j[1]+j[2]+j[3],L>B?1:L<B?-1:0}const d=/t|\s/i;function h(L){const B=u(L);return function(j){const M=j.split(d);return M.length===2&&s(M[0])&&B(M[1])}}function E(L,B){if(!(L&&B))return;const N=new Date(L).valueOf(),j=new Date(B).valueOf();if(N&&j)return N-j}function $(L,B){if(!(L&&B))return;const[N,j]=L.split(d),[M,Y]=B.split(d),z=o(N,M);if(z!==void 0)return z||l(j,Y)}const y=/\/|:/,f=/^(?:[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;
1025
- function g(L){return y.test(L)&&f.test(L)}const p=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function m(L){return p.lastIndex=0,p.test(L)}const D=-2147483648,v=2**31-1;function _(L){return Number.isInteger(L)&&L<=v&&L>=D}function b(L){return Number.isInteger(L)}function I(){return!0}const U=/[^\\]\\Z/;function G(L){if(U.test(L))return!1;try{return new RegExp(L),!0}catch{return!1}}}(Fo)),Fo}var Po={},ji={exports:{}},ki={},Gd;function HE(){if(Gd)return ki;Gd=1,Object.defineProperty(
1026
- ki,"__esModule",{value:!0});const t=Il(),e=Vl(),r=df(),n=Of(),i=Ff(),s=[t.default,e.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return ki.default=s,ki}const Wd="http://json-schema.org/draft-07/schema#",Kd="http://json-schema.org/draft-07/schema#",Yd="Core schema meta-schema",Jd={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},
1027
- simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Xd=["object","boolean"],Qd={$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},
634
+ 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:E},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$/,
635
+ 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,y),"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,
636
+ 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 k=n.exec(D);if(!k)return!1;const j=+k[1],x=+k[2],H=+k[3];return x>=1&&x<=12&&H>=1&&H<=(x===2&&r(j)?29:s[x])}function o(D,k){if(D&&k)return D>k?1:D<k?-1:0}const a=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
637
+ function u(D){return function(j){const x=a.exec(j);if(!x)return!1;const H=+x[1],K=+x[2],G=+x[3],X=x[4],se=x[5]==="-"?-1:1,U=+(x[6]||0),A=+(x[7]||0);if(U>23||A>59||D&&!X)return!1;if(H<=23&&K<=59&&G<60)return!0;const z=K-A*se,M=H-U*se-(z<0?1:0);return(M===23||M===-1)&&(z===59||z===-1)&&G<61}}function l(D,k){if(!(D&&k))return;const j=new Date("2020-01-01T"+D).valueOf(),x=new Date("2020-01-01T"+k).valueOf();if(j&&x)return j-x}function c(D,k){if(!(D&&k))return;const j=a.exec(D),x=a.exec(k);if(j&&x)return D=
638
+ j[1]+j[2]+j[3],k=x[1]+x[2]+x[3],D>k?1:D<k?-1:0}const d=/t|\s/i;function h(D){const k=u(D);return function(x){const H=x.split(d);return H.length===2&&i(H[0])&&k(H[1])}}function y(D,k){if(!(D&&k))return;const j=new Date(D).valueOf(),x=new Date(k).valueOf();if(j&&x)return j-x}function b(D,k){if(!(D&&k))return;const[j,x]=D.split(d),[H,K]=k.split(d),G=o(j,H);if(G!==void 0)return G||l(x,K)}const _=/\/|:/,f=/^(?:[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;
639
+ function g(D){return _.test(D)&&f.test(D)}const p=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function m(D){return p.lastIndex=0,p.test(D)}const $=-2147483648,v=2**31-1;function E(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}}}(Ui)),Ui}var Fi={},ss={exports:{}},is={},Mf;function Py(){if(Mf)return is;Mf=1,Object.defineProperty(
640
+ is,"__esModule",{value:!0});const t=bu(),e=Du(),r=rl(),n=$l(),s=bl(),i=[t.default,e.default,(0,r.default)(),n.default,s.metadataVocabulary,s.contentVocabulary];return is.default=i,is}const kf="http://json-schema.org/draft-07/schema#",qf="http://json-schema.org/draft-07/schema#",Hf="Core schema meta-schema",Uf={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},
641
+ simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Ff=["object","boolean"],zf={$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},
1028
642
  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\
1029
643
  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:"\
1030
644
  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\
1031
- initions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},VE={$schema:Wd,$id:Kd,title:Yd,definitions:Jd,type:Xd,properties:Qd,default:!0},zE={__proto__:null,$id:Kd,$schema:Wd,default:VE,definitions:Jd,properties:Qd,title:Yd,type:Xd},GE=yt(zE);var Zd;function WE(){return Zd||(Zd=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=Cl(),n=HE(),i=Lf(),
1032
- s=GE,o=["/properties"],a="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach($=>this.addVocabulary($)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const $=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema($,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||
1033
- (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=Qr();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=pe();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,
1034
- "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 d=qn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var h=Zr();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return h.default}})}(ji,ji.exports)),ji.exports}var eh;function KE(){return eh||(eh=1,function(t){Object.
1035
- defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=WE(),r=pe(),n=r.operators,i={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}},s={message:({keyword:a,schemaCode:u})=>(0,r.str)`should be ${i[a].okStr} ${u}`,params:({keyword:a,schemaCode:u})=>(0,r._)`{comparison: ${i[a].okStr}, limit: ${u}}`};t.formatLimitDefinition=
1036
- {keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(a){const{gen:u,data:l,schemaCode:c,keyword:d,it:h}=a,{opts:E,self:$}=h;if(!E.validateFormats)return;const y=new e.KeywordCxt(h,$.RULES.all.format.definition,"format");y.$data?f():g();function f(){const m=u.scopeValue("formats",{ref:$.formats,code:E.code.formats}),D=u.const("fmt",(0,r._)`${m}[${y.schemaCode}]`);a.fail$data((0,r.or)((0,r._)`typeof ${D} != "object"`,(0,r._)`${D} instanceof RegExp`,(0,r._)`typeof ${D}.compare != "function"`,
1037
- p(D)))}function g(){const m=y.schema,D=$.formats[m];if(!D||D===!0)return;if(typeof D!="object"||D instanceof RegExp||typeof D.compare!="function")throw new Error(`"${d}": format "${m}" does not define "compare" function`);const v=u.scopeValue("formats",{key:m,ref:D,code:E.code.formats?(0,r._)`${E.code.formats}${(0,r.getProperty)(m)}`:void 0});a.fail$data(p(v))}function p(m){return(0,r._)`${m}.compare(${l}, ${c}) ${i[d].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(t.formatLimitDefinition),
1038
- a);t.default=o}(Po)),Po}var th;function YE(){return th||(th=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=UE(),n=KE(),i=pe(),s=new i.Name("fullFormats"),o=new i.Name("fastFormats"),a=(l,c={keywords:!0})=>{if(Array.isArray(c))return u(l,c,r.fullFormats,s),l;const[d,h]=c.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,s],E=c.formats||r.formatNames;return u(l,E,d,h),c.keywords&&(0,n.default)(l),l};a.get=(l,c="full")=>{const h=(c==="fast"?r.fastFormats:r.fullFormats)[l];if(!h)
1039
- throw new Error(`Unknown format "${l}"`);return h};function u(l,c,d,h){var E,$;(E=($=l.opts.code).formats)!==null&&E!==void 0||($.formats=(0,i._)`require("ajv-formats/dist/formats").${h}`);for(const y of c)l.addFormat(y,d[y])}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a}(Li,Li.exports)),Li.exports}var JE=YE();const XE=Ji(JE),QE=(t,e,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;const i=Object.getOwnPropertyDescriptor(t,r),s=Object.getOwnPropertyDescriptor(
1040
- e,r);!ZE(i,s)&&n||Object.defineProperty(t,r,s)},ZE=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)},eD=(t,e)=>{const r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)},tD=(t,e)=>`/* Wrapped ${t}*/
1041
- ${e}`,rD=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),nD=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),iD=(t,e,r)=>{const n=r===""?"":`with ${r.trim()}() `,i=tD.bind(null,n,e.toString());Object.defineProperty(i,"name",nD);const{writable:s,enumerable:o,configurable:a}=rD;Object.defineProperty(t,"toString",{value:i,writable:s,enumerable:o,configurable:a})};function sD(t,e,{ignoreNonConfigurable:r=!1}={}){const{name:n}=t;for(const i of Reflect.ownKeys(e))QE(t,
1042
- e,i,r);return eD(t,e),iD(t,e,n),t}const rh=(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:i=!1,after:s=!0}=e;if(r<0||n<0)throw new RangeError("`wait` and `maxWait` must not be negative.");if(!i&&!s)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let o,a,u;const l=function(...c){const d=this,h=()=>{o=void 0,a&&(clearTimeout(a),a=
1043
- void 0),s&&(u=t.apply(d,c))},E=()=>{a=void 0,o&&(clearTimeout(o),o=void 0),s&&(u=t.apply(d,c))},$=i&&!o;return clearTimeout(o),o=setTimeout(h,r),n>0&&n!==Number.POSITIVE_INFINITY&&!a&&(a=setTimeout(E,n)),$&&(u=t.apply(d,c)),u};return sD(l,t),l.cancel=()=>{o&&(clearTimeout(o),o=void 0),a&&(clearTimeout(a),a=void 0)},l};var Bi={exports:{}},No,nh;function xi(){if(nh)return No;nh=1;const t="2.0.0",e=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,i=e-6;return No={MAX_LENGTH:e,MAX_SAFE_COMPONENT_LENGTH:n,
1044
- MAX_SAFE_BUILD_LENGTH:i,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},No}var To,ih;function Mi(){return ih||(ih=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 sh;function rn(){return sh||(sh=1,function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,
1045
- MAX_LENGTH:i}=xi(),s=Mi();e=t.exports={};const o=e.re=[],a=e.safeRe=[],u=e.src=[],l=e.safeSrc=[],c=e.t={};let d=0;const h="[a-zA-Z0-9-]",E=[["\\s",1],["\\d",i],[h,n]],$=f=>{for(const[g,p]of E)f=f.split(`${g}*`).join(`${g}{0,${p}}`).split(`${g}+`).join(`${g}{1,${p}}`);return f},y=(f,g,p)=>{const m=$(g),D=d++;s(f,D,g),c[f]=D,u[D]=g,l[D]=m,o[D]=new RegExp(g,p?"g":void 0),a[D]=new RegExp(m,p?"g":void 0)};y("NUMERICIDENTIFIER","0|[1-9]\\d*"),y("NUMERICIDENTIFIERLOOSE","\\d+"),y("NONNUMERICIDENTIFIER",
1046
- `\\d*[a-zA-Z-]${h}*`),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.NUMERICIDENTIFIER]}|${u[c.NONNUMERICIDENTIFIER]})`),y("PRERELEASEIDENTIFIERLOOSE",`(?:${u[c.NUMERICIDENTIFIERLOOSE]}|${u[c.NONNUMERICIDENTIFIER]})`),y("PRERELEASE",`(?:-(${u[c.PRERELEASEIDENTIFIER]}(?:\\.${u[c.
1047
- PRERELEASEIDENTIFIER]})*))`),y("PRERELEASELOOSE",`(?:-?(${u[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[c.PRERELEASEIDENTIFIERLOOSE]})*))`),y("BUILDIDENTIFIER",`${h}+`),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\
1048
- 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]}\
1049
- $`),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]}\
1050
- $`),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=
1051
- "$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*$")}(Bi,Bi.exports)),Bi.exports}var Lo,oh;function jo(){if(oh)return Lo;oh=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return Lo=n=>n?typeof n!="object"?t:n:e,Lo}var ko,ah;function uh(){if(ah)return ko;
1052
- ah=1;const t=/^[0-9]+$/,e=(n,i)=>{const s=t.test(n),o=t.test(i);return s&&o&&(n=+n,i=+i),n===i?0:s&&!o?-1:o&&!s?1:n<i?-1:1};return ko={compareIdentifiers:e,rcompareIdentifiers:(n,i)=>e(i,n)},ko}var Bo,ch;function ze(){if(ch)return Bo;ch=1;const t=Mi(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:r}=xi(),{safeRe:n,safeSrc:i,t:s}=rn(),o=jo(),{compareIdentifiers:a}=uh();class u{constructor(c,d){if(d=o(d),c instanceof u){if(c.loose===!!d.loose&&c.includePrerelease===!!d.includePrerelease)return c;c=c.version}else if(typeof c!=
1053
- "string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof c}".`);if(c.length>e)throw new TypeError(`version is longer than ${e} characters`);t("SemVer",c,d),this.options=d,this.loose=!!d.loose,this.includePrerelease=!!d.includePrerelease;const h=c.trim().match(d.loose?n[s.LOOSE]:n[s.FULL]);if(!h)throw new TypeError(`Invalid Version: ${c}`);if(this.raw=c,this.major=+h[1],this.minor=+h[2],this.patch=+h[3],this.major>r||this.major<0)throw new TypeError("Invalid major versi\
1054
- 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");h[4]?this.prerelease=h[4].split(".").map(E=>{if(/^[0-9]+$/.test(E)){const $=+E;if($>=0&&$<r)return $}return E}):this.prerelease=[],this.build=h[5]?h[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(){
645
+ initions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},Iy={$schema:kf,$id:qf,title:Hf,definitions:Uf,type:Ff,properties:zf,default:!0},Ny={__proto__:null,$id:qf,$schema:kf,default:Iy,definitions:Uf,properties:zf,title:Hf,type:Ff},Ty=nt(Ny);var Vf;function jy(){return Vf||(Vf=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=yu(),n=Py(),s=Rl(),
646
+ i=Ty,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()||
647
+ (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=Sr();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,
648
+ "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 d=un();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var h=Rr();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return h.default}})}(ss,ss.exports)),ss.exports}var Gf;function Ly(){return Gf||(Gf=1,function(t){Object.
649
+ defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=jy(),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=
650
+ {keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:i,code(a){const{gen:u,data:l,schemaCode:c,keyword:d,it:h}=a,{opts:y,self:b}=h;if(!y.validateFormats)return;const _=new e.KeywordCxt(h,b.RULES.all.format.definition,"format");_.$data?f():g();function f(){const m=u.scopeValue("formats",{ref:b.formats,code:y.code.formats}),$=u.const("fmt",(0,r._)`${m}[${_.schemaCode}]`);a.fail$data((0,r.or)((0,r._)`typeof ${$} != "object"`,(0,r._)`${$} instanceof RegExp`,(0,r._)`typeof ${$}.compare != "function"`,
651
+ p($)))}function g(){const m=_.schema,$=b.formats[m];if(!$||$===!0)return;if(typeof $!="object"||$ instanceof RegExp||typeof $.compare!="function")throw new Error(`"${d}": format "${m}" does not define "compare" function`);const v=u.scopeValue("formats",{key:m,ref:$,code:y.code.formats?(0,r._)`${y.code.formats}${(0,r.getProperty)(m)}`:void 0});a.fail$data(p(v))}function p(m){return(0,r._)`${m}.compare(${l}, ${c}) ${s[d].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(t.formatLimitDefinition),
652
+ a);t.default=o}(Fi)),Fi}var Bf;function Dy(){return Bf||(Bf=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Cy(),n=Ly(),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[d,h]=c.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,i],y=c.formats||r.formatNames;return u(l,y,d,h),c.keywords&&(0,n.default)(l),l};a.get=(l,c="full")=>{const h=(c==="fast"?r.fastFormats:r.fullFormats)[l];if(!h)
653
+ throw new Error(`Unknown format "${l}"`);return h};function u(l,c,d,h){var y,b;(y=(b=l.opts.code).formats)!==null&&y!==void 0||(b.formats=(0,s._)`require("ajv-formats/dist/formats").${h}`);for(const _ of c)l.addFormat(_,d[_])}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a}(ns,ns.exports)),ns.exports}var xy=Dy();const My=_s(xy),ky=(t,e,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;const s=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(
654
+ e,r);!qy(s,i)&&n||Object.defineProperty(t,r,i)},qy=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)},Hy=(t,e)=>{const r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)},Uy=(t,e)=>`/* Wrapped ${t}*/
655
+ ${e}`,Fy=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),zy=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Vy=(t,e,r)=>{const n=r===""?"":`with ${r.trim()}() `,s=Uy.bind(null,n,e.toString());Object.defineProperty(s,"name",zy);const{writable:i,enumerable:o,configurable:a}=Fy;Object.defineProperty(t,"toString",{value:s,writable:i,enumerable:o,configurable:a})};function Gy(t,e,{ignoreNonConfigurable:r=!1}={}){const{name:n}=t;for(const s of Reflect.ownKeys(e))ky(t,
656
+ e,s,r);return Hy(t,e),Vy(t,e,n),t}const Wf=(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 d=this,h=()=>{o=void 0,a&&(clearTimeout(a),a=
657
+ void 0),i&&(u=t.apply(d,c))},y=()=>{a=void 0,o&&(clearTimeout(o),o=void 0),i&&(u=t.apply(d,c))},b=s&&!o;return clearTimeout(o),o=setTimeout(h,r),n>0&&n!==Number.POSITIVE_INFINITY&&!a&&(a=setTimeout(y,n)),b&&(u=t.apply(d,c)),u};return Gy(l,t),l.cancel=()=>{o&&(clearTimeout(o),o=void 0),a&&(clearTimeout(a),a=void 0)},l};var os={exports:{}},zi,Kf;function as(){if(Kf)return zi;Kf=1;const t="2.0.0",e=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,s=e-6;return zi={MAX_LENGTH:e,MAX_SAFE_COMPONENT_LENGTH:n,
658
+ 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},zi}var Vi,Yf;function cs(){return Yf||(Yf=1,Vi=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}),Vi}var Xf;function Cr(){return Xf||(Xf=1,function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,
659
+ MAX_LENGTH:s}=as(),i=cs();e=t.exports={};const o=e.re=[],a=e.safeRe=[],u=e.src=[],l=e.safeSrc=[],c=e.t={};let d=0;const h="[a-zA-Z0-9-]",y=[["\\s",1],["\\d",s],[h,n]],b=f=>{for(const[g,p]of y)f=f.split(`${g}*`).join(`${g}{0,${p}}`).split(`${g}+`).join(`${g}{1,${p}}`);return f},_=(f,g,p)=>{const m=b(g),$=d++;i(f,$,g),c[f]=$,u[$]=g,l[$]=m,o[$]=new RegExp(g,p?"g":void 0),a[$]=new RegExp(m,p?"g":void 0)};_("NUMERICIDENTIFIER","0|[1-9]\\d*"),_("NUMERICIDENTIFIERLOOSE","\\d+"),_("NONNUMERICIDENTIFIER",
660
+ `\\d*[a-zA-Z-]${h}*`),_("MAINVERSION",`(${u[c.NUMERICIDENTIFIER]})\\.(${u[c.NUMERICIDENTIFIER]})\\.(${u[c.NUMERICIDENTIFIER]})`),_("MAINVERSIONLOOSE",`(${u[c.NUMERICIDENTIFIERLOOSE]})\\.(${u[c.NUMERICIDENTIFIERLOOSE]})\\.(${u[c.NUMERICIDENTIFIERLOOSE]})`),_("PRERELEASEIDENTIFIER",`(?:${u[c.NUMERICIDENTIFIER]}|${u[c.NONNUMERICIDENTIFIER]})`),_("PRERELEASEIDENTIFIERLOOSE",`(?:${u[c.NUMERICIDENTIFIERLOOSE]}|${u[c.NONNUMERICIDENTIFIER]})`),_("PRERELEASE",`(?:-(${u[c.PRERELEASEIDENTIFIER]}(?:\\.${u[c.
661
+ PRERELEASEIDENTIFIER]})*))`),_("PRERELEASELOOSE",`(?:-?(${u[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[c.PRERELEASEIDENTIFIERLOOSE]})*))`),_("BUILDIDENTIFIER",`${h}+`),_("BUILD",`(?:\\+(${u[c.BUILDIDENTIFIER]}(?:\\.${u[c.BUILDIDENTIFIER]})*))`),_("FULLPLAIN",`v?${u[c.MAINVERSION]}${u[c.PRERELEASE]}?${u[c.BUILD]}?`),_("FULL",`^${u[c.FULLPLAIN]}$`),_("LOOSEPLAIN",`[v=\\s]*${u[c.MAINVERSIONLOOSE]}${u[c.PRERELEASELOOSE]}?${u[c.BUILD]}?`),_("LOOSE",`^${u[c.LOOSEPLAIN]}$`),_("GTLT","((?:<|>)?=?)"),_("XRAN\
662
+ GEIDENTIFIERLOOSE",`${u[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),_("XRANGEIDENTIFIER",`${u[c.NUMERICIDENTIFIER]}|x|X|\\*`),_("XRANGEPLAIN",`[v=\\s]*(${u[c.XRANGEIDENTIFIER]})(?:\\.(${u[c.XRANGEIDENTIFIER]})(?:\\.(${u[c.XRANGEIDENTIFIER]})(?:${u[c.PRERELEASE]})?${u[c.BUILD]}?)?)?`),_("XRANGEPLAINLOOSE",`[v=\\s]*(${u[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[c.XRANGEIDENTIFIERLOOSE]})(?:${u[c.PRERELEASELOOSE]})?${u[c.BUILD]}?)?)?`),_("XRANGE",`^${u[c.GTLT]}\\s*${u[c.XRANGEPLAIN]}\
663
+ $`),_("XRANGELOOSE",`^${u[c.GTLT]}\\s*${u[c.XRANGEPLAINLOOSE]}$`),_("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),_("COERCE",`${u[c.COERCEPLAIN]}(?:$|[^\\d])`),_("COERCEFULL",u[c.COERCEPLAIN]+`(?:${u[c.PRERELEASE]})?(?:${u[c.BUILD]})?(?:$|[^\\d])`),_("COERCERTL",u[c.COERCE],!0),_("COERCERTLFULL",u[c.COERCEFULL],!0),_("LONETILDE","(?:~>?)"),_("TILDETRIM",`(\\s*)${u[c.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",_("TILDE",`^${u[c.LONETILDE]}${u[c.XRANGEPLAIN]}\
664
+ $`),_("TILDELOOSE",`^${u[c.LONETILDE]}${u[c.XRANGEPLAINLOOSE]}$`),_("LONECARET","(?:\\^)"),_("CARETTRIM",`(\\s*)${u[c.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",_("CARET",`^${u[c.LONECARET]}${u[c.XRANGEPLAIN]}$`),_("CARETLOOSE",`^${u[c.LONECARET]}${u[c.XRANGEPLAINLOOSE]}$`),_("COMPARATORLOOSE",`^${u[c.GTLT]}\\s*(${u[c.LOOSEPLAIN]})$|^$`),_("COMPARATOR",`^${u[c.GTLT]}\\s*(${u[c.FULLPLAIN]})$|^$`),_("COMPARATORTRIM",`(\\s*)${u[c.GTLT]}\\s*(${u[c.LOOSEPLAIN]}|${u[c.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=
665
+ "$1$2$3",_("HYPHENRANGE",`^\\s*(${u[c.XRANGEPLAIN]})\\s+-\\s+(${u[c.XRANGEPLAIN]})\\s*$`),_("HYPHENRANGELOOSE",`^\\s*(${u[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[c.XRANGEPLAINLOOSE]})\\s*$`),_("STAR","(<|>)?=?\\s*\\*"),_("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),_("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(os,os.exports)),os.exports}var Gi,Jf;function Bi(){if(Jf)return Gi;Jf=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return Gi=n=>n?typeof n!="object"?t:n:e,Gi}var Wi,Qf;function Zf(){if(Qf)return Wi;
666
+ Qf=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 Wi={compareIdentifiers:e,rcompareIdentifiers:(n,s)=>e(s,n)},Wi}var Ki,ed;function Le(){if(ed)return Ki;ed=1;const t=cs(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:r}=as(),{safeRe:n,safeSrc:s,t:i}=Cr(),o=Bi(),{compareIdentifiers:a}=Zf();class u{constructor(c,d){if(d=o(d),c instanceof u){if(c.loose===!!d.loose&&c.includePrerelease===!!d.includePrerelease)return c;c=c.version}else if(typeof c!=
667
+ "string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof c}".`);if(c.length>e)throw new TypeError(`version is longer than ${e} characters`);t("SemVer",c,d),this.options=d,this.loose=!!d.loose,this.includePrerelease=!!d.includePrerelease;const h=c.trim().match(d.loose?n[i.LOOSE]:n[i.FULL]);if(!h)throw new TypeError(`Invalid Version: ${c}`);if(this.raw=c,this.major=+h[1],this.minor=+h[2],this.patch=+h[3],this.major>r||this.major<0)throw new TypeError("Invalid major versi\
668
+ 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");h[4]?this.prerelease=h[4].split(".").map(y=>{if(/^[0-9]+$/.test(y)){const b=+y;if(b>=0&&b<r)return b}return y}):this.prerelease=[],this.build=h[5]?h[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(){
1055
669
  return this.version}compare(c){if(t("SemVer.compare",this.version,this.options,c),!(c instanceof u)){if(typeof c=="string"&&c===this.version)return 0;c=new u(c,this.options)}return c.version===this.version?0:this.compareMain(c)||this.comparePre(c)}compareMain(c){return c instanceof u||(c=new u(c,this.options)),a(this.major,c.major)||a(this.minor,c.minor)||a(this.patch,c.patch)}comparePre(c){if(c instanceof u||(c=new u(c,this.options)),this.prerelease.length&&!c.prerelease.length)return-1;if(!this.
1056
- prerelease.length&&c.prerelease.length)return 1;if(!this.prerelease.length&&!c.prerelease.length)return 0;let d=0;do{const h=this.prerelease[d],E=c.prerelease[d];if(t("prerelease compare",d,h,E),h===void 0&&E===void 0)return 0;if(E===void 0)return 1;if(h===void 0)return-1;if(h===E)continue;return a(h,E)}while(++d)}compareBuild(c){c instanceof u||(c=new u(c,this.options));let d=0;do{const h=this.build[d],E=c.build[d];if(t("build compare",d,h,E),h===void 0&&E===void 0)return 0;if(E===void 0)return 1;
1057
- if(h===void 0)return-1;if(h===E)continue;return a(h,E)}while(++d)}inc(c,d,h){if(c.startsWith("pre")){if(!d&&h===!1)throw new Error("invalid increment argument: identifier is empty");if(d){const E=new RegExp(`^${this.options.loose?i[s.PRERELEASELOOSE]:i[s.PRERELEASE]}$`),$=`-${d}`.match(E);if(!$||$[1]!==d)throw new Error(`invalid identifier: ${d}`)}}switch(c){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",d,h);break;case"preminor":this.prerelease.length=
670
+ prerelease.length&&c.prerelease.length)return 1;if(!this.prerelease.length&&!c.prerelease.length)return 0;let d=0;do{const h=this.prerelease[d],y=c.prerelease[d];if(t("prerelease compare",d,h,y),h===void 0&&y===void 0)return 0;if(y===void 0)return 1;if(h===void 0)return-1;if(h===y)continue;return a(h,y)}while(++d)}compareBuild(c){c instanceof u||(c=new u(c,this.options));let d=0;do{const h=this.build[d],y=c.build[d];if(t("build compare",d,h,y),h===void 0&&y===void 0)return 0;if(y===void 0)return 1;
671
+ if(h===void 0)return-1;if(h===y)continue;return a(h,y)}while(++d)}inc(c,d,h){if(c.startsWith("pre")){if(!d&&h===!1)throw new Error("invalid increment argument: identifier is empty");if(d){const y=new RegExp(`^${this.options.loose?s[i.PRERELEASELOOSE]:s[i.PRERELEASE]}$`),b=`-${d}`.match(y);if(!b||b[1]!==d)throw new Error(`invalid identifier: ${d}`)}}switch(c){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",d,h);break;case"preminor":this.prerelease.length=
1058
672
  0,this.patch=0,this.minor++,this.inc("pre",d,h);break;case"prepatch":this.prerelease.length=0,this.inc("patch",d,h),this.inc("pre",d,h);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",d,h),this.inc("pre",d,h);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=[];
1059
- break;case"minor":(this.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 E=Number(h)?1:0;if(this.prerelease.length===0)this.prerelease=[E];else{let $=this.prerelease.length;for(;--$>=0;)typeof this.prerelease[$]=="number"&&(this.prerelease[$]++,$=-2);if($===-1){if(d===this.prerelease.join(".")&&h===!1)throw new Error("invalid increment argument: identifier alre\
1060
- ady exists");this.prerelease.push(E)}}if(d){let $=[d,E];h===!1&&($=[d]),a(this.prerelease[0],d)===0?isNaN(this.prerelease[1])&&(this.prerelease=$):this.prerelease=$}break}default:throw new Error(`invalid increment argument: ${c}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Bo=u,Bo}var xo,lh;function br(){if(lh)return xo;lh=1;const t=ze();return xo=(r,n,i=!1)=>{if(r instanceof t)return r;try{return new t(r,n)}catch(s){if(!i)return null;throw s}},
1061
- xo}var Mo,fh;function oD(){if(fh)return Mo;fh=1;const t=br();return Mo=(r,n)=>{const i=t(r,n);return i?i.version:null},Mo}var qo,dh;function aD(){if(dh)return qo;dh=1;const t=br();return qo=(r,n)=>{const i=t(r.trim().replace(/^[=v]+/,""),n);return i?i.version:null},qo}var Uo,hh;function uD(){if(hh)return Uo;hh=1;const t=ze();return Uo=(r,n,i,s,o)=>{typeof i=="string"&&(o=s,s=i,i=void 0);try{return new t(r instanceof t?r.version:r,i).inc(n,s,o).version}catch{return null}},Uo}var Ho,ph;function cD(){
1062
- if(ph)return Ho;ph=1;const t=br();return Ho=(r,n)=>{const i=t(r,null,!0),s=t(n,null,!0),o=i.compare(s);if(o===0)return null;const a=o>0,u=a?i:s,l=a?s:i,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 h=c?"pre":"";return i.major!==s.major?h+"major":i.minor!==s.minor?h+"minor":i.patch!==s.patch?h+"patch":"prerelease"},Ho}var Vo,mh;function lD(){if(mh)return Vo;mh=1;const t=ze();return Vo=
1063
- (r,n)=>new t(r,n).major,Vo}var zo,gh;function fD(){if(gh)return zo;gh=1;const t=ze();return zo=(r,n)=>new t(r,n).minor,zo}var Go,yh;function dD(){if(yh)return Go;yh=1;const t=ze();return Go=(r,n)=>new t(r,n).patch,Go}var Wo,Eh;function hD(){if(Eh)return Wo;Eh=1;const t=br();return Wo=(r,n)=>{const i=t(r,n);return i&&i.prerelease.length?i.prerelease:null},Wo}var Ko,Dh;function dt(){if(Dh)return Ko;Dh=1;const t=ze();return Ko=(r,n,i)=>new t(r,i).compare(new t(n,i)),Ko}var Yo,vh;function pD(){if(vh)
1064
- return Yo;vh=1;const t=dt();return Yo=(r,n,i)=>t(n,r,i),Yo}var Jo,$h;function mD(){if($h)return Jo;$h=1;const t=dt();return Jo=(r,n)=>t(r,n,!0),Jo}var Xo,_h;function Qo(){if(_h)return Xo;_h=1;const t=ze();return Xo=(r,n,i)=>{const s=new t(r,i),o=new t(n,i);return s.compare(o)||s.compareBuild(o)},Xo}var Zo,wh;function gD(){if(wh)return Zo;wh=1;const t=Qo();return Zo=(r,n)=>r.sort((i,s)=>t(i,s,n)),Zo}var ea,bh;function yD(){if(bh)return ea;bh=1;const t=Qo();return ea=(r,n)=>r.sort((i,s)=>t(s,i,n)),
1065
- ea}var ta,Ah;function qi(){if(Ah)return ta;Ah=1;const t=dt();return ta=(r,n,i)=>t(r,n,i)>0,ta}var ra,Ch;function na(){if(Ch)return ra;Ch=1;const t=dt();return ra=(r,n,i)=>t(r,n,i)<0,ra}var ia,Sh;function Rh(){if(Sh)return ia;Sh=1;const t=dt();return ia=(r,n,i)=>t(r,n,i)===0,ia}var sa,Oh;function Ih(){if(Oh)return sa;Oh=1;const t=dt();return sa=(r,n,i)=>t(r,n,i)!==0,sa}var oa,Fh;function aa(){if(Fh)return oa;Fh=1;const t=dt();return oa=(r,n,i)=>t(r,n,i)>=0,oa}var ua,Ph;function ca(){if(Ph)return ua;
1066
- Ph=1;const t=dt();return ua=(r,n,i)=>t(r,n,i)<=0,ua}var la,Nh;function Th(){if(Nh)return la;Nh=1;const t=Rh(),e=Ih(),r=qi(),n=aa(),i=na(),s=ca();return la=(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 i(a,l,c);case"\
1067
- <=":return s(a,l,c);default:throw new TypeError(`Invalid operator: ${u}`)}},la}var fa,Lh;function ED(){if(Lh)return fa;Lh=1;const t=ze(),e=br(),{safeRe:r,t:n}=rn();return fa=(s,o)=>{if(s instanceof t)return s;if(typeof s=="number"&&(s=String(s)),typeof s!="string")return null;o=o||{};let a=null;if(!o.rtl)a=s.match(o.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const E=o.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let $;for(;($=E.exec(s))&&(!a||a.index+a[0].length!==s.length);)(!a||
1068
- $.index+$[0].length!==a.index+a[0].length)&&(a=$),E.lastIndex=$.index+$[1].length+$[2].length;E.lastIndex=-1}if(a===null)return null;const u=a[2],l=a[3]||"0",c=a[4]||"0",d=o.includePrerelease&&a[5]?`-${a[5]}`:"",h=o.includePrerelease&&a[6]?`+${a[6]}`:"";return e(`${u}.${l}.${c}${d}${h}`,o)},fa}var da,jh;function DD(){if(jh)return da;jh=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.
1069
- map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(r,n)}return this}}return da=t,da}var ha,kh;function ht(){if(kh)return ha;kh=1;const t=/\s+/g;class e{constructor(M,Y){if(Y=i(Y),M instanceof e)return M.loose===!!Y.loose&&M.includePrerelease===!!Y.includePrerelease?M:new e(M.raw,Y);if(M instanceof s)return this.raw=M.value,this.set=[[M]],this.formatted=void 0,this;if(this.options=Y,this.loose=!!Y.loose,
1070
- this.includePrerelease=!!Y.includePrerelease,this.raw=M.trim().replace(t," "),this.set=this.raw.split("||").map(z=>this.parseRange(z.trim())).filter(z=>z.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const z=this.set[0];if(this.set=this.set.filter(X=>!y(X[0])),this.set.length===0)this.set=[z];else if(this.set.length>1){for(const X of this.set)if(X.length===1&&f(X[0])){this.set=[X];break}}}this.formatted=void 0}get range(){if(this.formatted===
1071
- void 0){this.formatted="";for(let M=0;M<this.set.length;M++){M>0&&(this.formatted+="||");const Y=this.set[M];for(let z=0;z<Y.length;z++)z>0&&(this.formatted+=" "),this.formatted+=Y[z].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(M){const z=((this.options.includePrerelease&&E)|(this.options.loose&&$))+":"+M,X=n.get(z);if(X)return X;const se=this.options.loose,q=se?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];M=M.replace(q,B(this.options.includePrerelease)),
1072
- o("hyphen replace",M),M=M.replace(u[l.COMPARATORTRIM],c),o("comparator trim",M),M=M.replace(u[l.TILDETRIM],d),o("tilde trim",M),M=M.replace(u[l.CARETTRIM],h),o("caret trim",M);let C=M.split(" ").map(A=>p(A,this.options)).join(" ").split(/\s+/).map(A=>L(A,this.options));se&&(C=C.filter(A=>(o("loose invalid filter",A,this.options),!!A.match(u[l.COMPARATORLOOSE])))),o("range list",C);const H=new Map,k=C.map(A=>new s(A,this.options));for(const A of k){if(y(A))return[A];H.set(A.value,A)}H.size>1&&H.has(
1073
- "")&&H.delete("");const w=[...H.values()];return n.set(z,w),w}intersects(M,Y){if(!(M instanceof e))throw new TypeError("a Range is required");return this.set.some(z=>g(z,Y)&&M.set.some(X=>g(X,Y)&&z.every(se=>X.every(q=>se.intersects(q,Y)))))}test(M){if(!M)return!1;if(typeof M=="string")try{M=new a(M,this.options)}catch{return!1}for(let Y=0;Y<this.set.length;Y++)if(N(this.set[Y],M,this.options))return!0;return!1}}ha=e;const r=DD(),n=new r,i=jo(),s=Ui(),o=Mi(),a=ze(),{safeRe:u,t:l,comparatorTrimReplace:c,
1074
- tildeTrimReplace:d,caretTrimReplace:h}=rn(),{FLAG_INCLUDE_PRERELEASE:E,FLAG_LOOSE:$}=xi(),y=j=>j.value==="<0.0.0-0",f=j=>j.value==="",g=(j,M)=>{let Y=!0;const z=j.slice();let X=z.pop();for(;Y&&z.length;)Y=z.every(se=>X.intersects(se,M)),X=z.pop();return Y},p=(j,M)=>(o("comp",j,M),j=_(j,M),o("caret",j),j=D(j,M),o("tildes",j),j=I(j,M),o("xrange",j),j=G(j,M),o("stars",j),j),m=j=>!j||j.toLowerCase()==="x"||j==="*",D=(j,M)=>j.trim().split(/\s+/).map(Y=>v(Y,M)).join(" "),v=(j,M)=>{const Y=M.loose?u[l.
1075
- TILDELOOSE]:u[l.TILDE];return j.replace(Y,(z,X,se,q,C)=>{o("tilde",j,z,X,se,q,C);let H;return m(X)?H="":m(se)?H=`>=${X}.0.0 <${+X+1}.0.0-0`:m(q)?H=`>=${X}.${se}.0 <${X}.${+se+1}.0-0`:C?(o("replaceTilde pr",C),H=`>=${X}.${se}.${q}-${C} <${X}.${+se+1}.0-0`):H=`>=${X}.${se}.${q} <${X}.${+se+1}.0-0`,o("tilde return",H),H})},_=(j,M)=>j.trim().split(/\s+/).map(Y=>b(Y,M)).join(" "),b=(j,M)=>{o("caret",j,M);const Y=M.loose?u[l.CARETLOOSE]:u[l.CARET],z=M.includePrerelease?"-0":"";return j.replace(Y,(X,se,q,C,H)=>{
1076
- o("caret",j,X,se,q,C,H);let k;return m(se)?k="":m(q)?k=`>=${se}.0.0${z} <${+se+1}.0.0-0`:m(C)?se==="0"?k=`>=${se}.${q}.0${z} <${se}.${+q+1}.0-0`:k=`>=${se}.${q}.0${z} <${+se+1}.0.0-0`:H?(o("replaceCaret pr",H),se==="0"?q==="0"?k=`>=${se}.${q}.${C}-${H} <${se}.${q}.${+C+1}-0`:k=`>=${se}.${q}.${C}-${H} <${se}.${+q+1}.0-0`:k=`>=${se}.${q}.${C}-${H} <${+se+1}.0.0-0`):(o("no pr"),se==="0"?q==="0"?k=`>=${se}.${q}.${C}${z} <${se}.${q}.${+C+1}-0`:k=`>=${se}.${q}.${C}${z} <${se}.${+q+1}.0-0`:k=`>=${se}.${q}\
1077
- .${C} <${+se+1}.0.0-0`),o("caret return",k),k})},I=(j,M)=>(o("replaceXRanges",j,M),j.split(/\s+/).map(Y=>U(Y,M)).join(" ")),U=(j,M)=>{j=j.trim();const Y=M.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return j.replace(Y,(z,X,se,q,C,H)=>{o("xRange",j,z,X,se,q,C,H);const k=m(se),w=k||m(q),A=w||m(C),R=A;return X==="="&&R&&(X=""),H=M.includePrerelease?"-0":"",k?X===">"||X==="<"?z="<0.0.0-0":z="*":X&&R?(w&&(q=0),C=0,X===">"?(X=">=",w?(se=+se+1,q=0,C=0):(q=+q+1,C=0)):X==="<="&&(X="<",w?se=+se+1:q=+q+1),X==="<"&&
1078
- (H="-0"),z=`${X+se}.${q}.${C}${H}`):w?z=`>=${se}.0.0${H} <${+se+1}.0.0-0`:A&&(z=`>=${se}.${q}.0${H} <${se}.${+q+1}.0-0`),o("xRange return",z),z})},G=(j,M)=>(o("replaceStars",j,M),j.trim().replace(u[l.STAR],"")),L=(j,M)=>(o("replaceGTE0",j,M),j.trim().replace(u[M.includePrerelease?l.GTE0PRE:l.GTE0],"")),B=j=>(M,Y,z,X,se,q,C,H,k,w,A,R)=>(m(z)?Y="":m(X)?Y=`>=${z}.0.0${j?"-0":""}`:m(se)?Y=`>=${z}.${X}.0${j?"-0":""}`:q?Y=`>=${Y}`:Y=`>=${Y}${j?"-0":""}`,m(k)?H="":m(w)?H=`<${+k+1}.0.0-0`:m(A)?H=`<${k}.${+w+
1079
- 1}.0-0`:R?H=`<=${k}.${w}.${A}-${R}`:j?H=`<${k}.${w}.${+A+1}-0`:H=`<=${H}`,`${Y} ${H}`.trim()),N=(j,M,Y)=>{for(let z=0;z<j.length;z++)if(!j[z].test(M))return!1;if(M.prerelease.length&&!Y.includePrerelease){for(let z=0;z<j.length;z++)if(o(j[z].semver),j[z].semver!==s.ANY&&j[z].semver.prerelease.length>0){const X=j[z].semver;if(X.major===M.major&&X.minor===M.minor&&X.patch===M.patch)return!0}return!1}return!0};return ha}var pa,Bh;function Ui(){if(Bh)return pa;Bh=1;const t=Symbol("SemVer ANY");class e{static get ANY(){
1080
- return t}constructor(c,d){if(d=r(d),c instanceof e){if(c.loose===!!d.loose)return c;c=c.value}c=c.trim().split(/\s+/).join(" "),o("comparator",c,d),this.options=d,this.loose=!!d.loose,this.parse(c),this.semver===t?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(c){const d=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],h=c.match(d);if(!h)throw new TypeError(`Invalid comparator: ${c}`);this.operator=h[1]!==void 0?h[1]:"",this.operator==="="&&(this.operator=
1081
- ""),h[2]?this.semver=new a(h[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 s(c,this.operator,this.semver,this.options)}intersects(c,d){if(!(c instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new u(c.value,d).test(this.value):c.operator===""?c.value===""?!0:new u(this.
1082
- value,d).test(c.semver):(d=r(d),d.includePrerelease&&(this.value==="<0.0.0-0"||c.value==="<0.0.0-0")||!d.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("=")||s(this.semver,"<",c.semver,d)&&this.operator.startsWith(">")&&c.operator.startsWith("<")||s(this.
1083
- semver,">",c.semver,d)&&this.operator.startsWith("<")&&c.operator.startsWith(">")))}}pa=e;const r=jo(),{safeRe:n,t:i}=rn(),s=Th(),o=Mi(),a=ze(),u=ht();return pa}var ma,xh;function Hi(){if(xh)return ma;xh=1;const t=ht();return ma=(r,n,i)=>{try{n=new t(n,i)}catch{return!1}return n.test(r)},ma}var ga,Mh;function vD(){if(Mh)return ga;Mh=1;const t=ht();return ga=(r,n)=>new t(r,n).set.map(i=>i.map(s=>s.value).join(" ").trim().split(" ")),ga}var ya,qh;function $D(){if(qh)return ya;qh=1;const t=ze(),e=ht();
1084
- return ya=(n,i,s)=>{let o=null,a=null,u=null;try{u=new e(i,s)}catch{return null}return n.forEach(l=>{u.test(l)&&(!o||a.compare(l)===-1)&&(o=l,a=new t(o,s))}),o},ya}var Ea,Uh;function _D(){if(Uh)return Ea;Uh=1;const t=ze(),e=ht();return Ea=(n,i,s)=>{let o=null,a=null,u=null;try{u=new e(i,s)}catch{return null}return n.forEach(l=>{u.test(l)&&(!o||a.compare(l)===1)&&(o=l,a=new t(o,s))}),o},Ea}var Da,Hh;function wD(){if(Hh)return Da;Hh=1;const t=ze(),e=ht(),r=qi();return Da=(i,s)=>{i=new e(i,s);let o=new t(
1085
- "0.0.0");if(i.test(o)||(o=new t("0.0.0-0"),i.test(o)))return o;o=null;for(let a=0;a<i.set.length;++a){const u=i.set[a];let l=null;u.forEach(c=>{const d=new t(c.semver.version);switch(c.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!l||r(d,l))&&(l=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),l&&(!o||r(o,l))&&(o=l)}return o&&i.test(o)?o:null},Da}var va,Vh;function bD(){if(Vh)return va;
1086
- Vh=1;const t=ht();return va=(r,n)=>{try{return new t(r,n).range||"*"}catch{return null}},va}var $a,zh;function _a(){if(zh)return $a;zh=1;const t=ze(),e=Ui(),{ANY:r}=e,n=ht(),i=Hi(),s=qi(),o=na(),a=ca(),u=aa();return $a=(c,d,h,E)=>{c=new t(c,E),d=new n(d,E);let $,y,f,g,p;switch(h){case">":$=s,y=a,f=o,g=">",p=">=";break;case"<":$=o,y=u,f=s,g="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(c,d,E))return!1;for(let m=0;m<d.set.length;++m){const D=d.set[m];let v=null,
1087
- _=null;if(D.forEach(b=>{b.semver===r&&(b=new e(">=0.0.0")),v=v||b,_=_||b,$(b.semver,v.semver,E)?v=b:f(b.semver,_.semver,E)&&(_=b)}),v.operator===g||v.operator===p||(!_.operator||_.operator===g)&&y(c,_.semver))return!1;if(_.operator===p&&f(c,_.semver))return!1}return!0},$a}var wa,Gh;function AD(){if(Gh)return wa;Gh=1;const t=_a();return wa=(r,n,i)=>t(r,n,">",i),wa}var ba,Wh;function CD(){if(Wh)return ba;Wh=1;const t=_a();return ba=(r,n,i)=>t(r,n,"<",i),ba}var Aa,Kh;function SD(){if(Kh)return Aa;Kh=
1088
- 1;const t=ht();return Aa=(r,n,i)=>(r=new t(r,i),n=new t(n,i),r.intersects(n,i)),Aa}var Ca,Yh;function RD(){if(Yh)return Ca;Yh=1;const t=Hi(),e=dt();return Ca=(r,n,i)=>{const s=[];let o=null,a=null;const u=r.sort((h,E)=>e(h,E,i));for(const h of u)t(h,n,i)?(a=h,o||(o=h)):(a&&s.push([o,a]),a=null,o=null);o&&s.push([o,null]);const l=[];for(const[h,E]of s)h===E?l.push(h):!E&&h===u[0]?l.push("*"):E?h===u[0]?l.push(`<=${E}`):l.push(`${h} - ${E}`):l.push(`>=${h}`);const c=l.join(" || "),d=typeof n.raw==
1089
- "string"?n.raw:String(n);return c.length<d.length?c:n},Ca}var Sa,Jh;function OD(){if(Jh)return Sa;Jh=1;const t=ht(),e=Ui(),{ANY:r}=e,n=Hi(),i=dt(),s=(d,h,E={})=>{if(d===h)return!0;d=new t(d,E),h=new t(h,E);let $=!1;e:for(const y of d.set){for(const f of h.set){const g=u(y,f,E);if($=$||g!==null,g)continue e}if($)return!1}return!0},o=[new e(">=0.0.0-0")],a=[new e(">=0.0.0")],u=(d,h,E)=>{if(d===h)return!0;if(d.length===1&&d[0].semver===r){if(h.length===1&&h[0].semver===r)return!0;E.includePrerelease?
1090
- d=o:d=a}if(h.length===1&&h[0].semver===r){if(E.includePrerelease)return!0;h=a}const $=new Set;let y,f;for(const I of d)I.operator===">"||I.operator===">="?y=l(y,I,E):I.operator==="<"||I.operator==="<="?f=c(f,I,E):$.add(I.semver);if($.size>1)return null;let g;if(y&&f){if(g=i(y.semver,f.semver,E),g>0)return null;if(g===0&&(y.operator!==">="||f.operator!=="<="))return null}for(const I of $){if(y&&!n(I,String(y),E)||f&&!n(I,String(f),E))return null;for(const U of h)if(!n(I,String(U),E))return!1;return!0}
1091
- let p,m,D,v,_=f&&!E.includePrerelease&&f.semver.prerelease.length?f.semver:!1,b=y&&!E.includePrerelease&&y.semver.prerelease.length?y.semver:!1;_&&_.prerelease.length===1&&f.operator==="<"&&_.prerelease[0]===0&&(_=!1);for(const I of h){if(v=v||I.operator===">"||I.operator===">=",D=D||I.operator==="<"||I.operator==="<=",y){if(b&&I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===b.major&&I.semver.minor===b.minor&&I.semver.patch===b.patch&&(b=!1),I.operator===">"||I.operator===">="){
1092
- if(p=l(y,I,E),p===I&&p!==y)return!1}else if(y.operator===">="&&!n(y.semver,String(I),E))return!1}if(f){if(_&&I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===_.major&&I.semver.minor===_.minor&&I.semver.patch===_.patch&&(_=!1),I.operator==="<"||I.operator==="<="){if(m=c(f,I,E),m===I&&m!==f)return!1}else if(f.operator==="<="&&!n(f.semver,String(I),E))return!1}if(!I.operator&&(f||y)&&g!==0)return!1}return!(y&&D&&!f&&g!==0||f&&v&&!y&&g!==0||b||_)},l=(d,h,E)=>{if(!d)return h;const $=i(
1093
- d.semver,h.semver,E);return $>0?d:$<0||h.operator===">"&&d.operator===">="?h:d},c=(d,h,E)=>{if(!d)return h;const $=i(d.semver,h.semver,E);return $<0?d:$>0||h.operator==="<"&&d.operator==="<="?h:d};return Sa=s,Sa}var Ra,Xh;function ID(){if(Xh)return Ra;Xh=1;const t=rn(),e=xi(),r=ze(),n=uh(),i=br(),s=oD(),o=aD(),a=uD(),u=cD(),l=lD(),c=fD(),d=dD(),h=hD(),E=dt(),$=pD(),y=mD(),f=Qo(),g=gD(),p=yD(),m=qi(),D=na(),v=Rh(),_=Ih(),b=aa(),I=ca(),U=Th(),G=ED(),L=Ui(),B=ht(),N=Hi(),j=vD(),M=$D(),Y=_D(),z=wD(),
1094
- X=bD(),se=_a(),q=AD(),C=CD(),H=SD(),k=RD(),w=OD();return Ra={parse:i,valid:s,clean:o,inc:a,diff:u,major:l,minor:c,patch:d,prerelease:h,compare:E,rcompare:$,compareLoose:y,compareBuild:f,sort:g,rsort:p,gt:m,lt:D,eq:v,neq:_,gte:b,lte:I,cmp:U,coerce:G,Comparator:L,Range:B,satisfies:N,toComparators:j,maxSatisfying:M,minSatisfying:Y,minVersion:z,validRange:X,outside:se,gtr:q,ltr:C,intersects:H,simplifyRange:k,subset:w,SemVer:r,re:t.re,src:t.src,tokens:t.t,SEMVER_SPEC_VERSION:e.SEMVER_SPEC_VERSION,RELEASE_TYPES:e.
1095
- RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},Ra}var Oa=ID();const Ar=Ji(Oa),FD=Object.prototype.toString,PD="[object Uint8Array]",ND="[object ArrayBuffer]";function Qh(t,e,r){return t?t.constructor===e?!0:FD.call(t)===r:!1}function Zh(t){return Qh(t,Uint8Array,PD)}function TD(t){return Qh(t,ArrayBuffer,ND)}function LD(t){return Zh(t)||TD(t)}function jD(t){if(!Zh(t))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof t}\``)}function kD(t){
1096
- if(!LD(t))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``)}function ep(t,e){if(t.length===0)return new Uint8Array(0);e??=t.reduce((i,s)=>i+s.length,0);const r=new Uint8Array(e);let n=0;for(const i of t)jD(i),r.set(i,n),n+=i.length;return r}const tp={utf8:new globalThis.TextDecoder("utf8")};function rp(t,e="utf8"){return kD(t),tp[e]??=new globalThis.TextDecoder(e),tp[e].decode(t)}function BD(t){if(typeof t!="string")throw new TypeError(`Expected \`string\`, got\
1097
- \`${typeof t}\``)}const xD=new globalThis.TextEncoder;function Ia(t){return BD(t),xD.encode(t)}Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));const MD=XE.default,np="aes-256-cbc",Cr=()=>Object.create(null),qD=t=>t!=null,UD=(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`)},Vi="__internal__",Fa=`${Vi}.migrations.version`;class HD{path;events;#n;#t;#e;#r={};constructor(e={}){
1098
- 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=ry(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 qE.Ajv2020({allErrors:!0,useDefaults:!0,
1099
- ...r.ajvOptions});MD(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=be.resolve(r.cwd,`${r.configName??"config"}${n}`);const i=this.
1100
- store,s=Object.assign(Cr(),r.defaults,i);if(r.migrations){if(!r.projectVersion)throw new Error("Please specify the `projectVersion` option.");this._migrate(r.migrations,r.projectVersion,r.beforeEachMigration)}this._validate(s);try{sm.deepEqual(i,s)}catch{this.store=s}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 \
1101
- 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 ${Vi} key, as it's used to manage this module internal operations.`);const{store:n}=this,i=(s,o)=>{UD(s,o),this.#e.accessPropertiesByDotNotation?kc(n,s,o):n[s]=o};if(typeof e=="object"){const s=e;for(const[o,a]of Object.entries(s))i(o,a)}else i(e,r);this.store=n}has(e){return this.#e.accessPropertiesByDotNotation?
1102
- Qg(this.store,e):e in this.store}reset(...e){for(const r of e)qD(this.#r[r])&&this.set(r,this.#r[r])}delete(e){const{store:r}=this;this.#e.accessPropertiesByDotNotation?Xg(r,e):delete r[e],this.store=r}clear(){this.store=Cr();for(const e of Object.keys(this.#r))this.reset(e)}onDidChange(e,r){if(typeof e!="string")throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof e}`);if(typeof r!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof r}`);
1103
- 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=ge.readFileSync(this.path,this.#t?null:"utf8"),r=this._encryptData(e),n=this._deserialize(r);return this._validate(n),Object.assign(Cr(),n)}catch(e){if(e?.code==="ENOENT")return this._ensureDirectory(),Cr();
1104
- if(this.#e.clearInvalidConfig&&e.name==="SyntaxError")return Cr();throw e}}set store(e){this._ensureDirectory(),this._validate(e),this._write(e),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(const[e,r]of Object.entries(this.store))yield[e,r]}_encryptData(e){if(!this.#t)return typeof e=="string"?e:rp(e);try{const r=e.slice(0,16),n=Pr.pbkdf2Sync(this.#t,r.toString(),1e4,32,"sha512"),i=Pr.createDecipheriv(np,n,r),s=e.slice(17),o=typeof s=="string"?Ia(s):s;return rp(ep([i.update(
1105
- o),i.final()]))}catch{}return e.toString()}_handleChange(e,r){let n=e();const i=()=>{const s=n,o=e();im(o,s)||(n=o,r.call(this,o,s))};return this.events.addEventListener("change",i),()=>{this.events.removeEventListener("change",i)}}_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:i,message:s=""})=>`\`${i.slice(1)}\` ${s}`);throw new Error("Config schema violation: "+n.join(
1106
- "; "))}_ensureDirectory(){ge.mkdirSync(be.dirname(this.path),{recursive:!0})}_write(e){let r=this._serialize(e);if(this.#t){const n=Pr.randomBytes(16),i=Pr.pbkdf2Sync(this.#t,n.toString(),1e4,32,"sha512"),s=Pr.createCipheriv(np,i,n);r=ep([n,Ia(":"),s.update(Ia(r)),s.final()])}if(Te.env.SNAP)ge.writeFileSync(this.path,r,{mode:this.#e.configFileMode});else try{Uc(this.path,r,{mode:this.#e.configFileMode})}catch(n){if(n?.code==="EXDEV"){ge.writeFileSync(this.path,r,{mode:this.#e.configFileMode});return}
1107
- throw n}}_watch(){this._ensureDirectory(),ge.existsSync(this.path)||this._write(Cr()),Te.platform==="win32"?ge.watch(this.path,{persistent:!1},rh(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100})):ge.watchFile(this.path,{persistent:!1},rh(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5e3}))}_migrate(e,r,n){let i=this._get(Fa,"0.0.0");const s=Object.keys(e).filter(a=>this._shouldPerformMigration(a,i,r));let o={...this.store};for(const a of s)try{n&&n(this,{fromVersion:i,
1108
- toVersion:a,finalVersion:r,versions:s});const u=e[a];u?.(this),this._set(Fa,a),i=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(i)||!Ar.eq(i,r))&&this._set(Fa,r)}_containsReservedKey(e){return typeof e=="object"&&Object.keys(e)[0]===Vi?!0:typeof e!="string"?!1:this.#e.accessPropertiesByDotNotation?!!e.startsWith(`${Vi}.`):!1}_isVersionInRangeFormat(e){
1109
- return Ar.clean(e)===null}_shouldPerformMigration(e,r,n){return this._isVersionInRangeFormat(e)?r!=="0.0.0"&&Ar.satisfies(r,e)?!1:Ar.satisfies(n,e):!(Ar.lte(e,r)||Ar.gt(e,n))}_get(e,r){return Jg(this.store,e,r)}_set(e,r){const{store:n}=this;kc(n,e,r),this.store=n}}class ip extends Error{response;request;options;constructor(e,r,n){const i=e.status||e.status===0?e.status:"",s=e.statusText||"",o=`${i} ${s}`.trim(),a=o?`status code ${o}`:"an unknown error";super(`Request failed with ${a}: ${r.method}\
1110
- ${r.url}`),this.name="HTTPError",this.response=e,this.request=r,this.options=n}}class sp extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}}const nn=t=>t!==null&&typeof t=="object",zi=(...t)=>{for(const e of t)if((!nn(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return Pa({},...t)},op=(t={},e={})=>{const r=new globalThis.Headers(t),n=e instanceof globalThis.Headers,i=new globalThis.
1111
- Headers(e);for(const[s,o]of i.entries())n&&o==="undefined"||o===void 0?r.delete(s):r.set(s,o);return r};function Gi(t,e,r){return Object.hasOwn(e,r)&&e[r]===void 0?[]:Pa(t[r]??[],e[r]??[])}const ap=(t={},e={})=>({beforeRequest:Gi(t,e,"beforeRequest"),beforeRetry:Gi(t,e,"beforeRetry"),afterResponse:Gi(t,e,"afterResponse"),beforeError:Gi(t,e,"beforeError")}),Pa=(...t)=>{let e={},r={},n={};for(const i of t)if(Array.isArray(i))Array.isArray(e)||(e=[]),e=[...e,...i];else if(nn(i)){for(let[s,o]of Object.
1112
- entries(i))nn(o)&&s in e&&(o=Pa(e[s],o)),e={...e,[s]:o};nn(i.hooks)&&(n=ap(n,i.hooks),e.hooks=n),nn(i.headers)&&(r=op(r,i.headers),e.headers=r)}return e},VD=(()=>{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("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported\
1113
- BodyInit type")return!1;throw i}return t&&!e})(),zD=typeof globalThis.AbortController=="function",GD=typeof globalThis.ReadableStream=="function",WD=typeof globalThis.FormData=="function",up=["get","post","put","patch","head","delete"],KD={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Na=2147483647,cp=Symbol("stop"),YD={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,
1114
- fetch:!0},JD={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},XD=t=>up.includes(t)?t.toUpperCase():t,QD=["get","put","head","delete","options","trace"],ZD=[408,413,429,500,502,503,504],ev=[413,429,503],lp={limit:2,methods:QD,statusCodes:ZD,afterStatusCodes:ev,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},
1115
- tv=(t={})=>{if(typeof t=="number")return{...lp,limit:t};if(t.methods&&!Array.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{...lp,...t}};async function rv(t,e,r,n){return new Promise((i,s)=>{const o=setTimeout(()=>{r&&r.abort(),s(new sp(t))},n.timeout);n.fetch(t,e).then(i).catch(s).then(()=>{clearTimeout(o)})})}async function nv(t,{signal:e}){return new Promise((r,n)=>{
1116
- e&&(e.throwIfAborted(),e.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(s),n(e.reason)}const s=setTimeout(()=>{e?.removeEventListener("abort",i),r()},t)})}const iv=(t,e)=>{const r={};for(const n in e)!(n in JD)&&!(n in YD)&&!(n in t)&&(r[n]=e[n]);return r};class Yi{static create(e,r){const n=new Yi(e,r),i=async()=>{if(typeof n._options.timeout=="number"&&n._options.timeout>Na)throw new RangeError(`The \`timeout\` option cannot be greater than ${Na}`);await Promise.resolve();let a=await n.
1117
- _fetch();for(const u of n._options.hooks.afterResponse){const l=await u(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 ip(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(!GD)throw new Error(
1118
- "Streams are not supported in your environment. `ReadableStream` is missing.");return n._stream(a.clone(),n._options.onDownloadProgress)}return a},o=n._options.retry.methods.includes(n.request.method.toLowerCase())?n._retry(i):i();for(const[a,u]of Object.entries(KD))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.text())}
1119
- return l[a]()};return o}request;abortController;_retryCount=0;_input;_options;constructor(e,r={}){if(this._input=e,this._options={...r,headers:op(this._input.headers,r.headers),hooks:ap({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:XD(r.method??this._input.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:tv(r.retry),throwHttpErrors:r.throwHttpErrors!==!1,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&
1120
- !(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(zD){this.abortController=new globalThis.AbortController;const n=this._options.
1121
- signal??this._input.signal;n?.aborted&&this.abortController.abort(n?.reason),n?.addEventListener("abort",()=>{this.abortController.abort(n.reason)}),this._options.signal=this.abortController.signal}if(VD&&(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.
1122
- Request(this._input,this._options),this._options.searchParams){const i="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),s=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,i);(WD&&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=
1123
- new globalThis.Request(new globalThis.Request(s,{...this.request}),this._options)}}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof sp)throw e;if(e instanceof ip){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.
1124
- includes(e.response.status)){let i=Number(n)*1e3;Number.isNaN(i)?i=Date.parse(n)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());const s=this._options.retry.maxRetryAfter??i;return i<s?i:s}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.
1125
- min(this._calculateRetryDelay(r),Na);if(this._retryCount<1)throw r;await nv(n,{signal:this._options.signal});for(const i of this._options.hooks.beforeRetry)if(await i({request:this.request,options:this._options,error:r,retryCount:this._retryCount})===cp)return;return this._retry(e)}}async _fetch(){for(const n of this._options.hooks.beforeRequest){const i=await n(this.request,this._options);if(i instanceof Request){this.request=i;break}if(i instanceof Response)return i}const e=iv(this.request,this.
1126
- _options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,e):rv(r,e,this.abortController,this._options)}_stream(e,r){const n=Number(e.headers.get("content-length"))||0;let i=0;return e.status===204?(r&&r({percent:1,totalBytes:n,transferredBytes:i},new Uint8Array),new globalThis.Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(s){const o=e.body.getReader();r&&
1127
- r({percent:0,transferredBytes:0,totalBytes:n},new Uint8Array);async function a(){const{done:u,value:l}=await o.read();if(u){s.close();return}if(r){i+=l.byteLength;const c=n===0?0:i/n;r({percent:c,transferredBytes:i,totalBytes:n},l)}s.enqueue(l),await a()}await a()}}),{status:e.status,statusText:e.statusText,headers:e.headers})}}const Ta=t=>{const e=(r,n)=>Yi.create(r,zi(t,n));for(const r of up)e[r]=(n,i)=>Yi.create(n,zi(t,i,{method:r}));return e.create=r=>Ta(zi(r)),e.extend=r=>(typeof r=="functi\
1128
- on"&&(r=r(t??{})),Ta(zi(t,r))),e.stop=cp,e},sv=Ta(),Wi=Object.create(null),sn=t=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?Wi:globalThis),Vt=new Proxy(Wi,{get(t,e){return sn()[e]??Wi[e]},has(t,e){const r=sn();return e in r||e in Wi},set(t,e,r){const n=sn(!0);return n[e]=r,!0},deleteProperty(t,e){if(!e)return!1;const r=sn(!0);return delete r[e],!0},ownKeys(){const t=sn(!0);return Object.keys(t)}}),fp=typeof process<"u"&&process.env&&process.
1129
- env.NODE_ENV||"",ov=[["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"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRON\
673
+ break;case"minor":(this.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 y=Number(h)?1:0;if(this.prerelease.length===0)this.prerelease=[y];else{let b=this.prerelease.length;for(;--b>=0;)typeof this.prerelease[b]=="number"&&(this.prerelease[b]++,b=-2);if(b===-1){if(d===this.prerelease.join(".")&&h===!1)throw new Error("invalid increment argument: identifier alre\
674
+ ady exists");this.prerelease.push(y)}}if(d){let b=[d,y];h===!1&&(b=[d]),a(this.prerelease[0],d)===0?isNaN(this.prerelease[1])&&(this.prerelease=b):this.prerelease=b}break}default:throw new Error(`invalid increment argument: ${c}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Ki=u,Ki}var Yi,td;function tr(){if(td)return Yi;td=1;const t=Le();return Yi=(r,n,s=!1)=>{if(r instanceof t)return r;try{return new t(r,n)}catch(i){if(!s)return null;throw i}},
675
+ Yi}var Xi,rd;function By(){if(rd)return Xi;rd=1;const t=tr();return Xi=(r,n)=>{const s=t(r,n);return s?s.version:null},Xi}var Ji,nd;function Wy(){if(nd)return Ji;nd=1;const t=tr();return Ji=(r,n)=>{const s=t(r.trim().replace(/^[=v]+/,""),n);return s?s.version:null},Ji}var Qi,sd;function Ky(){if(sd)return Qi;sd=1;const t=Le();return Qi=(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}},Qi}var Zi,id;function Yy(){
676
+ if(id)return Zi;id=1;const t=tr();return Zi=(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 h=c?"pre":"";return s.major!==i.major?h+"major":s.minor!==i.minor?h+"minor":s.patch!==i.patch?h+"patch":"prerelease"},Zi}var eo,od;function Xy(){if(od)return eo;od=1;const t=Le();return eo=
677
+ (r,n)=>new t(r,n).major,eo}var to,ad;function Jy(){if(ad)return to;ad=1;const t=Le();return to=(r,n)=>new t(r,n).minor,to}var ro,cd;function Qy(){if(cd)return ro;cd=1;const t=Le();return ro=(r,n)=>new t(r,n).patch,ro}var no,ud;function Zy(){if(ud)return no;ud=1;const t=tr();return no=(r,n)=>{const s=t(r,n);return s&&s.prerelease.length?s.prerelease:null},no}var so,ld;function Ze(){if(ld)return so;ld=1;const t=Le();return so=(r,n,s)=>new t(r,s).compare(new t(n,s)),so}var io,fd;function e_(){if(fd)
678
+ return io;fd=1;const t=Ze();return io=(r,n,s)=>t(n,r,s),io}var oo,dd;function t_(){if(dd)return oo;dd=1;const t=Ze();return oo=(r,n)=>t(r,n,!0),oo}var ao,hd;function co(){if(hd)return ao;hd=1;const t=Le();return ao=(r,n,s)=>{const i=new t(r,s),o=new t(n,s);return i.compare(o)||i.compareBuild(o)},ao}var uo,pd;function r_(){if(pd)return uo;pd=1;const t=co();return uo=(r,n)=>r.sort((s,i)=>t(s,i,n)),uo}var lo,md;function n_(){if(md)return lo;md=1;const t=co();return lo=(r,n)=>r.sort((s,i)=>t(i,s,n)),
679
+ lo}var fo,gd;function us(){if(gd)return fo;gd=1;const t=Ze();return fo=(r,n,s)=>t(r,n,s)>0,fo}var ho,yd;function po(){if(yd)return ho;yd=1;const t=Ze();return ho=(r,n,s)=>t(r,n,s)<0,ho}var mo,_d;function $d(){if(_d)return mo;_d=1;const t=Ze();return mo=(r,n,s)=>t(r,n,s)===0,mo}var go,vd;function bd(){if(vd)return go;vd=1;const t=Ze();return go=(r,n,s)=>t(r,n,s)!==0,go}var yo,wd;function _o(){if(wd)return yo;wd=1;const t=Ze();return yo=(r,n,s)=>t(r,n,s)>=0,yo}var $o,Ed;function vo(){if(Ed)return $o;
680
+ Ed=1;const t=Ze();return $o=(r,n,s)=>t(r,n,s)<=0,$o}var bo,Sd;function Rd(){if(Sd)return bo;Sd=1;const t=$d(),e=bd(),r=us(),n=_o(),s=po(),i=vo();return bo=(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"\
681
+ <=":return i(a,l,c);default:throw new TypeError(`Invalid operator: ${u}`)}},bo}var wo,Ad;function s_(){if(Ad)return wo;Ad=1;const t=Le(),e=tr(),{safeRe:r,t:n}=Cr();return wo=(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 y=o.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let b;for(;(b=y.exec(i))&&(!a||a.index+a[0].length!==i.length);)(!a||
682
+ b.index+b[0].length!==a.index+a[0].length)&&(a=b),y.lastIndex=b.index+b[1].length+b[2].length;y.lastIndex=-1}if(a===null)return null;const u=a[2],l=a[3]||"0",c=a[4]||"0",d=o.includePrerelease&&a[5]?`-${a[5]}`:"",h=o.includePrerelease&&a[6]?`+${a[6]}`:"";return e(`${u}.${l}.${c}${d}${h}`,o)},wo}var Eo,Od;function i_(){if(Od)return Eo;Od=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.
683
+ map.delete(r)}set(r,n){if(!this.delete(r)&&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 Eo=t,Eo}var So,Cd;function et(){if(Cd)return So;Cd=1;const t=/\s+/g;class e{constructor(H,K){if(K=s(K),H instanceof e)return H.loose===!!K.loose&&H.includePrerelease===!!K.includePrerelease?H:new e(H.raw,K);if(H instanceof i)return this.raw=H.value,this.set=[[H]],this.formatted=void 0,this;if(this.options=K,this.loose=!!K.loose,
684
+ this.includePrerelease=!!K.includePrerelease,this.raw=H.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(X=>!_(X[0])),this.set.length===0)this.set=[G];else if(this.set.length>1){for(const X of this.set)if(X.length===1&&f(X[0])){this.set=[X];break}}}this.formatted=void 0}get range(){if(this.formatted===
685
+ void 0){this.formatted="";for(let H=0;H<this.set.length;H++){H>0&&(this.formatted+="||");const K=this.set[H];for(let G=0;G<K.length;G++)G>0&&(this.formatted+=" "),this.formatted+=K[G].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(H){const G=((this.options.includePrerelease&&y)|(this.options.loose&&b))+":"+H,X=n.get(G);if(X)return X;const se=this.options.loose,U=se?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];H=H.replace(U,k(this.options.includePrerelease)),
686
+ o("hyphen replace",H),H=H.replace(u[l.COMPARATORTRIM],c),o("comparator trim",H),H=H.replace(u[l.TILDETRIM],d),o("tilde trim",H),H=H.replace(u[l.CARETTRIM],h),o("caret trim",H);let A=H.split(" ").map(R=>p(R,this.options)).join(" ").split(/\s+/).map(R=>D(R,this.options));se&&(A=A.filter(R=>(o("loose invalid filter",R,this.options),!!R.match(u[l.COMPARATORLOOSE])))),o("range list",A);const z=new Map,M=A.map(R=>new i(R,this.options));for(const R of M){if(_(R))return[R];z.set(R.value,R)}z.size>1&&z.has(
687
+ "")&&z.delete("");const w=[...z.values()];return n.set(G,w),w}intersects(H,K){if(!(H instanceof e))throw new TypeError("a Range is required");return this.set.some(G=>g(G,K)&&H.set.some(X=>g(X,K)&&G.every(se=>X.every(U=>se.intersects(U,K)))))}test(H){if(!H)return!1;if(typeof H=="string")try{H=new a(H,this.options)}catch{return!1}for(let K=0;K<this.set.length;K++)if(j(this.set[K],H,this.options))return!0;return!1}}So=e;const r=i_(),n=new r,s=Bi(),i=ls(),o=cs(),a=Le(),{safeRe:u,t:l,comparatorTrimReplace:c,
688
+ tildeTrimReplace:d,caretTrimReplace:h}=Cr(),{FLAG_INCLUDE_PRERELEASE:y,FLAG_LOOSE:b}=as(),_=x=>x.value==="<0.0.0-0",f=x=>x.value==="",g=(x,H)=>{let K=!0;const G=x.slice();let X=G.pop();for(;K&&G.length;)K=G.every(se=>X.intersects(se,H)),X=G.pop();return K},p=(x,H)=>(o("comp",x,H),x=E(x,H),o("caret",x),x=$(x,H),o("tildes",x),x=I(x,H),o("xrange",x),x=B(x,H),o("stars",x),x),m=x=>!x||x.toLowerCase()==="x"||x==="*",$=(x,H)=>x.trim().split(/\s+/).map(K=>v(K,H)).join(" "),v=(x,H)=>{const K=H.loose?u[l.
689
+ TILDELOOSE]:u[l.TILDE];return x.replace(K,(G,X,se,U,A)=>{o("tilde",x,G,X,se,U,A);let z;return m(X)?z="":m(se)?z=`>=${X}.0.0 <${+X+1}.0.0-0`:m(U)?z=`>=${X}.${se}.0 <${X}.${+se+1}.0-0`:A?(o("replaceTilde pr",A),z=`>=${X}.${se}.${U}-${A} <${X}.${+se+1}.0-0`):z=`>=${X}.${se}.${U} <${X}.${+se+1}.0-0`,o("tilde return",z),z})},E=(x,H)=>x.trim().split(/\s+/).map(K=>S(K,H)).join(" "),S=(x,H)=>{o("caret",x,H);const K=H.loose?u[l.CARETLOOSE]:u[l.CARET],G=H.includePrerelease?"-0":"";return x.replace(K,(X,se,U,A,z)=>{
690
+ o("caret",x,X,se,U,A,z);let M;return m(se)?M="":m(U)?M=`>=${se}.0.0${G} <${+se+1}.0.0-0`:m(A)?se==="0"?M=`>=${se}.${U}.0${G} <${se}.${+U+1}.0-0`:M=`>=${se}.${U}.0${G} <${+se+1}.0.0-0`:z?(o("replaceCaret pr",z),se==="0"?U==="0"?M=`>=${se}.${U}.${A}-${z} <${se}.${U}.${+A+1}-0`:M=`>=${se}.${U}.${A}-${z} <${se}.${+U+1}.0-0`:M=`>=${se}.${U}.${A}-${z} <${+se+1}.0.0-0`):(o("no pr"),se==="0"?U==="0"?M=`>=${se}.${U}.${A}${G} <${se}.${U}.${+A+1}-0`:M=`>=${se}.${U}.${A}${G} <${se}.${+U+1}.0-0`:M=`>=${se}.${U}\
691
+ .${A} <${+se+1}.0.0-0`),o("caret return",M),M})},I=(x,H)=>(o("replaceXRanges",x,H),x.split(/\s+/).map(K=>F(K,H)).join(" ")),F=(x,H)=>{x=x.trim();const K=H.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return x.replace(K,(G,X,se,U,A,z)=>{o("xRange",x,G,X,se,U,A,z);const M=m(se),w=M||m(U),R=w||m(A),C=R;return X==="="&&C&&(X=""),z=H.includePrerelease?"-0":"",M?X===">"||X==="<"?G="<0.0.0-0":G="*":X&&C?(w&&(U=0),A=0,X===">"?(X=">=",w?(se=+se+1,U=0,A=0):(U=+U+1,A=0)):X==="<="&&(X="<",w?se=+se+1:U=+U+1),X==="<"&&
692
+ (z="-0"),G=`${X+se}.${U}.${A}${z}`):w?G=`>=${se}.0.0${z} <${+se+1}.0.0-0`:R&&(G=`>=${se}.${U}.0${z} <${se}.${+U+1}.0-0`),o("xRange return",G),G})},B=(x,H)=>(o("replaceStars",x,H),x.trim().replace(u[l.STAR],"")),D=(x,H)=>(o("replaceGTE0",x,H),x.trim().replace(u[H.includePrerelease?l.GTE0PRE:l.GTE0],"")),k=x=>(H,K,G,X,se,U,A,z,M,w,R,C)=>(m(G)?K="":m(X)?K=`>=${G}.0.0${x?"-0":""}`:m(se)?K=`>=${G}.${X}.0${x?"-0":""}`:U?K=`>=${K}`:K=`>=${K}${x?"-0":""}`,m(M)?z="":m(w)?z=`<${+M+1}.0.0-0`:m(R)?z=`<${M}.${+w+
693
+ 1}.0-0`:C?z=`<=${M}.${w}.${R}-${C}`:x?z=`<${M}.${w}.${+R+1}-0`:z=`<=${z}`,`${K} ${z}`.trim()),j=(x,H,K)=>{for(let G=0;G<x.length;G++)if(!x[G].test(H))return!1;if(H.prerelease.length&&!K.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 X=x[G].semver;if(X.major===H.major&&X.minor===H.minor&&X.patch===H.patch)return!0}return!1}return!0};return So}var Ro,Pd;function ls(){if(Pd)return Ro;Pd=1;const t=Symbol("SemVer ANY");class e{static get ANY(){
694
+ return t}constructor(c,d){if(d=r(d),c instanceof e){if(c.loose===!!d.loose)return c;c=c.value}c=c.trim().split(/\s+/).join(" "),o("comparator",c,d),this.options=d,this.loose=!!d.loose,this.parse(c),this.semver===t?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(c){const d=this.options.loose?n[s.COMPARATORLOOSE]:n[s.COMPARATOR],h=c.match(d);if(!h)throw new TypeError(`Invalid comparator: ${c}`);this.operator=h[1]!==void 0?h[1]:"",this.operator==="="&&(this.operator=
695
+ ""),h[2]?this.semver=new a(h[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,d){if(!(c instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new u(c.value,d).test(this.value):c.operator===""?c.value===""?!0:new u(this.
696
+ value,d).test(c.semver):(d=r(d),d.includePrerelease&&(this.value==="<0.0.0-0"||c.value==="<0.0.0-0")||!d.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,d)&&this.operator.startsWith(">")&&c.operator.startsWith("<")||i(this.
697
+ semver,">",c.semver,d)&&this.operator.startsWith("<")&&c.operator.startsWith(">")))}}Ro=e;const r=Bi(),{safeRe:n,t:s}=Cr(),i=Rd(),o=cs(),a=Le(),u=et();return Ro}var Ao,Id;function fs(){if(Id)return Ao;Id=1;const t=et();return Ao=(r,n,s)=>{try{n=new t(n,s)}catch{return!1}return n.test(r)},Ao}var Oo,Nd;function o_(){if(Nd)return Oo;Nd=1;const t=et();return Oo=(r,n)=>new t(r,n).set.map(s=>s.map(i=>i.value).join(" ").trim().split(" ")),Oo}var Co,Td;function a_(){if(Td)return Co;Td=1;const t=Le(),e=et();
698
+ return Co=(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},Co}var Po,jd;function c_(){if(jd)return Po;jd=1;const t=Le(),e=et();return Po=(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},Po}var Io,Ld;function u_(){if(Ld)return Io;Ld=1;const t=Le(),e=et(),r=us();return Io=(s,i)=>{s=new e(s,i);let o=new t(
699
+ "0.0.0");if(s.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 d=new t(c.semver.version);switch(c.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!l||r(d,l))&&(l=d);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},Io}var No,Dd;function l_(){if(Dd)return No;
700
+ Dd=1;const t=et();return No=(r,n)=>{try{return new t(r,n).range||"*"}catch{return null}},No}var To,xd;function jo(){if(xd)return To;xd=1;const t=Le(),e=ls(),{ANY:r}=e,n=et(),s=fs(),i=us(),o=po(),a=vo(),u=_o();return To=(c,d,h,y)=>{c=new t(c,y),d=new n(d,y);let b,_,f,g,p;switch(h){case">":b=i,_=a,f=o,g=">",p=">=";break;case"<":b=o,_=u,f=i,g="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(c,d,y))return!1;for(let m=0;m<d.set.length;++m){const $=d.set[m];let v=null,
701
+ E=null;if($.forEach(S=>{S.semver===r&&(S=new e(">=0.0.0")),v=v||S,E=E||S,b(S.semver,v.semver,y)?v=S:f(S.semver,E.semver,y)&&(E=S)}),v.operator===g||v.operator===p||(!E.operator||E.operator===g)&&_(c,E.semver))return!1;if(E.operator===p&&f(c,E.semver))return!1}return!0},To}var Lo,Md;function f_(){if(Md)return Lo;Md=1;const t=jo();return Lo=(r,n,s)=>t(r,n,">",s),Lo}var Do,kd;function d_(){if(kd)return Do;kd=1;const t=jo();return Do=(r,n,s)=>t(r,n,"<",s),Do}var xo,qd;function h_(){if(qd)return xo;qd=
702
+ 1;const t=et();return xo=(r,n,s)=>(r=new t(r,s),n=new t(n,s),r.intersects(n,s)),xo}var Mo,Hd;function p_(){if(Hd)return Mo;Hd=1;const t=fs(),e=Ze();return Mo=(r,n,s)=>{const i=[];let o=null,a=null;const u=r.sort((h,y)=>e(h,y,s));for(const h of u)t(h,n,s)?(a=h,o||(o=h)):(a&&i.push([o,a]),a=null,o=null);o&&i.push([o,null]);const l=[];for(const[h,y]of i)h===y?l.push(h):!y&&h===u[0]?l.push("*"):y?h===u[0]?l.push(`<=${y}`):l.push(`${h} - ${y}`):l.push(`>=${h}`);const c=l.join(" || "),d=typeof n.raw==
703
+ "string"?n.raw:String(n);return c.length<d.length?c:n},Mo}var ko,Ud;function m_(){if(Ud)return ko;Ud=1;const t=et(),e=ls(),{ANY:r}=e,n=fs(),s=Ze(),i=(d,h,y={})=>{if(d===h)return!0;d=new t(d,y),h=new t(h,y);let b=!1;e:for(const _ of d.set){for(const f of h.set){const g=u(_,f,y);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=(d,h,y)=>{if(d===h)return!0;if(d.length===1&&d[0].semver===r){if(h.length===1&&h[0].semver===r)return!0;y.includePrerelease?
704
+ d=o:d=a}if(h.length===1&&h[0].semver===r){if(y.includePrerelease)return!0;h=a}const b=new Set;let _,f;for(const I of d)I.operator===">"||I.operator===">="?_=l(_,I,y):I.operator==="<"||I.operator==="<="?f=c(f,I,y):b.add(I.semver);if(b.size>1)return null;let g;if(_&&f){if(g=s(_.semver,f.semver,y),g>0)return null;if(g===0&&(_.operator!==">="||f.operator!=="<="))return null}for(const I of b){if(_&&!n(I,String(_),y)||f&&!n(I,String(f),y))return null;for(const F of h)if(!n(I,String(F),y))return!1;return!0}
705
+ let p,m,$,v,E=f&&!y.includePrerelease&&f.semver.prerelease.length?f.semver:!1,S=_&&!y.includePrerelease&&_.semver.prerelease.length?_.semver:!1;E&&E.prerelease.length===1&&f.operator==="<"&&E.prerelease[0]===0&&(E=!1);for(const I of h){if(v=v||I.operator===">"||I.operator===">=",$=$||I.operator==="<"||I.operator==="<=",_){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===">="){
706
+ if(p=l(_,I,y),p===I&&p!==_)return!1}else if(_.operator===">="&&!n(_.semver,String(I),y))return!1}if(f){if(E&&I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===E.major&&I.semver.minor===E.minor&&I.semver.patch===E.patch&&(E=!1),I.operator==="<"||I.operator==="<="){if(m=c(f,I,y),m===I&&m!==f)return!1}else if(f.operator==="<="&&!n(f.semver,String(I),y))return!1}if(!I.operator&&(f||_)&&g!==0)return!1}return!(_&&$&&!f&&g!==0||f&&v&&!_&&g!==0||S||E)},l=(d,h,y)=>{if(!d)return h;const b=s(
707
+ d.semver,h.semver,y);return b>0?d:b<0||h.operator===">"&&d.operator===">="?h:d},c=(d,h,y)=>{if(!d)return h;const b=s(d.semver,h.semver,y);return b<0?d:b>0||h.operator==="<"&&d.operator==="<="?h:d};return ko=i,ko}var qo,Fd;function g_(){if(Fd)return qo;Fd=1;const t=Cr(),e=as(),r=Le(),n=Zf(),s=tr(),i=By(),o=Wy(),a=Ky(),u=Yy(),l=Xy(),c=Jy(),d=Qy(),h=Zy(),y=Ze(),b=e_(),_=t_(),f=co(),g=r_(),p=n_(),m=us(),$=po(),v=$d(),E=bd(),S=_o(),I=vo(),F=Rd(),B=s_(),D=ls(),k=et(),j=fs(),x=o_(),H=a_(),K=c_(),G=u_(),
708
+ X=l_(),se=jo(),U=f_(),A=d_(),z=h_(),M=p_(),w=m_();return qo={parse:s,valid:i,clean:o,inc:a,diff:u,major:l,minor:c,patch:d,prerelease:h,compare:y,rcompare:b,compareLoose:_,compareBuild:f,sort:g,rsort:p,gt:m,lt:$,eq:v,neq:E,gte:S,lte:I,cmp:F,coerce:B,Comparator:D,Range:k,satisfies:j,toComparators:x,maxSatisfying:H,minSatisfying:K,minVersion:G,validRange:X,outside:se,gtr:U,ltr:A,intersects:z,simplifyRange:M,subset:w,SemVer:r,re:t.re,src:t.src,tokens:t.t,SEMVER_SPEC_VERSION:e.SEMVER_SPEC_VERSION,RELEASE_TYPES:e.
709
+ RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},qo}var Ho=g_();const rr=_s(Ho),y_=Object.prototype.toString,__="[object Uint8Array]",$_="[object ArrayBuffer]";function zd(t,e,r){return t?t.constructor===e?!0:y_.call(t)===r:!1}function Vd(t){return zd(t,Uint8Array,__)}function v_(t){return zd(t,ArrayBuffer,$_)}function b_(t){return Vd(t)||v_(t)}function w_(t){if(!Vd(t))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof t}\``)}function E_(t){
710
+ if(!b_(t))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``)}function Gd(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)w_(s),r.set(s,n),n+=s.length;return r}const Bd={utf8:new globalThis.TextDecoder("utf8")};function Wd(t,e="utf8"){return E_(t),Bd[e]??=new globalThis.TextDecoder(e),Bd[e].decode(t)}function S_(t){if(typeof t!="string")throw new TypeError(`Expected \`string\`, got\
711
+ \`${typeof t}\``)}const R_=new globalThis.TextEncoder;function Uo(t){return S_(t),R_.encode(t)}Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));const A_=My.default,Kd="aes-256-cbc",nr=()=>Object.create(null),O_=t=>t!=null,C_=(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`)},ds="__internal__",Fo=`${ds}.migrations.version`;class P_{path;events;#n;#t;#e;#r={};constructor(e={}){
712
+ 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=Fm(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 Oy.Ajv2020({allErrors:!0,useDefaults:!0,
713
+ ...r.ajvOptions});A_(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=$e.resolve(r.cwd,`${r.configName??"config"}${n}`);const s=this.
714
+ store,i=Object.assign(nr(),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{Xh.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 \
715
+ 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 ${ds} key, as it's used to manage this module internal operations.`);const{store:n}=this,s=(i,o)=>{C_(i,o),this.#e.accessPropertiesByDotNotation?Cc(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?
716
+ km(this.store,e):e in this.store}reset(...e){for(const r of e)O_(this.#r[r])&&this.set(r,this.#r[r])}delete(e){const{store:r}=this;this.#e.accessPropertiesByDotNotation?Mm(r,e):delete r[e],this.store=r}clear(){this.store=nr();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}`);
717
+ 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(nr(),n)}catch(e){if(e?.code==="ENOENT")return this._ensureDirectory(),nr();
718
+ if(this.#e.clearInvalidConfig&&e.name==="SyntaxError")return nr();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:Wd(e);try{const r=e.slice(0,16),n=ur.pbkdf2Sync(this.#t,r.toString(),1e4,32,"sha512"),s=ur.createDecipheriv(Kd,n,r),i=e.slice(17),o=typeof i=="string"?Uo(i):i;return Wd(Gd([s.update(
719
+ o),s.final()]))}catch{}return e.toString()}_handleChange(e,r){let n=e();const s=()=>{const i=n,o=e();Yh(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(
720
+ "; "))}_ensureDirectory(){pe.mkdirSync($e.dirname(this.path),{recursive:!0})}_write(e){let r=this._serialize(e);if(this.#t){const n=ur.randomBytes(16),s=ur.pbkdf2Sync(this.#t,n.toString(),1e4,32,"sha512"),i=ur.createCipheriv(Kd,s,n);r=Gd([n,Uo(":"),i.update(Uo(r)),i.final()])}if(Re.env.SNAP)pe.writeFileSync(this.path,r,{mode:this.#e.configFileMode});else try{jc(this.path,r,{mode:this.#e.configFileMode})}catch(n){if(n?.code==="EXDEV"){pe.writeFileSync(this.path,r,{mode:this.#e.configFileMode});return}
721
+ throw n}}_watch(){this._ensureDirectory(),pe.existsSync(this.path)||this._write(nr()),Re.platform==="win32"?pe.watch(this.path,{persistent:!1},Wf(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100})):pe.watchFile(this.path,{persistent:!1},Wf(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5e3}))}_migrate(e,r,n){let s=this._get(Fo,"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,
722
+ toVersion:a,finalVersion:r,versions:i});const u=e[a];u?.(this),this._set(Fo,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)||!rr.eq(s,r))&&this._set(Fo,r)}_containsReservedKey(e){return typeof e=="object"&&Object.keys(e)[0]===ds?!0:typeof e!="string"?!1:this.#e.accessPropertiesByDotNotation?!!e.startsWith(`${ds}.`):!1}_isVersionInRangeFormat(e){
723
+ return rr.clean(e)===null}_shouldPerformMigration(e,r,n){return this._isVersionInRangeFormat(e)?r!=="0.0.0"&&rr.satisfies(r,e)?!1:rr.satisfies(n,e):!(rr.lte(e,r)||rr.gt(e,n))}_get(e,r){return xm(this.store,e,r)}_set(e,r){const{store:n}=this;Cc(n,e,r),this.store=n}}class Yd 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}\
724
+ ${r.url}`),this.name="HTTPError",this.response=e,this.request=r,this.options=n}}class Xd extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}}const Pr=t=>t!==null&&typeof t=="object",hs=(...t)=>{for(const e of t)if((!Pr(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return zo({},...t)},Jd=(t={},e={})=>{const r=new globalThis.Headers(t),n=e instanceof globalThis.Headers,s=new globalThis.
725
+ Headers(e);for(const[i,o]of s.entries())n&&o==="undefined"||o===void 0?r.delete(i):r.set(i,o);return r};function ps(t,e,r){return Object.hasOwn(e,r)&&e[r]===void 0?[]:zo(t[r]??[],e[r]??[])}const Qd=(t={},e={})=>({beforeRequest:ps(t,e,"beforeRequest"),beforeRetry:ps(t,e,"beforeRetry"),afterResponse:ps(t,e,"afterResponse"),beforeError:ps(t,e,"beforeError")}),zo=(...t)=>{let e={},r={},n={};for(const s of t)if(Array.isArray(s))Array.isArray(e)||(e=[]),e=[...e,...s];else if(Pr(s)){for(let[i,o]of Object.
726
+ entries(s))Pr(o)&&i in e&&(o=zo(e[i],o)),e={...e,[i]:o};Pr(s.hooks)&&(n=Qd(n,s.hooks),e.hooks=n),Pr(s.headers)&&(r=Jd(r,s.headers),e.headers=r)}return e},I_=(()=>{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("Content-Type")}catch(s){if(s instanceof Error&&s.message==="unsupported\
727
+ BodyInit type")return!1;throw s}return t&&!e})(),N_=typeof globalThis.AbortController=="function",T_=typeof globalThis.ReadableStream=="function",j_=typeof globalThis.FormData=="function",Zd=["get","post","put","patch","head","delete"],L_={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Vo=2147483647,eh=Symbol("stop"),D_={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,
728
+ fetch:!0},x_={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},M_=t=>Zd.includes(t)?t.toUpperCase():t,k_=["get","put","head","delete","options","trace"],q_=[408,413,429,500,502,503,504],H_=[413,429,503],th={limit:2,methods:k_,statusCodes:q_,afterStatusCodes:H_,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},
729
+ U_=(t={})=>{if(typeof t=="number")return{...th,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...th,...t}};async function F_(t,e,r,n){return new Promise((s,i)=>{const o=setTimeout(()=>{r&&r.abort(),i(new Xd(t))},n.timeout);n.fetch(t,e).then(s).catch(i).then(()=>{clearTimeout(o)})})}async function z_(t,{signal:e}){return new Promise((r,n)=>{
730
+ e&&(e.throwIfAborted(),e.addEventListener("abort",s,{once:!0}));function s(){clearTimeout(i),n(e.reason)}const i=setTimeout(()=>{e?.removeEventListener("abort",s),r()},t)})}const V_=(t,e)=>{const r={};for(const n in e)!(n in x_)&&!(n in D_)&&!(n in t)&&(r[n]=e[n]);return r};class ys{static create(e,r){const n=new ys(e,r),s=async()=>{if(typeof n._options.timeout=="number"&&n._options.timeout>Vo)throw new RangeError(`The \`timeout\` option cannot be greater than ${Vo}`);await Promise.resolve();let a=await n.
731
+ _fetch();for(const u of n._options.hooks.afterResponse){const l=await u(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 Yd(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(!T_)throw new Error(
732
+ "Streams are not supported in your environment. `ReadableStream` is missing.");return n._stream(a.clone(),n._options.onDownloadProgress)}return a},o=n._options.retry.methods.includes(n.request.method.toLowerCase())?n._retry(s):s();for(const[a,u]of Object.entries(L_))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.text())}
733
+ return l[a]()};return o}request;abortController;_retryCount=0;_input;_options;constructor(e,r={}){if(this._input=e,this._options={...r,headers:Jd(this._input.headers,r.headers),hooks:Qd({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:M_(r.method??this._input.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:U_(r.retry),throwHttpErrors:r.throwHttpErrors!==!1,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&
734
+ !(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(N_){this.abortController=new globalThis.AbortController;const n=this._options.
735
+ signal??this._input.signal;n?.aborted&&this.abortController.abort(n?.reason),n?.addEventListener("abort",()=>{this.abortController.abort(n.reason)}),this._options.signal=this.abortController.signal}if(I_&&(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.
736
+ Request(this._input,this._options),this._options.searchParams){const s="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),i=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,s);(j_&&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=
737
+ new globalThis.Request(new globalThis.Request(i,{...this.request}),this._options)}}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof Xd)throw e;if(e instanceof Yd){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.
738
+ 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<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.
739
+ min(this._calculateRetryDelay(r),Vo);if(this._retryCount<1)throw r;await z_(n,{signal:this._options.signal});for(const s of this._options.hooks.beforeRetry)if(await s({request:this.request,options:this._options,error:r,retryCount:this._retryCount})===eh)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=V_(this.request,this.
740
+ _options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,e):F_(r,e,this.abortController,this._options)}_stream(e,r){const n=Number(e.headers.get("content-length"))||0;let s=0;return e.status===204?(r&&r({percent:1,totalBytes:n,transferredBytes:s},new Uint8Array),new globalThis.Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(i){const o=e.body.getReader();r&&
741
+ r({percent:0,transferredBytes:0,totalBytes:n},new Uint8Array);async function a(){const{done:u,value:l}=await o.read();if(u){i.close();return}if(r){s+=l.byteLength;const c=n===0?0:s/n;r({percent:c,transferredBytes:s,totalBytes:n},l)}i.enqueue(l),await a()}await a()}}),{status:e.status,statusText:e.statusText,headers:e.headers})}}const Go=t=>{const e=(r,n)=>ys.create(r,hs(t,n));for(const r of Zd)e[r]=(n,s)=>ys.create(n,hs(t,s,{method:r}));return e.create=r=>Go(hs(r)),e.extend=r=>(typeof r=="functi\
742
+ on"&&(r=r(t??{})),Go(hs(t,r))),e.stop=eh,e},G_=Go(),ms=Object.create(null),Ir=t=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?ms:globalThis),Et=new Proxy(ms,{get(t,e){return Ir()[e]??ms[e]},has(t,e){const r=Ir();return e in r||e in ms},set(t,e,r){const n=Ir(!0);return n[e]=r,!0},deleteProperty(t,e){if(!e)return!1;const r=Ir(!0);return delete r[e],!0},ownKeys(){const t=Ir(!0);return Object.keys(t)}}),rh=typeof process<"u"&&process.env&&process.
743
+ env.NODE_ENV||"",B_=[["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"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRON\
1130
744
  E"],["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"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCE\
1131
- L_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function av(){if(globalThis.process?.env)for(const t of ov){const e=t[1]||t[0];if(globalThis.process?.env[e])return{name:t[0].toLowerCase(),...t[2]}}return globalThis.
1132
- process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}const dp=av();dp.name;function fr(t){return t?t!=="false":!1}const uv=globalThis.process?.platform||"",hp=fr(Vt.CI)||dp.ci!==!1,pp=fr(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);fr(Vt.DEBUG);const cv=fp==="test"||fr(Vt.TEST),lv=fr(Vt.MINIMAL)||hp||cv||!pp,fv=/^win/i.test(uv);!fr(Vt.NO_COLOR)&&(fr(Vt.FORCE_COLOR)||(pp||fv)&&Vt.TERM);const dv=(globalThis.process?.
1133
- versions?.node||"").replace(/^v/,"")||null;Number(dv?.split(".")[0]);const hv=globalThis.process||Object.create(null),mp={versions:{}};new Proxy(hv,{get(t,e){if(e==="env")return Vt;if(e in t)return t[e];if(e in mp)return mp[e]}});const pv=globalThis.process?.release?.name==="node",mv=!!globalThis.Bun||!!globalThis.process?.versions?.bun,gv=!!globalThis.Deno,yv=!!globalThis.fastly,Ev=!!globalThis.Netlify,Dv=!!globalThis.EdgeRuntime,vv=globalThis.navigator?.userAgent==="Cloudflare-Workers",$v=[[Ev,
1134
- "netlify"],[Dv,"edge-light"],[vv,"workerd"],[yv,"fastly"],[gv,"deno"],[mv,"bun"],[pv,"node"]];function _v(){const t=$v.find(e=>e[0]);if(t)return{name:t[1]}}const wv=_v();wv?.name;const La=new HD({projectName:Ip,serialize:t=>Ct.stringify(t,null,2),deserialize:t=>Ct.parse(t)}),bv=1e3*60*60*24,gp="check-update";function Av(){if(lv||fp===gp)return;const t=La.get("lastUpdateCheck"),e=La.get("latestVersion");if(Fp(e)||Xi(t)||t+bv<Date.now())try{Pp("likec4",["check-update"],{stdio:"ignore",preferLocal:!0,
1135
- detached:!0,env:{NODE_ENV:gp}}).catch(()=>{})}catch{}e&&Oa.gt(e,dr)&&zt(["Update available: ",K.dim(dr),K.reset(" \u2192 "),K.green(e)].join(""))}async function Cv(){try{const t=await Sv();os(t,"No version found in latest npm"),La.set({lastUpdateCheck:Date.now(),latestVersion:t}),Oa.gt(t,dr)?zt(["Update available: ",K.dim(dr),K.reset(" \u2192 "),K.green(t)].join("")):zt(K.dim("Up to date: ")+" "+K.green(dr))}catch(t){za.error(Np(t))}}async function Sv(){return(await sv("https://registry.npmjs.or\
1136
- g/likec4/latest",{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},keepalive:!0}).json()).version}async function Rv(t,e,r){const n=".ts";e=e??De(t.workspace,"likec4.generated"+n),Or(e)!==n&&(e=e+n),await $t(Gt(e),{recursive:!0});const i=await t.diagrams(),s=Ag([...i]);await Kt(e,s),r.info(`${K.dim("generated")} ${Wt(process.cwd(),e)}`)}async function Ov(t,e,r){await $t(e,{recursive:!0}),r.info(`${K.dim("format")} ${K.green("dot")}`),r.info(`${K.dim("out\
1137
- dir")} ${e}`);const n=new Set,i=await t.viewsService.computedViews();let s=0;for(const o of i)try{const a=await t.viewsService.layouter.dot(o),u=o.relativePath??"";u!==""&&!n.has(u)&&(await $t(De(e,u),{recursive:!0}),n.add(u));const l=De(e,u,o.id+".dot");await Kt(l,a),r.info(`${K.dim("generated")} ${Wt(process.cwd(),l)}`),s++}catch(a){za.error(`error while generating ${o.id}`,{error:a})}s>0&&r.info(`${K.dim("total")} ${s} files`)}async function Iv(t,e,r,n){await $t(r,{recursive:!0}),n.info(`${K.
1138
- dim("format")} ${K.green(e)}`),n.info(`${K.dim("outdir")} ${r}`);let i,s;switch(e){case"d2":i=".d2",s=_c;break;case"mermaid":i=".mmd",s=wc;break;default:tu(e)}const o=new Set,a=await t.diagrams();let u=0;for(const l of a)try{let c=l.relativePath??".";c.includes("/")?c=c.slice(0,c.lastIndexOf("/")):c=".",c!==""&&!o.has(c)&&(await $t(De(r,c),{recursive:!0}),o.add(c));const d=De(r,c,l.id+i),h=s(l);await Kt(d,h),n.info(`${K.dim("generated")} ${Wt(process.cwd(),d)}`),u++}catch(c){n.error(`error while\
1139
- generating ${l.id}`,{error:c})}u>0&&n.info(`${K.dim("total")} ${u} files`)}async function Ki({path:t,useDotBin:e,...r}){const n=pt("c4:codegen"),i=Sr(n),s=await gt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});if((await s.viewsService.computedViews()).length===0)throw n.warn("no views found"),process.exitCode=1,new Error("no views found");switch(r.format){case"views":{await Rv(s,r.outfile,n);break}case"dot":{await Ov(s,r.outdir??t,n);break}case"d2":case"mermaid":{await Iv(s,r.format,
1140
- r.outdir??t,n);break}default:tu(r)}i.stopAndLog()}async function Fv({path:t,useDotBin:e,outfile:r}){const n=pt("c4:codegen"),i=Sr(n),s=await gt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});n.info(`${K.dim("format")} ${K.green("model")}`);const o=await s.layoutedModel();for(const d of o.views())d.$view.hasLayoutDrift&&n.warn(K.yellow("drift detected, manual layout can not be applied, view:")+" "+K.red(d.id));let a=De(s.workspace,"likec4-model.ts");if(r&&(a=ns(r)?r:De(r),Pt(r)&&(await ss(
1141
- r)).isDirectory()))throw new Error(`output file is a directory: ${r}`);const u=on(a);n.info(`${K.dim("filename")} ${u}`);const l=Or(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=Gt(a);n.info(`${K.dim("outdir")} ${c}`),await $t(c,{recursive:!0}),await Kt(a,wg(o),{encoding:"utf-8"}),zt(Qi(`
1142
- ${K.dim("Source with LikeC4Model generated:")}
1143
- ${Wt(Zi(),a)}
1144
-
1145
- ${K.dim("How to use:")}
1146
- ${K.underline("https://likec4.dev/tooling/code-generation/model/")}
1147
- `).trim(),{padding:2,borderColor:"green",borderStyle:"round"}),i.stopAndLog()}async function Pv({languageServices:t,outDir:e,filename:r="likec4-react.mjs"}){const n=Cs,i=Rs();return n.info(`${K.cyan("likec4 app root")} ${K.dim(i)}`),n.info(K.cyan("outDir")+" "+K.dim(e)),{customLogger:n,root:i,configFile:!1,clearScreen:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:Fs()},esbuild:{banner:`'use client'
1148
- `+Ss.banner,footer:Ss.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:Is,lib:{entry:"react/likec4.tsx",fileName(s,o){return r},formats:["es"]},rollupOptions:{output:{compact:!1,exports:"named"},external:["likec4/rea\
1149
- ct","likec4/model","react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client",/likec4\/icons\/.*/],onwarn(s,o){s.code!=="SOURCEMAP_ERROR"&&o(s)}}},plugins:[Za({}),ao({languageServices:t,useOverviewGraph:!1})]}}async function Nv({path:t,useDotBin:e,outfile:r}){const n=pt("c4:codegen"),i=Sr(n),s=await gt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});n.info(`${K.dim("format")} ${K.green("react")}`);const o=await s.diagrams();if(o.length===0)throw process.exitCode=
1150
- 1,new Error("no views found");o.forEach(E=>{E.hasLayoutDrift&&n.warn(K.yellow("drift detected, manual layout can not be applied, view:")+" "+K.red(E.id))});let a=De(s.workspace,"likec4-views.js");if(r&&(a=ns(r)?r:De(r),Pt(r)&&(await ss(r)).isDirectory()))throw new Error(`output file is a directory: ${r}`);const u=Gt(a);n.info(`${K.dim("outdir")} ${u}`);const l=on(a);n.info(`${K.dim("filename")} ${l}`);const c=Or(l).toLocaleLowerCase();if(![".js",".mjs",".jsx"].includes(c))throw n.error(`output f\
1151
- ile ${r} has extension "${c}"`),new Error(`output file ${r} must be a .js, .jsx or .mjs`);const d=await Pv({languageServices:s,outDir:u,filename:l});await Fr({...d,logLevel:"warn"});const h=await s.layoutedModel();await Kt(De(u,on(a,c)+(c===".mjs"?".d.mts":".d.ts")),Cg(h)),zt(Qi(`
1152
- ${K.dim("Source generated:")}
1153
- ${Wt(Zi(),a)}
1154
-
1155
- ${K.dim("How to use:")}
1156
- ${K.underline("https://likec4.dev/tooling/code-generation/react/")}
1157
- `),{padding:2,borderColor:"green",borderStyle:"round"}),i.stopAndLog()}async function Tv({path:t,useDotBin:e,webcomponentPrefix:r="likec4",outfile:n}){const i=pt("c4:codegen"),s=Sr(i),o=await gt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});i.info(`${K.dim("format")} ${K.green("webcomponent")}`);const a=await o.diagrams();if(!Ga(a,1))throw i.warn("no views found"),process.exitCode=1,new Error("no views found");a.forEach($=>{$.hasLayoutDrift&&i.warn(K.yellow("drift detected, manua\
1158
- l layout can not be applied, view:")+" "+K.red($.id))});let u=De(o.workspace,"likec4-views.js");if(n&&(u=ns(n)?n:De(n),Pt(n)&&(await ss(n)).isDirectory()))throw new Error(`output file is a directory: ${n}`);mt.debug(`${K.dim("outfilepath")} ${u}`);const l=on(u);mt.debug(`${K.dim("filename")} ${l}`);const c=Or(l).toLocaleLowerCase();if(c!==".js"&&c!==".mjs")throw mt.warn(`output file ${n} has extension "${c}"`),new Error(`output file ${n} must be a .js or .mjs`);const d=await Os();mt.debug(`${K.dim(
1159
- "created temp public")} ${d}`);const h=await co({languageServices:o,outDir:d,filename:l,webcomponentPrefix:r,base:"/"});mt.debug(`${K.dim("vite build webcomponent")}`),await Fr({...h,logLevel:"warn"});const E=De(d,l);if(!Pt(E))throw new Error(`output file not found: ${E}`);await $t(Gt(u),{recursive:!0}),await Jp(E,u),i.info(`${K.dim("generated")} ${u}`),mt.debug(`${K.dim("remove temp public")}`),await Xp(d,{recursive:!0,force:!0}),zt(Qi(`
1160
- ${K.dim("Webcomponents generated to:")}
1161
- ${Wt(Zi(),u)}
1162
-
1163
- ${K.dim("Setup and usage instructions:")}
1164
- ${K.blue("https://likec4.dev/tooling/code-generation/webcomponent/")}
1165
- `)),s.stopAndLog()}const Lv={command:"codegen <command> [path]",aliases:["generate","gen"],describe:"Generate various artifacts from LikeC4 sources",builder:t=>t.positional("path",Vr).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:Qe}).option("use-dot",at),async e=>{await Nv({useDotBin:e.useDotBin,path:e.path,outfile:e.outfile})}).command({command:"w\
1166
- 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:Qe}).option("webcomponent-prefix",As).option("use-dot",at),handler:async e=>{await Tv({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("\
1167
- outfile",{alias:"o",type:"string",desc:"<file> path to output file (.ts)",normalize:!0,coerce:Qe}).option("use-dot",at),handler:async e=>{await Fv({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:Qe}).option("use-dot",at),handler:async e=>{await Ki({format:"views",path:e.path,useDotBin:e.
1168
- useDotBin,outfile:e.outfile})}}).command({command:"dot [path]",describe:"generate graphviz files (.dot)",builder:e=>e.option("outdir",_n).option("use-dot",at),handler:async e=>{await Ki({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",_n).option("use-dot",at),handler:async e=>{await Ki({format:"d2",path:e.path,useDotBin:e.useDotBin,outdir:e.outdir})}}).command({command:"mermaid [path]",
1169
- aliases:["mmd"],describe:"generate Mermaid files (.mmd)",builder:e=>e.option("outdir",_n).option("use-dot",at),handler:async e=>{await Ki({format:"mermaid",useDotBin:e.useDotBin,path:e.path,outdir:e.outdir})}}).epilog(`${K.bold("Examples:")}
745
+ L_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_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function W_(){if(globalThis.process?.env)for(const t of B_){const e=t[1]||t[0];if(globalThis.process?.env[e])return{
746
+ 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 nh=W_();nh.name;function zt(t){return t?t!=="false":!1}const K_=globalThis.process?.platform||"",sh=zt(Et.CI)||nh.ci!==!1,ih=zt(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);zt(Et.DEBUG);const Y_=rh==="test"||zt(Et.TEST),X_=zt(Et.MINIMAL)||sh||Y_||!ih,J_=/^win/i.test(K_);!zt(Et.NO_COLOR)&&(zt(Et.FORCE_COLOR)||
747
+ (ih||J_)&&Et.TERM);const Q_=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(Q_?.split(".")[0]);const Z_=globalThis.process||Object.create(null),oh={versions:{}};new Proxy(Z_,{get(t,e){if(e==="env")return Et;if(e in t)return t[e];if(e in oh)return oh[e]}});const e$=globalThis.process?.release?.name==="node",t$=!!globalThis.Bun||!!globalThis.process?.versions?.bun,r$=!!globalThis.Deno,n$=!!globalThis.fastly,s$=!!globalThis.Netlify,i$=!!globalThis.EdgeRuntime,o$=globalThis.navigator?.
748
+ userAgent==="Cloudflare-Workers",a$=[[s$,"netlify"],[i$,"edge-light"],[o$,"workerd"],[n$,"fastly"],[r$,"deno"],[t$,"bun"],[e$,"node"]];function c$(){const t=a$.find(e=>e[0]);if(t)return{name:t[1]}}const u$=c$();u$?.name;const Bo=new P_({projectName:gh,serialize:t=>Jo.stringify(t,null,2),deserialize:t=>Jo.parse(t)}),l$=1e3*60*60*24,ah="check-update";function f$(){if(X_||rh===ah)return;const t=Bo.get("lastUpdateCheck"),e=Bo.get("latestVersion");if(yh(e)||_h(t)||t+l$<Date.now())try{$h("likec4",["ch\
749
+ eck-update"],{stdio:"ignore",preferLocal:!0,detached:!0,env:{NODE_ENV:ah}}).catch(()=>{})}catch{}e&&Ho.gt(e,Vt)&&St(["Update available: ",ee.dim(Vt),ee.reset(" \u2192 "),ee.green(e)].join(""))}async function d$(){try{const t=await h$();Cs(t,"No version found in latest npm"),Bo.set({lastUpdateCheck:Date.now(),latestVersion:t}),Ho.gt(t,Vt)?St(["Update available: ",ee.dim(Vt),ee.reset(" \u2192 "),ee.green(t)].join("")):St(ee.dim("Up to date: ")+" "+ee.green(Vt))}catch(t){Qo.error(vh(t))}}async function h$(){
750
+ return(await G_("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 p$(t,e,r){const n=".ts";e=e??ge(t.workspace,"likec4.generated"+n),or(e)!==n&&(e=e+n),await ct(Rt(e),{recursive:!0});const s=await t.diagrams(),i=qh([...s]);await Ct(e,i),r.info(`${ee.dim("generated")} ${At(process.cwd(),e)}`)}async function m$(t,e,r){await ct(e,{recursive:!0}),r.info(`${ee.dim("format")}\
751
+ ${ee.green("dot")}`),r.info(`${ee.dim("outdir")} ${e}`);const n=new Set,s=await t.viewsService.computedViews();let i=0;for(const o of s)try{const a=await t.viewsService.layouter.dot(o),u=o.relativePath??"";u!==""&&!n.has(u)&&(await ct(ge(e,u),{recursive:!0}),n.add(u));const l=ge(e,u,o.id+".dot");await Ct(l,a),r.info(`${ee.dim("generated")} ${At(process.cwd(),l)}`),i++}catch(a){Qo.error(`error while generating ${o.id}`,{error:a})}i>0&&r.info(`${ee.dim("total")} ${i} files`)}async function g$(t,e,r,n){
752
+ await ct(r,{recursive:!0}),n.info(`${ee.dim("format")} ${ee.green(e)}`),n.info(`${ee.dim("outdir")} ${r}`);let s,i;switch(e){case"d2":s=".d2",i=Uh;break;case"mermaid":s=".mmd",i=Hh;break;default:aa(e)}const o=new Set,a=await t.diagrams();let u=0;for(const l of a)try{let c=l.relativePath??".";c.includes("/")?c=c.slice(0,c.lastIndexOf("/")):c=".",c!==""&&!o.has(c)&&(await ct(ge(r,c),{recursive:!0}),o.add(c));const d=ge(r,c,l.id+s),h=i(l);await Ct(d,h),n.info(`${ee.dim("generated")} ${At(process.cwd(),
753
+ d)}`),u++}catch(c){n.error(`error while generating ${l.id}`,{error:c})}u>0&&n.info(`${ee.dim("total")} ${u} files`)}async function gs({path:t,useDotBin:e,...r}){const n=tt("c4:codegen"),s=sr(n),i=await rt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});if(i.ensureSingleProject(),(await i.viewsService.computedViews()).length===0)throw n.warn("no views found"),process.exitCode=1,new Error("no views found");switch(r.format){case"views":{await p$(i,r.outfile,n);break}case"dot":{await m$(
754
+ i,r.outdir??t,n);break}case"d2":case"mermaid":{await g$(i,r.format,r.outdir??t,n);break}default:aa(r)}s.stopAndLog()}async function y$({path:t,useDotBin:e,outfile:r}){const n=tt("c4:codegen"),s=sr(n),i=await rt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});i.ensureSingleProject(),n.info(`${ee.dim("format")} ${ee.green("model")}`);const o=await i.layoutedModel();for(const d of o.views())d.$view.hasLayoutDrift&&n.warn(ee.yellow("drift detected, manual layout can not be applied, view:")+
755
+ " "+ee.red(d.id));let a=ge(i.workspace,"likec4-model.ts");if(r&&(a=Ss(r)?r:ge(r),Ot(r)&&(await As(r)).isDirectory()))throw new Error(`output file is a directory: ${r}`);const u=Nr(a);n.info(`${ee.dim("filename")} ${u}`);const l=or(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=Rt(a);n.info(`${ee.dim("outdir")} ${c}`),await ct(c,{recursive:!0}),await Ct(a,Fh(
756
+ o),{encoding:"utf-8"}),St($s(`
757
+ ${ee.dim("Source with LikeC4Model generated:")}
758
+ ${At(vs(),a)}
759
+
760
+ ${ee.dim("How to use:")}
761
+ ${ee.underline("https://likec4.dev/tooling/code-generation/model/")}
762
+ `).trim(),{padding:2,borderColor:"green",borderStyle:"round"}),s.stopAndLog()}async function _$({languageServices:t,outDir:e,filename:r="likec4-react.mjs"}){const n=Ks,s=Xs();return n.info(`${ee.cyan("likec4 app root")} ${ee.dim(s)}`),n.info(ee.cyan("outDir")+" "+ee.dim(e)),{customLogger:n,root:s,configFile:!1,clearScreen:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:Zs()},esbuild:{banner:`'use client'
763
+ `+Ys.banner,footer:Ys.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:Qs,lib:{entry:"react/likec4.tsx",fileName(i,o){return r},formats:["es"]},rollupOptions:{output:{compact:!1,exports:"named"},external:["likec4/rea\
764
+ 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:[oa({}),Os({languageServices:t.languageServices,useOverviewGraph:!1})]}}async function $$({path:t,useDotBin:e,outfile:r}){const n=tt("c4:codegen"),s=sr(n),i=await rt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});i.ensureSingleProject(),n.info(`${ee.dim("format")} ${ee.green("react")}`);const o=await i.diagrams();
765
+ if(o.length===0)throw process.exitCode=1,new Error("no views found");o.forEach(y=>{y.hasLayoutDrift&&n.warn(ee.yellow("drift detected, manual layout can not be applied, view:")+" "+ee.red(y.id))});let a=ge(i.workspace,"likec4-views.js");if(r&&(a=Ss(r)?r:ge(r),Ot(r)&&(await As(r)).isDirectory()))throw new Error(`output file is a directory: ${r}`);const u=Rt(a);n.info(`${ee.dim("outdir")} ${u}`);const l=Nr(a);n.info(`${ee.dim("filename")} ${l}`);const c=or(l).toLocaleLowerCase();if(![".js",".mjs",
766
+ ".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 d=await _$({languageServices:i,outDir:u,filename:l});await cr({...d,logLevel:"warn"});const h=await i.layoutedModel();await Ct(ge(u,Nr(a,c)+(c===".mjs"?".d.mts":".d.ts")),zh(h)),St($s(`
767
+ ${ee.dim("Source generated:")}
768
+ ${At(vs(),a)}
769
+
770
+ ${ee.dim("How to use:")}
771
+ ${ee.underline("https://likec4.dev/tooling/code-generation/react/")}
772
+ `),{padding:2,borderColor:"green",borderStyle:"round"}),s.stopAndLog()}async function v$({path:t,useDotBin:e,webcomponentPrefix:r="likec4",outfile:n}){const s=tt("c4:codegen"),i=sr(s),o=await rt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});o.ensureSingleProject(),s.info(`${ee.dim("format")} ${ee.green("webcomponent")}`);const a=await o.diagrams();if(!Zo(a,1))throw s.warn("no views found"),process.exitCode=1,new Error("no views found");a.forEach(b=>{b.hasLayoutDrift&&s.warn(ee.yellow(
773
+ "drift detected, manual layout can not be applied, view:")+" "+ee.red(b.id))});let u=ge(o.workspace,"likec4-views.js");if(n&&(u=Ss(n)?n:ge(n),Ot(n)&&(await As(n)).isDirectory()))throw new Error(`output file is a directory: ${n}`);at.debug(`${ee.dim("outfilepath")} ${u}`);const l=Nr(u);at.debug(`${ee.dim("filename")} ${l}`);const c=or(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 d=await Js();
774
+ at.debug(`${ee.dim("created temp public")} ${d}`);const h=await vi({languageServices:o,outDir:d,filename:l,webcomponentPrefix:r,base:"/"});at.debug(`${ee.dim("vite build webcomponent")}`),await cr({...h,logLevel:"warn"});const y=ge(d,l);if(!Ot(y))throw new Error(`output file not found: ${y}`);await ct(Rt(u),{recursive:!0}),await Mh(y,u),s.info(`${ee.dim("generated")} ${u}`),at.debug(`${ee.dim("remove temp public")}`),await kh(d,{recursive:!0,force:!0}),St($s(`
775
+ ${ee.dim("Webcomponents generated to:")}
776
+ ${At(vs(),u)}
777
+
778
+ ${ee.dim("Setup and usage instructions:")}
779
+ ${ee.blue("https://likec4.dev/tooling/code-generation/webcomponent/")}
780
+ `)),i.stopAndLog()}const b$={command:"codegen <command> [path]",aliases:["generate","gen"],describe:"Generate various artifacts from LikeC4 sources",builder:t=>t.positional("path",br).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:Ue}).option("use-dot",Ye),async e=>{await $$({useDotBin:e.useDotBin,path:e.path,outfile:e.outfile})}).command({command:"w\
781
+ 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:Ue}).option("webcomponent-prefix",Ws).option("use-dot",Ye),handler:async e=>{await v$({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("\
782
+ outfile",{alias:"o",type:"string",desc:"<file> path to output file (.ts)",normalize:!0,coerce:Ue}).option("use-dot",Ye),handler:async e=>{await y$({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:Ue}).option("use-dot",Ye),handler:async e=>{await gs({format:"views",path:e.path,useDotBin:e.
783
+ useDotBin,outfile:e.outfile})}}).command({command:"dot [path]",describe:"generate graphviz files (.dot)",builder:e=>e.option("outdir",Wr).option("use-dot",Ye),handler:async e=>{await gs({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",Wr).option("use-dot",Ye),handler:async e=>{await gs({format:"d2",path:e.path,useDotBin:e.useDotBin,outdir:e.outdir})}}).command({command:"mermaid [path]",
784
+ aliases:["mmd"],describe:"generate Mermaid files (.mmd)",builder:e=>e.option("outdir",Wr).option("use-dot",Ye),handler:async e=>{await gs({format:"mermaid",useDotBin:e.useDotBin,path:e.path,outdir:e.outdir})}}).epilog(`${ee.bold("Examples:")}
1170
785
  likec4 gen react -o dist/likec4-views.mjs ./src/likec4
1171
786
  likec4 gen model -o likec4-model.ts
1172
787
  likec4 gen webcomponent -o likec4.js --webcomponent-prefix c4 --use-dot-bin ./src
@@ -1174,28 +789,28 @@ aliases:["mmd"],describe:"generate Mermaid files (.mmd)",builder:e=>e.option("ou
1174
789
  likec4 gen ts --outfile ../likec4.ts
1175
790
  likec4 gen mmd --outdir assets/
1176
791
  likec4 gen dot -o out .
1177
- `),handler:()=>{}};async function jv({path:t,useDotBin:e,outfile:r}){const n=pt("c4:export"),i=Sr(n),s=await(await gt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"})).layoutedModel();Or(r)!==".json"&&(r=r+".json"),await $t(Gt(r),{recursive:!0});const o=JSON.stringify(s.$model,null,2);await Kt(r,o),n.info(`${K.dim("generated")} ${Wt(process.cwd(),r)}`),i.stopAndLog("\u2713 export in ")}const kv={command:"export <format> [path]",describe:"Export to images or JSON",builder:t=>t.usage(`${K.
1178
- bold("Usage:")} $0 export <format> [path]`).positional("path",Vr).command({command:"png [path]",describe:"export views to PNG",builder:e=>e.option("output",_n).option("theme",{choices:["light","dark"],desc:"color-scheme to use, default is light"}).option("flat",{boolean:!0,type:"boolean",desc:"ignore sources structure and export all PNGs in output directory"}).option("use-dot",at).options({ignore:{boolean:!0,alias:"i",desc:"continue if some views failed to export"},timeout:{type:"number",alias:"\
1179
- t",desc:"(sec) timeout for playwright ",default:10},"max-attempts":{type:"number",describe:"",desc:"(number) max attempts to export failing view",default:3},"server-url":{type:"string",desc:"use this url instead of starting new likec4 server"}}).epilog(`${K.bold("Examples:")}
1180
- ${K.green("$0 export png")}
1181
- ${K.gray("Search for likec4 files in current directory and output PNG next to sources")}
1182
-
1183
- ${K.green("$0 export png --theme dark -o ./png src/likec4 ")}
1184
- ${K.gray("Search for likec4 files in src/likec4 and output PNG with dark theme to png folder")}
1185
- `),handler:async e=>{os(e.timeout>=1,"timeout must be >= 1"),os(e["max-attempts"]>=1,"max-attempts must be >= 1"),await Nc({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"})}}).command({command:"json [path]",describe:"export model to JSON",builder:e=>e.option("outfile",{alias:"o",type:"string",desc:"<file> output .json file",default:"likec4.jso\
1186
- n",normalize:!0,coerce:De}).option("use-dot",at).epilog(`${K.bold("Examples:")}
1187
- ${K.green("$0 export json")}
1188
- ${K.gray("Search for likec4 files in current directory and output JSON to likec4.json")}
1189
-
1190
- ${K.green("$0 export json -o ./generated/likec4.json src/likec4 ")}
1191
- ${K.gray("Search for likec4 files in src/likec4 and output JSON to generated/likec4.json")}
1192
- `),handler:async e=>{await jv({path:e.path,useDotBin:e.useDotBin,outfile:e.outfile})}}).updateStrings({"Commands:":K.bold("Formats:")}),handler:()=>{}};async function Bv(t){const{isDev:e,...r}=await uo({...t,likec4AssetsDir:"",webcomponentPrefix:void 0}),n=await lo({port:Pn(62001,62010)}),i=t?.open??!1;return await tm({...r,mode:"production",preview:{host:t.listen??"127.0.0.1",allowedHosts:!0,port:n,open:i}})}async function xv({path:t,output:e,base:r,listen:n}){const i=await gt.fromWorkspace(t,{
1193
- logger:"vite"}),s=await Bv({base:r,languageServices:i,outputDir:e,open:!0,listen:n});Sc(s)}const Mv={command:"preview [path]",describe:"Start local server to preview production build",builder:t=>t.positional("path",{type:"string",desc:`Directory with LikeC4 source files
1194
- 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"],Qe).default("path",Qe("."),".").default("listen","127.0.0.1","localhost"),async handler(t){await xv(t)}};async function qv({path:t,useDotBin:e,webcomponentPrefix:r,
1195
- useHashHistory:n,useOverview:i=!1,base:s,listen:o}){const a=await gt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"}),u=await an(Rr(un(),".likec4-assets-"));process.env.NODE_ENV="development";const l=await Fc({buildWebcomponent:!0,hmr:!0,base:s,webcomponentPrefix:r,languageServices:a,useHashHistory:n,useOverviewGraph:i,likec4AssetsDir:u,listen:o});if(l.config.logger.clearScreen("info"),Sc(l),!i)return;const c=await a.diagrams();if(Ga(c,1)){const d=pt("c4:export"),h=Cc(l);if(!h){d.error(
1196
- "no preview server url");return}d.info(K.cyan("wait 5sec before generating previews")),await ru(5e3);try{await Pc({serverUrl:h,logger:d,views:c,theme:"light",output:u,outputType:"flat"}),await ru(1e3),d.info(K.yellow("Note: changes in sources do not trigger preview updates, restart is required"))}catch(E){d.error(K.red("Failed to generate previews")),d.error(E)}}else l.config.logger.warn("no views found, no previews generated")}const Uv={command:"start [path]",aliases:["serve","dev"],describe:"S\
1197
- tart local dev server to preview LikeC4 views",builder:t=>t.positional("path",Vr).option("base",Uu).option("webcomponent-prefix",As).option("use-hash-history",qu).option("use-overview",Hu).option("use-dot",at).option("listen",u0),handler:async t=>{await qv({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 Hv({path:t,ignoreLayout:e}){const r=await gt.
1198
- fromWorkspace(t,{logger:"vite"}),n=pt("c4:views");let i=!0;return i=await s(r)&&i,i=(e||await o(r,n))&&i,i?0:Wa(1);function s(a){return a.getErrors().length===0}async function o(a,u){const l=await a.diagrams();let c=!1;for(const d of l)d.hasLayoutDrift===!0&&(c=!0,u.error(K.red(`Layout drift detected on view '${d.id}' at ${De(t,d.relativePath??".")}`)));return!c}}const Vv={command:"validate [path]",aliases:[],describe:"Validate model syntax and manual layout",builder:t=>t.positional("path",Vr).option(
1199
- "ignore-layout",{alias:["skip-layout"],boolean:!0,default:!1,description:"do not validate layout of views"}),handler:async t=>{await Hv({path:t.path,ignoreLayout:t["ignore-layout"]})}};async function zv(){return await Tp({sinks:{console:Lp()},loggers:[{category:"likec4",sinks:["console"],lowestLevel:"info"}]}),Av(),await o0(Am(Bp)).scriptName("likec4").usage("Usage: $0 <command>").command(Uv).command(Kg).command(Lv).command(kv).command(Mv).command(Vv).command({command:"check-update",describe:"Ch\
1200
- eck for updates",handler:async()=>{await Cv()}}).help("help").version(dr).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(Va(kp.columns-20,{min:80,max:120})).parseAsync()}zv().catch(()=>{Wa(1)}),process.on("unhandledReject\
1201
- ion",t=>{console.error("Unhandled rejection",t)});
792
+ `),handler:()=>{}};async function w$({path:t,useDotBin:e,outfile:r}){const n=tt("c4:export"),s=sr(n),i=await rt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});i.ensureSingleProject();const o=await i.layoutedModel();or(r)!==".json"&&(r=r+".json"),await ct(Rt(r),{recursive:!0});const a=JSON.stringify(o.$model,null,2);await Ct(r,a),n.info(`${ee.dim("generated")} ${At(process.cwd(),r)}`),s.stopAndLog("\u2713 export in ")}const E$={command:"export <format> [path]",describe:"Export to ima\
793
+ ges or JSON",builder:t=>t.usage(`${ee.bold("Usage:")} $0 export <format> [path]`).positional("path",br).command({command:"png [path]",describe:"export views to PNG",builder:e=>e.option("output",Wr).option("theme",{choices:["light","dark"],desc:"color-scheme to use, default is light"}).option("flat",{boolean:!0,type:"boolean",desc:"ignore sources structure and export all PNGs in output directory"}).option("use-dot",Ye).options({ignore:{boolean:!0,alias:"i",desc:"continue if some views failed to e\
794
+ xport"},timeout:{type:"number",alias:"t",desc:"(sec) timeout for playwright ",default:10},"max-attempts":{type:"number",describe:"",desc:"(number) max attempts to export failing view",default:3},"server-url":{type:"string",desc:"use this url instead of starting new likec4 server"}}).epilog(`${ee.bold("Examples:")}
795
+ ${ee.green("$0 export png")}
796
+ ${ee.gray("Search for likec4 files in current directory and output PNG next to sources")}
797
+
798
+ ${ee.green("$0 export png --theme dark -o ./png src/likec4 ")}
799
+ ${ee.gray("Search for likec4 files in src/likec4 and output PNG with dark theme to png folder")}
800
+ `),handler:async e=>{Cs(e.timeout>=1,"timeout must be >= 1"),Cs(e["max-attempts"]>=1,"max-attempts must be >= 1"),await Sc({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"})}}).command({command:"json [path]",describe:"export model to JSON",builder:e=>e.option("outfile",{alias:"o",type:"string",desc:"<file> output .json file",default:"likec4.jso\
801
+ n",normalize:!0,coerce:ge}).option("use-dot",Ye).epilog(`${ee.bold("Examples:")}
802
+ ${ee.green("$0 export json")}
803
+ ${ee.gray("Search for likec4 files in current directory and output JSON to likec4.json")}
804
+
805
+ ${ee.green("$0 export json -o ./generated/likec4.json src/likec4 ")}
806
+ ${ee.gray("Search for likec4 files in src/likec4 and output JSON to generated/likec4.json")}
807
+ `),handler:async e=>{await w$({path:e.path,useDotBin:e.useDotBin,outfile:e.outfile})}}).updateStrings({"Commands:":ee.bold("Formats:")}),handler:()=>{}};async function S$(t){const{isDev:e,...r}=await $i({...t,likec4AssetsDir:"",webcomponentPrefix:void 0}),n=await bi({port:Zr(62001,62010)}),s=t?.open??!1;return await Gh({...r,mode:"production",preview:{host:t.listen??"127.0.0.1",allowedHosts:!0,port:n,open:s}})}async function R$({path:t,output:e,base:r,listen:n}){const s=await rt.fromWorkspace(t,
808
+ {logger:"vite"}),i=await S$({base:r,languageServices:s,outputDir:e,open:!0,listen:n});_c(i)}const A$={command:"preview [path]",describe:"Start local server to preview production build",builder:t=>t.positional("path",{type:"string",desc:`Directory with LikeC4 source files
809
+ 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"],Ue).default("path",Ue("."),".").default("listen","127.0.0.1","localhost"),async handler(t){await R$(t)}};async function O$({path:t,useDotBin:e,webcomponentPrefix:r,
810
+ 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 Tr(ir(jr(),".likec4-assets-")),l=await wc({buildWebcomponent:!0,hmr:!0,base:i,webcomponentPrefix:r,languageServices:a,useHashHistory:n,useOverviewGraph:s,likec4AssetsDir:u,listen:o});if(l.config.logger.clearScreen("info"),_c(l),!s)return;const c=await a.diagrams();if(Zo(c,1)){const d=tt("c4:export"),h=yc(l);if(!h){d.error("no preview server\
811
+ url");return}d.info(ee.cyan("wait 5sec before generating previews")),await ca(5e3);try{await Ec({serverUrl:h,logger:d,views:c,theme:"light",output:u,outputType:"flat"}),await ca(1e3),d.info(ee.yellow("Note: changes in sources do not trigger preview updates, restart is required"))}catch(y){d.error(ee.red("Failed to generate previews")),d.error(y)}}else l.config.logger.warn("no views found, no previews generated")}const C$={command:"start [path]",aliases:["serve","dev"],describe:"Start local dev \
812
+ server to preview LikeC4 views",builder:t=>t.positional("path",br).option("base",Ka).option("webcomponent-prefix",Ws).option("use-hash-history",Wa).option("use-overview",Ya).option("use-dot",Ye).option("listen",Zp),handler:async t=>{await O$({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 P$({path:t,ignoreLayout:e}){const r=await rt.fromWorkspace(t,
813
+ {logger:"vite"}),n=tt("c4:views");let s=!0;return s=await i(r)&&s,s=(e||await o(r,n))&&s,s?0:ea(1);function i(a){return a.getErrors().length===0}async function o(a,u){const l=await a.diagrams();let c=!1;for(const d of l)d.hasLayoutDrift===!0&&(c=!0,u.error(ee.red(`Layout drift detected on view '${d.id}' at ${ge(t,d.relativePath??".")}`)));return!c}}const I$={command:"validate [path]",aliases:[],describe:"Validate model syntax and manual layout",builder:t=>t.positional("path",br).option("ignore-l\
814
+ ayout",{alias:["skip-layout"],boolean:!0,default:!1,description:"do not validate layout of views"}),handler:async t=>{await P$({path:t.path,ignoreLayout:t["ignore-layout"]})}};async function N$(){return await bh({sinks:{console:wh()},loggers:[{category:"likec4",sinks:["console"],lowestLevel:"info"}]}),f$(),await Jp(gp(Rh)).scriptName("likec4").usage("Usage: $0 <command>").command(C$).command(Lm).command(b$).command(E$).command(A$).command(I$).command({command:"check-update",describe:"Check for u\
815
+ pdates",handler:async()=>{await d$()}}).help("help").version(Vt).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:":ee.bold("Options:"),"Positionals:":ee.bold("Arguments:"),"Commands:":ee.bold("Commands:"),"Examples:":ee.bold("Examples:")}).wrap(Xo(Sh.columns-20,{min:80,max:120})).parseAsync()}N$().catch(()=>{ea(1)}),process.on("unhandledRejection",
816
+ t=>{console.error("Unhandled rejection",t)});