likec4 1.44.0 → 1.45.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,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import{h as Te,r as Tf,k as tt,l as mn,m as wt,u as j,w as No,o as Nf,p as Of,q as Ae,s as Oo,v as Mt,x as We,y as If,d as Io,z as jo,A as jf,c as Lf,L as Pe,B as Df,j as Lo,C as qf,D as Do,E as De,F as xf,G as Mf,e as Hf,H as at,U as yn,I as it,J as gn,K as vn,M as qo,Q as xo}from"../shared/likec4.BSr9pG1Z.mjs";import se,{existsSync as He,copyFileSync as Mo,readdirSync as Uf,rmSync as $n,statSync as Ff}from"node:fs";import me,{hrtime as Vf,cwd as Ht,exit as Ho,argv as zf,stdout as Gf}from"node:process";
3
- import{b as Uo,t as Fo,a as Bf,d as bt}from"../shared/likec4.CB2-Uaub.mjs";import{env as Vo,isMinimal as Kf,nodeENV as Wf,isDevelopment as Xf}from"std-env";import Jf from"yargs";import{hideBin as Yf}from"yargs/helpers";import ie,{resolve as oe,dirname as qe,join as Et,relative as Ue,sep as zo,extname as St,isAbsolute as _n,basename as Ut}from"node:path";import Go,{mkdtemp as Ft,writeFile as Xe,mkdir as xe,stat as wn,copyFile as Qf,rm as Zf}from"node:fs/promises";import Rt,{tmpdir as Vt}from"node:os";
4
- import{fileURLToPath as Bo}from"node:url";import bn from"@vitejs/plugin-react";import Ko from"util";import En,{resolve as ct}from"path";import{j as Wo,e as Xo,C as ed,t as Jo,N as ut,L as Sn,g as td,a as rd,b as nd}from"../shared/likec4.CXaeDwoC.mjs";import{build as At,createServer as sd,preview as od}from"vite";import ad from"node:module";import id from"node:net";import{setTimeout as cd}from"node:timers/promises";import{invariant as Rn,nonexhaustive as An}from"@likec4/core";import{promisify as ve,
5
- isDeepStrictEqual as ud}from"node:util";import Pt from"node:crypto";import ld from"node:assert";import{b as lt}from"../shared/likec4.H8IcXBiE.mjs";import{isDeploymentRelationModel as fd,isRelationModel as dd,isDeploymentElementModel as pd,isLikeC4ViewModel as hd,isElementModel as md}from"@likec4/core/model";import{compareNatural as yd,sortNaturalByFqn as gd,invariant as vd,delay as Yo}from"@likec4/core/utils";let Pn;function $d(){try{return se.statSync("/.dockerenv"),!0}catch{return!1}}function _d(){
6
- try{return se.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function wd(){return Pn===void 0&&(Pn=$d()||_d()),Pn}let Cn;const bd=()=>{try{return se.statSync("/run/.containerenv"),!0}catch{return!1}};function Fe(){return Cn===void 0&&(Cn=bd()||wd()),Cn}const be={type:"string",desc:"<directory> with LikeC4 sources (default is current directory)",normalize:!0,default:".",coerce:oe},Re={alias:"use-dot-bin",boolean:!0,type:"boolean",desc:Fe()?"enabled in container, disab\
7
- le by --no-use-dot":'use graphviz binaries ("dot" should be on PATH)',default:Fe()},Qo={boolean:!0,type:"boolean",desc:"use `@likec4/core` package in types",default:!1},Zo={boolean:!0,type:"boolean",desc:'use hash history for navigation, e.g. "/#/view" instead of "/view"'},zt={alias:"o",type:"string",desc:"output directory",normalize:!0,nargs:1,coerce:oe},kn={alias:"w",type:"string",desc:'prefix for Webcomponents, e.g "c4" generates <c4-view ../>',default:"likec4",nargs:1},ea={alias:"t",type:"st\
8
- ring",desc:'base title of the app pages (default is "LikeC4")',default:"LikeC4",nargs:1},ta={alias:["base-url"],type:"string",desc:'base url the app is being served from, e.g. "/" or "/pages/"',nargs:1},Ed={boolean:!0,type:"boolean",desc:"outputs a single self-contained HTML file with all required resources inlined"},Sd={alias:"l",type:"string",desc:Fe()?"listen 0.0.0.0 by default in container":"ip address of the network interface to listen on",default:Fe()?"0.0.0.0":"localhost",nargs:1},Rd={type:"\
9
- number",desc:"port number for the dev server (default is 5173, or PORT environment variable)",nargs:1},Gt={alias:"p",type:"string",desc:'LikeC4 project, name eg. "my-project" or path to the project folder',nargs:1},ra=e=>e instanceof URL?Bo(e):e;function Ad(e,{cwd:t=me.cwd(),type:r="file",stopAt:n}={}){let i=ie.resolve(ra(t)??"");const{root:o}=ie.parse(i);for(n=ie.resolve(i,ra(n)??o);i&&i!==n&&i!==o;){const a=ie.isAbsolute(e)?e:ie.join(i,e);try{const s=se.statSync(a,{throwIfNoEntry:!1});if(r==="\
10
- file"&&s?.isFile()||r==="directory"&&s?.isDirectory())return a}catch{}i=ie.dirname(i)}}function Pd({cwd:e=me.cwd()}={}){return Ad("package.json",{cwd:e})}const Cd=Te("vite"),Bt=qe(Bo(import.meta.url)),kd=`
2
+ import{h as Te,r as Tf,k as tt,l as mn,m as wt,u as N,w as Oo,o as Of,p as Nf,q as Ae,s as No,v as Ht,x as Ke,y as If,d as Io,z as jo,A as jf,c as Lf,L as Pe,B as Df,j as Lo,C as qf,D as Do,E as De,F as xf,G as Mf,e as Hf,H as at,U as yn,I as it,J as gn,K as vn,M as qo,Q as xo}from"../shared/likec4.Do3Hp_xd.mjs";import se,{existsSync as He,copyFileSync as Mo,readdirSync as Uf,rmSync as $n,statSync as Ff}from"node:fs";import me,{hrtime as Vf,cwd as Ut,exit as Ho,argv as zf,stdout as Gf}from"node:process";
3
+ import{b as Uo,t as Fo,a as Bf,d as bt}from"../shared/likec4.CB2-Uaub.mjs";import{env as Vo,isMinimal as Kf,nodeENV as Wf,isDevelopment as Xf}from"std-env";import Jf from"yargs";import{hideBin as Yf}from"yargs/helpers";import ie,{resolve as oe,dirname as qe,join as Et,relative as Ue,sep as zo,extname as St,isAbsolute as _n,basename as Ft}from"node:path";import Go,{mkdtemp as Vt,writeFile as We,mkdir as xe,stat as wn,copyFile as Qf,rm as Zf}from"node:fs/promises";import Rt,{tmpdir as zt}from"node:os";
4
+ import{fileURLToPath as Bo}from"node:url";import bn from"@vitejs/plugin-react";import Ko from"util";import En,{resolve as ct}from"path";import{j as Wo,e as Xo,C as ed,t as Jo,N as ut,L as Sn,g as td,a as rd,b as nd}from"../shared/likec4.DH1Cjktk.mjs";import{build as At,createServer as sd,preview as od}from"vite";import ad from"node:module";import id from"node:net";import{setTimeout as cd}from"node:timers/promises";import{invariant as Rn,nonexhaustive as An}from"@likec4/core";import{promisify as ve,
5
+ isDeepStrictEqual as ud}from"node:util";import Pt from"node:crypto";import ld from"node:assert";import{l as lt}from"../shared/likec4.CuC6o09-.mjs";import{isDeploymentRelationModel as fd,isRelationModel as dd,isDeploymentElementModel as pd,isLikeC4ViewModel as hd,isElementModel as md}from"@likec4/core/model";import{compareNatural as yd,sortNaturalByFqn as gd,invariant as vd,delay as Yo}from"@likec4/core/utils";let Pn;function $d(){try{return se.statSync("/.dockerenv"),!0}catch{return!1}}function _d(){
6
+ try{return se.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function wd(){return Pn===void 0&&(Pn=$d()||_d()),Pn}let Cn;const bd=()=>{try{return se.statSync("/run/.containerenv"),!0}catch{return!1}};function Xe(){return Cn===void 0&&(Cn=bd()||wd()),Cn}const be={type:"string",desc:"<directory> with LikeC4 sources (default is current directory)",normalize:!0,default:".",coerce:oe},Re={alias:"use-dot-bin",boolean:!0,type:"boolean",desc:Xe()?"enabled in container, disab\
7
+ le by --no-use-dot":'use graphviz binaries ("dot" should be on PATH)',default:Xe()},Qo={boolean:!0,type:"boolean",desc:"use `@likec4/core` package in types",default:!1},Zo={boolean:!0,type:"boolean",desc:'use hash history for navigation, e.g. "/#/view" instead of "/view"'},Gt={alias:"o",type:"string",desc:"output directory",normalize:!0,nargs:1,coerce:oe},kn={alias:"w",type:"string",desc:'prefix for Webcomponents, e.g "c4" generates <c4-view ../>',default:"likec4",nargs:1},ea={alias:"t",type:"st\
8
+ ring",desc:'base title of the app pages (default is "LikeC4")',default:"LikeC4",nargs:1},ta={alias:["base-url"],type:"string",desc:'base url the app is being served from, e.g. "/" or "/pages/"',nargs:1},Ed={boolean:!0,type:"boolean",desc:"outputs a single self-contained HTML file with all required resources inlined"},Sd={alias:"l",type:"string",...Xe()?{desc:"listen 0.0.0.0 by default in container",default:"0.0.0.0"}:{desc:"ip address of the network interface to listen on"},nargs:1},Rd={type:"nu\
9
+ mber",desc:"port number for the dev server (default is 5173, or PORT environment variable)",nargs:1},Ct={alias:"p",type:"string",desc:'LikeC4 project, name eg. "my-project" or path to the project folder',nargs:1},ra=e=>e instanceof URL?Bo(e):e;function Ad(e,{cwd:t=me.cwd(),type:r="file",stopAt:n}={}){let i=ie.resolve(ra(t)??"");const{root:a}=ie.parse(i);for(n=ie.resolve(i,ra(n)??a);i&&i!==n&&i!==a;){const o=ie.isAbsolute(e)?e:ie.join(i,e);try{const s=se.statSync(o,{throwIfNoEntry:!1});if(r==="fi\
10
+ le"&&s?.isFile()||r==="directory"&&s?.isDirectory())return o}catch{}i=ie.dirname(i)}}function Pd({cwd:e=me.cwd()}={}){return Ad("package.json",{cwd:e})}const Cd=Te("vite"),Bt=qe(Bo(import.meta.url)),kd=`
11
11
  /* prettier-ignore-start */
12
12
  /* eslint-disable */
13
13
 
@@ -19,89 +19,89 @@ file"&&s?.isFile()||r==="directory"&&s?.isDirectory())return a}catch{}i=ie.dirna
19
19
  `.trimStart(),Td=`
20
20
 
21
21
  /* prettier-ignore-end */
22
- `,Tn={banner:kd,footer:Td};function na(){const e=Pd({cwd:Bt});if(!e)throw new Error("likec4 package folder not found");return qe(e)}function Nn(){const e=na(),t=[oe(e,"__app__"),oe(Bt,"../__app__"),oe(Bt,"../../__app__"),oe(Bt,"../../dist/__app__")],r=Tf(t,He);if(!r)throw tt.error(`likec4 app root does not exist, tried:
22
+ `,Tn={banner:kd,footer:Td};function na(){const e=Pd({cwd:Bt});if(!e)throw new Error("likec4 package folder not found");return qe(e)}function On(){const e=na(),t=[oe(e,"__app__"),oe(Bt,"../__app__"),oe(Bt,"../../__app__"),oe(Bt,"../../dist/__app__")],r=Tf(t,He);if(!r)throw tt.error(`likec4 app root does not exist, tried:
23
23
  ${t.join(`
24
- `)}`),new Error("likec4 app root does not exist");return r}async function On(){const e=await Ft(Et(Vt(),".likec4-public-"));return await Xe(Et(e,"likec4-views.js"),`// generated by likec4
24
+ `)}`),new Error("likec4 app root does not exist");return r}async function Nn(){const e=await Vt(Et(zt(),".likec4-public-"));return await We(Et(e,"likec4-views.js"),`// generated by likec4
25
25
  `),e}const In=1e4;function jn(){const e=na();return{"likec4/icons":oe(e,"icons"),"likec4/react":oe(e,"react/index.js"),"likec4/model":oe(e,"dist/model/index.mjs"),"likec4/vite-plugin/internal":oe(e,"dist/vite-plugin/internal.mjs")}}var Ln={},sa;function Dn(){return sa||(sa=1,(function(e){e.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1,e.find=(t,r)=>t.nodes.find(n=>n.type===r),e.exceedsLimit=(t,r,n=1,i)=>i===!1||!e.isInteger(t)||
26
26
  !e.isInteger(r)?!1:(Number(r)-Number(t))/Number(n)>=i,e.escapeNode=(t,r=0,n)=>{const i=t.nodes[r];i&&(n&&i.type===n||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)},e.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1,e.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0===0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1,e.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===
27
- !0||t.close===!0,e.reduce=t=>t.reduce((r,n)=>(n.type==="text"&&r.push(n.value),n.type==="range"&&(n.type="text"),r),[]),e.flatten=(...t)=>{const r=[],n=i=>{for(let o=0;o<i.length;o++){const a=i[o];if(Array.isArray(a)){n(a);continue}a!==void 0&&r.push(a)}return r};return n(t),r}})(Ln)),Ln}var qn,oa;function xn(){if(oa)return qn;oa=1;const e=Dn();return qn=(t,r={})=>{const n=(i,o={})=>{const a=r.escapeInvalid&&e.isInvalidBrace(o),s=i.invalid===!0&&r.escapeInvalid===!0;let u="";if(i.value)return(a||
28
- s)&&e.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(const c of i.nodes)u+=n(c);return u};return n(t)},qn}var Mn,aa;function Nd(){return aa||(aa=1,Mn=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}),Mn}var Hn,ia;function Od(){if(ia)return Hn;ia=1;const e=Nd(),t=(p,h,f)=>{if(e(p)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(h===void 0||p===
29
- h)return String(p);if(e(h)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let d={relaxZeros:!0,...f};typeof d.strictZeros=="boolean"&&(d.relaxZeros=d.strictZeros===!1);let v=String(d.relaxZeros),$=String(d.shorthand),w=String(d.capture),E=String(d.wrap),P=p+":"+h+"="+v+$+w+E;if(t.cache.hasOwnProperty(P))return t.cache[P].result;let O=Math.min(p,h),U=Math.max(p,h);if(Math.abs(O-U)===1){let M=p+"|"+h;return d.capture?`(${M})`:d.wrap===!1?M:`(?:${M})`}let x=S(
30
- p)||S(h),H={min:p,max:h,a:O,b:U},D=[],I=[];if(x&&(H.isPadded=x,H.maxLen=String(H.max).length),O<0){let M=U<0?Math.abs(U):1;I=o(M,Math.abs(O),H,d),O=H.a=0}return U>=0&&(D=o(O,U,H,d)),H.negatives=I,H.positives=D,H.result=r(I,D),d.capture===!0?H.result=`(${H.result})`:d.wrap!==!1&&D.length+I.length>1&&(H.result=`(?:${H.result})`),t.cache[P]=H,H.result};function r(p,h,f){let d=a(p,h,"-",!1)||[],v=a(h,p,"",!1)||[],$=a(p,h,"-?",!0)||[];return d.concat($).concat(v).join("|")}function n(p,h){let f=1,d=1,
31
- v=l(p,f),$=new Set([h]);for(;p<=v&&v<=h;)$.add(v),f+=1,v=l(p,f);for(v=m(h+1,d)-1;p<v&&v<=h;)$.add(v),d+=1,v=m(h+1,d)-1;return $=[...$],$.sort(u),$}function i(p,h,f){if(p===h)return{pattern:p,count:[],digits:0};let d=s(p,h),v=d.length,$="",w=0;for(let E=0;E<v;E++){let[P,O]=d[E];P===O?$+=P:P!=="0"||O!=="9"?$+=_(P,O):w++}return w&&($+=f.shorthand===!0?"\\d":"[0-9]"),{pattern:$,count:[w],digits:v}}function o(p,h,f,d){let v=n(p,h),$=[],w=p,E;for(let P=0;P<v.length;P++){let O=v[P],U=i(String(w),String(
32
- O),d),x="";if(!f.isPadded&&E&&E.pattern===U.pattern){E.count.length>1&&E.count.pop(),E.count.push(U.count[0]),E.string=E.pattern+y(E.count),w=O+1;continue}f.isPadded&&(x=g(O,f,d)),U.string=x+U.pattern+y(U.count),$.push(U),w=O+1,E=U}return $}function a(p,h,f,d,v){let $=[];for(let w of p){let{string:E}=w;!d&&!c(h,"string",E)&&$.push(f+E),d&&c(h,"string",E)&&$.push(f+E)}return $}function s(p,h){let f=[];for(let d=0;d<p.length;d++)f.push([p[d],h[d]]);return f}function u(p,h){return p>h?1:h>p?-1:0}function c(p,h,f){
33
- return p.some(d=>d[h]===f)}function l(p,h){return Number(String(p).slice(0,-h)+"9".repeat(h))}function m(p,h){return p-p%Math.pow(10,h)}function y(p){let[h=0,f=""]=p;return f||h>1?`{${h+(f?","+f:"")}}`:""}function _(p,h,f){return`[${p}${h-p===1?"":"-"}${h}]`}function S(p){return/^-?(0+)\d/.test(p)}function g(p,h,f){if(!h.isPadded)return p;let d=Math.abs(h.maxLen-String(p).length),v=f.relaxZeros!==!1;switch(d){case 0:return"";case 1:return v?"0?":"0";case 2:return v?"0{0,2}":"00";default:return v?
34
- `0{0,${d}}`:`0{${d}}`}}return t.cache={},t.clearCache=()=>t.cache={},Hn=t,Hn}var Un,ca;function ua(){if(ca)return Un;ca=1;const e=Ko,t=Od(),r=d=>d!==null&&typeof d=="object"&&!Array.isArray(d),n=d=>v=>d===!0?Number(v):String(v),i=d=>typeof d=="number"||typeof d=="string"&&d!=="",o=d=>Number.isInteger(+d),a=d=>{let v=`${d}`,$=-1;if(v[0]==="-"&&(v=v.slice(1)),v==="0")return!1;for(;v[++$]==="0";);return $>0},s=(d,v,$)=>typeof d=="string"||typeof v=="string"?!0:$.stringify===!0,u=(d,v,$)=>{if(v>0){let w=d[0]===
35
- "-"?"-":"";w&&(d=d.slice(1)),d=w+d.padStart(w?v-1:v,"0")}return $===!1?String(d):d},c=(d,v)=>{let $=d[0]==="-"?"-":"";for($&&(d=d.slice(1),v--);d.length<v;)d="0"+d;return $?"-"+d:d},l=(d,v,$)=>{d.negatives.sort((U,x)=>U<x?-1:U>x?1:0),d.positives.sort((U,x)=>U<x?-1:U>x?1:0);let w=v.capture?"":"?:",E="",P="",O;return d.positives.length&&(E=d.positives.map(U=>c(String(U),$)).join("|")),d.negatives.length&&(P=`-(${w}${d.negatives.map(U=>c(String(U),$)).join("|")})`),E&&P?O=`${E}|${P}`:O=E||P,v.wrap?
36
- `(${w}${O})`:O},m=(d,v,$,w)=>{if($)return t(d,v,{wrap:!1,...w});let E=String.fromCharCode(d);if(d===v)return E;let P=String.fromCharCode(v);return`[${E}-${P}]`},y=(d,v,$)=>{if(Array.isArray(d)){let w=$.wrap===!0,E=$.capture?"":"?:";return w?`(${E}${d.join("|")})`:d.join("|")}return t(d,v,$)},_=(...d)=>new RangeError("Invalid range arguments: "+e.inspect(...d)),S=(d,v,$)=>{if($.strictRanges===!0)throw _([d,v]);return[]},g=(d,v)=>{if(v.strictRanges===!0)throw new TypeError(`Expected step "${d}" to\
37
- be a number`);return[]},p=(d,v,$=1,w={})=>{let E=Number(d),P=Number(v);if(!Number.isInteger(E)||!Number.isInteger(P)){if(w.strictRanges===!0)throw _([d,v]);return[]}E===0&&(E=0),P===0&&(P=0);let O=E>P,U=String(d),x=String(v),H=String($);$=Math.max(Math.abs($),1);let D=a(U)||a(x)||a(H),I=D?Math.max(U.length,x.length,H.length):0,M=D===!1&&s(d,v,w)===!1,z=w.transform||n(M);if(w.toRegex&&$===1)return m(c(d,I),c(v,I),!0,w);let F={negatives:[],positives:[]},G=A=>F[A<0?"negatives":"positives"].push(Math.
38
- abs(A)),Q=[],q=0;for(;O?E>=P:E<=P;)w.toRegex===!0&&$>1?G(E):Q.push(u(z(E,q),I,M)),E=O?E-$:E+$,q++;return w.toRegex===!0?$>1?l(F,w,I):y(Q,null,{wrap:!1,...w}):Q},h=(d,v,$=1,w={})=>{if(!o(d)&&d.length>1||!o(v)&&v.length>1)return S(d,v,w);let E=w.transform||(M=>String.fromCharCode(M)),P=`${d}`.charCodeAt(0),O=`${v}`.charCodeAt(0),U=P>O,x=Math.min(P,O),H=Math.max(P,O);if(w.toRegex&&$===1)return m(x,H,!1,w);let D=[],I=0;for(;U?P>=O:P<=O;)D.push(E(P,I)),P=U?P-$:P+$,I++;return w.toRegex===!0?y(D,null,{
39
- wrap:!1,options:w}):D},f=(d,v,$,w={})=>{if(v==null&&i(d))return[d];if(!i(d)||!i(v))return S(d,v,w);if(typeof $=="function")return f(d,v,1,{transform:$});if(r($))return f(d,v,0,$);let E={...w};return E.capture===!0&&(E.wrap=!0),$=$||E.step||1,o($)?o(d)&&o(v)?p(d,v,$,E):h(d,v,Math.max(Math.abs($),1),E):$!=null&&!r($)?g($,E):f(d,v,1,$)};return Un=f,Un}var Fn,la;function Id(){if(la)return Fn;la=1;const e=ua(),t=Dn();return Fn=(n,i={})=>{const o=(a,s={})=>{const u=t.isInvalidBrace(s),c=a.invalid===!0&&
40
- i.escapeInvalid===!0,l=u===!0||c===!0,m=i.escapeInvalid===!0?"\\":"";let y="";if(a.isOpen===!0)return m+a.value;if(a.isClose===!0)return console.log("node.isClose",m,a.value),m+a.value;if(a.type==="open")return l?m+a.value:"(";if(a.type==="close")return l?m+a.value:")";if(a.type==="comma")return a.prev.type==="comma"?"":l?a.value:"|";if(a.value)return a.value;if(a.nodes&&a.ranges>0){const _=t.reduce(a.nodes),S=e(..._,{...i,wrap:!1,toRegex:!0,strictZeros:!0});if(S.length!==0)return _.length>1&&S.
41
- length>1?`(${S})`:S}if(a.nodes)for(const _ of a.nodes)y+=o(_,a);return y};return o(n)},Fn}var Vn,fa;function jd(){if(fa)return Vn;fa=1;const e=ua(),t=xn(),r=Dn(),n=(o="",a="",s=!1)=>{const u=[];if(o=[].concat(o),a=[].concat(a),!a.length)return o;if(!o.length)return s?r.flatten(a).map(c=>`{${c}}`):a;for(const c of o)if(Array.isArray(c))for(const l of c)u.push(n(l,a,s));else for(let l of a)s===!0&&typeof l=="string"&&(l=`{${l}}`),u.push(Array.isArray(l)?n(c,l,s):c+l);return r.flatten(u)};return Vn=
42
- (o,a={})=>{const s=a.rangeLimit===void 0?1e3:a.rangeLimit,u=(c,l={})=>{c.queue=[];let m=l,y=l.queue;for(;m.type!=="brace"&&m.type!=="root"&&m.parent;)m=m.parent,y=m.queue;if(c.invalid||c.dollar){y.push(n(y.pop(),t(c,a)));return}if(c.type==="brace"&&c.invalid!==!0&&c.nodes.length===2){y.push(n(y.pop(),["{}"]));return}if(c.nodes&&c.ranges>0){const p=r.reduce(c.nodes);if(r.exceedsLimit(...p,a.step,s))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase\
43
- or disable the limit.");let h=e(...p,a);h.length===0&&(h=t(c,a)),y.push(n(y.pop(),h)),c.nodes=[];return}const _=r.encloseBrace(c);let S=c.queue,g=c;for(;g.type!=="brace"&&g.type!=="root"&&g.parent;)g=g.parent,S=g.queue;for(let p=0;p<c.nodes.length;p++){const h=c.nodes[p];if(h.type==="comma"&&c.type==="brace"){p===1&&S.push(""),S.push("");continue}if(h.type==="close"){y.push(n(y.pop(),S,_));continue}if(h.value&&h.type!=="open"){S.push(n(S.pop(),h.value));continue}h.nodes&&u(h,c)}return S};return r.
44
- flatten(u(o))},Vn}var zn,da;function Ld(){return da||(da=1,zn={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"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:"\
27
+ !0||t.close===!0,e.reduce=t=>t.reduce((r,n)=>(n.type==="text"&&r.push(n.value),n.type==="range"&&(n.type="text"),r),[]),e.flatten=(...t)=>{const r=[],n=i=>{for(let a=0;a<i.length;a++){const o=i[a];if(Array.isArray(o)){n(o);continue}o!==void 0&&r.push(o)}return r};return n(t),r}})(Ln)),Ln}var qn,oa;function xn(){if(oa)return qn;oa=1;const e=Dn();return qn=(t,r={})=>{const n=(i,a={})=>{const o=r.escapeInvalid&&e.isInvalidBrace(a),s=i.invalid===!0&&r.escapeInvalid===!0;let u="";if(i.value)return(o||
28
+ s)&&e.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(const c of i.nodes)u+=n(c);return u};return n(t)},qn}var Mn,aa;function Od(){return aa||(aa=1,Mn=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}),Mn}var Hn,ia;function Nd(){if(ia)return Hn;ia=1;const e=Od(),t=(h,p,f)=>{if(e(h)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(p===void 0||h===
29
+ p)return String(h);if(e(p)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let d={relaxZeros:!0,...f};typeof d.strictZeros=="boolean"&&(d.relaxZeros=d.strictZeros===!1);let v=String(d.relaxZeros),$=String(d.shorthand),w=String(d.capture),b=String(d.wrap),P=h+":"+p+"="+v+$+w+b;if(t.cache.hasOwnProperty(P))return t.cache[P].result;let I=Math.min(h,p),H=Math.max(h,p);if(Math.abs(I-H)===1){let M=h+"|"+p;return d.capture?`(${M})`:d.wrap===!1?M:`(?:${M})`}let x=S(
30
+ h)||S(p),U={min:h,max:p,a:I,b:H},L=[],j=[];if(x&&(U.isPadded=x,U.maxLen=String(U.max).length),I<0){let M=H<0?Math.abs(H):1;j=a(M,Math.abs(I),U,d),I=U.a=0}return H>=0&&(L=a(I,H,U,d)),U.negatives=j,U.positives=L,U.result=r(j,L),d.capture===!0?U.result=`(${U.result})`:d.wrap!==!1&&L.length+j.length>1&&(U.result=`(?:${U.result})`),t.cache[P]=U,U.result};function r(h,p,f){let d=o(h,p,"-",!1)||[],v=o(p,h,"",!1)||[],$=o(h,p,"-?",!0)||[];return d.concat($).concat(v).join("|")}function n(h,p){let f=1,d=1,
31
+ v=l(h,f),$=new Set([p]);for(;h<=v&&v<=p;)$.add(v),f+=1,v=l(h,f);for(v=m(p+1,d)-1;h<v&&v<=p;)$.add(v),d+=1,v=m(p+1,d)-1;return $=[...$],$.sort(u),$}function i(h,p,f){if(h===p)return{pattern:h,count:[],digits:0};let d=s(h,p),v=d.length,$="",w=0;for(let b=0;b<v;b++){let[P,I]=d[b];P===I?$+=P:P!=="0"||I!=="9"?$+=_(P,I):w++}return w&&($+=f.shorthand===!0?"\\d":"[0-9]"),{pattern:$,count:[w],digits:v}}function a(h,p,f,d){let v=n(h,p),$=[],w=h,b;for(let P=0;P<v.length;P++){let I=v[P],H=i(String(w),String(
32
+ I),d),x="";if(!f.isPadded&&b&&b.pattern===H.pattern){b.count.length>1&&b.count.pop(),b.count.push(H.count[0]),b.string=b.pattern+y(b.count),w=I+1;continue}f.isPadded&&(x=g(I,f,d)),H.string=x+H.pattern+y(H.count),$.push(H),w=I+1,b=H}return $}function o(h,p,f,d,v){let $=[];for(let w of h){let{string:b}=w;!d&&!c(p,"string",b)&&$.push(f+b),d&&c(p,"string",b)&&$.push(f+b)}return $}function s(h,p){let f=[];for(let d=0;d<h.length;d++)f.push([h[d],p[d]]);return f}function u(h,p){return h>p?1:p>h?-1:0}function c(h,p,f){
33
+ return h.some(d=>d[p]===f)}function l(h,p){return Number(String(h).slice(0,-p)+"9".repeat(p))}function m(h,p){return h-h%Math.pow(10,p)}function y(h){let[p=0,f=""]=h;return f||p>1?`{${p+(f?","+f:"")}}`:""}function _(h,p,f){return`[${h}${p-h===1?"":"-"}${p}]`}function S(h){return/^-?(0+)\d/.test(h)}function g(h,p,f){if(!p.isPadded)return h;let d=Math.abs(p.maxLen-String(h).length),v=f.relaxZeros!==!1;switch(d){case 0:return"";case 1:return v?"0?":"0";case 2:return v?"0{0,2}":"00";default:return v?
34
+ `0{0,${d}}`:`0{${d}}`}}return t.cache={},t.clearCache=()=>t.cache={},Hn=t,Hn}var Un,ca;function ua(){if(ca)return Un;ca=1;const e=Ko,t=Nd(),r=d=>d!==null&&typeof d=="object"&&!Array.isArray(d),n=d=>v=>d===!0?Number(v):String(v),i=d=>typeof d=="number"||typeof d=="string"&&d!=="",a=d=>Number.isInteger(+d),o=d=>{let v=`${d}`,$=-1;if(v[0]==="-"&&(v=v.slice(1)),v==="0")return!1;for(;v[++$]==="0";);return $>0},s=(d,v,$)=>typeof d=="string"||typeof v=="string"?!0:$.stringify===!0,u=(d,v,$)=>{if(v>0){let w=d[0]===
35
+ "-"?"-":"";w&&(d=d.slice(1)),d=w+d.padStart(w?v-1:v,"0")}return $===!1?String(d):d},c=(d,v)=>{let $=d[0]==="-"?"-":"";for($&&(d=d.slice(1),v--);d.length<v;)d="0"+d;return $?"-"+d:d},l=(d,v,$)=>{d.negatives.sort((H,x)=>H<x?-1:H>x?1:0),d.positives.sort((H,x)=>H<x?-1:H>x?1:0);let w=v.capture?"":"?:",b="",P="",I;return d.positives.length&&(b=d.positives.map(H=>c(String(H),$)).join("|")),d.negatives.length&&(P=`-(${w}${d.negatives.map(H=>c(String(H),$)).join("|")})`),b&&P?I=`${b}|${P}`:I=b||P,v.wrap?
36
+ `(${w}${I})`:I},m=(d,v,$,w)=>{if($)return t(d,v,{wrap:!1,...w});let b=String.fromCharCode(d);if(d===v)return b;let P=String.fromCharCode(v);return`[${b}-${P}]`},y=(d,v,$)=>{if(Array.isArray(d)){let w=$.wrap===!0,b=$.capture?"":"?:";return w?`(${b}${d.join("|")})`:d.join("|")}return t(d,v,$)},_=(...d)=>new RangeError("Invalid range arguments: "+e.inspect(...d)),S=(d,v,$)=>{if($.strictRanges===!0)throw _([d,v]);return[]},g=(d,v)=>{if(v.strictRanges===!0)throw new TypeError(`Expected step "${d}" to\
37
+ be a number`);return[]},h=(d,v,$=1,w={})=>{let b=Number(d),P=Number(v);if(!Number.isInteger(b)||!Number.isInteger(P)){if(w.strictRanges===!0)throw _([d,v]);return[]}b===0&&(b=0),P===0&&(P=0);let I=b>P,H=String(d),x=String(v),U=String($);$=Math.max(Math.abs($),1);let L=o(H)||o(x)||o(U),j=L?Math.max(H.length,x.length,U.length):0,M=L===!1&&s(d,v,w)===!1,z=w.transform||n(M);if(w.toRegex&&$===1)return m(c(d,j),c(v,j),!0,w);let F={negatives:[],positives:[]},G=A=>F[A<0?"negatives":"positives"].push(Math.
38
+ abs(A)),Q=[],q=0;for(;I?b>=P:b<=P;)w.toRegex===!0&&$>1?G(b):Q.push(u(z(b,q),j,M)),b=I?b-$:b+$,q++;return w.toRegex===!0?$>1?l(F,w,j):y(Q,null,{wrap:!1,...w}):Q},p=(d,v,$=1,w={})=>{if(!a(d)&&d.length>1||!a(v)&&v.length>1)return S(d,v,w);let b=w.transform||(M=>String.fromCharCode(M)),P=`${d}`.charCodeAt(0),I=`${v}`.charCodeAt(0),H=P>I,x=Math.min(P,I),U=Math.max(P,I);if(w.toRegex&&$===1)return m(x,U,!1,w);let L=[],j=0;for(;H?P>=I:P<=I;)L.push(b(P,j)),P=H?P-$:P+$,j++;return w.toRegex===!0?y(L,null,{
39
+ wrap:!1,options:w}):L},f=(d,v,$,w={})=>{if(v==null&&i(d))return[d];if(!i(d)||!i(v))return S(d,v,w);if(typeof $=="function")return f(d,v,1,{transform:$});if(r($))return f(d,v,0,$);let b={...w};return b.capture===!0&&(b.wrap=!0),$=$||b.step||1,a($)?a(d)&&a(v)?h(d,v,$,b):p(d,v,Math.max(Math.abs($),1),b):$!=null&&!r($)?g($,b):f(d,v,1,$)};return Un=f,Un}var Fn,la;function Id(){if(la)return Fn;la=1;const e=ua(),t=Dn();return Fn=(n,i={})=>{const a=(o,s={})=>{const u=t.isInvalidBrace(s),c=o.invalid===!0&&
40
+ i.escapeInvalid===!0,l=u===!0||c===!0,m=i.escapeInvalid===!0?"\\":"";let y="";if(o.isOpen===!0)return m+o.value;if(o.isClose===!0)return console.log("node.isClose",m,o.value),m+o.value;if(o.type==="open")return l?m+o.value:"(";if(o.type==="close")return l?m+o.value:")";if(o.type==="comma")return o.prev.type==="comma"?"":l?o.value:"|";if(o.value)return o.value;if(o.nodes&&o.ranges>0){const _=t.reduce(o.nodes),S=e(..._,{...i,wrap:!1,toRegex:!0,strictZeros:!0});if(S.length!==0)return _.length>1&&S.
41
+ length>1?`(${S})`:S}if(o.nodes)for(const _ of o.nodes)y+=a(_,o);return y};return a(n)},Fn}var Vn,fa;function jd(){if(fa)return Vn;fa=1;const e=ua(),t=xn(),r=Dn(),n=(a="",o="",s=!1)=>{const u=[];if(a=[].concat(a),o=[].concat(o),!o.length)return a;if(!a.length)return s?r.flatten(o).map(c=>`{${c}}`):o;for(const c of a)if(Array.isArray(c))for(const l of c)u.push(n(l,o,s));else for(let l of o)s===!0&&typeof l=="string"&&(l=`{${l}}`),u.push(Array.isArray(l)?n(c,l,s):c+l);return r.flatten(u)};return Vn=
42
+ (a,o={})=>{const s=o.rangeLimit===void 0?1e3:o.rangeLimit,u=(c,l={})=>{c.queue=[];let m=l,y=l.queue;for(;m.type!=="brace"&&m.type!=="root"&&m.parent;)m=m.parent,y=m.queue;if(c.invalid||c.dollar){y.push(n(y.pop(),t(c,o)));return}if(c.type==="brace"&&c.invalid!==!0&&c.nodes.length===2){y.push(n(y.pop(),["{}"]));return}if(c.nodes&&c.ranges>0){const h=r.reduce(c.nodes);if(r.exceedsLimit(...h,o.step,s))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase\
43
+ or disable the limit.");let p=e(...h,o);p.length===0&&(p=t(c,o)),y.push(n(y.pop(),p)),c.nodes=[];return}const _=r.encloseBrace(c);let S=c.queue,g=c;for(;g.type!=="brace"&&g.type!=="root"&&g.parent;)g=g.parent,S=g.queue;for(let h=0;h<c.nodes.length;h++){const p=c.nodes[h];if(p.type==="comma"&&c.type==="brace"){h===1&&S.push(""),S.push("");continue}if(p.type==="close"){y.push(n(y.pop(),S,_));continue}if(p.value&&p.type!=="open"){S.push(n(S.pop(),p.value));continue}p.nodes&&u(p,c)}return S};return r.
44
+ flatten(u(a))},Vn}var zn,da;function Ld(){return da||(da=1,zn={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"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:"\
45
45
  \f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
46
- `,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"}),zn}var Gn,pa;function Dd(){if(pa)return Gn;pa=1;const e=xn(),{MAX_LENGTH:t,CHAR_BACKSLASH:r,CHAR_BACKTICK:n,CHAR_COMMA:i,CHAR_DOT:o,CHAR_LEFT_PARENTHESES:a,CHAR_RIGHT_PARENTHESES:s,
47
- CHAR_LEFT_CURLY_BRACE:u,CHAR_RIGHT_CURLY_BRACE:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_RIGHT_SQUARE_BRACKET:m,CHAR_DOUBLE_QUOTE:y,CHAR_SINGLE_QUOTE:_,CHAR_NO_BREAK_SPACE:S,CHAR_ZERO_WIDTH_NOBREAK_SPACE:g}=Ld();return Gn=(h,f={})=>{if(typeof h!="string")throw new TypeError("Expected a string");const d=f||{},v=typeof d.maxLength=="number"?Math.min(t,d.maxLength):t;if(h.length>v)throw new SyntaxError(`Input length (${h.length}), exceeds max characters (${v})`);const $={type:"root",input:h,nodes:[]},w=[$];
48
- let E=$,P=$,O=0;const U=h.length;let x=0,H=0,D;const I=()=>h[x++],M=z=>{if(z.type==="text"&&P.type==="dot"&&(P.type="text"),P&&P.type==="text"&&z.type==="text"){P.value+=z.value;return}return E.nodes.push(z),z.parent=E,z.prev=P,P=z,z};for(M({type:"bos"});x<U;)if(E=w[w.length-1],D=I(),!(D===g||D===S)){if(D===r){M({type:"text",value:(f.keepEscaping?D:"")+I()});continue}if(D===m){M({type:"text",value:"\\"+D});continue}if(D===l){O++;let z;for(;x<U&&(z=I());){if(D+=z,z===l){O++;continue}if(z===r){D+=
49
- I();continue}if(z===m&&(O--,O===0))break}M({type:"text",value:D});continue}if(D===a){E=M({type:"paren",nodes:[]}),w.push(E),M({type:"text",value:D});continue}if(D===s){if(E.type!=="paren"){M({type:"text",value:D});continue}E=w.pop(),M({type:"text",value:D}),E=w[w.length-1];continue}if(D===y||D===_||D===n){const z=D;let F;for(f.keepQuotes!==!0&&(D="");x<U&&(F=I());){if(F===r){D+=F+I();continue}if(F===z){f.keepQuotes===!0&&(D+=F);break}D+=F}M({type:"text",value:D});continue}if(D===u){H++;const F={
50
- type:"brace",open:!0,close:!1,dollar:P.value&&P.value.slice(-1)==="$"||E.dollar===!0,depth:H,commas:0,ranges:0,nodes:[]};E=M(F),w.push(E),M({type:"open",value:D});continue}if(D===c){if(E.type!=="brace"){M({type:"text",value:D});continue}const z="close";E=w.pop(),E.close=!0,M({type:z,value:D}),H--,E=w[w.length-1];continue}if(D===i&&H>0){if(E.ranges>0){E.ranges=0;const z=E.nodes.shift();E.nodes=[z,{type:"text",value:e(E)}]}M({type:"comma",value:D}),E.commas++;continue}if(D===o&&H>0&&E.commas===0){
51
- const z=E.nodes;if(H===0||z.length===0){M({type:"text",value:D});continue}if(P.type==="dot"){if(E.range=[],P.value+=D,P.type="range",E.nodes.length!==3&&E.nodes.length!==5){E.invalid=!0,E.ranges=0,P.type="text";continue}E.ranges++,E.args=[];continue}if(P.type==="range"){z.pop();const F=z[z.length-1];F.value+=P.value+D,P=F,E.ranges--;continue}M({type:"dot",value:D});continue}M({type:"text",value:D})}do if(E=w.pop(),E.type!=="root"){E.nodes.forEach(G=>{G.nodes||(G.type==="open"&&(G.isOpen=!0),G.type===
52
- "close"&&(G.isClose=!0),G.nodes||(G.type="text"),G.invalid=!0)});const z=w[w.length-1],F=z.nodes.indexOf(E);z.nodes.splice(F,1,...E.nodes)}while(w.length>0);return M({type:"eos"}),$},Gn}var Bn,ha;function qd(){if(ha)return Bn;ha=1;const e=xn(),t=Id(),r=jd(),n=Dd(),i=(o,a={})=>{let s=[];if(Array.isArray(o))for(const u of o){const c=i.create(u,a);Array.isArray(c)?s.push(...c):s.push(c)}else s=[].concat(i.create(o,a));return a&&a.expand===!0&&a.nodupes===!0&&(s=[...new Set(s)]),s};return i.parse=(o,a={})=>n(
53
- o,a),i.stringify=(o,a={})=>e(typeof o=="string"?i.parse(o,a):o,a),i.compile=(o,a={})=>(typeof o=="string"&&(o=i.parse(o,a)),t(o,a)),i.expand=(o,a={})=>{typeof o=="string"&&(o=i.parse(o,a));let s=r(o,a);return a.noempty===!0&&(s=s.filter(Boolean)),a.nodupes===!0&&(s=[...new Set(s)]),s},i.create=(o,a={})=>o===""||o.length<3?[o]:a.expand!==!0?i.compile(o,a):i.expand(o,a),Bn=i,Bn}var Kn={},Wn,ma;function Kt(){if(ma)return Wn;ma=1;const e=En,t="\\\\/",r=`[^${t}]`,n="\\.",i="\\+",o="\\?",a="\\/",s="(?\
54
- =.)",u="[^/]",c=`(?:${a}|$)`,l=`(?:^|${a})`,m=`${n}{1,2}${c}`,y=`(?!${n})`,_=`(?!${l}${m})`,S=`(?!${n}{0,1}${c})`,g=`(?!${m})`,p=`[^.${a}]`,h=`${u}*?`,f={DOT_LITERAL:n,PLUS_LITERAL:i,QMARK_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:s,QMARK:u,END_ANCHOR:c,DOTS_SLASH:m,NO_DOT:y,NO_DOTS:_,NO_DOT_SLASH:S,NO_DOTS_SLASH:g,QMARK_NO_DOT:p,STAR:h,START_ANCHOR:l},d={...f,SLASH_LITERAL:`[${t}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${n}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${t}])${n}{1,2}(?:[${t}]|$))`,
46
+ `,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"}),zn}var Gn,pa;function Dd(){if(pa)return Gn;pa=1;const e=xn(),{MAX_LENGTH:t,CHAR_BACKSLASH:r,CHAR_BACKTICK:n,CHAR_COMMA:i,CHAR_DOT:a,CHAR_LEFT_PARENTHESES:o,CHAR_RIGHT_PARENTHESES:s,
47
+ CHAR_LEFT_CURLY_BRACE:u,CHAR_RIGHT_CURLY_BRACE:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_RIGHT_SQUARE_BRACKET:m,CHAR_DOUBLE_QUOTE:y,CHAR_SINGLE_QUOTE:_,CHAR_NO_BREAK_SPACE:S,CHAR_ZERO_WIDTH_NOBREAK_SPACE:g}=Ld();return Gn=(p,f={})=>{if(typeof p!="string")throw new TypeError("Expected a string");const d=f||{},v=typeof d.maxLength=="number"?Math.min(t,d.maxLength):t;if(p.length>v)throw new SyntaxError(`Input length (${p.length}), exceeds max characters (${v})`);const $={type:"root",input:p,nodes:[]},w=[$];
48
+ let b=$,P=$,I=0;const H=p.length;let x=0,U=0,L;const j=()=>p[x++],M=z=>{if(z.type==="text"&&P.type==="dot"&&(P.type="text"),P&&P.type==="text"&&z.type==="text"){P.value+=z.value;return}return b.nodes.push(z),z.parent=b,z.prev=P,P=z,z};for(M({type:"bos"});x<H;)if(b=w[w.length-1],L=j(),!(L===g||L===S)){if(L===r){M({type:"text",value:(f.keepEscaping?L:"")+j()});continue}if(L===m){M({type:"text",value:"\\"+L});continue}if(L===l){I++;let z;for(;x<H&&(z=j());){if(L+=z,z===l){I++;continue}if(z===r){L+=
49
+ j();continue}if(z===m&&(I--,I===0))break}M({type:"text",value:L});continue}if(L===o){b=M({type:"paren",nodes:[]}),w.push(b),M({type:"text",value:L});continue}if(L===s){if(b.type!=="paren"){M({type:"text",value:L});continue}b=w.pop(),M({type:"text",value:L}),b=w[w.length-1];continue}if(L===y||L===_||L===n){const z=L;let F;for(f.keepQuotes!==!0&&(L="");x<H&&(F=j());){if(F===r){L+=F+j();continue}if(F===z){f.keepQuotes===!0&&(L+=F);break}L+=F}M({type:"text",value:L});continue}if(L===u){U++;const F={
50
+ type:"brace",open:!0,close:!1,dollar:P.value&&P.value.slice(-1)==="$"||b.dollar===!0,depth:U,commas:0,ranges:0,nodes:[]};b=M(F),w.push(b),M({type:"open",value:L});continue}if(L===c){if(b.type!=="brace"){M({type:"text",value:L});continue}const z="close";b=w.pop(),b.close=!0,M({type:z,value:L}),U--,b=w[w.length-1];continue}if(L===i&&U>0){if(b.ranges>0){b.ranges=0;const z=b.nodes.shift();b.nodes=[z,{type:"text",value:e(b)}]}M({type:"comma",value:L}),b.commas++;continue}if(L===a&&U>0&&b.commas===0){
51
+ const z=b.nodes;if(U===0||z.length===0){M({type:"text",value:L});continue}if(P.type==="dot"){if(b.range=[],P.value+=L,P.type="range",b.nodes.length!==3&&b.nodes.length!==5){b.invalid=!0,b.ranges=0,P.type="text";continue}b.ranges++,b.args=[];continue}if(P.type==="range"){z.pop();const F=z[z.length-1];F.value+=P.value+L,P=F,b.ranges--;continue}M({type:"dot",value:L});continue}M({type:"text",value:L})}do if(b=w.pop(),b.type!=="root"){b.nodes.forEach(G=>{G.nodes||(G.type==="open"&&(G.isOpen=!0),G.type===
52
+ "close"&&(G.isClose=!0),G.nodes||(G.type="text"),G.invalid=!0)});const z=w[w.length-1],F=z.nodes.indexOf(b);z.nodes.splice(F,1,...b.nodes)}while(w.length>0);return M({type:"eos"}),$},Gn}var Bn,ha;function qd(){if(ha)return Bn;ha=1;const e=xn(),t=Id(),r=jd(),n=Dd(),i=(a,o={})=>{let s=[];if(Array.isArray(a))for(const u of a){const c=i.create(u,o);Array.isArray(c)?s.push(...c):s.push(c)}else s=[].concat(i.create(a,o));return o&&o.expand===!0&&o.nodupes===!0&&(s=[...new Set(s)]),s};return i.parse=(a,o={})=>n(
53
+ a,o),i.stringify=(a,o={})=>e(typeof a=="string"?i.parse(a,o):a,o),i.compile=(a,o={})=>(typeof a=="string"&&(a=i.parse(a,o)),t(a,o)),i.expand=(a,o={})=>{typeof a=="string"&&(a=i.parse(a,o));let s=r(a,o);return o.noempty===!0&&(s=s.filter(Boolean)),o.nodupes===!0&&(s=[...new Set(s)]),s},i.create=(a,o={})=>a===""||a.length<3?[a]:o.expand!==!0?i.compile(a,o):i.expand(a,o),Bn=i,Bn}var Kn={},Wn,ma;function Kt(){if(ma)return Wn;ma=1;const e=En,t="\\\\/",r=`[^${t}]`,n="\\.",i="\\+",a="\\?",o="\\/",s="(?\
54
+ =.)",u="[^/]",c=`(?:${o}|$)`,l=`(?:^|${o})`,m=`${n}{1,2}${c}`,y=`(?!${n})`,_=`(?!${l}${m})`,S=`(?!${n}{0,1}${c})`,g=`(?!${m})`,h=`[^.${o}]`,p=`${u}*?`,f={DOT_LITERAL:n,PLUS_LITERAL:i,QMARK_LITERAL:a,SLASH_LITERAL:o,ONE_CHAR:s,QMARK:u,END_ANCHOR:c,DOTS_SLASH:m,NO_DOT:y,NO_DOTS:_,NO_DOT_SLASH:S,NO_DOTS_SLASH:g,QMARK_NO_DOT:h,STAR:p,START_ANCHOR:l},d={...f,SLASH_LITERAL:`[${t}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${n}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${t}])${n}{1,2}(?:[${t}]|$))`,
55
55
  NO_DOT_SLASH:`(?!${n}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`},v={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 Wn={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:v,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,
56
56
  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,
57
57
  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,
58
58
  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:e.sep,extglobChars($){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${$.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars($){return $===!0?d:f}},Wn}var ya;function Wt(){return ya||(ya=1,(function(e){const t=En,r=process.
59
- platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_GLOBAL:a}=Kt();e.isObject=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),e.hasRegexChars=s=>o.test(s),e.isRegexChar=s=>s.length===1&&e.hasRegexChars(s),e.escapeRegex=s=>s.replace(a,"\\$1"),e.toPosixSlashes=s=>s.replace(n,"/"),e.removeBackslashes=s=>s.replace(i,u=>u==="\\"?"":u),e.supportsLookbehinds=()=>{const s=process.version.slice(1).split(".").map(Number);return s.length===3&&s[0]>=9||
59
+ platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:o}=Kt();e.isObject=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),e.hasRegexChars=s=>a.test(s),e.isRegexChar=s=>s.length===1&&e.hasRegexChars(s),e.escapeRegex=s=>s.replace(o,"\\$1"),e.toPosixSlashes=s=>s.replace(n,"/"),e.removeBackslashes=s=>s.replace(i,u=>u==="\\"?"":u),e.supportsLookbehinds=()=>{const s=process.version.slice(1).split(".").map(Number);return s.length===3&&s[0]>=9||
60
60
  s[0]===8&&s[1]>=10},e.isWindows=s=>s&&typeof s.windows=="boolean"?s.windows:r===!0||t.sep==="\\",e.escapeLast=(s,u,c)=>{const l=s.lastIndexOf(u,c);return l===-1?s:s[l-1]==="\\"?e.escapeLast(s,u,l-1):`${s.slice(0,l)}\\${s.slice(l)}`},e.removePrefix=(s,u={})=>{let c=s;return c.startsWith("./")&&(c=c.slice(2),u.prefix="./"),c},e.wrapOutput=(s,u={},c={})=>{const l=c.contains?"":"^",m=c.contains?"":"$";let y=`${l}(?:${s})${m}`;return u.negated===!0&&(y=`(?:^(?!${y}).*$)`),y}})(Kn)),Kn}var Xn,ga;function xd(){
61
- if(ga)return Xn;ga=1;const e=Wt(),{CHAR_ASTERISK:t,CHAR_AT:r,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:i,CHAR_DOT:o,CHAR_EXCLAMATION_MARK:a,CHAR_FORWARD_SLASH:s,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:m,CHAR_QUESTION_MARK:y,CHAR_RIGHT_CURLY_BRACE:_,CHAR_RIGHT_PARENTHESES:S,CHAR_RIGHT_SQUARE_BRACKET:g}=Kt(),p=d=>d===s||d===n,h=d=>{d.isPrefix!==!0&&(d.depth=d.isGlobstar?1/0:1)};return Xn=(d,v)=>{const $=v||{},w=d.length-1,E=$.parts===!0||$.scanToEnd===!0,P=[],O=[],
62
- U=[];let x=d,H=-1,D=0,I=0,M=!1,z=!1,F=!1,G=!1,Q=!1,q=!1,A=!1,L=!1,T=!1,R=!1,b=0,C,B,K={value:"",depth:0,isGlob:!1};const ee=()=>H>=w,re=()=>x.charCodeAt(H+1),k=()=>(C=B,x.charCodeAt(++H));for(;H<w;){B=k();let J;if(B===n){A=K.backslashes=!0,B=k(),B===u&&(q=!0);continue}if(q===!0||B===u){for(b++;ee()!==!0&&(B=k());){if(B===n){A=K.backslashes=!0,k();continue}if(B===u){b++;continue}if(q!==!0&&B===o&&(B=k())===o){if(M=K.isBrace=!0,F=K.isGlob=!0,R=!0,E===!0)continue;break}if(q!==!0&&B===i){if(M=K.isBrace=
63
- !0,F=K.isGlob=!0,R=!0,E===!0)continue;break}if(B===_&&(b--,b===0)){q=!1,M=K.isBrace=!0,R=!0;break}}if(E===!0)continue;break}if(B===s){if(P.push(H),O.push(K),K={value:"",depth:0,isGlob:!1},R===!0)continue;if(C===o&&H===D+1){D+=2;continue}I=H+1;continue}if($.noext!==!0&&(B===m||B===r||B===t||B===y||B===a)===!0&&re()===c){if(F=K.isGlob=!0,G=K.isExtglob=!0,R=!0,B===a&&H===D&&(T=!0),E===!0){for(;ee()!==!0&&(B=k());){if(B===n){A=K.backslashes=!0,B=k();continue}if(B===S){F=K.isGlob=!0,R=!0;break}}continue}
64
- break}if(B===t){if(C===t&&(Q=K.isGlobstar=!0),F=K.isGlob=!0,R=!0,E===!0)continue;break}if(B===y){if(F=K.isGlob=!0,R=!0,E===!0)continue;break}if(B===l){for(;ee()!==!0&&(J=k());){if(J===n){A=K.backslashes=!0,k();continue}if(J===g){z=K.isBracket=!0,F=K.isGlob=!0,R=!0;break}}if(E===!0)continue;break}if($.nonegate!==!0&&B===a&&H===D){L=K.negated=!0,D++;continue}if($.noparen!==!0&&B===c){if(F=K.isGlob=!0,E===!0){for(;ee()!==!0&&(B=k());){if(B===c){A=K.backslashes=!0,B=k();continue}if(B===S){R=!0;break}}
65
- continue}break}if(F===!0){if(R=!0,E===!0)continue;break}}$.noext===!0&&(G=!1,F=!1);let N=x,V="",X="";D>0&&(V=x.slice(0,D),x=x.slice(D),I-=D),N&&F===!0&&I>0?(N=x.slice(0,I),X=x.slice(I)):F===!0?(N="",X=x):N=x,N&&N!==""&&N!=="/"&&N!==x&&p(N.charCodeAt(N.length-1))&&(N=N.slice(0,-1)),$.unescape===!0&&(X&&(X=e.removeBackslashes(X)),N&&A===!0&&(N=e.removeBackslashes(N)));const Z={prefix:V,input:d,start:D,base:N,glob:X,isBrace:M,isBracket:z,isGlob:F,isExtglob:G,isGlobstar:Q,negated:L,negatedExtglob:T};
66
- if($.tokens===!0&&(Z.maxDepth=0,p(B)||O.push(K),Z.tokens=O),$.parts===!0||$.tokens===!0){let J;for(let ue=0;ue<P.length;ue++){const we=J?J+1:D,Y=P[ue],ne=d.slice(we,Y);$.tokens&&(ue===0&&D!==0?(O[ue].isPrefix=!0,O[ue].value=V):O[ue].value=ne,h(O[ue]),Z.maxDepth+=O[ue].depth),(ue!==0||ne!=="")&&U.push(ne),J=Y}if(J&&J+1<d.length){const ue=d.slice(J+1);U.push(ue),$.tokens&&(O[O.length-1].value=ue,h(O[O.length-1]),Z.maxDepth+=O[O.length-1].depth)}Z.slashes=P,Z.parts=U}return Z},Xn}var Jn,va;function Md(){
67
- if(va)return Jn;va=1;const e=Kt(),t=Wt(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:o,REPLACEMENTS:a}=e,s=(l,m)=>{if(typeof m.expandRange=="function")return m.expandRange(...l,m);l.sort();const y=`[${l.join("-")}]`;try{new RegExp(y)}catch{return l.map(S=>t.escapeRegex(S)).join("..")}return y},u=(l,m)=>`Missing ${l}: "${m}" - use "\\\\${m}" to match literal characters`,c=(l,m)=>{if(typeof l!="string")throw new TypeError("Expected a string");l=a[l]||l;
68
- const y={...m},_=typeof y.maxLength=="number"?Math.min(r,y.maxLength):r;let S=l.length;if(S>_)throw new SyntaxError(`Input length: ${S}, exceeds maximum allowed length: ${_}`);const g={type:"bos",value:"",output:y.prepend||""},p=[g],h=y.capture?"":"?:",f=t.isWindows(m),d=e.globChars(f),v=e.extglobChars(d),{DOT_LITERAL:$,PLUS_LITERAL:w,SLASH_LITERAL:E,ONE_CHAR:P,DOTS_SLASH:O,NO_DOT:U,NO_DOT_SLASH:x,NO_DOTS_SLASH:H,QMARK:D,QMARK_NO_DOT:I,STAR:M,START_ANCHOR:z}=d,F=Y=>`(${h}(?:(?!${z}${Y.dot?O:$}).\
69
- )*?)`,G=y.dot?"":U,Q=y.dot?D:I;let q=y.bash===!0?F(y):M;y.capture&&(q=`(${q})`),typeof y.noext=="boolean"&&(y.noextglob=y.noext);const A={input:l,index:-1,start:0,dot:y.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:p};l=t.removePrefix(l,A),S=l.length;const L=[],T=[],R=[];let b=g,C;const B=()=>A.index===S-1,K=A.peek=(Y=1)=>l[A.index+Y],ee=A.advance=()=>l[++A.index]||"",re=()=>l.slice(A.index+1),k=(Y="",ne=0)=>{A.consumed+=
70
- Y,A.index+=ne},N=Y=>{A.output+=Y.output!=null?Y.output:Y.value,k(Y.value)},V=()=>{let Y=1;for(;K()==="!"&&(K(2)!=="("||K(3)==="?");)ee(),A.start++,Y++;return Y%2===0?!1:(A.negated=!0,A.start++,!0)},X=Y=>{A[Y]++,R.push(Y)},Z=Y=>{A[Y]--,R.pop()},J=Y=>{if(b.type==="globstar"){const ne=A.braces>0&&(Y.type==="comma"||Y.type==="brace"),W=Y.extglob===!0||L.length&&(Y.type==="pipe"||Y.type==="paren");Y.type!=="slash"&&Y.type!=="paren"&&!ne&&!W&&(A.output=A.output.slice(0,-b.output.length),b.type="star",
71
- b.value="*",b.output=q,A.output+=b.output)}if(L.length&&Y.type!=="paren"&&(L[L.length-1].inner+=Y.value),(Y.value||Y.output)&&N(Y),b&&b.type==="text"&&Y.type==="text"){b.value+=Y.value,b.output=(b.output||"")+Y.value;return}Y.prev=b,p.push(Y),b=Y},ue=(Y,ne)=>{const W={...v[ne],conditions:1,inner:""};W.prev=b,W.parens=A.parens,W.output=A.output;const te=(y.capture?"(":"")+W.open;X("parens"),J({type:Y,value:ne,output:A.output?"":P}),J({type:"paren",extglob:!0,value:ee(),output:te}),L.push(W)},we=Y=>{
72
- let ne=Y.close+(y.capture?")":""),W;if(Y.type==="negate"){let te=q;if(Y.inner&&Y.inner.length>1&&Y.inner.includes("/")&&(te=F(y)),(te!==q||B()||/^\)+$/.test(re()))&&(ne=Y.close=`)$))${te}`),Y.inner.includes("*")&&(W=re())&&/^\.[^\\/.]+$/.test(W)){const le=c(W,{...m,fastpaths:!1}).output;ne=Y.close=`)${le})${te})`}Y.prev.type==="bos"&&(A.negatedExtglob=!0)}J({type:"paren",extglob:!0,value:C,output:ne}),Z("parens")};if(y.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(l)){let Y=!1,ne=l.replace(o,(W,te,le,ye,he,Me)=>ye===
73
- "\\"?(Y=!0,W):ye==="?"?te?te+ye+(he?D.repeat(he.length):""):Me===0?Q+(he?D.repeat(he.length):""):D.repeat(le.length):ye==="."?$.repeat(le.length):ye==="*"?te?te+ye+(he?q:""):q:te?W:`\\${W}`);return Y===!0&&(y.unescape===!0?ne=ne.replace(/\\/g,""):ne=ne.replace(/\\+/g,W=>W.length%2===0?"\\\\":W?"\\":"")),ne===l&&y.contains===!0?(A.output=l,A):(A.output=t.wrapOutput(ne,A,m),A)}for(;!B();){if(C=ee(),C==="\0")continue;if(C==="\\"){const W=K();if(W==="/"&&y.bash!==!0||W==="."||W===";")continue;if(!W){
74
- C+="\\",J({type:"text",value:C});continue}const te=/^\\+/.exec(re());let le=0;if(te&&te[0].length>2&&(le=te[0].length,A.index+=le,le%2!==0&&(C+="\\")),y.unescape===!0?C=ee():C+=ee(),A.brackets===0){J({type:"text",value:C});continue}}if(A.brackets>0&&(C!=="]"||b.value==="["||b.value==="[^")){if(y.posix!==!1&&C===":"){const W=b.value.slice(1);if(W.includes("[")&&(b.posix=!0,W.includes(":"))){const te=b.value.lastIndexOf("["),le=b.value.slice(0,te),ye=b.value.slice(te+2),he=n[ye];if(he){b.value=le+
75
- he,A.backtrack=!0,ee(),!g.output&&p.indexOf(b)===1&&(g.output=P);continue}}}(C==="["&&K()!==":"||C==="-"&&K()==="]")&&(C=`\\${C}`),C==="]"&&(b.value==="["||b.value==="[^")&&(C=`\\${C}`),y.posix===!0&&C==="!"&&b.value==="["&&(C="^"),b.value+=C,N({value:C});continue}if(A.quotes===1&&C!=='"'){C=t.escapeRegex(C),b.value+=C,N({value:C});continue}if(C==='"'){A.quotes=A.quotes===1?0:1,y.keepQuotes===!0&&J({type:"text",value:C});continue}if(C==="("){X("parens"),J({type:"paren",value:C});continue}if(C===
76
- ")"){if(A.parens===0&&y.strictBrackets===!0)throw new SyntaxError(u("opening","("));const W=L[L.length-1];if(W&&A.parens===W.parens+1){we(L.pop());continue}J({type:"paren",value:C,output:A.parens?")":"\\)"}),Z("parens");continue}if(C==="["){if(y.nobracket===!0||!re().includes("]")){if(y.nobracket!==!0&&y.strictBrackets===!0)throw new SyntaxError(u("closing","]"));C=`\\${C}`}else X("brackets");J({type:"bracket",value:C});continue}if(C==="]"){if(y.nobracket===!0||b&&b.type==="bracket"&&b.value.length===
77
- 1){J({type:"text",value:C,output:`\\${C}`});continue}if(A.brackets===0){if(y.strictBrackets===!0)throw new SyntaxError(u("opening","["));J({type:"text",value:C,output:`\\${C}`});continue}Z("brackets");const W=b.value.slice(1);if(b.posix!==!0&&W[0]==="^"&&!W.includes("/")&&(C=`/${C}`),b.value+=C,N({value:C}),y.literalBrackets===!1||t.hasRegexChars(W))continue;const te=t.escapeRegex(b.value);if(A.output=A.output.slice(0,-b.value.length),y.literalBrackets===!0){A.output+=te,b.value=te;continue}b.value=
78
- `(${h}${te}|${b.value})`,A.output+=b.value;continue}if(C==="{"&&y.nobrace!==!0){X("braces");const W={type:"brace",value:C,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};T.push(W),J(W);continue}if(C==="}"){const W=T[T.length-1];if(y.nobrace===!0||!W){J({type:"text",value:C,output:C});continue}let te=")";if(W.dots===!0){const le=p.slice(),ye=[];for(let he=le.length-1;he>=0&&(p.pop(),le[he].type!=="brace");he--)le[he].type!=="dots"&&ye.unshift(le[he].value);te=s(ye,y),A.backtrack=
79
- !0}if(W.comma!==!0&&W.dots!==!0){const le=A.output.slice(0,W.outputIndex),ye=A.tokens.slice(W.tokensIndex);W.value=W.output="\\{",C=te="\\}",A.output=le;for(const he of ye)A.output+=he.output||he.value}J({type:"brace",value:C,output:te}),Z("braces"),T.pop();continue}if(C==="|"){L.length>0&&L[L.length-1].conditions++,J({type:"text",value:C});continue}if(C===","){let W=C;const te=T[T.length-1];te&&R[R.length-1]==="braces"&&(te.comma=!0,W="|"),J({type:"comma",value:C,output:W});continue}if(C==="/"){
80
- if(b.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",p.pop(),b=g;continue}J({type:"slash",value:C,output:E});continue}if(C==="."){if(A.braces>0&&b.type==="dot"){b.value==="."&&(b.output=$);const W=T[T.length-1];b.type="dots",b.output+=C,b.value+=C,W.dots=!0;continue}if(A.braces+A.parens===0&&b.type!=="bos"&&b.type!=="slash"){J({type:"text",value:C,output:$});continue}J({type:"dot",value:C,output:$});continue}if(C==="?"){if(!(b&&b.value==="(")&&y.noextglob!==!0&&K()===
81
- "("&&K(2)!=="?"){ue("qmark",C);continue}if(b&&b.type==="paren"){const te=K();let le=C;if(te==="<"&&!t.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(b.value==="("&&!/[!=<:]/.test(te)||te==="<"&&!/<([!=]|\w+>)/.test(re()))&&(le=`\\${C}`),J({type:"text",value:C,output:le});continue}if(y.dot!==!0&&(b.type==="slash"||b.type==="bos")){J({type:"qmark",value:C,output:I});continue}J({type:"qmark",value:C,output:D});continue}if(C==="!"){if(y.noextglob!==
82
- !0&&K()==="("&&(K(2)!=="?"||!/[!=<:]/.test(K(3)))){ue("negate",C);continue}if(y.nonegate!==!0&&A.index===0){V();continue}}if(C==="+"){if(y.noextglob!==!0&&K()==="("&&K(2)!=="?"){ue("plus",C);continue}if(b&&b.value==="("||y.regex===!1){J({type:"plus",value:C,output:w});continue}if(b&&(b.type==="bracket"||b.type==="paren"||b.type==="brace")||A.parens>0){J({type:"plus",value:C});continue}J({type:"plus",value:w});continue}if(C==="@"){if(y.noextglob!==!0&&K()==="("&&K(2)!=="?"){J({type:"at",extglob:!0,
83
- value:C,output:""});continue}J({type:"text",value:C});continue}if(C!=="*"){(C==="$"||C==="^")&&(C=`\\${C}`);const W=i.exec(re());W&&(C+=W[0],A.index+=W[0].length),J({type:"text",value:C});continue}if(b&&(b.type==="globstar"||b.star===!0)){b.type="star",b.star=!0,b.value+=C,b.output=q,A.backtrack=!0,A.globstar=!0,k(C);continue}let Y=re();if(y.noextglob!==!0&&/^\([^?]/.test(Y)){ue("star",C);continue}if(b.type==="star"){if(y.noglobstar===!0){k(C);continue}const W=b.prev,te=W.prev,le=W.type==="slash"||
84
- W.type==="bos",ye=te&&(te.type==="star"||te.type==="globstar");if(y.bash===!0&&(!le||Y[0]&&Y[0]!=="/")){J({type:"star",value:C,output:""});continue}const he=A.braces>0&&(W.type==="comma"||W.type==="brace"),Me=L.length&&(W.type==="pipe"||W.type==="paren");if(!le&&W.type!=="paren"&&!he&&!Me){J({type:"star",value:C,output:""});continue}for(;Y.slice(0,3)==="/**";){const Ke=l[A.index+4];if(Ke&&Ke!=="/")break;Y=Y.slice(3),k("/**",3)}if(W.type==="bos"&&B()){b.type="globstar",b.value+=C,b.output=F(y),A.
85
- output=b.output,A.globstar=!0,k(C);continue}if(W.type==="slash"&&W.prev.type!=="bos"&&!ye&&B()){A.output=A.output.slice(0,-(W.output+b.output).length),W.output=`(?:${W.output}`,b.type="globstar",b.output=F(y)+(y.strictSlashes?")":"|$)"),b.value+=C,A.globstar=!0,A.output+=W.output+b.output,k(C);continue}if(W.type==="slash"&&W.prev.type!=="bos"&&Y[0]==="/"){const Ke=Y[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(W.output+b.output).length),W.output=`(?:${W.output}`,b.type="globstar",b.output=`${F(
86
- y)}${E}|${E}${Ke})`,b.value+=C,A.output+=W.output+b.output,A.globstar=!0,k(C+ee()),J({type:"slash",value:"/",output:""});continue}if(W.type==="bos"&&Y[0]==="/"){b.type="globstar",b.value+=C,b.output=`(?:^|${E}|${F(y)}${E})`,A.output=b.output,A.globstar=!0,k(C+ee()),J({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-b.output.length),b.type="globstar",b.output=F(y),b.value+=C,A.output+=b.output,A.globstar=!0,k(C);continue}const ne={type:"star",value:C,output:q};if(y.bash===!0){
87
- ne.output=".*?",(b.type==="bos"||b.type==="slash")&&(ne.output=G+ne.output),J(ne);continue}if(b&&(b.type==="bracket"||b.type==="paren")&&y.regex===!0){ne.output=C,J(ne);continue}(A.index===A.start||b.type==="slash"||b.type==="dot")&&(b.type==="dot"?(A.output+=x,b.output+=x):y.dot===!0?(A.output+=H,b.output+=H):(A.output+=G,b.output+=G),K()!=="*"&&(A.output+=P,b.output+=P)),J(ne)}for(;A.brackets>0;){if(y.strictBrackets===!0)throw new SyntaxError(u("closing","]"));A.output=t.escapeLast(A.output,"["),
88
- Z("brackets")}for(;A.parens>0;){if(y.strictBrackets===!0)throw new SyntaxError(u("closing",")"));A.output=t.escapeLast(A.output,"("),Z("parens")}for(;A.braces>0;){if(y.strictBrackets===!0)throw new SyntaxError(u("closing","}"));A.output=t.escapeLast(A.output,"{"),Z("braces")}if(y.strictSlashes!==!0&&(b.type==="star"||b.type==="bracket")&&J({type:"maybe_slash",value:"",output:`${E}?`}),A.backtrack===!0){A.output="";for(const Y of A.tokens)A.output+=Y.output!=null?Y.output:Y.value,Y.suffix&&(A.output+=
89
- Y.suffix)}return A};return c.fastpaths=(l,m)=>{const y={...m},_=typeof y.maxLength=="number"?Math.min(r,y.maxLength):r,S=l.length;if(S>_)throw new SyntaxError(`Input length: ${S}, exceeds maximum allowed length: ${_}`);l=a[l]||l;const g=t.isWindows(m),{DOT_LITERAL:p,SLASH_LITERAL:h,ONE_CHAR:f,DOTS_SLASH:d,NO_DOT:v,NO_DOTS:$,NO_DOTS_SLASH:w,STAR:E,START_ANCHOR:P}=e.globChars(g),O=y.dot?$:v,U=y.dot?w:v,x=y.capture?"":"?:",H={negated:!1,prefix:""};let D=y.bash===!0?".*?":E;y.capture&&(D=`(${D})`);const I=G=>G.
90
- noglobstar===!0?D:`(${x}(?:(?!${P}${G.dot?d:p}).)*?)`,M=G=>{switch(G){case"*":return`${O}${f}${D}`;case".*":return`${p}${f}${D}`;case"*.*":return`${O}${D}${p}${f}${D}`;case"*/*":return`${O}${D}${h}${f}${U}${D}`;case"**":return O+I(y);case"**/*":return`(?:${O}${I(y)}${h})?${U}${f}${D}`;case"**/*.*":return`(?:${O}${I(y)}${h})?${U}${D}${p}${f}${D}`;case"**/.*":return`(?:${O}${I(y)}${h})?${p}${f}${D}`;default:{const Q=/^(.*?)\.(\w+)$/.exec(G);if(!Q)return;const q=M(Q[1]);return q?q+p+Q[2]:void 0}}},
91
- z=t.removePrefix(l,H);let F=M(z);return F&&y.strictSlashes!==!0&&(F+=`${h}?`),F},Jn=c,Jn}var Yn,$a;function Hd(){if($a)return Yn;$a=1;const e=En,t=xd(),r=Md(),n=Wt(),i=Kt(),o=s=>s&&typeof s=="object"&&!Array.isArray(s),a=(s,u,c=!1)=>{if(Array.isArray(s)){const h=s.map(d=>a(d,u,c));return d=>{for(const v of h){const $=v(d);if($)return $}return!1}}const l=o(s)&&s.tokens&&s.input;if(s===""||typeof s!="string"&&!l)throw new TypeError("Expected pattern to be a non-empty string");const m=u||{},y=n.isWindows(
92
- u),_=l?a.compileRe(s,u):a.makeRe(s,u,!1,!0),S=_.state;delete _.state;let g=()=>!1;if(m.ignore){const h={...u,ignore:null,onMatch:null,onResult:null};g=a(m.ignore,h,c)}const p=(h,f=!1)=>{const{isMatch:d,match:v,output:$}=a.test(h,_,u,{glob:s,posix:y}),w={glob:s,state:S,regex:_,posix:y,input:h,output:$,match:v,isMatch:d};return typeof m.onResult=="function"&&m.onResult(w),d===!1?(w.isMatch=!1,f?w:!1):g(h)?(typeof m.onIgnore=="function"&&m.onIgnore(w),w.isMatch=!1,f?w:!1):(typeof m.onMatch=="functi\
93
- on"&&m.onMatch(w),f?w:!0)};return c&&(p.state=S),p};return a.test=(s,u,c,{glob:l,posix:m}={})=>{if(typeof s!="string")throw new TypeError("Expected input to be a string");if(s==="")return{isMatch:!1,output:""};const y=c||{},_=y.format||(m?n.toPosixSlashes:null);let S=s===l,g=S&&_?_(s):s;return S===!1&&(g=_?_(s):s,S=g===l),(S===!1||y.capture===!0)&&(y.matchBase===!0||y.basename===!0?S=a.matchBase(s,u,c,m):S=u.exec(g)),{isMatch:!!S,match:S,output:g}},a.matchBase=(s,u,c,l=n.isWindows(c))=>(u instanceof
94
- RegExp?u:a.makeRe(u,c)).test(e.basename(s)),a.isMatch=(s,u,c)=>a(u,c)(s),a.parse=(s,u)=>Array.isArray(s)?s.map(c=>a.parse(c,u)):r(s,{...u,fastpaths:!1}),a.scan=(s,u)=>t(s,u),a.compileRe=(s,u,c=!1,l=!1)=>{if(c===!0)return s.output;const m=u||{},y=m.contains?"":"^",_=m.contains?"":"$";let S=`${y}(?:${s.output})${_}`;s&&s.negated===!0&&(S=`^(?!${S}).*$`);const g=a.toRegex(S,u);return l===!0&&(g.state=s),g},a.makeRe=(s,u={},c=!1,l=!1)=>{if(!s||typeof s!="string")throw new TypeError("Expected a non-e\
95
- mpty string");let m={negated:!1,fastpaths:!0};return u.fastpaths!==!1&&(s[0]==="."||s[0]==="*")&&(m.output=r.fastpaths(s,u)),m.output||(m=r(s,u)),a.compileRe(m,u,c,l)},a.toRegex=(s,u)=>{try{const c=u||{};return new RegExp(s,c.flags||(c.nocase?"i":""))}catch(c){if(u&&u.debug===!0)throw c;return/$^/}},a.constants=i,Yn=a,Yn}var Qn,_a;function Ud(){return _a||(_a=1,Qn=Hd()),Qn}var Zn,wa;function Fd(){if(wa)return Zn;wa=1;const e=Ko,t=qd(),r=Ud(),n=Wt(),i=s=>s===""||s==="./",o=s=>{const u=s.indexOf("\
96
- {");return u>-1&&s.indexOf("}",u)>-1},a=(s,u,c)=>{u=[].concat(u),s=[].concat(s);let l=new Set,m=new Set,y=new Set,_=0,S=h=>{y.add(h.output),c&&c.onResult&&c.onResult(h)};for(let h=0;h<u.length;h++){let f=r(String(u[h]),{...c,onResult:S},!0),d=f.state.negated||f.state.negatedExtglob;d&&_++;for(let v of s){let $=f(v,!0);(d?!$.isMatch:$.isMatch)&&(d?l.add($.output):(l.delete($.output),m.add($.output)))}}let p=(_===u.length?[...y]:[...m]).filter(h=>!l.has(h));if(c&&p.length===0){if(c.failglob===!0)throw new Error(
97
- `No matches found for "${u.join(", ")}"`);if(c.nonull===!0||c.nullglob===!0)return c.unescape?u.map(h=>h.replace(/\\/g,"")):u}return p};return a.match=a,a.matcher=(s,u)=>r(s,u),a.isMatch=(s,u,c)=>r(u,c)(s),a.any=a.isMatch,a.not=(s,u,c={})=>{u=[].concat(u).map(String);let l=new Set,m=[],y=S=>{c.onResult&&c.onResult(S),m.push(S.output)},_=new Set(a(s,u,{...c,onResult:y}));for(let S of m)_.has(S)||l.add(S);return[...l]},a.contains=(s,u,c)=>{if(typeof s!="string")throw new TypeError(`Expected a stri\
98
- ng: "${e.inspect(s)}"`);if(Array.isArray(u))return u.some(l=>a.contains(s,l,c));if(typeof u=="string"){if(i(s)||i(u))return!1;if(s.includes(u)||s.startsWith("./")&&s.slice(2).includes(u))return!0}return a.isMatch(s,u,{...c,contains:!0})},a.matchKeys=(s,u,c)=>{if(!n.isObject(s))throw new TypeError("Expected the first argument to be an object");let l=a(Object.keys(s),u,c),m={};for(let y of l)m[y]=s[y];return m},a.some=(s,u,c)=>{let l=[].concat(s);for(let m of[].concat(u)){let y=r(String(m),c);if(l.
99
- some(_=>y(_)))return!0}return!1},a.every=(s,u,c)=>{let l=[].concat(s);for(let m of[].concat(u)){let y=r(String(m),c);if(!l.every(_=>y(_)))return!1}return!0},a.all=(s,u,c)=>{if(typeof s!="string")throw new TypeError(`Expected a string: "${e.inspect(s)}"`);return[].concat(u).every(l=>r(l,c)(s))},a.capture=(s,u,c)=>{let l=n.isWindows(c),y=r.makeRe(String(s),{...c,capture:!0}).exec(l?n.toPosixSlashes(u):u);if(y)return y.slice(1).map(_=>_===void 0?"":_)},a.makeRe=(...s)=>r.makeRe(...s),a.scan=(...s)=>r.
100
- scan(...s),a.parse=(s,u)=>{let c=[];for(let l of[].concat(s||[]))for(let m of t(String(l),u))c.push(r.parse(m,u));return c},a.braces=(s,u)=>{if(typeof s!="string")throw new TypeError("Expected a string");return u&&u.nobrace===!0||!o(s)?[s]:t(s,u)},a.braceExpand=(s,u)=>{if(typeof s!="string")throw new TypeError("Expected a string");return a.braces(s,{...u,expand:!0})},a.hasBraces=o,Zn=a,Zn}var Vd=Fd();const ba=mn(Vd),zd={useRecommendedBuildConfig:!0,removeViteModuleLoader:!1,deleteInlinedFiles:!0};
101
- function Gd(e,t,r,n=!1){const i=t.replaceAll(".","\\."),o=new RegExp(`<script([^>]*?) src="(?:[^"]*?/)?${i}"([^>]*)></script>`),a=/"?__VITE_PRELOAD__"?/g,s=r.replace(a,"void 0").replace(/<(\/script>|!--)/g,"\\x3C$1"),u=e.replace(o,(c,l,m)=>`<script${l}${m}>${s.trim()}</script>`);return n?Yd(u):u}function Bd(e,t,r){const n=t.replaceAll(".","\\."),i=new RegExp(`<link([^>]*?) href="(?:[^"]*?/)?${n}"([^>]*)>`),o=r.replace('@charset "UTF-8";',"");return e.replace(i,(s,u,c)=>`<style${u}${c}>${o.trim()}\
102
- </style>`)}const Kd=/\.[mc]?js$/,Wd=/\.css$/,Xd=/\.html?$/;function Jd({useRecommendedBuildConfig:e=!0,removeViteModuleLoader:t=!1,inlinePattern:r=[],deleteInlinedFiles:n=!0}=zd){return{name:"vite:singlefile",config:e?Qd:void 0,enforce:"post",generateBundle(i,o){const a=c=>this.info(`NOTE: asset not inlined: ${c}`);this.info(`
103
- `);const s={html:[],css:[],js:[],other:[]};for(const c of Object.keys(o))Xd.test(c)?s.html.push(c):Wd.test(c)?s.css.push(c):Kd.test(c)?s.js.push(c):s.other.push(c);const u=[];for(const c of s.html){const l=o[c];let m=l.source;for(const y of s.js){if(r.length&&!ba.isMatch(y,r)){a(y);continue}const _=o[y];_.code!=null&&(this.info(`Inlining: ${y}`),u.push(y),m=Gd(m,_.fileName,_.code,t))}for(const y of s.css){if(r.length&&!ba.isMatch(y,r)){a(y);continue}const _=o[y];this.info(`Inlining: ${y}`),u.push(
104
- y),m=Bd(m,_.fileName,_.source)}l.source=m}if(n)for(const c of u)delete o[c];for(const c of s.other)a(c)}}}const Yd=e=>e.replace(/(<script type="module" crossorigin>\s*)\(function(?: polyfill)?\(\)\s*\{[\s\S]*?\}\)\(\);/,'<script type="module">'),Qd=e=>{e.build||(e.build={}),e.build.assetsInlineLimit=()=>!0,e.build.chunkSizeWarningLimit=1e8,e.build.cssCodeSplit=!1,e.base="./",e.build.assetsDir="",e.build.rollupOptions||(e.build.rollupOptions={}),e.build.rollupOptions.output||(e.build.rollupOptions.
61
+ if(ga)return Xn;ga=1;const e=Wt(),{CHAR_ASTERISK:t,CHAR_AT:r,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:i,CHAR_DOT:a,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:s,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:m,CHAR_QUESTION_MARK:y,CHAR_RIGHT_CURLY_BRACE:_,CHAR_RIGHT_PARENTHESES:S,CHAR_RIGHT_SQUARE_BRACKET:g}=Kt(),h=d=>d===s||d===n,p=d=>{d.isPrefix!==!0&&(d.depth=d.isGlobstar?1/0:1)};return Xn=(d,v)=>{const $=v||{},w=d.length-1,b=$.parts===!0||$.scanToEnd===!0,P=[],I=[],
62
+ H=[];let x=d,U=-1,L=0,j=0,M=!1,z=!1,F=!1,G=!1,Q=!1,q=!1,A=!1,D=!1,T=!1,R=!1,E=0,C,B,K={value:"",depth:0,isGlob:!1};const ee=()=>U>=w,re=()=>x.charCodeAt(U+1),k=()=>(C=B,x.charCodeAt(++U));for(;U<w;){B=k();let J;if(B===n){A=K.backslashes=!0,B=k(),B===u&&(q=!0);continue}if(q===!0||B===u){for(E++;ee()!==!0&&(B=k());){if(B===n){A=K.backslashes=!0,k();continue}if(B===u){E++;continue}if(q!==!0&&B===a&&(B=k())===a){if(M=K.isBrace=!0,F=K.isGlob=!0,R=!0,b===!0)continue;break}if(q!==!0&&B===i){if(M=K.isBrace=
63
+ !0,F=K.isGlob=!0,R=!0,b===!0)continue;break}if(B===_&&(E--,E===0)){q=!1,M=K.isBrace=!0,R=!0;break}}if(b===!0)continue;break}if(B===s){if(P.push(U),I.push(K),K={value:"",depth:0,isGlob:!1},R===!0)continue;if(C===a&&U===L+1){L+=2;continue}j=U+1;continue}if($.noext!==!0&&(B===m||B===r||B===t||B===y||B===o)===!0&&re()===c){if(F=K.isGlob=!0,G=K.isExtglob=!0,R=!0,B===o&&U===L&&(T=!0),b===!0){for(;ee()!==!0&&(B=k());){if(B===n){A=K.backslashes=!0,B=k();continue}if(B===S){F=K.isGlob=!0,R=!0;break}}continue}
64
+ break}if(B===t){if(C===t&&(Q=K.isGlobstar=!0),F=K.isGlob=!0,R=!0,b===!0)continue;break}if(B===y){if(F=K.isGlob=!0,R=!0,b===!0)continue;break}if(B===l){for(;ee()!==!0&&(J=k());){if(J===n){A=K.backslashes=!0,k();continue}if(J===g){z=K.isBracket=!0,F=K.isGlob=!0,R=!0;break}}if(b===!0)continue;break}if($.nonegate!==!0&&B===o&&U===L){D=K.negated=!0,L++;continue}if($.noparen!==!0&&B===c){if(F=K.isGlob=!0,b===!0){for(;ee()!==!0&&(B=k());){if(B===c){A=K.backslashes=!0,B=k();continue}if(B===S){R=!0;break}}
65
+ continue}break}if(F===!0){if(R=!0,b===!0)continue;break}}$.noext===!0&&(G=!1,F=!1);let O=x,V="",X="";L>0&&(V=x.slice(0,L),x=x.slice(L),j-=L),O&&F===!0&&j>0?(O=x.slice(0,j),X=x.slice(j)):F===!0?(O="",X=x):O=x,O&&O!==""&&O!=="/"&&O!==x&&h(O.charCodeAt(O.length-1))&&(O=O.slice(0,-1)),$.unescape===!0&&(X&&(X=e.removeBackslashes(X)),O&&A===!0&&(O=e.removeBackslashes(O)));const Z={prefix:V,input:d,start:L,base:O,glob:X,isBrace:M,isBracket:z,isGlob:F,isExtglob:G,isGlobstar:Q,negated:D,negatedExtglob:T};
66
+ if($.tokens===!0&&(Z.maxDepth=0,h(B)||I.push(K),Z.tokens=I),$.parts===!0||$.tokens===!0){let J;for(let ue=0;ue<P.length;ue++){const we=J?J+1:L,Y=P[ue],ne=d.slice(we,Y);$.tokens&&(ue===0&&L!==0?(I[ue].isPrefix=!0,I[ue].value=V):I[ue].value=ne,p(I[ue]),Z.maxDepth+=I[ue].depth),(ue!==0||ne!=="")&&H.push(ne),J=Y}if(J&&J+1<d.length){const ue=d.slice(J+1);H.push(ue),$.tokens&&(I[I.length-1].value=ue,p(I[I.length-1]),Z.maxDepth+=I[I.length-1].depth)}Z.slashes=P,Z.parts=H}return Z},Xn}var Jn,va;function Md(){
67
+ if(va)return Jn;va=1;const e=Kt(),t=Wt(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:a,REPLACEMENTS:o}=e,s=(l,m)=>{if(typeof m.expandRange=="function")return m.expandRange(...l,m);l.sort();const y=`[${l.join("-")}]`;try{new RegExp(y)}catch{return l.map(S=>t.escapeRegex(S)).join("..")}return y},u=(l,m)=>`Missing ${l}: "${m}" - use "\\\\${m}" to match literal characters`,c=(l,m)=>{if(typeof l!="string")throw new TypeError("Expected a string");l=o[l]||l;
68
+ const y={...m},_=typeof y.maxLength=="number"?Math.min(r,y.maxLength):r;let S=l.length;if(S>_)throw new SyntaxError(`Input length: ${S}, exceeds maximum allowed length: ${_}`);const g={type:"bos",value:"",output:y.prepend||""},h=[g],p=y.capture?"":"?:",f=t.isWindows(m),d=e.globChars(f),v=e.extglobChars(d),{DOT_LITERAL:$,PLUS_LITERAL:w,SLASH_LITERAL:b,ONE_CHAR:P,DOTS_SLASH:I,NO_DOT:H,NO_DOT_SLASH:x,NO_DOTS_SLASH:U,QMARK:L,QMARK_NO_DOT:j,STAR:M,START_ANCHOR:z}=d,F=Y=>`(${p}(?:(?!${z}${Y.dot?I:$}).\
69
+ )*?)`,G=y.dot?"":H,Q=y.dot?L:j;let q=y.bash===!0?F(y):M;y.capture&&(q=`(${q})`),typeof y.noext=="boolean"&&(y.noextglob=y.noext);const A={input:l,index:-1,start:0,dot:y.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:h};l=t.removePrefix(l,A),S=l.length;const D=[],T=[],R=[];let E=g,C;const B=()=>A.index===S-1,K=A.peek=(Y=1)=>l[A.index+Y],ee=A.advance=()=>l[++A.index]||"",re=()=>l.slice(A.index+1),k=(Y="",ne=0)=>{A.consumed+=
70
+ Y,A.index+=ne},O=Y=>{A.output+=Y.output!=null?Y.output:Y.value,k(Y.value)},V=()=>{let Y=1;for(;K()==="!"&&(K(2)!=="("||K(3)==="?");)ee(),A.start++,Y++;return Y%2===0?!1:(A.negated=!0,A.start++,!0)},X=Y=>{A[Y]++,R.push(Y)},Z=Y=>{A[Y]--,R.pop()},J=Y=>{if(E.type==="globstar"){const ne=A.braces>0&&(Y.type==="comma"||Y.type==="brace"),W=Y.extglob===!0||D.length&&(Y.type==="pipe"||Y.type==="paren");Y.type!=="slash"&&Y.type!=="paren"&&!ne&&!W&&(A.output=A.output.slice(0,-E.output.length),E.type="star",
71
+ E.value="*",E.output=q,A.output+=E.output)}if(D.length&&Y.type!=="paren"&&(D[D.length-1].inner+=Y.value),(Y.value||Y.output)&&O(Y),E&&E.type==="text"&&Y.type==="text"){E.value+=Y.value,E.output=(E.output||"")+Y.value;return}Y.prev=E,h.push(Y),E=Y},ue=(Y,ne)=>{const W={...v[ne],conditions:1,inner:""};W.prev=E,W.parens=A.parens,W.output=A.output;const te=(y.capture?"(":"")+W.open;X("parens"),J({type:Y,value:ne,output:A.output?"":P}),J({type:"paren",extglob:!0,value:ee(),output:te}),D.push(W)},we=Y=>{
72
+ let ne=Y.close+(y.capture?")":""),W;if(Y.type==="negate"){let te=q;if(Y.inner&&Y.inner.length>1&&Y.inner.includes("/")&&(te=F(y)),(te!==q||B()||/^\)+$/.test(re()))&&(ne=Y.close=`)$))${te}`),Y.inner.includes("*")&&(W=re())&&/^\.[^\\/.]+$/.test(W)){const le=c(W,{...m,fastpaths:!1}).output;ne=Y.close=`)${le})${te})`}Y.prev.type==="bos"&&(A.negatedExtglob=!0)}J({type:"paren",extglob:!0,value:C,output:ne}),Z("parens")};if(y.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(l)){let Y=!1,ne=l.replace(a,(W,te,le,ye,he,Me)=>ye===
73
+ "\\"?(Y=!0,W):ye==="?"?te?te+ye+(he?L.repeat(he.length):""):Me===0?Q+(he?L.repeat(he.length):""):L.repeat(le.length):ye==="."?$.repeat(le.length):ye==="*"?te?te+ye+(he?q:""):q:te?W:`\\${W}`);return Y===!0&&(y.unescape===!0?ne=ne.replace(/\\/g,""):ne=ne.replace(/\\+/g,W=>W.length%2===0?"\\\\":W?"\\":"")),ne===l&&y.contains===!0?(A.output=l,A):(A.output=t.wrapOutput(ne,A,m),A)}for(;!B();){if(C=ee(),C==="\0")continue;if(C==="\\"){const W=K();if(W==="/"&&y.bash!==!0||W==="."||W===";")continue;if(!W){
74
+ C+="\\",J({type:"text",value:C});continue}const te=/^\\+/.exec(re());let le=0;if(te&&te[0].length>2&&(le=te[0].length,A.index+=le,le%2!==0&&(C+="\\")),y.unescape===!0?C=ee():C+=ee(),A.brackets===0){J({type:"text",value:C});continue}}if(A.brackets>0&&(C!=="]"||E.value==="["||E.value==="[^")){if(y.posix!==!1&&C===":"){const W=E.value.slice(1);if(W.includes("[")&&(E.posix=!0,W.includes(":"))){const te=E.value.lastIndexOf("["),le=E.value.slice(0,te),ye=E.value.slice(te+2),he=n[ye];if(he){E.value=le+
75
+ he,A.backtrack=!0,ee(),!g.output&&h.indexOf(E)===1&&(g.output=P);continue}}}(C==="["&&K()!==":"||C==="-"&&K()==="]")&&(C=`\\${C}`),C==="]"&&(E.value==="["||E.value==="[^")&&(C=`\\${C}`),y.posix===!0&&C==="!"&&E.value==="["&&(C="^"),E.value+=C,O({value:C});continue}if(A.quotes===1&&C!=='"'){C=t.escapeRegex(C),E.value+=C,O({value:C});continue}if(C==='"'){A.quotes=A.quotes===1?0:1,y.keepQuotes===!0&&J({type:"text",value:C});continue}if(C==="("){X("parens"),J({type:"paren",value:C});continue}if(C===
76
+ ")"){if(A.parens===0&&y.strictBrackets===!0)throw new SyntaxError(u("opening","("));const W=D[D.length-1];if(W&&A.parens===W.parens+1){we(D.pop());continue}J({type:"paren",value:C,output:A.parens?")":"\\)"}),Z("parens");continue}if(C==="["){if(y.nobracket===!0||!re().includes("]")){if(y.nobracket!==!0&&y.strictBrackets===!0)throw new SyntaxError(u("closing","]"));C=`\\${C}`}else X("brackets");J({type:"bracket",value:C});continue}if(C==="]"){if(y.nobracket===!0||E&&E.type==="bracket"&&E.value.length===
77
+ 1){J({type:"text",value:C,output:`\\${C}`});continue}if(A.brackets===0){if(y.strictBrackets===!0)throw new SyntaxError(u("opening","["));J({type:"text",value:C,output:`\\${C}`});continue}Z("brackets");const W=E.value.slice(1);if(E.posix!==!0&&W[0]==="^"&&!W.includes("/")&&(C=`/${C}`),E.value+=C,O({value:C}),y.literalBrackets===!1||t.hasRegexChars(W))continue;const te=t.escapeRegex(E.value);if(A.output=A.output.slice(0,-E.value.length),y.literalBrackets===!0){A.output+=te,E.value=te;continue}E.value=
78
+ `(${p}${te}|${E.value})`,A.output+=E.value;continue}if(C==="{"&&y.nobrace!==!0){X("braces");const W={type:"brace",value:C,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};T.push(W),J(W);continue}if(C==="}"){const W=T[T.length-1];if(y.nobrace===!0||!W){J({type:"text",value:C,output:C});continue}let te=")";if(W.dots===!0){const le=h.slice(),ye=[];for(let he=le.length-1;he>=0&&(h.pop(),le[he].type!=="brace");he--)le[he].type!=="dots"&&ye.unshift(le[he].value);te=s(ye,y),A.backtrack=
79
+ !0}if(W.comma!==!0&&W.dots!==!0){const le=A.output.slice(0,W.outputIndex),ye=A.tokens.slice(W.tokensIndex);W.value=W.output="\\{",C=te="\\}",A.output=le;for(const he of ye)A.output+=he.output||he.value}J({type:"brace",value:C,output:te}),Z("braces"),T.pop();continue}if(C==="|"){D.length>0&&D[D.length-1].conditions++,J({type:"text",value:C});continue}if(C===","){let W=C;const te=T[T.length-1];te&&R[R.length-1]==="braces"&&(te.comma=!0,W="|"),J({type:"comma",value:C,output:W});continue}if(C==="/"){
80
+ if(E.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",h.pop(),E=g;continue}J({type:"slash",value:C,output:b});continue}if(C==="."){if(A.braces>0&&E.type==="dot"){E.value==="."&&(E.output=$);const W=T[T.length-1];E.type="dots",E.output+=C,E.value+=C,W.dots=!0;continue}if(A.braces+A.parens===0&&E.type!=="bos"&&E.type!=="slash"){J({type:"text",value:C,output:$});continue}J({type:"dot",value:C,output:$});continue}if(C==="?"){if(!(E&&E.value==="(")&&y.noextglob!==!0&&K()===
81
+ "("&&K(2)!=="?"){ue("qmark",C);continue}if(E&&E.type==="paren"){const te=K();let le=C;if(te==="<"&&!t.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(E.value==="("&&!/[!=<:]/.test(te)||te==="<"&&!/<([!=]|\w+>)/.test(re()))&&(le=`\\${C}`),J({type:"text",value:C,output:le});continue}if(y.dot!==!0&&(E.type==="slash"||E.type==="bos")){J({type:"qmark",value:C,output:j});continue}J({type:"qmark",value:C,output:L});continue}if(C==="!"){if(y.noextglob!==
82
+ !0&&K()==="("&&(K(2)!=="?"||!/[!=<:]/.test(K(3)))){ue("negate",C);continue}if(y.nonegate!==!0&&A.index===0){V();continue}}if(C==="+"){if(y.noextglob!==!0&&K()==="("&&K(2)!=="?"){ue("plus",C);continue}if(E&&E.value==="("||y.regex===!1){J({type:"plus",value:C,output:w});continue}if(E&&(E.type==="bracket"||E.type==="paren"||E.type==="brace")||A.parens>0){J({type:"plus",value:C});continue}J({type:"plus",value:w});continue}if(C==="@"){if(y.noextglob!==!0&&K()==="("&&K(2)!=="?"){J({type:"at",extglob:!0,
83
+ value:C,output:""});continue}J({type:"text",value:C});continue}if(C!=="*"){(C==="$"||C==="^")&&(C=`\\${C}`);const W=i.exec(re());W&&(C+=W[0],A.index+=W[0].length),J({type:"text",value:C});continue}if(E&&(E.type==="globstar"||E.star===!0)){E.type="star",E.star=!0,E.value+=C,E.output=q,A.backtrack=!0,A.globstar=!0,k(C);continue}let Y=re();if(y.noextglob!==!0&&/^\([^?]/.test(Y)){ue("star",C);continue}if(E.type==="star"){if(y.noglobstar===!0){k(C);continue}const W=E.prev,te=W.prev,le=W.type==="slash"||
84
+ W.type==="bos",ye=te&&(te.type==="star"||te.type==="globstar");if(y.bash===!0&&(!le||Y[0]&&Y[0]!=="/")){J({type:"star",value:C,output:""});continue}const he=A.braces>0&&(W.type==="comma"||W.type==="brace"),Me=D.length&&(W.type==="pipe"||W.type==="paren");if(!le&&W.type!=="paren"&&!he&&!Me){J({type:"star",value:C,output:""});continue}for(;Y.slice(0,3)==="/**";){const Be=l[A.index+4];if(Be&&Be!=="/")break;Y=Y.slice(3),k("/**",3)}if(W.type==="bos"&&B()){E.type="globstar",E.value+=C,E.output=F(y),A.
85
+ output=E.output,A.globstar=!0,k(C);continue}if(W.type==="slash"&&W.prev.type!=="bos"&&!ye&&B()){A.output=A.output.slice(0,-(W.output+E.output).length),W.output=`(?:${W.output}`,E.type="globstar",E.output=F(y)+(y.strictSlashes?")":"|$)"),E.value+=C,A.globstar=!0,A.output+=W.output+E.output,k(C);continue}if(W.type==="slash"&&W.prev.type!=="bos"&&Y[0]==="/"){const Be=Y[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(W.output+E.output).length),W.output=`(?:${W.output}`,E.type="globstar",E.output=`${F(
86
+ y)}${b}|${b}${Be})`,E.value+=C,A.output+=W.output+E.output,A.globstar=!0,k(C+ee()),J({type:"slash",value:"/",output:""});continue}if(W.type==="bos"&&Y[0]==="/"){E.type="globstar",E.value+=C,E.output=`(?:^|${b}|${F(y)}${b})`,A.output=E.output,A.globstar=!0,k(C+ee()),J({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-E.output.length),E.type="globstar",E.output=F(y),E.value+=C,A.output+=E.output,A.globstar=!0,k(C);continue}const ne={type:"star",value:C,output:q};if(y.bash===!0){
87
+ ne.output=".*?",(E.type==="bos"||E.type==="slash")&&(ne.output=G+ne.output),J(ne);continue}if(E&&(E.type==="bracket"||E.type==="paren")&&y.regex===!0){ne.output=C,J(ne);continue}(A.index===A.start||E.type==="slash"||E.type==="dot")&&(E.type==="dot"?(A.output+=x,E.output+=x):y.dot===!0?(A.output+=U,E.output+=U):(A.output+=G,E.output+=G),K()!=="*"&&(A.output+=P,E.output+=P)),J(ne)}for(;A.brackets>0;){if(y.strictBrackets===!0)throw new SyntaxError(u("closing","]"));A.output=t.escapeLast(A.output,"["),
88
+ Z("brackets")}for(;A.parens>0;){if(y.strictBrackets===!0)throw new SyntaxError(u("closing",")"));A.output=t.escapeLast(A.output,"("),Z("parens")}for(;A.braces>0;){if(y.strictBrackets===!0)throw new SyntaxError(u("closing","}"));A.output=t.escapeLast(A.output,"{"),Z("braces")}if(y.strictSlashes!==!0&&(E.type==="star"||E.type==="bracket")&&J({type:"maybe_slash",value:"",output:`${b}?`}),A.backtrack===!0){A.output="";for(const Y of A.tokens)A.output+=Y.output!=null?Y.output:Y.value,Y.suffix&&(A.output+=
89
+ Y.suffix)}return A};return c.fastpaths=(l,m)=>{const y={...m},_=typeof y.maxLength=="number"?Math.min(r,y.maxLength):r,S=l.length;if(S>_)throw new SyntaxError(`Input length: ${S}, exceeds maximum allowed length: ${_}`);l=o[l]||l;const g=t.isWindows(m),{DOT_LITERAL:h,SLASH_LITERAL:p,ONE_CHAR:f,DOTS_SLASH:d,NO_DOT:v,NO_DOTS:$,NO_DOTS_SLASH:w,STAR:b,START_ANCHOR:P}=e.globChars(g),I=y.dot?$:v,H=y.dot?w:v,x=y.capture?"":"?:",U={negated:!1,prefix:""};let L=y.bash===!0?".*?":b;y.capture&&(L=`(${L})`);const j=G=>G.
90
+ noglobstar===!0?L:`(${x}(?:(?!${P}${G.dot?d:h}).)*?)`,M=G=>{switch(G){case"*":return`${I}${f}${L}`;case".*":return`${h}${f}${L}`;case"*.*":return`${I}${L}${h}${f}${L}`;case"*/*":return`${I}${L}${p}${f}${H}${L}`;case"**":return I+j(y);case"**/*":return`(?:${I}${j(y)}${p})?${H}${f}${L}`;case"**/*.*":return`(?:${I}${j(y)}${p})?${H}${L}${h}${f}${L}`;case"**/.*":return`(?:${I}${j(y)}${p})?${h}${f}${L}`;default:{const Q=/^(.*?)\.(\w+)$/.exec(G);if(!Q)return;const q=M(Q[1]);return q?q+h+Q[2]:void 0}}},
91
+ z=t.removePrefix(l,U);let F=M(z);return F&&y.strictSlashes!==!0&&(F+=`${p}?`),F},Jn=c,Jn}var Yn,$a;function Hd(){if($a)return Yn;$a=1;const e=En,t=xd(),r=Md(),n=Wt(),i=Kt(),a=s=>s&&typeof s=="object"&&!Array.isArray(s),o=(s,u,c=!1)=>{if(Array.isArray(s)){const p=s.map(d=>o(d,u,c));return d=>{for(const v of p){const $=v(d);if($)return $}return!1}}const l=a(s)&&s.tokens&&s.input;if(s===""||typeof s!="string"&&!l)throw new TypeError("Expected pattern to be a non-empty string");const m=u||{},y=n.isWindows(
92
+ u),_=l?o.compileRe(s,u):o.makeRe(s,u,!1,!0),S=_.state;delete _.state;let g=()=>!1;if(m.ignore){const p={...u,ignore:null,onMatch:null,onResult:null};g=o(m.ignore,p,c)}const h=(p,f=!1)=>{const{isMatch:d,match:v,output:$}=o.test(p,_,u,{glob:s,posix:y}),w={glob:s,state:S,regex:_,posix:y,input:p,output:$,match:v,isMatch:d};return typeof m.onResult=="function"&&m.onResult(w),d===!1?(w.isMatch=!1,f?w:!1):g(p)?(typeof m.onIgnore=="function"&&m.onIgnore(w),w.isMatch=!1,f?w:!1):(typeof m.onMatch=="functi\
93
+ on"&&m.onMatch(w),f?w:!0)};return c&&(h.state=S),h};return o.test=(s,u,c,{glob:l,posix:m}={})=>{if(typeof s!="string")throw new TypeError("Expected input to be a string");if(s==="")return{isMatch:!1,output:""};const y=c||{},_=y.format||(m?n.toPosixSlashes:null);let S=s===l,g=S&&_?_(s):s;return S===!1&&(g=_?_(s):s,S=g===l),(S===!1||y.capture===!0)&&(y.matchBase===!0||y.basename===!0?S=o.matchBase(s,u,c,m):S=u.exec(g)),{isMatch:!!S,match:S,output:g}},o.matchBase=(s,u,c,l=n.isWindows(c))=>(u instanceof
94
+ RegExp?u:o.makeRe(u,c)).test(e.basename(s)),o.isMatch=(s,u,c)=>o(u,c)(s),o.parse=(s,u)=>Array.isArray(s)?s.map(c=>o.parse(c,u)):r(s,{...u,fastpaths:!1}),o.scan=(s,u)=>t(s,u),o.compileRe=(s,u,c=!1,l=!1)=>{if(c===!0)return s.output;const m=u||{},y=m.contains?"":"^",_=m.contains?"":"$";let S=`${y}(?:${s.output})${_}`;s&&s.negated===!0&&(S=`^(?!${S}).*$`);const g=o.toRegex(S,u);return l===!0&&(g.state=s),g},o.makeRe=(s,u={},c=!1,l=!1)=>{if(!s||typeof s!="string")throw new TypeError("Expected a non-e\
95
+ mpty string");let m={negated:!1,fastpaths:!0};return u.fastpaths!==!1&&(s[0]==="."||s[0]==="*")&&(m.output=r.fastpaths(s,u)),m.output||(m=r(s,u)),o.compileRe(m,u,c,l)},o.toRegex=(s,u)=>{try{const c=u||{};return new RegExp(s,c.flags||(c.nocase?"i":""))}catch(c){if(u&&u.debug===!0)throw c;return/$^/}},o.constants=i,Yn=o,Yn}var Qn,_a;function Ud(){return _a||(_a=1,Qn=Hd()),Qn}var Zn,wa;function Fd(){if(wa)return Zn;wa=1;const e=Ko,t=qd(),r=Ud(),n=Wt(),i=s=>s===""||s==="./",a=s=>{const u=s.indexOf("\
96
+ {");return u>-1&&s.indexOf("}",u)>-1},o=(s,u,c)=>{u=[].concat(u),s=[].concat(s);let l=new Set,m=new Set,y=new Set,_=0,S=p=>{y.add(p.output),c&&c.onResult&&c.onResult(p)};for(let p=0;p<u.length;p++){let f=r(String(u[p]),{...c,onResult:S},!0),d=f.state.negated||f.state.negatedExtglob;d&&_++;for(let v of s){let $=f(v,!0);(d?!$.isMatch:$.isMatch)&&(d?l.add($.output):(l.delete($.output),m.add($.output)))}}let h=(_===u.length?[...y]:[...m]).filter(p=>!l.has(p));if(c&&h.length===0){if(c.failglob===!0)throw new Error(
97
+ `No matches found for "${u.join(", ")}"`);if(c.nonull===!0||c.nullglob===!0)return c.unescape?u.map(p=>p.replace(/\\/g,"")):u}return h};return o.match=o,o.matcher=(s,u)=>r(s,u),o.isMatch=(s,u,c)=>r(u,c)(s),o.any=o.isMatch,o.not=(s,u,c={})=>{u=[].concat(u).map(String);let l=new Set,m=[],y=S=>{c.onResult&&c.onResult(S),m.push(S.output)},_=new Set(o(s,u,{...c,onResult:y}));for(let S of m)_.has(S)||l.add(S);return[...l]},o.contains=(s,u,c)=>{if(typeof s!="string")throw new TypeError(`Expected a stri\
98
+ ng: "${e.inspect(s)}"`);if(Array.isArray(u))return u.some(l=>o.contains(s,l,c));if(typeof u=="string"){if(i(s)||i(u))return!1;if(s.includes(u)||s.startsWith("./")&&s.slice(2).includes(u))return!0}return o.isMatch(s,u,{...c,contains:!0})},o.matchKeys=(s,u,c)=>{if(!n.isObject(s))throw new TypeError("Expected the first argument to be an object");let l=o(Object.keys(s),u,c),m={};for(let y of l)m[y]=s[y];return m},o.some=(s,u,c)=>{let l=[].concat(s);for(let m of[].concat(u)){let y=r(String(m),c);if(l.
99
+ some(_=>y(_)))return!0}return!1},o.every=(s,u,c)=>{let l=[].concat(s);for(let m of[].concat(u)){let y=r(String(m),c);if(!l.every(_=>y(_)))return!1}return!0},o.all=(s,u,c)=>{if(typeof s!="string")throw new TypeError(`Expected a string: "${e.inspect(s)}"`);return[].concat(u).every(l=>r(l,c)(s))},o.capture=(s,u,c)=>{let l=n.isWindows(c),y=r.makeRe(String(s),{...c,capture:!0}).exec(l?n.toPosixSlashes(u):u);if(y)return y.slice(1).map(_=>_===void 0?"":_)},o.makeRe=(...s)=>r.makeRe(...s),o.scan=(...s)=>r.
100
+ scan(...s),o.parse=(s,u)=>{let c=[];for(let l of[].concat(s||[]))for(let m of t(String(l),u))c.push(r.parse(m,u));return c},o.braces=(s,u)=>{if(typeof s!="string")throw new TypeError("Expected a string");return u&&u.nobrace===!0||!a(s)?[s]:t(s,u)},o.braceExpand=(s,u)=>{if(typeof s!="string")throw new TypeError("Expected a string");return o.braces(s,{...u,expand:!0})},o.hasBraces=a,Zn=o,Zn}var Vd=Fd();const ba=mn(Vd),zd={useRecommendedBuildConfig:!0,removeViteModuleLoader:!1,deleteInlinedFiles:!0};
101
+ function Gd(e,t,r,n=!1){const i=t.replaceAll(".","\\."),a=new RegExp(`<script([^>]*?) src="(?:[^"]*?/)?${i}"([^>]*)></script>`),o=/"?__VITE_PRELOAD__"?/g,s=r.replace(o,"void 0").replace(/<(\/script>|!--)/g,"\\x3C$1"),u=e.replace(a,(c,l,m)=>`<script${l}${m}>${s.trim()}</script>`);return n?Yd(u):u}function Bd(e,t,r){const n=t.replaceAll(".","\\."),i=new RegExp(`<link([^>]*?) href="(?:[^"]*?/)?${n}"([^>]*)>`),a=r.replace('@charset "UTF-8";',"");return e.replace(i,(s,u,c)=>`<style${u}${c}>${a.trim()}\
102
+ </style>`)}const Kd=/\.[mc]?js$/,Wd=/\.css$/,Xd=/\.html?$/;function Jd({useRecommendedBuildConfig:e=!0,removeViteModuleLoader:t=!1,inlinePattern:r=[],deleteInlinedFiles:n=!0}=zd){return{name:"vite:singlefile",config:e?Qd:void 0,enforce:"post",generateBundle(i,a){const o=c=>this.info(`NOTE: asset not inlined: ${c}`);this.info(`
103
+ `);const s={html:[],css:[],js:[],other:[]};for(const c of Object.keys(a))Xd.test(c)?s.html.push(c):Wd.test(c)?s.css.push(c):Kd.test(c)?s.js.push(c):s.other.push(c);const u=[];for(const c of s.html){const l=a[c];let m=l.source;for(const y of s.js){if(r.length&&!ba.isMatch(y,r)){o(y);continue}const _=a[y];_.code!=null&&(this.info(`Inlining: ${y}`),u.push(y),m=Gd(m,_.fileName,_.code,t))}for(const y of s.css){if(r.length&&!ba.isMatch(y,r)){o(y);continue}const _=a[y];this.info(`Inlining: ${y}`),u.push(
104
+ y),m=Bd(m,_.fileName,_.source)}l.source=m}if(n)for(const c of u)delete a[c];for(const c of s.other)o(c)}}}const Yd=e=>e.replace(/(<script type="module" crossorigin>\s*)\(function(?: polyfill)?\(\)\s*\{[\s\S]*?\}\)\(\);/,'<script type="module">'),Qd=e=>{e.build||(e.build={}),e.build.assetsInlineLimit=()=>!0,e.build.chunkSizeWarningLimit=1e8,e.build.cssCodeSplit=!1,e.base="./",e.build.assetsDir="",e.build.rollupOptions||(e.build.rollupOptions={}),e.build.rollupOptions.output||(e.build.rollupOptions.
105
105
  output={});const t=r=>{r.inlineDynamicImports=!0};if(Array.isArray(e.build.rollupOptions.output))for(const r of e.build.rollupOptions.output)t(r);else t(e.build.rollupOptions.output)};function ft(e){return e.length===0?"never":e.sort(yd).map(t=>` | ${JSON.stringify(t)}`).join(`
106
106
  `).trimStart()}function Ea(e){const t=Uo(e);return t.length===0?"never":Fo(t,gd,Bf(r=>` | ${JSON.stringify(r.id)}`)).join(`
107
107
  `).trimStart()}function Sa(e,t={}){const{useCorePackage:r=!1}=t;return`
@@ -240,309 +240,310 @@ export {
240
240
  ReactLikeC4
241
241
  }
242
242
  /* prettier-ignore-end */
243
- `.trimStart()}const es=async({languageServices:e,likec4AssetsDir:t,...r})=>{const n=r.customLogger??Cd,i=Nn(),o=r?.useOverviewGraph===!0;n.info(`${j.cyan("likec4 app root")} ${j.dim(i)}`);const a=r.outputDir??oe(e.workspace,"dist");n.info(j.cyan("outDir")+" "+j.dim(a));let s="/";r.base&&(s=No(r.base),!Nf(s)&&s!=="./"&&(s=Of(s))),s!=="/"&&n.info(`${j.green("app base url")} ${j.dim(s)}`);const u=r.webcomponentPrefix??"likec4",c=r.title??"LikeC4",l=r.outputSingleFile??!1;return{isDev:!1,likec4AssetsDir:t,
244
- webcomponentPrefix:u,title:c,root:i,languageServices:e,clearScreen:!1,base:s,resolve:{conditions:["production"],dedupe:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client"],alias:{...jn(),"likec4/previews":t}},configFile:!1,mode:"production",optimizeDeps:{include:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client","@likec4/core/types","@likec4/core/model","@likec4/core/compute-view/relationships","@likec4/core/utils","@likec4/core","\
245
- likec4/model","likec4/react","likec4/vite-plugin/internal"],noDiscovery:!0},esbuild:{tsconfigRaw:{compilerOptions:{target:"ESNext",jsx:"react-jsx"}}},define:{WEBCOMPONENT_PREFIX:JSON.stringify(u),PAGE_TITLE:JSON.stringify(c),__USE_OVERVIEW_GRAPH__:o?"true":"false",__USE_HASH_HISTORY__:r?.useHashHistory===!0?"true":"false","process.env.NODE_ENV":'"production"'},build:{outDir:a,emptyOutDir:!1,sourcemap:!1,cssMinify:!1,minify:!0,copyPublicDir:!0,chunkSizeWarningLimit:In,rollupOptions:{treeshake:{preset:"\
246
- recommended"},...!l&&{input:[oe(i,"index.html"),oe(i,"src","main.js"),oe(i,"src","fonts.css"),oe(i,"src","style.css")],output:{manualChunks:m=>{if(!(m.endsWith(".css")||m.endsWith(".html")||m.includes("likec4/icons"))){if(m.includes("__app__")){let y=m.match(/__app__\/src\/([\w]+)\.js/)?.[1];return y?y[1]:void 0}if(m.includes("node_modules/likec4")||m.includes("node_modules/@likec4"))return"likec4";if(m.includes("node_modules"))return"vendors"}}}}}},customLogger:n,plugins:[bn(),Sn({languageServices:e.
247
- languageServices,useOverviewGraph:o}),l?Jd():void 0].filter(Boolean)}};async function ts({languageServices:e,outDir:t,base:r,webcomponentPrefix:n="likec4",filename:i="likec4-views.js"}){const o=Te(["vite","webcomponent"]),a=Nn();return o.info(j.cyan("outDir")+" "+j.dim(t)),{root:a,clearScreen:!1,base:r,configFile:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:jn(),dedupe:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client"]},define:{WEBCOMPONENT_PREFIX:JSON.
248
- stringify(n),"process.env.NODE_ENV":'"production"'},esbuild:{...Tn,tsconfigRaw:{compilerOptions:{target:"ESNext",jsx:"react-jsx"}}},build:{outDir:t,emptyOutDir:!1,sourcemap:!1,minify:!0,assetsInlineLimit:100*1024,chunkSizeWarningLimit:In,lib:{entry:"src/webcomponent.js",fileName(s,u){return i},formats:["iife"],name:"LikeC4Views"},rollupOptions:{treeshake:{preset:"recommended"},output:{format:"iife",hoistTransitiveImports:!1,compact:!0}}},customLogger:o,plugins:[bn(),Sn({languageServices:e.languageServices,
249
- useOverviewGraph:!1})]}}const np=["favicon.ico","robots.txt"],sp=async({buildWebcomponent:e=!0,webcomponentPrefix:t="likec4",title:r,languageServices:n,likec4AssetsDir:i,outputSingleFile:o,...a})=>{i??=await Ft(Et(Vt(),".likec4-assets-"));const s=await es({...a,languageServices:n,likec4AssetsDir:i,webcomponentPrefix:t,title:r,outputSingleFile:o}),u=await On();for(const l of np){const m=oe(s.root,l);He(m)&&Mo(m,oe(u,l))}const c=n.languageServices.projects();if(c.length===1){const l=await n.viewsService.
250
- computedViews(),m=await n.diagrams();if(m.length===0)throw process.exitCode=1,new Error("no views found");m.length===l.length?s.customLogger.info(`${j.dim("workspace:")} ${j.green("\u2713 all views layouted")}`):s.customLogger.warn(`${j.dim("workspace:")} ${j.yellow(`\u2717 layouted ${m.length} of ${l.length} views`)}`),m.forEach(y=>{y.hasLayoutDrift&&s.customLogger.warn(j.yellow("drift detected, manual layout can not be applied, view:")+" "+j.red(y.id))})}else for(const l of c){const m=await n.
251
- viewsService.computedViews(l.id);m.length===0?s.customLogger.warn(`${j.dim("project:")} ${l.id} ${j.yellow("\u2717 no views found")}`):s.customLogger.info(`${j.dim("project:")} ${l.id} ${j.green(`${m.length} views`)}`)}if(e){const l=await ts({webcomponentPrefix:t,languageServices:n,outDir:u,base:s.base});await At(l)}if(await At({...s,publicDir:u,mode:"production"}),o)for(let l of Uf(oe(s.build.outDir)).filter(m=>m!=="index.html"))$n(oe(s.build.outDir,l),{recursive:!0});else{const l=oe(s.build.outDir,
252
- "index.html");He(l)&&Mo(l,oe(s.build.outDir,"404.html"))}};function rs(e,t){return r=>r.length>1?[e,t,r[0],"--",...r.slice(1)]:[e,t,r[0]]}function op(){return e=>["deno","run",`npm:${e[0]}`,...e.slice(1)]}const ap={agent:["npm",0],run:rs("npm","run"),install:["npm","i",0],frozen:["npm","ci",0],global:["npm","i","-g",0],add:["npm","i",0],upgrade:["npm","update",0],"upgrade-interactive":null,execute:["npx",0],"execute-local":["npx",0],uninstall:["npm","uninstall",0],global_uninstall:["npm","uninst\
253
- all","-g",0]},Ra={agent:["yarn",0],run:["yarn","run",0],install:["yarn","install",0],frozen:["yarn","install","--frozen-lockfile",0],global:["yarn","global","add",0],add:["yarn","add",0],upgrade:["yarn","upgrade",0],"upgrade-interactive":["yarn","upgrade-interactive",0],execute:["npx",0],"execute-local":rs("yarn","exec"),uninstall:["yarn","remove",0],global_uninstall:["yarn","global","remove",0]},ip={...Ra,frozen:["yarn","install","--immutable",0],upgrade:["yarn","up",0],"upgrade-interactive":["\
254
- yarn","up","-i",0],execute:["yarn","dlx",0],"execute-local":["yarn","exec",0],global:["npm","i","-g",0],global_uninstall:["npm","uninstall","-g",0]},Aa={agent:["pnpm",0],run:["pnpm","run",0],install:["pnpm","i",0],frozen:["pnpm","i","--frozen-lockfile",0],global:["pnpm","add","-g",0],add:["pnpm","add",0],upgrade:["pnpm","update",0],"upgrade-interactive":["pnpm","update","-i",0],execute:["pnpm","dlx",0],"execute-local":["pnpm","exec",0],uninstall:["pnpm","remove",0],global_uninstall:["pnpm","remo\
255
- ve","--global",0]},cp={agent:["bun",0],run:["bun","run",0],install:["bun","install",0],frozen:["bun","install","--frozen-lockfile",0],global:["bun","add","-g",0],add:["bun","add",0],upgrade:["bun","update",0],"upgrade-interactive":["bun","update",0],execute:["bun","x",0],"execute-local":["bun","x",0],uninstall:["bun","remove",0],global_uninstall:["bun","remove","-g",0]},up={agent:["deno",0],run:["deno","task",0],install:["deno","install",0],frozen:["deno","install","--frozen",0],global:["deno","\
256
- install","-g",0],add:["deno","add",0],upgrade:["deno","outdated","--update",0],"upgrade-interactive":["deno","outdated","--update",0],execute:op(),"execute-local":["deno","task","--eval",0],uninstall:["deno","remove",0],global_uninstall:["deno","uninstall","-g",0]},lp={npm:ap,yarn:Ra,"yarn@berry":ip,pnpm:Aa,"pnpm@6":{...Aa,run:rs("pnpm","run")},bun:cp,deno:up};function fp(e,t,r){const n=lp[e][t];return dp(n,r)}function dp(e,t){if(e==null)return null;const r=typeof e=="function"?e(t):e.flatMap(n=>typeof n==
257
- "number"?t:[n]);return{command:r[0],args:r.slice(1)}}const pp=["npm","yarn","yarn@berry","pnpm","pnpm@6","bun","deno"],Pa={"bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},Ca={"node_modules/.deno/":"deno","node_modules/.pnpm/":"pnpm","node_modules/.yarn-state.yml":"yarn","node_modules/.yarn_integrity":"yarn","node_modules/.package-lock.json":"npm",".pnp.cjs":"yarn",
258
- ".pnp.js":"yarn","bun.lock":"bun","bun.lockb":"bun"};async function ns(e,t){try{const r=await Go.stat(e);return t==="file"?r.isFile():r.isDirectory()}catch{return!1}}function*hp(e=me.cwd()){let t=ie.resolve(e);const{root:r}=ie.parse(t);for(;t&&t!==r;)yield t,t=ie.dirname(t)}async function ka(e,t){return!e||!ns(e,"file")?null:await gp(e,t)}async function mp(e={}){const{cwd:t,strategies:r=["lockfile","packageManager-field","devEngines-field"],onUnknown:n}=e;let i;if(typeof e.stopDir=="string"){const o=ie.
259
- resolve(e.stopDir);i=a=>a===o}else i=e.stopDir;for(const o of hp(t)){for(const a of r)switch(a){case"lockfile":{for(const s of Object.keys(Pa))if(await ns(ie.join(o,s),"file")){const u=Pa[s],c=await ka(ie.join(o,"package.json"),n);return c||{name:u,agent:u}}break}case"packageManager-field":case"devEngines-field":{const s=await ka(ie.join(o,"package.json"),n);if(s)return s;break}case"install-metadata":{for(const s of Object.keys(Ca)){const u=s.endsWith("/")?"dir":"file";if(await ns(ie.join(o,s),u)){
260
- const c=Ca[s],l=c==="yarn"?vp(s)?"yarn":"yarn@berry":c;return{name:c,agent:l}}}break}}if(i?.(o))break}return null}function yp(e){const t=r=>r?.match(/\d+(\.\d+){0,2}/)?.[0]??r;if(typeof e.packageManager=="string"){const[r,n]=e.packageManager.replace(/^\^/,"").split("@");return{name:r,ver:t(n)}}if(typeof e.devEngines?.packageManager?.name=="string")return{name:e.devEngines.packageManager.name,ver:t(e.devEngines.packageManager.version)}}async function gp(e,t){try{const r=JSON.parse(await Go.readFile(
261
- e,"utf8"));let n;const i=yp(r);if(i){const o=i.name,a=i.ver;let s=a;return o==="yarn"&&a&&Number.parseInt(a)>1?(n="yarn@berry",s="berry",{name:o,agent:n,version:s}):o==="pnpm"&&a&&Number.parseInt(a)<7?(n="pnpm@6",{name:o,agent:n,version:s}):pp.includes(o)?(n=o,{name:o,agent:n,version:s}):t?.(r.packageManager)??null}}catch{}return null}function vp(e){return e.endsWith(".yarn_integrity")}function Ta(e){try{return!!ad.createRequire(import.meta.url).resolve(e)}catch(t){return Ae.debug(Mt(t)),!1}}async function Ct(){
262
- if(Ta("react")&&Ta("react-dom")){Ae.debug("react already installed");return}Ae.debug("react not installed");const e=await mp();e||(Ae.error`Package manager not detected, please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1));const t=fp(e.agent,"add",["react","react-dom"]);t||(Ae.error`Please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1));try{await Oo(t.command,t.args,{stdio:"inherit"})}catch(r){Ae.debug(Mt(r)),Ae.error`Please install dependencies manually: ${"\
263
- react"} ${"react-dom"}`,process.exit(1)}}function Na(e){if(e.resolvedUrls)return Io(e.resolvedUrls.network)??Io(e.resolvedUrls.local)}function Oa(e){if(!e.resolvedUrls)throw new Error("Vite server is not ready, no resolvedUrls");We([j.green("LikeC4 served at:"),"",j.dim("Local: ")+e.resolvedUrls.local.join(`
264
- `+"".padEnd(9," ")),e.resolvedUrls.network.length?j.dim("Network: ")+e.resolvedUrls.network.join(`
243
+ `.trimStart()}const es=async({languageServices:e,likec4AssetsDir:t,...r})=>{const n=r.customLogger??Cd,i=On(),a=r?.useOverviewGraph===!0;n.info(`${N.cyan("likec4 app root")} ${N.dim(i)}`);const o=r.outputDir??oe(e.workspace,"dist");n.info(N.cyan("outDir")+" "+N.dim(o));let s="/";r.base&&(s=Oo(r.base),!Of(s)&&s!=="./"&&(s=Nf(s))),s!=="/"&&n.info(`${N.green("app base url")} ${N.dim(s)}`);const u=r.webcomponentPrefix??"likec4",c=r.title??"LikeC4",l=r.outputSingleFile??!1;return{isDev:!1,likec4AssetsDir:t,
244
+ webcomponentPrefix:u,title:c,root:i,languageServices:e,clearScreen:!1,base:s,resolve:{conditions:["production"],dedupe:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client"],alias:{...jn(),"likec4/previews":t}},configFile:!1,mode:"production",optimizeDeps:{include:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client","@likec4/core/types","@likec4/core/model","@likec4/core/styles","@likec4/core/compute-view/relationships","@likec4/core/u\
245
+ tils","@likec4/core","likec4/model","likec4/react","likec4/vite-plugin/internal"],noDiscovery:!0},esbuild:{tsconfigRaw:{compilerOptions:{target:"ESNext",jsx:"react-jsx"}}},define:{WEBCOMPONENT_PREFIX:JSON.stringify(u),PAGE_TITLE:JSON.stringify(c),__USE_OVERVIEW_GRAPH__:a?"true":"false",__USE_HASH_HISTORY__:r?.useHashHistory===!0?"true":"false","process.env.NODE_ENV":'"production"'},build:{outDir:o,emptyOutDir:!1,sourcemap:!1,cssMinify:!1,minify:!0,copyPublicDir:!0,chunkSizeWarningLimit:In,rollupOptions:{
246
+ treeshake:{preset:"recommended"},...!l&&{input:[oe(i,"index.html"),oe(i,"src","main.js"),oe(i,"src","fonts.css"),oe(i,"src","style.css")],output:{manualChunks:m=>{if(!(m.endsWith(".css")||m.endsWith(".html")||m.includes("likec4/icons"))){if(m.includes("__app__")){let y=m.match(/__app__\/src\/([\w]+)\.js/)?.[1];return y?y[1]:void 0}if(m.includes("node_modules/likec4")||m.includes("node_modules/@likec4"))return"likec4";if(m.includes("node_modules"))return"vendors"}}}}}},customLogger:n,plugins:[bn(),
247
+ Sn({languageServices:e.languageServices,useOverviewGraph:a}),l?Jd():void 0].filter(Boolean)}};async function ts({languageServices:e,outDir:t,base:r,webcomponentPrefix:n="likec4",filename:i="likec4-views.js"}){const a=Te(["vite","webcomponent"]),o=On();return a.info(N.cyan("outDir")+" "+N.dim(t)),{root:o,clearScreen:!1,base:r,configFile:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:jn(),dedupe:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom\
248
+ /client"]},define:{WEBCOMPONENT_PREFIX:JSON.stringify(n),"process.env.NODE_ENV":'"production"'},esbuild:{...Tn,tsconfigRaw:{compilerOptions:{target:"ESNext",jsx:"react-jsx"}}},build:{outDir:t,emptyOutDir:!1,sourcemap:!1,minify:!0,assetsInlineLimit:100*1024,chunkSizeWarningLimit:In,lib:{entry:"src/webcomponent.js",fileName(s,u){return i},formats:["iife"],name:"LikeC4Views"},rollupOptions:{treeshake:{preset:"recommended"},output:{format:"iife",hoistTransitiveImports:!1,compact:!0}}},customLogger:a,
249
+ plugins:[bn(),Sn({languageServices:e.languageServices,useOverviewGraph:!1})]}}const np=["favicon.ico","robots.txt"],sp=async({buildWebcomponent:e=!0,webcomponentPrefix:t="likec4",title:r,languageServices:n,likec4AssetsDir:i,outputSingleFile:a,...o})=>{i??=await Vt(Et(zt(),".likec4-assets-"));const s=await es({...o,languageServices:n,likec4AssetsDir:i,webcomponentPrefix:t,title:r,outputSingleFile:a}),u=await Nn();for(const l of np){const m=oe(s.root,l);He(m)&&Mo(m,oe(u,l))}const c=n.languageServices.
250
+ projects();if(c.length===1){const l=await n.viewsService.computedViews(),m=await n.diagrams();if(m.length===0)throw process.exitCode=1,new Error("no views found");m.length===l.length?s.customLogger.info(`${N.dim("workspace:")} ${N.green("\u2713 all views layouted")}`):s.customLogger.warn(`${N.dim("workspace:")} ${N.yellow(`\u2717 layouted ${m.length} of ${l.length} views`)}`),m.forEach(y=>{(y.hasLayoutDrift||y.drifts&&y.drifts.length>0)&&s.customLogger.warn(N.dim("view")+" "+N.red(y.id)+" "+N.yellow(
251
+ "is out of date, layout drift detected"))})}else for(const l of c){const m=await n.viewsService.computedViews(l.id);m.length===0?s.customLogger.warn(`${N.dim("project:")} ${l.id} ${N.yellow("\u2717 no views found")}`):s.customLogger.info(`${N.dim("project:")} ${l.id} ${N.green(`${m.length} views`)}`)}if(e){const l=await ts({webcomponentPrefix:t,languageServices:n,outDir:u,base:s.base});await At(l)}if(await At({...s,publicDir:u,mode:"production"}),a)for(let l of Uf(oe(s.build.outDir)).filter(m=>m!==
252
+ "index.html"))$n(oe(s.build.outDir,l),{recursive:!0});else{const l=oe(s.build.outDir,"index.html");He(l)&&Mo(l,oe(s.build.outDir,"404.html"))}};function rs(e,t){return r=>r.length>1?[e,t,r[0],"--",...r.slice(1)]:[e,t,r[0]]}function op(){return e=>["deno","run",`npm:${e[0]}`,...e.slice(1)]}const ap={agent:["npm",0],run:rs("npm","run"),install:["npm","i",0],frozen:["npm","ci",0],global:["npm","i","-g",0],add:["npm","i",0],upgrade:["npm","update",0],"upgrade-interactive":null,dedupe:["npm","dedupe",
253
+ 0],execute:["npx",0],"execute-local":["npx",0],uninstall:["npm","uninstall",0],global_uninstall:["npm","uninstall","-g",0]},Ra={agent:["yarn",0],run:["yarn","run",0],install:["yarn","install",0],frozen:["yarn","install","--frozen-lockfile",0],global:["yarn","global","add",0],add:["yarn","add",0],upgrade:["yarn","upgrade",0],"upgrade-interactive":["yarn","upgrade-interactive",0],dedupe:null,execute:["npx",0],"execute-local":rs("yarn","exec"),uninstall:["yarn","remove",0],global_uninstall:["yarn",
254
+ "global","remove",0]},ip={...Ra,frozen:["yarn","install","--immutable",0],upgrade:["yarn","up",0],"upgrade-interactive":["yarn","up","-i",0],dedupe:["yarn","dedupe",0],execute:["yarn","dlx",0],"execute-local":["yarn","exec",0],global:["npm","i","-g",0],global_uninstall:["npm","uninstall","-g",0]},Aa={agent:["pnpm",0],run:["pnpm","run",0],install:["pnpm","i",0],frozen:["pnpm","i","--frozen-lockfile",0],global:["pnpm","add","-g",0],add:["pnpm","add",0],upgrade:["pnpm","update",0],"upgrade-interact\
255
+ ive":["pnpm","update","-i",0],dedupe:["pnpm","dedupe",0],execute:["pnpm","dlx",0],"execute-local":["pnpm","exec",0],uninstall:["pnpm","remove",0],global_uninstall:["pnpm","remove","--global",0]},cp={agent:["bun",0],run:["bun","run",0],install:["bun","install",0],frozen:["bun","install","--frozen-lockfile",0],global:["bun","add","-g",0],add:["bun","add",0],upgrade:["bun","update",0],"upgrade-interactive":["bun","update","-i",0],dedupe:null,execute:["bun","x",0],"execute-local":["bun","x",0],uninstall:[
256
+ "bun","remove",0],global_uninstall:["bun","remove","-g",0]},up={agent:["deno",0],run:["deno","task",0],install:["deno","install",0],frozen:["deno","install","--frozen",0],global:["deno","install","-g",0],add:["deno","add",0],upgrade:["deno","outdated","--update",0],"upgrade-interactive":["deno","outdated","--update",0],dedupe:null,execute:op(),"execute-local":["deno","task","--eval",0],uninstall:["deno","remove",0],global_uninstall:["deno","uninstall","-g",0]},lp={npm:ap,yarn:Ra,"yarn@berry":ip,
257
+ pnpm:Aa,"pnpm@6":{...Aa,run:rs("pnpm","run")},bun:cp,deno:up};function fp(e,t,r){const n=lp[e][t];return dp(n,r)}function dp(e,t){if(e==null)return null;const r=typeof e=="function"?e(t):e.flatMap(n=>typeof n=="number"?t:[n]);return{command:r[0],args:r.slice(1)}}const pp=["npm","yarn","yarn@berry","pnpm","pnpm@6","bun","deno"],Pa={"bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap\
258
+ .json":"npm"},Ca={"node_modules/.deno/":"deno","node_modules/.pnpm/":"pnpm","node_modules/.yarn-state.yml":"yarn","node_modules/.yarn_integrity":"yarn","node_modules/.package-lock.json":"npm",".pnp.cjs":"yarn",".pnp.js":"yarn","bun.lock":"bun","bun.lockb":"bun"};async function ns(e,t){try{const r=await Go.stat(e);return t==="file"?r.isFile():r.isDirectory()}catch{return!1}}function*hp(e=me.cwd()){let t=ie.resolve(e);const{root:r}=ie.parse(t);for(;t&&t!==r;)yield t,t=ie.dirname(t)}async function ka(e,t){
259
+ return!e||!ns(e,"file")?null:await gp(e,t)}async function mp(e={}){const{cwd:t,strategies:r=["lockfile","packageManager-field","devEngines-field"],onUnknown:n}=e;let i;if(typeof e.stopDir=="string"){const a=ie.resolve(e.stopDir);i=o=>o===a}else i=e.stopDir;for(const a of hp(t)){for(const o of r)switch(o){case"lockfile":{for(const s of Object.keys(Pa))if(await ns(ie.join(a,s),"file")){const u=Pa[s],c=await ka(ie.join(a,"package.json"),n);return c||{name:u,agent:u}}break}case"packageManager-field":case"\
260
+ devEngines-field":{const s=await ka(ie.join(a,"package.json"),n);if(s)return s;break}case"install-metadata":{for(const s of Object.keys(Ca)){const u=s.endsWith("/")?"dir":"file";if(await ns(ie.join(a,s),u)){const c=Ca[s],l=c==="yarn"?vp(s)?"yarn":"yarn@berry":c;return{name:c,agent:l}}}break}}if(i?.(a))break}return null}function yp(e){const t=r=>r?.match(/\d+(\.\d+){0,2}/)?.[0]??r;if(typeof e.packageManager=="string"){const[r,n]=e.packageManager.replace(/^\^/,"").split("@");return{name:r,ver:t(n)}}
261
+ if(typeof e.devEngines?.packageManager?.name=="string")return{name:e.devEngines.packageManager.name,ver:t(e.devEngines.packageManager.version)}}async function gp(e,t){try{const r=JSON.parse(await Go.readFile(e,"utf8"));let n;const i=yp(r);if(i){const a=i.name,o=i.ver;let s=o;return a==="yarn"&&o&&Number.parseInt(o)>1?(n="yarn@berry",s="berry",{name:a,agent:n,version:s}):a==="pnpm"&&o&&Number.parseInt(o)<7?(n="pnpm@6",{name:a,agent:n,version:s}):pp.includes(a)?(n=a,{name:a,agent:n,version:s}):t?.(
262
+ r.packageManager)??null}}catch{}return null}function vp(e){return e.endsWith(".yarn_integrity")}function Ta(e){try{return!!ad.createRequire(import.meta.url).resolve(e)}catch(t){return Ae.debug(Ht(t)),!1}}async function kt(){if(Ta("react")&&Ta("react-dom")){Ae.debug("react already installed");return}Ae.debug("react not installed");const e=await mp();e||(Ae.error`Package manager not detected, please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1));const t=fp(e.agent,"add",
263
+ ["react","react-dom"]);t||(Ae.error`Please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1));try{await No(t.command,t.args,{stdio:"inherit"})}catch(r){Ae.debug(Ht(r)),Ae.error`Please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1)}}function Oa(e){if(e.resolvedUrls)return Io(e.resolvedUrls.network)??Io(e.resolvedUrls.local)}function Na(e){if(!e.resolvedUrls)throw new Error("Vite server is not ready, no resolvedUrls");Ke([N.green("LikeC4 served at\
264
+ :"),"",N.dim("Local: ")+e.resolvedUrls.local.join(`
265
+ `+"".padEnd(9," ")),e.resolvedUrls.network.length?N.dim("Network: ")+e.resolvedUrls.network.join(`
265
266
  `+"".padEnd(9," ")):void 0].filter(t=>If(t)).join(`
266
- `))}class Ia extends Error{constructor(t){super(`${t} is locked`)}}const dt={old:new Set,young:new Set},$p=1e3*15,Xt=1024,Jt=65535;let kt;const _p=()=>{const e=Rt.networkInterfaces(),t=new Set([void 0,"0.0.0.0"]);for(const r of Object.values(e))for(const n of r)t.add(n.address);return t},ja=e=>new Promise((t,r)=>{const n=id.createServer();n.unref(),n.on("error",r),n.listen(e,()=>{const{port:i}=n.address();n.close(()=>{t(i)})})}),La=async(e,t)=>{if(e.host||e.port===0)return ja(e);for(const r of t)
267
- try{await ja({port:e.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return e.port},wp=function*(e){e&&(yield*e),yield 0};async function ss(e){let t,r=new Set;if(e&&(e.port&&(t=typeof e.port=="number"?[e.port]:e.port),e.exclude)){const i=e.exclude;if(typeof i[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(const o of i){if(typeof o!="number")throw new TypeError("Each item in the `exclude` option must be a number cor\
268
- responding to the port you want excluded.");if(!Number.isSafeInteger(o))throw new TypeError(`Number ${o} in the exclude option is not a safe integer and can't be used`)}r=new Set(i)}kt===void 0&&(kt=setTimeout(()=>{kt=void 0,dt.old=dt.young,dt.young=new Set},$p),kt.unref&&kt.unref());const n=_p();for(const i of wp(t))try{if(r.has(i))continue;let o=await La({...e,port:i},n);for(;dt.old.has(o)||dt.young.has(o);){if(i!==0)throw new Ia(i);o=await La({...e,port:i},n)}return dt.young.add(o),o}catch(o){
269
- if(!["EADDRINUSE","EACCES"].includes(o.code)&&!(o instanceof Ia))throw o}throw new Error("No available ports found")}function Yt(e,t){if(!Number.isInteger(e)||!Number.isInteger(t))throw new TypeError("`from` and `to` must be integer numbers");if(e<Xt||e>Jt)throw new RangeError(`'from' must be between ${Xt} and ${Jt}`);if(t<Xt||t>Jt)throw new RangeError(`'to' must be between ${Xt} and ${Jt}`);if(e>t)throw new RangeError("`to` must be greater than or equal to `from`");return function*(n,i){for(let o=n;o<=
270
- i;o++)yield o}(e,t)}async function Da({buildWebcomponent:e=!0,hmr:t=!0,webcomponentPrefix:r="likec4",title:n,languageServices:i,likec4AssetsDir:o,openBrowser:a,listen:s,port:u,...c}){o??=await Ft(Et(Vt(),".likec4-assets-"));const{isDev:l,...m}=await es({...c,languageServices:i,likec4AssetsDir:o,webcomponentPrefix:r,title:n}),y=m.customLogger,_=u??(Vo.PORT?parseInt(Vo.PORT,10):5173),S=await ss({port:[_,...Yt(61e3,61010),...Yt(62002,62010)]}),g=await ss({port:Yt(24678,24690)}),p=await On(),h=s??(Fe()?
271
- "0.0.0.0":"localhost");t?(y.info(`Enabling HMR: localhost:${g}`),Fe()&&y.info(j.yellow(`ensure port ${g} is published from container`))):y.info("Disabling HMR");const f=await sd({...m,define:t?{...m.define,"process.env.NODE_ENV":'"development"'}:m.define,mode:t?"development":m.mode,publicDir:p,server:{host:h,allowedHosts:!0,port:S,hmr:t&&{overlay:!0,port:g},fs:{strict:!1},open:a??(!l&&!Fe())}});return await f.listen(),e?(y.info("Building webcomponent"),(async()=>{try{const d=await ts({webcomponentPrefix:r,
272
- languageServices:i,outDir:p,base:m.base});await At({...d,logLevel:"warn"})}catch(d){y.warn(Mt(d)),y.warn("webcomponent build failed, ignoring error and continue")}})()):y.info("Skip webcomponent build"),f}async function bp({browserContext:e,views:t,output:r,logger:n,timeout:i,maxAttempts:o,dynamicVariant:a,outputType:s,theme:u}){let c;const l=t.map(_=>({view:_,attempt:1})),m=[];let y;for(;y=l.shift();){const{view:_,attempt:S}=y,g=`export/${encodeURIComponent(_.id)}/`;try{if(S>1){c&&(c.close({runBeforeUnload:!0}).
273
- catch($=>n.error(`failed to close page: ${$}`)),c=void 0);const v=jo(S*200,{min:200,max:1e3});n.info(j.cyan(g)+j.dim(` attempt ${S} of ${o} after ${v}ms`)),await cd(v)}else _.hasLayoutDrift&&n.warn(j.yellow("Drift detected, manual layout can not be applied, view may be invalid: ")+j.red(_.id));let p=".";s==="relative"&&(p=_.sourcePath??".",p.includes("/")?p=p.slice(0,p.lastIndexOf("/")):p=".");const h=oe(r,p,`${_.id}.png`);c??=await e.newPage();let f=_.bounds;a==="sequence"&&_._type==="dynamic"&&
274
- (f=_.sequenceLayout.bounds);const d=20;await c.setViewportSize({width:f.width+40+d,height:f.height+40+d}),await c.goto(jf(g,{padding:20,theme:u,dynamic:a})),n.info(j.cyan(g)+j.dim(` -> ${Ue(r,h)}`)),await c.waitForSelector(".react-flow.initialized"),_.nodes.some(v=>Lf(v.icon)&&v.icon.toLowerCase().startsWith("http"))&&await Ep(c,i),await c.getByTestId("export-page").screenshot({animations:"disabled",path:h,omitBackground:!0}),m.push({view:_,path:h})}catch(p){c?.close({runBeforeUnload:!0}).catch(
275
- h=>n.error(`failed to close page: ${h}`)),n.error(j.red("failed "+g+`
276
- `+p)),S<o&&(l.push({view:_,attempt:S+1}),n.info(j.dim(`retry ${g}`))),c=void 0}}return m}async function Ep(e,t){let r=await e.locator("//img").all();if(!r.length)return;const n=r.map(i=>i.evaluate(o=>o.complete||new Promise(a=>{o.onload=a,o.onerror=a}),{timeout:Math.max(15e3,t)}));await Promise.allSettled(n)}var qa=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),xa=e=>{throw TypeError(e)},Sp=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&xa("Object expected");var n,i;n=t[qa("asyn\
277
- cDispose")],n===void 0&&(n=t[qa("dispose")],i=n),typeof n!="function"&&xa("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(o){return Promise.reject(o)}}),e.push([r,n,t])}else e.push([r]);return t},Rp=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(a,s,u,c){return c=Error(u),c.name="SuppressedError",c.error=a,c.suppressed=s,c},i=a=>t=r?new n(a,t,"An error was suppressed during disposal"):(r=!0,a),o=a=>{for(;a=e.pop();)try{var s=a[1]&&a[1].call(a[2]);if(a[0])
278
- return Promise.resolve(s).then(o,u=>(i(u),o()))}catch(u){i(u)}if(r)throw t};return o()};async function Ma({logger:e,serverUrl:t,theme:r="light",timeoutMs:n=15e3,views:i,output:o,outputType:a="relative",maxAttempts:s=3,chromiumSandbox:u=!1,sequence:c=!1}){e.info(`${j.dim("output")} ${o}`),e.info(`${j.dim("base url")} ${t}
279
- `);const{chromium:l}=await import("playwright"),m=l.executablePath();e.info(j.cyan("Start chromium")+" "+j.dim(m));const y=await l.launch({chromiumSandbox:u,headless:!0});e.info(j.cyan("Color scheme: ")+r+`
280
- `);const _=await y.newContext({deviceScaleFactor:2,colorScheme:r,baseURL:t,bypassCSP:!0,ignoreHTTPSErrors:!0,isMobile:!1});_.setDefaultNavigationTimeout(n),_.setDefaultTimeout(n);try{return await bp({browserContext:_,views:i,output:o,outputType:a,logger:e,maxAttempts:s,dynamicVariant:c?"sequence":"diagram",timeout:n,theme:r})}finally{e.info(j.cyan("close chromium")),await _.close(),await y.close()}}async function Ha({path:e,useDotBin:t,theme:r="light",output:n,outputType:i,serverUrl:o,ignore:a=!1,
281
- timeoutMs:s=1e4,maxAttempts:u=3,filter:c,sequence:l=!1,chromiumSandbox:m=!1}){var y=[];try{const p=Te("export"),h=Vf(),f=Sp(y,await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm",watch:!1}),!0);n??=f.workspace;let d;const v=f.languageServices.projects();if(!o&&(p.info(j.cyan("start preview server")),d=await Da({languageServices:f,buildWebcomponent:!1,openBrowser:!1,useOverviewGraph:!1,hmr:!1}),o=Na(d),!o))throw p.error("Vite server is not ready, no resolvedUrls"),new Error("Vite se\
282
- rver is not ready, no resolvedUrls");for(const $ of v){v.length>1&&(p.info(j.dim("---------")),p.info(`${j.dim("project:")} ${$.id}`),p.info(`${j.dim("folder:")} ${$.folder.fsPath}`));let w=await f.diagrams($.id);if(c&&bt(c,1)&&bt(w,1)){const x=Df(c);p.info(`${j.cyan("filter")} ${j.dim(JSON.stringify(c))}`),w=w.filter(H=>x(H.id)?(p.info(`${j.green("include")} ${H.id} \u2705`),!0):(p.info(`${j.gray("skip")} ${j.dim(H.id)}`),!1))}if(!bt(w,1)){p.warn("no views found");continue}let E=v.length>1?No(Lo(
283
- o,"project",$.id)):o,P=v.length>1?Lo(n,$.id):n;const O=await Ma({logger:p,serverUrl:E,theme:r,timeoutMs:s,views:w,output:P,outputType:i,maxAttempts:u,sequence:l,chromiumSandbox:m}),{pretty:U}=qf(h);if(O.length>0&&p.info(j.green(`exported ${O.length} views in ${U}`)+`
284
- `),O.length!==w.length&&(a&&O.length>0?p.info(j.dim("ignore")+" "+j.red(`failed ${w.length-O.length} out of ${w.length} views`)):p.error(j.red(`failed ${w.length-O.length} out of ${w.length} views`))),O.length!==w.length&&(O.length===0||!a))throw new Error(`Failed ${w.length-O.length} out of ${w.length} views`)}d&&(p.info(j.cyan("stop server")),await d.close().catch($=>{p.error($)}))}catch(p){var _=p,S=!0}finally{var g=Rp(y,_,S);g&&await g}}var Ua=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Fa=e=>{
285
- throw TypeError(e)},Ap=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Fa("Object expected");var n,i;n=t[Ua("asyncDispose")],n===void 0&&(n=t[Ua("dispose")],i=n),typeof n!="function"&&Fa("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(o){return Promise.reject(o)}}),e.push([r,n,t])}else e.push([r]);return t},Pp=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(a,s,u,c){return c=Error(u),c.name="SuppressedError",c.error=a,c.suppressed=s,c},
286
- i=a=>t=r?new n(a,t,"An error was suppressed during disposal"):(r=!0,a),o=a=>{for(;a=e.pop();)try{var s=a[1]&&a[1].call(a[2]);if(a[0])return Promise.resolve(s).then(o,u=>(i(u),o()))}catch(u){i(u)}if(r)throw t};return o()};const{cyan:Va,dim:za}=j;async function Cp({path:e,useDotBin:t,useHashHistory:r,webcomponentPrefix:n,title:i,useOverview:o=!1,output:a,outputSingleFile:s,base:u}){var c=[];try{await Ct();const _=Te("c4:build"),S=Ap(c,await Pe.fromWorkspace(e,{graphviz:t?"binary":"wasm",logger:"vi\
287
- te",watch:!1}),!0),g=a??oe(S.workspace,"dist");let p=oe(g,"assets");if(o)try{p=oe(g,"assets","previews"),await xe(p,{recursive:!0}),_.info(`${Va("Generate previews")} ${za(p)}
288
- `),await Ha({path:e,useDotBin:t,output:p,outputType:"flat",ignore:!0})}catch(h){_.error(j.red("Failed to generate previews")),_.error(h),_.warn(j.yellow("Ignore previews and continue build")),$n(p,{recursive:!0,force:!0}),o=!1}await sp({base:u,useHashHistory:s||r,customLogger:_,useOverviewGraph:o,webcomponentPrefix:n,title:i,languageServices:S,likec4AssetsDir:p,outputDir:a,outputSingleFile:s}),o&&(_.info(`${Va("clean previews")} ${za(p)}`),$n(p,{recursive:!0,force:!0}))}catch(_){var l=_,m=!0}finally{
289
- var y=Pp(c,l,m);y&&await y}}const kp=e=>e.command({command:"build [path]",aliases:["bundle"],describe:"Build a static website",builder:t=>t.positional("path",be).option("output",{alias:"o",type:"string",desc:"output directory for production build",normalize:!0,coerce:oe}).option("base",ta).option("use-hash-history",Zo).option("use-dot",Re).option("webcomponent-prefix",kn).option("title",ea).option("output-single-file",Ed).example(`${j.green("$0 build -o ./build ./src")}`,j.gray("Search for likec\
290
- 4 files in 'src' and output static site to 'build'")),handler:async t=>{await Cp({path:t.path,output:t.output,base:t.base,useHashHistory:t["use-hash-history"],useDotBin:t["use-dot"],webcomponentPrefix:t["webcomponent-prefix"],title:t.title,outputSingleFile:t["output-single-file"]??!1})}}),rt=e=>{const t=typeof e;return e!==null&&(t==="object"||t==="function")},os=new Set(["__proto__","prototype","constructor"]),Tp=new Set("0123456789");function Qt(e){const t=[];let r="",n="start",i=!1;for(const o of e)
291
- switch(o){case"\\":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");i&&(r+=o),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+=o;break}if(os.has(r))return[];t.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+=o;
292
- break}if(n==="property"){if(os.has(r))return[];t.push(r),r=""}n="index";break}case"]":{if(n==="index"){t.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!Tp.has(o))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+=o}}switch(i&&(r+="\\"),n){case"property":{if(os.has(r))return[];t.push(
293
- r);break}case"index":throw new Error("Index was not closed");case"start":{t.push("");break}}return t}function as(e,t){if(typeof t!="number"&&Array.isArray(e)){const r=Number.parseInt(t,10);return Number.isInteger(r)&&e[r]===e[t]}return!1}function Ga(e,t){if(as(e,t))throw new Error("Cannot use string index")}function Np(e,t,r){if(!rt(e)||typeof t!="string")return r===void 0?e:r;const n=Qt(t);if(n.length===0)return r;for(let i=0;i<n.length;i++){const o=n[i];if(as(e,o)?e=i===n.length-1?void 0:null:
294
- e=e[o],e==null){if(i!==n.length-1)return r;break}}return e===void 0?r:e}function Ba(e,t,r){if(!rt(e)||typeof t!="string")return e;const n=e,i=Qt(t);for(let o=0;o<i.length;o++){const a=i[o];Ga(e,a),o===i.length-1?e[a]=r:rt(e[a])||(e[a]=typeof i[o+1]=="number"?[]:{}),e=e[a]}return n}function Op(e,t){if(!rt(e)||typeof t!="string")return!1;const r=Qt(t);for(let n=0;n<r.length;n++){const i=r[n];if(Ga(e,i),n===r.length-1)return delete e[i],!0;if(e=e[i],!rt(e))return!1}}function Ip(e,t){if(!rt(e)||typeof t!=
295
- "string")return!1;const r=Qt(t);if(r.length===0)return!1;for(const n of r){if(!rt(e)||!(n in e)||as(e,n))return!1;e=e[n]}return!0}const Je=Rt.homedir(),is=Rt.tmpdir(),{env:pt}=me,jp=e=>{const t=ie.join(Je,"Library");return{data:ie.join(t,"Application Support",e),config:ie.join(t,"Preferences",e),cache:ie.join(t,"Caches",e),log:ie.join(t,"Logs",e),temp:ie.join(is,e)}},Lp=e=>{const t=pt.APPDATA||ie.join(Je,"AppData","Roaming"),r=pt.LOCALAPPDATA||ie.join(Je,"AppData","Local");return{data:ie.join(r,
296
- e,"Data"),config:ie.join(t,e,"Config"),cache:ie.join(r,e,"Cache"),log:ie.join(r,e,"Log"),temp:ie.join(is,e)}},Dp=e=>{const t=ie.basename(Je);return{data:ie.join(pt.XDG_DATA_HOME||ie.join(Je,".local","share"),e),config:ie.join(pt.XDG_CONFIG_HOME||ie.join(Je,".config"),e),cache:ie.join(pt.XDG_CACHE_HOME||ie.join(Je,".cache"),e),log:ie.join(pt.XDG_STATE_HOME||ie.join(Je,".local","state"),e),temp:ie.join(is,t,e)}};function qp(e,{suffix:t="nodejs"}={}){if(typeof e!="string")throw new TypeError(`Expec\
297
- ted a string, got ${typeof e}`);return t&&(e+=`-${t}`),me.platform==="darwin"?jp(e):me.platform==="win32"?Lp(e):Dp(e)}const Ye=(e,t)=>function(...n){return e.apply(void 0,n).catch(t)},Ve=(e,t)=>function(...n){try{return e.apply(void 0,n)}catch(i){return t(i)}},xp=me.getuid?!me.getuid():!1,Mp=1e4,Ce=()=>{},pe={isChangeErrorOk:e=>{if(!pe.isNodeError(e))return!1;const{code:t}=e;return t==="ENOSYS"||!xp&&(t==="EINVAL"||t==="EPERM")},isNodeError:e=>e instanceof Error,isRetriableError:e=>{if(!pe.isNodeError(
298
- e))return!1;const{code:t}=e;return t==="EMFILE"||t==="ENFILE"||t==="EAGAIN"||t==="EBUSY"||t==="EACCESS"||t==="EACCES"||t==="EACCS"||t==="EPERM"},onChangeError:e=>{if(!pe.isNodeError(e))throw e;if(!pe.isChangeErrorOk(e))throw e}};class Hp{constructor(){this.interval=25,this.intervalId=void 0,this.limit=Mp,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),
299
- delete this.intervalId)},this.add=t=>{this.queueWaiting.add(t),this.queueActive.size<this.limit/2?this.tick():this.init()},this.remove=t=>{this.queueWaiting.delete(t),this.queueActive.delete(t)},this.schedule=()=>new Promise(t=>{const r=()=>this.remove(n),n=()=>t(r);this.add(n)}),this.tick=()=>{if(!(this.queueActive.size>=this.limit)){if(!this.queueWaiting.size)return this.reset();for(const t of this.queueWaiting){if(this.queueActive.size>=this.limit)break;this.queueWaiting.delete(t),this.queueActive.
300
- add(t),t()}}}}}const Up=new Hp,Qe=(e,t)=>function(n){return function i(...o){return Up.schedule().then(a=>{const s=c=>(a(),c),u=c=>{if(a(),Date.now()>=n)throw c;if(t(c)){const l=Math.round(100*Math.random());return new Promise(y=>setTimeout(y,l)).then(()=>i.apply(void 0,o))}throw c};return e.apply(void 0,o).then(s,u)})}},Ze=(e,t)=>function(n){return function i(...o){try{return e.apply(void 0,o)}catch(a){if(Date.now()>n)throw a;if(t(a))return i.apply(void 0,o);throw a}}},$e={attempt:{chmod:Ye(ve(
301
- se.chmod),pe.onChangeError),chown:Ye(ve(se.chown),pe.onChangeError),close:Ye(ve(se.close),Ce),fsync:Ye(ve(se.fsync),Ce),mkdir:Ye(ve(se.mkdir),Ce),realpath:Ye(ve(se.realpath),Ce),stat:Ye(ve(se.stat),Ce),unlink:Ye(ve(se.unlink),Ce),chmodSync:Ve(se.chmodSync,pe.onChangeError),chownSync:Ve(se.chownSync,pe.onChangeError),closeSync:Ve(se.closeSync,Ce),existsSync:Ve(se.existsSync,Ce),fsyncSync:Ve(se.fsync,Ce),mkdirSync:Ve(se.mkdirSync,Ce),realpathSync:Ve(se.realpathSync,Ce),statSync:Ve(se.statSync,Ce),
302
- unlinkSync:Ve(se.unlinkSync,Ce)},retry:{close:Qe(ve(se.close),pe.isRetriableError),fsync:Qe(ve(se.fsync),pe.isRetriableError),open:Qe(ve(se.open),pe.isRetriableError),readFile:Qe(ve(se.readFile),pe.isRetriableError),rename:Qe(ve(se.rename),pe.isRetriableError),stat:Qe(ve(se.stat),pe.isRetriableError),write:Qe(ve(se.write),pe.isRetriableError),writeFile:Qe(ve(se.writeFile),pe.isRetriableError),closeSync:Ze(se.closeSync,pe.isRetriableError),fsyncSync:Ze(se.fsyncSync,pe.isRetriableError),openSync:Ze(
267
+ `))}class Ia extends Error{constructor(t){super(`${t} is locked`)}}const dt={old:new Set,young:new Set},$p=1e3*15,Xt=1024,Jt=65535;let Tt;const _p=()=>{const e=Rt.networkInterfaces(),t=new Set([void 0,"0.0.0.0"]);for(const r of Object.values(e))for(const n of r)t.add(n.address);return t},ja=e=>new Promise((t,r)=>{const n=id.createServer();n.unref(),n.on("error",r),n.listen(e,()=>{const{port:i}=n.address();n.close(()=>{t(i)})})}),La=async(e,t)=>{if(e.host||e.port===0)return ja(e);for(const r of t)
268
+ try{await ja({port:e.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return e.port},wp=function*(e){e&&(yield*e),yield 0};async function ss(e){let t,r=new Set;if(e&&(e.port&&(t=typeof e.port=="number"?[e.port]:e.port),e.exclude)){const i=e.exclude;if(typeof i[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(const a of i){if(typeof a!="number")throw new TypeError("Each item in the `exclude` option must be a number cor\
269
+ responding to the port you want excluded.");if(!Number.isSafeInteger(a))throw new TypeError(`Number ${a} in the exclude option is not a safe integer and can't be used`)}r=new Set(i)}Tt===void 0&&(Tt=setTimeout(()=>{Tt=void 0,dt.old=dt.young,dt.young=new Set},$p),Tt.unref&&Tt.unref());const n=_p();for(const i of wp(t))try{if(r.has(i))continue;let a=await La({...e,port:i},n);for(;dt.old.has(a)||dt.young.has(a);){if(i!==0)throw new Ia(i);a=await La({...e,port:i},n)}return dt.young.add(a),a}catch(a){
270
+ if(!["EADDRINUSE","EACCES"].includes(a.code)&&!(a instanceof Ia))throw a}throw new Error("No available ports found")}function Yt(e,t){if(!Number.isInteger(e)||!Number.isInteger(t))throw new TypeError("`from` and `to` must be integer numbers");if(e<Xt||e>Jt)throw new RangeError(`'from' must be between ${Xt} and ${Jt}`);if(t<Xt||t>Jt)throw new RangeError(`'to' must be between ${Xt} and ${Jt}`);if(e>t)throw new RangeError("`to` must be greater than or equal to `from`");return function*(n,i){for(let a=n;a<=
271
+ i;a++)yield a}(e,t)}async function Da({buildWebcomponent:e=!0,hmr:t=!0,webcomponentPrefix:r="likec4",title:n,languageServices:i,likec4AssetsDir:a,openBrowser:o,listen:s,port:u,...c}){a??=await Vt(Et(zt(),".likec4-assets-"));const{isDev:l,...m}=await es({...c,languageServices:i,likec4AssetsDir:a,webcomponentPrefix:r,title:n}),y=m.customLogger;u??=Vo.PORT?parseInt(Vo.PORT,10):void 0,u||(u=await ss({port:[5173,5174,...Yt(61e3,61010),...Yt(62002,62010)]}));const _=await ss({port:Yt(24678,24690)}),S=await Nn(),
272
+ g=s??(Xe()?"0.0.0.0":"localhost");t?(y.info(`Enabling HMR: localhost:${_}`),Xe()&&y.info(N.yellow(`ensure port ${_} is published from container`))):y.info("Disabling HMR");const h=await sd({...m,define:t?{...m.define,"process.env.NODE_ENV":'"development"'}:m.define,mode:t?"development":m.mode,publicDir:S,server:{host:g,allowedHosts:!0,port:u,hmr:t&&{overlay:!0,port:_},fs:{strict:!1},open:o??(!l&&!Xe())}});return e?(y.info("Building webcomponent"),ts({webcomponentPrefix:r,languageServices:i,outDir:S,
273
+ base:m.base}).then(p=>At({...p,logLevel:"warn"})).catch(p=>{y.warn(Ht(p)),y.warn("webcomponent build failed, ignoring error and continue")})):y.info("Skip webcomponent build"),await h.listen(),h}async function bp({browserContext:e,views:t,output:r,logger:n,timeout:i,maxAttempts:a,dynamicVariant:o,outputType:s,theme:u}){let c;const l=t.map(_=>({view:_,attempt:1})),m=[];let y;for(;y=l.shift();){const{view:_,attempt:S}=y,g=`export/${encodeURIComponent(_.id)}/`;try{if(S>1){c&&(c.close({runBeforeUnload:!0}).
274
+ catch($=>n.error(`failed to close page: ${$}`)),c=void 0);const v=jo(S*200,{min:200,max:1e3});n.info(N.cyan(g)+N.dim(` attempt ${S} of ${a} after ${v}ms`)),await cd(v)}else _.hasLayoutDrift&&n.warn(N.yellow("Drift detected, manual layout can not be applied, view may be invalid: ")+N.red(_.id));let h=".";s==="relative"&&(h=_.sourcePath??".",h.includes("/")?h=h.slice(0,h.lastIndexOf("/")):h=".");const p=oe(r,h,`${_.id}.png`);c??=await e.newPage();let f=_.bounds;o==="sequence"&&_._type==="dynamic"&&
275
+ (f=_.sequenceLayout.bounds);const d=20;await c.setViewportSize({width:f.width+40+d,height:f.height+40+d}),await c.goto(jf(g,{padding:20,theme:u,dynamic:o})),n.info(N.cyan(g)+N.dim(` -> ${Ue(r,p)}`)),await c.waitForSelector(".react-flow.initialized"),_.nodes.some(v=>Lf(v.icon)&&v.icon.toLowerCase().startsWith("http"))&&await Ep(c,i),await c.getByTestId("export-page").screenshot({animations:"disabled",path:p,omitBackground:!0}),m.push({view:_,path:p})}catch(h){c?.close({runBeforeUnload:!0}).catch(
276
+ p=>n.error(`failed to close page: ${p}`)),n.error(N.red("failed "+g+`
277
+ `+h)),S<a&&(l.push({view:_,attempt:S+1}),n.info(N.dim(`retry ${g}`))),c=void 0}}return m}async function Ep(e,t){let r=await e.locator("//img").all();if(!r.length)return;const n=r.map(i=>i.evaluate(a=>a.complete||new Promise(o=>{a.onload=o,a.onerror=o}),{timeout:Math.max(15e3,t)}));await Promise.allSettled(n)}var qa=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),xa=e=>{throw TypeError(e)},Sp=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&xa("Object expected");var n,i;n=t[qa("asyn\
278
+ cDispose")],n===void 0&&(n=t[qa("dispose")],i=n),typeof n!="function"&&xa("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),e.push([r,n,t])}else e.push([r]);return t},Rp=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,s,u,c){return c=Error(u),c.name="SuppressedError",c.error=o,c.suppressed=s,c},i=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),a=o=>{for(;o=e.pop();)try{var s=o[1]&&o[1].call(o[2]);if(o[0])
279
+ return Promise.resolve(s).then(a,u=>(i(u),a()))}catch(u){i(u)}if(r)throw t};return a()};async function Ma({logger:e,serverUrl:t,theme:r="light",timeoutMs:n=15e3,views:i,output:a,outputType:o="relative",maxAttempts:s=3,chromiumSandbox:u=!1,sequence:c=!1}){e.info(`${N.dim("output")} ${a}`),e.info(`${N.dim("base url")} ${t}
280
+ `);const{chromium:l}=await import("playwright"),m=l.executablePath();e.info(N.cyan("Start chromium")+" "+N.dim(m));const y=await l.launch({chromiumSandbox:u,headless:!0});e.info(N.cyan("Color scheme: ")+r+`
281
+ `);const _=await y.newContext({deviceScaleFactor:2,colorScheme:r,baseURL:t,bypassCSP:!0,ignoreHTTPSErrors:!0,isMobile:!1});_.setDefaultNavigationTimeout(n),_.setDefaultTimeout(n);try{return await bp({browserContext:_,views:i,output:a,outputType:o,logger:e,maxAttempts:s,dynamicVariant:c?"sequence":"diagram",timeout:n,theme:r})}finally{e.info(N.cyan("close chromium")),await _.close(),await y.close()}}async function Ha({path:e,useDotBin:t,project:r,theme:n="light",output:i,outputType:a,serverUrl:o,
282
+ ignore:s=!1,timeoutMs:u=1e4,maxAttempts:c=3,filter:l,sequence:m=!1,chromiumSandbox:y=!1}){var _=[];try{const p=Te("export"),f=Vf(),d=Sp(_,await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm",watch:!1}),!0);i??=d.workspace;let v,$=[...d.languageServices.projects()];if(r&&!$.some(w=>w.id===r))throw p.error(`project not found: ${r}`),new Error(`project not found: ${r}`);if(!o&&(p.info(N.cyan("start preview server")),v=await Da({languageServices:d,buildWebcomponent:!1,openBrowser:!1,useOverviewGraph:!1,
283
+ hmr:!1}),o=Oa(v),!o))throw p.error("Vite server is not ready, no resolvedUrls"),new Error("Vite server is not ready, no resolvedUrls");for(const w of $){if(r&&w.id!==r)continue;$.length>1&&(p.info(N.dim("---------")),p.info(`${N.dim("project:")} ${w.id}`),p.info(`${N.dim("folder:")} ${w.folder.fsPath}`));let b=await d.diagrams(w.id);if(l&&bt(l,1)&&bt(b,1)){const U=Df(l);p.info(`${N.cyan("filter")} ${N.dim(JSON.stringify(l))}`),b=b.filter(L=>U(L.id)?(p.info(`${N.green("include")} ${L.id} \u2705`),
284
+ !0):(p.info(`${N.gray("skip")} ${N.dim(L.id)}`),!1))}if(!bt(b,1)){p.warn("no views found");continue}let P=$.length>1?Oo(Lo(o,"project",w.id)):o,I=$.length>1?Lo(i,w.id):i;const H=await Ma({logger:p,serverUrl:P,theme:n,timeoutMs:u,views:b,output:I,outputType:a,maxAttempts:c,sequence:m,chromiumSandbox:y}),{pretty:x}=qf(f);if(H.length>0&&p.info(N.green(`exported ${H.length} views in ${x}`)+`
285
+ `),H.length!==b.length&&(s&&H.length>0?p.info(N.dim("ignore")+" "+N.red(`failed ${b.length-H.length} out of ${b.length} views`)):p.error(N.red(`failed ${b.length-H.length} out of ${b.length} views`))),H.length!==b.length&&(H.length===0||!s))throw new Error(`Failed ${b.length-H.length} out of ${b.length} views`)}v&&(p.info(N.cyan("stop server")),await v.close().catch(w=>{p.error(w)}))}catch(p){var S=p,g=!0}finally{var h=Rp(_,S,g);h&&await h}}var Ua=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Fa=e=>{
286
+ throw TypeError(e)},Ap=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Fa("Object expected");var n,i;n=t[Ua("asyncDispose")],n===void 0&&(n=t[Ua("dispose")],i=n),typeof n!="function"&&Fa("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),e.push([r,n,t])}else e.push([r]);return t},Pp=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,s,u,c){return c=Error(u),c.name="SuppressedError",c.error=o,c.suppressed=s,c},
287
+ i=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),a=o=>{for(;o=e.pop();)try{var s=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(s).then(a,u=>(i(u),a()))}catch(u){i(u)}if(r)throw t};return a()};const{cyan:Va,dim:za}=N;async function Cp({path:e,useDotBin:t,useHashHistory:r,webcomponentPrefix:n,title:i,useOverview:a=!1,output:o,outputSingleFile:s,base:u}){var c=[];try{await kt();const _=Te("c4:build"),S=Ap(c,await Pe.fromWorkspace(e,{graphviz:t?"binary":"wasm",logger:"vi\
288
+ te",watch:!1}),!0),g=o??oe(S.workspace,"dist");let h=oe(g,"assets");if(a)try{h=oe(g,"assets","previews"),await xe(h,{recursive:!0}),_.info(`${Va("Generate previews")} ${za(h)}
289
+ `),await Ha({path:e,useDotBin:t,project:void 0,output:h,outputType:"flat",ignore:!0})}catch(p){_.error(N.red("Failed to generate previews")),_.error(p),_.warn(N.yellow("Ignore previews and continue build")),$n(h,{recursive:!0,force:!0}),a=!1}await sp({base:u,useHashHistory:s||r,customLogger:_,useOverviewGraph:a,webcomponentPrefix:n,title:i,languageServices:S,likec4AssetsDir:h,outputDir:o,outputSingleFile:s}),a&&(_.info(`${Va("clean previews")} ${za(h)}`),$n(h,{recursive:!0,force:!0}))}catch(_){var l=_,
290
+ m=!0}finally{var y=Pp(c,l,m);y&&await y}}const kp=e=>e.command({command:"build [path]",aliases:["bundle"],describe:"Build a static website",builder:t=>t.positional("path",be).option("output",{alias:"o",type:"string",desc:"output directory for production build",normalize:!0,coerce:oe}).option("base",ta).option("use-hash-history",Zo).option("use-dot",Re).option("webcomponent-prefix",kn).option("title",ea).option("output-single-file",Ed).example(`${N.green("$0 build -o ./build ./src")}`,N.gray("Sea\
291
+ rch for likec4 files in 'src' and output static site to 'build'")),handler:async t=>{await Cp({path:t.path,output:t.output,base:t.base,useHashHistory:t["use-hash-history"],useDotBin:t["use-dot"],webcomponentPrefix:t["webcomponent-prefix"],title:t.title,outputSingleFile:t["output-single-file"]??!1})}}),rt=e=>{const t=typeof e;return e!==null&&(t==="object"||t==="function")},os=new Set(["__proto__","prototype","constructor"]),Tp=new Set("0123456789");function Qt(e){const t=[];let r="",n="start",i=!1;
292
+ for(const a of e)switch(a){case"\\":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");i&&(r+=a),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+=a;break}if(os.has(r))return[];t.push(r),r="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}
293
+ if(i){i=!1,r+=a;break}if(n==="property"){if(os.has(r))return[];t.push(r),r=""}n="index";break}case"]":{if(n==="index"){t.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!Tp.has(a))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+=a}}switch(i&&(r+="\\"),n){case"property":{if(os.has(r))
294
+ return[];t.push(r);break}case"index":throw new Error("Index was not closed");case"start":{t.push("");break}}return t}function as(e,t){if(typeof t!="number"&&Array.isArray(e)){const r=Number.parseInt(t,10);return Number.isInteger(r)&&e[r]===e[t]}return!1}function Ga(e,t){if(as(e,t))throw new Error("Cannot use string index")}function Op(e,t,r){if(!rt(e)||typeof t!="string")return r===void 0?e:r;const n=Qt(t);if(n.length===0)return r;for(let i=0;i<n.length;i++){const a=n[i];if(as(e,a)?e=i===n.length-
295
+ 1?void 0:null:e=e[a],e==null){if(i!==n.length-1)return r;break}}return e===void 0?r:e}function Ba(e,t,r){if(!rt(e)||typeof t!="string")return e;const n=e,i=Qt(t);for(let a=0;a<i.length;a++){const o=i[a];Ga(e,o),a===i.length-1?e[o]=r:rt(e[o])||(e[o]=typeof i[a+1]=="number"?[]:{}),e=e[o]}return n}function Np(e,t){if(!rt(e)||typeof t!="string")return!1;const r=Qt(t);for(let n=0;n<r.length;n++){const i=r[n];if(Ga(e,i),n===r.length-1)return delete e[i],!0;if(e=e[i],!rt(e))return!1}}function Ip(e,t){if(!rt(
296
+ e)||typeof t!="string")return!1;const r=Qt(t);if(r.length===0)return!1;for(const n of r){if(!rt(e)||!(n in e)||as(e,n))return!1;e=e[n]}return!0}const Je=Rt.homedir(),is=Rt.tmpdir(),{env:pt}=me,jp=e=>{const t=ie.join(Je,"Library");return{data:ie.join(t,"Application Support",e),config:ie.join(t,"Preferences",e),cache:ie.join(t,"Caches",e),log:ie.join(t,"Logs",e),temp:ie.join(is,e)}},Lp=e=>{const t=pt.APPDATA||ie.join(Je,"AppData","Roaming"),r=pt.LOCALAPPDATA||ie.join(Je,"AppData","Local");return{data:ie.
297
+ join(r,e,"Data"),config:ie.join(t,e,"Config"),cache:ie.join(r,e,"Cache"),log:ie.join(r,e,"Log"),temp:ie.join(is,e)}},Dp=e=>{const t=ie.basename(Je);return{data:ie.join(pt.XDG_DATA_HOME||ie.join(Je,".local","share"),e),config:ie.join(pt.XDG_CONFIG_HOME||ie.join(Je,".config"),e),cache:ie.join(pt.XDG_CACHE_HOME||ie.join(Je,".cache"),e),log:ie.join(pt.XDG_STATE_HOME||ie.join(Je,".local","state"),e),temp:ie.join(is,t,e)}};function qp(e,{suffix:t="nodejs"}={}){if(typeof e!="string")throw new TypeError(
298
+ `Expected a string, got ${typeof e}`);return t&&(e+=`-${t}`),me.platform==="darwin"?jp(e):me.platform==="win32"?Lp(e):Dp(e)}const Ye=(e,t)=>function(...n){return e.apply(void 0,n).catch(t)},Fe=(e,t)=>function(...n){try{return e.apply(void 0,n)}catch(i){return t(i)}},xp=me.getuid?!me.getuid():!1,Mp=1e4,Ce=()=>{},pe={isChangeErrorOk:e=>{if(!pe.isNodeError(e))return!1;const{code:t}=e;return t==="ENOSYS"||!xp&&(t==="EINVAL"||t==="EPERM")},isNodeError:e=>e instanceof Error,isRetriableError:e=>{if(!pe.
299
+ isNodeError(e))return!1;const{code:t}=e;return t==="EMFILE"||t==="ENFILE"||t==="EAGAIN"||t==="EBUSY"||t==="EACCESS"||t==="EACCES"||t==="EACCS"||t==="EPERM"},onChangeError:e=>{if(!pe.isNodeError(e))throw e;if(!pe.isChangeErrorOk(e))throw e}};class Hp{constructor(){this.interval=25,this.intervalId=void 0,this.limit=Mp,this.queueActive=new Set,this.queueWaiting=new Set,this.init=()=>{this.intervalId||(this.intervalId=setInterval(this.tick,this.interval))},this.reset=()=>{this.intervalId&&(clearInterval(
300
+ this.intervalId),delete this.intervalId)},this.add=t=>{this.queueWaiting.add(t),this.queueActive.size<this.limit/2?this.tick():this.init()},this.remove=t=>{this.queueWaiting.delete(t),this.queueActive.delete(t)},this.schedule=()=>new Promise(t=>{const r=()=>this.remove(n),n=()=>t(r);this.add(n)}),this.tick=()=>{if(!(this.queueActive.size>=this.limit)){if(!this.queueWaiting.size)return this.reset();for(const t of this.queueWaiting){if(this.queueActive.size>=this.limit)break;this.queueWaiting.delete(
301
+ t),this.queueActive.add(t),t()}}}}}const Up=new Hp,Qe=(e,t)=>function(n){return function i(...a){return Up.schedule().then(o=>{const s=c=>(o(),c),u=c=>{if(o(),Date.now()>=n)throw c;if(t(c)){const l=Math.round(100*Math.random());return new Promise(y=>setTimeout(y,l)).then(()=>i.apply(void 0,a))}throw c};return e.apply(void 0,a).then(s,u)})}},Ze=(e,t)=>function(n){return function i(...a){try{return e.apply(void 0,a)}catch(o){if(Date.now()>n)throw o;if(t(o))return i.apply(void 0,a);throw o}}},$e={attempt:{
302
+ chmod:Ye(ve(se.chmod),pe.onChangeError),chown:Ye(ve(se.chown),pe.onChangeError),close:Ye(ve(se.close),Ce),fsync:Ye(ve(se.fsync),Ce),mkdir:Ye(ve(se.mkdir),Ce),realpath:Ye(ve(se.realpath),Ce),stat:Ye(ve(se.stat),Ce),unlink:Ye(ve(se.unlink),Ce),chmodSync:Fe(se.chmodSync,pe.onChangeError),chownSync:Fe(se.chownSync,pe.onChangeError),closeSync:Fe(se.closeSync,Ce),existsSync:Fe(se.existsSync,Ce),fsyncSync:Fe(se.fsync,Ce),mkdirSync:Fe(se.mkdirSync,Ce),realpathSync:Fe(se.realpathSync,Ce),statSync:Fe(se.statSync,
303
+ Ce),unlinkSync:Fe(se.unlinkSync,Ce)},retry:{close:Qe(ve(se.close),pe.isRetriableError),fsync:Qe(ve(se.fsync),pe.isRetriableError),open:Qe(ve(se.open),pe.isRetriableError),readFile:Qe(ve(se.readFile),pe.isRetriableError),rename:Qe(ve(se.rename),pe.isRetriableError),stat:Qe(ve(se.stat),pe.isRetriableError),write:Qe(ve(se.write),pe.isRetriableError),writeFile:Qe(ve(se.writeFile),pe.isRetriableError),closeSync:Ze(se.closeSync,pe.isRetriableError),fsyncSync:Ze(se.fsyncSync,pe.isRetriableError),openSync:Ze(
303
304
  se.openSync,pe.isRetriableError),readFileSync:Ze(se.readFileSync,pe.isRetriableError),renameSync:Ze(se.renameSync,pe.isRetriableError),statSync:Ze(se.statSync,pe.isRetriableError),writeSync:Ze(se.writeSync,pe.isRetriableError),writeFileSync:Ze(se.writeFileSync,pe.isRetriableError)}},Fp="utf8",Ka=438,Vp=511,zp={},Gp=Rt.userInfo().uid,Bp=Rt.userInfo().gid,Kp=1e3,Wp=!!me.getuid;me.getuid&&me.getuid();const Wa=128,Xp=e=>e instanceof Error&&"code"in e,Xa=e=>typeof e=="string",cs=e=>e===void 0,Jp=me.platform===
304
305
  "linux",Ja=me.platform==="win32",us=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];Ja||us.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),Jp&&us.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");class Yp{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=t=>{if(!this.exited){this.exited=!0;for(const r of this.callbacks)r();t&&(Ja&&t!=="SIGINT"&&t!=="SIGTERM"&&t!=="SIGKILL"?me.kill(me.pid,"SIGTERM"):me.kill(me.pid,t))}},this.hook=()=>{me.
305
306
  once("exit",()=>this.exit());for(const t of us)try{me.once(t,()=>this.exit(t))}catch{}},this.register=t=>(this.callbacks.add(t),()=>{this.callbacks.delete(t)}),this.hook()}}const Qp=new Yp,Zp=Qp.register,_e={store:{},create:e=>{const t=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),i=`.tmp-${Date.now().toString().slice(-10)}${t}`;return`${e}${i}`},get:(e,t,r=!0)=>{const n=_e.truncate(t(e));return n in _e.store?_e.get(e,t,r):(_e.store[n]=r,[n,()=>delete _e.store[n]])},purge:e=>{
306
307
  _e.store[e]&&(delete _e.store[e],$e.attempt.unlink(e))},purgeSync:e=>{_e.store[e]&&(delete _e.store[e],$e.attempt.unlinkSync(e))},purgeSyncAll:()=>{for(const e in _e.store)_e.purgeSync(e)},truncate:e=>{const t=ie.basename(e);if(t.length<=Wa)return e;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(t);if(!r)return e;const n=t.length-Wa;return`${e.slice(0,-t.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};Zp(_e.purgeSyncAll);function Ya(e,t,r=zp){if(Xa(r))return Ya(e,t,{encoding:r});
307
- const n=Date.now()+((r.timeout??Kp)||-1);let i=null,o=null,a=null;try{const s=$e.attempt.realpathSync(e),u=!!s;e=s||e,[o,i]=_e.get(e,r.tmpCreate||_e.create,r.tmpPurge!==!1);const c=Wp&&cs(r.chown),l=cs(r.mode);if(u&&(c||l)){const m=$e.attempt.statSync(e);m&&(r={...r},c&&(r.chown={uid:m.uid,gid:m.gid}),l&&(r.mode=m.mode))}if(!u){const m=ie.dirname(e);$e.attempt.mkdirSync(m,{mode:Vp,recursive:!0})}a=$e.retry.openSync(n)(o,"w",r.mode||Ka),r.tmpCreated&&r.tmpCreated(o),Xa(t)?$e.retry.writeSync(n)(a,
308
- t,0,r.encoding||Fp):cs(t)||$e.retry.writeSync(n)(a,t,0,t.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?$e.retry.fsyncSync(n)(a):$e.attempt.fsync(a)),$e.retry.closeSync(n)(a),a=null,r.chown&&(r.chown.uid!==Gp||r.chown.gid!==Bp)&&$e.attempt.chownSync(o,r.chown.uid,r.chown.gid),r.mode&&r.mode!==Ka&&$e.attempt.chmodSync(o,r.mode);try{$e.retry.renameSync(n)(o,e)}catch(m){if(!Xp(m)||m.code!=="ENAMETOOLONG")throw m;$e.retry.renameSync(n)(o,_e.truncate(e))}i(),o=null}finally{a&&$e.attempt.closeSync(a),o&&_e.
309
- purge(o)}}var Zt={exports:{}},ls={},ze={},nt={},fs={},ds={},ps={},Qa;function er(){return Qa||(Qa=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid\
308
+ const n=Date.now()+((r.timeout??Kp)||-1);let i=null,a=null,o=null;try{const s=$e.attempt.realpathSync(e),u=!!s;e=s||e,[a,i]=_e.get(e,r.tmpCreate||_e.create,r.tmpPurge!==!1);const c=Wp&&cs(r.chown),l=cs(r.mode);if(u&&(c||l)){const m=$e.attempt.statSync(e);m&&(r={...r},c&&(r.chown={uid:m.uid,gid:m.gid}),l&&(r.mode=m.mode))}if(!u){const m=ie.dirname(e);$e.attempt.mkdirSync(m,{mode:Vp,recursive:!0})}o=$e.retry.openSync(n)(a,"w",r.mode||Ka),r.tmpCreated&&r.tmpCreated(a),Xa(t)?$e.retry.writeSync(n)(o,
309
+ t,0,r.encoding||Fp):cs(t)||$e.retry.writeSync(n)(o,t,0,t.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?$e.retry.fsyncSync(n)(o):$e.attempt.fsync(o)),$e.retry.closeSync(n)(o),o=null,r.chown&&(r.chown.uid!==Gp||r.chown.gid!==Bp)&&$e.attempt.chownSync(a,r.chown.uid,r.chown.gid),r.mode&&r.mode!==Ka&&$e.attempt.chmodSync(a,r.mode);try{$e.retry.renameSync(n)(a,e)}catch(m){if(!Xp(m)||m.code!=="ENAMETOOLONG")throw m;$e.retry.renameSync(n)(a,_e.truncate(e))}i(),a=null}finally{o&&$e.attempt.closeSync(o),a&&_e.
310
+ purge(a)}}var Zt={exports:{}},ls={},Ve={},nt={},fs={},ds={},ps={},Qa;function er(){return Qa||(Qa=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid\
310
311
  identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((d,v)=>`${d}${v}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.
311
- reduce((d,v)=>(v instanceof r&&(d[v.str]=(d[v.str]||0)+1),d),{})}}e._Code=n,e.nil=new n("");function i(h,...f){const d=[h[0]];let v=0;for(;v<f.length;)s(d,f[v]),d.push(h[++v]);return new n(d)}e._=i;const o=new n("+");function a(h,...f){const d=[_(h[0])];let v=0;for(;v<f.length;)d.push(o),s(d,f[v]),d.push(o,_(h[++v]));return u(d),new n(d)}e.str=a;function s(h,f){f instanceof n?h.push(...f._items):f instanceof r?h.push(f):h.push(m(f))}e.addCodeArg=s;function u(h){let f=1;for(;f<h.length-1;){if(h[f]===
312
- o){const d=c(h[f-1],h[f+1]);if(d!==void 0){h.splice(f-1,3,d);continue}h[f++]="+"}f++}}function c(h,f){if(f==='""')return h;if(h==='""')return f;if(typeof h=="string")return f instanceof r||h[h.length-1]!=='"'?void 0:typeof f!="string"?`${h.slice(0,-1)}${f}"`:f[0]==='"'?h.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!(h instanceof r))return`"${h}${f.slice(1)}`}function l(h,f){return f.emptyStr()?h:h.emptyStr()?f:a`${h}${f}`}e.strConcat=l;function m(h){return typeof h=="number"||
313
- typeof h=="boolean"||h===null?h:_(Array.isArray(h)?h.join(","):h)}function y(h){return new n(_(h))}e.stringify=y;function _(h){return JSON.stringify(h).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function S(h){return typeof h=="string"&&e.IDENTIFIER.test(h)?new n(`.${h}`):i`[${h}]`}e.getProperty=S;function g(h){if(typeof h=="string"&&e.IDENTIFIER.test(h))return new n(`${h}`);throw new Error(`CodeGen: invalid export name: ${h}, use explicit $id name mapping`)}e.getEsmExportName=
314
- g;function p(h){return new n(h.toString())}e.regexpCode=p})(ps)),ps}var hs={},Za;function ei(){return Za||(Za=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=er();class r extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var n;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("cons\
312
+ reduce((d,v)=>(v instanceof r&&(d[v.str]=(d[v.str]||0)+1),d),{})}}e._Code=n,e.nil=new n("");function i(p,...f){const d=[p[0]];let v=0;for(;v<f.length;)s(d,f[v]),d.push(p[++v]);return new n(d)}e._=i;const a=new n("+");function o(p,...f){const d=[_(p[0])];let v=0;for(;v<f.length;)d.push(a),s(d,f[v]),d.push(a,_(p[++v]));return u(d),new n(d)}e.str=o;function s(p,f){f instanceof n?p.push(...f._items):f instanceof r?p.push(f):p.push(m(f))}e.addCodeArg=s;function u(p){let f=1;for(;f<p.length-1;){if(p[f]===
313
+ a){const d=c(p[f-1],p[f+1]);if(d!==void 0){p.splice(f-1,3,d);continue}p[f++]="+"}f++}}function c(p,f){if(f==='""')return p;if(p==='""')return f;if(typeof p=="string")return f instanceof r||p[p.length-1]!=='"'?void 0:typeof f!="string"?`${p.slice(0,-1)}${f}"`:f[0]==='"'?p.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!(p instanceof r))return`"${p}${f.slice(1)}`}function l(p,f){return f.emptyStr()?p:p.emptyStr()?f:o`${p}${f}`}e.strConcat=l;function m(p){return typeof p=="number"||
314
+ typeof p=="boolean"||p===null?p:_(Array.isArray(p)?p.join(","):p)}function y(p){return new n(_(p))}e.stringify=y;function _(p){return JSON.stringify(p).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function S(p){return typeof p=="string"&&e.IDENTIFIER.test(p)?new n(`.${p}`):i`[${p}]`}e.getProperty=S;function g(p){if(typeof p=="string"&&e.IDENTIFIER.test(p))return new n(`${p}`);throw new Error(`CodeGen: invalid export name: ${p}, use explicit $id name mapping`)}e.getEsmExportName=
315
+ g;function h(p){return new n(p.toString())}e.regexpCode=h})(ps)),ps}var hs={},Za;function ei(){return Za||(Za=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=er();class r extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var n;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("cons\
315
316
  t"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:c,parent:l}={}){this._names={},this._prefixes=c,this._parent=l}toName(c){return c instanceof t.Name?c:this.name(c)}name(c){return new t.Name(this._newName(c))}_newName(c){const l=this._names[c]||this._nameGroup(c);return`${c}${l.index++}`}_nameGroup(c){var l,m;if(!((m=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||m===void 0)&&m.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: \
316
- prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}e.Scope=i;class o extends t.Name{constructor(c,l){super(l),this.prefix=c}setValue(c,{property:l,itemIndex:m}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(l)}[${m}]`}}e.ValueScopeName=o;const a=(0,t._)`\n`;class s extends i{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?a:t.nil}}get(){return this._scope}name(c){return new o(c,this._newName(c))}value(c,l){var m;if(l.
317
- ref===void 0)throw new Error("CodeGen: ref must be passed in value");const y=this.toName(c),{prefix:_}=y,S=(m=l.key)!==null&&m!==void 0?m:l.ref;let g=this._values[_];if(g){const f=g.get(S);if(f)return f}else g=this._values[_]=new Map;g.set(S,y);const p=this._scope[_]||(this._scope[_]=[]),h=p.length;return p[h]=l.ref,y.setValue(l,{property:_,itemIndex:h}),y}getValue(c,l){const m=this._values[c];if(m)return m.get(l)}scopeRefs(c,l=this._values){return this._reduceValues(l,m=>{if(m.scopePath===void 0)
318
- throw new Error(`CodeGen: name "${m}" has no value`);return(0,t._)`${c}${m.scopePath}`})}scopeCode(c=this._values,l,m){return this._reduceValues(c,y=>{if(y.value===void 0)throw new Error(`CodeGen: name "${y}" has no value`);return y.value.code},l,m)}_reduceValues(c,l,m={},y){let _=t.nil;for(const S in c){const g=c[S];if(!g)continue;const p=m[S]=m[S]||new Map;g.forEach(h=>{if(p.has(h))return;p.set(h,n.Started);let f=l(h);if(f){const d=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,t._)`${_}${d} ${h} = ${f};${this.
319
- opts._n}`}else if(f=y?.(h))_=(0,t._)`${_}${f}${this.opts._n}`;else throw new r(h);p.set(h,n.Completed)})}return _}}e.ValueScope=s})(hs)),hs}var ti;function ae(){return ti||(ti=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=er(),r=ei();var n=er();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n.
317
+ prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}e.Scope=i;class a extends t.Name{constructor(c,l){super(l),this.prefix=c}setValue(c,{property:l,itemIndex:m}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(l)}[${m}]`}}e.ValueScopeName=a;const o=(0,t._)`\n`;class s extends i{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?o:t.nil}}get(){return this._scope}name(c){return new a(c,this._newName(c))}value(c,l){var m;if(l.
318
+ ref===void 0)throw new Error("CodeGen: ref must be passed in value");const y=this.toName(c),{prefix:_}=y,S=(m=l.key)!==null&&m!==void 0?m:l.ref;let g=this._values[_];if(g){const f=g.get(S);if(f)return f}else g=this._values[_]=new Map;g.set(S,y);const h=this._scope[_]||(this._scope[_]=[]),p=h.length;return h[p]=l.ref,y.setValue(l,{property:_,itemIndex:p}),y}getValue(c,l){const m=this._values[c];if(m)return m.get(l)}scopeRefs(c,l=this._values){return this._reduceValues(l,m=>{if(m.scopePath===void 0)
319
+ throw new Error(`CodeGen: name "${m}" has no value`);return(0,t._)`${c}${m.scopePath}`})}scopeCode(c=this._values,l,m){return this._reduceValues(c,y=>{if(y.value===void 0)throw new Error(`CodeGen: name "${y}" has no value`);return y.value.code},l,m)}_reduceValues(c,l,m={},y){let _=t.nil;for(const S in c){const g=c[S];if(!g)continue;const h=m[S]=m[S]||new Map;g.forEach(p=>{if(h.has(p))return;h.set(p,n.Started);let f=l(p);if(f){const d=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,t._)`${_}${d} ${p} = ${f};${this.
320
+ opts._n}`}else if(f=y?.(p))_=(0,t._)`${_}${f}${this.opts._n}`;else throw new r(p);h.set(p,n.Completed)})}return _}}e.ValueScope=s})(hs)),hs}var ti;function ae(){return ti||(ti=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=er(),r=ei();var n=er();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n.
320
321
  _}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.
321
322
  regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var i=ei();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t.
322
- _Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(R,b){return this}}class a extends o{constructor(R,b,C){super(),this.varKind=R,this.name=b,this.rhs=C}render({es5:R,_n:b}){const C=R?r.varKinds.var:this.varKind,B=this.rhs===void 0?"":` = ${this.rhs}`;return`${C} ${this.name}${B};`+b}optimizeNames(R,b){if(R[this.name.
323
- str])return this.rhs&&(this.rhs=I(this.rhs,R,b)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class s extends o{constructor(R,b,C){super(),this.lhs=R,this.rhs=b,this.sideEffects=C}render({_n:R}){return`${this.lhs} = ${this.rhs};`+R}optimizeNames(R,b){if(!(this.lhs instanceof t.Name&&!R[this.lhs.str]&&!this.sideEffects))return this.rhs=I(this.rhs,R,b),this}get names(){const R=this.lhs instanceof t.Name?{}:{...this.lhs.names};return D(R,this.rhs)}}class u extends s{constructor(R,b,C,B){
324
- super(R,C,B),this.op=b}render({_n:R}){return`${this.lhs} ${this.op}= ${this.rhs};`+R}}class c extends o{constructor(R){super(),this.label=R,this.names={}}render({_n:R}){return`${this.label}:`+R}}class l extends o{constructor(R){super(),this.label=R,this.names={}}render({_n:R}){return`break${this.label?` ${this.label}`:""};`+R}}class m extends o{constructor(R){super(),this.error=R}render({_n:R}){return`throw ${this.error};`+R}get names(){return this.error.names}}class y extends o{constructor(R){super(),
325
- this.code=R}render({_n:R}){return`${this.code};`+R}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(R,b){return this.code=I(this.code,R,b),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class _ extends o{constructor(R=[]){super(),this.nodes=R}render(R){return this.nodes.reduce((b,C)=>b+C.render(R),"")}optimizeNodes(){const{nodes:R}=this;let b=R.length;for(;b--;){const C=R[b].optimizeNodes();Array.isArray(C)?R.splice(b,1,...C):C?R[b]=C:R.splice(b,1)}return R.
326
- length>0?this:void 0}optimizeNames(R,b){const{nodes:C}=this;let B=C.length;for(;B--;){const K=C[B];K.optimizeNames(R,b)||(M(R,K.names),C.splice(B,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((R,b)=>H(R,b.names),{})}}class S extends _{render(R){return"{"+R._n+super.render(R)+"}"+R._n}}class g extends _{}class p extends S{}p.kind="else";class h extends S{constructor(R,b){super(b),this.condition=R}render(R){let b=`if(${this.condition})`+super.render(R);return this.else&&(b+=
327
- "else "+this.else.render(R)),b}optimizeNodes(){super.optimizeNodes();const R=this.condition;if(R===!0)return this.nodes;let b=this.else;if(b){const C=b.optimizeNodes();b=this.else=Array.isArray(C)?new p(C):C}if(b)return R===!1?b instanceof h?b:b.nodes:this.nodes.length?this:new h(z(R),b instanceof h?[b]:b.nodes);if(!(R===!1||!this.nodes.length))return this}optimizeNames(R,b){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(R,b),!!(super.optimizeNames(R,b)||this.else))return this.
328
- condition=I(this.condition,R,b),this}get names(){const R=super.names;return D(R,this.condition),this.else&&H(R,this.else.names),R}}h.kind="if";class f extends S{}f.kind="for";class d extends f{constructor(R){super(),this.iteration=R}render(R){return`for(${this.iteration})`+super.render(R)}optimizeNames(R,b){if(super.optimizeNames(R,b))return this.iteration=I(this.iteration,R,b),this}get names(){return H(super.names,this.iteration.names)}}class v extends f{constructor(R,b,C,B){super(),this.varKind=
329
- R,this.name=b,this.from=C,this.to=B}render(R){const b=R.es5?r.varKinds.var:this.varKind,{name:C,from:B,to:K}=this;return`for(${b} ${C}=${B}; ${C}<${K}; ${C}++)`+super.render(R)}get names(){const R=D(super.names,this.from);return D(R,this.to)}}class $ extends f{constructor(R,b,C,B){super(),this.loop=R,this.varKind=b,this.name=C,this.iterable=B}render(R){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(R)}optimizeNames(R,b){if(super.optimizeNames(R,b))return this.
330
- iterable=I(this.iterable,R,b),this}get names(){return H(super.names,this.iterable.names)}}class w extends S{constructor(R,b,C){super(),this.name=R,this.args=b,this.async=C}render(R){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(R)}}w.kind="func";class E extends _{render(R){return"return "+super.render(R)}}E.kind="return";class P extends S{render(R){let b="try"+super.render(R);return this.catch&&(b+=this.catch.render(R)),this.finally&&(b+=this.finally.render(R)),
331
- b}optimizeNodes(){var R,b;return super.optimizeNodes(),(R=this.catch)===null||R===void 0||R.optimizeNodes(),(b=this.finally)===null||b===void 0||b.optimizeNodes(),this}optimizeNames(R,b){var C,B;return super.optimizeNames(R,b),(C=this.catch)===null||C===void 0||C.optimizeNames(R,b),(B=this.finally)===null||B===void 0||B.optimizeNames(R,b),this}get names(){const R=super.names;return this.catch&&H(R,this.catch.names),this.finally&&H(R,this.finally.names),R}}class O extends S{constructor(R){super(),
332
- this.error=R}render(R){return`catch(${this.error})`+super.render(R)}}O.kind="catch";class U extends S{render(R){return"finally"+super.render(R)}}U.kind="finally";class x{constructor(R,b={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...b,_n:b.lines?`
333
- `:""},this._extScope=R,this._scope=new r.Scope({parent:R}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(R){return this._scope.name(R)}scopeName(R){return this._extScope.name(R)}scopeValue(R,b){const C=this._extScope.value(R,b);return(this._values[C.prefix]||(this._values[C.prefix]=new Set)).add(C),C}getScopeValue(R,b){return this._extScope.getValue(R,b)}scopeRefs(R){return this._extScope.scopeRefs(R,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(R,b,C,B){
334
- const K=this._scope.toName(b);return C!==void 0&&B&&(this._constants[K.str]=C),this._leafNode(new a(R,K,C)),K}const(R,b,C){return this._def(r.varKinds.const,R,b,C)}let(R,b,C){return this._def(r.varKinds.let,R,b,C)}var(R,b,C){return this._def(r.varKinds.var,R,b,C)}assign(R,b,C){return this._leafNode(new s(R,b,C))}add(R,b){return this._leafNode(new u(R,e.operators.ADD,b))}code(R){return typeof R=="function"?R():R!==t.nil&&this._leafNode(new y(R)),this}object(...R){const b=["{"];for(const[C,B]of R)
335
- b.length>1&&b.push(","),b.push(C),(C!==B||this.opts.es5)&&(b.push(":"),(0,t.addCodeArg)(b,B));return b.push("}"),new t._Code(b)}if(R,b,C){if(this._blockNode(new h(R)),b&&C)this.code(b).else().code(C).endIf();else if(b)this.code(b).endIf();else if(C)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(R){return this._elseNode(new h(R))}else(){return this._elseNode(new p)}endIf(){return this._endBlockNode(h,p)}_for(R,b){return this._blockNode(R),b&&this.code(b).endFor(),this}for(R,b){
336
- return this._for(new d(R),b)}forRange(R,b,C,B,K=this.opts.es5?r.varKinds.var:r.varKinds.let){const ee=this._scope.toName(R);return this._for(new v(K,ee,b,C),()=>B(ee))}forOf(R,b,C,B=r.varKinds.const){const K=this._scope.toName(R);if(this.opts.es5){const ee=b instanceof t.Name?b:this.var("_arr",b);return this.forRange("_i",0,(0,t._)`${ee}.length`,re=>{this.var(K,(0,t._)`${ee}[${re}]`),C(K)})}return this._for(new $("of",B,K,b),()=>C(K))}forIn(R,b,C,B=this.opts.es5?r.varKinds.var:r.varKinds.const){
337
- if(this.opts.ownProperties)return this.forOf(R,(0,t._)`Object.keys(${b})`,C);const K=this._scope.toName(R);return this._for(new $("in",B,K,b),()=>C(K))}endFor(){return this._endBlockNode(f)}label(R){return this._leafNode(new c(R))}break(R){return this._leafNode(new l(R))}return(R){const b=new E;if(this._blockNode(b),this.code(R),b.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(R,b,C){if(!b&&!C)throw new Error('CodeGen: "try" without "c\
338
- atch" and "finally"');const B=new P;if(this._blockNode(B),this.code(R),b){const K=this.name("e");this._currNode=B.catch=new O(K),b(K)}return C&&(this._currNode=B.finally=new U,this.code(C)),this._endBlockNode(O,U)}throw(R){return this._leafNode(new m(R))}block(R,b){return this._blockStarts.push(this._nodes.length),R&&this.code(R).endBlock(b),this}endBlock(R){const b=this._blockStarts.pop();if(b===void 0)throw new Error("CodeGen: not in self-balancing block");const C=this._nodes.length-b;if(C<0||
339
- R!==void 0&&C!==R)throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${R} expected`);return this._nodes.length=b,this}func(R,b=t.nil,C,B){return this._blockNode(new w(R,b,C)),B&&this.code(B).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(R=1){for(;R-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(R){return this._currNode.nodes.push(R),this}_blockNode(R){this._currNode.nodes.push(R),this._nodes.push(R)}_endBlockNode(R,b){
340
- const C=this._currNode;if(C instanceof R||b&&C instanceof b)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${b?`${R.kind}/${b.kind}`:R.kind}"`)}_elseNode(R){const b=this._currNode;if(!(b instanceof h))throw new Error('CodeGen: "else" without "if"');return this._currNode=b.else=R,this}get _root(){return this._nodes[0]}get _currNode(){const R=this._nodes;return R[R.length-1]}set _currNode(R){const b=this._nodes;b[b.length-1]=R}}e.CodeGen=x;function H(T,R){for(const b in R)T[b]=
341
- (T[b]||0)+(R[b]||0);return T}function D(T,R){return R instanceof t._CodeOrName?H(T,R.names):T}function I(T,R,b){if(T instanceof t.Name)return C(T);if(!B(T))return T;return new t._Code(T._items.reduce((K,ee)=>(ee instanceof t.Name&&(ee=C(ee)),ee instanceof t._Code?K.push(...ee._items):K.push(ee),K),[]));function C(K){const ee=b[K.str];return ee===void 0||R[K.str]!==1?K:(delete R[K.str],ee)}function B(K){return K instanceof t._Code&&K._items.some(ee=>ee instanceof t.Name&&R[ee.str]===1&&b[ee.str]!==
342
- void 0)}}function M(T,R){for(const b in R)T[b]=(T[b]||0)-(R[b]||0)}function z(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${L(T)}`}e.not=z;const F=A(e.operators.AND);function G(...T){return T.reduce(F)}e.and=G;const Q=A(e.operators.OR);function q(...T){return T.reduce(Q)}e.or=q;function A(T){return(R,b)=>R===t.nil?b:b===t.nil?R:(0,t._)`${L(R)} ${T} ${L(b)}`}function L(T){return T instanceof t.Name?T:(0,t._)`(${T})`}})(ds)),ds}var ce={},ri;function fe(){if(ri)return ce;
343
- ri=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.checkStrictMode=ce.getErrorPath=ce.Type=ce.useFunc=ce.setEvaluated=ce.evaluatedPropsToName=ce.mergeEvaluated=ce.eachItem=ce.unescapeJsonPointer=ce.escapeJsonPointer=ce.escapeFragment=ce.unescapeFragment=ce.schemaRefOrVal=ce.schemaHasRulesButRef=ce.schemaHasRules=ce.checkUnknownRules=ce.alwaysValidSchema=ce.toHash=void 0;const e=ae(),t=er();function r($){const w={};for(const E of $)w[E]=!0;return w}ce.toHash=r;function n($,w){return typeof w==
344
- "boolean"?w:Object.keys(w).length===0?!0:(i($,w),!o(w,$.self.RULES.all))}ce.alwaysValidSchema=n;function i($,w=$.schema){const{opts:E,self:P}=$;if(!E.strictSchema||typeof w=="boolean")return;const O=P.RULES.keywords;for(const U in w)O[U]||v($,`unknown keyword: "${U}"`)}ce.checkUnknownRules=i;function o($,w){if(typeof $=="boolean")return!$;for(const E in $)if(w[E])return!0;return!1}ce.schemaHasRules=o;function a($,w){if(typeof $=="boolean")return!$;for(const E in $)if(E!=="$ref"&&w.all[E])return!0;
345
- return!1}ce.schemaHasRulesButRef=a;function s({topSchemaRef:$,schemaPath:w},E,P,O){if(!O){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,e._)`${E}`}return(0,e._)`${$}${w}${(0,e.getProperty)(P)}`}ce.schemaRefOrVal=s;function u($){return m(decodeURIComponent($))}ce.unescapeFragment=u;function c($){return encodeURIComponent(l($))}ce.escapeFragment=c;function l($){return typeof $=="number"?`${$}`:$.replace(/~/g,"~0").replace(/\//g,"~1")}ce.escapeJsonPointer=l;function m($){
346
- return $.replace(/~1/g,"/").replace(/~0/g,"~")}ce.unescapeJsonPointer=m;function y($,w){if(Array.isArray($))for(const E of $)w(E);else w($)}ce.eachItem=y;function _({mergeNames:$,mergeToName:w,mergeValues:E,resultToName:P}){return(O,U,x,H)=>{const D=x===void 0?U:x instanceof e.Name?(U instanceof e.Name?$(O,U,x):w(O,U,x),x):U instanceof e.Name?(w(O,x,U),U):E(U,x);return H===e.Name&&!(D instanceof e.Name)?P(O,D):D}}ce.mergeEvaluated={props:_({mergeNames:($,w,E)=>$.if((0,e._)`${E} !== true && ${w} !== undefined`,
347
- ()=>{$.if((0,e._)`${w} === true`,()=>$.assign(E,!0),()=>$.assign(E,(0,e._)`${E} || {}`).code((0,e._)`Object.assign(${E}, ${w})`))}),mergeToName:($,w,E)=>$.if((0,e._)`${E} !== true`,()=>{w===!0?$.assign(E,!0):($.assign(E,(0,e._)`${E} || {}`),g($,E,w))}),mergeValues:($,w)=>$===!0?!0:{...$,...w},resultToName:S}),items:_({mergeNames:($,w,E)=>$.if((0,e._)`${E} !== true && ${w} !== undefined`,()=>$.assign(E,(0,e._)`${w} === true ? true : ${E} > ${w} ? ${E} : ${w}`)),mergeToName:($,w,E)=>$.if((0,e._)`${E} !== true`,
348
- ()=>$.assign(E,w===!0?!0:(0,e._)`${E} > ${w} ? ${E} : ${w}`)),mergeValues:($,w)=>$===!0?!0:Math.max($,w),resultToName:($,w)=>$.var("items",w)})};function S($,w){if(w===!0)return $.var("props",!0);const E=$.var("props",(0,e._)`{}`);return w!==void 0&&g($,E,w),E}ce.evaluatedPropsToName=S;function g($,w,E){Object.keys(E).forEach(P=>$.assign((0,e._)`${w}${(0,e.getProperty)(P)}`,!0))}ce.setEvaluated=g;const p={};function h($,w){return $.scopeValue("func",{ref:w,code:p[w.code]||(p[w.code]=new t._Code(
349
- w.code))})}ce.useFunc=h;var f;(function($){$[$.Num=0]="Num",$[$.Str=1]="Str"})(f||(ce.Type=f={}));function d($,w,E){if($ instanceof e.Name){const P=w===f.Num;return E?P?(0,e._)`"[" + ${$} + "]"`:(0,e._)`"['" + ${$} + "']"`:P?(0,e._)`"/" + ${$}`:(0,e._)`"/" + ${$}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,e.getProperty)($).toString():"/"+l($)}ce.getErrorPath=d;function v($,w,E=$.opts.strictSchema){if(E){if(w=`strict mode: ${w}`,E===!0)throw new Error(w);$.self.logger.warn(w)}}return ce.
350
- checkStrictMode=v,ce}var tr={},ni;function Ne(){if(ni)return tr;ni=1,Object.defineProperty(tr,"__esModule",{value:!0});const e=ae(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.
351
- Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return tr.default=t,tr}var si;function rr(){return si||(si=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=ae(),r=fe(),n=Ne();e.keywordError={message:({keyword:p})=>(0,t.str)`must pass "${p}" keyword validation`},e.keyword$DataError={message:({
352
- keyword:p,schemaType:h})=>h?(0,t.str)`"${p}" keyword must be ${h} ($data)`:(0,t.str)`"${p}" keyword is invalid ($data)`};function i(p,h=e.keywordError,f,d){const{it:v}=p,{gen:$,compositeRule:w,allErrors:E}=v,P=m(p,h,f);d??(w||E)?u($,P):c(v,(0,t._)`[${P}]`)}e.reportError=i;function o(p,h=e.keywordError,f){const{it:d}=p,{gen:v,compositeRule:$,allErrors:w}=d,E=m(p,h,f);u(v,E),$||w||c(d,n.default.vErrors)}e.reportExtraError=o;function a(p,h){p.assign(n.default.errors,h),p.if((0,t._)`${n.default.vErrors} !== null`,
353
- ()=>p.if(h,()=>p.assign((0,t._)`${n.default.vErrors}.length`,h),()=>p.assign(n.default.vErrors,null)))}e.resetErrorsCount=a;function s({gen:p,keyword:h,schemaValue:f,data:d,errsCount:v,it:$}){if(v===void 0)throw new Error("ajv implementation error");const w=p.name("err");p.forRange("i",v,n.default.errors,E=>{p.const(w,(0,t._)`${n.default.vErrors}[${E}]`),p.if((0,t._)`${w}.instancePath === undefined`,()=>p.assign((0,t._)`${w}.instancePath`,(0,t.strConcat)(n.default.instancePath,$.errorPath))),p.assign(
354
- (0,t._)`${w}.schemaPath`,(0,t.str)`${$.errSchemaPath}/${h}`),$.opts.verbose&&(p.assign((0,t._)`${w}.schema`,f),p.assign((0,t._)`${w}.data`,d))})}e.extendErrors=s;function u(p,h){const f=p.const("err",h);p.if((0,t._)`${n.default.vErrors} === null`,()=>p.assign(n.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${n.default.vErrors}.push(${f})`),p.code((0,t._)`${n.default.errors}++`)}function c(p,h){const{gen:f,validateName:d,schemaEnv:v}=p;v.$async?f.throw((0,t._)`new ${p.ValidationError}(${h})`):(f.assign(
355
- (0,t._)`${d}.errors`,h),f.return(!1))}const l={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function m(p,h,f){const{createErrors:d}=p.it;return d===!1?(0,t._)`{}`:y(p,h,f)}function y(p,h,f={}){const{gen:d,it:v}=p,$=[_(v,f),S(p,f)];return g(p,h,$),d.object(...$)}function _({errorPath:p},{instancePath:h}){const f=h?
356
- (0,t.str)`${p}${(0,r.getErrorPath)(h,r.Type.Str)}`:p;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,f)]}function S({keyword:p,it:{errSchemaPath:h}},{schemaPath:f,parentSchema:d}){let v=d?h:(0,t.str)`${h}/${p}`;return f&&(v=(0,t.str)`${v}${(0,r.getErrorPath)(f,r.Type.Str)}`),[l.schemaPath,v]}function g(p,{params:h,message:f},d){const{keyword:v,data:$,schemaValue:w,it:E}=p,{opts:P,propertyName:O,topSchemaRef:U,schemaPath:x}=E;d.push([l.keyword,v],[l.params,typeof h=="function"?
357
- h(p):h||(0,t._)`{}`]),P.messages&&d.push([l.message,typeof f=="function"?f(p):f]),P.verbose&&d.push([l.schema,w],[l.parentSchema,(0,t._)`${U}${x}`],[n.default.data,$]),O&&d.push([l.propertyName,O])}})(fs)),fs}var oi;function eh(){if(oi)return nt;oi=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.boolOrEmptySchema=nt.topBoolOrEmptySchema=void 0;const e=rr(),t=ae(),r=Ne(),n={message:"boolean schema is false"};function i(s){const{gen:u,schema:c,validateName:l}=s;c===!1?a(s,!1):typeof c=="obj\
358
- ect"&&c.$async===!0?u.return(r.default.data):(u.assign((0,t._)`${l}.errors`,null),u.return(!0))}nt.topBoolOrEmptySchema=i;function o(s,u){const{gen:c,schema:l}=s;l===!1?(c.var(u,!1),a(s)):c.var(u,!0)}nt.boolOrEmptySchema=o;function a(s,u){const{gen:c,data:l}=s,m={gen:c,keyword:"false schema",data:l,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:s};(0,e.reportError)(m,n,void 0,u)}return nt}var ge={},st={},ai;function ii(){if(ai)return st;ai=1,Object.defineProperty(st,"__esModule",{value:!0}),
359
- st.getRules=st.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(i){return typeof i=="string"&&t.has(i)}st.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 st.getRules=n,st}var Ge={},
360
- ci;function ui(){if(ci)return Ge;ci=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.shouldUseRule=Ge.shouldUseGroup=Ge.schemaHasRulesForType=void 0;function e({schema:n,self:i},o){const a=i.RULES.types[o];return a&&a!==!0&&t(n,a)}Ge.schemaHasRulesForType=e;function t(n,i){return i.rules.some(o=>r(n,o))}Ge.shouldUseGroup=t;function r(n,i){var o;return n[i.keyword]!==void 0||((o=i.definition.implements)===null||o===void 0?void 0:o.some(a=>n[a]!==void 0))}return Ge.shouldUseRule=r,Ge}var li;
361
- function nr(){if(li)return ge;li=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.reportTypeError=ge.checkDataTypes=ge.checkDataType=ge.coerceAndCheckDataType=ge.getJSONTypes=ge.getSchemaTypes=ge.DataType=void 0;const e=ii(),t=ui(),r=rr(),n=ae(),i=fe();var o;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(o||(ge.DataType=o={}));function a(f){const d=s(f.type);if(d.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!d.length&&
362
- f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&d.push("null")}return d}ge.getSchemaTypes=a;function s(f){const d=Array.isArray(f)?f:f?[f]:[];if(d.every(e.isJSONType))return d;throw new Error("type must be JSONType or JSONType[]: "+d.join(","))}ge.getJSONTypes=s;function u(f,d){const{gen:v,data:$,opts:w}=f,E=l(d,w.coerceTypes),P=d.length>0&&!(E.length===0&&d.length===1&&(0,t.schemaHasRulesForType)(f,d[0]));if(P){const O=S(d,$,w.strictNumbers,o.Wrong);
363
- v.if(O,()=>{E.length?m(f,d,E):p(f)})}return P}ge.coerceAndCheckDataType=u;const c=new Set(["string","number","integer","boolean","null"]);function l(f,d){return d?f.filter(v=>c.has(v)||d==="array"&&v==="array"):[]}function m(f,d,v){const{gen:$,data:w,opts:E}=f,P=$.let("dataType",(0,n._)`typeof ${w}`),O=$.let("coerced",(0,n._)`undefined`);E.coerceTypes==="array"&&$.if((0,n._)`${P} == 'object' && Array.isArray(${w}) && ${w}.length == 1`,()=>$.assign(w,(0,n._)`${w}[0]`).assign(P,(0,n._)`typeof ${w}`).
364
- if(S(d,w,E.strictNumbers),()=>$.assign(O,w))),$.if((0,n._)`${O} !== undefined`);for(const x of v)(c.has(x)||x==="array"&&E.coerceTypes==="array")&&U(x);$.else(),p(f),$.endIf(),$.if((0,n._)`${O} !== undefined`,()=>{$.assign(w,O),y(f,O)});function U(x){switch(x){case"string":$.elseIf((0,n._)`${P} == "number" || ${P} == "boolean"`).assign(O,(0,n._)`"" + ${w}`).elseIf((0,n._)`${w} === null`).assign(O,(0,n._)`""`);return;case"number":$.elseIf((0,n._)`${P} == "boolean" || ${w} === null
365
- || (${P} == "string" && ${w} && ${w} == +${w})`).assign(O,(0,n._)`+${w}`);return;case"integer":$.elseIf((0,n._)`${P} === "boolean" || ${w} === null
366
- || (${P} === "string" && ${w} && ${w} == +${w} && !(${w} % 1))`).assign(O,(0,n._)`+${w}`);return;case"boolean":$.elseIf((0,n._)`${w} === "false" || ${w} === 0 || ${w} === null`).assign(O,!1).elseIf((0,n._)`${w} === "true" || ${w} === 1`).assign(O,!0);return;case"null":$.elseIf((0,n._)`${w} === "" || ${w} === 0 || ${w} === false`),$.assign(O,null);return;case"array":$.elseIf((0,n._)`${P} === "string" || ${P} === "number"
367
- || ${P} === "boolean" || ${w} === null`).assign(O,(0,n._)`[${w}]`)}}}function y({gen:f,parentData:d,parentDataProperty:v},$){f.if((0,n._)`${d} !== undefined`,()=>f.assign((0,n._)`${d}[${v}]`,$))}function _(f,d,v,$=o.Correct){const w=$===o.Correct?n.operators.EQ:n.operators.NEQ;let E;switch(f){case"null":return(0,n._)`${d} ${w} null`;case"array":E=(0,n._)`Array.isArray(${d})`;break;case"object":E=(0,n._)`${d} && typeof ${d} == "object" && !Array.isArray(${d})`;break;case"integer":E=
368
- P((0,n._)`!(${d} % 1) && !isNaN(${d})`);break;case"number":E=P();break;default:return(0,n._)`typeof ${d} ${w} ${f}`}return $===o.Correct?E:(0,n.not)(E);function P(O=n.nil){return(0,n.and)((0,n._)`typeof ${d} == "number"`,O,v?(0,n._)`isFinite(${d})`:n.nil)}}ge.checkDataType=_;function S(f,d,v,$){if(f.length===1)return _(f[0],d,v,$);let w;const E=(0,i.toHash)(f);if(E.array&&E.object){const P=(0,n._)`typeof ${d} != "object"`;w=E.null?P:(0,n._)`!${d} || ${P}`,delete E.null,delete E.array,delete E.object}else
369
- w=n.nil;E.number&&delete E.integer;for(const P in E)w=(0,n.and)(w,_(P,d,v,$));return w}ge.checkDataTypes=S;const g={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:d})=>typeof f=="string"?(0,n._)`{type: ${f}}`:(0,n._)`{type: ${d}}`};function p(f){const d=h(f);(0,r.reportError)(d,g)}ge.reportTypeError=p;function h(f){const{gen:d,data:v,schema:$}=f,w=(0,i.schemaRefOrVal)(f,$,"type");return{gen:d,keyword:"type",data:v,schema:$.type,schemaCode:w,schemaValue:w,parentSchema:$,params:{},
370
- it:f}}return ge}var Tt={},fi;function th(){if(fi)return Tt;fi=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.assignDefaults=void 0;const e=ae(),t=fe();function r(i,o){const{properties:a,items:s}=i.schema;if(o==="object"&&a)for(const u in a)n(i,u,a[u].default);else o==="array"&&Array.isArray(s)&&s.forEach((u,c)=>n(i,c,u.default))}Tt.assignDefaults=r;function n(i,o,a){const{gen:s,compositeRule:u,data:c,opts:l}=i;if(a===void 0)return;const m=(0,e._)`${c}${(0,e.getProperty)(o)}`;if(u){(0,t.checkStrictMode)(
371
- i,`default is ignored for: ${m}`);return}let y=(0,e._)`${m} === undefined`;l.useDefaults==="empty"&&(y=(0,e._)`${y} || ${m} === null || ${m} === ""`),s.if(y,(0,e._)`${m} = ${(0,e.stringify)(a)}`)}return Tt}var Oe={},de={},di;function Ie(){if(di)return de;di=1,Object.defineProperty(de,"__esModule",{value:!0}),de.validateUnion=de.validateArray=de.usePattern=de.callValidateCode=de.schemaProperties=de.allSchemaProperties=de.noPropertyInData=de.propertyInData=de.isOwnProperty=de.hasPropFunc=de.reportMissingProp=
372
- de.checkMissingProp=de.checkReportMissingProp=void 0;const e=ae(),t=fe(),r=Ne(),n=fe();function i(f,d){const{gen:v,data:$,it:w}=f;v.if(l(v,$,d,w.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${d}`},!0),f.error()})}de.checkReportMissingProp=i;function o({gen:f,data:d,it:{opts:v}},$,w){return(0,e.or)(...$.map(E=>(0,e.and)(l(f,d,E,v.ownProperties),(0,e._)`${w} = ${E}`)))}de.checkMissingProp=o;function a(f,d){f.setParams({missingProperty:d},!0),f.error()}de.reportMissingProp=a;function s(f){
323
+ _Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class a{optimizeNodes(){return this}optimizeNames(R,E){return this}}class o extends a{constructor(R,E,C){super(),this.varKind=R,this.name=E,this.rhs=C}render({es5:R,_n:E}){const C=R?r.varKinds.var:this.varKind,B=this.rhs===void 0?"":` = ${this.rhs}`;return`${C} ${this.name}${B};`+E}optimizeNames(R,E){if(R[this.name.
324
+ str])return this.rhs&&(this.rhs=j(this.rhs,R,E)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class s extends a{constructor(R,E,C){super(),this.lhs=R,this.rhs=E,this.sideEffects=C}render({_n:R}){return`${this.lhs} = ${this.rhs};`+R}optimizeNames(R,E){if(!(this.lhs instanceof t.Name&&!R[this.lhs.str]&&!this.sideEffects))return this.rhs=j(this.rhs,R,E),this}get names(){const R=this.lhs instanceof t.Name?{}:{...this.lhs.names};return L(R,this.rhs)}}class u extends s{constructor(R,E,C,B){
325
+ super(R,C,B),this.op=E}render({_n:R}){return`${this.lhs} ${this.op}= ${this.rhs};`+R}}class c extends a{constructor(R){super(),this.label=R,this.names={}}render({_n:R}){return`${this.label}:`+R}}class l extends a{constructor(R){super(),this.label=R,this.names={}}render({_n:R}){return`break${this.label?` ${this.label}`:""};`+R}}class m extends a{constructor(R){super(),this.error=R}render({_n:R}){return`throw ${this.error};`+R}get names(){return this.error.names}}class y extends a{constructor(R){super(),
326
+ this.code=R}render({_n:R}){return`${this.code};`+R}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(R,E){return this.code=j(this.code,R,E),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class _ extends a{constructor(R=[]){super(),this.nodes=R}render(R){return this.nodes.reduce((E,C)=>E+C.render(R),"")}optimizeNodes(){const{nodes:R}=this;let E=R.length;for(;E--;){const C=R[E].optimizeNodes();Array.isArray(C)?R.splice(E,1,...C):C?R[E]=C:R.splice(E,1)}return R.
327
+ length>0?this:void 0}optimizeNames(R,E){const{nodes:C}=this;let B=C.length;for(;B--;){const K=C[B];K.optimizeNames(R,E)||(M(R,K.names),C.splice(B,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((R,E)=>U(R,E.names),{})}}class S extends _{render(R){return"{"+R._n+super.render(R)+"}"+R._n}}class g extends _{}class h extends S{}h.kind="else";class p extends S{constructor(R,E){super(E),this.condition=R}render(R){let E=`if(${this.condition})`+super.render(R);return this.else&&(E+=
328
+ "else "+this.else.render(R)),E}optimizeNodes(){super.optimizeNodes();const R=this.condition;if(R===!0)return this.nodes;let E=this.else;if(E){const C=E.optimizeNodes();E=this.else=Array.isArray(C)?new h(C):C}if(E)return R===!1?E instanceof p?E:E.nodes:this.nodes.length?this:new p(z(R),E instanceof p?[E]:E.nodes);if(!(R===!1||!this.nodes.length))return this}optimizeNames(R,E){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(R,E),!!(super.optimizeNames(R,E)||this.else))return this.
329
+ condition=j(this.condition,R,E),this}get names(){const R=super.names;return L(R,this.condition),this.else&&U(R,this.else.names),R}}p.kind="if";class f extends S{}f.kind="for";class d extends f{constructor(R){super(),this.iteration=R}render(R){return`for(${this.iteration})`+super.render(R)}optimizeNames(R,E){if(super.optimizeNames(R,E))return this.iteration=j(this.iteration,R,E),this}get names(){return U(super.names,this.iteration.names)}}class v extends f{constructor(R,E,C,B){super(),this.varKind=
330
+ R,this.name=E,this.from=C,this.to=B}render(R){const E=R.es5?r.varKinds.var:this.varKind,{name:C,from:B,to:K}=this;return`for(${E} ${C}=${B}; ${C}<${K}; ${C}++)`+super.render(R)}get names(){const R=L(super.names,this.from);return L(R,this.to)}}class $ extends f{constructor(R,E,C,B){super(),this.loop=R,this.varKind=E,this.name=C,this.iterable=B}render(R){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(R)}optimizeNames(R,E){if(super.optimizeNames(R,E))return this.
331
+ iterable=j(this.iterable,R,E),this}get names(){return U(super.names,this.iterable.names)}}class w extends S{constructor(R,E,C){super(),this.name=R,this.args=E,this.async=C}render(R){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(R)}}w.kind="func";class b extends _{render(R){return"return "+super.render(R)}}b.kind="return";class P extends S{render(R){let E="try"+super.render(R);return this.catch&&(E+=this.catch.render(R)),this.finally&&(E+=this.finally.render(R)),
332
+ E}optimizeNodes(){var R,E;return super.optimizeNodes(),(R=this.catch)===null||R===void 0||R.optimizeNodes(),(E=this.finally)===null||E===void 0||E.optimizeNodes(),this}optimizeNames(R,E){var C,B;return super.optimizeNames(R,E),(C=this.catch)===null||C===void 0||C.optimizeNames(R,E),(B=this.finally)===null||B===void 0||B.optimizeNames(R,E),this}get names(){const R=super.names;return this.catch&&U(R,this.catch.names),this.finally&&U(R,this.finally.names),R}}class I extends S{constructor(R){super(),
333
+ this.error=R}render(R){return`catch(${this.error})`+super.render(R)}}I.kind="catch";class H extends S{render(R){return"finally"+super.render(R)}}H.kind="finally";class x{constructor(R,E={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...E,_n:E.lines?`
334
+ `:""},this._extScope=R,this._scope=new r.Scope({parent:R}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(R){return this._scope.name(R)}scopeName(R){return this._extScope.name(R)}scopeValue(R,E){const C=this._extScope.value(R,E);return(this._values[C.prefix]||(this._values[C.prefix]=new Set)).add(C),C}getScopeValue(R,E){return this._extScope.getValue(R,E)}scopeRefs(R){return this._extScope.scopeRefs(R,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(R,E,C,B){
335
+ const K=this._scope.toName(E);return C!==void 0&&B&&(this._constants[K.str]=C),this._leafNode(new o(R,K,C)),K}const(R,E,C){return this._def(r.varKinds.const,R,E,C)}let(R,E,C){return this._def(r.varKinds.let,R,E,C)}var(R,E,C){return this._def(r.varKinds.var,R,E,C)}assign(R,E,C){return this._leafNode(new s(R,E,C))}add(R,E){return this._leafNode(new u(R,e.operators.ADD,E))}code(R){return typeof R=="function"?R():R!==t.nil&&this._leafNode(new y(R)),this}object(...R){const E=["{"];for(const[C,B]of R)
336
+ E.length>1&&E.push(","),E.push(C),(C!==B||this.opts.es5)&&(E.push(":"),(0,t.addCodeArg)(E,B));return E.push("}"),new t._Code(E)}if(R,E,C){if(this._blockNode(new p(R)),E&&C)this.code(E).else().code(C).endIf();else if(E)this.code(E).endIf();else if(C)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(R){return this._elseNode(new p(R))}else(){return this._elseNode(new h)}endIf(){return this._endBlockNode(p,h)}_for(R,E){return this._blockNode(R),E&&this.code(E).endFor(),this}for(R,E){
337
+ return this._for(new d(R),E)}forRange(R,E,C,B,K=this.opts.es5?r.varKinds.var:r.varKinds.let){const ee=this._scope.toName(R);return this._for(new v(K,ee,E,C),()=>B(ee))}forOf(R,E,C,B=r.varKinds.const){const K=this._scope.toName(R);if(this.opts.es5){const ee=E instanceof t.Name?E:this.var("_arr",E);return this.forRange("_i",0,(0,t._)`${ee}.length`,re=>{this.var(K,(0,t._)`${ee}[${re}]`),C(K)})}return this._for(new $("of",B,K,E),()=>C(K))}forIn(R,E,C,B=this.opts.es5?r.varKinds.var:r.varKinds.const){
338
+ if(this.opts.ownProperties)return this.forOf(R,(0,t._)`Object.keys(${E})`,C);const K=this._scope.toName(R);return this._for(new $("in",B,K,E),()=>C(K))}endFor(){return this._endBlockNode(f)}label(R){return this._leafNode(new c(R))}break(R){return this._leafNode(new l(R))}return(R){const E=new b;if(this._blockNode(E),this.code(R),E.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(b)}try(R,E,C){if(!E&&!C)throw new Error('CodeGen: "try" without "c\
339
+ atch" and "finally"');const B=new P;if(this._blockNode(B),this.code(R),E){const K=this.name("e");this._currNode=B.catch=new I(K),E(K)}return C&&(this._currNode=B.finally=new H,this.code(C)),this._endBlockNode(I,H)}throw(R){return this._leafNode(new m(R))}block(R,E){return this._blockStarts.push(this._nodes.length),R&&this.code(R).endBlock(E),this}endBlock(R){const E=this._blockStarts.pop();if(E===void 0)throw new Error("CodeGen: not in self-balancing block");const C=this._nodes.length-E;if(C<0||
340
+ R!==void 0&&C!==R)throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${R} expected`);return this._nodes.length=E,this}func(R,E=t.nil,C,B){return this._blockNode(new w(R,E,C)),B&&this.code(B).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(R=1){for(;R-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(R){return this._currNode.nodes.push(R),this}_blockNode(R){this._currNode.nodes.push(R),this._nodes.push(R)}_endBlockNode(R,E){
341
+ const C=this._currNode;if(C instanceof R||E&&C instanceof E)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${E?`${R.kind}/${E.kind}`:R.kind}"`)}_elseNode(R){const E=this._currNode;if(!(E instanceof p))throw new Error('CodeGen: "else" without "if"');return this._currNode=E.else=R,this}get _root(){return this._nodes[0]}get _currNode(){const R=this._nodes;return R[R.length-1]}set _currNode(R){const E=this._nodes;E[E.length-1]=R}}e.CodeGen=x;function U(T,R){for(const E in R)T[E]=
342
+ (T[E]||0)+(R[E]||0);return T}function L(T,R){return R instanceof t._CodeOrName?U(T,R.names):T}function j(T,R,E){if(T instanceof t.Name)return C(T);if(!B(T))return T;return new t._Code(T._items.reduce((K,ee)=>(ee instanceof t.Name&&(ee=C(ee)),ee instanceof t._Code?K.push(...ee._items):K.push(ee),K),[]));function C(K){const ee=E[K.str];return ee===void 0||R[K.str]!==1?K:(delete R[K.str],ee)}function B(K){return K instanceof t._Code&&K._items.some(ee=>ee instanceof t.Name&&R[ee.str]===1&&E[ee.str]!==
343
+ void 0)}}function M(T,R){for(const E in R)T[E]=(T[E]||0)-(R[E]||0)}function z(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${D(T)}`}e.not=z;const F=A(e.operators.AND);function G(...T){return T.reduce(F)}e.and=G;const Q=A(e.operators.OR);function q(...T){return T.reduce(Q)}e.or=q;function A(T){return(R,E)=>R===t.nil?E:E===t.nil?R:(0,t._)`${D(R)} ${T} ${D(E)}`}function D(T){return T instanceof t.Name?T:(0,t._)`(${T})`}})(ds)),ds}var ce={},ri;function fe(){if(ri)return ce;
344
+ ri=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.checkStrictMode=ce.getErrorPath=ce.Type=ce.useFunc=ce.setEvaluated=ce.evaluatedPropsToName=ce.mergeEvaluated=ce.eachItem=ce.unescapeJsonPointer=ce.escapeJsonPointer=ce.escapeFragment=ce.unescapeFragment=ce.schemaRefOrVal=ce.schemaHasRulesButRef=ce.schemaHasRules=ce.checkUnknownRules=ce.alwaysValidSchema=ce.toHash=void 0;const e=ae(),t=er();function r($){const w={};for(const b of $)w[b]=!0;return w}ce.toHash=r;function n($,w){return typeof w==
345
+ "boolean"?w:Object.keys(w).length===0?!0:(i($,w),!a(w,$.self.RULES.all))}ce.alwaysValidSchema=n;function i($,w=$.schema){const{opts:b,self:P}=$;if(!b.strictSchema||typeof w=="boolean")return;const I=P.RULES.keywords;for(const H in w)I[H]||v($,`unknown keyword: "${H}"`)}ce.checkUnknownRules=i;function a($,w){if(typeof $=="boolean")return!$;for(const b in $)if(w[b])return!0;return!1}ce.schemaHasRules=a;function o($,w){if(typeof $=="boolean")return!$;for(const b in $)if(b!=="$ref"&&w.all[b])return!0;
346
+ return!1}ce.schemaHasRulesButRef=o;function s({topSchemaRef:$,schemaPath:w},b,P,I){if(!I){if(typeof b=="number"||typeof b=="boolean")return b;if(typeof b=="string")return(0,e._)`${b}`}return(0,e._)`${$}${w}${(0,e.getProperty)(P)}`}ce.schemaRefOrVal=s;function u($){return m(decodeURIComponent($))}ce.unescapeFragment=u;function c($){return encodeURIComponent(l($))}ce.escapeFragment=c;function l($){return typeof $=="number"?`${$}`:$.replace(/~/g,"~0").replace(/\//g,"~1")}ce.escapeJsonPointer=l;function m($){
347
+ return $.replace(/~1/g,"/").replace(/~0/g,"~")}ce.unescapeJsonPointer=m;function y($,w){if(Array.isArray($))for(const b of $)w(b);else w($)}ce.eachItem=y;function _({mergeNames:$,mergeToName:w,mergeValues:b,resultToName:P}){return(I,H,x,U)=>{const L=x===void 0?H:x instanceof e.Name?(H instanceof e.Name?$(I,H,x):w(I,H,x),x):H instanceof e.Name?(w(I,x,H),H):b(H,x);return U===e.Name&&!(L instanceof e.Name)?P(I,L):L}}ce.mergeEvaluated={props:_({mergeNames:($,w,b)=>$.if((0,e._)`${b} !== true && ${w} !== undefined`,
348
+ ()=>{$.if((0,e._)`${w} === true`,()=>$.assign(b,!0),()=>$.assign(b,(0,e._)`${b} || {}`).code((0,e._)`Object.assign(${b}, ${w})`))}),mergeToName:($,w,b)=>$.if((0,e._)`${b} !== true`,()=>{w===!0?$.assign(b,!0):($.assign(b,(0,e._)`${b} || {}`),g($,b,w))}),mergeValues:($,w)=>$===!0?!0:{...$,...w},resultToName:S}),items:_({mergeNames:($,w,b)=>$.if((0,e._)`${b} !== true && ${w} !== undefined`,()=>$.assign(b,(0,e._)`${w} === true ? true : ${b} > ${w} ? ${b} : ${w}`)),mergeToName:($,w,b)=>$.if((0,e._)`${b} !== true`,
349
+ ()=>$.assign(b,w===!0?!0:(0,e._)`${b} > ${w} ? ${b} : ${w}`)),mergeValues:($,w)=>$===!0?!0:Math.max($,w),resultToName:($,w)=>$.var("items",w)})};function S($,w){if(w===!0)return $.var("props",!0);const b=$.var("props",(0,e._)`{}`);return w!==void 0&&g($,b,w),b}ce.evaluatedPropsToName=S;function g($,w,b){Object.keys(b).forEach(P=>$.assign((0,e._)`${w}${(0,e.getProperty)(P)}`,!0))}ce.setEvaluated=g;const h={};function p($,w){return $.scopeValue("func",{ref:w,code:h[w.code]||(h[w.code]=new t._Code(
350
+ w.code))})}ce.useFunc=p;var f;(function($){$[$.Num=0]="Num",$[$.Str=1]="Str"})(f||(ce.Type=f={}));function d($,w,b){if($ instanceof e.Name){const P=w===f.Num;return b?P?(0,e._)`"[" + ${$} + "]"`:(0,e._)`"['" + ${$} + "']"`:P?(0,e._)`"/" + ${$}`:(0,e._)`"/" + ${$}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return b?(0,e.getProperty)($).toString():"/"+l($)}ce.getErrorPath=d;function v($,w,b=$.opts.strictSchema){if(b){if(w=`strict mode: ${w}`,b===!0)throw new Error(w);$.self.logger.warn(w)}}return ce.
351
+ checkStrictMode=v,ce}var tr={},ni;function Oe(){if(ni)return tr;ni=1,Object.defineProperty(tr,"__esModule",{value:!0});const e=ae(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.
352
+ Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return tr.default=t,tr}var si;function rr(){return si||(si=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=ae(),r=fe(),n=Oe();e.keywordError={message:({keyword:h})=>(0,t.str)`must pass "${h}" keyword validation`},e.keyword$DataError={message:({
353
+ keyword:h,schemaType:p})=>p?(0,t.str)`"${h}" keyword must be ${p} ($data)`:(0,t.str)`"${h}" keyword is invalid ($data)`};function i(h,p=e.keywordError,f,d){const{it:v}=h,{gen:$,compositeRule:w,allErrors:b}=v,P=m(h,p,f);d??(w||b)?u($,P):c(v,(0,t._)`[${P}]`)}e.reportError=i;function a(h,p=e.keywordError,f){const{it:d}=h,{gen:v,compositeRule:$,allErrors:w}=d,b=m(h,p,f);u(v,b),$||w||c(d,n.default.vErrors)}e.reportExtraError=a;function o(h,p){h.assign(n.default.errors,p),h.if((0,t._)`${n.default.vErrors} !== null`,
354
+ ()=>h.if(p,()=>h.assign((0,t._)`${n.default.vErrors}.length`,p),()=>h.assign(n.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:h,keyword:p,schemaValue:f,data:d,errsCount:v,it:$}){if(v===void 0)throw new Error("ajv implementation error");const w=h.name("err");h.forRange("i",v,n.default.errors,b=>{h.const(w,(0,t._)`${n.default.vErrors}[${b}]`),h.if((0,t._)`${w}.instancePath === undefined`,()=>h.assign((0,t._)`${w}.instancePath`,(0,t.strConcat)(n.default.instancePath,$.errorPath))),h.assign(
355
+ (0,t._)`${w}.schemaPath`,(0,t.str)`${$.errSchemaPath}/${p}`),$.opts.verbose&&(h.assign((0,t._)`${w}.schema`,f),h.assign((0,t._)`${w}.data`,d))})}e.extendErrors=s;function u(h,p){const f=h.const("err",p);h.if((0,t._)`${n.default.vErrors} === null`,()=>h.assign(n.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${n.default.vErrors}.push(${f})`),h.code((0,t._)`${n.default.errors}++`)}function c(h,p){const{gen:f,validateName:d,schemaEnv:v}=h;v.$async?f.throw((0,t._)`new ${h.ValidationError}(${p})`):(f.assign(
356
+ (0,t._)`${d}.errors`,p),f.return(!1))}const l={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function m(h,p,f){const{createErrors:d}=h.it;return d===!1?(0,t._)`{}`:y(h,p,f)}function y(h,p,f={}){const{gen:d,it:v}=h,$=[_(v,f),S(h,f)];return g(h,p,$),d.object(...$)}function _({errorPath:h},{instancePath:p}){const f=p?
357
+ (0,t.str)`${h}${(0,r.getErrorPath)(p,r.Type.Str)}`:h;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,f)]}function S({keyword:h,it:{errSchemaPath:p}},{schemaPath:f,parentSchema:d}){let v=d?p:(0,t.str)`${p}/${h}`;return f&&(v=(0,t.str)`${v}${(0,r.getErrorPath)(f,r.Type.Str)}`),[l.schemaPath,v]}function g(h,{params:p,message:f},d){const{keyword:v,data:$,schemaValue:w,it:b}=h,{opts:P,propertyName:I,topSchemaRef:H,schemaPath:x}=b;d.push([l.keyword,v],[l.params,typeof p=="function"?
358
+ p(h):p||(0,t._)`{}`]),P.messages&&d.push([l.message,typeof f=="function"?f(h):f]),P.verbose&&d.push([l.schema,w],[l.parentSchema,(0,t._)`${H}${x}`],[n.default.data,$]),I&&d.push([l.propertyName,I])}})(fs)),fs}var oi;function eh(){if(oi)return nt;oi=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.boolOrEmptySchema=nt.topBoolOrEmptySchema=void 0;const e=rr(),t=ae(),r=Oe(),n={message:"boolean schema is false"};function i(s){const{gen:u,schema:c,validateName:l}=s;c===!1?o(s,!1):typeof c=="obj\
359
+ ect"&&c.$async===!0?u.return(r.default.data):(u.assign((0,t._)`${l}.errors`,null),u.return(!0))}nt.topBoolOrEmptySchema=i;function a(s,u){const{gen:c,schema:l}=s;l===!1?(c.var(u,!1),o(s)):c.var(u,!0)}nt.boolOrEmptySchema=a;function o(s,u){const{gen:c,data:l}=s,m={gen:c,keyword:"false schema",data:l,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:s};(0,e.reportError)(m,n,void 0,u)}return nt}var ge={},st={},ai;function ii(){if(ai)return st;ai=1,Object.defineProperty(st,"__esModule",{value:!0}),
360
+ st.getRules=st.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(i){return typeof i=="string"&&t.has(i)}st.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 st.getRules=n,st}var ze={},
361
+ ci;function ui(){if(ci)return ze;ci=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.shouldUseRule=ze.shouldUseGroup=ze.schemaHasRulesForType=void 0;function e({schema:n,self:i},a){const o=i.RULES.types[a];return o&&o!==!0&&t(n,o)}ze.schemaHasRulesForType=e;function t(n,i){return i.rules.some(a=>r(n,a))}ze.shouldUseGroup=t;function r(n,i){var a;return n[i.keyword]!==void 0||((a=i.definition.implements)===null||a===void 0?void 0:a.some(o=>n[o]!==void 0))}return ze.shouldUseRule=r,ze}var li;
362
+ function nr(){if(li)return ge;li=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.reportTypeError=ge.checkDataTypes=ge.checkDataType=ge.coerceAndCheckDataType=ge.getJSONTypes=ge.getSchemaTypes=ge.DataType=void 0;const e=ii(),t=ui(),r=rr(),n=ae(),i=fe();var a;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(a||(ge.DataType=a={}));function o(f){const d=s(f.type);if(d.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!d.length&&
363
+ f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&d.push("null")}return d}ge.getSchemaTypes=o;function s(f){const d=Array.isArray(f)?f:f?[f]:[];if(d.every(e.isJSONType))return d;throw new Error("type must be JSONType or JSONType[]: "+d.join(","))}ge.getJSONTypes=s;function u(f,d){const{gen:v,data:$,opts:w}=f,b=l(d,w.coerceTypes),P=d.length>0&&!(b.length===0&&d.length===1&&(0,t.schemaHasRulesForType)(f,d[0]));if(P){const I=S(d,$,w.strictNumbers,a.Wrong);
364
+ v.if(I,()=>{b.length?m(f,d,b):h(f)})}return P}ge.coerceAndCheckDataType=u;const c=new Set(["string","number","integer","boolean","null"]);function l(f,d){return d?f.filter(v=>c.has(v)||d==="array"&&v==="array"):[]}function m(f,d,v){const{gen:$,data:w,opts:b}=f,P=$.let("dataType",(0,n._)`typeof ${w}`),I=$.let("coerced",(0,n._)`undefined`);b.coerceTypes==="array"&&$.if((0,n._)`${P} == 'object' && Array.isArray(${w}) && ${w}.length == 1`,()=>$.assign(w,(0,n._)`${w}[0]`).assign(P,(0,n._)`typeof ${w}`).
365
+ if(S(d,w,b.strictNumbers),()=>$.assign(I,w))),$.if((0,n._)`${I} !== undefined`);for(const x of v)(c.has(x)||x==="array"&&b.coerceTypes==="array")&&H(x);$.else(),h(f),$.endIf(),$.if((0,n._)`${I} !== undefined`,()=>{$.assign(w,I),y(f,I)});function H(x){switch(x){case"string":$.elseIf((0,n._)`${P} == "number" || ${P} == "boolean"`).assign(I,(0,n._)`"" + ${w}`).elseIf((0,n._)`${w} === null`).assign(I,(0,n._)`""`);return;case"number":$.elseIf((0,n._)`${P} == "boolean" || ${w} === null
366
+ || (${P} == "string" && ${w} && ${w} == +${w})`).assign(I,(0,n._)`+${w}`);return;case"integer":$.elseIf((0,n._)`${P} === "boolean" || ${w} === null
367
+ || (${P} === "string" && ${w} && ${w} == +${w} && !(${w} % 1))`).assign(I,(0,n._)`+${w}`);return;case"boolean":$.elseIf((0,n._)`${w} === "false" || ${w} === 0 || ${w} === null`).assign(I,!1).elseIf((0,n._)`${w} === "true" || ${w} === 1`).assign(I,!0);return;case"null":$.elseIf((0,n._)`${w} === "" || ${w} === 0 || ${w} === false`),$.assign(I,null);return;case"array":$.elseIf((0,n._)`${P} === "string" || ${P} === "number"
368
+ || ${P} === "boolean" || ${w} === null`).assign(I,(0,n._)`[${w}]`)}}}function y({gen:f,parentData:d,parentDataProperty:v},$){f.if((0,n._)`${d} !== undefined`,()=>f.assign((0,n._)`${d}[${v}]`,$))}function _(f,d,v,$=a.Correct){const w=$===a.Correct?n.operators.EQ:n.operators.NEQ;let b;switch(f){case"null":return(0,n._)`${d} ${w} null`;case"array":b=(0,n._)`Array.isArray(${d})`;break;case"object":b=(0,n._)`${d} && typeof ${d} == "object" && !Array.isArray(${d})`;break;case"integer":b=
369
+ P((0,n._)`!(${d} % 1) && !isNaN(${d})`);break;case"number":b=P();break;default:return(0,n._)`typeof ${d} ${w} ${f}`}return $===a.Correct?b:(0,n.not)(b);function P(I=n.nil){return(0,n.and)((0,n._)`typeof ${d} == "number"`,I,v?(0,n._)`isFinite(${d})`:n.nil)}}ge.checkDataType=_;function S(f,d,v,$){if(f.length===1)return _(f[0],d,v,$);let w;const b=(0,i.toHash)(f);if(b.array&&b.object){const P=(0,n._)`typeof ${d} != "object"`;w=b.null?P:(0,n._)`!${d} || ${P}`,delete b.null,delete b.array,delete b.object}else
370
+ w=n.nil;b.number&&delete b.integer;for(const P in b)w=(0,n.and)(w,_(P,d,v,$));return w}ge.checkDataTypes=S;const g={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:d})=>typeof f=="string"?(0,n._)`{type: ${f}}`:(0,n._)`{type: ${d}}`};function h(f){const d=p(f);(0,r.reportError)(d,g)}ge.reportTypeError=h;function p(f){const{gen:d,data:v,schema:$}=f,w=(0,i.schemaRefOrVal)(f,$,"type");return{gen:d,keyword:"type",data:v,schema:$.type,schemaCode:w,schemaValue:w,parentSchema:$,params:{},
371
+ it:f}}return ge}var Ot={},fi;function th(){if(fi)return Ot;fi=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.assignDefaults=void 0;const e=ae(),t=fe();function r(i,a){const{properties:o,items:s}=i.schema;if(a==="object"&&o)for(const u in o)n(i,u,o[u].default);else a==="array"&&Array.isArray(s)&&s.forEach((u,c)=>n(i,c,u.default))}Ot.assignDefaults=r;function n(i,a,o){const{gen:s,compositeRule:u,data:c,opts:l}=i;if(o===void 0)return;const m=(0,e._)`${c}${(0,e.getProperty)(a)}`;if(u){(0,t.checkStrictMode)(
372
+ i,`default is ignored for: ${m}`);return}let y=(0,e._)`${m} === undefined`;l.useDefaults==="empty"&&(y=(0,e._)`${y} || ${m} === null || ${m} === ""`),s.if(y,(0,e._)`${m} = ${(0,e.stringify)(o)}`)}return Ot}var Ne={},de={},di;function Ie(){if(di)return de;di=1,Object.defineProperty(de,"__esModule",{value:!0}),de.validateUnion=de.validateArray=de.usePattern=de.callValidateCode=de.schemaProperties=de.allSchemaProperties=de.noPropertyInData=de.propertyInData=de.isOwnProperty=de.hasPropFunc=de.reportMissingProp=
373
+ de.checkMissingProp=de.checkReportMissingProp=void 0;const e=ae(),t=fe(),r=Oe(),n=fe();function i(f,d){const{gen:v,data:$,it:w}=f;v.if(l(v,$,d,w.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${d}`},!0),f.error()})}de.checkReportMissingProp=i;function a({gen:f,data:d,it:{opts:v}},$,w){return(0,e.or)(...$.map(b=>(0,e.and)(l(f,d,b,v.ownProperties),(0,e._)`${w} = ${b}`)))}de.checkMissingProp=a;function o(f,d){f.setParams({missingProperty:d},!0),f.error()}de.reportMissingProp=o;function s(f){
373
374
  return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}de.hasPropFunc=s;function u(f,d,v){return(0,e._)`${s(f)}.call(${d}, ${v})`}de.isOwnProperty=u;function c(f,d,v,$){const w=(0,e._)`${d}${(0,e.getProperty)(v)} !== undefined`;return $?(0,e._)`${w} && ${u(f,d,v)}`:w}de.propertyInData=c;function l(f,d,v,$){const w=(0,e._)`${d}${(0,e.getProperty)(v)} === undefined`;return $?(0,e.or)(w,(0,e.not)(u(f,d,v))):w}de.noPropertyInData=l;function m(f){
374
- return f?Object.keys(f).filter(d=>d!=="__proto__"):[]}de.allSchemaProperties=m;function y(f,d){return m(d).filter(v=>!(0,t.alwaysValidSchema)(f,d[v]))}de.schemaProperties=y;function _({schemaCode:f,data:d,it:{gen:v,topSchemaRef:$,schemaPath:w,errorPath:E},it:P},O,U,x){const H=x?(0,e._)`${f}, ${d}, ${$}${w}`:d,D=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,E)],[r.default.parentData,P.parentData],[r.default.parentDataProperty,P.parentDataProperty],[r.default.rootData,r.default.rootData]];
375
- P.opts.dynamicRef&&D.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const I=(0,e._)`${H}, ${v.object(...D)}`;return U!==e.nil?(0,e._)`${O}.call(${U}, ${I})`:(0,e._)`${O}(${I})`}de.callValidateCode=_;const S=(0,e._)`new RegExp`;function g({gen:f,it:{opts:d}},v){const $=d.unicodeRegExp?"u":"",{regExp:w}=d.code,E=w(v,$);return f.scopeValue("pattern",{key:E.toString(),ref:E,code:(0,e._)`${w.code==="new RegExp"?S:(0,n.useFunc)(f,w)}(${v}, ${$})`})}de.usePattern=g;function p(f){const{gen:d,
376
- data:v,keyword:$,it:w}=f,E=d.name("valid");if(w.allErrors){const O=d.let("valid",!0);return P(()=>d.assign(O,!1)),O}return d.var(E,!0),P(()=>d.break()),E;function P(O){const U=d.const("len",(0,e._)`${v}.length`);d.forRange("i",0,U,x=>{f.subschema({keyword:$,dataProp:x,dataPropType:t.Type.Num},E),d.if((0,e.not)(E),O)})}}de.validateArray=p;function h(f){const{gen:d,schema:v,keyword:$,it:w}=f;if(!Array.isArray(v))throw new Error("ajv implementation error");if(v.some(U=>(0,t.alwaysValidSchema)(w,U))&&
377
- !w.opts.unevaluated)return;const P=d.let("valid",!1),O=d.name("_valid");d.block(()=>v.forEach((U,x)=>{const H=f.subschema({keyword:$,schemaProp:x,compositeRule:!0},O);d.assign(P,(0,e._)`${P} || ${O}`),f.mergeValidEvaluated(H,O)||d.if((0,e.not)(P))})),f.result(P,()=>f.reset(),()=>f.error(!0))}return de.validateUnion=h,de}var pi;function rh(){if(pi)return Oe;pi=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.validateKeywordUsage=Oe.validSchemaType=Oe.funcKeywordCode=Oe.macroKeywordCode=void 0;
378
- const e=ae(),t=Ne(),r=Ie(),n=rr();function i(y,_){const{gen:S,keyword:g,schema:p,parentSchema:h,it:f}=y,d=_.macro.call(f.self,p,h,f),v=c(S,g,d);f.opts.validateSchema!==!1&&f.self.validateSchema(d,!0);const $=S.name("valid");y.subschema({schema:d,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${g}`,topSchemaRef:v,compositeRule:!0},$),y.pass($,()=>y.error(!0))}Oe.macroKeywordCode=i;function o(y,_){var S;const{gen:g,keyword:p,schema:h,parentSchema:f,$data:d,it:v}=y;u(v,_);const $=!d&&_.compile?
379
- _.compile.call(v.self,h,f,v):_.validate,w=c(g,p,$),E=g.let("valid");y.block$data(E,P),y.ok((S=_.valid)!==null&&S!==void 0?S:E);function P(){if(_.errors===!1)x(),_.modifying&&a(y),H(()=>y.error());else{const D=_.async?O():U();_.modifying&&a(y),H(()=>s(y,D))}}function O(){const D=g.let("ruleErrs",null);return g.try(()=>x((0,e._)`await `),I=>g.assign(E,!1).if((0,e._)`${I} instanceof ${v.ValidationError}`,()=>g.assign(D,(0,e._)`${I}.errors`),()=>g.throw(I))),D}function U(){const D=(0,e._)`${w}.errors`;
380
- return g.assign(D,null),x(e.nil),D}function x(D=_.async?(0,e._)`await `:e.nil){const I=v.opts.passContext?t.default.this:t.default.self,M=!("compile"in _&&!d||_.schema===!1);g.assign(E,(0,e._)`${D}${(0,r.callValidateCode)(y,w,I,M)}`,_.modifying)}function H(D){var I;g.if((0,e.not)((I=_.valid)!==null&&I!==void 0?I:E),D)}}Oe.funcKeywordCode=o;function a(y){const{gen:_,data:S,it:g}=y;_.if(g.parentData,()=>_.assign(S,(0,e._)`${g.parentData}[${g.parentDataProperty}]`))}function s(y,_){const{gen:S}=y;S.
375
+ return f?Object.keys(f).filter(d=>d!=="__proto__"):[]}de.allSchemaProperties=m;function y(f,d){return m(d).filter(v=>!(0,t.alwaysValidSchema)(f,d[v]))}de.schemaProperties=y;function _({schemaCode:f,data:d,it:{gen:v,topSchemaRef:$,schemaPath:w,errorPath:b},it:P},I,H,x){const U=x?(0,e._)`${f}, ${d}, ${$}${w}`:d,L=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,b)],[r.default.parentData,P.parentData],[r.default.parentDataProperty,P.parentDataProperty],[r.default.rootData,r.default.rootData]];
376
+ P.opts.dynamicRef&&L.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const j=(0,e._)`${U}, ${v.object(...L)}`;return H!==e.nil?(0,e._)`${I}.call(${H}, ${j})`:(0,e._)`${I}(${j})`}de.callValidateCode=_;const S=(0,e._)`new RegExp`;function g({gen:f,it:{opts:d}},v){const $=d.unicodeRegExp?"u":"",{regExp:w}=d.code,b=w(v,$);return f.scopeValue("pattern",{key:b.toString(),ref:b,code:(0,e._)`${w.code==="new RegExp"?S:(0,n.useFunc)(f,w)}(${v}, ${$})`})}de.usePattern=g;function h(f){const{gen:d,
377
+ data:v,keyword:$,it:w}=f,b=d.name("valid");if(w.allErrors){const I=d.let("valid",!0);return P(()=>d.assign(I,!1)),I}return d.var(b,!0),P(()=>d.break()),b;function P(I){const H=d.const("len",(0,e._)`${v}.length`);d.forRange("i",0,H,x=>{f.subschema({keyword:$,dataProp:x,dataPropType:t.Type.Num},b),d.if((0,e.not)(b),I)})}}de.validateArray=h;function p(f){const{gen:d,schema:v,keyword:$,it:w}=f;if(!Array.isArray(v))throw new Error("ajv implementation error");if(v.some(H=>(0,t.alwaysValidSchema)(w,H))&&
378
+ !w.opts.unevaluated)return;const P=d.let("valid",!1),I=d.name("_valid");d.block(()=>v.forEach((H,x)=>{const U=f.subschema({keyword:$,schemaProp:x,compositeRule:!0},I);d.assign(P,(0,e._)`${P} || ${I}`),f.mergeValidEvaluated(U,I)||d.if((0,e.not)(P))})),f.result(P,()=>f.reset(),()=>f.error(!0))}return de.validateUnion=p,de}var pi;function rh(){if(pi)return Ne;pi=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.validateKeywordUsage=Ne.validSchemaType=Ne.funcKeywordCode=Ne.macroKeywordCode=void 0;
379
+ const e=ae(),t=Oe(),r=Ie(),n=rr();function i(y,_){const{gen:S,keyword:g,schema:h,parentSchema:p,it:f}=y,d=_.macro.call(f.self,h,p,f),v=c(S,g,d);f.opts.validateSchema!==!1&&f.self.validateSchema(d,!0);const $=S.name("valid");y.subschema({schema:d,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${g}`,topSchemaRef:v,compositeRule:!0},$),y.pass($,()=>y.error(!0))}Ne.macroKeywordCode=i;function a(y,_){var S;const{gen:g,keyword:h,schema:p,parentSchema:f,$data:d,it:v}=y;u(v,_);const $=!d&&_.compile?
380
+ _.compile.call(v.self,p,f,v):_.validate,w=c(g,h,$),b=g.let("valid");y.block$data(b,P),y.ok((S=_.valid)!==null&&S!==void 0?S:b);function P(){if(_.errors===!1)x(),_.modifying&&o(y),U(()=>y.error());else{const L=_.async?I():H();_.modifying&&o(y),U(()=>s(y,L))}}function I(){const L=g.let("ruleErrs",null);return g.try(()=>x((0,e._)`await `),j=>g.assign(b,!1).if((0,e._)`${j} instanceof ${v.ValidationError}`,()=>g.assign(L,(0,e._)`${j}.errors`),()=>g.throw(j))),L}function H(){const L=(0,e._)`${w}.errors`;
381
+ return g.assign(L,null),x(e.nil),L}function x(L=_.async?(0,e._)`await `:e.nil){const j=v.opts.passContext?t.default.this:t.default.self,M=!("compile"in _&&!d||_.schema===!1);g.assign(b,(0,e._)`${L}${(0,r.callValidateCode)(y,w,j,M)}`,_.modifying)}function U(L){var j;g.if((0,e.not)((j=_.valid)!==null&&j!==void 0?j:b),L)}}Ne.funcKeywordCode=a;function o(y){const{gen:_,data:S,it:g}=y;_.if(g.parentData,()=>_.assign(S,(0,e._)`${g.parentData}[${g.parentDataProperty}]`))}function s(y,_){const{gen:S}=y;S.
381
382
  if((0,e._)`Array.isArray(${_})`,()=>{S.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${_} : ${t.default.vErrors}.concat(${_})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(y)},()=>y.error())}function u({schemaEnv:y},_){if(_.async&&!y.$async)throw new Error("async keyword in sync schema")}function c(y,_,S){if(S===void 0)throw new Error(`keyword "${_}" failed to compile`);return y.scopeValue("keyword",typeof S=="function"?{ref:S}:{ref:S,code:(0,e.
382
- stringify)(S)})}function l(y,_,S=!1){return!_.length||_.some(g=>g==="array"?Array.isArray(y):g==="object"?y&&typeof y=="object"&&!Array.isArray(y):typeof y==g||S&&typeof y>"u")}Oe.validSchemaType=l;function m({schema:y,opts:_,self:S,errSchemaPath:g},p,h){if(Array.isArray(p.keyword)?!p.keyword.includes(h):p.keyword!==h)throw new Error("ajv implementation error");const f=p.dependencies;if(f?.some(d=>!Object.prototype.hasOwnProperty.call(y,d)))throw new Error(`parent schema must have dependencies o\
383
- f ${h}: ${f.join(",")}`);if(p.validateSchema&&!p.validateSchema(y[h])){const v=`keyword "${h}" value is invalid at path "${g}": `+S.errorsText(p.validateSchema.errors);if(_.validateSchema==="log")S.logger.error(v);else throw new Error(v)}}return Oe.validateKeywordUsage=m,Oe}var Be={},hi;function nh(){if(hi)return Be;hi=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.extendSubschemaMode=Be.extendSubschemaData=Be.getSubschema=void 0;const e=ae(),t=fe();function r(o,{keyword:a,schemaProp:s,schema:u,
384
- schemaPath:c,errSchemaPath:l,topSchemaRef:m}){if(a!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const y=o.schema[a];return s===void 0?{schema:y,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${a}`}:{schema:y[s],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${a}/${(0,t.escapeFragment)(s)}`}}if(u!==void 0){if(c===void 0||
385
- l===void 0||m===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:c,topSchemaRef:m,errSchemaPath:l}}throw new Error('either "keyword" or "schema" must be passed')}Be.getSubschema=r;function n(o,a,{dataProp:s,dataPropType:u,data:c,dataTypes:l,propertyName:m}){if(c!==void 0&&s!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:y}=a;if(s!==void 0){const{errorPath:S,dataPathArr:g,opts:p}=a,
386
- h=y.let("data",(0,e._)`${a.data}${(0,e.getProperty)(s)}`,!0);_(h),o.errorPath=(0,e.str)`${S}${(0,t.getErrorPath)(s,u,p.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${s}`,o.dataPathArr=[...g,o.parentDataProperty]}if(c!==void 0){const S=c instanceof e.Name?c:y.let("data",c,!0);_(S),m!==void 0&&(o.propertyName=m)}l&&(o.dataTypes=l);function _(S){o.data=S,o.dataLevel=a.dataLevel+1,o.dataTypes=[],a.definedProperties=new Set,o.parentData=a.data,o.dataNames=[...a.dataNames,S]}}Be.extendSubschemaData=
387
- n;function i(o,{jtdDiscriminator:a,jtdMetadata:s,compositeRule:u,createErrors:c,allErrors:l}){u!==void 0&&(o.compositeRule=u),c!==void 0&&(o.createErrors=c),l!==void 0&&(o.allErrors=l),o.jtdDiscriminator=a,o.jtdMetadata=s}return Be.extendSubschemaMode=i,Be}var Ee={},ms={exports:{}},mi;function sh(){if(mi)return ms.exports;mi=1;var e=ms.exports=function(n,i,o){typeof i=="function"&&(o=i,i={}),o=i.cb||o;var a=typeof o=="function"?o:o.pre||function(){},s=o.post||function(){};t(i,a,s,n,"",n)};e.keywords=
383
+ stringify)(S)})}function l(y,_,S=!1){return!_.length||_.some(g=>g==="array"?Array.isArray(y):g==="object"?y&&typeof y=="object"&&!Array.isArray(y):typeof y==g||S&&typeof y>"u")}Ne.validSchemaType=l;function m({schema:y,opts:_,self:S,errSchemaPath:g},h,p){if(Array.isArray(h.keyword)?!h.keyword.includes(p):h.keyword!==p)throw new Error("ajv implementation error");const f=h.dependencies;if(f?.some(d=>!Object.prototype.hasOwnProperty.call(y,d)))throw new Error(`parent schema must have dependencies o\
384
+ f ${p}: ${f.join(",")}`);if(h.validateSchema&&!h.validateSchema(y[p])){const v=`keyword "${p}" value is invalid at path "${g}": `+S.errorsText(h.validateSchema.errors);if(_.validateSchema==="log")S.logger.error(v);else throw new Error(v)}}return Ne.validateKeywordUsage=m,Ne}var Ge={},hi;function nh(){if(hi)return Ge;hi=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.extendSubschemaMode=Ge.extendSubschemaData=Ge.getSubschema=void 0;const e=ae(),t=fe();function r(a,{keyword:o,schemaProp:s,schema:u,
385
+ schemaPath:c,errSchemaPath:l,topSchemaRef:m}){if(o!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(o!==void 0){const y=a.schema[o];return s===void 0?{schema:y,schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(o)}`,errSchemaPath:`${a.errSchemaPath}/${o}`}:{schema:y[s],schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(o)}${(0,e.getProperty)(s)}`,errSchemaPath:`${a.errSchemaPath}/${o}/${(0,t.escapeFragment)(s)}`}}if(u!==void 0){if(c===void 0||
386
+ l===void 0||m===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:c,topSchemaRef:m,errSchemaPath:l}}throw new Error('either "keyword" or "schema" must be passed')}Ge.getSubschema=r;function n(a,o,{dataProp:s,dataPropType:u,data:c,dataTypes:l,propertyName:m}){if(c!==void 0&&s!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:y}=o;if(s!==void 0){const{errorPath:S,dataPathArr:g,opts:h}=o,
387
+ p=y.let("data",(0,e._)`${o.data}${(0,e.getProperty)(s)}`,!0);_(p),a.errorPath=(0,e.str)`${S}${(0,t.getErrorPath)(s,u,h.jsPropertySyntax)}`,a.parentDataProperty=(0,e._)`${s}`,a.dataPathArr=[...g,a.parentDataProperty]}if(c!==void 0){const S=c instanceof e.Name?c:y.let("data",c,!0);_(S),m!==void 0&&(a.propertyName=m)}l&&(a.dataTypes=l);function _(S){a.data=S,a.dataLevel=o.dataLevel+1,a.dataTypes=[],o.definedProperties=new Set,a.parentData=o.data,a.dataNames=[...o.dataNames,S]}}Ge.extendSubschemaData=
388
+ n;function i(a,{jtdDiscriminator:o,jtdMetadata:s,compositeRule:u,createErrors:c,allErrors:l}){u!==void 0&&(a.compositeRule=u),c!==void 0&&(a.createErrors=c),l!==void 0&&(a.allErrors=l),a.jtdDiscriminator=o,a.jtdMetadata=s}return Ge.extendSubschemaMode=i,Ge}var Ee={},ms={exports:{}},mi;function sh(){if(mi)return ms.exports;mi=1;var e=ms.exports=function(n,i,a){typeof i=="function"&&(a=i,i={}),a=i.cb||a;var o=typeof a=="function"?a:a.pre||function(){},s=a.post||function(){};t(i,o,s,n,"",n)};e.keywords=
388
389
  {additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};
389
- function t(n,i,o,a,s,u,c,l,m,y){if(a&&typeof a=="object"&&!Array.isArray(a)){i(a,s,u,c,l,m,y);for(var _ in a){var S=a[_];if(Array.isArray(S)){if(_ in e.arrayKeywords)for(var g=0;g<S.length;g++)t(n,i,o,S[g],s+"/"+_+"/"+g,u,s,_,a,g)}else if(_ in e.propsKeywords){if(S&&typeof S=="object")for(var p in S)t(n,i,o,S[p],s+"/"+_+"/"+r(p),u,s,_,a,p)}else(_ in e.keywords||n.allKeys&&!(_ in e.skipKeywords))&&t(n,i,o,S,s+"/"+_,u,s,_,a)}o(a,s,u,c,l,m,y)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,
390
- "~1")}return ms.exports}var yi;function sr(){if(yi)return Ee;yi=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getSchemaRefs=Ee.resolveUrl=Ee.normalizeId=Ee._getFullPath=Ee.getFullPath=Ee.inlineRef=void 0;const e=fe(),t=Do(),r=sh(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(g,p=!0){return typeof g=="boolean"?!0:p===!0?!a(g):p?s(g)<=
391
- p:!1}Ee.inlineRef=i;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(g){for(const p in g){if(o.has(p))return!0;const h=g[p];if(Array.isArray(h)&&h.some(a)||typeof h=="object"&&a(h))return!0}return!1}function s(g){let p=0;for(const h in g){if(h==="$ref")return 1/0;if(p++,!n.has(h)&&(typeof g[h]=="object"&&(0,e.eachItem)(g[h],f=>p+=s(f)),p===1/0))return 1/0}return p}function u(g,p="",h){h!==!1&&(p=m(p));const f=g.parse(p);return c(g,f)}Ee.getFullPath=
392
- u;function c(g,p){return g.serialize(p).split("#")[0]+"#"}Ee._getFullPath=c;const l=/#\/?$/;function m(g){return g?g.replace(l,""):""}Ee.normalizeId=m;function y(g,p,h){return h=m(h),g.resolve(p,h)}Ee.resolveUrl=y;const _=/^[a-z_][-a-z0-9._]*$/i;function S(g,p){if(typeof g=="boolean")return{};const{schemaId:h,uriResolver:f}=this.opts,d=m(g[h]||p),v={"":d},$=u(f,d,!1),w={},E=new Set;return r(g,{allKeys:!0},(U,x,H,D)=>{if(D===void 0)return;const I=$+x;let M=v[D];typeof U[h]=="string"&&(M=z.call(this,
393
- U[h])),F.call(this,U.$anchor),F.call(this,U.$dynamicAnchor),v[x]=M;function z(G){const Q=this.opts.uriResolver.resolve;if(G=m(M?Q(M,G):G),E.has(G))throw O(G);E.add(G);let q=this.refs[G];return typeof q=="string"&&(q=this.refs[q]),typeof q=="object"?P(U,q.schema,G):G!==m(I)&&(G[0]==="#"?(P(U,w[G],G),w[G]=U):this.refs[G]=I),G}function F(G){if(typeof G=="string"){if(!_.test(G))throw new Error(`invalid anchor "${G}"`);z.call(this,`#${G}`)}}}),w;function P(U,x,H){if(x!==void 0&&!t(U,x))throw O(H)}function O(U){
394
- return new Error(`reference "${U}" resolves to more than one schema`)}}return Ee.getSchemaRefs=S,Ee}var gi;function Nt(){if(gi)return ze;gi=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.getData=ze.KeywordCxt=ze.validateFunctionCode=void 0;const e=eh(),t=nr(),r=ui(),n=nr(),i=th(),o=rh(),a=nh(),s=ae(),u=Ne(),c=sr(),l=fe(),m=rr();function y(k){if($(k)&&(E(k),v(k))){p(k);return}_(k,()=>(0,e.topBoolOrEmptySchema)(k))}ze.validateFunctionCode=y;function _({gen:k,validateName:N,schema:V,schemaEnv:X,
395
- opts:Z},J){Z.code.es5?k.func(N,(0,s._)`${u.default.data}, ${u.default.valCxt}`,X.$async,()=>{k.code((0,s._)`"use strict"; ${f(V,Z)}`),g(k,Z),k.code(J)}):k.func(N,(0,s._)`${u.default.data}, ${S(Z)}`,X.$async,()=>k.code(f(V,Z)).code(J))}function S(k){return(0,s._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${k.dynamicRef?(0,s._)`, ${u.default.dynamicAnchors}={}`:s.nil}}={}`}function g(k,N){k.if(u.default.valCxt,()=>{
396
- k.var(u.default.instancePath,(0,s._)`${u.default.valCxt}.${u.default.instancePath}`),k.var(u.default.parentData,(0,s._)`${u.default.valCxt}.${u.default.parentData}`),k.var(u.default.parentDataProperty,(0,s._)`${u.default.valCxt}.${u.default.parentDataProperty}`),k.var(u.default.rootData,(0,s._)`${u.default.valCxt}.${u.default.rootData}`),N.dynamicRef&&k.var(u.default.dynamicAnchors,(0,s._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{k.var(u.default.instancePath,(0,s._)`""`),k.var(u.default.
397
- parentData,(0,s._)`undefined`),k.var(u.default.parentDataProperty,(0,s._)`undefined`),k.var(u.default.rootData,u.default.data),N.dynamicRef&&k.var(u.default.dynamicAnchors,(0,s._)`{}`)})}function p(k){const{schema:N,opts:V,gen:X}=k;_(k,()=>{V.$comment&&N.$comment&&D(k),U(k),X.let(u.default.vErrors,null),X.let(u.default.errors,0),V.unevaluated&&h(k),P(k),I(k)})}function h(k){const{gen:N,validateName:V}=k;k.evaluated=N.const("evaluated",(0,s._)`${V}.evaluated`),N.if((0,s._)`${k.evaluated}.dynamicProps`,
398
- ()=>N.assign((0,s._)`${k.evaluated}.props`,(0,s._)`undefined`)),N.if((0,s._)`${k.evaluated}.dynamicItems`,()=>N.assign((0,s._)`${k.evaluated}.items`,(0,s._)`undefined`))}function f(k,N){const V=typeof k=="object"&&k[N.schemaId];return V&&(N.code.source||N.code.process)?(0,s._)`/*# sourceURL=${V} */`:s.nil}function d(k,N){if($(k)&&(E(k),v(k))){w(k,N);return}(0,e.boolOrEmptySchema)(k,N)}function v({schema:k,self:N}){if(typeof k=="boolean")return!k;for(const V in k)if(N.RULES.all[V])return!0;return!1}
399
- function $(k){return typeof k.schema!="boolean"}function w(k,N){const{schema:V,gen:X,opts:Z}=k;Z.$comment&&V.$comment&&D(k),x(k),H(k);const J=X.const("_errs",u.default.errors);P(k,J),X.var(N,(0,s._)`${J} === ${u.default.errors}`)}function E(k){(0,l.checkUnknownRules)(k),O(k)}function P(k,N){if(k.opts.jtd)return z(k,[],!1,N);const V=(0,t.getSchemaTypes)(k.schema),X=(0,t.coerceAndCheckDataType)(k,V);z(k,V,!X,N)}function O(k){const{schema:N,errSchemaPath:V,opts:X,self:Z}=k;N.$ref&&X.ignoreKeywordsWithRef&&
400
- (0,l.schemaHasRulesButRef)(N,Z.RULES)&&Z.logger.warn(`$ref: keywords ignored in schema at path "${V}"`)}function U(k){const{schema:N,opts:V}=k;N.default!==void 0&&V.useDefaults&&V.strictSchema&&(0,l.checkStrictMode)(k,"default is ignored in the schema root")}function x(k){const N=k.schema[k.opts.schemaId];N&&(k.baseId=(0,c.resolveUrl)(k.opts.uriResolver,k.baseId,N))}function H(k){if(k.schema.$async&&!k.schemaEnv.$async)throw new Error("async schema in sync schema")}function D({gen:k,schemaEnv:N,
401
- schema:V,errSchemaPath:X,opts:Z}){const J=V.$comment;if(Z.$comment===!0)k.code((0,s._)`${u.default.self}.logger.log(${J})`);else if(typeof Z.$comment=="function"){const ue=(0,s.str)`${X}/$comment`,we=k.scopeValue("root",{ref:N.root});k.code((0,s._)`${u.default.self}.opts.$comment(${J}, ${ue}, ${we}.schema)`)}}function I(k){const{gen:N,schemaEnv:V,validateName:X,ValidationError:Z,opts:J}=k;V.$async?N.if((0,s._)`${u.default.errors} === 0`,()=>N.return(u.default.data),()=>N.throw((0,s._)`new ${Z}(${u.
402
- default.vErrors})`)):(N.assign((0,s._)`${X}.errors`,u.default.vErrors),J.unevaluated&&M(k),N.return((0,s._)`${u.default.errors} === 0`))}function M({gen:k,evaluated:N,props:V,items:X}){V instanceof s.Name&&k.assign((0,s._)`${N}.props`,V),X instanceof s.Name&&k.assign((0,s._)`${N}.items`,X)}function z(k,N,V,X){const{gen:Z,schema:J,data:ue,allErrors:we,opts:Y,self:ne}=k,{RULES:W}=ne;if(J.$ref&&(Y.ignoreKeywordsWithRef||!(0,l.schemaHasRulesButRef)(J,W))){Z.block(()=>B(k,"$ref",W.all.$ref.definition));
403
- return}Y.jtd||G(k,N),Z.block(()=>{for(const le of W.rules)te(le);te(W.post)});function te(le){(0,r.shouldUseGroup)(J,le)&&(le.type?(Z.if((0,n.checkDataType)(le.type,ue,Y.strictNumbers)),F(k,le),N.length===1&&N[0]===le.type&&V&&(Z.else(),(0,n.reportTypeError)(k)),Z.endIf()):F(k,le),we||Z.if((0,s._)`${u.default.errors} === ${X||0}`))}}function F(k,N){const{gen:V,schema:X,opts:{useDefaults:Z}}=k;Z&&(0,i.assignDefaults)(k,N.type),V.block(()=>{for(const J of N.rules)(0,r.shouldUseRule)(X,J)&&B(k,J.keyword,
404
- J.definition,N.type)})}function G(k,N){k.schemaEnv.meta||!k.opts.strictTypes||(Q(k,N),k.opts.allowUnionTypes||q(k,N),A(k,k.dataTypes))}function Q(k,N){if(N.length){if(!k.dataTypes.length){k.dataTypes=N;return}N.forEach(V=>{T(k.dataTypes,V)||b(k,`type "${V}" not allowed by context "${k.dataTypes.join(",")}"`)}),R(k,N)}}function q(k,N){N.length>1&&!(N.length===2&&N.includes("null"))&&b(k,"use allowUnionTypes to allow union type keyword")}function A(k,N){const V=k.self.RULES.all;for(const X in V){const Z=V[X];
405
- if(typeof Z=="object"&&(0,r.shouldUseRule)(k.schema,Z)){const{type:J}=Z.definition;J.length&&!J.some(ue=>L(N,ue))&&b(k,`missing type "${J.join(",")}" for keyword "${X}"`)}}}function L(k,N){return k.includes(N)||N==="number"&&k.includes("integer")}function T(k,N){return k.includes(N)||N==="integer"&&k.includes("number")}function R(k,N){const V=[];for(const X of k.dataTypes)T(N,X)?V.push(X):N.includes("integer")&&X==="number"&&V.push("integer");k.dataTypes=V}function b(k,N){const V=k.schemaEnv.baseId+
406
- k.errSchemaPath;N+=` at "${V}" (strictTypes)`,(0,l.checkStrictMode)(k,N,k.opts.strictTypes)}class C{constructor(N,V,X){if((0,o.validateKeywordUsage)(N,V,X),this.gen=N.gen,this.allErrors=N.allErrors,this.keyword=X,this.data=N.data,this.schema=N.schema[X],this.$data=V.$data&&N.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,l.schemaRefOrVal)(N,this.schema,X,this.$data),this.schemaType=V.schemaType,this.parentSchema=N.schema,this.params={},this.it=N,this.def=V,this.$data)this.schemaCode=
407
- N.gen.const("vSchema",re(this.$data,N));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,V.schemaType,V.allowUndefined))throw new Error(`${X} value must be ${JSON.stringify(V.schemaType)}`);("code"in V?V.trackErrors:V.errors!==!1)&&(this.errsCount=N.gen.const("_errs",u.default.errors))}result(N,V,X){this.failResult((0,s.not)(N),V,X)}failResult(N,V,X){this.gen.if(N),X?X():this.error(),V?(this.gen.else(),V(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():
408
- this.gen.else()}pass(N,V){this.failResult((0,s.not)(N),void 0,V)}fail(N){if(N===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(N),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(N){if(!this.$data)return this.fail(N);const{schemaCode:V}=this;this.fail((0,s._)`${V} !== undefined && (${(0,s.or)(this.invalid$data(),N)})`)}error(N,V,X){if(V){this.setParams(V),this._error(N,X),this.setParams({});return}this._error(N,X)}_error(N,V){(N?m.reportExtraError:m.
409
- reportError)(this,this.def.error,V)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(N){this.allErrors||this.gen.if(N)}setParams(N,V){V?Object.assign(this.params,N):this.params=N}block$data(N,V,X=s.nil){this.gen.block(()=>{this.check$data(N,X),V()})}check$data(N=s.nil,V=s.nil){if(!this.$data)return;const{gen:X,schemaCode:Z,schemaType:J,
410
- def:ue}=this;X.if((0,s.or)((0,s._)`${Z} === undefined`,V)),N!==s.nil&&X.assign(N,!0),(J.length||ue.validateSchema)&&(X.elseIf(this.invalid$data()),this.$dataError(),N!==s.nil&&X.assign(N,!1)),X.else()}invalid$data(){const{gen:N,schemaCode:V,schemaType:X,def:Z,it:J}=this;return(0,s.or)(ue(),we());function ue(){if(X.length){if(!(V instanceof s.Name))throw new Error("ajv implementation error");const Y=Array.isArray(X)?X:[X];return(0,s._)`${(0,n.checkDataTypes)(Y,V,J.opts.strictNumbers,n.DataType.Wrong)}`}
411
- return s.nil}function we(){if(Z.validateSchema){const Y=N.scopeValue("validate$data",{ref:Z.validateSchema});return(0,s._)`!${Y}(${V})`}return s.nil}}subschema(N,V){const X=(0,a.getSubschema)(this.it,N);(0,a.extendSubschemaData)(X,this.it,N),(0,a.extendSubschemaMode)(X,N);const Z={...this.it,...X,items:void 0,props:void 0};return d(Z,V),Z}mergeEvaluated(N,V){const{it:X,gen:Z}=this;X.opts.unevaluated&&(X.props!==!0&&N.props!==void 0&&(X.props=l.mergeEvaluated.props(Z,N.props,X.props,V)),X.items!==
412
- !0&&N.items!==void 0&&(X.items=l.mergeEvaluated.items(Z,N.items,X.items,V)))}mergeValidEvaluated(N,V){const{it:X,gen:Z}=this;if(X.opts.unevaluated&&(X.props!==!0||X.items!==!0))return Z.if(V,()=>this.mergeEvaluated(N,s.Name)),!0}}ze.KeywordCxt=C;function B(k,N,V,X){const Z=new C(k,V,N);"code"in V?V.code(Z,X):Z.$data&&V.validate?(0,o.funcKeywordCode)(Z,V):"macro"in V?(0,o.macroKeywordCode)(Z,V):(V.compile||V.validate)&&(0,o.funcKeywordCode)(Z,V)}const K=/^\/(?:[^~]|~0|~1)*$/,ee=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
413
- function re(k,{dataLevel:N,dataNames:V,dataPathArr:X}){let Z,J;if(k==="")return u.default.rootData;if(k[0]==="/"){if(!K.test(k))throw new Error(`Invalid JSON-pointer: ${k}`);Z=k,J=u.default.rootData}else{const ne=ee.exec(k);if(!ne)throw new Error(`Invalid JSON-pointer: ${k}`);const W=+ne[1];if(Z=ne[2],Z==="#"){if(W>=N)throw new Error(Y("property/index",W));return X[N-W]}if(W>N)throw new Error(Y("data",W));if(J=V[N-W],!Z)return J}let ue=J;const we=Z.split("/");for(const ne of we)ne&&(J=(0,s._)`${J}${(0,s.
414
- getProperty)((0,l.unescapeJsonPointer)(ne))}`,ue=(0,s._)`${ue} && ${J}`);return ue;function Y(ne,W){return`Cannot access ${ne} ${W} levels up, current level is ${N}`}}return ze.getData=re,ze}var or={},vi;function ar(){if(vi)return or;vi=1,Object.defineProperty(or,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return or.default=e,or}var ir={},$i;function Ot(){if($i)return ir;$i=1,Object.defineProperty(ir,"__esMod\
415
- ule",{value:!0});const e=sr();class t extends Error{constructor(n,i,o,a){super(a||`can't resolve reference ${o} from id ${i}`),this.missingRef=(0,e.resolveUrl)(n,i,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return ir.default=t,ir}var ke={},_i;function cr(){if(_i)return ke;_i=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.resolveSchema=ke.getCompilingSchema=ke.resolveRef=ke.compileSchema=ke.SchemaEnv=void 0;const e=ae(),t=ar(),r=Ne(),n=sr(),i=fe(),o=Nt();
416
- class a{constructor(h){var f;this.refs={},this.dynamicAnchors={};let d;typeof h.schema=="object"&&(d=h.schema),this.schema=h.schema,this.schemaId=h.schemaId,this.root=h.root||this,this.baseId=(f=h.baseId)!==null&&f!==void 0?f:(0,n.normalizeId)(d?.[h.schemaId||"$id"]),this.schemaPath=h.schemaPath,this.localRefs=h.localRefs,this.meta=h.meta,this.$async=d?.$async,this.refs={}}}ke.SchemaEnv=a;function s(p){const h=l.call(this,p);if(h)return h;const f=(0,n.getFullPath)(this.opts.uriResolver,p.root.baseId),
417
- {es5:d,lines:v}=this.opts.code,{ownProperties:$}=this.opts,w=new e.CodeGen(this.scope,{es5:d,lines:v,ownProperties:$});let E;p.$async&&(E=w.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const P=w.scopeName("validate");p.validateName=P;const O={gen:w,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],
418
- definedProperties:new Set,topSchemaRef:w.scopeValue("schema",this.opts.code.source===!0?{ref:p.schema,code:(0,e.stringify)(p.schema)}:{ref:p.schema}),validateName:P,ValidationError:E,schema:p.schema,schemaEnv:p,rootId:f,baseId:p.baseId||f,schemaPath:e.nil,errSchemaPath:p.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let U;try{this._compilations.add(p),(0,o.validateFunctionCode)(O),w.optimize(this.opts.code.optimize);const x=w.toString();U=`${w.scopeRefs(r.default.
419
- scope)}return ${x}`,this.opts.code.process&&(U=this.opts.code.process(U,p));const D=new Function(`${r.default.self}`,`${r.default.scope}`,U)(this,this.scope.get());if(this.scope.value(P,{ref:D}),D.errors=null,D.schema=p.schema,D.schemaEnv=p,p.$async&&(D.$async=!0),this.opts.code.source===!0&&(D.source={validateName:P,validateCode:x,scopeValues:w._values}),this.opts.unevaluated){const{props:I,items:M}=O;D.evaluated={props:I instanceof e.Name?void 0:I,items:M instanceof e.Name?void 0:M,dynamicProps:I instanceof
420
- e.Name,dynamicItems:M instanceof e.Name},D.source&&(D.source.evaluated=(0,e.stringify)(D.evaluated))}return p.validate=D,p}catch(x){throw delete p.validate,delete p.validateName,U&&this.logger.error("Error compiling schema, function code:",U),x}finally{this._compilations.delete(p)}}ke.compileSchema=s;function u(p,h,f){var d;f=(0,n.resolveUrl)(this.opts.uriResolver,h,f);const v=p.refs[f];if(v)return v;let $=y.call(this,p,f);if($===void 0){const w=(d=p.localRefs)===null||d===void 0?void 0:d[f],{schemaId:E}=this.
421
- opts;w&&($=new a({schema:w,schemaId:E,root:p,baseId:h}))}if($!==void 0)return p.refs[f]=c.call(this,$)}ke.resolveRef=u;function c(p){return(0,n.inlineRef)(p.schema,this.opts.inlineRefs)?p.schema:p.validate?p:s.call(this,p)}function l(p){for(const h of this._compilations)if(m(h,p))return h}ke.getCompilingSchema=l;function m(p,h){return p.schema===h.schema&&p.root===h.root&&p.baseId===h.baseId}function y(p,h){let f;for(;typeof(f=this.refs[h])=="string";)h=f;return f||this.schemas[h]||_.call(this,p,
422
- h)}function _(p,h){const f=this.opts.uriResolver.parse(h),d=(0,n._getFullPath)(this.opts.uriResolver,f);let v=(0,n.getFullPath)(this.opts.uriResolver,p.baseId,void 0);if(Object.keys(p.schema).length>0&&d===v)return g.call(this,f,p);const $=(0,n.normalizeId)(d),w=this.refs[$]||this.schemas[$];if(typeof w=="string"){const E=_.call(this,p,w);return typeof E?.schema!="object"?void 0:g.call(this,f,E)}if(typeof w?.schema=="object"){if(w.validate||s.call(this,w),$===(0,n.normalizeId)(h)){const{schema:E}=w,
423
- {schemaId:P}=this.opts,O=E[P];return O&&(v=(0,n.resolveUrl)(this.opts.uriResolver,v,O)),new a({schema:E,schemaId:P,root:p,baseId:v})}return g.call(this,f,w)}}ke.resolveSchema=_;const S=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(p,{baseId:h,schema:f,root:d}){var v;if(((v=p.fragment)===null||v===void 0?void 0:v[0])!=="/")return;for(const E of p.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const P=f[(0,i.unescapeFragment)(E)];if(P===void 0)
424
- return;f=P;const O=typeof f=="object"&&f[this.opts.schemaId];!S.has(E)&&O&&(h=(0,n.resolveUrl)(this.opts.uriResolver,h,O))}let $;if(typeof f!="boolean"&&f.$ref&&!(0,i.schemaHasRulesButRef)(f,this.RULES)){const E=(0,n.resolveUrl)(this.opts.uriResolver,h,f.$ref);$=_.call(this,d,E)}const{schemaId:w}=this.opts;if($=$||new a({schema:f,schemaId:w,root:d,baseId:h}),$.schema!==$.root.schema)return $}return ke}const wi="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",bi="M\
425
- eta-schema for $data reference (JSON AnySchema extension proposal)",Ei="object",Si=["$data"],Ri={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Ai=!1,oh={$id:wi,description:bi,type:Ei,required:Si,properties:Ri,additionalProperties:Ai},ah={__proto__:null,$id:wi,additionalProperties:Ai,default:oh,description:bi,properties:Ri,required:Si,type:Ei},ih=De(ah);var ur={},It={exports:{}},ys,Pi;function ch(){return Pi||(Pi=1,ys={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,
426
- 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}}),ys}var gs,Ci;function uh(){if(Ci)return gs;Ci=1;const{HEX:e}=ch(),t=/^(?:(?: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(g){if(s(g,".")<3)return{host:g,isIPV4:!1};const p=g.match(t)||[],[h]=p;return h?{host:a(h,"."),isIPV4:!0}:{host:g,isIPV4:!1}}function n(g,p=!1){let h="",f=!0;for(const d of g){if(e[d]===void 0)return;d!=="0"&&f===!0&&(f=!1),f||(h+=d)}return p&&h.length===0&&(h=
427
- "0"),h}function i(g){let p=0;const h={error:!1,address:"",zone:""},f=[],d=[];let v=!1,$=!1,w=!1;function E(){if(d.length){if(v===!1){const P=n(d);if(P!==void 0)f.push(P);else return h.error=!0,!1}d.length=0}return!0}for(let P=0;P<g.length;P++){const O=g[P];if(!(O==="["||O==="]"))if(O===":"){if($===!0&&(w=!0),!E())break;if(p++,f.push(":"),p>7){h.error=!0;break}P-1>=0&&g[P-1]===":"&&($=!0);continue}else if(O==="%"){if(!E())break;v=!0}else{d.push(O);continue}}return d.length&&(v?h.zone=d.join(""):w?
428
- f.push(d.join("")):f.push(n(d))),h.address=f.join(""),h}function o(g){if(s(g,":")<2)return{host:g,isIPV6:!1};const p=i(g);if(p.error)return{host:g,isIPV6:!1};{let h=p.address,f=p.address;return p.zone&&(h+="%"+p.zone,f+="%25"+p.zone),{host:h,escapedHost:f,isIPV6:!0}}}function a(g,p){let h="",f=!0;const d=g.length;for(let v=0;v<d;v++){const $=g[v];$==="0"&&f?(v+1<=d&&g[v+1]===p||v+1===d)&&(h+=$,f=!1):($===p?f=!0:f=!1,h+=$)}return h}function s(g,p){let h=0;for(let f=0;f<g.length;f++)g[f]===p&&h++;
429
- return h}const u=/^\.\.?\//u,c=/^\/\.(?:\/|$)/u,l=/^\/\.\.(?:\/|$)/u,m=/^\/?(?:.|\n)*?(?=\/|$)/u;function y(g){const p=[];for(;g.length;)if(g.match(u))g=g.replace(u,"");else if(g.match(c))g=g.replace(c,"/");else if(g.match(l))g=g.replace(l,"/"),p.pop();else if(g==="."||g==="..")g="";else{const h=g.match(m);if(h){const f=h[0];g=g.slice(f.length),p.push(f)}else throw new Error("Unexpected dot segment condition")}return p.join("")}function _(g,p){const h=p!==!0?escape:unescape;return g.scheme!==void 0&&
430
- (g.scheme=h(g.scheme)),g.userinfo!==void 0&&(g.userinfo=h(g.userinfo)),g.host!==void 0&&(g.host=h(g.host)),g.path!==void 0&&(g.path=h(g.path)),g.query!==void 0&&(g.query=h(g.query)),g.fragment!==void 0&&(g.fragment=h(g.fragment)),g}function S(g){const p=[];if(g.userinfo!==void 0&&(p.push(g.userinfo),p.push("@")),g.host!==void 0){let h=unescape(g.host);const f=r(h);if(f.isIPV4)h=f.host;else{const d=o(f.host);d.isIPV6===!0?h=`[${d.escapedHost}]`:h=g.host}p.push(h)}return(typeof g.port=="number"||typeof g.
431
- port=="string")&&(p.push(":"),p.push(String(g.port))),p.length?p.join(""):void 0}return gs={recomposeAuthority:S,normalizeComponentEncoding:_,removeDotSegments:y,normalizeIPv4:r,normalizeIPv6:o,stringArrayToHexStripped:n},gs}var vs,ki;function lh(){if(ki)return vs;ki=1;const e=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(f){return typeof f.secure=="boolean"?f.secure:String(f.scheme).toLowerCase()===
432
- "wss"}function n(f){return f.host||(f.error=f.error||"HTTP URIs must have a host."),f}function i(f){const d=String(f.scheme).toLowerCase()==="https";return(f.port===(d?443:80)||f.port==="")&&(f.port=void 0),f.path||(f.path="/"),f}function o(f){return f.secure=r(f),f.resourceName=(f.path||"/")+(f.query?"?"+f.query:""),f.path=void 0,f.query=void 0,f}function a(f){if((f.port===(r(f)?443:80)||f.port==="")&&(f.port=void 0),typeof f.secure=="boolean"&&(f.scheme=f.secure?"wss":"ws",f.secure=void 0),f.resourceName){
433
- const[d,v]=f.resourceName.split("?");f.path=d&&d!=="/"?d:void 0,f.query=v,f.resourceName=void 0}return f.fragment=void 0,f}function s(f,d){if(!f.path)return f.error="URN can not be parsed",f;const v=f.path.match(t);if(v){const $=d.scheme||f.scheme||"urn";f.nid=v[1].toLowerCase(),f.nss=v[2];const w=`${$}:${d.nid||f.nid}`,E=h[w];f.path=void 0,E&&(f=E.parse(f,d))}else f.error=f.error||"URN can not be parsed.";return f}function u(f,d){const v=d.scheme||f.scheme||"urn",$=f.nid.toLowerCase(),w=`${v}:${d.
434
- nid||$}`,E=h[w];E&&(f=E.serialize(f,d));const P=f,O=f.nss;return P.path=`${$||d.nid}:${O}`,d.skipEscape=!0,P}function c(f,d){const v=f;return v.uuid=v.nss,v.nss=void 0,!d.tolerant&&(!v.uuid||!e.test(v.uuid))&&(v.error=v.error||"UUID is not valid."),v}function l(f){const d=f;return d.nss=(f.uuid||"").toLowerCase(),d}const m={scheme:"http",domainHost:!0,parse:n,serialize:i},y={scheme:"https",domainHost:m.domainHost,parse:n,serialize:i},_={scheme:"ws",domainHost:!0,parse:o,serialize:a},S={scheme:"w\
435
- ss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},h={http:m,https:y,ws:_,wss:S,urn:{scheme:"urn",parse:s,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:c,serialize:l,skipNormalize:!0}};return vs=h,vs}var Ti;function fh(){if(Ti)return It.exports;Ti=1;const{normalizeIPv6:e,normalizeIPv4:t,removeDotSegments:r,recomposeAuthority:n,normalizeComponentEncoding:i}=uh(),o=lh();function a(p,h){return typeof p=="string"?p=l(S(p,h),h):typeof p=="object"&&(p=S(l(p,h),h)),p}function s(p,h,f){
436
- const d=Object.assign({scheme:"null"},f),v=u(S(p,d),S(h,d),d,!0);return l(v,{...d,skipEscape:!0})}function u(p,h,f,d){const v={};return d||(p=S(l(p,f),f),h=S(l(h,f),f)),f=f||{},!f.tolerant&&h.scheme?(v.scheme=h.scheme,v.userinfo=h.userinfo,v.host=h.host,v.port=h.port,v.path=r(h.path||""),v.query=h.query):(h.userinfo!==void 0||h.host!==void 0||h.port!==void 0?(v.userinfo=h.userinfo,v.host=h.host,v.port=h.port,v.path=r(h.path||""),v.query=h.query):(h.path?(h.path.charAt(0)==="/"?v.path=r(h.path):((p.
437
- userinfo!==void 0||p.host!==void 0||p.port!==void 0)&&!p.path?v.path="/"+h.path:p.path?v.path=p.path.slice(0,p.path.lastIndexOf("/")+1)+h.path:v.path=h.path,v.path=r(v.path)),v.query=h.query):(v.path=p.path,h.query!==void 0?v.query=h.query:v.query=p.query),v.userinfo=p.userinfo,v.host=p.host,v.port=p.port),v.scheme=p.scheme),v.fragment=h.fragment,v}function c(p,h,f){return typeof p=="string"?(p=unescape(p),p=l(i(S(p,f),!0),{...f,skipEscape:!0})):typeof p=="object"&&(p=l(i(p,!0),{...f,skipEscape:!0})),
438
- typeof h=="string"?(h=unescape(h),h=l(i(S(h,f),!0),{...f,skipEscape:!0})):typeof h=="object"&&(h=l(i(h,!0),{...f,skipEscape:!0})),p.toLowerCase()===h.toLowerCase()}function l(p,h){const f={host:p.host,scheme:p.scheme,userinfo:p.userinfo,port:p.port,path:p.path,query:p.query,nid:p.nid,nss:p.nss,uuid:p.uuid,fragment:p.fragment,reference:p.reference,resourceName:p.resourceName,secure:p.secure,error:""},d=Object.assign({},h),v=[],$=o[(d.scheme||f.scheme||"").toLowerCase()];$&&$.serialize&&$.serialize(
439
- f,d),f.path!==void 0&&(d.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),d.reference!=="suffix"&&f.scheme&&v.push(f.scheme,":");const w=n(f);if(w!==void 0&&(d.reference!=="suffix"&&v.push("//"),v.push(w),f.path&&f.path.charAt(0)!=="/"&&v.push("/")),f.path!==void 0){let E=f.path;!d.absolutePath&&(!$||!$.absolutePath)&&(E=r(E)),w===void 0&&(E=E.replace(/^\/\//u,"/%2F")),v.push(E)}return f.query!==void 0&&v.push("?",f.query),f.fragment!==
440
- void 0&&v.push("#",f.fragment),v.join("")}const m=Array.from({length:127},(p,h)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(h)));function y(p){let h=0;for(let f=0,d=p.length;f<d;++f)if(h=p.charCodeAt(f),h>126||m[h])return!0;return!1}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function S(p,h){const f=Object.assign({},h),d={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},
441
- v=p.indexOf("%")!==-1;let $=!1;f.reference==="suffix"&&(p=(f.scheme?f.scheme+":":"")+"//"+p);const w=p.match(_);if(w){if(d.scheme=w[1],d.userinfo=w[3],d.host=w[4],d.port=parseInt(w[5],10),d.path=w[6]||"",d.query=w[7],d.fragment=w[8],isNaN(d.port)&&(d.port=w[5]),d.host){const P=t(d.host);if(P.isIPV4===!1){const O=e(P.host);d.host=O.host.toLowerCase(),$=O.isIPV6}else d.host=P.host,$=!0}d.scheme===void 0&&d.userinfo===void 0&&d.host===void 0&&d.port===void 0&&d.query===void 0&&!d.path?d.reference="\
442
- same-document":d.scheme===void 0?d.reference="relative":d.fragment===void 0?d.reference="absolute":d.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==d.reference&&(d.error=d.error||"URI is not a "+f.reference+" reference.");const E=o[(f.scheme||d.scheme||"").toLowerCase()];if(!f.unicodeSupport&&(!E||!E.unicodeSupport)&&d.host&&(f.domainHost||E&&E.domainHost)&&$===!1&&y(d.host))try{d.host=URL.domainToASCII(d.host.toLowerCase())}catch(P){d.error=d.error||"Host's domain name can n\
443
- ot be converted to ASCII: "+P}(!E||E&&!E.skipNormalize)&&(v&&d.scheme!==void 0&&(d.scheme=unescape(d.scheme)),v&&d.host!==void 0&&(d.host=unescape(d.host)),d.path&&(d.path=escape(unescape(d.path))),d.fragment&&(d.fragment=encodeURI(decodeURIComponent(d.fragment)))),E&&E.parse&&E.parse(d,f)}else d.error=d.error||"URI can not be parsed.";return d}const g={SCHEMES:o,normalize:a,resolve:s,resolveComponents:u,equal:c,serialize:l,parse:S};return It.exports=g,It.exports.default=g,It.exports.fastUri=g,It.
444
- exports}var Ni;function dh(){if(Ni)return ur;Ni=1,Object.defineProperty(ur,"__esModule",{value:!0});const e=fh();return e.code='require("ajv/dist/runtime/uri").default',ur.default=e,ur}var Oi;function Ii(){return Oi||(Oi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Nt();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=ae();Object.defineProperty(e,"_",{enumerable:!0,
445
- get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=ar(),i=Ot(),o=ii(),a=cr(),s=ae(),u=sr(),c=nr(),l=fe(),m=ih,y=dh(),
446
- _=(q,A)=>new RegExp(q,A);_.code="new RegExp";const S=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),p={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.",
390
+ function t(n,i,a,o,s,u,c,l,m,y){if(o&&typeof o=="object"&&!Array.isArray(o)){i(o,s,u,c,l,m,y);for(var _ in o){var S=o[_];if(Array.isArray(S)){if(_ in e.arrayKeywords)for(var g=0;g<S.length;g++)t(n,i,a,S[g],s+"/"+_+"/"+g,u,s,_,o,g)}else if(_ in e.propsKeywords){if(S&&typeof S=="object")for(var h in S)t(n,i,a,S[h],s+"/"+_+"/"+r(h),u,s,_,o,h)}else(_ in e.keywords||n.allKeys&&!(_ in e.skipKeywords))&&t(n,i,a,S,s+"/"+_,u,s,_,o)}a(o,s,u,c,l,m,y)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,
391
+ "~1")}return ms.exports}var yi;function sr(){if(yi)return Ee;yi=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getSchemaRefs=Ee.resolveUrl=Ee.normalizeId=Ee._getFullPath=Ee.getFullPath=Ee.inlineRef=void 0;const e=fe(),t=Do(),r=sh(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(g,h=!0){return typeof g=="boolean"?!0:h===!0?!o(g):h?s(g)<=
392
+ h:!1}Ee.inlineRef=i;const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o(g){for(const h in g){if(a.has(h))return!0;const p=g[h];if(Array.isArray(p)&&p.some(o)||typeof p=="object"&&o(p))return!0}return!1}function s(g){let h=0;for(const p in g){if(p==="$ref")return 1/0;if(h++,!n.has(p)&&(typeof g[p]=="object"&&(0,e.eachItem)(g[p],f=>h+=s(f)),h===1/0))return 1/0}return h}function u(g,h="",p){p!==!1&&(h=m(h));const f=g.parse(h);return c(g,f)}Ee.getFullPath=
393
+ u;function c(g,h){return g.serialize(h).split("#")[0]+"#"}Ee._getFullPath=c;const l=/#\/?$/;function m(g){return g?g.replace(l,""):""}Ee.normalizeId=m;function y(g,h,p){return p=m(p),g.resolve(h,p)}Ee.resolveUrl=y;const _=/^[a-z_][-a-z0-9._]*$/i;function S(g,h){if(typeof g=="boolean")return{};const{schemaId:p,uriResolver:f}=this.opts,d=m(g[p]||h),v={"":d},$=u(f,d,!1),w={},b=new Set;return r(g,{allKeys:!0},(H,x,U,L)=>{if(L===void 0)return;const j=$+x;let M=v[L];typeof H[p]=="string"&&(M=z.call(this,
394
+ H[p])),F.call(this,H.$anchor),F.call(this,H.$dynamicAnchor),v[x]=M;function z(G){const Q=this.opts.uriResolver.resolve;if(G=m(M?Q(M,G):G),b.has(G))throw I(G);b.add(G);let q=this.refs[G];return typeof q=="string"&&(q=this.refs[q]),typeof q=="object"?P(H,q.schema,G):G!==m(j)&&(G[0]==="#"?(P(H,w[G],G),w[G]=H):this.refs[G]=j),G}function F(G){if(typeof G=="string"){if(!_.test(G))throw new Error(`invalid anchor "${G}"`);z.call(this,`#${G}`)}}}),w;function P(H,x,U){if(x!==void 0&&!t(H,x))throw I(U)}function I(H){
395
+ return new Error(`reference "${H}" resolves to more than one schema`)}}return Ee.getSchemaRefs=S,Ee}var gi;function Nt(){if(gi)return Ve;gi=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.getData=Ve.KeywordCxt=Ve.validateFunctionCode=void 0;const e=eh(),t=nr(),r=ui(),n=nr(),i=th(),a=rh(),o=nh(),s=ae(),u=Oe(),c=sr(),l=fe(),m=rr();function y(k){if($(k)&&(b(k),v(k))){h(k);return}_(k,()=>(0,e.topBoolOrEmptySchema)(k))}Ve.validateFunctionCode=y;function _({gen:k,validateName:O,schema:V,schemaEnv:X,
396
+ opts:Z},J){Z.code.es5?k.func(O,(0,s._)`${u.default.data}, ${u.default.valCxt}`,X.$async,()=>{k.code((0,s._)`"use strict"; ${f(V,Z)}`),g(k,Z),k.code(J)}):k.func(O,(0,s._)`${u.default.data}, ${S(Z)}`,X.$async,()=>k.code(f(V,Z)).code(J))}function S(k){return(0,s._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${k.dynamicRef?(0,s._)`, ${u.default.dynamicAnchors}={}`:s.nil}}={}`}function g(k,O){k.if(u.default.valCxt,()=>{
397
+ k.var(u.default.instancePath,(0,s._)`${u.default.valCxt}.${u.default.instancePath}`),k.var(u.default.parentData,(0,s._)`${u.default.valCxt}.${u.default.parentData}`),k.var(u.default.parentDataProperty,(0,s._)`${u.default.valCxt}.${u.default.parentDataProperty}`),k.var(u.default.rootData,(0,s._)`${u.default.valCxt}.${u.default.rootData}`),O.dynamicRef&&k.var(u.default.dynamicAnchors,(0,s._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{k.var(u.default.instancePath,(0,s._)`""`),k.var(u.default.
398
+ parentData,(0,s._)`undefined`),k.var(u.default.parentDataProperty,(0,s._)`undefined`),k.var(u.default.rootData,u.default.data),O.dynamicRef&&k.var(u.default.dynamicAnchors,(0,s._)`{}`)})}function h(k){const{schema:O,opts:V,gen:X}=k;_(k,()=>{V.$comment&&O.$comment&&L(k),H(k),X.let(u.default.vErrors,null),X.let(u.default.errors,0),V.unevaluated&&p(k),P(k),j(k)})}function p(k){const{gen:O,validateName:V}=k;k.evaluated=O.const("evaluated",(0,s._)`${V}.evaluated`),O.if((0,s._)`${k.evaluated}.dynamicProps`,
399
+ ()=>O.assign((0,s._)`${k.evaluated}.props`,(0,s._)`undefined`)),O.if((0,s._)`${k.evaluated}.dynamicItems`,()=>O.assign((0,s._)`${k.evaluated}.items`,(0,s._)`undefined`))}function f(k,O){const V=typeof k=="object"&&k[O.schemaId];return V&&(O.code.source||O.code.process)?(0,s._)`/*# sourceURL=${V} */`:s.nil}function d(k,O){if($(k)&&(b(k),v(k))){w(k,O);return}(0,e.boolOrEmptySchema)(k,O)}function v({schema:k,self:O}){if(typeof k=="boolean")return!k;for(const V in k)if(O.RULES.all[V])return!0;return!1}
400
+ function $(k){return typeof k.schema!="boolean"}function w(k,O){const{schema:V,gen:X,opts:Z}=k;Z.$comment&&V.$comment&&L(k),x(k),U(k);const J=X.const("_errs",u.default.errors);P(k,J),X.var(O,(0,s._)`${J} === ${u.default.errors}`)}function b(k){(0,l.checkUnknownRules)(k),I(k)}function P(k,O){if(k.opts.jtd)return z(k,[],!1,O);const V=(0,t.getSchemaTypes)(k.schema),X=(0,t.coerceAndCheckDataType)(k,V);z(k,V,!X,O)}function I(k){const{schema:O,errSchemaPath:V,opts:X,self:Z}=k;O.$ref&&X.ignoreKeywordsWithRef&&
401
+ (0,l.schemaHasRulesButRef)(O,Z.RULES)&&Z.logger.warn(`$ref: keywords ignored in schema at path "${V}"`)}function H(k){const{schema:O,opts:V}=k;O.default!==void 0&&V.useDefaults&&V.strictSchema&&(0,l.checkStrictMode)(k,"default is ignored in the schema root")}function x(k){const O=k.schema[k.opts.schemaId];O&&(k.baseId=(0,c.resolveUrl)(k.opts.uriResolver,k.baseId,O))}function U(k){if(k.schema.$async&&!k.schemaEnv.$async)throw new Error("async schema in sync schema")}function L({gen:k,schemaEnv:O,
402
+ schema:V,errSchemaPath:X,opts:Z}){const J=V.$comment;if(Z.$comment===!0)k.code((0,s._)`${u.default.self}.logger.log(${J})`);else if(typeof Z.$comment=="function"){const ue=(0,s.str)`${X}/$comment`,we=k.scopeValue("root",{ref:O.root});k.code((0,s._)`${u.default.self}.opts.$comment(${J}, ${ue}, ${we}.schema)`)}}function j(k){const{gen:O,schemaEnv:V,validateName:X,ValidationError:Z,opts:J}=k;V.$async?O.if((0,s._)`${u.default.errors} === 0`,()=>O.return(u.default.data),()=>O.throw((0,s._)`new ${Z}(${u.
403
+ default.vErrors})`)):(O.assign((0,s._)`${X}.errors`,u.default.vErrors),J.unevaluated&&M(k),O.return((0,s._)`${u.default.errors} === 0`))}function M({gen:k,evaluated:O,props:V,items:X}){V instanceof s.Name&&k.assign((0,s._)`${O}.props`,V),X instanceof s.Name&&k.assign((0,s._)`${O}.items`,X)}function z(k,O,V,X){const{gen:Z,schema:J,data:ue,allErrors:we,opts:Y,self:ne}=k,{RULES:W}=ne;if(J.$ref&&(Y.ignoreKeywordsWithRef||!(0,l.schemaHasRulesButRef)(J,W))){Z.block(()=>B(k,"$ref",W.all.$ref.definition));
404
+ return}Y.jtd||G(k,O),Z.block(()=>{for(const le of W.rules)te(le);te(W.post)});function te(le){(0,r.shouldUseGroup)(J,le)&&(le.type?(Z.if((0,n.checkDataType)(le.type,ue,Y.strictNumbers)),F(k,le),O.length===1&&O[0]===le.type&&V&&(Z.else(),(0,n.reportTypeError)(k)),Z.endIf()):F(k,le),we||Z.if((0,s._)`${u.default.errors} === ${X||0}`))}}function F(k,O){const{gen:V,schema:X,opts:{useDefaults:Z}}=k;Z&&(0,i.assignDefaults)(k,O.type),V.block(()=>{for(const J of O.rules)(0,r.shouldUseRule)(X,J)&&B(k,J.keyword,
405
+ J.definition,O.type)})}function G(k,O){k.schemaEnv.meta||!k.opts.strictTypes||(Q(k,O),k.opts.allowUnionTypes||q(k,O),A(k,k.dataTypes))}function Q(k,O){if(O.length){if(!k.dataTypes.length){k.dataTypes=O;return}O.forEach(V=>{T(k.dataTypes,V)||E(k,`type "${V}" not allowed by context "${k.dataTypes.join(",")}"`)}),R(k,O)}}function q(k,O){O.length>1&&!(O.length===2&&O.includes("null"))&&E(k,"use allowUnionTypes to allow union type keyword")}function A(k,O){const V=k.self.RULES.all;for(const X in V){const Z=V[X];
406
+ if(typeof Z=="object"&&(0,r.shouldUseRule)(k.schema,Z)){const{type:J}=Z.definition;J.length&&!J.some(ue=>D(O,ue))&&E(k,`missing type "${J.join(",")}" for keyword "${X}"`)}}}function D(k,O){return k.includes(O)||O==="number"&&k.includes("integer")}function T(k,O){return k.includes(O)||O==="integer"&&k.includes("number")}function R(k,O){const V=[];for(const X of k.dataTypes)T(O,X)?V.push(X):O.includes("integer")&&X==="number"&&V.push("integer");k.dataTypes=V}function E(k,O){const V=k.schemaEnv.baseId+
407
+ k.errSchemaPath;O+=` at "${V}" (strictTypes)`,(0,l.checkStrictMode)(k,O,k.opts.strictTypes)}class C{constructor(O,V,X){if((0,a.validateKeywordUsage)(O,V,X),this.gen=O.gen,this.allErrors=O.allErrors,this.keyword=X,this.data=O.data,this.schema=O.schema[X],this.$data=V.$data&&O.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,l.schemaRefOrVal)(O,this.schema,X,this.$data),this.schemaType=V.schemaType,this.parentSchema=O.schema,this.params={},this.it=O,this.def=V,this.$data)this.schemaCode=
408
+ O.gen.const("vSchema",re(this.$data,O));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,V.schemaType,V.allowUndefined))throw new Error(`${X} value must be ${JSON.stringify(V.schemaType)}`);("code"in V?V.trackErrors:V.errors!==!1)&&(this.errsCount=O.gen.const("_errs",u.default.errors))}result(O,V,X){this.failResult((0,s.not)(O),V,X)}failResult(O,V,X){this.gen.if(O),X?X():this.error(),V?(this.gen.else(),V(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():
409
+ this.gen.else()}pass(O,V){this.failResult((0,s.not)(O),void 0,V)}fail(O){if(O===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(O),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(O){if(!this.$data)return this.fail(O);const{schemaCode:V}=this;this.fail((0,s._)`${V} !== undefined && (${(0,s.or)(this.invalid$data(),O)})`)}error(O,V,X){if(V){this.setParams(V),this._error(O,X),this.setParams({});return}this._error(O,X)}_error(O,V){(O?m.reportExtraError:m.
410
+ reportError)(this,this.def.error,V)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(O){this.allErrors||this.gen.if(O)}setParams(O,V){V?Object.assign(this.params,O):this.params=O}block$data(O,V,X=s.nil){this.gen.block(()=>{this.check$data(O,X),V()})}check$data(O=s.nil,V=s.nil){if(!this.$data)return;const{gen:X,schemaCode:Z,schemaType:J,
411
+ def:ue}=this;X.if((0,s.or)((0,s._)`${Z} === undefined`,V)),O!==s.nil&&X.assign(O,!0),(J.length||ue.validateSchema)&&(X.elseIf(this.invalid$data()),this.$dataError(),O!==s.nil&&X.assign(O,!1)),X.else()}invalid$data(){const{gen:O,schemaCode:V,schemaType:X,def:Z,it:J}=this;return(0,s.or)(ue(),we());function ue(){if(X.length){if(!(V instanceof s.Name))throw new Error("ajv implementation error");const Y=Array.isArray(X)?X:[X];return(0,s._)`${(0,n.checkDataTypes)(Y,V,J.opts.strictNumbers,n.DataType.Wrong)}`}
412
+ return s.nil}function we(){if(Z.validateSchema){const Y=O.scopeValue("validate$data",{ref:Z.validateSchema});return(0,s._)`!${Y}(${V})`}return s.nil}}subschema(O,V){const X=(0,o.getSubschema)(this.it,O);(0,o.extendSubschemaData)(X,this.it,O),(0,o.extendSubschemaMode)(X,O);const Z={...this.it,...X,items:void 0,props:void 0};return d(Z,V),Z}mergeEvaluated(O,V){const{it:X,gen:Z}=this;X.opts.unevaluated&&(X.props!==!0&&O.props!==void 0&&(X.props=l.mergeEvaluated.props(Z,O.props,X.props,V)),X.items!==
413
+ !0&&O.items!==void 0&&(X.items=l.mergeEvaluated.items(Z,O.items,X.items,V)))}mergeValidEvaluated(O,V){const{it:X,gen:Z}=this;if(X.opts.unevaluated&&(X.props!==!0||X.items!==!0))return Z.if(V,()=>this.mergeEvaluated(O,s.Name)),!0}}Ve.KeywordCxt=C;function B(k,O,V,X){const Z=new C(k,V,O);"code"in V?V.code(Z,X):Z.$data&&V.validate?(0,a.funcKeywordCode)(Z,V):"macro"in V?(0,a.macroKeywordCode)(Z,V):(V.compile||V.validate)&&(0,a.funcKeywordCode)(Z,V)}const K=/^\/(?:[^~]|~0|~1)*$/,ee=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
414
+ function re(k,{dataLevel:O,dataNames:V,dataPathArr:X}){let Z,J;if(k==="")return u.default.rootData;if(k[0]==="/"){if(!K.test(k))throw new Error(`Invalid JSON-pointer: ${k}`);Z=k,J=u.default.rootData}else{const ne=ee.exec(k);if(!ne)throw new Error(`Invalid JSON-pointer: ${k}`);const W=+ne[1];if(Z=ne[2],Z==="#"){if(W>=O)throw new Error(Y("property/index",W));return X[O-W]}if(W>O)throw new Error(Y("data",W));if(J=V[O-W],!Z)return J}let ue=J;const we=Z.split("/");for(const ne of we)ne&&(J=(0,s._)`${J}${(0,s.
415
+ getProperty)((0,l.unescapeJsonPointer)(ne))}`,ue=(0,s._)`${ue} && ${J}`);return ue;function Y(ne,W){return`Cannot access ${ne} ${W} levels up, current level is ${O}`}}return Ve.getData=re,Ve}var or={},vi;function ar(){if(vi)return or;vi=1,Object.defineProperty(or,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return or.default=e,or}var ir={},$i;function It(){if($i)return ir;$i=1,Object.defineProperty(ir,"__esMod\
416
+ ule",{value:!0});const e=sr();class t extends Error{constructor(n,i,a,o){super(o||`can't resolve reference ${a} from id ${i}`),this.missingRef=(0,e.resolveUrl)(n,i,a),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return ir.default=t,ir}var ke={},_i;function cr(){if(_i)return ke;_i=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.resolveSchema=ke.getCompilingSchema=ke.resolveRef=ke.compileSchema=ke.SchemaEnv=void 0;const e=ae(),t=ar(),r=Oe(),n=sr(),i=fe(),a=Nt();
417
+ class o{constructor(p){var f;this.refs={},this.dynamicAnchors={};let d;typeof p.schema=="object"&&(d=p.schema),this.schema=p.schema,this.schemaId=p.schemaId,this.root=p.root||this,this.baseId=(f=p.baseId)!==null&&f!==void 0?f:(0,n.normalizeId)(d?.[p.schemaId||"$id"]),this.schemaPath=p.schemaPath,this.localRefs=p.localRefs,this.meta=p.meta,this.$async=d?.$async,this.refs={}}}ke.SchemaEnv=o;function s(h){const p=l.call(this,h);if(p)return p;const f=(0,n.getFullPath)(this.opts.uriResolver,h.root.baseId),
418
+ {es5:d,lines:v}=this.opts.code,{ownProperties:$}=this.opts,w=new e.CodeGen(this.scope,{es5:d,lines:v,ownProperties:$});let b;h.$async&&(b=w.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const P=w.scopeName("validate");h.validateName=P;const I={gen:w,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],
419
+ definedProperties:new Set,topSchemaRef:w.scopeValue("schema",this.opts.code.source===!0?{ref:h.schema,code:(0,e.stringify)(h.schema)}:{ref:h.schema}),validateName:P,ValidationError:b,schema:h.schema,schemaEnv:h,rootId:f,baseId:h.baseId||f,schemaPath:e.nil,errSchemaPath:h.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let H;try{this._compilations.add(h),(0,a.validateFunctionCode)(I),w.optimize(this.opts.code.optimize);const x=w.toString();H=`${w.scopeRefs(r.default.
420
+ scope)}return ${x}`,this.opts.code.process&&(H=this.opts.code.process(H,h));const L=new Function(`${r.default.self}`,`${r.default.scope}`,H)(this,this.scope.get());if(this.scope.value(P,{ref:L}),L.errors=null,L.schema=h.schema,L.schemaEnv=h,h.$async&&(L.$async=!0),this.opts.code.source===!0&&(L.source={validateName:P,validateCode:x,scopeValues:w._values}),this.opts.unevaluated){const{props:j,items:M}=I;L.evaluated={props:j instanceof e.Name?void 0:j,items:M instanceof e.Name?void 0:M,dynamicProps:j instanceof
421
+ e.Name,dynamicItems:M instanceof e.Name},L.source&&(L.source.evaluated=(0,e.stringify)(L.evaluated))}return h.validate=L,h}catch(x){throw delete h.validate,delete h.validateName,H&&this.logger.error("Error compiling schema, function code:",H),x}finally{this._compilations.delete(h)}}ke.compileSchema=s;function u(h,p,f){var d;f=(0,n.resolveUrl)(this.opts.uriResolver,p,f);const v=h.refs[f];if(v)return v;let $=y.call(this,h,f);if($===void 0){const w=(d=h.localRefs)===null||d===void 0?void 0:d[f],{schemaId:b}=this.
422
+ opts;w&&($=new o({schema:w,schemaId:b,root:h,baseId:p}))}if($!==void 0)return h.refs[f]=c.call(this,$)}ke.resolveRef=u;function c(h){return(0,n.inlineRef)(h.schema,this.opts.inlineRefs)?h.schema:h.validate?h:s.call(this,h)}function l(h){for(const p of this._compilations)if(m(p,h))return p}ke.getCompilingSchema=l;function m(h,p){return h.schema===p.schema&&h.root===p.root&&h.baseId===p.baseId}function y(h,p){let f;for(;typeof(f=this.refs[p])=="string";)p=f;return f||this.schemas[p]||_.call(this,h,
423
+ p)}function _(h,p){const f=this.opts.uriResolver.parse(p),d=(0,n._getFullPath)(this.opts.uriResolver,f);let v=(0,n.getFullPath)(this.opts.uriResolver,h.baseId,void 0);if(Object.keys(h.schema).length>0&&d===v)return g.call(this,f,h);const $=(0,n.normalizeId)(d),w=this.refs[$]||this.schemas[$];if(typeof w=="string"){const b=_.call(this,h,w);return typeof b?.schema!="object"?void 0:g.call(this,f,b)}if(typeof w?.schema=="object"){if(w.validate||s.call(this,w),$===(0,n.normalizeId)(p)){const{schema:b}=w,
424
+ {schemaId:P}=this.opts,I=b[P];return I&&(v=(0,n.resolveUrl)(this.opts.uriResolver,v,I)),new o({schema:b,schemaId:P,root:h,baseId:v})}return g.call(this,f,w)}}ke.resolveSchema=_;const S=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(h,{baseId:p,schema:f,root:d}){var v;if(((v=h.fragment)===null||v===void 0?void 0:v[0])!=="/")return;for(const b of h.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const P=f[(0,i.unescapeFragment)(b)];if(P===void 0)
425
+ return;f=P;const I=typeof f=="object"&&f[this.opts.schemaId];!S.has(b)&&I&&(p=(0,n.resolveUrl)(this.opts.uriResolver,p,I))}let $;if(typeof f!="boolean"&&f.$ref&&!(0,i.schemaHasRulesButRef)(f,this.RULES)){const b=(0,n.resolveUrl)(this.opts.uriResolver,p,f.$ref);$=_.call(this,d,b)}const{schemaId:w}=this.opts;if($=$||new o({schema:f,schemaId:w,root:d,baseId:p}),$.schema!==$.root.schema)return $}return ke}const wi="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",bi="M\
426
+ eta-schema for $data reference (JSON AnySchema extension proposal)",Ei="object",Si=["$data"],Ri={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Ai=!1,oh={$id:wi,description:bi,type:Ei,required:Si,properties:Ri,additionalProperties:Ai},ah={__proto__:null,$id:wi,additionalProperties:Ai,default:oh,description:bi,properties:Ri,required:Si,type:Ei},ih=De(ah);var ur={},jt={exports:{}},ys,Pi;function ch(){return Pi||(Pi=1,ys={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,
427
+ 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}}),ys}var gs,Ci;function uh(){if(Ci)return gs;Ci=1;const{HEX:e}=ch(),t=/^(?:(?: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(g){if(s(g,".")<3)return{host:g,isIPV4:!1};const h=g.match(t)||[],[p]=h;return p?{host:o(p,"."),isIPV4:!0}:{host:g,isIPV4:!1}}function n(g,h=!1){let p="",f=!0;for(const d of g){if(e[d]===void 0)return;d!=="0"&&f===!0&&(f=!1),f||(p+=d)}return h&&p.length===0&&(p=
428
+ "0"),p}function i(g){let h=0;const p={error:!1,address:"",zone:""},f=[],d=[];let v=!1,$=!1,w=!1;function b(){if(d.length){if(v===!1){const P=n(d);if(P!==void 0)f.push(P);else return p.error=!0,!1}d.length=0}return!0}for(let P=0;P<g.length;P++){const I=g[P];if(!(I==="["||I==="]"))if(I===":"){if($===!0&&(w=!0),!b())break;if(h++,f.push(":"),h>7){p.error=!0;break}P-1>=0&&g[P-1]===":"&&($=!0);continue}else if(I==="%"){if(!b())break;v=!0}else{d.push(I);continue}}return d.length&&(v?p.zone=d.join(""):w?
429
+ f.push(d.join("")):f.push(n(d))),p.address=f.join(""),p}function a(g){if(s(g,":")<2)return{host:g,isIPV6:!1};const h=i(g);if(h.error)return{host:g,isIPV6:!1};{let p=h.address,f=h.address;return h.zone&&(p+="%"+h.zone,f+="%25"+h.zone),{host:p,escapedHost:f,isIPV6:!0}}}function o(g,h){let p="",f=!0;const d=g.length;for(let v=0;v<d;v++){const $=g[v];$==="0"&&f?(v+1<=d&&g[v+1]===h||v+1===d)&&(p+=$,f=!1):($===h?f=!0:f=!1,p+=$)}return p}function s(g,h){let p=0;for(let f=0;f<g.length;f++)g[f]===h&&p++;
430
+ return p}const u=/^\.\.?\//u,c=/^\/\.(?:\/|$)/u,l=/^\/\.\.(?:\/|$)/u,m=/^\/?(?:.|\n)*?(?=\/|$)/u;function y(g){const h=[];for(;g.length;)if(g.match(u))g=g.replace(u,"");else if(g.match(c))g=g.replace(c,"/");else if(g.match(l))g=g.replace(l,"/"),h.pop();else if(g==="."||g==="..")g="";else{const p=g.match(m);if(p){const f=p[0];g=g.slice(f.length),h.push(f)}else throw new Error("Unexpected dot segment condition")}return h.join("")}function _(g,h){const p=h!==!0?escape:unescape;return g.scheme!==void 0&&
431
+ (g.scheme=p(g.scheme)),g.userinfo!==void 0&&(g.userinfo=p(g.userinfo)),g.host!==void 0&&(g.host=p(g.host)),g.path!==void 0&&(g.path=p(g.path)),g.query!==void 0&&(g.query=p(g.query)),g.fragment!==void 0&&(g.fragment=p(g.fragment)),g}function S(g){const h=[];if(g.userinfo!==void 0&&(h.push(g.userinfo),h.push("@")),g.host!==void 0){let p=unescape(g.host);const f=r(p);if(f.isIPV4)p=f.host;else{const d=a(f.host);d.isIPV6===!0?p=`[${d.escapedHost}]`:p=g.host}h.push(p)}return(typeof g.port=="number"||typeof g.
432
+ port=="string")&&(h.push(":"),h.push(String(g.port))),h.length?h.join(""):void 0}return gs={recomposeAuthority:S,normalizeComponentEncoding:_,removeDotSegments:y,normalizeIPv4:r,normalizeIPv6:a,stringArrayToHexStripped:n},gs}var vs,ki;function lh(){if(ki)return vs;ki=1;const e=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(f){return typeof f.secure=="boolean"?f.secure:String(f.scheme).toLowerCase()===
433
+ "wss"}function n(f){return f.host||(f.error=f.error||"HTTP URIs must have a host."),f}function i(f){const d=String(f.scheme).toLowerCase()==="https";return(f.port===(d?443:80)||f.port==="")&&(f.port=void 0),f.path||(f.path="/"),f}function a(f){return f.secure=r(f),f.resourceName=(f.path||"/")+(f.query?"?"+f.query:""),f.path=void 0,f.query=void 0,f}function o(f){if((f.port===(r(f)?443:80)||f.port==="")&&(f.port=void 0),typeof f.secure=="boolean"&&(f.scheme=f.secure?"wss":"ws",f.secure=void 0),f.resourceName){
434
+ const[d,v]=f.resourceName.split("?");f.path=d&&d!=="/"?d:void 0,f.query=v,f.resourceName=void 0}return f.fragment=void 0,f}function s(f,d){if(!f.path)return f.error="URN can not be parsed",f;const v=f.path.match(t);if(v){const $=d.scheme||f.scheme||"urn";f.nid=v[1].toLowerCase(),f.nss=v[2];const w=`${$}:${d.nid||f.nid}`,b=p[w];f.path=void 0,b&&(f=b.parse(f,d))}else f.error=f.error||"URN can not be parsed.";return f}function u(f,d){const v=d.scheme||f.scheme||"urn",$=f.nid.toLowerCase(),w=`${v}:${d.
435
+ nid||$}`,b=p[w];b&&(f=b.serialize(f,d));const P=f,I=f.nss;return P.path=`${$||d.nid}:${I}`,d.skipEscape=!0,P}function c(f,d){const v=f;return v.uuid=v.nss,v.nss=void 0,!d.tolerant&&(!v.uuid||!e.test(v.uuid))&&(v.error=v.error||"UUID is not valid."),v}function l(f){const d=f;return d.nss=(f.uuid||"").toLowerCase(),d}const m={scheme:"http",domainHost:!0,parse:n,serialize:i},y={scheme:"https",domainHost:m.domainHost,parse:n,serialize:i},_={scheme:"ws",domainHost:!0,parse:a,serialize:o},S={scheme:"w\
436
+ ss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},p={http:m,https:y,ws:_,wss:S,urn:{scheme:"urn",parse:s,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:c,serialize:l,skipNormalize:!0}};return vs=p,vs}var Ti;function fh(){if(Ti)return jt.exports;Ti=1;const{normalizeIPv6:e,normalizeIPv4:t,removeDotSegments:r,recomposeAuthority:n,normalizeComponentEncoding:i}=uh(),a=lh();function o(h,p){return typeof h=="string"?h=l(S(h,p),p):typeof h=="object"&&(h=S(l(h,p),p)),h}function s(h,p,f){
437
+ const d=Object.assign({scheme:"null"},f),v=u(S(h,d),S(p,d),d,!0);return l(v,{...d,skipEscape:!0})}function u(h,p,f,d){const v={};return d||(h=S(l(h,f),f),p=S(l(p,f),f)),f=f||{},!f.tolerant&&p.scheme?(v.scheme=p.scheme,v.userinfo=p.userinfo,v.host=p.host,v.port=p.port,v.path=r(p.path||""),v.query=p.query):(p.userinfo!==void 0||p.host!==void 0||p.port!==void 0?(v.userinfo=p.userinfo,v.host=p.host,v.port=p.port,v.path=r(p.path||""),v.query=p.query):(p.path?(p.path.charAt(0)==="/"?v.path=r(p.path):((h.
438
+ userinfo!==void 0||h.host!==void 0||h.port!==void 0)&&!h.path?v.path="/"+p.path:h.path?v.path=h.path.slice(0,h.path.lastIndexOf("/")+1)+p.path:v.path=p.path,v.path=r(v.path)),v.query=p.query):(v.path=h.path,p.query!==void 0?v.query=p.query:v.query=h.query),v.userinfo=h.userinfo,v.host=h.host,v.port=h.port),v.scheme=h.scheme),v.fragment=p.fragment,v}function c(h,p,f){return typeof h=="string"?(h=unescape(h),h=l(i(S(h,f),!0),{...f,skipEscape:!0})):typeof h=="object"&&(h=l(i(h,!0),{...f,skipEscape:!0})),
439
+ typeof p=="string"?(p=unescape(p),p=l(i(S(p,f),!0),{...f,skipEscape:!0})):typeof p=="object"&&(p=l(i(p,!0),{...f,skipEscape:!0})),h.toLowerCase()===p.toLowerCase()}function l(h,p){const f={host:h.host,scheme:h.scheme,userinfo:h.userinfo,port:h.port,path:h.path,query:h.query,nid:h.nid,nss:h.nss,uuid:h.uuid,fragment:h.fragment,reference:h.reference,resourceName:h.resourceName,secure:h.secure,error:""},d=Object.assign({},p),v=[],$=a[(d.scheme||f.scheme||"").toLowerCase()];$&&$.serialize&&$.serialize(
440
+ f,d),f.path!==void 0&&(d.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),d.reference!=="suffix"&&f.scheme&&v.push(f.scheme,":");const w=n(f);if(w!==void 0&&(d.reference!=="suffix"&&v.push("//"),v.push(w),f.path&&f.path.charAt(0)!=="/"&&v.push("/")),f.path!==void 0){let b=f.path;!d.absolutePath&&(!$||!$.absolutePath)&&(b=r(b)),w===void 0&&(b=b.replace(/^\/\//u,"/%2F")),v.push(b)}return f.query!==void 0&&v.push("?",f.query),f.fragment!==
441
+ void 0&&v.push("#",f.fragment),v.join("")}const m=Array.from({length:127},(h,p)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(p)));function y(h){let p=0;for(let f=0,d=h.length;f<d;++f)if(p=h.charCodeAt(f),p>126||m[p])return!0;return!1}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function S(h,p){const f=Object.assign({},p),d={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},
442
+ v=h.indexOf("%")!==-1;let $=!1;f.reference==="suffix"&&(h=(f.scheme?f.scheme+":":"")+"//"+h);const w=h.match(_);if(w){if(d.scheme=w[1],d.userinfo=w[3],d.host=w[4],d.port=parseInt(w[5],10),d.path=w[6]||"",d.query=w[7],d.fragment=w[8],isNaN(d.port)&&(d.port=w[5]),d.host){const P=t(d.host);if(P.isIPV4===!1){const I=e(P.host);d.host=I.host.toLowerCase(),$=I.isIPV6}else d.host=P.host,$=!0}d.scheme===void 0&&d.userinfo===void 0&&d.host===void 0&&d.port===void 0&&d.query===void 0&&!d.path?d.reference="\
443
+ same-document":d.scheme===void 0?d.reference="relative":d.fragment===void 0?d.reference="absolute":d.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==d.reference&&(d.error=d.error||"URI is not a "+f.reference+" reference.");const b=a[(f.scheme||d.scheme||"").toLowerCase()];if(!f.unicodeSupport&&(!b||!b.unicodeSupport)&&d.host&&(f.domainHost||b&&b.domainHost)&&$===!1&&y(d.host))try{d.host=URL.domainToASCII(d.host.toLowerCase())}catch(P){d.error=d.error||"Host's domain name can n\
444
+ ot be converted to ASCII: "+P}(!b||b&&!b.skipNormalize)&&(v&&d.scheme!==void 0&&(d.scheme=unescape(d.scheme)),v&&d.host!==void 0&&(d.host=unescape(d.host)),d.path&&(d.path=escape(unescape(d.path))),d.fragment&&(d.fragment=encodeURI(decodeURIComponent(d.fragment)))),b&&b.parse&&b.parse(d,f)}else d.error=d.error||"URI can not be parsed.";return d}const g={SCHEMES:a,normalize:o,resolve:s,resolveComponents:u,equal:c,serialize:l,parse:S};return jt.exports=g,jt.exports.default=g,jt.exports.fastUri=g,jt.
445
+ exports}var Oi;function dh(){if(Oi)return ur;Oi=1,Object.defineProperty(ur,"__esModule",{value:!0});const e=fh();return e.code='require("ajv/dist/runtime/uri").default',ur.default=e,ur}var Ni;function Ii(){return Ni||(Ni=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Nt();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=ae();Object.defineProperty(e,"_",{enumerable:!0,
446
+ get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=ar(),i=It(),a=ii(),o=cr(),s=ae(),u=sr(),c=nr(),l=fe(),m=ih,y=dh(),
447
+ _=(q,A)=>new RegExp(q,A);_.code="new RegExp";const S=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),h={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.",
447
448
  missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cach\
448
- e, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},h={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function d(q){var A,L,T,R,b,C,B,K,ee,re,k,N,V,X,Z,J,ue,we,Y,ne,W,te,le,ye,he;const Me=q.strict,Ke=(A=q.code)===null||A===void 0?void 0:A.optimize,ko=Ke===!0||Ke===void 0?1:Ke||0,To=(T=(L=q.code)===null||L===void 0?void 0:L.regExp)!==null&&T!==void 0?T:_,
449
- kf=(R=q.uriResolver)!==null&&R!==void 0?R:y.default;return{strictSchema:(C=(b=q.strictSchema)!==null&&b!==void 0?b:Me)!==null&&C!==void 0?C:!0,strictNumbers:(K=(B=q.strictNumbers)!==null&&B!==void 0?B:Me)!==null&&K!==void 0?K:!0,strictTypes:(re=(ee=q.strictTypes)!==null&&ee!==void 0?ee:Me)!==null&&re!==void 0?re:"log",strictTuples:(N=(k=q.strictTuples)!==null&&k!==void 0?k:Me)!==null&&N!==void 0?N:"log",strictRequired:(X=(V=q.strictRequired)!==null&&V!==void 0?V:Me)!==null&&X!==void 0?X:!1,code:q.
449
+ e, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},p={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function d(q){var A,D,T,R,E,C,B,K,ee,re,k,O,V,X,Z,J,ue,we,Y,ne,W,te,le,ye,he;const Me=q.strict,Be=(A=q.code)===null||A===void 0?void 0:A.optimize,ko=Be===!0||Be===void 0?1:Be||0,To=(T=(D=q.code)===null||D===void 0?void 0:D.regExp)!==null&&T!==void 0?T:_,
450
+ kf=(R=q.uriResolver)!==null&&R!==void 0?R:y.default;return{strictSchema:(C=(E=q.strictSchema)!==null&&E!==void 0?E:Me)!==null&&C!==void 0?C:!0,strictNumbers:(K=(B=q.strictNumbers)!==null&&B!==void 0?B:Me)!==null&&K!==void 0?K:!0,strictTypes:(re=(ee=q.strictTypes)!==null&&ee!==void 0?ee:Me)!==null&&re!==void 0?re:"log",strictTuples:(O=(k=q.strictTuples)!==null&&k!==void 0?k:Me)!==null&&O!==void 0?O:"log",strictRequired:(X=(V=q.strictRequired)!==null&&V!==void 0?V:Me)!==null&&X!==void 0?X:!1,code:q.
450
451
  code?{...q.code,optimize:ko,regExp:To}:{optimize:ko,regExp:To},loopRequired:(Z=q.loopRequired)!==null&&Z!==void 0?Z:f,loopEnum:(J=q.loopEnum)!==null&&J!==void 0?J:f,meta:(ue=q.meta)!==null&&ue!==void 0?ue:!0,messages:(we=q.messages)!==null&&we!==void 0?we:!0,inlineRefs:(Y=q.inlineRefs)!==null&&Y!==void 0?Y:!0,schemaId:(ne=q.schemaId)!==null&&ne!==void 0?ne:"$id",addUsedSchema:(W=q.addUsedSchema)!==null&&W!==void 0?W:!0,validateSchema:(te=q.validateSchema)!==null&&te!==void 0?te:!0,validateFormats:(le=
451
- q.validateFormats)!==null&&le!==void 0?le:!0,unicodeRegExp:(ye=q.unicodeRegExp)!==null&&ye!==void 0?ye:!0,int32range:(he=q.int32range)!==null&&he!==void 0?he:!0,uriResolver:kf}}class v{constructor(A={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,A=this.opts={...A,...d(A)};const{es5:L,lines:T}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:L,lines:T}),this.logger=H(A.logger);const R=A.validateFormats;A.validateFormats=
452
- !1,this.RULES=(0,o.getRules)(),$.call(this,p,A,"NOT SUPPORTED"),$.call(this,h,A,"DEPRECATED","warn"),this._metaOpts=U.call(this),A.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),A.keywords&&O.call(this,A.keywords),typeof A.meta=="object"&&this.addMetaSchema(A.meta),E.call(this),A.validateFormats=R}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:A,meta:L,schemaId:T}=this.opts;let R=m;T==="id"&&(R={...m},R.id=R.$id,delete R.$id),L&&A&&this.
453
- addMetaSchema(R,R[T],!1)}defaultMeta(){const{meta:A,schemaId:L}=this.opts;return this.opts.defaultMeta=typeof A=="object"?A[L]||A:void 0}validate(A,L){let T;if(typeof A=="string"){if(T=this.getSchema(A),!T)throw new Error(`no schema with key or ref "${A}"`)}else T=this.compile(A);const R=T(L);return"$async"in T||(this.errors=T.errors),R}compile(A,L){const T=this._addSchema(A,L);return T.validate||this._compileSchemaEnv(T)}compileAsync(A,L){if(typeof this.opts.loadSchema!="function")throw new Error(
454
- "options.loadSchema should be a function");const{loadSchema:T}=this.opts;return R.call(this,A,L);async function R(re,k){await b.call(this,re.$schema);const N=this._addSchema(re,k);return N.validate||C.call(this,N)}async function b(re){re&&!this.getSchema(re)&&await R.call(this,{$ref:re},!0)}async function C(re){try{return this._compileSchemaEnv(re)}catch(k){if(!(k instanceof i.default))throw k;return B.call(this,k),await K.call(this,k.missingSchema),C.call(this,re)}}function B({missingSchema:re,
455
- missingRef:k}){if(this.refs[re])throw new Error(`AnySchema ${re} is loaded but ${k} cannot be resolved`)}async function K(re){const k=await ee.call(this,re);this.refs[re]||await b.call(this,k.$schema),this.refs[re]||this.addSchema(k,re,L)}async function ee(re){const k=this._loading[re];if(k)return k;try{return await(this._loading[re]=T(re))}finally{delete this._loading[re]}}}addSchema(A,L,T,R=this.opts.validateSchema){if(Array.isArray(A)){for(const C of A)this.addSchema(C,void 0,T,R);return this}
456
- let b;if(typeof A=="object"){const{schemaId:C}=this.opts;if(b=A[C],b!==void 0&&typeof b!="string")throw new Error(`schema ${C} must be string`)}return L=(0,u.normalizeId)(L||b),this._checkUnique(L),this.schemas[L]=this._addSchema(A,T,L,R,!0),this}addMetaSchema(A,L,T=this.opts.validateSchema){return this.addSchema(A,L,!0,T),this}validateSchema(A,L){if(typeof A=="boolean")return!0;let T;if(T=A.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||
457
- this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const R=this.validate(T,A);if(!R&&L){const b="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(b);else throw new Error(b)}return R}getSchema(A){let L;for(;typeof(L=w.call(this,A))=="string";)A=L;if(L===void 0){const{schemaId:T}=this.opts,R=new a.SchemaEnv({schema:{},schemaId:T});if(L=a.resolveSchema.call(this,R,A),!L)return;this.refs[A]=L}return L.validate||this.
458
- _compileSchemaEnv(L)}removeSchema(A){if(A instanceof RegExp)return this._removeAllSchemas(this.schemas,A),this._removeAllSchemas(this.refs,A),this;switch(typeof A){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const L=w.call(this,A);return typeof L=="object"&&this._cache.delete(L.schema),delete this.schemas[A],delete this.refs[A],this}case"object":{const L=A;this._cache.delete(L);let T=A[this.opts.schemaId];return T&&
459
- (T=(0,u.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(A){for(const L of A)this.addKeyword(L);return this}addKeyword(A,L){let T;if(typeof A=="string")T=A,typeof L=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),L.keyword=T);else if(typeof A=="object"&&L===void 0){if(L=A,T=L.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string\
460
- or non-empty array")}else throw new Error("invalid addKeywords parameters");if(I.call(this,T,L),!L)return(0,l.eachItem)(T,b=>M.call(this,b)),this;F.call(this,L);const R={...L,type:(0,c.getJSONTypes)(L.type),schemaType:(0,c.getJSONTypes)(L.schemaType)};return(0,l.eachItem)(T,R.type.length===0?b=>M.call(this,b,R):b=>R.type.forEach(C=>M.call(this,b,R,C))),this}getKeyword(A){const L=this.RULES.all[A];return typeof L=="object"?L.definition:!!L}removeKeyword(A){const{RULES:L}=this;delete L.keywords[A],
461
- delete L.all[A];for(const T of L.rules){const R=T.rules.findIndex(b=>b.keyword===A);R>=0&&T.rules.splice(R,1)}return this}addFormat(A,L){return typeof L=="string"&&(L=new RegExp(L)),this.formats[A]=L,this}errorsText(A=this.errors,{separator:L=", ",dataVar:T="data"}={}){return!A||A.length===0?"No errors":A.map(R=>`${T}${R.instancePath} ${R.message}`).reduce((R,b)=>R+L+b)}$dataMetaSchema(A,L){const T=this.RULES.all;A=JSON.parse(JSON.stringify(A));for(const R of L){const b=R.split("/").slice(1);let C=A;
462
- for(const B of b)C=C[B];for(const B in T){const K=T[B];if(typeof K!="object")continue;const{$data:ee}=K.definition,re=C[B];ee&&re&&(C[B]=Q(re))}}return A}_removeAllSchemas(A,L){for(const T in A){const R=A[T];(!L||L.test(T))&&(typeof R=="string"?delete A[T]:R&&!R.meta&&(this._cache.delete(R.schema),delete A[T]))}}_addSchema(A,L,T,R=this.opts.validateSchema,b=this.opts.addUsedSchema){let C;const{schemaId:B}=this.opts;if(typeof A=="object")C=A[B];else{if(this.opts.jtd)throw new Error("schema must b\
463
- e object");if(typeof A!="boolean")throw new Error("schema must be object or boolean")}let K=this._cache.get(A);if(K!==void 0)return K;T=(0,u.normalizeId)(C||T);const ee=u.getSchemaRefs.call(this,A,T);return K=new a.SchemaEnv({schema:A,schemaId:B,meta:L,baseId:T,localRefs:ee}),this._cache.set(K.schema,K),b&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=K),R&&this.validateSchema(A,!0),K}_checkUnique(A){if(this.schemas[A]||this.refs[A])throw new Error(`schema with key or id "${A}" alrea\
464
- dy exists`)}_compileSchemaEnv(A){if(A.meta?this._compileMetaSchema(A):a.compileSchema.call(this,A),!A.validate)throw new Error("ajv implementation error");return A.validate}_compileMetaSchema(A){const L=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,A)}finally{this.opts=L}}}v.ValidationError=n.default,v.MissingRefError=i.default,e.default=v;function $(q,A,L,T="error"){for(const R in q){const b=R;b in A&&this.logger[T](`${L}: option ${R}. ${q[b]}`)}}function w(q){return q=(0,u.normalizeId)(
465
- q),this.schemas[q]||this.refs[q]}function E(){const q=this.opts.schemas;if(q)if(Array.isArray(q))this.addSchema(q);else for(const A in q)this.addSchema(q[A],A)}function P(){for(const q in this.opts.formats){const A=this.opts.formats[q];A&&this.addFormat(q,A)}}function O(q){if(Array.isArray(q)){this.addVocabulary(q);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const A in q){const L=q[A];L.keyword||(L.keyword=A),this.addKeyword(L)}}function U(){const q={...this.opts};
466
- for(const A of S)delete q[A];return q}const x={log(){},warn(){},error(){}};function H(q){if(q===!1)return x;if(q===void 0)return console;if(q.log&&q.warn&&q.error)return q;throw new Error("logger must implement log, warn and error methods")}const D=/^[a-z_$][a-z0-9_$:-]*$/i;function I(q,A){const{RULES:L}=this;if((0,l.eachItem)(q,T=>{if(L.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!D.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!A&&A.$data&&!("code"in A||"val\
467
- idate"in A))throw new Error('$data keyword must have "code" or "validate" function')}function M(q,A,L){var T;const R=A?.post;if(L&&R)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:b}=this;let C=R?b.post:b.rules.find(({type:K})=>K===L);if(C||(C={type:L,rules:[]},b.rules.push(C)),b.keywords[q]=!0,!A)return;const B={keyword:q,definition:{...A,type:(0,c.getJSONTypes)(A.type),schemaType:(0,c.getJSONTypes)(A.schemaType)}};A.before?z.call(this,C,B,A.before):C.rules.push(B),b.
468
- all[q]=B,(T=A.implements)===null||T===void 0||T.forEach(K=>this.addKeyword(K))}function z(q,A,L){const T=q.rules.findIndex(R=>R.keyword===L);T>=0?q.rules.splice(T,0,A):(q.rules.push(A),this.logger.warn(`rule ${L} is not defined`))}function F(q){let{metaSchema:A}=q;A!==void 0&&(q.$data&&this.opts.$data&&(A=Q(A)),q.validateSchema=this.compile(A,!0))}const G={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Q(q){return{anyOf:[q,G]}}})(ls)),ls}var lr={},
469
- fr={},dr={},ji;function ph(){if(ji)return dr;ji=1,Object.defineProperty(dr,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return dr.default=e,dr}var et={},Li;function $s(){if(Li)return et;Li=1,Object.defineProperty(et,"__esModule",{value:!0}),et.callRef=et.getValidate=void 0;const e=Ot(),t=Ie(),r=ae(),n=Ne(),i=cr(),o=fe(),a={keyword:"$ref",schemaType:"string",code(c){const{gen:l,schema:m,it:y}=c,{baseId:_,schemaEnv:S,
470
- validateName:g,opts:p,self:h}=y,{root:f}=S;if((m==="#"||m==="#/")&&_===f.baseId)return v();const d=i.resolveRef.call(h,f,_,m);if(d===void 0)throw new e.default(y.opts.uriResolver,_,m);if(d instanceof i.SchemaEnv)return $(d);return w(d);function v(){if(S===f)return u(c,g,S,S.$async);const E=l.scopeValue("root",{ref:f});return u(c,(0,r._)`${E}.validate`,f,f.$async)}function $(E){const P=s(c,E);u(c,P,E,E.$async)}function w(E){const P=l.scopeValue("schema",p.code.source===!0?{ref:E,code:(0,r.stringify)(
471
- E)}:{ref:E}),O=l.name("valid"),U=c.subschema({schema:E,dataTypes:[],schemaPath:r.nil,topSchemaRef:P,errSchemaPath:m},O);c.mergeEvaluated(U),c.ok(O)}}};function s(c,l){const{gen:m}=c;return l.validate?m.scopeValue("validate",{ref:l.validate}):(0,r._)`${m.scopeValue("wrapper",{ref:l})}.validate`}et.getValidate=s;function u(c,l,m,y){const{gen:_,it:S}=c,{allErrors:g,schemaEnv:p,opts:h}=S,f=h.passContext?n.default.this:r.nil;y?d():v();function d(){if(!p.$async)throw new Error("async schema referenced\
472
- by sync schema");const E=_.let("valid");_.try(()=>{_.code((0,r._)`await ${(0,t.callValidateCode)(c,l,f)}`),w(l),g||_.assign(E,!0)},P=>{_.if((0,r._)`!(${P} instanceof ${S.ValidationError})`,()=>_.throw(P)),$(P),g||_.assign(E,!1)}),c.ok(E)}function v(){c.result((0,t.callValidateCode)(c,l,f),()=>w(l),()=>$(l))}function $(E){const P=(0,r._)`${E}.errors`;_.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${P} : ${n.default.vErrors}.concat(${P})`),_.assign(n.default.errors,(0,r._)`${n.
473
- default.vErrors}.length`)}function w(E){var P;if(!S.opts.unevaluated)return;const O=(P=m?.validate)===null||P===void 0?void 0:P.evaluated;if(S.props!==!0)if(O&&!O.dynamicProps)O.props!==void 0&&(S.props=o.mergeEvaluated.props(_,O.props,S.props));else{const U=_.var("props",(0,r._)`${E}.evaluated.props`);S.props=o.mergeEvaluated.props(_,U,S.props,r.Name)}if(S.items!==!0)if(O&&!O.dynamicItems)O.items!==void 0&&(S.items=o.mergeEvaluated.items(_,O.items,S.items));else{const U=_.var("items",(0,r._)`${E}.evaluated.items`);
474
- S.items=o.mergeEvaluated.items(_,U,S.items,r.Name)}}}return et.callRef=u,et.default=a,et}var Di;function qi(){if(Di)return fr;Di=1,Object.defineProperty(fr,"__esModule",{value:!0});const e=ph(),t=$s(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return fr.default=r,fr}var pr={},hr={},xi;function hh(){if(xi)return hr;xi=1,Object.defineProperty(hr,"__esModule",{value:!0});const e=ae(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{
475
- okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:o,schemaCode:a})=>(0,e.str)`must be ${r[o].okStr} ${a}`,params:({keyword:o,schemaCode:a})=>(0,e._)`{comparison: ${r[o].okStr}, limit: ${a}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(o){const{keyword:a,data:s,schemaCode:u}=o;o.fail$data((0,e._)`${s} ${r[a].fail} ${u} || isNaN(${s})`)}};return hr.default=i,hr}
476
- var mr={},Mi;function mh(){if(Mi)return mr;Mi=1,Object.defineProperty(mr,"__esModule",{value:!0});const e=ae(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:o,schemaCode:a,it:s}=n,u=s.opts.multipleOfPrecision,c=i.let("res"),l=u?(0,e._)`Math.abs(Math.round(${c}) - ${c}) > 1e-${u}`:(0,e._)`${c} !== parseInt(${c})`;n.fail$data((0,e.
477
- _)`(${a} === 0 || (${c} = ${o}/${a}, ${l}))`)}};return mr.default=r,mr}var yr={},gr={},Hi;function yh(){if(Hi)return gr;Hi=1,Object.defineProperty(gr,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,i=0,o;for(;i<r;)n++,o=t.charCodeAt(i++),o>=55296&&o<=56319&&i<r&&(o=t.charCodeAt(i),(o&64512)===56320&&i++);return n}return gr.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',gr}var Ui;function gh(){if(Ui)return yr;Ui=1,Object.defineProperty(yr,"__esModule",{value:!0});
478
- const e=ae(),t=fe(),r=yh(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:a}){const s=o==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${a} characters`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:a,data:s,schemaCode:u,it:c}=o,l=a==="maxLength"?e.operators.GT:e.operators.LT,m=c.opts.unicode===!1?(0,e._)`${s}.length`:(0,e._)`${(0,t.useFunc)(o.gen,r.default)}(${s})`;o.fail$data((0,e.
479
- _)`${m} ${l} ${u}`)}};return yr.default=i,yr}var vr={},Fi;function vh(){if(Fi)return vr;Fi=1,Object.defineProperty(vr,"__esModule",{value:!0});const e=Ie(),t=ae(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,t._)`{pattern: ${i}}`},code(i){const{data:o,$data:a,schema:s,schemaCode:u,it:c}=i,l=c.opts.unicodeRegExp?"u":"",m=a?(0,t._)`(new RegExp(${u}, ${l}))`:(0,e.usePattern)(i,s);i.fail$data(
480
- (0,t._)`!${m}.test(${o})`)}};return vr.default=n,vr}var $r={},Vi;function $h(){if(Vi)return $r;Vi=1,Object.defineProperty($r,"__esModule",{value:!0});const e=ae(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const o=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${i} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:o,schemaCode:a}=n,s=i==="maxP\
481
- roperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${o}).length ${s} ${a}`)}};return $r.default=r,$r}var _r={},zi;function _h(){if(zi)return _r;zi=1,Object.defineProperty(_r,"__esModule",{value:!0});const e=Ie(),t=ae(),r=fe(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,t.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,t._)`{missingProperty: ${o}}`},code(o){const{gen:a,schema:s,
482
- schemaCode:u,data:c,$data:l,it:m}=o,{opts:y}=m;if(!l&&s.length===0)return;const _=s.length>=y.loopRequired;if(m.allErrors?S():g(),y.strictRequired){const f=o.parentSchema.properties,{definedProperties:d}=o.it;for(const v of s)if(f?.[v]===void 0&&!d.has(v)){const $=m.schemaEnv.baseId+m.errSchemaPath,w=`required property "${v}" is not defined at "${$}" (strictRequired)`;(0,r.checkStrictMode)(m,w,m.opts.strictRequired)}}function S(){if(_||l)o.block$data(t.nil,p);else for(const f of s)(0,e.checkReportMissingProp)(
483
- o,f)}function g(){const f=a.let("missing");if(_||l){const d=a.let("valid",!0);o.block$data(d,()=>h(f,d)),o.ok(d)}else a.if((0,e.checkMissingProp)(o,s,f)),(0,e.reportMissingProp)(o,f),a.else()}function p(){a.forOf("prop",u,f=>{o.setParams({missingProperty:f}),a.if((0,e.noPropertyInData)(a,c,f,y.ownProperties),()=>o.error())})}function h(f,d){o.setParams({missingProperty:f}),a.forOf(f,u,()=>{a.assign(d,(0,e.propertyInData)(a,c,f,y.ownProperties)),a.if((0,t.not)(d),()=>{o.error(),a.break()})},t.nil)}}};
484
- return _r.default=i,_r}var wr={},Gi;function wh(){if(Gi)return wr;Gi=1,Object.defineProperty(wr,"__esModule",{value:!0});const e=ae(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const o=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${i} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:o,schemaCode:a}=n,s=i==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e.
485
- _)`${o}.length ${s} ${a}`)}};return wr.default=r,wr}var br={},Er={},Bi;function _s(){if(Bi)return Er;Bi=1,Object.defineProperty(Er,"__esModule",{value:!0});const e=Do();return e.code='require("ajv/dist/runtime/equal").default',Er.default=e,Er}var Ki;function bh(){if(Ki)return br;Ki=1,Object.defineProperty(br,"__esModule",{value:!0});const e=nr(),t=ae(),r=fe(),n=_s(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:s}})=>(0,t.str)`must NOT have duplicate items (items ## ${s} and ${a} are identical)`,
486
- params:({params:{i:a,j:s}})=>(0,t._)`{i: ${a}, j: ${s}}`},code(a){const{gen:s,data:u,$data:c,schema:l,parentSchema:m,schemaCode:y,it:_}=a;if(!c&&!l)return;const S=s.let("valid"),g=m.items?(0,e.getSchemaTypes)(m.items):[];a.block$data(S,p,(0,t._)`${y} === false`),a.ok(S);function p(){const v=s.let("i",(0,t._)`${u}.length`),$=s.let("j");a.setParams({i:v,j:$}),s.assign(S,!0),s.if((0,t._)`${v} > 1`,()=>(h()?f:d)(v,$))}function h(){return g.length>0&&!g.some(v=>v==="object"||v==="array")}function f(v,$){
487
- const w=s.name("item"),E=(0,e.checkDataTypes)(g,w,_.opts.strictNumbers,e.DataType.Wrong),P=s.const("indices",(0,t._)`{}`);s.for((0,t._)`;${v}--;`,()=>{s.let(w,(0,t._)`${u}[${v}]`),s.if(E,(0,t._)`continue`),g.length>1&&s.if((0,t._)`typeof ${w} == "string"`,(0,t._)`${w} += "_"`),s.if((0,t._)`typeof ${P}[${w}] == "number"`,()=>{s.assign($,(0,t._)`${P}[${w}]`),a.error(),s.assign(S,!1).break()}).code((0,t._)`${P}[${w}] = ${v}`)})}function d(v,$){const w=(0,r.useFunc)(s,n.default),E=s.name("outer");s.
488
- label(E).for((0,t._)`;${v}--;`,()=>s.for((0,t._)`${$} = ${v}; ${$}--;`,()=>s.if((0,t._)`${w}(${u}[${v}], ${u}[${$}])`,()=>{a.error(),s.assign(S,!1).break(E)})))}}};return br.default=o,br}var Sr={},Wi;function Eh(){if(Wi)return Sr;Wi=1,Object.defineProperty(Sr,"__esModule",{value:!0});const e=ae(),t=fe(),r=_s(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,e._)`{allowedValue: ${o}}`},code(o){const{gen:a,data:s,$data:u,schemaCode:c,schema:l}=o;u||
489
- l&&typeof l=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(a,r.default)}(${s}, ${c})`):o.fail((0,e._)`${l} !== ${s}`)}};return Sr.default=i,Sr}var Rr={},Xi;function Sh(){if(Xi)return Rr;Xi=1,Object.defineProperty(Rr,"__esModule",{value:!0});const e=ae(),t=fe(),r=_s(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,e._)`{allowedValues: ${o}}`},code(o){const{gen:a,data:s,$data:u,schema:c,schemaCode:l,it:m}=o;if(!u&&
490
- c.length===0)throw new Error("enum must have non-empty array");const y=c.length>=m.opts.loopEnum;let _;const S=()=>_??(_=(0,t.useFunc)(a,r.default));let g;if(y||u)g=a.let("valid"),o.block$data(g,p);else{if(!Array.isArray(c))throw new Error("ajv implementation error");const f=a.const("vSchema",l);g=(0,e.or)(...c.map((d,v)=>h(f,v)))}o.pass(g);function p(){a.assign(g,!1),a.forOf("v",l,f=>a.if((0,e._)`${S()}(${s}, ${f})`,()=>a.assign(g,!0).break()))}function h(f,d){const v=c[d];return typeof v=="obj\
491
- ect"&&v!==null?(0,e._)`${S()}(${s}, ${f}[${d}])`:(0,e._)`${s} === ${v}`}}};return Rr.default=i,Rr}var Ji;function Yi(){if(Ji)return pr;Ji=1,Object.defineProperty(pr,"__esModule",{value:!0});const e=hh(),t=mh(),r=gh(),n=vh(),i=$h(),o=_h(),a=wh(),s=bh(),u=Eh(),c=Sh(),l=[e.default,t.default,r.default,n.default,i.default,o.default,a.default,s.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,c.default];return pr.default=l,pr}var Ar={},ht={},Qi;
492
- function Zi(){if(Qi)return ht;Qi=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.validateAdditionalItems=void 0;const e=ae(),t=fe(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{parentSchema:a,it:s}=o,{items:u}=a;if(!Array.isArray(u)){(0,t.checkStrictMode)(s,'"additionalItems" is ignored when "ite\
493
- ms" is not an array of schemas');return}i(o,u)}};function i(o,a){const{gen:s,schema:u,data:c,keyword:l,it:m}=o;m.items=!0;const y=s.const("len",(0,e._)`${c}.length`);if(u===!1)o.setParams({len:a.length}),o.pass((0,e._)`${y} <= ${a.length}`);else if(typeof u=="object"&&!(0,t.alwaysValidSchema)(m,u)){const S=s.var("valid",(0,e._)`${y} <= ${a.length}`);s.if((0,e.not)(S),()=>_(S)),o.ok(S)}function _(S){s.forRange("i",a.length,y,g=>{o.subschema({keyword:l,dataProp:g,dataPropType:t.Type.Num},S),m.allErrors||
494
- s.if((0,e.not)(S),()=>s.break())})}}return ht.validateAdditionalItems=i,ht.default=n,ht}var Pr={},mt={},ec;function tc(){if(ec)return mt;ec=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.validateTuple=void 0;const e=ae(),t=fe(),r=Ie(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:a,it:s}=o;if(Array.isArray(a))return i(o,"additionalItems",a);s.items=!0,!(0,t.alwaysValidSchema)(s,a)&&o.ok((0,r.validateArray)(o))}};function i(o,a,s=o.
495
- schema){const{gen:u,parentSchema:c,data:l,keyword:m,it:y}=o;g(c),y.opts.unevaluated&&s.length&&y.items!==!0&&(y.items=t.mergeEvaluated.items(u,s.length,y.items));const _=u.name("valid"),S=u.const("len",(0,e._)`${l}.length`);s.forEach((p,h)=>{(0,t.alwaysValidSchema)(y,p)||(u.if((0,e._)`${S} > ${h}`,()=>o.subschema({keyword:m,schemaProp:h,dataProp:h},_)),o.ok(_))});function g(p){const{opts:h,errSchemaPath:f}=y,d=s.length,v=d===p.minItems&&(d===p.maxItems||p[a]===!1);if(h.strictTuples&&!v){const $=`\
496
- "${m}" is ${d}-tuple, but minItems or maxItems/${a} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(y,$,h.strictTuples)}}}return mt.validateTuple=i,mt.default=n,mt}var rc;function Rh(){if(rc)return Pr;rc=1,Object.defineProperty(Pr,"__esModule",{value:!0});const e=tc(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return Pr.default=t,Pr}var Cr={},nc;function Ah(){if(nc)return Cr;nc=1,Object.defineProperty(
497
- Cr,"__esModule",{value:!0});const e=ae(),t=fe(),r=Ie(),n=Zi(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{schema:s,parentSchema:u,it:c}=a,{prefixItems:l}=u;c.items=!0,!(0,t.alwaysValidSchema)(c,s)&&(l?(0,n.validateAdditionalItems)(a,l):a.ok((0,r.validateArray)(a)))}};return Cr.default=o,Cr}var kr={},sc;function Ph(){
498
- if(sc)return kr;sc=1,Object.defineProperty(kr,"__esModule",{value:!0});const e=ae(),t=fe(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:o}})=>o===void 0?(0,e.str)`must contain at least ${i} valid item(s)`:(0,e.str)`must contain at least ${i} and no more than ${o} valid item(s)`,params:({params:{min:i,max:o}})=>o===void 0?(0,e._)`{minContains: ${i}}`:(0,e._)`{minContains: ${i}, maxContains: ${o}}`},code(i){
499
- const{gen:o,schema:a,parentSchema:s,data:u,it:c}=i;let l,m;const{minContains:y,maxContains:_}=s;c.opts.next?(l=y===void 0?1:y,m=_):l=1;const S=o.const("len",(0,e._)`${u}.length`);if(i.setParams({min:l,max:m}),m===void 0&&l===0){(0,t.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(m!==void 0&&l>m){(0,t.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,t.alwaysValidSchema)(c,a)){let d=(0,e._)`${S} >= ${l}`;
500
- m!==void 0&&(d=(0,e._)`${d} && ${S} <= ${m}`),i.pass(d);return}c.items=!0;const g=o.name("valid");m===void 0&&l===1?h(g,()=>o.if(g,()=>o.break())):l===0?(o.let(g,!0),m!==void 0&&o.if((0,e._)`${u}.length > 0`,p)):(o.let(g,!1),p()),i.result(g,()=>i.reset());function p(){const d=o.name("_valid"),v=o.let("count",0);h(d,()=>o.if(d,()=>f(v)))}function h(d,v){o.forRange("i",0,S,$=>{i.subschema({keyword:"contains",dataProp:$,dataPropType:t.Type.Num,compositeRule:!0},d),v()})}function f(d){o.code((0,e._)`${d}++`),
501
- m===void 0?o.if((0,e._)`${d} >= ${l}`,()=>o.assign(g,!0).break()):(o.if((0,e._)`${d} > ${m}`,()=>o.assign(g,!1).break()),l===1?o.assign(g,!0):o.if((0,e._)`${d} >= ${l}`,()=>o.assign(g,!0)))}}};return kr.default=n,kr}var ws={},oc;function bs(){return oc||(oc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ae(),r=fe(),n=Ie();e.error={message:({params:{property:u,depsCount:c,deps:l}})=>{const m=c===1?"property":"prop\
452
+ q.validateFormats)!==null&&le!==void 0?le:!0,unicodeRegExp:(ye=q.unicodeRegExp)!==null&&ye!==void 0?ye:!0,int32range:(he=q.int32range)!==null&&he!==void 0?he:!0,uriResolver:kf}}class v{constructor(A={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,A=this.opts={...A,...d(A)};const{es5:D,lines:T}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:D,lines:T}),this.logger=U(A.logger);const R=A.validateFormats;A.validateFormats=
453
+ !1,this.RULES=(0,a.getRules)(),$.call(this,h,A,"NOT SUPPORTED"),$.call(this,p,A,"DEPRECATED","warn"),this._metaOpts=H.call(this),A.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),A.keywords&&I.call(this,A.keywords),typeof A.meta=="object"&&this.addMetaSchema(A.meta),b.call(this),A.validateFormats=R}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:A,meta:D,schemaId:T}=this.opts;let R=m;T==="id"&&(R={...m},R.id=R.$id,delete R.$id),D&&A&&this.
454
+ addMetaSchema(R,R[T],!1)}defaultMeta(){const{meta:A,schemaId:D}=this.opts;return this.opts.defaultMeta=typeof A=="object"?A[D]||A:void 0}validate(A,D){let T;if(typeof A=="string"){if(T=this.getSchema(A),!T)throw new Error(`no schema with key or ref "${A}"`)}else T=this.compile(A);const R=T(D);return"$async"in T||(this.errors=T.errors),R}compile(A,D){const T=this._addSchema(A,D);return T.validate||this._compileSchemaEnv(T)}compileAsync(A,D){if(typeof this.opts.loadSchema!="function")throw new Error(
455
+ "options.loadSchema should be a function");const{loadSchema:T}=this.opts;return R.call(this,A,D);async function R(re,k){await E.call(this,re.$schema);const O=this._addSchema(re,k);return O.validate||C.call(this,O)}async function E(re){re&&!this.getSchema(re)&&await R.call(this,{$ref:re},!0)}async function C(re){try{return this._compileSchemaEnv(re)}catch(k){if(!(k instanceof i.default))throw k;return B.call(this,k),await K.call(this,k.missingSchema),C.call(this,re)}}function B({missingSchema:re,
456
+ missingRef:k}){if(this.refs[re])throw new Error(`AnySchema ${re} is loaded but ${k} cannot be resolved`)}async function K(re){const k=await ee.call(this,re);this.refs[re]||await E.call(this,k.$schema),this.refs[re]||this.addSchema(k,re,D)}async function ee(re){const k=this._loading[re];if(k)return k;try{return await(this._loading[re]=T(re))}finally{delete this._loading[re]}}}addSchema(A,D,T,R=this.opts.validateSchema){if(Array.isArray(A)){for(const C of A)this.addSchema(C,void 0,T,R);return this}
457
+ let E;if(typeof A=="object"){const{schemaId:C}=this.opts;if(E=A[C],E!==void 0&&typeof E!="string")throw new Error(`schema ${C} must be string`)}return D=(0,u.normalizeId)(D||E),this._checkUnique(D),this.schemas[D]=this._addSchema(A,T,D,R,!0),this}addMetaSchema(A,D,T=this.opts.validateSchema){return this.addSchema(A,D,!0,T),this}validateSchema(A,D){if(typeof A=="boolean")return!0;let T;if(T=A.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||
458
+ this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const R=this.validate(T,A);if(!R&&D){const E="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(E);else throw new Error(E)}return R}getSchema(A){let D;for(;typeof(D=w.call(this,A))=="string";)A=D;if(D===void 0){const{schemaId:T}=this.opts,R=new o.SchemaEnv({schema:{},schemaId:T});if(D=o.resolveSchema.call(this,R,A),!D)return;this.refs[A]=D}return D.validate||this.
459
+ _compileSchemaEnv(D)}removeSchema(A){if(A instanceof RegExp)return this._removeAllSchemas(this.schemas,A),this._removeAllSchemas(this.refs,A),this;switch(typeof A){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const D=w.call(this,A);return typeof D=="object"&&this._cache.delete(D.schema),delete this.schemas[A],delete this.refs[A],this}case"object":{const D=A;this._cache.delete(D);let T=A[this.opts.schemaId];return T&&
460
+ (T=(0,u.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(A){for(const D of A)this.addKeyword(D);return this}addKeyword(A,D){let T;if(typeof A=="string")T=A,typeof D=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),D.keyword=T);else if(typeof A=="object"&&D===void 0){if(D=A,T=D.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string\
461
+ or non-empty array")}else throw new Error("invalid addKeywords parameters");if(j.call(this,T,D),!D)return(0,l.eachItem)(T,E=>M.call(this,E)),this;F.call(this,D);const R={...D,type:(0,c.getJSONTypes)(D.type),schemaType:(0,c.getJSONTypes)(D.schemaType)};return(0,l.eachItem)(T,R.type.length===0?E=>M.call(this,E,R):E=>R.type.forEach(C=>M.call(this,E,R,C))),this}getKeyword(A){const D=this.RULES.all[A];return typeof D=="object"?D.definition:!!D}removeKeyword(A){const{RULES:D}=this;delete D.keywords[A],
462
+ delete D.all[A];for(const T of D.rules){const R=T.rules.findIndex(E=>E.keyword===A);R>=0&&T.rules.splice(R,1)}return this}addFormat(A,D){return typeof D=="string"&&(D=new RegExp(D)),this.formats[A]=D,this}errorsText(A=this.errors,{separator:D=", ",dataVar:T="data"}={}){return!A||A.length===0?"No errors":A.map(R=>`${T}${R.instancePath} ${R.message}`).reduce((R,E)=>R+D+E)}$dataMetaSchema(A,D){const T=this.RULES.all;A=JSON.parse(JSON.stringify(A));for(const R of D){const E=R.split("/").slice(1);let C=A;
463
+ for(const B of E)C=C[B];for(const B in T){const K=T[B];if(typeof K!="object")continue;const{$data:ee}=K.definition,re=C[B];ee&&re&&(C[B]=Q(re))}}return A}_removeAllSchemas(A,D){for(const T in A){const R=A[T];(!D||D.test(T))&&(typeof R=="string"?delete A[T]:R&&!R.meta&&(this._cache.delete(R.schema),delete A[T]))}}_addSchema(A,D,T,R=this.opts.validateSchema,E=this.opts.addUsedSchema){let C;const{schemaId:B}=this.opts;if(typeof A=="object")C=A[B];else{if(this.opts.jtd)throw new Error("schema must b\
464
+ e object");if(typeof A!="boolean")throw new Error("schema must be object or boolean")}let K=this._cache.get(A);if(K!==void 0)return K;T=(0,u.normalizeId)(C||T);const ee=u.getSchemaRefs.call(this,A,T);return K=new o.SchemaEnv({schema:A,schemaId:B,meta:D,baseId:T,localRefs:ee}),this._cache.set(K.schema,K),E&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=K),R&&this.validateSchema(A,!0),K}_checkUnique(A){if(this.schemas[A]||this.refs[A])throw new Error(`schema with key or id "${A}" alrea\
465
+ dy exists`)}_compileSchemaEnv(A){if(A.meta?this._compileMetaSchema(A):o.compileSchema.call(this,A),!A.validate)throw new Error("ajv implementation error");return A.validate}_compileMetaSchema(A){const D=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,A)}finally{this.opts=D}}}v.ValidationError=n.default,v.MissingRefError=i.default,e.default=v;function $(q,A,D,T="error"){for(const R in q){const E=R;E in A&&this.logger[T](`${D}: option ${R}. ${q[E]}`)}}function w(q){return q=(0,u.normalizeId)(
466
+ 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 A in q)this.addSchema(q[A],A)}function P(){for(const q in this.opts.formats){const A=this.opts.formats[q];A&&this.addFormat(q,A)}}function I(q){if(Array.isArray(q)){this.addVocabulary(q);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const A in q){const D=q[A];D.keyword||(D.keyword=A),this.addKeyword(D)}}function H(){const q={...this.opts};
467
+ for(const A of S)delete q[A];return q}const x={log(){},warn(){},error(){}};function U(q){if(q===!1)return x;if(q===void 0)return console;if(q.log&&q.warn&&q.error)return q;throw new Error("logger must implement log, warn and error methods")}const L=/^[a-z_$][a-z0-9_$:-]*$/i;function j(q,A){const{RULES:D}=this;if((0,l.eachItem)(q,T=>{if(D.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!L.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!A&&A.$data&&!("code"in A||"val\
468
+ idate"in A))throw new Error('$data keyword must have "code" or "validate" function')}function M(q,A,D){var T;const R=A?.post;if(D&&R)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:E}=this;let C=R?E.post:E.rules.find(({type:K})=>K===D);if(C||(C={type:D,rules:[]},E.rules.push(C)),E.keywords[q]=!0,!A)return;const B={keyword:q,definition:{...A,type:(0,c.getJSONTypes)(A.type),schemaType:(0,c.getJSONTypes)(A.schemaType)}};A.before?z.call(this,C,B,A.before):C.rules.push(B),E.
469
+ all[q]=B,(T=A.implements)===null||T===void 0||T.forEach(K=>this.addKeyword(K))}function z(q,A,D){const T=q.rules.findIndex(R=>R.keyword===D);T>=0?q.rules.splice(T,0,A):(q.rules.push(A),this.logger.warn(`rule ${D} is not defined`))}function F(q){let{metaSchema:A}=q;A!==void 0&&(q.$data&&this.opts.$data&&(A=Q(A)),q.validateSchema=this.compile(A,!0))}const G={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Q(q){return{anyOf:[q,G]}}})(ls)),ls}var lr={},
470
+ fr={},dr={},ji;function ph(){if(ji)return dr;ji=1,Object.defineProperty(dr,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return dr.default=e,dr}var et={},Li;function $s(){if(Li)return et;Li=1,Object.defineProperty(et,"__esModule",{value:!0}),et.callRef=et.getValidate=void 0;const e=It(),t=Ie(),r=ae(),n=Oe(),i=cr(),a=fe(),o={keyword:"$ref",schemaType:"string",code(c){const{gen:l,schema:m,it:y}=c,{baseId:_,schemaEnv:S,
471
+ validateName:g,opts:h,self:p}=y,{root:f}=S;if((m==="#"||m==="#/")&&_===f.baseId)return v();const d=i.resolveRef.call(p,f,_,m);if(d===void 0)throw new e.default(y.opts.uriResolver,_,m);if(d instanceof i.SchemaEnv)return $(d);return w(d);function v(){if(S===f)return u(c,g,S,S.$async);const b=l.scopeValue("root",{ref:f});return u(c,(0,r._)`${b}.validate`,f,f.$async)}function $(b){const P=s(c,b);u(c,P,b,b.$async)}function w(b){const P=l.scopeValue("schema",h.code.source===!0?{ref:b,code:(0,r.stringify)(
472
+ b)}:{ref:b}),I=l.name("valid"),H=c.subschema({schema:b,dataTypes:[],schemaPath:r.nil,topSchemaRef:P,errSchemaPath:m},I);c.mergeEvaluated(H),c.ok(I)}}};function s(c,l){const{gen:m}=c;return l.validate?m.scopeValue("validate",{ref:l.validate}):(0,r._)`${m.scopeValue("wrapper",{ref:l})}.validate`}et.getValidate=s;function u(c,l,m,y){const{gen:_,it:S}=c,{allErrors:g,schemaEnv:h,opts:p}=S,f=p.passContext?n.default.this:r.nil;y?d():v();function d(){if(!h.$async)throw new Error("async schema referenced\
473
+ by sync schema");const b=_.let("valid");_.try(()=>{_.code((0,r._)`await ${(0,t.callValidateCode)(c,l,f)}`),w(l),g||_.assign(b,!0)},P=>{_.if((0,r._)`!(${P} instanceof ${S.ValidationError})`,()=>_.throw(P)),$(P),g||_.assign(b,!1)}),c.ok(b)}function v(){c.result((0,t.callValidateCode)(c,l,f),()=>w(l),()=>$(l))}function $(b){const P=(0,r._)`${b}.errors`;_.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${P} : ${n.default.vErrors}.concat(${P})`),_.assign(n.default.errors,(0,r._)`${n.
474
+ default.vErrors}.length`)}function w(b){var P;if(!S.opts.unevaluated)return;const I=(P=m?.validate)===null||P===void 0?void 0:P.evaluated;if(S.props!==!0)if(I&&!I.dynamicProps)I.props!==void 0&&(S.props=a.mergeEvaluated.props(_,I.props,S.props));else{const H=_.var("props",(0,r._)`${b}.evaluated.props`);S.props=a.mergeEvaluated.props(_,H,S.props,r.Name)}if(S.items!==!0)if(I&&!I.dynamicItems)I.items!==void 0&&(S.items=a.mergeEvaluated.items(_,I.items,S.items));else{const H=_.var("items",(0,r._)`${b}.evaluated.items`);
475
+ S.items=a.mergeEvaluated.items(_,H,S.items,r.Name)}}}return et.callRef=u,et.default=o,et}var Di;function qi(){if(Di)return fr;Di=1,Object.defineProperty(fr,"__esModule",{value:!0});const e=ph(),t=$s(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return fr.default=r,fr}var pr={},hr={},xi;function hh(){if(xi)return hr;xi=1,Object.defineProperty(hr,"__esModule",{value:!0});const e=ae(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{
476
+ okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:a,schemaCode:o})=>(0,e.str)`must be ${r[a].okStr} ${o}`,params:({keyword:a,schemaCode:o})=>(0,e._)`{comparison: ${r[a].okStr}, limit: ${o}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(a){const{keyword:o,data:s,schemaCode:u}=a;a.fail$data((0,e._)`${s} ${r[o].fail} ${u} || isNaN(${s})`)}};return hr.default=i,hr}
477
+ var mr={},Mi;function mh(){if(Mi)return mr;Mi=1,Object.defineProperty(mr,"__esModule",{value:!0});const e=ae(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:a,schemaCode:o,it:s}=n,u=s.opts.multipleOfPrecision,c=i.let("res"),l=u?(0,e._)`Math.abs(Math.round(${c}) - ${c}) > 1e-${u}`:(0,e._)`${c} !== parseInt(${c})`;n.fail$data((0,e.
478
+ _)`(${o} === 0 || (${c} = ${a}/${o}, ${l}))`)}};return mr.default=r,mr}var yr={},gr={},Hi;function yh(){if(Hi)return gr;Hi=1,Object.defineProperty(gr,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,i=0,a;for(;i<r;)n++,a=t.charCodeAt(i++),a>=55296&&a<=56319&&i<r&&(a=t.charCodeAt(i),(a&64512)===56320&&i++);return n}return gr.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',gr}var Ui;function gh(){if(Ui)return yr;Ui=1,Object.defineProperty(yr,"__esModule",{value:!0});
479
+ const e=ae(),t=fe(),r=yh(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:a,schemaCode:o}){const s=a==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${o} characters`},params:({schemaCode:a})=>(0,e._)`{limit: ${a}}`},code(a){const{keyword:o,data:s,schemaCode:u,it:c}=a,l=o==="maxLength"?e.operators.GT:e.operators.LT,m=c.opts.unicode===!1?(0,e._)`${s}.length`:(0,e._)`${(0,t.useFunc)(a.gen,r.default)}(${s})`;a.fail$data((0,e.
480
+ _)`${m} ${l} ${u}`)}};return yr.default=i,yr}var vr={},Fi;function vh(){if(Fi)return vr;Fi=1,Object.defineProperty(vr,"__esModule",{value:!0});const e=Ie(),t=ae(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,t._)`{pattern: ${i}}`},code(i){const{data:a,$data:o,schema:s,schemaCode:u,it:c}=i,l=c.opts.unicodeRegExp?"u":"",m=o?(0,t._)`(new RegExp(${u}, ${l}))`:(0,e.usePattern)(i,s);i.fail$data(
481
+ (0,t._)`!${m}.test(${a})`)}};return vr.default=n,vr}var $r={},Vi;function $h(){if(Vi)return $r;Vi=1,Object.defineProperty($r,"__esModule",{value:!0});const e=ae(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const a=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${i} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:a,schemaCode:o}=n,s=i==="maxP\
482
+ roperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${a}).length ${s} ${o}`)}};return $r.default=r,$r}var _r={},zi;function _h(){if(zi)return _r;zi=1,Object.defineProperty(_r,"__esModule",{value:!0});const e=Ie(),t=ae(),r=fe(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:a}})=>(0,t.str)`must have required property '${a}'`,params:({params:{missingProperty:a}})=>(0,t._)`{missingProperty: ${a}}`},code(a){const{gen:o,schema:s,
483
+ schemaCode:u,data:c,$data:l,it:m}=a,{opts:y}=m;if(!l&&s.length===0)return;const _=s.length>=y.loopRequired;if(m.allErrors?S():g(),y.strictRequired){const f=a.parentSchema.properties,{definedProperties:d}=a.it;for(const v of s)if(f?.[v]===void 0&&!d.has(v)){const $=m.schemaEnv.baseId+m.errSchemaPath,w=`required property "${v}" is not defined at "${$}" (strictRequired)`;(0,r.checkStrictMode)(m,w,m.opts.strictRequired)}}function S(){if(_||l)a.block$data(t.nil,h);else for(const f of s)(0,e.checkReportMissingProp)(
484
+ a,f)}function g(){const f=o.let("missing");if(_||l){const d=o.let("valid",!0);a.block$data(d,()=>p(f,d)),a.ok(d)}else o.if((0,e.checkMissingProp)(a,s,f)),(0,e.reportMissingProp)(a,f),o.else()}function h(){o.forOf("prop",u,f=>{a.setParams({missingProperty:f}),o.if((0,e.noPropertyInData)(o,c,f,y.ownProperties),()=>a.error())})}function p(f,d){a.setParams({missingProperty:f}),o.forOf(f,u,()=>{o.assign(d,(0,e.propertyInData)(o,c,f,y.ownProperties)),o.if((0,t.not)(d),()=>{a.error(),o.break()})},t.nil)}}};
485
+ return _r.default=i,_r}var wr={},Gi;function wh(){if(Gi)return wr;Gi=1,Object.defineProperty(wr,"__esModule",{value:!0});const e=ae(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const a=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${i} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:a,schemaCode:o}=n,s=i==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e.
486
+ _)`${a}.length ${s} ${o}`)}};return wr.default=r,wr}var br={},Er={},Bi;function _s(){if(Bi)return Er;Bi=1,Object.defineProperty(Er,"__esModule",{value:!0});const e=Do();return e.code='require("ajv/dist/runtime/equal").default',Er.default=e,Er}var Ki;function bh(){if(Ki)return br;Ki=1,Object.defineProperty(br,"__esModule",{value:!0});const e=nr(),t=ae(),r=fe(),n=_s(),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:o,j:s}})=>(0,t.str)`must NOT have duplicate items (items ## ${s} and ${o} are identical)`,
487
+ params:({params:{i:o,j:s}})=>(0,t._)`{i: ${o}, j: ${s}}`},code(o){const{gen:s,data:u,$data:c,schema:l,parentSchema:m,schemaCode:y,it:_}=o;if(!c&&!l)return;const S=s.let("valid"),g=m.items?(0,e.getSchemaTypes)(m.items):[];o.block$data(S,h,(0,t._)`${y} === false`),o.ok(S);function h(){const v=s.let("i",(0,t._)`${u}.length`),$=s.let("j");o.setParams({i:v,j:$}),s.assign(S,!0),s.if((0,t._)`${v} > 1`,()=>(p()?f:d)(v,$))}function p(){return g.length>0&&!g.some(v=>v==="object"||v==="array")}function f(v,$){
488
+ const w=s.name("item"),b=(0,e.checkDataTypes)(g,w,_.opts.strictNumbers,e.DataType.Wrong),P=s.const("indices",(0,t._)`{}`);s.for((0,t._)`;${v}--;`,()=>{s.let(w,(0,t._)`${u}[${v}]`),s.if(b,(0,t._)`continue`),g.length>1&&s.if((0,t._)`typeof ${w} == "string"`,(0,t._)`${w} += "_"`),s.if((0,t._)`typeof ${P}[${w}] == "number"`,()=>{s.assign($,(0,t._)`${P}[${w}]`),o.error(),s.assign(S,!1).break()}).code((0,t._)`${P}[${w}] = ${v}`)})}function d(v,$){const w=(0,r.useFunc)(s,n.default),b=s.name("outer");s.
489
+ label(b).for((0,t._)`;${v}--;`,()=>s.for((0,t._)`${$} = ${v}; ${$}--;`,()=>s.if((0,t._)`${w}(${u}[${v}], ${u}[${$}])`,()=>{o.error(),s.assign(S,!1).break(b)})))}}};return br.default=a,br}var Sr={},Wi;function Eh(){if(Wi)return Sr;Wi=1,Object.defineProperty(Sr,"__esModule",{value:!0});const e=ae(),t=fe(),r=_s(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:a})=>(0,e._)`{allowedValue: ${a}}`},code(a){const{gen:o,data:s,$data:u,schemaCode:c,schema:l}=a;u||
490
+ l&&typeof l=="object"?a.fail$data((0,e._)`!${(0,t.useFunc)(o,r.default)}(${s}, ${c})`):a.fail((0,e._)`${l} !== ${s}`)}};return Sr.default=i,Sr}var Rr={},Xi;function Sh(){if(Xi)return Rr;Xi=1,Object.defineProperty(Rr,"__esModule",{value:!0});const e=ae(),t=fe(),r=_s(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:a})=>(0,e._)`{allowedValues: ${a}}`},code(a){const{gen:o,data:s,$data:u,schema:c,schemaCode:l,it:m}=a;if(!u&&
491
+ c.length===0)throw new Error("enum must have non-empty array");const y=c.length>=m.opts.loopEnum;let _;const S=()=>_??(_=(0,t.useFunc)(o,r.default));let g;if(y||u)g=o.let("valid"),a.block$data(g,h);else{if(!Array.isArray(c))throw new Error("ajv implementation error");const f=o.const("vSchema",l);g=(0,e.or)(...c.map((d,v)=>p(f,v)))}a.pass(g);function h(){o.assign(g,!1),o.forOf("v",l,f=>o.if((0,e._)`${S()}(${s}, ${f})`,()=>o.assign(g,!0).break()))}function p(f,d){const v=c[d];return typeof v=="obj\
492
+ ect"&&v!==null?(0,e._)`${S()}(${s}, ${f}[${d}])`:(0,e._)`${s} === ${v}`}}};return Rr.default=i,Rr}var Ji;function Yi(){if(Ji)return pr;Ji=1,Object.defineProperty(pr,"__esModule",{value:!0});const e=hh(),t=mh(),r=gh(),n=vh(),i=$h(),a=_h(),o=wh(),s=bh(),u=Eh(),c=Sh(),l=[e.default,t.default,r.default,n.default,i.default,a.default,o.default,s.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,c.default];return pr.default=l,pr}var Ar={},ht={},Qi;
493
+ function Zi(){if(Qi)return ht;Qi=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.validateAdditionalItems=void 0;const e=ae(),t=fe(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{parentSchema:o,it:s}=a,{items:u}=o;if(!Array.isArray(u)){(0,t.checkStrictMode)(s,'"additionalItems" is ignored when "ite\
494
+ ms" is not an array of schemas');return}i(a,u)}};function i(a,o){const{gen:s,schema:u,data:c,keyword:l,it:m}=a;m.items=!0;const y=s.const("len",(0,e._)`${c}.length`);if(u===!1)a.setParams({len:o.length}),a.pass((0,e._)`${y} <= ${o.length}`);else if(typeof u=="object"&&!(0,t.alwaysValidSchema)(m,u)){const S=s.var("valid",(0,e._)`${y} <= ${o.length}`);s.if((0,e.not)(S),()=>_(S)),a.ok(S)}function _(S){s.forRange("i",o.length,y,g=>{a.subschema({keyword:l,dataProp:g,dataPropType:t.Type.Num},S),m.allErrors||
495
+ s.if((0,e.not)(S),()=>s.break())})}}return ht.validateAdditionalItems=i,ht.default=n,ht}var Pr={},mt={},ec;function tc(){if(ec)return mt;ec=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.validateTuple=void 0;const e=ae(),t=fe(),r=Ie(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){const{schema:o,it:s}=a;if(Array.isArray(o))return i(a,"additionalItems",o);s.items=!0,!(0,t.alwaysValidSchema)(s,o)&&a.ok((0,r.validateArray)(a))}};function i(a,o,s=a.
496
+ schema){const{gen:u,parentSchema:c,data:l,keyword:m,it:y}=a;g(c),y.opts.unevaluated&&s.length&&y.items!==!0&&(y.items=t.mergeEvaluated.items(u,s.length,y.items));const _=u.name("valid"),S=u.const("len",(0,e._)`${l}.length`);s.forEach((h,p)=>{(0,t.alwaysValidSchema)(y,h)||(u.if((0,e._)`${S} > ${p}`,()=>a.subschema({keyword:m,schemaProp:p,dataProp:p},_)),a.ok(_))});function g(h){const{opts:p,errSchemaPath:f}=y,d=s.length,v=d===h.minItems&&(d===h.maxItems||h[o]===!1);if(p.strictTuples&&!v){const $=`\
497
+ "${m}" is ${d}-tuple, but minItems or maxItems/${o} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(y,$,p.strictTuples)}}}return mt.validateTuple=i,mt.default=n,mt}var rc;function Rh(){if(rc)return Pr;rc=1,Object.defineProperty(Pr,"__esModule",{value:!0});const e=tc(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return Pr.default=t,Pr}var Cr={},nc;function Ah(){if(nc)return Cr;nc=1,Object.defineProperty(
498
+ Cr,"__esModule",{value:!0});const e=ae(),t=fe(),r=Ie(),n=Zi(),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{schema:s,parentSchema:u,it:c}=o,{prefixItems:l}=u;c.items=!0,!(0,t.alwaysValidSchema)(c,s)&&(l?(0,n.validateAdditionalItems)(o,l):o.ok((0,r.validateArray)(o)))}};return Cr.default=a,Cr}var kr={},sc;function Ph(){
499
+ if(sc)return kr;sc=1,Object.defineProperty(kr,"__esModule",{value:!0});const e=ae(),t=fe(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:a}})=>a===void 0?(0,e.str)`must contain at least ${i} valid item(s)`:(0,e.str)`must contain at least ${i} and no more than ${a} valid item(s)`,params:({params:{min:i,max:a}})=>a===void 0?(0,e._)`{minContains: ${i}}`:(0,e._)`{minContains: ${i}, maxContains: ${a}}`},code(i){
500
+ const{gen:a,schema:o,parentSchema:s,data:u,it:c}=i;let l,m;const{minContains:y,maxContains:_}=s;c.opts.next?(l=y===void 0?1:y,m=_):l=1;const S=a.const("len",(0,e._)`${u}.length`);if(i.setParams({min:l,max:m}),m===void 0&&l===0){(0,t.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(m!==void 0&&l>m){(0,t.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,t.alwaysValidSchema)(c,o)){let d=(0,e._)`${S} >= ${l}`;
501
+ m!==void 0&&(d=(0,e._)`${d} && ${S} <= ${m}`),i.pass(d);return}c.items=!0;const g=a.name("valid");m===void 0&&l===1?p(g,()=>a.if(g,()=>a.break())):l===0?(a.let(g,!0),m!==void 0&&a.if((0,e._)`${u}.length > 0`,h)):(a.let(g,!1),h()),i.result(g,()=>i.reset());function h(){const d=a.name("_valid"),v=a.let("count",0);p(d,()=>a.if(d,()=>f(v)))}function p(d,v){a.forRange("i",0,S,$=>{i.subschema({keyword:"contains",dataProp:$,dataPropType:t.Type.Num,compositeRule:!0},d),v()})}function f(d){a.code((0,e._)`${d}++`),
502
+ m===void 0?a.if((0,e._)`${d} >= ${l}`,()=>a.assign(g,!0).break()):(a.if((0,e._)`${d} > ${m}`,()=>a.assign(g,!1).break()),l===1?a.assign(g,!0):a.if((0,e._)`${d} >= ${l}`,()=>a.assign(g,!0)))}}};return kr.default=n,kr}var ws={},oc;function bs(){return oc||(oc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ae(),r=fe(),n=Ie();e.error={message:({params:{property:u,depsCount:c,deps:l}})=>{const m=c===1?"property":"prop\
502
503
  erties";return(0,t.str)`must have ${m} ${l} when property ${u} is present`},params:({params:{property:u,depsCount:c,deps:l,missingProperty:m}})=>(0,t._)`{property: ${u},
503
504
  missingProperty: ${m},
504
505
  depsCount: ${c},
505
- deps: ${l}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[c,l]=o(u);a(u,c),s(u,l)}};function o({schema:u}){const c={},l={};for(const m in u){if(m==="__proto__")continue;const y=Array.isArray(u[m])?c:l;y[m]=u[m]}return[c,l]}function a(u,c=u.schema){const{gen:l,data:m,it:y}=u;if(Object.keys(c).length===0)return;const _=l.let("missing");for(const S in c){const g=c[S];if(g.length===0)continue;const p=(0,n.propertyInData)(l,m,S,y.opts.ownProperties);
506
- u.setParams({property:S,depsCount:g.length,deps:g.join(", ")}),y.allErrors?l.if(p,()=>{for(const h of g)(0,n.checkReportMissingProp)(u,h)}):(l.if((0,t._)`${p} && (${(0,n.checkMissingProp)(u,g,_)})`),(0,n.reportMissingProp)(u,_),l.else())}}e.validatePropertyDeps=a;function s(u,c=u.schema){const{gen:l,data:m,keyword:y,it:_}=u,S=l.name("valid");for(const g in c)(0,r.alwaysValidSchema)(_,c[g])||(l.if((0,n.propertyInData)(l,m,g,_.opts.ownProperties),()=>{const p=u.subschema({keyword:y,schemaProp:g},S);
507
- u.mergeValidEvaluated(p,S)},()=>l.var(S,!0)),u.ok(S))}e.validateSchemaDeps=s,e.default=i})(ws)),ws}var Tr={},ac;function Ch(){if(ac)return Tr;ac=1,Object.defineProperty(Tr,"__esModule",{value:!0});const e=ae(),t=fe(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:o,schema:a,data:s,it:u}=i;if((0,t.alwaysValidSchema)(u,a))return;const c=o.name("v\
508
- alid");o.forIn("key",s,l=>{i.setParams({propertyName:l}),i.subschema({keyword:"propertyNames",data:l,dataTypes:["string"],propertyName:l,compositeRule:!0},c),o.if((0,e.not)(c),()=>{i.error(!0),u.allErrors||o.break()})}),i.ok(c)}};return Tr.default=n,Tr}var Nr={},ic;function cc(){if(ic)return Nr;ic=1,Object.defineProperty(Nr,"__esModule",{value:!0});const e=Ie(),t=ae(),r=Ne(),n=fe(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,
509
- error:{message:"must NOT have additional properties",params:({params:a})=>(0,t._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:s,schema:u,parentSchema:c,data:l,errsCount:m,it:y}=a;if(!m)throw new Error("ajv implementation error");const{allErrors:_,opts:S}=y;if(y.props=!0,S.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(y,u))return;const g=(0,e.allSchemaProperties)(c.properties),p=(0,e.allSchemaProperties)(c.patternProperties);h(),a.ok((0,t._)`${m} === ${r.default.errors}`);
510
- function h(){s.forIn("key",l,w=>{!g.length&&!p.length?v(w):s.if(f(w),()=>v(w))})}function f(w){let E;if(g.length>8){const P=(0,n.schemaRefOrVal)(y,c.properties,"properties");E=(0,e.isOwnProperty)(s,P,w)}else g.length?E=(0,t.or)(...g.map(P=>(0,t._)`${w} === ${P}`)):E=t.nil;return p.length&&(E=(0,t.or)(E,...p.map(P=>(0,t._)`${(0,e.usePattern)(a,P)}.test(${w})`))),(0,t.not)(E)}function d(w){s.code((0,t._)`delete ${l}[${w}]`)}function v(w){if(S.removeAdditional==="all"||S.removeAdditional&&u===!1){d(
511
- w);return}if(u===!1){a.setParams({additionalProperty:w}),a.error(),_||s.break();return}if(typeof u=="object"&&!(0,n.alwaysValidSchema)(y,u)){const E=s.name("valid");S.removeAdditional==="failing"?($(w,E,!1),s.if((0,t.not)(E),()=>{a.reset(),d(w)})):($(w,E),_||s.if((0,t.not)(E),()=>s.break()))}}function $(w,E,P){const O={keyword:"additionalProperties",dataProp:w,dataPropType:n.Type.Str};P===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(O,E)}}};return Nr.default=o,
512
- Nr}var Or={},uc;function kh(){if(uc)return Or;uc=1,Object.defineProperty(Or,"__esModule",{value:!0});const e=Nt(),t=Ie(),r=fe(),n=cc(),i={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:a,schema:s,parentSchema:u,data:c,it:l}=o;l.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(l,n.default,"additionalProperties"));const m=(0,t.allSchemaProperties)(s);for(const p of m)l.definedProperties.add(p);l.opts.unevaluated&&m.length&&l.
513
- props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(m),l.props));const y=m.filter(p=>!(0,r.alwaysValidSchema)(l,s[p]));if(y.length===0)return;const _=a.name("valid");for(const p of y)S(p)?g(p):(a.if((0,t.propertyInData)(a,c,p,l.opts.ownProperties)),g(p),l.allErrors||a.else().var(_,!0),a.endIf()),o.it.definedProperties.add(p),o.ok(_);function S(p){return l.opts.useDefaults&&!l.compositeRule&&s[p].default!==void 0}function g(p){o.subschema({keyword:"properties",schemaProp:p,dataProp:p},_)}}};
514
- return Or.default=i,Or}var Ir={},lc;function Th(){if(lc)return Ir;lc=1,Object.defineProperty(Ir,"__esModule",{value:!0});const e=Ie(),t=ae(),r=fe(),n=fe(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:a,schema:s,data:u,parentSchema:c,it:l}=o,{opts:m}=l,y=(0,e.allSchemaProperties)(s),_=y.filter(v=>(0,r.alwaysValidSchema)(l,s[v]));if(y.length===0||_.length===y.length&&(!l.opts.unevaluated||l.props===!0))return;const S=m.strictSchema&&!m.allowMatchingProperties&&
515
- c.properties,g=a.name("valid");l.props!==!0&&!(l.props instanceof t.Name)&&(l.props=(0,n.evaluatedPropsToName)(a,l.props));const{props:p}=l;h();function h(){for(const v of y)S&&f(v),l.allErrors?d(v):(a.var(g,!0),d(v),a.if(g))}function f(v){for(const $ in S)new RegExp(v).test($)&&(0,r.checkStrictMode)(l,`property ${$} matches pattern ${v} (use allowMatchingProperties)`)}function d(v){a.forIn("key",u,$=>{a.if((0,t._)`${(0,e.usePattern)(o,v)}.test(${$})`,()=>{const w=_.includes(v);w||o.subschema({keyword:"\
516
- patternProperties",schemaProp:v,dataProp:$,dataPropType:n.Type.Str},g),l.opts.unevaluated&&p!==!0?a.assign((0,t._)`${p}[${$}]`,!0):!w&&!l.allErrors&&a.if((0,t.not)(g),()=>a.break())})})}}};return Ir.default=i,Ir}var jr={},fc;function Nh(){if(fc)return jr;fc=1,Object.defineProperty(jr,"__esModule",{value:!0});const e=fe(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:o}=r;if((0,e.alwaysValidSchema)(o,i)){r.fail();return}const a=n.name("valid");r.subschema(
517
- {keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return jr.default=t,jr}var Lr={},dc;function Oh(){if(dc)return Lr;dc=1,Object.defineProperty(Lr,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ie().validateUnion,error:{message:"must match a schema in anyOf"}};return Lr.default=t,Lr}var Dr={},pc;function Ih(){if(pc)return Dr;pc=1,Object.defineProperty(Dr,"__es\
518
- Module",{value:!0});const e=ae(),t=fe(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:o,schema:a,parentSchema:s,it:u}=i;if(!Array.isArray(a))throw new Error("ajv implementation error");if(u.opts.discriminator&&s.discriminator)return;const c=a,l=o.let("valid",!1),m=o.let("passing",null),y=o.name("_valid");i.setParams({passing:m}),o.block(_),i.result(l,()=>i.
519
- reset(),()=>i.error(!0));function _(){c.forEach((S,g)=>{let p;(0,t.alwaysValidSchema)(u,S)?o.var(y,!0):p=i.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},y),g>0&&o.if((0,e._)`${y} && ${l}`).assign(l,!1).assign(m,(0,e._)`[${m}, ${g}]`).else(),o.if(y,()=>{o.assign(l,!0),o.assign(m,g),p&&i.mergeEvaluated(p,e.Name)})})}}};return Dr.default=n,Dr}var qr={},hc;function jh(){if(hc)return qr;hc=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=fe(),t={keyword:"allOf",schemaType:"arra\
520
- y",code(r){const{gen:n,schema:i,it:o}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const a=n.name("valid");i.forEach((s,u)=>{if((0,e.alwaysValidSchema)(o,s))return;const c=r.subschema({keyword:"allOf",schemaProp:u},a);r.ok(a),r.mergeEvaluated(c)})}};return qr.default=t,qr}var xr={},mc;function Lh(){if(mc)return xr;mc=1,Object.defineProperty(xr,"__esModule",{value:!0});const e=ae(),t=fe(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,e.
521
- str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,e._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:a,parentSchema:s,it:u}=o;s.then===void 0&&s.else===void 0&&(0,t.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const c=i(u,"then"),l=i(u,"else");if(!c&&!l)return;const m=a.let("valid",!0),y=a.name("_valid");if(_(),o.reset(),c&&l){const g=a.let("ifClause");o.setParams({ifClause:g}),a.if(y,S("then",g),S("else",g))}else c?a.if(y,S("then")):a.if((0,e.not)(y),S("el\
522
- se"));o.pass(m,()=>o.error(!0));function _(){const g=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},y);o.mergeEvaluated(g)}function S(g,p){return()=>{const h=o.subschema({keyword:g},y);a.assign(m,y),o.mergeValidEvaluated(h,m),p?a.assign(p,(0,e._)`${g}`):o.setParams({ifClause:g})}}}};function i(o,a){const s=o.schema[a];return s!==void 0&&!(0,t.alwaysValidSchema)(o,s)}return xr.default=n,xr}var Mr={},yc;function Dh(){if(yc)return Mr;yc=1,Object.defineProperty(Mr,"__esModu\
523
- le",{value:!0});const e=fe(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,e.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return Mr.default=t,Mr}var gc;function vc(){if(gc)return Ar;gc=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=Zi(),t=Rh(),r=tc(),n=Ah(),i=Ph(),o=bs(),a=Ch(),s=cc(),u=kh(),c=Th(),l=Nh(),m=Oh(),y=Ih(),_=jh(),S=Lh(),g=Dh();function p(h=!1){const f=[l.default,m.default,y.default,_.default,
524
- S.default,g.default,a.default,s.default,o.default,u.default,c.default];return h?f.push(t.default,n.default):f.push(e.default,r.default),f.push(i.default),f}return Ar.default=p,Ar}var Hr={},yt={},$c;function _c(){if($c)return yt;$c=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.dynamicAnchor=void 0;const e=ae(),t=Ne(),r=cr(),n=$s(),i={keyword:"$dynamicAnchor",schemaType:"string",code:s=>o(s,s.schema)};function o(s,u){const{gen:c,it:l}=s;l.schemaEnv.root.dynamicAnchors[u]=!0;const m=(0,e._)`${t.
525
- default.dynamicAnchors}${(0,e.getProperty)(u)}`,y=l.errSchemaPath==="#"?l.validateName:a(s);c.if((0,e._)`!${m}`,()=>c.assign(m,y))}yt.dynamicAnchor=o;function a(s){const{schemaEnv:u,schema:c,self:l}=s.it,{root:m,baseId:y,localRefs:_,meta:S}=u.root,{schemaId:g}=l.opts,p=new r.SchemaEnv({schema:c,schemaId:g,root:m,baseId:y,localRefs:_,meta:S});return r.compileSchema.call(l,p),(0,n.getValidate)(s,p)}return yt.default=i,yt}var gt={},wc;function bc(){if(wc)return gt;wc=1,Object.defineProperty(gt,"__e\
526
- sModule",{value:!0}),gt.dynamicRef=void 0;const e=ae(),t=Ne(),r=$s(),n={keyword:"$dynamicRef",schemaType:"string",code:o=>i(o,o.schema)};function i(o,a){const{gen:s,keyword:u,it:c}=o;if(a[0]!=="#")throw new Error(`"${u}" only supports hash fragment reference`);const l=a.slice(1);if(c.allErrors)m();else{const _=s.let("valid",!1);m(_),o.ok(_)}function m(_){if(c.schemaEnv.root.dynamicAnchors[l]){const S=s.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(l)}`);s.if(S,y(S,_),y(c.validateName,
527
- _))}else y(c.validateName,_)()}function y(_,S){return S?()=>s.block(()=>{(0,r.callRef)(o,_),s.let(S,!0)}):()=>(0,r.callRef)(o,_)}}return gt.dynamicRef=i,gt.default=n,gt}var Ur={},Ec;function qh(){if(Ec)return Ur;Ec=1,Object.defineProperty(Ur,"__esModule",{value:!0});const e=_c(),t=fe(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,e.dynamicAnchor)(n,""):(0,t.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return Ur.default=r,Ur}var Fr={},Sc;function xh(){if(Sc)
506
+ deps: ${l}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[c,l]=a(u);o(u,c),s(u,l)}};function a({schema:u}){const c={},l={};for(const m in u){if(m==="__proto__")continue;const y=Array.isArray(u[m])?c:l;y[m]=u[m]}return[c,l]}function o(u,c=u.schema){const{gen:l,data:m,it:y}=u;if(Object.keys(c).length===0)return;const _=l.let("missing");for(const S in c){const g=c[S];if(g.length===0)continue;const h=(0,n.propertyInData)(l,m,S,y.opts.ownProperties);
507
+ u.setParams({property:S,depsCount:g.length,deps:g.join(", ")}),y.allErrors?l.if(h,()=>{for(const p of g)(0,n.checkReportMissingProp)(u,p)}):(l.if((0,t._)`${h} && (${(0,n.checkMissingProp)(u,g,_)})`),(0,n.reportMissingProp)(u,_),l.else())}}e.validatePropertyDeps=o;function s(u,c=u.schema){const{gen:l,data:m,keyword:y,it:_}=u,S=l.name("valid");for(const g in c)(0,r.alwaysValidSchema)(_,c[g])||(l.if((0,n.propertyInData)(l,m,g,_.opts.ownProperties),()=>{const h=u.subschema({keyword:y,schemaProp:g},S);
508
+ u.mergeValidEvaluated(h,S)},()=>l.var(S,!0)),u.ok(S))}e.validateSchemaDeps=s,e.default=i})(ws)),ws}var Tr={},ac;function Ch(){if(ac)return Tr;ac=1,Object.defineProperty(Tr,"__esModule",{value:!0});const e=ae(),t=fe(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:a,schema:o,data:s,it:u}=i;if((0,t.alwaysValidSchema)(u,o))return;const c=a.name("v\
509
+ alid");a.forIn("key",s,l=>{i.setParams({propertyName:l}),i.subschema({keyword:"propertyNames",data:l,dataTypes:["string"],propertyName:l,compositeRule:!0},c),a.if((0,e.not)(c),()=>{i.error(!0),u.allErrors||a.break()})}),i.ok(c)}};return Tr.default=n,Tr}var Or={},ic;function cc(){if(ic)return Or;ic=1,Object.defineProperty(Or,"__esModule",{value:!0});const e=Ie(),t=ae(),r=Oe(),n=fe(),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,
510
+ error:{message:"must NOT have additional properties",params:({params:o})=>(0,t._)`{additionalProperty: ${o.additionalProperty}}`},code(o){const{gen:s,schema:u,parentSchema:c,data:l,errsCount:m,it:y}=o;if(!m)throw new Error("ajv implementation error");const{allErrors:_,opts:S}=y;if(y.props=!0,S.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(y,u))return;const g=(0,e.allSchemaProperties)(c.properties),h=(0,e.allSchemaProperties)(c.patternProperties);p(),o.ok((0,t._)`${m} === ${r.default.errors}`);
511
+ function p(){s.forIn("key",l,w=>{!g.length&&!h.length?v(w):s.if(f(w),()=>v(w))})}function f(w){let b;if(g.length>8){const P=(0,n.schemaRefOrVal)(y,c.properties,"properties");b=(0,e.isOwnProperty)(s,P,w)}else g.length?b=(0,t.or)(...g.map(P=>(0,t._)`${w} === ${P}`)):b=t.nil;return h.length&&(b=(0,t.or)(b,...h.map(P=>(0,t._)`${(0,e.usePattern)(o,P)}.test(${w})`))),(0,t.not)(b)}function d(w){s.code((0,t._)`delete ${l}[${w}]`)}function v(w){if(S.removeAdditional==="all"||S.removeAdditional&&u===!1){d(
512
+ w);return}if(u===!1){o.setParams({additionalProperty:w}),o.error(),_||s.break();return}if(typeof u=="object"&&!(0,n.alwaysValidSchema)(y,u)){const b=s.name("valid");S.removeAdditional==="failing"?($(w,b,!1),s.if((0,t.not)(b),()=>{o.reset(),d(w)})):($(w,b),_||s.if((0,t.not)(b),()=>s.break()))}}function $(w,b,P){const I={keyword:"additionalProperties",dataProp:w,dataPropType:n.Type.Str};P===!1&&Object.assign(I,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(I,b)}}};return Or.default=a,
513
+ Or}var Nr={},uc;function kh(){if(uc)return Nr;uc=1,Object.defineProperty(Nr,"__esModule",{value:!0});const e=Nt(),t=Ie(),r=fe(),n=cc(),i={keyword:"properties",type:"object",schemaType:"object",code(a){const{gen:o,schema:s,parentSchema:u,data:c,it:l}=a;l.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(l,n.default,"additionalProperties"));const m=(0,t.allSchemaProperties)(s);for(const h of m)l.definedProperties.add(h);l.opts.unevaluated&&m.length&&l.
514
+ props!==!0&&(l.props=r.mergeEvaluated.props(o,(0,r.toHash)(m),l.props));const y=m.filter(h=>!(0,r.alwaysValidSchema)(l,s[h]));if(y.length===0)return;const _=o.name("valid");for(const h of y)S(h)?g(h):(o.if((0,t.propertyInData)(o,c,h,l.opts.ownProperties)),g(h),l.allErrors||o.else().var(_,!0),o.endIf()),a.it.definedProperties.add(h),a.ok(_);function S(h){return l.opts.useDefaults&&!l.compositeRule&&s[h].default!==void 0}function g(h){a.subschema({keyword:"properties",schemaProp:h,dataProp:h},_)}}};
515
+ return Nr.default=i,Nr}var Ir={},lc;function Th(){if(lc)return Ir;lc=1,Object.defineProperty(Ir,"__esModule",{value:!0});const e=Ie(),t=ae(),r=fe(),n=fe(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(a){const{gen:o,schema:s,data:u,parentSchema:c,it:l}=a,{opts:m}=l,y=(0,e.allSchemaProperties)(s),_=y.filter(v=>(0,r.alwaysValidSchema)(l,s[v]));if(y.length===0||_.length===y.length&&(!l.opts.unevaluated||l.props===!0))return;const S=m.strictSchema&&!m.allowMatchingProperties&&
516
+ c.properties,g=o.name("valid");l.props!==!0&&!(l.props instanceof t.Name)&&(l.props=(0,n.evaluatedPropsToName)(o,l.props));const{props:h}=l;p();function p(){for(const v of y)S&&f(v),l.allErrors?d(v):(o.var(g,!0),d(v),o.if(g))}function f(v){for(const $ in S)new RegExp(v).test($)&&(0,r.checkStrictMode)(l,`property ${$} matches pattern ${v} (use allowMatchingProperties)`)}function d(v){o.forIn("key",u,$=>{o.if((0,t._)`${(0,e.usePattern)(a,v)}.test(${$})`,()=>{const w=_.includes(v);w||a.subschema({keyword:"\
517
+ patternProperties",schemaProp:v,dataProp:$,dataPropType:n.Type.Str},g),l.opts.unevaluated&&h!==!0?o.assign((0,t._)`${h}[${$}]`,!0):!w&&!l.allErrors&&o.if((0,t.not)(g),()=>o.break())})})}}};return Ir.default=i,Ir}var jr={},fc;function Oh(){if(fc)return jr;fc=1,Object.defineProperty(jr,"__esModule",{value:!0});const e=fe(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:a}=r;if((0,e.alwaysValidSchema)(a,i)){r.fail();return}const o=n.name("valid");r.subschema(
518
+ {keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),r.failResult(o,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return jr.default=t,jr}var Lr={},dc;function Nh(){if(dc)return Lr;dc=1,Object.defineProperty(Lr,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ie().validateUnion,error:{message:"must match a schema in anyOf"}};return Lr.default=t,Lr}var Dr={},pc;function Ih(){if(pc)return Dr;pc=1,Object.defineProperty(Dr,"__es\
519
+ Module",{value:!0});const e=ae(),t=fe(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:a,schema:o,parentSchema:s,it:u}=i;if(!Array.isArray(o))throw new Error("ajv implementation error");if(u.opts.discriminator&&s.discriminator)return;const c=o,l=a.let("valid",!1),m=a.let("passing",null),y=a.name("_valid");i.setParams({passing:m}),a.block(_),i.result(l,()=>i.
520
+ reset(),()=>i.error(!0));function _(){c.forEach((S,g)=>{let h;(0,t.alwaysValidSchema)(u,S)?a.var(y,!0):h=i.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},y),g>0&&a.if((0,e._)`${y} && ${l}`).assign(l,!1).assign(m,(0,e._)`[${m}, ${g}]`).else(),a.if(y,()=>{a.assign(l,!0),a.assign(m,g),h&&i.mergeEvaluated(h,e.Name)})})}}};return Dr.default=n,Dr}var qr={},hc;function jh(){if(hc)return qr;hc=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=fe(),t={keyword:"allOf",schemaType:"arra\
521
+ y",code(r){const{gen:n,schema:i,it:a}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const o=n.name("valid");i.forEach((s,u)=>{if((0,e.alwaysValidSchema)(a,s))return;const c=r.subschema({keyword:"allOf",schemaProp:u},o);r.ok(o),r.mergeEvaluated(c)})}};return qr.default=t,qr}var xr={},mc;function Lh(){if(mc)return xr;mc=1,Object.defineProperty(xr,"__esModule",{value:!0});const e=ae(),t=fe(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:a})=>(0,e.
522
+ str)`must match "${a.ifClause}" schema`,params:({params:a})=>(0,e._)`{failingKeyword: ${a.ifClause}}`},code(a){const{gen:o,parentSchema:s,it:u}=a;s.then===void 0&&s.else===void 0&&(0,t.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const c=i(u,"then"),l=i(u,"else");if(!c&&!l)return;const m=o.let("valid",!0),y=o.name("_valid");if(_(),a.reset(),c&&l){const g=o.let("ifClause");a.setParams({ifClause:g}),o.if(y,S("then",g),S("else",g))}else c?o.if(y,S("then")):o.if((0,e.not)(y),S("el\
523
+ se"));a.pass(m,()=>a.error(!0));function _(){const g=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},y);a.mergeEvaluated(g)}function S(g,h){return()=>{const p=a.subschema({keyword:g},y);o.assign(m,y),a.mergeValidEvaluated(p,m),h?o.assign(h,(0,e._)`${g}`):a.setParams({ifClause:g})}}}};function i(a,o){const s=a.schema[o];return s!==void 0&&!(0,t.alwaysValidSchema)(a,s)}return xr.default=n,xr}var Mr={},yc;function Dh(){if(yc)return Mr;yc=1,Object.defineProperty(Mr,"__esModu\
524
+ le",{value:!0});const e=fe(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,e.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return Mr.default=t,Mr}var gc;function vc(){if(gc)return Ar;gc=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=Zi(),t=Rh(),r=tc(),n=Ah(),i=Ph(),a=bs(),o=Ch(),s=cc(),u=kh(),c=Th(),l=Oh(),m=Nh(),y=Ih(),_=jh(),S=Lh(),g=Dh();function h(p=!1){const f=[l.default,m.default,y.default,_.default,
525
+ S.default,g.default,o.default,s.default,a.default,u.default,c.default];return p?f.push(t.default,n.default):f.push(e.default,r.default),f.push(i.default),f}return Ar.default=h,Ar}var Hr={},yt={},$c;function _c(){if($c)return yt;$c=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.dynamicAnchor=void 0;const e=ae(),t=Oe(),r=cr(),n=$s(),i={keyword:"$dynamicAnchor",schemaType:"string",code:s=>a(s,s.schema)};function a(s,u){const{gen:c,it:l}=s;l.schemaEnv.root.dynamicAnchors[u]=!0;const m=(0,e._)`${t.
526
+ default.dynamicAnchors}${(0,e.getProperty)(u)}`,y=l.errSchemaPath==="#"?l.validateName:o(s);c.if((0,e._)`!${m}`,()=>c.assign(m,y))}yt.dynamicAnchor=a;function o(s){const{schemaEnv:u,schema:c,self:l}=s.it,{root:m,baseId:y,localRefs:_,meta:S}=u.root,{schemaId:g}=l.opts,h=new r.SchemaEnv({schema:c,schemaId:g,root:m,baseId:y,localRefs:_,meta:S});return r.compileSchema.call(l,h),(0,n.getValidate)(s,h)}return yt.default=i,yt}var gt={},wc;function bc(){if(wc)return gt;wc=1,Object.defineProperty(gt,"__e\
527
+ sModule",{value:!0}),gt.dynamicRef=void 0;const e=ae(),t=Oe(),r=$s(),n={keyword:"$dynamicRef",schemaType:"string",code:a=>i(a,a.schema)};function i(a,o){const{gen:s,keyword:u,it:c}=a;if(o[0]!=="#")throw new Error(`"${u}" only supports hash fragment reference`);const l=o.slice(1);if(c.allErrors)m();else{const _=s.let("valid",!1);m(_),a.ok(_)}function m(_){if(c.schemaEnv.root.dynamicAnchors[l]){const S=s.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(l)}`);s.if(S,y(S,_),y(c.validateName,
528
+ _))}else y(c.validateName,_)()}function y(_,S){return S?()=>s.block(()=>{(0,r.callRef)(a,_),s.let(S,!0)}):()=>(0,r.callRef)(a,_)}}return gt.dynamicRef=i,gt.default=n,gt}var Ur={},Ec;function qh(){if(Ec)return Ur;Ec=1,Object.defineProperty(Ur,"__esModule",{value:!0});const e=_c(),t=fe(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,e.dynamicAnchor)(n,""):(0,t.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return Ur.default=r,Ur}var Fr={},Sc;function xh(){if(Sc)
528
529
  return Fr;Sc=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=bc(),t={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,e.dynamicRef)(r,r.schema)};return Fr.default=t,Fr}var Rc;function Mh(){if(Rc)return Hr;Rc=1,Object.defineProperty(Hr,"__esModule",{value:!0});const e=_c(),t=bc(),r=qh(),n=xh(),i=[e.default,t.default,r.default,n.default];return Hr.default=i,Hr}var Vr={},zr={},Ac;function Hh(){if(Ac)return zr;Ac=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=bs(),t={keyword:"\
529
530
  dependentRequired",type:"object",schemaType:"object",error:e.error,code:r=>(0,e.validatePropertyDeps)(r)};return zr.default=t,zr}var Gr={},Pc;function Uh(){if(Pc)return Gr;Pc=1,Object.defineProperty(Gr,"__esModule",{value:!0});const e=bs(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,e.validateSchemaDeps)(r)};return Gr.default=t,Gr}var Br={},Cc;function Fh(){if(Cc)return Br;Cc=1,Object.defineProperty(Br,"__esModule",{value:!0});const e=fe(),t={keyword:["maxContains",
530
- "minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:n,it:i}){n.contains===void 0&&(0,e.checkStrictMode)(i,`"${r}" without "contains" is ignored`)}};return Br.default=t,Br}var kc;function Vh(){if(kc)return Vr;kc=1,Object.defineProperty(Vr,"__esModule",{value:!0});const e=Hh(),t=Uh(),r=Fh(),n=[e.default,t.default,r.default];return Vr.default=n,Vr}var Kr={},Wr={},Tc;function zh(){if(Tc)return Wr;Tc=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=ae(),t=fe(),r=Ne(),
531
- i={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:o})=>(0,e._)`{unevaluatedProperty: ${o.unevaluatedProperty}}`},code(o){const{gen:a,schema:s,data:u,errsCount:c,it:l}=o;if(!c)throw new Error("ajv implementation error");const{allErrors:m,props:y}=l;y instanceof e.Name?a.if((0,e._)`${y} !== true`,()=>a.forIn("key",u,p=>a.if(S(y,p),()=>_(p)))):y!==!0&&a.forIn("key",u,p=>y===void 0?_(p):
532
- a.if(g(y,p),()=>_(p))),l.props=!0,o.ok((0,e._)`${c} === ${r.default.errors}`);function _(p){if(s===!1){o.setParams({unevaluatedProperty:p}),o.error(),m||a.break();return}if(!(0,t.alwaysValidSchema)(l,s)){const h=a.name("valid");o.subschema({keyword:"unevaluatedProperties",dataProp:p,dataPropType:t.Type.Str},h),m||a.if((0,e.not)(h),()=>a.break())}}function S(p,h){return(0,e._)`!${p} || !${p}[${h}]`}function g(p,h){const f=[];for(const d in p)p[d]===!0&&f.push((0,e._)`${h} !== ${d}`);return(0,e.and)(
533
- ...f)}}};return Wr.default=i,Wr}var Xr={},Nc;function Gh(){if(Nc)return Xr;Nc=1,Object.defineProperty(Xr,"__esModule",{value:!0});const e=ae(),t=fe(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{gen:o,schema:a,data:s,it:u}=i,c=u.items||0;if(c===!0)return;const l=o.const("len",(0,e._)`${s}.length`);if(a===!1)i.setParams({len:c}),
534
- i.fail((0,e._)`${l} > ${c}`);else if(typeof a=="object"&&!(0,t.alwaysValidSchema)(u,a)){const y=o.var("valid",(0,e._)`${l} <= ${c}`);o.if((0,e.not)(y),()=>m(y,c)),i.ok(y)}u.items=!0;function m(y,_){o.forRange("i",_,l,S=>{i.subschema({keyword:"unevaluatedItems",dataProp:S,dataPropType:t.Type.Num},y),u.allErrors||o.if((0,e.not)(y),()=>o.break())})}}};return Xr.default=n,Xr}var Oc;function Bh(){if(Oc)return Kr;Oc=1,Object.defineProperty(Kr,"__esModule",{value:!0});const e=zh(),t=Gh(),r=[e.default,t.
535
- default];return Kr.default=r,Kr}var Jr={},Yr={},Ic;function Kh(){if(Ic)return Yr;Ic=1,Object.defineProperty(Yr,"__esModule",{value:!0});const e=ae(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,i){const{gen:o,data:a,$data:s,schema:u,schemaCode:c,it:l}=n,{opts:m,errSchemaPath:y,schemaEnv:_,self:S}=l;if(!m.validateFormats)return;s?g():p();function g(){
536
- const h=o.scopeValue("formats",{ref:S.formats,code:m.code.formats}),f=o.const("fDef",(0,e._)`${h}[${c}]`),d=o.let("fType"),v=o.let("format");o.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>o.assign(d,(0,e._)`${f}.type || "string"`).assign(v,(0,e._)`${f}.validate`),()=>o.assign(d,(0,e._)`"string"`).assign(v,f)),n.fail$data((0,e.or)($(),w()));function $(){return m.strictSchema===!1?e.nil:(0,e._)`${c} && !${v}`}function w(){const E=_.$async?(0,e._)`(${f}.async ? await ${v}(${a}) : ${v}(${a}))`:
537
- (0,e._)`${v}(${a})`,P=(0,e._)`(typeof ${v} == "function" ? ${E} : ${v}.test(${a}))`;return(0,e._)`${v} && ${v} !== true && ${d} === ${i} && !${P}`}}function p(){const h=S.formats[u];if(!h){$();return}if(h===!0)return;const[f,d,v]=w(h);f===i&&n.pass(E());function $(){if(m.strictSchema===!1){S.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${u}" ignored in schema at path "${y}"`}}function w(P){const O=P instanceof RegExp?(0,e.regexpCode)(P):m.code.formats?(0,e._)`${m.
538
- code.formats}${(0,e.getProperty)(u)}`:void 0,U=o.scopeValue("formats",{key:u,ref:P,code:O});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,e._)`${U}.validate`]:["string",P,U]}function E(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${v}(${a})`}return typeof d=="function"?(0,e._)`${v}(${a})`:(0,e._)`${v}.test(${a})`}}}};return Yr.default=r,Yr}var jc;function Lc(){if(jc)return Jr;
531
+ "minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:n,it:i}){n.contains===void 0&&(0,e.checkStrictMode)(i,`"${r}" without "contains" is ignored`)}};return Br.default=t,Br}var kc;function Vh(){if(kc)return Vr;kc=1,Object.defineProperty(Vr,"__esModule",{value:!0});const e=Hh(),t=Uh(),r=Fh(),n=[e.default,t.default,r.default];return Vr.default=n,Vr}var Kr={},Wr={},Tc;function zh(){if(Tc)return Wr;Tc=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=ae(),t=fe(),r=Oe(),
532
+ i={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:a})=>(0,e._)`{unevaluatedProperty: ${a.unevaluatedProperty}}`},code(a){const{gen:o,schema:s,data:u,errsCount:c,it:l}=a;if(!c)throw new Error("ajv implementation error");const{allErrors:m,props:y}=l;y instanceof e.Name?o.if((0,e._)`${y} !== true`,()=>o.forIn("key",u,h=>o.if(S(y,h),()=>_(h)))):y!==!0&&o.forIn("key",u,h=>y===void 0?_(h):
533
+ o.if(g(y,h),()=>_(h))),l.props=!0,a.ok((0,e._)`${c} === ${r.default.errors}`);function _(h){if(s===!1){a.setParams({unevaluatedProperty:h}),a.error(),m||o.break();return}if(!(0,t.alwaysValidSchema)(l,s)){const p=o.name("valid");a.subschema({keyword:"unevaluatedProperties",dataProp:h,dataPropType:t.Type.Str},p),m||o.if((0,e.not)(p),()=>o.break())}}function S(h,p){return(0,e._)`!${h} || !${h}[${p}]`}function g(h,p){const f=[];for(const d in h)h[d]===!0&&f.push((0,e._)`${p} !== ${d}`);return(0,e.and)(
534
+ ...f)}}};return Wr.default=i,Wr}var Xr={},Oc;function Gh(){if(Oc)return Xr;Oc=1,Object.defineProperty(Xr,"__esModule",{value:!0});const e=ae(),t=fe(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{gen:a,schema:o,data:s,it:u}=i,c=u.items||0;if(c===!0)return;const l=a.const("len",(0,e._)`${s}.length`);if(o===!1)i.setParams({len:c}),
535
+ i.fail((0,e._)`${l} > ${c}`);else if(typeof o=="object"&&!(0,t.alwaysValidSchema)(u,o)){const y=a.var("valid",(0,e._)`${l} <= ${c}`);a.if((0,e.not)(y),()=>m(y,c)),i.ok(y)}u.items=!0;function m(y,_){a.forRange("i",_,l,S=>{i.subschema({keyword:"unevaluatedItems",dataProp:S,dataPropType:t.Type.Num},y),u.allErrors||a.if((0,e.not)(y),()=>a.break())})}}};return Xr.default=n,Xr}var Nc;function Bh(){if(Nc)return Kr;Nc=1,Object.defineProperty(Kr,"__esModule",{value:!0});const e=zh(),t=Gh(),r=[e.default,t.
536
+ default];return Kr.default=r,Kr}var Jr={},Yr={},Ic;function Kh(){if(Ic)return Yr;Ic=1,Object.defineProperty(Yr,"__esModule",{value:!0});const e=ae(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,i){const{gen:a,data:o,$data:s,schema:u,schemaCode:c,it:l}=n,{opts:m,errSchemaPath:y,schemaEnv:_,self:S}=l;if(!m.validateFormats)return;s?g():h();function g(){
537
+ const p=a.scopeValue("formats",{ref:S.formats,code:m.code.formats}),f=a.const("fDef",(0,e._)`${p}[${c}]`),d=a.let("fType"),v=a.let("format");a.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>a.assign(d,(0,e._)`${f}.type || "string"`).assign(v,(0,e._)`${f}.validate`),()=>a.assign(d,(0,e._)`"string"`).assign(v,f)),n.fail$data((0,e.or)($(),w()));function $(){return m.strictSchema===!1?e.nil:(0,e._)`${c} && !${v}`}function w(){const b=_.$async?(0,e._)`(${f}.async ? await ${v}(${o}) : ${v}(${o}))`:
538
+ (0,e._)`${v}(${o})`,P=(0,e._)`(typeof ${v} == "function" ? ${b} : ${v}.test(${o}))`;return(0,e._)`${v} && ${v} !== true && ${d} === ${i} && !${P}`}}function h(){const p=S.formats[u];if(!p){$();return}if(p===!0)return;const[f,d,v]=w(p);f===i&&n.pass(b());function $(){if(m.strictSchema===!1){S.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${u}" ignored in schema at path "${y}"`}}function w(P){const I=P instanceof RegExp?(0,e.regexpCode)(P):m.code.formats?(0,e._)`${m.
539
+ code.formats}${(0,e.getProperty)(u)}`:void 0,H=a.scopeValue("formats",{key:u,ref:P,code:I});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,e._)`${H}.validate`]:["string",P,H]}function b(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${v}(${o})`}return typeof d=="function"?(0,e._)`${v}(${o})`:(0,e._)`${v}.test(${o})`}}}};return Yr.default=r,Yr}var jc;function Lc(){if(jc)return Jr;
539
540
  jc=1,Object.defineProperty(Jr,"__esModule",{value:!0});const t=[Kh().default];return Jr.default=t,Jr}var ot={},Dc;function qc(){return Dc||(Dc=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.contentVocabulary=ot.metadataVocabulary=void 0,ot.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],ot.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),ot}var xc;function Wh(){if(xc)return lr;xc=1,Object.defineProperty(lr,"__es\
540
- Module",{value:!0});const e=qi(),t=Yi(),r=vc(),n=Mh(),i=Vh(),o=Bh(),a=Lc(),s=qc(),u=[n.default,e.default,t.default,(0,r.default)(!0),a.default,s.metadataVocabulary,s.contentVocabulary,i.default,o.default];return lr.default=u,lr}var Qr={},jt={},Mc;function Xh(){if(Mc)return jt;Mc=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(jt.DiscrError=e={})),jt}var Hc;function Uc(){if(Hc)return Qr;Hc=1,Object.defineProperty(
541
- Qr,"__esModule",{value:!0});const e=ae(),t=Xh(),r=cr(),n=Ot(),i=fe(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:s,tagName:u}})=>s===t.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:s,tag:u,tagName:c}})=>(0,e._)`{error: ${s}, tag: ${c}, tagValue: ${u}}`},code(s){const{gen:u,data:c,schema:l,parentSchema:m,it:y}=s,{oneOf:_}=m;if(!y.opts.discriminator)throw new Error("discriminator: r\
542
- equires discriminator option");const S=l.propertyName;if(typeof S!="string")throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const g=u.let("valid",!1),p=u.const("tag",(0,e._)`${c}${(0,e.getProperty)(S)}`);u.if((0,e._)`typeof ${p} == "string"`,()=>h(),()=>s.error(!1,{discrError:t.DiscrError.Tag,tag:p,tagName:S})),s.ok(g);function h(){const v=d();u.if(!1);for(const $ in v)
543
- u.elseIf((0,e._)`${p} === ${$}`),u.assign(g,f(v[$]));u.else(),s.error(!1,{discrError:t.DiscrError.Mapping,tag:p,tagName:S}),u.endIf()}function f(v){const $=u.name("valid"),w=s.subschema({keyword:"oneOf",schemaProp:v},$);return s.mergeEvaluated(w,e.Name),$}function d(){var v;const $={},w=P(m);let E=!0;for(let x=0;x<_.length;x++){let H=_[x];if(H?.$ref&&!(0,i.schemaHasRulesButRef)(H,y.self.RULES)){const I=H.$ref;if(H=r.resolveRef.call(y.self,y.schemaEnv.root,y.baseId,I),H instanceof r.SchemaEnv&&(H=
544
- H.schema),H===void 0)throw new n.default(y.opts.uriResolver,y.baseId,I)}const D=(v=H?.properties)===null||v===void 0?void 0:v[S];if(typeof D!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${S}"`);E=E&&(w||P(H)),O(D,x)}if(!E)throw new Error(`discriminator: "${S}" must be required`);return $;function P({required:x}){return Array.isArray(x)&&x.includes(S)}function O(x,H){if(x.const)U(x.const,H);else if(x.enum)for(const D of x.enum)U(D,H);else
545
- throw new Error(`discriminator: "properties/${S}" must have "const" or "enum"`)}function U(x,H){if(typeof x!="string"||x in $)throw new Error(`discriminator: "${S}" values must be unique strings`);$[x]=H}}}};return Qr.default=a,Qr}var Zr={};const Fc="https://json-schema.org/draft/2020-12/schema",Vc="https://json-schema.org/draft/2020-12/schema",zc={"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\
541
+ Module",{value:!0});const e=qi(),t=Yi(),r=vc(),n=Mh(),i=Vh(),a=Bh(),o=Lc(),s=qc(),u=[n.default,e.default,t.default,(0,r.default)(!0),o.default,s.metadataVocabulary,s.contentVocabulary,i.default,a.default];return lr.default=u,lr}var Qr={},Lt={},Mc;function Xh(){if(Mc)return Lt;Mc=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Lt.DiscrError=e={})),Lt}var Hc;function Uc(){if(Hc)return Qr;Hc=1,Object.defineProperty(
542
+ Qr,"__esModule",{value:!0});const e=ae(),t=Xh(),r=cr(),n=It(),i=fe(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:s,tagName:u}})=>s===t.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:s,tag:u,tagName:c}})=>(0,e._)`{error: ${s}, tag: ${c}, tagValue: ${u}}`},code(s){const{gen:u,data:c,schema:l,parentSchema:m,it:y}=s,{oneOf:_}=m;if(!y.opts.discriminator)throw new Error("discriminator: r\
543
+ equires discriminator option");const S=l.propertyName;if(typeof S!="string")throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const g=u.let("valid",!1),h=u.const("tag",(0,e._)`${c}${(0,e.getProperty)(S)}`);u.if((0,e._)`typeof ${h} == "string"`,()=>p(),()=>s.error(!1,{discrError:t.DiscrError.Tag,tag:h,tagName:S})),s.ok(g);function p(){const v=d();u.if(!1);for(const $ in v)
544
+ u.elseIf((0,e._)`${h} === ${$}`),u.assign(g,f(v[$]));u.else(),s.error(!1,{discrError:t.DiscrError.Mapping,tag:h,tagName:S}),u.endIf()}function f(v){const $=u.name("valid"),w=s.subschema({keyword:"oneOf",schemaProp:v},$);return s.mergeEvaluated(w,e.Name),$}function d(){var v;const $={},w=P(m);let b=!0;for(let x=0;x<_.length;x++){let U=_[x];if(U?.$ref&&!(0,i.schemaHasRulesButRef)(U,y.self.RULES)){const j=U.$ref;if(U=r.resolveRef.call(y.self,y.schemaEnv.root,y.baseId,j),U instanceof r.SchemaEnv&&(U=
545
+ U.schema),U===void 0)throw new n.default(y.opts.uriResolver,y.baseId,j)}const L=(v=U?.properties)===null||v===void 0?void 0:v[S];if(typeof L!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${S}"`);b=b&&(w||P(U)),I(L,x)}if(!b)throw new Error(`discriminator: "${S}" must be required`);return $;function P({required:x}){return Array.isArray(x)&&x.includes(S)}function I(x,U){if(x.const)H(x.const,U);else if(x.enum)for(const L of x.enum)H(L,U);else
546
+ throw new Error(`discriminator: "properties/${S}" must have "const" or "enum"`)}function H(x,U){if(typeof x!="string"||x in $)throw new Error(`discriminator: "${S}" values must be unique strings`);$[x]=U}}}};return Qr.default=o,Qr}var Zr={};const Fc="https://json-schema.org/draft/2020-12/schema",Vc="https://json-schema.org/draft/2020-12/schema",zc={"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\
546
547
  -12/vocab/unevaluated":!0,"https://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},Gc="meta",Bc="Core and Validation specifications meta-schema",Kc=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/c\
547
548
  ontent"}],Wc=["object","boolean"],Xc="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",Jc={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 semantic\
548
549
  s.',type:"object",additionalProperties:{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}},Jh={$schema:Fc,$id:Vc,$vocabulary:zc,$dynamicAnchor:Gc,title:Bc,allOf:Kc,type:Wc,$comment:Xc,
@@ -553,183 +554,183 @@ tps://json-schema.org/draft/2020-12/vocab/unevaluated":!0},cu="meta",uu="Unevalu
553
554
  s://json-schema.org/draft/2020-12/meta/content",hu={"https://json-schema.org/draft/2020-12/vocab/content":!0},mu="meta",yu="Content vocabulary meta-schema",gu=["object","boolean"],vu={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},om={$schema:du,$id:pu,$vocabulary:hu,$dynamicAnchor:mu,title:yu,type:gu,properties:vu},am={__proto__:null,$dynamicAnchor:mu,$id:pu,$schema:du,$vocabulary:hu,default:om,properties:vu,title:yu,type:gu},im=De(am),$u="\
554
555
  https://json-schema.org/draft/2020-12/schema",_u="https://json-schema.org/draft/2020-12/meta/core",wu={"https://json-schema.org/draft/2020-12/vocab/core":!0},bu="meta",Eu="Core vocabulary meta-schema",Su=["object","boolean"],Ru={$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:{
555
556
  $ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},Au={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},cm={$schema:$u,$id:_u,$vocabulary:wu,$dynamicAnchor:bu,title:Eu,type:Su,properties:Ru,$defs:Au},um={__proto__:null,
556
- $defs:Au,$dynamicAnchor:bu,$id:_u,$schema:$u,$vocabulary:wu,default:cm,properties:Ru,title:Eu,type:Su},lm=De(um),Pu="https://json-schema.org/draft/2020-12/schema",Cu="https://json-schema.org/draft/2020-12/meta/format-annotation",ku={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},Tu="meta",Nu="Format vocabulary meta-schema for annotation results",Ou=["object","boolean"],Iu={format:{type:"string"}},fm={$schema:Pu,$id:Cu,$vocabulary:ku,$dynamicAnchor:Tu,title:Nu,type:Ou,properties:Iu},
557
- dm={__proto__:null,$dynamicAnchor:Tu,$id:Cu,$schema:Pu,$vocabulary:ku,default:fm,properties:Iu,title:Nu,type:Ou},pm=De(dm),ju="https://json-schema.org/draft/2020-12/schema",Lu="https://json-schema.org/draft/2020-12/meta/meta-data",Du={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},qu="meta",xu="Meta-data vocabulary meta-schema",Mu=["object","boolean"],Hu={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},
557
+ $defs:Au,$dynamicAnchor:bu,$id:_u,$schema:$u,$vocabulary:wu,default:cm,properties:Ru,title:Eu,type:Su},lm=De(um),Pu="https://json-schema.org/draft/2020-12/schema",Cu="https://json-schema.org/draft/2020-12/meta/format-annotation",ku={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},Tu="meta",Ou="Format vocabulary meta-schema for annotation results",Nu=["object","boolean"],Iu={format:{type:"string"}},fm={$schema:Pu,$id:Cu,$vocabulary:ku,$dynamicAnchor:Tu,title:Ou,type:Nu,properties:Iu},
558
+ dm={__proto__:null,$dynamicAnchor:Tu,$id:Cu,$schema:Pu,$vocabulary:ku,default:fm,properties:Iu,title:Ou,type:Nu},pm=De(dm),ju="https://json-schema.org/draft/2020-12/schema",Lu="https://json-schema.org/draft/2020-12/meta/meta-data",Du={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},qu="meta",xu="Meta-data vocabulary meta-schema",Mu=["object","boolean"],Hu={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},
558
559
  writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},hm={$schema:ju,$id:Lu,$vocabulary:Du,$dynamicAnchor:qu,title:xu,type:Mu,properties:Hu},mm={__proto__:null,$dynamicAnchor:qu,$id:Lu,$schema:ju,$vocabulary:Du,default:hm,properties:Hu,title:xu,type:Mu},ym=De(mm),Uu="https://json-schema.org/draft/2020-12/schema",Fu="https://json-schema.org/draft/2020-12/meta/validation",Vu={"https://json-schema.org/draft/2020-12/vocab/validation":!0},zu="meta",Gu="Validation vocabulary meta-sch\
559
560
  ema",Bu=["object","boolean"],Ku={type:{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:{
560
561
  $ref:"#/$defs/nonNegativeInteger"},minItems:{$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"}}},Wu={nonNegativeInteger:{type:"integ\
561
562
  er",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},gm={$schema:Uu,$id:Fu,$vocabulary:Vu,$dynamicAnchor:zu,title:Gu,type:Bu,properties:Ku,$defs:Wu},vm={__proto__:null,$defs:Wu,$dynamicAnchor:zu,$id:Fu,$schema:Uu,$vocabulary:Vu,default:gm,properties:Ku,title:Gu,type:Bu},$m=De(vm);var Xu;function _m(){if(Xu)
562
- return Zr;Xu=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=Qh,t=tm,r=sm,n=im,i=lm,o=pm,a=ym,s=$m,u=["/properties"];function c(l){return[e,t,r,n,i,m(this,o),a,m(this,s)].forEach(y=>this.addMetaSchema(y,void 0,!1)),this;function m(y,_){return l?y.$dataMetaSchema(_,u):_}}return Zr.default=c,Zr}var Ju;function wm(){return Ju||(Ju=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=
563
- t.Ajv2020=void 0;const r=Ii(),n=Wh(),i=Uc(),o=_m(),a="https://json-schema.org/draft/2020-12/schema";class s extends r.default{constructor(_={}){super({..._,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:_,meta:S}=this.opts;S&&(o.default.call(this,_),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){
564
- return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv2020=s,e.exports=t=s,e.exports.Ajv2020=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var u=Nt();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var c=ae();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){
565
- return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var l=ar();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var m=Ot();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(Zt,Zt.exports)),Zt.exports}var bm=wm(),
566
- en={exports:{}},Es={},Yu;function Em(){return Yu||(Yu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(x,H){return{validate:x,compare:H}}e.fullFormats={date:t(o,a),time:t(u(!0),c),"date-time":t(y(!0),_),"iso-time":t(u(),l),"iso-date-time":t(y(),S),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:h,"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,
563
+ return Zr;Xu=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=Qh,t=tm,r=sm,n=im,i=lm,a=pm,o=ym,s=$m,u=["/properties"];function c(l){return[e,t,r,n,i,m(this,a),o,m(this,s)].forEach(y=>this.addMetaSchema(y,void 0,!1)),this;function m(y,_){return l?y.$dataMetaSchema(_,u):_}}return Zr.default=c,Zr}var Ju;function wm(){return Ju||(Ju=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=
564
+ t.Ajv2020=void 0;const r=Ii(),n=Wh(),i=Uc(),a=_m(),o="https://json-schema.org/draft/2020-12/schema";class s extends r.default{constructor(_={}){super({..._,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:_,meta:S}=this.opts;S&&(a.default.call(this,_),this.refs["http://json-schema.org/schema"]=o)}defaultMeta(){
565
+ return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}t.Ajv2020=s,e.exports=t=s,e.exports.Ajv2020=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var u=Nt();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var c=ae();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){
566
+ return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var l=ar();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var m=It();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(Zt,Zt.exports)),Zt.exports}var bm=wm(),
567
+ en={exports:{}},Es={},Yu;function Em(){return Yu||(Yu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(x,U){return{validate:x,compare:U}}e.fullFormats={date:t(a,o),time:t(u(!0),c),"date-time":t(y(!0),_),"iso-time":t(u(),l),"iso-date-time":t(y(),S),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:p,"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,
567
568
  "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,
568
569
  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,
569
- regex:U,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:d,int32:{type:"number",validate:w},int64:{type:"number",validate:E},float:{type:"number",validate:P},double:{type:"number",validate:P},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,
570
- a),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,c),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,_),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"iso-date-time":t(/^\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,S),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
571
- 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},e.formatNames=Object.keys(e.fullFormats);function r(x){return x%4===0&&(x%100!==0||x%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 o(x){const H=n.exec(x);if(!H)return!1;const D=+H[1],I=+H[2],M=+H[3];return I>=1&&I<=12&&M>=1&&M<=(I===2&&r(D)?29:i[I])}function a(x,H){if(x&&H)return x>H?1:x<H?-1:0}const s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
572
- function u(x){return function(D){const I=s.exec(D);if(!I)return!1;const M=+I[1],z=+I[2],F=+I[3],G=I[4],Q=I[5]==="-"?-1:1,q=+(I[6]||0),A=+(I[7]||0);if(q>23||A>59||x&&!G)return!1;if(M<=23&&z<=59&&F<60)return!0;const L=z-A*Q,T=M-q*Q-(L<0?1:0);return(T===23||T===-1)&&(L===59||L===-1)&&F<61}}function c(x,H){if(!(x&&H))return;const D=new Date("2020-01-01T"+x).valueOf(),I=new Date("2020-01-01T"+H).valueOf();if(D&&I)return D-I}function l(x,H){if(!(x&&H))return;const D=s.exec(x),I=s.exec(H);if(D&&I)return x=
573
- D[1]+D[2]+D[3],H=I[1]+I[2]+I[3],x>H?1:x<H?-1:0}const m=/t|\s/i;function y(x){const H=u(x);return function(I){const M=I.split(m);return M.length===2&&o(M[0])&&H(M[1])}}function _(x,H){if(!(x&&H))return;const D=new Date(x).valueOf(),I=new Date(H).valueOf();if(D&&I)return D-I}function S(x,H){if(!(x&&H))return;const[D,I]=x.split(m),[M,z]=H.split(m),F=a(D,M);if(F!==void 0)return F||c(I,z)}const g=/\/|:/,p=/^(?:[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;
574
- function h(x){return g.test(x)&&p.test(x)}const f=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function d(x){return f.lastIndex=0,f.test(x)}const v=-2147483648,$=2**31-1;function w(x){return Number.isInteger(x)&&x<=$&&x>=v}function E(x){return Number.isInteger(x)}function P(){return!0}const O=/[^\\]\\Z/;function U(x){if(O.test(x))return!1;try{return new RegExp(x),!0}catch{return!1}}})(Es)),Es}var Ss={},tn={exports:{}},rn={},Qu;function Sm(){if(Qu)return rn;Qu=1,Object.defineProperty(
575
- rn,"__esModule",{value:!0});const e=qi(),t=Yi(),r=vc(),n=Lc(),i=qc(),o=[e.default,t.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return rn.default=o,rn}const Zu="http://json-schema.org/draft-07/schema#",el="http://json-schema.org/draft-07/schema#",tl="Core schema meta-schema",rl={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},
570
+ regex:H,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:d,int32:{type:"number",validate:w},int64:{type:"number",validate:b},float:{type:"number",validate:P},double:{type:"number",validate:P},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,
571
+ o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,c),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,_),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"iso-date-time":t(/^\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,S),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
572
+ 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},e.formatNames=Object.keys(e.fullFormats);function r(x){return x%4===0&&(x%100!==0||x%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 a(x){const U=n.exec(x);if(!U)return!1;const L=+U[1],j=+U[2],M=+U[3];return j>=1&&j<=12&&M>=1&&M<=(j===2&&r(L)?29:i[j])}function o(x,U){if(x&&U)return x>U?1:x<U?-1:0}const s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
573
+ function u(x){return function(L){const j=s.exec(L);if(!j)return!1;const M=+j[1],z=+j[2],F=+j[3],G=j[4],Q=j[5]==="-"?-1:1,q=+(j[6]||0),A=+(j[7]||0);if(q>23||A>59||x&&!G)return!1;if(M<=23&&z<=59&&F<60)return!0;const D=z-A*Q,T=M-q*Q-(D<0?1:0);return(T===23||T===-1)&&(D===59||D===-1)&&F<61}}function c(x,U){if(!(x&&U))return;const L=new Date("2020-01-01T"+x).valueOf(),j=new Date("2020-01-01T"+U).valueOf();if(L&&j)return L-j}function l(x,U){if(!(x&&U))return;const L=s.exec(x),j=s.exec(U);if(L&&j)return x=
574
+ L[1]+L[2]+L[3],U=j[1]+j[2]+j[3],x>U?1:x<U?-1:0}const m=/t|\s/i;function y(x){const U=u(x);return function(j){const M=j.split(m);return M.length===2&&a(M[0])&&U(M[1])}}function _(x,U){if(!(x&&U))return;const L=new Date(x).valueOf(),j=new Date(U).valueOf();if(L&&j)return L-j}function S(x,U){if(!(x&&U))return;const[L,j]=x.split(m),[M,z]=U.split(m),F=o(L,M);if(F!==void 0)return F||c(j,z)}const g=/\/|:/,h=/^(?:[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;
575
+ function p(x){return g.test(x)&&h.test(x)}const f=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function d(x){return f.lastIndex=0,f.test(x)}const v=-2147483648,$=2**31-1;function w(x){return Number.isInteger(x)&&x<=$&&x>=v}function b(x){return Number.isInteger(x)}function P(){return!0}const I=/[^\\]\\Z/;function H(x){if(I.test(x))return!1;try{return new RegExp(x),!0}catch{return!1}}})(Es)),Es}var Ss={},tn={exports:{}},rn={},Qu;function Sm(){if(Qu)return rn;Qu=1,Object.defineProperty(
576
+ rn,"__esModule",{value:!0});const e=qi(),t=Yi(),r=vc(),n=Lc(),i=qc(),a=[e.default,t.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return rn.default=a,rn}const Zu="http://json-schema.org/draft-07/schema#",el="http://json-schema.org/draft-07/schema#",tl="Core schema meta-schema",rl={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},
576
577
  simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},nl=["object","boolean"],sl={$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},
577
578
  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\
578
579
  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:"\
579
580
  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\
580
581
  initions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},Rm={$schema:Zu,$id:el,title:tl,definitions:rl,type:nl,properties:sl,default:!0},Am={__proto__:null,$id:el,$schema:Zu,default:Rm,definitions:rl,properties:sl,title:tl,type:nl},Pm=De(Am);var ol;function Cm(){return ol||(ol=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=Ii(),n=Sm(),i=Uc(),
581
- o=Pm,a=["/properties"],s="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(S=>this.addVocabulary(S)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const S=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(S,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||
582
+ a=Pm,o=["/properties"],s="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(S=>this.addVocabulary(S)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const S=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(S,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||
582
583
  (this.getSchema(s)?s:void 0)}}t.Ajv=u,e.exports=t=u,e.exports.Ajv=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var c=Nt();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=ae();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,
583
- "nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var m=ar();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return m.default}});var y=Ot();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return y.default}})})(tn,tn.exports)),tn.exports}var al;function km(){return al||(al=1,(function(e){
584
- Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=Cm(),r=ae(),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}},o={message:({keyword:s,schemaCode:u})=>(0,r.str)`should be ${i[s].okStr} ${u}`,params:({keyword:s,schemaCode:u})=>(0,r._)`{comparison: ${i[s].okStr}, limit: ${u}}`};e.formatLimitDefinition=
585
- {keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:o,code(s){const{gen:u,data:c,schemaCode:l,keyword:m,it:y}=s,{opts:_,self:S}=y;if(!_.validateFormats)return;const g=new t.KeywordCxt(y,S.RULES.all.format.definition,"format");g.$data?p():h();function p(){const d=u.scopeValue("formats",{ref:S.formats,code:_.code.formats}),v=u.const("fmt",(0,r._)`${d}[${g.schemaCode}]`);s.fail$data((0,r.or)((0,r._)`typeof ${v} != "object"`,(0,r._)`${v} instanceof RegExp`,(0,r._)`typeof ${v}.compare != "function"`,
586
- f(v)))}function h(){const d=g.schema,v=S.formats[d];if(!v||v===!0)return;if(typeof v!="object"||v instanceof RegExp||typeof v.compare!="function")throw new Error(`"${m}": format "${d}" does not define "compare" function`);const $=u.scopeValue("formats",{key:d,ref:v,code:_.code.formats?(0,r._)`${_.code.formats}${(0,r.getProperty)(d)}`:void 0});s.fail$data(f($))}function f(d){return(0,r._)`${d}.compare(${c}, ${l}) ${i[m].fail} 0`}},dependencies:["format"]};const a=s=>(s.addKeyword(e.formatLimitDefinition),
587
- s);e.default=a})(Ss)),Ss}var il;function Tm(){return il||(il=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Em(),n=km(),i=ae(),o=new i.Name("fullFormats"),a=new i.Name("fastFormats"),s=(c,l={keywords:!0})=>{if(Array.isArray(l))return u(c,l,r.fullFormats,o),c;const[m,y]=l.mode==="fast"?[r.fastFormats,a]:[r.fullFormats,o],_=l.formats||r.formatNames;return u(c,_,m,y),l.keywords&&(0,n.default)(c),c};s.get=(c,l="full")=>{const y=(l==="fast"?r.fastFormats:r.fullFormats)[c];if(!y)
588
- throw new Error(`Unknown format "${c}"`);return y};function u(c,l,m,y){var _,S;(_=(S=c.opts.code).formats)!==null&&_!==void 0||(S.formats=(0,i._)`require("ajv-formats/dist/formats").${y}`);for(const g of l)c.addFormat(g,m[g])}e.exports=t=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s})(en,en.exports)),en.exports}var Nm=Tm();const Om=mn(Nm),Im=(e,t,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;const i=Object.getOwnPropertyDescriptor(e,r),o=Object.getOwnPropertyDescriptor(
589
- t,r);!jm(i,o)&&n||Object.defineProperty(e,r,o)},jm=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Lm=(e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)},Dm=(e,t)=>`/* Wrapped ${e}*/
590
- ${t}`,qm=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),xm=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Mm=(e,t,r)=>{const n=r===""?"":`with ${r.trim()}() `,i=Dm.bind(null,n,t.toString());Object.defineProperty(i,"name",xm);const{writable:o,enumerable:a,configurable:s}=qm;Object.defineProperty(e,"toString",{value:i,writable:o,enumerable:a,configurable:s})};function Hm(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:n}=e;for(const i of Reflect.ownKeys(t))Im(e,
591
- t,i,r);return Lm(e,t),Mm(e,t,n),e}const cl=(e,t={})=>{if(typeof e!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof e}\``);const{wait:r=0,maxWait:n=Number.POSITIVE_INFINITY,before:i=!1,after:o=!0}=t;if(r<0||n<0)throw new RangeError("`wait` and `maxWait` must not be negative.");if(!i&&!o)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let a,s,u;const c=function(...l){const m=this,y=()=>{a=void 0,s&&(clearTimeout(s),s=
592
- void 0),o&&(u=e.apply(m,l))},_=()=>{s=void 0,a&&(clearTimeout(a),a=void 0),o&&(u=e.apply(m,l))},S=i&&!a;return clearTimeout(a),a=setTimeout(y,r),n>0&&n!==Number.POSITIVE_INFINITY&&!s&&(s=setTimeout(_,n)),S&&(u=e.apply(m,l)),u};return Hm(c,e),c.cancel=()=>{a&&(clearTimeout(a),a=void 0),s&&(clearTimeout(s),s=void 0)},c};var nn={exports:{}},Rs,ul;function sn(){if(ul)return Rs;ul=1;const e="2.0.0",t=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,i=t-6;return Rs={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:n,
593
- MAX_SAFE_BUILD_LENGTH:i,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Rs}var As,ll;function on(){return ll||(ll=1,As=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{}),As}var fl;function Lt(){return fl||(fl=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,
594
- MAX_LENGTH:i}=sn(),o=on();t=e.exports={};const a=t.re=[],s=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],l=t.t={};let m=0;const y="[a-zA-Z0-9-]",_=[["\\s",1],["\\d",i],[y,n]],S=p=>{for(const[h,f]of _)p=p.split(`${h}*`).join(`${h}{0,${f}}`).split(`${h}+`).join(`${h}{1,${f}}`);return p},g=(p,h,f)=>{const d=S(h),v=m++;o(p,v,h),l[p]=v,u[v]=h,c[v]=d,a[v]=new RegExp(h,f?"g":void 0),s[v]=new RegExp(d,f?"g":void 0)};g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",
584
+ "nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var m=ar();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return m.default}});var y=It();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return y.default}})})(tn,tn.exports)),tn.exports}var al;function km(){return al||(al=1,(function(e){
585
+ Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=Cm(),r=ae(),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}},a={message:({keyword:s,schemaCode:u})=>(0,r.str)`should be ${i[s].okStr} ${u}`,params:({keyword:s,schemaCode:u})=>(0,r._)`{comparison: ${i[s].okStr}, limit: ${u}}`};e.formatLimitDefinition=
586
+ {keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:a,code(s){const{gen:u,data:c,schemaCode:l,keyword:m,it:y}=s,{opts:_,self:S}=y;if(!_.validateFormats)return;const g=new t.KeywordCxt(y,S.RULES.all.format.definition,"format");g.$data?h():p();function h(){const d=u.scopeValue("formats",{ref:S.formats,code:_.code.formats}),v=u.const("fmt",(0,r._)`${d}[${g.schemaCode}]`);s.fail$data((0,r.or)((0,r._)`typeof ${v} != "object"`,(0,r._)`${v} instanceof RegExp`,(0,r._)`typeof ${v}.compare != "function"`,
587
+ f(v)))}function p(){const d=g.schema,v=S.formats[d];if(!v||v===!0)return;if(typeof v!="object"||v instanceof RegExp||typeof v.compare!="function")throw new Error(`"${m}": format "${d}" does not define "compare" function`);const $=u.scopeValue("formats",{key:d,ref:v,code:_.code.formats?(0,r._)`${_.code.formats}${(0,r.getProperty)(d)}`:void 0});s.fail$data(f($))}function f(d){return(0,r._)`${d}.compare(${c}, ${l}) ${i[m].fail} 0`}},dependencies:["format"]};const o=s=>(s.addKeyword(e.formatLimitDefinition),
588
+ s);e.default=o})(Ss)),Ss}var il;function Tm(){return il||(il=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Em(),n=km(),i=ae(),a=new i.Name("fullFormats"),o=new i.Name("fastFormats"),s=(c,l={keywords:!0})=>{if(Array.isArray(l))return u(c,l,r.fullFormats,a),c;const[m,y]=l.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,a],_=l.formats||r.formatNames;return u(c,_,m,y),l.keywords&&(0,n.default)(c),c};s.get=(c,l="full")=>{const y=(l==="fast"?r.fastFormats:r.fullFormats)[c];if(!y)
589
+ throw new Error(`Unknown format "${c}"`);return y};function u(c,l,m,y){var _,S;(_=(S=c.opts.code).formats)!==null&&_!==void 0||(S.formats=(0,i._)`require("ajv-formats/dist/formats").${y}`);for(const g of l)c.addFormat(g,m[g])}e.exports=t=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s})(en,en.exports)),en.exports}var Om=Tm();const Nm=mn(Om),Im=(e,t,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;const i=Object.getOwnPropertyDescriptor(e,r),a=Object.getOwnPropertyDescriptor(
590
+ t,r);!jm(i,a)&&n||Object.defineProperty(e,r,a)},jm=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Lm=(e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)},Dm=(e,t)=>`/* Wrapped ${e}*/
591
+ ${t}`,qm=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),xm=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Mm=(e,t,r)=>{const n=r===""?"":`with ${r.trim()}() `,i=Dm.bind(null,n,t.toString());Object.defineProperty(i,"name",xm);const{writable:a,enumerable:o,configurable:s}=qm;Object.defineProperty(e,"toString",{value:i,writable:a,enumerable:o,configurable:s})};function Hm(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:n}=e;for(const i of Reflect.ownKeys(t))Im(e,
592
+ t,i,r);return Lm(e,t),Mm(e,t,n),e}const cl=(e,t={})=>{if(typeof e!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof e}\``);const{wait:r=0,maxWait:n=Number.POSITIVE_INFINITY,before:i=!1,after:a=!0}=t;if(r<0||n<0)throw new RangeError("`wait` and `maxWait` must not be negative.");if(!i&&!a)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let o,s,u;const c=function(...l){const m=this,y=()=>{o=void 0,s&&(clearTimeout(s),s=
593
+ void 0),a&&(u=e.apply(m,l))},_=()=>{s=void 0,o&&(clearTimeout(o),o=void 0),a&&(u=e.apply(m,l))},S=i&&!o;return clearTimeout(o),o=setTimeout(y,r),n>0&&n!==Number.POSITIVE_INFINITY&&!s&&(s=setTimeout(_,n)),S&&(u=e.apply(m,l)),u};return Hm(c,e),c.cancel=()=>{o&&(clearTimeout(o),o=void 0),s&&(clearTimeout(s),s=void 0)},c};var nn={exports:{}},Rs,ul;function sn(){if(ul)return Rs;ul=1;const e="2.0.0",t=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,i=t-6;return Rs={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:n,
594
+ MAX_SAFE_BUILD_LENGTH:i,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Rs}var As,ll;function on(){return ll||(ll=1,As=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{}),As}var fl;function Dt(){return fl||(fl=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,
595
+ MAX_LENGTH:i}=sn(),a=on();t=e.exports={};const o=t.re=[],s=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],l=t.t={};let m=0;const y="[a-zA-Z0-9-]",_=[["\\s",1],["\\d",i],[y,n]],S=h=>{for(const[p,f]of _)h=h.split(`${p}*`).join(`${p}{0,${f}}`).split(`${p}+`).join(`${p}{1,${f}}`);return h},g=(h,p,f)=>{const d=S(p),v=m++;a(h,v,p),l[h]=v,u[v]=p,c[v]=d,o[v]=new RegExp(p,f?"g":void 0),s[v]=new RegExp(d,f?"g":void 0)};g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",
595
596
  `\\d*[a-zA-Z-]${y}*`),g("MAINVERSION",`(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})`),g("MAINVERSIONLOOSE",`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASEIDENTIFIER",`(?:${u[l.NONNUMERICIDENTIFIER]}|${u[l.NUMERICIDENTIFIER]})`),g("PRERELEASEIDENTIFIERLOOSE",`(?:${u[l.NONNUMERICIDENTIFIER]}|${u[l.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASE",`(?:-(${u[l.PRERELEASEIDENTIFIER]}(?:\\.${u[l.
596
597
  PRERELEASEIDENTIFIER]})*))`),g("PRERELEASELOOSE",`(?:-?(${u[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[l.PRERELEASEIDENTIFIERLOOSE]})*))`),g("BUILDIDENTIFIER",`${y}+`),g("BUILD",`(?:\\+(${u[l.BUILDIDENTIFIER]}(?:\\.${u[l.BUILDIDENTIFIER]})*))`),g("FULLPLAIN",`v?${u[l.MAINVERSION]}${u[l.PRERELEASE]}?${u[l.BUILD]}?`),g("FULL",`^${u[l.FULLPLAIN]}$`),g("LOOSEPLAIN",`[v=\\s]*${u[l.MAINVERSIONLOOSE]}${u[l.PRERELEASELOOSE]}?${u[l.BUILD]}?`),g("LOOSE",`^${u[l.LOOSEPLAIN]}$`),g("GTLT","((?:<|>)?=?)"),g("XRAN\
597
598
  GEIDENTIFIERLOOSE",`${u[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g("XRANGEIDENTIFIER",`${u[l.NUMERICIDENTIFIER]}|x|X|\\*`),g("XRANGEPLAIN",`[v=\\s]*(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:${u[l.PRERELEASE]})?${u[l.BUILD]}?)?)?`),g("XRANGEPLAINLOOSE",`[v=\\s]*(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:${u[l.PRERELEASELOOSE]})?${u[l.BUILD]}?)?)?`),g("XRANGE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAIN]}\
598
599
  $`),g("XRANGELOOSE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAINLOOSE]}$`),g("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),g("COERCE",`${u[l.COERCEPLAIN]}(?:$|[^\\d])`),g("COERCEFULL",u[l.COERCEPLAIN]+`(?:${u[l.PRERELEASE]})?(?:${u[l.BUILD]})?(?:$|[^\\d])`),g("COERCERTL",u[l.COERCE],!0),g("COERCERTLFULL",u[l.COERCEFULL],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM",`(\\s*)${u[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",g("TILDE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAIN]}\
599
600
  $`),g("TILDELOOSE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAINLOOSE]}$`),g("LONECARET","(?:\\^)"),g("CARETTRIM",`(\\s*)${u[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",g("CARET",`^${u[l.LONECARET]}${u[l.XRANGEPLAIN]}$`),g("CARETLOOSE",`^${u[l.LONECARET]}${u[l.XRANGEPLAINLOOSE]}$`),g("COMPARATORLOOSE",`^${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]})$|^$`),g("COMPARATOR",`^${u[l.GTLT]}\\s*(${u[l.FULLPLAIN]})$|^$`),g("COMPARATORTRIM",`(\\s*)${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]}|${u[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace=
600
601
  "$1$2$3",g("HYPHENRANGE",`^\\s*(${u[l.XRANGEPLAIN]})\\s+-\\s+(${u[l.XRANGEPLAIN]})\\s*$`),g("HYPHENRANGELOOSE",`^\\s*(${u[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[l.XRANGEPLAINLOOSE]})\\s*$`),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(nn,nn.exports)),nn.exports}var Ps,dl;function Cs(){if(dl)return Ps;dl=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Ps=n=>n?typeof n!="object"?e:n:t,Ps}var ks,pl;function hl(){if(pl)return ks;
601
- pl=1;const e=/^[0-9]+$/,t=(n,i)=>{if(typeof n=="number"&&typeof i=="number")return n===i?0:n<i?-1:1;const o=e.test(n),a=e.test(i);return o&&a&&(n=+n,i=+i),n===i?0:o&&!a?-1:a&&!o?1:n<i?-1:1};return ks={compareIdentifiers:t,rcompareIdentifiers:(n,i)=>t(i,n)},ks}var Ts,ml;function Se(){if(ml)return Ts;ml=1;const e=on(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=sn(),{safeRe:n,t:i}=Lt(),o=Cs(),{compareIdentifiers:a}=hl();class s{constructor(c,l){if(l=o(l),c instanceof s){if(c.loose===!!l.loose&&c.includePrerelease===
602
+ pl=1;const e=/^[0-9]+$/,t=(n,i)=>{if(typeof n=="number"&&typeof i=="number")return n===i?0:n<i?-1:1;const a=e.test(n),o=e.test(i);return a&&o&&(n=+n,i=+i),n===i?0:a&&!o?-1:o&&!a?1:n<i?-1:1};return ks={compareIdentifiers:t,rcompareIdentifiers:(n,i)=>t(i,n)},ks}var Ts,ml;function Se(){if(ml)return Ts;ml=1;const e=on(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=sn(),{safeRe:n,t:i}=Dt(),a=Cs(),{compareIdentifiers:o}=hl();class s{constructor(c,l){if(l=a(l),c instanceof s){if(c.loose===!!l.loose&&c.includePrerelease===
602
603
  !!l.includePrerelease)return c;c=c.version}else if(typeof c!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof c}".`);if(c.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",c,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const m=c.trim().match(l.loose?n[i.LOOSE]:n[i.FULL]);if(!m)throw new TypeError(`Invalid Version: ${c}`);if(this.raw=c,this.major=+m[1],this.minor=+m[2],this.patch=+m[3],this.major>
603
604
  r||this.major<0)throw new TypeError("Invalid major version");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");m[4]?this.prerelease=m[4].split(".").map(y=>{if(/^[0-9]+$/.test(y)){const _=+y;if(_>=0&&_<r)return _}return y}):this.prerelease=[],this.build=m[5]?m[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=
604
605
  `-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(c){if(e("SemVer.compare",this.version,this.options,c),!(c instanceof s)){if(typeof c=="string"&&c===this.version)return 0;c=new s(c,this.options)}return c.version===this.version?0:this.compareMain(c)||this.comparePre(c)}compareMain(c){return c instanceof s||(c=new s(c,this.options)),this.major<c.major?-1:this.major>c.major?1:this.minor<c.minor?-1:this.minor>c.minor?1:this.patch<c.patch?-1:this.patch>c.patch?1:0}comparePre(c){
605
- if(c instanceof s||(c=new s(c,this.options)),this.prerelease.length&&!c.prerelease.length)return-1;if(!this.prerelease.length&&c.prerelease.length)return 1;if(!this.prerelease.length&&!c.prerelease.length)return 0;let l=0;do{const m=this.prerelease[l],y=c.prerelease[l];if(e("prerelease compare",l,m,y),m===void 0&&y===void 0)return 0;if(y===void 0)return 1;if(m===void 0)return-1;if(m===y)continue;return a(m,y)}while(++l)}compareBuild(c){c instanceof s||(c=new s(c,this.options));let l=0;do{const m=this.
606
- build[l],y=c.build[l];if(e("build compare",l,m,y),m===void 0&&y===void 0)return 0;if(y===void 0)return 1;if(m===void 0)return-1;if(m===y)continue;return a(m,y)}while(++l)}inc(c,l,m){if(c.startsWith("pre")){if(!l&&m===!1)throw new Error("invalid increment argument: identifier is empty");if(l){const y=`-${l}`.match(this.options.loose?n[i.PRERELEASELOOSE]:n[i.PRERELEASE]);if(!y||y[1]!==l)throw new Error(`invalid identifier: ${l}`)}}switch(c){case"premajor":this.prerelease.length=0,this.patch=0,this.
606
+ if(c instanceof s||(c=new s(c,this.options)),this.prerelease.length&&!c.prerelease.length)return-1;if(!this.prerelease.length&&c.prerelease.length)return 1;if(!this.prerelease.length&&!c.prerelease.length)return 0;let l=0;do{const m=this.prerelease[l],y=c.prerelease[l];if(e("prerelease compare",l,m,y),m===void 0&&y===void 0)return 0;if(y===void 0)return 1;if(m===void 0)return-1;if(m===y)continue;return o(m,y)}while(++l)}compareBuild(c){c instanceof s||(c=new s(c,this.options));let l=0;do{const m=this.
607
+ build[l],y=c.build[l];if(e("build compare",l,m,y),m===void 0&&y===void 0)return 0;if(y===void 0)return 1;if(m===void 0)return-1;if(m===y)continue;return o(m,y)}while(++l)}inc(c,l,m){if(c.startsWith("pre")){if(!l&&m===!1)throw new Error("invalid increment argument: identifier is empty");if(l){const y=`-${l}`.match(this.options.loose?n[i.PRERELEASELOOSE]:n[i.PRERELEASE]);if(!y||y[1]!==l)throw new Error(`invalid identifier: ${l}`)}}switch(c){case"premajor":this.prerelease.length=0,this.patch=0,this.
607
608
  minor=0,this.major++,this.inc("pre",l,m);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",l,m);break;case"prepatch":this.prerelease.length=0,this.inc("patch",l,m),this.inc("pre",l,m);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",l,m),this.inc("pre",l,m);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.
608
609
  prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];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(m)?1:0;if(this.prerelease.length===0)this.prerelease=[y];else{let _=this.prerelease.length;for(;--_>=0;)typeof this.prerelease[_]=="number"&&(this.prerelease[_]++,_=-2);if(_===-1){if(l===this.prerelease.
609
- join(".")&&m===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(y)}}if(l){let _=[l,y];m===!1&&(_=[l]),a(this.prerelease[0],l)===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 Ts=s,Ts}var Ns,yl;function vt(){if(yl)return Ns;yl=1;const e=Se();return Ns=(r,n,i=!1)=>{if(r instanceof
610
- e)return r;try{return new e(r,n)}catch(o){if(!i)return null;throw o}},Ns}var Os,gl;function Um(){if(gl)return Os;gl=1;const e=vt();return Os=(r,n)=>{const i=e(r,n);return i?i.version:null},Os}var Is,vl;function Fm(){if(vl)return Is;vl=1;const e=vt();return Is=(r,n)=>{const i=e(r.trim().replace(/^[=v]+/,""),n);return i?i.version:null},Is}var js,$l;function Vm(){if($l)return js;$l=1;const e=Se();return js=(r,n,i,o,a)=>{typeof i=="string"&&(a=o,o=i,i=void 0);try{return new e(r instanceof e?r.version:
611
- r,i).inc(n,o,a).version}catch{return null}},js}var Ls,_l;function zm(){if(_l)return Ls;_l=1;const e=vt();return Ls=(r,n)=>{const i=e(r,null,!0),o=e(n,null,!0),a=i.compare(o);if(a===0)return null;const s=a>0,u=s?i:o,c=s?o:i,l=!!u.prerelease.length;if(!!c.prerelease.length&&!l){if(!c.patch&&!c.minor)return"major";if(c.compareMain(u)===0)return c.minor&&!c.patch?"minor":"patch"}const y=l?"pre":"";return i.major!==o.major?y+"major":i.minor!==o.minor?y+"minor":i.patch!==o.patch?y+"patch":"prerelease"},
610
+ join(".")&&m===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(y)}}if(l){let _=[l,y];m===!1&&(_=[l]),o(this.prerelease[0],l)===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 Ts=s,Ts}var Os,yl;function vt(){if(yl)return Os;yl=1;const e=Se();return Os=(r,n,i=!1)=>{if(r instanceof
611
+ e)return r;try{return new e(r,n)}catch(a){if(!i)return null;throw a}},Os}var Ns,gl;function Um(){if(gl)return Ns;gl=1;const e=vt();return Ns=(r,n)=>{const i=e(r,n);return i?i.version:null},Ns}var Is,vl;function Fm(){if(vl)return Is;vl=1;const e=vt();return Is=(r,n)=>{const i=e(r.trim().replace(/^[=v]+/,""),n);return i?i.version:null},Is}var js,$l;function Vm(){if($l)return js;$l=1;const e=Se();return js=(r,n,i,a,o)=>{typeof i=="string"&&(o=a,a=i,i=void 0);try{return new e(r instanceof e?r.version:
612
+ r,i).inc(n,a,o).version}catch{return null}},js}var Ls,_l;function zm(){if(_l)return Ls;_l=1;const e=vt();return Ls=(r,n)=>{const i=e(r,null,!0),a=e(n,null,!0),o=i.compare(a);if(o===0)return null;const s=o>0,u=s?i:a,c=s?a:i,l=!!u.prerelease.length;if(!!c.prerelease.length&&!l){if(!c.patch&&!c.minor)return"major";if(c.compareMain(u)===0)return c.minor&&!c.patch?"minor":"patch"}const y=l?"pre":"";return i.major!==a.major?y+"major":i.minor!==a.minor?y+"minor":i.patch!==a.patch?y+"patch":"prerelease"},
612
613
  Ls}var Ds,wl;function Gm(){if(wl)return Ds;wl=1;const e=Se();return Ds=(r,n)=>new e(r,n).major,Ds}var qs,bl;function Bm(){if(bl)return qs;bl=1;const e=Se();return qs=(r,n)=>new e(r,n).minor,qs}var xs,El;function Km(){if(El)return xs;El=1;const e=Se();return xs=(r,n)=>new e(r,n).patch,xs}var Ms,Sl;function Wm(){if(Sl)return Ms;Sl=1;const e=vt();return Ms=(r,n)=>{const i=e(r,n);return i&&i.prerelease.length?i.prerelease:null},Ms}var Hs,Rl;function je(){if(Rl)return Hs;Rl=1;const e=Se();return Hs=(r,n,i)=>new e(
613
- r,i).compare(new e(n,i)),Hs}var Us,Al;function Xm(){if(Al)return Us;Al=1;const e=je();return Us=(r,n,i)=>e(n,r,i),Us}var Fs,Pl;function Jm(){if(Pl)return Fs;Pl=1;const e=je();return Fs=(r,n)=>e(r,n,!0),Fs}var Vs,Cl;function zs(){if(Cl)return Vs;Cl=1;const e=Se();return Vs=(r,n,i)=>{const o=new e(r,i),a=new e(n,i);return o.compare(a)||o.compareBuild(a)},Vs}var Gs,kl;function Ym(){if(kl)return Gs;kl=1;const e=zs();return Gs=(r,n)=>r.sort((i,o)=>e(i,o,n)),Gs}var Bs,Tl;function Qm(){if(Tl)return Bs;
614
- Tl=1;const e=zs();return Bs=(r,n)=>r.sort((i,o)=>e(o,i,n)),Bs}var Ks,Nl;function an(){if(Nl)return Ks;Nl=1;const e=je();return Ks=(r,n,i)=>e(r,n,i)>0,Ks}var Ws,Ol;function Xs(){if(Ol)return Ws;Ol=1;const e=je();return Ws=(r,n,i)=>e(r,n,i)<0,Ws}var Js,Il;function jl(){if(Il)return Js;Il=1;const e=je();return Js=(r,n,i)=>e(r,n,i)===0,Js}var Ys,Ll;function Dl(){if(Ll)return Ys;Ll=1;const e=je();return Ys=(r,n,i)=>e(r,n,i)!==0,Ys}var Qs,ql;function Zs(){if(ql)return Qs;ql=1;const e=je();return Qs=(r,n,i)=>e(
615
- r,n,i)>=0,Qs}var eo,xl;function to(){if(xl)return eo;xl=1;const e=je();return eo=(r,n,i)=>e(r,n,i)<=0,eo}var ro,Ml;function Hl(){if(Ml)return ro;Ml=1;const e=jl(),t=Dl(),r=an(),n=Zs(),i=Xs(),o=to();return ro=(s,u,c,l)=>{switch(u){case"===":return typeof s=="object"&&(s=s.version),typeof c=="object"&&(c=c.version),s===c;case"!==":return typeof s=="object"&&(s=s.version),typeof c=="object"&&(c=c.version),s!==c;case"":case"=":case"==":return e(s,c,l);case"!=":return t(s,c,l);case">":return r(s,c,l);case"\
616
- >=":return n(s,c,l);case"<":return i(s,c,l);case"<=":return o(s,c,l);default:throw new TypeError(`Invalid operator: ${u}`)}},ro}var no,Ul;function Zm(){if(Ul)return no;Ul=1;const e=Se(),t=vt(),{safeRe:r,t:n}=Lt();return no=(o,a)=>{if(o instanceof e)return o;if(typeof o=="number"&&(o=String(o)),typeof o!="string")return null;a=a||{};let s=null;if(!a.rtl)s=o.match(a.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const _=a.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let S;for(;(S=_.exec(
617
- o))&&(!s||s.index+s[0].length!==o.length);)(!s||S.index+S[0].length!==s.index+s[0].length)&&(s=S),_.lastIndex=S.index+S[1].length+S[2].length;_.lastIndex=-1}if(s===null)return null;const u=s[2],c=s[3]||"0",l=s[4]||"0",m=a.includePrerelease&&s[5]?`-${s[5]}`:"",y=a.includePrerelease&&s[6]?`+${s[6]}`:"";return t(`${u}.${c}.${l}${m}${y}`,a)},no}var so,Fl;function ey(){if(Fl)return so;Fl=1;class e{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.
618
- delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){const o=this.map.keys().next().value;this.delete(o)}this.map.set(r,n)}return this}}return so=e,so}var oo,Vl;function Le(){if(Vl)return oo;Vl=1;const e=/\s+/g;class t{constructor(M,z){if(z=i(z),M instanceof t)return M.loose===!!z.loose&&M.includePrerelease===!!z.includePrerelease?M:new t(M.raw,z);if(M instanceof o)return this.raw=M.value,this.set=[[M]],this.formatted=
619
- void 0,this;if(this.options=z,this.loose=!!z.loose,this.includePrerelease=!!z.includePrerelease,this.raw=M.trim().replace(e," "),this.set=this.raw.split("||").map(F=>this.parseRange(F.trim())).filter(F=>F.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const F=this.set[0];if(this.set=this.set.filter(G=>!g(G[0])),this.set.length===0)this.set=[F];else if(this.set.length>1){for(const G of this.set)if(G.length===1&&p(G[0])){this.set=[G];break}}}
614
+ r,i).compare(new e(n,i)),Hs}var Us,Al;function Xm(){if(Al)return Us;Al=1;const e=je();return Us=(r,n,i)=>e(n,r,i),Us}var Fs,Pl;function Jm(){if(Pl)return Fs;Pl=1;const e=je();return Fs=(r,n)=>e(r,n,!0),Fs}var Vs,Cl;function zs(){if(Cl)return Vs;Cl=1;const e=Se();return Vs=(r,n,i)=>{const a=new e(r,i),o=new e(n,i);return a.compare(o)||a.compareBuild(o)},Vs}var Gs,kl;function Ym(){if(kl)return Gs;kl=1;const e=zs();return Gs=(r,n)=>r.sort((i,a)=>e(i,a,n)),Gs}var Bs,Tl;function Qm(){if(Tl)return Bs;
615
+ Tl=1;const e=zs();return Bs=(r,n)=>r.sort((i,a)=>e(a,i,n)),Bs}var Ks,Ol;function an(){if(Ol)return Ks;Ol=1;const e=je();return Ks=(r,n,i)=>e(r,n,i)>0,Ks}var Ws,Nl;function Xs(){if(Nl)return Ws;Nl=1;const e=je();return Ws=(r,n,i)=>e(r,n,i)<0,Ws}var Js,Il;function jl(){if(Il)return Js;Il=1;const e=je();return Js=(r,n,i)=>e(r,n,i)===0,Js}var Ys,Ll;function Dl(){if(Ll)return Ys;Ll=1;const e=je();return Ys=(r,n,i)=>e(r,n,i)!==0,Ys}var Qs,ql;function Zs(){if(ql)return Qs;ql=1;const e=je();return Qs=(r,n,i)=>e(
616
+ r,n,i)>=0,Qs}var eo,xl;function to(){if(xl)return eo;xl=1;const e=je();return eo=(r,n,i)=>e(r,n,i)<=0,eo}var ro,Ml;function Hl(){if(Ml)return ro;Ml=1;const e=jl(),t=Dl(),r=an(),n=Zs(),i=Xs(),a=to();return ro=(s,u,c,l)=>{switch(u){case"===":return typeof s=="object"&&(s=s.version),typeof c=="object"&&(c=c.version),s===c;case"!==":return typeof s=="object"&&(s=s.version),typeof c=="object"&&(c=c.version),s!==c;case"":case"=":case"==":return e(s,c,l);case"!=":return t(s,c,l);case">":return r(s,c,l);case"\
617
+ >=":return n(s,c,l);case"<":return i(s,c,l);case"<=":return a(s,c,l);default:throw new TypeError(`Invalid operator: ${u}`)}},ro}var no,Ul;function Zm(){if(Ul)return no;Ul=1;const e=Se(),t=vt(),{safeRe:r,t:n}=Dt();return no=(a,o)=>{if(a instanceof e)return a;if(typeof a=="number"&&(a=String(a)),typeof a!="string")return null;o=o||{};let s=null;if(!o.rtl)s=a.match(o.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const _=o.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let S;for(;(S=_.exec(
618
+ a))&&(!s||s.index+s[0].length!==a.length);)(!s||S.index+S[0].length!==s.index+s[0].length)&&(s=S),_.lastIndex=S.index+S[1].length+S[2].length;_.lastIndex=-1}if(s===null)return null;const u=s[2],c=s[3]||"0",l=s[4]||"0",m=o.includePrerelease&&s[5]?`-${s[5]}`:"",y=o.includePrerelease&&s[6]?`+${s[6]}`:"";return t(`${u}.${c}.${l}${m}${y}`,o)},no}var so,Fl;function ey(){if(Fl)return so;Fl=1;class e{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.
619
+ delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){const a=this.map.keys().next().value;this.delete(a)}this.map.set(r,n)}return this}}return so=e,so}var oo,Vl;function Le(){if(Vl)return oo;Vl=1;const e=/\s+/g;class t{constructor(M,z){if(z=i(z),M instanceof t)return M.loose===!!z.loose&&M.includePrerelease===!!z.includePrerelease?M:new t(M.raw,z);if(M instanceof a)return this.raw=M.value,this.set=[[M]],this.formatted=
620
+ void 0,this;if(this.options=z,this.loose=!!z.loose,this.includePrerelease=!!z.includePrerelease,this.raw=M.trim().replace(e," "),this.set=this.raw.split("||").map(F=>this.parseRange(F.trim())).filter(F=>F.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const F=this.set[0];if(this.set=this.set.filter(G=>!g(G[0])),this.set.length===0)this.set=[F];else if(this.set.length>1){for(const G of this.set)if(G.length===1&&h(G[0])){this.set=[G];break}}}
620
621
  this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let M=0;M<this.set.length;M++){M>0&&(this.formatted+="||");const z=this.set[M];for(let F=0;F<z.length;F++)F>0&&(this.formatted+=" "),this.formatted+=z[F].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(M){const F=((this.options.includePrerelease&&_)|(this.options.loose&&S))+":"+M,G=n.get(F);if(G)return G;const Q=this.options.loose,q=Q?u[c.HYPHENRANGELOOSE]:
621
- u[c.HYPHENRANGE];M=M.replace(q,H(this.options.includePrerelease)),a("hyphen replace",M),M=M.replace(u[c.COMPARATORTRIM],l),a("comparator trim",M),M=M.replace(u[c.TILDETRIM],m),a("tilde trim",M),M=M.replace(u[c.CARETTRIM],y),a("caret trim",M);let A=M.split(" ").map(b=>f(b,this.options)).join(" ").split(/\s+/).map(b=>x(b,this.options));Q&&(A=A.filter(b=>(a("loose invalid filter",b,this.options),!!b.match(u[c.COMPARATORLOOSE])))),a("range list",A);const L=new Map,T=A.map(b=>new o(b,this.options));for(const b of T){
622
- if(g(b))return[b];L.set(b.value,b)}L.size>1&&L.has("")&&L.delete("");const R=[...L.values()];return n.set(F,R),R}intersects(M,z){if(!(M instanceof t))throw new TypeError("a Range is required");return this.set.some(F=>h(F,z)&&M.set.some(G=>h(G,z)&&F.every(Q=>G.every(q=>Q.intersects(q,z)))))}test(M){if(!M)return!1;if(typeof M=="string")try{M=new s(M,this.options)}catch{return!1}for(let z=0;z<this.set.length;z++)if(D(this.set[z],M,this.options))return!0;return!1}}oo=t;const r=ey(),n=new r,i=Cs(),o=cn(),
623
- a=on(),s=Se(),{safeRe:u,t:c,comparatorTrimReplace:l,tildeTrimReplace:m,caretTrimReplace:y}=Lt(),{FLAG_INCLUDE_PRERELEASE:_,FLAG_LOOSE:S}=sn(),g=I=>I.value==="<0.0.0-0",p=I=>I.value==="",h=(I,M)=>{let z=!0;const F=I.slice();let G=F.pop();for(;z&&F.length;)z=F.every(Q=>G.intersects(Q,M)),G=F.pop();return z},f=(I,M)=>(I=I.replace(u[c.BUILD],""),a("comp",I,M),I=w(I,M),a("caret",I),I=v(I,M),a("tildes",I),I=P(I,M),a("xrange",I),I=U(I,M),a("stars",I),I),d=I=>!I||I.toLowerCase()==="x"||I==="*",v=(I,M)=>I.
624
- trim().split(/\s+/).map(z=>$(z,M)).join(" "),$=(I,M)=>{const z=M.loose?u[c.TILDELOOSE]:u[c.TILDE];return I.replace(z,(F,G,Q,q,A)=>{a("tilde",I,F,G,Q,q,A);let L;return d(G)?L="":d(Q)?L=`>=${G}.0.0 <${+G+1}.0.0-0`:d(q)?L=`>=${G}.${Q}.0 <${G}.${+Q+1}.0-0`:A?(a("replaceTilde pr",A),L=`>=${G}.${Q}.${q}-${A} <${G}.${+Q+1}.0-0`):L=`>=${G}.${Q}.${q} <${G}.${+Q+1}.0-0`,a("tilde return",L),L})},w=(I,M)=>I.trim().split(/\s+/).map(z=>E(z,M)).join(" "),E=(I,M)=>{a("caret",I,M);const z=M.loose?u[c.CARETLOOSE]:
625
- u[c.CARET],F=M.includePrerelease?"-0":"";return I.replace(z,(G,Q,q,A,L)=>{a("caret",I,G,Q,q,A,L);let T;return d(Q)?T="":d(q)?T=`>=${Q}.0.0${F} <${+Q+1}.0.0-0`:d(A)?Q==="0"?T=`>=${Q}.${q}.0${F} <${Q}.${+q+1}.0-0`:T=`>=${Q}.${q}.0${F} <${+Q+1}.0.0-0`:L?(a("replaceCaret pr",L),Q==="0"?q==="0"?T=`>=${Q}.${q}.${A}-${L} <${Q}.${q}.${+A+1}-0`:T=`>=${Q}.${q}.${A}-${L} <${Q}.${+q+1}.0-0`:T=`>=${Q}.${q}.${A}-${L} <${+Q+1}.0.0-0`):(a("no pr"),Q==="0"?q==="0"?T=`>=${Q}.${q}.${A}${F} <${Q}.${q}.${+A+1}-0`:T=
626
- `>=${Q}.${q}.${A}${F} <${Q}.${+q+1}.0-0`:T=`>=${Q}.${q}.${A} <${+Q+1}.0.0-0`),a("caret return",T),T})},P=(I,M)=>(a("replaceXRanges",I,M),I.split(/\s+/).map(z=>O(z,M)).join(" ")),O=(I,M)=>{I=I.trim();const z=M.loose?u[c.XRANGELOOSE]:u[c.XRANGE];return I.replace(z,(F,G,Q,q,A,L)=>{a("xRange",I,F,G,Q,q,A,L);const T=d(Q),R=T||d(q),b=R||d(A),C=b;return G==="="&&C&&(G=""),L=M.includePrerelease?"-0":"",T?G===">"||G==="<"?F="<0.0.0-0":F="*":G&&C?(R&&(q=0),A=0,G===">"?(G=">=",R?(Q=+Q+1,q=0,A=0):(q=+q+1,A=
627
- 0)):G==="<="&&(G="<",R?Q=+Q+1:q=+q+1),G==="<"&&(L="-0"),F=`${G+Q}.${q}.${A}${L}`):R?F=`>=${Q}.0.0${L} <${+Q+1}.0.0-0`:b&&(F=`>=${Q}.${q}.0${L} <${Q}.${+q+1}.0-0`),a("xRange return",F),F})},U=(I,M)=>(a("replaceStars",I,M),I.trim().replace(u[c.STAR],"")),x=(I,M)=>(a("replaceGTE0",I,M),I.trim().replace(u[M.includePrerelease?c.GTE0PRE:c.GTE0],"")),H=I=>(M,z,F,G,Q,q,A,L,T,R,b,C)=>(d(F)?z="":d(G)?z=`>=${F}.0.0${I?"-0":""}`:d(Q)?z=`>=${F}.${G}.0${I?"-0":""}`:q?z=`>=${z}`:z=`>=${z}${I?"-0":""}`,d(T)?L="":
628
- d(R)?L=`<${+T+1}.0.0-0`:d(b)?L=`<${T}.${+R+1}.0-0`:C?L=`<=${T}.${R}.${b}-${C}`:I?L=`<${T}.${R}.${+b+1}-0`:L=`<=${L}`,`${z} ${L}`.trim()),D=(I,M,z)=>{for(let F=0;F<I.length;F++)if(!I[F].test(M))return!1;if(M.prerelease.length&&!z.includePrerelease){for(let F=0;F<I.length;F++)if(a(I[F].semver),I[F].semver!==o.ANY&&I[F].semver.prerelease.length>0){const G=I[F].semver;if(G.major===M.major&&G.minor===M.minor&&G.patch===M.patch)return!0}return!1}return!0};return oo}var ao,zl;function cn(){if(zl)return ao;
629
- zl=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(l,m){if(m=r(m),l instanceof t){if(l.loose===!!m.loose)return l;l=l.value}l=l.trim().split(/\s+/).join(" "),a("comparator",l,m),this.options=m,this.loose=!!m.loose,this.parse(l),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(l){const m=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],y=l.match(m);if(!y)throw new TypeError(`Invalid comparator: ${l}`);this.operator=
630
- y[1]!==void 0?y[1]:"",this.operator==="="&&(this.operator=""),y[2]?this.semver=new s(y[2],this.options.loose):this.semver=e}toString(){return this.value}test(l){if(a("Comparator.test",l,this.options.loose),this.semver===e||l===e)return!0;if(typeof l=="string")try{l=new s(l,this.options)}catch{return!1}return o(l,this.operator,this.semver,this.options)}intersects(l,m){if(!(l instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new u(l.value,m).
631
- test(this.value):l.operator===""?l.value===""?!0:new u(this.value,m).test(l.semver):(m=r(m),m.includePrerelease&&(this.value==="<0.0.0-0"||l.value==="<0.0.0-0")||!m.includePrerelease&&(this.value.startsWith("<0.0.0")||l.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&l.operator.startsWith(">")||this.operator.startsWith("<")&&l.operator.startsWith("<")||this.semver.version===l.semver.version&&this.operator.includes("=")&&l.operator.includes("=")||o(this.semver,"<",l.semver,m)&&this.
632
- operator.startsWith(">")&&l.operator.startsWith("<")||o(this.semver,">",l.semver,m)&&this.operator.startsWith("<")&&l.operator.startsWith(">")))}}ao=t;const r=Cs(),{safeRe:n,t:i}=Lt(),o=Hl(),a=on(),s=Se(),u=Le();return ao}var io,Gl;function un(){if(Gl)return io;Gl=1;const e=Le();return io=(r,n,i)=>{try{n=new e(n,i)}catch{return!1}return n.test(r)},io}var co,Bl;function ty(){if(Bl)return co;Bl=1;const e=Le();return co=(r,n)=>new e(r,n).set.map(i=>i.map(o=>o.value).join(" ").trim().split(" ")),co}
633
- var uo,Kl;function ry(){if(Kl)return uo;Kl=1;const e=Se(),t=Le();return uo=(n,i,o)=>{let a=null,s=null,u=null;try{u=new t(i,o)}catch{return null}return n.forEach(c=>{u.test(c)&&(!a||s.compare(c)===-1)&&(a=c,s=new e(a,o))}),a},uo}var lo,Wl;function ny(){if(Wl)return lo;Wl=1;const e=Se(),t=Le();return lo=(n,i,o)=>{let a=null,s=null,u=null;try{u=new t(i,o)}catch{return null}return n.forEach(c=>{u.test(c)&&(!a||s.compare(c)===1)&&(a=c,s=new e(a,o))}),a},lo}var fo,Xl;function sy(){if(Xl)return fo;Xl=
634
- 1;const e=Se(),t=Le(),r=an();return fo=(i,o)=>{i=new t(i,o);let a=new e("0.0.0");if(i.test(a)||(a=new e("0.0.0-0"),i.test(a)))return a;a=null;for(let s=0;s<i.set.length;++s){const u=i.set[s];let c=null;u.forEach(l=>{const m=new e(l.semver.version);switch(l.operator){case">":m.prerelease.length===0?m.patch++:m.prerelease.push(0),m.raw=m.format();case"":case">=":(!c||r(m,c))&&(c=m);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${l.operator}`)}}),c&&(!a||r(a,c))&&(a=c)}
635
- return a&&i.test(a)?a:null},fo}var po,Jl;function oy(){if(Jl)return po;Jl=1;const e=Le();return po=(r,n)=>{try{return new e(r,n).range||"*"}catch{return null}},po}var ho,Yl;function mo(){if(Yl)return ho;Yl=1;const e=Se(),t=cn(),{ANY:r}=t,n=Le(),i=un(),o=an(),a=Xs(),s=to(),u=Zs();return ho=(l,m,y,_)=>{l=new e(l,_),m=new n(m,_);let S,g,p,h,f;switch(y){case">":S=o,g=s,p=a,h=">",f=">=";break;case"<":S=a,g=u,p=o,h="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(
636
- l,m,_))return!1;for(let d=0;d<m.set.length;++d){const v=m.set[d];let $=null,w=null;if(v.forEach(E=>{E.semver===r&&(E=new t(">=0.0.0")),$=$||E,w=w||E,S(E.semver,$.semver,_)?$=E:p(E.semver,w.semver,_)&&(w=E)}),$.operator===h||$.operator===f||(!w.operator||w.operator===h)&&g(l,w.semver))return!1;if(w.operator===f&&p(l,w.semver))return!1}return!0},ho}var yo,Ql;function ay(){if(Ql)return yo;Ql=1;const e=mo();return yo=(r,n,i)=>e(r,n,">",i),yo}var go,Zl;function iy(){if(Zl)return go;Zl=1;const e=mo();
637
- return go=(r,n,i)=>e(r,n,"<",i),go}var vo,ef;function cy(){if(ef)return vo;ef=1;const e=Le();return vo=(r,n,i)=>(r=new e(r,i),n=new e(n,i),r.intersects(n,i)),vo}var $o,tf;function uy(){if(tf)return $o;tf=1;const e=un(),t=je();return $o=(r,n,i)=>{const o=[];let a=null,s=null;const u=r.sort((y,_)=>t(y,_,i));for(const y of u)e(y,n,i)?(s=y,a||(a=y)):(s&&o.push([a,s]),s=null,a=null);a&&o.push([a,null]);const c=[];for(const[y,_]of o)y===_?c.push(y):!_&&y===u[0]?c.push("*"):_?y===u[0]?c.push(`<=${_}`):
638
- c.push(`${y} - ${_}`):c.push(`>=${y}`);const l=c.join(" || "),m=typeof n.raw=="string"?n.raw:String(n);return l.length<m.length?l:n},$o}var _o,rf;function ly(){if(rf)return _o;rf=1;const e=Le(),t=cn(),{ANY:r}=t,n=un(),i=je(),o=(m,y,_={})=>{if(m===y)return!0;m=new e(m,_),y=new e(y,_);let S=!1;e:for(const g of m.set){for(const p of y.set){const h=u(g,p,_);if(S=S||h!==null,h)continue e}if(S)return!1}return!0},a=[new t(">=0.0.0-0")],s=[new t(">=0.0.0")],u=(m,y,_)=>{if(m===y)return!0;if(m.length===1&&
639
- m[0].semver===r){if(y.length===1&&y[0].semver===r)return!0;_.includePrerelease?m=a:m=s}if(y.length===1&&y[0].semver===r){if(_.includePrerelease)return!0;y=s}const S=new Set;let g,p;for(const P of m)P.operator===">"||P.operator===">="?g=c(g,P,_):P.operator==="<"||P.operator==="<="?p=l(p,P,_):S.add(P.semver);if(S.size>1)return null;let h;if(g&&p){if(h=i(g.semver,p.semver,_),h>0)return null;if(h===0&&(g.operator!==">="||p.operator!=="<="))return null}for(const P of S){if(g&&!n(P,String(g),_)||p&&!n(
640
- P,String(p),_))return null;for(const O of y)if(!n(P,String(O),_))return!1;return!0}let f,d,v,$,w=p&&!_.includePrerelease&&p.semver.prerelease.length?p.semver:!1,E=g&&!_.includePrerelease&&g.semver.prerelease.length?g.semver:!1;w&&w.prerelease.length===1&&p.operator==="<"&&w.prerelease[0]===0&&(w=!1);for(const P of y){if($=$||P.operator===">"||P.operator===">=",v=v||P.operator==="<"||P.operator==="<=",g){if(E&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===E.major&&P.semver.minor===
641
- E.minor&&P.semver.patch===E.patch&&(E=!1),P.operator===">"||P.operator===">="){if(f=c(g,P,_),f===P&&f!==g)return!1}else if(g.operator===">="&&!n(g.semver,String(P),_))return!1}if(p){if(w&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===w.major&&P.semver.minor===w.minor&&P.semver.patch===w.patch&&(w=!1),P.operator==="<"||P.operator==="<="){if(d=l(p,P,_),d===P&&d!==p)return!1}else if(p.operator==="<="&&!n(p.semver,String(P),_))return!1}if(!P.operator&&(p||g)&&h!==0)return!1}return!(g&&
642
- v&&!p&&h!==0||p&&$&&!g&&h!==0||E||w)},c=(m,y,_)=>{if(!m)return y;const S=i(m.semver,y.semver,_);return S>0?m:S<0||y.operator===">"&&m.operator===">="?y:m},l=(m,y,_)=>{if(!m)return y;const S=i(m.semver,y.semver,_);return S<0?m:S>0||y.operator==="<"&&m.operator==="<="?y:m};return _o=o,_o}var wo,nf;function fy(){if(nf)return wo;nf=1;const e=Lt(),t=sn(),r=Se(),n=hl(),i=vt(),o=Um(),a=Fm(),s=Vm(),u=zm(),c=Gm(),l=Bm(),m=Km(),y=Wm(),_=je(),S=Xm(),g=Jm(),p=zs(),h=Ym(),f=Qm(),d=an(),v=Xs(),$=jl(),w=Dl(),E=Zs(),
643
- P=to(),O=Hl(),U=Zm(),x=cn(),H=Le(),D=un(),I=ty(),M=ry(),z=ny(),F=sy(),G=oy(),Q=mo(),q=ay(),A=iy(),L=cy(),T=uy(),R=ly();return wo={parse:i,valid:o,clean:a,inc:s,diff:u,major:c,minor:l,patch:m,prerelease:y,compare:_,rcompare:S,compareLoose:g,compareBuild:p,sort:h,rsort:f,gt:d,lt:v,eq:$,neq:w,gte:E,lte:P,cmp:O,coerce:U,Comparator:x,Range:H,satisfies:D,toComparators:I,maxSatisfying:M,minSatisfying:z,minVersion:F,validRange:G,outside:Q,gtr:q,ltr:A,intersects:L,simplifyRange:T,subset:R,SemVer:r,re:e.re,
622
+ u[c.HYPHENRANGE];M=M.replace(q,U(this.options.includePrerelease)),o("hyphen replace",M),M=M.replace(u[c.COMPARATORTRIM],l),o("comparator trim",M),M=M.replace(u[c.TILDETRIM],m),o("tilde trim",M),M=M.replace(u[c.CARETTRIM],y),o("caret trim",M);let A=M.split(" ").map(E=>f(E,this.options)).join(" ").split(/\s+/).map(E=>x(E,this.options));Q&&(A=A.filter(E=>(o("loose invalid filter",E,this.options),!!E.match(u[c.COMPARATORLOOSE])))),o("range list",A);const D=new Map,T=A.map(E=>new a(E,this.options));for(const E of T){
623
+ if(g(E))return[E];D.set(E.value,E)}D.size>1&&D.has("")&&D.delete("");const R=[...D.values()];return n.set(F,R),R}intersects(M,z){if(!(M instanceof t))throw new TypeError("a Range is required");return this.set.some(F=>p(F,z)&&M.set.some(G=>p(G,z)&&F.every(Q=>G.every(q=>Q.intersects(q,z)))))}test(M){if(!M)return!1;if(typeof M=="string")try{M=new s(M,this.options)}catch{return!1}for(let z=0;z<this.set.length;z++)if(L(this.set[z],M,this.options))return!0;return!1}}oo=t;const r=ey(),n=new r,i=Cs(),a=cn(),
624
+ o=on(),s=Se(),{safeRe:u,t:c,comparatorTrimReplace:l,tildeTrimReplace:m,caretTrimReplace:y}=Dt(),{FLAG_INCLUDE_PRERELEASE:_,FLAG_LOOSE:S}=sn(),g=j=>j.value==="<0.0.0-0",h=j=>j.value==="",p=(j,M)=>{let z=!0;const F=j.slice();let G=F.pop();for(;z&&F.length;)z=F.every(Q=>G.intersects(Q,M)),G=F.pop();return z},f=(j,M)=>(j=j.replace(u[c.BUILD],""),o("comp",j,M),j=w(j,M),o("caret",j),j=v(j,M),o("tildes",j),j=P(j,M),o("xrange",j),j=H(j,M),o("stars",j),j),d=j=>!j||j.toLowerCase()==="x"||j==="*",v=(j,M)=>j.
625
+ trim().split(/\s+/).map(z=>$(z,M)).join(" "),$=(j,M)=>{const z=M.loose?u[c.TILDELOOSE]:u[c.TILDE];return j.replace(z,(F,G,Q,q,A)=>{o("tilde",j,F,G,Q,q,A);let D;return d(G)?D="":d(Q)?D=`>=${G}.0.0 <${+G+1}.0.0-0`:d(q)?D=`>=${G}.${Q}.0 <${G}.${+Q+1}.0-0`:A?(o("replaceTilde pr",A),D=`>=${G}.${Q}.${q}-${A} <${G}.${+Q+1}.0-0`):D=`>=${G}.${Q}.${q} <${G}.${+Q+1}.0-0`,o("tilde return",D),D})},w=(j,M)=>j.trim().split(/\s+/).map(z=>b(z,M)).join(" "),b=(j,M)=>{o("caret",j,M);const z=M.loose?u[c.CARETLOOSE]:
626
+ u[c.CARET],F=M.includePrerelease?"-0":"";return j.replace(z,(G,Q,q,A,D)=>{o("caret",j,G,Q,q,A,D);let T;return d(Q)?T="":d(q)?T=`>=${Q}.0.0${F} <${+Q+1}.0.0-0`:d(A)?Q==="0"?T=`>=${Q}.${q}.0${F} <${Q}.${+q+1}.0-0`:T=`>=${Q}.${q}.0${F} <${+Q+1}.0.0-0`:D?(o("replaceCaret pr",D),Q==="0"?q==="0"?T=`>=${Q}.${q}.${A}-${D} <${Q}.${q}.${+A+1}-0`:T=`>=${Q}.${q}.${A}-${D} <${Q}.${+q+1}.0-0`:T=`>=${Q}.${q}.${A}-${D} <${+Q+1}.0.0-0`):(o("no pr"),Q==="0"?q==="0"?T=`>=${Q}.${q}.${A}${F} <${Q}.${q}.${+A+1}-0`:T=
627
+ `>=${Q}.${q}.${A}${F} <${Q}.${+q+1}.0-0`:T=`>=${Q}.${q}.${A} <${+Q+1}.0.0-0`),o("caret return",T),T})},P=(j,M)=>(o("replaceXRanges",j,M),j.split(/\s+/).map(z=>I(z,M)).join(" ")),I=(j,M)=>{j=j.trim();const z=M.loose?u[c.XRANGELOOSE]:u[c.XRANGE];return j.replace(z,(F,G,Q,q,A,D)=>{o("xRange",j,F,G,Q,q,A,D);const T=d(Q),R=T||d(q),E=R||d(A),C=E;return G==="="&&C&&(G=""),D=M.includePrerelease?"-0":"",T?G===">"||G==="<"?F="<0.0.0-0":F="*":G&&C?(R&&(q=0),A=0,G===">"?(G=">=",R?(Q=+Q+1,q=0,A=0):(q=+q+1,A=
628
+ 0)):G==="<="&&(G="<",R?Q=+Q+1:q=+q+1),G==="<"&&(D="-0"),F=`${G+Q}.${q}.${A}${D}`):R?F=`>=${Q}.0.0${D} <${+Q+1}.0.0-0`:E&&(F=`>=${Q}.${q}.0${D} <${Q}.${+q+1}.0-0`),o("xRange return",F),F})},H=(j,M)=>(o("replaceStars",j,M),j.trim().replace(u[c.STAR],"")),x=(j,M)=>(o("replaceGTE0",j,M),j.trim().replace(u[M.includePrerelease?c.GTE0PRE:c.GTE0],"")),U=j=>(M,z,F,G,Q,q,A,D,T,R,E,C)=>(d(F)?z="":d(G)?z=`>=${F}.0.0${j?"-0":""}`:d(Q)?z=`>=${F}.${G}.0${j?"-0":""}`:q?z=`>=${z}`:z=`>=${z}${j?"-0":""}`,d(T)?D="":
629
+ d(R)?D=`<${+T+1}.0.0-0`:d(E)?D=`<${T}.${+R+1}.0-0`:C?D=`<=${T}.${R}.${E}-${C}`:j?D=`<${T}.${R}.${+E+1}-0`:D=`<=${D}`,`${z} ${D}`.trim()),L=(j,M,z)=>{for(let F=0;F<j.length;F++)if(!j[F].test(M))return!1;if(M.prerelease.length&&!z.includePrerelease){for(let F=0;F<j.length;F++)if(o(j[F].semver),j[F].semver!==a.ANY&&j[F].semver.prerelease.length>0){const G=j[F].semver;if(G.major===M.major&&G.minor===M.minor&&G.patch===M.patch)return!0}return!1}return!0};return oo}var ao,zl;function cn(){if(zl)return ao;
630
+ zl=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(l,m){if(m=r(m),l instanceof t){if(l.loose===!!m.loose)return l;l=l.value}l=l.trim().split(/\s+/).join(" "),o("comparator",l,m),this.options=m,this.loose=!!m.loose,this.parse(l),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(l){const m=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],y=l.match(m);if(!y)throw new TypeError(`Invalid comparator: ${l}`);this.operator=
631
+ y[1]!==void 0?y[1]:"",this.operator==="="&&(this.operator=""),y[2]?this.semver=new s(y[2],this.options.loose):this.semver=e}toString(){return this.value}test(l){if(o("Comparator.test",l,this.options.loose),this.semver===e||l===e)return!0;if(typeof l=="string")try{l=new s(l,this.options)}catch{return!1}return a(l,this.operator,this.semver,this.options)}intersects(l,m){if(!(l instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new u(l.value,m).
632
+ test(this.value):l.operator===""?l.value===""?!0:new u(this.value,m).test(l.semver):(m=r(m),m.includePrerelease&&(this.value==="<0.0.0-0"||l.value==="<0.0.0-0")||!m.includePrerelease&&(this.value.startsWith("<0.0.0")||l.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&l.operator.startsWith(">")||this.operator.startsWith("<")&&l.operator.startsWith("<")||this.semver.version===l.semver.version&&this.operator.includes("=")&&l.operator.includes("=")||a(this.semver,"<",l.semver,m)&&this.
633
+ operator.startsWith(">")&&l.operator.startsWith("<")||a(this.semver,">",l.semver,m)&&this.operator.startsWith("<")&&l.operator.startsWith(">")))}}ao=t;const r=Cs(),{safeRe:n,t:i}=Dt(),a=Hl(),o=on(),s=Se(),u=Le();return ao}var io,Gl;function un(){if(Gl)return io;Gl=1;const e=Le();return io=(r,n,i)=>{try{n=new e(n,i)}catch{return!1}return n.test(r)},io}var co,Bl;function ty(){if(Bl)return co;Bl=1;const e=Le();return co=(r,n)=>new e(r,n).set.map(i=>i.map(a=>a.value).join(" ").trim().split(" ")),co}
634
+ var uo,Kl;function ry(){if(Kl)return uo;Kl=1;const e=Se(),t=Le();return uo=(n,i,a)=>{let o=null,s=null,u=null;try{u=new t(i,a)}catch{return null}return n.forEach(c=>{u.test(c)&&(!o||s.compare(c)===-1)&&(o=c,s=new e(o,a))}),o},uo}var lo,Wl;function ny(){if(Wl)return lo;Wl=1;const e=Se(),t=Le();return lo=(n,i,a)=>{let o=null,s=null,u=null;try{u=new t(i,a)}catch{return null}return n.forEach(c=>{u.test(c)&&(!o||s.compare(c)===1)&&(o=c,s=new e(o,a))}),o},lo}var fo,Xl;function sy(){if(Xl)return fo;Xl=
635
+ 1;const e=Se(),t=Le(),r=an();return fo=(i,a)=>{i=new t(i,a);let o=new e("0.0.0");if(i.test(o)||(o=new e("0.0.0-0"),i.test(o)))return o;o=null;for(let s=0;s<i.set.length;++s){const u=i.set[s];let c=null;u.forEach(l=>{const m=new e(l.semver.version);switch(l.operator){case">":m.prerelease.length===0?m.patch++:m.prerelease.push(0),m.raw=m.format();case"":case">=":(!c||r(m,c))&&(c=m);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${l.operator}`)}}),c&&(!o||r(o,c))&&(o=c)}
636
+ return o&&i.test(o)?o:null},fo}var po,Jl;function oy(){if(Jl)return po;Jl=1;const e=Le();return po=(r,n)=>{try{return new e(r,n).range||"*"}catch{return null}},po}var ho,Yl;function mo(){if(Yl)return ho;Yl=1;const e=Se(),t=cn(),{ANY:r}=t,n=Le(),i=un(),a=an(),o=Xs(),s=to(),u=Zs();return ho=(l,m,y,_)=>{l=new e(l,_),m=new n(m,_);let S,g,h,p,f;switch(y){case">":S=a,g=s,h=o,p=">",f=">=";break;case"<":S=o,g=u,h=a,p="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(
637
+ l,m,_))return!1;for(let d=0;d<m.set.length;++d){const v=m.set[d];let $=null,w=null;if(v.forEach(b=>{b.semver===r&&(b=new t(">=0.0.0")),$=$||b,w=w||b,S(b.semver,$.semver,_)?$=b:h(b.semver,w.semver,_)&&(w=b)}),$.operator===p||$.operator===f||(!w.operator||w.operator===p)&&g(l,w.semver))return!1;if(w.operator===f&&h(l,w.semver))return!1}return!0},ho}var yo,Ql;function ay(){if(Ql)return yo;Ql=1;const e=mo();return yo=(r,n,i)=>e(r,n,">",i),yo}var go,Zl;function iy(){if(Zl)return go;Zl=1;const e=mo();
638
+ return go=(r,n,i)=>e(r,n,"<",i),go}var vo,ef;function cy(){if(ef)return vo;ef=1;const e=Le();return vo=(r,n,i)=>(r=new e(r,i),n=new e(n,i),r.intersects(n,i)),vo}var $o,tf;function uy(){if(tf)return $o;tf=1;const e=un(),t=je();return $o=(r,n,i)=>{const a=[];let o=null,s=null;const u=r.sort((y,_)=>t(y,_,i));for(const y of u)e(y,n,i)?(s=y,o||(o=y)):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);const c=[];for(const[y,_]of a)y===_?c.push(y):!_&&y===u[0]?c.push("*"):_?y===u[0]?c.push(`<=${_}`):
639
+ c.push(`${y} - ${_}`):c.push(`>=${y}`);const l=c.join(" || "),m=typeof n.raw=="string"?n.raw:String(n);return l.length<m.length?l:n},$o}var _o,rf;function ly(){if(rf)return _o;rf=1;const e=Le(),t=cn(),{ANY:r}=t,n=un(),i=je(),a=(m,y,_={})=>{if(m===y)return!0;m=new e(m,_),y=new e(y,_);let S=!1;e:for(const g of m.set){for(const h of y.set){const p=u(g,h,_);if(S=S||p!==null,p)continue e}if(S)return!1}return!0},o=[new t(">=0.0.0-0")],s=[new t(">=0.0.0")],u=(m,y,_)=>{if(m===y)return!0;if(m.length===1&&
640
+ m[0].semver===r){if(y.length===1&&y[0].semver===r)return!0;_.includePrerelease?m=o:m=s}if(y.length===1&&y[0].semver===r){if(_.includePrerelease)return!0;y=s}const S=new Set;let g,h;for(const P of m)P.operator===">"||P.operator===">="?g=c(g,P,_):P.operator==="<"||P.operator==="<="?h=l(h,P,_):S.add(P.semver);if(S.size>1)return null;let p;if(g&&h){if(p=i(g.semver,h.semver,_),p>0)return null;if(p===0&&(g.operator!==">="||h.operator!=="<="))return null}for(const P of S){if(g&&!n(P,String(g),_)||h&&!n(
641
+ P,String(h),_))return null;for(const I of y)if(!n(P,String(I),_))return!1;return!0}let f,d,v,$,w=h&&!_.includePrerelease&&h.semver.prerelease.length?h.semver:!1,b=g&&!_.includePrerelease&&g.semver.prerelease.length?g.semver:!1;w&&w.prerelease.length===1&&h.operator==="<"&&w.prerelease[0]===0&&(w=!1);for(const P of y){if($=$||P.operator===">"||P.operator===">=",v=v||P.operator==="<"||P.operator==="<=",g){if(b&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===b.major&&P.semver.minor===
642
+ b.minor&&P.semver.patch===b.patch&&(b=!1),P.operator===">"||P.operator===">="){if(f=c(g,P,_),f===P&&f!==g)return!1}else if(g.operator===">="&&!n(g.semver,String(P),_))return!1}if(h){if(w&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===w.major&&P.semver.minor===w.minor&&P.semver.patch===w.patch&&(w=!1),P.operator==="<"||P.operator==="<="){if(d=l(h,P,_),d===P&&d!==h)return!1}else if(h.operator==="<="&&!n(h.semver,String(P),_))return!1}if(!P.operator&&(h||g)&&p!==0)return!1}return!(g&&
643
+ v&&!h&&p!==0||h&&$&&!g&&p!==0||b||w)},c=(m,y,_)=>{if(!m)return y;const S=i(m.semver,y.semver,_);return S>0?m:S<0||y.operator===">"&&m.operator===">="?y:m},l=(m,y,_)=>{if(!m)return y;const S=i(m.semver,y.semver,_);return S<0?m:S>0||y.operator==="<"&&m.operator==="<="?y:m};return _o=a,_o}var wo,nf;function fy(){if(nf)return wo;nf=1;const e=Dt(),t=sn(),r=Se(),n=hl(),i=vt(),a=Um(),o=Fm(),s=Vm(),u=zm(),c=Gm(),l=Bm(),m=Km(),y=Wm(),_=je(),S=Xm(),g=Jm(),h=zs(),p=Ym(),f=Qm(),d=an(),v=Xs(),$=jl(),w=Dl(),b=Zs(),
644
+ P=to(),I=Hl(),H=Zm(),x=cn(),U=Le(),L=un(),j=ty(),M=ry(),z=ny(),F=sy(),G=oy(),Q=mo(),q=ay(),A=iy(),D=cy(),T=uy(),R=ly();return wo={parse:i,valid:a,clean:o,inc:s,diff:u,major:c,minor:l,patch:m,prerelease:y,compare:_,rcompare:S,compareLoose:g,compareBuild:h,sort:p,rsort:f,gt:d,lt:v,eq:$,neq:w,gte:b,lte:P,cmp:I,coerce:H,Comparator:x,Range:U,satisfies:L,toComparators:j,maxSatisfying:M,minSatisfying:z,minVersion:F,validRange:G,outside:Q,gtr:q,ltr:A,intersects:D,simplifyRange:T,subset:R,SemVer:r,re:e.re,
644
645
  src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},wo}var bo=fy();const $t=mn(bo),dy=Object.prototype.toString,py="[object Uint8Array]",hy="[object ArrayBuffer]";function sf(e,t,r){return e?e.constructor===t?!0:dy.call(e)===r:!1}function of(e){return sf(e,Uint8Array,py)}function my(e){return sf(e,ArrayBuffer,hy)}function yy(e){return of(e)||my(e)}function gy(e){if(!of(e))throw new TypeError(
645
- `Expected \`Uint8Array\`, got \`${typeof e}\``)}function vy(e){if(!yy(e))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``)}function af(e,t){if(e.length===0)return new Uint8Array(0);t??=e.reduce((i,o)=>i+o.length,0);const r=new Uint8Array(t);let n=0;for(const i of e)gy(i),r.set(i,n),n+=i.length;return r}const cf={utf8:new globalThis.TextDecoder("utf8")};function uf(e,t="utf8"){return vy(e),cf[t]??=new globalThis.TextDecoder(t),cf[t].decode(e)}function $y(e){if(typeof e!=
646
- "string")throw new TypeError(`Expected \`string\`, got \`${typeof e}\``)}const _y=new globalThis.TextEncoder;function Eo(e){return $y(e),_y.encode(e)}Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));const wy=Om.default,lf="aes-256-cbc",_t=()=>Object.create(null),by=e=>e!=null,Ey=(e,t)=>{const r=new Set(["undefined","symbol","function"]),n=typeof t;if(r.has(n))throw new TypeError(`Setting a value of type \`${n}\` for key \`${e}\` is not allowed as it's not supported by JSON`)},ln="_\
646
+ `Expected \`Uint8Array\`, got \`${typeof e}\``)}function vy(e){if(!yy(e))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``)}function af(e,t){if(e.length===0)return new Uint8Array(0);t??=e.reduce((i,a)=>i+a.length,0);const r=new Uint8Array(t);let n=0;for(const i of e)gy(i),r.set(i,n),n+=i.length;return r}const cf={utf8:new globalThis.TextDecoder("utf8")};function uf(e,t="utf8"){return vy(e),cf[t]??=new globalThis.TextDecoder(t),cf[t].decode(e)}function $y(e){if(typeof e!=
647
+ "string")throw new TypeError(`Expected \`string\`, got \`${typeof e}\``)}const _y=new globalThis.TextEncoder;function Eo(e){return $y(e),_y.encode(e)}Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));const wy=Nm.default,lf="aes-256-cbc",_t=()=>Object.create(null),by=e=>e!=null,Ey=(e,t)=>{const r=new Set(["undefined","symbol","function"]),n=typeof t;if(r.has(n))throw new TypeError(`Setting a value of type \`${n}\` for key \`${e}\` is not allowed as it's not supported by JSON`)},ln="_\
647
648
  _internal__",So=`${ln}.migrations.version`;class Sy{path;events;#n;#t;#e;#r={};constructor(t={}){const r={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...t};if(!r.cwd){if(!r.projectName)throw new Error("Please specify the `projectName` option.");r.cwd=qp(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(
648
- "The `schema` option must be an object.");const a=new bm.Ajv2020({allErrors:!0,useDefaults:!0,...r.ajvOptions});wy(a);const s={...r.rootSchema,type:"object",properties:r.schema};this.#n=a.compile(s);for(const[u,c]of Object.entries(r.schema??{}))c?.default&&(this.#r[u]=c.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.
649
- fileExtension}`:"";this.path=ie.resolve(r.cwd,`${r.configName??"config"}${n}`);const i=this.store,o=Object.assign(_t(),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(o);try{ld.deepEqual(i,o)}catch{this.store=o}r.watch&&this._watch()}get(t,r){if(this.#e.accessPropertiesByDotNotation)return this._get(t,r);const{store:n}=this;return t in n?n[t]:r}set(t,r){
650
- if(typeof t!="string"&&typeof t!="object")throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof t}`);if(typeof t!="object"&&r===void 0)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(t))throw new TypeError(`Please don't use the ${ln} key, as it's used to manage this module internal operations.`);const{store:n}=this,i=(o,a)=>{Ey(o,a),this.#e.accessPropertiesByDotNotation?Ba(n,o,a):n[o]=a};if(typeof t=="object"){const o=t;for(const[
651
- a,s]of Object.entries(o))i(a,s)}else i(t,r);this.store=n}has(t){return this.#e.accessPropertiesByDotNotation?Ip(this.store,t):t in this.store}reset(...t){for(const r of t)by(this.#r[r])&&this.set(r,this.#r[r])}delete(t){const{store:r}=this;this.#e.accessPropertiesByDotNotation?Op(r,t):delete r[t],this.store=r}clear(){this.store=_t();for(const t of Object.keys(this.#r))this.reset(t)}onDidChange(t,r){if(typeof t!="string")throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof t}`);
649
+ "The `schema` option must be an object.");const o=new bm.Ajv2020({allErrors:!0,useDefaults:!0,...r.ajvOptions});wy(o);const s={...r.rootSchema,type:"object",properties:r.schema};this.#n=o.compile(s);for(const[u,c]of Object.entries(r.schema??{}))c?.default&&(this.#r[u]=c.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.
650
+ fileExtension}`:"";this.path=ie.resolve(r.cwd,`${r.configName??"config"}${n}`);const i=this.store,a=Object.assign(_t(),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(a);try{ld.deepEqual(i,a)}catch{this.store=a}r.watch&&this._watch()}get(t,r){if(this.#e.accessPropertiesByDotNotation)return this._get(t,r);const{store:n}=this;return t in n?n[t]:r}set(t,r){
651
+ if(typeof t!="string"&&typeof t!="object")throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof t}`);if(typeof t!="object"&&r===void 0)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(t))throw new TypeError(`Please don't use the ${ln} key, as it's used to manage this module internal operations.`);const{store:n}=this,i=(a,o)=>{Ey(a,o),this.#e.accessPropertiesByDotNotation?Ba(n,a,o):n[a]=o};if(typeof t=="object"){const a=t;for(const[
652
+ o,s]of Object.entries(a))i(o,s)}else i(t,r);this.store=n}has(t){return this.#e.accessPropertiesByDotNotation?Ip(this.store,t):t in this.store}reset(...t){for(const r of t)by(this.#r[r])&&this.set(r,this.#r[r])}delete(t){const{store:r}=this;this.#e.accessPropertiesByDotNotation?Np(r,t):delete r[t],this.store=r}clear(){this.store=_t();for(const t of Object.keys(this.#r))this.reset(t)}onDidChange(t,r){if(typeof t!="string")throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof t}`);
652
653
  if(typeof r!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof r}`);return this._handleChange(()=>this.get(t),r)}onDidAnyChange(t){if(typeof t!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof t}`);return this._handleChange(()=>this.store,t)}get size(){return Object.keys(this.store).length}get store(){try{const t=se.readFileSync(this.path,this.#t?null:"utf8"),r=this._encryptData(t),n=this._deserialize(r);return this.
653
654
  _validate(n),Object.assign(_t(),n)}catch(t){if(t?.code==="ENOENT")return this._ensureDirectory(),_t();if(this.#e.clearInvalidConfig&&t.name==="SyntaxError")return _t();throw t}}set store(t){this._ensureDirectory(),this._validate(t),this._write(t),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(const[t,r]of Object.entries(this.store))yield[t,r]}_encryptData(t){if(!this.#t)return typeof t=="string"?t:uf(t);try{const r=t.slice(0,16),n=Pt.pbkdf2Sync(this.#t,r.toString(),1e4,32,
654
- "sha512"),i=Pt.createDecipheriv(lf,n,r),o=t.slice(17),a=typeof o=="string"?Eo(o):o;return uf(af([i.update(a),i.final()]))}catch{}return t.toString()}_handleChange(t,r){let n=t();const i=()=>{const o=n,a=t();ud(a,o)||(n=a,r.call(this,a,o))};return this.events.addEventListener("change",i),()=>{this.events.removeEventListener("change",i)}}_deserialize=t=>JSON.parse(t);_serialize=t=>JSON.stringify(t,void 0," ");_validate(t){if(!this.#n||this.#n(t)||!this.#n.errors)return;const n=this.#n.errors.map(({
655
- instancePath:i,message:o=""})=>`\`${i.slice(1)}\` ${o}`);throw new Error("Config schema violation: "+n.join("; "))}_ensureDirectory(){se.mkdirSync(ie.dirname(this.path),{recursive:!0})}_write(t){let r=this._serialize(t);if(this.#t){const n=Pt.randomBytes(16),i=Pt.pbkdf2Sync(this.#t,n.toString(),1e4,32,"sha512"),o=Pt.createCipheriv(lf,i,n);r=af([n,Eo(":"),o.update(Eo(r)),o.final()])}if(me.env.SNAP)se.writeFileSync(this.path,r,{mode:this.#e.configFileMode});else try{Ya(this.path,r,{mode:this.#e.configFileMode})}catch(n){
656
- if(n?.code==="EXDEV"){se.writeFileSync(this.path,r,{mode:this.#e.configFileMode});return}throw n}}_watch(){this._ensureDirectory(),se.existsSync(this.path)||this._write(_t()),me.platform==="win32"?se.watch(this.path,{persistent:!1},cl(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100})):se.watchFile(this.path,{persistent:!1},cl(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5e3}))}_migrate(t,r,n){let i=this._get(So,"0.0.0");const o=Object.keys(t).filter(s=>this._shouldPerformMigration(
657
- s,i,r));let a={...this.store};for(const s of o)try{n&&n(this,{fromVersion:i,toVersion:s,finalVersion:r,versions:o});const u=t[s];u?.(this),this._set(So,s),i=s,a={...this.store}}catch(u){throw this.store=a,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${u}`)}(this._isVersionInRangeFormat(i)||!$t.eq(i,r))&&this._set(So,r)}_containsReservedKey(t){return typeof t=="object"&&Object.keys(t)[0]===ln?!0:typeof t!="string"?
658
- !1:this.#e.accessPropertiesByDotNotation?!!t.startsWith(`${ln}.`):!1}_isVersionInRangeFormat(t){return $t.clean(t)===null}_shouldPerformMigration(t,r,n){return this._isVersionInRangeFormat(t)?r!=="0.0.0"&&$t.satisfies(r,t)?!1:$t.satisfies(n,t):!($t.lte(t,r)||$t.gt(t,n))}_get(t,r){return Np(this.store,t,r)}_set(t,r){const{store:n}=this;Ba(n,t,r),this.store=n}}class ff extends Error{response;request;options;constructor(t,r,n){const i=t.status||t.status===0?t.status:"",o=t.statusText||"",a=`${i} ${o}`.
659
- trim(),s=a?`status code ${a}`:"an unknown error";super(`Request failed with ${s}: ${r.method} ${r.url}`),this.name="HTTPError",this.response=t,this.request=r,this.options=n}}class df extends Error{request;constructor(t){super(`Request timed out: ${t.method} ${t.url}`),this.name="TimeoutError",this.request=t}}const pf=(()=>{let e=!1,t=!1;const r=typeof globalThis.ReadableStream=="function",n=typeof globalThis.Request=="function";if(r&&n)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.
655
+ "sha512"),i=Pt.createDecipheriv(lf,n,r),a=t.slice(17),o=typeof a=="string"?Eo(a):a;return uf(af([i.update(o),i.final()]))}catch{}return t.toString()}_handleChange(t,r){let n=t();const i=()=>{const a=n,o=t();ud(o,a)||(n=o,r.call(this,o,a))};return this.events.addEventListener("change",i),()=>{this.events.removeEventListener("change",i)}}_deserialize=t=>JSON.parse(t);_serialize=t=>JSON.stringify(t,void 0," ");_validate(t){if(!this.#n||this.#n(t)||!this.#n.errors)return;const n=this.#n.errors.map(({
656
+ instancePath:i,message:a=""})=>`\`${i.slice(1)}\` ${a}`);throw new Error("Config schema violation: "+n.join("; "))}_ensureDirectory(){se.mkdirSync(ie.dirname(this.path),{recursive:!0})}_write(t){let r=this._serialize(t);if(this.#t){const n=Pt.randomBytes(16),i=Pt.pbkdf2Sync(this.#t,n.toString(),1e4,32,"sha512"),a=Pt.createCipheriv(lf,i,n);r=af([n,Eo(":"),a.update(Eo(r)),a.final()])}if(me.env.SNAP)se.writeFileSync(this.path,r,{mode:this.#e.configFileMode});else try{Ya(this.path,r,{mode:this.#e.configFileMode})}catch(n){
657
+ if(n?.code==="EXDEV"){se.writeFileSync(this.path,r,{mode:this.#e.configFileMode});return}throw n}}_watch(){this._ensureDirectory(),se.existsSync(this.path)||this._write(_t()),me.platform==="win32"?se.watch(this.path,{persistent:!1},cl(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100})):se.watchFile(this.path,{persistent:!1},cl(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5e3}))}_migrate(t,r,n){let i=this._get(So,"0.0.0");const a=Object.keys(t).filter(s=>this._shouldPerformMigration(
658
+ s,i,r));let o={...this.store};for(const s of a)try{n&&n(this,{fromVersion:i,toVersion:s,finalVersion:r,versions:a});const u=t[s];u?.(this),this._set(So,s),i=s,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)||!$t.eq(i,r))&&this._set(So,r)}_containsReservedKey(t){return typeof t=="object"&&Object.keys(t)[0]===ln?!0:typeof t!="string"?
659
+ !1:this.#e.accessPropertiesByDotNotation?!!t.startsWith(`${ln}.`):!1}_isVersionInRangeFormat(t){return $t.clean(t)===null}_shouldPerformMigration(t,r,n){return this._isVersionInRangeFormat(t)?r!=="0.0.0"&&$t.satisfies(r,t)?!1:$t.satisfies(n,t):!($t.lte(t,r)||$t.gt(t,n))}_get(t,r){return Op(this.store,t,r)}_set(t,r){const{store:n}=this;Ba(n,t,r),this.store=n}}class ff extends Error{response;request;options;constructor(t,r,n){const i=t.status||t.status===0?t.status:"",a=t.statusText||"",o=`${i} ${a}`.
660
+ trim(),s=o?`status code ${o}`:"an unknown error";super(`Request failed with ${s}: ${r.method} ${r.url}`),this.name="HTTPError",this.response=t,this.request=r,this.options=n}}class df extends Error{request;constructor(t){super(`Request timed out: ${t.method} ${t.url}`),this.name="TimeoutError",this.request=t}}const pf=(()=>{let e=!1,t=!1;const r=typeof globalThis.ReadableStream=="function",n=typeof globalThis.Request=="function";if(r&&n)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.
660
661
  ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return e&&!t})(),Ry=typeof globalThis.AbortController=="function",Ay=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",Py=typeof globalThis.ReadableStream=="function",Cy=typeof globalThis.FormData=="function",hf=["get","post","put","patch","head","delete"],ky={json:"application/j\
661
- son",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Ro=2147483647,Ty=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,mf=Symbol("stop"),Ny={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},Oy={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,
662
+ son",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Ro=2147483647,Ty=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,mf=Symbol("stop"),Oy={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},Ny={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,
662
663
  window:!0,dispatcher:!0,duplex:!0,priority:!0},Iy=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[r,n]of e)t+=Ty,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${r}"`).length,t+=typeof n=="string"?new TextEncoder().encode(n).length:n.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if(typeof e=="string")return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).
663
- length;if("byteLength"in e)return e.byteLength;if(typeof e=="object"&&e!==null)try{const t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{return 0}return 0},jy=(e,t)=>{const r=Number(e.headers.get("content-length"))||0;let n=0;return e.status===204?(t&&t({percent:1,totalBytes:r,transferredBytes:n},new Uint8Array),new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new Response(new ReadableStream({async start(i){const o=e.body.getReader();t&&t({percent:0,
664
- transferredBytes:0,totalBytes:r},new Uint8Array);async function a(){const{done:s,value:u}=await o.read();if(s){i.close();return}if(t){n+=u.byteLength;const c=r===0?0:n/r;t({percent:c,transferredBytes:n,totalBytes:r},u)}i.enqueue(u),await a()}await a()}}),{status:e.status,statusText:e.statusText,headers:e.headers})},Ly=(e,t)=>{const r=Iy(e.body);let n=0;return new Request(e,{duplex:"half",body:new ReadableStream({async start(i){const o=e.body instanceof ReadableStream?e.body.getReader():new Response(
665
- "").body.getReader();async function a(){const{done:s,value:u}=await o.read();if(s){t&&t({percent:1,transferredBytes:n,totalBytes:Math.max(r,n)},new Uint8Array),i.close();return}n+=u.byteLength;let c=r===0?0:n/r;(r<n||c===1)&&(c=.99),t&&t({percent:Number(c.toFixed(2)),transferredBytes:n,totalBytes:r},u),i.enqueue(u),await a()}await a()}})})},Dt=e=>e!==null&&typeof e=="object",fn=(...e)=>{for(const t of e)if((!Dt(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be\
666
- an object");return Ao({},...e)},yf=(e={},t={})=>{const r=new globalThis.Headers(e),n=t instanceof globalThis.Headers,i=new globalThis.Headers(t);for(const[o,a]of i.entries())n&&a==="undefined"||a===void 0?r.delete(o):r.set(o,a);return r};function dn(e,t,r){return Object.hasOwn(t,r)&&t[r]===void 0?[]:Ao(e[r]??[],t[r]??[])}const gf=(e={},t={})=>({beforeRequest:dn(e,t,"beforeRequest"),beforeRetry:dn(e,t,"beforeRetry"),afterResponse:dn(e,t,"afterResponse"),beforeError:dn(e,t,"beforeError")}),Ao=(...e)=>{
667
- let t={},r={},n={};for(const i of e)if(Array.isArray(i))Array.isArray(t)||(t=[]),t=[...t,...i];else if(Dt(i)){for(let[o,a]of Object.entries(i))Dt(a)&&o in t&&(a=Ao(t[o],a)),t={...t,[o]:a};Dt(i.hooks)&&(n=gf(n,i.hooks),t.hooks=n),Dt(i.headers)&&(r=yf(r,i.headers),t.headers=r)}return t},Dy=e=>hf.includes(e)?e.toUpperCase():e,qy=["get","put","head","delete","options","trace"],xy=[408,413,429,500,502,503,504],My=[413,429,503],vf={limit:2,methods:qy,statusCodes:xy,afterStatusCodes:My,maxRetryAfter:Number.
668
- POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},Hy=(e={})=>{if(typeof e=="number")return{...vf,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...vf,...e}};async function Uy(e,t,r,n){return new Promise((i,o)=>{const a=setTimeout(()=>{r&&r.abort(),o(new df(e))},n.timeout);n.fetch(e,t).then(i).catch(o).then(
669
- ()=>{clearTimeout(a)})})}async function Fy(e,{signal:t}){return new Promise((r,n)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(o),n(t.reason)}const o=setTimeout(()=>{t?.removeEventListener("abort",i),r()},e)})}const Vy=(e,t)=>{const r={};for(const n in t)!(n in Oy)&&!(n in Ny)&&!(n in e)&&(r[n]=t[n]);return r};class hn{static create(t,r){const n=new hn(t,r),i=async()=>{if(typeof n._options.timeout=="number"&&n._options.timeout>Ro)throw new RangeError(
664
+ length;if("byteLength"in e)return e.byteLength;if(typeof e=="object"&&e!==null)try{const t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{return 0}return 0},jy=(e,t)=>{const r=Number(e.headers.get("content-length"))||0;let n=0;return e.status===204?(t&&t({percent:1,totalBytes:r,transferredBytes:n},new Uint8Array),new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new Response(new ReadableStream({async start(i){const a=e.body.getReader();t&&t({percent:0,
665
+ transferredBytes:0,totalBytes:r},new Uint8Array);async function o(){const{done:s,value:u}=await a.read();if(s){i.close();return}if(t){n+=u.byteLength;const c=r===0?0:n/r;t({percent:c,transferredBytes:n,totalBytes:r},u)}i.enqueue(u),await o()}await o()}}),{status:e.status,statusText:e.statusText,headers:e.headers})},Ly=(e,t)=>{const r=Iy(e.body);let n=0;return new Request(e,{duplex:"half",body:new ReadableStream({async start(i){const a=e.body instanceof ReadableStream?e.body.getReader():new Response(
666
+ "").body.getReader();async function o(){const{done:s,value:u}=await a.read();if(s){t&&t({percent:1,transferredBytes:n,totalBytes:Math.max(r,n)},new Uint8Array),i.close();return}n+=u.byteLength;let c=r===0?0:n/r;(r<n||c===1)&&(c=.99),t&&t({percent:Number(c.toFixed(2)),transferredBytes:n,totalBytes:r},u),i.enqueue(u),await o()}await o()}})})},qt=e=>e!==null&&typeof e=="object",fn=(...e)=>{for(const t of e)if((!qt(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be\
667
+ an object");return Ao({},...e)},yf=(e={},t={})=>{const r=new globalThis.Headers(e),n=t instanceof globalThis.Headers,i=new globalThis.Headers(t);for(const[a,o]of i.entries())n&&o==="undefined"||o===void 0?r.delete(a):r.set(a,o);return r};function dn(e,t,r){return Object.hasOwn(t,r)&&t[r]===void 0?[]:Ao(e[r]??[],t[r]??[])}const gf=(e={},t={})=>({beforeRequest:dn(e,t,"beforeRequest"),beforeRetry:dn(e,t,"beforeRetry"),afterResponse:dn(e,t,"afterResponse"),beforeError:dn(e,t,"beforeError")}),Ao=(...e)=>{
668
+ let t={},r={},n={};for(const i of e)if(Array.isArray(i))Array.isArray(t)||(t=[]),t=[...t,...i];else if(qt(i)){for(let[a,o]of Object.entries(i))qt(o)&&a in t&&(o=Ao(t[a],o)),t={...t,[a]:o};qt(i.hooks)&&(n=gf(n,i.hooks),t.hooks=n),qt(i.headers)&&(r=yf(r,i.headers),t.headers=r)}return t},Dy=e=>hf.includes(e)?e.toUpperCase():e,qy=["get","put","head","delete","options","trace"],xy=[408,413,429,500,502,503,504],My=[413,429,503],vf={limit:2,methods:qy,statusCodes:xy,afterStatusCodes:My,maxRetryAfter:Number.
669
+ POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},Hy=(e={})=>{if(typeof e=="number")return{...vf,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...vf,...e}};async function Uy(e,t,r,n){return new Promise((i,a)=>{const o=setTimeout(()=>{r&&r.abort(),a(new df(e))},n.timeout);n.fetch(e,t).then(i).catch(a).then(
670
+ ()=>{clearTimeout(o)})})}async function Fy(e,{signal:t}){return new Promise((r,n)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(a),n(t.reason)}const a=setTimeout(()=>{t?.removeEventListener("abort",i),r()},e)})}const Vy=(e,t)=>{const r={};for(const n in t)!(n in Ny)&&!(n in Oy)&&!(n in e)&&(r[n]=t[n]);return r};class hn{static create(t,r){const n=new hn(t,r),i=async()=>{if(typeof n._options.timeout=="number"&&n._options.timeout>Ro)throw new RangeError(
670
671
  `The \`timeout\` option cannot be greater than ${Ro}`);await Promise.resolve();let s=await n._fetch();for(const u of n._options.hooks.afterResponse){const c=await u(n.request,n._options,n._decorateResponse(s.clone()));c instanceof globalThis.Response&&(s=c)}if(n._decorateResponse(s),!s.ok&&n._options.throwHttpErrors){let u=new ff(s,n.request,n._options);for(const c of n._options.hooks.beforeError)u=await c(u);throw u}if(n._options.onDownloadProgress){if(typeof n._options.onDownloadProgress!="fun\
671
- ction")throw new TypeError("The `onDownloadProgress` option must be a function");if(!Py)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return jy(s.clone(),n._options.onDownloadProgress)}return s},a=(n._options.retry.methods.includes(n.request.method.toLowerCase())?n._retry(i):i()).finally(async()=>{n.request.bodyUsed||await n.request.body?.cancel()});for(const[s,u]of Object.entries(ky))a[s]=async()=>{n.request.headers.set("accept",n.request.headers.
672
- get("accept")||u);const c=await a;if(s==="json"){if(c.status===204||(await c.clone().arrayBuffer()).byteLength===0)return"";if(r.parseJson)return r.parseJson(await c.text())}return c[s]()};return a}request;abortController;_retryCount=0;_input;_options;constructor(t,r={}){if(this._input=t,this._options={...r,headers:yf(this._input.headers,r.headers),hooks:gf({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:Dy(r.method??this._input.method??"GET"),prefixUrl:String(r.
672
+ ction")throw new TypeError("The `onDownloadProgress` option must be a function");if(!Py)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return jy(s.clone(),n._options.onDownloadProgress)}return s},o=(n._options.retry.methods.includes(n.request.method.toLowerCase())?n._retry(i):i()).finally(async()=>{n.request.bodyUsed||await n.request.body?.cancel()});for(const[s,u]of Object.entries(ky))o[s]=async()=>{n.request.headers.set("accept",n.request.headers.
673
+ get("accept")||u);const c=await o;if(s==="json"){if(c.status===204||(await c.clone().arrayBuffer()).byteLength===0)return"";if(r.parseJson)return r.parseJson(await c.text())}return c[s]()};return o}request;abortController;_retryCount=0;_input;_options;constructor(t,r={}){if(this._input=t,this._options={...r,headers:yf(this._input.headers,r.headers),hooks:gf({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:Dy(r.method??this._input.method??"GET"),prefixUrl:String(r.
673
674
  prefixUrl||""),retry:Hy(r.retry),throwHttpErrors:r.throwHttpErrors!==!1,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.
674
675
  endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(Ry&&Ay){const n=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=n?AbortSignal.any([n,this.abortController.signal]):this.abortController.signal}if(pf&&(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.
675
- set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.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()),o=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,i);(Cy&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.
676
- headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(o,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!pf)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&
676
+ set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.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()),a=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,i);(Cy&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.
677
+ headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(a,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!pf)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&
677
678
  (this.request=Ly(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount>this._options.retry.limit||t instanceof df)throw t;if(t instanceof ff){if(!this._options.retry.statusCodes.includes(t.response.status))throw t;const n=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(n&&this._options.retry.afterStatusCodes.includes(
678
- t.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 o=this._options.retry.maxRetryAfter??i;return i<o?i:o}if(t.response.status===413)throw t}const r=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,r)}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(r){const n=Math.min(
679
+ t.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 a=this._options.retry.maxRetryAfter??i;return i<a?i:a}if(t.response.status===413)throw t}const r=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,r)}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(r){const n=Math.min(
679
680
  this._calculateRetryDelay(r),Ro);if(this._retryCount<1)throw r;await Fy(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})===mf)return;return this._retry(t)}}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 t=Vy(this.request,this._options),
680
681
  r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,t):Uy(r,t,this.abortController,this._options)}}const Po=e=>{const t=(r,n)=>hn.create(r,fn(e,n));for(const r of hf)t[r]=(n,i)=>hn.create(n,fn(e,i,{method:r}));return t.create=r=>Po(fn(r)),t.extend=r=>(typeof r=="function"&&(r=r(e??{})),Po(fn(e,r))),t.stop=mf,t},zy=Po(),Co=new Sy({projectName:xf,serialize:e=>lt.stringify(e,null,2),deserialize:e=>lt.parse(e)}),Gy=1e3*60*60*24,$f="check-update";function By(){
681
- if(Kf||Wf===$f)return;const e=Co.get("lastUpdateCheck"),t=Co.get("latestVersion");if(Mf(t)||Hf(e)||e+Gy<Date.now())try{Oo("likec4",["check-update"],{stdio:"ignore",preferLocal:!0,detached:!0,env:{NODE_ENV:$f}}).catch(()=>{})}catch{}t&&bo.gt(t,at)&&We(["Update available: ",j.dim(at),j.reset(" \u2192 "),j.green(t)].join(""))}async function Ky(){try{const e=await Wy();Rn(e,"No version found in latest npm"),Co.set({lastUpdateCheck:Date.now(),latestVersion:e}),bo.gt(e,at)?We(["Update available: ",j.dim(
682
- at),j.reset(" \u2192 "),j.green(e)].join("")):We(j.dim("Up to date: ")+" "+j.green(at))}catch(e){Ae.error(Mt(e))}}async function Wy(){return(await zy("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}const Xy=e=>e.command({command:"check-update",describe:"Check for updates",handler:async()=>{await Ky()}});function Jy(e,t){if(!t)return e.languageServices.projectsManager.ensureProjectId();
683
- const r=oe(t);if(r===e.workspace)return e.languageServices.projectsManager.ensureProjectId();if(He(r)&&Ff(r).isDirectory()){Ae.debug`Project path exists: ${r}`;const n=yn.file(r.endsWith(zo)?r:r+zo),i=e.languageServices.projects().find(o=>o.folder.fsPath===n.fsPath);if(i)return Ae.debug`Found project ${i.id} at path: ${r}`,i.id;Ae.debug`No project registered at path: ${r}`}return e.languageServices.projectsManager.ensureProjectId(t)}function pn(e,t){const r=Jy(e,t),n=e.languageServices.projectsManager.
684
- getProject(r);return e.languageServices.projectsManager.defaultProjectId=r,{projectId:r,projectFolder:n.folderUri.fsPath,config:n.config}}var _f=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),wf=e=>{throw TypeError(e)},Yy=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&wf("Object expected");var n,i;n=t[_f("asyncDispose")],n===void 0&&(n=t[_f("dispose")],i=n),typeof n!="function"&&wf("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(o){return Promise.reject(o)}}),e.
685
- push([r,n,t])}else e.push([r]);return t},Qy=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(a,s,u,c){return c=Error(u),c.name="SuppressedError",c.error=a,c.suppressed=s,c},i=a=>t=r?new n(a,t,"An error was suppressed during disposal"):(r=!0,a),o=a=>{for(;a=e.pop();)try{var s=a[1]&&a[1].call(a[2]);if(a[0])return Promise.resolve(s).then(o,u=>(i(u),o()))}catch(u){i(u)}if(r)throw t};return o()};const qt=Ae.getChild("generator");async function bf({name:e,path:t,useDotBin:r,
686
- project:n}){var i=[];try{const u=it(qt),c=Yy(i,await Pe.fromWorkspace(t,{logger:"vite",graphviz:r?"binary":"wasm",watch:!1}),!0),{projectId:l,config:m}=pn(c,n);n&&qt.info(`${j.dim("project")} ${j.green(l)}`);const y=m.generators?.[e];if(!y)throw qt.error(j.red(`generator ${e} does not exist in project config`)),new Error(`generator ${e} does not exist in project config`);qt.info(`${j.dim("generator")} ${j.green(e)}`);const _=await c.layoutedModel(l);await Zy({likec4:c,model:_,generator:y,logger:qt.
687
- getChild(e)}),u.stopAndLog()}catch(u){var o=u,a=!0}finally{var s=Qy(i,o,a);s&&await s}}async function Zy({likec4:e,model:t,generator:r,logger:n}){const i=e.languageServices,o=new Set,a=i.project(t.project.id),s=t.project.id;n.debug(`${j.dim("runnig for project:")} ${j.green(a.id)}`),await Promise.resolve().then(()=>r({likec4model:t,ctx:{workspace:e.languageServices.workspaceUri,project:a,locate:u=>{let c=null;switch(!0){case md(u):c=i.locate({element:u.id,projectId:s});break;case hd(u):c=i.locate(
688
- {view:u.id,projectId:s});break;case pd(u):c=i.locate({deployment:u.id,projectId:s});break;case dd(u):case fd(u):c=i.locate({relation:u.id,projectId:s});break;default:An(u)}if(!c)throw n.error(`Cannot locate ${u.id}`,{target:u}),new Error(`Cannot locate ${u.id}`);const l=yn.parse(c.uri);return{range:c.range,document:l,relativePath:gn.relative(a.folder,l),folder:gn.dirname(l).fsPath,filename:gn.basename(l)}},write:async({path:u,content:c})=>{let l;yn.isUri(u)?l=u.fsPath:l=oe(a.folder.fsPath,...Array.
689
- isArray(u)?u:[u]);const m=qe(l);o.has(m)||(He(m)||(n.debug(`${j.dim("create directory")} ${m}`),await xe(m,{recursive:!0})),o.add(m)),n.debug(`${j.dim("write")} ${l}`),await Xe(l,c)},abort:u=>{throw n.error(u||"Generator aborted"),new Error(u||"Generator aborted")}}}))}async function eg(e,t,r){t=t??oe(e.workspace,"likec4.generated.ts"),St(t)!==".ts"&&(t=t+".ts"),await xe(qe(t),{recursive:!0});const n=await e.diagrams(),i=tp([...n]);await Xe(t,i),r.info(`${j.dim("generated")} ${Ue(process.cwd(),t)}`)}
690
- async function tg(e,t,r){await xe(t,{recursive:!0}),r.info(`${j.dim("format")} ${j.green("dot")}`),r.info(`${j.dim("outdir")} ${t}`);const n=new Set,i=e.computedModel(),o=Uo(i.$data.views);let a=0;for(const s of o)try{const u=await e.viewsService.layouter.dot({view:s,styles:i.$styles});let c=".";s.sourcePath&&(c=qe(s.sourcePath)),c=oe(t,c),n.has(c)||(await xe(c,{recursive:!0}),n.add(c));const l=oe(c,s.id+".dot");await Xe(l,u),r.info(`${j.dim("generated")} ${Ue(process.cwd(),l)}`),a++}catch(u){Ae.
691
- error(`error while generating ${s.id}`,{error:u})}a>0&&r.info(`${j.dim("total")} ${a} files`)}async function rg(e,t,r,n){await xe(r,{recursive:!0}),n.info(`${j.dim("format")} ${j.green(t)}`),n.info(`${j.dim("outdir")} ${r}`);let i,o;switch(t){case"d2":i=".d2",o=nd;break;case"mermaid":i=".mmd",o=rd;break;case"plantuml":i=".puml",o=td;break;default:An(t)}const a=new Set,s=await e.layoutedModel();let u=0;for(const c of s.views()){const l=c.$view;try{let m=".";l.sourcePath&&(m=qe(l.sourcePath)),m=oe(
692
- r,m),a.has(m)||(await xe(m,{recursive:!0}),a.add(m));const y=oe(m,l.id+i),_=o(c);await Xe(y,_),n.info(`${j.dim("generated")} ${Ue(process.cwd(),y)}`),u++}catch(m){n.error(`error while generating ${l.id}`,{error:m})}}u>0&&n.info(`${j.dim("total")} ${u} files`)}async function xt({path:e,useDotBin:t,...r}){const n=Te("c4:codegen"),i=it(n),o=await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm"});if(o.ensureSingleProject(),(await o.viewsService.computedViews()).length===0)throw n.warn("\
693
- no views found"),process.exitCode=1,new Error("no views found");switch(r.format){case"views":{await eg(o,r.outfile,n);break}case"dot":{await tg(o,r.outdir??e,n);break}case"d2":case"mermaid":case"plantuml":{await rg(o,r.format,r.outdir??e,n);break}default:An(r)}i.stopAndLog()}var Ef=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Sf=e=>{throw TypeError(e)},ng=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Sf("Object expected");var n,i;n=t[Ef("asyncDispose")],n===void 0&&(n=t[Ef("d\
694
- ispose")],i=n),typeof n!="function"&&Sf("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(o){return Promise.reject(o)}}),e.push([r,n,t])}else e.push([r]);return t},sg=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(a,s,u,c){return c=Error(u),c.name="SuppressedError",c.error=a,c.suppressed=s,c},i=a=>t=r?new n(a,t,"An error was suppressed during disposal"):(r=!0,a),o=a=>{for(;a=e.pop();)try{var s=a[1]&&a[1].call(a[2]);if(a[0])return Promise.resolve(s).then(
695
- o,u=>(i(u),o()))}catch(u){i(u)}if(r)throw t};return o()};async function og({path:e,useDotBin:t,useCorePackage:r,outfile:n,project:i}){var o=[];try{const c=Te("c4:codegen"),l=it(c),m=ng(o,await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm",watch:!1}),!0),{projectId:y,projectFolder:_}=pn(m,i);i&&c.info(`${j.dim("project")} ${j.green(y)}`),c.info(`${j.dim("format")} ${j.green("model")}`);const S=await m.layoutedModel(y);for(const d of S.views())d.$view.hasLayoutDrift&&c.warn(j.yellow(
696
- "drift detected, manual layout can not be applied, view:")+" "+j.red(d.id));let g=oe(m.projectsManager.hasMultipleProjects()?_:m.workspace,"likec4-model.ts");if(n&&(g=_n(n)?n:oe(n),He(n)&&(await wn(n)).isDirectory()))throw new Error(`output file is a directory: ${n}`);const p=Ut(g);c.info(`${j.dim("filename")} ${p}`);const h=St(p).toLocaleLowerCase();if(![".ts",".mts",".cts"].includes(h))throw c.error(`output file ${n} has extension "${h}"`),new Error(`output file ${n} must be a .ts, .mts or .ct\
697
- s file`);const f=qe(g);c.info(`${j.dim("outdir")} ${f}`),await xe(f,{recursive:!0}),await Xe(g,Zd(S,{useCorePackage:r}),{encoding:"utf-8"}),l.stopAndLog(),We(vn(`
698
- ${j.dim("Source generated:")}
699
- ${Ue(Ht(),g)}
700
-
701
- ${j.dim("How to use:")}
702
- ${j.underline("https://likec4.dev/tooling/code-generation/model/")}
703
- `).trim(),{padding:1,borderColor:"green",borderStyle:"round"})}catch(c){var a=c,s=!0}finally{var u=sg(o,a,s);u&&await u}}async function ag({languageServices:e,outDir:t,filename:r="likec4-react.mjs"}){const n=Te(["vite","react"]),i=Nn();return n.info(`${j.cyan("likec4 app root")} ${j.dim(i)}`),n.info(j.cyan("outDir")+" "+j.dim(t)),{customLogger:n,root:i,configFile:!1,clearScreen:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:jn()},esbuild:{banner:`'use client'
704
- `+Tn.banner,footer:Tn.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:t,emptyOutDir:!1,sourcemap:!1,minify:!1,copyPublicDir:!1,chunkSizeWarningLimit:In,lib:{entry:"react/likec4.tsx",fileName(o,a){return r},formats:["es"]},rollupOptions:{output:{compact:!1,exports:"named"},external:["likec4/react","likec4/mode\
705
- l","react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client",/likec4\/icons\/.*/,/@likec4\/core.*/],onwarn(o,a){o.code!=="SOURCEMAP_ERROR"&&a(o)}}},plugins:[bn({}),Sn({languageServices:e.languageServices,useOverviewGraph:!1})]}}var Rf=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Af=e=>{throw TypeError(e)},ig=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Af("Object expected");var n,i;n=t[Rf("asyncDispose")],n===void 0&&(n=t[Rf("dispose")],i=n),typeof n!=
706
- "function"&&Af("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(o){return Promise.reject(o)}}),e.push([r,n,t])}else e.push([r]);return t},cg=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(a,s,u,c){return c=Error(u),c.name="SuppressedError",c.error=a,c.suppressed=s,c},i=a=>t=r?new n(a,t,"An error was suppressed during disposal"):(r=!0,a),o=a=>{for(;a=e.pop();)try{var s=a[1]&&a[1].call(a[2]);if(a[0])return Promise.resolve(s).then(o,u=>(i(u),o()))}catch(u){
707
- i(u)}if(r)throw t};return o()};async function ug({path:e,useDotBin:t,useCorePackage:r,outfile:n,project:i}){var o=[];try{await Ct();const c=Te("c4:codegen"),l=it(c),m=ig(o,await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm",watch:!1}),!0),{projectId:y,projectFolder:_}=pn(m,i);i&&c.info(`${j.dim("project")} ${j.green(y)}`),c.info(`${j.dim("format")} ${j.green("react")}`);const S=await m.diagrams(y);if(S.length===0)throw process.exitCode=1,new Error("no views found");S.forEach(w=>{w.
708
- hasLayoutDrift&&c.warn(j.yellow("drift detected, manual layout can not be applied, view:")+" "+j.red(w.id))});let g=oe(m.projectsManager.hasMultipleProjects()?_:m.workspace,"likec4-views.js");if(n&&(g=_n(n)?n:oe(n),He(n)&&(await wn(n)).isDirectory()))throw new Error(`output file is a directory: ${n}`);const p=qe(g);c.info(`${j.dim("outdir")} ${p}`);const h=Ut(g);c.info(`${j.dim("filename")} ${h}`);const f=St(h).toLocaleLowerCase();if(![".js",".mjs",".jsx"].includes(f))throw c.error(`output file ${n}\
709
- has extension "${f}"`),new Error(`output file ${n} must be a .js, .jsx or .mjs`);const d=await ag({languageServices:m,outDir:p,filename:h});await At({...d,logLevel:"warn"});const v=await m.layoutedModel(y),$=oe(p,Ut(g,f)+(f===".mjs"?".d.mts":".d.ts"));await Xe($,rp(v,{useCorePackage:r})),l.stopAndLog(),We(vn(`
710
- ${j.dim("Sources generated:")}
711
- ${Ue(Ht(),g)}
712
- ${Ue(Ht(),$)}
713
-
714
- ${j.dim("How to use:")}
715
- ${j.underline("https://likec4.dev/tooling/code-generation/react/")}
716
- `),{padding:1,borderColor:"green",borderStyle:"round"})}catch(c){var a=c,s=!0}finally{var u=cg(o,a,s);u&&await u}}var Pf=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Cf=e=>{throw TypeError(e)},lg=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Cf("Object expected");var n,i;n=t[Pf("asyncDispose")],n===void 0&&(n=t[Pf("dispose")],i=n),typeof n!="function"&&Cf("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(o){return Promise.reject(o)}}),e.push([r,n,t])}else e.push(
717
- [r]);return t},fg=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(a,s,u,c){return c=Error(u),c.name="SuppressedError",c.error=a,c.suppressed=s,c},i=a=>t=r?new n(a,t,"An error was suppressed during disposal"):(r=!0,a),o=a=>{for(;a=e.pop();)try{var s=a[1]&&a[1].call(a[2]);if(a[0])return Promise.resolve(s).then(o,u=>(i(u),o()))}catch(u){i(u)}if(r)throw t};return o()};async function dg({project:e,path:t,useDotBin:r,webcomponentPrefix:n="likec4",outfile:i}){var o=[];try{await Ct();
718
- const c=Te("c4:codegen"),l=it(c),m=lg(o,await Pe.fromWorkspace(t,{logger:"vite",graphviz:r?"binary":"wasm",watch:!1}),!0),{projectId:y,projectFolder:_}=pn(m,e);e&&c.info(`${j.dim("project")} ${j.green(y)}`),c.info(`${j.dim("format")} ${j.green("webcomponent")}`);const S=await m.diagrams(y);if(!bt(S,1))throw c.warn("no views found"),process.exitCode=1,new Error("no views found");S.forEach($=>{$.hasLayoutDrift&&c.warn(j.yellow("drift detected, manual layout can not be applied, view:")+" "+j.red($.
719
- id))});let g=oe(m.projectsManager.hasMultipleProjects()?_:m.workspace,"likec4-views.js");if(i&&(g=_n(i)?i:oe(i),He(i)&&(await wn(i)).isDirectory()))throw new Error(`output file is a directory: ${i}`);tt.debug(`${j.dim("outfilepath")} ${g}`);const p=Ut(g);tt.debug(`${j.dim("filename")} ${p}`);const h=St(p).toLocaleLowerCase();if(h!==".js"&&h!==".mjs")throw tt.warn(`output file ${i} has extension "${h}"`),new Error(`output file ${i} must be a .js or .mjs`);const f=await On();tt.debug(`${j.dim("cre\
720
- ated temp public")} ${f}`);const d=await ts({languageServices:m,outDir:f,filename:p,webcomponentPrefix:n,base:"/"});tt.debug(`${j.dim("vite build webcomponent")}`),await At({...d,logLevel:"warn"});const v=oe(f,p);if(!He(v))throw new Error(`output file not found: ${v}`);await xe(qe(g),{recursive:!0}),await Qf(v,g),c.info(`${j.dim("generated")} ${g}`),tt.debug(`${j.dim("remove temp public")}`),await Zf(f,{recursive:!0,force:!0}),l.stopAndLog(),We(vn(`
721
- ${j.dim("Webcomponents generated to:")}
722
- ${Ue(Ht(),g)}
723
-
724
- ${j.dim("Setup and usage instructions:")}
725
- ${j.blue("https://likec4.dev/tooling/code-generation/webcomponent/")}
726
- `))}catch(c){var a=c,s=!0}finally{var u=fg(o,a,s);u&&await u}}const pg=e=>e.command({command:"gen <command> [path]",aliases:["generate","codegen"],describe:"Generate various artifacts from LikeC4 sources",builder:t=>t.positional("path",be).command("react [path]","generate react component to render likec4 view",r=>r.positional("path",be).option("project",Gt).option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.jsx, .mjs or .js)",normalize:!0,coerce:ct}).option("use-dot",
727
- Re).option("use-core-package",Qo),async r=>{await ug({project:r.project,useDotBin:r.useDotBin,path:r.path,outfile:r.outfile,useCorePackage:r.useCorePackage})}).command({command:"webcomponent [path]",aliases:["wc","webcomp"],describe:"generate js with webcomponents",builder:r=>r.positional("path",be).option("project",Gt).option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.mjs or .js)",normalize:!0,coerce:ct}).option("webcomponent-prefix",kn).option("use-dot",Re),handler:async r=>{
728
- await dg({project:r.project,useDotBin:r.useDotBin,path:r.path,outfile:r.outfile,webcomponentPrefix:r.webcomponentPrefix})}}).command({command:"model [path]",aliases:["ts"],describe:"generate LikeC4Model (.ts)",builder:r=>r.positional("path",be).option("project",Gt).option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.ts)",normalize:!0,coerce:ct}).option("use-dot",Re).option("use-core-package",Qo),handler:async r=>{await og({path:r.path,useDotBin:r.useDotBin,useCorePackage:r.
729
- useCorePackage,outfile:r.outfile,project:r.project})}}).command({command:"views-data [path]",aliases:["views"],describe:"{deprecated} use codegen model",deprecated:!0,builder:r=>r.positional("path",be).option("outfile",{alias:"o",type:"string",desc:"<file> output .ts file",normalize:!0,coerce:ct}).option("use-dot",Re),handler:async r=>{await xt({format:"views",path:r.path,useDotBin:r.useDotBin,outfile:r.outfile})}}).command({command:"dot [path]",describe:"generate graphviz files (.dot)",builder:r=>r.
730
- positional("path",be).option("outdir",zt).option("use-dot",Re),handler:async r=>{await xt({format:"dot",path:r.path,useDotBin:r.useDotBin,outdir:r.outdir})}}).command({command:"d2 [path]",describe:"generate D2 files (.d2)",builder:r=>r.positional("path",be).option("outdir",zt).option("use-dot",Re),handler:async r=>{await xt({format:"d2",path:r.path,useDotBin:r.useDotBin,outdir:r.outdir})}}).command({command:"mermaid [path]",aliases:["mmd"],describe:"generate Mermaid files (.mmd)",builder:r=>r.positional(
731
- "path",be).option("outdir",zt).option("use-dot",Re),handler:async r=>{await xt({format:"mermaid",useDotBin:r.useDotBin,path:r.path,outdir:r.outdir})}}).command({command:"plantuml [path]",aliases:["puml"],describe:"generate PlantUML files (.puml)",builder:r=>r.positional("path",be).option("outdir",zt).option("use-dot",Re),handler:async r=>{await xt({format:"plantuml",useDotBin:r.useDotBin,path:r.path,outdir:r.outdir})}}).command({command:"<custom> [path]",describe:"run custom generator from likec\
732
- 4 config",builder:r=>r.positional("path",be).option("project",Gt).option("use-dot",Re),handler:async r=>{await bf({name:"custom",path:r.path,project:r.project,useDotBin:r.useDotBin})}}).epilog(`${j.bold("Examples:")}
682
+ if(Kf||Wf===$f)return;const e=Co.get("lastUpdateCheck"),t=Co.get("latestVersion");if(Mf(t)||Hf(e)||e+Gy<Date.now())try{No("likec4",["check-update"],{stdio:"ignore",preferLocal:!0,detached:!0,env:{NODE_ENV:$f}}).catch(()=>{})}catch{}t&&bo.gt(t,at)&&Ke(["Update available: ",N.dim(at),N.reset(" \u2192 "),N.green(t)].join(""))}async function Ky(){try{const e=await Wy();Rn(e,"No version found in latest npm"),Co.set({lastUpdateCheck:Date.now(),latestVersion:e}),bo.gt(e,at)?Ke(["Update available: ",N.dim(
683
+ at),N.reset(" \u2192 "),N.green(e)].join("")):Ke(N.dim("Up to date: ")+" "+N.green(at))}catch(e){Ae.error(Ht(e))}}async function Wy(){return(await zy("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}const Xy=e=>e.command({command:"check-update",describe:"Check for updates",handler:async()=>{await Ky()}});function Jy(e,t){if(!t)return e.languageServices.projectsManager.ensureProjectId();
684
+ const r=oe(t);if(r===e.workspace)return e.languageServices.projectsManager.ensureProjectId();if(He(r)&&Ff(r).isDirectory()){Ae.debug`Project path exists: ${r}`;const n=yn.file(r.endsWith(zo)?r:r+zo),i=e.languageServices.projects().find(a=>a.folder.fsPath===n.fsPath);if(i)return Ae.debug`Found project ${i.id} at path: ${r}`,i.id;Ae.debug`No project registered at path: ${r}`}return e.languageServices.projectsManager.ensureProjectId(t)}function pn(e,t){const r=Jy(e,t),n=e.languageServices.projectsManager.
685
+ getProject(r);return e.languageServices.projectsManager.defaultProjectId=r,{projectId:r,projectFolder:n.folderUri.fsPath,config:n.config}}var _f=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),wf=e=>{throw TypeError(e)},Yy=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&wf("Object expected");var n,i;n=t[_f("asyncDispose")],n===void 0&&(n=t[_f("dispose")],i=n),typeof n!="function"&&wf("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),e.
686
+ push([r,n,t])}else e.push([r]);return t},Qy=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,s,u,c){return c=Error(u),c.name="SuppressedError",c.error=o,c.suppressed=s,c},i=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),a=o=>{for(;o=e.pop();)try{var s=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(s).then(a,u=>(i(u),a()))}catch(u){i(u)}if(r)throw t};return a()};const xt=Ae.getChild("generator");async function bf({name:e,path:t,useDotBin:r,
687
+ project:n}){var i=[];try{const u=it(xt),c=Yy(i,await Pe.fromWorkspace(t,{logger:"vite",graphviz:r?"binary":"wasm",watch:!1}),!0),{projectId:l,config:m}=pn(c,n);n&&xt.info(`${N.dim("project")} ${N.green(l)}`);const y=m.generators?.[e];if(!y)throw xt.error(N.red(`generator ${e} does not exist in project config`)),new Error(`generator ${e} does not exist in project config`);xt.info(`${N.dim("generator")} ${N.green(e)}`);const _=await c.layoutedModel(l);await Zy({likec4:c,model:_,generator:y,logger:xt.
688
+ getChild(e)}),u.stopAndLog()}catch(u){var a=u,o=!0}finally{var s=Qy(i,a,o);s&&await s}}async function Zy({likec4:e,model:t,generator:r,logger:n}){const i=e.languageServices,a=new Set,o=i.project(t.project.id),s=t.project.id;n.debug(`${N.dim("runnig for project:")} ${N.green(o.id)}`),await Promise.resolve().then(()=>r({likec4model:t,ctx:{workspace:e.languageServices.workspaceUri,project:o,locate:u=>{let c=null;switch(!0){case md(u):c=i.locate({element:u.id,projectId:s});break;case hd(u):c=i.locate(
689
+ {view:u.id,projectId:s});break;case pd(u):c=i.locate({deployment:u.id,projectId:s});break;case dd(u):case fd(u):c=i.locate({relation:u.id,projectId:s});break;default:An(u)}if(!c)throw n.error(`Cannot locate ${u.id}`,{target:u}),new Error(`Cannot locate ${u.id}`);const l=yn.parse(c.uri);return{range:c.range,document:l,relativePath:gn.relative(o.folder,l),folder:gn.dirname(l).fsPath,filename:gn.basename(l)}},write:async({path:u,content:c})=>{let l;yn.isUri(u)?l=u.fsPath:l=oe(o.folder.fsPath,...Array.
690
+ isArray(u)?u:[u]);const m=qe(l);a.has(m)||(He(m)||(n.debug(`${N.dim("create directory")} ${m}`),await xe(m,{recursive:!0})),a.add(m)),n.debug(`${N.dim("write")} ${l}`),await We(l,c)},abort:u=>{throw n.error(u||"Generator aborted"),new Error(u||"Generator aborted")}}}))}async function eg(e,t,r){t=t??oe(e.workspace,"likec4.generated.ts"),St(t)!==".ts"&&(t=t+".ts"),await xe(qe(t),{recursive:!0});const n=await e.diagrams(),i=tp([...n]);await We(t,i),r.info(`${N.dim("generated")} ${Ue(process.cwd(),t)}`)}
691
+ async function tg(e,t,r){await xe(t,{recursive:!0}),r.info(`${N.dim("format")} ${N.green("dot")}`),r.info(`${N.dim("outdir")} ${t}`);const n=new Set,i=e.computedModel(),a=Uo(i.$data.views);let o=0;for(const s of a)try{const u=await e.viewsService.layouter.dot({view:s,styles:i.$styles});let c=".";s.sourcePath&&(c=qe(s.sourcePath)),c=oe(t,c),n.has(c)||(await xe(c,{recursive:!0}),n.add(c));const l=oe(c,s.id+".dot");await We(l,u),r.info(`${N.dim("generated")} ${Ue(process.cwd(),l)}`),o++}catch(u){Ae.
692
+ error(`error while generating ${s.id}`,{error:u})}o>0&&r.info(`${N.dim("total")} ${o} files`)}async function rg(e,t,r,n){await xe(r,{recursive:!0}),n.info(`${N.dim("format")} ${N.green(t)}`),n.info(`${N.dim("outdir")} ${r}`);let i,a;switch(t){case"d2":i=".d2",a=nd;break;case"mermaid":i=".mmd",a=rd;break;case"plantuml":i=".puml",a=td;break;default:An(t)}const o=new Set,s=await e.layoutedModel();let u=0;for(const c of s.views()){const l=c.$view;try{let m=".";l.sourcePath&&(m=qe(l.sourcePath)),m=oe(
693
+ r,m),o.has(m)||(await xe(m,{recursive:!0}),o.add(m));const y=oe(m,l.id+i),_=a(c);await We(y,_),n.info(`${N.dim("generated")} ${Ue(process.cwd(),y)}`),u++}catch(m){n.error(`error while generating ${l.id}`,{error:m})}}u>0&&n.info(`${N.dim("total")} ${u} files`)}async function Mt({path:e,useDotBin:t,...r}){const n=Te("c4:codegen"),i=it(n),a=await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm"});if(a.ensureSingleProject(),(await a.viewsService.computedViews()).length===0)throw n.warn("\
694
+ no views found"),process.exitCode=1,new Error("no views found");switch(r.format){case"views":{await eg(a,r.outfile,n);break}case"dot":{await tg(a,r.outdir??e,n);break}case"d2":case"mermaid":case"plantuml":{await rg(a,r.format,r.outdir??e,n);break}default:An(r)}i.stopAndLog()}var Ef=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Sf=e=>{throw TypeError(e)},ng=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Sf("Object expected");var n,i;n=t[Ef("asyncDispose")],n===void 0&&(n=t[Ef("d\
695
+ ispose")],i=n),typeof n!="function"&&Sf("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),e.push([r,n,t])}else e.push([r]);return t},sg=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,s,u,c){return c=Error(u),c.name="SuppressedError",c.error=o,c.suppressed=s,c},i=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),a=o=>{for(;o=e.pop();)try{var s=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(s).then(
696
+ a,u=>(i(u),a()))}catch(u){i(u)}if(r)throw t};return a()};async function og({path:e,useDotBin:t,useCorePackage:r,outfile:n,project:i}){var a=[];try{const c=Te("c4:codegen"),l=it(c),m=ng(a,await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm",watch:!1}),!0),{projectId:y,projectFolder:_}=pn(m,i);i&&c.info(`${N.dim("project")} ${N.green(y)}`),c.info(`${N.dim("format")} ${N.green("model")}`);const S=await m.layoutedModel(y);for(const d of S.views())d.hasLayoutDrifts&&c.warn(N.yellow("lay\
697
+ out drift detected, view:")+" "+N.red(d.id));let g=oe(m.projectsManager.hasMultipleProjects()?_:m.workspace,"likec4-model.ts");if(n&&(g=_n(n)?n:oe(n),He(n)&&(await wn(n)).isDirectory()))throw new Error(`output file is a directory: ${n}`);const h=Ft(g);c.info(`${N.dim("filename")} ${h}`);const p=St(h).toLocaleLowerCase();if(![".ts",".mts",".cts"].includes(p))throw c.error(`output file ${n} has extension "${p}"`),new Error(`output file ${n} must be a .ts, .mts or .cts file`);const f=qe(g);c.info(`${N.
698
+ dim("outdir")} ${f}`),await xe(f,{recursive:!0}),await We(g,Zd(S,{useCorePackage:r}),{encoding:"utf-8"}),l.stopAndLog(),Ke(vn(`
699
+ ${N.dim("Source generated:")}
700
+ ${Ue(Ut(),g)}
701
+
702
+ ${N.dim("How to use:")}
703
+ ${N.underline("https://likec4.dev/tooling/code-generation/model/")}
704
+ `).trim(),{padding:1,borderColor:"green",borderStyle:"round"})}catch(c){var o=c,s=!0}finally{var u=sg(a,o,s);u&&await u}}async function ag({languageServices:e,outDir:t,filename:r="likec4-react.mjs"}){const n=Te(["vite","react"]),i=On();return n.info(`${N.cyan("likec4 app root")} ${N.dim(i)}`),n.info(N.cyan("outDir")+" "+N.dim(t)),{customLogger:n,root:i,configFile:!1,clearScreen:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:jn()},esbuild:{banner:`'use client'
705
+ `+Tn.banner,footer:Tn.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:t,emptyOutDir:!1,sourcemap:!1,minify:!1,copyPublicDir:!1,chunkSizeWarningLimit:In,lib:{entry:"react/likec4.tsx",fileName(a,o){return r},formats:["es"]},rollupOptions:{output:{compact:!1,exports:"named"},external:["likec4/react","likec4/mode\
706
+ l","react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client",/likec4\/icons\/.*/,/@likec4\/core.*/],onwarn(a,o){a.code!=="SOURCEMAP_ERROR"&&o(a)}}},plugins:[bn({}),Sn({languageServices:e.languageServices,useOverviewGraph:!1})]}}var Rf=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Af=e=>{throw TypeError(e)},ig=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Af("Object expected");var n,i;n=t[Rf("asyncDispose")],n===void 0&&(n=t[Rf("dispose")],i=n),typeof n!=
707
+ "function"&&Af("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),e.push([r,n,t])}else e.push([r]);return t},cg=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,s,u,c){return c=Error(u),c.name="SuppressedError",c.error=o,c.suppressed=s,c},i=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),a=o=>{for(;o=e.pop();)try{var s=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(s).then(a,u=>(i(u),a()))}catch(u){
708
+ i(u)}if(r)throw t};return a()};async function ug({path:e,useDotBin:t,useCorePackage:r,outfile:n,project:i}){var a=[];try{await kt();const c=Te("c4:codegen"),l=it(c),m=ig(a,await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm",watch:!1}),!0),{projectId:y,projectFolder:_}=pn(m,i);i&&c.info(`${N.dim("project")} ${N.green(y)}`),c.info(`${N.dim("format")} ${N.green("react")}`);const S=await m.diagrams(y);if(S.length===0)throw process.exitCode=1,new Error("no views found");S.forEach(w=>{if(w.
709
+ drifts&&w.drifts.length>0){c.info(N.yellow("layout drift detected, view:")+" "+N.red(w.id));return}if(w.hasLayoutDrift){c.warn(N.yellow("drift detected, manual layout can not be applied, view:")+" "+N.red(w.id));return}});let g=oe(m.projectsManager.hasMultipleProjects()?_:m.workspace,"likec4-views.js");if(n&&(g=_n(n)?n:oe(n),He(n)&&(await wn(n)).isDirectory()))throw new Error(`output file is a directory: ${n}`);const h=qe(g);c.info(`${N.dim("outdir")} ${h}`);const p=Ft(g);c.info(`${N.dim("filena\
710
+ me")} ${p}`);const f=St(p).toLocaleLowerCase();if(![".js",".mjs",".jsx"].includes(f))throw c.error(`output file ${n} has extension "${f}"`),new Error(`output file ${n} must be a .js, .jsx or .mjs`);const d=await ag({languageServices:m,outDir:h,filename:p});await At({...d,logLevel:"warn"});const v=await m.layoutedModel(y),$=oe(h,Ft(g,f)+(f===".mjs"?".d.mts":".d.ts"));await We($,rp(v,{useCorePackage:r})),l.stopAndLog(),Ke(vn(`
711
+ ${N.dim("Sources generated:")}
712
+ ${Ue(Ut(),g)}
713
+ ${Ue(Ut(),$)}
714
+
715
+ ${N.dim("How to use:")}
716
+ ${N.underline("https://likec4.dev/tooling/code-generation/react/")}
717
+ `),{padding:1,borderColor:"green",borderStyle:"round"})}catch(c){var o=c,s=!0}finally{var u=cg(a,o,s);u&&await u}}var Pf=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Cf=e=>{throw TypeError(e)},lg=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Cf("Object expected");var n,i;n=t[Pf("asyncDispose")],n===void 0&&(n=t[Pf("dispose")],i=n),typeof n!="function"&&Cf("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),e.push([r,n,t])}else e.push(
718
+ [r]);return t},fg=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,s,u,c){return c=Error(u),c.name="SuppressedError",c.error=o,c.suppressed=s,c},i=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),a=o=>{for(;o=e.pop();)try{var s=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(s).then(a,u=>(i(u),a()))}catch(u){i(u)}if(r)throw t};return a()};async function dg({project:e,path:t,useDotBin:r,webcomponentPrefix:n="likec4",outfile:i}){var a=[];try{await kt();
719
+ const c=Te("c4:codegen"),l=it(c),m=lg(a,await Pe.fromWorkspace(t,{logger:"vite",graphviz:r?"binary":"wasm",watch:!1}),!0),{projectId:y,projectFolder:_}=pn(m,e);e&&c.info(`${N.dim("project")} ${N.green(y)}`),c.info(`${N.dim("format")} ${N.green("webcomponent")}`);const S=await m.diagrams(y);if(!bt(S,1))throw c.warn("no views found"),process.exitCode=1,new Error("no views found");S.forEach($=>{$.hasLayoutDrift&&c.warn(N.yellow("drift detected, manual layout can not be applied, view:")+" "+N.red($.
720
+ id))});let g=oe(m.projectsManager.hasMultipleProjects()?_:m.workspace,"likec4-views.js");if(i&&(g=_n(i)?i:oe(i),He(i)&&(await wn(i)).isDirectory()))throw new Error(`output file is a directory: ${i}`);tt.debug(`${N.dim("outfilepath")} ${g}`);const h=Ft(g);tt.debug(`${N.dim("filename")} ${h}`);const p=St(h).toLocaleLowerCase();if(p!==".js"&&p!==".mjs")throw tt.warn(`output file ${i} has extension "${p}"`),new Error(`output file ${i} must be a .js or .mjs`);const f=await Nn();tt.debug(`${N.dim("cre\
721
+ ated temp public")} ${f}`);const d=await ts({languageServices:m,outDir:f,filename:h,webcomponentPrefix:n,base:"/"});tt.debug(`${N.dim("vite build webcomponent")}`),await At({...d,logLevel:"warn"});const v=oe(f,h);if(!He(v))throw new Error(`output file not found: ${v}`);await xe(qe(g),{recursive:!0}),await Qf(v,g),c.info(`${N.dim("generated")} ${g}`),tt.debug(`${N.dim("remove temp public")}`),await Zf(f,{recursive:!0,force:!0}),l.stopAndLog(),Ke(vn(`
722
+ ${N.dim("Webcomponents generated to:")}
723
+ ${Ue(Ut(),g)}
724
+
725
+ ${N.dim("Setup and usage instructions:")}
726
+ ${N.blue("https://likec4.dev/tooling/code-generation/webcomponent/")}
727
+ `))}catch(c){var o=c,s=!0}finally{var u=fg(a,o,s);u&&await u}}const pg=e=>e.command({command:"gen <command> [path]",aliases:["generate","codegen"],describe:"Generate various artifacts from LikeC4 sources",builder:t=>t.positional("path",be).command("react [path]","generate react component to render likec4 view",r=>r.positional("path",be).option("project",Ct).option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.jsx, .mjs or .js)",normalize:!0,coerce:ct}).option("use-dot",
728
+ Re).option("use-core-package",Qo),async r=>{await ug({project:r.project,useDotBin:r.useDotBin,path:r.path,outfile:r.outfile,useCorePackage:r.useCorePackage})}).command({command:"webcomponent [path]",aliases:["wc","webcomp"],describe:"generate js with webcomponents",builder:r=>r.positional("path",be).option("project",Ct).option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.mjs or .js)",normalize:!0,coerce:ct}).option("webcomponent-prefix",kn).option("use-dot",Re),handler:async r=>{
729
+ await dg({project:r.project,useDotBin:r.useDotBin,path:r.path,outfile:r.outfile,webcomponentPrefix:r.webcomponentPrefix})}}).command({command:"model [path]",aliases:["ts"],describe:"generate LikeC4Model (.ts)",builder:r=>r.positional("path",be).option("project",Ct).option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.ts)",normalize:!0,coerce:ct}).option("use-dot",Re).option("use-core-package",Qo),handler:async r=>{await og({path:r.path,useDotBin:r.useDotBin,useCorePackage:r.
730
+ useCorePackage,outfile:r.outfile,project:r.project})}}).command({command:"views-data [path]",aliases:["views"],describe:"{deprecated} use codegen model",deprecated:!0,builder:r=>r.positional("path",be).option("outfile",{alias:"o",type:"string",desc:"<file> output .ts file",normalize:!0,coerce:ct}).option("use-dot",Re),handler:async r=>{await Mt({format:"views",path:r.path,useDotBin:r.useDotBin,outfile:r.outfile})}}).command({command:"dot [path]",describe:"generate graphviz files (.dot)",builder:r=>r.
731
+ positional("path",be).option("outdir",Gt).option("use-dot",Re),handler:async r=>{await Mt({format:"dot",path:r.path,useDotBin:r.useDotBin,outdir:r.outdir})}}).command({command:"d2 [path]",describe:"generate D2 files (.d2)",builder:r=>r.positional("path",be).option("outdir",Gt).option("use-dot",Re),handler:async r=>{await Mt({format:"d2",path:r.path,useDotBin:r.useDotBin,outdir:r.outdir})}}).command({command:"mermaid [path]",aliases:["mmd"],describe:"generate Mermaid files (.mmd)",builder:r=>r.positional(
732
+ "path",be).option("outdir",Gt).option("use-dot",Re),handler:async r=>{await Mt({format:"mermaid",useDotBin:r.useDotBin,path:r.path,outdir:r.outdir})}}).command({command:"plantuml [path]",aliases:["puml"],describe:"generate PlantUML files (.puml)",builder:r=>r.positional("path",be).option("outdir",Gt).option("use-dot",Re),handler:async r=>{await Mt({format:"plantuml",useDotBin:r.useDotBin,path:r.path,outdir:r.outdir})}}).command({command:"<custom> [path]",describe:"run custom generator from likec\
733
+ 4 config",builder:r=>r.positional("path",be).option("project",Ct).option("use-dot",Re),handler:async r=>{await bf({name:"custom",path:r.path,project:r.project,useDotBin:r.useDotBin})}}).epilog(`${N.bold("Examples:")}
733
734
  likec4 gen react -o dist/likec4-views.mjs ./src/likec4
734
735
  likec4 gen model -o likec4-model.ts
735
736
  likec4 gen ts --outfile likec4-model.ts
@@ -737,39 +738,39 @@ positional("path",be).option("outdir",zt).option("use-dot",Re),handler:async r=>
737
738
  likec4 gen mmd --outdir assets/
738
739
  likec4 gen plantuml --outdir assets/
739
740
  likec4 gen dot -o out .
740
- `),handler:async t=>{await bf({name:t.command,path:t.path,project:t.project,useDotBin:t.useDotBin})}});async function hg({path:e,useDotBin:t,outfile:r}){const n=Te("c4:export"),i=it(n),o=await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm",watch:!1});o.ensureSingleProject();const a=await o.layoutedModel();St(r)!==".json"&&(r=r+".json"),await xe(qe(r),{recursive:!0});const s=JSON.stringify(a.$model,null,2);await Xe(r,s),n.info(`${j.dim("generated")} ${Ue(process.cwd(),r)}`),i.stopAndLog(
741
- "\u2713 export in ")}const mg=e=>e.command({command:"export <format> [path]",describe:"Export to images or JSON",builder:t=>t.usage(`${j.bold("Usage:")} $0 export <format> [path]`).positional("path",be).command({command:"png [path]",describe:"export views to PNG",builder:r=>r.options({output:{alias:["o","outdir"],type:"string",desc:"output directory, if not specified, images are saved next to sources",normalize:!0,nargs:1,coerce:oe},theme:{choices:["light","dark"],desc:"color-scheme to use, defa\
742
- ults to light",conflicts:["dark","light"],nargs:1},dark:{type:"boolean",desc:"use dark theme, shortcut for --theme=dark",conflicts:["theme","light"]},light:{type:"boolean",desc:"use light theme, shortcut for --theme=light",conflicts:["theme","dark"]},"use-dot":Re,seq:{boolean:!0,alias:["sequence"],type:"boolean",desc:"use sequence layout for dynamic views"},flat:{alias:["flatten"],boolean:!0,type:"boolean",desc:"flatten all images in output directory ignoring sources structure"},filter:{alias:"f",
743
- array:!0,string:!0,desc:`include views with ids matching given patterns
741
+ `),handler:async t=>{await bf({name:t.command,path:t.path,project:t.project,useDotBin:t.useDotBin})}});async function hg({path:e,useDotBin:t,outfile:r}){const n=Te("c4:export"),i=it(n),a=await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm",watch:!1});a.ensureSingleProject();const o=await a.layoutedModel();St(r)!==".json"&&(r=r+".json"),await xe(qe(r),{recursive:!0});const s=JSON.stringify(o.$data,null,2);await We(r,s),n.info(`${N.dim("generated")} ${Ue(process.cwd(),r)}`),i.stopAndLog(
742
+ "\u2713 export in ")}const mg=e=>e.command({command:"export <format> [path]",describe:"Export to images or JSON",builder:t=>t.usage(`${N.bold("Usage:")} $0 export <format> [path]`).positional("path",be).command({command:"png [path]",describe:"export views to PNG",builder:r=>r.options({output:{alias:["o","outdir"],type:"string",desc:"output directory, if not specified, images are saved next to sources",normalize:!0,nargs:1,coerce:oe},project:Ct,theme:{choices:["light","dark"],desc:"color-scheme t\
743
+ o use, defaults to light",conflicts:["dark","light"],nargs:1},dark:{type:"boolean",desc:"use dark theme, shortcut for --theme=dark",conflicts:["theme","light"]},light:{type:"boolean",desc:"use light theme, shortcut for --theme=light",conflicts:["theme","dark"]},"use-dot":Re,seq:{boolean:!0,alias:["sequence"],type:"boolean",desc:"use sequence layout for dynamic views"},flat:{alias:["flatten"],boolean:!0,type:"boolean",desc:"flatten all images in output directory ignoring sources structure"},filter:{
744
+ alias:"f",array:!0,string:!0,desc:`include views with ids matching given patterns
744
745
  multiple patterns are combined with OR`},ignore:{boolean:!0,alias:"i",desc:"continue if export fails for some views"},timeout:{type:"number",alias:"t",desc:"timeout for playwright (in seconds)",default:15,nargs:1},"max-attempts":{type:"number",desc:"max attempts to export failing view, 1 means no retry",default:3,nargs:1},"server-url":{type:"string",desc:"use this url instead of starting new likec4 server",nargs:1},"chromium-sandbox":{boolean:!0,desc:"enable chromium sandbox (see Playwright docs\
745
- )",default:!1}}).epilog(`${j.bold("Examples:")}
746
- ${j.green("$0 export png")}
747
- ${j.gray("Search for likec4 files in current directory and output PNG next to sources")}
748
-
749
- ${j.green("$0 export png --theme dark -o ./png src/likec4")}
750
- ${j.gray("Search for likec4 files in src/likec4 and output PNG with dark theme to png folder")}
751
-
752
- ${j.green('$0 export png -f "team1*" -f "team2*" --flat -o ./png src/likec4')}
753
- ${j.gray("Export views matching team1* or team2* only")}
754
-
755
- ${j.green('$0 export png -f "use-case*" --sequence src/likec4')}
756
- ${j.gray("Export views matching use-case* using sequence layout")}
757
- `),handler:async r=>{Rn(r.timeout>=1,"timeout must be >= 1"),Rn(r["max-attempts"]>=1,"max-attempts must be >= 1"),await Ct();const n=r.theme??(r.dark?"dark":"light");await Ha({path:r.path,useDotBin:r["use-dot"],output:r.output,timeoutMs:r.timeout*1e3,maxAttempts:r.maxAttempts,ignore:r.ignore===!0,outputType:r.flat?"flat":"relative",serverUrl:r.serverUrl,theme:n,filter:r.filter,sequence:r.seq,chromiumSandbox:r["chromium-sandbox"]})}}).command({command:"json [path]",describe:"export model to JSON",
758
- builder:r=>r.option("outfile",{alias:"o",type:"string",desc:"<file> output .json file",default:"likec4.json",normalize:!0,coerce:oe}).option("use-dot",Re).epilog(`${j.bold("Examples:")}
759
- ${j.green("$0 export json")}
760
- ${j.gray("Search for likec4 files in current directory and output JSON to likec4.json")}
761
-
762
- ${j.green("$0 export json -o ./generated/likec4.json src/likec4 ")}
763
- ${j.gray("Search for likec4 files in src/likec4 and output JSON to generated/likec4.json")}
764
- `),handler:async r=>{await hg({path:r.path,useDotBin:r.useDotBin,outfile:r.outfile})}}).updateStrings({"Commands:":j.bold("Formats:")}),handler:()=>{}}),yg=e=>e.command({command:"mcp [path]",aliases:[],describe:"Start MCP server",builder:t=>t.usage(`${j.bold("Usage:")} $0 mcp [path]`).positional("path",be).option("stdio",{boolean:!0,description:"use stdio transport",conflicts:["http","port"]}).option("http",{boolean:!0,description:"use streamable http transport (use 33335 port by default)",conflicts:"\
765
- stdio"}).option("port",{alias:"p",number:!0,description:"enables http transport and sets the port",conflicts:"stdio"}).option("use-dot",Re).epilog(`${j.bold("Examples:")}
766
- ${j.green("$0 mcp")}
767
- ${j.gray("Start MCP with default stdio transport")}
768
- ${j.green("$0 mcp --http ./src")}
769
- ${j.gray("Start MCP with streamable http transport on port 33335 at ./src folder")}
770
- ${j.green("$0 mcp -p 1234")}
771
- ${j.gray("Start MCP with streamable http transport on port 1234")}
772
- `),handler:async t=>{t.http||t.port?await gg(t.path,t.useDot,t.port):await vg(t.path,t.useDot)}});async function gg(e,t,r=33335){await Pe.fromWorkspace(e,{mcp:{port:r},watch:!0,graphviz:t?"binary":"wasm"}),We([j.green("LikeC4 MCP served at:"),`
746
+ )",default:!1}}).epilog(`${N.bold("Examples:")}
747
+ ${N.green("$0 export png")}
748
+ ${N.gray("Search for likec4 files in current directory and output PNG next to sources")}
749
+
750
+ ${N.green("$0 export png --theme dark -o ./png src/likec4")}
751
+ ${N.gray("Search for likec4 files in src/likec4 and output PNG with dark theme to png folder")}
752
+
753
+ ${N.green('$0 export png -f "team1*" -f "team2*" --flat -o ./png src/likec4')}
754
+ ${N.gray("Export views matching team1* or team2* only")}
755
+
756
+ ${N.green('$0 export png -f "use-case*" --sequence src/likec4')}
757
+ ${N.gray("Export views matching use-case* using sequence layout")}
758
+ `),handler:async r=>{Rn(r.timeout>=1,"timeout must be >= 1"),Rn(r["max-attempts"]>=1,"max-attempts must be >= 1"),await kt();const n=r.theme??(r.dark?"dark":"light");await Ha({path:r.path,useDotBin:r["use-dot"],output:r.output,project:r.project,timeoutMs:r.timeout*1e3,maxAttempts:r.maxAttempts,ignore:r.ignore===!0,outputType:r.flat?"flat":"relative",serverUrl:r.serverUrl,theme:n,filter:r.filter,sequence:r.seq,chromiumSandbox:r["chromium-sandbox"]})}}).command({command:"json [path]",describe:"exp\
759
+ ort model to JSON",builder:r=>r.option("outfile",{alias:"o",type:"string",desc:"<file> output .json file",default:"likec4.json",normalize:!0,coerce:oe}).option("use-dot",Re).epilog(`${N.bold("Examples:")}
760
+ ${N.green("$0 export json")}
761
+ ${N.gray("Search for likec4 files in current directory and output JSON to likec4.json")}
762
+
763
+ ${N.green("$0 export json -o ./generated/likec4.json src/likec4 ")}
764
+ ${N.gray("Search for likec4 files in src/likec4 and output JSON to generated/likec4.json")}
765
+ `),handler:async r=>{await hg({path:r.path,useDotBin:r.useDotBin,outfile:r.outfile})}}).updateStrings({"Commands:":N.bold("Formats:")}),handler:()=>{}}),yg=e=>e.command({command:"mcp [path]",aliases:[],describe:"Start MCP server",builder:t=>t.usage(`${N.bold("Usage:")} $0 mcp [path]`).positional("path",be).option("stdio",{boolean:!0,description:"use stdio transport",conflicts:["http","port"]}).option("http",{boolean:!0,description:"use streamable http transport (use 33335 port by default)",conflicts:"\
766
+ stdio"}).option("port",{alias:"p",number:!0,description:"enables http transport and sets the port",conflicts:"stdio"}).option("use-dot",Re).epilog(`${N.bold("Examples:")}
767
+ ${N.green("$0 mcp")}
768
+ ${N.gray("Start MCP with default stdio transport")}
769
+ ${N.green("$0 mcp --http ./src")}
770
+ ${N.gray("Start MCP with streamable http transport on port 33335 at ./src folder")}
771
+ ${N.green("$0 mcp -p 1234")}
772
+ ${N.gray("Start MCP with streamable http transport on port 1234")}
773
+ `),handler:async t=>{t.http||t.port?await gg(t.path,t.useDot,t.port):await vg(t.path,t.useDot)}});async function gg(e,t,r=33335){await Pe.fromWorkspace(e,{mcp:{port:r},watch:!0,graphviz:t?"binary":"wasm"}),Ke([N.green("LikeC4 MCP served at:"),`
773
774
  {
774
775
  "mcpServers": {
775
776
  "likec4": {
@@ -778,17 +779,17 @@ ${j.green("$0 mcp -p 1234")}
778
779
  }
779
780
  }
780
781
 
781
- ${j.dim("Documentation:")}
782
- ${j.underline("https://likec4.dev/tooling/mcp/#using-extension")}
782
+ ${N.dim("Documentation:")}
783
+ ${N.underline("https://likec4.dev/tooling/mcp/#using-extension")}
783
784
  `].join(`
784
- `))}async function vg(e,t){await Pe.fromWorkspace(e,{mcp:"stdio",watch:!0,graphviz:t?"binary":"wasm"})}async function $g(e){const t=await es({...e,likec4AssetsDir:"",webcomponentPrefix:void 0}),r=await ss({port:Yt(62001,62010)}),n=e?.open??!1;return await od({...t,mode:"production",preview:{host:e.listen??"127.0.0.1",allowedHosts:!0,port:r,open:n}})}async function _g({path:e,output:t,base:r,listen:n}){const i=await Pe.fromWorkspace(e,{logger:"vite",watch:!1}),o=await $g({base:r,languageServices:i,
785
- outputDir:t,open:!Fe(),listen:n});Oa(o)}const wg=e=>e.command({command:"preview [path]",describe:"Start local server to preview production build",builder:t=>t.positional("path",{type:"string",desc:`Directory with LikeC4 source files
785
+ `))}async function vg(e,t){await Pe.fromWorkspace(e,{mcp:"stdio",watch:!0,graphviz:t?"binary":"wasm"})}async function $g(e){const t=await es({...e,likec4AssetsDir:"",webcomponentPrefix:void 0}),r=await ss({port:Yt(62001,62010)}),n=e?.open??!1;return await od({...t,mode:"production",preview:{host:e.listen??"127.0.0.1",allowedHosts:!0,port:r,open:n}})}async function _g({path:e,output:t,base:r,listen:n}){const i=await Pe.fromWorkspace(e,{logger:"vite",watch:!1}),a=await $g({base:r,languageServices:i,
786
+ outputDir:t,open:!Xe(),listen:n});Na(a)}const wg=e=>e.command({command:"preview [path]",describe:"Start local server to preview production build",builder:t=>t.positional("path",{type:"string",desc:`Directory with LikeC4 source files
786
787
  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"],ct).default("path",ct("."),".").default("listen","127.0.0.1","localhost"),handler:async t=>{await _g(t)}});async function bg({path:e,useDotBin:t,webcomponentPrefix:r,
787
- title:n,useHashHistory:i,useOverview:o=!1,enableWebcomponent:a=!0,enableHMR:s=!0,base:u,listen:c,port:l}){s&&(process.env.NODE_ENV="development");const m=await Pe.fromWorkspace(e,{graphviz:t?"binary":"wasm",watch:s}),y=await Ft(Et(Vt(),".likec4-assets-")),_=await Da({buildWebcomponent:a,hmr:s,base:u,webcomponentPrefix:r,title:n,languageServices:m,useHashHistory:i,useOverviewGraph:o,likec4AssetsDir:y,listen:c,port:l});if(_.config.logger.clearScreen("info"),Oa(_),!o)return;const S=await m.diagrams();
788
- if(bt(S,1)){const g=Te("c4:export"),p=Na(_);if(!p){g.error("no preview server url");return}g.info(j.cyan("wait 5sec before generating previews")),await Yo(5e3);try{await Ma({serverUrl:p,logger:g,views:S,theme:"light",output:y,outputType:"flat"}),await Yo(1e3),g.info(j.yellow("Note: changes in sources do not trigger preview updates, restart is required"))}catch(h){g.error(j.red("Failed to generate previews")),g.error(h)}}else _.config.logger.warn("no views found, no previews generated")}const Eg=e=>e.
788
+ title:n,useHashHistory:i,useOverview:a=!1,enableWebcomponent:o=!0,enableHMR:s=!0,base:u,listen:c,port:l}){s&&(process.env.NODE_ENV="development");const m=await Pe.fromWorkspace(e,{graphviz:t?"binary":"wasm",watch:s}),y=await Vt(Et(zt(),".likec4-assets-")),_=await Da({buildWebcomponent:o,hmr:s,base:u,webcomponentPrefix:r,title:n,languageServices:m,useHashHistory:i,useOverviewGraph:a,likec4AssetsDir:y,listen:c,port:l});if(_.config.logger.clearScreen("info"),Na(_),!a)return;const S=await m.diagrams();
789
+ if(bt(S,1)){const g=Te("c4:export"),h=Oa(_);if(!h){g.error("no preview server url");return}g.info(N.cyan("wait 5sec before generating previews")),await Yo(5e3);try{await Ma({serverUrl:h,logger:g,views:S,theme:"light",output:y,outputType:"flat"}),await Yo(1e3),g.info(N.yellow("Note: changes in sources do not trigger preview updates, restart is required"))}catch(p){g.error(N.red("Failed to generate previews")),g.error(p)}}else _.config.logger.warn("no views found, no previews generated")}const Eg=e=>e.
789
790
  command({command:"start [path]",aliases:["serve","dev"],describe:"Start local dev server to preview LikeC4 views",builder:t=>t.positional("path",be).option("base",ta).option("webcomponent-prefix",kn).option("title",ea).option("use-hash-history",Zo).option("use-dot",Re).option("listen",Sd).option("port",Rd).options({"react-hmr":{type:"boolean",default:!0,describe:"Enable/Disable React HMR"},"build-webcomponent":{type:"boolean",default:!0,describe:"Enable/Disable Webcomponent build"}}),handler:async t=>{
790
- await Ct(),await bg({path:t.path,useDotBin:t["use-dot"],base:t.base,webcomponentPrefix:t["webcomponent-prefix"],title:t.title,useHashHistory:t["use-hash-history"],listen:t.listen,port:t.port,enableHMR:t["react-hmr"],enableWebcomponent:t["build-webcomponent"]})}});async function Sg({path:e,ignoreLayout:t}){const r=await Pe.fromWorkspace(e,{logger:"vite",watch:!1}),n=Te("c4:views");let i=o(r);return i=i&&(t||await a(r,n)),i?0:Ho(1);function o(s){return s.getErrors().length===0}async function a(s,u){
791
- const c=await s.diagrams();let l=!1;for(const m of c)m.hasLayoutDrift===!0&&(l=!0,u.error(j.red(`Layout drift detected on view '${m.id}' at ${oe(e,m.sourcePath??".")}`)));return!l}}const Rg=e=>e.command({command:"validate [path]",aliases:[],describe:"Validate model syntax and manual layout",builder:t=>t.positional("path",be).option("ignore-layout",{alias:["skip-layout"],boolean:!0,default:!1,description:"do not validate layout of views"}),handler:async t=>{await Sg({path:t.path,ignoreLayout:t["i\
792
- gnore-layout"]})}});qo({sinks:{console:xo()},loggers:[{category:"likec4",sinks:["console"],lowestLevel:Xf?"debug":"info"}]});async function Ag(){!Fe()&&By(),await Fo(Jf(Yf(zf)),Eg,kp,pg,mg,wg,Rg,yg,Xy,e=>e.command({command:"completion",describe:"Generate completion script",handler:()=>{e.showCompletionScript()}})).scriptName("likec4").usage("Usage: $0 <command>").version(at).alias("v","version").alias("h","help").help("help").option("verbose",{type:"boolean",default:!1,describe:"verbose logging",
793
- global:!0}).demandCommand(1,"Please run with valid command").recommendCommands().showHelpOnFail(!0).updateStrings({"Options:":j.bold("Options:"),"Positionals:":j.bold("Arguments:"),"Commands:":j.bold("Commands:"),"Examples:":j.bold("Examples:")}).wrap(jo(Gf.columns-10,{min:80,max:150})).middleware(e=>{e.verbose&&qo({sinks:{console:xo()},loggers:[{category:"likec4",sinks:["console"],lowestLevel:"debug"}]})}).parseAsync()}Ag().catch(()=>{Ho(1)}),process.on("unhandledRejection",e=>{console.error("U\
791
+ await kt(),await bg({path:t.path,useDotBin:t["use-dot"],base:t.base,webcomponentPrefix:t["webcomponent-prefix"],title:t.title,useHashHistory:t["use-hash-history"],listen:t.listen,port:t.port,enableHMR:t["react-hmr"],enableWebcomponent:t["build-webcomponent"]})}});async function Sg({path:e,ignoreLayout:t}){const r=await Pe.fromWorkspace(e,{logger:"vite",watch:!1}),n=Te("c4:views");let i=a(r);return i=i&&(t||await o(r,n)),i?0:Ho(1);function a(s){return s.getErrors().length===0}async function o(s,u){
792
+ const c=await s.diagrams();let l=!1;for(const m of c)m.hasLayoutDrift===!0&&(l=!0,u.error(N.red(`Layout drift detected on view '${m.id}' at ${oe(e,m.sourcePath??".")}`)));return!l}}const Rg=e=>e.command({command:"validate [path]",aliases:[],describe:"Validate model syntax and manual layout",builder:t=>t.positional("path",be).option("ignore-layout",{alias:["skip-layout"],boolean:!0,default:!1,description:"do not validate layout of views"}),handler:async t=>{await Sg({path:t.path,ignoreLayout:t["i\
793
+ gnore-layout"]})}});qo({sinks:{console:xo()},loggers:[{category:"likec4",sinks:["console"],lowestLevel:Xf?"debug":"info"}]});async function Ag(){!Xe()&&By(),await Fo(Jf(Yf(zf)),Eg,kp,pg,mg,wg,Rg,yg,Xy,e=>e.command({command:"completion",describe:"Generate completion script",handler:()=>{e.showCompletionScript()}})).scriptName("likec4").usage("Usage: $0 <command>").version(at).alias("v","version").alias("h","help").help("help").option("verbose",{type:"boolean",default:!1,describe:"verbose logging",
794
+ global:!0}).demandCommand(1,"Please run with valid command").recommendCommands().showHelpOnFail(!0).updateStrings({"Options:":N.bold("Options:"),"Positionals:":N.bold("Arguments:"),"Commands:":N.bold("Commands:"),"Examples:":N.bold("Examples:")}).wrap(jo(Gf.columns-10,{min:80,max:150})).middleware(e=>{e.verbose&&qo({sinks:{console:xo()},loggers:[{category:"likec4",sinks:["console"],lowestLevel:"debug"}]})}).parseAsync()}Ag().catch(()=>{Ho(1)}),process.on("unhandledRejection",e=>{console.error("U\
794
795
  nhandled rejection",e)});