likec4 1.22.0 → 1.22.1

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,14 +1,107 @@
1
1
  #!/usr/bin/env node
2
- import{c as _t,f as pm,m as mt,g as Nr,a as mm,b as fu,T as gm,N as du,i as ym,n as os,C as Em,d as vm,e as hu,h as pu,t as _m,p as wm,u as Q,l as Dm,w as $m,j as bm,k as Am,o as yr,q as mu,r as gu,L as wt,s as Cm,v as gt,x as as,y as yu,z as Sm,A as Rm,B as Er,D as us,E as Om,F as Tr,G as cs,H as Eu,Y as Fm,Z as Im}from"../shared/likec4.DIBfXG6W.mjs";import Te,{hrtime as Pm,cwd as ls,exit as Nm,stdout as Tm,argv as jm}from"node:process";import Lm,{strictEqual as xm,notStrictEqual as Bm}from"assert";import it,{resolve as Qe,dirname as fs,normalize as km,relative as Mm,extname as qm,basename as Um}from"path";import jr,{statSync as vu,readdirSync as Hm,readFileSync as ds,writeFile as Vm}from"fs";import hs,{format as _u,inspect as zm}from"util";import wu,{fileURLToPath as Gm}from"url";import be,{resolve as ve,dirname as Wt,join as Lr,relative as Kt,extname as xr,isAbsolute as ps,basename as pn}from"node:path";import ge,{existsSync as Nt,copyFileSync as Du,readdirSync as Wm,rmSync as ms}from"node:fs";import{mkdtemp as mn,writeFile as Yt,mkdir as Dt,stat as gs,copyFile as Km,rm as Ym}from"node:fs/promises";import Br,{tmpdir as gn}from"node:os";import{fileURLToPath as $u}from"node:url";import bu from"@vitejs/plugin-react";import{sortNaturalByFqn as Au,compareNatural as Jm,hasAtLeast as Xm,nonexhaustive as Cu,invariant as Su,delay as Ru}from"@likec4/core";import{build as kr,createServer as Qm,preview as Zm}from"vite";import{chromium as Ou}from"playwright";import eg from"node:net";import{setTimeout as tg}from"node:timers/promises";import{promisify as Me,isDeepStrictEqual as rg}from"node:util";import Mr from"node:crypto";import ng from"node:assert";import ig from"constants";import Fu from"stream";import sg from"events";import og from"http";import ag from"os";import"tty";import"crypto";import"net";import"child_process";import"@likec4/core/types";import"buffer";import"@hpcc-js/wasm-graphviz";import"@likec4/core/compute-view";import"boxen";import"node:child_process";import"node:events";import"node:stream/promises";import"fs/promises";import"@likec4/core/model";const yn=Object.create(null),qr=t=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?yn:globalThis),Tt=new Proxy(yn,{get(t,e){return qr()[e]??yn[e]},has(t,e){const r=qr();return e in r||e in yn},set(t,e,r){const n=qr(!0);return n[e]=r,!0},deleteProperty(t,e){if(!e)return!1;const r=qr(!0);return delete r[e],!0},ownKeys(){const t=qr(!0);return Object.keys(t)}}),ys=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",ug=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function cg(){if(globalThis.process?.env)for(const t of ug){const e=t[1]||t[0];if(globalThis.process?.env[e])return{name:t[0].toLowerCase(),...t[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}const Iu=cg();Iu.name;function Jt(t){return t?t!=="false":!1}const lg=globalThis.process?.platform||"",Pu=Jt(Tt.CI)||Iu.ci!==!1,Nu=Jt(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);Jt(Tt.DEBUG);const fg=ys==="test"||Jt(Tt.TEST),dg=Jt(Tt.MINIMAL)||Pu||fg||!Nu,hg=/^win/i.test(lg);!Jt(Tt.NO_COLOR)&&(Jt(Tt.FORCE_COLOR)||(Nu||hg)&&Tt.TERM);const pg=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(pg?.split(".")[0]);const mg=globalThis.process||Object.create(null),Tu={versions:{}};new Proxy(mg,{get(t,e){if(e==="env")return Tt;if(e in t)return t[e];if(e in Tu)return Tu[e]}});const gg=globalThis.process?.release?.name==="node",yg=!!globalThis.Bun||!!globalThis.process?.versions?.bun,Eg=!!globalThis.Deno,vg=!!globalThis.fastly,_g=!!globalThis.Netlify,wg=!!globalThis.EdgeRuntime,Dg=globalThis.navigator?.userAgent==="Cloudflare-Workers",$g=[[_g,"netlify"],[wg,"edge-light"],[Dg,"workerd"],[vg,"fastly"],[Eg,"deno"],[yg,"bun"],[gg,"node"]];function bg(){const t=$g.find(e=>e[0]);if(t)return{name:t[1]}}const Ag=bg();Ag?.name;const Cg={right:Pg,center:Ng},Sg=0,En=1,Rg=2,vn=3;class Og{constructor(e){var r;this.width=e.width,this.wrap=(r=e.wrap)!==null&&r!==void 0?r:!0,this.rows=[]}span(...e){const r=this.div(...e);r.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]=="string")return this.applyLayoutDSL(e[0]);const r=e.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]=="string"&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){const r=e.split(`
3
- `).map(i=>i.split(" "));let n=0;return r.forEach(i=>{i.length>1&&Ge.stringWidth(i[0])>n&&(n=Math.min(Math.floor(this.width*.5),Ge.stringWidth(i[0])))}),r.forEach(i=>{this.div(...i.map((o,s)=>({text:o.trim(),padding:this.measurePadding(o),width:s===0&&i.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){const r=Ge.stripAnsi(e);return[0,r.match(/\s*$/)[0].length,0,r.match(/^\s*/)[0].length]}toString(){const e=[];return this.rows.forEach(r=>{this.rowToString(r,e)}),e.filter(r=>!r.hidden).map(r=>r.text).join(`
4
- `)}rowToString(e,r){return this.rasterize(e).forEach((n,i)=>{let o="";n.forEach((s,a)=>{const{width:c}=e[a],f=this.negatePadding(e[a]);let u=s;if(f>Ge.stringWidth(s)&&(u+=" ".repeat(f-Ge.stringWidth(s))),e[a].align&&e[a].align!=="left"&&this.wrap){const d=Cg[e[a].align];u=d(u,f),Ge.stringWidth(u)<f&&(u+=" ".repeat((c||0)-Ge.stringWidth(u)-1))}const h=e[a].padding||[0,0,0,0];h[vn]&&(o+=" ".repeat(h[vn])),o+=ju(e[a],u,"| "),o+=u,o+=ju(e[a],u," |"),h[En]&&(o+=" ".repeat(h[En])),i===0&&r.length>0&&(o=this.renderInline(o,r[r.length-1]))}),r.push({text:o.replace(/ +$/,""),span:e.span})}),r}renderInline(e,r){const n=e.match(/^ */),i=n?n[0].length:0,o=r.text,s=Ge.stringWidth(o.trimRight());return r.span?this.wrap?i<s?e:(r.hidden=!0,o.trimRight()+" ".repeat(i-s)+e.trimLeft()):(r.hidden=!0,o+e):e}rasterize(e){const r=[],n=this.columnWidths(e);let i;return e.forEach((o,s)=>{o.width=n[s],this.wrap?i=Ge.wrap(o.text,this.negatePadding(o),{hard:!0}).split(`
5
- `):i=o.text.split(`
6
- `),o.border&&(i.unshift("."+"-".repeat(this.negatePadding(o)+2)+"."),i.push("'"+"-".repeat(this.negatePadding(o)+2)+"'")),o.padding&&(i.unshift(...new Array(o.padding[Sg]||0).fill("")),i.push(...new Array(o.padding[Rg]||0).fill(""))),i.forEach((a,c)=>{r[c]||r.push([]);const f=r[c];for(let u=0;u<s;u++)f[u]===void 0&&f.push("");f.push(a)})}),r}negatePadding(e){let r=e.width||0;return e.padding&&(r-=(e.padding[vn]||0)+(e.padding[En]||0)),e.border&&(r-=4),r}columnWidths(e){if(!this.wrap)return e.map(s=>s.width||Ge.stringWidth(s.text));let r=e.length,n=this.width;const i=e.map(s=>{if(s.width)return r--,n-=s.width,s.width}),o=r?Math.floor(n/r):0;return i.map((s,a)=>s===void 0?Math.max(o,Fg(e[a])):s)}}function ju(t,e,r){return t.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?r:" ":""}function Fg(t){const e=t.padding||[],r=1+(e[vn]||0)+(e[En]||0);return t.border?r+4:r}function Ig(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Pg(t,e){t=t.trim();const r=Ge.stringWidth(t);return r<e?" ".repeat(e-r)+t:t}function Ng(t,e){t=t.trim();const r=Ge.stringWidth(t);return r>=e?t:" ".repeat(e-r>>1)+t}let Ge;function Tg(t,e){return Ge=e,new Og({width:t?.width||Ig(),wrap:t?.wrap})}const Lu=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function xu(t){return t.replace(Lu,"")}function jg(t,e){const[r,n]=t.match(Lu)||["",""];t=xu(t);let i="";for(let o=0;o<t.length;o++)o!==0&&o%e===0&&(i+=`
7
- `),i+=t.charAt(o);return r&&n&&(i=`${r}${i}${n}`),i}function Lg(t){return Tg(t,{stringWidth:e=>[...e].length,stripAnsi:xu,wrap:jg})}function xg(t,e){let r=Qe(".",t),n;for(vu(r).isDirectory()||(r=fs(r));;){if(n=e(r,Hm(r)),n)return Qe(r,n);if(r=fs(n=r),n===r)break}}function Ur(t){if(t!==t.toLowerCase()&&t!==t.toUpperCase()||(t=t.toLowerCase()),t.indexOf("-")===-1&&t.indexOf("_")===-1)return t;{let r="",n=!1;const i=t.match(/^-+/);for(let o=i?i[0].length:0;o<t.length;o++){let s=t.charAt(o);n&&(n=!1,s=s.toUpperCase()),o!==0&&(s==="-"||s==="_")?n=!0:s!=="-"&&s!=="_"&&(r+=s)}return r}}function Bu(t,e){const r=t.toLowerCase();e=e||"-";let n="";for(let i=0;i<t.length;i++){const o=r.charAt(i),s=t.charAt(i);o!==s&&i>0?n+=`${e}${r.charAt(i)}`:n+=s}return n}function ku(t){return t==null?!1:typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^0[^.]/.test(t)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function Bg(t){if(Array.isArray(t))return t.map(s=>typeof s!="string"?s+"":s);t=t.trim();let e=0,r=null,n=null,i=null;const o=[];for(let s=0;s<t.length;s++){if(r=n,n=t.charAt(s),n===" "&&!i){r!==" "&&e++;continue}n===i?i=null:(n==="'"||n==='"')&&!i&&(i=n),o[e]||(o[e]=""),o[e]+=n}return o}var st;(function(t){t.BOOLEAN="boolean",t.STRING="string",t.NUMBER="number",t.ARRAY="array"})(st||(st={}));let $t;class kg{constructor(e){$t=e}parse(e,r){const n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),i=Bg(e),o=typeof e=="string",s=Mg(Object.assign(Object.create(null),n.alias)),a=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),c=Object.assign(Object.create(null),n.default),f=n.configObjects||[],u=n.envPrefix,h=a["populate--"],d=h?"--":"_",y=Object.create(null),E=Object.create(null),v=n.__||$t.format,l={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},m=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,p=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(O){const P=typeof O=="object"?O.key:O,ee=Object.keys(O).map(function(J){return{boolean:"bools",string:"strings",number:"numbers"}[J]}).filter(Boolean).pop();ee&&(l[ee][P]=!0),l.arrays[P]=!0,l.keys.push(P)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(O){l.bools[O]=!0,l.keys.push(O)}),[].concat(n.string||[]).filter(Boolean).forEach(function(O){l.strings[O]=!0,l.keys.push(O)}),[].concat(n.number||[]).filter(Boolean).forEach(function(O){l.numbers[O]=!0,l.keys.push(O)}),[].concat(n.count||[]).filter(Boolean).forEach(function(O){l.counts[O]=!0,l.keys.push(O)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(O){l.normalize[O]=!0,l.keys.push(O)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([O,P])=>{typeof P=="number"&&(l.nargs[O]=P,l.keys.push(O))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([O,P])=>{typeof P=="function"&&(l.coercions[O]=P,l.keys.push(O))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(O){l.configs[O]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([O,P])=>{(typeof P=="boolean"||typeof P=="function")&&(l.configs[O]=P)})),k(n.key,s,n.default,l.arrays),Object.keys(c).forEach(function(O){(l.aliases[O]||[]).forEach(function(P){c[P]=c[O]})});let g=null;te();let _=[];const w=Object.assign(Object.create(null),{_:[]}),D={};for(let O=0;O<i.length;O++){const P=i[O],ee=P.replace(/^-{3,}/,"---");let J,I,ne,z,ie,fe;if(P!=="--"&&/^-/.test(P)&&Y(P))$(P);else if(ee.match(/^---+(=|$)/)){$(P);continue}else if(P.match(/^--.+=/)||!a["short-option-groups"]&&P.match(/^-.+=/))z=P.match(/^--?([^=]+)=([\s\S]*)$/),z!==null&&Array.isArray(z)&&z.length>=3&&(A(z[1],l.arrays)?O=M(O,z[1],i,z[2]):A(z[1],l.nargs)!==!1?O=F(O,z[1],i,z[2]):U(z[1],z[2],!0));else if(P.match(p)&&a["boolean-negation"])z=P.match(p),z!==null&&Array.isArray(z)&&z.length>=2&&(I=z[1],U(I,A(I,l.arrays)?[!1]:!1));else if(P.match(/^--.+/)||!a["short-option-groups"]&&P.match(/^-[^-]+/))z=P.match(/^--?(.+)/),z!==null&&Array.isArray(z)&&z.length>=2&&(I=z[1],A(I,l.arrays)?O=M(O,I,i):A(I,l.nargs)!==!1?O=F(O,I,i):(ie=i[O+1],ie!==void 0&&(!ie.match(/^-/)||ie.match(m))&&!A(I,l.bools)&&!A(I,l.counts)||/^(true|false)$/.test(ie)?(U(I,ie),O++):U(I,ae(I))));else if(P.match(/^-.\..+=/))z=P.match(/^-([^=]+)=([\s\S]*)$/),z!==null&&Array.isArray(z)&&z.length>=3&&U(z[1],z[2]);else if(P.match(/^-.\..+/)&&!P.match(m))ie=i[O+1],z=P.match(/^-(.\..+)/),z!==null&&Array.isArray(z)&&z.length>=2&&(I=z[1],ie!==void 0&&!ie.match(/^-/)&&!A(I,l.bools)&&!A(I,l.counts)?(U(I,ie),O++):U(I,ae(I)));else if(P.match(/^-[^-]+/)&&!P.match(m)){ne=P.slice(1,-1).split(""),J=!1;for(let $e=0;$e<ne.length;$e++){if(ie=P.slice($e+2),ne[$e+1]&&ne[$e+1]==="="){fe=P.slice($e+3),I=ne[$e],A(I,l.arrays)?O=M(O,I,i,fe):A(I,l.nargs)!==!1?O=F(O,I,i,fe):U(I,fe),J=!0;break}if(ie==="-"){U(ne[$e],ie);continue}if(/[A-Za-z]/.test(ne[$e])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(ie)&&A(ie,l.bools)===!1){U(ne[$e],ie),J=!0;break}if(ne[$e+1]&&ne[$e+1].match(/\W/)){U(ne[$e],ie),J=!0;break}else U(ne[$e],ae(ne[$e]))}I=P.slice(-1)[0],!J&&I!=="-"&&(A(I,l.arrays)?O=M(O,I,i):A(I,l.nargs)!==!1?O=F(O,I,i):(ie=i[O+1],ie!==void 0&&(!/^(-|--)[^-]/.test(ie)||ie.match(m))&&!A(I,l.bools)&&!A(I,l.counts)||/^(true|false)$/.test(ie)?(U(I,ie),O++):U(I,ae(I))))}else if(P.match(/^-[0-9]$/)&&P.match(m)&&A(P.slice(1),l.bools))I=P.slice(1),U(I,ae(I));else if(P==="--"){_=i.slice(O+1);break}else if(a["halt-at-non-option"]){_=i.slice(O);break}else $(P)}G(w,!0),G(w,!1),L(w),X(),H(w,l.aliases,c,!0),Z(w),a["set-placeholder-key"]&&oe(w),Object.keys(l.counts).forEach(function(O){S(w,O.split("."))||U(O,0)}),h&&_.length&&(w[d]=[]),_.forEach(function(O){w[d].push(O)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(w).filter(O=>O!=="--"&&O.includes("-")).forEach(O=>{delete w[O]}),a["strip-aliased"]&&[].concat(...Object.keys(s).map(O=>s[O])).forEach(O=>{a["camel-case-expansion"]&&O.includes("-")&&delete w[O.split(".").map(P=>Ur(P)).join(".")],delete w[O]});function $(O){const P=T("_",O);(typeof P=="string"||typeof P=="number")&&w._.push(P)}function F(O,P,ee,J){let I,ne=A(P,l.nargs);if(ne=typeof ne!="number"||isNaN(ne)?1:ne,ne===0)return K(J)||(g=Error(v("Argument unexpected for: %s",P))),U(P,ae(P)),O;let z=K(J)?0:1;if(a["nargs-eats-options"])ee.length-(O+1)+z<ne&&(g=Error(v("Not enough arguments following: %s",P))),z=ne;else{for(I=O+1;I<ee.length&&(!ee[I].match(/^-[^0-9]/)||ee[I].match(m)||Y(ee[I]));I++)z++;z<ne&&(g=Error(v("Not enough arguments following: %s",P)))}let ie=Math.min(z,ne);for(!K(J)&&ie>0&&(U(P,J),ie--),I=O+1;I<ie+O+1;I++)U(P,ee[I]);return O+ie}function M(O,P,ee,J){let I=[],ne=J||ee[O+1];const z=A(P,l.nargs);if(A(P,l.bools)&&!/^(true|false)$/.test(ne))I.push(!0);else if(K(ne)||K(J)&&/^-/.test(ne)&&!m.test(ne)&&!Y(ne)){if(c[P]!==void 0){const ie=c[P];I=Array.isArray(ie)?ie:[ie]}}else{K(J)||I.push(B(P,J,!0));for(let ie=O+1;ie<ee.length&&!(!a["greedy-arrays"]&&I.length>0||z&&typeof z=="number"&&I.length>=z||(ne=ee[ie],/^-/.test(ne)&&!m.test(ne)&&!Y(ne)));ie++)O=ie,I.push(B(P,ne,o))}return typeof z=="number"&&(z&&I.length<z||isNaN(z)&&I.length===0)&&(g=Error(v("Not enough arguments following: %s",P))),U(P,I),O}function U(O,P,ee=o){if(/-/.test(O)&&a["camel-case-expansion"]){const ne=O.split(".").map(function(z){return Ur(z)}).join(".");j(O,ne)}const J=B(O,P,ee),I=O.split(".");V(w,I,J),l.aliases[O]&&l.aliases[O].forEach(function(ne){const z=ne.split(".");V(w,z,J)}),I.length>1&&a["dot-notation"]&&(l.aliases[I[0]]||[]).forEach(function(ne){let z=ne.split(".");const ie=[].concat(I);ie.shift(),z=z.concat(ie),(l.aliases[O]||[]).includes(z.join("."))||V(w,z,J)}),A(O,l.normalize)&&!A(O,l.arrays)&&[O].concat(l.aliases[O]||[]).forEach(function(z){Object.defineProperty(D,z,{enumerable:!0,get(){return P},set(ie){P=typeof ie=="string"?$t.normalize(ie):ie}})})}function j(O,P){l.aliases[O]&&l.aliases[O].length||(l.aliases[O]=[P],y[P]=!0),l.aliases[P]&&l.aliases[P].length||j(P,O)}function B(O,P,ee){ee&&(P=qg(P)),(A(O,l.bools)||A(O,l.counts))&&typeof P=="string"&&(P=P==="true");let J=Array.isArray(P)?P.map(function(I){return T(O,I)}):T(O,P);return A(O,l.counts)&&(K(J)||typeof J=="boolean")&&(J=Es()),A(O,l.normalize)&&A(O,l.arrays)&&(Array.isArray(P)?J=P.map(I=>$t.normalize(I)):J=$t.normalize(P)),J}function T(O,P){return!a["parse-positional-numbers"]&&O==="_"||!A(O,l.strings)&&!A(O,l.bools)&&!Array.isArray(P)&&(ku(P)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${P}`)))||!K(P)&&A(O,l.numbers))&&(P=Number(P)),P}function L(O){const P=Object.create(null);H(P,l.aliases,c),Object.keys(l.configs).forEach(function(ee){const J=O[ee]||P[ee];if(J)try{let I=null;const ne=$t.resolve($t.cwd(),J),z=l.configs[ee];if(typeof z=="function"){try{I=z(ne)}catch(ie){I=ie}if(I instanceof Error){g=I;return}}else I=$t.require(ne);q(I)}catch(I){I.name==="PermissionDenied"?g=I:O[ee]&&(g=Error(v("Invalid JSON config file: %s",J)))}})}function q(O,P){Object.keys(O).forEach(function(ee){const J=O[ee],I=P?P+"."+ee:ee;typeof J=="object"&&J!==null&&!Array.isArray(J)&&a["dot-notation"]?q(J,I):(!S(w,I.split("."))||A(I,l.arrays)&&a["combine-arrays"])&&U(I,J)})}function X(){typeof f<"u"&&f.forEach(function(O){q(O)})}function G(O,P){if(typeof u>"u")return;const ee=typeof u=="string"?u:"",J=$t.env();Object.keys(J).forEach(function(I){if(ee===""||I.lastIndexOf(ee,0)===0){const ne=I.split("__").map(function(z,ie){return ie===0&&(z=z.substring(ee.length)),Ur(z)});(P&&l.configs[ne.join(".")]||!P)&&!S(O,ne)&&U(ne.join("."),J[I])}})}function Z(O){let P;const ee=new Set;Object.keys(O).forEach(function(J){if(!ee.has(J)&&(P=A(J,l.coercions),typeof P=="function"))try{const I=T(J,P(O[J]));[].concat(l.aliases[J]||[],J).forEach(ne=>{ee.add(ne),O[ne]=I})}catch(I){g=I}})}function oe(O){return l.keys.forEach(P=>{~P.indexOf(".")||typeof O[P]>"u"&&(O[P]=void 0)}),O}function H(O,P,ee,J=!1){Object.keys(ee).forEach(function(I){S(O,I.split("."))||(V(O,I.split("."),ee[I]),J&&(E[I]=!0),(P[I]||[]).forEach(function(ne){S(O,ne.split("."))||V(O,ne.split("."),ee[I])}))})}function S(O,P){let ee=O;a["dot-notation"]||(P=[P.join(".")]),P.slice(0,-1).forEach(function(I){ee=ee[I]||{}});const J=P[P.length-1];return typeof ee!="object"?!1:J in ee}function V(O,P,ee){let J=O;a["dot-notation"]||(P=[P.join(".")]),P.slice(0,-1).forEach(function(fe){fe=Mu(fe),typeof J=="object"&&J[fe]===void 0&&(J[fe]={}),typeof J[fe]!="object"||Array.isArray(J[fe])?(Array.isArray(J[fe])?J[fe].push({}):J[fe]=[J[fe],{}],J=J[fe][J[fe].length-1]):J=J[fe]});const I=Mu(P[P.length-1]),ne=A(P.join("."),l.arrays),z=Array.isArray(ee);let ie=a["duplicate-arguments-array"];!ie&&A(I,l.nargs)&&(ie=!0,(!K(J[I])&&l.nargs[I]===1||Array.isArray(J[I])&&J[I].length===l.nargs[I])&&(J[I]=void 0)),ee===Es()?J[I]=Es(J[I]):Array.isArray(J[I])?ie&&ne&&z?J[I]=a["flatten-duplicate-arrays"]?J[I].concat(ee):(Array.isArray(J[I][0])?J[I]:[J[I]]).concat([ee]):!ie&&!!ne==!!z?J[I]=ee:J[I]=J[I].concat([ee]):J[I]===void 0&&ne?J[I]=z?ee:[ee]:ie&&!(J[I]===void 0||A(I,l.counts)||A(I,l.bools))?J[I]=[J[I],ee]:J[I]=ee}function k(...O){O.forEach(function(P){Object.keys(P||{}).forEach(function(ee){l.aliases[ee]||(l.aliases[ee]=[].concat(s[ee]||[]),l.aliases[ee].concat(ee).forEach(function(J){if(/-/.test(J)&&a["camel-case-expansion"]){const I=Ur(J);I!==ee&&l.aliases[ee].indexOf(I)===-1&&(l.aliases[ee].push(I),y[I]=!0)}}),l.aliases[ee].concat(ee).forEach(function(J){if(J.length>1&&/[A-Z]/.test(J)&&a["camel-case-expansion"]){const I=Bu(J,"-");I!==ee&&l.aliases[ee].indexOf(I)===-1&&(l.aliases[ee].push(I),y[I]=!0)}}),l.aliases[ee].forEach(function(J){l.aliases[J]=[ee].concat(l.aliases[ee].filter(function(I){return J!==I}))}))})})}function A(O,P){const ee=[].concat(l.aliases[O]||[],O),J=Object.keys(P),I=ee.find(ne=>J.includes(ne));return I?P[I]:!1}function b(O){const P=Object.keys(l);return[].concat(P.map(J=>l[J])).some(function(J){return Array.isArray(J)?J.includes(O):J[O]})}function C(O,...P){return[].concat(...P).some(function(J){const I=O.match(J);return I&&b(I[1])})}function W(O){if(O.match(m)||!O.match(/^-[^-]+/))return!1;let P=!0,ee;const J=O.slice(1).split("");for(let I=0;I<J.length;I++){if(ee=O.slice(I+2),!b(J[I])){P=!1;break}if(J[I+1]&&J[I+1]==="="||ee==="-"||/[A-Za-z]/.test(J[I])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(ee)||J[I+1]&&J[I+1].match(/\W/))break}return P}function Y(O){return a["unknown-options-as-args"]&&se(O)}function se(O){return O=O.replace(/^-{3,}/,"--"),O.match(m)||W(O)?!1:!C(O,/^-+([^=]+?)=[\s\S]*$/,p,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function ae(O){return!A(O,l.bools)&&!A(O,l.counts)&&`${O}`in c?c[O]:N(x(O))}function N(O){return{[st.BOOLEAN]:!0,[st.STRING]:"",[st.NUMBER]:void 0,[st.ARRAY]:[]}[O]}function x(O){let P=st.BOOLEAN;return A(O,l.strings)?P=st.STRING:A(O,l.numbers)?P=st.NUMBER:A(O,l.bools)?P=st.BOOLEAN:A(O,l.arrays)&&(P=st.ARRAY),P}function K(O){return O===void 0}function te(){Object.keys(l.counts).find(O=>A(O,l.arrays)?(g=Error(v("Invalid configuration: %s, opts.count excludes opts.array.",O)),!0):A(O,l.nargs)?(g=Error(v("Invalid configuration: %s, opts.count excludes opts.narg.",O)),!0):!1)}return{aliases:Object.assign({},l.aliases),argv:Object.assign(D,w),configuration:a,defaulted:Object.assign({},E),error:g,newAliases:Object.assign({},y)}}}function Mg(t){const e=[],r=Object.create(null);let n=!0;for(Object.keys(t).forEach(function(i){e.push([].concat(t[i],i))});n;){n=!1;for(let i=0;i<e.length;i++)for(let o=i+1;o<e.length;o++)if(e[i].filter(function(a){return e[o].indexOf(a)!==-1}).length){e[i]=e[i].concat(e[o]),e.splice(o,1),n=!0;break}}return e.forEach(function(i){i=i.filter(function(s,a,c){return c.indexOf(s)===a});const o=i.pop();o!==void 0&&typeof o=="string"&&(r[o]=i)}),r}function Es(t){return t!==void 0?t+1:1}function Mu(t){return t==="__proto__"?"___proto___":t}function qg(t){return typeof t=="string"&&(t[0]==="'"||t[0]==='"')&&t[t.length-1]===t[0]?t.substring(1,t.length-1):t}var vs,_s,ws;const qu=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,Uu=(_s=(vs=process==null?void 0:process.versions)===null||vs===void 0?void 0:vs.node)!==null&&_s!==void 0?_s:(ws=process==null?void 0:process.version)===null||ws===void 0?void 0:ws.slice(1);if(Uu&&Number(Uu.match(/^([^.]+)/)[1])<qu)throw Error(`yargs parser supports a minimum Node.js version of ${qu}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const Ug=process?process.env:{},Hu=new kg({cwd:process.cwd,env:()=>Ug,format:_u,normalize:km,resolve:Qe,require:t=>{if(typeof require<"u")return require(t);if(t.match(/\.json$/))return JSON.parse(ds(t,"utf8"));throw Error("only .json config files are supported in ESM")}}),Hr=function(e,r){return Hu.parse(e.slice(),r).argv};Hr.detailed=function(t,e){return Hu.parse(t.slice(),e)},Hr.camelCase=Ur,Hr.decamelize=Bu,Hr.looksLikeNumber=ku;function Vu(){return Hg()?0:1}function Hg(){return Vg()&&!process.defaultApp}function Vg(){return!!process.versions.electron}function zg(t){return t.slice(Vu()+1)}function Gg(){return process.argv[Vu()]}class Le extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,Le)}}const Wg={fs:{readFileSync:ds,writeFile:Vm},format:_u,resolve:Qe,exists:t=>{try{return vu(t).isFile()}catch{return!1}}};let ot;class Kg{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);const r=e.shift();let n=function(){};return typeof e[e.length-1]=="function"&&(n=e.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),ot.format.apply(ot.format,[this.cache[this.locale][r]||r].concat(e))}__n(){const e=Array.prototype.slice.call(arguments),r=e.shift(),n=e.shift(),i=e.shift();let o=function(){};typeof e[e.length-1]=="function"&&(o=e.pop()),this.cache[this.locale]||this._readLocaleFile();let s=i===1?r:n;this.cache[this.locale][r]&&(s=this.cache[this.locale][r][i===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();const a=[s];return~s.indexOf("%d")&&a.push(i),ot.format.apply(ot.format,a.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this.cache[this.locale][r]=e[r])}_taggedLiteral(e,...r){let n="";return e.forEach(function(i,o){const s=r[o+1];n+=i,typeof s<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){const e=this,r=this.writeQueue[0],n=r.directory,i=r.locale,o=r.cb,s=this._resolveLocaleFile(n,i),a=JSON.stringify(this.cache[i],null,2);ot.fs.writeFile(s,a,"utf-8",function(c){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),o(c)})}_readLocaleFile(){let e={};const r=this._resolveLocaleFile(this.directory,this.locale);try{ot.fs.readFileSync&&(e=JSON.parse(ot.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,r){let n=ot.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){const i=ot.resolve(e,"./",r.split("_")[0]+".json");this._fileExistsSync(i)&&(n=i)}return n}_fileExistsSync(e){return ot.exists(e)}}function Yg(t,e){ot=e;const r=new Kg(t);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}const Jg=t=>Yg(t,Wg),Xg="require is not supported by ESM",zu="loading a directory of commands is not supported yet for ESM";let Vr;try{Vr=Gm(import.meta.url)}catch{Vr=process.cwd()}const Qg=Vr.substring(0,Vr.lastIndexOf("node_modules")),Zg={assert:{notStrictEqual:Bm,strictEqual:xm},cliui:Lg,findUp:xg,getEnv:t=>process.env[t],inspect:zm,getCallerFile:()=>{throw new Le(zu)},getProcessArgvBin:Gg,mainFilename:Qg||process.cwd(),Parser:Hr,path:{basename:Um,dirname:fs,extname:qm,relative:Mm,resolve:Qe},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:ds,require:()=>{throw new Le(Xg)},requireDirectory:()=>{throw new Le(zu)},stringWidth:t=>[...t].length,y18n:Jg({directory:Qe(Vr,"../../../locales"),updateFiles:!1})};function at(t,e,r,n){r.assert.notStrictEqual(t,e,n)}function Gu(t,e){e.assert.strictEqual(typeof t,"string")}function _n(t){return Object.keys(t)}function je(t){return!!t&&!!t.then&&typeof t.then=="function"}function zr(t){const r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,i=r.shift();if(!i)throw new Error(`No command found in: ${t}`);const o={cmd:i.replace(n,""),demanded:[],optional:[]};return r.forEach((s,a)=>{let c=!1;s=s.replace(/\s/g,""),/\.+[\]>]/.test(s)&&a===r.length-1&&(c=!0),/^\[/.test(s)?o.optional.push({cmd:s.replace(n,"").split("|"),variadic:c}):o.demanded.push({cmd:s.replace(n,"").split("|"),variadic:c})}),o}const e0=["first","second","third","fourth","fifth","sixth"];function ce(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},t,e]:[zr(`cmd ${t}`),e,r]}try{let i=0;const[o,s,a]=n(),c=[].slice.call(s);for(;c.length&&c[c.length-1]===void 0;)c.pop();const f=a||c.length;if(f<o.demanded.length)throw new Le(`Not enough arguments provided. Expected ${o.demanded.length} but received ${c.length}.`);const u=o.demanded.length+o.optional.length;if(f>u)throw new Le(`Too many arguments provided. Expected max ${u} but received ${f}.`);o.demanded.forEach(h=>{const d=c.shift(),y=Wu(d);h.cmd.filter(v=>v===y||v==="*").length===0&&Ku(y,h.cmd,i),i+=1}),o.optional.forEach(h=>{if(c.length===0)return;const d=c.shift(),y=Wu(d);h.cmd.filter(v=>v===y||v==="*").length===0&&Ku(y,h.cmd,i),i+=1})}catch(i){console.warn(i.stack)}}function Wu(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function Ku(t,e,r){throw new Le(`Invalid ${e0[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}class t0{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,i=!1){if(ce("<array|function> [boolean] [boolean] [boolean]",[e,r,n],arguments.length),Array.isArray(e)){for(let o=0;o<e.length;o++){if(typeof e[o]!="function")throw Error("middleware must be a function");const s=e[o];s.applyBeforeValidation=r,s.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){const o=e;o.applyBeforeValidation=r,o.global=n,o.mutates=i,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,r){const n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(i=>{const o=[...n[r]||[],r];return i.option?!o.includes(i.option):!0}),e.option=r,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){const e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}}function r0(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}function Gr(t,e,r,n){return r.reduce((i,o)=>{if(o.applyBeforeValidation!==n)return i;if(o.mutates){if(o.applied)return i;o.applied=!0}if(je(i))return i.then(s=>Promise.all([s,o(s,e)])).then(([s,a])=>Object.assign(s,a));{const s=o(i,e);return je(s)?s.then(a=>Object.assign(i,a)):Object.assign(i,s)}},t)}function Wr(t,e,r=n=>{throw n}){try{const n=n0(t)?t():t;return je(n)?n.then(i=>e(i)):e(n)}catch(n){return r(n)}}function n0(t){return typeof t=="function"}function i0(t){if(typeof require>"u")return null;for(let e=0,r=Object.keys(require.cache),n;e<r.length;e++)if(n=require.cache[r[e]],n.exports===t)return n;return null}const vr=/(^\*)|(^\$0)/;class s0{constructor(e,r,n,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=e,this.globalMiddleware=n,this.validation=r}addDirectory(e,r,n,i){i=i||{},typeof i.recurse!="boolean"&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);const o=typeof i.visit=="function"?i.visit:s=>s;i.visit=(s,a,c)=>{const f=o(s,a,c);if(f){if(this.requireCache.has(a))return f;this.requireCache.add(a),this.addHandler(f)}return f},this.shim.requireDirectory({require:r,filename:n},e,i)}addHandler(e,r,n,i,o,s){let a=[];const c=r0(o);if(i=i||(()=>{}),Array.isArray(e))if(a0(e))[e,...a]=e;else for(const f of e)this.addHandler(f);else if(c0(e)){let f=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(f=[].concat(f).concat(e.aliases)),this.addHandler(f,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(Yu(n)){this.addHandler([e].concat(a),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){const f=zr(e);a=a.map(d=>zr(d).cmd);let u=!1;const h=[f.cmd].concat(a).filter(d=>vr.test(d)?(u=!0,!1):!0);h.length===0&&u&&h.push("$0"),u&&(f.cmd=h[0],a=h.slice(1),e=e.replace(vr,f.cmd)),a.forEach(d=>{this.aliasMap[d]=f.cmd}),r!==!1&&this.usage.command(e,r,u,a,s),this.handlers[f.cmd]={original:e,description:r,handler:i,builder:n||{},middlewares:c,deprecated:s,demanded:f.demanded,optional:f.optional},u&&(this.defaultCommand=this.handlers[f.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,r,n,i,o,s){const a=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,c=r.getInternalMethods().getContext(),f=c.commands.slice(),u=!e;e&&(c.commands.push(e),c.fullCommands.push(a.original));const h=this.applyBuilderUpdateUsageAndParse(u,a,r,n.aliases,f,i,o,s);return je(h)?h.then(d=>this.applyMiddlewareAndGetResult(u,a,d.innerArgv,c,o,d.aliases,r)):this.applyMiddlewareAndGetResult(u,a,h.innerArgv,c,o,h.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,i,o,s,a,c){const f=r.builder;let u=n;if(Ds(f)){n.getInternalMethods().getUsageInstance().freeze();const h=f(n.getInternalMethods().reset(i),c);if(je(h))return h.then(d=>(u=A0(d)?d:n,this.parseAndUpdateUsage(e,r,u,o,s,a)))}else u0(f)&&(n.getInternalMethods().getUsageInstance().freeze(),u=n.getInternalMethods().reset(i),Object.keys(r.builder).forEach(h=>{u.option(h,f[h])}));return this.parseAndUpdateUsage(e,r,u,o,s,a)}parseAndUpdateUsage(e,r,n,i,o,s){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,r),r.description);const a=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,o,s);return je(a)?a.then(c=>({aliases:n.parsed.aliases,innerArgv:c})):{aliases:n.parsed.aliases,innerArgv:a}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,r){const n=vr.test(r.original)?r.original.replace(vr,"").trim():r.original,i=e.filter(o=>!vr.test(o));return i.push(n),`$0 ${i.join(" ")}`}handleValidationAndGetResult(e,r,n,i,o,s,a,c){if(!s.getInternalMethods().getHasOutput()){const f=s.getInternalMethods().runValidation(o,c,s.parsed.error,e);n=Wr(n,u=>(f(u),u))}if(r.handler&&!s.getInternalMethods().getHasOutput()){s.getInternalMethods().setHasOutput();const f=!!s.getOptions().configuration["populate--"];s.getInternalMethods().postProcess(n,f,!1,!1),n=Gr(n,s,a,!1),n=Wr(n,u=>{const h=r.handler(u);return je(h)?h.then(()=>u):u}),e||s.getInternalMethods().getUsageInstance().cacheHelpMessage(),je(n)&&!s.getInternalMethods().hasParseCallback()&&n.catch(u=>{try{s.getInternalMethods().getUsageInstance().fail(null,u)}catch{}})}return e||(i.commands.pop(),i.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,r,n,i,o,s,a){let c={};if(o)return n;a.getInternalMethods().getHasOutput()||(c=this.populatePositionals(r,n,i,a));const f=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),u=Gr(n,a,f,!0);return je(u)?u.then(h=>this.handleValidationAndGetResult(e,r,h,i,s,a,f,c)):this.handleValidationAndGetResult(e,r,u,i,s,a,f,c)}populatePositionals(e,r,n,i){r._=r._.slice(n.commands.length);const o=e.demanded.slice(0),s=e.optional.slice(0),a={};for(this.validation.positionalCount(o.length,r._.length);o.length;){const c=o.shift();this.populatePositional(c,r,a)}for(;s.length;){const c=s.shift();this.populatePositional(c,r,a)}return r._=n.commands.concat(r._.map(c=>""+c)),this.postProcessPositionals(r,a,this.cmdToParseOptions(e.original),i),a}populatePositional(e,r,n){const i=e.cmd[0];e.variadic?n[i]=r._.splice(0).map(String):r._.length&&(n[i]=[String(r._.shift())])}cmdToParseOptions(e){const r={array:[],default:{},alias:{},demand:{}},n=zr(e);return n.demanded.forEach(i=>{const[o,...s]=i.cmd;i.variadic&&(r.array.push(o),r.default[o]=[]),r.alias[o]=s,r.demand[o]=!0}),n.optional.forEach(i=>{const[o,...s]=i.cmd;i.variadic&&(r.array.push(o),r.default[o]=[]),r.alias[o]=s}),r}postProcessPositionals(e,r,n,i){const o=Object.assign({},i.getOptions());o.default=Object.assign(n.default,o.default);for(const f of Object.keys(n.alias))o.alias[f]=(o.alias[f]||[]).concat(n.alias[f]);o.array=o.array.concat(n.array),o.config={};const s=[];if(Object.keys(r).forEach(f=>{r[f].map(u=>{o.configuration["unknown-options-as-args"]&&(o.key[f]=!0),s.push(`--${f}`),s.push(u)})}),!s.length)return;const a=Object.assign({},o.configuration,{"populate--":!1}),c=this.shim.Parser.detailed(s,Object.assign({},o,{configuration:a}));if(c.error)i.getInternalMethods().getUsageInstance().fail(c.error.message,c.error);else{const f=Object.keys(r);Object.keys(r).forEach(u=>{f.push(...c.aliases[u])}),Object.keys(c.argv).forEach(u=>{f.includes(u)&&(r[u]||(r[u]=c.argv[u]),!this.isInConfigs(i,u)&&!this.isDefaulted(i,u)&&Object.prototype.hasOwnProperty.call(e,u)&&Object.prototype.hasOwnProperty.call(c.argv,u)&&(Array.isArray(e[u])||Array.isArray(c.argv[u]))?e[u]=[].concat(e[u],c.argv[u]):e[u]=c.argv[u])})}}isDefaulted(e,r){const{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(e,r){const{configObjects:n}=e.getOptions();return n.some(i=>Object.prototype.hasOwnProperty.call(i,r))||n.some(i=>Object.prototype.hasOwnProperty.call(i,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){const n=vr.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}const r=this.defaultCommand.builder;if(Ds(r))return r(e,!0);Yu(r)||Object.keys(r).forEach(n=>{e.option(n,r[n])})}moduleName(e){const r=i0(e);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(r.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:r,desc:n}){for(const i of[e,r,n]){if(typeof i=="string"||i===!1)return i;at(i,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){const e=this.frozens.pop();at(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}}function o0(t,e,r,n){return new s0(t,e,r,n)}function Yu(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function a0(t){return t.every(e=>typeof e=="string")}function Ds(t){return typeof t=="function"}function u0(t){return typeof t=="object"}function c0(t){return typeof t=="object"&&!Array.isArray(t)}function Kr(t={},e=()=>!0){const r={};return _n(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}function Yr(t){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{const r=e;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(t)})}function l0(t){return typeof t=="boolean"}function f0(t,e){const r=e.y18n.__,n={},i=[];n.failFn=function(B){i.push(B)};let o=null,s=null,a=!0;n.showHelpOnFail=function(B=!0,T){const[L,q]=typeof B=="string"?[!0,B]:[B,T];return t.getInternalMethods().isGlobalContext()&&(s=q),o=q,a=L,n};let c=!1;n.fail=function(B,T){const L=t.getInternalMethods().getLoggerInstance();if(i.length)for(let q=i.length-1;q>=0;--q){const X=i[q];if(l0(X)){if(T)throw T;if(B)throw Error(B)}else X(B,T,n)}else{if(t.getExitProcess()&&Yr(!0),!c){c=!0,a&&(t.showHelp("error"),L.error()),(B||T)&&L.error(B||T);const q=o||s;q&&((B||T)&&L.error(""),L.error(q))}if(T=T||new Le(B),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,T);throw T}};let f=[],u=!1;n.usage=(j,B)=>j===null?(u=!0,f=[],n):(u=!1,f.push([j,B||""]),n),n.getUsage=()=>f,n.getUsageDisabled=()=>u,n.getPositionalGroupName=()=>r("Positionals:");let h=[];n.example=(j,B)=>{h.push([j,B||""])};let d=[];n.command=function(B,T,L,q,X=!1){L&&(d=d.map(G=>(G[2]=!1,G))),d.push([B,T||"",L,q,X])},n.getCommands=()=>d;let y={};n.describe=function(B,T){Array.isArray(B)?B.forEach(L=>{n.describe(L,T)}):typeof B=="object"?Object.keys(B).forEach(L=>{n.describe(L,B[L])}):y[B]=T},n.getDescriptions=()=>y;let E=[];n.epilog=j=>{E.push(j)};let v=!1,l;n.wrap=j=>{v=!0,l=j},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(v||(l=F(),v=!0),l);const m="__yargsString__:";n.deferY18nLookup=j=>m+j,n.help=function(){if(_)return _;g();const B=t.customScriptName?t.$0:e.path.basename(t.$0),T=t.getDemandedOptions(),L=t.getDemandedCommands(),q=t.getDeprecatedOptions(),X=t.getGroups(),G=t.getOptions();let Z=[];Z=Z.concat(Object.keys(y)),Z=Z.concat(Object.keys(T)),Z=Z.concat(Object.keys(L)),Z=Z.concat(Object.keys(G.default)),Z=Z.filter(D),Z=Object.keys(Z.reduce((C,W)=>(W!=="_"&&(C[W]=!0),C),{}));const oe=n.getWrap(),H=e.cliui({width:oe,wrap:!!oe});if(!u){if(f.length)f.forEach(C=>{H.div({text:`${C[0].replace(/\$0/g,B)}`}),C[1]&&H.div({text:`${C[1]}`,padding:[1,0,0,0]})}),H.div();else if(d.length){let C=null;L._?C=`${B} <${r("command")}>
8
- `:C=`${B} [${r("command")}]
9
- `,H.div(`${C}`)}}if(d.length>1||d.length===1&&!d[0][2]){H.div(r("Commands:"));const C=t.getInternalMethods().getContext(),W=C.commands.length?`${C.commands.join(" ")} `:"";t.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(d=d.sort((se,ae)=>se[0].localeCompare(ae[0])));const Y=B?`${B} `:"";d.forEach(se=>{const ae=`${Y}${W}${se[0].replace(/^\$0 ?/,"")}`;H.span({text:ae,padding:[0,2,0,2],width:p(d,oe,`${B}${W}`)+4},{text:se[1]});const N=[];se[2]&&N.push(`[${r("default")}]`),se[3]&&se[3].length&&N.push(`[${r("aliases:")} ${se[3].join(", ")}]`),se[4]&&(typeof se[4]=="string"?N.push(`[${r("deprecated: %s",se[4])}]`):N.push(`[${r("deprecated")}]`)),N.length?H.div({text:N.join(" "),padding:[0,0,0,2],align:"right"}):H.div()}),H.div()}const S=(Object.keys(G.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);Z=Z.filter(C=>!t.parsed.newAliases[C]&&S.every(W=>(G.alias[W]||[]).indexOf(C)===-1));const V=r("Options:");X[V]||(X[V]=[]),w(Z,G.alias,X,V);const k=C=>/^--/.test(wn(C)),A=Object.keys(X).filter(C=>X[C].length>0).map(C=>{const W=X[C].filter(D).map(Y=>{if(S.includes(Y))return Y;for(let se=0,ae;(ae=S[se])!==void 0;se++)if((G.alias[ae]||[]).includes(Y))return ae;return Y});return{groupName:C,normalizedKeys:W}}).filter(({normalizedKeys:C})=>C.length>0).map(({groupName:C,normalizedKeys:W})=>{const Y=W.reduce((se,ae)=>(se[ae]=[ae].concat(G.alias[ae]||[]).map(N=>C===n.getPositionalGroupName()?N:(/^[0-9]$/.test(N)?G.boolean.includes(ae)?"-":"--":N.length>1?"--":"-")+N).sort((N,x)=>k(N)===k(x)?0:k(N)?1:-1).join(", "),se),{});return{groupName:C,normalizedKeys:W,switches:Y}});if(A.filter(({groupName:C})=>C!==n.getPositionalGroupName()).some(({normalizedKeys:C,switches:W})=>!C.every(Y=>k(W[Y])))&&A.filter(({groupName:C})=>C!==n.getPositionalGroupName()).forEach(({normalizedKeys:C,switches:W})=>{C.forEach(Y=>{k(W[Y])&&(W[Y]=d0(W[Y],4))})}),A.forEach(({groupName:C,normalizedKeys:W,switches:Y})=>{H.div(C),W.forEach(se=>{const ae=Y[se];let N=y[se]||"",x=null;N.includes(m)&&(N=r(N.substring(m.length))),G.boolean.includes(se)&&(x=`[${r("boolean")}]`),G.count.includes(se)&&(x=`[${r("count")}]`),G.string.includes(se)&&(x=`[${r("string")}]`),G.normalize.includes(se)&&(x=`[${r("string")}]`),G.array.includes(se)&&(x=`[${r("array")}]`),G.number.includes(se)&&(x=`[${r("number")}]`);const K=P=>typeof P=="string"?`[${r("deprecated: %s",P)}]`:`[${r("deprecated")}]`,te=[se in q?K(q[se]):null,x,se in T?`[${r("required")}]`:null,G.choices&&G.choices[se]?`[${r("choices:")} ${n.stringifiedValues(G.choices[se])}]`:null,$(G.default[se],G.defaultDescription[se])].filter(Boolean).join(" ");H.span({text:wn(ae),padding:[0,2,0,2+Ju(ae)],width:p(Y,oe)+4},N);const O=t.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;te&&!O?H.div({text:te,padding:[0,0,0,2],align:"right"}):H.div()}),H.div()}),h.length&&(H.div(r("Examples:")),h.forEach(C=>{C[0]=C[0].replace(/\$0/g,B)}),h.forEach(C=>{C[1]===""?H.div({text:C[0],padding:[0,2,0,2]}):H.div({text:C[0],padding:[0,2,0,2],width:p(h,oe)+4},{text:C[1]})}),H.div()),E.length>0){const C=E.map(W=>W.replace(/\$0/g,B)).join(`
10
- `);H.div(`${C}
11
- `)}return H.toString().replace(/\s*$/,"")};function p(j,B,T){let L=0;return Array.isArray(j)||(j=Object.values(j).map(q=>[q])),j.forEach(q=>{L=Math.max(e.stringWidth(T?`${T} ${wn(q[0])}`:wn(q[0]))+Ju(q[0]),L)}),B&&(L=Math.min(L,parseInt((B*.5).toString(),10))),L}function g(){const j=t.getDemandedOptions(),B=t.getOptions();(Object.keys(B.alias)||[]).forEach(T=>{B.alias[T].forEach(L=>{y[L]&&n.describe(T,y[L]),L in j&&t.demandOption(T,j[L]),B.boolean.includes(L)&&t.boolean(T),B.count.includes(L)&&t.count(T),B.string.includes(L)&&t.string(T),B.normalize.includes(L)&&t.normalize(T),B.array.includes(L)&&t.array(T),B.number.includes(L)&&t.number(T)})})}let _;n.cacheHelpMessage=function(){_=this.help()},n.clearCachedHelpMessage=function(){_=void 0},n.hasCachedHelpMessage=function(){return!!_};function w(j,B,T,L){let q=[],X=null;return Object.keys(T).forEach(G=>{q=q.concat(T[G])}),j.forEach(G=>{X=[G].concat(B[G]),X.some(Z=>q.indexOf(Z)!==-1)||T[L].push(G)}),q}function D(j){return t.getOptions().hiddenOptions.indexOf(j)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}n.showHelp=j=>{const B=t.getInternalMethods().getLoggerInstance();j||(j="error"),(typeof j=="function"?j:B[j])(n.help())},n.functionDescription=j=>["(",j.name?e.Parser.decamelize(j.name,"-"):r("generated-value"),")"].join(""),n.stringifiedValues=function(B,T){let L="";const q=T||", ",X=[].concat(B);return!B||!X.length||X.forEach(G=>{L.length&&(L+=q),L+=JSON.stringify(G)}),L};function $(j,B){let T=`[${r("default:")} `;if(j===void 0&&!B)return null;if(B)T+=B;else switch(typeof j){case"string":T+=`"${j}"`;break;case"object":T+=JSON.stringify(j);break;default:T+=j}return`${T}]`}function F(){return e.process.stdColumns?Math.min(80,e.process.stdColumns):80}let M=null;n.version=j=>{M=j},n.showVersion=j=>{const B=t.getInternalMethods().getLoggerInstance();j||(j="error"),(typeof j=="function"?j:B[j])(M)},n.reset=function(B){return o=null,c=!1,f=[],u=!1,E=[],h=[],d=[],y=Kr(y,T=>!B[T]),n};const U=[];return n.freeze=function(){U.push({failMessage:o,failureOutput:c,usages:f,usageDisabled:u,epilogs:E,examples:h,commands:d,descriptions:y})},n.unfreeze=function(B=!1){const T=U.pop();T&&(B?(y={...T.descriptions,...y},d=[...T.commands,...d],f=[...T.usages,...f],h=[...T.examples,...h],E=[...T.epilogs,...E]):{failMessage:o,failureOutput:c,usages:f,usageDisabled:u,epilogs:E,examples:h,commands:d,descriptions:y}=T)},n}function $s(t){return typeof t=="object"}function d0(t,e){return $s(t)?{text:t.text,indentation:t.indentation+e}:{text:t,indentation:e}}function Ju(t){return $s(t)?t.indentation:0}function wn(t){return $s(t)?t.text:t}const h0=`###-begin-{{app_name}}-completions-###
2
+ import{c as Dt,f as gp,m as pt,g as Ji,a as yp,b as xa,T as Ep,N as Ma,i as Dp,n as Xi,C as vp,d as $p,e as qa,h as Ua,t as _p,p as wp,u as K,l as bp,w as Ap,j as Cp,k as Sp,o as zt,q as Ha,r as Va,L as vt,s as Rp,v as mt,x as Op,y as Ip,z as Fp,A as dr,B as za,D as Pp,E as Sr,F as Qi,G as Ga,H as Np,Q as Tp}from"../shared/likec4.31-Bgt9N.mjs";import Te,{hrtime as Lp,cwd as Zi,exit as jp,stdout as kp,argv as Bp}from"node:process";import{strictEqual as xp,notStrictEqual as Mp}from"assert";import es,{
3
+ resolve as Qe,dirname as ts,normalize as qp,relative as Up,extname as Hp,basename as Vp}from"path";import{statSync as Wa,readdirSync as zp,readFileSync as rs,writeFile as Gp}from"fs";import Ka,{format as Ya,inspect as Wp}from"util";import{fileURLToPath as Kp}from"url";import be,{resolve as De,dirname as Gt,join as Rr,relative as Wt,extname as Or,isAbsolute as ns,basename as sn}from"node:path";import ge,{existsSync as Pt,copyFileSync as Ja,readdirSync as Yp,rmSync as is}from"node:fs";import{mkdtemp as on,
4
+ writeFile as Kt,mkdir as $t,stat as ss,copyFile as Jp,rm as Xp}from"node:fs/promises";import Ir,{tmpdir as an}from"node:os";import{fileURLToPath as Xa}from"node:url";import Qa from"@vitejs/plugin-react";import{sortNaturalByFqn as Za,compareNatural as Qp,hasAtLeast as Zp,invariant as os,nonexhaustive as eu,delay as tu}from"@likec4/core";import{build as Fr,createServer as em,preview as tm}from"vite";import{chromium as ru}from"playwright";import rm from"node:net";import{setTimeout as nm}from"node:timers/promises";
5
+ import{promisify as Me,isDeepStrictEqual as im}from"node:util";import Pr from"node:crypto";import sm from"node:assert";import"tty";import"os";import"crypto";import"net";import"child_process";import"@likec4/core/types";import"events";import"buffer";import"@hpcc-js/wasm-graphviz";import"@likec4/core/compute-view";import"boxen";import"node:child_process";import"node:events";import"node:stream/promises";import"fs/promises";import"@likec4/core/model";const un=Object.create(null),Nr=t=>globalThis.process?.
6
+ env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?un:globalThis),Nt=new Proxy(un,{get(t,e){return Nr()[e]??un[e]},has(t,e){const r=Nr();return e in r||e in un},set(t,e,r){const n=Nr(!0);return n[e]=r,!0},deleteProperty(t,e){if(!e)return!1;const r=Nr(!0);return delete r[e],!0},ownKeys(){const t=Nr(!0);return Object.keys(t)}}),as=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",om=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEA\
7
+ MFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_M\
8
+ ERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKB\
9
+ LITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function am(){if(globalThis.process?.env)for(const t of om){const e=t[1]||t[0];if(globalThis.process?.env[e])return{name:t[0].toLowerCase(),...t[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stac\
10
+ kblitz",ci:!1}:{name:"",ci:!1}}const nu=am();nu.name;function Yt(t){return t?t!=="false":!1}const um=globalThis.process?.platform||"",iu=Yt(Nt.CI)||nu.ci!==!1,su=Yt(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);Yt(Nt.DEBUG);const cm=as==="test"||Yt(Nt.TEST),lm=Yt(Nt.MINIMAL)||iu||cm||!su,fm=/^win/i.test(um);!Yt(Nt.NO_COLOR)&&(Yt(Nt.FORCE_COLOR)||(su||fm)&&Nt.TERM);const dm=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(dm?.split(".")[0]);const hm=globalThis.
11
+ process||Object.create(null),ou={versions:{}};new Proxy(hm,{get(t,e){if(e==="env")return Nt;if(e in t)return t[e];if(e in ou)return ou[e]}});const pm=globalThis.process?.release?.name==="node",mm=!!globalThis.Bun||!!globalThis.process?.versions?.bun,gm=!!globalThis.Deno,ym=!!globalThis.fastly,Em=!!globalThis.Netlify,Dm=!!globalThis.EdgeRuntime,vm=globalThis.navigator?.userAgent==="Cloudflare-Workers",$m=[[Em,"netlify"],[Dm,"edge-light"],[vm,"workerd"],[ym,"fastly"],[gm,"deno"],[mm,"bun"],[pm,"no\
12
+ de"]];function _m(){const t=$m.find(e=>e[0]);if(t)return{name:t[1]}}const wm=_m();wm?.name;const bm={right:Im,center:Fm},Am=0,cn=1,Cm=2,ln=3;class Sm{constructor(e){var r;this.width=e.width,this.wrap=(r=e.wrap)!==null&&r!==void 0?r:!0,this.rows=[]}span(...e){const r=this.div(...e);r.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]=="string")return this.applyLayoutDSL(e[0]);const r=e.map(n=>typeof n=="string"?this.colFromString(
13
+ n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]=="string"&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){const r=e.split(`
14
+ `).map(i=>i.split(" "));let n=0;return r.forEach(i=>{i.length>1&&Ge.stringWidth(i[0])>n&&(n=Math.min(Math.floor(this.width*.5),Ge.stringWidth(i[0])))}),r.forEach(i=>{this.div(...i.map((s,o)=>({text:s.trim(),padding:this.measurePadding(s),width:o===0&&i.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){const r=Ge.stripAnsi(e);return[0,r.match(/\s*$/)[0].length,0,r.match(/^\s*/)[0].length]}toString(){const e=[];return this.
15
+ rows.forEach(r=>{this.rowToString(r,e)}),e.filter(r=>!r.hidden).map(r=>r.text).join(`
16
+ `)}rowToString(e,r){return this.rasterize(e).forEach((n,i)=>{let s="";n.forEach((o,a)=>{const{width:c}=e[a],l=this.negatePadding(e[a]);let u=o;if(l>Ge.stringWidth(o)&&(u+=" ".repeat(l-Ge.stringWidth(o))),e[a].align&&e[a].align!=="left"&&this.wrap){const h=bm[e[a].align];u=h(u,l),Ge.stringWidth(u)<l&&(u+=" ".repeat((c||0)-Ge.stringWidth(u)-1))}const d=e[a].padding||[0,0,0,0];d[ln]&&(s+=" ".repeat(d[ln])),s+=au(e[a],u,"| "),s+=u,s+=au(e[a],u," |"),d[cn]&&(s+=" ".repeat(d[cn])),i===0&&r.length>0&&(s=
17
+ this.renderInline(s,r[r.length-1]))}),r.push({text:s.replace(/ +$/,""),span:e.span})}),r}renderInline(e,r){const n=e.match(/^ */),i=n?n[0].length:0,s=r.text,o=Ge.stringWidth(s.trimRight());return r.span?this.wrap?i<o?e:(r.hidden=!0,s.trimRight()+" ".repeat(i-o)+e.trimLeft()):(r.hidden=!0,s+e):e}rasterize(e){const r=[],n=this.columnWidths(e);let i;return e.forEach((s,o)=>{s.width=n[o],this.wrap?i=Ge.wrap(s.text,this.negatePadding(s),{hard:!0}).split(`
18
+ `):i=s.text.split(`
19
+ `),s.border&&(i.unshift("."+"-".repeat(this.negatePadding(s)+2)+"."),i.push("'"+"-".repeat(this.negatePadding(s)+2)+"'")),s.padding&&(i.unshift(...new Array(s.padding[Am]||0).fill("")),i.push(...new Array(s.padding[Cm]||0).fill(""))),i.forEach((a,c)=>{r[c]||r.push([]);const l=r[c];for(let u=0;u<o;u++)l[u]===void 0&&l.push("");l.push(a)})}),r}negatePadding(e){let r=e.width||0;return e.padding&&(r-=(e.padding[ln]||0)+(e.padding[cn]||0)),e.border&&(r-=4),r}columnWidths(e){if(!this.wrap)return e.map(
20
+ o=>o.width||Ge.stringWidth(o.text));let r=e.length,n=this.width;const i=e.map(o=>{if(o.width)return r--,n-=o.width,o.width}),s=r?Math.floor(n/r):0;return i.map((o,a)=>o===void 0?Math.max(s,Rm(e[a])):o)}}function au(t,e,r){return t.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?r:" ":""}function Rm(t){const e=t.padding||[],r=1+(e[ln]||0)+(e[cn]||0);return t.border?r+4:r}function Om(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Im(t,e){
21
+ t=t.trim();const r=Ge.stringWidth(t);return r<e?" ".repeat(e-r)+t:t}function Fm(t,e){t=t.trim();const r=Ge.stringWidth(t);return r>=e?t:" ".repeat(e-r>>1)+t}let Ge;function Pm(t,e){return Ge=e,new Sm({width:t?.width||Om(),wrap:t?.wrap})}const uu=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function cu(t){return t.replace(uu,"")}function Nm(t,e){const[r,n]=t.match(uu)||["",""];t=cu(t);let i="";for(let s=0;s<t.length;s++)s!==0&&s%e===0&&(i+=
22
+ `
23
+ `),i+=t.charAt(s);return r&&n&&(i=`${r}${i}${n}`),i}function Tm(t){return Pm(t,{stringWidth:e=>[...e].length,stripAnsi:cu,wrap:Nm})}function Lm(t,e){let r=Qe(".",t),n;for(Wa(r).isDirectory()||(r=ts(r));;){if(n=e(r,zp(r)),n)return Qe(r,n);if(r=ts(n=r),n===r)break}}function Tr(t){if(t!==t.toLowerCase()&&t!==t.toUpperCase()||(t=t.toLowerCase()),t.indexOf("-")===-1&&t.indexOf("_")===-1)return t;{let r="",n=!1;const i=t.match(/^-+/);for(let s=i?i[0].length:0;s<t.length;s++){let o=t.charAt(s);n&&(n=!1,
24
+ o=o.toUpperCase()),s!==0&&(o==="-"||o==="_")?n=!0:o!=="-"&&o!=="_"&&(r+=o)}return r}}function lu(t,e){const r=t.toLowerCase();e=e||"-";let n="";for(let i=0;i<t.length;i++){const s=r.charAt(i),o=t.charAt(i);s!==o&&i>0?n+=`${e}${r.charAt(i)}`:n+=o}return n}function fu(t){return t==null?!1:typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^0[^.]/.test(t)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function jm(t){if(Array.isArray(t))return t.map(o=>typeof o!="string"?o+"":o);t=t.trim();let e=0,
25
+ r=null,n=null,i=null;const s=[];for(let o=0;o<t.length;o++){if(r=n,n=t.charAt(o),n===" "&&!i){r!==" "&&e++;continue}n===i?i=null:(n==="'"||n==='"')&&!i&&(i=n),s[e]||(s[e]=""),s[e]+=n}return s}var it;(function(t){t.BOOLEAN="boolean",t.STRING="string",t.NUMBER="number",t.ARRAY="array"})(it||(it={}));let _t;class km{constructor(e){_t=e}parse(e,r){const n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,
26
+ envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),i=jm(e),s=typeof e=="string",o=Bm(Object.assign(Object.create(null),n.alias)),a=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"se\
27
+ t-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),c=Object.assign(Object.create(null),n.default),l=n.configObjects||[],u=n.envPrefix,d=a["populate--"],h=d?"--":"_",E=Object.create(null),y=Object.create(null),D=n.__||_t.format,f={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),
28
+ configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},g=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,p=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(O){const P=typeof O=="object"?O.key:O,ee=Object.keys(O).map(function(W){return{boolean:"bools",string:"strings",number:"numbers"}[W]}).filter(Boolean).pop();ee&&(f[ee][P]=!0),f.arrays[P]=!0,f.keys.push(P)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(O){
29
+ f.bools[O]=!0,f.keys.push(O)}),[].concat(n.string||[]).filter(Boolean).forEach(function(O){f.strings[O]=!0,f.keys.push(O)}),[].concat(n.number||[]).filter(Boolean).forEach(function(O){f.numbers[O]=!0,f.keys.push(O)}),[].concat(n.count||[]).filter(Boolean).forEach(function(O){f.counts[O]=!0,f.keys.push(O)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(O){f.normalize[O]=!0,f.keys.push(O)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([O,P])=>{typeof P=="number"&&(f.nargs[O]=
30
+ P,f.keys.push(O))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([O,P])=>{typeof P=="function"&&(f.coercions[O]=P,f.keys.push(O))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(O){f.configs[O]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([O,P])=>{(typeof P=="boolean"||typeof P=="function")&&(f.configs[O]=P)})),k(n.key,o,n.default,f.arrays),Object.keys(c).forEach(function(O){(f.aliases[O]||
31
+ []).forEach(function(P){c[P]=c[O]})});let m=null;ie();let v=[];const $=Object.assign(Object.create(null),{_:[]}),_={};for(let O=0;O<i.length;O++){const P=i[O],ee=P.replace(/^-{3,}/,"---");let W,F,re,H,ne,fe;if(P!=="--"&&/^-/.test(P)&&Z(P))b(P);else if(ee.match(/^---+(=|$)/)){b(P);continue}else if(P.match(/^--.+=/)||!a["short-option-groups"]&&P.match(/^-.+=/))H=P.match(/^--?([^=]+)=([\s\S]*)$/),H!==null&&Array.isArray(H)&&H.length>=3&&(w(H[1],f.arrays)?O=V(O,H[1],i,H[2]):w(H[1],f.nargs)!==!1?O=I(
32
+ O,H[1],i,H[2]):G(H[1],H[2],!0));else if(P.match(p)&&a["boolean-negation"])H=P.match(p),H!==null&&Array.isArray(H)&&H.length>=2&&(F=H[1],G(F,w(F,f.arrays)?[!1]:!1));else if(P.match(/^--.+/)||!a["short-option-groups"]&&P.match(/^-[^-]+/))H=P.match(/^--?(.+)/),H!==null&&Array.isArray(H)&&H.length>=2&&(F=H[1],w(F,f.arrays)?O=V(O,F,i):w(F,f.nargs)!==!1?O=I(O,F,i):(ne=i[O+1],ne!==void 0&&(!ne.match(/^-/)||ne.match(g))&&!w(F,f.bools)&&!w(F,f.counts)||/^(true|false)$/.test(ne)?(G(F,ne),O++):G(F,ae(F))));else if(P.
33
+ match(/^-.\..+=/))H=P.match(/^-([^=]+)=([\s\S]*)$/),H!==null&&Array.isArray(H)&&H.length>=3&&G(H[1],H[2]);else if(P.match(/^-.\..+/)&&!P.match(g))ne=i[O+1],H=P.match(/^-(.\..+)/),H!==null&&Array.isArray(H)&&H.length>=2&&(F=H[1],ne!==void 0&&!ne.match(/^-/)&&!w(F,f.bools)&&!w(F,f.counts)?(G(F,ne),O++):G(F,ae(F)));else if(P.match(/^-[^-]+/)&&!P.match(g)){re=P.slice(1,-1).split(""),W=!1;for(let we=0;we<re.length;we++){if(ne=P.slice(we+2),re[we+1]&&re[we+1]==="="){fe=P.slice(we+3),F=re[we],w(F,f.arrays)?
34
+ O=V(O,F,i,fe):w(F,f.nargs)!==!1?O=I(O,F,i,fe):G(F,fe),W=!0;break}if(ne==="-"){G(re[we],ne);continue}if(/[A-Za-z]/.test(re[we])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(ne)&&w(ne,f.bools)===!1){G(re[we],ne),W=!0;break}if(re[we+1]&&re[we+1].match(/\W/)){G(re[we],ne),W=!0;break}else G(re[we],ae(re[we]))}F=P.slice(-1)[0],!W&&F!=="-"&&(w(F,f.arrays)?O=V(O,F,i):w(F,f.nargs)!==!1?O=I(O,F,i):(ne=i[O+1],ne!==void 0&&(!/^(-|--)[^-]/.test(ne)||ne.match(g))&&!w(F,f.bools)&&!w(F,f.counts)||/^(true|false)$/.test(ne)?
35
+ (G(F,ne),O++):G(F,ae(F))))}else if(P.match(/^-[0-9]$/)&&P.match(g)&&w(P.slice(1),f.bools))F=P.slice(1),G(F,ae(F));else if(P==="--"){v=i.slice(O+1);break}else if(a["halt-at-non-option"]){v=i.slice(O);break}else b(P)}z($,!0),z($,!1),j($),Y(),q($,f.aliases,c,!0),X($),a["set-placeholder-key"]&&se($),Object.keys(f.counts).forEach(function(O){C($,O.split("."))||G(O,0)}),d&&v.length&&($[h]=[]),v.forEach(function(O){$[h].push(O)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys($).filter(O=>O!==
36
+ "--"&&O.includes("-")).forEach(O=>{delete $[O]}),a["strip-aliased"]&&[].concat(...Object.keys(o).map(O=>o[O])).forEach(O=>{a["camel-case-expansion"]&&O.includes("-")&&delete $[O.split(".").map(P=>Tr(P)).join(".")],delete $[O]});function b(O){const P=N("_",O);(typeof P=="string"||typeof P=="number")&&$._.push(P)}function I(O,P,ee,W){let F,re=w(P,f.nargs);if(re=typeof re!="number"||isNaN(re)?1:re,re===0)return Q(W)||(m=Error(D("Argument unexpected for: %s",P))),G(P,ae(P)),O;let H=Q(W)?0:1;if(a["na\
37
+ rgs-eats-options"])ee.length-(O+1)+H<re&&(m=Error(D("Not enough arguments following: %s",P))),H=re;else{for(F=O+1;F<ee.length&&(!ee[F].match(/^-[^0-9]/)||ee[F].match(g)||Z(ee[F]));F++)H++;H<re&&(m=Error(D("Not enough arguments following: %s",P)))}let ne=Math.min(H,re);for(!Q(W)&&ne>0&&(G(P,W),ne--),F=O+1;F<ne+O+1;F++)G(P,ee[F]);return O+ne}function V(O,P,ee,W){let F=[],re=W||ee[O+1];const H=w(P,f.nargs);if(w(P,f.bools)&&!/^(true|false)$/.test(re))F.push(!0);else if(Q(re)||Q(W)&&/^-/.test(re)&&!g.
38
+ test(re)&&!Z(re)){if(c[P]!==void 0){const ne=c[P];F=Array.isArray(ne)?ne:[ne]}}else{Q(W)||F.push(B(P,W,!0));for(let ne=O+1;ne<ee.length&&!(!a["greedy-arrays"]&&F.length>0||H&&typeof H=="number"&&F.length>=H||(re=ee[ne],/^-/.test(re)&&!g.test(re)&&!Z(re)));ne++)O=ne,F.push(B(P,re,s))}return typeof H=="number"&&(H&&F.length<H||isNaN(H)&&F.length===0)&&(m=Error(D("Not enough arguments following: %s",P))),G(P,F),O}function G(O,P,ee=s){if(/-/.test(O)&&a["camel-case-expansion"]){const re=O.split(".").
39
+ map(function(H){return Tr(H)}).join(".");L(O,re)}const W=B(O,P,ee),F=O.split(".");U($,F,W),f.aliases[O]&&f.aliases[O].forEach(function(re){const H=re.split(".");U($,H,W)}),F.length>1&&a["dot-notation"]&&(f.aliases[F[0]]||[]).forEach(function(re){let H=re.split(".");const ne=[].concat(F);ne.shift(),H=H.concat(ne),(f.aliases[O]||[]).includes(H.join("."))||U($,H,W)}),w(O,f.normalize)&&!w(O,f.arrays)&&[O].concat(f.aliases[O]||[]).forEach(function(H){Object.defineProperty(_,H,{enumerable:!0,get(){return P},
40
+ set(ne){P=typeof ne=="string"?_t.normalize(ne):ne}})})}function L(O,P){f.aliases[O]&&f.aliases[O].length||(f.aliases[O]=[P],E[P]=!0),f.aliases[P]&&f.aliases[P].length||L(P,O)}function B(O,P,ee){ee&&(P=xm(P)),(w(O,f.bools)||w(O,f.counts))&&typeof P=="string"&&(P=P==="true");let W=Array.isArray(P)?P.map(function(F){return N(O,F)}):N(O,P);return w(O,f.counts)&&(Q(W)||typeof W=="boolean")&&(W=us()),w(O,f.normalize)&&w(O,f.arrays)&&(Array.isArray(P)?W=P.map(F=>_t.normalize(F)):W=_t.normalize(P)),W}function N(O,P){
41
+ return!a["parse-positional-numbers"]&&O==="_"||!w(O,f.strings)&&!w(O,f.bools)&&!Array.isArray(P)&&(fu(P)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${P}`)))||!Q(P)&&w(O,f.numbers))&&(P=Number(P)),P}function j(O){const P=Object.create(null);q(P,f.aliases,c),Object.keys(f.configs).forEach(function(ee){const W=O[ee]||P[ee];if(W)try{let F=null;const re=_t.resolve(_t.cwd(),W),H=f.configs[ee];if(typeof H=="function"){try{F=H(re)}catch(ne){F=ne}if(F instanceof Error){m=F;return}}else
42
+ F=_t.require(re);M(F)}catch(F){F.name==="PermissionDenied"?m=F:O[ee]&&(m=Error(D("Invalid JSON config file: %s",W)))}})}function M(O,P){Object.keys(O).forEach(function(ee){const W=O[ee],F=P?P+"."+ee:ee;typeof W=="object"&&W!==null&&!Array.isArray(W)&&a["dot-notation"]?M(W,F):(!C($,F.split("."))||w(F,f.arrays)&&a["combine-arrays"])&&G(F,W)})}function Y(){typeof l<"u"&&l.forEach(function(O){M(O)})}function z(O,P){if(typeof u>"u")return;const ee=typeof u=="string"?u:"",W=_t.env();Object.keys(W).forEach(
43
+ function(F){if(ee===""||F.lastIndexOf(ee,0)===0){const re=F.split("__").map(function(H,ne){return ne===0&&(H=H.substring(ee.length)),Tr(H)});(P&&f.configs[re.join(".")]||!P)&&!C(O,re)&&G(re.join("."),W[F])}})}function X(O){let P;const ee=new Set;Object.keys(O).forEach(function(W){if(!ee.has(W)&&(P=w(W,f.coercions),typeof P=="function"))try{const F=N(W,P(O[W]));[].concat(f.aliases[W]||[],W).forEach(re=>{ee.add(re),O[re]=F})}catch(F){m=F}})}function se(O){return f.keys.forEach(P=>{~P.indexOf(".")||
44
+ typeof O[P]>"u"&&(O[P]=void 0)}),O}function q(O,P,ee,W=!1){Object.keys(ee).forEach(function(F){C(O,F.split("."))||(U(O,F.split("."),ee[F]),W&&(y[F]=!0),(P[F]||[]).forEach(function(re){C(O,re.split("."))||U(O,re.split("."),ee[F])}))})}function C(O,P){let ee=O;a["dot-notation"]||(P=[P.join(".")]),P.slice(0,-1).forEach(function(F){ee=ee[F]||{}});const W=P[P.length-1];return typeof ee!="object"?!1:W in ee}function U(O,P,ee){let W=O;a["dot-notation"]||(P=[P.join(".")]),P.slice(0,-1).forEach(function(fe){
45
+ fe=du(fe),typeof W=="object"&&W[fe]===void 0&&(W[fe]={}),typeof W[fe]!="object"||Array.isArray(W[fe])?(Array.isArray(W[fe])?W[fe].push({}):W[fe]=[W[fe],{}],W=W[fe][W[fe].length-1]):W=W[fe]});const F=du(P[P.length-1]),re=w(P.join("."),f.arrays),H=Array.isArray(ee);let ne=a["duplicate-arguments-array"];!ne&&w(F,f.nargs)&&(ne=!0,(!Q(W[F])&&f.nargs[F]===1||Array.isArray(W[F])&&W[F].length===f.nargs[F])&&(W[F]=void 0)),ee===us()?W[F]=us(W[F]):Array.isArray(W[F])?ne&&re&&H?W[F]=a["flatten-duplicate-ar\
46
+ rays"]?W[F].concat(ee):(Array.isArray(W[F][0])?W[F]:[W[F]]).concat([ee]):!ne&&!!re==!!H?W[F]=ee:W[F]=W[F].concat([ee]):W[F]===void 0&&re?W[F]=H?ee:[ee]:ne&&!(W[F]===void 0||w(F,f.counts)||w(F,f.bools))?W[F]=[W[F],ee]:W[F]=ee}function k(...O){O.forEach(function(P){Object.keys(P||{}).forEach(function(ee){f.aliases[ee]||(f.aliases[ee]=[].concat(o[ee]||[]),f.aliases[ee].concat(ee).forEach(function(W){if(/-/.test(W)&&a["camel-case-expansion"]){const F=Tr(W);F!==ee&&f.aliases[ee].indexOf(F)===-1&&(f.aliases[ee].
47
+ push(F),E[F]=!0)}}),f.aliases[ee].concat(ee).forEach(function(W){if(W.length>1&&/[A-Z]/.test(W)&&a["camel-case-expansion"]){const F=lu(W,"-");F!==ee&&f.aliases[ee].indexOf(F)===-1&&(f.aliases[ee].push(F),E[F]=!0)}}),f.aliases[ee].forEach(function(W){f.aliases[W]=[ee].concat(f.aliases[ee].filter(function(F){return W!==F}))}))})})}function w(O,P){const ee=[].concat(f.aliases[O]||[],O),W=Object.keys(P),F=ee.find(re=>W.includes(re));return F?P[F]:!1}function A(O){const P=Object.keys(f);return[].concat(
48
+ P.map(W=>f[W])).some(function(W){return Array.isArray(W)?W.includes(O):W[O]})}function R(O,...P){return[].concat(...P).some(function(W){const F=O.match(W);return F&&A(F[1])})}function J(O){if(O.match(g)||!O.match(/^-[^-]+/))return!1;let P=!0,ee;const W=O.slice(1).split("");for(let F=0;F<W.length;F++){if(ee=O.slice(F+2),!A(W[F])){P=!1;break}if(W[F+1]&&W[F+1]==="="||ee==="-"||/[A-Za-z]/.test(W[F])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(ee)||W[F+1]&&W[F+1].match(/\W/))break}return P}function Z(O){return a["\
49
+ unknown-options-as-args"]&&oe(O)}function oe(O){return O=O.replace(/^-{3,}/,"--"),O.match(g)||J(O)?!1:!R(O,/^-+([^=]+?)=[\s\S]*$/,p,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function ae(O){return!w(O,f.bools)&&!w(O,f.counts)&&`${O}`in c?c[O]:T(x(O))}function T(O){return{[it.BOOLEAN]:!0,[it.STRING]:"",[it.NUMBER]:void 0,[it.ARRAY]:[]}[O]}function x(O){let P=it.BOOLEAN;return w(O,f.strings)?P=it.STRING:w(O,f.numbers)?P=it.NUMBER:w(O,f.bools)?P=it.BOOLEAN:w(O,f.arrays)&&
50
+ (P=it.ARRAY),P}function Q(O){return O===void 0}function ie(){Object.keys(f.counts).find(O=>w(O,f.arrays)?(m=Error(D("Invalid configuration: %s, opts.count excludes opts.array.",O)),!0):w(O,f.nargs)?(m=Error(D("Invalid configuration: %s, opts.count excludes opts.narg.",O)),!0):!1)}return{aliases:Object.assign({},f.aliases),argv:Object.assign(_,$),configuration:a,defaulted:Object.assign({},y),error:m,newAliases:Object.assign({},E)}}}function Bm(t){const e=[],r=Object.create(null);let n=!0;for(Object.
51
+ keys(t).forEach(function(i){e.push([].concat(t[i],i))});n;){n=!1;for(let i=0;i<e.length;i++)for(let s=i+1;s<e.length;s++)if(e[i].filter(function(a){return e[s].indexOf(a)!==-1}).length){e[i]=e[i].concat(e[s]),e.splice(s,1),n=!0;break}}return e.forEach(function(i){i=i.filter(function(o,a,c){return c.indexOf(o)===a});const s=i.pop();s!==void 0&&typeof s=="string"&&(r[s]=i)}),r}function us(t){return t!==void 0?t+1:1}function du(t){return t==="__proto__"?"___proto___":t}function xm(t){return typeof t==
52
+ "string"&&(t[0]==="'"||t[0]==='"')&&t[t.length-1]===t[0]?t.substring(1,t.length-1):t}var cs,ls,fs;const hu=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,pu=(ls=(cs=process==null?void 0:process.versions)===null||cs===void 0?void 0:cs.node)!==null&&ls!==void 0?ls:(fs=process==null?void 0:process.version)===null||fs===void 0?void 0:fs.slice(1);if(pu&&Number(pu.match(/^([^.]+)/)[1])<hu)throw Error(`yargs parser supports a minimum Node.js versi\
53
+ on of ${hu}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const Mm=process?process.env:{},mu=new km({cwd:process.cwd,env:()=>Mm,format:Ya,normalize:qp,resolve:Qe,require:t=>{if(typeof require<"u")return require(t);if(t.match(/\.json$/))return JSON.parse(rs(t,"utf8"));throw Error("only .json config files are supported in ESM")}}),Lr=function(e,r){return mu.parse(e.slice(),r).argv};Lr.detailed=function(t,e){return mu.parse(t.slice(),e)},Lr.camelCase=
54
+ Tr,Lr.decamelize=lu,Lr.looksLikeNumber=fu;function gu(){return qm()?0:1}function qm(){return Um()&&!process.defaultApp}function Um(){return!!process.versions.electron}function Hm(t){return t.slice(gu()+1)}function Vm(){return process.argv[gu()]}class je extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,je)}}const zm={fs:{readFileSync:rs,writeFile:Gp},format:Ya,resolve:Qe,exists:t=>{try{return Wa(t).isFile()}catch{return!1}}};
55
+ let st;class Gm{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);const r=e.shift();let n=function(){};return typeof e[e.length-1]=="function"&&(n=e.pop()),n=n||
56
+ function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),st.format.apply(st.format,[this.cache[this.locale][r]||r].concat(e))}__n(){const e=Array.prototype.slice.call(arguments),r=e.shift(),n=e.shift(),i=e.shift();let s=function(){};typeof e[e.length-1]=="function"&&(s=e.pop()),this.cache[this.locale]||this._readLocaleFile();let o=i===1?r:n;this.
57
+ cache[this.locale][r]&&(o=this.cache[this.locale][r][i===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:s})):s();const a=[o];return~o.indexOf("%d")&&a.push(i),st.format.apply(st.format,a.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(const r in e)Object.prototype.hasOwnProperty.call(
58
+ e,r)&&(this.cache[this.locale][r]=e[r])}_taggedLiteral(e,...r){let n="";return e.forEach(function(i,s){const o=r[s+1];n+=i,typeof o<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){const e=this,r=this.writeQueue[0],n=r.directory,i=r.locale,s=r.cb,o=this._resolveLocaleFile(n,i),a=JSON.stringify(this.cache[i],null,2);st.fs.writeFile(o,a,"utf-8",function(c){e.writeQueue.
59
+ shift(),e.writeQueue.length>0&&e._processWriteQueue(),s(c)})}_readLocaleFile(){let e={};const r=this._resolveLocaleFile(this.directory,this.locale);try{st.fs.readFileSync&&(e=JSON.parse(st.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,r){let n=st.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){const i=st.resolve(
60
+ e,"./",r.split("_")[0]+".json");this._fileExistsSync(i)&&(n=i)}return n}_fileExistsSync(e){return st.exists(e)}}function Wm(t,e){st=e;const r=new Gm(t);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}const Km=t=>Wm(t,zm),Ym="require is not supported by ESM",yu="loading a directory of commands is not supported yet for ESM";let jr;try{jr=Kp(import.meta.url)}catch{jr=process.cwd()}const Jm=jr.substring(
61
+ 0,jr.lastIndexOf("node_modules")),Xm={assert:{notStrictEqual:Mp,strictEqual:xp},cliui:Tm,findUp:Lm,getEnv:t=>process.env[t],inspect:Wp,getCallerFile:()=>{throw new je(yu)},getProcessArgvBin:Vm,mainFilename:Jm||process.cwd(),Parser:Lr,path:{basename:Vp,dirname:ts,extname:Hp,relative:Up,resolve:Qe},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<
62
+ "u"?process.stdout.columns:null},readFileSync:rs,require:()=>{throw new je(Ym)},requireDirectory:()=>{throw new je(yu)},stringWidth:t=>[...t].length,y18n:Km({directory:Qe(jr,"../../../locales"),updateFiles:!1})};function ot(t,e,r,n){r.assert.notStrictEqual(t,e,n)}function Eu(t,e){e.assert.strictEqual(typeof t,"string")}function fn(t){return Object.keys(t)}function Le(t){return!!t&&!!t.then&&typeof t.then=="function"}function kr(t){const r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,
63
+ i=r.shift();if(!i)throw new Error(`No command found in: ${t}`);const s={cmd:i.replace(n,""),demanded:[],optional:[]};return r.forEach((o,a)=>{let c=!1;o=o.replace(/\s/g,""),/\.+[\]>]/.test(o)&&a===r.length-1&&(c=!0),/^\[/.test(o)?s.optional.push({cmd:o.replace(n,"").split("|"),variadic:c}):s.demanded.push({cmd:o.replace(n,"").split("|"),variadic:c})}),s}const Qm=["first","second","third","fourth","fifth","sixth"];function ce(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},
64
+ t,e]:[kr(`cmd ${t}`),e,r]}try{let i=0;const[s,o,a]=n(),c=[].slice.call(o);for(;c.length&&c[c.length-1]===void 0;)c.pop();const l=a||c.length;if(l<s.demanded.length)throw new je(`Not enough arguments provided. Expected ${s.demanded.length} but received ${c.length}.`);const u=s.demanded.length+s.optional.length;if(l>u)throw new je(`Too many arguments provided. Expected max ${u} but received ${l}.`);s.demanded.forEach(d=>{const h=c.shift(),E=Du(h);d.cmd.filter(D=>D===E||D==="*").length===0&&vu(E,d.
65
+ cmd,i),i+=1}),s.optional.forEach(d=>{if(c.length===0)return;const h=c.shift(),E=Du(h);d.cmd.filter(D=>D===E||D==="*").length===0&&vu(E,d.cmd,i),i+=1})}catch(i){console.warn(i.stack)}}function Du(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function vu(t,e,r){throw new je(`Invalid ${Qm[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}class Zm{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,i=!1){if(ce("<array|funct\
66
+ ion> [boolean] [boolean] [boolean]",[e,r,n],arguments.length),Array.isArray(e)){for(let s=0;s<e.length;s++){if(typeof e[s]!="function")throw Error("middleware must be a function");const o=e[s];o.applyBeforeValidation=r,o.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){const s=e;s.applyBeforeValidation=r,s.global=n,s.mutates=i,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,r){const n=this.yargs.getAliases();return this.globalMiddleware=
67
+ this.globalMiddleware.filter(i=>{const s=[...n[r]||[],r];return i.option?!s.includes(i.option):!0}),e.option=r,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){const e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}}function e0(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}function Br(t,e,r,n){return r.reduce((i,s)=>{
68
+ if(s.applyBeforeValidation!==n)return i;if(s.mutates){if(s.applied)return i;s.applied=!0}if(Le(i))return i.then(o=>Promise.all([o,s(o,e)])).then(([o,a])=>Object.assign(o,a));{const o=s(i,e);return Le(o)?o.then(a=>Object.assign(i,a)):Object.assign(i,o)}},t)}function xr(t,e,r=n=>{throw n}){try{const n=t0(t)?t():t;return Le(n)?n.then(i=>e(i)):e(n)}catch(n){return r(n)}}function t0(t){return typeof t=="function"}function r0(t){if(typeof require>"u")return null;for(let e=0,r=Object.keys(require.cache),
69
+ n;e<r.length;e++)if(n=require.cache[r[e]],n.exports===t)return n;return null}const hr=/(^\*)|(^\$0)/;class n0{constructor(e,r,n,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=e,this.globalMiddleware=n,this.validation=r}addDirectory(e,r,n,i){i=i||{},typeof i.recurse!="boolean"&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);const s=typeof i.visit=="function"?i.visit:o=>o;i.visit=(o,a,c)=>{const l=s(o,a,c);if(l){if(this.requireCache.
70
+ has(a))return l;this.requireCache.add(a),this.addHandler(l)}return l},this.shim.requireDirectory({require:r,filename:n},e,i)}addHandler(e,r,n,i,s,o){let a=[];const c=e0(s);if(i=i||(()=>{}),Array.isArray(e))if(s0(e))[e,...a]=e;else for(const l of e)this.addHandler(l);else if(a0(e)){let l=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(l=[].concat(l).concat(e.aliases)),this.addHandler(l,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);
71
+ return}else if($u(n)){this.addHandler([e].concat(a),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){const l=kr(e);a=a.map(h=>kr(h).cmd);let u=!1;const d=[l.cmd].concat(a).filter(h=>hr.test(h)?(u=!0,!1):!0);d.length===0&&u&&d.push("$0"),u&&(l.cmd=d[0],a=d.slice(1),e=e.replace(hr,l.cmd)),a.forEach(h=>{this.aliasMap[h]=l.cmd}),r!==!1&&this.usage.command(e,r,u,a,o),this.handlers[l.cmd]={original:e,description:r,handler:i,builder:n||{},middlewares:c,deprecated:o,demanded:l.
72
+ demanded,optional:l.optional},u&&(this.defaultCommand=this.handlers[l.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,r,n,i,s,o){const a=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,c=r.getInternalMethods().getContext(),l=c.commands.slice(),u=!e;e&&(c.commands.push(e),c.fullCommands.push(a.original));const d=this.applyBuilderUpdateUsageAndParse(
73
+ u,a,r,n.aliases,l,i,s,o);return Le(d)?d.then(h=>this.applyMiddlewareAndGetResult(u,a,h.innerArgv,c,s,h.aliases,r)):this.applyMiddlewareAndGetResult(u,a,d.innerArgv,c,s,d.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,i,s,o,a,c){const l=r.builder;let u=n;if(ds(l)){n.getInternalMethods().getUsageInstance().freeze();const d=l(n.getInternalMethods().reset(i),c);if(Le(d))return d.then(h=>(u=w0(h)?h:n,this.parseAndUpdateUsage(e,r,u,s,o,a)))}else o0(l)&&(n.getInternalMethods().getUsageInstance().freeze(),
74
+ u=n.getInternalMethods().reset(i),Object.keys(r.builder).forEach(d=>{u.option(d,l[d])}));return this.parseAndUpdateUsage(e,r,u,s,o,a)}parseAndUpdateUsage(e,r,n,i,s,o){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,r),r.description);const a=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,s,o);return Le(a)?a.then(c=>({aliases:n.parsed.aliases,innerArgv:c})):
75
+ {aliases:n.parsed.aliases,innerArgv:a}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,r){const n=hr.test(r.original)?r.original.replace(hr,"").trim():r.original,i=e.filter(s=>!hr.test(s));return i.push(n),`$0 ${i.join(" ")}`}handleValidationAndGetResult(e,r,n,i,s,o,a,c){if(!o.getInternalMethods().getHasOutput()){const l=o.getInternalMethods().runValidation(
76
+ s,c,o.parsed.error,e);n=xr(n,u=>(l(u),u))}if(r.handler&&!o.getInternalMethods().getHasOutput()){o.getInternalMethods().setHasOutput();const l=!!o.getOptions().configuration["populate--"];o.getInternalMethods().postProcess(n,l,!1,!1),n=Br(n,o,a,!1),n=xr(n,u=>{const d=r.handler(u);return Le(d)?d.then(()=>u):u}),e||o.getInternalMethods().getUsageInstance().cacheHelpMessage(),Le(n)&&!o.getInternalMethods().hasParseCallback()&&n.catch(u=>{try{o.getInternalMethods().getUsageInstance().fail(null,u)}catch{}})}
77
+ return e||(i.commands.pop(),i.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,r,n,i,s,o,a){let c={};if(s)return n;a.getInternalMethods().getHasOutput()||(c=this.populatePositionals(r,n,i,a));const l=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),u=Br(n,a,l,!0);return Le(u)?u.then(d=>this.handleValidationAndGetResult(e,r,d,i,o,a,l,c)):this.handleValidationAndGetResult(e,r,u,i,o,a,l,c)}populatePositionals(e,r,n,i){r._=r._.slice(n.commands.length);const s=e.demanded.slice(
78
+ 0),o=e.optional.slice(0),a={};for(this.validation.positionalCount(s.length,r._.length);s.length;){const c=s.shift();this.populatePositional(c,r,a)}for(;o.length;){const c=o.shift();this.populatePositional(c,r,a)}return r._=n.commands.concat(r._.map(c=>""+c)),this.postProcessPositionals(r,a,this.cmdToParseOptions(e.original),i),a}populatePositional(e,r,n){const i=e.cmd[0];e.variadic?n[i]=r._.splice(0).map(String):r._.length&&(n[i]=[String(r._.shift())])}cmdToParseOptions(e){const r={array:[],default:{},
79
+ alias:{},demand:{}},n=kr(e);return n.demanded.forEach(i=>{const[s,...o]=i.cmd;i.variadic&&(r.array.push(s),r.default[s]=[]),r.alias[s]=o,r.demand[s]=!0}),n.optional.forEach(i=>{const[s,...o]=i.cmd;i.variadic&&(r.array.push(s),r.default[s]=[]),r.alias[s]=o}),r}postProcessPositionals(e,r,n,i){const s=Object.assign({},i.getOptions());s.default=Object.assign(n.default,s.default);for(const l of Object.keys(n.alias))s.alias[l]=(s.alias[l]||[]).concat(n.alias[l]);s.array=s.array.concat(n.array),s.config=
80
+ {};const o=[];if(Object.keys(r).forEach(l=>{r[l].map(u=>{s.configuration["unknown-options-as-args"]&&(s.key[l]=!0),o.push(`--${l}`),o.push(u)})}),!o.length)return;const a=Object.assign({},s.configuration,{"populate--":!1}),c=this.shim.Parser.detailed(o,Object.assign({},s,{configuration:a}));if(c.error)i.getInternalMethods().getUsageInstance().fail(c.error.message,c.error);else{const l=Object.keys(r);Object.keys(r).forEach(u=>{l.push(...c.aliases[u])}),Object.keys(c.argv).forEach(u=>{l.includes(u)&&
81
+ (r[u]||(r[u]=c.argv[u]),!this.isInConfigs(i,u)&&!this.isDefaulted(i,u)&&Object.prototype.hasOwnProperty.call(e,u)&&Object.prototype.hasOwnProperty.call(c.argv,u)&&(Array.isArray(e[u])||Array.isArray(c.argv[u]))?e[u]=[].concat(e[u],c.argv[u]):e[u]=c.argv[u])})}}isDefaulted(e,r){const{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(e,r){const{configObjects:n}=e.getOptions();return n.some(i=>Object.
82
+ prototype.hasOwnProperty.call(i,r))||n.some(i=>Object.prototype.hasOwnProperty.call(i,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){const n=hr.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}const r=this.defaultCommand.builder;if(ds(r))return r(e,!0);$u(r)||Object.keys(r).forEach(
83
+ n=>{e.option(n,r[n])})}moduleName(e){const r=r0(e);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(r.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:r,desc:n}){for(const i of[e,r,n]){if(typeof i=="string"||i===!1)return i;ot(i,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){
84
+ const e=this.frozens.pop();ot(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}}function i0(t,e,r,n){return new n0(t,e,r,n)}function $u(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function s0(t){return t.every(e=>typeof e=="string")}function ds(t){return typeof t=="function"}function o0(t){return typeof t=="\
85
+ object"}function a0(t){return typeof t=="object"&&!Array.isArray(t)}function Mr(t={},e=()=>!0){const r={};return fn(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}function qr(t){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{const r=e;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(t)})}function u0(t){return typeof t=="boolean"}function c0(t,e){const r=e.y18n.__,n={},i=[];n.failFn=function(B){i.push(B)};let s=null,o=null,a=!0;n.showHelpOnFail=function(B=!0,N){
86
+ const[j,M]=typeof B=="string"?[!0,B]:[B,N];return t.getInternalMethods().isGlobalContext()&&(o=M),s=M,a=j,n};let c=!1;n.fail=function(B,N){const j=t.getInternalMethods().getLoggerInstance();if(i.length)for(let M=i.length-1;M>=0;--M){const Y=i[M];if(u0(Y)){if(N)throw N;if(B)throw Error(B)}else Y(B,N,n)}else{if(t.getExitProcess()&&qr(!0),!c){c=!0,a&&(t.showHelp("error"),j.error()),(B||N)&&j.error(B||N);const M=s||o;M&&((B||N)&&j.error(""),j.error(M))}if(N=N||new je(B),t.getExitProcess())return t.exit(
87
+ 1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,N);throw N}};let l=[],u=!1;n.usage=(L,B)=>L===null?(u=!0,l=[],n):(u=!1,l.push([L,B||""]),n),n.getUsage=()=>l,n.getUsageDisabled=()=>u,n.getPositionalGroupName=()=>r("Positionals:");let d=[];n.example=(L,B)=>{d.push([L,B||""])};let h=[];n.command=function(B,N,j,M,Y=!1){j&&(h=h.map(z=>(z[2]=!1,z))),h.push([B,N||"",j,M,Y])},n.getCommands=()=>h;let E={};n.describe=function(B,N){Array.isArray(B)?B.forEach(j=>{n.describe(j,N)}):typeof B==
88
+ "object"?Object.keys(B).forEach(j=>{n.describe(j,B[j])}):E[B]=N},n.getDescriptions=()=>E;let y=[];n.epilog=L=>{y.push(L)};let D=!1,f;n.wrap=L=>{D=!0,f=L},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(D||(f=I(),D=!0),f);const g="__yargsString__:";n.deferY18nLookup=L=>g+L,n.help=function(){if(v)return v;m();const B=t.customScriptName?t.$0:e.path.basename(t.$0),N=t.getDemandedOptions(),j=t.getDemandedCommands(),M=t.getDeprecatedOptions(),Y=t.getGroups(),z=t.getOptions();let X=[];X=X.concat(Object.
89
+ keys(E)),X=X.concat(Object.keys(N)),X=X.concat(Object.keys(j)),X=X.concat(Object.keys(z.default)),X=X.filter(_),X=Object.keys(X.reduce((R,J)=>(J!=="_"&&(R[J]=!0),R),{}));const se=n.getWrap(),q=e.cliui({width:se,wrap:!!se});if(!u){if(l.length)l.forEach(R=>{q.div({text:`${R[0].replace(/\$0/g,B)}`}),R[1]&&q.div({text:`${R[1]}`,padding:[1,0,0,0]})}),q.div();else if(h.length){let R=null;j._?R=`${B} <${r("command")}>
90
+ `:R=`${B} [${r("command")}]
91
+ `,q.div(`${R}`)}}if(h.length>1||h.length===1&&!h[0][2]){q.div(r("Commands:"));const R=t.getInternalMethods().getContext(),J=R.commands.length?`${R.commands.join(" ")} `:"";t.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(h=h.sort((oe,ae)=>oe[0].localeCompare(ae[0])));const Z=B?`${B} `:"";h.forEach(oe=>{const ae=`${Z}${J}${oe[0].replace(/^\$0 ?/,"")}`;q.span({text:ae,padding:[0,2,0,2],width:p(h,se,`${B}${J}`)+4},{text:oe[1]});const T=[];oe[2]&&T.push(`[${r("default")}]`),oe[3]&&
92
+ oe[3].length&&T.push(`[${r("aliases:")} ${oe[3].join(", ")}]`),oe[4]&&(typeof oe[4]=="string"?T.push(`[${r("deprecated: %s",oe[4])}]`):T.push(`[${r("deprecated")}]`)),T.length?q.div({text:T.join(" "),padding:[0,0,0,2],align:"right"}):q.div()}),q.div()}const C=(Object.keys(z.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);X=X.filter(R=>!t.parsed.newAliases[R]&&C.every(J=>(z.alias[J]||[]).indexOf(R)===-1));const U=r("Options:");Y[U]||(Y[U]=[]),$(X,z.alias,Y,U);const k=R=>/^--/.test(dn(R)),
93
+ w=Object.keys(Y).filter(R=>Y[R].length>0).map(R=>{const J=Y[R].filter(_).map(Z=>{if(C.includes(Z))return Z;for(let oe=0,ae;(ae=C[oe])!==void 0;oe++)if((z.alias[ae]||[]).includes(Z))return ae;return Z});return{groupName:R,normalizedKeys:J}}).filter(({normalizedKeys:R})=>R.length>0).map(({groupName:R,normalizedKeys:J})=>{const Z=J.reduce((oe,ae)=>(oe[ae]=[ae].concat(z.alias[ae]||[]).map(T=>R===n.getPositionalGroupName()?T:(/^[0-9]$/.test(T)?z.boolean.includes(ae)?"-":"--":T.length>1?"--":"-")+T).sort(
94
+ (T,x)=>k(T)===k(x)?0:k(T)?1:-1).join(", "),oe),{});return{groupName:R,normalizedKeys:J,switches:Z}});if(w.filter(({groupName:R})=>R!==n.getPositionalGroupName()).some(({normalizedKeys:R,switches:J})=>!R.every(Z=>k(J[Z])))&&w.filter(({groupName:R})=>R!==n.getPositionalGroupName()).forEach(({normalizedKeys:R,switches:J})=>{R.forEach(Z=>{k(J[Z])&&(J[Z]=l0(J[Z],4))})}),w.forEach(({groupName:R,normalizedKeys:J,switches:Z})=>{q.div(R),J.forEach(oe=>{const ae=Z[oe];let T=E[oe]||"",x=null;T.includes(g)&&
95
+ (T=r(T.substring(g.length))),z.boolean.includes(oe)&&(x=`[${r("boolean")}]`),z.count.includes(oe)&&(x=`[${r("count")}]`),z.string.includes(oe)&&(x=`[${r("string")}]`),z.normalize.includes(oe)&&(x=`[${r("string")}]`),z.array.includes(oe)&&(x=`[${r("array")}]`),z.number.includes(oe)&&(x=`[${r("number")}]`);const Q=P=>typeof P=="string"?`[${r("deprecated: %s",P)}]`:`[${r("deprecated")}]`,ie=[oe in M?Q(M[oe]):null,x,oe in N?`[${r("required")}]`:null,z.choices&&z.choices[oe]?`[${r("choices:")} ${n.stringifiedValues(
96
+ z.choices[oe])}]`:null,b(z.default[oe],z.defaultDescription[oe])].filter(Boolean).join(" ");q.span({text:dn(ae),padding:[0,2,0,2+_u(ae)],width:p(Z,se)+4},T);const O=t.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;ie&&!O?q.div({text:ie,padding:[0,0,0,2],align:"right"}):q.div()}),q.div()}),d.length&&(q.div(r("Examples:")),d.forEach(R=>{R[0]=R[0].replace(/\$0/g,B)}),d.forEach(R=>{R[1]===""?q.div({text:R[0],padding:[0,2,0,2]}):q.div({text:R[0],padding:[0,2,0,2],width:p(d,se)+4},{text:R[1]})}),
97
+ q.div()),y.length>0){const R=y.map(J=>J.replace(/\$0/g,B)).join(`
98
+ `);q.div(`${R}
99
+ `)}return q.toString().replace(/\s*$/,"")};function p(L,B,N){let j=0;return Array.isArray(L)||(L=Object.values(L).map(M=>[M])),L.forEach(M=>{j=Math.max(e.stringWidth(N?`${N} ${dn(M[0])}`:dn(M[0]))+_u(M[0]),j)}),B&&(j=Math.min(j,parseInt((B*.5).toString(),10))),j}function m(){const L=t.getDemandedOptions(),B=t.getOptions();(Object.keys(B.alias)||[]).forEach(N=>{B.alias[N].forEach(j=>{E[j]&&n.describe(N,E[j]),j in L&&t.demandOption(N,L[j]),B.boolean.includes(j)&&t.boolean(N),B.count.includes(j)&&t.
100
+ count(N),B.string.includes(j)&&t.string(N),B.normalize.includes(j)&&t.normalize(N),B.array.includes(j)&&t.array(N),B.number.includes(j)&&t.number(N)})})}let v;n.cacheHelpMessage=function(){v=this.help()},n.clearCachedHelpMessage=function(){v=void 0},n.hasCachedHelpMessage=function(){return!!v};function $(L,B,N,j){let M=[],Y=null;return Object.keys(N).forEach(z=>{M=M.concat(N[z])}),L.forEach(z=>{Y=[z].concat(B[z]),Y.some(X=>M.indexOf(X)!==-1)||N[j].push(z)}),M}function _(L){return t.getOptions().
101
+ hiddenOptions.indexOf(L)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}n.showHelp=L=>{const B=t.getInternalMethods().getLoggerInstance();L||(L="error"),(typeof L=="function"?L:B[L])(n.help())},n.functionDescription=L=>["(",L.name?e.Parser.decamelize(L.name,"-"):r("generated-value"),")"].join(""),n.stringifiedValues=function(B,N){let j="";const M=N||", ",Y=[].concat(B);return!B||!Y.length||Y.forEach(z=>{j.length&&(j+=M),j+=JSON.stringify(z)}),j};function b(L,B){let N=`[${r("default:")} `;if(L===
102
+ void 0&&!B)return null;if(B)N+=B;else switch(typeof L){case"string":N+=`"${L}"`;break;case"object":N+=JSON.stringify(L);break;default:N+=L}return`${N}]`}function I(){return e.process.stdColumns?Math.min(80,e.process.stdColumns):80}let V=null;n.version=L=>{V=L},n.showVersion=L=>{const B=t.getInternalMethods().getLoggerInstance();L||(L="error"),(typeof L=="function"?L:B[L])(V)},n.reset=function(B){return s=null,c=!1,l=[],u=!1,y=[],d=[],h=[],E=Mr(E,N=>!B[N]),n};const G=[];return n.freeze=function(){
103
+ G.push({failMessage:s,failureOutput:c,usages:l,usageDisabled:u,epilogs:y,examples:d,commands:h,descriptions:E})},n.unfreeze=function(B=!1){const N=G.pop();N&&(B?(E={...N.descriptions,...E},h=[...N.commands,...h],l=[...N.usages,...l],d=[...N.examples,...d],y=[...N.epilogs,...y]):{failMessage:s,failureOutput:c,usages:l,usageDisabled:u,epilogs:y,examples:d,commands:h,descriptions:E}=N)},n}function hs(t){return typeof t=="object"}function l0(t,e){return hs(t)?{text:t.text,indentation:t.indentation+e}:
104
+ {text:t,indentation:e}}function _u(t){return hs(t)?t.indentation:0}function dn(t){return hs(t)?t.text:t}const f0=`###-begin-{{app_name}}-completions-###
12
105
  #
13
106
  # yargs command completion script
14
107
  #
@@ -36,7 +129,7 @@ _{{app_name}}_yargs_completions()
36
129
  }
37
130
  complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
38
131
  ###-end-{{app_name}}-completions-###
39
- `,p0=`#compdef {{app_name}}
132
+ `,d0=`#compdef {{app_name}}
40
133
  ###-begin-{{app_name}}-completions-###
41
134
  #
42
135
  # yargs command completion script
@@ -55,14 +148,92 @@ _{{app_name}}_yargs_completions()
55
148
  }
56
149
  compdef _{{app_name}}_yargs_completions {{app_name}}
57
150
  ###-end-{{app_name}}-completions-###
58
- `;class m0{constructor(e,r,n,i){var o,s,a;this.yargs=e,this.usage=r,this.command=n,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(a=((o=this.shim.getEnv("SHELL"))===null||o===void 0?void 0:o.includes("zsh"))||((s=this.shim.getEnv("ZSH_NAME"))===null||s===void 0?void 0:s.includes("zsh")))!==null&&a!==void 0?a:!1}defaultCompletion(e,r,n,i){const o=this.command.getCommandHandlers();for(let a=0,c=e.length;a<c;++a)if(o[e[a]]&&o[e[a]].builder){const f=o[e[a]].builder;if(Ds(f)){this.indexAfterLastReset=a+1;const u=this.yargs.getInternalMethods().reset();return f(u,!0),u.argv}}const s=[];this.commandCompletions(s,e,n),this.optionCompletions(s,e,r,n),this.choicesFromOptionsCompletions(s,e,r,n),this.choicesFromPositionalsCompletions(s,e,r,n),i(null,s)}commandCompletions(e,r,n){const i=this.yargs.getInternalMethods().getContext().commands;!n.match(/^-/)&&i[i.length-1]!==n&&!this.previousArgHasChoices(r)&&this.usage.getCommands().forEach(o=>{const s=zr(o[0]).cmd;if(r.indexOf(s)===-1)if(!this.zshShell)e.push(s);else{const a=o[1]||"";e.push(s.replace(/:/g,"\\:")+":"+a)}})}optionCompletions(e,r,n,i){if((i.match(/^-/)||i===""&&e.length===0)&&!this.previousArgHasChoices(r)){const o=this.yargs.getOptions(),s=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(o.key).forEach(a=>{const c=!!o.configuration["boolean-negation"]&&o.boolean.includes(a);!s.includes(a)&&!o.hiddenOptions.includes(a)&&!this.argsContainKey(r,a,c)&&this.completeOptionKey(a,e,i,c&&!!o.default[a])})}}choicesFromOptionsCompletions(e,r,n,i){if(this.previousArgHasChoices(r)){const o=this.getPreviousArgChoices(r);o&&o.length>0&&e.push(...o.map(s=>s.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(e,r,n,i){if(i===""&&e.length>0&&this.previousArgHasChoices(r))return;const o=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],s=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),a=o[n._.length-s-1];if(!a)return;const c=this.yargs.getOptions().choices[a]||[];for(const f of c)f.startsWith(i)&&e.push(f.replace(/:/g,"\\:"))}getPreviousArgChoices(e){if(e.length<1)return;let r=e[e.length-1],n="";if(!r.startsWith("-")&&e.length>1&&(n=r,r=e[e.length-2]),!r.startsWith("-"))return;const i=r.replace(/^-+/,""),o=this.yargs.getOptions(),s=[i,...this.yargs.getAliases()[i]||[]];let a;for(const c of s)if(Object.prototype.hasOwnProperty.call(o.key,c)&&Array.isArray(o.choices[c])){a=o.choices[c];break}if(a)return a.filter(c=>!n||c.startsWith(n))}previousArgHasChoices(e){const r=this.getPreviousArgChoices(e);return r!==void 0&&r.length>0}argsContainKey(e,r,n){const i=o=>e.indexOf((/^[^0-9]$/.test(o)?"-":"--")+o)!==-1;if(i(r)||n&&i(`no-${r}`))return!0;if(this.aliases){for(const o of this.aliases[r])if(i(o))return!0}return!1}completeOptionKey(e,r,n,i){var o,s,a,c;let f=e;if(this.zshShell){const y=this.usage.getDescriptions(),E=(s=(o=this===null||this===void 0?void 0:this.aliases)===null||o===void 0?void 0:o[e])===null||s===void 0?void 0:s.find(m=>{const p=y[m];return typeof p=="string"&&p.length>0}),v=E?y[E]:void 0,l=(c=(a=y[e])!==null&&a!==void 0?a:v)!==null&&c!==void 0?c:"";f=`${e.replace(/:/g,"\\:")}:${l.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}const u=y=>/^--/.test(y),h=y=>/^[^0-9]$/.test(y),d=!u(n)&&h(e)?"-":"--";r.push(d+f),i&&r.push(d+"no-"+f)}customCompletion(e,r,n,i){if(at(this.customCompletionFunction,null,this.shim),y0(this.customCompletionFunction)){const o=this.customCompletionFunction(n,r);return je(o)?o.then(s=>{this.shim.process.nextTick(()=>{i(null,s)})}).catch(s=>{this.shim.process.nextTick(()=>{i(s,void 0)})}):i(null,o)}else return E0(this.customCompletionFunction)?this.customCompletionFunction(n,r,(o=i)=>this.defaultCompletion(e,r,n,o),o=>{i(null,o)}):this.customCompletionFunction(n,r,o=>{i(null,o)})}getCompletion(e,r){const n=e.length?e[e.length-1]:"",i=this.yargs.parse(e,!0),o=this.customCompletionFunction?s=>this.customCompletion(e,s,n,r):s=>this.defaultCompletion(e,s,n,r);return je(i)?i.then(o):o(i)}generateCompletionScript(e,r){let n=this.zshShell?p0:h0;const i=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,i),n=n.replace(/{{completion_command}}/g,r),n.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}}function g0(t,e,r,n){return new m0(t,e,r,n)}function y0(t){return t.length<3}function E0(t){return t.length>3}function v0(t,e){if(t.length===0)return e.length;if(e.length===0)return t.length;const r=[];let n;for(n=0;n<=e.length;n++)r[n]=[n];let i;for(i=0;i<=t.length;i++)r[0][i]=i;for(n=1;n<=e.length;n++)for(i=1;i<=t.length;i++)e.charAt(n-1)===t.charAt(i-1)?r[n][i]=r[n-1][i-1]:n>1&&i>1&&e.charAt(n-2)===t.charAt(i-1)&&e.charAt(n-1)===t.charAt(i-2)?r[n][i]=r[n-2][i-2]+1:r[n][i]=Math.min(r[n-1][i-1]+1,Math.min(r[n][i-1]+1,r[n-1][i]+1));return r[e.length][t.length]}const Xu=["$0","--","_"];function _0(t,e,r){const n=r.y18n.__,i=r.y18n.__n,o={};o.nonOptionCount=function(h){const d=t.getDemandedCommands(),E=h._.length+(h["--"]?h["--"].length:0)-t.getInternalMethods().getContext().commands.length;d._&&(E<d._.min||E>d._.max)&&(E<d._.min?d._.minMsg!==void 0?e.fail(d._.minMsg?d._.minMsg.replace(/\$0/g,E.toString()).replace(/\$1/,d._.min.toString()):null):e.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",E,E.toString(),d._.min.toString())):E>d._.max&&(d._.maxMsg!==void 0?e.fail(d._.maxMsg?d._.maxMsg.replace(/\$0/g,E.toString()).replace(/\$1/,d._.max.toString()):null):e.fail(i("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",E,E.toString(),d._.max.toString()))))},o.positionalCount=function(h,d){d<h&&e.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",d,d+"",h+""))},o.requiredArguments=function(h,d){let y=null;for(const E of Object.keys(d))(!Object.prototype.hasOwnProperty.call(h,E)||typeof h[E]>"u")&&(y=y||{},y[E]=d[E]);if(y){const E=[];for(const l of Object.keys(y)){const m=y[l];m&&E.indexOf(m)<0&&E.push(m)}const v=E.length?`
59
- ${E.join(`
60
- `)}`:"";e.fail(i("Missing required argument: %s","Missing required arguments: %s",Object.keys(y).length,Object.keys(y).join(", ")+v))}},o.unknownArguments=function(h,d,y,E,v=!0){var l;const m=t.getInternalMethods().getCommandInstance().getCommands(),p=[],g=t.getInternalMethods().getContext();if(Object.keys(h).forEach(_=>{!Xu.includes(_)&&!Object.prototype.hasOwnProperty.call(y,_)&&!Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),_)&&!o.isValidAndSomeAliasIsNotNew(_,d)&&p.push(_)}),v&&(g.commands.length>0||m.length>0||E)&&h._.slice(g.commands.length).forEach(_=>{m.includes(""+_)||p.push(""+_)}),v){const w=((l=t.getDemandedCommands()._)===null||l===void 0?void 0:l.max)||0,D=g.commands.length+w;D<h._.length&&h._.slice(D).forEach($=>{$=String($),!g.commands.includes($)&&!p.includes($)&&p.push($)})}p.length&&e.fail(i("Unknown argument: %s","Unknown arguments: %s",p.length,p.map(_=>_.trim()?_:`"${_}"`).join(", ")))},o.unknownCommands=function(h){const d=t.getInternalMethods().getCommandInstance().getCommands(),y=[],E=t.getInternalMethods().getContext();return(E.commands.length>0||d.length>0)&&h._.slice(E.commands.length).forEach(v=>{d.includes(""+v)||y.push(""+v)}),y.length>0?(e.fail(i("Unknown command: %s","Unknown commands: %s",y.length,y.join(", "))),!0):!1},o.isValidAndSomeAliasIsNotNew=function(h,d){if(!Object.prototype.hasOwnProperty.call(d,h))return!1;const y=t.parsed.newAliases;return[h,...d[h]].some(E=>!Object.prototype.hasOwnProperty.call(y,E)||!y[h])},o.limitedChoices=function(h){const d=t.getOptions(),y={};if(!Object.keys(d.choices).length)return;Object.keys(h).forEach(l=>{Xu.indexOf(l)===-1&&Object.prototype.hasOwnProperty.call(d.choices,l)&&[].concat(h[l]).forEach(m=>{d.choices[l].indexOf(m)===-1&&m!==void 0&&(y[l]=(y[l]||[]).concat(m))})});const E=Object.keys(y);if(!E.length)return;let v=n("Invalid values:");E.forEach(l=>{v+=`
61
- ${n("Argument: %s, Given: %s, Choices: %s",l,e.stringifiedValues(y[l]),e.stringifiedValues(d.choices[l]))}`}),e.fail(v)};let s={};o.implies=function(h,d){ce("<string|object> [array|number|string]",[h,d],arguments.length),typeof h=="object"?Object.keys(h).forEach(y=>{o.implies(y,h[y])}):(t.global(h),s[h]||(s[h]=[]),Array.isArray(d)?d.forEach(y=>o.implies(h,y)):(at(d,void 0,r),s[h].push(d)))},o.getImplied=function(){return s};function a(u,h){const d=Number(h);return h=isNaN(d)?h:d,typeof h=="number"?h=u._.length>=h:h.match(/^--no-.+/)?(h=h.match(/^--no-(.+)/)[1],h=!Object.prototype.hasOwnProperty.call(u,h)):h=Object.prototype.hasOwnProperty.call(u,h),h}o.implications=function(h){const d=[];if(Object.keys(s).forEach(y=>{const E=y;(s[y]||[]).forEach(v=>{let l=E;const m=v;l=a(h,l),v=a(h,v),l&&!v&&d.push(` ${E} -> ${m}`)})}),d.length){let y=`${n("Implications failed:")}
62
- `;d.forEach(E=>{y+=E}),e.fail(y)}};let c={};o.conflicts=function(h,d){ce("<string|object> [array|string]",[h,d],arguments.length),typeof h=="object"?Object.keys(h).forEach(y=>{o.conflicts(y,h[y])}):(t.global(h),c[h]||(c[h]=[]),Array.isArray(d)?d.forEach(y=>o.conflicts(h,y)):c[h].push(d))},o.getConflicting=()=>c,o.conflicting=function(h){Object.keys(h).forEach(d=>{c[d]&&c[d].forEach(y=>{y&&h[d]!==void 0&&h[y]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",d,y))})}),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(c).forEach(d=>{c[d].forEach(y=>{y&&h[r.Parser.camelCase(d)]!==void 0&&h[r.Parser.camelCase(y)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",d,y))})})},o.recommendCommands=function(h,d){d=d.sort((l,m)=>m.length-l.length);let E=null,v=1/0;for(let l=0,m;(m=d[l])!==void 0;l++){const p=v0(h,m);p<=3&&p<v&&(v=p,E=m)}E&&e.fail(n("Did you mean %s?",E))},o.reset=function(h){return s=Kr(s,d=>!h[d]),c=Kr(c,d=>!h[d]),o};const f=[];return o.freeze=function(){f.push({implied:s,conflicting:c})},o.unfreeze=function(){const h=f.pop();at(h,void 0,r),{implied:s,conflicting:c}=h},o}let bs=[],Jr;function As(t,e,r,n){Jr=n;let i={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if(typeof t.extends!="string")return i;const o=/\.json|\..*rc$/.test(t.extends);let s=null;if(o)s=D0(e,t.extends);else try{s=require.resolve(t.extends)}catch{return t}w0(s),bs.push(s),i=o?JSON.parse(Jr.readFileSync(s,"utf8")):require(t.extends),delete t.extends,i=As(i,Jr.path.dirname(s),r,Jr)}return bs=[],r?Qu(i,t):Object.assign({},i,t)}function w0(t){if(bs.indexOf(t)>-1)throw new Le(`Circular extended configurations: '${t}'.`)}function D0(t,e){return Jr.path.resolve(t,e)}function Qu(t,e){const r={};function n(i){return i&&typeof i=="object"&&!Array.isArray(i)}Object.assign(r,t);for(const i of Object.keys(e))n(e[i])&&n(r[i])?r[i]=Qu(t[i],e[i]):r[i]=e[i];return r}var ue=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},R=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ie,Xt,Xr,Ze,We,Dn,jt,Qt,$n,et,bn,tt,yt,Ke,rt,An,_r,xe,le,Cn,Sn,Ye,Zt,wr,er,Lt,Rn,de,tr,rr,nr,he,On,Et,Fe;function $0(t){return(e=[],r=t.process.cwd(),n)=>{const i=new b0(e,r,n,t);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}const Zu=Symbol("copyDoubleDash"),ec=Symbol("copyDoubleDash"),Cs=Symbol("deleteFromParserHintObject"),tc=Symbol("emitWarning"),rc=Symbol("freeze"),nc=Symbol("getDollarZero"),ir=Symbol("getParserConfiguration"),ic=Symbol("getUsageConfiguration"),Ss=Symbol("guessLocale"),sc=Symbol("guessVersion"),oc=Symbol("parsePositionalNumbers"),Rs=Symbol("pkgUp"),xt=Symbol("populateParserHintArray"),Dr=Symbol("populateParserHintSingleValueDictionary"),Os=Symbol("populateParserHintArrayDictionary"),Fs=Symbol("populateParserHintDictionary"),Is=Symbol("sanitizeKey"),Ps=Symbol("setKey"),Ns=Symbol("unfreeze"),ac=Symbol("validateAsync"),uc=Symbol("getCommandInstance"),cc=Symbol("getContext"),lc=Symbol("getHasOutput"),fc=Symbol("getLoggerInstance"),dc=Symbol("getParseContext"),hc=Symbol("getUsageInstance"),pc=Symbol("getValidationInstance"),Fn=Symbol("hasParseCallback"),mc=Symbol("isGlobalContext"),sr=Symbol("postProcess"),gc=Symbol("rebase"),Ts=Symbol("reset"),Qr=Symbol("runYargsParserAndExecuteCommands"),js=Symbol("runValidation"),yc=Symbol("setHasOutput"),or=Symbol("kTrackManuallySetKeys");class b0{constructor(e=[],r,n,i){this.customScriptName=!1,this.parsed=!1,Ie.set(this,void 0),Xt.set(this,void 0),Xr.set(this,{commands:[],fullCommands:[]}),Ze.set(this,null),We.set(this,null),Dn.set(this,"show-hidden"),jt.set(this,null),Qt.set(this,!0),$n.set(this,{}),et.set(this,!0),bn.set(this,[]),tt.set(this,void 0),yt.set(this,{}),Ke.set(this,!1),rt.set(this,null),An.set(this,!0),_r.set(this,void 0),xe.set(this,""),le.set(this,void 0),Cn.set(this,void 0),Sn.set(this,{}),Ye.set(this,null),Zt.set(this,null),wr.set(this,{}),er.set(this,{}),Lt.set(this,void 0),Rn.set(this,!1),de.set(this,void 0),tr.set(this,!1),rr.set(this,!1),nr.set(this,!1),he.set(this,void 0),On.set(this,{}),Et.set(this,null),Fe.set(this,void 0),ue(this,de,i,"f"),ue(this,Lt,e,"f"),ue(this,Xt,r,"f"),ue(this,Cn,n,"f"),ue(this,tt,new t0(this),"f"),this.$0=this[nc](),this[Ts](),ue(this,Ie,R(this,Ie,"f"),"f"),ue(this,he,R(this,he,"f"),"f"),ue(this,Fe,R(this,Fe,"f"),"f"),ue(this,le,R(this,le,"f"),"f"),R(this,le,"f").showHiddenOpt=R(this,Dn,"f"),ue(this,_r,this[ec](),"f")}addHelpOpt(e,r){const n="help";return ce("[string|boolean] [string]",[e,r],arguments.length),R(this,rt,"f")&&(this[Cs](R(this,rt,"f")),ue(this,rt,null,"f")),e===!1&&r===void 0?this:(ue(this,rt,typeof e=="string"?e:n,"f"),this.boolean(R(this,rt,"f")),this.describe(R(this,rt,"f"),r||R(this,he,"f").deferY18nLookup("Show help")),this)}help(e,r){return this.addHelpOpt(e,r)}addShowHiddenOpt(e,r){if(ce("[string|boolean] [string]",[e,r],arguments.length),e===!1&&r===void 0)return this;const n=typeof e=="string"?e:R(this,Dn,"f");return this.boolean(n),this.describe(n,r||R(this,he,"f").deferY18nLookup("Show hidden options")),R(this,le,"f").showHiddenOpt=n,this}showHidden(e,r){return this.addShowHiddenOpt(e,r)}alias(e,r){return ce("<object|string|array> [string|array]",[e,r],arguments.length),this[Os](this.alias.bind(this),"alias",e,r),this}array(e){return ce("<array|string>",[e],arguments.length),this[xt]("array",e),this[or](e),this}boolean(e){return ce("<array|string>",[e],arguments.length),this[xt]("boolean",e),this[or](e),this}check(e,r){return ce("<function> [boolean]",[e,r],arguments.length),this.middleware((n,i)=>Wr(()=>e(n,i.getOptions()),o=>(o?(typeof o=="string"||o instanceof Error)&&R(this,he,"f").fail(o.toString(),o):R(this,he,"f").fail(R(this,de,"f").y18n.__("Argument check failed: %s",e.toString())),n),o=>(R(this,he,"f").fail(o.message?o.message:o.toString(),o),n)),!1,r),this}choices(e,r){return ce("<object|string|array> [string|array]",[e,r],arguments.length),this[Os](this.choices.bind(this),"choices",e,r),this}coerce(e,r){if(ce("<object|string|array> [function]",[e,r],arguments.length),Array.isArray(e)){if(!r)throw new Le("coerce callback must be provided");for(const n of e)this.coerce(n,r);return this}else if(typeof e=="object"){for(const n of Object.keys(e))this.coerce(n,e[n]);return this}if(!r)throw new Le("coerce callback must be provided");return R(this,le,"f").key[e]=!0,R(this,tt,"f").addCoerceMiddleware((n,i)=>{let o;return Object.prototype.hasOwnProperty.call(n,e)?Wr(()=>(o=i.getAliases(),r(n[e])),a=>{n[e]=a;const c=i.getInternalMethods().getParserConfiguration()["strip-aliased"];if(o[e]&&c!==!0)for(const f of o[e])n[f]=a;return n},a=>{throw new Le(a.message)}):n},e),this}conflicts(e,r){return ce("<string|object> [string|array]",[e,r],arguments.length),R(this,Fe,"f").conflicts(e,r),this}config(e="config",r,n){return ce("[object|string] [string|function] [function]",[e,r,n],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=As(e,R(this,Xt,"f"),this[ir]()["deep-merge-config"]||!1,R(this,de,"f")),R(this,le,"f").configObjects=(R(this,le,"f").configObjects||[]).concat(e),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(e,r||R(this,he,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(i=>{R(this,le,"f").config[i]=n||!0}),this)}completion(e,r,n){return ce("[string] [string|boolean|function] [function]",[e,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),ue(this,We,e||R(this,We,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion script"),this.command(R(this,We,"f"),r),n&&R(this,Ze,"f").registerFunction(n),this}command(e,r,n,i,o,s){return ce("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,r,n,i,o,s],arguments.length),R(this,Ie,"f").addHandler(e,r,n,i,o,s),this}commands(e,r,n,i,o,s){return this.command(e,r,n,i,o,s)}commandDir(e,r){ce("<string> [object]",[e,r],arguments.length);const n=R(this,Cn,"f")||R(this,de,"f").require;return R(this,Ie,"f").addDirectory(e,n,R(this,de,"f").getCallerFile(),r),this}count(e){return ce("<array|string>",[e],arguments.length),this[xt]("count",e),this[or](e),this}default(e,r,n){return ce("<object|string|array> [*] [string]",[e,r,n],arguments.length),n&&(Gu(e,R(this,de,"f")),R(this,le,"f").defaultDescription[e]=n),typeof r=="function"&&(Gu(e,R(this,de,"f")),R(this,le,"f").defaultDescription[e]||(R(this,le,"f").defaultDescription[e]=R(this,he,"f").functionDescription(r)),r=r.call()),this[Dr](this.default.bind(this),"default",e,r),this}defaults(e,r,n){return this.default(e,r,n)}demandCommand(e=1,r,n,i){return ce("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,r,n,i],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),R(this,le,"f").demandedCommands._={min:e,max:r,minMsg:n,maxMsg:i},this}demand(e,r,n){return Array.isArray(r)?(r.forEach(i=>{at(n,!0,R(this,de,"f")),this.demandOption(i,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof e=="number"?(at(n,!0,R(this,de,"f")),this.demandCommand(e,r,n,n)):Array.isArray(e)?e.forEach(i=>{at(n,!0,R(this,de,"f")),this.demandOption(i,n)}):typeof n=="string"?this.demandOption(e,n):(n===!0||typeof n>"u")&&this.demandOption(e),this}demandOption(e,r){return ce("<object|string|array> [string]",[e,r],arguments.length),this[Dr](this.demandOption.bind(this),"demandedOptions",e,r),this}deprecateOption(e,r){return ce("<string> [string|boolean]",[e,r],arguments.length),R(this,le,"f").deprecatedOptions[e]=r,this}describe(e,r){return ce("<object|string|array> [string]",[e,r],arguments.length),this[Ps](e,!0),R(this,he,"f").describe(e,r),this}detectLocale(e){return ce("<boolean>",[e],arguments.length),ue(this,Qt,e,"f"),this}env(e){return ce("[string|boolean]",[e],arguments.length),e===!1?delete R(this,le,"f").envPrefix:R(this,le,"f").envPrefix=e||"",this}epilogue(e){return ce("<string>",[e],arguments.length),R(this,he,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,r){return ce("<string|array> [string]",[e,r],arguments.length),Array.isArray(e)?e.forEach(n=>this.example(...n)):R(this,he,"f").example(e,r),this}exit(e,r){ue(this,Ke,!0,"f"),ue(this,jt,r,"f"),R(this,et,"f")&&R(this,de,"f").process.exit(e)}exitProcess(e=!0){return ce("[boolean]",[e],arguments.length),ue(this,et,e,"f"),this}fail(e){if(ce("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new Le("Invalid first argument. Expected function or boolean 'false'");return R(this,he,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,r){return ce("<array> [function]",[e,r],arguments.length),r?R(this,Ze,"f").getCompletion(e,r):new Promise((n,i)=>{R(this,Ze,"f").getCompletion(e,(o,s)=>{o?i(o):n(s)})})}getDemandedOptions(){return ce([],0),R(this,le,"f").demandedOptions}getDemandedCommands(){return ce([],0),R(this,le,"f").demandedCommands}getDeprecatedOptions(){return ce([],0),R(this,le,"f").deprecatedOptions}getDetectLocale(){return R(this,Qt,"f")}getExitProcess(){return R(this,et,"f")}getGroups(){return Object.assign({},R(this,yt,"f"),R(this,er,"f"))}getHelp(){if(ue(this,Ke,!0,"f"),!R(this,he,"f").hasCachedHelpMessage()){if(!this.parsed){const r=this[Qr](R(this,Lt,"f"),void 0,void 0,0,!0);if(je(r))return r.then(()=>R(this,he,"f").help())}const e=R(this,Ie,"f").runDefaultBuilderOn(this);if(je(e))return e.then(()=>R(this,he,"f").help())}return Promise.resolve(R(this,he,"f").help())}getOptions(){return R(this,le,"f")}getStrict(){return R(this,tr,"f")}getStrictCommands(){return R(this,rr,"f")}getStrictOptions(){return R(this,nr,"f")}global(e,r){return ce("<string|array> [boolean]",[e,r],arguments.length),e=[].concat(e),r!==!1?R(this,le,"f").local=R(this,le,"f").local.filter(n=>e.indexOf(n)===-1):e.forEach(n=>{R(this,le,"f").local.includes(n)||R(this,le,"f").local.push(n)}),this}group(e,r){ce("<string|array> <string>",[e,r],arguments.length);const n=R(this,er,"f")[r]||R(this,yt,"f")[r];R(this,er,"f")[r]&&delete R(this,er,"f")[r];const i={};return R(this,yt,"f")[r]=(n||[]).concat(e).filter(o=>i[o]?!1:i[o]=!0),this}hide(e){return ce("<string>",[e],arguments.length),R(this,le,"f").hiddenOptions.push(e),this}implies(e,r){return ce("<string|object> [number|string|array]",[e,r],arguments.length),R(this,Fe,"f").implies(e,r),this}locale(e){return ce("[string]",[e],arguments.length),e===void 0?(this[Ss](),R(this,de,"f").y18n.getLocale()):(ue(this,Qt,!1,"f"),R(this,de,"f").y18n.setLocale(e),this)}middleware(e,r,n){return R(this,tt,"f").addMiddleware(e,!!r,n)}nargs(e,r){return ce("<string|object|array> [number]",[e,r],arguments.length),this[Dr](this.nargs.bind(this),"narg",e,r),this}normalize(e){return ce("<array|string>",[e],arguments.length),this[xt]("normalize",e),this}number(e){return ce("<array|string>",[e],arguments.length),this[xt]("number",e),this[or](e),this}option(e,r){if(ce("<string|object> [object]",[e,r],arguments.length),typeof e=="object")Object.keys(e).forEach(n=>{this.options(n,e[n])});else{typeof r!="object"&&(r={}),this[or](e),R(this,Et,"f")&&(e==="version"||r?.alias==="version")&&this[tc](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
63
- `),void 0,"versionWarning"),R(this,le,"f").key[e]=!0,r.alias&&this.alias(e,r.alias);const n=r.deprecate||r.deprecated;n&&this.deprecateOption(e,n);const i=r.demand||r.required||r.require;i&&this.demand(e,i),r.demandOption&&this.demandOption(e,typeof r.demandOption=="string"?r.demandOption:void 0),r.conflicts&&this.conflicts(e,r.conflicts),"default"in r&&this.default(e,r.default),r.implies!==void 0&&this.implies(e,r.implies),r.nargs!==void 0&&this.nargs(e,r.nargs),r.config&&this.config(e,r.configParser),r.normalize&&this.normalize(e),r.choices&&this.choices(e,r.choices),r.coerce&&this.coerce(e,r.coerce),r.group&&this.group(e,r.group),(r.boolean||r.type==="boolean")&&(this.boolean(e),r.alias&&this.boolean(r.alias)),(r.array||r.type==="array")&&(this.array(e),r.alias&&this.array(r.alias)),(r.number||r.type==="number")&&(this.number(e),r.alias&&this.number(r.alias)),(r.string||r.type==="string")&&(this.string(e),r.alias&&this.string(r.alias)),(r.count||r.type==="count")&&this.count(e),typeof r.global=="boolean"&&this.global(e,r.global),r.defaultDescription&&(R(this,le,"f").defaultDescription[e]=r.defaultDescription),r.skipValidation&&this.skipValidation(e);const o=r.describe||r.description||r.desc,s=R(this,he,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(s,e)||typeof o=="string")&&this.describe(e,o),r.hidden&&this.hide(e),r.requiresArg&&this.requiresArg(e)}return this}options(e,r){return this.option(e,r)}parse(e,r,n){ce("[string|array] [function|boolean|object] [function]",[e,r,n],arguments.length),this[rc](),typeof e>"u"&&(e=R(this,Lt,"f")),typeof r=="object"&&(ue(this,Zt,r,"f"),r=n),typeof r=="function"&&(ue(this,Ye,r,"f"),r=!1),r||ue(this,Lt,e,"f"),R(this,Ye,"f")&&ue(this,et,!1,"f");const i=this[Qr](e,!!r),o=this.parsed;return R(this,Ze,"f").setParsed(this.parsed),je(i)?i.then(s=>(R(this,Ye,"f")&&R(this,Ye,"f").call(this,R(this,jt,"f"),s,R(this,xe,"f")),s)).catch(s=>{throw R(this,Ye,"f")&&R(this,Ye,"f")(s,this.parsed.argv,R(this,xe,"f")),s}).finally(()=>{this[Ns](),this.parsed=o}):(R(this,Ye,"f")&&R(this,Ye,"f").call(this,R(this,jt,"f"),i,R(this,xe,"f")),this[Ns](),this.parsed=o,i)}parseAsync(e,r,n){const i=this.parse(e,r,n);return je(i)?i:Promise.resolve(i)}parseSync(e,r,n){const i=this.parse(e,r,n);if(je(i))throw new Le(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return i}parserConfiguration(e){return ce("<object>",[e],arguments.length),ue(this,Sn,e,"f"),this}pkgConf(e,r){ce("<string> [string]",[e,r],arguments.length);let n=null;const i=this[Rs](r||R(this,Xt,"f"));return i[e]&&typeof i[e]=="object"&&(n=As(i[e],r||R(this,Xt,"f"),this[ir]()["deep-merge-config"]||!1,R(this,de,"f")),R(this,le,"f").configObjects=(R(this,le,"f").configObjects||[]).concat(n)),this}positional(e,r){ce("<string> <object>",[e,r],arguments.length);const n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=Kr(r,(s,a)=>s==="type"&&!["string","number","boolean"].includes(a)?!1:n.includes(s));const i=R(this,Xr,"f").fullCommands[R(this,Xr,"f").fullCommands.length-1],o=i?R(this,Ie,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return _n(o).forEach(s=>{const a=o[s];Array.isArray(a)?a.indexOf(e)!==-1&&(r[s]=!0):a[e]&&!(s in r)&&(r[s]=a[e])}),this.group(e,R(this,he,"f").getPositionalGroupName()),this.option(e,r)}recommendCommands(e=!0){return ce("[boolean]",[e],arguments.length),ue(this,Rn,e,"f"),this}required(e,r,n){return this.demand(e,r,n)}require(e,r,n){return this.demand(e,r,n)}requiresArg(e){return ce("<array|string|object> [number]",[e],arguments.length),typeof e=="string"&&R(this,le,"f").narg[e]?this:(this[Dr](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,r){return ce("[string] [string]",[e,r],arguments.length),e=e||this.$0,R(this,_r,"f").log(R(this,Ze,"f").generateCompletionScript(e,r||R(this,We,"f")||"completion")),this}showHelp(e){if(ce("[string|function]",[e],arguments.length),ue(this,Ke,!0,"f"),!R(this,he,"f").hasCachedHelpMessage()){if(!this.parsed){const n=this[Qr](R(this,Lt,"f"),void 0,void 0,0,!0);if(je(n))return n.then(()=>{R(this,he,"f").showHelp(e)}),this}const r=R(this,Ie,"f").runDefaultBuilderOn(this);if(je(r))return r.then(()=>{R(this,he,"f").showHelp(e)}),this}return R(this,he,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,r){return ce("[boolean|string] [string]",[e,r],arguments.length),R(this,he,"f").showHelpOnFail(e,r),this}showVersion(e){return ce("[string|function]",[e],arguments.length),R(this,he,"f").showVersion(e),this}skipValidation(e){return ce("<array|string>",[e],arguments.length),this[xt]("skipValidation",e),this}strict(e){return ce("[boolean]",[e],arguments.length),ue(this,tr,e!==!1,"f"),this}strictCommands(e){return ce("[boolean]",[e],arguments.length),ue(this,rr,e!==!1,"f"),this}strictOptions(e){return ce("[boolean]",[e],arguments.length),ue(this,nr,e!==!1,"f"),this}string(e){return ce("<array|string>",[e],arguments.length),this[xt]("string",e),this[or](e),this}terminalWidth(){return ce([],0),R(this,de,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return ce("<object>",[e],arguments.length),ue(this,Qt,!1,"f"),R(this,de,"f").y18n.updateLocale(e),this}usage(e,r,n,i){if(ce("<string|null|undefined> [string|boolean] [function|object] [function]",[e,r,n,i],arguments.length),r!==void 0){if(at(e,null,R(this,de,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,r,n,i);throw new Le(".usage() description must start with $0 if being used as alias for .command()")}else return R(this,he,"f").usage(e),this}usageConfiguration(e){return ce("<object>",[e],arguments.length),ue(this,On,e,"f"),this}version(e,r,n){const i="version";if(ce("[boolean|string] [string] [string]",[e,r,n],arguments.length),R(this,Et,"f")&&(this[Cs](R(this,Et,"f")),R(this,he,"f").version(void 0),ue(this,Et,null,"f")),arguments.length===0)n=this[sc](),e=i;else if(arguments.length===1){if(e===!1)return this;n=e,e=i}else arguments.length===2&&(n=r,r=void 0);return ue(this,Et,typeof e=="string"?e:i,"f"),r=r||R(this,he,"f").deferY18nLookup("Show version number"),R(this,he,"f").version(n||void 0),this.boolean(R(this,Et,"f")),this.describe(R(this,Et,"f"),r),this}wrap(e){return ce("<number|null|undefined>",[e],arguments.length),R(this,he,"f").wrap(e),this}[(Ie=new WeakMap,Xt=new WeakMap,Xr=new WeakMap,Ze=new WeakMap,We=new WeakMap,Dn=new WeakMap,jt=new WeakMap,Qt=new WeakMap,$n=new WeakMap,et=new WeakMap,bn=new WeakMap,tt=new WeakMap,yt=new WeakMap,Ke=new WeakMap,rt=new WeakMap,An=new WeakMap,_r=new WeakMap,xe=new WeakMap,le=new WeakMap,Cn=new WeakMap,Sn=new WeakMap,Ye=new WeakMap,Zt=new WeakMap,wr=new WeakMap,er=new WeakMap,Lt=new WeakMap,Rn=new WeakMap,de=new WeakMap,tr=new WeakMap,rr=new WeakMap,nr=new WeakMap,he=new WeakMap,On=new WeakMap,Et=new WeakMap,Fe=new WeakMap,Zu)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[ec](){return{log:(...e)=>{this[Fn]()||console.log(...e),ue(this,Ke,!0,"f"),R(this,xe,"f").length&&ue(this,xe,R(this,xe,"f")+`
64
- `,"f"),ue(this,xe,R(this,xe,"f")+e.join(" "),"f")},error:(...e)=>{this[Fn]()||console.error(...e),ue(this,Ke,!0,"f"),R(this,xe,"f").length&&ue(this,xe,R(this,xe,"f")+`
65
- `,"f"),ue(this,xe,R(this,xe,"f")+e.join(" "),"f")}}}[Cs](e){_n(R(this,le,"f")).forEach(r=>{if((i=>i==="configObjects")(r))return;const n=R(this,le,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete R(this,he,"f").getDescriptions()[e]}[tc](e,r,n){R(this,$n,"f")[n]||(R(this,de,"f").process.emitWarning(e,r),R(this,$n,"f")[n]=!0)}[rc](){R(this,bn,"f").push({options:R(this,le,"f"),configObjects:R(this,le,"f").configObjects.slice(0),exitProcess:R(this,et,"f"),groups:R(this,yt,"f"),strict:R(this,tr,"f"),strictCommands:R(this,rr,"f"),strictOptions:R(this,nr,"f"),completionCommand:R(this,We,"f"),output:R(this,xe,"f"),exitError:R(this,jt,"f"),hasOutput:R(this,Ke,"f"),parsed:this.parsed,parseFn:R(this,Ye,"f"),parseContext:R(this,Zt,"f")}),R(this,he,"f").freeze(),R(this,Fe,"f").freeze(),R(this,Ie,"f").freeze(),R(this,tt,"f").freeze()}[nc](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(R(this,de,"f").process.argv()[0])?r=R(this,de,"f").process.argv().slice(1,2):r=R(this,de,"f").process.argv().slice(0,1),e=r.map(n=>{const i=this[gc](R(this,Xt,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&i.length<n.length?i:n}).join(" ").trim(),R(this,de,"f").getEnv("_")&&R(this,de,"f").getProcessArgvBin()===R(this,de,"f").getEnv("_")&&(e=R(this,de,"f").getEnv("_").replace(`${R(this,de,"f").path.dirname(R(this,de,"f").process.execPath())}/`,"")),e}[ir](){return R(this,Sn,"f")}[ic](){return R(this,On,"f")}[Ss](){if(!R(this,Qt,"f"))return;const e=R(this,de,"f").getEnv("LC_ALL")||R(this,de,"f").getEnv("LC_MESSAGES")||R(this,de,"f").getEnv("LANG")||R(this,de,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[sc](){return this[Rs]().version||"unknown"}[oc](e){const r=e["--"]?e["--"]:e._;for(let n=0,i;(i=r[n])!==void 0;n++)R(this,de,"f").Parser.looksLikeNumber(i)&&Number.isSafeInteger(Math.floor(parseFloat(`${i}`)))&&(r[n]=Number(i));return e}[Rs](e){const r=e||"*";if(R(this,wr,"f")[r])return R(this,wr,"f")[r];let n={};try{let i=e||R(this,de,"f").mainFilename;!e&&R(this,de,"f").path.extname(i)&&(i=R(this,de,"f").path.dirname(i));const o=R(this,de,"f").findUp(i,(s,a)=>{if(a.includes("package.json"))return"package.json"});at(o,void 0,R(this,de,"f")),n=JSON.parse(R(this,de,"f").readFileSync(o,"utf8"))}catch{}return R(this,wr,"f")[r]=n||{},R(this,wr,"f")[r]}[xt](e,r){r=[].concat(r),r.forEach(n=>{n=this[Is](n),R(this,le,"f")[e].push(n)})}[Dr](e,r,n,i){this[Fs](e,r,n,i,(o,s,a)=>{R(this,le,"f")[o][s]=a})}[Os](e,r,n,i){this[Fs](e,r,n,i,(o,s,a)=>{R(this,le,"f")[o][s]=(R(this,le,"f")[o][s]||[]).concat(a)})}[Fs](e,r,n,i,o){if(Array.isArray(n))n.forEach(s=>{e(s,i)});else if((s=>typeof s=="object")(n))for(const s of _n(n))e(s,n[s]);else o(r,this[Is](n),i)}[Is](e){return e==="__proto__"?"___proto___":e}[Ps](e,r){return this[Dr](this[Ps].bind(this),"key",e,r),this}[Ns](){var e,r,n,i,o,s,a,c,f,u,h,d;const y=R(this,bn,"f").pop();at(y,void 0,R(this,de,"f"));let E;e=this,r=this,n=this,i=this,o=this,s=this,a=this,c=this,f=this,u=this,h=this,d=this,{options:{set value(v){ue(e,le,v,"f")}}.value,configObjects:E,exitProcess:{set value(v){ue(r,et,v,"f")}}.value,groups:{set value(v){ue(n,yt,v,"f")}}.value,output:{set value(v){ue(i,xe,v,"f")}}.value,exitError:{set value(v){ue(o,jt,v,"f")}}.value,hasOutput:{set value(v){ue(s,Ke,v,"f")}}.value,parsed:this.parsed,strict:{set value(v){ue(a,tr,v,"f")}}.value,strictCommands:{set value(v){ue(c,rr,v,"f")}}.value,strictOptions:{set value(v){ue(f,nr,v,"f")}}.value,completionCommand:{set value(v){ue(u,We,v,"f")}}.value,parseFn:{set value(v){ue(h,Ye,v,"f")}}.value,parseContext:{set value(v){ue(d,Zt,v,"f")}}.value}=y,R(this,le,"f").configObjects=E,R(this,he,"f").unfreeze(),R(this,Fe,"f").unfreeze(),R(this,Ie,"f").unfreeze(),R(this,tt,"f").unfreeze()}[ac](e,r){return Wr(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[uc].bind(this),getContext:this[cc].bind(this),getHasOutput:this[lc].bind(this),getLoggerInstance:this[fc].bind(this),getParseContext:this[dc].bind(this),getParserConfiguration:this[ir].bind(this),getUsageConfiguration:this[ic].bind(this),getUsageInstance:this[hc].bind(this),getValidationInstance:this[pc].bind(this),hasParseCallback:this[Fn].bind(this),isGlobalContext:this[mc].bind(this),postProcess:this[sr].bind(this),reset:this[Ts].bind(this),runValidation:this[js].bind(this),runYargsParserAndExecuteCommands:this[Qr].bind(this),setHasOutput:this[yc].bind(this)}}[uc](){return R(this,Ie,"f")}[cc](){return R(this,Xr,"f")}[lc](){return R(this,Ke,"f")}[fc](){return R(this,_r,"f")}[dc](){return R(this,Zt,"f")||{}}[hc](){return R(this,he,"f")}[pc](){return R(this,Fe,"f")}[Fn](){return!!R(this,Ye,"f")}[mc](){return R(this,An,"f")}[sr](e,r,n,i){return n||je(e)||(r||(e=this[Zu](e)),(this[ir]()["parse-positional-numbers"]||this[ir]()["parse-positional-numbers"]===void 0)&&(e=this[oc](e)),i&&(e=Gr(e,this,R(this,tt,"f").getMiddleware(),!1))),e}[Ts](e={}){ue(this,le,R(this,le,"f")||{},"f");const r={};r.local=R(this,le,"f").local||[],r.configObjects=R(this,le,"f").configObjects||[];const n={};r.local.forEach(s=>{n[s]=!0,(e[s]||[]).forEach(a=>{n[a]=!0})}),Object.assign(R(this,er,"f"),Object.keys(R(this,yt,"f")).reduce((s,a)=>{const c=R(this,yt,"f")[a].filter(f=>!(f in n));return c.length>0&&(s[a]=c),s},{})),ue(this,yt,{},"f");const i=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],o=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return i.forEach(s=>{r[s]=(R(this,le,"f")[s]||[]).filter(a=>!n[a])}),o.forEach(s=>{r[s]=Kr(R(this,le,"f")[s],a=>!n[a])}),r.envPrefix=R(this,le,"f").envPrefix,ue(this,le,r,"f"),ue(this,he,R(this,he,"f")?R(this,he,"f").reset(n):f0(this,R(this,de,"f")),"f"),ue(this,Fe,R(this,Fe,"f")?R(this,Fe,"f").reset(n):_0(this,R(this,he,"f"),R(this,de,"f")),"f"),ue(this,Ie,R(this,Ie,"f")?R(this,Ie,"f").reset():o0(R(this,he,"f"),R(this,Fe,"f"),R(this,tt,"f"),R(this,de,"f")),"f"),R(this,Ze,"f")||ue(this,Ze,g0(this,R(this,he,"f"),R(this,Ie,"f"),R(this,de,"f")),"f"),R(this,tt,"f").reset(),ue(this,We,null,"f"),ue(this,xe,"","f"),ue(this,jt,null,"f"),ue(this,Ke,!1,"f"),this.parsed=!1,this}[gc](e,r){return R(this,de,"f").path.relative(e,r)}[Qr](e,r,n,i=0,o=!1){let s=!!n||o;e=e||R(this,Lt,"f"),R(this,le,"f").__=R(this,de,"f").y18n.__,R(this,le,"f").configuration=this[ir]();const a=!!R(this,le,"f").configuration["populate--"],c=Object.assign({},R(this,le,"f").configuration,{"populate--":!0}),f=R(this,de,"f").Parser.detailed(e,Object.assign({},R(this,le,"f"),{configuration:{"parse-positional-numbers":!1,...c}})),u=Object.assign(f.argv,R(this,Zt,"f"));let h;const d=f.aliases;let y=!1,E=!1;Object.keys(u).forEach(v=>{v===R(this,rt,"f")&&u[v]?y=!0:v===R(this,Et,"f")&&u[v]&&(E=!0)}),u.$0=this.$0,this.parsed=f,i===0&&R(this,he,"f").clearCachedHelpMessage();try{if(this[Ss](),r)return this[sr](u,a,!!n,!1);R(this,rt,"f")&&[R(this,rt,"f")].concat(d[R(this,rt,"f")]||[]).filter(g=>g.length>1).includes(""+u._[u._.length-1])&&(u._.pop(),y=!0),ue(this,An,!1,"f");const v=R(this,Ie,"f").getCommands(),l=R(this,Ze,"f").completionKey in u,m=y||l||o;if(u._.length){if(v.length){let p;for(let g=i||0,_;u._[g]!==void 0;g++)if(_=String(u._[g]),v.includes(_)&&_!==R(this,We,"f")){const w=R(this,Ie,"f").runCommand(_,this,f,g+1,o,y||E||o);return this[sr](w,a,!!n,!1)}else if(!p&&_!==R(this,We,"f")){p=_;break}!R(this,Ie,"f").hasDefaultCommand()&&R(this,Rn,"f")&&p&&!m&&R(this,Fe,"f").recommendCommands(p,v)}R(this,We,"f")&&u._.includes(R(this,We,"f"))&&!l&&(R(this,et,"f")&&Yr(!0),this.showCompletionScript(),this.exit(0))}if(R(this,Ie,"f").hasDefaultCommand()&&!m){const p=R(this,Ie,"f").runCommand(null,this,f,0,o,y||E||o);return this[sr](p,a,!!n,!1)}if(l){R(this,et,"f")&&Yr(!0),e=[].concat(e);const p=e.slice(e.indexOf(`--${R(this,Ze,"f").completionKey}`)+1);return R(this,Ze,"f").getCompletion(p,(g,_)=>{if(g)throw new Le(g.message);(_||[]).forEach(w=>{R(this,_r,"f").log(w)}),this.exit(0)}),this[sr](u,!a,!!n,!1)}if(R(this,Ke,"f")||(y?(R(this,et,"f")&&Yr(!0),s=!0,this.showHelp("log"),this.exit(0)):E&&(R(this,et,"f")&&Yr(!0),s=!0,R(this,he,"f").showVersion("log"),this.exit(0))),!s&&R(this,le,"f").skipValidation.length>0&&(s=Object.keys(u).some(p=>R(this,le,"f").skipValidation.indexOf(p)>=0&&u[p]===!0)),!s){if(f.error)throw new Le(f.error.message);if(!l){const p=this[js](d,{},f.error);n||(h=Gr(u,this,R(this,tt,"f").getMiddleware(),!0)),h=this[ac](p,h??u),je(h)&&!n&&(h=h.then(()=>Gr(u,this,R(this,tt,"f").getMiddleware(),!1)))}}}catch(v){if(v instanceof Le)R(this,he,"f").fail(v.message,v);else throw v}return this[sr](h??u,a,!!n,!0)}[js](e,r,n,i){const o={...this.getDemandedOptions()};return s=>{if(n)throw new Le(n.message);R(this,Fe,"f").nonOptionCount(s),R(this,Fe,"f").requiredArguments(s,o);let a=!1;R(this,rr,"f")&&(a=R(this,Fe,"f").unknownCommands(s)),R(this,tr,"f")&&!a?R(this,Fe,"f").unknownArguments(s,e,r,!!i):R(this,nr,"f")&&R(this,Fe,"f").unknownArguments(s,e,{},!1,!1),R(this,Fe,"f").limitedChoices(s),R(this,Fe,"f").implications(s),R(this,Fe,"f").conflicting(s)}}[yc](){ue(this,Ke,!0,"f")}[or](e){if(typeof e=="string")R(this,le,"f").key[e]=!0;else for(const r of e)R(this,le,"f").key[r]=!0}}function A0(t){return!!t&&typeof t.getInternalMethods=="function"}const C0=$0(Zg),In={type:"string",desc:"<directory> with LikeC4 sources (default is current directory)",normalize:!0,default:".",coerce:ve},ut={alias:"use-dot-bin",boolean:!0,type:"boolean",desc:'use graphviz binaries ("dot" should be on PATH)',default:!1},Ec={boolean:!0,type:"boolean",desc:'use hash history for navigation, e.g. "/#/view" instead of "/view"'},Pn={alias:"o",type:"string",desc:"<directory> output directory",normalize:!0,coerce:ve},Ls={alias:"w",type:"string",desc:'prefix for Webcomponents, e.g "c4" generates <c4-view ../>',default:"likec4"},vc={alias:["base-url"],type:"string",desc:'base url the app is being served from, e.g. "/" or "/pages/"'},_c={boolean:!0,type:"boolean",desc:"overview all diagrams as graph [experimental]",default:!1},S0={boolean:!0,type:"boolean",desc:"outputs a single self-contained HTML file with all required resources inlined"},R0={alias:"l",type:"string",desc:"ip address of the network interface to listen on",default:"127.0.0.1"},wc=t=>t instanceof URL?$u(t):t;function O0(t,{cwd:e=Te.cwd(),type:r="file",stopAt:n}={}){let i=be.resolve(wc(e)??"");const{root:o}=be.parse(i);for(n=be.resolve(i,wc(n)??o);i&&i!==n&&i!==o;){const s=be.isAbsolute(t)?t:be.join(i,t);try{const a=ge.statSync(s,{throwIfNoEntry:!1});if(r==="file"&&a?.isFile()||r==="directory"&&a?.isDirectory())return s}catch{}i=be.dirname(i)}}function F0({cwd:t=Te.cwd()}={}){return O0("package.json",{cwd:t})}const xs=_t("vite"),Nn=Wt($u(import.meta.url)),I0=`
151
+ `;class h0{constructor(e,r,n,i){var s,o,a;this.yargs=e,this.usage=r,this.command=n,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(a=((s=this.shim.getEnv("SHELL"))===null||s===void 0?void 0:s.includes("zsh"))||((o=this.shim.getEnv("ZSH_NAME"))===null||o===void 0?void 0:o.includes("zsh")))!==null&&a!==void 0?a:!1}defaultCompletion(e,r,n,i){const s=this.command.getCommandHandlers();for(let a=0,c=e.
152
+ length;a<c;++a)if(s[e[a]]&&s[e[a]].builder){const l=s[e[a]].builder;if(ds(l)){this.indexAfterLastReset=a+1;const u=this.yargs.getInternalMethods().reset();return l(u,!0),u.argv}}const o=[];this.commandCompletions(o,e,n),this.optionCompletions(o,e,r,n),this.choicesFromOptionsCompletions(o,e,r,n),this.choicesFromPositionalsCompletions(o,e,r,n),i(null,o)}commandCompletions(e,r,n){const i=this.yargs.getInternalMethods().getContext().commands;!n.match(/^-/)&&i[i.length-1]!==n&&!this.previousArgHasChoices(
153
+ r)&&this.usage.getCommands().forEach(s=>{const o=kr(s[0]).cmd;if(r.indexOf(o)===-1)if(!this.zshShell)e.push(o);else{const a=s[1]||"";e.push(o.replace(/:/g,"\\:")+":"+a)}})}optionCompletions(e,r,n,i){if((i.match(/^-/)||i===""&&e.length===0)&&!this.previousArgHasChoices(r)){const s=this.yargs.getOptions(),o=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(s.key).forEach(a=>{const c=!!s.configuration["boolean-negation"]&&s.boolean.includes(a);!o.includes(a)&&!s.hiddenOptions.
154
+ includes(a)&&!this.argsContainKey(r,a,c)&&this.completeOptionKey(a,e,i,c&&!!s.default[a])})}}choicesFromOptionsCompletions(e,r,n,i){if(this.previousArgHasChoices(r)){const s=this.getPreviousArgChoices(r);s&&s.length>0&&e.push(...s.map(o=>o.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(e,r,n,i){if(i===""&&e.length>0&&this.previousArgHasChoices(r))return;const s=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],o=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().
155
+ getContext().commands.length+1),a=s[n._.length-o-1];if(!a)return;const c=this.yargs.getOptions().choices[a]||[];for(const l of c)l.startsWith(i)&&e.push(l.replace(/:/g,"\\:"))}getPreviousArgChoices(e){if(e.length<1)return;let r=e[e.length-1],n="";if(!r.startsWith("-")&&e.length>1&&(n=r,r=e[e.length-2]),!r.startsWith("-"))return;const i=r.replace(/^-+/,""),s=this.yargs.getOptions(),o=[i,...this.yargs.getAliases()[i]||[]];let a;for(const c of o)if(Object.prototype.hasOwnProperty.call(s.key,c)&&Array.
156
+ isArray(s.choices[c])){a=s.choices[c];break}if(a)return a.filter(c=>!n||c.startsWith(n))}previousArgHasChoices(e){const r=this.getPreviousArgChoices(e);return r!==void 0&&r.length>0}argsContainKey(e,r,n){const i=s=>e.indexOf((/^[^0-9]$/.test(s)?"-":"--")+s)!==-1;if(i(r)||n&&i(`no-${r}`))return!0;if(this.aliases){for(const s of this.aliases[r])if(i(s))return!0}return!1}completeOptionKey(e,r,n,i){var s,o,a,c;let l=e;if(this.zshShell){const E=this.usage.getDescriptions(),y=(o=(s=this===null||this===
157
+ void 0?void 0:this.aliases)===null||s===void 0?void 0:s[e])===null||o===void 0?void 0:o.find(g=>{const p=E[g];return typeof p=="string"&&p.length>0}),D=y?E[y]:void 0,f=(c=(a=E[e])!==null&&a!==void 0?a:D)!==null&&c!==void 0?c:"";l=`${e.replace(/:/g,"\\:")}:${f.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}const u=E=>/^--/.test(E),d=E=>/^[^0-9]$/.test(E),h=!u(n)&&d(e)?"-":"--";r.push(h+l),i&&r.push(h+"no-"+l)}customCompletion(e,r,n,i){if(ot(this.customCompletionFunction,null,this.
158
+ shim),m0(this.customCompletionFunction)){const s=this.customCompletionFunction(n,r);return Le(s)?s.then(o=>{this.shim.process.nextTick(()=>{i(null,o)})}).catch(o=>{this.shim.process.nextTick(()=>{i(o,void 0)})}):i(null,s)}else return g0(this.customCompletionFunction)?this.customCompletionFunction(n,r,(s=i)=>this.defaultCompletion(e,r,n,s),s=>{i(null,s)}):this.customCompletionFunction(n,r,s=>{i(null,s)})}getCompletion(e,r){const n=e.length?e[e.length-1]:"",i=this.yargs.parse(e,!0),s=this.customCompletionFunction?
159
+ o=>this.customCompletion(e,o,n,r):o=>this.defaultCompletion(e,o,n,r);return Le(i)?i.then(s):s(i)}generateCompletionScript(e,r){let n=this.zshShell?d0:f0;const i=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,i),n=n.replace(/{{completion_command}}/g,r),n.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}}function p0(t,e,r,n){return new h0(t,e,r,n)}function m0(t){return t.length<3}function g0(t){
160
+ return t.length>3}function y0(t,e){if(t.length===0)return e.length;if(e.length===0)return t.length;const r=[];let n;for(n=0;n<=e.length;n++)r[n]=[n];let i;for(i=0;i<=t.length;i++)r[0][i]=i;for(n=1;n<=e.length;n++)for(i=1;i<=t.length;i++)e.charAt(n-1)===t.charAt(i-1)?r[n][i]=r[n-1][i-1]:n>1&&i>1&&e.charAt(n-2)===t.charAt(i-1)&&e.charAt(n-1)===t.charAt(i-2)?r[n][i]=r[n-2][i-2]+1:r[n][i]=Math.min(r[n-1][i-1]+1,Math.min(r[n][i-1]+1,r[n-1][i]+1));return r[e.length][t.length]}const wu=["$0","--","_"];
161
+ function E0(t,e,r){const n=r.y18n.__,i=r.y18n.__n,s={};s.nonOptionCount=function(d){const h=t.getDemandedCommands(),y=d._.length+(d["--"]?d["--"].length:0)-t.getInternalMethods().getContext().commands.length;h._&&(y<h._.min||y>h._.max)&&(y<h._.min?h._.minMsg!==void 0?e.fail(h._.minMsg?h._.minMsg.replace(/\$0/g,y.toString()).replace(/\$1/,h._.min.toString()):null):e.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",y,y.toString(),
162
+ h._.min.toString())):y>h._.max&&(h._.maxMsg!==void 0?e.fail(h._.maxMsg?h._.maxMsg.replace(/\$0/g,y.toString()).replace(/\$1/,h._.max.toString()):null):e.fail(i("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",y,y.toString(),h._.max.toString()))))},s.positionalCount=function(d,h){h<d&&e.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",h,h+"",d+""))},s.requiredArguments=
163
+ function(d,h){let E=null;for(const y of Object.keys(h))(!Object.prototype.hasOwnProperty.call(d,y)||typeof d[y]>"u")&&(E=E||{},E[y]=h[y]);if(E){const y=[];for(const f of Object.keys(E)){const g=E[f];g&&y.indexOf(g)<0&&y.push(g)}const D=y.length?`
164
+ ${y.join(`
165
+ `)}`:"";e.fail(i("Missing required argument: %s","Missing required arguments: %s",Object.keys(E).length,Object.keys(E).join(", ")+D))}},s.unknownArguments=function(d,h,E,y,D=!0){var f;const g=t.getInternalMethods().getCommandInstance().getCommands(),p=[],m=t.getInternalMethods().getContext();if(Object.keys(d).forEach(v=>{!wu.includes(v)&&!Object.prototype.hasOwnProperty.call(E,v)&&!Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),v)&&!s.isValidAndSomeAliasIsNotNew(v,
166
+ h)&&p.push(v)}),D&&(m.commands.length>0||g.length>0||y)&&d._.slice(m.commands.length).forEach(v=>{g.includes(""+v)||p.push(""+v)}),D){const $=((f=t.getDemandedCommands()._)===null||f===void 0?void 0:f.max)||0,_=m.commands.length+$;_<d._.length&&d._.slice(_).forEach(b=>{b=String(b),!m.commands.includes(b)&&!p.includes(b)&&p.push(b)})}p.length&&e.fail(i("Unknown argument: %s","Unknown arguments: %s",p.length,p.map(v=>v.trim()?v:`"${v}"`).join(", ")))},s.unknownCommands=function(d){const h=t.getInternalMethods().
167
+ getCommandInstance().getCommands(),E=[],y=t.getInternalMethods().getContext();return(y.commands.length>0||h.length>0)&&d._.slice(y.commands.length).forEach(D=>{h.includes(""+D)||E.push(""+D)}),E.length>0?(e.fail(i("Unknown command: %s","Unknown commands: %s",E.length,E.join(", "))),!0):!1},s.isValidAndSomeAliasIsNotNew=function(d,h){if(!Object.prototype.hasOwnProperty.call(h,d))return!1;const E=t.parsed.newAliases;return[d,...h[d]].some(y=>!Object.prototype.hasOwnProperty.call(E,y)||!E[d])},s.limitedChoices=
168
+ function(d){const h=t.getOptions(),E={};if(!Object.keys(h.choices).length)return;Object.keys(d).forEach(f=>{wu.indexOf(f)===-1&&Object.prototype.hasOwnProperty.call(h.choices,f)&&[].concat(d[f]).forEach(g=>{h.choices[f].indexOf(g)===-1&&g!==void 0&&(E[f]=(E[f]||[]).concat(g))})});const y=Object.keys(E);if(!y.length)return;let D=n("Invalid values:");y.forEach(f=>{D+=`
169
+ ${n("Argument: %s, Given: %s, Choices: %s",f,e.stringifiedValues(E[f]),e.stringifiedValues(h.choices[f]))}`}),e.fail(D)};let o={};s.implies=function(d,h){ce("<string|object> [array|number|string]",[d,h],arguments.length),typeof d=="object"?Object.keys(d).forEach(E=>{s.implies(E,d[E])}):(t.global(d),o[d]||(o[d]=[]),Array.isArray(h)?h.forEach(E=>s.implies(d,E)):(ot(h,void 0,r),o[d].push(h)))},s.getImplied=function(){return o};function a(u,d){const h=Number(d);return d=isNaN(h)?d:h,typeof d=="num\
170
+ ber"?d=u._.length>=d:d.match(/^--no-.+/)?(d=d.match(/^--no-(.+)/)[1],d=!Object.prototype.hasOwnProperty.call(u,d)):d=Object.prototype.hasOwnProperty.call(u,d),d}s.implications=function(d){const h=[];if(Object.keys(o).forEach(E=>{const y=E;(o[E]||[]).forEach(D=>{let f=y;const g=D;f=a(d,f),D=a(d,D),f&&!D&&h.push(` ${y} -> ${g}`)})}),h.length){let E=`${n("Implications failed:")}
171
+ `;h.forEach(y=>{E+=y}),e.fail(E)}};let c={};s.conflicts=function(d,h){ce("<string|object> [array|string]",[d,h],arguments.length),typeof d=="object"?Object.keys(d).forEach(E=>{s.conflicts(E,d[E])}):(t.global(d),c[d]||(c[d]=[]),Array.isArray(h)?h.forEach(E=>s.conflicts(d,E)):c[d].push(h))},s.getConflicting=()=>c,s.conflicting=function(d){Object.keys(d).forEach(h=>{c[h]&&c[h].forEach(E=>{E&&d[h]!==void 0&&d[E]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",h,E))})}),t.getInternalMethods().
172
+ getParserConfiguration()["strip-dashed"]&&Object.keys(c).forEach(h=>{c[h].forEach(E=>{E&&d[r.Parser.camelCase(h)]!==void 0&&d[r.Parser.camelCase(E)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",h,E))})})},s.recommendCommands=function(d,h){h=h.sort((f,g)=>g.length-f.length);let y=null,D=1/0;for(let f=0,g;(g=h[f])!==void 0;f++){const p=y0(d,g);p<=3&&p<D&&(D=p,y=g)}y&&e.fail(n("Did you mean %s?",y))},s.reset=function(d){return o=Mr(o,h=>!d[h]),c=Mr(c,h=>!d[h]),s};const l=[];return s.
173
+ freeze=function(){l.push({implied:o,conflicting:c})},s.unfreeze=function(){const d=l.pop();ot(d,void 0,r),{implied:o,conflicting:c}=d},s}let ps=[],Ur;function ms(t,e,r,n){Ur=n;let i={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if(typeof t.extends!="string")return i;const s=/\.json|\..*rc$/.test(t.extends);let o=null;if(s)o=v0(e,t.extends);else try{o=require.resolve(t.extends)}catch{return t}D0(o),ps.push(o),i=s?JSON.parse(Ur.readFileSync(o,"utf8")):require(t.extends),delete t.extends,
174
+ i=ms(i,Ur.path.dirname(o),r,Ur)}return ps=[],r?bu(i,t):Object.assign({},i,t)}function D0(t){if(ps.indexOf(t)>-1)throw new je(`Circular extended configurations: '${t}'.`)}function v0(t,e){return Ur.path.resolve(t,e)}function bu(t,e){const r={};function n(i){return i&&typeof i=="object"&&!Array.isArray(i)}Object.assign(r,t);for(const i of Object.keys(e))n(e[i])&&n(r[i])?r[i]=bu(t[i],e[i]):r[i]=e[i];return r}var ue=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");
175
+ if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},S=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class d\
176
+ id not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Fe,Jt,Hr,Ze,We,hn,Tt,Xt,pn,et,mn,tt,gt,Ke,rt,gn,pr,ke,le,yn,En,Ye,Qt,mr,Zt,Lt,Dn,de,er,tr,rr,he,vn,yt,Ie;function $0(t){return(e=[],r=t.process.cwd(),n)=>{const i=new _0(e,r,n,t);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}const Au=Symbol("copyDoubleDash"),Cu=Symbol("copyDoubleDash"),gs=Symbol("deleteFromParserHintObject"),Su=Symbol("emitWarning"),Ru=Symbol("freeze"),Ou=Symbol(
177
+ "getDollarZero"),nr=Symbol("getParserConfiguration"),Iu=Symbol("getUsageConfiguration"),ys=Symbol("guessLocale"),Fu=Symbol("guessVersion"),Pu=Symbol("parsePositionalNumbers"),Es=Symbol("pkgUp"),jt=Symbol("populateParserHintArray"),gr=Symbol("populateParserHintSingleValueDictionary"),Ds=Symbol("populateParserHintArrayDictionary"),vs=Symbol("populateParserHintDictionary"),$s=Symbol("sanitizeKey"),_s=Symbol("setKey"),ws=Symbol("unfreeze"),Nu=Symbol("validateAsync"),Tu=Symbol("getCommandInstance"),Lu=Symbol(
178
+ "getContext"),ju=Symbol("getHasOutput"),ku=Symbol("getLoggerInstance"),Bu=Symbol("getParseContext"),xu=Symbol("getUsageInstance"),Mu=Symbol("getValidationInstance"),$n=Symbol("hasParseCallback"),qu=Symbol("isGlobalContext"),ir=Symbol("postProcess"),Uu=Symbol("rebase"),bs=Symbol("reset"),Vr=Symbol("runYargsParserAndExecuteCommands"),As=Symbol("runValidation"),Hu=Symbol("setHasOutput"),sr=Symbol("kTrackManuallySetKeys");class _0{constructor(e=[],r,n,i){this.customScriptName=!1,this.parsed=!1,Fe.set(
179
+ this,void 0),Jt.set(this,void 0),Hr.set(this,{commands:[],fullCommands:[]}),Ze.set(this,null),We.set(this,null),hn.set(this,"show-hidden"),Tt.set(this,null),Xt.set(this,!0),pn.set(this,{}),et.set(this,!0),mn.set(this,[]),tt.set(this,void 0),gt.set(this,{}),Ke.set(this,!1),rt.set(this,null),gn.set(this,!0),pr.set(this,void 0),ke.set(this,""),le.set(this,void 0),yn.set(this,void 0),En.set(this,{}),Ye.set(this,null),Qt.set(this,null),mr.set(this,{}),Zt.set(this,{}),Lt.set(this,void 0),Dn.set(this,!1),
180
+ de.set(this,void 0),er.set(this,!1),tr.set(this,!1),rr.set(this,!1),he.set(this,void 0),vn.set(this,{}),yt.set(this,null),Ie.set(this,void 0),ue(this,de,i,"f"),ue(this,Lt,e,"f"),ue(this,Jt,r,"f"),ue(this,yn,n,"f"),ue(this,tt,new Zm(this),"f"),this.$0=this[Ou](),this[bs](),ue(this,Fe,S(this,Fe,"f"),"f"),ue(this,he,S(this,he,"f"),"f"),ue(this,Ie,S(this,Ie,"f"),"f"),ue(this,le,S(this,le,"f"),"f"),S(this,le,"f").showHiddenOpt=S(this,hn,"f"),ue(this,pr,this[Cu](),"f")}addHelpOpt(e,r){const n="help";return ce(
181
+ "[string|boolean] [string]",[e,r],arguments.length),S(this,rt,"f")&&(this[gs](S(this,rt,"f")),ue(this,rt,null,"f")),e===!1&&r===void 0?this:(ue(this,rt,typeof e=="string"?e:n,"f"),this.boolean(S(this,rt,"f")),this.describe(S(this,rt,"f"),r||S(this,he,"f").deferY18nLookup("Show help")),this)}help(e,r){return this.addHelpOpt(e,r)}addShowHiddenOpt(e,r){if(ce("[string|boolean] [string]",[e,r],arguments.length),e===!1&&r===void 0)return this;const n=typeof e=="string"?e:S(this,hn,"f");return this.boolean(
182
+ n),this.describe(n,r||S(this,he,"f").deferY18nLookup("Show hidden options")),S(this,le,"f").showHiddenOpt=n,this}showHidden(e,r){return this.addShowHiddenOpt(e,r)}alias(e,r){return ce("<object|string|array> [string|array]",[e,r],arguments.length),this[Ds](this.alias.bind(this),"alias",e,r),this}array(e){return ce("<array|string>",[e],arguments.length),this[jt]("array",e),this[sr](e),this}boolean(e){return ce("<array|string>",[e],arguments.length),this[jt]("boolean",e),this[sr](e),this}check(e,r){
183
+ return ce("<function> [boolean]",[e,r],arguments.length),this.middleware((n,i)=>xr(()=>e(n,i.getOptions()),s=>(s?(typeof s=="string"||s instanceof Error)&&S(this,he,"f").fail(s.toString(),s):S(this,he,"f").fail(S(this,de,"f").y18n.__("Argument check failed: %s",e.toString())),n),s=>(S(this,he,"f").fail(s.message?s.message:s.toString(),s),n)),!1,r),this}choices(e,r){return ce("<object|string|array> [string|array]",[e,r],arguments.length),this[Ds](this.choices.bind(this),"choices",e,r),this}coerce(e,r){
184
+ if(ce("<object|string|array> [function]",[e,r],arguments.length),Array.isArray(e)){if(!r)throw new je("coerce callback must be provided");for(const n of e)this.coerce(n,r);return this}else if(typeof e=="object"){for(const n of Object.keys(e))this.coerce(n,e[n]);return this}if(!r)throw new je("coerce callback must be provided");return S(this,le,"f").key[e]=!0,S(this,tt,"f").addCoerceMiddleware((n,i)=>{let s;return Object.prototype.hasOwnProperty.call(n,e)?xr(()=>(s=i.getAliases(),r(n[e])),a=>{n[e]=
185
+ a;const c=i.getInternalMethods().getParserConfiguration()["strip-aliased"];if(s[e]&&c!==!0)for(const l of s[e])n[l]=a;return n},a=>{throw new je(a.message)}):n},e),this}conflicts(e,r){return ce("<string|object> [string|array]",[e,r],arguments.length),S(this,Ie,"f").conflicts(e,r),this}config(e="config",r,n){return ce("[object|string] [string|function] [function]",[e,r,n],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=ms(e,S(this,Jt,"f"),this[nr]()["deep-merge-config"]||!1,S(this,de,"\
186
+ f")),S(this,le,"f").configObjects=(S(this,le,"f").configObjects||[]).concat(e),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(e,r||S(this,he,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(i=>{S(this,le,"f").config[i]=n||!0}),this)}completion(e,r,n){return ce("[string] [string|boolean|function] [function]",[e,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),ue(this,We,e||S(this,We,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion\
187
+ script"),this.command(S(this,We,"f"),r),n&&S(this,Ze,"f").registerFunction(n),this}command(e,r,n,i,s,o){return ce("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,r,n,i,s,o],arguments.length),S(this,Fe,"f").addHandler(e,r,n,i,s,o),this}commands(e,r,n,i,s,o){return this.command(e,r,n,i,s,o)}commandDir(e,r){ce("<string> [object]",[e,r],arguments.length);const n=S(this,yn,"f")||S(this,de,"f").require;return S(this,Fe,"f").addDirectory(e,n,S(this,de,
188
+ "f").getCallerFile(),r),this}count(e){return ce("<array|string>",[e],arguments.length),this[jt]("count",e),this[sr](e),this}default(e,r,n){return ce("<object|string|array> [*] [string]",[e,r,n],arguments.length),n&&(Eu(e,S(this,de,"f")),S(this,le,"f").defaultDescription[e]=n),typeof r=="function"&&(Eu(e,S(this,de,"f")),S(this,le,"f").defaultDescription[e]||(S(this,le,"f").defaultDescription[e]=S(this,he,"f").functionDescription(r)),r=r.call()),this[gr](this.default.bind(this),"default",e,r),this}defaults(e,r,n){
189
+ return this.default(e,r,n)}demandCommand(e=1,r,n,i){return ce("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,r,n,i],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),S(this,le,"f").demandedCommands._={min:e,max:r,minMsg:n,maxMsg:i},this}demand(e,r,n){return Array.isArray(r)?(r.forEach(i=>{ot(n,!0,S(this,de,"f")),this.demandOption(i,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof e=="number"?(ot(n,!0,S(this,de,"f")),this.demandCommand(e,r,n,n)):
190
+ Array.isArray(e)?e.forEach(i=>{ot(n,!0,S(this,de,"f")),this.demandOption(i,n)}):typeof n=="string"?this.demandOption(e,n):(n===!0||typeof n>"u")&&this.demandOption(e),this}demandOption(e,r){return ce("<object|string|array> [string]",[e,r],arguments.length),this[gr](this.demandOption.bind(this),"demandedOptions",e,r),this}deprecateOption(e,r){return ce("<string> [string|boolean]",[e,r],arguments.length),S(this,le,"f").deprecatedOptions[e]=r,this}describe(e,r){return ce("<object|string|array> [str\
191
+ ing]",[e,r],arguments.length),this[_s](e,!0),S(this,he,"f").describe(e,r),this}detectLocale(e){return ce("<boolean>",[e],arguments.length),ue(this,Xt,e,"f"),this}env(e){return ce("[string|boolean]",[e],arguments.length),e===!1?delete S(this,le,"f").envPrefix:S(this,le,"f").envPrefix=e||"",this}epilogue(e){return ce("<string>",[e],arguments.length),S(this,he,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,r){return ce("<string|array> [string]",[e,r],arguments.length),Array.isArray(
192
+ e)?e.forEach(n=>this.example(...n)):S(this,he,"f").example(e,r),this}exit(e,r){ue(this,Ke,!0,"f"),ue(this,Tt,r,"f"),S(this,et,"f")&&S(this,de,"f").process.exit(e)}exitProcess(e=!0){return ce("[boolean]",[e],arguments.length),ue(this,et,e,"f"),this}fail(e){if(ce("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new je("Invalid first argument. Expected function or boolean 'false'");return S(this,he,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,r){
193
+ return ce("<array> [function]",[e,r],arguments.length),r?S(this,Ze,"f").getCompletion(e,r):new Promise((n,i)=>{S(this,Ze,"f").getCompletion(e,(s,o)=>{s?i(s):n(o)})})}getDemandedOptions(){return ce([],0),S(this,le,"f").demandedOptions}getDemandedCommands(){return ce([],0),S(this,le,"f").demandedCommands}getDeprecatedOptions(){return ce([],0),S(this,le,"f").deprecatedOptions}getDetectLocale(){return S(this,Xt,"f")}getExitProcess(){return S(this,et,"f")}getGroups(){return Object.assign({},S(this,gt,
194
+ "f"),S(this,Zt,"f"))}getHelp(){if(ue(this,Ke,!0,"f"),!S(this,he,"f").hasCachedHelpMessage()){if(!this.parsed){const r=this[Vr](S(this,Lt,"f"),void 0,void 0,0,!0);if(Le(r))return r.then(()=>S(this,he,"f").help())}const e=S(this,Fe,"f").runDefaultBuilderOn(this);if(Le(e))return e.then(()=>S(this,he,"f").help())}return Promise.resolve(S(this,he,"f").help())}getOptions(){return S(this,le,"f")}getStrict(){return S(this,er,"f")}getStrictCommands(){return S(this,tr,"f")}getStrictOptions(){return S(this,
195
+ rr,"f")}global(e,r){return ce("<string|array> [boolean]",[e,r],arguments.length),e=[].concat(e),r!==!1?S(this,le,"f").local=S(this,le,"f").local.filter(n=>e.indexOf(n)===-1):e.forEach(n=>{S(this,le,"f").local.includes(n)||S(this,le,"f").local.push(n)}),this}group(e,r){ce("<string|array> <string>",[e,r],arguments.length);const n=S(this,Zt,"f")[r]||S(this,gt,"f")[r];S(this,Zt,"f")[r]&&delete S(this,Zt,"f")[r];const i={};return S(this,gt,"f")[r]=(n||[]).concat(e).filter(s=>i[s]?!1:i[s]=!0),this}hide(e){
196
+ return ce("<string>",[e],arguments.length),S(this,le,"f").hiddenOptions.push(e),this}implies(e,r){return ce("<string|object> [number|string|array]",[e,r],arguments.length),S(this,Ie,"f").implies(e,r),this}locale(e){return ce("[string]",[e],arguments.length),e===void 0?(this[ys](),S(this,de,"f").y18n.getLocale()):(ue(this,Xt,!1,"f"),S(this,de,"f").y18n.setLocale(e),this)}middleware(e,r,n){return S(this,tt,"f").addMiddleware(e,!!r,n)}nargs(e,r){return ce("<string|object|array> [number]",[e,r],arguments.
197
+ length),this[gr](this.nargs.bind(this),"narg",e,r),this}normalize(e){return ce("<array|string>",[e],arguments.length),this[jt]("normalize",e),this}number(e){return ce("<array|string>",[e],arguments.length),this[jt]("number",e),this[sr](e),this}option(e,r){if(ce("<string|object> [object]",[e,r],arguments.length),typeof e=="object")Object.keys(e).forEach(n=>{this.options(n,e[n])});else{typeof r!="object"&&(r={}),this[sr](e),S(this,yt,"f")&&(e==="version"||r?.alias==="version")&&this[Su](['"version\
198
+ " is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
199
+ `),void 0,"versionWarning"),S(this,le,"f").key[e]=!0,r.alias&&this.alias(e,r.alias);const n=r.deprecate||r.deprecated;n&&this.deprecateOption(e,n);const i=r.demand||r.required||r.require;i&&this.demand(e,i),r.demandOption&&this.demandOption(e,typeof r.demandOption=="string"?r.demandOption:void 0),r.conflicts&&this.conflicts(e,r.conflicts),"default"in r&&this.default(e,r.default),r.implies!==void 0&&this.implies(e,r.implies),r.nargs!==void 0&&this.nargs(e,r.nargs),r.config&&this.config(e,r.configParser),
200
+ r.normalize&&this.normalize(e),r.choices&&this.choices(e,r.choices),r.coerce&&this.coerce(e,r.coerce),r.group&&this.group(e,r.group),(r.boolean||r.type==="boolean")&&(this.boolean(e),r.alias&&this.boolean(r.alias)),(r.array||r.type==="array")&&(this.array(e),r.alias&&this.array(r.alias)),(r.number||r.type==="number")&&(this.number(e),r.alias&&this.number(r.alias)),(r.string||r.type==="string")&&(this.string(e),r.alias&&this.string(r.alias)),(r.count||r.type==="count")&&this.count(e),typeof r.global==
201
+ "boolean"&&this.global(e,r.global),r.defaultDescription&&(S(this,le,"f").defaultDescription[e]=r.defaultDescription),r.skipValidation&&this.skipValidation(e);const s=r.describe||r.description||r.desc,o=S(this,he,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(o,e)||typeof s=="string")&&this.describe(e,s),r.hidden&&this.hide(e),r.requiresArg&&this.requiresArg(e)}return this}options(e,r){return this.option(e,r)}parse(e,r,n){ce("[string|array] [function|boolean|object] [function]",[e,
202
+ r,n],arguments.length),this[Ru](),typeof e>"u"&&(e=S(this,Lt,"f")),typeof r=="object"&&(ue(this,Qt,r,"f"),r=n),typeof r=="function"&&(ue(this,Ye,r,"f"),r=!1),r||ue(this,Lt,e,"f"),S(this,Ye,"f")&&ue(this,et,!1,"f");const i=this[Vr](e,!!r),s=this.parsed;return S(this,Ze,"f").setParsed(this.parsed),Le(i)?i.then(o=>(S(this,Ye,"f")&&S(this,Ye,"f").call(this,S(this,Tt,"f"),o,S(this,ke,"f")),o)).catch(o=>{throw S(this,Ye,"f")&&S(this,Ye,"f")(o,this.parsed.argv,S(this,ke,"f")),o}).finally(()=>{this[ws](),
203
+ this.parsed=s}):(S(this,Ye,"f")&&S(this,Ye,"f").call(this,S(this,Tt,"f"),i,S(this,ke,"f")),this[ws](),this.parsed=s,i)}parseAsync(e,r,n){const i=this.parse(e,r,n);return Le(i)?i:Promise.resolve(i)}parseSync(e,r,n){const i=this.parse(e,r,n);if(Le(i))throw new je(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return i}parserConfiguration(e){return ce("<object>",[e],arguments.length),ue(this,En,e,"f"),this}pkgConf(e,r){ce("<string> [string]",[e,r],arguments.length);
204
+ let n=null;const i=this[Es](r||S(this,Jt,"f"));return i[e]&&typeof i[e]=="object"&&(n=ms(i[e],r||S(this,Jt,"f"),this[nr]()["deep-merge-config"]||!1,S(this,de,"f")),S(this,le,"f").configObjects=(S(this,le,"f").configObjects||[]).concat(n)),this}positional(e,r){ce("<string> <object>",[e,r],arguments.length);const n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=Mr(r,(o,a)=>o==="type"&&!["string","number","boole\
205
+ an"].includes(a)?!1:n.includes(o));const i=S(this,Hr,"f").fullCommands[S(this,Hr,"f").fullCommands.length-1],s=i?S(this,Fe,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return fn(s).forEach(o=>{const a=s[o];Array.isArray(a)?a.indexOf(e)!==-1&&(r[o]=!0):a[e]&&!(o in r)&&(r[o]=a[e])}),this.group(e,S(this,he,"f").getPositionalGroupName()),this.option(e,r)}recommendCommands(e=!0){return ce("[boolean]",[e],arguments.length),ue(this,Dn,e,"f"),this}required(e,r,n){return this.demand(
206
+ e,r,n)}require(e,r,n){return this.demand(e,r,n)}requiresArg(e){return ce("<array|string|object> [number]",[e],arguments.length),typeof e=="string"&&S(this,le,"f").narg[e]?this:(this[gr](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,r){return ce("[string] [string]",[e,r],arguments.length),e=e||this.$0,S(this,pr,"f").log(S(this,Ze,"f").generateCompletionScript(e,r||S(this,We,"f")||"completion")),this}showHelp(e){if(ce("[string|function]",[e],arguments.length),ue(this,Ke,!0,
207
+ "f"),!S(this,he,"f").hasCachedHelpMessage()){if(!this.parsed){const n=this[Vr](S(this,Lt,"f"),void 0,void 0,0,!0);if(Le(n))return n.then(()=>{S(this,he,"f").showHelp(e)}),this}const r=S(this,Fe,"f").runDefaultBuilderOn(this);if(Le(r))return r.then(()=>{S(this,he,"f").showHelp(e)}),this}return S(this,he,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,r){return ce("[boolean|string] [string]",[e,r],arguments.length),S(this,he,"f").showHelpOnFail(e,
208
+ r),this}showVersion(e){return ce("[string|function]",[e],arguments.length),S(this,he,"f").showVersion(e),this}skipValidation(e){return ce("<array|string>",[e],arguments.length),this[jt]("skipValidation",e),this}strict(e){return ce("[boolean]",[e],arguments.length),ue(this,er,e!==!1,"f"),this}strictCommands(e){return ce("[boolean]",[e],arguments.length),ue(this,tr,e!==!1,"f"),this}strictOptions(e){return ce("[boolean]",[e],arguments.length),ue(this,rr,e!==!1,"f"),this}string(e){return ce("<array|\
209
+ string>",[e],arguments.length),this[jt]("string",e),this[sr](e),this}terminalWidth(){return ce([],0),S(this,de,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return ce("<object>",[e],arguments.length),ue(this,Xt,!1,"f"),S(this,de,"f").y18n.updateLocale(e),this}usage(e,r,n,i){if(ce("<string|null|undefined> [string|boolean] [function|object] [function]",[e,r,n,i],arguments.length),r!==void 0){if(ot(e,null,S(this,de,"f")),(e||"").match(/^\$0( |$)/))return this.
210
+ command(e,r,n,i);throw new je(".usage() description must start with $0 if being used as alias for .command()")}else return S(this,he,"f").usage(e),this}usageConfiguration(e){return ce("<object>",[e],arguments.length),ue(this,vn,e,"f"),this}version(e,r,n){const i="version";if(ce("[boolean|string] [string] [string]",[e,r,n],arguments.length),S(this,yt,"f")&&(this[gs](S(this,yt,"f")),S(this,he,"f").version(void 0),ue(this,yt,null,"f")),arguments.length===0)n=this[Fu](),e=i;else if(arguments.length===
211
+ 1){if(e===!1)return this;n=e,e=i}else arguments.length===2&&(n=r,r=void 0);return ue(this,yt,typeof e=="string"?e:i,"f"),r=r||S(this,he,"f").deferY18nLookup("Show version number"),S(this,he,"f").version(n||void 0),this.boolean(S(this,yt,"f")),this.describe(S(this,yt,"f"),r),this}wrap(e){return ce("<number|null|undefined>",[e],arguments.length),S(this,he,"f").wrap(e),this}[(Fe=new WeakMap,Jt=new WeakMap,Hr=new WeakMap,Ze=new WeakMap,We=new WeakMap,hn=new WeakMap,Tt=new WeakMap,Xt=new WeakMap,pn=new WeakMap,
212
+ et=new WeakMap,mn=new WeakMap,tt=new WeakMap,gt=new WeakMap,Ke=new WeakMap,rt=new WeakMap,gn=new WeakMap,pr=new WeakMap,ke=new WeakMap,le=new WeakMap,yn=new WeakMap,En=new WeakMap,Ye=new WeakMap,Qt=new WeakMap,mr=new WeakMap,Zt=new WeakMap,Lt=new WeakMap,Dn=new WeakMap,de=new WeakMap,er=new WeakMap,tr=new WeakMap,rr=new WeakMap,he=new WeakMap,vn=new WeakMap,yt=new WeakMap,Ie=new WeakMap,Au)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[Cu](){return{
213
+ log:(...e)=>{this[$n]()||console.log(...e),ue(this,Ke,!0,"f"),S(this,ke,"f").length&&ue(this,ke,S(this,ke,"f")+`
214
+ `,"f"),ue(this,ke,S(this,ke,"f")+e.join(" "),"f")},error:(...e)=>{this[$n]()||console.error(...e),ue(this,Ke,!0,"f"),S(this,ke,"f").length&&ue(this,ke,S(this,ke,"f")+`
215
+ `,"f"),ue(this,ke,S(this,ke,"f")+e.join(" "),"f")}}}[gs](e){fn(S(this,le,"f")).forEach(r=>{if((i=>i==="configObjects")(r))return;const n=S(this,le,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete S(this,he,"f").getDescriptions()[e]}[Su](e,r,n){S(this,pn,"f")[n]||(S(this,de,"f").process.emitWarning(e,r),S(this,pn,"f")[n]=!0)}[Ru](){S(this,mn,"f").push({options:S(this,le,"f"),configObjects:S(this,le,"f").configObjects.slice(0),exitProcess:S(
216
+ this,et,"f"),groups:S(this,gt,"f"),strict:S(this,er,"f"),strictCommands:S(this,tr,"f"),strictOptions:S(this,rr,"f"),completionCommand:S(this,We,"f"),output:S(this,ke,"f"),exitError:S(this,Tt,"f"),hasOutput:S(this,Ke,"f"),parsed:this.parsed,parseFn:S(this,Ye,"f"),parseContext:S(this,Qt,"f")}),S(this,he,"f").freeze(),S(this,Ie,"f").freeze(),S(this,Fe,"f").freeze(),S(this,tt,"f").freeze()}[Ou](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(S(this,de,"f").process.argv()[0])?r=S(this,de,"f").
217
+ process.argv().slice(1,2):r=S(this,de,"f").process.argv().slice(0,1),e=r.map(n=>{const i=this[Uu](S(this,Jt,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&i.length<n.length?i:n}).join(" ").trim(),S(this,de,"f").getEnv("_")&&S(this,de,"f").getProcessArgvBin()===S(this,de,"f").getEnv("_")&&(e=S(this,de,"f").getEnv("_").replace(`${S(this,de,"f").path.dirname(S(this,de,"f").process.execPath())}/`,"")),e}[nr](){return S(this,En,"f")}[Iu](){return S(this,vn,"f")}[ys](){if(!S(this,Xt,"f"))return;const e=S(
218
+ this,de,"f").getEnv("LC_ALL")||S(this,de,"f").getEnv("LC_MESSAGES")||S(this,de,"f").getEnv("LANG")||S(this,de,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[Fu](){return this[Es]().version||"unknown"}[Pu](e){const r=e["--"]?e["--"]:e._;for(let n=0,i;(i=r[n])!==void 0;n++)S(this,de,"f").Parser.looksLikeNumber(i)&&Number.isSafeInteger(Math.floor(parseFloat(`${i}`)))&&(r[n]=Number(i));return e}[Es](e){const r=e||"*";if(S(this,mr,"f")[r])return S(this,mr,"f")[r];let n={};try{let i=e||
219
+ S(this,de,"f").mainFilename;!e&&S(this,de,"f").path.extname(i)&&(i=S(this,de,"f").path.dirname(i));const s=S(this,de,"f").findUp(i,(o,a)=>{if(a.includes("package.json"))return"package.json"});ot(s,void 0,S(this,de,"f")),n=JSON.parse(S(this,de,"f").readFileSync(s,"utf8"))}catch{}return S(this,mr,"f")[r]=n||{},S(this,mr,"f")[r]}[jt](e,r){r=[].concat(r),r.forEach(n=>{n=this[$s](n),S(this,le,"f")[e].push(n)})}[gr](e,r,n,i){this[vs](e,r,n,i,(s,o,a)=>{S(this,le,"f")[s][o]=a})}[Ds](e,r,n,i){this[vs](e,
220
+ r,n,i,(s,o,a)=>{S(this,le,"f")[s][o]=(S(this,le,"f")[s][o]||[]).concat(a)})}[vs](e,r,n,i,s){if(Array.isArray(n))n.forEach(o=>{e(o,i)});else if((o=>typeof o=="object")(n))for(const o of fn(n))e(o,n[o]);else s(r,this[$s](n),i)}[$s](e){return e==="__proto__"?"___proto___":e}[_s](e,r){return this[gr](this[_s].bind(this),"key",e,r),this}[ws](){var e,r,n,i,s,o,a,c,l,u,d,h;const E=S(this,mn,"f").pop();ot(E,void 0,S(this,de,"f"));let y;e=this,r=this,n=this,i=this,s=this,o=this,a=this,c=this,l=this,u=this,
221
+ d=this,h=this,{options:{set value(D){ue(e,le,D,"f")}}.value,configObjects:y,exitProcess:{set value(D){ue(r,et,D,"f")}}.value,groups:{set value(D){ue(n,gt,D,"f")}}.value,output:{set value(D){ue(i,ke,D,"f")}}.value,exitError:{set value(D){ue(s,Tt,D,"f")}}.value,hasOutput:{set value(D){ue(o,Ke,D,"f")}}.value,parsed:this.parsed,strict:{set value(D){ue(a,er,D,"f")}}.value,strictCommands:{set value(D){ue(c,tr,D,"f")}}.value,strictOptions:{set value(D){ue(l,rr,D,"f")}}.value,completionCommand:{set value(D){
222
+ ue(u,We,D,"f")}}.value,parseFn:{set value(D){ue(d,Ye,D,"f")}}.value,parseContext:{set value(D){ue(h,Qt,D,"f")}}.value}=E,S(this,le,"f").configObjects=y,S(this,he,"f").unfreeze(),S(this,Ie,"f").unfreeze(),S(this,Fe,"f").unfreeze(),S(this,tt,"f").unfreeze()}[Nu](e,r){return xr(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[Tu].bind(this),getContext:this[Lu].bind(this),getHasOutput:this[ju].bind(this),getLoggerInstance:this[ku].bind(this),getParseContext:this[Bu].bind(this),getParserConfiguration:this[nr].
223
+ bind(this),getUsageConfiguration:this[Iu].bind(this),getUsageInstance:this[xu].bind(this),getValidationInstance:this[Mu].bind(this),hasParseCallback:this[$n].bind(this),isGlobalContext:this[qu].bind(this),postProcess:this[ir].bind(this),reset:this[bs].bind(this),runValidation:this[As].bind(this),runYargsParserAndExecuteCommands:this[Vr].bind(this),setHasOutput:this[Hu].bind(this)}}[Tu](){return S(this,Fe,"f")}[Lu](){return S(this,Hr,"f")}[ju](){return S(this,Ke,"f")}[ku](){return S(this,pr,"f")}[Bu](){
224
+ return S(this,Qt,"f")||{}}[xu](){return S(this,he,"f")}[Mu](){return S(this,Ie,"f")}[$n](){return!!S(this,Ye,"f")}[qu](){return S(this,gn,"f")}[ir](e,r,n,i){return n||Le(e)||(r||(e=this[Au](e)),(this[nr]()["parse-positional-numbers"]||this[nr]()["parse-positional-numbers"]===void 0)&&(e=this[Pu](e)),i&&(e=Br(e,this,S(this,tt,"f").getMiddleware(),!1))),e}[bs](e={}){ue(this,le,S(this,le,"f")||{},"f");const r={};r.local=S(this,le,"f").local||[],r.configObjects=S(this,le,"f").configObjects||[];const n={};
225
+ r.local.forEach(o=>{n[o]=!0,(e[o]||[]).forEach(a=>{n[a]=!0})}),Object.assign(S(this,Zt,"f"),Object.keys(S(this,gt,"f")).reduce((o,a)=>{const c=S(this,gt,"f")[a].filter(l=>!(l in n));return c.length>0&&(o[a]=c),o},{})),ue(this,gt,{},"f");const i=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return i.forEach(o=>{r[o]=(S(this,
226
+ le,"f")[o]||[]).filter(a=>!n[a])}),s.forEach(o=>{r[o]=Mr(S(this,le,"f")[o],a=>!n[a])}),r.envPrefix=S(this,le,"f").envPrefix,ue(this,le,r,"f"),ue(this,he,S(this,he,"f")?S(this,he,"f").reset(n):c0(this,S(this,de,"f")),"f"),ue(this,Ie,S(this,Ie,"f")?S(this,Ie,"f").reset(n):E0(this,S(this,he,"f"),S(this,de,"f")),"f"),ue(this,Fe,S(this,Fe,"f")?S(this,Fe,"f").reset():i0(S(this,he,"f"),S(this,Ie,"f"),S(this,tt,"f"),S(this,de,"f")),"f"),S(this,Ze,"f")||ue(this,Ze,p0(this,S(this,he,"f"),S(this,Fe,"f"),S(
227
+ this,de,"f")),"f"),S(this,tt,"f").reset(),ue(this,We,null,"f"),ue(this,ke,"","f"),ue(this,Tt,null,"f"),ue(this,Ke,!1,"f"),this.parsed=!1,this}[Uu](e,r){return S(this,de,"f").path.relative(e,r)}[Vr](e,r,n,i=0,s=!1){let o=!!n||s;e=e||S(this,Lt,"f"),S(this,le,"f").__=S(this,de,"f").y18n.__,S(this,le,"f").configuration=this[nr]();const a=!!S(this,le,"f").configuration["populate--"],c=Object.assign({},S(this,le,"f").configuration,{"populate--":!0}),l=S(this,de,"f").Parser.detailed(e,Object.assign({},
228
+ S(this,le,"f"),{configuration:{"parse-positional-numbers":!1,...c}})),u=Object.assign(l.argv,S(this,Qt,"f"));let d;const h=l.aliases;let E=!1,y=!1;Object.keys(u).forEach(D=>{D===S(this,rt,"f")&&u[D]?E=!0:D===S(this,yt,"f")&&u[D]&&(y=!0)}),u.$0=this.$0,this.parsed=l,i===0&&S(this,he,"f").clearCachedHelpMessage();try{if(this[ys](),r)return this[ir](u,a,!!n,!1);S(this,rt,"f")&&[S(this,rt,"f")].concat(h[S(this,rt,"f")]||[]).filter(m=>m.length>1).includes(""+u._[u._.length-1])&&(u._.pop(),E=!0),ue(this,
229
+ gn,!1,"f");const D=S(this,Fe,"f").getCommands(),f=S(this,Ze,"f").completionKey in u,g=E||f||s;if(u._.length){if(D.length){let p;for(let m=i||0,v;u._[m]!==void 0;m++)if(v=String(u._[m]),D.includes(v)&&v!==S(this,We,"f")){const $=S(this,Fe,"f").runCommand(v,this,l,m+1,s,E||y||s);return this[ir]($,a,!!n,!1)}else if(!p&&v!==S(this,We,"f")){p=v;break}!S(this,Fe,"f").hasDefaultCommand()&&S(this,Dn,"f")&&p&&!g&&S(this,Ie,"f").recommendCommands(p,D)}S(this,We,"f")&&u._.includes(S(this,We,"f"))&&!f&&(S(this,
230
+ et,"f")&&qr(!0),this.showCompletionScript(),this.exit(0))}if(S(this,Fe,"f").hasDefaultCommand()&&!g){const p=S(this,Fe,"f").runCommand(null,this,l,0,s,E||y||s);return this[ir](p,a,!!n,!1)}if(f){S(this,et,"f")&&qr(!0),e=[].concat(e);const p=e.slice(e.indexOf(`--${S(this,Ze,"f").completionKey}`)+1);return S(this,Ze,"f").getCompletion(p,(m,v)=>{if(m)throw new je(m.message);(v||[]).forEach($=>{S(this,pr,"f").log($)}),this.exit(0)}),this[ir](u,!a,!!n,!1)}if(S(this,Ke,"f")||(E?(S(this,et,"f")&&qr(!0),
231
+ o=!0,this.showHelp("log"),this.exit(0)):y&&(S(this,et,"f")&&qr(!0),o=!0,S(this,he,"f").showVersion("log"),this.exit(0))),!o&&S(this,le,"f").skipValidation.length>0&&(o=Object.keys(u).some(p=>S(this,le,"f").skipValidation.indexOf(p)>=0&&u[p]===!0)),!o){if(l.error)throw new je(l.error.message);if(!f){const p=this[As](h,{},l.error);n||(d=Br(u,this,S(this,tt,"f").getMiddleware(),!0)),d=this[Nu](p,d??u),Le(d)&&!n&&(d=d.then(()=>Br(u,this,S(this,tt,"f").getMiddleware(),!1)))}}}catch(D){if(D instanceof
232
+ je)S(this,he,"f").fail(D.message,D);else throw D}return this[ir](d??u,a,!!n,!0)}[As](e,r,n,i){const s={...this.getDemandedOptions()};return o=>{if(n)throw new je(n.message);S(this,Ie,"f").nonOptionCount(o),S(this,Ie,"f").requiredArguments(o,s);let a=!1;S(this,tr,"f")&&(a=S(this,Ie,"f").unknownCommands(o)),S(this,er,"f")&&!a?S(this,Ie,"f").unknownArguments(o,e,r,!!i):S(this,rr,"f")&&S(this,Ie,"f").unknownArguments(o,e,{},!1,!1),S(this,Ie,"f").limitedChoices(o),S(this,Ie,"f").implications(o),S(this,
233
+ Ie,"f").conflicting(o)}}[Hu](){ue(this,Ke,!0,"f")}[sr](e){if(typeof e=="string")S(this,le,"f").key[e]=!0;else for(const r of e)S(this,le,"f").key[r]=!0}}function w0(t){return!!t&&typeof t.getInternalMethods=="function"}const b0=$0(Xm),_n={type:"string",desc:"<directory> with LikeC4 sources (default is current directory)",normalize:!0,default:".",coerce:De},at={alias:"use-dot-bin",boolean:!0,type:"boolean",desc:'use graphviz binaries ("dot" should be on PATH)',default:!1},Vu={boolean:!0,type:"boo\
234
+ lean",desc:'use hash history for navigation, e.g. "/#/view" instead of "/view"'},wn={alias:"o",type:"string",desc:"<directory> output directory",normalize:!0,coerce:De},Cs={alias:"w",type:"string",desc:'prefix for Webcomponents, e.g "c4" generates <c4-view ../>',default:"likec4"},zu={alias:["base-url"],type:"string",desc:'base url the app is being served from, e.g. "/" or "/pages/"'},Gu={boolean:!0,type:"boolean",desc:"overview all diagrams as graph [experimental]",default:!1},A0={boolean:!0,type:"\
235
+ boolean",desc:"outputs a single self-contained HTML file with all required resources inlined"},C0={alias:"l",type:"string",desc:"ip address of the network interface to listen on",default:"127.0.0.1"},Wu=t=>t instanceof URL?Xa(t):t;function S0(t,{cwd:e=Te.cwd(),type:r="file",stopAt:n}={}){let i=be.resolve(Wu(e)??"");const{root:s}=be.parse(i);for(n=be.resolve(i,Wu(n)??s);i&&i!==n&&i!==s;){const o=be.isAbsolute(t)?t:be.join(i,t);try{const a=ge.statSync(o,{throwIfNoEntry:!1});if(r==="file"&&a?.isFile()||
236
+ r==="directory"&&a?.isDirectory())return o}catch{}i=be.dirname(i)}}function R0({cwd:t=Te.cwd()}={}){return S0("package.json",{cwd:t})}const Ss=Dt("vite"),bn=Gt(Xa(import.meta.url)),O0=`
66
237
  /* prettier-ignore-start */
67
238
  /* eslint-disable */
68
239
 
@@ -71,33 +242,158 @@ ${E.join(`
71
242
  * DO NOT EDIT MANUALLY!
72
243
  ******************************************************************************/
73
244
 
74
- `.trimStart(),P0=`
245
+ `.trimStart(),I0=`
75
246
 
76
247
  /* prettier-ignore-end */
77
- `,Bs={banner:I0,footer:P0};function Dc(){const t=F0({cwd:Nn});if(!t)throw new Error("likec4 package folder not found");return Wt(t)}function ks(){const t=Dc(),e=[ve(t,"__app__"),ve(Nn,"../__app__"),ve(Nn,"../../__app__"),ve(Nn,"../../dist/__app__")],r=pm(e,Nt);if(!r)throw mt.error(`likec4 app root does not exist, tried:
248
+ `,Rs={banner:O0,footer:I0};function Ku(){const t=R0({cwd:bn});if(!t)throw new Error("likec4 package folder not found");return Gt(t)}function Os(){const t=Ku(),e=[De(t,"__app__"),De(bn,"../__app__"),De(bn,"../../__app__"),De(bn,"../../dist/__app__")],r=gp(e,Pt);if(!r)throw pt.error(`likec4 app root does not exist, tried:
78
249
  ${e.join(`
79
- `)}`),new Error("likec4 app root does not exist");return r}async function Ms(){const t=await mn(Lr(gn(),".likec4-public-"));return await Yt(Lr(t,"likec4-views.js"),`// generated by likec4
80
- `),t}const qs=1e4;function Us(){const t=Dc();return{"likec4/icons":ve(t,"icons"),"likec4/react":ve(t,"react"),"likec4/model":ve(t,"dist/model")}}var Hs={},$c;function Vs(){return $c||($c=1,function(t){t.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,t.find=(e,r)=>e.nodes.find(n=>n.type===r),t.exceedsLimit=(e,r,n=1,i)=>i===!1||!t.isInteger(e)||!t.isInteger(r)?!1:(Number(r)-Number(e))/Number(n)>=i,t.escapeNode=(e,r=0,n)=>{const i=e.nodes[r];i&&(n&&i.type===n||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)},t.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0),t.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,t.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,t.reduce=e=>e.reduce((r,n)=>(n.type==="text"&&r.push(n.value),n.type==="range"&&(n.type="text"),r),[]),t.flatten=(...e)=>{const r=[],n=i=>{for(let o=0;o<i.length;o++){const s=i[o];if(Array.isArray(s)){n(s);continue}s!==void 0&&r.push(s)}return r};return n(e),r}}(Hs)),Hs}var zs,bc;function Gs(){if(bc)return zs;bc=1;const t=Vs();return zs=(e,r={})=>{const n=(i,o={})=>{const s=r.escapeInvalid&&t.isInvalidBrace(o),a=i.invalid===!0&&r.escapeInvalid===!0;let c="";if(i.value)return(s||a)&&t.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(const f of i.nodes)c+=n(f);return c};return n(e)},zs}var Ws,Ac;function N0(){return Ac||(Ac=1,Ws=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}),Ws}var Ks,Cc;function T0(){if(Cc)return Ks;Cc=1;const t=N0(),e=(l,m,p)=>{if(t(l)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(m===void 0||l===m)return String(l);if(t(m)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let g={relaxZeros:!0,...p};typeof g.strictZeros=="boolean"&&(g.relaxZeros=g.strictZeros===!1);let _=String(g.relaxZeros),w=String(g.shorthand),D=String(g.capture),$=String(g.wrap),F=l+":"+m+"="+_+w+D+$;if(e.cache.hasOwnProperty(F))return e.cache[F].result;let M=Math.min(l,m),U=Math.max(l,m);if(Math.abs(M-U)===1){let q=l+"|"+m;return g.capture?`(${q})`:g.wrap===!1?q:`(?:${q})`}let j=E(l)||E(m),B={min:l,max:m,a:M,b:U},T=[],L=[];if(j&&(B.isPadded=j,B.maxLen=String(B.max).length),M<0){let q=U<0?Math.abs(U):1;L=o(q,Math.abs(M),B,g),M=B.a=0}return U>=0&&(T=o(M,U,B,g)),B.negatives=L,B.positives=T,B.result=r(L,T),g.capture===!0?B.result=`(${B.result})`:g.wrap!==!1&&T.length+L.length>1&&(B.result=`(?:${B.result})`),e.cache[F]=B,B.result};function r(l,m,p){let g=s(l,m,"-",!1)||[],_=s(m,l,"",!1)||[],w=s(l,m,"-?",!0)||[];return g.concat(w).concat(_).join("|")}function n(l,m){let p=1,g=1,_=u(l,p),w=new Set([m]);for(;l<=_&&_<=m;)w.add(_),p+=1,_=u(l,p);for(_=h(m+1,g)-1;l<_&&_<=m;)w.add(_),g+=1,_=h(m+1,g)-1;return w=[...w],w.sort(c),w}function i(l,m,p){if(l===m)return{pattern:l,count:[],digits:0};let g=a(l,m),_=g.length,w="",D=0;for(let $=0;$<_;$++){let[F,M]=g[$];F===M?w+=F:F!=="0"||M!=="9"?w+=y(F,M):D++}return D&&(w+=p.shorthand===!0?"\\d":"[0-9]"),{pattern:w,count:[D],digits:_}}function o(l,m,p,g){let _=n(l,m),w=[],D=l,$;for(let F=0;F<_.length;F++){let M=_[F],U=i(String(D),String(M),g),j="";if(!p.isPadded&&$&&$.pattern===U.pattern){$.count.length>1&&$.count.pop(),$.count.push(U.count[0]),$.string=$.pattern+d($.count),D=M+1;continue}p.isPadded&&(j=v(M,p,g)),U.string=j+U.pattern+d(U.count),w.push(U),D=M+1,$=U}return w}function s(l,m,p,g,_){let w=[];for(let D of l){let{string:$}=D;!g&&!f(m,"string",$)&&w.push(p+$),g&&f(m,"string",$)&&w.push(p+$)}return w}function a(l,m){let p=[];for(let g=0;g<l.length;g++)p.push([l[g],m[g]]);return p}function c(l,m){return l>m?1:m>l?-1:0}function f(l,m,p){return l.some(g=>g[m]===p)}function u(l,m){return Number(String(l).slice(0,-m)+"9".repeat(m))}function h(l,m){return l-l%Math.pow(10,m)}function d(l){let[m=0,p=""]=l;return p||m>1?`{${m+(p?","+p:"")}}`:""}function y(l,m,p){return`[${l}${m-l===1?"":"-"}${m}]`}function E(l){return/^-?(0+)\d/.test(l)}function v(l,m,p){if(!m.isPadded)return l;let g=Math.abs(m.maxLen-String(l).length),_=p.relaxZeros!==!1;switch(g){case 0:return"";case 1:return _?"0?":"0";case 2:return _?"0{0,2}":"00";default:return _?`0{0,${g}}`:`0{${g}}`}}return e.cache={},e.clearCache=()=>e.cache={},Ks=e,Ks}var Ys,Sc;function Rc(){if(Sc)return Ys;Sc=1;const t=hs,e=T0(),r=g=>g!==null&&typeof g=="object"&&!Array.isArray(g),n=g=>_=>g===!0?Number(_):String(_),i=g=>typeof g=="number"||typeof g=="string"&&g!=="",o=g=>Number.isInteger(+g),s=g=>{let _=`${g}`,w=-1;if(_[0]==="-"&&(_=_.slice(1)),_==="0")return!1;for(;_[++w]==="0";);return w>0},a=(g,_,w)=>typeof g=="string"||typeof _=="string"?!0:w.stringify===!0,c=(g,_,w)=>{if(_>0){let D=g[0]==="-"?"-":"";D&&(g=g.slice(1)),g=D+g.padStart(D?_-1:_,"0")}return w===!1?String(g):g},f=(g,_)=>{let w=g[0]==="-"?"-":"";for(w&&(g=g.slice(1),_--);g.length<_;)g="0"+g;return w?"-"+g:g},u=(g,_,w)=>{g.negatives.sort((U,j)=>U<j?-1:U>j?1:0),g.positives.sort((U,j)=>U<j?-1:U>j?1:0);let D=_.capture?"":"?:",$="",F="",M;return g.positives.length&&($=g.positives.map(U=>f(String(U),w)).join("|")),g.negatives.length&&(F=`-(${D}${g.negatives.map(U=>f(String(U),w)).join("|")})`),$&&F?M=`${$}|${F}`:M=$||F,_.wrap?`(${D}${M})`:M},h=(g,_,w,D)=>{if(w)return e(g,_,{wrap:!1,...D});let $=String.fromCharCode(g);if(g===_)return $;let F=String.fromCharCode(_);return`[${$}-${F}]`},d=(g,_,w)=>{if(Array.isArray(g)){let D=w.wrap===!0,$=w.capture?"":"?:";return D?`(${$}${g.join("|")})`:g.join("|")}return e(g,_,w)},y=(...g)=>new RangeError("Invalid range arguments: "+t.inspect(...g)),E=(g,_,w)=>{if(w.strictRanges===!0)throw y([g,_]);return[]},v=(g,_)=>{if(_.strictRanges===!0)throw new TypeError(`Expected step "${g}" to be a number`);return[]},l=(g,_,w=1,D={})=>{let $=Number(g),F=Number(_);if(!Number.isInteger($)||!Number.isInteger(F)){if(D.strictRanges===!0)throw y([g,_]);return[]}$===0&&($=0),F===0&&(F=0);let M=$>F,U=String(g),j=String(_),B=String(w);w=Math.max(Math.abs(w),1);let T=s(U)||s(j)||s(B),L=T?Math.max(U.length,j.length,B.length):0,q=T===!1&&a(g,_,D)===!1,X=D.transform||n(q);if(D.toRegex&&w===1)return h(f(g,L),f(_,L),!0,D);let G={negatives:[],positives:[]},Z=S=>G[S<0?"negatives":"positives"].push(Math.abs(S)),oe=[],H=0;for(;M?$>=F:$<=F;)D.toRegex===!0&&w>1?Z($):oe.push(c(X($,H),L,q)),$=M?$-w:$+w,H++;return D.toRegex===!0?w>1?u(G,D,L):d(oe,null,{wrap:!1,...D}):oe},m=(g,_,w=1,D={})=>{if(!o(g)&&g.length>1||!o(_)&&_.length>1)return E(g,_,D);let $=D.transform||(q=>String.fromCharCode(q)),F=`${g}`.charCodeAt(0),M=`${_}`.charCodeAt(0),U=F>M,j=Math.min(F,M),B=Math.max(F,M);if(D.toRegex&&w===1)return h(j,B,!1,D);let T=[],L=0;for(;U?F>=M:F<=M;)T.push($(F,L)),F=U?F-w:F+w,L++;return D.toRegex===!0?d(T,null,{wrap:!1,options:D}):T},p=(g,_,w,D={})=>{if(_==null&&i(g))return[g];if(!i(g)||!i(_))return E(g,_,D);if(typeof w=="function")return p(g,_,1,{transform:w});if(r(w))return p(g,_,0,w);let $={...D};return $.capture===!0&&($.wrap=!0),w=w||$.step||1,o(w)?o(g)&&o(_)?l(g,_,w,$):m(g,_,Math.max(Math.abs(w),1),$):w!=null&&!r(w)?v(w,$):p(g,_,1,w)};return Ys=p,Ys}var Js,Oc;function j0(){if(Oc)return Js;Oc=1;const t=Rc(),e=Vs();return Js=(n,i={})=>{const o=(s,a={})=>{const c=e.isInvalidBrace(a),f=s.invalid===!0&&i.escapeInvalid===!0,u=c===!0||f===!0,h=i.escapeInvalid===!0?"\\":"";let d="";if(s.isOpen===!0)return h+s.value;if(s.isClose===!0)return console.log("node.isClose",h,s.value),h+s.value;if(s.type==="open")return u?h+s.value:"(";if(s.type==="close")return u?h+s.value:")";if(s.type==="comma")return s.prev.type==="comma"?"":u?s.value:"|";if(s.value)return s.value;if(s.nodes&&s.ranges>0){const y=e.reduce(s.nodes),E=t(...y,{...i,wrap:!1,toRegex:!0,strictZeros:!0});if(E.length!==0)return y.length>1&&E.length>1?`(${E})`:E}if(s.nodes)for(const y of s.nodes)d+=o(y,s);return d};return o(n)},Js}var Xs,Fc;function L0(){if(Fc)return Xs;Fc=1;const t=Rc(),e=Gs(),r=Vs(),n=(o="",s="",a=!1)=>{const c=[];if(o=[].concat(o),s=[].concat(s),!s.length)return o;if(!o.length)return a?r.flatten(s).map(f=>`{${f}}`):s;for(const f of o)if(Array.isArray(f))for(const u of f)c.push(n(u,s,a));else for(let u of s)a===!0&&typeof u=="string"&&(u=`{${u}}`),c.push(Array.isArray(u)?n(f,u,a):f+u);return r.flatten(c)};return Xs=(o,s={})=>{const a=s.rangeLimit===void 0?1e3:s.rangeLimit,c=(f,u={})=>{f.queue=[];let h=u,d=u.queue;for(;h.type!=="brace"&&h.type!=="root"&&h.parent;)h=h.parent,d=h.queue;if(f.invalid||f.dollar){d.push(n(d.pop(),e(f,s)));return}if(f.type==="brace"&&f.invalid!==!0&&f.nodes.length===2){d.push(n(d.pop(),["{}"]));return}if(f.nodes&&f.ranges>0){const l=r.reduce(f.nodes);if(r.exceedsLimit(...l,s.step,a))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let m=t(...l,s);m.length===0&&(m=e(f,s)),d.push(n(d.pop(),m)),f.nodes=[];return}const y=r.encloseBrace(f);let E=f.queue,v=f;for(;v.type!=="brace"&&v.type!=="root"&&v.parent;)v=v.parent,E=v.queue;for(let l=0;l<f.nodes.length;l++){const m=f.nodes[l];if(m.type==="comma"&&f.type==="brace"){l===1&&E.push(""),E.push("");continue}if(m.type==="close"){d.push(n(d.pop(),E,y));continue}if(m.value&&m.type!=="open"){E.push(n(E.pop(),m.value));continue}m.nodes&&c(m,f)}return E};return r.flatten(c(o))},Xs}var Qs,Ic;function x0(){return Ic||(Ic=1,Qs={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:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
81
- `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}),Qs}var Zs,Pc;function B0(){if(Pc)return Zs;Pc=1;const t=Gs(),{MAX_LENGTH:e,CHAR_BACKSLASH:r,CHAR_BACKTICK:n,CHAR_COMMA:i,CHAR_DOT:o,CHAR_LEFT_PARENTHESES:s,CHAR_RIGHT_PARENTHESES:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_RIGHT_CURLY_BRACE:f,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_RIGHT_SQUARE_BRACKET:h,CHAR_DOUBLE_QUOTE:d,CHAR_SINGLE_QUOTE:y,CHAR_NO_BREAK_SPACE:E,CHAR_ZERO_WIDTH_NOBREAK_SPACE:v}=x0();return Zs=(m,p={})=>{if(typeof m!="string")throw new TypeError("Expected a string");const g=p||{},_=typeof g.maxLength=="number"?Math.min(e,g.maxLength):e;if(m.length>_)throw new SyntaxError(`Input length (${m.length}), exceeds max characters (${_})`);const w={type:"root",input:m,nodes:[]},D=[w];let $=w,F=w,M=0;const U=m.length;let j=0,B=0,T;const L=()=>m[j++],q=X=>{if(X.type==="text"&&F.type==="dot"&&(F.type="text"),F&&F.type==="text"&&X.type==="text"){F.value+=X.value;return}return $.nodes.push(X),X.parent=$,X.prev=F,F=X,X};for(q({type:"bos"});j<U;)if($=D[D.length-1],T=L(),!(T===v||T===E)){if(T===r){q({type:"text",value:(p.keepEscaping?T:"")+L()});continue}if(T===h){q({type:"text",value:"\\"+T});continue}if(T===u){M++;let X;for(;j<U&&(X=L());){if(T+=X,X===u){M++;continue}if(X===r){T+=L();continue}if(X===h&&(M--,M===0))break}q({type:"text",value:T});continue}if(T===s){$=q({type:"paren",nodes:[]}),D.push($),q({type:"text",value:T});continue}if(T===a){if($.type!=="paren"){q({type:"text",value:T});continue}$=D.pop(),q({type:"text",value:T}),$=D[D.length-1];continue}if(T===d||T===y||T===n){const X=T;let G;for(p.keepQuotes!==!0&&(T="");j<U&&(G=L());){if(G===r){T+=G+L();continue}if(G===X){p.keepQuotes===!0&&(T+=G);break}T+=G}q({type:"text",value:T});continue}if(T===c){B++;const G={type:"brace",open:!0,close:!1,dollar:F.value&&F.value.slice(-1)==="$"||$.dollar===!0,depth:B,commas:0,ranges:0,nodes:[]};$=q(G),D.push($),q({type:"open",value:T});continue}if(T===f){if($.type!=="brace"){q({type:"text",value:T});continue}const X="close";$=D.pop(),$.close=!0,q({type:X,value:T}),B--,$=D[D.length-1];continue}if(T===i&&B>0){if($.ranges>0){$.ranges=0;const X=$.nodes.shift();$.nodes=[X,{type:"text",value:t($)}]}q({type:"comma",value:T}),$.commas++;continue}if(T===o&&B>0&&$.commas===0){const X=$.nodes;if(B===0||X.length===0){q({type:"text",value:T});continue}if(F.type==="dot"){if($.range=[],F.value+=T,F.type="range",$.nodes.length!==3&&$.nodes.length!==5){$.invalid=!0,$.ranges=0,F.type="text";continue}$.ranges++,$.args=[];continue}if(F.type==="range"){X.pop();const G=X[X.length-1];G.value+=F.value+T,F=G,$.ranges--;continue}q({type:"dot",value:T});continue}q({type:"text",value:T})}do if($=D.pop(),$.type!=="root"){$.nodes.forEach(Z=>{Z.nodes||(Z.type==="open"&&(Z.isOpen=!0),Z.type==="close"&&(Z.isClose=!0),Z.nodes||(Z.type="text"),Z.invalid=!0)});const X=D[D.length-1],G=X.nodes.indexOf($);X.nodes.splice(G,1,...$.nodes)}while(D.length>0);return q({type:"eos"}),w},Zs}var eo,Nc;function k0(){if(Nc)return eo;Nc=1;const t=Gs(),e=j0(),r=L0(),n=B0(),i=(o,s={})=>{let a=[];if(Array.isArray(o))for(const c of o){const f=i.create(c,s);Array.isArray(f)?a.push(...f):a.push(f)}else a=[].concat(i.create(o,s));return s&&s.expand===!0&&s.nodupes===!0&&(a=[...new Set(a)]),a};return i.parse=(o,s={})=>n(o,s),i.stringify=(o,s={})=>t(typeof o=="string"?i.parse(o,s):o,s),i.compile=(o,s={})=>(typeof o=="string"&&(o=i.parse(o,s)),e(o,s)),i.expand=(o,s={})=>{typeof o=="string"&&(o=i.parse(o,s));let a=r(o,s);return s.noempty===!0&&(a=a.filter(Boolean)),s.nodupes===!0&&(a=[...new Set(a)]),a},i.create=(o,s={})=>o===""||o.length<3?[o]:s.expand!==!0?i.compile(o,s):i.expand(o,s),eo=i,eo}var to={},ro,Tc;function Tn(){if(Tc)return ro;Tc=1;const t=it,e="\\\\/",r=`[^${e}]`,n="\\.",i="\\+",o="\\?",s="\\/",a="(?=.)",c="[^/]",f=`(?:${s}|$)`,u=`(?:^|${s})`,h=`${n}{1,2}${f}`,d=`(?!${n})`,y=`(?!${u}${h})`,E=`(?!${n}{0,1}${f})`,v=`(?!${h})`,l=`[^.${s}]`,m=`${c}*?`,p={DOT_LITERAL:n,PLUS_LITERAL:i,QMARK_LITERAL:o,SLASH_LITERAL:s,ONE_CHAR:a,QMARK:c,END_ANCHOR:f,DOTS_SLASH:h,NO_DOT:d,NO_DOTS:y,NO_DOT_SLASH:E,NO_DOTS_SLASH:v,QMARK_NO_DOT:l,STAR:m,START_ANCHOR:u},g={...p,SLASH_LITERAL:`[${e}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`},_={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return ro={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:_,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,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,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,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:t.sep,extglobChars(w){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${w.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(w){return w===!0?g:p}},ro}var jc;function jn(){return jc||(jc=1,function(t){const e=it,r=process.platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_GLOBAL:s}=Tn();t.isObject=a=>a!==null&&typeof a=="object"&&!Array.isArray(a),t.hasRegexChars=a=>o.test(a),t.isRegexChar=a=>a.length===1&&t.hasRegexChars(a),t.escapeRegex=a=>a.replace(s,"\\$1"),t.toPosixSlashes=a=>a.replace(n,"/"),t.removeBackslashes=a=>a.replace(i,c=>c==="\\"?"":c),t.supportsLookbehinds=()=>{const a=process.version.slice(1).split(".").map(Number);return a.length===3&&a[0]>=9||a[0]===8&&a[1]>=10},t.isWindows=a=>a&&typeof a.windows=="boolean"?a.windows:r===!0||e.sep==="\\",t.escapeLast=(a,c,f)=>{const u=a.lastIndexOf(c,f);return u===-1?a:a[u-1]==="\\"?t.escapeLast(a,c,u-1):`${a.slice(0,u)}\\${a.slice(u)}`},t.removePrefix=(a,c={})=>{let f=a;return f.startsWith("./")&&(f=f.slice(2),c.prefix="./"),f},t.wrapOutput=(a,c={},f={})=>{const u=f.contains?"":"^",h=f.contains?"":"$";let d=`${u}(?:${a})${h}`;return c.negated===!0&&(d=`(?:^(?!${d}).*$)`),d}}(to)),to}var no,Lc;function M0(){if(Lc)return no;Lc=1;const t=jn(),{CHAR_ASTERISK:e,CHAR_AT:r,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:i,CHAR_DOT:o,CHAR_EXCLAMATION_MARK:s,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:f,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:h,CHAR_QUESTION_MARK:d,CHAR_RIGHT_CURLY_BRACE:y,CHAR_RIGHT_PARENTHESES:E,CHAR_RIGHT_SQUARE_BRACKET:v}=Tn(),l=g=>g===a||g===n,m=g=>{g.isPrefix!==!0&&(g.depth=g.isGlobstar?1/0:1)};return no=(g,_)=>{const w=_||{},D=g.length-1,$=w.parts===!0||w.scanToEnd===!0,F=[],M=[],U=[];let j=g,B=-1,T=0,L=0,q=!1,X=!1,G=!1,Z=!1,oe=!1,H=!1,S=!1,V=!1,k=!1,A=!1,b=0,C,W,Y={value:"",depth:0,isGlob:!1};const se=()=>B>=D,ae=()=>j.charCodeAt(B+1),N=()=>(C=W,j.charCodeAt(++B));for(;B<D;){W=N();let P;if(W===n){S=Y.backslashes=!0,W=N(),W===c&&(H=!0);continue}if(H===!0||W===c){for(b++;se()!==!0&&(W=N());){if(W===n){S=Y.backslashes=!0,N();continue}if(W===c){b++;continue}if(H!==!0&&W===o&&(W=N())===o){if(q=Y.isBrace=!0,G=Y.isGlob=!0,A=!0,$===!0)continue;break}if(H!==!0&&W===i){if(q=Y.isBrace=!0,G=Y.isGlob=!0,A=!0,$===!0)continue;break}if(W===y&&(b--,b===0)){H=!1,q=Y.isBrace=!0,A=!0;break}}if($===!0)continue;break}if(W===a){if(F.push(B),M.push(Y),Y={value:"",depth:0,isGlob:!1},A===!0)continue;if(C===o&&B===T+1){T+=2;continue}L=B+1;continue}if(w.noext!==!0&&(W===h||W===r||W===e||W===d||W===s)===!0&&ae()===f){if(G=Y.isGlob=!0,Z=Y.isExtglob=!0,A=!0,W===s&&B===T&&(k=!0),$===!0){for(;se()!==!0&&(W=N());){if(W===n){S=Y.backslashes=!0,W=N();continue}if(W===E){G=Y.isGlob=!0,A=!0;break}}continue}break}if(W===e){if(C===e&&(oe=Y.isGlobstar=!0),G=Y.isGlob=!0,A=!0,$===!0)continue;break}if(W===d){if(G=Y.isGlob=!0,A=!0,$===!0)continue;break}if(W===u){for(;se()!==!0&&(P=N());){if(P===n){S=Y.backslashes=!0,N();continue}if(P===v){X=Y.isBracket=!0,G=Y.isGlob=!0,A=!0;break}}if($===!0)continue;break}if(w.nonegate!==!0&&W===s&&B===T){V=Y.negated=!0,T++;continue}if(w.noparen!==!0&&W===f){if(G=Y.isGlob=!0,$===!0){for(;se()!==!0&&(W=N());){if(W===f){S=Y.backslashes=!0,W=N();continue}if(W===E){A=!0;break}}continue}break}if(G===!0){if(A=!0,$===!0)continue;break}}w.noext===!0&&(Z=!1,G=!1);let x=j,K="",te="";T>0&&(K=j.slice(0,T),j=j.slice(T),L-=T),x&&G===!0&&L>0?(x=j.slice(0,L),te=j.slice(L)):G===!0?(x="",te=j):x=j,x&&x!==""&&x!=="/"&&x!==j&&l(x.charCodeAt(x.length-1))&&(x=x.slice(0,-1)),w.unescape===!0&&(te&&(te=t.removeBackslashes(te)),x&&S===!0&&(x=t.removeBackslashes(x)));const O={prefix:K,input:g,start:T,base:x,glob:te,isBrace:q,isBracket:X,isGlob:G,isExtglob:Z,isGlobstar:oe,negated:V,negatedExtglob:k};if(w.tokens===!0&&(O.maxDepth=0,l(W)||M.push(Y),O.tokens=M),w.parts===!0||w.tokens===!0){let P;for(let ee=0;ee<F.length;ee++){const J=P?P+1:T,I=F[ee],ne=g.slice(J,I);w.tokens&&(ee===0&&T!==0?(M[ee].isPrefix=!0,M[ee].value=K):M[ee].value=ne,m(M[ee]),O.maxDepth+=M[ee].depth),(ee!==0||ne!=="")&&U.push(ne),P=I}if(P&&P+1<g.length){const ee=g.slice(P+1);U.push(ee),w.tokens&&(M[M.length-1].value=ee,m(M[M.length-1]),O.maxDepth+=M[M.length-1].depth)}O.slashes=F,O.parts=U}return O},no}var io,xc;function q0(){if(xc)return io;xc=1;const t=Tn(),e=jn(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:o,REPLACEMENTS:s}=t,a=(u,h)=>{if(typeof h.expandRange=="function")return h.expandRange(...u,h);u.sort();const d=`[${u.join("-")}]`;try{new RegExp(d)}catch{return u.map(E=>e.escapeRegex(E)).join("..")}return d},c=(u,h)=>`Missing ${u}: "${h}" - use "\\\\${h}" to match literal characters`,f=(u,h)=>{if(typeof u!="string")throw new TypeError("Expected a string");u=s[u]||u;const d={...h},y=typeof d.maxLength=="number"?Math.min(r,d.maxLength):r;let E=u.length;if(E>y)throw new SyntaxError(`Input length: ${E}, exceeds maximum allowed length: ${y}`);const v={type:"bos",value:"",output:d.prepend||""},l=[v],m=d.capture?"":"?:",p=e.isWindows(h),g=t.globChars(p),_=t.extglobChars(g),{DOT_LITERAL:w,PLUS_LITERAL:D,SLASH_LITERAL:$,ONE_CHAR:F,DOTS_SLASH:M,NO_DOT:U,NO_DOT_SLASH:j,NO_DOTS_SLASH:B,QMARK:T,QMARK_NO_DOT:L,STAR:q,START_ANCHOR:X}=g,G=I=>`(${m}(?:(?!${X}${I.dot?M:w}).)*?)`,Z=d.dot?"":U,oe=d.dot?T:L;let H=d.bash===!0?G(d):q;d.capture&&(H=`(${H})`),typeof d.noext=="boolean"&&(d.noextglob=d.noext);const S={input:u,index:-1,start:0,dot:d.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:l};u=e.removePrefix(u,S),E=u.length;const V=[],k=[],A=[];let b=v,C;const W=()=>S.index===E-1,Y=S.peek=(I=1)=>u[S.index+I],se=S.advance=()=>u[++S.index]||"",ae=()=>u.slice(S.index+1),N=(I="",ne=0)=>{S.consumed+=I,S.index+=ne},x=I=>{S.output+=I.output!=null?I.output:I.value,N(I.value)},K=()=>{let I=1;for(;Y()==="!"&&(Y(2)!=="("||Y(3)==="?");)se(),S.start++,I++;return I%2===0?!1:(S.negated=!0,S.start++,!0)},te=I=>{S[I]++,A.push(I)},O=I=>{S[I]--,A.pop()},P=I=>{if(b.type==="globstar"){const ne=S.braces>0&&(I.type==="comma"||I.type==="brace"),z=I.extglob===!0||V.length&&(I.type==="pipe"||I.type==="paren");I.type!=="slash"&&I.type!=="paren"&&!ne&&!z&&(S.output=S.output.slice(0,-b.output.length),b.type="star",b.value="*",b.output=H,S.output+=b.output)}if(V.length&&I.type!=="paren"&&(V[V.length-1].inner+=I.value),(I.value||I.output)&&x(I),b&&b.type==="text"&&I.type==="text"){b.value+=I.value,b.output=(b.output||"")+I.value;return}I.prev=b,l.push(I),b=I},ee=(I,ne)=>{const z={..._[ne],conditions:1,inner:""};z.prev=b,z.parens=S.parens,z.output=S.output;const ie=(d.capture?"(":"")+z.open;te("parens"),P({type:I,value:ne,output:S.output?"":F}),P({type:"paren",extglob:!0,value:se(),output:ie}),V.push(z)},J=I=>{let ne=I.close+(d.capture?")":""),z;if(I.type==="negate"){let ie=H;if(I.inner&&I.inner.length>1&&I.inner.includes("/")&&(ie=G(d)),(ie!==H||W()||/^\)+$/.test(ae()))&&(ne=I.close=`)$))${ie}`),I.inner.includes("*")&&(z=ae())&&/^\.[^\\/.]+$/.test(z)){const fe=f(z,{...h,fastpaths:!1}).output;ne=I.close=`)${fe})${ie})`}I.prev.type==="bos"&&(S.negatedExtglob=!0)}P({type:"paren",extglob:!0,value:C,output:ne}),O("parens")};if(d.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(u)){let I=!1,ne=u.replace(o,(z,ie,fe,$e,Oe,vt)=>$e==="\\"?(I=!0,z):$e==="?"?ie?ie+$e+(Oe?T.repeat(Oe.length):""):vt===0?oe+(Oe?T.repeat(Oe.length):""):T.repeat(fe.length):$e==="."?w.repeat(fe.length):$e==="*"?ie?ie+$e+(Oe?H:""):H:ie?z:`\\${z}`);return I===!0&&(d.unescape===!0?ne=ne.replace(/\\/g,""):ne=ne.replace(/\\+/g,z=>z.length%2===0?"\\\\":z?"\\":"")),ne===u&&d.contains===!0?(S.output=u,S):(S.output=e.wrapOutput(ne,S,h),S)}for(;!W();){if(C=se(),C==="\0")continue;if(C==="\\"){const z=Y();if(z==="/"&&d.bash!==!0||z==="."||z===";")continue;if(!z){C+="\\",P({type:"text",value:C});continue}const ie=/^\\+/.exec(ae());let fe=0;if(ie&&ie[0].length>2&&(fe=ie[0].length,S.index+=fe,fe%2!==0&&(C+="\\")),d.unescape===!0?C=se():C+=se(),S.brackets===0){P({type:"text",value:C});continue}}if(S.brackets>0&&(C!=="]"||b.value==="["||b.value==="[^")){if(d.posix!==!1&&C===":"){const z=b.value.slice(1);if(z.includes("[")&&(b.posix=!0,z.includes(":"))){const ie=b.value.lastIndexOf("["),fe=b.value.slice(0,ie),$e=b.value.slice(ie+2),Oe=n[$e];if(Oe){b.value=fe+Oe,S.backtrack=!0,se(),!v.output&&l.indexOf(b)===1&&(v.output=F);continue}}}(C==="["&&Y()!==":"||C==="-"&&Y()==="]")&&(C=`\\${C}`),C==="]"&&(b.value==="["||b.value==="[^")&&(C=`\\${C}`),d.posix===!0&&C==="!"&&b.value==="["&&(C="^"),b.value+=C,x({value:C});continue}if(S.quotes===1&&C!=='"'){C=e.escapeRegex(C),b.value+=C,x({value:C});continue}if(C==='"'){S.quotes=S.quotes===1?0:1,d.keepQuotes===!0&&P({type:"text",value:C});continue}if(C==="("){te("parens"),P({type:"paren",value:C});continue}if(C===")"){if(S.parens===0&&d.strictBrackets===!0)throw new SyntaxError(c("opening","("));const z=V[V.length-1];if(z&&S.parens===z.parens+1){J(V.pop());continue}P({type:"paren",value:C,output:S.parens?")":"\\)"}),O("parens");continue}if(C==="["){if(d.nobracket===!0||!ae().includes("]")){if(d.nobracket!==!0&&d.strictBrackets===!0)throw new SyntaxError(c("closing","]"));C=`\\${C}`}else te("brackets");P({type:"bracket",value:C});continue}if(C==="]"){if(d.nobracket===!0||b&&b.type==="bracket"&&b.value.length===1){P({type:"text",value:C,output:`\\${C}`});continue}if(S.brackets===0){if(d.strictBrackets===!0)throw new SyntaxError(c("opening","["));P({type:"text",value:C,output:`\\${C}`});continue}O("brackets");const z=b.value.slice(1);if(b.posix!==!0&&z[0]==="^"&&!z.includes("/")&&(C=`/${C}`),b.value+=C,x({value:C}),d.literalBrackets===!1||e.hasRegexChars(z))continue;const ie=e.escapeRegex(b.value);if(S.output=S.output.slice(0,-b.value.length),d.literalBrackets===!0){S.output+=ie,b.value=ie;continue}b.value=`(${m}${ie}|${b.value})`,S.output+=b.value;continue}if(C==="{"&&d.nobrace!==!0){te("braces");const z={type:"brace",value:C,output:"(",outputIndex:S.output.length,tokensIndex:S.tokens.length};k.push(z),P(z);continue}if(C==="}"){const z=k[k.length-1];if(d.nobrace===!0||!z){P({type:"text",value:C,output:C});continue}let ie=")";if(z.dots===!0){const fe=l.slice(),$e=[];for(let Oe=fe.length-1;Oe>=0&&(l.pop(),fe[Oe].type!=="brace");Oe--)fe[Oe].type!=="dots"&&$e.unshift(fe[Oe].value);ie=a($e,d),S.backtrack=!0}if(z.comma!==!0&&z.dots!==!0){const fe=S.output.slice(0,z.outputIndex),$e=S.tokens.slice(z.tokensIndex);z.value=z.output="\\{",C=ie="\\}",S.output=fe;for(const Oe of $e)S.output+=Oe.output||Oe.value}P({type:"brace",value:C,output:ie}),O("braces"),k.pop();continue}if(C==="|"){V.length>0&&V[V.length-1].conditions++,P({type:"text",value:C});continue}if(C===","){let z=C;const ie=k[k.length-1];ie&&A[A.length-1]==="braces"&&(ie.comma=!0,z="|"),P({type:"comma",value:C,output:z});continue}if(C==="/"){if(b.type==="dot"&&S.index===S.start+1){S.start=S.index+1,S.consumed="",S.output="",l.pop(),b=v;continue}P({type:"slash",value:C,output:$});continue}if(C==="."){if(S.braces>0&&b.type==="dot"){b.value==="."&&(b.output=w);const z=k[k.length-1];b.type="dots",b.output+=C,b.value+=C,z.dots=!0;continue}if(S.braces+S.parens===0&&b.type!=="bos"&&b.type!=="slash"){P({type:"text",value:C,output:w});continue}P({type:"dot",value:C,output:w});continue}if(C==="?"){if(!(b&&b.value==="(")&&d.noextglob!==!0&&Y()==="("&&Y(2)!=="?"){ee("qmark",C);continue}if(b&&b.type==="paren"){const ie=Y();let fe=C;if(ie==="<"&&!e.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(b.value==="("&&!/[!=<:]/.test(ie)||ie==="<"&&!/<([!=]|\w+>)/.test(ae()))&&(fe=`\\${C}`),P({type:"text",value:C,output:fe});continue}if(d.dot!==!0&&(b.type==="slash"||b.type==="bos")){P({type:"qmark",value:C,output:L});continue}P({type:"qmark",value:C,output:T});continue}if(C==="!"){if(d.noextglob!==!0&&Y()==="("&&(Y(2)!=="?"||!/[!=<:]/.test(Y(3)))){ee("negate",C);continue}if(d.nonegate!==!0&&S.index===0){K();continue}}if(C==="+"){if(d.noextglob!==!0&&Y()==="("&&Y(2)!=="?"){ee("plus",C);continue}if(b&&b.value==="("||d.regex===!1){P({type:"plus",value:C,output:D});continue}if(b&&(b.type==="bracket"||b.type==="paren"||b.type==="brace")||S.parens>0){P({type:"plus",value:C});continue}P({type:"plus",value:D});continue}if(C==="@"){if(d.noextglob!==!0&&Y()==="("&&Y(2)!=="?"){P({type:"at",extglob:!0,value:C,output:""});continue}P({type:"text",value:C});continue}if(C!=="*"){(C==="$"||C==="^")&&(C=`\\${C}`);const z=i.exec(ae());z&&(C+=z[0],S.index+=z[0].length),P({type:"text",value:C});continue}if(b&&(b.type==="globstar"||b.star===!0)){b.type="star",b.star=!0,b.value+=C,b.output=H,S.backtrack=!0,S.globstar=!0,N(C);continue}let I=ae();if(d.noextglob!==!0&&/^\([^?]/.test(I)){ee("star",C);continue}if(b.type==="star"){if(d.noglobstar===!0){N(C);continue}const z=b.prev,ie=z.prev,fe=z.type==="slash"||z.type==="bos",$e=ie&&(ie.type==="star"||ie.type==="globstar");if(d.bash===!0&&(!fe||I[0]&&I[0]!=="/")){P({type:"star",value:C,output:""});continue}const Oe=S.braces>0&&(z.type==="comma"||z.type==="brace"),vt=V.length&&(z.type==="pipe"||z.type==="paren");if(!fe&&z.type!=="paren"&&!Oe&&!vt){P({type:"star",value:C,output:""});continue}for(;I.slice(0,3)==="/**";){const Pt=u[S.index+4];if(Pt&&Pt!=="/")break;I=I.slice(3),N("/**",3)}if(z.type==="bos"&&W()){b.type="globstar",b.value+=C,b.output=G(d),S.output=b.output,S.globstar=!0,N(C);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&!$e&&W()){S.output=S.output.slice(0,-(z.output+b.output).length),z.output=`(?:${z.output}`,b.type="globstar",b.output=G(d)+(d.strictSlashes?")":"|$)"),b.value+=C,S.globstar=!0,S.output+=z.output+b.output,N(C);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&I[0]==="/"){const Pt=I[1]!==void 0?"|$":"";S.output=S.output.slice(0,-(z.output+b.output).length),z.output=`(?:${z.output}`,b.type="globstar",b.output=`${G(d)}${$}|${$}${Pt})`,b.value+=C,S.output+=z.output+b.output,S.globstar=!0,N(C+se()),P({type:"slash",value:"/",output:""});continue}if(z.type==="bos"&&I[0]==="/"){b.type="globstar",b.value+=C,b.output=`(?:^|${$}|${G(d)}${$})`,S.output=b.output,S.globstar=!0,N(C+se()),P({type:"slash",value:"/",output:""});continue}S.output=S.output.slice(0,-b.output.length),b.type="globstar",b.output=G(d),b.value+=C,S.output+=b.output,S.globstar=!0,N(C);continue}const ne={type:"star",value:C,output:H};if(d.bash===!0){ne.output=".*?",(b.type==="bos"||b.type==="slash")&&(ne.output=Z+ne.output),P(ne);continue}if(b&&(b.type==="bracket"||b.type==="paren")&&d.regex===!0){ne.output=C,P(ne);continue}(S.index===S.start||b.type==="slash"||b.type==="dot")&&(b.type==="dot"?(S.output+=j,b.output+=j):d.dot===!0?(S.output+=B,b.output+=B):(S.output+=Z,b.output+=Z),Y()!=="*"&&(S.output+=F,b.output+=F)),P(ne)}for(;S.brackets>0;){if(d.strictBrackets===!0)throw new SyntaxError(c("closing","]"));S.output=e.escapeLast(S.output,"["),O("brackets")}for(;S.parens>0;){if(d.strictBrackets===!0)throw new SyntaxError(c("closing",")"));S.output=e.escapeLast(S.output,"("),O("parens")}for(;S.braces>0;){if(d.strictBrackets===!0)throw new SyntaxError(c("closing","}"));S.output=e.escapeLast(S.output,"{"),O("braces")}if(d.strictSlashes!==!0&&(b.type==="star"||b.type==="bracket")&&P({type:"maybe_slash",value:"",output:`${$}?`}),S.backtrack===!0){S.output="";for(const I of S.tokens)S.output+=I.output!=null?I.output:I.value,I.suffix&&(S.output+=I.suffix)}return S};return f.fastpaths=(u,h)=>{const d={...h},y=typeof d.maxLength=="number"?Math.min(r,d.maxLength):r,E=u.length;if(E>y)throw new SyntaxError(`Input length: ${E}, exceeds maximum allowed length: ${y}`);u=s[u]||u;const v=e.isWindows(h),{DOT_LITERAL:l,SLASH_LITERAL:m,ONE_CHAR:p,DOTS_SLASH:g,NO_DOT:_,NO_DOTS:w,NO_DOTS_SLASH:D,STAR:$,START_ANCHOR:F}=t.globChars(v),M=d.dot?w:_,U=d.dot?D:_,j=d.capture?"":"?:",B={negated:!1,prefix:""};let T=d.bash===!0?".*?":$;d.capture&&(T=`(${T})`);const L=Z=>Z.noglobstar===!0?T:`(${j}(?:(?!${F}${Z.dot?g:l}).)*?)`,q=Z=>{switch(Z){case"*":return`${M}${p}${T}`;case".*":return`${l}${p}${T}`;case"*.*":return`${M}${T}${l}${p}${T}`;case"*/*":return`${M}${T}${m}${p}${U}${T}`;case"**":return M+L(d);case"**/*":return`(?:${M}${L(d)}${m})?${U}${p}${T}`;case"**/*.*":return`(?:${M}${L(d)}${m})?${U}${T}${l}${p}${T}`;case"**/.*":return`(?:${M}${L(d)}${m})?${l}${p}${T}`;default:{const oe=/^(.*?)\.(\w+)$/.exec(Z);if(!oe)return;const H=q(oe[1]);return H?H+l+oe[2]:void 0}}},X=e.removePrefix(u,B);let G=q(X);return G&&d.strictSlashes!==!0&&(G+=`${m}?`),G},io=f,io}var so,Bc;function U0(){if(Bc)return so;Bc=1;const t=it,e=M0(),r=q0(),n=jn(),i=Tn(),o=a=>a&&typeof a=="object"&&!Array.isArray(a),s=(a,c,f=!1)=>{if(Array.isArray(a)){const m=a.map(g=>s(g,c,f));return g=>{for(const _ of m){const w=_(g);if(w)return w}return!1}}const u=o(a)&&a.tokens&&a.input;if(a===""||typeof a!="string"&&!u)throw new TypeError("Expected pattern to be a non-empty string");const h=c||{},d=n.isWindows(c),y=u?s.compileRe(a,c):s.makeRe(a,c,!1,!0),E=y.state;delete y.state;let v=()=>!1;if(h.ignore){const m={...c,ignore:null,onMatch:null,onResult:null};v=s(h.ignore,m,f)}const l=(m,p=!1)=>{const{isMatch:g,match:_,output:w}=s.test(m,y,c,{glob:a,posix:d}),D={glob:a,state:E,regex:y,posix:d,input:m,output:w,match:_,isMatch:g};return typeof h.onResult=="function"&&h.onResult(D),g===!1?(D.isMatch=!1,p?D:!1):v(m)?(typeof h.onIgnore=="function"&&h.onIgnore(D),D.isMatch=!1,p?D:!1):(typeof h.onMatch=="function"&&h.onMatch(D),p?D:!0)};return f&&(l.state=E),l};return s.test=(a,c,f,{glob:u,posix:h}={})=>{if(typeof a!="string")throw new TypeError("Expected input to be a string");if(a==="")return{isMatch:!1,output:""};const d=f||{},y=d.format||(h?n.toPosixSlashes:null);let E=a===u,v=E&&y?y(a):a;return E===!1&&(v=y?y(a):a,E=v===u),(E===!1||d.capture===!0)&&(d.matchBase===!0||d.basename===!0?E=s.matchBase(a,c,f,h):E=c.exec(v)),{isMatch:!!E,match:E,output:v}},s.matchBase=(a,c,f,u=n.isWindows(f))=>(c instanceof RegExp?c:s.makeRe(c,f)).test(t.basename(a)),s.isMatch=(a,c,f)=>s(c,f)(a),s.parse=(a,c)=>Array.isArray(a)?a.map(f=>s.parse(f,c)):r(a,{...c,fastpaths:!1}),s.scan=(a,c)=>e(a,c),s.compileRe=(a,c,f=!1,u=!1)=>{if(f===!0)return a.output;const h=c||{},d=h.contains?"":"^",y=h.contains?"":"$";let E=`${d}(?:${a.output})${y}`;a&&a.negated===!0&&(E=`^(?!${E}).*$`);const v=s.toRegex(E,c);return u===!0&&(v.state=a),v},s.makeRe=(a,c={},f=!1,u=!1)=>{if(!a||typeof a!="string")throw new TypeError("Expected a non-empty string");let h={negated:!1,fastpaths:!0};return c.fastpaths!==!1&&(a[0]==="."||a[0]==="*")&&(h.output=r.fastpaths(a,c)),h.output||(h=r(a,c)),s.compileRe(h,c,f,u)},s.toRegex=(a,c)=>{try{const f=c||{};return new RegExp(a,f.flags||(f.nocase?"i":""))}catch(f){if(c&&c.debug===!0)throw f;return/$^/}},s.constants=i,so=s,so}var oo,kc;function H0(){return kc||(kc=1,oo=U0()),oo}var ao,Mc;function V0(){if(Mc)return ao;Mc=1;const t=hs,e=k0(),r=H0(),n=jn(),i=a=>a===""||a==="./",o=a=>{const c=a.indexOf("{");return c>-1&&a.indexOf("}",c)>-1},s=(a,c,f)=>{c=[].concat(c),a=[].concat(a);let u=new Set,h=new Set,d=new Set,y=0,E=m=>{d.add(m.output),f&&f.onResult&&f.onResult(m)};for(let m=0;m<c.length;m++){let p=r(String(c[m]),{...f,onResult:E},!0),g=p.state.negated||p.state.negatedExtglob;g&&y++;for(let _ of a){let w=p(_,!0);(g?!w.isMatch:w.isMatch)&&(g?u.add(w.output):(u.delete(w.output),h.add(w.output)))}}let l=(y===c.length?[...d]:[...h]).filter(m=>!u.has(m));if(f&&l.length===0){if(f.failglob===!0)throw new Error(`No matches found for "${c.join(", ")}"`);if(f.nonull===!0||f.nullglob===!0)return f.unescape?c.map(m=>m.replace(/\\/g,"")):c}return l};return s.match=s,s.matcher=(a,c)=>r(a,c),s.isMatch=(a,c,f)=>r(c,f)(a),s.any=s.isMatch,s.not=(a,c,f={})=>{c=[].concat(c).map(String);let u=new Set,h=[],d=E=>{f.onResult&&f.onResult(E),h.push(E.output)},y=new Set(s(a,c,{...f,onResult:d}));for(let E of h)y.has(E)||u.add(E);return[...u]},s.contains=(a,c,f)=>{if(typeof a!="string")throw new TypeError(`Expected a string: "${t.inspect(a)}"`);if(Array.isArray(c))return c.some(u=>s.contains(a,u,f));if(typeof c=="string"){if(i(a)||i(c))return!1;if(a.includes(c)||a.startsWith("./")&&a.slice(2).includes(c))return!0}return s.isMatch(a,c,{...f,contains:!0})},s.matchKeys=(a,c,f)=>{if(!n.isObject(a))throw new TypeError("Expected the first argument to be an object");let u=s(Object.keys(a),c,f),h={};for(let d of u)h[d]=a[d];return h},s.some=(a,c,f)=>{let u=[].concat(a);for(let h of[].concat(c)){let d=r(String(h),f);if(u.some(y=>d(y)))return!0}return!1},s.every=(a,c,f)=>{let u=[].concat(a);for(let h of[].concat(c)){let d=r(String(h),f);if(!u.every(y=>d(y)))return!1}return!0},s.all=(a,c,f)=>{if(typeof a!="string")throw new TypeError(`Expected a string: "${t.inspect(a)}"`);return[].concat(c).every(u=>r(u,f)(a))},s.capture=(a,c,f)=>{let u=n.isWindows(f),d=r.makeRe(String(a),{...f,capture:!0}).exec(u?n.toPosixSlashes(c):c);if(d)return d.slice(1).map(y=>y===void 0?"":y)},s.makeRe=(...a)=>r.makeRe(...a),s.scan=(...a)=>r.scan(...a),s.parse=(a,c)=>{let f=[];for(let u of[].concat(a||[]))for(let h of e(String(u),c))f.push(r.parse(h,c));return f},s.braces=(a,c)=>{if(typeof a!="string")throw new TypeError("Expected a string");return c&&c.nobrace===!0||!o(a)?[a]:e(a,c)},s.braceExpand=(a,c)=>{if(typeof a!="string")throw new TypeError("Expected a string");return s.braces(a,{...c,expand:!0})},s.hasBraces=o,ao=s,ao}var z0=V0();const qc=Nr(z0),G0={useRecommendedBuildConfig:!0,removeViteModuleLoader:!1,deleteInlinedFiles:!0};function W0(t,e,r,n=!1){const i=new RegExp(`<script([^>]*?) src="[./]*${e}"([^>]*)></script>`),o=/"?__VITE_PRELOAD__"?/g,s=r.replace(o,"void 0").replace(/<(\/script>|!--)/g,"\\x3C$1"),a=t.replace(i,(c,f,u)=>`<script${f}${u}>${s.trim()}</script>`);return n?Z0(a):a}function K0(t,e,r){const n=new RegExp(`<link([^>]*?) href="[./]*${e}"([^>]*?)>`),i=r.replace('@charset "UTF-8";',"");return t.replace(n,(s,a,c)=>`<style${a}${c}>${i.trim()}</style>`)}const Y0=/\.[mc]?js$/,J0=/\.css$/,X0=/\.html?$/;function Q0({useRecommendedBuildConfig:t=!0,removeViteModuleLoader:e=!1,inlinePattern:r=[],deleteInlinedFiles:n=!0}=G0){function i(o){console.debug(`NOTE: asset not inlined: ${o}`)}return{name:"vite:singlefile",config:t?ey:void 0,enforce:"post",generateBundle:(o,s)=>{console.debug(`
82
- `);const a={html:[],css:[],js:[],other:[]};for(const f of Object.keys(s))X0.test(f)?a.html.push(f):J0.test(f)?a.css.push(f):Y0.test(f)?a.js.push(f):a.other.push(f);const c=[];for(const f of a.html){const u=s[f];let h=u.source;for(const d of a.js){if(r.length&&!qc.isMatch(d,r)){i(d);continue}const y=s[d];y.code!=null&&(console.debug(`Inlining: ${d}`),c.push(d),h=W0(h,y.fileName,y.code,e))}for(const d of a.css){if(r.length&&!qc.isMatch(d,r)){i(d);continue}const y=s[d];console.debug(`Inlining: ${d}`),c.push(d),h=K0(h,y.fileName,y.source)}u.source=h}if(n)for(const f of c)delete s[f];for(const f of a.other)i(f)}}}const Z0=t=>t.replace(/(<script type="module" crossorigin>\s*)\(function(?: polyfill)?\(\)\s*\{[\s\S]*?\}\)\(\);/,'<script type="module">'),ey=t=>{t.build||(t.build={}),t.build.assetsInlineLimit=()=>!0,t.build.chunkSizeWarningLimit=1e8,t.build.cssCodeSplit=!1,t.base="./",t.build.assetsDir="",t.build.rollupOptions||(t.build.rollupOptions={}),t.build.rollupOptions.output||(t.build.rollupOptions.output={});const e=r=>{r.inlineDynamicImports=!0};if(Array.isArray(t.build.rollupOptions.output))for(const r of t.build.rollupOptions.output)e(r);else e(t.build.rollupOptions.output)};function ty(t){var e,r;if(t){if("astNode"in t)return iy(t);if(Array.isArray(t))return t.reduce(Uc,void 0);{const n=t,i=ry(n)?ny((r=(e=n?.root)===null||e===void 0?void 0:e.astNode)!==null&&r!==void 0?r:n?.astNode):void 0;return $r(n,i)}}else return}function ry(t){return typeof t<"u"&&"element"in t&&"text"in t}function ny(t){try{return fu(t).uri.toString()}catch{return}}function iy(t){var e,r;const{astNode:n,property:i,index:o}=t??{},s=(e=n?.$cstNode)!==null&&e!==void 0?e:n?.$textRegion;if(!(n===void 0||s===void 0)){if(i===void 0)return $r(s,uo(n));{const a=c=>o!==void 0&&o>-1&&Array.isArray(n[i])?o<c.length?c[o]:void 0:c.reduce(Uc,void 0);if(!((r=s.assignments)===null||r===void 0)&&r[i]){const c=a(s.assignments[i]);return c&&$r(c,uo(n))}else if(n.$cstNode){const c=a(mm(n.$cstNode,i));return c&&$r(c,uo(n))}else return}}}function uo(t){var e,r,n,i;return t.$cstNode?(r=(e=fu(t))===null||e===void 0?void 0:e.uri)===null||r===void 0?void 0:r.toString():t.$textRegion?t.$textRegion.documentURI||((i=(n=new gm(t,o=>o.$container?[o.$container]:[]).find(o=>{var s;return(s=o.$textRegion)===null||s===void 0?void 0:s.documentURI}))===null||n===void 0?void 0:n.$textRegion)===null||i===void 0?void 0:i.documentURI):void 0}function $r(t,e){var r,n;const i={offset:t.offset,end:(r=t.end)!==null&&r!==void 0?r:t.offset+t.length,length:(n=t.length)!==null&&n!==void 0?n:t.end-t.offset};return t.range&&(i.range=t.range),e??(e=t.fileURI),e&&(i.fileURI=e),i}function Uc(t,e){var r,n;if(t){if(!e)return t&&$r(t)}else return e&&$r(e);const i=(r=t.end)!==null&&r!==void 0?r:t.offset+t.length,o=(n=e.end)!==null&&n!==void 0?n:e.offset+e.length,s=Math.min(t.offset,e.offset),a=Math.max(i,o),c=a-s,f={offset:s,end:a,length:c};if(t.range&&e.range&&(f.range={start:e.range.start.line<t.range.start.line||e.range.start.line===t.range.start.line&&e.range.start.character<t.range.start.character?e.range.start:t.range.start,end:e.range.end.line>t.range.end.line||e.range.end.line===t.range.end.line&&e.range.end.character>t.range.end.character?e.range.end:t.range.end}),t.fileURI||e.fileURI){const u=t.fileURI,h=e.fileURI,d=u&&h&&u!==h?`<unmergable text regions of ${u}, ${h}>`:u??h;f.fileURI=d}return f}class sy{constructor(e){this.defaultIndentation=" ",this.pendingIndent=!0,this.currentIndents=[],this.recentNonImmediateIndents=[],this.traceData=[],this.lines=[[]],this.length=0,typeof e=="string"?this.defaultIndentation=e:typeof e=="number"&&(this.defaultIndentation="".padStart(e))}get content(){return this.lines.map(e=>e.join("")).join("")}get contentLength(){return this.length}get currentLineNumber(){return this.lines.length-1}get currentLineContent(){return this.lines[this.currentLineNumber].join("")}get currentPosition(){return{offset:this.contentLength,line:this.currentLineNumber,character:this.currentLineContent.length}}append(e,r){if(e.length>0){const n=r&&this.currentPosition;this.lines[this.currentLineNumber].push(e),this.length+=e.length,n&&this.indentPendingTraceRegions(n)}}indentPendingTraceRegions(e){for(let r=this.traceData.length-1;r>=0;r--){const n=this.traceData[r];n.targetStart&&n.targetStart.offset===e.offset&&(n.targetStart=this.currentPosition)}}increaseIndent(e){this.currentIndents.push(e),e.indentImmediately||this.recentNonImmediateIndents.push(e)}decreaseIndent(){this.currentIndents.pop()}get relevantIndents(){return this.currentIndents.filter(e=>!this.recentNonImmediateIndents.includes(e))}resetCurrentLine(){this.length-=this.lines[this.currentLineNumber].join("").length,this.lines[this.currentLineNumber]=[],this.pendingIndent=!0}addNewLine(){this.pendingIndent=!0,this.lines.push([]),this.recentNonImmediateIndents.length=0}pushTraceRegion(e){const r=oy(e,this.currentPosition,n=>{var i,o;return(o=(i=this.traceData[this.traceData.length-1])===null||i===void 0?void 0:i.children)===null||o===void 0?void 0:o.push(n)});return this.traceData.push(r),r}popTraceRegion(e){const r=this.traceData.pop();return this.assertTrue(r===e,"Trace region mismatch!"),r}getParentTraceSourceFileURI(){var e;for(let r=this.traceData.length-1;r>-1;r--){const n=(e=this.traceData[r].sourceRegion)===null||e===void 0?void 0:e.fileURI;if(n)return n}}assertTrue(e,r){if(!e)throw new Error(r)}}function oy(t,e,r){const n={sourceRegion:t,targetRegion:void 0,children:[],targetStart:e,complete:i=>{var o,s;return n.targetRegion={offset:n.targetStart.offset,end:i.offset,length:i.offset-n.targetStart.offset,range:{start:{line:n.targetStart.line,character:n.targetStart.character},end:{line:i.line,character:i.character}}},delete n.targetStart,((o=n.children)===null||o===void 0?void 0:o.length)===0&&delete n.children,!((s=n.targetRegion)===null||s===void 0)&&s.length&&r(n),delete n.complete,n}};return n}function ay(t,e){const r=new sy(e),n=r.pushTraceRegion(void 0);Hc(t,r),r.popTraceRegion(n),n.complete&&n.complete(r.currentPosition);const i=n.children&&n.children.length===1?n.children[0]:void 0,o=i?.targetRegion,s=n.targetRegion;return o&&i.sourceRegion&&o.offset===s.offset&&o.length===s.length?{text:r.content,trace:i}:{text:r.content,trace:n}}function Hc(t,e){typeof t=="string"?uy(t,e):t instanceof lo?cy(t,e):t instanceof Ne?Gc(t,e):t instanceof en&&ly(t,e)}function Vc(t,e){return typeof t=="string"?t.length!==0:t instanceof Ne?t.contents.some(r=>Vc(r,e)):t instanceof en?!(t.ifNotEmpty&&e.currentLineContent.length===0):!1}function uy(t,e){t&&(e.pendingIndent&&zc(e,!1),e.append(t))}function zc(t,e){var r;let n="";for(const i of t.relevantIndents.filter(o=>o.indentEmptyLines||!e))n+=(r=i.indentation)!==null&&r!==void 0?r:t.defaultIndentation;t.append(n,!0),t.pendingIndent=!1}function Gc(t,e){let r;const n=ty(t.tracedSource);n&&(r=e.pushTraceRegion(n));for(const i of t.contents)Hc(i,e);if(r){e.popTraceRegion(r);const i=e.getParentTraceSourceFileURI();i&&n?.fileURI===i&&delete n.fileURI,r.complete&&r.complete(e.currentPosition)}}function cy(t,e){var r;if(Vc(t,e)){t.indentImmediately&&!e.pendingIndent&&e.append((r=t.indentation)!==null&&r!==void 0?r:e.defaultIndentation,!0);try{e.increaseIndent(t),Gc(t,e)}finally{e.decreaseIndent()}}}function ly(t,e){t.ifNotEmpty&&!fy(e.currentLineContent)?e.resetCurrentLine():(e.pendingIndent&&zc(e,!0),e.append(t.lineDelimiter),e.addNewLine())}function fy(t){return t.trimStart()!==""}Object.freeze("__\xABSKIP^NEW^LINE^IF^EMPTY\xBB__");const dy=/\S|$/;function hy(t){const e=t.filter(n=>n.length>0).map(n=>n.search(dy)),r=e.length===0?0:Math.min(...e);return Math.max(0,r)}function Bt(t,...e){const r=my(t),n=gy(t,e,r);return Ey(n)}function py(t,e,r){return(n,...i)=>_y(t,e,r)(Bt(n,...i))}function my(t){const e=t.join("_").split(du),r=e.length>1&&e[0].trim().length===0,n=r&&e.length>1&&e[e.length-1].trim().length===0;if(e.length===1||e.length!==0&&e[0].trim().length!==0||e.length===2&&e[1].trim().length===0)return{indentation:0,omitFirstLine:r,omitLastLine:n,trimLastLine:e.length!==1&&e[e.length-1].trim().length===0};{let i=r?e.slice(1):e;i=n?i.slice(0,i.length-1):i,i=i.filter(s=>s.length!==0);const o=hy(i);return{indentation:o,omitFirstLine:r,omitLastLine:n&&(e[e.length-1].length<o||!e[e.length-1].startsWith(i[0].substring(0,o)))}}}function gy(t,e,{indentation:r,omitFirstLine:n,omitLastLine:i,trimLastLine:o}){const s=[];t.forEach((f,u)=>{s.push(...f.split(du).map((h,d)=>d===0||h.length<r?h:h.substring(r)).reduce(u===0?(h,d,y)=>y===0?n?[]:[d]:y===1&&h.length===0?[d]:h.concat(Ln,d):(h,d,y)=>y===0?[d]:h.concat(Ln,d),[]).filter(h=>!(typeof h=="string"&&h.length===0)).concat(Zr(e[u])?e[u]:e[u]!==void 0?{content:String(e[u])}:u<e.length?Wc:[]))});const a=s.length,c=a!==0?s[a-1]:void 0;return(i||o)&&typeof c=="string"&&c.trim().length===0?n&&a!==1&&s[a-2]===Ln?s.slice(0,a-2):s.slice(0,a-1):s}const Ln={isNewLine:!0},Wc={isUndefinedSegment:!0},Kc=t=>t===Ln,co=t=>t===Wc,yy=t=>t.content!==void 0;function Ey(t){return t.reduce((r,n,i)=>co(n)?r:Kc(n)?{node:i!==0&&(co(t[i-1])||Zr(t[i-1]))||i>1&&typeof t[i-1]=="string"&&(co(t[i-2])||Zr(t[i-2]))?r.node.appendNewLineIfNotEmpty():r.node.appendNewLine()}:(()=>{var o;const s=(i===0||Kc(t[i-1]))&&typeof n=="string"&&n.length!==0?"".padStart(n.length-n.trimStart().length):"",a=yy(n)?n.content:n;let c;return{node:r.indented?r.node:s.length!==0?r.node.indent({indentation:s,indentImmediately:!1,indentedChildren:f=>c=f.append(a)}):r.node.append(a),indented:c??((o=r.indented)===null||o===void 0?void 0:o.append(a))}})(),{node:new Ne}).node}const vy=typeof process>"u"?`
250
+ `)}`),new Error("likec4 app root does not exist");return r}async function Is(){const t=await on(Rr(an(),".likec4-public-"));return await Kt(Rr(t,"likec4-views.js"),`// generated by likec4
251
+ `),t}const Fs=1e4;function Ps(){const t=Ku();return{"likec4/icons":De(t,"icons"),"likec4/react":De(t,"react"),"likec4/model":De(t,"dist/model")}}var Ns={},Yu;function Ts(){return Yu||(Yu=1,function(t){t.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,t.find=(e,r)=>e.nodes.find(n=>n.type===r),t.exceedsLimit=(e,r,n=1,i)=>i===!1||!t.isInteger(e)||!t.isInteger(r)?!1:(Number(r)-Number(e))/Number(n)>=i,t.escapeNode=(e,r=0,n)=>{const i=e.
252
+ nodes[r];i&&(n&&i.type===n||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)},t.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0),t.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,t.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,t.reduce=e=>e.reduce((r,n)=>(n.type==="text"&&r.push(n.value),n.type==="range"&&
253
+ (n.type="text"),r),[]),t.flatten=(...e)=>{const r=[],n=i=>{for(let s=0;s<i.length;s++){const o=i[s];if(Array.isArray(o)){n(o);continue}o!==void 0&&r.push(o)}return r};return n(e),r}}(Ns)),Ns}var Ls,Ju;function js(){if(Ju)return Ls;Ju=1;const t=Ts();return Ls=(e,r={})=>{const n=(i,s={})=>{const o=r.escapeInvalid&&t.isInvalidBrace(s),a=i.invalid===!0&&r.escapeInvalid===!0;let c="";if(i.value)return(o||a)&&t.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(const l of i.
254
+ nodes)c+=n(l);return c};return n(e)},Ls}var ks,Xu;function F0(){return Xu||(Xu=1,ks=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}),ks}var Bs,Qu;function P0(){if(Qu)return Bs;Qu=1;const t=F0(),e=(f,g,p)=>{if(t(f)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(g===void 0||f===g)return String(f);if(t(g)===!1)throw new TypeError("toRegexRange: expected the second argument t\
255
+ o be a number.");let m={relaxZeros:!0,...p};typeof m.strictZeros=="boolean"&&(m.relaxZeros=m.strictZeros===!1);let v=String(m.relaxZeros),$=String(m.shorthand),_=String(m.capture),b=String(m.wrap),I=f+":"+g+"="+v+$+_+b;if(e.cache.hasOwnProperty(I))return e.cache[I].result;let V=Math.min(f,g),G=Math.max(f,g);if(Math.abs(V-G)===1){let M=f+"|"+g;return m.capture?`(${M})`:m.wrap===!1?M:`(?:${M})`}let L=y(f)||y(g),B={min:f,max:g,a:V,b:G},N=[],j=[];if(L&&(B.isPadded=L,B.maxLen=String(B.max).length),V<
256
+ 0){let M=G<0?Math.abs(G):1;j=s(M,Math.abs(V),B,m),V=B.a=0}return G>=0&&(N=s(V,G,B,m)),B.negatives=j,B.positives=N,B.result=r(j,N),m.capture===!0?B.result=`(${B.result})`:m.wrap!==!1&&N.length+j.length>1&&(B.result=`(?:${B.result})`),e.cache[I]=B,B.result};function r(f,g,p){let m=o(f,g,"-",!1)||[],v=o(g,f,"",!1)||[],$=o(f,g,"-?",!0)||[];return m.concat($).concat(v).join("|")}function n(f,g){let p=1,m=1,v=u(f,p),$=new Set([g]);for(;f<=v&&v<=g;)$.add(v),p+=1,v=u(f,p);for(v=d(g+1,m)-1;f<v&&v<=g;)$.add(
257
+ v),m+=1,v=d(g+1,m)-1;return $=[...$],$.sort(c),$}function i(f,g,p){if(f===g)return{pattern:f,count:[],digits:0};let m=a(f,g),v=m.length,$="",_=0;for(let b=0;b<v;b++){let[I,V]=m[b];I===V?$+=I:I!=="0"||V!=="9"?$+=E(I,V):_++}return _&&($+=p.shorthand===!0?"\\d":"[0-9]"),{pattern:$,count:[_],digits:v}}function s(f,g,p,m){let v=n(f,g),$=[],_=f,b;for(let I=0;I<v.length;I++){let V=v[I],G=i(String(_),String(V),m),L="";if(!p.isPadded&&b&&b.pattern===G.pattern){b.count.length>1&&b.count.pop(),b.count.push(
258
+ G.count[0]),b.string=b.pattern+h(b.count),_=V+1;continue}p.isPadded&&(L=D(V,p,m)),G.string=L+G.pattern+h(G.count),$.push(G),_=V+1,b=G}return $}function o(f,g,p,m,v){let $=[];for(let _ of f){let{string:b}=_;!m&&!l(g,"string",b)&&$.push(p+b),m&&l(g,"string",b)&&$.push(p+b)}return $}function a(f,g){let p=[];for(let m=0;m<f.length;m++)p.push([f[m],g[m]]);return p}function c(f,g){return f>g?1:g>f?-1:0}function l(f,g,p){return f.some(m=>m[g]===p)}function u(f,g){return Number(String(f).slice(0,-g)+"9".
259
+ repeat(g))}function d(f,g){return f-f%Math.pow(10,g)}function h(f){let[g=0,p=""]=f;return p||g>1?`{${g+(p?","+p:"")}}`:""}function E(f,g,p){return`[${f}${g-f===1?"":"-"}${g}]`}function y(f){return/^-?(0+)\d/.test(f)}function D(f,g,p){if(!g.isPadded)return f;let m=Math.abs(g.maxLen-String(f).length),v=p.relaxZeros!==!1;switch(m){case 0:return"";case 1:return v?"0?":"0";case 2:return v?"0{0,2}":"00";default:return v?`0{0,${m}}`:`0{${m}}`}}return e.cache={},e.clearCache=()=>e.cache={},Bs=e,Bs}var xs,
260
+ Zu;function ec(){if(Zu)return xs;Zu=1;const t=Ka,e=P0(),r=m=>m!==null&&typeof m=="object"&&!Array.isArray(m),n=m=>v=>m===!0?Number(v):String(v),i=m=>typeof m=="number"||typeof m=="string"&&m!=="",s=m=>Number.isInteger(+m),o=m=>{let v=`${m}`,$=-1;if(v[0]==="-"&&(v=v.slice(1)),v==="0")return!1;for(;v[++$]==="0";);return $>0},a=(m,v,$)=>typeof m=="string"||typeof v=="string"?!0:$.stringify===!0,c=(m,v,$)=>{if(v>0){let _=m[0]==="-"?"-":"";_&&(m=m.slice(1)),m=_+m.padStart(_?v-1:v,"0")}return $===!1?String(
261
+ m):m},l=(m,v)=>{let $=m[0]==="-"?"-":"";for($&&(m=m.slice(1),v--);m.length<v;)m="0"+m;return $?"-"+m:m},u=(m,v,$)=>{m.negatives.sort((G,L)=>G<L?-1:G>L?1:0),m.positives.sort((G,L)=>G<L?-1:G>L?1:0);let _=v.capture?"":"?:",b="",I="",V;return m.positives.length&&(b=m.positives.map(G=>l(String(G),$)).join("|")),m.negatives.length&&(I=`-(${_}${m.negatives.map(G=>l(String(G),$)).join("|")})`),b&&I?V=`${b}|${I}`:V=b||I,v.wrap?`(${_}${V})`:V},d=(m,v,$,_)=>{if($)return e(m,v,{wrap:!1,..._});let b=String.fromCharCode(
262
+ m);if(m===v)return b;let I=String.fromCharCode(v);return`[${b}-${I}]`},h=(m,v,$)=>{if(Array.isArray(m)){let _=$.wrap===!0,b=$.capture?"":"?:";return _?`(${b}${m.join("|")})`:m.join("|")}return e(m,v,$)},E=(...m)=>new RangeError("Invalid range arguments: "+t.inspect(...m)),y=(m,v,$)=>{if($.strictRanges===!0)throw E([m,v]);return[]},D=(m,v)=>{if(v.strictRanges===!0)throw new TypeError(`Expected step "${m}" to be a number`);return[]},f=(m,v,$=1,_={})=>{let b=Number(m),I=Number(v);if(!Number.isInteger(
263
+ b)||!Number.isInteger(I)){if(_.strictRanges===!0)throw E([m,v]);return[]}b===0&&(b=0),I===0&&(I=0);let V=b>I,G=String(m),L=String(v),B=String($);$=Math.max(Math.abs($),1);let N=o(G)||o(L)||o(B),j=N?Math.max(G.length,L.length,B.length):0,M=N===!1&&a(m,v,_)===!1,Y=_.transform||n(M);if(_.toRegex&&$===1)return d(l(m,j),l(v,j),!0,_);let z={negatives:[],positives:[]},X=C=>z[C<0?"negatives":"positives"].push(Math.abs(C)),se=[],q=0;for(;V?b>=I:b<=I;)_.toRegex===!0&&$>1?X(b):se.push(c(Y(b,q),j,M)),b=V?b-
264
+ $:b+$,q++;return _.toRegex===!0?$>1?u(z,_,j):h(se,null,{wrap:!1,..._}):se},g=(m,v,$=1,_={})=>{if(!s(m)&&m.length>1||!s(v)&&v.length>1)return y(m,v,_);let b=_.transform||(M=>String.fromCharCode(M)),I=`${m}`.charCodeAt(0),V=`${v}`.charCodeAt(0),G=I>V,L=Math.min(I,V),B=Math.max(I,V);if(_.toRegex&&$===1)return d(L,B,!1,_);let N=[],j=0;for(;G?I>=V:I<=V;)N.push(b(I,j)),I=G?I-$:I+$,j++;return _.toRegex===!0?h(N,null,{wrap:!1,options:_}):N},p=(m,v,$,_={})=>{if(v==null&&i(m))return[m];if(!i(m)||!i(v))return y(
265
+ m,v,_);if(typeof $=="function")return p(m,v,1,{transform:$});if(r($))return p(m,v,0,$);let b={..._};return b.capture===!0&&(b.wrap=!0),$=$||b.step||1,s($)?s(m)&&s(v)?f(m,v,$,b):g(m,v,Math.max(Math.abs($),1),b):$!=null&&!r($)?D($,b):p(m,v,1,$)};return xs=p,xs}var Ms,tc;function N0(){if(tc)return Ms;tc=1;const t=ec(),e=Ts();return Ms=(n,i={})=>{const s=(o,a={})=>{const c=e.isInvalidBrace(a),l=o.invalid===!0&&i.escapeInvalid===!0,u=c===!0||l===!0,d=i.escapeInvalid===!0?"\\":"";let h="";if(o.isOpen===
266
+ !0)return d+o.value;if(o.isClose===!0)return console.log("node.isClose",d,o.value),d+o.value;if(o.type==="open")return u?d+o.value:"(";if(o.type==="close")return u?d+o.value:")";if(o.type==="comma")return o.prev.type==="comma"?"":u?o.value:"|";if(o.value)return o.value;if(o.nodes&&o.ranges>0){const E=e.reduce(o.nodes),y=t(...E,{...i,wrap:!1,toRegex:!0,strictZeros:!0});if(y.length!==0)return E.length>1&&y.length>1?`(${y})`:y}if(o.nodes)for(const E of o.nodes)h+=s(E,o);return h};return s(n)},Ms}var qs,
267
+ rc;function T0(){if(rc)return qs;rc=1;const t=ec(),e=js(),r=Ts(),n=(s="",o="",a=!1)=>{const c=[];if(s=[].concat(s),o=[].concat(o),!o.length)return s;if(!s.length)return a?r.flatten(o).map(l=>`{${l}}`):o;for(const l of s)if(Array.isArray(l))for(const u of l)c.push(n(u,o,a));else for(let u of o)a===!0&&typeof u=="string"&&(u=`{${u}}`),c.push(Array.isArray(u)?n(l,u,a):l+u);return r.flatten(c)};return qs=(s,o={})=>{const a=o.rangeLimit===void 0?1e3:o.rangeLimit,c=(l,u={})=>{l.queue=[];let d=u,h=u.queue;
268
+ for(;d.type!=="brace"&&d.type!=="root"&&d.parent;)d=d.parent,h=d.queue;if(l.invalid||l.dollar){h.push(n(h.pop(),e(l,o)));return}if(l.type==="brace"&&l.invalid!==!0&&l.nodes.length===2){h.push(n(h.pop(),["{}"]));return}if(l.nodes&&l.ranges>0){const f=r.reduce(l.nodes);if(r.exceedsLimit(...f,o.step,a))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let g=t(...f,o);g.length===0&&(g=e(l,o)),h.push(n(h.pop(),g)),l.nodes=[];return}
269
+ const E=r.encloseBrace(l);let y=l.queue,D=l;for(;D.type!=="brace"&&D.type!=="root"&&D.parent;)D=D.parent,y=D.queue;for(let f=0;f<l.nodes.length;f++){const g=l.nodes[f];if(g.type==="comma"&&l.type==="brace"){f===1&&y.push(""),y.push("");continue}if(g.type==="close"){h.push(n(h.pop(),y,E));continue}if(g.value&&g.type!=="open"){y.push(n(y.pop(),g.value));continue}g.nodes&&c(g,l)}return y};return r.flatten(c(s))},qs}var Us,nc;function L0(){return nc||(nc=1,Us={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"\
270
+ A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"\
271
+ {",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
272
+ `,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"}),Us}var Hs,ic;function j0(){if(ic)return Hs;ic=1;const t=js(),{MAX_LENGTH:e,CHAR_BACKSLASH:r,CHAR_BACKTICK:n,CHAR_COMMA:i,CHAR_DOT:s,CHAR_LEFT_PARENTHESES:o,CHAR_RIGHT_PARENTHESES:a,
273
+ CHAR_LEFT_CURLY_BRACE:c,CHAR_RIGHT_CURLY_BRACE:l,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_RIGHT_SQUARE_BRACKET:d,CHAR_DOUBLE_QUOTE:h,CHAR_SINGLE_QUOTE:E,CHAR_NO_BREAK_SPACE:y,CHAR_ZERO_WIDTH_NOBREAK_SPACE:D}=L0();return Hs=(g,p={})=>{if(typeof g!="string")throw new TypeError("Expected a string");const m=p||{},v=typeof m.maxLength=="number"?Math.min(e,m.maxLength):e;if(g.length>v)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${v})`);const $={type:"root",input:g,nodes:[]},_=[$];
274
+ let b=$,I=$,V=0;const G=g.length;let L=0,B=0,N;const j=()=>g[L++],M=Y=>{if(Y.type==="text"&&I.type==="dot"&&(I.type="text"),I&&I.type==="text"&&Y.type==="text"){I.value+=Y.value;return}return b.nodes.push(Y),Y.parent=b,Y.prev=I,I=Y,Y};for(M({type:"bos"});L<G;)if(b=_[_.length-1],N=j(),!(N===D||N===y)){if(N===r){M({type:"text",value:(p.keepEscaping?N:"")+j()});continue}if(N===d){M({type:"text",value:"\\"+N});continue}if(N===u){V++;let Y;for(;L<G&&(Y=j());){if(N+=Y,Y===u){V++;continue}if(Y===r){N+=
275
+ j();continue}if(Y===d&&(V--,V===0))break}M({type:"text",value:N});continue}if(N===o){b=M({type:"paren",nodes:[]}),_.push(b),M({type:"text",value:N});continue}if(N===a){if(b.type!=="paren"){M({type:"text",value:N});continue}b=_.pop(),M({type:"text",value:N}),b=_[_.length-1];continue}if(N===h||N===E||N===n){const Y=N;let z;for(p.keepQuotes!==!0&&(N="");L<G&&(z=j());){if(z===r){N+=z+j();continue}if(z===Y){p.keepQuotes===!0&&(N+=z);break}N+=z}M({type:"text",value:N});continue}if(N===c){B++;const z={
276
+ type:"brace",open:!0,close:!1,dollar:I.value&&I.value.slice(-1)==="$"||b.dollar===!0,depth:B,commas:0,ranges:0,nodes:[]};b=M(z),_.push(b),M({type:"open",value:N});continue}if(N===l){if(b.type!=="brace"){M({type:"text",value:N});continue}const Y="close";b=_.pop(),b.close=!0,M({type:Y,value:N}),B--,b=_[_.length-1];continue}if(N===i&&B>0){if(b.ranges>0){b.ranges=0;const Y=b.nodes.shift();b.nodes=[Y,{type:"text",value:t(b)}]}M({type:"comma",value:N}),b.commas++;continue}if(N===s&&B>0&&b.commas===0){
277
+ const Y=b.nodes;if(B===0||Y.length===0){M({type:"text",value:N});continue}if(I.type==="dot"){if(b.range=[],I.value+=N,I.type="range",b.nodes.length!==3&&b.nodes.length!==5){b.invalid=!0,b.ranges=0,I.type="text";continue}b.ranges++,b.args=[];continue}if(I.type==="range"){Y.pop();const z=Y[Y.length-1];z.value+=I.value+N,I=z,b.ranges--;continue}M({type:"dot",value:N});continue}M({type:"text",value:N})}do if(b=_.pop(),b.type!=="root"){b.nodes.forEach(X=>{X.nodes||(X.type==="open"&&(X.isOpen=!0),X.type===
278
+ "close"&&(X.isClose=!0),X.nodes||(X.type="text"),X.invalid=!0)});const Y=_[_.length-1],z=Y.nodes.indexOf(b);Y.nodes.splice(z,1,...b.nodes)}while(_.length>0);return M({type:"eos"}),$},Hs}var Vs,sc;function k0(){if(sc)return Vs;sc=1;const t=js(),e=N0(),r=T0(),n=j0(),i=(s,o={})=>{let a=[];if(Array.isArray(s))for(const c of s){const l=i.create(c,o);Array.isArray(l)?a.push(...l):a.push(l)}else a=[].concat(i.create(s,o));return o&&o.expand===!0&&o.nodupes===!0&&(a=[...new Set(a)]),a};return i.parse=(s,o={})=>n(
279
+ s,o),i.stringify=(s,o={})=>t(typeof s=="string"?i.parse(s,o):s,o),i.compile=(s,o={})=>(typeof s=="string"&&(s=i.parse(s,o)),e(s,o)),i.expand=(s,o={})=>{typeof s=="string"&&(s=i.parse(s,o));let a=r(s,o);return o.noempty===!0&&(a=a.filter(Boolean)),o.nodupes===!0&&(a=[...new Set(a)]),a},i.create=(s,o={})=>s===""||s.length<3?[s]:o.expand!==!0?i.compile(s,o):i.expand(s,o),Vs=i,Vs}var zs={},Gs,oc;function An(){if(oc)return Gs;oc=1;const t=es,e="\\\\/",r=`[^${e}]`,n="\\.",i="\\+",s="\\?",o="\\/",a="(?\
280
+ =.)",c="[^/]",l=`(?:${o}|$)`,u=`(?:^|${o})`,d=`${n}{1,2}${l}`,h=`(?!${n})`,E=`(?!${u}${d})`,y=`(?!${n}{0,1}${l})`,D=`(?!${d})`,f=`[^.${o}]`,g=`${c}*?`,p={DOT_LITERAL:n,PLUS_LITERAL:i,QMARK_LITERAL:s,SLASH_LITERAL:o,ONE_CHAR:a,QMARK:c,END_ANCHOR:l,DOTS_SLASH:d,NO_DOT:h,NO_DOTS:E,NO_DOT_SLASH:y,NO_DOTS_SLASH:D,QMARK_NO_DOT:f,STAR:g,START_ANCHOR:u},m={...p,SLASH_LITERAL:`[${e}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,
281
+ NO_DOT_SLASH:`(?!${n}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`},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 Gs={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:v,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,
282
+ 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,
283
+ 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,
284
+ CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:t.sep,extglobChars($){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?m:p}},Gs}var ac;function Cn(){return ac||(ac=1,function(t){const e=es,r=process.
285
+ platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:o}=An();t.isObject=a=>a!==null&&typeof a=="object"&&!Array.isArray(a),t.hasRegexChars=a=>s.test(a),t.isRegexChar=a=>a.length===1&&t.hasRegexChars(a),t.escapeRegex=a=>a.replace(o,"\\$1"),t.toPosixSlashes=a=>a.replace(n,"/"),t.removeBackslashes=a=>a.replace(i,c=>c==="\\"?"":c),t.supportsLookbehinds=()=>{const a=process.version.slice(1).split(".").map(Number);return a.length===3&&a[0]>=9||
286
+ a[0]===8&&a[1]>=10},t.isWindows=a=>a&&typeof a.windows=="boolean"?a.windows:r===!0||e.sep==="\\",t.escapeLast=(a,c,l)=>{const u=a.lastIndexOf(c,l);return u===-1?a:a[u-1]==="\\"?t.escapeLast(a,c,u-1):`${a.slice(0,u)}\\${a.slice(u)}`},t.removePrefix=(a,c={})=>{let l=a;return l.startsWith("./")&&(l=l.slice(2),c.prefix="./"),l},t.wrapOutput=(a,c={},l={})=>{const u=l.contains?"":"^",d=l.contains?"":"$";let h=`${u}(?:${a})${d}`;return c.negated===!0&&(h=`(?:^(?!${h}).*$)`),h}}(zs)),zs}var Ws,uc;function B0(){
287
+ if(uc)return Ws;uc=1;const t=Cn(),{CHAR_ASTERISK:e,CHAR_AT:r,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:i,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:l,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:d,CHAR_QUESTION_MARK:h,CHAR_RIGHT_CURLY_BRACE:E,CHAR_RIGHT_PARENTHESES:y,CHAR_RIGHT_SQUARE_BRACKET:D}=An(),f=m=>m===a||m===n,g=m=>{m.isPrefix!==!0&&(m.depth=m.isGlobstar?1/0:1)};return Ws=(m,v)=>{const $=v||{},_=m.length-1,b=$.parts===!0||$.scanToEnd===!0,I=[],V=[],
288
+ G=[];let L=m,B=-1,N=0,j=0,M=!1,Y=!1,z=!1,X=!1,se=!1,q=!1,C=!1,U=!1,k=!1,w=!1,A=0,R,J,Z={value:"",depth:0,isGlob:!1};const oe=()=>B>=_,ae=()=>L.charCodeAt(B+1),T=()=>(R=J,L.charCodeAt(++B));for(;B<_;){J=T();let P;if(J===n){C=Z.backslashes=!0,J=T(),J===c&&(q=!0);continue}if(q===!0||J===c){for(A++;oe()!==!0&&(J=T());){if(J===n){C=Z.backslashes=!0,T();continue}if(J===c){A++;continue}if(q!==!0&&J===s&&(J=T())===s){if(M=Z.isBrace=!0,z=Z.isGlob=!0,w=!0,b===!0)continue;break}if(q!==!0&&J===i){if(M=Z.isBrace=
289
+ !0,z=Z.isGlob=!0,w=!0,b===!0)continue;break}if(J===E&&(A--,A===0)){q=!1,M=Z.isBrace=!0,w=!0;break}}if(b===!0)continue;break}if(J===a){if(I.push(B),V.push(Z),Z={value:"",depth:0,isGlob:!1},w===!0)continue;if(R===s&&B===N+1){N+=2;continue}j=B+1;continue}if($.noext!==!0&&(J===d||J===r||J===e||J===h||J===o)===!0&&ae()===l){if(z=Z.isGlob=!0,X=Z.isExtglob=!0,w=!0,J===o&&B===N&&(k=!0),b===!0){for(;oe()!==!0&&(J=T());){if(J===n){C=Z.backslashes=!0,J=T();continue}if(J===y){z=Z.isGlob=!0,w=!0;break}}continue}
290
+ break}if(J===e){if(R===e&&(se=Z.isGlobstar=!0),z=Z.isGlob=!0,w=!0,b===!0)continue;break}if(J===h){if(z=Z.isGlob=!0,w=!0,b===!0)continue;break}if(J===u){for(;oe()!==!0&&(P=T());){if(P===n){C=Z.backslashes=!0,T();continue}if(P===D){Y=Z.isBracket=!0,z=Z.isGlob=!0,w=!0;break}}if(b===!0)continue;break}if($.nonegate!==!0&&J===o&&B===N){U=Z.negated=!0,N++;continue}if($.noparen!==!0&&J===l){if(z=Z.isGlob=!0,b===!0){for(;oe()!==!0&&(J=T());){if(J===l){C=Z.backslashes=!0,J=T();continue}if(J===y){w=!0;break}}
291
+ continue}break}if(z===!0){if(w=!0,b===!0)continue;break}}$.noext===!0&&(X=!1,z=!1);let x=L,Q="",ie="";N>0&&(Q=L.slice(0,N),L=L.slice(N),j-=N),x&&z===!0&&j>0?(x=L.slice(0,j),ie=L.slice(j)):z===!0?(x="",ie=L):x=L,x&&x!==""&&x!=="/"&&x!==L&&f(x.charCodeAt(x.length-1))&&(x=x.slice(0,-1)),$.unescape===!0&&(ie&&(ie=t.removeBackslashes(ie)),x&&C===!0&&(x=t.removeBackslashes(x)));const O={prefix:Q,input:m,start:N,base:x,glob:ie,isBrace:M,isBracket:Y,isGlob:z,isExtglob:X,isGlobstar:se,negated:U,negatedExtglob:k};
292
+ if($.tokens===!0&&(O.maxDepth=0,f(J)||V.push(Z),O.tokens=V),$.parts===!0||$.tokens===!0){let P;for(let ee=0;ee<I.length;ee++){const W=P?P+1:N,F=I[ee],re=m.slice(W,F);$.tokens&&(ee===0&&N!==0?(V[ee].isPrefix=!0,V[ee].value=Q):V[ee].value=re,g(V[ee]),O.maxDepth+=V[ee].depth),(ee!==0||re!=="")&&G.push(re),P=F}if(P&&P+1<m.length){const ee=m.slice(P+1);G.push(ee),$.tokens&&(V[V.length-1].value=ee,g(V[V.length-1]),O.maxDepth+=V[V.length-1].depth)}O.slashes=I,O.parts=G}return O},Ws}var Ks,cc;function x0(){
293
+ if(cc)return Ks;cc=1;const t=An(),e=Cn(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:o}=t,a=(u,d)=>{if(typeof d.expandRange=="function")return d.expandRange(...u,d);u.sort();const h=`[${u.join("-")}]`;try{new RegExp(h)}catch{return u.map(y=>e.escapeRegex(y)).join("..")}return h},c=(u,d)=>`Missing ${u}: "${d}" - use "\\\\${d}" to match literal characters`,l=(u,d)=>{if(typeof u!="string")throw new TypeError("Expected a string");u=o[u]||u;
294
+ const h={...d},E=typeof h.maxLength=="number"?Math.min(r,h.maxLength):r;let y=u.length;if(y>E)throw new SyntaxError(`Input length: ${y}, exceeds maximum allowed length: ${E}`);const D={type:"bos",value:"",output:h.prepend||""},f=[D],g=h.capture?"":"?:",p=e.isWindows(d),m=t.globChars(p),v=t.extglobChars(m),{DOT_LITERAL:$,PLUS_LITERAL:_,SLASH_LITERAL:b,ONE_CHAR:I,DOTS_SLASH:V,NO_DOT:G,NO_DOT_SLASH:L,NO_DOTS_SLASH:B,QMARK:N,QMARK_NO_DOT:j,STAR:M,START_ANCHOR:Y}=m,z=F=>`(${g}(?:(?!${Y}${F.dot?V:$}).\
295
+ )*?)`,X=h.dot?"":G,se=h.dot?N:j;let q=h.bash===!0?z(h):M;h.capture&&(q=`(${q})`),typeof h.noext=="boolean"&&(h.noextglob=h.noext);const C={input:u,index:-1,start:0,dot:h.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:f};u=e.removePrefix(u,C),y=u.length;const U=[],k=[],w=[];let A=D,R;const J=()=>C.index===y-1,Z=C.peek=(F=1)=>u[C.index+F],oe=C.advance=()=>u[++C.index]||"",ae=()=>u.slice(C.index+1),T=(F="",re=0)=>{C.consumed+=
296
+ F,C.index+=re},x=F=>{C.output+=F.output!=null?F.output:F.value,T(F.value)},Q=()=>{let F=1;for(;Z()==="!"&&(Z(2)!=="("||Z(3)==="?");)oe(),C.start++,F++;return F%2===0?!1:(C.negated=!0,C.start++,!0)},ie=F=>{C[F]++,w.push(F)},O=F=>{C[F]--,w.pop()},P=F=>{if(A.type==="globstar"){const re=C.braces>0&&(F.type==="comma"||F.type==="brace"),H=F.extglob===!0||U.length&&(F.type==="pipe"||F.type==="paren");F.type!=="slash"&&F.type!=="paren"&&!re&&!H&&(C.output=C.output.slice(0,-A.output.length),A.type="star",
297
+ A.value="*",A.output=q,C.output+=A.output)}if(U.length&&F.type!=="paren"&&(U[U.length-1].inner+=F.value),(F.value||F.output)&&x(F),A&&A.type==="text"&&F.type==="text"){A.value+=F.value,A.output=(A.output||"")+F.value;return}F.prev=A,f.push(F),A=F},ee=(F,re)=>{const H={...v[re],conditions:1,inner:""};H.prev=A,H.parens=C.parens,H.output=C.output;const ne=(h.capture?"(":"")+H.open;ie("parens"),P({type:F,value:re,output:C.output?"":I}),P({type:"paren",extglob:!0,value:oe(),output:ne}),U.push(H)},W=F=>{
298
+ let re=F.close+(h.capture?")":""),H;if(F.type==="negate"){let ne=q;if(F.inner&&F.inner.length>1&&F.inner.includes("/")&&(ne=z(h)),(ne!==q||J()||/^\)+$/.test(ae()))&&(re=F.close=`)$))${ne}`),F.inner.includes("*")&&(H=ae())&&/^\.[^\\/.]+$/.test(H)){const fe=l(H,{...d,fastpaths:!1}).output;re=F.close=`)${fe})${ne})`}F.prev.type==="bos"&&(C.negatedExtglob=!0)}P({type:"paren",extglob:!0,value:R,output:re}),O("parens")};if(h.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(u)){let F=!1,re=u.replace(s,(H,ne,fe,we,Oe,Et)=>we===
299
+ "\\"?(F=!0,H):we==="?"?ne?ne+we+(Oe?N.repeat(Oe.length):""):Et===0?se+(Oe?N.repeat(Oe.length):""):N.repeat(fe.length):we==="."?$.repeat(fe.length):we==="*"?ne?ne+we+(Oe?q:""):q:ne?H:`\\${H}`);return F===!0&&(h.unescape===!0?re=re.replace(/\\/g,""):re=re.replace(/\\+/g,H=>H.length%2===0?"\\\\":H?"\\":"")),re===u&&h.contains===!0?(C.output=u,C):(C.output=e.wrapOutput(re,C,d),C)}for(;!J();){if(R=oe(),R==="\0")continue;if(R==="\\"){const H=Z();if(H==="/"&&h.bash!==!0||H==="."||H===";")continue;if(!H){
300
+ R+="\\",P({type:"text",value:R});continue}const ne=/^\\+/.exec(ae());let fe=0;if(ne&&ne[0].length>2&&(fe=ne[0].length,C.index+=fe,fe%2!==0&&(R+="\\")),h.unescape===!0?R=oe():R+=oe(),C.brackets===0){P({type:"text",value:R});continue}}if(C.brackets>0&&(R!=="]"||A.value==="["||A.value==="[^")){if(h.posix!==!1&&R===":"){const H=A.value.slice(1);if(H.includes("[")&&(A.posix=!0,H.includes(":"))){const ne=A.value.lastIndexOf("["),fe=A.value.slice(0,ne),we=A.value.slice(ne+2),Oe=n[we];if(Oe){A.value=fe+
301
+ Oe,C.backtrack=!0,oe(),!D.output&&f.indexOf(A)===1&&(D.output=I);continue}}}(R==="["&&Z()!==":"||R==="-"&&Z()==="]")&&(R=`\\${R}`),R==="]"&&(A.value==="["||A.value==="[^")&&(R=`\\${R}`),h.posix===!0&&R==="!"&&A.value==="["&&(R="^"),A.value+=R,x({value:R});continue}if(C.quotes===1&&R!=='"'){R=e.escapeRegex(R),A.value+=R,x({value:R});continue}if(R==='"'){C.quotes=C.quotes===1?0:1,h.keepQuotes===!0&&P({type:"text",value:R});continue}if(R==="("){ie("parens"),P({type:"paren",value:R});continue}if(R===
302
+ ")"){if(C.parens===0&&h.strictBrackets===!0)throw new SyntaxError(c("opening","("));const H=U[U.length-1];if(H&&C.parens===H.parens+1){W(U.pop());continue}P({type:"paren",value:R,output:C.parens?")":"\\)"}),O("parens");continue}if(R==="["){if(h.nobracket===!0||!ae().includes("]")){if(h.nobracket!==!0&&h.strictBrackets===!0)throw new SyntaxError(c("closing","]"));R=`\\${R}`}else ie("brackets");P({type:"bracket",value:R});continue}if(R==="]"){if(h.nobracket===!0||A&&A.type==="bracket"&&A.value.length===
303
+ 1){P({type:"text",value:R,output:`\\${R}`});continue}if(C.brackets===0){if(h.strictBrackets===!0)throw new SyntaxError(c("opening","["));P({type:"text",value:R,output:`\\${R}`});continue}O("brackets");const H=A.value.slice(1);if(A.posix!==!0&&H[0]==="^"&&!H.includes("/")&&(R=`/${R}`),A.value+=R,x({value:R}),h.literalBrackets===!1||e.hasRegexChars(H))continue;const ne=e.escapeRegex(A.value);if(C.output=C.output.slice(0,-A.value.length),h.literalBrackets===!0){C.output+=ne,A.value=ne;continue}A.value=
304
+ `(${g}${ne}|${A.value})`,C.output+=A.value;continue}if(R==="{"&&h.nobrace!==!0){ie("braces");const H={type:"brace",value:R,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};k.push(H),P(H);continue}if(R==="}"){const H=k[k.length-1];if(h.nobrace===!0||!H){P({type:"text",value:R,output:R});continue}let ne=")";if(H.dots===!0){const fe=f.slice(),we=[];for(let Oe=fe.length-1;Oe>=0&&(f.pop(),fe[Oe].type!=="brace");Oe--)fe[Oe].type!=="dots"&&we.unshift(fe[Oe].value);ne=a(we,h),C.backtrack=
305
+ !0}if(H.comma!==!0&&H.dots!==!0){const fe=C.output.slice(0,H.outputIndex),we=C.tokens.slice(H.tokensIndex);H.value=H.output="\\{",R=ne="\\}",C.output=fe;for(const Oe of we)C.output+=Oe.output||Oe.value}P({type:"brace",value:R,output:ne}),O("braces"),k.pop();continue}if(R==="|"){U.length>0&&U[U.length-1].conditions++,P({type:"text",value:R});continue}if(R===","){let H=R;const ne=k[k.length-1];ne&&w[w.length-1]==="braces"&&(ne.comma=!0,H="|"),P({type:"comma",value:R,output:H});continue}if(R==="/"){
306
+ if(A.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",f.pop(),A=D;continue}P({type:"slash",value:R,output:b});continue}if(R==="."){if(C.braces>0&&A.type==="dot"){A.value==="."&&(A.output=$);const H=k[k.length-1];A.type="dots",A.output+=R,A.value+=R,H.dots=!0;continue}if(C.braces+C.parens===0&&A.type!=="bos"&&A.type!=="slash"){P({type:"text",value:R,output:$});continue}P({type:"dot",value:R,output:$});continue}if(R==="?"){if(!(A&&A.value==="(")&&h.noextglob!==!0&&Z()===
307
+ "("&&Z(2)!=="?"){ee("qmark",R);continue}if(A&&A.type==="paren"){const ne=Z();let fe=R;if(ne==="<"&&!e.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(A.value==="("&&!/[!=<:]/.test(ne)||ne==="<"&&!/<([!=]|\w+>)/.test(ae()))&&(fe=`\\${R}`),P({type:"text",value:R,output:fe});continue}if(h.dot!==!0&&(A.type==="slash"||A.type==="bos")){P({type:"qmark",value:R,output:j});continue}P({type:"qmark",value:R,output:N});continue}if(R==="!"){if(h.noextglob!==
308
+ !0&&Z()==="("&&(Z(2)!=="?"||!/[!=<:]/.test(Z(3)))){ee("negate",R);continue}if(h.nonegate!==!0&&C.index===0){Q();continue}}if(R==="+"){if(h.noextglob!==!0&&Z()==="("&&Z(2)!=="?"){ee("plus",R);continue}if(A&&A.value==="("||h.regex===!1){P({type:"plus",value:R,output:_});continue}if(A&&(A.type==="bracket"||A.type==="paren"||A.type==="brace")||C.parens>0){P({type:"plus",value:R});continue}P({type:"plus",value:_});continue}if(R==="@"){if(h.noextglob!==!0&&Z()==="("&&Z(2)!=="?"){P({type:"at",extglob:!0,
309
+ value:R,output:""});continue}P({type:"text",value:R});continue}if(R!=="*"){(R==="$"||R==="^")&&(R=`\\${R}`);const H=i.exec(ae());H&&(R+=H[0],C.index+=H[0].length),P({type:"text",value:R});continue}if(A&&(A.type==="globstar"||A.star===!0)){A.type="star",A.star=!0,A.value+=R,A.output=q,C.backtrack=!0,C.globstar=!0,T(R);continue}let F=ae();if(h.noextglob!==!0&&/^\([^?]/.test(F)){ee("star",R);continue}if(A.type==="star"){if(h.noglobstar===!0){T(R);continue}const H=A.prev,ne=H.prev,fe=H.type==="slash"||
310
+ H.type==="bos",we=ne&&(ne.type==="star"||ne.type==="globstar");if(h.bash===!0&&(!fe||F[0]&&F[0]!=="/")){P({type:"star",value:R,output:""});continue}const Oe=C.braces>0&&(H.type==="comma"||H.type==="brace"),Et=U.length&&(H.type==="pipe"||H.type==="paren");if(!fe&&H.type!=="paren"&&!Oe&&!Et){P({type:"star",value:R,output:""});continue}for(;F.slice(0,3)==="/**";){const Ft=u[C.index+4];if(Ft&&Ft!=="/")break;F=F.slice(3),T("/**",3)}if(H.type==="bos"&&J()){A.type="globstar",A.value+=R,A.output=z(h),C.
311
+ output=A.output,C.globstar=!0,T(R);continue}if(H.type==="slash"&&H.prev.type!=="bos"&&!we&&J()){C.output=C.output.slice(0,-(H.output+A.output).length),H.output=`(?:${H.output}`,A.type="globstar",A.output=z(h)+(h.strictSlashes?")":"|$)"),A.value+=R,C.globstar=!0,C.output+=H.output+A.output,T(R);continue}if(H.type==="slash"&&H.prev.type!=="bos"&&F[0]==="/"){const Ft=F[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(H.output+A.output).length),H.output=`(?:${H.output}`,A.type="globstar",A.output=`${z(
312
+ h)}${b}|${b}${Ft})`,A.value+=R,C.output+=H.output+A.output,C.globstar=!0,T(R+oe()),P({type:"slash",value:"/",output:""});continue}if(H.type==="bos"&&F[0]==="/"){A.type="globstar",A.value+=R,A.output=`(?:^|${b}|${z(h)}${b})`,C.output=A.output,C.globstar=!0,T(R+oe()),P({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-A.output.length),A.type="globstar",A.output=z(h),A.value+=R,C.output+=A.output,C.globstar=!0,T(R);continue}const re={type:"star",value:R,output:q};if(h.bash===!0){
313
+ re.output=".*?",(A.type==="bos"||A.type==="slash")&&(re.output=X+re.output),P(re);continue}if(A&&(A.type==="bracket"||A.type==="paren")&&h.regex===!0){re.output=R,P(re);continue}(C.index===C.start||A.type==="slash"||A.type==="dot")&&(A.type==="dot"?(C.output+=L,A.output+=L):h.dot===!0?(C.output+=B,A.output+=B):(C.output+=X,A.output+=X),Z()!=="*"&&(C.output+=I,A.output+=I)),P(re)}for(;C.brackets>0;){if(h.strictBrackets===!0)throw new SyntaxError(c("closing","]"));C.output=e.escapeLast(C.output,"["),
314
+ O("brackets")}for(;C.parens>0;){if(h.strictBrackets===!0)throw new SyntaxError(c("closing",")"));C.output=e.escapeLast(C.output,"("),O("parens")}for(;C.braces>0;){if(h.strictBrackets===!0)throw new SyntaxError(c("closing","}"));C.output=e.escapeLast(C.output,"{"),O("braces")}if(h.strictSlashes!==!0&&(A.type==="star"||A.type==="bracket")&&P({type:"maybe_slash",value:"",output:`${b}?`}),C.backtrack===!0){C.output="";for(const F of C.tokens)C.output+=F.output!=null?F.output:F.value,F.suffix&&(C.output+=
315
+ F.suffix)}return C};return l.fastpaths=(u,d)=>{const h={...d},E=typeof h.maxLength=="number"?Math.min(r,h.maxLength):r,y=u.length;if(y>E)throw new SyntaxError(`Input length: ${y}, exceeds maximum allowed length: ${E}`);u=o[u]||u;const D=e.isWindows(d),{DOT_LITERAL:f,SLASH_LITERAL:g,ONE_CHAR:p,DOTS_SLASH:m,NO_DOT:v,NO_DOTS:$,NO_DOTS_SLASH:_,STAR:b,START_ANCHOR:I}=t.globChars(D),V=h.dot?$:v,G=h.dot?_:v,L=h.capture?"":"?:",B={negated:!1,prefix:""};let N=h.bash===!0?".*?":b;h.capture&&(N=`(${N})`);const j=X=>X.
316
+ noglobstar===!0?N:`(${L}(?:(?!${I}${X.dot?m:f}).)*?)`,M=X=>{switch(X){case"*":return`${V}${p}${N}`;case".*":return`${f}${p}${N}`;case"*.*":return`${V}${N}${f}${p}${N}`;case"*/*":return`${V}${N}${g}${p}${G}${N}`;case"**":return V+j(h);case"**/*":return`(?:${V}${j(h)}${g})?${G}${p}${N}`;case"**/*.*":return`(?:${V}${j(h)}${g})?${G}${N}${f}${p}${N}`;case"**/.*":return`(?:${V}${j(h)}${g})?${f}${p}${N}`;default:{const se=/^(.*?)\.(\w+)$/.exec(X);if(!se)return;const q=M(se[1]);return q?q+f+se[2]:void 0}}},
317
+ Y=e.removePrefix(u,B);let z=M(Y);return z&&h.strictSlashes!==!0&&(z+=`${g}?`),z},Ks=l,Ks}var Ys,lc;function M0(){if(lc)return Ys;lc=1;const t=es,e=B0(),r=x0(),n=Cn(),i=An(),s=a=>a&&typeof a=="object"&&!Array.isArray(a),o=(a,c,l=!1)=>{if(Array.isArray(a)){const g=a.map(m=>o(m,c,l));return m=>{for(const v of g){const $=v(m);if($)return $}return!1}}const u=s(a)&&a.tokens&&a.input;if(a===""||typeof a!="string"&&!u)throw new TypeError("Expected pattern to be a non-empty string");const d=c||{},h=n.isWindows(
318
+ c),E=u?o.compileRe(a,c):o.makeRe(a,c,!1,!0),y=E.state;delete E.state;let D=()=>!1;if(d.ignore){const g={...c,ignore:null,onMatch:null,onResult:null};D=o(d.ignore,g,l)}const f=(g,p=!1)=>{const{isMatch:m,match:v,output:$}=o.test(g,E,c,{glob:a,posix:h}),_={glob:a,state:y,regex:E,posix:h,input:g,output:$,match:v,isMatch:m};return typeof d.onResult=="function"&&d.onResult(_),m===!1?(_.isMatch=!1,p?_:!1):D(g)?(typeof d.onIgnore=="function"&&d.onIgnore(_),_.isMatch=!1,p?_:!1):(typeof d.onMatch=="functi\
319
+ on"&&d.onMatch(_),p?_:!0)};return l&&(f.state=y),f};return o.test=(a,c,l,{glob:u,posix:d}={})=>{if(typeof a!="string")throw new TypeError("Expected input to be a string");if(a==="")return{isMatch:!1,output:""};const h=l||{},E=h.format||(d?n.toPosixSlashes:null);let y=a===u,D=y&&E?E(a):a;return y===!1&&(D=E?E(a):a,y=D===u),(y===!1||h.capture===!0)&&(h.matchBase===!0||h.basename===!0?y=o.matchBase(a,c,l,d):y=c.exec(D)),{isMatch:!!y,match:y,output:D}},o.matchBase=(a,c,l,u=n.isWindows(l))=>(c instanceof
320
+ RegExp?c:o.makeRe(c,l)).test(t.basename(a)),o.isMatch=(a,c,l)=>o(c,l)(a),o.parse=(a,c)=>Array.isArray(a)?a.map(l=>o.parse(l,c)):r(a,{...c,fastpaths:!1}),o.scan=(a,c)=>e(a,c),o.compileRe=(a,c,l=!1,u=!1)=>{if(l===!0)return a.output;const d=c||{},h=d.contains?"":"^",E=d.contains?"":"$";let y=`${h}(?:${a.output})${E}`;a&&a.negated===!0&&(y=`^(?!${y}).*$`);const D=o.toRegex(y,c);return u===!0&&(D.state=a),D},o.makeRe=(a,c={},l=!1,u=!1)=>{if(!a||typeof a!="string")throw new TypeError("Expected a non-e\
321
+ mpty string");let d={negated:!1,fastpaths:!0};return c.fastpaths!==!1&&(a[0]==="."||a[0]==="*")&&(d.output=r.fastpaths(a,c)),d.output||(d=r(a,c)),o.compileRe(d,c,l,u)},o.toRegex=(a,c)=>{try{const l=c||{};return new RegExp(a,l.flags||(l.nocase?"i":""))}catch(l){if(c&&c.debug===!0)throw l;return/$^/}},o.constants=i,Ys=o,Ys}var Js,fc;function q0(){return fc||(fc=1,Js=M0()),Js}var Xs,dc;function U0(){if(dc)return Xs;dc=1;const t=Ka,e=k0(),r=q0(),n=Cn(),i=a=>a===""||a==="./",s=a=>{const c=a.indexOf("\
322
+ {");return c>-1&&a.indexOf("}",c)>-1},o=(a,c,l)=>{c=[].concat(c),a=[].concat(a);let u=new Set,d=new Set,h=new Set,E=0,y=g=>{h.add(g.output),l&&l.onResult&&l.onResult(g)};for(let g=0;g<c.length;g++){let p=r(String(c[g]),{...l,onResult:y},!0),m=p.state.negated||p.state.negatedExtglob;m&&E++;for(let v of a){let $=p(v,!0);(m?!$.isMatch:$.isMatch)&&(m?u.add($.output):(u.delete($.output),d.add($.output)))}}let f=(E===c.length?[...h]:[...d]).filter(g=>!u.has(g));if(l&&f.length===0){if(l.failglob===!0)throw new Error(
323
+ `No matches found for "${c.join(", ")}"`);if(l.nonull===!0||l.nullglob===!0)return l.unescape?c.map(g=>g.replace(/\\/g,"")):c}return f};return o.match=o,o.matcher=(a,c)=>r(a,c),o.isMatch=(a,c,l)=>r(c,l)(a),o.any=o.isMatch,o.not=(a,c,l={})=>{c=[].concat(c).map(String);let u=new Set,d=[],h=y=>{l.onResult&&l.onResult(y),d.push(y.output)},E=new Set(o(a,c,{...l,onResult:h}));for(let y of d)E.has(y)||u.add(y);return[...u]},o.contains=(a,c,l)=>{if(typeof a!="string")throw new TypeError(`Expected a stri\
324
+ ng: "${t.inspect(a)}"`);if(Array.isArray(c))return c.some(u=>o.contains(a,u,l));if(typeof c=="string"){if(i(a)||i(c))return!1;if(a.includes(c)||a.startsWith("./")&&a.slice(2).includes(c))return!0}return o.isMatch(a,c,{...l,contains:!0})},o.matchKeys=(a,c,l)=>{if(!n.isObject(a))throw new TypeError("Expected the first argument to be an object");let u=o(Object.keys(a),c,l),d={};for(let h of u)d[h]=a[h];return d},o.some=(a,c,l)=>{let u=[].concat(a);for(let d of[].concat(c)){let h=r(String(d),l);if(u.
325
+ some(E=>h(E)))return!0}return!1},o.every=(a,c,l)=>{let u=[].concat(a);for(let d of[].concat(c)){let h=r(String(d),l);if(!u.every(E=>h(E)))return!1}return!0},o.all=(a,c,l)=>{if(typeof a!="string")throw new TypeError(`Expected a string: "${t.inspect(a)}"`);return[].concat(c).every(u=>r(u,l)(a))},o.capture=(a,c,l)=>{let u=n.isWindows(l),h=r.makeRe(String(a),{...l,capture:!0}).exec(u?n.toPosixSlashes(c):c);if(h)return h.slice(1).map(E=>E===void 0?"":E)},o.makeRe=(...a)=>r.makeRe(...a),o.scan=(...a)=>r.
326
+ scan(...a),o.parse=(a,c)=>{let l=[];for(let u of[].concat(a||[]))for(let d of e(String(u),c))l.push(r.parse(d,c));return l},o.braces=(a,c)=>{if(typeof a!="string")throw new TypeError("Expected a string");return c&&c.nobrace===!0||!s(a)?[a]:e(a,c)},o.braceExpand=(a,c)=>{if(typeof a!="string")throw new TypeError("Expected a string");return o.braces(a,{...c,expand:!0})},o.hasBraces=s,Xs=o,Xs}var H0=U0();const hc=Ji(H0),V0={useRecommendedBuildConfig:!0,removeViteModuleLoader:!1,deleteInlinedFiles:!0};
327
+ function z0(t,e,r,n=!1){const i=new RegExp(`<script([^>]*?) src="[./]*${e}"([^>]*)></script>`),s=/"?__VITE_PRELOAD__"?/g,o=r.replace(s,"void 0").replace(/<(\/script>|!--)/g,"\\x3C$1"),a=t.replace(i,(c,l,u)=>`<script${l}${u}>${o.trim()}</script>`);return n?X0(a):a}function G0(t,e,r){const n=new RegExp(`<link([^>]*?) href="[./]*${e}"([^>]*?)>`),i=r.replace('@charset "UTF-8";',"");return t.replace(n,(o,a,c)=>`<style${a}${c}>${i.trim()}</style>`)}const W0=/\.[mc]?js$/,K0=/\.css$/,Y0=/\.html?$/;function J0({
328
+ useRecommendedBuildConfig:t=!0,removeViteModuleLoader:e=!1,inlinePattern:r=[],deleteInlinedFiles:n=!0}=V0){function i(s){console.debug(`NOTE: asset not inlined: ${s}`)}return{name:"vite:singlefile",config:t?Q0:void 0,enforce:"post",generateBundle:(s,o)=>{console.debug(`
329
+ `);const a={html:[],css:[],js:[],other:[]};for(const l of Object.keys(o))Y0.test(l)?a.html.push(l):K0.test(l)?a.css.push(l):W0.test(l)?a.js.push(l):a.other.push(l);const c=[];for(const l of a.html){const u=o[l];let d=u.source;for(const h of a.js){if(r.length&&!hc.isMatch(h,r)){i(h);continue}const E=o[h];E.code!=null&&(console.debug(`Inlining: ${h}`),c.push(h),d=z0(d,E.fileName,E.code,e))}for(const h of a.css){if(r.length&&!hc.isMatch(h,r)){i(h);continue}const E=o[h];console.debug(`Inlining: ${h}`),
330
+ c.push(h),d=G0(d,E.fileName,E.source)}u.source=d}if(n)for(const l of c)delete o[l];for(const l of a.other)i(l)}}}const X0=t=>t.replace(/(<script type="module" crossorigin>\s*)\(function(?: polyfill)?\(\)\s*\{[\s\S]*?\}\)\(\);/,'<script type="module">'),Q0=t=>{t.build||(t.build={}),t.build.assetsInlineLimit=()=>!0,t.build.chunkSizeWarningLimit=1e8,t.build.cssCodeSplit=!1,t.base="./",t.build.assetsDir="",t.build.rollupOptions||(t.build.rollupOptions={}),t.build.rollupOptions.output||(t.build.rollupOptions.
331
+ output={});const e=r=>{r.inlineDynamicImports=!0};if(Array.isArray(t.build.rollupOptions.output))for(const r of t.build.rollupOptions.output)e(r);else e(t.build.rollupOptions.output)};function Z0(t){var e,r;if(t){if("astNode"in t)return rg(t);if(Array.isArray(t))return t.reduce(pc,void 0);{const n=t,i=eg(n)?tg((r=(e=n?.root)===null||e===void 0?void 0:e.astNode)!==null&&r!==void 0?r:n?.astNode):void 0;return yr(n,i)}}else return}function eg(t){return typeof t<"u"&&"element"in t&&"text"in t}function tg(t){
332
+ try{return xa(t).uri.toString()}catch{return}}function rg(t){var e,r;const{astNode:n,property:i,index:s}=t??{},o=(e=n?.$cstNode)!==null&&e!==void 0?e:n?.$textRegion;if(!(n===void 0||o===void 0)){if(i===void 0)return yr(o,Qs(n));{const a=c=>s!==void 0&&s>-1&&Array.isArray(n[i])?s<c.length?c[s]:void 0:c.reduce(pc,void 0);if(!((r=o.assignments)===null||r===void 0)&&r[i]){const c=a(o.assignments[i]);return c&&yr(c,Qs(n))}else if(n.$cstNode){const c=a(yp(n.$cstNode,i));return c&&yr(c,Qs(n))}else return}}}
333
+ function Qs(t){var e,r,n,i;return t.$cstNode?(r=(e=xa(t))===null||e===void 0?void 0:e.uri)===null||r===void 0?void 0:r.toString():t.$textRegion?t.$textRegion.documentURI||((i=(n=new Ep(t,s=>s.$container?[s.$container]:[]).find(s=>{var o;return(o=s.$textRegion)===null||o===void 0?void 0:o.documentURI}))===null||n===void 0?void 0:n.$textRegion)===null||i===void 0?void 0:i.documentURI):void 0}function yr(t,e){var r,n;const i={offset:t.offset,end:(r=t.end)!==null&&r!==void 0?r:t.offset+t.length,length:(n=
334
+ t.length)!==null&&n!==void 0?n:t.end-t.offset};return t.range&&(i.range=t.range),e??(e=t.fileURI),e&&(i.fileURI=e),i}function pc(t,e){var r,n;if(t){if(!e)return t&&yr(t)}else return e&&yr(e);const i=(r=t.end)!==null&&r!==void 0?r:t.offset+t.length,s=(n=e.end)!==null&&n!==void 0?n:e.offset+e.length,o=Math.min(t.offset,e.offset),a=Math.max(i,s),c=a-o,l={offset:o,end:a,length:c};if(t.range&&e.range&&(l.range={start:e.range.start.line<t.range.start.line||e.range.start.line===t.range.start.line&&e.range.
335
+ start.character<t.range.start.character?e.range.start:t.range.start,end:e.range.end.line>t.range.end.line||e.range.end.line===t.range.end.line&&e.range.end.character>t.range.end.character?e.range.end:t.range.end}),t.fileURI||e.fileURI){const u=t.fileURI,d=e.fileURI,h=u&&d&&u!==d?`<unmergable text regions of ${u}, ${d}>`:u??d;l.fileURI=h}return l}class ng{constructor(e){this.defaultIndentation=" ",this.pendingIndent=!0,this.currentIndents=[],this.recentNonImmediateIndents=[],this.traceData=[],
336
+ this.lines=[[]],this.length=0,typeof e=="string"?this.defaultIndentation=e:typeof e=="number"&&(this.defaultIndentation="".padStart(e))}get content(){return this.lines.map(e=>e.join("")).join("")}get contentLength(){return this.length}get currentLineNumber(){return this.lines.length-1}get currentLineContent(){return this.lines[this.currentLineNumber].join("")}get currentPosition(){return{offset:this.contentLength,line:this.currentLineNumber,character:this.currentLineContent.length}}append(e,r){if(e.
337
+ length>0){const n=r&&this.currentPosition;this.lines[this.currentLineNumber].push(e),this.length+=e.length,n&&this.indentPendingTraceRegions(n)}}indentPendingTraceRegions(e){for(let r=this.traceData.length-1;r>=0;r--){const n=this.traceData[r];n.targetStart&&n.targetStart.offset===e.offset&&(n.targetStart=this.currentPosition)}}increaseIndent(e){this.currentIndents.push(e),e.indentImmediately||this.recentNonImmediateIndents.push(e)}decreaseIndent(){this.currentIndents.pop()}get relevantIndents(){
338
+ return this.currentIndents.filter(e=>!this.recentNonImmediateIndents.includes(e))}resetCurrentLine(){this.length-=this.lines[this.currentLineNumber].join("").length,this.lines[this.currentLineNumber]=[],this.pendingIndent=!0}addNewLine(){this.pendingIndent=!0,this.lines.push([]),this.recentNonImmediateIndents.length=0}pushTraceRegion(e){const r=ig(e,this.currentPosition,n=>{var i,s;return(s=(i=this.traceData[this.traceData.length-1])===null||i===void 0?void 0:i.children)===null||s===void 0?void 0:
339
+ s.push(n)});return this.traceData.push(r),r}popTraceRegion(e){const r=this.traceData.pop();return this.assertTrue(r===e,"Trace region mismatch!"),r}getParentTraceSourceFileURI(){var e;for(let r=this.traceData.length-1;r>-1;r--){const n=(e=this.traceData[r].sourceRegion)===null||e===void 0?void 0:e.fileURI;if(n)return n}}assertTrue(e,r){if(!e)throw new Error(r)}}function ig(t,e,r){const n={sourceRegion:t,targetRegion:void 0,children:[],targetStart:e,complete:i=>{var s,o;return n.targetRegion={offset:n.
340
+ targetStart.offset,end:i.offset,length:i.offset-n.targetStart.offset,range:{start:{line:n.targetStart.line,character:n.targetStart.character},end:{line:i.line,character:i.character}}},delete n.targetStart,((s=n.children)===null||s===void 0?void 0:s.length)===0&&delete n.children,!((o=n.targetRegion)===null||o===void 0)&&o.length&&r(n),delete n.complete,n}};return n}function sg(t,e){const r=new ng(e),n=r.pushTraceRegion(void 0);mc(t,r),r.popTraceRegion(n),n.complete&&n.complete(r.currentPosition);
341
+ const i=n.children&&n.children.length===1?n.children[0]:void 0,s=i?.targetRegion,o=n.targetRegion;return s&&i.sourceRegion&&s.offset===o.offset&&s.length===o.length?{text:r.content,trace:i}:{text:r.content,trace:n}}function mc(t,e){typeof t=="string"?og(t,e):t instanceof eo?ag(t,e):t instanceof Ne?Ec(t,e):t instanceof Gr&&ug(t,e)}function gc(t,e){return typeof t=="string"?t.length!==0:t instanceof Ne?t.contents.some(r=>gc(r,e)):t instanceof Gr?!(t.ifNotEmpty&&e.currentLineContent.length===0):!1}
342
+ function og(t,e){t&&(e.pendingIndent&&yc(e,!1),e.append(t))}function yc(t,e){var r;let n="";for(const i of t.relevantIndents.filter(s=>s.indentEmptyLines||!e))n+=(r=i.indentation)!==null&&r!==void 0?r:t.defaultIndentation;t.append(n,!0),t.pendingIndent=!1}function Ec(t,e){let r;const n=Z0(t.tracedSource);n&&(r=e.pushTraceRegion(n));for(const i of t.contents)mc(i,e);if(r){e.popTraceRegion(r);const i=e.getParentTraceSourceFileURI();i&&n?.fileURI===i&&delete n.fileURI,r.complete&&r.complete(e.currentPosition)}}
343
+ function ag(t,e){var r;if(gc(t,e)){t.indentImmediately&&!e.pendingIndent&&e.append((r=t.indentation)!==null&&r!==void 0?r:e.defaultIndentation,!0);try{e.increaseIndent(t),Ec(t,e)}finally{e.decreaseIndent()}}}function ug(t,e){t.ifNotEmpty&&!cg(e.currentLineContent)?e.resetCurrentLine():(e.pendingIndent&&yc(e,!0),e.append(t.lineDelimiter),e.addNewLine())}function cg(t){return t.trimStart()!==""}Object.freeze("__\xABSKIP^NEW^LINE^IF^EMPTY\xBB__");const lg=/\S|$/;function fg(t){const e=t.filter(n=>n.
344
+ length>0).map(n=>n.search(lg)),r=e.length===0?0:Math.min(...e);return Math.max(0,r)}function kt(t,...e){const r=hg(t),n=pg(t,e,r);return gg(n)}function dg(t,e,r){return(n,...i)=>Eg(t,e,r)(kt(n,...i))}function hg(t){const e=t.join("_").split(Ma),r=e.length>1&&e[0].trim().length===0,n=r&&e.length>1&&e[e.length-1].trim().length===0;if(e.length===1||e.length!==0&&e[0].trim().length!==0||e.length===2&&e[1].trim().length===0)return{indentation:0,omitFirstLine:r,omitLastLine:n,trimLastLine:e.length!==1&&
345
+ e[e.length-1].trim().length===0};{let i=r?e.slice(1):e;i=n?i.slice(0,i.length-1):i,i=i.filter(o=>o.length!==0);const s=fg(i);return{indentation:s,omitFirstLine:r,omitLastLine:n&&(e[e.length-1].length<s||!e[e.length-1].startsWith(i[0].substring(0,s)))}}}function pg(t,e,{indentation:r,omitFirstLine:n,omitLastLine:i,trimLastLine:s}){const o=[];t.forEach((l,u)=>{o.push(...l.split(Ma).map((d,h)=>h===0||d.length<r?d:d.substring(r)).reduce(u===0?(d,h,E)=>E===0?n?[]:[h]:E===1&&d.length===0?[h]:d.concat(
346
+ Sn,h):(d,h,E)=>E===0?[h]:d.concat(Sn,h),[]).filter(d=>!(typeof d=="string"&&d.length===0)).concat(zr(e[u])?e[u]:e[u]!==void 0?{content:String(e[u])}:u<e.length?Dc:[]))});const a=o.length,c=a!==0?o[a-1]:void 0;return(i||s)&&typeof c=="string"&&c.trim().length===0?n&&a!==1&&o[a-2]===Sn?o.slice(0,a-2):o.slice(0,a-1):o}const Sn={isNewLine:!0},Dc={isUndefinedSegment:!0},vc=t=>t===Sn,Zs=t=>t===Dc,mg=t=>t.content!==void 0;function gg(t){return t.reduce((r,n,i)=>Zs(n)?r:vc(n)?{node:i!==0&&(Zs(t[i-1])||zr(
347
+ t[i-1]))||i>1&&typeof t[i-1]=="string"&&(Zs(t[i-2])||zr(t[i-2]))?r.node.appendNewLineIfNotEmpty():r.node.appendNewLine()}:(()=>{var s;const o=(i===0||vc(t[i-1]))&&typeof n=="string"&&n.length!==0?"".padStart(n.length-n.trimStart().length):"",a=mg(n)?n.content:n;let c;return{node:r.indented?r.node:o.length!==0?r.node.indent({indentation:o,indentImmediately:!1,indentedChildren:l=>c=l.append(a)}):r.node.append(a),indented:c??((s=r.indented)===null||s===void 0?void 0:s.append(a))}})(),{node:new Ne}).
348
+ node}const yg=typeof process>"u"?`
83
349
  `:process.platform==="win32"?`\r
84
350
  `:`
85
- `;function Zr(t){return t instanceof Ne||t instanceof lo||t instanceof en}function kt(t,e){return Zr(t)?ay(t,e).text:String(t)}class Ne{constructor(...e){this.contents=[],this.append(...e)}isEmpty(){return this.contents.length===0}trace(e,r,n){if(ym(e)){if(this.tracedSource={astNode:e,property:r,index:n},this.tracedSource.property===void 0&&this.tracedSource.index!==void 0&&this.tracedSource.index>-1)throw new Error("Generation support: 'property' argument must not be 'undefined' if a non-negative value is assigned to 'index' in 'CompositeGeneratorNode.trace(...)'.")}else this.tracedSource=e;return this}append(...e){for(const r of e)typeof r=="function"?r(this):r&&this.contents.push(r);return this}appendIf(e,...r){return e?this.append(...r):this}appendNewLine(){return this.append(_e)}appendNewLineIf(e){return e?this.append(_e):this}appendNewLineIfNotEmpty(){return this.append(wy)}appendNewLineIfNotEmptyIf(e){return e?this.appendNewLineIfNotEmpty():this}appendTemplate(e,...r){return this.append(Bt(e,...r))}appendTemplateIf(e){return e?(r,...n)=>this.appendTemplate(r,...n):()=>this}indent(e){const{indentedChildren:r,indentation:n,indentEmptyLines:i,indentImmediately:o}=Array.isArray(e)||typeof e=="function"?{indentedChildren:e}:typeof e=="object"?e:{},s=new lo(n,o,i);return this.contents.push(s),Array.isArray(r)?s.append(...r):r&&s.append(r),this}appendTraced(e,r,n){return i=>this.append(new Ne().trace(e,r,n).append(i))}appendTracedIf(e,r,n,i){return e?this.appendTraced(typeof r=="function"?r():r,n,i):()=>this}appendTracedTemplate(e,r,n){return(i,...o)=>this.append(py(e,r,n)(i,...o))}appendTracedTemplateIf(e,r,n,i){return e?this.appendTracedTemplate(typeof r=="function"?r():r,n,i):()=>this}}function _y(t,e,r){return n=>n instanceof Ne&&n.tracedSource===void 0?n.trace(t,e,r):new Ne().trace(t,e,r).append(n)}class lo extends Ne{constructor(e,r=!0,n=!1){super(),this.indentImmediately=!0,this.indentEmptyLines=!1,typeof e=="string"?this.indentation=e:typeof e=="number"&&(this.indentation="".padStart(e)),this.indentImmediately=r,this.indentEmptyLines=n}}class en{constructor(e,r=!1){this.ifNotEmpty=!1,this.lineDelimiter=e??vy,this.ifNotEmpty=r}}const _e=new en,wy=new en(void 0,!0),Yc=t=>t===void 0||typeof t=="string"||Zr(t)?t:String(t);function nt(t,e=Yc,r={}){const n=typeof e=="function"?e:Yc,{filter:i,prefix:o,suffix:s,separator:a,appendNewLineIfNotEmpty:c,skipNewLineAfterLastItem:f}=typeof e=="object"?e:r,u=typeof o=="function"?o:()=>o,h=typeof s=="function"?s:()=>s;return Dy(t,(d,y,E,v)=>{if(i&&!i(y,E,v))return d;const l=n(y,E,v);return l===void 0?d:(d??(d=new Ne)).append(u(y,E,v)).append(l).append(h(y,E,v)).appendIf(!v,a).appendNewLineIfNotEmptyIf(!d.isEmpty()&&!!c&&(!v||!f))})}function Dy(t,e,r){const n=t[Symbol.iterator]();let i=n.next(),o=0,s=r;for(;!i.done;){const a=n.next();s=e(s,i.value,o,!!a.done),i=a,o++}return s}var $y=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,by=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,Ay=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,fo={Space_Separator:$y,ID_Start:by,ID_Continue:Ay},Pe={isSpaceSeparator(t){return typeof t=="string"&&fo.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||fo.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||fo.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}};let ho,He,bt,xn,Mt,ct,Be,po,tn;var Cy=function(e,r){ho=String(e),He="start",bt=[],xn=0,Mt=1,ct=0,Be=void 0,po=void 0,tn=void 0;do Be=Sy(),Fy[He]();while(Be.type!=="eof");return typeof r=="function"?mo({"":tn},"",r):tn};function mo(t,e,r){const n=t[e];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let i=0;i<n.length;i++){const o=String(i),s=mo(n,o,r);s===void 0?delete n[o]:Object.defineProperty(n,o,{value:s,writable:!0,enumerable:!0,configurable:!0})}else for(const i in n){const o=mo(n,i,r);o===void 0?delete n[i]:Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}return r.call(t,e,n)}let ye,me,rn,At,we;function Sy(){for(ye="default",me="",rn=!1,At=1;;){we=Ct();const t=Jc[ye]();if(t)return t}}function Ct(){if(ho[xn])return String.fromCodePoint(ho.codePointAt(xn))}function re(){const t=Ct();return t===`
86
- `?(Mt++,ct=0):t?ct+=t.length:ct++,t&&(xn+=t.length),t}const Jc={default(){switch(we){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
87
- `:case"\r":case"\u2028":case"\u2029":re();return;case"/":re(),ye="comment";return;case void 0:return re(),Ce("eof")}if(Pe.isSpaceSeparator(we)){re();return}return Jc[He]()},comment(){switch(we){case"*":re(),ye="multiLineComment";return;case"/":re(),ye="singleLineComment";return}throw Se(re())},multiLineComment(){switch(we){case"*":re(),ye="multiLineCommentAsterisk";return;case void 0:throw Se(re())}re()},multiLineCommentAsterisk(){switch(we){case"*":re();return;case"/":re(),ye="default";return;case void 0:throw Se(re())}re(),ye="multiLineComment"},singleLineComment(){switch(we){case`
88
- `:case"\r":case"\u2028":case"\u2029":re(),ye="default";return;case void 0:return re(),Ce("eof")}re()},value(){switch(we){case"{":case"[":return Ce("punctuator",re());case"n":return re(),ar("ull"),Ce("null",null);case"t":return re(),ar("rue"),Ce("boolean",!0);case"f":return re(),ar("alse"),Ce("boolean",!1);case"-":case"+":re()==="-"&&(At=-1),ye="sign";return;case".":me=re(),ye="decimalPointLeading";return;case"0":me=re(),ye="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":me=re(),ye="decimalInteger";return;case"I":return re(),ar("nfinity"),Ce("numeric",1/0);case"N":return re(),ar("aN"),Ce("numeric",NaN);case'"':case"'":rn=re()==='"',me="",ye="string";return}throw Se(re())},identifierNameStartEscape(){if(we!=="u")throw Se(re());re();const t=go();switch(t){case"$":case"_":break;default:if(!Pe.isIdStartChar(t))throw Xc();break}me+=t,ye="identifierName"},identifierName(){switch(we){case"$":case"_":case"\u200C":case"\u200D":me+=re();return;case"\\":re(),ye="identifierNameEscape";return}if(Pe.isIdContinueChar(we)){me+=re();return}return Ce("identifier",me)},identifierNameEscape(){if(we!=="u")throw Se(re());re();const t=go();switch(t){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!Pe.isIdContinueChar(t))throw Xc();break}me+=t,ye="identifierName"},sign(){switch(we){case".":me=re(),ye="decimalPointLeading";return;case"0":me=re(),ye="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":me=re(),ye="decimalInteger";return;case"I":return re(),ar("nfinity"),Ce("numeric",At*(1/0));case"N":return re(),ar("aN"),Ce("numeric",NaN)}throw Se(re())},zero(){switch(we){case".":me+=re(),ye="decimalPoint";return;case"e":case"E":me+=re(),ye="decimalExponent";return;case"x":case"X":me+=re(),ye="hexadecimal";return}return Ce("numeric",At*0)},decimalInteger(){switch(we){case".":me+=re(),ye="decimalPoint";return;case"e":case"E":me+=re(),ye="decimalExponent";return}if(Pe.isDigit(we)){me+=re();return}return Ce("numeric",At*Number(me))},decimalPointLeading(){if(Pe.isDigit(we)){me+=re(),ye="decimalFraction";return}throw Se(re())},decimalPoint(){switch(we){case"e":case"E":me+=re(),ye="decimalExponent";return}if(Pe.isDigit(we)){me+=re(),ye="decimalFraction";return}return Ce("numeric",At*Number(me))},decimalFraction(){switch(we){case"e":case"E":me+=re(),ye="decimalExponent";return}if(Pe.isDigit(we)){me+=re();return}return Ce("numeric",At*Number(me))},decimalExponent(){switch(we){case"+":case"-":me+=re(),ye="decimalExponentSign";return}if(Pe.isDigit(we)){me+=re(),ye="decimalExponentInteger";return}throw Se(re())},decimalExponentSign(){if(Pe.isDigit(we)){me+=re(),ye="decimalExponentInteger";return}throw Se(re())},decimalExponentInteger(){if(Pe.isDigit(we)){me+=re();return}return Ce("numeric",At*Number(me))},hexadecimal(){if(Pe.isHexDigit(we)){me+=re(),ye="hexadecimalInteger";return}throw Se(re())},hexadecimalInteger(){if(Pe.isHexDigit(we)){me+=re();return}return Ce("numeric",At*Number(me))},string(){switch(we){case"\\":re(),me+=Ry();return;case'"':if(rn)return re(),Ce("string",me);me+=re();return;case"'":if(!rn)return re(),Ce("string",me);me+=re();return;case`
89
- `:case"\r":throw Se(re());case"\u2028":case"\u2029":Iy(we);break;case void 0:throw Se(re())}me+=re()},start(){switch(we){case"{":case"[":return Ce("punctuator",re())}ye="value"},beforePropertyName(){switch(we){case"$":case"_":me=re(),ye="identifierName";return;case"\\":re(),ye="identifierNameStartEscape";return;case"}":return Ce("punctuator",re());case'"':case"'":rn=re()==='"',ye="string";return}if(Pe.isIdStartChar(we)){me+=re(),ye="identifierName";return}throw Se(re())},afterPropertyName(){if(we===":")return Ce("punctuator",re());throw Se(re())},beforePropertyValue(){ye="value"},afterPropertyValue(){switch(we){case",":case"}":return Ce("punctuator",re())}throw Se(re())},beforeArrayValue(){if(we==="]")return Ce("punctuator",re());ye="value"},afterArrayValue(){switch(we){case",":case"]":return Ce("punctuator",re())}throw Se(re())},end(){throw Se(re())}};function Ce(t,e){return{type:t,value:e,line:Mt,column:ct}}function ar(t){for(const e of t){if(Ct()!==e)throw Se(re());re()}}function Ry(){switch(Ct()){case"b":return re(),"\b";case"f":return re(),"\f";case"n":return re(),`
90
- `;case"r":return re(),"\r";case"t":return re()," ";case"v":return re(),"\v";case"0":if(re(),Pe.isDigit(Ct()))throw Se(re());return"\0";case"x":return re(),Oy();case"u":return re(),go();case`
91
- `:case"\u2028":case"\u2029":return re(),"";case"\r":return re(),Ct()===`
92
- `&&re(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Se(re());case void 0:throw Se(re())}return re()}function Oy(){let t="",e=Ct();if(!Pe.isHexDigit(e)||(t+=re(),e=Ct(),!Pe.isHexDigit(e)))throw Se(re());return t+=re(),String.fromCodePoint(parseInt(t,16))}function go(){let t="",e=4;for(;e-- >0;){const r=Ct();if(!Pe.isHexDigit(r))throw Se(re());t+=re()}return String.fromCodePoint(parseInt(t,16))}const Fy={start(){if(Be.type==="eof")throw ur();yo()},beforePropertyName(){switch(Be.type){case"identifier":case"string":po=Be.value,He="afterPropertyName";return;case"punctuator":Bn();return;case"eof":throw ur()}},afterPropertyName(){if(Be.type==="eof")throw ur();He="beforePropertyValue"},beforePropertyValue(){if(Be.type==="eof")throw ur();yo()},beforeArrayValue(){if(Be.type==="eof")throw ur();if(Be.type==="punctuator"&&Be.value==="]"){Bn();return}yo()},afterPropertyValue(){if(Be.type==="eof")throw ur();switch(Be.value){case",":He="beforePropertyName";return;case"}":Bn()}},afterArrayValue(){if(Be.type==="eof")throw ur();switch(Be.value){case",":He="beforeArrayValue";return;case"]":Bn()}},end(){}};function yo(){let t;switch(Be.type){case"punctuator":switch(Be.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=Be.value;break}if(tn===void 0)tn=t;else{const e=bt[bt.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,po,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")bt.push(t),Array.isArray(t)?He="beforeArrayValue":He="beforePropertyName";else{const e=bt[bt.length-1];e==null?He="end":Array.isArray(e)?He="afterArrayValue":He="afterPropertyValue"}}function Bn(){bt.pop();const t=bt[bt.length-1];t==null?He="end":Array.isArray(t)?He="afterArrayValue":He="afterPropertyValue"}function Se(t){return kn(t===void 0?`JSON5: invalid end of input at ${Mt}:${ct}`:`JSON5: invalid character '${Qc(t)}' at ${Mt}:${ct}`)}function ur(){return kn(`JSON5: invalid end of input at ${Mt}:${ct}`)}function Xc(){return ct-=5,kn(`JSON5: invalid identifier character at ${Mt}:${ct}`)}function Iy(t){console.warn(`JSON5: '${Qc(t)}' in strings is not valid ECMAScript; consider escaping`)}function Qc(t){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){const r=t.charCodeAt(0).toString(16);return"\\x"+("00"+r).substring(r.length)}return t}function kn(t){const e=new SyntaxError(t);return e.lineNumber=Mt,e.columnNumber=ct,e}var Py=function(e,r,n){const i=[];let o="",s,a,c="",f;if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&(n=r.space,f=r.quote,r=r.replacer),typeof r=="function")a=r;else if(Array.isArray(r)){s=[];for(const v of r){let l;typeof v=="string"?l=v:(typeof v=="number"||v instanceof String||v instanceof Number)&&(l=String(v)),l!==void 0&&s.indexOf(l)<0&&s.push(l)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),c=" ".substr(0,n)):typeof n=="string"&&(c=n.substr(0,10)),u("",{"":e});function u(v,l){let m=l[v];switch(m!=null&&(typeof m.toJSON5=="function"?m=m.toJSON5(v):typeof m.toJSON=="function"&&(m=m.toJSON(v))),a&&(m=a.call(l,v,m)),m instanceof Number?m=Number(m):m instanceof String?m=String(m):m instanceof Boolean&&(m=m.valueOf()),m){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof m=="string")return h(m);if(typeof m=="number")return String(m);if(typeof m=="object")return Array.isArray(m)?E(m):d(m)}function h(v){const l={"'":.1,'"':.2},m={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let p="";for(let _=0;_<v.length;_++){const w=v[_];switch(w){case"'":case'"':l[w]++,p+=w;continue;case"\0":if(Pe.isDigit(v[_+1])){p+="\\x00";continue}}if(m[w]){p+=m[w];continue}if(w<" "){let D=w.charCodeAt(0).toString(16);p+="\\x"+("00"+D).substring(D.length);continue}p+=w}const g=f||Object.keys(l).reduce((_,w)=>l[_]<l[w]?_:w);return p=p.replace(new RegExp(g,"g"),m[g]),g+p+g}function d(v){if(i.indexOf(v)>=0)throw TypeError("Converting circular structure to JSON5");i.push(v);let l=o;o=o+c;let m=s||Object.keys(v),p=[];for(const _ of m){const w=u(_,v);if(w!==void 0){let D=y(_)+":";c!==""&&(D+=" "),D+=w,p.push(D)}}let g;if(p.length===0)g="{}";else{let _;if(c==="")_=p.join(","),g="{"+_+"}";else{let w=`,
93
- `+o;_=p.join(w),g=`{
94
- `+o+_+`,
95
- `+l+"}"}}return i.pop(),o=l,g}function y(v){if(v.length===0)return h(v);const l=String.fromCodePoint(v.codePointAt(0));if(!Pe.isIdStartChar(l))return h(v);for(let m=l.length;m<v.length;m++)if(!Pe.isIdContinueChar(String.fromCodePoint(v.codePointAt(m))))return h(v);return v}function E(v){if(i.indexOf(v)>=0)throw TypeError("Converting circular structure to JSON5");i.push(v);let l=o;o=o+c;let m=[];for(let g=0;g<v.length;g++){const _=u(String(g),v);m.push(_!==void 0?_:"null")}let p;if(m.length===0)p="[]";else if(c==="")p="["+m.join(",")+"]";else{let g=`,
96
- `+o,_=m.join(g);p=`[
97
- `+o+_+`,
98
- `+l+"]"}return i.pop(),o=l,p}};const Ny={parse:Cy,stringify:Py};var St=Ny;const Ty=t=>t.charAt(0).toLocaleUpperCase()+t.slice(1),jy=t=>t.split(".").map(Ty).join(""),Ly=t=>jy(t.parent?t.id.slice(t.parent.length+1):t.id),xy=({autoLayout:t})=>{switch(t.direction){case"TB":return"down";case"BT":return"up";case"LR":return"right";case"RL":return"left"}},By=({shape:t})=>{switch(t){case"queue":case"cylinder":case"rectangle":case"person":return t;case"storage":return"stored_data";case"mobile":case"browser":return"rectangle"}};function Zc(t){const{nodes:e,edges:r}=t,n=new Map,i=(s,a)=>{const c=Ly(s),f=(a?a+".":"")+c;n.set(s.id,f);const u=JSON.stringify(s.title),h=By(s);return new Ne().append(c,": {",_e).indent({indentedChildren:d=>d.append("label: ",u,_e).appendIf(h!=="rectangle","shape: ",h,_e).appendIf(s.children.length>0,_e,nt(e.filter(y=>y.parent===s.id),y=>i(y,f))),indentation:2}).append("}",_e)},o=s=>new Ne().append(n.get(s.source)," -> ",n.get(s.target)).append(a=>s.label&&a.append(": ",JSON.stringify(s.label)));return kt(new Ne().append("direction: ",xy(t),_e,_e).append(nt(e.filter(s=>os(s.parent)),s=>i(s),{appendNewLineIfNotEmpty:!0})).appendIf(r.length>0,_e,nt(r,s=>o(s),{appendNewLineIfNotEmpty:!0})))}const ky=t=>t.charAt(0).toLocaleUpperCase()+t.slice(1),My=t=>t.split(".").map(ky).join(""),qy=t=>My(t.parent?t.id.slice(t.parent.length+1):t.id),Uy=({shape:t})=>{switch(t){case"queue":case"cylinder":return["[(",")]"];case"person":return["[fa:fa-user ","]"];case"storage":return["([","])"];case"mobile":case"browser":case"rectangle":return["[","]"]}};function el(t){const{nodes:e,edges:r}=t,n=new Map,i=(s,a)=>{const c=qy(s),f=(a?a+".":"")+c;n.set(s.id,f);const u=s.title.replaceAll(`
99
- `,"\\n"),h=Uy(s),d=new Ne;return s.children.length>0?d.append("subgraph ",f,"[",JSON.stringify(s.title),"]",_e).indent({indentedChildren:[nt(e.filter(y=>y.parent===s.id),y=>i(y,f),{appendNewLineIfNotEmpty:!0})],indentation:2}).append("end",_e):d.append(f,h[0],u,h[1]),d},o=s=>new Ne().append(n.get(s.source)," -.",s.label?' "'+s.label.replaceAll(`
100
- `,"\\n")+'" .-':"-","> ",n.get(s.target));return kt(new Ne().appendIf(t.title!==null&&t.title.length>0,"---",_e,`title: ${JSON.stringify(t.title)}`,_e,"---",_e).append("graph ",t.autoLayout.direction,_e).indent({indentedChildren:s=>{s.append(nt(e.filter(a=>os(a.parent)),a=>i(a),{appendNewLineIfNotEmpty:!0})).appendIf(r.length>0,nt(r,a=>o(a),{appendNewLineIfNotEmpty:!0}))},indentation:2}))}function Hy(t){const e=new Ne;return e.appendTemplate`
351
+ `;function zr(t){return t instanceof Ne||t instanceof eo||t instanceof Gr}function Bt(t,e){return zr(t)?sg(t,e).text:String(t)}class Ne{constructor(...e){this.contents=[],this.append(...e)}isEmpty(){return this.contents.length===0}trace(e,r,n){if(Dp(e)){if(this.tracedSource={astNode:e,property:r,index:n},this.tracedSource.property===void 0&&this.tracedSource.index!==void 0&&this.tracedSource.index>-1)throw new Error("Generation support: 'property' argument must not be 'undefined' if a non-negati\
352
+ ve value is assigned to 'index' in 'CompositeGeneratorNode.trace(...)'.")}else this.tracedSource=e;return this}append(...e){for(const r of e)typeof r=="function"?r(this):r&&this.contents.push(r);return this}appendIf(e,...r){return e?this.append(...r):this}appendNewLine(){return this.append(ve)}appendNewLineIf(e){return e?this.append(ve):this}appendNewLineIfNotEmpty(){return this.append(Dg)}appendNewLineIfNotEmptyIf(e){return e?this.appendNewLineIfNotEmpty():this}appendTemplate(e,...r){return this.
353
+ append(kt(e,...r))}appendTemplateIf(e){return e?(r,...n)=>this.appendTemplate(r,...n):()=>this}indent(e){const{indentedChildren:r,indentation:n,indentEmptyLines:i,indentImmediately:s}=Array.isArray(e)||typeof e=="function"?{indentedChildren:e}:typeof e=="object"?e:{},o=new eo(n,s,i);return this.contents.push(o),Array.isArray(r)?o.append(...r):r&&o.append(r),this}appendTraced(e,r,n){return i=>this.append(new Ne().trace(e,r,n).append(i))}appendTracedIf(e,r,n,i){return e?this.appendTraced(typeof r==
354
+ "function"?r():r,n,i):()=>this}appendTracedTemplate(e,r,n){return(i,...s)=>this.append(dg(e,r,n)(i,...s))}appendTracedTemplateIf(e,r,n,i){return e?this.appendTracedTemplate(typeof r=="function"?r():r,n,i):()=>this}}function Eg(t,e,r){return n=>n instanceof Ne&&n.tracedSource===void 0?n.trace(t,e,r):new Ne().trace(t,e,r).append(n)}class eo extends Ne{constructor(e,r=!0,n=!1){super(),this.indentImmediately=!0,this.indentEmptyLines=!1,typeof e=="string"?this.indentation=e:typeof e=="number"&&(this.
355
+ indentation="".padStart(e)),this.indentImmediately=r,this.indentEmptyLines=n}}class Gr{constructor(e,r=!1){this.ifNotEmpty=!1,this.lineDelimiter=e??yg,this.ifNotEmpty=r}}const ve=new Gr,Dg=new Gr(void 0,!0),$c=t=>t===void 0||typeof t=="string"||zr(t)?t:String(t);function nt(t,e=$c,r={}){const n=typeof e=="function"?e:$c,{filter:i,prefix:s,suffix:o,separator:a,appendNewLineIfNotEmpty:c,skipNewLineAfterLastItem:l}=typeof e=="object"?e:r,u=typeof s=="function"?s:()=>s,d=typeof o=="function"?o:()=>o;
356
+ return vg(t,(h,E,y,D)=>{if(i&&!i(E,y,D))return h;const f=n(E,y,D);return f===void 0?h:(h??(h=new Ne)).append(u(E,y,D)).append(f).append(d(E,y,D)).appendIf(!D,a).appendNewLineIfNotEmptyIf(!h.isEmpty()&&!!c&&(!D||!l))})}function vg(t,e,r){const n=t[Symbol.iterator]();let i=n.next(),s=0,o=r;for(;!i.done;){const a=n.next();o=e(o,i.value,s,!!a.done),i=a,s++}return o}var $g=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,_g=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,
357
+ wg=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,
358
+ to={Space_Separator:$g,ID_Start:_g,ID_Continue:wg},Pe={isSpaceSeparator(t){return typeof t=="string"&&to.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||to.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||to.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t==
359
+ "string"&&/[0-9A-Fa-f]/.test(t)}};let ro,He,wt,Rn,xt,ut,Be,no,Wr;var bg=function(e,r){ro=String(e),He="start",wt=[],Rn=0,xt=1,ut=0,Be=void 0,no=void 0,Wr=void 0;do Be=Ag(),Rg[He]();while(Be.type!=="eof");return typeof r=="function"?io({"":Wr},"",r):Wr};function io(t,e,r){const n=t[e];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let i=0;i<n.length;i++){const s=String(i),o=io(n,s,r);o===void 0?delete n[s]:Object.defineProperty(n,s,{value:o,writable:!0,enumerable:!0,configurable:!0})}else
360
+ for(const i in n){const s=io(n,i,r);s===void 0?delete n[i]:Object.defineProperty(n,i,{value:s,writable:!0,enumerable:!0,configurable:!0})}return r.call(t,e,n)}let ye,me,Kr,bt,$e;function Ag(){for(ye="default",me="",Kr=!1,bt=1;;){$e=At();const t=_c[ye]();if(t)return t}}function At(){if(ro[Rn])return String.fromCodePoint(ro.codePointAt(Rn))}function te(){const t=At();return t===`
361
+ `?(xt++,ut=0):t?ut+=t.length:ut++,t&&(Rn+=t.length),t}const _c={default(){switch($e){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
362
+ `:case"\r":case"\u2028":case"\u2029":te();return;case"/":te(),ye="comment";return;case void 0:return te(),Ce("eof")}if(Pe.isSpaceSeparator($e)){te();return}return _c[He]()},comment(){switch($e){case"*":te(),ye="multiLineComment";return;case"/":te(),ye="singleLineComment";return}throw Se(te())},multiLineComment(){switch($e){case"*":te(),ye="multiLineCommentAsterisk";return;case void 0:throw Se(te())}te()},multiLineCommentAsterisk(){switch($e){case"*":te();return;case"/":te(),ye="default";return;case void 0:
363
+ throw Se(te())}te(),ye="multiLineComment"},singleLineComment(){switch($e){case`
364
+ `:case"\r":case"\u2028":case"\u2029":te(),ye="default";return;case void 0:return te(),Ce("eof")}te()},value(){switch($e){case"{":case"[":return Ce("punctuator",te());case"n":return te(),or("ull"),Ce("null",null);case"t":return te(),or("rue"),Ce("boolean",!0);case"f":return te(),or("alse"),Ce("boolean",!1);case"-":case"+":te()==="-"&&(bt=-1),ye="sign";return;case".":me=te(),ye="decimalPointLeading";return;case"0":me=te(),ye="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"\
365
+ 8":case"9":me=te(),ye="decimalInteger";return;case"I":return te(),or("nfinity"),Ce("numeric",1/0);case"N":return te(),or("aN"),Ce("numeric",NaN);case'"':case"'":Kr=te()==='"',me="",ye="string";return}throw Se(te())},identifierNameStartEscape(){if($e!=="u")throw Se(te());te();const t=so();switch(t){case"$":case"_":break;default:if(!Pe.isIdStartChar(t))throw wc();break}me+=t,ye="identifierName"},identifierName(){switch($e){case"$":case"_":case"\u200C":case"\u200D":me+=te();return;case"\\":te(),ye=
366
+ "identifierNameEscape";return}if(Pe.isIdContinueChar($e)){me+=te();return}return Ce("identifier",me)},identifierNameEscape(){if($e!=="u")throw Se(te());te();const t=so();switch(t){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!Pe.isIdContinueChar(t))throw wc();break}me+=t,ye="identifierName"},sign(){switch($e){case".":me=te(),ye="decimalPointLeading";return;case"0":me=te(),ye="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":me=te(),ye="decimalInt\
367
+ eger";return;case"I":return te(),or("nfinity"),Ce("numeric",bt*(1/0));case"N":return te(),or("aN"),Ce("numeric",NaN)}throw Se(te())},zero(){switch($e){case".":me+=te(),ye="decimalPoint";return;case"e":case"E":me+=te(),ye="decimalExponent";return;case"x":case"X":me+=te(),ye="hexadecimal";return}return Ce("numeric",bt*0)},decimalInteger(){switch($e){case".":me+=te(),ye="decimalPoint";return;case"e":case"E":me+=te(),ye="decimalExponent";return}if(Pe.isDigit($e)){me+=te();return}return Ce("numeric",
368
+ bt*Number(me))},decimalPointLeading(){if(Pe.isDigit($e)){me+=te(),ye="decimalFraction";return}throw Se(te())},decimalPoint(){switch($e){case"e":case"E":me+=te(),ye="decimalExponent";return}if(Pe.isDigit($e)){me+=te(),ye="decimalFraction";return}return Ce("numeric",bt*Number(me))},decimalFraction(){switch($e){case"e":case"E":me+=te(),ye="decimalExponent";return}if(Pe.isDigit($e)){me+=te();return}return Ce("numeric",bt*Number(me))},decimalExponent(){switch($e){case"+":case"-":me+=te(),ye="decimalE\
369
+ xponentSign";return}if(Pe.isDigit($e)){me+=te(),ye="decimalExponentInteger";return}throw Se(te())},decimalExponentSign(){if(Pe.isDigit($e)){me+=te(),ye="decimalExponentInteger";return}throw Se(te())},decimalExponentInteger(){if(Pe.isDigit($e)){me+=te();return}return Ce("numeric",bt*Number(me))},hexadecimal(){if(Pe.isHexDigit($e)){me+=te(),ye="hexadecimalInteger";return}throw Se(te())},hexadecimalInteger(){if(Pe.isHexDigit($e)){me+=te();return}return Ce("numeric",bt*Number(me))},string(){switch($e){case"\
370
+ \\":te(),me+=Cg();return;case'"':if(Kr)return te(),Ce("string",me);me+=te();return;case"'":if(!Kr)return te(),Ce("string",me);me+=te();return;case`
371
+ `:case"\r":throw Se(te());case"\u2028":case"\u2029":Og($e);break;case void 0:throw Se(te())}me+=te()},start(){switch($e){case"{":case"[":return Ce("punctuator",te())}ye="value"},beforePropertyName(){switch($e){case"$":case"_":me=te(),ye="identifierName";return;case"\\":te(),ye="identifierNameStartEscape";return;case"}":return Ce("punctuator",te());case'"':case"'":Kr=te()==='"',ye="string";return}if(Pe.isIdStartChar($e)){me+=te(),ye="identifierName";return}throw Se(te())},afterPropertyName(){if($e===
372
+ ":")return Ce("punctuator",te());throw Se(te())},beforePropertyValue(){ye="value"},afterPropertyValue(){switch($e){case",":case"}":return Ce("punctuator",te())}throw Se(te())},beforeArrayValue(){if($e==="]")return Ce("punctuator",te());ye="value"},afterArrayValue(){switch($e){case",":case"]":return Ce("punctuator",te())}throw Se(te())},end(){throw Se(te())}};function Ce(t,e){return{type:t,value:e,line:xt,column:ut}}function or(t){for(const e of t){if(At()!==e)throw Se(te());te()}}function Cg(){switch(At()){case"\
373
+ b":return te(),"\b";case"f":return te(),"\f";case"n":return te(),`
374
+ `;case"r":return te(),"\r";case"t":return te()," ";case"v":return te(),"\v";case"0":if(te(),Pe.isDigit(At()))throw Se(te());return"\0";case"x":return te(),Sg();case"u":return te(),so();case`
375
+ `:case"\u2028":case"\u2029":return te(),"";case"\r":return te(),At()===`
376
+ `&&te(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Se(te());case void 0:throw Se(te())}return te()}function Sg(){let t="",e=At();if(!Pe.isHexDigit(e)||(t+=te(),e=At(),!Pe.isHexDigit(e)))throw Se(te());return t+=te(),String.fromCodePoint(parseInt(t,16))}function so(){let t="",e=4;for(;e-- >0;){const r=At();if(!Pe.isHexDigit(r))throw Se(te());t+=te()}return String.fromCodePoint(parseInt(t,16))}const Rg={start(){if(Be.type==="eof")throw ar();oo()},beforePropertyName(){
377
+ switch(Be.type){case"identifier":case"string":no=Be.value,He="afterPropertyName";return;case"punctuator":On();return;case"eof":throw ar()}},afterPropertyName(){if(Be.type==="eof")throw ar();He="beforePropertyValue"},beforePropertyValue(){if(Be.type==="eof")throw ar();oo()},beforeArrayValue(){if(Be.type==="eof")throw ar();if(Be.type==="punctuator"&&Be.value==="]"){On();return}oo()},afterPropertyValue(){if(Be.type==="eof")throw ar();switch(Be.value){case",":He="beforePropertyName";return;case"}":On()}},
378
+ afterArrayValue(){if(Be.type==="eof")throw ar();switch(Be.value){case",":He="beforeArrayValue";return;case"]":On()}},end(){}};function oo(){let t;switch(Be.type){case"punctuator":switch(Be.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=Be.value;break}if(Wr===void 0)Wr=t;else{const e=wt[wt.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,no,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")wt.
379
+ push(t),Array.isArray(t)?He="beforeArrayValue":He="beforePropertyName";else{const e=wt[wt.length-1];e==null?He="end":Array.isArray(e)?He="afterArrayValue":He="afterPropertyValue"}}function On(){wt.pop();const t=wt[wt.length-1];t==null?He="end":Array.isArray(t)?He="afterArrayValue":He="afterPropertyValue"}function Se(t){return In(t===void 0?`JSON5: invalid end of input at ${xt}:${ut}`:`JSON5: invalid character '${bc(t)}' at ${xt}:${ut}`)}function ar(){return In(`JSON5: invalid end of input at ${xt}\
380
+ :${ut}`)}function wc(){return ut-=5,In(`JSON5: invalid identifier character at ${xt}:${ut}`)}function Og(t){console.warn(`JSON5: '${bc(t)}' in strings is not valid ECMAScript; consider escaping`)}function bc(t){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){const r=t.charCodeAt(0).toString(16);return"\\x"+("00"+r).substring(r.length)}return t}function In(t){const e=new SyntaxError(
381
+ t);return e.lineNumber=xt,e.columnNumber=ut,e}var Ig=function(e,r,n){const i=[];let s="",o,a,c="",l;if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&(n=r.space,l=r.quote,r=r.replacer),typeof r=="function")a=r;else if(Array.isArray(r)){o=[];for(const D of r){let f;typeof D=="string"?f=D:(typeof D=="number"||D instanceof String||D instanceof Number)&&(f=String(D)),f!==void 0&&o.indexOf(f)<0&&o.push(f)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>
382
+ 0&&(n=Math.min(10,Math.floor(n)),c=" ".substr(0,n)):typeof n=="string"&&(c=n.substr(0,10)),u("",{"":e});function u(D,f){let g=f[D];switch(g!=null&&(typeof g.toJSON5=="function"?g=g.toJSON5(D):typeof g.toJSON=="function"&&(g=g.toJSON(D))),a&&(g=a.call(f,D,g)),g instanceof Number?g=Number(g):g instanceof String?g=String(g):g instanceof Boolean&&(g=g.valueOf()),g){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof g=="string")return d(g);if(typeof g=="number")return String(
383
+ g);if(typeof g=="object")return Array.isArray(g)?y(g):h(g)}function d(D){const f={"'":.1,'"':.2},g={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let p="";for(let v=0;v<D.length;v++){const $=D[v];switch($){case"'":case'"':f[$]++,p+=$;continue;case"\0":if(Pe.isDigit(D[v+1])){p+="\\x00";continue}}if(g[$]){p+=g[$];continue}if($<" "){let _=$.charCodeAt(0).toString(16);p+="\\x"+("00"+_).substring(_.length);
384
+ continue}p+=$}const m=l||Object.keys(f).reduce((v,$)=>f[v]<f[$]?v:$);return p=p.replace(new RegExp(m,"g"),g[m]),m+p+m}function h(D){if(i.indexOf(D)>=0)throw TypeError("Converting circular structure to JSON5");i.push(D);let f=s;s=s+c;let g=o||Object.keys(D),p=[];for(const v of g){const $=u(v,D);if($!==void 0){let _=E(v)+":";c!==""&&(_+=" "),_+=$,p.push(_)}}let m;if(p.length===0)m="{}";else{let v;if(c==="")v=p.join(","),m="{"+v+"}";else{let $=`,
385
+ `+s;v=p.join($),m=`{
386
+ `+s+v+`,
387
+ `+f+"}"}}return i.pop(),s=f,m}function E(D){if(D.length===0)return d(D);const f=String.fromCodePoint(D.codePointAt(0));if(!Pe.isIdStartChar(f))return d(D);for(let g=f.length;g<D.length;g++)if(!Pe.isIdContinueChar(String.fromCodePoint(D.codePointAt(g))))return d(D);return D}function y(D){if(i.indexOf(D)>=0)throw TypeError("Converting circular structure to JSON5");i.push(D);let f=s;s=s+c;let g=[];for(let m=0;m<D.length;m++){const v=u(String(m),D);g.push(v!==void 0?v:"null")}let p;if(g.length===0)p=
388
+ "[]";else if(c==="")p="["+g.join(",")+"]";else{let m=`,
389
+ `+s,v=g.join(m);p=`[
390
+ `+s+v+`,
391
+ `+f+"]"}return i.pop(),s=f,p}};const Fg={parse:bg,stringify:Ig};var Ct=Fg;const Pg=t=>t.charAt(0).toLocaleUpperCase()+t.slice(1),Ng=t=>t.split(".").map(Pg).join(""),Tg=t=>Ng(t.parent?t.id.slice(t.parent.length+1):t.id),Lg=({autoLayout:t})=>{switch(t.direction){case"TB":return"down";case"BT":return"up";case"LR":return"right";case"RL":return"left"}},jg=({shape:t})=>{switch(t){case"queue":case"cylinder":case"rectangle":case"person":return t;case"storage":return"stored_data";case"mobile":case"browse\
392
+ r":return"rectangle"}};function Ac(t){const{nodes:e,edges:r}=t,n=new Map,i=(o,a)=>{const c=Tg(o),l=(a?a+".":"")+c;n.set(o.id,l);const u=JSON.stringify(o.title),d=jg(o);return new Ne().append(c,": {",ve).indent({indentedChildren:h=>h.append("label: ",u,ve).appendIf(d!=="rectangle","shape: ",d,ve).appendIf(o.children.length>0,ve,nt(e.filter(E=>E.parent===o.id),E=>i(E,l))),indentation:2}).append("}",ve)},s=o=>new Ne().append(n.get(o.source)," -> ",n.get(o.target)).append(a=>o.label&&a.append(": ",JSON.
393
+ stringify(o.label)));return Bt(new Ne().append("direction: ",Lg(t),ve,ve).append(nt(e.filter(o=>Xi(o.parent)),o=>i(o),{appendNewLineIfNotEmpty:!0})).appendIf(r.length>0,ve,nt(r,o=>s(o),{appendNewLineIfNotEmpty:!0})))}const kg=t=>t.charAt(0).toLocaleUpperCase()+t.slice(1),Bg=t=>t.split(".").map(kg).join(""),xg=t=>Bg(t.parent?t.id.slice(t.parent.length+1):t.id),Mg=({shape:t})=>{switch(t){case"queue":case"cylinder":return["[(",")]"];case"person":return["[fa:fa-user ","]"];case"storage":return["([",
394
+ "])"];case"mobile":case"browser":case"rectangle":return["[","]"]}};function Cc(t){const{nodes:e,edges:r}=t,n=new Map,i=(o,a)=>{const c=xg(o),l=(a?a+".":"")+c;n.set(o.id,l);const u=o.title.replaceAll(`
395
+ `,"\\n"),d=Mg(o),h=new Ne;return o.children.length>0?h.append("subgraph ",l,"[",JSON.stringify(o.title),"]",ve).indent({indentedChildren:[nt(e.filter(E=>E.parent===o.id),E=>i(E,l),{appendNewLineIfNotEmpty:!0})],indentation:2}).append("end",ve):h.append(l,d[0],u,d[1]),h},s=o=>new Ne().append(n.get(o.source)," -.",o.label?' "'+o.label.replaceAll(`
396
+ `,"\\n")+'" .-':"-","> ",n.get(o.target));return Bt(new Ne().appendIf(t.title!==null&&t.title.length>0,"---",ve,`title: ${JSON.stringify(t.title)}`,ve,"---",ve).append("graph ",t.autoLayout.direction,ve).indent({indentedChildren:o=>{o.append(nt(e.filter(a=>Xi(a.parent)),a=>i(a),{appendNewLineIfNotEmpty:!0})).appendIf(r.length>0,nt(r,a=>s(a),{appendNewLineIfNotEmpty:!0}))},indentation:2}))}function qg(t){const e=new Ne;return e.appendTemplate`
101
397
  /* prettier-ignore-start */
102
398
  /* eslint-disable */
103
399
 
@@ -108,7 +404,7 @@ ${e.join(`
108
404
 
109
405
  import { LikeC4Model } from 'likec4/model'
110
406
 
111
- export const likeC4Model = LikeC4Model.fromDump(${St.stringify(t.$model,{space:2,quote:"'"})})
407
+ export const likeC4Model = LikeC4Model.fromDump(${Ct.stringify(t.$model,{space:2,quote:"'"})})
112
408
 
113
409
  export type LikeC4ModelTypes = typeof likeC4Model.Aux
114
410
  export type LikeC4ElementId = LikeC4ModelTypes['Fqn']
@@ -116,7 +412,7 @@ ${e.join(`
116
412
  export type LikeC4ViewId = LikeC4ModelTypes['ViewId']
117
413
 
118
414
  /* prettier-ignore-end */
119
- `,kt(e)}function Vy(t){return nt(t,e=>Bt`${St.stringify(e.id)}`,{separator:" | "})}function zy(t){const e=Array.from(t),r=new Ne;return r.appendTemplate`
415
+ `,Bt(e)}function Ug(t){return nt(t,e=>kt`${Ct.stringify(e.id)}`,{separator:" | "})}function Hg(t){const e=Array.from(t),r=new Ne;return r.appendTemplate`
120
416
  /******************************************************************************
121
417
  * This file was generated
122
418
  * DO NOT EDIT MANUALLY!
@@ -127,10 +423,10 @@ ${e.join(`
127
423
  // @ts-nocheck
128
424
 
129
425
  import type { DiagramView } from 'likec4'
130
- `.append(_e,_e),e.length===0?(r.append("export {}",_e),kt(r)):(r.appendTemplate`
131
- export type LikeC4ViewId = ${Vy(e)};
426
+ `.append(ve,ve),e.length===0?(r.append("export {}",ve),Bt(r)):(r.appendTemplate`
427
+ export type LikeC4ViewId = ${Ug(e)};
132
428
  export const LikeC4Views = {
133
- `.indent({indentation:2,indentedChildren(n){n.appendNewLineIf(e.length>1).append(nt(e,i=>Bt`${St.stringify(i.id)}: (${St.stringify(i)} as unknown) as DiagramView`,{separator:",",appendNewLineIfNotEmpty:!0}))}}).append("} as const satisfies Record<LikeC4ViewId, DiagramView>",_e,_e).appendTemplate`
429
+ `.indent({indentation:2,indentedChildren(n){n.appendNewLineIf(e.length>1).append(nt(e,i=>kt`${Ct.stringify(i.id)}: (${Ct.stringify(i)} as unknown) as DiagramView`,{separator:",",appendNewLineIfNotEmpty:!0}))}}).append("} as const satisfies Record<LikeC4ViewId, DiagramView>",ve,ve).appendTemplate`
134
430
  export type LikeC4Views = typeof LikeC4Views
135
431
 
136
432
  export function isLikeC4ViewId(value: unknown): value is LikeC4ViewId {
@@ -142,8 +438,8 @@ ${e.join(`
142
438
  }
143
439
 
144
440
  /* prettier-ignore-end */
145
- `.append(_e),kt(r))}function nn(t){t instanceof Set&&(t=[...t].sort(Jm));const e=t.map(r=>` | ${JSON.stringify(r)}`);return e.length===0&&e.push(" never"),e.join(`
146
- `)+";"}function Gy(t){const{fqns:e,tags:r,kinds:n}=Au([...t.elements()]).reduce((s,a)=>(s.fqns.push(a.id),s.kinds.add(a.kind),s.tags.push(...a.tags),s),{fqns:[],kinds:new Set,tags:[]}),i=Au([...t.deployment.elements()]).map(s=>s.id),{viewIds:o}=[...t.views()].reduce((s,a)=>(s.viewIds.add(a.id),s.tags.push(...a.tags),s.tags.push(...a.includedTags),s),{viewIds:new Set,tags:r});return`
441
+ `.append(ve),Bt(r))}function Yr(t){t instanceof Set&&(t=[...t].sort(Qp));const e=t.map(r=>` | ${JSON.stringify(r)}`);return e.length===0&&e.push(" never"),e.join(`
442
+ `)+";"}function Vg(t){const{fqns:e,tags:r,kinds:n}=Za([...t.elements()]).reduce((o,a)=>(o.fqns.push(a.id),o.kinds.add(a.kind),o.tags.push(...a.tags),o),{fqns:[],kinds:new Set,tags:[]}),i=Za([...t.deployment.elements()]).map(o=>o.id),{viewIds:s}=[...t.views()].reduce((o,a)=>(o.viewIds.add(a.id),o.tags.push(...a.tags),o.tags.push(...a.includedTags),o),{viewIds:new Set,tags:r});return`
147
443
  /* prettier-ignore-start */
148
444
  /* eslint-disable */
149
445
 
@@ -164,19 +460,19 @@ import type {
164
460
  } from 'likec4/react'
165
461
 
166
462
  type LikeC4ElementId =
167
- ${nn(e)}
463
+ ${Yr(e)}
168
464
 
169
465
  type LikeC4DeploymentId =
170
- ${nn(i)}
466
+ ${Yr(i)}
171
467
 
172
468
  type LikeC4ViewId =
173
- ${nn(o)}
469
+ ${Yr(s)}
174
470
 
175
471
  type LikeC4ElementKind =
176
- ${nn(n)}
472
+ ${Yr(n)}
177
473
 
178
474
  type LikeC4Tag =
179
- ${nn(new Set(r))}
475
+ ${Yr(new Set(r))}
180
476
 
181
477
  declare function isLikeC4ViewId(value: unknown): value is LikeC4ViewId;
182
478
 
@@ -226,7 +522,7 @@ export {
226
522
  ReactLikeC4
227
523
  }
228
524
  /* prettier-ignore-end */
229
- `.trimStart()}function Wy(t){const e=new Ne;return e.appendTemplate`
525
+ `.trimStart()}function zg(t){const e=new Ne;return e.appendTemplate`
230
526
  /******************************************************************************
231
527
  * This file was generated
232
528
  * DO NOT EDIT MANUALLY!
@@ -235,17 +531,17 @@ export {
235
531
 
236
532
  export function d2Source(viewId) {
237
533
  switch (viewId) {
238
- `.appendNewLine().indent({indentation:4,indentedChildren(r){r.append(nt(t,n=>Bt`
534
+ `.appendNewLine().indent({indentation:4,indentedChildren(r){r.append(nt(t,n=>kt`
239
535
  case ${JSON.stringify(n.id)}: {
240
- return ${JSON.stringify(Zc(n))}
536
+ return ${JSON.stringify(Ac(n))}
241
537
  }
242
538
  `,{appendNewLineIfNotEmpty:!0})).appendTemplate`
243
539
  default: {
244
540
  throw new Error('Unknown viewId: ' + viewId)
245
541
  }
246
- `}}).append(_e," }",_e).appendTemplate`
542
+ `}}).append(ve," }",ve).appendTemplate`
247
543
  }
248
- `.append(_e,_e),kt(e)}function Ky(t){const e=new Ne;return e.appendTemplate`
544
+ `.append(ve,ve),Bt(e)}function Gg(t){const e=new Ne;return e.appendTemplate`
249
545
  /******************************************************************************
250
546
  * This file was generated
251
547
  * DO NOT EDIT MANUALLY!
@@ -254,7 +550,7 @@ export {
254
550
 
255
551
  export function dotSource(viewId) {
256
552
  switch (viewId) {
257
- `.appendNewLine().indent({indentation:4,indentedChildren(r){r.append(nt(Object.keys(t),n=>Bt`
553
+ `.appendNewLine().indent({indentation:4,indentedChildren(r){r.append(nt(Object.keys(t),n=>kt`
258
554
  case ${JSON.stringify(n)}: {
259
555
  return ${JSON.stringify(t[n].dot)}
260
556
  }
@@ -262,12 +558,12 @@ export {
262
558
  default: {
263
559
  throw new Error('Unknown viewId: ' + viewId)
264
560
  }
265
- `}}).append(_e," }",_e).appendTemplate`
561
+ `}}).append(ve," }",ve).appendTemplate`
266
562
  }
267
563
 
268
564
  export function svgSource(viewId) {
269
565
  switch (viewId) {
270
- `.appendNewLine().indent({indentation:4,indentedChildren(r){r.append(nt(Object.keys(t),n=>Bt`
566
+ `.appendNewLine().indent({indentation:4,indentedChildren(r){r.append(nt(Object.keys(t),n=>kt`
271
567
  case ${JSON.stringify(n)}: {
272
568
  return ${JSON.stringify(t[n].svg)}
273
569
  }
@@ -275,7 +571,7 @@ export {
275
571
  default: {
276
572
  throw new Error('Unknown viewId: ' + viewId)
277
573
  }
278
- `}}).append(_e," }",_e,"}",_e,_e),kt(e)}function Yy(t){const e=Em(t.flatMap(i=>i.nodes.map(o=>o.icon)),hu(_m),hu(i=>pu(i)&&!i.toLowerCase().startsWith("http")),vm()).sort(),{imports:r,cases:n}=e.reduce((i,o,s)=>{const[a,c]=o.split(":"),f="Icon"+s.toString().padStart(2,"0");return i.imports.push(`import ${f} from 'likec4/icons/${a}/${c}'`),i.cases.push(` '${a}:${c}': ${f}`),i},{imports:[],cases:[]});return`
574
+ `}}).append(ve," }",ve,"}",ve,ve),Bt(e)}function Wg(t){const e=vp(t.flatMap(i=>i.nodes.map(s=>s.icon)),qa(_p),qa(i=>Ua(i)&&!i.toLowerCase().startsWith("http")),$p()).sort(),{imports:r,cases:n}=e.reduce((i,s,o)=>{const[a,c]=s.split(":"),l="Icon"+o.toString().padStart(2,"0");return i.imports.push(`import ${l} from 'likec4/icons/${a}/${c}'`),i.cases.push(` '${a}:${c}': ${l}`),i},{imports:[],cases:[]});return`
279
575
  ${r.join(`
280
576
  `)}
281
577
 
@@ -297,15 +593,15 @@ if (import.meta.hot) {
297
593
  }
298
594
  })
299
595
  }
300
- `}function Jy(t){const{views:e,...r}=t.$model;return`
596
+ `}function Kg(t){const{views:e,...r}=t.$model;return`
301
597
  import { createLikeC4Model } from 'likec4/model'
302
598
  import { nano } from 'likec4/react'
303
599
 
304
600
  // This is needed for better tree shaking
305
- export const LikeC4Views = ${St.stringify(e)}
601
+ export const LikeC4Views = ${Ct.stringify(e)}
306
602
 
307
603
  export const likeC4Model = /* @__PURE__ */ createLikeC4Model(Object.assign(
308
- ${St.stringify(r)},
604
+ ${Ct.stringify(r)},
309
605
  {views: LikeC4Views}
310
606
  ))
311
607
 
@@ -328,7 +624,7 @@ if (import.meta.hot) {
328
624
  }
329
625
  })
330
626
  }
331
- `}function Xy(t){const e=new Ne;return e.appendTemplate`
627
+ `}function Yg(t){const e=new Ne;return e.appendTemplate`
332
628
  /******************************************************************************
333
629
  * This file was generated
334
630
  * DO NOT EDIT MANUALLY!
@@ -337,21 +633,21 @@ if (import.meta.hot) {
337
633
 
338
634
  export function mmdSource(viewId) {
339
635
  switch (viewId) {
340
- `.appendNewLine().indent({indentation:4,indentedChildren(r){r.append(nt(t,n=>Bt`
636
+ `.appendNewLine().indent({indentation:4,indentedChildren(r){r.append(nt(t,n=>kt`
341
637
  case ${JSON.stringify(n.id)}: {
342
- return ${JSON.stringify(el(n))}
638
+ return ${JSON.stringify(Cc(n))}
343
639
  }
344
640
  `,{appendNewLineIfNotEmpty:!0})).appendTemplate`
345
641
  default: {
346
642
  throw new Error('Unknown viewId: ' + viewId)
347
643
  }
348
- `}}).append(_e," }",_e).appendTemplate`
644
+ `}}).append(ve," }",ve).appendTemplate`
349
645
  }
350
646
 
351
- `.append(_e,_e),kt(e)}function tl(t){return`
647
+ `.append(ve,ve),Bt(e)}function Sc(t){return`
352
648
  import { nano } from 'likec4/react'
353
649
 
354
- export const $graph = nano.atom(${St.stringify(t,null,2)})
650
+ export const $graph = nano.atom(${Ct.stringify(t,null,2)})
355
651
 
356
652
  export const useOverviewGraph = () => {
357
653
  return nano.useStore($graph)
@@ -370,7 +666,7 @@ if (import.meta.hot) {
370
666
  }
371
667
  })
372
668
  }
373
- `}function Qy(t,e){const{imports:r,cases:n}=t.reduce((i,{id:o},s)=>{const a=ve(e,`${o}.png`);if(!Nt(a))return i;const c="Png"+s.toString().padStart(2,"0");return i.imports.push(`import ${c} from 'likec4/previews/${o}.png'`),i.cases.push(` ${JSON.stringify(o)}: ${c}`),i},{imports:[],cases:[]});return`
669
+ `}function Jg(t,e){const{imports:r,cases:n}=t.reduce((i,{id:s},o)=>{const a=De(e,`${s}.png`);if(!Pt(a))return i;const c="Png"+o.toString().padStart(2,"0");return i.imports.push(`import ${c} from 'likec4/previews/${s}.png'`),i.cases.push(` ${JSON.stringify(s)}: ${c}`),i},{imports:[],cases:[]});return`
374
670
  import { nano } from 'likec4/react'
375
671
  // assets dir: ${e}
376
672
 
@@ -412,47 +708,465 @@ if (import.meta.hot) {
412
708
  }
413
709
  })
414
710
  }
415
- `}const Zy={id:"virtual:likec4/dot-sources",virtualId:"\0likec4-plugin/dot-sources.js",async load({likec4:t,logger:e}){e.info(Q.dim("generating virtual:likec4/dot-sources"));const r=await t.viewsService.viewsAsGraphvizOut(),n=Dm(r,({id:i,svg:o,dot:s})=>[i,{dot:s,svg:o}]);return Ky(n)}},eE={id:"virtual:likec4/d2-sources",virtualId:"\0likec4-plugin/d2-sources.js",async load({likec4:t,logger:e}){e.info(Q.dim("generating virtual:likec4/d2-sources"));const r=await t.viewsService.computedViews();return Wy(r)}},tE={id:"virtual:likec4/mmd-sources",virtualId:"\0likec4-plugin/mmd-sources.js",async load({likec4:t,logger:e}){e.info(Q.dim("generating virtual:likec4/mmd-sources"));const r=await t.viewsService.computedViews();return Xy(r)}},rE={id:"virtual:likec4/icons",virtualId:"\0likec4-plugin/icons.js",async load({likec4:t,logger:e}){e.info(Q.dim("generating virtual:likec4/icons"));const r=await t.viewsService.computedViews();return Yy(r)}},nE={id:"virtual:likec4/overview-graph",virtualId:"\0likec4-plugin/overview-graph.js",async load({likec4:t,logger:e,useOverviewGraph:r}){if(r===!0)try{e.info(Q.dim("generating virtual:likec4/overview-graph"));const n=await t.viewsService.overviewGraph();return tl(n)}catch(n){e.error(n)}return e.info(Q.dim("generating empty virtual:likec4/overview-graph")),tl({nodes:[],edges:[],bounds:{x:0,y:0,width:10,height:10}})}},rl={id:"virtual:likec4/previews",virtualId:"\0likec4-plugin/previews.js",async load({likec4:t,logger:e,assetsDir:r}){e.info(Q.dim("generating virtual:likec4/previews"));const n=await t.viewsService.computedViews();return Qy(n,r)}},iE={id:"virtual:likec4/model",virtualId:"\0likec4-plugin/model.js",async load({likec4:t,logger:e,assetsDir:r}){e.info(Q.dim("generating virtual:likec4/model"));const n=await t.layoutedModel();return Jy(n)}},Eo=[rE,Zy,eE,tE,nE,rl,iE],sE=t=>{const e=t.toLowerCase();return e.endsWith(".c4")||e.endsWith(".likec4")||e.endsWith(".like-c4")};function vo({useOverviewGraph:t=!1,languageServices:e}){let r,n=e.workspace;return{name:"vite-plugin-likec4",configResolved(i){if(r=i.logger,t){const o=i.resolve.alias.find(s=>s.find==="likec4/previews")?.replacement;o?(n=o,r.info(Q.dim("likec4/previews alias")+" "+Q.dim(n))):r.warn("likec4/previews alias not found")}},resolveId(i){const o=Eo.find(s=>s.id===i);return o?o.virtualId:null},async load(i){const o=Eo.find(s=>s.virtualId===i);return o?await o.load({logger:r,likec4:e,assetsDir:n,useOverviewGraph:t}):null},configureServer(i){const o=wm(1),s=()=>{o.clearQueue(),o(async()=>{const[f]=e.getErrors();if(f){i.ws.send({type:"error",err:{name:"LikeC4ValidationError",message:"Validation error: "+f.message.slice(0,500),stack:"",plugin:"vite-plugin-likec4",loc:{file:f.sourceFsPath,line:f.range.start.line+1,column:f.range.start.character+1}}});return}for(const u of Eo){const h=i.moduleGraph.getModuleById(u.virtualId);if(h&&h.importers.size>0){r.info(`${Q.green("trigger hmr")} ${Q.dim(h.url)}`);try{await i.reloadModule(h)}catch(d){r.error(d)}}}})},a=e.workspace;r.info(`${Q.dim("watch")} ${a}`);const c=f=>u=>{sE(u)&&e.notifyUpdate({[f]:u})};if(i.watcher.add(a).on("add",c("changed")).on("change",c("changed")).on("unlink",c("removed")),t&&!n.startsWith(e.workspace)){r.info(`${Q.dim("watch")} ${n}`);const f=()=>{const u=i.moduleGraph.getModuleById(rl.virtualId);u&&u.importers.size>0&&i.reloadModule(u)};i.watcher.add(n).on("add",f).on("change",f).on("unlink",f)}e.onModelUpdate(()=>{mt.debug("likec4 model update triggered"),s()})}}}const _o=async({languageServices:t,likec4AssetsDir:e,...r})=>{const n=r.customLogger??xs,i=ks(),o=r?.useOverviewGraph===!0;n.info(`${Q.cyan("likec4 app root")} ${Q.dim(i)}`);const s=r.outputDir??ve(t.workspace,"dist");n.info(Q.cyan("output")+" "+Q.dim(s));let a="/";r.base&&(a=$m(r.base),!bm(a)&&a!=="./"&&(a=Am(a))),a!=="/"&&n.info(`${Q.green("app base url")} ${Q.dim(a)}`);const c=r.webcomponentPrefix??"likec4";return{isDev:!1,likec4AssetsDir:e,webcomponentPrefix:c,root:i,languageServices:t,clearScreen:!1,base:a,resolve:{conditions:["production"],dedupe:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client"],alias:{...Us(),"likec4/previews":e}},configFile:!1,mode:"production",optimizeDeps:{force:!0,include:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react/jsx-dev-runtime","react-dom/client"]},define:{WEBCOMPONENT_PREFIX:JSON.stringify(c),__USE_STYLE_BUNDLE__:"false",__USE_OVERVIEW_GRAPH__:o?"true":"false",__USE_HASH_HISTORY__:r?.useHashHistory===!0?"true":"false","process.env.NODE_ENV":'"production"'},build:{outDir:s,modulePreload:!1,emptyOutDir:!1,cssCodeSplit:!1,sourcemap:!1,cssMinify:!0,minify:!0,copyPublicDir:!0,chunkSizeWarningLimit:qs,rollupOptions:{treeshake:{preset:"recommended"},output:{hoistTransitiveImports:!1,compact:!0}}},customLogger:n,plugins:[bu(),vo({languageServices:t,useOverviewGraph:o})].concat(r.outputSingleFile?[Q0()]:[])}};async function wo({languageServices:t,outDir:e,base:r,webcomponentPrefix:n="likec4",filename:i="likec4-views.js"}){const o=xs,s=ks();return o.info(Q.cyan("outDir")+" "+Q.dim(e)),{root:s,clearScreen:!1,base:r,configFile:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:Us()},define:{WEBCOMPONENT_PREFIX:JSON.stringify(n),"process.env.NODE_ENV":'"production"'},esbuild:{...Bs},build:{outDir:e,emptyOutDir:!1,sourcemap:!1,minify:!0,assetsInlineLimit:100*1024,chunkSizeWarningLimit:qs,lib:{entry:"webcomponent/webcomponent.js",fileName(a,c){return i},formats:["iife"],name:"LikeC4Views"},commonjsOptions:{defaultIsModuleExports:a=>a.includes("react")?!0:"auto",requireReturnsDefault:"auto"},rollupOptions:{treeshake:{preset:"recommended"},output:{format:"iife",hoistTransitiveImports:!1,compact:!0}}},customLogger:o,plugins:[vo({languageServices:t,useOverviewGraph:!1})]}}const oE=["favicon.ico","robots.txt"],aE=async({buildWebcomponent:t=!0,webcomponentPrefix:e="likec4",languageServices:r,likec4AssetsDir:n,outputSingleFile:i,...o})=>{n??=await mn(Lr(gn(),".likec4-assets-"));const{isDev:s,...a}=await _o({...o,languageServices:r,likec4AssetsDir:n,webcomponentPrefix:e,outputSingleFile:i}),c=await Ms();for(const u of oE){const h=ve(a.root,u);Nt(h)&&Du(h,ve(c,u))}const f=await r.diagrams();if(f.length===0)throw process.exitCode=1,new Error("no views found");if(f.forEach(u=>{u.hasLayoutDrift&&a.customLogger.warn(Q.yellow("drift detected, manual layout can not be applied, view:")+" "+Q.red(u.id))}),t){const u=await wo({webcomponentPrefix:e,languageServices:r,outDir:c,base:a.base});await kr(u)}if(await kr({...a,publicDir:c,mode:"production"}),i)for(let u of Wm(ve(a.build.outDir)).filter(h=>h!=="index.html"))ms(ve(a.build.outDir,u),{recursive:!0});else{const u=ve(a.build.outDir,"index.html");Nt(u)&&Du(u,ve(a.build.outDir,"404.html"))}};function nl(t){if(t.resolvedUrls)return mu(t.resolvedUrls.network)??mu(t.resolvedUrls.local)}function il(t){if(!t.resolvedUrls)throw new Error("Vite server is not ready, no resolvedUrls");yr([Q.green("LikeC4 served at:"),"",Q.dim("Local: ")+t.resolvedUrls.local.join(`
416
- `+"".padEnd(9," ")),Q.dim("Network: ")+t.resolvedUrls.network.join(`
711
+ `}const Xg={id:"virtual:likec4/dot-sources",virtualId:"\0likec4-plugin/dot-sources.js",async load({likec4:t,logger:e}){e.info(K.dim("generating virtual:likec4/dot-sources"));const r=await t.viewsService.viewsAsGraphvizOut(),n=bp(r,({id:i,svg:s,dot:o})=>[i,{dot:o,svg:s}]);return Gg(n)}},Qg={id:"virtual:likec4/d2-sources",virtualId:"\0likec4-plugin/d2-sources.js",async load({likec4:t,logger:e}){e.info(K.dim("generating virtual:likec4/d2-sources"));const r=await t.viewsService.computedViews();return zg(
712
+ r)}},Zg={id:"virtual:likec4/mmd-sources",virtualId:"\0likec4-plugin/mmd-sources.js",async load({likec4:t,logger:e}){e.info(K.dim("generating virtual:likec4/mmd-sources"));const r=await t.viewsService.computedViews();return Yg(r)}},ey={id:"virtual:likec4/icons",virtualId:"\0likec4-plugin/icons.js",async load({likec4:t,logger:e}){e.info(K.dim("generating virtual:likec4/icons"));const r=await t.viewsService.computedViews();return Wg(r)}},ty={id:"virtual:likec4/overview-graph",virtualId:"\0likec4-plu\
713
+ gin/overview-graph.js",async load({likec4:t,logger:e,useOverviewGraph:r}){if(r===!0)try{e.info(K.dim("generating virtual:likec4/overview-graph"));const n=await t.viewsService.overviewGraph();return Sc(n)}catch(n){e.error(n)}return e.info(K.dim("generating empty virtual:likec4/overview-graph")),Sc({nodes:[],edges:[],bounds:{x:0,y:0,width:10,height:10}})}},Rc={id:"virtual:likec4/previews",virtualId:"\0likec4-plugin/previews.js",async load({likec4:t,logger:e,assetsDir:r}){e.info(K.dim("generating v\
714
+ irtual:likec4/previews"));const n=await t.viewsService.computedViews();return Jg(n,r)}},ry={id:"virtual:likec4/model",virtualId:"\0likec4-plugin/model.js",async load({likec4:t,logger:e,assetsDir:r}){e.info(K.dim("generating virtual:likec4/model"));const n=await t.layoutedModel();return Kg(n)}},ao=[ey,Xg,Qg,Zg,ty,Rc,ry],ny=t=>{const e=t.toLowerCase();return e.endsWith(".c4")||e.endsWith(".likec4")||e.endsWith(".like-c4")};function uo({useOverviewGraph:t=!1,languageServices:e}){let r,n=e.workspace;
715
+ return{name:"vite-plugin-likec4",configResolved(i){if(r=i.logger,t){const s=i.resolve.alias.find(o=>o.find==="likec4/previews")?.replacement;s?(n=s,r.info(K.dim("likec4/previews alias")+" "+K.dim(n))):r.warn("likec4/previews alias not found")}},resolveId(i){const s=ao.find(o=>o.id===i);return s?s.virtualId:null},async load(i){const s=ao.find(o=>o.virtualId===i);return s?await s.load({logger:r,likec4:e,assetsDir:n,useOverviewGraph:t}):null},configureServer(i){const s=wp(1),o=()=>{s.clearQueue(),s(
716
+ async()=>{const[l]=e.getErrors();if(l){i.ws.send({type:"error",err:{name:"LikeC4ValidationError",message:"Validation error: "+l.message.slice(0,500),stack:"",plugin:"vite-plugin-likec4",loc:{file:l.sourceFsPath,line:l.range.start.line+1,column:l.range.start.character+1}}});return}for(const u of ao){const d=i.moduleGraph.getModuleById(u.virtualId);if(d&&d.importers.size>0){r.info(`${K.green("trigger hmr")} ${K.dim(d.url)}`);try{await i.reloadModule(d)}catch(h){r.error(h)}}}})},a=e.workspace;r.info(
717
+ `${K.dim("watch")} ${a}`);const c=l=>u=>{ny(u)&&e.notifyUpdate({[l]:u})};if(i.watcher.add(a).on("add",c("changed")).on("change",c("changed")).on("unlink",c("removed")),t&&!n.startsWith(e.workspace)){r.info(`${K.dim("watch")} ${n}`);const l=()=>{const u=i.moduleGraph.getModuleById(Rc.virtualId);u&&u.importers.size>0&&i.reloadModule(u)};i.watcher.add(n).on("add",l).on("change",l).on("unlink",l)}e.onModelUpdate(()=>{pt.debug("likec4 model update triggered"),o()})}}}const co=async({languageServices:t,
718
+ likec4AssetsDir:e,...r})=>{const n=r.customLogger??Ss,i=Os(),s=r?.useOverviewGraph===!0;n.info(`${K.cyan("likec4 app root")} ${K.dim(i)}`);const o=r.outputDir??De(t.workspace,"dist");n.info(K.cyan("output")+" "+K.dim(o));let a="/";r.base&&(a=Ap(r.base),!Cp(a)&&a!=="./"&&(a=Sp(a))),a!=="/"&&n.info(`${K.green("app base url")} ${K.dim(a)}`);const c=r.webcomponentPrefix??"likec4";return{isDev:!1,likec4AssetsDir:e,webcomponentPrefix:c,root:i,languageServices:t,clearScreen:!1,base:a,resolve:{conditions:[
719
+ "production"],dedupe:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client"],alias:{...Ps(),"likec4/previews":e}},configFile:!1,mode:"production",optimizeDeps:{force:!0,include:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react/jsx-dev-runtime","react-dom/client"]},define:{WEBCOMPONENT_PREFIX:JSON.stringify(c),__USE_STYLE_BUNDLE__:"false",__USE_OVERVIEW_GRAPH__:s?"true":"false",__USE_HASH_HISTORY__:r?.useHashHistory===!0?"true":"false","process.e\
720
+ nv.NODE_ENV":'"production"'},build:{outDir:o,modulePreload:!1,emptyOutDir:!1,cssCodeSplit:!1,sourcemap:!1,cssMinify:!0,minify:!0,copyPublicDir:!0,chunkSizeWarningLimit:Fs,rollupOptions:{treeshake:{preset:"recommended"},output:{hoistTransitiveImports:!1,compact:!0}}},customLogger:n,plugins:[Qa(),uo({languageServices:t,useOverviewGraph:s})].concat(r.outputSingleFile?[J0()]:[])}};async function lo({languageServices:t,outDir:e,base:r,webcomponentPrefix:n="likec4",filename:i="likec4-views.js"}){const s=Ss,
721
+ o=Os();return s.info(K.cyan("outDir")+" "+K.dim(e)),{root:o,clearScreen:!1,base:r,configFile:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:Ps()},define:{WEBCOMPONENT_PREFIX:JSON.stringify(n),"process.env.NODE_ENV":'"production"'},esbuild:{...Rs},build:{outDir:e,emptyOutDir:!1,sourcemap:!1,minify:!0,assetsInlineLimit:100*1024,chunkSizeWarningLimit:Fs,lib:{entry:"webcomponent/webcomponent.js",fileName(a,c){return i},formats:["iife"],name:"LikeC4Views"},commonjsOptions:{
722
+ defaultIsModuleExports:a=>a.includes("react")?!0:"auto",requireReturnsDefault:"auto"},rollupOptions:{treeshake:{preset:"recommended"},output:{format:"iife",hoistTransitiveImports:!1,compact:!0}}},customLogger:s,plugins:[uo({languageServices:t,useOverviewGraph:!1})]}}const iy=["favicon.ico","robots.txt"],sy=async({buildWebcomponent:t=!0,webcomponentPrefix:e="likec4",languageServices:r,likec4AssetsDir:n,outputSingleFile:i,...s})=>{n??=await on(Rr(an(),".likec4-assets-"));const{isDev:o,...a}=await co(
723
+ {...s,languageServices:r,likec4AssetsDir:n,webcomponentPrefix:e,outputSingleFile:i}),c=await Is();for(const u of iy){const d=De(a.root,u);Pt(d)&&Ja(d,De(c,u))}const l=await r.diagrams();if(l.length===0)throw process.exitCode=1,new Error("no views found");if(l.forEach(u=>{u.hasLayoutDrift&&a.customLogger.warn(K.yellow("drift detected, manual layout can not be applied, view:")+" "+K.red(u.id))}),t){const u=await lo({webcomponentPrefix:e,languageServices:r,outDir:c,base:a.base});await Fr(u)}if(await Fr(
724
+ {...a,publicDir:c,mode:"production"}),i)for(let u of Yp(De(a.build.outDir)).filter(d=>d!=="index.html"))is(De(a.build.outDir,u),{recursive:!0});else{const u=De(a.build.outDir,"index.html");Pt(u)&&Ja(u,De(a.build.outDir,"404.html"))}};function Oc(t){if(t.resolvedUrls)return Ha(t.resolvedUrls.network)??Ha(t.resolvedUrls.local)}function Ic(t){if(!t.resolvedUrls)throw new Error("Vite server is not ready, no resolvedUrls");zt([K.green("LikeC4 served at:"),"",K.dim("Local: ")+t.resolvedUrls.local.join(
725
+ `
726
+ `+"".padEnd(9," ")),K.dim("Network: ")+t.resolvedUrls.network.join(`
417
727
  `+"".padEnd(9," "))].join(`
418
- `))}class sl extends Error{constructor(e){super(`${e} is locked`)}}const br={old:new Set,young:new Set},uE=1e3*15,Mn=1024,qn=65535;let sn;const cE=()=>{const t=Br.networkInterfaces(),e=new Set([void 0,"0.0.0.0"]);for(const r of Object.values(t))for(const n of r)e.add(n.address);return e},ol=t=>new Promise((e,r)=>{const n=eg.createServer();n.unref(),n.on("error",r),n.listen(t,()=>{const{port:i}=n.address();n.close(()=>{e(i)})})}),al=async(t,e)=>{if(t.host||t.port===0)return ol(t);for(const r of e)try{await ol({port:t.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return t.port},lE=function*(t){t&&(yield*t),yield 0};async function Do(t){let e,r=new Set;if(t&&(t.port&&(e=typeof t.port=="number"?[t.port]:t.port),t.exclude)){const i=t.exclude;if(typeof i[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(const o of i){if(typeof o!="number")throw new TypeError("Each item in the `exclude` option must be a number corresponding 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)}sn===void 0&&(sn=setTimeout(()=>{sn=void 0,br.old=br.young,br.young=new Set},uE),sn.unref&&sn.unref());const n=cE();for(const i of lE(e))try{if(r.has(i))continue;let o=await al({...t,port:i},n);for(;br.old.has(o)||br.young.has(o);){if(i!==0)throw new sl(i);o=await al({...t,port:i},n)}return br.young.add(o),o}catch(o){if(!["EADDRINUSE","EACCES"].includes(o.code)&&!(o instanceof sl))throw o}throw new Error("No available ports found")}function Un(t,e){if(!Number.isInteger(t)||!Number.isInteger(e))throw new TypeError("`from` and `to` must be integer numbers");if(t<Mn||t>qn)throw new RangeError(`'from' must be between ${Mn} and ${qn}`);if(e<Mn||e>qn)throw new RangeError(`'to' must be between ${Mn} and ${qn}`);if(t>e)throw new RangeError("`to` must be greater than or equal to `from`");return function*(n,i){for(let o=n;o<=i;o++)yield o}(t,e)}async function ul({buildWebcomponent:t=!0,hmr:e=!0,webcomponentPrefix:r="likec4",languageServices:n,likec4AssetsDir:i,openBrowser:o,listen:s,...a}){i??=await mn(Lr(gn(),".likec4-assets-"));const{isDev:c,...f}=await _o({...a,languageServices:n,likec4AssetsDir:i,webcomponentPrefix:r}),u=await Do({port:[5173,...Un(61e3,61010),...Un(62002,62010)]}),h=await Do({port:Un(24678,24690)}),d=await Ms();let y;if(t){const v=await wo({webcomponentPrefix:r,languageServices:n,outDir:d,base:f.base});y=kr({...v,logLevel:"warn"}).catch(l=>(mt.warn("webcomponent build failed",l),mt.warn("Ignoring error and continuing"),Promise.resolve()))}const E=await Qm({...f,define:Object.assign({},f.define,e&&{"process.env.NODE_ENV":'"development"'}),mode:e?"development":f.mode,publicDir:d,server:{host:s??"127.0.0.1",port:u,hmr:e&&{overlay:!0,port:h},fs:{strict:!1},open:o??!c}});return await E.listen(),y&&await y,E}async function fE({browserContext:t,views:e,output:r,logger:n,timeout:i,maxAttempts:o,outputType:s,theme:a}){let c;const f=e.map(d=>({view:d,attempt:1})),u=[];let h;for(;h=f.shift();){const{view:d,attempt:y}=h,E=`/export/${encodeURIComponent(d.id)}`;try{if(y>1){c&&(c.close({runBeforeUnload:!0}).catch(g=>n.error(`failed to close page: ${g}`)),c=void 0);const p=gu(y*200,{min:200,max:1e3});n.info(Q.cyan(E)+Q.dim(` attempt ${y} of ${o} after ${p}ms`)),await tg(p)}else d.hasLayoutDrift&&n.warn(Q.yellow("Drift detected, manual layout can not be applied, view may be invalid: ")+Q.red(d.id)),n.info(Q.cyan(E));c??=await t.newPage(),await c.setViewportSize({width:d.bounds.width+20*2,height:d.bounds.height+20*2}),await c.goto(E+`?padding=20&theme=${a}`);const v=c.getByRole("presentation");await v.waitFor(),d.nodes.some(p=>pu(p.icon)&&p.icon.toLowerCase().startsWith("http"))&&await dE(c,i);let l=".";s==="relative"&&(l=d.relativePath??".",l.includes("/")?l=l.slice(0,l.lastIndexOf("/")):l=".");const m=ve(r,l,`${d.id}.png`);await v.screenshot({path:m,omitBackground:!0}),u.push({view:d,path:m})}catch(v){c?.close({runBeforeUnload:!0}).catch(l=>n.error(`failed to close page: ${l}`)),n.error(Q.red("failed "+E+`
419
- `+v)),y<o&&(f.push({view:d,attempt:y+1}),n.info(Q.dim(`retry ${E}`))),c=void 0}}return u}async function dE(t,e){let r=await t.locator("//img").all();if(!r.length)return;const n=r.map(i=>i.evaluate(o=>o.complete||new Promise((s,a)=>{o.onload=s,o.onerror=a}),{timeout:Math.max(3e4,e)}));await Promise.allSettled(n)}async function cl({logger:t,serverUrl:e,theme:r="light",timeoutMs:n=15e3,views:i,output:o,outputType:s="relative",maxAttempts:a=3}){t.info(`${Q.cyan("export output")} ${Q.dim(o)}`),t.info(`${Q.cyan("from server")} ${Q.dim(e)}`);const c=Ou.executablePath();t.info(Q.cyan("Start chromium")),t.info(Q.dim(c));const f=await Ou.launch();t.info(Q.cyan("Color scheme: ")+r);const u=await f.newContext({deviceScaleFactor:2,colorScheme:r,baseURL:e,ignoreHTTPSErrors:!0,reducedMotion:"reduce",isMobile:!1});u.setDefaultNavigationTimeout(n),u.setDefaultTimeout(n);try{return await fE({browserContext:u,views:i,output:o,outputType:s,logger:t,maxAttempts:a,timeout:n,theme:r})}finally{t.info(Q.cyan("close chromium")),await u.close(),await f.close()}}async function ll({path:t,useDotBin:e,theme:r="light",output:n,outputType:i,serverUrl:o,ignore:s=!1,timeoutMs:a=1e4,maxAttempts:c=3}){const f=_t("c4:export"),u=Pm(),h=await wt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});n??=h.workspace;const d=await h.diagrams();if(!Xm(d,1))throw f.warn("no views found"),new Error("no views found");let y;if(!o&&(f.info(Q.cyan("start preview server")),y=await ul({languageServices:h,buildWebcomponent:!1,openBrowser:!1,useOverviewGraph:!1,hmr:!1}),o=nl(y),!o))throw f.error("Vite server is not ready, no resolvedUrls"),new Error("Vite server is not ready, no resolvedUrls");try{const E=await cl({logger:f,serverUrl:o,theme:r,timeoutMs:a,views:d,output:n,outputType:i,maxAttempts:c}),{pretty:v}=Cm(u);if(E.length>0&&f.info(Q.green(`exported ${E.length} views in ${v}`)),E.length!==d.length&&(s&&E.length>0?f.info(Q.dim("ignore")+" "+Q.red(`failed ${d.length-E.length} out of ${d.length} views`)):f.error(Q.red(`failed ${d.length-E.length} out of ${d.length} views`))),E.length!==d.length&&(E.length===0||!s))throw new Error(`Failed ${d.length-E.length} out of ${d.length} views`)}finally{y&&(f.info(Q.cyan("stop server")),await y.close().catch(E=>{f.error(E)}))}}const{cyan:fl,dim:dl}=Q;async function hE({path:t,useDotBin:e,useHashHistory:r,webcomponentPrefix:n,useOverview:i=!1,output:o,outputSingleFile:s,base:a}){const c=_t("c4:build"),f=await wt.fromWorkspace(t,{graphviz:e?"binary":"wasm",logger:"vite"}),u=o??ve(f.workspace,"dist");let h=ve(u,"assets");if(i)try{h=ve(u,"assets","previews"),await Dt(h,{recursive:!0}),c.info(`${fl("Generate previews")} ${dl(h)}
420
- `),await ll({path:t,useDotBin:e,output:h,outputType:"flat",ignore:!0})}catch(d){c.error(Q.red("Failed to generate previews")),c.error(d),c.warn(Q.yellow("Ignore previews and continue build")),ms(h,{recursive:!0,force:!0}),i=!1}await aE({base:a,useHashHistory:s||r,customLogger:c,useOverviewGraph:i,webcomponentPrefix:n,languageServices:f,likec4AssetsDir:h,outputDir:o,outputSingleFile:s}),i&&(c.info(`${fl("clean previews")} ${dl(h)}`),ms(h,{recursive:!0,force:!0}))}const pE={command:"build [path]",aliases:["bundle"],describe:"Build a static website",builder:t=>t.positional("path",In).option("output",{alias:"o",type:"string",desc:"output directory for production build",normalize:!0,coerce:ve}).option("base",vc).option("use-hash-history",Ec).option("use-dot",ut).option("webcomponent-prefix",Ls).option("use-overview",_c).option("output-single-file",S0).example(`${Q.green("$0 build -o ./build ./src")}`,Q.gray("Search for likec4 files in 'src' and output static site to 'build'")),handler:async t=>{await hE({path:t.path,output:t.output,base:t.base,useHashHistory:t["use-hash-history"],useDotBin:t["use-dot"],useOverview:t["use-overview"]??!1,webcomponentPrefix:t["webcomponent-prefix"],outputSingleFile:t["output-single-file"]??!1})}},cr=t=>{const e=typeof t;return t!==null&&(e==="object"||e==="function")},$o=new Set(["__proto__","prototype","constructor"]),mE=new Set("0123456789");function Hn(t){const e=[];let r="",n="start",i=!1;for(const o of t)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($o.has(r))return[];e.push(r),r="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(i){i=!1,r+=o;break}if(n==="property"){if($o.has(r))return[];e.push(r),r=""}n="index";break}case"]":{if(n==="index"){e.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!mE.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($o.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function bo(t,e){if(typeof e!="number"&&Array.isArray(t)){const r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function hl(t,e){if(bo(t,e))throw new Error("Cannot use string index")}function gE(t,e,r){if(!cr(t)||typeof e!="string")return r===void 0?t:r;const n=Hn(e);if(n.length===0)return r;for(let i=0;i<n.length;i++){const o=n[i];if(bo(t,o)?t=i===n.length-1?void 0:null:t=t[o],t==null){if(i!==n.length-1)return r;break}}return t===void 0?r:t}function pl(t,e,r){if(!cr(t)||typeof e!="string")return t;const n=t,i=Hn(e);for(let o=0;o<i.length;o++){const s=i[o];hl(t,s),o===i.length-1?t[s]=r:cr(t[s])||(t[s]=typeof i[o+1]=="number"?[]:{}),t=t[s]}return n}function yE(t,e){if(!cr(t)||typeof e!="string")return!1;const r=Hn(e);for(let n=0;n<r.length;n++){const i=r[n];if(hl(t,i),n===r.length-1)return delete t[i],!0;if(t=t[i],!cr(t))return!1}}function EE(t,e){if(!cr(t)||typeof e!="string")return!1;const r=Hn(e);if(r.length===0)return!1;for(const n of r){if(!cr(t)||!(n in t)||bo(t,n))return!1;t=t[n]}return!0}const qt=Br.homedir(),Ao=Br.tmpdir(),{env:Ar}=Te,vE=t=>{const e=be.join(qt,"Library");return{data:be.join(e,"Application Support",t),config:be.join(e,"Preferences",t),cache:be.join(e,"Caches",t),log:be.join(e,"Logs",t),temp:be.join(Ao,t)}},_E=t=>{const e=Ar.APPDATA||be.join(qt,"AppData","Roaming"),r=Ar.LOCALAPPDATA||be.join(qt,"AppData","Local");return{data:be.join(r,t,"Data"),config:be.join(e,t,"Config"),cache:be.join(r,t,"Cache"),log:be.join(r,t,"Log"),temp:be.join(Ao,t)}},wE=t=>{const e=be.basename(qt);return{data:be.join(Ar.XDG_DATA_HOME||be.join(qt,".local","share"),t),config:be.join(Ar.XDG_CONFIG_HOME||be.join(qt,".config"),t),cache:be.join(Ar.XDG_CACHE_HOME||be.join(qt,".cache"),t),log:be.join(Ar.XDG_STATE_HOME||be.join(qt,".local","state"),t),temp:be.join(Ao,e,t)}};function DE(t,{suffix:e="nodejs"}={}){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);return e&&(t+=`-${e}`),Te.platform==="darwin"?vE(t):Te.platform==="win32"?_E(t):wE(t)}const Ut=(t,e)=>function(...n){return t.apply(void 0,n).catch(e)},Rt=(t,e)=>function(...n){try{return t.apply(void 0,n)}catch(i){return e(i)}},$E=Te.getuid?!Te.getuid():!1,bE=1e4,Je=()=>{},Re={isChangeErrorOk:t=>{if(!Re.isNodeError(t))return!1;const{code:e}=t;return e==="ENOSYS"||!$E&&(e==="EINVAL"||e==="EPERM")},isNodeError:t=>t instanceof Error,isRetriableError:t=>{if(!Re.isNodeError(t))return!1;const{code:e}=t;return e==="EMFILE"||e==="ENFILE"||e==="EAGAIN"||e==="EBUSY"||e==="EACCESS"||e==="EACCES"||e==="EACCS"||e==="EPERM"},onChangeError:t=>{if(!Re.isNodeError(t))throw t;if(!Re.isChangeErrorOk(t))throw t}};class AE{constructor(){this.interval=25,this.intervalId=void 0,this.limit=bE,this.queueActive=new Set,this.queueWaiting=new Set,this.init=()=>{this.intervalId||(this.intervalId=setInterval(this.tick,this.interval))},this.reset=()=>{this.intervalId&&(clearInterval(this.intervalId),delete this.intervalId)},this.add=e=>{this.queueWaiting.add(e),this.queueActive.size<this.limit/2?this.tick():this.init()},this.remove=e=>{this.queueWaiting.delete(e),this.queueActive.delete(e)},this.schedule=()=>new Promise(e=>{const r=()=>this.remove(n),n=()=>e(r);this.add(n)}),this.tick=()=>{if(!(this.queueActive.size>=this.limit)){if(!this.queueWaiting.size)return this.reset();for(const e of this.queueWaiting){if(this.queueActive.size>=this.limit)break;this.queueWaiting.delete(e),this.queueActive.add(e),e()}}}}}const CE=new AE,Ht=(t,e)=>function(n){return function i(...o){return CE.schedule().then(s=>{const a=f=>(s(),f),c=f=>{if(s(),Date.now()>=n)throw f;if(e(f)){const u=Math.round(100*Math.random());return new Promise(d=>setTimeout(d,u)).then(()=>i.apply(void 0,o))}throw f};return t.apply(void 0,o).then(a,c)})}},Vt=(t,e)=>function(n){return function i(...o){try{return t.apply(void 0,o)}catch(s){if(Date.now()>n)throw s;if(e(s))return i.apply(void 0,o);throw s}}},qe={attempt:{chmod:Ut(Me(ge.chmod),Re.onChangeError),chown:Ut(Me(ge.chown),Re.onChangeError),close:Ut(Me(ge.close),Je),fsync:Ut(Me(ge.fsync),Je),mkdir:Ut(Me(ge.mkdir),Je),realpath:Ut(Me(ge.realpath),Je),stat:Ut(Me(ge.stat),Je),unlink:Ut(Me(ge.unlink),Je),chmodSync:Rt(ge.chmodSync,Re.onChangeError),chownSync:Rt(ge.chownSync,Re.onChangeError),closeSync:Rt(ge.closeSync,Je),existsSync:Rt(ge.existsSync,Je),fsyncSync:Rt(ge.fsync,Je),mkdirSync:Rt(ge.mkdirSync,Je),realpathSync:Rt(ge.realpathSync,Je),statSync:Rt(ge.statSync,Je),unlinkSync:Rt(ge.unlinkSync,Je)},retry:{close:Ht(Me(ge.close),Re.isRetriableError),fsync:Ht(Me(ge.fsync),Re.isRetriableError),open:Ht(Me(ge.open),Re.isRetriableError),readFile:Ht(Me(ge.readFile),Re.isRetriableError),rename:Ht(Me(ge.rename),Re.isRetriableError),stat:Ht(Me(ge.stat),Re.isRetriableError),write:Ht(Me(ge.write),Re.isRetriableError),writeFile:Ht(Me(ge.writeFile),Re.isRetriableError),closeSync:Vt(ge.closeSync,Re.isRetriableError),fsyncSync:Vt(ge.fsyncSync,Re.isRetriableError),openSync:Vt(ge.openSync,Re.isRetriableError),readFileSync:Vt(ge.readFileSync,Re.isRetriableError),renameSync:Vt(ge.renameSync,Re.isRetriableError),statSync:Vt(ge.statSync,Re.isRetriableError),writeSync:Vt(ge.writeSync,Re.isRetriableError),writeFileSync:Vt(ge.writeFileSync,Re.isRetriableError)}},SE="utf8",ml=438,RE=511,OE={},FE=Br.userInfo().uid,IE=Br.userInfo().gid,PE=1e3,NE=!!Te.getuid;Te.getuid&&Te.getuid();const gl=128,TE=t=>t instanceof Error&&"code"in t,yl=t=>typeof t=="string",Co=t=>t===void 0,jE=Te.platform==="linux",El=Te.platform==="win32",So=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];El||So.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),jE&&So.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");class LE{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=e=>{if(!this.exited){this.exited=!0;for(const r of this.callbacks)r();e&&(El&&e!=="SIGINT"&&e!=="SIGTERM"&&e!=="SIGKILL"?Te.kill(Te.pid,"SIGTERM"):Te.kill(Te.pid,e))}},this.hook=()=>{Te.once("exit",()=>this.exit());for(const e of So)try{Te.once(e,()=>this.exit(e))}catch{}},this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}}const xE=new LE,BE=xE.register,Ue={store:{},create:t=>{const e=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),i=`.tmp-${Date.now().toString().slice(-10)}${e}`;return`${t}${i}`},get:(t,e,r=!0)=>{const n=Ue.truncate(e(t));return n in Ue.store?Ue.get(t,e,r):(Ue.store[n]=r,[n,()=>delete Ue.store[n]])},purge:t=>{Ue.store[t]&&(delete Ue.store[t],qe.attempt.unlink(t))},purgeSync:t=>{Ue.store[t]&&(delete Ue.store[t],qe.attempt.unlinkSync(t))},purgeSyncAll:()=>{for(const t in Ue.store)Ue.purgeSync(t)},truncate:t=>{const e=be.basename(t);if(e.length<=gl)return t;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(e);if(!r)return t;const n=e.length-gl;return`${t.slice(0,-e.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};BE(Ue.purgeSyncAll);function vl(t,e,r=OE){if(yl(r))return vl(t,e,{encoding:r});const n=Date.now()+((r.timeout??PE)||-1);let i=null,o=null,s=null;try{const a=qe.attempt.realpathSync(t),c=!!a;t=a||t,[o,i]=Ue.get(t,r.tmpCreate||Ue.create,r.tmpPurge!==!1);const f=NE&&Co(r.chown),u=Co(r.mode);if(c&&(f||u)){const h=qe.attempt.statSync(t);h&&(r={...r},f&&(r.chown={uid:h.uid,gid:h.gid}),u&&(r.mode=h.mode))}if(!c){const h=be.dirname(t);qe.attempt.mkdirSync(h,{mode:RE,recursive:!0})}s=qe.retry.openSync(n)(o,"w",r.mode||ml),r.tmpCreated&&r.tmpCreated(o),yl(e)?qe.retry.writeSync(n)(s,e,0,r.encoding||SE):Co(e)||qe.retry.writeSync(n)(s,e,0,e.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?qe.retry.fsyncSync(n)(s):qe.attempt.fsync(s)),qe.retry.closeSync(n)(s),s=null,r.chown&&(r.chown.uid!==FE||r.chown.gid!==IE)&&qe.attempt.chownSync(o,r.chown.uid,r.chown.gid),r.mode&&r.mode!==ml&&qe.attempt.chmodSync(o,r.mode);try{qe.retry.renameSync(n)(o,t)}catch(h){if(!TE(h)||h.code!=="ENAMETOOLONG")throw h;qe.retry.renameSync(n)(o,Ue.truncate(t))}i(),o=null}finally{s&&qe.attempt.closeSync(s),o&&Ue.purge(o)}}var Vn={exports:{}},Ro={},Ot={},lr={},Oo={},Fo={},Io={},_l;function zn(){return _l||(_l=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(p){if(super(),!t.IDENTIFIER.test(p))throw new Error("CodeGen: name must be a valid identifier");this.str=p}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(p){super(),this._items=typeof p=="string"?[p]:p}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const p=this._items[0];return p===""||p==='""'}get str(){var p;return(p=this._str)!==null&&p!==void 0?p:this._str=this._items.reduce((g,_)=>`${g}${_}`,"")}get names(){var p;return(p=this._names)!==null&&p!==void 0?p:this._names=this._items.reduce((g,_)=>(_ instanceof r&&(g[_.str]=(g[_.str]||0)+1),g),{})}}t._Code=n,t.nil=new n("");function i(m,...p){const g=[m[0]];let _=0;for(;_<p.length;)a(g,p[_]),g.push(m[++_]);return new n(g)}t._=i;const o=new n("+");function s(m,...p){const g=[y(m[0])];let _=0;for(;_<p.length;)g.push(o),a(g,p[_]),g.push(o,y(m[++_]));return c(g),new n(g)}t.str=s;function a(m,p){p instanceof n?m.push(...p._items):p instanceof r?m.push(p):m.push(h(p))}t.addCodeArg=a;function c(m){let p=1;for(;p<m.length-1;){if(m[p]===o){const g=f(m[p-1],m[p+1]);if(g!==void 0){m.splice(p-1,3,g);continue}m[p++]="+"}p++}}function f(m,p){if(p==='""')return m;if(m==='""')return p;if(typeof m=="string")return p instanceof r||m[m.length-1]!=='"'?void 0:typeof p!="string"?`${m.slice(0,-1)}${p}"`:p[0]==='"'?m.slice(0,-1)+p.slice(1):void 0;if(typeof p=="string"&&p[0]==='"'&&!(m instanceof r))return`"${m}${p.slice(1)}`}function u(m,p){return p.emptyStr()?m:m.emptyStr()?p:s`${m}${p}`}t.strConcat=u;function h(m){return typeof m=="number"||typeof m=="boolean"||m===null?m:y(Array.isArray(m)?m.join(","):m)}function d(m){return new n(y(m))}t.stringify=d;function y(m){return JSON.stringify(m).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=y;function E(m){return typeof m=="string"&&t.IDENTIFIER.test(m)?new n(`.${m}`):i`[${m}]`}t.getProperty=E;function v(m){if(typeof m=="string"&&t.IDENTIFIER.test(m))return new n(`${m}`);throw new Error(`CodeGen: invalid export name: ${m}, use explicit $id name mapping`)}t.getEsmExportName=v;function l(m){return new n(m.toString())}t.regexpCode=l}(Io)),Io}var Po={},wl;function Dl(){return wl||(wl=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=zn();class r extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class i{constructor({prefixes:f,parent:u}={}){this._names={},this._prefixes=f,this._parent=u}toName(f){return f instanceof e.Name?f:this.name(f)}name(f){return new e.Name(this._newName(f))}_newName(f){const u=this._names[f]||this._nameGroup(f);return`${f}${u.index++}`}_nameGroup(f){var u,h;if(!((h=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||h===void 0)&&h.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}t.Scope=i;class o extends e.Name{constructor(f,u){super(u),this.prefix=f}setValue(f,{property:u,itemIndex:h}){this.value=f,this.scopePath=(0,e._)`.${new e.Name(u)}[${h}]`}}t.ValueScopeName=o;const s=(0,e._)`\n`;class a extends i{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?s:e.nil}}get(){return this._scope}name(f){return new o(f,this._newName(f))}value(f,u){var h;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const d=this.toName(f),{prefix:y}=d,E=(h=u.key)!==null&&h!==void 0?h:u.ref;let v=this._values[y];if(v){const p=v.get(E);if(p)return p}else v=this._values[y]=new Map;v.set(E,d);const l=this._scope[y]||(this._scope[y]=[]),m=l.length;return l[m]=u.ref,d.setValue(u,{property:y,itemIndex:m}),d}getValue(f,u){const h=this._values[f];if(h)return h.get(u)}scopeRefs(f,u=this._values){return this._reduceValues(u,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,e._)`${f}${h.scopePath}`})}scopeCode(f=this._values,u,h){return this._reduceValues(f,d=>{if(d.value===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return d.value.code},u,h)}_reduceValues(f,u,h={},d){let y=e.nil;for(const E in f){const v=f[E];if(!v)continue;const l=h[E]=h[E]||new Map;v.forEach(m=>{if(l.has(m))return;l.set(m,n.Started);let p=u(m);if(p){const g=this.opts.es5?t.varKinds.var:t.varKinds.const;y=(0,e._)`${y}${g} ${m} = ${p};${this.opts._n}`}else if(p=d?.(m))y=(0,e._)`${y}${p}${this.opts._n}`;else throw new r(m);l.set(m,n.Completed)})}return y}}t.ValueScope=a}(Po)),Po}var $l;function pe(){return $l||($l=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=zn(),r=Dl();var n=zn();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var i=Dl();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class o{optimizeNodes(){return this}optimizeNames(A,b){return this}}class s extends o{constructor(A,b,C){super(),this.varKind=A,this.name=b,this.rhs=C}render({es5:A,_n:b}){const C=A?r.varKinds.var:this.varKind,W=this.rhs===void 0?"":` = ${this.rhs}`;return`${C} ${this.name}${W};`+b}optimizeNames(A,b){if(A[this.name.str])return this.rhs&&(this.rhs=L(this.rhs,A,b)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class a extends o{constructor(A,b,C){super(),this.lhs=A,this.rhs=b,this.sideEffects=C}render({_n:A}){return`${this.lhs} = ${this.rhs};`+A}optimizeNames(A,b){if(!(this.lhs instanceof e.Name&&!A[this.lhs.str]&&!this.sideEffects))return this.rhs=L(this.rhs,A,b),this}get names(){const A=this.lhs instanceof e.Name?{}:{...this.lhs.names};return T(A,this.rhs)}}class c extends a{constructor(A,b,C,W){super(A,C,W),this.op=b}render({_n:A}){return`${this.lhs} ${this.op}= ${this.rhs};`+A}}class f extends o{constructor(A){super(),this.label=A,this.names={}}render({_n:A}){return`${this.label}:`+A}}class u extends o{constructor(A){super(),this.label=A,this.names={}}render({_n:A}){return`break${this.label?` ${this.label}`:""};`+A}}class h extends o{constructor(A){super(),this.error=A}render({_n:A}){return`throw ${this.error};`+A}get names(){return this.error.names}}class d extends o{constructor(A){super(),this.code=A}render({_n:A}){return`${this.code};`+A}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(A,b){return this.code=L(this.code,A,b),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class y extends o{constructor(A=[]){super(),this.nodes=A}render(A){return this.nodes.reduce((b,C)=>b+C.render(A),"")}optimizeNodes(){const{nodes:A}=this;let b=A.length;for(;b--;){const C=A[b].optimizeNodes();Array.isArray(C)?A.splice(b,1,...C):C?A[b]=C:A.splice(b,1)}return A.length>0?this:void 0}optimizeNames(A,b){const{nodes:C}=this;let W=C.length;for(;W--;){const Y=C[W];Y.optimizeNames(A,b)||(q(A,Y.names),C.splice(W,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((A,b)=>B(A,b.names),{})}}class E extends y{render(A){return"{"+A._n+super.render(A)+"}"+A._n}}class v extends y{}class l extends E{}l.kind="else";class m extends E{constructor(A,b){super(b),this.condition=A}render(A){let b=`if(${this.condition})`+super.render(A);return this.else&&(b+="else "+this.else.render(A)),b}optimizeNodes(){super.optimizeNodes();const A=this.condition;if(A===!0)return this.nodes;let b=this.else;if(b){const C=b.optimizeNodes();b=this.else=Array.isArray(C)?new l(C):C}if(b)return A===!1?b instanceof m?b:b.nodes:this.nodes.length?this:new m(X(A),b instanceof m?[b]:b.nodes);if(!(A===!1||!this.nodes.length))return this}optimizeNames(A,b){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(A,b),!!(super.optimizeNames(A,b)||this.else))return this.condition=L(this.condition,A,b),this}get names(){const A=super.names;return T(A,this.condition),this.else&&B(A,this.else.names),A}}m.kind="if";class p extends E{}p.kind="for";class g extends p{constructor(A){super(),this.iteration=A}render(A){return`for(${this.iteration})`+super.render(A)}optimizeNames(A,b){if(super.optimizeNames(A,b))return this.iteration=L(this.iteration,A,b),this}get names(){return B(super.names,this.iteration.names)}}class _ extends p{constructor(A,b,C,W){super(),this.varKind=A,this.name=b,this.from=C,this.to=W}render(A){const b=A.es5?r.varKinds.var:this.varKind,{name:C,from:W,to:Y}=this;return`for(${b} ${C}=${W}; ${C}<${Y}; ${C}++)`+super.render(A)}get names(){const A=T(super.names,this.from);return T(A,this.to)}}class w extends p{constructor(A,b,C,W){super(),this.loop=A,this.varKind=b,this.name=C,this.iterable=W}render(A){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(A)}optimizeNames(A,b){if(super.optimizeNames(A,b))return this.iterable=L(this.iterable,A,b),this}get names(){return B(super.names,this.iterable.names)}}class D extends E{constructor(A,b,C){super(),this.name=A,this.args=b,this.async=C}render(A){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(A)}}D.kind="func";class $ extends y{render(A){return"return "+super.render(A)}}$.kind="return";class F extends E{render(A){let b="try"+super.render(A);return this.catch&&(b+=this.catch.render(A)),this.finally&&(b+=this.finally.render(A)),b}optimizeNodes(){var A,b;return super.optimizeNodes(),(A=this.catch)===null||A===void 0||A.optimizeNodes(),(b=this.finally)===null||b===void 0||b.optimizeNodes(),this}optimizeNames(A,b){var C,W;return super.optimizeNames(A,b),(C=this.catch)===null||C===void 0||C.optimizeNames(A,b),(W=this.finally)===null||W===void 0||W.optimizeNames(A,b),this}get names(){const A=super.names;return this.catch&&B(A,this.catch.names),this.finally&&B(A,this.finally.names),A}}class M extends E{constructor(A){super(),this.error=A}render(A){return`catch(${this.error})`+super.render(A)}}M.kind="catch";class U extends E{render(A){return"finally"+super.render(A)}}U.kind="finally";class j{constructor(A,b={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...b,_n:b.lines?`
421
- `:""},this._extScope=A,this._scope=new r.Scope({parent:A}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(A){return this._scope.name(A)}scopeName(A){return this._extScope.name(A)}scopeValue(A,b){const C=this._extScope.value(A,b);return(this._values[C.prefix]||(this._values[C.prefix]=new Set)).add(C),C}getScopeValue(A,b){return this._extScope.getValue(A,b)}scopeRefs(A){return this._extScope.scopeRefs(A,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(A,b,C,W){const Y=this._scope.toName(b);return C!==void 0&&W&&(this._constants[Y.str]=C),this._leafNode(new s(A,Y,C)),Y}const(A,b,C){return this._def(r.varKinds.const,A,b,C)}let(A,b,C){return this._def(r.varKinds.let,A,b,C)}var(A,b,C){return this._def(r.varKinds.var,A,b,C)}assign(A,b,C){return this._leafNode(new a(A,b,C))}add(A,b){return this._leafNode(new c(A,t.operators.ADD,b))}code(A){return typeof A=="function"?A():A!==e.nil&&this._leafNode(new d(A)),this}object(...A){const b=["{"];for(const[C,W]of A)b.length>1&&b.push(","),b.push(C),(C!==W||this.opts.es5)&&(b.push(":"),(0,e.addCodeArg)(b,W));return b.push("}"),new e._Code(b)}if(A,b,C){if(this._blockNode(new m(A)),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(A){return this._elseNode(new m(A))}else(){return this._elseNode(new l)}endIf(){return this._endBlockNode(m,l)}_for(A,b){return this._blockNode(A),b&&this.code(b).endFor(),this}for(A,b){return this._for(new g(A),b)}forRange(A,b,C,W,Y=this.opts.es5?r.varKinds.var:r.varKinds.let){const se=this._scope.toName(A);return this._for(new _(Y,se,b,C),()=>W(se))}forOf(A,b,C,W=r.varKinds.const){const Y=this._scope.toName(A);if(this.opts.es5){const se=b instanceof e.Name?b:this.var("_arr",b);return this.forRange("_i",0,(0,e._)`${se}.length`,ae=>{this.var(Y,(0,e._)`${se}[${ae}]`),C(Y)})}return this._for(new w("of",W,Y,b),()=>C(Y))}forIn(A,b,C,W=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(A,(0,e._)`Object.keys(${b})`,C);const Y=this._scope.toName(A);return this._for(new w("in",W,Y,b),()=>C(Y))}endFor(){return this._endBlockNode(p)}label(A){return this._leafNode(new f(A))}break(A){return this._leafNode(new u(A))}return(A){const b=new $;if(this._blockNode(b),this.code(A),b.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}try(A,b,C){if(!b&&!C)throw new Error('CodeGen: "try" without "catch" and "finally"');const W=new F;if(this._blockNode(W),this.code(A),b){const Y=this.name("e");this._currNode=W.catch=new M(Y),b(Y)}return C&&(this._currNode=W.finally=new U,this.code(C)),this._endBlockNode(M,U)}throw(A){return this._leafNode(new h(A))}block(A,b){return this._blockStarts.push(this._nodes.length),A&&this.code(A).endBlock(b),this}endBlock(A){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||A!==void 0&&C!==A)throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${A} expected`);return this._nodes.length=b,this}func(A,b=e.nil,C,W){return this._blockNode(new D(A,b,C)),W&&this.code(W).endFunc(),this}endFunc(){return this._endBlockNode(D)}optimize(A=1){for(;A-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(A){return this._currNode.nodes.push(A),this}_blockNode(A){this._currNode.nodes.push(A),this._nodes.push(A)}_endBlockNode(A,b){const C=this._currNode;if(C instanceof A||b&&C instanceof b)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${b?`${A.kind}/${b.kind}`:A.kind}"`)}_elseNode(A){const b=this._currNode;if(!(b instanceof m))throw new Error('CodeGen: "else" without "if"');return this._currNode=b.else=A,this}get _root(){return this._nodes[0]}get _currNode(){const A=this._nodes;return A[A.length-1]}set _currNode(A){const b=this._nodes;b[b.length-1]=A}}t.CodeGen=j;function B(k,A){for(const b in A)k[b]=(k[b]||0)+(A[b]||0);return k}function T(k,A){return A instanceof e._CodeOrName?B(k,A.names):k}function L(k,A,b){if(k instanceof e.Name)return C(k);if(!W(k))return k;return new e._Code(k._items.reduce((Y,se)=>(se instanceof e.Name&&(se=C(se)),se instanceof e._Code?Y.push(...se._items):Y.push(se),Y),[]));function C(Y){const se=b[Y.str];return se===void 0||A[Y.str]!==1?Y:(delete A[Y.str],se)}function W(Y){return Y instanceof e._Code&&Y._items.some(se=>se instanceof e.Name&&A[se.str]===1&&b[se.str]!==void 0)}}function q(k,A){for(const b in A)k[b]=(k[b]||0)-(A[b]||0)}function X(k){return typeof k=="boolean"||typeof k=="number"||k===null?!k:(0,e._)`!${V(k)}`}t.not=X;const G=S(t.operators.AND);function Z(...k){return k.reduce(G)}t.and=Z;const oe=S(t.operators.OR);function H(...k){return k.reduce(oe)}t.or=H;function S(k){return(A,b)=>A===e.nil?b:b===e.nil?A:(0,e._)`${V(A)} ${k} ${V(b)}`}function V(k){return k instanceof e.Name?k:(0,e._)`(${k})`}}(Fo)),Fo}var Ee={},bl;function De(){if(bl)return Ee;bl=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.checkStrictMode=Ee.getErrorPath=Ee.Type=Ee.useFunc=Ee.setEvaluated=Ee.evaluatedPropsToName=Ee.mergeEvaluated=Ee.eachItem=Ee.unescapeJsonPointer=Ee.escapeJsonPointer=Ee.escapeFragment=Ee.unescapeFragment=Ee.schemaRefOrVal=Ee.schemaHasRulesButRef=Ee.schemaHasRules=Ee.checkUnknownRules=Ee.alwaysValidSchema=Ee.toHash=void 0;const t=pe(),e=zn();function r(w){const D={};for(const $ of w)D[$]=!0;return D}Ee.toHash=r;function n(w,D){return typeof D=="boolean"?D:Object.keys(D).length===0?!0:(i(w,D),!o(D,w.self.RULES.all))}Ee.alwaysValidSchema=n;function i(w,D=w.schema){const{opts:$,self:F}=w;if(!$.strictSchema||typeof D=="boolean")return;const M=F.RULES.keywords;for(const U in D)M[U]||_(w,`unknown keyword: "${U}"`)}Ee.checkUnknownRules=i;function o(w,D){if(typeof w=="boolean")return!w;for(const $ in w)if(D[$])return!0;return!1}Ee.schemaHasRules=o;function s(w,D){if(typeof w=="boolean")return!w;for(const $ in w)if($!=="$ref"&&D.all[$])return!0;return!1}Ee.schemaHasRulesButRef=s;function a({topSchemaRef:w,schemaPath:D},$,F,M){if(!M){if(typeof $=="number"||typeof $=="boolean")return $;if(typeof $=="string")return(0,t._)`${$}`}return(0,t._)`${w}${D}${(0,t.getProperty)(F)}`}Ee.schemaRefOrVal=a;function c(w){return h(decodeURIComponent(w))}Ee.unescapeFragment=c;function f(w){return encodeURIComponent(u(w))}Ee.escapeFragment=f;function u(w){return typeof w=="number"?`${w}`:w.replace(/~/g,"~0").replace(/\//g,"~1")}Ee.escapeJsonPointer=u;function h(w){return w.replace(/~1/g,"/").replace(/~0/g,"~")}Ee.unescapeJsonPointer=h;function d(w,D){if(Array.isArray(w))for(const $ of w)D($);else D(w)}Ee.eachItem=d;function y({mergeNames:w,mergeToName:D,mergeValues:$,resultToName:F}){return(M,U,j,B)=>{const T=j===void 0?U:j instanceof t.Name?(U instanceof t.Name?w(M,U,j):D(M,U,j),j):U instanceof t.Name?(D(M,j,U),U):$(U,j);return B===t.Name&&!(T instanceof t.Name)?F(M,T):T}}Ee.mergeEvaluated={props:y({mergeNames:(w,D,$)=>w.if((0,t._)`${$} !== true && ${D} !== undefined`,()=>{w.if((0,t._)`${D} === true`,()=>w.assign($,!0),()=>w.assign($,(0,t._)`${$} || {}`).code((0,t._)`Object.assign(${$}, ${D})`))}),mergeToName:(w,D,$)=>w.if((0,t._)`${$} !== true`,()=>{D===!0?w.assign($,!0):(w.assign($,(0,t._)`${$} || {}`),v(w,$,D))}),mergeValues:(w,D)=>w===!0?!0:{...w,...D},resultToName:E}),items:y({mergeNames:(w,D,$)=>w.if((0,t._)`${$} !== true && ${D} !== undefined`,()=>w.assign($,(0,t._)`${D} === true ? true : ${$} > ${D} ? ${$} : ${D}`)),mergeToName:(w,D,$)=>w.if((0,t._)`${$} !== true`,()=>w.assign($,D===!0?!0:(0,t._)`${$} > ${D} ? ${$} : ${D}`)),mergeValues:(w,D)=>w===!0?!0:Math.max(w,D),resultToName:(w,D)=>w.var("items",D)})};function E(w,D){if(D===!0)return w.var("props",!0);const $=w.var("props",(0,t._)`{}`);return D!==void 0&&v(w,$,D),$}Ee.evaluatedPropsToName=E;function v(w,D,$){Object.keys($).forEach(F=>w.assign((0,t._)`${D}${(0,t.getProperty)(F)}`,!0))}Ee.setEvaluated=v;const l={};function m(w,D){return w.scopeValue("func",{ref:D,code:l[D.code]||(l[D.code]=new e._Code(D.code))})}Ee.useFunc=m;var p;(function(w){w[w.Num=0]="Num",w[w.Str=1]="Str"})(p||(Ee.Type=p={}));function g(w,D,$){if(w instanceof t.Name){const F=D===p.Num;return $?F?(0,t._)`"[" + ${w} + "]"`:(0,t._)`"['" + ${w} + "']"`:F?(0,t._)`"/" + ${w}`:(0,t._)`"/" + ${w}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return $?(0,t.getProperty)(w).toString():"/"+u(w)}Ee.getErrorPath=g;function _(w,D,$=w.opts.strictSchema){if($){if(D=`strict mode: ${D}`,$===!0)throw new Error(D);w.self.logger.warn(D)}}return Ee.checkStrictMode=_,Ee}var Gn={},Al;function lt(){if(Al)return Gn;Al=1,Object.defineProperty(Gn,"__esModule",{value:!0});const t=pe(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return Gn.default=e,Gn}var Cl;function Wn(){return Cl||(Cl=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=pe(),r=De(),n=lt();t.keywordError={message:({keyword:l})=>(0,e.str)`must pass "${l}" keyword validation`},t.keyword$DataError={message:({keyword:l,schemaType:m})=>m?(0,e.str)`"${l}" keyword must be ${m} ($data)`:(0,e.str)`"${l}" keyword is invalid ($data)`};function i(l,m=t.keywordError,p,g){const{it:_}=l,{gen:w,compositeRule:D,allErrors:$}=_,F=h(l,m,p);g??(D||$)?c(w,F):f(_,(0,e._)`[${F}]`)}t.reportError=i;function o(l,m=t.keywordError,p){const{it:g}=l,{gen:_,compositeRule:w,allErrors:D}=g,$=h(l,m,p);c(_,$),w||D||f(g,n.default.vErrors)}t.reportExtraError=o;function s(l,m){l.assign(n.default.errors,m),l.if((0,e._)`${n.default.vErrors} !== null`,()=>l.if(m,()=>l.assign((0,e._)`${n.default.vErrors}.length`,m),()=>l.assign(n.default.vErrors,null)))}t.resetErrorsCount=s;function a({gen:l,keyword:m,schemaValue:p,data:g,errsCount:_,it:w}){if(_===void 0)throw new Error("ajv implementation error");const D=l.name("err");l.forRange("i",_,n.default.errors,$=>{l.const(D,(0,e._)`${n.default.vErrors}[${$}]`),l.if((0,e._)`${D}.instancePath === undefined`,()=>l.assign((0,e._)`${D}.instancePath`,(0,e.strConcat)(n.default.instancePath,w.errorPath))),l.assign((0,e._)`${D}.schemaPath`,(0,e.str)`${w.errSchemaPath}/${m}`),w.opts.verbose&&(l.assign((0,e._)`${D}.schema`,p),l.assign((0,e._)`${D}.data`,g))})}t.extendErrors=a;function c(l,m){const p=l.const("err",m);l.if((0,e._)`${n.default.vErrors} === null`,()=>l.assign(n.default.vErrors,(0,e._)`[${p}]`),(0,e._)`${n.default.vErrors}.push(${p})`),l.code((0,e._)`${n.default.errors}++`)}function f(l,m){const{gen:p,validateName:g,schemaEnv:_}=l;_.$async?p.throw((0,e._)`new ${l.ValidationError}(${m})`):(p.assign((0,e._)`${g}.errors`,m),p.return(!1))}const u={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function h(l,m,p){const{createErrors:g}=l.it;return g===!1?(0,e._)`{}`:d(l,m,p)}function d(l,m,p={}){const{gen:g,it:_}=l,w=[y(_,p),E(l,p)];return v(l,m,w),g.object(...w)}function y({errorPath:l},{instancePath:m}){const p=m?(0,e.str)`${l}${(0,r.getErrorPath)(m,r.Type.Str)}`:l;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,p)]}function E({keyword:l,it:{errSchemaPath:m}},{schemaPath:p,parentSchema:g}){let _=g?m:(0,e.str)`${m}/${l}`;return p&&(_=(0,e.str)`${_}${(0,r.getErrorPath)(p,r.Type.Str)}`),[u.schemaPath,_]}function v(l,{params:m,message:p},g){const{keyword:_,data:w,schemaValue:D,it:$}=l,{opts:F,propertyName:M,topSchemaRef:U,schemaPath:j}=$;g.push([u.keyword,_],[u.params,typeof m=="function"?m(l):m||(0,e._)`{}`]),F.messages&&g.push([u.message,typeof p=="function"?p(l):p]),F.verbose&&g.push([u.schema,D],[u.parentSchema,(0,e._)`${U}${j}`],[n.default.data,w]),M&&g.push([u.propertyName,M])}}(Oo)),Oo}var Sl;function kE(){if(Sl)return lr;Sl=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.boolOrEmptySchema=lr.topBoolOrEmptySchema=void 0;const t=Wn(),e=pe(),r=lt(),n={message:"boolean schema is false"};function i(a){const{gen:c,schema:f,validateName:u}=a;f===!1?s(a,!1):typeof f=="object"&&f.$async===!0?c.return(r.default.data):(c.assign((0,e._)`${u}.errors`,null),c.return(!0))}lr.topBoolOrEmptySchema=i;function o(a,c){const{gen:f,schema:u}=a;u===!1?(f.var(c,!1),s(a)):f.var(c,!0)}lr.boolOrEmptySchema=o;function s(a,c){const{gen:f,data:u}=a,h={gen:f,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,t.reportError)(h,n,void 0,c)}return lr}var ke={},fr={},Rl;function Ol(){if(Rl)return fr;Rl=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.getRules=fr.isJSONType=void 0;const t=["string","number","integer","boolean","null","object","array"],e=new Set(t);function r(i){return typeof i=="string"&&e.has(i)}fr.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 fr.getRules=n,fr}var Ft={},Fl;function Il(){if(Fl)return Ft;Fl=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.shouldUseRule=Ft.shouldUseGroup=Ft.schemaHasRulesForType=void 0;function t({schema:n,self:i},o){const s=i.RULES.types[o];return s&&s!==!0&&e(n,s)}Ft.schemaHasRulesForType=t;function e(n,i){return i.rules.some(o=>r(n,o))}Ft.shouldUseGroup=e;function r(n,i){var o;return n[i.keyword]!==void 0||((o=i.definition.implements)===null||o===void 0?void 0:o.some(s=>n[s]!==void 0))}return Ft.shouldUseRule=r,Ft}var Pl;function Kn(){if(Pl)return ke;Pl=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.reportTypeError=ke.checkDataTypes=ke.checkDataType=ke.coerceAndCheckDataType=ke.getJSONTypes=ke.getSchemaTypes=ke.DataType=void 0;const t=Ol(),e=Il(),r=Wn(),n=pe(),i=De();var o;(function(p){p[p.Correct=0]="Correct",p[p.Wrong=1]="Wrong"})(o||(ke.DataType=o={}));function s(p){const g=a(p.type);if(g.includes("null")){if(p.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!g.length&&p.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');p.nullable===!0&&g.push("null")}return g}ke.getSchemaTypes=s;function a(p){const g=Array.isArray(p)?p:p?[p]:[];if(g.every(t.isJSONType))return g;throw new Error("type must be JSONType or JSONType[]: "+g.join(","))}ke.getJSONTypes=a;function c(p,g){const{gen:_,data:w,opts:D}=p,$=u(g,D.coerceTypes),F=g.length>0&&!($.length===0&&g.length===1&&(0,e.schemaHasRulesForType)(p,g[0]));if(F){const M=E(g,w,D.strictNumbers,o.Wrong);_.if(M,()=>{$.length?h(p,g,$):l(p)})}return F}ke.coerceAndCheckDataType=c;const f=new Set(["string","number","integer","boolean","null"]);function u(p,g){return g?p.filter(_=>f.has(_)||g==="array"&&_==="array"):[]}function h(p,g,_){const{gen:w,data:D,opts:$}=p,F=w.let("dataType",(0,n._)`typeof ${D}`),M=w.let("coerced",(0,n._)`undefined`);$.coerceTypes==="array"&&w.if((0,n._)`${F} == 'object' && Array.isArray(${D}) && ${D}.length == 1`,()=>w.assign(D,(0,n._)`${D}[0]`).assign(F,(0,n._)`typeof ${D}`).if(E(g,D,$.strictNumbers),()=>w.assign(M,D))),w.if((0,n._)`${M} !== undefined`);for(const j of _)(f.has(j)||j==="array"&&$.coerceTypes==="array")&&U(j);w.else(),l(p),w.endIf(),w.if((0,n._)`${M} !== undefined`,()=>{w.assign(D,M),d(p,M)});function U(j){switch(j){case"string":w.elseIf((0,n._)`${F} == "number" || ${F} == "boolean"`).assign(M,(0,n._)`"" + ${D}`).elseIf((0,n._)`${D} === null`).assign(M,(0,n._)`""`);return;case"number":w.elseIf((0,n._)`${F} == "boolean" || ${D} === null
422
- || (${F} == "string" && ${D} && ${D} == +${D})`).assign(M,(0,n._)`+${D}`);return;case"integer":w.elseIf((0,n._)`${F} === "boolean" || ${D} === null
423
- || (${F} === "string" && ${D} && ${D} == +${D} && !(${D} % 1))`).assign(M,(0,n._)`+${D}`);return;case"boolean":w.elseIf((0,n._)`${D} === "false" || ${D} === 0 || ${D} === null`).assign(M,!1).elseIf((0,n._)`${D} === "true" || ${D} === 1`).assign(M,!0);return;case"null":w.elseIf((0,n._)`${D} === "" || ${D} === 0 || ${D} === false`),w.assign(M,null);return;case"array":w.elseIf((0,n._)`${F} === "string" || ${F} === "number"
424
- || ${F} === "boolean" || ${D} === null`).assign(M,(0,n._)`[${D}]`)}}}function d({gen:p,parentData:g,parentDataProperty:_},w){p.if((0,n._)`${g} !== undefined`,()=>p.assign((0,n._)`${g}[${_}]`,w))}function y(p,g,_,w=o.Correct){const D=w===o.Correct?n.operators.EQ:n.operators.NEQ;let $;switch(p){case"null":return(0,n._)`${g} ${D} null`;case"array":$=(0,n._)`Array.isArray(${g})`;break;case"object":$=(0,n._)`${g} && typeof ${g} == "object" && !Array.isArray(${g})`;break;case"integer":$=F((0,n._)`!(${g} % 1) && !isNaN(${g})`);break;case"number":$=F();break;default:return(0,n._)`typeof ${g} ${D} ${p}`}return w===o.Correct?$:(0,n.not)($);function F(M=n.nil){return(0,n.and)((0,n._)`typeof ${g} == "number"`,M,_?(0,n._)`isFinite(${g})`:n.nil)}}ke.checkDataType=y;function E(p,g,_,w){if(p.length===1)return y(p[0],g,_,w);let D;const $=(0,i.toHash)(p);if($.array&&$.object){const F=(0,n._)`typeof ${g} != "object"`;D=$.null?F:(0,n._)`!${g} || ${F}`,delete $.null,delete $.array,delete $.object}else D=n.nil;$.number&&delete $.integer;for(const F in $)D=(0,n.and)(D,y(F,g,_,w));return D}ke.checkDataTypes=E;const v={message:({schema:p})=>`must be ${p}`,params:({schema:p,schemaValue:g})=>typeof p=="string"?(0,n._)`{type: ${p}}`:(0,n._)`{type: ${g}}`};function l(p){const g=m(p);(0,r.reportError)(g,v)}ke.reportTypeError=l;function m(p){const{gen:g,data:_,schema:w}=p,D=(0,i.schemaRefOrVal)(p,w,"type");return{gen:g,keyword:"type",data:_,schema:w.type,schemaCode:D,schemaValue:D,parentSchema:w,params:{},it:p}}return ke}var on={},Nl;function ME(){if(Nl)return on;Nl=1,Object.defineProperty(on,"__esModule",{value:!0}),on.assignDefaults=void 0;const t=pe(),e=De();function r(i,o){const{properties:s,items:a}=i.schema;if(o==="object"&&s)for(const c in s)n(i,c,s[c].default);else o==="array"&&Array.isArray(a)&&a.forEach((c,f)=>n(i,f,c.default))}on.assignDefaults=r;function n(i,o,s){const{gen:a,compositeRule:c,data:f,opts:u}=i;if(s===void 0)return;const h=(0,t._)`${f}${(0,t.getProperty)(o)}`;if(c){(0,e.checkStrictMode)(i,`default is ignored for: ${h}`);return}let d=(0,t._)`${h} === undefined`;u.useDefaults==="empty"&&(d=(0,t._)`${d} || ${h} === null || ${h} === ""`),a.if(d,(0,t._)`${h} = ${(0,t.stringify)(s)}`)}return on}var ft={},Ae={},Tl;function dt(){if(Tl)return Ae;Tl=1,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.validateUnion=Ae.validateArray=Ae.usePattern=Ae.callValidateCode=Ae.schemaProperties=Ae.allSchemaProperties=Ae.noPropertyInData=Ae.propertyInData=Ae.isOwnProperty=Ae.hasPropFunc=Ae.reportMissingProp=Ae.checkMissingProp=Ae.checkReportMissingProp=void 0;const t=pe(),e=De(),r=lt(),n=De();function i(p,g){const{gen:_,data:w,it:D}=p;_.if(u(_,w,g,D.opts.ownProperties),()=>{p.setParams({missingProperty:(0,t._)`${g}`},!0),p.error()})}Ae.checkReportMissingProp=i;function o({gen:p,data:g,it:{opts:_}},w,D){return(0,t.or)(...w.map($=>(0,t.and)(u(p,g,$,_.ownProperties),(0,t._)`${D} = ${$}`)))}Ae.checkMissingProp=o;function s(p,g){p.setParams({missingProperty:g},!0),p.error()}Ae.reportMissingProp=s;function a(p){return p.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}Ae.hasPropFunc=a;function c(p,g,_){return(0,t._)`${a(p)}.call(${g}, ${_})`}Ae.isOwnProperty=c;function f(p,g,_,w){const D=(0,t._)`${g}${(0,t.getProperty)(_)} !== undefined`;return w?(0,t._)`${D} && ${c(p,g,_)}`:D}Ae.propertyInData=f;function u(p,g,_,w){const D=(0,t._)`${g}${(0,t.getProperty)(_)} === undefined`;return w?(0,t.or)(D,(0,t.not)(c(p,g,_))):D}Ae.noPropertyInData=u;function h(p){return p?Object.keys(p).filter(g=>g!=="__proto__"):[]}Ae.allSchemaProperties=h;function d(p,g){return h(g).filter(_=>!(0,e.alwaysValidSchema)(p,g[_]))}Ae.schemaProperties=d;function y({schemaCode:p,data:g,it:{gen:_,topSchemaRef:w,schemaPath:D,errorPath:$},it:F},M,U,j){const B=j?(0,t._)`${p}, ${g}, ${w}${D}`:g,T=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,$)],[r.default.parentData,F.parentData],[r.default.parentDataProperty,F.parentDataProperty],[r.default.rootData,r.default.rootData]];F.opts.dynamicRef&&T.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const L=(0,t._)`${B}, ${_.object(...T)}`;return U!==t.nil?(0,t._)`${M}.call(${U}, ${L})`:(0,t._)`${M}(${L})`}Ae.callValidateCode=y;const E=(0,t._)`new RegExp`;function v({gen:p,it:{opts:g}},_){const w=g.unicodeRegExp?"u":"",{regExp:D}=g.code,$=D(_,w);return p.scopeValue("pattern",{key:$.toString(),ref:$,code:(0,t._)`${D.code==="new RegExp"?E:(0,n.useFunc)(p,D)}(${_}, ${w})`})}Ae.usePattern=v;function l(p){const{gen:g,data:_,keyword:w,it:D}=p,$=g.name("valid");if(D.allErrors){const M=g.let("valid",!0);return F(()=>g.assign(M,!1)),M}return g.var($,!0),F(()=>g.break()),$;function F(M){const U=g.const("len",(0,t._)`${_}.length`);g.forRange("i",0,U,j=>{p.subschema({keyword:w,dataProp:j,dataPropType:e.Type.Num},$),g.if((0,t.not)($),M)})}}Ae.validateArray=l;function m(p){const{gen:g,schema:_,keyword:w,it:D}=p;if(!Array.isArray(_))throw new Error("ajv implementation error");if(_.some(U=>(0,e.alwaysValidSchema)(D,U))&&!D.opts.unevaluated)return;const F=g.let("valid",!1),M=g.name("_valid");g.block(()=>_.forEach((U,j)=>{const B=p.subschema({keyword:w,schemaProp:j,compositeRule:!0},M);g.assign(F,(0,t._)`${F} || ${M}`),p.mergeValidEvaluated(B,M)||g.if((0,t.not)(F))})),p.result(F,()=>p.reset(),()=>p.error(!0))}return Ae.validateUnion=m,Ae}var jl;function qE(){if(jl)return ft;jl=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.validateKeywordUsage=ft.validSchemaType=ft.funcKeywordCode=ft.macroKeywordCode=void 0;const t=pe(),e=lt(),r=dt(),n=Wn();function i(d,y){const{gen:E,keyword:v,schema:l,parentSchema:m,it:p}=d,g=y.macro.call(p.self,l,m,p),_=f(E,v,g);p.opts.validateSchema!==!1&&p.self.validateSchema(g,!0);const w=E.name("valid");d.subschema({schema:g,schemaPath:t.nil,errSchemaPath:`${p.errSchemaPath}/${v}`,topSchemaRef:_,compositeRule:!0},w),d.pass(w,()=>d.error(!0))}ft.macroKeywordCode=i;function o(d,y){var E;const{gen:v,keyword:l,schema:m,parentSchema:p,$data:g,it:_}=d;c(_,y);const w=!g&&y.compile?y.compile.call(_.self,m,p,_):y.validate,D=f(v,l,w),$=v.let("valid");d.block$data($,F),d.ok((E=y.valid)!==null&&E!==void 0?E:$);function F(){if(y.errors===!1)j(),y.modifying&&s(d),B(()=>d.error());else{const T=y.async?M():U();y.modifying&&s(d),B(()=>a(d,T))}}function M(){const T=v.let("ruleErrs",null);return v.try(()=>j((0,t._)`await `),L=>v.assign($,!1).if((0,t._)`${L} instanceof ${_.ValidationError}`,()=>v.assign(T,(0,t._)`${L}.errors`),()=>v.throw(L))),T}function U(){const T=(0,t._)`${D}.errors`;return v.assign(T,null),j(t.nil),T}function j(T=y.async?(0,t._)`await `:t.nil){const L=_.opts.passContext?e.default.this:e.default.self,q=!("compile"in y&&!g||y.schema===!1);v.assign($,(0,t._)`${T}${(0,r.callValidateCode)(d,D,L,q)}`,y.modifying)}function B(T){var L;v.if((0,t.not)((L=y.valid)!==null&&L!==void 0?L:$),T)}}ft.funcKeywordCode=o;function s(d){const{gen:y,data:E,it:v}=d;y.if(v.parentData,()=>y.assign(E,(0,t._)`${v.parentData}[${v.parentDataProperty}]`))}function a(d,y){const{gen:E}=d;E.if((0,t._)`Array.isArray(${y})`,()=>{E.assign(e.default.vErrors,(0,t._)`${e.default.vErrors} === null ? ${y} : ${e.default.vErrors}.concat(${y})`).assign(e.default.errors,(0,t._)`${e.default.vErrors}.length`),(0,n.extendErrors)(d)},()=>d.error())}function c({schemaEnv:d},y){if(y.async&&!d.$async)throw new Error("async keyword in sync schema")}function f(d,y,E){if(E===void 0)throw new Error(`keyword "${y}" failed to compile`);return d.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,t.stringify)(E)})}function u(d,y,E=!1){return!y.length||y.some(v=>v==="array"?Array.isArray(d):v==="object"?d&&typeof d=="object"&&!Array.isArray(d):typeof d==v||E&&typeof d>"u")}ft.validSchemaType=u;function h({schema:d,opts:y,self:E,errSchemaPath:v},l,m){if(Array.isArray(l.keyword)?!l.keyword.includes(m):l.keyword!==m)throw new Error("ajv implementation error");const p=l.dependencies;if(p?.some(g=>!Object.prototype.hasOwnProperty.call(d,g)))throw new Error(`parent schema must have dependencies of ${m}: ${p.join(",")}`);if(l.validateSchema&&!l.validateSchema(d[m])){const _=`keyword "${m}" value is invalid at path "${v}": `+E.errorsText(l.validateSchema.errors);if(y.validateSchema==="log")E.logger.error(_);else throw new Error(_)}}return ft.validateKeywordUsage=h,ft}var It={},Ll;function UE(){if(Ll)return It;Ll=1,Object.defineProperty(It,"__esModule",{value:!0}),It.extendSubschemaMode=It.extendSubschemaData=It.getSubschema=void 0;const t=pe(),e=De();function r(o,{keyword:s,schemaProp:a,schema:c,schemaPath:f,errSchemaPath:u,topSchemaRef:h}){if(s!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){const d=o.schema[s];return a===void 0?{schema:d,schemaPath:(0,t._)`${o.schemaPath}${(0,t.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${s}`}:{schema:d[a],schemaPath:(0,t._)`${o.schemaPath}${(0,t.getProperty)(s)}${(0,t.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${s}/${(0,e.escapeFragment)(a)}`}}if(c!==void 0){if(f===void 0||u===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:f,topSchemaRef:h,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}It.getSubschema=r;function n(o,s,{dataProp:a,dataPropType:c,data:f,dataTypes:u,propertyName:h}){if(f!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:d}=s;if(a!==void 0){const{errorPath:E,dataPathArr:v,opts:l}=s,m=d.let("data",(0,t._)`${s.data}${(0,t.getProperty)(a)}`,!0);y(m),o.errorPath=(0,t.str)`${E}${(0,e.getErrorPath)(a,c,l.jsPropertySyntax)}`,o.parentDataProperty=(0,t._)`${a}`,o.dataPathArr=[...v,o.parentDataProperty]}if(f!==void 0){const E=f instanceof t.Name?f:d.let("data",f,!0);y(E),h!==void 0&&(o.propertyName=h)}u&&(o.dataTypes=u);function y(E){o.data=E,o.dataLevel=s.dataLevel+1,o.dataTypes=[],s.definedProperties=new Set,o.parentData=s.data,o.dataNames=[...s.dataNames,E]}}It.extendSubschemaData=n;function i(o,{jtdDiscriminator:s,jtdMetadata:a,compositeRule:c,createErrors:f,allErrors:u}){c!==void 0&&(o.compositeRule=c),f!==void 0&&(o.createErrors=f),u!==void 0&&(o.allErrors=u),o.jtdDiscriminator=s,o.jtdMetadata=a}return It.extendSubschemaMode=i,It}var Ve={},No,xl;function Bl(){return xl||(xl=1,No=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var s=o[i];if(!t(e[s],r[s]))return!1}return!0}return e!==e&&r!==r}),No}var To={exports:{}},kl;function HE(){if(kl)return To.exports;kl=1;var t=To.exports=function(n,i,o){typeof i=="function"&&(o=i,i={}),o=i.cb||o;var s=typeof o=="function"?o:o.pre||function(){},a=o.post||function(){};e(i,s,a,n,"",n)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function e(n,i,o,s,a,c,f,u,h,d){if(s&&typeof s=="object"&&!Array.isArray(s)){i(s,a,c,f,u,h,d);for(var y in s){var E=s[y];if(Array.isArray(E)){if(y in t.arrayKeywords)for(var v=0;v<E.length;v++)e(n,i,o,E[v],a+"/"+y+"/"+v,c,a,y,s,v)}else if(y in t.propsKeywords){if(E&&typeof E=="object")for(var l in E)e(n,i,o,E[l],a+"/"+y+"/"+r(l),c,a,y,s,l)}else(y in t.keywords||n.allKeys&&!(y in t.skipKeywords))&&e(n,i,o,E,a+"/"+y,c,a,y,s)}o(s,a,c,f,u,h,d)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return To.exports}var Ml;function Yn(){if(Ml)return Ve;Ml=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.getSchemaRefs=Ve.resolveUrl=Ve.normalizeId=Ve._getFullPath=Ve.getFullPath=Ve.inlineRef=void 0;const t=De(),e=Bl(),r=HE(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(v,l=!0){return typeof v=="boolean"?!0:l===!0?!s(v):l?a(v)<=l:!1}Ve.inlineRef=i;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(v){for(const l in v){if(o.has(l))return!0;const m=v[l];if(Array.isArray(m)&&m.some(s)||typeof m=="object"&&s(m))return!0}return!1}function a(v){let l=0;for(const m in v){if(m==="$ref")return 1/0;if(l++,!n.has(m)&&(typeof v[m]=="object"&&(0,t.eachItem)(v[m],p=>l+=a(p)),l===1/0))return 1/0}return l}function c(v,l="",m){m!==!1&&(l=h(l));const p=v.parse(l);return f(v,p)}Ve.getFullPath=c;function f(v,l){return v.serialize(l).split("#")[0]+"#"}Ve._getFullPath=f;const u=/#\/?$/;function h(v){return v?v.replace(u,""):""}Ve.normalizeId=h;function d(v,l,m){return m=h(m),v.resolve(l,m)}Ve.resolveUrl=d;const y=/^[a-z_][-a-z0-9._]*$/i;function E(v,l){if(typeof v=="boolean")return{};const{schemaId:m,uriResolver:p}=this.opts,g=h(v[m]||l),_={"":g},w=c(p,g,!1),D={},$=new Set;return r(v,{allKeys:!0},(U,j,B,T)=>{if(T===void 0)return;const L=w+j;let q=_[T];typeof U[m]=="string"&&(q=X.call(this,U[m])),G.call(this,U.$anchor),G.call(this,U.$dynamicAnchor),_[j]=q;function X(Z){const oe=this.opts.uriResolver.resolve;if(Z=h(q?oe(q,Z):Z),$.has(Z))throw M(Z);$.add(Z);let H=this.refs[Z];return typeof H=="string"&&(H=this.refs[H]),typeof H=="object"?F(U,H.schema,Z):Z!==h(L)&&(Z[0]==="#"?(F(U,D[Z],Z),D[Z]=U):this.refs[Z]=L),Z}function G(Z){if(typeof Z=="string"){if(!y.test(Z))throw new Error(`invalid anchor "${Z}"`);X.call(this,`#${Z}`)}}}),D;function F(U,j,B){if(j!==void 0&&!e(U,j))throw M(B)}function M(U){return new Error(`reference "${U}" resolves to more than one schema`)}}return Ve.getSchemaRefs=E,Ve}var ql;function an(){if(ql)return Ot;ql=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.getData=Ot.KeywordCxt=Ot.validateFunctionCode=void 0;const t=kE(),e=Kn(),r=Il(),n=Kn(),i=ME(),o=qE(),s=UE(),a=pe(),c=lt(),f=Yn(),u=De(),h=Wn();function d(N){if(w(N)&&($(N),_(N))){l(N);return}y(N,()=>(0,t.topBoolOrEmptySchema)(N))}Ot.validateFunctionCode=d;function y({gen:N,validateName:x,schema:K,schemaEnv:te,opts:O},P){O.code.es5?N.func(x,(0,a._)`${c.default.data}, ${c.default.valCxt}`,te.$async,()=>{N.code((0,a._)`"use strict"; ${p(K,O)}`),v(N,O),N.code(P)}):N.func(x,(0,a._)`${c.default.data}, ${E(O)}`,te.$async,()=>N.code(p(K,O)).code(P))}function E(N){return(0,a._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${N.dynamicRef?(0,a._)`, ${c.default.dynamicAnchors}={}`:a.nil}}={}`}function v(N,x){N.if(c.default.valCxt,()=>{N.var(c.default.instancePath,(0,a._)`${c.default.valCxt}.${c.default.instancePath}`),N.var(c.default.parentData,(0,a._)`${c.default.valCxt}.${c.default.parentData}`),N.var(c.default.parentDataProperty,(0,a._)`${c.default.valCxt}.${c.default.parentDataProperty}`),N.var(c.default.rootData,(0,a._)`${c.default.valCxt}.${c.default.rootData}`),x.dynamicRef&&N.var(c.default.dynamicAnchors,(0,a._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{N.var(c.default.instancePath,(0,a._)`""`),N.var(c.default.parentData,(0,a._)`undefined`),N.var(c.default.parentDataProperty,(0,a._)`undefined`),N.var(c.default.rootData,c.default.data),x.dynamicRef&&N.var(c.default.dynamicAnchors,(0,a._)`{}`)})}function l(N){const{schema:x,opts:K,gen:te}=N;y(N,()=>{K.$comment&&x.$comment&&T(N),U(N),te.let(c.default.vErrors,null),te.let(c.default.errors,0),K.unevaluated&&m(N),F(N),L(N)})}function m(N){const{gen:x,validateName:K}=N;N.evaluated=x.const("evaluated",(0,a._)`${K}.evaluated`),x.if((0,a._)`${N.evaluated}.dynamicProps`,()=>x.assign((0,a._)`${N.evaluated}.props`,(0,a._)`undefined`)),x.if((0,a._)`${N.evaluated}.dynamicItems`,()=>x.assign((0,a._)`${N.evaluated}.items`,(0,a._)`undefined`))}function p(N,x){const K=typeof N=="object"&&N[x.schemaId];return K&&(x.code.source||x.code.process)?(0,a._)`/*# sourceURL=${K} */`:a.nil}function g(N,x){if(w(N)&&($(N),_(N))){D(N,x);return}(0,t.boolOrEmptySchema)(N,x)}function _({schema:N,self:x}){if(typeof N=="boolean")return!N;for(const K in N)if(x.RULES.all[K])return!0;return!1}function w(N){return typeof N.schema!="boolean"}function D(N,x){const{schema:K,gen:te,opts:O}=N;O.$comment&&K.$comment&&T(N),j(N),B(N);const P=te.const("_errs",c.default.errors);F(N,P),te.var(x,(0,a._)`${P} === ${c.default.errors}`)}function $(N){(0,u.checkUnknownRules)(N),M(N)}function F(N,x){if(N.opts.jtd)return X(N,[],!1,x);const K=(0,e.getSchemaTypes)(N.schema),te=(0,e.coerceAndCheckDataType)(N,K);X(N,K,!te,x)}function M(N){const{schema:x,errSchemaPath:K,opts:te,self:O}=N;x.$ref&&te.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(x,O.RULES)&&O.logger.warn(`$ref: keywords ignored in schema at path "${K}"`)}function U(N){const{schema:x,opts:K}=N;x.default!==void 0&&K.useDefaults&&K.strictSchema&&(0,u.checkStrictMode)(N,"default is ignored in the schema root")}function j(N){const x=N.schema[N.opts.schemaId];x&&(N.baseId=(0,f.resolveUrl)(N.opts.uriResolver,N.baseId,x))}function B(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}function T({gen:N,schemaEnv:x,schema:K,errSchemaPath:te,opts:O}){const P=K.$comment;if(O.$comment===!0)N.code((0,a._)`${c.default.self}.logger.log(${P})`);else if(typeof O.$comment=="function"){const ee=(0,a.str)`${te}/$comment`,J=N.scopeValue("root",{ref:x.root});N.code((0,a._)`${c.default.self}.opts.$comment(${P}, ${ee}, ${J}.schema)`)}}function L(N){const{gen:x,schemaEnv:K,validateName:te,ValidationError:O,opts:P}=N;K.$async?x.if((0,a._)`${c.default.errors} === 0`,()=>x.return(c.default.data),()=>x.throw((0,a._)`new ${O}(${c.default.vErrors})`)):(x.assign((0,a._)`${te}.errors`,c.default.vErrors),P.unevaluated&&q(N),x.return((0,a._)`${c.default.errors} === 0`))}function q({gen:N,evaluated:x,props:K,items:te}){K instanceof a.Name&&N.assign((0,a._)`${x}.props`,K),te instanceof a.Name&&N.assign((0,a._)`${x}.items`,te)}function X(N,x,K,te){const{gen:O,schema:P,data:ee,allErrors:J,opts:I,self:ne}=N,{RULES:z}=ne;if(P.$ref&&(I.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(P,z))){O.block(()=>W(N,"$ref",z.all.$ref.definition));return}I.jtd||Z(N,x),O.block(()=>{for(const fe of z.rules)ie(fe);ie(z.post)});function ie(fe){(0,r.shouldUseGroup)(P,fe)&&(fe.type?(O.if((0,n.checkDataType)(fe.type,ee,I.strictNumbers)),G(N,fe),x.length===1&&x[0]===fe.type&&K&&(O.else(),(0,n.reportTypeError)(N)),O.endIf()):G(N,fe),J||O.if((0,a._)`${c.default.errors} === ${te||0}`))}}function G(N,x){const{gen:K,schema:te,opts:{useDefaults:O}}=N;O&&(0,i.assignDefaults)(N,x.type),K.block(()=>{for(const P of x.rules)(0,r.shouldUseRule)(te,P)&&W(N,P.keyword,P.definition,x.type)})}function Z(N,x){N.schemaEnv.meta||!N.opts.strictTypes||(oe(N,x),N.opts.allowUnionTypes||H(N,x),S(N,N.dataTypes))}function oe(N,x){if(x.length){if(!N.dataTypes.length){N.dataTypes=x;return}x.forEach(K=>{k(N.dataTypes,K)||b(N,`type "${K}" not allowed by context "${N.dataTypes.join(",")}"`)}),A(N,x)}}function H(N,x){x.length>1&&!(x.length===2&&x.includes("null"))&&b(N,"use allowUnionTypes to allow union type keyword")}function S(N,x){const K=N.self.RULES.all;for(const te in K){const O=K[te];if(typeof O=="object"&&(0,r.shouldUseRule)(N.schema,O)){const{type:P}=O.definition;P.length&&!P.some(ee=>V(x,ee))&&b(N,`missing type "${P.join(",")}" for keyword "${te}"`)}}}function V(N,x){return N.includes(x)||x==="number"&&N.includes("integer")}function k(N,x){return N.includes(x)||x==="integer"&&N.includes("number")}function A(N,x){const K=[];for(const te of N.dataTypes)k(x,te)?K.push(te):x.includes("integer")&&te==="number"&&K.push("integer");N.dataTypes=K}function b(N,x){const K=N.schemaEnv.baseId+N.errSchemaPath;x+=` at "${K}" (strictTypes)`,(0,u.checkStrictMode)(N,x,N.opts.strictTypes)}class C{constructor(x,K,te){if((0,o.validateKeywordUsage)(x,K,te),this.gen=x.gen,this.allErrors=x.allErrors,this.keyword=te,this.data=x.data,this.schema=x.schema[te],this.$data=K.$data&&x.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(x,this.schema,te,this.$data),this.schemaType=K.schemaType,this.parentSchema=x.schema,this.params={},this.it=x,this.def=K,this.$data)this.schemaCode=x.gen.const("vSchema",ae(this.$data,x));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,K.schemaType,K.allowUndefined))throw new Error(`${te} value must be ${JSON.stringify(K.schemaType)}`);("code"in K?K.trackErrors:K.errors!==!1)&&(this.errsCount=x.gen.const("_errs",c.default.errors))}result(x,K,te){this.failResult((0,a.not)(x),K,te)}failResult(x,K,te){this.gen.if(x),te?te():this.error(),K?(this.gen.else(),K(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(x,K){this.failResult((0,a.not)(x),void 0,K)}fail(x){if(x===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(x),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(x){if(!this.$data)return this.fail(x);const{schemaCode:K}=this;this.fail((0,a._)`${K} !== undefined && (${(0,a.or)(this.invalid$data(),x)})`)}error(x,K,te){if(K){this.setParams(K),this._error(x,te),this.setParams({});return}this._error(x,te)}_error(x,K){(x?h.reportExtraError:h.reportError)(this,this.def.error,K)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(x){this.allErrors||this.gen.if(x)}setParams(x,K){K?Object.assign(this.params,x):this.params=x}block$data(x,K,te=a.nil){this.gen.block(()=>{this.check$data(x,te),K()})}check$data(x=a.nil,K=a.nil){if(!this.$data)return;const{gen:te,schemaCode:O,schemaType:P,def:ee}=this;te.if((0,a.or)((0,a._)`${O} === undefined`,K)),x!==a.nil&&te.assign(x,!0),(P.length||ee.validateSchema)&&(te.elseIf(this.invalid$data()),this.$dataError(),x!==a.nil&&te.assign(x,!1)),te.else()}invalid$data(){const{gen:x,schemaCode:K,schemaType:te,def:O,it:P}=this;return(0,a.or)(ee(),J());function ee(){if(te.length){if(!(K instanceof a.Name))throw new Error("ajv implementation error");const I=Array.isArray(te)?te:[te];return(0,a._)`${(0,n.checkDataTypes)(I,K,P.opts.strictNumbers,n.DataType.Wrong)}`}return a.nil}function J(){if(O.validateSchema){const I=x.scopeValue("validate$data",{ref:O.validateSchema});return(0,a._)`!${I}(${K})`}return a.nil}}subschema(x,K){const te=(0,s.getSubschema)(this.it,x);(0,s.extendSubschemaData)(te,this.it,x),(0,s.extendSubschemaMode)(te,x);const O={...this.it,...te,items:void 0,props:void 0};return g(O,K),O}mergeEvaluated(x,K){const{it:te,gen:O}=this;te.opts.unevaluated&&(te.props!==!0&&x.props!==void 0&&(te.props=u.mergeEvaluated.props(O,x.props,te.props,K)),te.items!==!0&&x.items!==void 0&&(te.items=u.mergeEvaluated.items(O,x.items,te.items,K)))}mergeValidEvaluated(x,K){const{it:te,gen:O}=this;if(te.opts.unevaluated&&(te.props!==!0||te.items!==!0))return O.if(K,()=>this.mergeEvaluated(x,a.Name)),!0}}Ot.KeywordCxt=C;function W(N,x,K,te){const O=new C(N,K,x);"code"in K?K.code(O,te):O.$data&&K.validate?(0,o.funcKeywordCode)(O,K):"macro"in K?(0,o.macroKeywordCode)(O,K):(K.compile||K.validate)&&(0,o.funcKeywordCode)(O,K)}const Y=/^\/(?:[^~]|~0|~1)*$/,se=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ae(N,{dataLevel:x,dataNames:K,dataPathArr:te}){let O,P;if(N==="")return c.default.rootData;if(N[0]==="/"){if(!Y.test(N))throw new Error(`Invalid JSON-pointer: ${N}`);O=N,P=c.default.rootData}else{const ne=se.exec(N);if(!ne)throw new Error(`Invalid JSON-pointer: ${N}`);const z=+ne[1];if(O=ne[2],O==="#"){if(z>=x)throw new Error(I("property/index",z));return te[x-z]}if(z>x)throw new Error(I("data",z));if(P=K[x-z],!O)return P}let ee=P;const J=O.split("/");for(const ne of J)ne&&(P=(0,a._)`${P}${(0,a.getProperty)((0,u.unescapeJsonPointer)(ne))}`,ee=(0,a._)`${ee} && ${P}`);return ee;function I(ne,z){return`Cannot access ${ne} ${z} levels up, current level is ${x}`}}return Ot.getData=ae,Ot}var Jn={},Ul;function Xn(){if(Ul)return Jn;Ul=1,Object.defineProperty(Jn,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Jn.default=t,Jn}var Qn={},Hl;function un(){if(Hl)return Qn;Hl=1,Object.defineProperty(Qn,"__esModule",{value:!0});const t=Yn();class e extends Error{constructor(n,i,o,s){super(s||`can't resolve reference ${o} from id ${i}`),this.missingRef=(0,t.resolveUrl)(n,i,o),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(n,this.missingRef))}}return Qn.default=e,Qn}var Xe={},Vl;function Zn(){if(Vl)return Xe;Vl=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.resolveSchema=Xe.getCompilingSchema=Xe.resolveRef=Xe.compileSchema=Xe.SchemaEnv=void 0;const t=pe(),e=Xn(),r=lt(),n=Yn(),i=De(),o=an();class s{constructor(m){var p;this.refs={},this.dynamicAnchors={};let g;typeof m.schema=="object"&&(g=m.schema),this.schema=m.schema,this.schemaId=m.schemaId,this.root=m.root||this,this.baseId=(p=m.baseId)!==null&&p!==void 0?p:(0,n.normalizeId)(g?.[m.schemaId||"$id"]),this.schemaPath=m.schemaPath,this.localRefs=m.localRefs,this.meta=m.meta,this.$async=g?.$async,this.refs={}}}Xe.SchemaEnv=s;function a(l){const m=u.call(this,l);if(m)return m;const p=(0,n.getFullPath)(this.opts.uriResolver,l.root.baseId),{es5:g,lines:_}=this.opts.code,{ownProperties:w}=this.opts,D=new t.CodeGen(this.scope,{es5:g,lines:_,ownProperties:w});let $;l.$async&&($=D.scopeValue("Error",{ref:e.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));const F=D.scopeName("validate");l.validateName=F;const M={gen:D,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:D.scopeValue("schema",this.opts.code.source===!0?{ref:l.schema,code:(0,t.stringify)(l.schema)}:{ref:l.schema}),validateName:F,ValidationError:$,schema:l.schema,schemaEnv:l,rootId:p,baseId:l.baseId||p,schemaPath:t.nil,errSchemaPath:l.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};let U;try{this._compilations.add(l),(0,o.validateFunctionCode)(M),D.optimize(this.opts.code.optimize);const j=D.toString();U=`${D.scopeRefs(r.default.scope)}return ${j}`,this.opts.code.process&&(U=this.opts.code.process(U,l));const T=new Function(`${r.default.self}`,`${r.default.scope}`,U)(this,this.scope.get());if(this.scope.value(F,{ref:T}),T.errors=null,T.schema=l.schema,T.schemaEnv=l,l.$async&&(T.$async=!0),this.opts.code.source===!0&&(T.source={validateName:F,validateCode:j,scopeValues:D._values}),this.opts.unevaluated){const{props:L,items:q}=M;T.evaluated={props:L instanceof t.Name?void 0:L,items:q instanceof t.Name?void 0:q,dynamicProps:L instanceof t.Name,dynamicItems:q instanceof t.Name},T.source&&(T.source.evaluated=(0,t.stringify)(T.evaluated))}return l.validate=T,l}catch(j){throw delete l.validate,delete l.validateName,U&&this.logger.error("Error compiling schema, function code:",U),j}finally{this._compilations.delete(l)}}Xe.compileSchema=a;function c(l,m,p){var g;p=(0,n.resolveUrl)(this.opts.uriResolver,m,p);const _=l.refs[p];if(_)return _;let w=d.call(this,l,p);if(w===void 0){const D=(g=l.localRefs)===null||g===void 0?void 0:g[p],{schemaId:$}=this.opts;D&&(w=new s({schema:D,schemaId:$,root:l,baseId:m}))}if(w!==void 0)return l.refs[p]=f.call(this,w)}Xe.resolveRef=c;function f(l){return(0,n.inlineRef)(l.schema,this.opts.inlineRefs)?l.schema:l.validate?l:a.call(this,l)}function u(l){for(const m of this._compilations)if(h(m,l))return m}Xe.getCompilingSchema=u;function h(l,m){return l.schema===m.schema&&l.root===m.root&&l.baseId===m.baseId}function d(l,m){let p;for(;typeof(p=this.refs[m])=="string";)m=p;return p||this.schemas[m]||y.call(this,l,m)}function y(l,m){const p=this.opts.uriResolver.parse(m),g=(0,n._getFullPath)(this.opts.uriResolver,p);let _=(0,n.getFullPath)(this.opts.uriResolver,l.baseId,void 0);if(Object.keys(l.schema).length>0&&g===_)return v.call(this,p,l);const w=(0,n.normalizeId)(g),D=this.refs[w]||this.schemas[w];if(typeof D=="string"){const $=y.call(this,l,D);return typeof $?.schema!="object"?void 0:v.call(this,p,$)}if(typeof D?.schema=="object"){if(D.validate||a.call(this,D),w===(0,n.normalizeId)(m)){const{schema:$}=D,{schemaId:F}=this.opts,M=$[F];return M&&(_=(0,n.resolveUrl)(this.opts.uriResolver,_,M)),new s({schema:$,schemaId:F,root:l,baseId:_})}return v.call(this,p,D)}}Xe.resolveSchema=y;const E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function v(l,{baseId:m,schema:p,root:g}){var _;if(((_=l.fragment)===null||_===void 0?void 0:_[0])!=="/")return;for(const $ of l.fragment.slice(1).split("/")){if(typeof p=="boolean")return;const F=p[(0,i.unescapeFragment)($)];if(F===void 0)return;p=F;const M=typeof p=="object"&&p[this.opts.schemaId];!E.has($)&&M&&(m=(0,n.resolveUrl)(this.opts.uriResolver,m,M))}let w;if(typeof p!="boolean"&&p.$ref&&!(0,i.schemaHasRulesButRef)(p,this.RULES)){const $=(0,n.resolveUrl)(this.opts.uriResolver,m,p.$ref);w=y.call(this,g,$)}const{schemaId:D}=this.opts;if(w=w||new s({schema:p,schemaId:D,root:g,baseId:m}),w.schema!==w.root.schema)return w}return Xe}const zl="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Gl="Meta-schema for $data reference (JSON AnySchema extension proposal)",Wl="object",Kl=["$data"],Yl={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Jl=!1,VE={$id:zl,description:Gl,type:Wl,required:Kl,properties:Yl,additionalProperties:Jl},zE={__proto__:null,$id:zl,additionalProperties:Jl,default:VE,description:Gl,properties:Yl,required:Kl,type:Wl},GE=gt(zE);var ei={},cn={exports:{}},jo,Xl;function WE(){return Xl||(Xl=1,jo={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),jo}var Lo,Ql;function KE(){if(Ql)return Lo;Ql=1;const{HEX:t}=WE();function e(E){if(s(E,".")<3)return{host:E,isIPV4:!1};const v=E.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[l]=v;return l?{host:o(l,"."),isIPV4:!0}:{host:E,isIPV4:!1}}function r(E,v=!1){let l="",m=!0;for(const p of E){if(t[p]===void 0)return;p!=="0"&&m===!0&&(m=!1),m||(l+=p)}return v&&l.length===0&&(l="0"),l}function n(E){let v=0;const l={error:!1,address:"",zone:""},m=[],p=[];let g=!1,_=!1,w=!1;function D(){if(p.length){if(g===!1){const $=r(p);if($!==void 0)m.push($);else return l.error=!0,!1}p.length=0}return!0}for(let $=0;$<E.length;$++){const F=E[$];if(!(F==="["||F==="]"))if(F===":"){if(_===!0&&(w=!0),!D())break;if(v++,m.push(":"),v>7){l.error=!0;break}$-1>=0&&E[$-1]===":"&&(_=!0);continue}else if(F==="%"){if(!D())break;g=!0}else{p.push(F);continue}}return p.length&&(g?l.zone=p.join(""):w?m.push(p.join("")):m.push(r(p))),l.address=m.join(""),l}function i(E,v={}){if(s(E,":")<2)return{host:E,isIPV6:!1};const l=n(E);if(l.error)return{host:E,isIPV6:!1};{let m=l.address,p=l.address;return l.zone&&(m+="%"+l.zone,p+="%25"+l.zone),{host:m,escapedHost:p,isIPV6:!0}}}function o(E,v){let l="",m=!0;const p=E.length;for(let g=0;g<p;g++){const _=E[g];_==="0"&&m?(g+1<=p&&E[g+1]===v||g+1===p)&&(l+=_,m=!1):(_===v?m=!0:m=!1,l+=_)}return l}function s(E,v){let l=0;for(let m=0;m<E.length;m++)E[m]===v&&l++;return l}const a=/^\.\.?\//u,c=/^\/\.(?:\/|$)/u,f=/^\/\.\.(?:\/|$)/u,u=/^\/?(?:.|\n)*?(?=\/|$)/u;function h(E){const v=[];for(;E.length;)if(E.match(a))E=E.replace(a,"");else if(E.match(c))E=E.replace(c,"/");else if(E.match(f))E=E.replace(f,"/"),v.pop();else if(E==="."||E==="..")E="";else{const l=E.match(u);if(l){const m=l[0];E=E.slice(m.length),v.push(m)}else throw new Error("Unexpected dot segment condition")}return v.join("")}function d(E,v){const l=v!==!0?escape:unescape;return E.scheme!==void 0&&(E.scheme=l(E.scheme)),E.userinfo!==void 0&&(E.userinfo=l(E.userinfo)),E.host!==void 0&&(E.host=l(E.host)),E.path!==void 0&&(E.path=l(E.path)),E.query!==void 0&&(E.query=l(E.query)),E.fragment!==void 0&&(E.fragment=l(E.fragment)),E}function y(E,v){const l=[];if(E.userinfo!==void 0&&(l.push(E.userinfo),l.push("@")),E.host!==void 0){let m=unescape(E.host);const p=e(m);if(p.isIPV4)m=p.host;else{const g=i(p.host,{});g.isIPV6===!0?m=`[${g.escapedHost}]`:m=E.host}l.push(m)}return(typeof E.port=="number"||typeof E.port=="string")&&(l.push(":"),l.push(String(E.port))),l.length?l.join(""):void 0}return Lo={recomposeAuthority:y,normalizeComponentEncoding:d,removeDotSegments:h,normalizeIPv4:e,normalizeIPv6:i,stringArrayToHexStripped:r},Lo}var xo,Zl;function YE(){if(Zl)return xo;Zl=1;const t=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(p){return typeof p.secure=="boolean"?p.secure:String(p.scheme).toLowerCase()==="wss"}function n(p){return p.host||(p.error=p.error||"HTTP URIs must have a host."),p}function i(p){const g=String(p.scheme).toLowerCase()==="https";return(p.port===(g?443:80)||p.port==="")&&(p.port=void 0),p.path||(p.path="/"),p}function o(p){return p.secure=r(p),p.resourceName=(p.path||"/")+(p.query?"?"+p.query:""),p.path=void 0,p.query=void 0,p}function s(p){if((p.port===(r(p)?443:80)||p.port==="")&&(p.port=void 0),typeof p.secure=="boolean"&&(p.scheme=p.secure?"wss":"ws",p.secure=void 0),p.resourceName){const[g,_]=p.resourceName.split("?");p.path=g&&g!=="/"?g:void 0,p.query=_,p.resourceName=void 0}return p.fragment=void 0,p}function a(p,g){if(!p.path)return p.error="URN can not be parsed",p;const _=p.path.match(e);if(_){const w=g.scheme||p.scheme||"urn";p.nid=_[1].toLowerCase(),p.nss=_[2];const D=`${w}:${g.nid||p.nid}`,$=m[D];p.path=void 0,$&&(p=$.parse(p,g))}else p.error=p.error||"URN can not be parsed.";return p}function c(p,g){const _=g.scheme||p.scheme||"urn",w=p.nid.toLowerCase(),D=`${_}:${g.nid||w}`,$=m[D];$&&(p=$.serialize(p,g));const F=p,M=p.nss;return F.path=`${w||g.nid}:${M}`,g.skipEscape=!0,F}function f(p,g){const _=p;return _.uuid=_.nss,_.nss=void 0,!g.tolerant&&(!_.uuid||!t.test(_.uuid))&&(_.error=_.error||"UUID is not valid."),_}function u(p){const g=p;return g.nss=(p.uuid||"").toLowerCase(),g}const h={scheme:"http",domainHost:!0,parse:n,serialize:i},d={scheme:"https",domainHost:h.domainHost,parse:n,serialize:i},y={scheme:"ws",domainHost:!0,parse:o,serialize:s},E={scheme:"wss",domainHost:y.domainHost,parse:y.parse,serialize:y.serialize},m={http:h,https:d,ws:y,wss:E,urn:{scheme:"urn",parse:a,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:f,serialize:u,skipNormalize:!0}};return xo=m,xo}var ef;function JE(){if(ef)return cn.exports;ef=1;const{normalizeIPv6:t,normalizeIPv4:e,removeDotSegments:r,recomposeAuthority:n,normalizeComponentEncoding:i}=KE(),o=YE();function s(l,m){return typeof l=="string"?l=u(E(l,m),m):typeof l=="object"&&(l=E(u(l,m),m)),l}function a(l,m,p){const g=Object.assign({scheme:"null"},p),_=c(E(l,g),E(m,g),g,!0);return u(_,{...g,skipEscape:!0})}function c(l,m,p,g){const _={};return g||(l=E(u(l,p),p),m=E(u(m,p),p)),p=p||{},!p.tolerant&&m.scheme?(_.scheme=m.scheme,_.userinfo=m.userinfo,_.host=m.host,_.port=m.port,_.path=r(m.path||""),_.query=m.query):(m.userinfo!==void 0||m.host!==void 0||m.port!==void 0?(_.userinfo=m.userinfo,_.host=m.host,_.port=m.port,_.path=r(m.path||""),_.query=m.query):(m.path?(m.path.charAt(0)==="/"?_.path=r(m.path):((l.userinfo!==void 0||l.host!==void 0||l.port!==void 0)&&!l.path?_.path="/"+m.path:l.path?_.path=l.path.slice(0,l.path.lastIndexOf("/")+1)+m.path:_.path=m.path,_.path=r(_.path)),_.query=m.query):(_.path=l.path,m.query!==void 0?_.query=m.query:_.query=l.query),_.userinfo=l.userinfo,_.host=l.host,_.port=l.port),_.scheme=l.scheme),_.fragment=m.fragment,_}function f(l,m,p){return typeof l=="string"?(l=unescape(l),l=u(i(E(l,p),!0),{...p,skipEscape:!0})):typeof l=="object"&&(l=u(i(l,!0),{...p,skipEscape:!0})),typeof m=="string"?(m=unescape(m),m=u(i(E(m,p),!0),{...p,skipEscape:!0})):typeof m=="object"&&(m=u(i(m,!0),{...p,skipEscape:!0})),l.toLowerCase()===m.toLowerCase()}function u(l,m){const p={host:l.host,scheme:l.scheme,userinfo:l.userinfo,port:l.port,path:l.path,query:l.query,nid:l.nid,nss:l.nss,uuid:l.uuid,fragment:l.fragment,reference:l.reference,resourceName:l.resourceName,secure:l.secure,error:""},g=Object.assign({},m),_=[],w=o[(g.scheme||p.scheme||"").toLowerCase()];w&&w.serialize&&w.serialize(p,g),p.path!==void 0&&(g.skipEscape?p.path=unescape(p.path):(p.path=escape(p.path),p.scheme!==void 0&&(p.path=p.path.split("%3A").join(":")))),g.reference!=="suffix"&&p.scheme&&(_.push(p.scheme),_.push(":"));const D=n(p,g);if(D!==void 0&&(g.reference!=="suffix"&&_.push("//"),_.push(D),p.path&&p.path.charAt(0)!=="/"&&_.push("/")),p.path!==void 0){let $=p.path;!g.absolutePath&&(!w||!w.absolutePath)&&($=r($)),D===void 0&&($=$.replace(/^\/\//u,"/%2F")),_.push($)}return p.query!==void 0&&(_.push("?"),_.push(p.query)),p.fragment!==void 0&&(_.push("#"),_.push(p.fragment)),_.join("")}const h=Array.from({length:127},(l,m)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(m)));function d(l){let m=0;for(let p=0,g=l.length;p<g;++p)if(m=l.charCodeAt(p),m>126||h[m])return!0;return!1}const y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function E(l,m){const p=Object.assign({},m),g={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},_=l.indexOf("%")!==-1;let w=!1;p.reference==="suffix"&&(l=(p.scheme?p.scheme+":":"")+"//"+l);const D=l.match(y);if(D){if(g.scheme=D[1],g.userinfo=D[3],g.host=D[4],g.port=parseInt(D[5],10),g.path=D[6]||"",g.query=D[7],g.fragment=D[8],isNaN(g.port)&&(g.port=D[5]),g.host){const F=e(g.host);if(F.isIPV4===!1){const M=t(F.host,{isIPV4:!1});g.host=M.host.toLowerCase(),w=M.isIPV6}else g.host=F.host,w=!0}g.scheme===void 0&&g.userinfo===void 0&&g.host===void 0&&g.port===void 0&&!g.path&&g.query===void 0?g.reference="same-document":g.scheme===void 0?g.reference="relative":g.fragment===void 0?g.reference="absolute":g.reference="uri",p.reference&&p.reference!=="suffix"&&p.reference!==g.reference&&(g.error=g.error||"URI is not a "+p.reference+" reference.");const $=o[(p.scheme||g.scheme||"").toLowerCase()];if(!p.unicodeSupport&&(!$||!$.unicodeSupport)&&g.host&&(p.domainHost||$&&$.domainHost)&&w===!1&&d(g.host))try{g.host=URL.domainToASCII(g.host.toLowerCase())}catch(F){g.error=g.error||"Host's domain name can not be converted to ASCII: "+F}(!$||$&&!$.skipNormalize)&&(_&&g.scheme!==void 0&&(g.scheme=unescape(g.scheme)),_&&g.userinfo!==void 0&&(g.userinfo=unescape(g.userinfo)),_&&g.host!==void 0&&(g.host=unescape(g.host)),g.path!==void 0&&g.path.length&&(g.path=escape(unescape(g.path))),g.fragment!==void 0&&g.fragment.length&&(g.fragment=encodeURI(decodeURIComponent(g.fragment)))),$&&$.parse&&$.parse(g,p)}else g.error=g.error||"URI can not be parsed.";return g}const v={SCHEMES:o,normalize:s,resolve:a,resolveComponents:c,equal:f,serialize:u,parse:E};return cn.exports=v,cn.exports.default=v,cn.exports.fastUri=v,cn.exports}var tf;function XE(){if(tf)return ei;tf=1,Object.defineProperty(ei,"__esModule",{value:!0});const t=JE();return t.code='require("ajv/dist/runtime/uri").default',ei.default=t,ei}var rf;function nf(){return rf||(rf=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=an();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=pe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Xn(),i=un(),o=Ol(),s=Zn(),a=pe(),c=Yn(),f=Kn(),u=De(),h=GE,d=XE(),y=(H,S)=>new RegExp(H,S);y.code="new RegExp";const E=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),l={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},m={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},p=200;function g(H){var S,V,k,A,b,C,W,Y,se,ae,N,x,K,te,O,P,ee,J,I,ne,z,ie,fe,$e,Oe;const vt=H.strict,Pt=(S=H.code)===null||S===void 0?void 0:S.optimize,cu=Pt===!0||Pt===void 0?1:Pt||0,lu=(k=(V=H.code)===null||V===void 0?void 0:V.regExp)!==null&&k!==void 0?k:y,hm=(A=H.uriResolver)!==null&&A!==void 0?A:d.default;return{strictSchema:(C=(b=H.strictSchema)!==null&&b!==void 0?b:vt)!==null&&C!==void 0?C:!0,strictNumbers:(Y=(W=H.strictNumbers)!==null&&W!==void 0?W:vt)!==null&&Y!==void 0?Y:!0,strictTypes:(ae=(se=H.strictTypes)!==null&&se!==void 0?se:vt)!==null&&ae!==void 0?ae:"log",strictTuples:(x=(N=H.strictTuples)!==null&&N!==void 0?N:vt)!==null&&x!==void 0?x:"log",strictRequired:(te=(K=H.strictRequired)!==null&&K!==void 0?K:vt)!==null&&te!==void 0?te:!1,code:H.code?{...H.code,optimize:cu,regExp:lu}:{optimize:cu,regExp:lu},loopRequired:(O=H.loopRequired)!==null&&O!==void 0?O:p,loopEnum:(P=H.loopEnum)!==null&&P!==void 0?P:p,meta:(ee=H.meta)!==null&&ee!==void 0?ee:!0,messages:(J=H.messages)!==null&&J!==void 0?J:!0,inlineRefs:(I=H.inlineRefs)!==null&&I!==void 0?I:!0,schemaId:(ne=H.schemaId)!==null&&ne!==void 0?ne:"$id",addUsedSchema:(z=H.addUsedSchema)!==null&&z!==void 0?z:!0,validateSchema:(ie=H.validateSchema)!==null&&ie!==void 0?ie:!0,validateFormats:(fe=H.validateFormats)!==null&&fe!==void 0?fe:!0,unicodeRegExp:($e=H.unicodeRegExp)!==null&&$e!==void 0?$e:!0,int32range:(Oe=H.int32range)!==null&&Oe!==void 0?Oe:!0,uriResolver:hm}}class _{constructor(S={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,S=this.opts={...S,...g(S)};const{es5:V,lines:k}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:v,es5:V,lines:k}),this.logger=B(S.logger);const A=S.validateFormats;S.validateFormats=!1,this.RULES=(0,o.getRules)(),w.call(this,l,S,"NOT SUPPORTED"),w.call(this,m,S,"DEPRECATED","warn"),this._metaOpts=U.call(this),S.formats&&F.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),S.keywords&&M.call(this,S.keywords),typeof S.meta=="object"&&this.addMetaSchema(S.meta),$.call(this),S.validateFormats=A}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:S,meta:V,schemaId:k}=this.opts;let A=h;k==="id"&&(A={...h},A.id=A.$id,delete A.$id),V&&S&&this.addMetaSchema(A,A[k],!1)}defaultMeta(){const{meta:S,schemaId:V}=this.opts;return this.opts.defaultMeta=typeof S=="object"?S[V]||S:void 0}validate(S,V){let k;if(typeof S=="string"){if(k=this.getSchema(S),!k)throw new Error(`no schema with key or ref "${S}"`)}else k=this.compile(S);const A=k(V);return"$async"in k||(this.errors=k.errors),A}compile(S,V){const k=this._addSchema(S,V);return k.validate||this._compileSchemaEnv(k)}compileAsync(S,V){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:k}=this.opts;return A.call(this,S,V);async function A(ae,N){await b.call(this,ae.$schema);const x=this._addSchema(ae,N);return x.validate||C.call(this,x)}async function b(ae){ae&&!this.getSchema(ae)&&await A.call(this,{$ref:ae},!0)}async function C(ae){try{return this._compileSchemaEnv(ae)}catch(N){if(!(N instanceof i.default))throw N;return W.call(this,N),await Y.call(this,N.missingSchema),C.call(this,ae)}}function W({missingSchema:ae,missingRef:N}){if(this.refs[ae])throw new Error(`AnySchema ${ae} is loaded but ${N} cannot be resolved`)}async function Y(ae){const N=await se.call(this,ae);this.refs[ae]||await b.call(this,N.$schema),this.refs[ae]||this.addSchema(N,ae,V)}async function se(ae){const N=this._loading[ae];if(N)return N;try{return await(this._loading[ae]=k(ae))}finally{delete this._loading[ae]}}}addSchema(S,V,k,A=this.opts.validateSchema){if(Array.isArray(S)){for(const C of S)this.addSchema(C,void 0,k,A);return this}let b;if(typeof S=="object"){const{schemaId:C}=this.opts;if(b=S[C],b!==void 0&&typeof b!="string")throw new Error(`schema ${C} must be string`)}return V=(0,c.normalizeId)(V||b),this._checkUnique(V),this.schemas[V]=this._addSchema(S,k,V,A,!0),this}addMetaSchema(S,V,k=this.opts.validateSchema){return this.addSchema(S,V,!0,k),this}validateSchema(S,V){if(typeof S=="boolean")return!0;let k;if(k=S.$schema,k!==void 0&&typeof k!="string")throw new Error("$schema must be a string");if(k=k||this.opts.defaultMeta||this.defaultMeta(),!k)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const A=this.validate(k,S);if(!A&&V){const b="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(b);else throw new Error(b)}return A}getSchema(S){let V;for(;typeof(V=D.call(this,S))=="string";)S=V;if(V===void 0){const{schemaId:k}=this.opts,A=new s.SchemaEnv({schema:{},schemaId:k});if(V=s.resolveSchema.call(this,A,S),!V)return;this.refs[S]=V}return V.validate||this._compileSchemaEnv(V)}removeSchema(S){if(S instanceof RegExp)return this._removeAllSchemas(this.schemas,S),this._removeAllSchemas(this.refs,S),this;switch(typeof S){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const V=D.call(this,S);return typeof V=="object"&&this._cache.delete(V.schema),delete this.schemas[S],delete this.refs[S],this}case"object":{const V=S;this._cache.delete(V);let k=S[this.opts.schemaId];return k&&(k=(0,c.normalizeId)(k),delete this.schemas[k],delete this.refs[k]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(S){for(const V of S)this.addKeyword(V);return this}addKeyword(S,V){let k;if(typeof S=="string")k=S,typeof V=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),V.keyword=k);else if(typeof S=="object"&&V===void 0){if(V=S,k=V.keyword,Array.isArray(k)&&!k.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(L.call(this,k,V),!V)return(0,u.eachItem)(k,b=>q.call(this,b)),this;G.call(this,V);const A={...V,type:(0,f.getJSONTypes)(V.type),schemaType:(0,f.getJSONTypes)(V.schemaType)};return(0,u.eachItem)(k,A.type.length===0?b=>q.call(this,b,A):b=>A.type.forEach(C=>q.call(this,b,A,C))),this}getKeyword(S){const V=this.RULES.all[S];return typeof V=="object"?V.definition:!!V}removeKeyword(S){const{RULES:V}=this;delete V.keywords[S],delete V.all[S];for(const k of V.rules){const A=k.rules.findIndex(b=>b.keyword===S);A>=0&&k.rules.splice(A,1)}return this}addFormat(S,V){return typeof V=="string"&&(V=new RegExp(V)),this.formats[S]=V,this}errorsText(S=this.errors,{separator:V=", ",dataVar:k="data"}={}){return!S||S.length===0?"No errors":S.map(A=>`${k}${A.instancePath} ${A.message}`).reduce((A,b)=>A+V+b)}$dataMetaSchema(S,V){const k=this.RULES.all;S=JSON.parse(JSON.stringify(S));for(const A of V){const b=A.split("/").slice(1);let C=S;for(const W of b)C=C[W];for(const W in k){const Y=k[W];if(typeof Y!="object")continue;const{$data:se}=Y.definition,ae=C[W];se&&ae&&(C[W]=oe(ae))}}return S}_removeAllSchemas(S,V){for(const k in S){const A=S[k];(!V||V.test(k))&&(typeof A=="string"?delete S[k]:A&&!A.meta&&(this._cache.delete(A.schema),delete S[k]))}}_addSchema(S,V,k,A=this.opts.validateSchema,b=this.opts.addUsedSchema){let C;const{schemaId:W}=this.opts;if(typeof S=="object")C=S[W];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof S!="boolean")throw new Error("schema must be object or boolean")}let Y=this._cache.get(S);if(Y!==void 0)return Y;k=(0,c.normalizeId)(C||k);const se=c.getSchemaRefs.call(this,S,k);return Y=new s.SchemaEnv({schema:S,schemaId:W,meta:V,baseId:k,localRefs:se}),this._cache.set(Y.schema,Y),b&&!k.startsWith("#")&&(k&&this._checkUnique(k),this.refs[k]=Y),A&&this.validateSchema(S,!0),Y}_checkUnique(S){if(this.schemas[S]||this.refs[S])throw new Error(`schema with key or id "${S}" already exists`)}_compileSchemaEnv(S){if(S.meta?this._compileMetaSchema(S):s.compileSchema.call(this,S),!S.validate)throw new Error("ajv implementation error");return S.validate}_compileMetaSchema(S){const V=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,S)}finally{this.opts=V}}}_.ValidationError=n.default,_.MissingRefError=i.default,t.default=_;function w(H,S,V,k="error"){for(const A in H){const b=A;b in S&&this.logger[k](`${V}: option ${A}. ${H[b]}`)}}function D(H){return H=(0,c.normalizeId)(H),this.schemas[H]||this.refs[H]}function $(){const H=this.opts.schemas;if(H)if(Array.isArray(H))this.addSchema(H);else for(const S in H)this.addSchema(H[S],S)}function F(){for(const H in this.opts.formats){const S=this.opts.formats[H];S&&this.addFormat(H,S)}}function M(H){if(Array.isArray(H)){this.addVocabulary(H);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const S in H){const V=H[S];V.keyword||(V.keyword=S),this.addKeyword(V)}}function U(){const H={...this.opts};for(const S of E)delete H[S];return H}const j={log(){},warn(){},error(){}};function B(H){if(H===!1)return j;if(H===void 0)return console;if(H.log&&H.warn&&H.error)return H;throw new Error("logger must implement log, warn and error methods")}const T=/^[a-z_$][a-z0-9_$:-]*$/i;function L(H,S){const{RULES:V}=this;if((0,u.eachItem)(H,k=>{if(V.keywords[k])throw new Error(`Keyword ${k} is already defined`);if(!T.test(k))throw new Error(`Keyword ${k} has invalid name`)}),!!S&&S.$data&&!("code"in S||"validate"in S))throw new Error('$data keyword must have "code" or "validate" function')}function q(H,S,V){var k;const A=S?.post;if(V&&A)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:b}=this;let C=A?b.post:b.rules.find(({type:Y})=>Y===V);if(C||(C={type:V,rules:[]},b.rules.push(C)),b.keywords[H]=!0,!S)return;const W={keyword:H,definition:{...S,type:(0,f.getJSONTypes)(S.type),schemaType:(0,f.getJSONTypes)(S.schemaType)}};S.before?X.call(this,C,W,S.before):C.rules.push(W),b.all[H]=W,(k=S.implements)===null||k===void 0||k.forEach(Y=>this.addKeyword(Y))}function X(H,S,V){const k=H.rules.findIndex(A=>A.keyword===V);k>=0?H.rules.splice(k,0,S):(H.rules.push(S),this.logger.warn(`rule ${V} is not defined`))}function G(H){let{metaSchema:S}=H;S!==void 0&&(H.$data&&this.opts.$data&&(S=oe(S)),H.validateSchema=this.compile(S,!0))}const Z={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function oe(H){return{anyOf:[H,Z]}}}(Ro)),Ro}var ti={},ri={},ni={},sf;function QE(){if(sf)return ni;sf=1,Object.defineProperty(ni,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return ni.default=t,ni}var zt={},of;function Bo(){if(of)return zt;of=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.callRef=zt.getValidate=void 0;const t=un(),e=dt(),r=pe(),n=lt(),i=Zn(),o=De(),s={keyword:"$ref",schemaType:"string",code(f){const{gen:u,schema:h,it:d}=f,{baseId:y,schemaEnv:E,validateName:v,opts:l,self:m}=d,{root:p}=E;if((h==="#"||h==="#/")&&y===p.baseId)return _();const g=i.resolveRef.call(m,p,y,h);if(g===void 0)throw new t.default(d.opts.uriResolver,y,h);if(g instanceof i.SchemaEnv)return w(g);return D(g);function _(){if(E===p)return c(f,v,E,E.$async);const $=u.scopeValue("root",{ref:p});return c(f,(0,r._)`${$}.validate`,p,p.$async)}function w($){const F=a(f,$);c(f,F,$,$.$async)}function D($){const F=u.scopeValue("schema",l.code.source===!0?{ref:$,code:(0,r.stringify)($)}:{ref:$}),M=u.name("valid"),U=f.subschema({schema:$,dataTypes:[],schemaPath:r.nil,topSchemaRef:F,errSchemaPath:h},M);f.mergeEvaluated(U),f.ok(M)}}};function a(f,u){const{gen:h}=f;return u.validate?h.scopeValue("validate",{ref:u.validate}):(0,r._)`${h.scopeValue("wrapper",{ref:u})}.validate`}zt.getValidate=a;function c(f,u,h,d){const{gen:y,it:E}=f,{allErrors:v,schemaEnv:l,opts:m}=E,p=m.passContext?n.default.this:r.nil;d?g():_();function g(){if(!l.$async)throw new Error("async schema referenced by sync schema");const $=y.let("valid");y.try(()=>{y.code((0,r._)`await ${(0,e.callValidateCode)(f,u,p)}`),D(u),v||y.assign($,!0)},F=>{y.if((0,r._)`!(${F} instanceof ${E.ValidationError})`,()=>y.throw(F)),w(F),v||y.assign($,!1)}),f.ok($)}function _(){f.result((0,e.callValidateCode)(f,u,p),()=>D(u),()=>w(u))}function w($){const F=(0,r._)`${$}.errors`;y.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${F} : ${n.default.vErrors}.concat(${F})`),y.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function D($){var F;if(!E.opts.unevaluated)return;const M=(F=h?.validate)===null||F===void 0?void 0:F.evaluated;if(E.props!==!0)if(M&&!M.dynamicProps)M.props!==void 0&&(E.props=o.mergeEvaluated.props(y,M.props,E.props));else{const U=y.var("props",(0,r._)`${$}.evaluated.props`);E.props=o.mergeEvaluated.props(y,U,E.props,r.Name)}if(E.items!==!0)if(M&&!M.dynamicItems)M.items!==void 0&&(E.items=o.mergeEvaluated.items(y,M.items,E.items));else{const U=y.var("items",(0,r._)`${$}.evaluated.items`);E.items=o.mergeEvaluated.items(y,U,E.items,r.Name)}}}return zt.callRef=c,zt.default=s,zt}var af;function uf(){if(af)return ri;af=1,Object.defineProperty(ri,"__esModule",{value:!0});const t=QE(),e=Bo(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return ri.default=r,ri}var ii={},si={},cf;function ZE(){if(cf)return si;cf=1,Object.defineProperty(si,"__esModule",{value:!0});const t=pe(),e=t.operators,r={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},n={message:({keyword:o,schemaCode:s})=>(0,t.str)`must be ${r[o].okStr} ${s}`,params:({keyword:o,schemaCode:s})=>(0,t._)`{comparison: ${r[o].okStr}, limit: ${s}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(o){const{keyword:s,data:a,schemaCode:c}=o;o.fail$data((0,t._)`${a} ${r[s].fail} ${c} || isNaN(${a})`)}};return si.default=i,si}var oi={},lf;function ev(){if(lf)return oi;lf=1,Object.defineProperty(oi,"__esModule",{value:!0});const t=pe(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,t._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:o,schemaCode:s,it:a}=n,c=a.opts.multipleOfPrecision,f=i.let("res"),u=c?(0,t._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${c}`:(0,t._)`${f} !== parseInt(${f})`;n.fail$data((0,t._)`(${s} === 0 || (${f} = ${o}/${s}, ${u}))`)}};return oi.default=r,oi}var ai={},ui={},ff;function tv(){if(ff)return ui;ff=1,Object.defineProperty(ui,"__esModule",{value:!0});function t(e){const r=e.length;let n=0,i=0,o;for(;i<r;)n++,o=e.charCodeAt(i++),o>=55296&&o<=56319&&i<r&&(o=e.charCodeAt(i),(o&64512)===56320&&i++);return n}return ui.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',ui}var df;function rv(){if(df)return ai;df=1,Object.defineProperty(ai,"__esModule",{value:!0});const t=pe(),e=De(),r=tv(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:s}){const a=o==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${a} than ${s} characters`},params:({schemaCode:o})=>(0,t._)`{limit: ${o}}`},code(o){const{keyword:s,data:a,schemaCode:c,it:f}=o,u=s==="maxLength"?t.operators.GT:t.operators.LT,h=f.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,e.useFunc)(o.gen,r.default)}(${a})`;o.fail$data((0,t._)`${h} ${u} ${c}`)}};return ai.default=i,ai}var ci={},hf;function nv(){if(hf)return ci;hf=1,Object.defineProperty(ci,"__esModule",{value:!0});const t=dt(),e=pe(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,e._)`{pattern: ${i}}`},code(i){const{data:o,$data:s,schema:a,schemaCode:c,it:f}=i,u=f.opts.unicodeRegExp?"u":"",h=s?(0,e._)`(new RegExp(${c}, ${u}))`:(0,t.usePattern)(i,a);i.fail$data((0,e._)`!${h}.test(${o})`)}};return ci.default=n,ci}var li={},pf;function iv(){if(pf)return li;pf=1,Object.defineProperty(li,"__esModule",{value:!0});const t=pe(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const o=n==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${o} than ${i} properties`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:i,data:o,schemaCode:s}=n,a=i==="maxProperties"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`Object.keys(${o}).length ${a} ${s}`)}};return li.default=r,li}var fi={},mf;function sv(){if(mf)return fi;mf=1,Object.defineProperty(fi,"__esModule",{value:!0});const t=dt(),e=pe(),r=De(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,e.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,e._)`{missingProperty: ${o}}`},code(o){const{gen:s,schema:a,schemaCode:c,data:f,$data:u,it:h}=o,{opts:d}=h;if(!u&&a.length===0)return;const y=a.length>=d.loopRequired;if(h.allErrors?E():v(),d.strictRequired){const p=o.parentSchema.properties,{definedProperties:g}=o.it;for(const _ of a)if(p?.[_]===void 0&&!g.has(_)){const w=h.schemaEnv.baseId+h.errSchemaPath,D=`required property "${_}" is not defined at "${w}" (strictRequired)`;(0,r.checkStrictMode)(h,D,h.opts.strictRequired)}}function E(){if(y||u)o.block$data(e.nil,l);else for(const p of a)(0,t.checkReportMissingProp)(o,p)}function v(){const p=s.let("missing");if(y||u){const g=s.let("valid",!0);o.block$data(g,()=>m(p,g)),o.ok(g)}else s.if((0,t.checkMissingProp)(o,a,p)),(0,t.reportMissingProp)(o,p),s.else()}function l(){s.forOf("prop",c,p=>{o.setParams({missingProperty:p}),s.if((0,t.noPropertyInData)(s,f,p,d.ownProperties),()=>o.error())})}function m(p,g){o.setParams({missingProperty:p}),s.forOf(p,c,()=>{s.assign(g,(0,t.propertyInData)(s,f,p,d.ownProperties)),s.if((0,e.not)(g),()=>{o.error(),s.break()})},e.nil)}}};return fi.default=i,fi}var di={},gf;function ov(){if(gf)return di;gf=1,Object.defineProperty(di,"__esModule",{value:!0});const t=pe(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const o=n==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${o} than ${i} items`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:i,data:o,schemaCode:s}=n,a=i==="maxItems"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`${o}.length ${a} ${s}`)}};return di.default=r,di}var hi={},pi={},yf;function ko(){if(yf)return pi;yf=1,Object.defineProperty(pi,"__esModule",{value:!0});const t=Bl();return t.code='require("ajv/dist/runtime/equal").default',pi.default=t,pi}var Ef;function av(){if(Ef)return hi;Ef=1,Object.defineProperty(hi,"__esModule",{value:!0});const t=Kn(),e=pe(),r=De(),n=ko(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:s,j:a}})=>(0,e.str)`must NOT have duplicate items (items ## ${a} and ${s} are identical)`,params:({params:{i:s,j:a}})=>(0,e._)`{i: ${s}, j: ${a}}`},code(s){const{gen:a,data:c,$data:f,schema:u,parentSchema:h,schemaCode:d,it:y}=s;if(!f&&!u)return;const E=a.let("valid"),v=h.items?(0,t.getSchemaTypes)(h.items):[];s.block$data(E,l,(0,e._)`${d} === false`),s.ok(E);function l(){const _=a.let("i",(0,e._)`${c}.length`),w=a.let("j");s.setParams({i:_,j:w}),a.assign(E,!0),a.if((0,e._)`${_} > 1`,()=>(m()?p:g)(_,w))}function m(){return v.length>0&&!v.some(_=>_==="object"||_==="array")}function p(_,w){const D=a.name("item"),$=(0,t.checkDataTypes)(v,D,y.opts.strictNumbers,t.DataType.Wrong),F=a.const("indices",(0,e._)`{}`);a.for((0,e._)`;${_}--;`,()=>{a.let(D,(0,e._)`${c}[${_}]`),a.if($,(0,e._)`continue`),v.length>1&&a.if((0,e._)`typeof ${D} == "string"`,(0,e._)`${D} += "_"`),a.if((0,e._)`typeof ${F}[${D}] == "number"`,()=>{a.assign(w,(0,e._)`${F}[${D}]`),s.error(),a.assign(E,!1).break()}).code((0,e._)`${F}[${D}] = ${_}`)})}function g(_,w){const D=(0,r.useFunc)(a,n.default),$=a.name("outer");a.label($).for((0,e._)`;${_}--;`,()=>a.for((0,e._)`${w} = ${_}; ${w}--;`,()=>a.if((0,e._)`${D}(${c}[${_}], ${c}[${w}])`,()=>{s.error(),a.assign(E,!1).break($)})))}}};return hi.default=o,hi}var mi={},vf;function uv(){if(vf)return mi;vf=1,Object.defineProperty(mi,"__esModule",{value:!0});const t=pe(),e=De(),r=ko(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,t._)`{allowedValue: ${o}}`},code(o){const{gen:s,data:a,$data:c,schemaCode:f,schema:u}=o;c||u&&typeof u=="object"?o.fail$data((0,t._)`!${(0,e.useFunc)(s,r.default)}(${a}, ${f})`):o.fail((0,t._)`${u} !== ${a}`)}};return mi.default=i,mi}var gi={},_f;function cv(){if(_f)return gi;_f=1,Object.defineProperty(gi,"__esModule",{value:!0});const t=pe(),e=De(),r=ko(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,t._)`{allowedValues: ${o}}`},code(o){const{gen:s,data:a,$data:c,schema:f,schemaCode:u,it:h}=o;if(!c&&f.length===0)throw new Error("enum must have non-empty array");const d=f.length>=h.opts.loopEnum;let y;const E=()=>y??(y=(0,e.useFunc)(s,r.default));let v;if(d||c)v=s.let("valid"),o.block$data(v,l);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const p=s.const("vSchema",u);v=(0,t.or)(...f.map((g,_)=>m(p,_)))}o.pass(v);function l(){s.assign(v,!1),s.forOf("v",u,p=>s.if((0,t._)`${E()}(${a}, ${p})`,()=>s.assign(v,!0).break()))}function m(p,g){const _=f[g];return typeof _=="object"&&_!==null?(0,t._)`${E()}(${a}, ${p}[${g}])`:(0,t._)`${a} === ${_}`}}};return gi.default=i,gi}var wf;function Df(){if(wf)return ii;wf=1,Object.defineProperty(ii,"__esModule",{value:!0});const t=ZE(),e=ev(),r=rv(),n=nv(),i=iv(),o=sv(),s=ov(),a=av(),c=uv(),f=cv(),u=[t.default,e.default,r.default,n.default,i.default,o.default,s.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,f.default];return ii.default=u,ii}var yi={},Cr={},$f;function bf(){if($f)return Cr;$f=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.validateAdditionalItems=void 0;const t=pe(),e=De(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,t.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,t._)`{limit: ${o}}`},code(o){const{parentSchema:s,it:a}=o,{items:c}=s;if(!Array.isArray(c)){(0,e.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(o,c)}};function i(o,s){const{gen:a,schema:c,data:f,keyword:u,it:h}=o;h.items=!0;const d=a.const("len",(0,t._)`${f}.length`);if(c===!1)o.setParams({len:s.length}),o.pass((0,t._)`${d} <= ${s.length}`);else if(typeof c=="object"&&!(0,e.alwaysValidSchema)(h,c)){const E=a.var("valid",(0,t._)`${d} <= ${s.length}`);a.if((0,t.not)(E),()=>y(E)),o.ok(E)}function y(E){a.forRange("i",s.length,d,v=>{o.subschema({keyword:u,dataProp:v,dataPropType:e.Type.Num},E),h.allErrors||a.if((0,t.not)(E),()=>a.break())})}}return Cr.validateAdditionalItems=i,Cr.default=n,Cr}var Ei={},Sr={},Af;function Cf(){if(Af)return Sr;Af=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.validateTuple=void 0;const t=pe(),e=De(),r=dt(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:s,it:a}=o;if(Array.isArray(s))return i(o,"additionalItems",s);a.items=!0,!(0,e.alwaysValidSchema)(a,s)&&o.ok((0,r.validateArray)(o))}};function i(o,s,a=o.schema){const{gen:c,parentSchema:f,data:u,keyword:h,it:d}=o;v(f),d.opts.unevaluated&&a.length&&d.items!==!0&&(d.items=e.mergeEvaluated.items(c,a.length,d.items));const y=c.name("valid"),E=c.const("len",(0,t._)`${u}.length`);a.forEach((l,m)=>{(0,e.alwaysValidSchema)(d,l)||(c.if((0,t._)`${E} > ${m}`,()=>o.subschema({keyword:h,schemaProp:m,dataProp:m},y)),o.ok(y))});function v(l){const{opts:m,errSchemaPath:p}=d,g=a.length,_=g===l.minItems&&(g===l.maxItems||l[s]===!1);if(m.strictTuples&&!_){const w=`"${h}" is ${g}-tuple, but minItems or maxItems/${s} are not specified or different at path "${p}"`;(0,e.checkStrictMode)(d,w,m.strictTuples)}}}return Sr.validateTuple=i,Sr.default=n,Sr}var Sf;function lv(){if(Sf)return Ei;Sf=1,Object.defineProperty(Ei,"__esModule",{value:!0});const t=Cf(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return Ei.default=e,Ei}var vi={},Rf;function fv(){if(Rf)return vi;Rf=1,Object.defineProperty(vi,"__esModule",{value:!0});const t=pe(),e=De(),r=dt(),n=bf(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,t.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,t._)`{limit: ${s}}`},code(s){const{schema:a,parentSchema:c,it:f}=s,{prefixItems:u}=c;f.items=!0,!(0,e.alwaysValidSchema)(f,a)&&(u?(0,n.validateAdditionalItems)(s,u):s.ok((0,r.validateArray)(s)))}};return vi.default=o,vi}var _i={},Of;function dv(){if(Of)return _i;Of=1,Object.defineProperty(_i,"__esModule",{value:!0});const t=pe(),e=De(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:o}})=>o===void 0?(0,t.str)`must contain at least ${i} valid item(s)`:(0,t.str)`must contain at least ${i} and no more than ${o} valid item(s)`,params:({params:{min:i,max:o}})=>o===void 0?(0,t._)`{minContains: ${i}}`:(0,t._)`{minContains: ${i}, maxContains: ${o}}`},code(i){const{gen:o,schema:s,parentSchema:a,data:c,it:f}=i;let u,h;const{minContains:d,maxContains:y}=a;f.opts.next?(u=d===void 0?1:d,h=y):u=1;const E=o.const("len",(0,t._)`${c}.length`);if(i.setParams({min:u,max:h}),h===void 0&&u===0){(0,e.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(h!==void 0&&u>h){(0,e.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,e.alwaysValidSchema)(f,s)){let g=(0,t._)`${E} >= ${u}`;h!==void 0&&(g=(0,t._)`${g} && ${E} <= ${h}`),i.pass(g);return}f.items=!0;const v=o.name("valid");h===void 0&&u===1?m(v,()=>o.if(v,()=>o.break())):u===0?(o.let(v,!0),h!==void 0&&o.if((0,t._)`${c}.length > 0`,l)):(o.let(v,!1),l()),i.result(v,()=>i.reset());function l(){const g=o.name("_valid"),_=o.let("count",0);m(g,()=>o.if(g,()=>p(_)))}function m(g,_){o.forRange("i",0,E,w=>{i.subschema({keyword:"contains",dataProp:w,dataPropType:e.Type.Num,compositeRule:!0},g),_()})}function p(g){o.code((0,t._)`${g}++`),h===void 0?o.if((0,t._)`${g} >= ${u}`,()=>o.assign(v,!0).break()):(o.if((0,t._)`${g} > ${h}`,()=>o.assign(v,!1).break()),u===1?o.assign(v,!0):o.if((0,t._)`${g} >= ${u}`,()=>o.assign(v,!0)))}}};return _i.default=n,_i}var Mo={},Ff;function qo(){return Ff||(Ff=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=pe(),r=De(),n=dt();t.error={message:({params:{property:c,depsCount:f,deps:u}})=>{const h=f===1?"property":"properties";return(0,e.str)`must have ${h} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:f,deps:u,missingProperty:h}})=>(0,e._)`{property: ${c},
425
- missingProperty: ${h},
426
- depsCount: ${f},
427
- deps: ${u}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(c){const[f,u]=o(c);s(c,f),a(c,u)}};function o({schema:c}){const f={},u={};for(const h in c){if(h==="__proto__")continue;const d=Array.isArray(c[h])?f:u;d[h]=c[h]}return[f,u]}function s(c,f=c.schema){const{gen:u,data:h,it:d}=c;if(Object.keys(f).length===0)return;const y=u.let("missing");for(const E in f){const v=f[E];if(v.length===0)continue;const l=(0,n.propertyInData)(u,h,E,d.opts.ownProperties);c.setParams({property:E,depsCount:v.length,deps:v.join(", ")}),d.allErrors?u.if(l,()=>{for(const m of v)(0,n.checkReportMissingProp)(c,m)}):(u.if((0,e._)`${l} && (${(0,n.checkMissingProp)(c,v,y)})`),(0,n.reportMissingProp)(c,y),u.else())}}t.validatePropertyDeps=s;function a(c,f=c.schema){const{gen:u,data:h,keyword:d,it:y}=c,E=u.name("valid");for(const v in f)(0,r.alwaysValidSchema)(y,f[v])||(u.if((0,n.propertyInData)(u,h,v,y.opts.ownProperties),()=>{const l=c.subschema({keyword:d,schemaProp:v},E);c.mergeValidEvaluated(l,E)},()=>u.var(E,!0)),c.ok(E))}t.validateSchemaDeps=a,t.default=i}(Mo)),Mo}var wi={},If;function hv(){if(If)return wi;If=1,Object.defineProperty(wi,"__esModule",{value:!0});const t=pe(),e=De(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,t._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:o,schema:s,data:a,it:c}=i;if((0,e.alwaysValidSchema)(c,s))return;const f=o.name("valid");o.forIn("key",a,u=>{i.setParams({propertyName:u}),i.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},f),o.if((0,t.not)(f),()=>{i.error(!0),c.allErrors||o.break()})}),i.ok(f)}};return wi.default=n,wi}var Di={},Pf;function Nf(){if(Pf)return Di;Pf=1,Object.defineProperty(Di,"__esModule",{value:!0});const t=dt(),e=pe(),r=lt(),n=De(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:s})=>(0,e._)`{additionalProperty: ${s.additionalProperty}}`},code(s){const{gen:a,schema:c,parentSchema:f,data:u,errsCount:h,it:d}=s;if(!h)throw new Error("ajv implementation error");const{allErrors:y,opts:E}=d;if(d.props=!0,E.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(d,c))return;const v=(0,t.allSchemaProperties)(f.properties),l=(0,t.allSchemaProperties)(f.patternProperties);m(),s.ok((0,e._)`${h} === ${r.default.errors}`);function m(){a.forIn("key",u,D=>{!v.length&&!l.length?_(D):a.if(p(D),()=>_(D))})}function p(D){let $;if(v.length>8){const F=(0,n.schemaRefOrVal)(d,f.properties,"properties");$=(0,t.isOwnProperty)(a,F,D)}else v.length?$=(0,e.or)(...v.map(F=>(0,e._)`${D} === ${F}`)):$=e.nil;return l.length&&($=(0,e.or)($,...l.map(F=>(0,e._)`${(0,t.usePattern)(s,F)}.test(${D})`))),(0,e.not)($)}function g(D){a.code((0,e._)`delete ${u}[${D}]`)}function _(D){if(E.removeAdditional==="all"||E.removeAdditional&&c===!1){g(D);return}if(c===!1){s.setParams({additionalProperty:D}),s.error(),y||a.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(d,c)){const $=a.name("valid");E.removeAdditional==="failing"?(w(D,$,!1),a.if((0,e.not)($),()=>{s.reset(),g(D)})):(w(D,$),y||a.if((0,e.not)($),()=>a.break()))}}function w(D,$,F){const M={keyword:"additionalProperties",dataProp:D,dataPropType:n.Type.Str};F===!1&&Object.assign(M,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(M,$)}}};return Di.default=o,Di}var $i={},Tf;function pv(){if(Tf)return $i;Tf=1,Object.defineProperty($i,"__esModule",{value:!0});const t=an(),e=dt(),r=De(),n=Nf(),i={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,parentSchema:c,data:f,it:u}=o;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(u,n.default,"additionalProperties"));const h=(0,e.allSchemaProperties)(a);for(const l of h)u.definedProperties.add(l);u.opts.unevaluated&&h.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(s,(0,r.toHash)(h),u.props));const d=h.filter(l=>!(0,r.alwaysValidSchema)(u,a[l]));if(d.length===0)return;const y=s.name("valid");for(const l of d)E(l)?v(l):(s.if((0,e.propertyInData)(s,f,l,u.opts.ownProperties)),v(l),u.allErrors||s.else().var(y,!0),s.endIf()),o.it.definedProperties.add(l),o.ok(y);function E(l){return u.opts.useDefaults&&!u.compositeRule&&a[l].default!==void 0}function v(l){o.subschema({keyword:"properties",schemaProp:l,dataProp:l},y)}}};return $i.default=i,$i}var bi={},jf;function mv(){if(jf)return bi;jf=1,Object.defineProperty(bi,"__esModule",{value:!0});const t=dt(),e=pe(),r=De(),n=De(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,data:c,parentSchema:f,it:u}=o,{opts:h}=u,d=(0,t.allSchemaProperties)(a),y=d.filter(_=>(0,r.alwaysValidSchema)(u,a[_]));if(d.length===0||y.length===d.length&&(!u.opts.unevaluated||u.props===!0))return;const E=h.strictSchema&&!h.allowMatchingProperties&&f.properties,v=s.name("valid");u.props!==!0&&!(u.props instanceof e.Name)&&(u.props=(0,n.evaluatedPropsToName)(s,u.props));const{props:l}=u;m();function m(){for(const _ of d)E&&p(_),u.allErrors?g(_):(s.var(v,!0),g(_),s.if(v))}function p(_){for(const w in E)new RegExp(_).test(w)&&(0,r.checkStrictMode)(u,`property ${w} matches pattern ${_} (use allowMatchingProperties)`)}function g(_){s.forIn("key",c,w=>{s.if((0,e._)`${(0,t.usePattern)(o,_)}.test(${w})`,()=>{const D=y.includes(_);D||o.subschema({keyword:"patternProperties",schemaProp:_,dataProp:w,dataPropType:n.Type.Str},v),u.opts.unevaluated&&l!==!0?s.assign((0,e._)`${l}[${w}]`,!0):!D&&!u.allErrors&&s.if((0,e.not)(v),()=>s.break())})})}}};return bi.default=i,bi}var Ai={},Lf;function gv(){if(Lf)return Ai;Lf=1,Object.defineProperty(Ai,"__esModule",{value:!0});const t=De(),e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:o}=r;if((0,t.alwaysValidSchema)(o,i)){r.fail();return}const s=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),r.failResult(s,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Ai.default=e,Ai}var Ci={},xf;function yv(){if(xf)return Ci;xf=1,Object.defineProperty(Ci,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:dt().validateUnion,error:{message:"must match a schema in anyOf"}};return Ci.default=e,Ci}var Si={},Bf;function Ev(){if(Bf)return Si;Bf=1,Object.defineProperty(Si,"__esModule",{value:!0});const t=pe(),e=De(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,t._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:o,schema:s,parentSchema:a,it:c}=i;if(!Array.isArray(s))throw new Error("ajv implementation error");if(c.opts.discriminator&&a.discriminator)return;const f=s,u=o.let("valid",!1),h=o.let("passing",null),d=o.name("_valid");i.setParams({passing:h}),o.block(y),i.result(u,()=>i.reset(),()=>i.error(!0));function y(){f.forEach((E,v)=>{let l;(0,e.alwaysValidSchema)(c,E)?o.var(d,!0):l=i.subschema({keyword:"oneOf",schemaProp:v,compositeRule:!0},d),v>0&&o.if((0,t._)`${d} && ${u}`).assign(u,!1).assign(h,(0,t._)`[${h}, ${v}]`).else(),o.if(d,()=>{o.assign(u,!0),o.assign(h,v),l&&i.mergeEvaluated(l,t.Name)})})}}};return Si.default=n,Si}var Ri={},kf;function vv(){if(kf)return Ri;kf=1,Object.defineProperty(Ri,"__esModule",{value:!0});const t=De(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:i,it:o}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const s=n.name("valid");i.forEach((a,c)=>{if((0,t.alwaysValidSchema)(o,a))return;const f=r.subschema({keyword:"allOf",schemaProp:c},s);r.ok(s),r.mergeEvaluated(f)})}};return Ri.default=e,Ri}var Oi={},Mf;function _v(){if(Mf)return Oi;Mf=1,Object.defineProperty(Oi,"__esModule",{value:!0});const t=pe(),e=De(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,t.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,t._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:s,parentSchema:a,it:c}=o;a.then===void 0&&a.else===void 0&&(0,e.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const f=i(c,"then"),u=i(c,"else");if(!f&&!u)return;const h=s.let("valid",!0),d=s.name("_valid");if(y(),o.reset(),f&&u){const v=s.let("ifClause");o.setParams({ifClause:v}),s.if(d,E("then",v),E("else",v))}else f?s.if(d,E("then")):s.if((0,t.not)(d),E("else"));o.pass(h,()=>o.error(!0));function y(){const v=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);o.mergeEvaluated(v)}function E(v,l){return()=>{const m=o.subschema({keyword:v},d);s.assign(h,d),o.mergeValidEvaluated(m,h),l?s.assign(l,(0,t._)`${v}`):o.setParams({ifClause:v})}}}};function i(o,s){const a=o.schema[s];return a!==void 0&&!(0,e.alwaysValidSchema)(o,a)}return Oi.default=n,Oi}var Fi={},qf;function wv(){if(qf)return Fi;qf=1,Object.defineProperty(Fi,"__esModule",{value:!0});const t=De(),e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,t.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return Fi.default=e,Fi}var Uf;function Hf(){if(Uf)return yi;Uf=1,Object.defineProperty(yi,"__esModule",{value:!0});const t=bf(),e=lv(),r=Cf(),n=fv(),i=dv(),o=qo(),s=hv(),a=Nf(),c=pv(),f=mv(),u=gv(),h=yv(),d=Ev(),y=vv(),E=_v(),v=wv();function l(m=!1){const p=[u.default,h.default,d.default,y.default,E.default,v.default,s.default,a.default,o.default,c.default,f.default];return m?p.push(e.default,n.default):p.push(t.default,r.default),p.push(i.default),p}return yi.default=l,yi}var Ii={},Rr={},Vf;function zf(){if(Vf)return Rr;Vf=1,Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.dynamicAnchor=void 0;const t=pe(),e=lt(),r=Zn(),n=Bo(),i={keyword:"$dynamicAnchor",schemaType:"string",code:a=>o(a,a.schema)};function o(a,c){const{gen:f,it:u}=a;u.schemaEnv.root.dynamicAnchors[c]=!0;const h=(0,t._)`${e.default.dynamicAnchors}${(0,t.getProperty)(c)}`,d=u.errSchemaPath==="#"?u.validateName:s(a);f.if((0,t._)`!${h}`,()=>f.assign(h,d))}Rr.dynamicAnchor=o;function s(a){const{schemaEnv:c,schema:f,self:u}=a.it,{root:h,baseId:d,localRefs:y,meta:E}=c.root,{schemaId:v}=u.opts,l=new r.SchemaEnv({schema:f,schemaId:v,root:h,baseId:d,localRefs:y,meta:E});return r.compileSchema.call(u,l),(0,n.getValidate)(a,l)}return Rr.default=i,Rr}var Or={},Gf;function Wf(){if(Gf)return Or;Gf=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.dynamicRef=void 0;const t=pe(),e=lt(),r=Bo(),n={keyword:"$dynamicRef",schemaType:"string",code:o=>i(o,o.schema)};function i(o,s){const{gen:a,keyword:c,it:f}=o;if(s[0]!=="#")throw new Error(`"${c}" only supports hash fragment reference`);const u=s.slice(1);if(f.allErrors)h();else{const y=a.let("valid",!1);h(y),o.ok(y)}function h(y){if(f.schemaEnv.root.dynamicAnchors[u]){const E=a.let("_v",(0,t._)`${e.default.dynamicAnchors}${(0,t.getProperty)(u)}`);a.if(E,d(E,y),d(f.validateName,y))}else d(f.validateName,y)()}function d(y,E){return E?()=>a.block(()=>{(0,r.callRef)(o,y),a.let(E,!0)}):()=>(0,r.callRef)(o,y)}}return Or.dynamicRef=i,Or.default=n,Or}var Pi={},Kf;function Dv(){if(Kf)return Pi;Kf=1,Object.defineProperty(Pi,"__esModule",{value:!0});const t=zf(),e=De(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,t.dynamicAnchor)(n,""):(0,e.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return Pi.default=r,Pi}var Ni={},Yf;function $v(){if(Yf)return Ni;Yf=1,Object.defineProperty(Ni,"__esModule",{value:!0});const t=Wf(),e={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,t.dynamicRef)(r,r.schema)};return Ni.default=e,Ni}var Jf;function bv(){if(Jf)return Ii;Jf=1,Object.defineProperty(Ii,"__esModule",{value:!0});const t=zf(),e=Wf(),r=Dv(),n=$v(),i=[t.default,e.default,r.default,n.default];return Ii.default=i,Ii}var Ti={},ji={},Xf;function Av(){if(Xf)return ji;Xf=1,Object.defineProperty(ji,"__esModule",{value:!0});const t=qo(),e={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:r=>(0,t.validatePropertyDeps)(r)};return ji.default=e,ji}var Li={},Qf;function Cv(){if(Qf)return Li;Qf=1,Object.defineProperty(Li,"__esModule",{value:!0});const t=qo(),e={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,t.validateSchemaDeps)(r)};return Li.default=e,Li}var xi={},Zf;function Sv(){if(Zf)return xi;Zf=1,Object.defineProperty(xi,"__esModule",{value:!0});const t=De(),e={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:n,it:i}){n.contains===void 0&&(0,t.checkStrictMode)(i,`"${r}" without "contains" is ignored`)}};return xi.default=e,xi}var ed;function Rv(){if(ed)return Ti;ed=1,Object.defineProperty(Ti,"__esModule",{value:!0});const t=Av(),e=Cv(),r=Sv(),n=[t.default,e.default,r.default];return Ti.default=n,Ti}var Bi={},ki={},td;function Ov(){if(td)return ki;td=1,Object.defineProperty(ki,"__esModule",{value:!0});const t=pe(),e=De(),r=lt(),i={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:o})=>(0,t._)`{unevaluatedProperty: ${o.unevaluatedProperty}}`},code(o){const{gen:s,schema:a,data:c,errsCount:f,it:u}=o;if(!f)throw new Error("ajv implementation error");const{allErrors:h,props:d}=u;d instanceof t.Name?s.if((0,t._)`${d} !== true`,()=>s.forIn("key",c,l=>s.if(E(d,l),()=>y(l)))):d!==!0&&s.forIn("key",c,l=>d===void 0?y(l):s.if(v(d,l),()=>y(l))),u.props=!0,o.ok((0,t._)`${f} === ${r.default.errors}`);function y(l){if(a===!1){o.setParams({unevaluatedProperty:l}),o.error(),h||s.break();return}if(!(0,e.alwaysValidSchema)(u,a)){const m=s.name("valid");o.subschema({keyword:"unevaluatedProperties",dataProp:l,dataPropType:e.Type.Str},m),h||s.if((0,t.not)(m),()=>s.break())}}function E(l,m){return(0,t._)`!${l} || !${l}[${m}]`}function v(l,m){const p=[];for(const g in l)l[g]===!0&&p.push((0,t._)`${m} !== ${g}`);return(0,t.and)(...p)}}};return ki.default=i,ki}var Mi={},rd;function Fv(){if(rd)return Mi;rd=1,Object.defineProperty(Mi,"__esModule",{value:!0});const t=pe(),e=De(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:i}})=>(0,t.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,t._)`{limit: ${i}}`},code(i){const{gen:o,schema:s,data:a,it:c}=i,f=c.items||0;if(f===!0)return;const u=o.const("len",(0,t._)`${a}.length`);if(s===!1)i.setParams({len:f}),i.fail((0,t._)`${u} > ${f}`);else if(typeof s=="object"&&!(0,e.alwaysValidSchema)(c,s)){const d=o.var("valid",(0,t._)`${u} <= ${f}`);o.if((0,t.not)(d),()=>h(d,f)),i.ok(d)}c.items=!0;function h(d,y){o.forRange("i",y,u,E=>{i.subschema({keyword:"unevaluatedItems",dataProp:E,dataPropType:e.Type.Num},d),c.allErrors||o.if((0,t.not)(d),()=>o.break())})}}};return Mi.default=n,Mi}var nd;function Iv(){if(nd)return Bi;nd=1,Object.defineProperty(Bi,"__esModule",{value:!0});const t=Ov(),e=Fv(),r=[t.default,e.default];return Bi.default=r,Bi}var qi={},Ui={},id;function Pv(){if(id)return Ui;id=1,Object.defineProperty(Ui,"__esModule",{value:!0});const t=pe(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,t._)`{format: ${n}}`},code(n,i){const{gen:o,data:s,$data:a,schema:c,schemaCode:f,it:u}=n,{opts:h,errSchemaPath:d,schemaEnv:y,self:E}=u;if(!h.validateFormats)return;a?v():l();function v(){const m=o.scopeValue("formats",{ref:E.formats,code:h.code.formats}),p=o.const("fDef",(0,t._)`${m}[${f}]`),g=o.let("fType"),_=o.let("format");o.if((0,t._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>o.assign(g,(0,t._)`${p}.type || "string"`).assign(_,(0,t._)`${p}.validate`),()=>o.assign(g,(0,t._)`"string"`).assign(_,p)),n.fail$data((0,t.or)(w(),D()));function w(){return h.strictSchema===!1?t.nil:(0,t._)`${f} && !${_}`}function D(){const $=y.$async?(0,t._)`(${p}.async ? await ${_}(${s}) : ${_}(${s}))`:(0,t._)`${_}(${s})`,F=(0,t._)`(typeof ${_} == "function" ? ${$} : ${_}.test(${s}))`;return(0,t._)`${_} && ${_} !== true && ${g} === ${i} && !${F}`}}function l(){const m=E.formats[c];if(!m){w();return}if(m===!0)return;const[p,g,_]=D(m);p===i&&n.pass($());function w(){if(h.strictSchema===!1){E.logger.warn(F());return}throw new Error(F());function F(){return`unknown format "${c}" ignored in schema at path "${d}"`}}function D(F){const M=F instanceof RegExp?(0,t.regexpCode)(F):h.code.formats?(0,t._)`${h.code.formats}${(0,t.getProperty)(c)}`:void 0,U=o.scopeValue("formats",{key:c,ref:F,code:M});return typeof F=="object"&&!(F instanceof RegExp)?[F.type||"string",F.validate,(0,t._)`${U}.validate`]:["string",F,U]}function $(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!y.$async)throw new Error("async format in sync schema");return(0,t._)`await ${_}(${s})`}return typeof g=="function"?(0,t._)`${_}(${s})`:(0,t._)`${_}.test(${s})`}}}};return Ui.default=r,Ui}var sd;function od(){if(sd)return qi;sd=1,Object.defineProperty(qi,"__esModule",{value:!0});const e=[Pv().default];return qi.default=e,qi}var dr={},ad;function ud(){return ad||(ad=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.contentVocabulary=dr.metadataVocabulary=void 0,dr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],dr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),dr}var cd;function Nv(){if(cd)return ti;cd=1,Object.defineProperty(ti,"__esModule",{value:!0});const t=uf(),e=Df(),r=Hf(),n=bv(),i=Rv(),o=Iv(),s=od(),a=ud(),c=[n.default,t.default,e.default,(0,r.default)(!0),s.default,a.metadataVocabulary,a.contentVocabulary,i.default,o.default];return ti.default=c,ti}var Hi={},ln={},ld;function Tv(){if(ld)return ln;ld=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.DiscrError=void 0;var t;return function(e){e.Tag="tag",e.Mapping="mapping"}(t||(ln.DiscrError=t={})),ln}var fd;function dd(){if(fd)return Hi;fd=1,Object.defineProperty(Hi,"__esModule",{value:!0});const t=pe(),e=Tv(),r=Zn(),n=un(),i=De(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:c}})=>a===e.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:a,tag:c,tagName:f}})=>(0,t._)`{error: ${a}, tag: ${f}, tagValue: ${c}}`},code(a){const{gen:c,data:f,schema:u,parentSchema:h,it:d}=a,{oneOf:y}=h;if(!d.opts.discriminator)throw new Error("discriminator: requires discriminator option");const E=u.propertyName;if(typeof E!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!y)throw new Error("discriminator: requires oneOf keyword");const v=c.let("valid",!1),l=c.const("tag",(0,t._)`${f}${(0,t.getProperty)(E)}`);c.if((0,t._)`typeof ${l} == "string"`,()=>m(),()=>a.error(!1,{discrError:e.DiscrError.Tag,tag:l,tagName:E})),a.ok(v);function m(){const _=g();c.if(!1);for(const w in _)c.elseIf((0,t._)`${l} === ${w}`),c.assign(v,p(_[w]));c.else(),a.error(!1,{discrError:e.DiscrError.Mapping,tag:l,tagName:E}),c.endIf()}function p(_){const w=c.name("valid"),D=a.subschema({keyword:"oneOf",schemaProp:_},w);return a.mergeEvaluated(D,t.Name),w}function g(){var _;const w={},D=F(h);let $=!0;for(let j=0;j<y.length;j++){let B=y[j];if(B?.$ref&&!(0,i.schemaHasRulesButRef)(B,d.self.RULES)){const L=B.$ref;if(B=r.resolveRef.call(d.self,d.schemaEnv.root,d.baseId,L),B instanceof r.SchemaEnv&&(B=B.schema),B===void 0)throw new n.default(d.opts.uriResolver,d.baseId,L)}const T=(_=B?.properties)===null||_===void 0?void 0:_[E];if(typeof T!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${E}"`);$=$&&(D||F(B)),M(T,j)}if(!$)throw new Error(`discriminator: "${E}" must be required`);return w;function F({required:j}){return Array.isArray(j)&&j.includes(E)}function M(j,B){if(j.const)U(j.const,B);else if(j.enum)for(const T of j.enum)U(T,B);else throw new Error(`discriminator: "properties/${E}" must have "const" or "enum"`)}function U(j,B){if(typeof j!="string"||j in w)throw new Error(`discriminator: "${E}" values must be unique strings`);w[j]=B}}}};return Hi.default=s,Hi}var Vi={};const hd="https://json-schema.org/draft/2020-12/schema",pd="https://json-schema.org/draft/2020-12/schema",md={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"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},gd="meta",yd="Core and Validation specifications meta-schema",Ed=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],vd=["object","boolean"],_d="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",wd={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{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}},jv={$schema:hd,$id:pd,$vocabulary:md,$dynamicAnchor:gd,title:yd,allOf:Ed,type:vd,$comment:_d,properties:wd},Lv={__proto__:null,$comment:_d,$dynamicAnchor:gd,$id:pd,$schema:hd,$vocabulary:md,allOf:Ed,default:jv,properties:wd,title:yd,type:vd},xv=gt(Lv),Dd="https://json-schema.org/draft/2020-12/schema",$d="https://json-schema.org/draft/2020-12/meta/applicator",bd={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},Ad="meta",Cd="Applicator vocabulary meta-schema",Sd=["object","boolean"],Rd={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},Od={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},Bv={$schema:Dd,$id:$d,$vocabulary:bd,$dynamicAnchor:Ad,title:Cd,type:Sd,properties:Rd,$defs:Od},kv={__proto__:null,$defs:Od,$dynamicAnchor:Ad,$id:$d,$schema:Dd,$vocabulary:bd,default:Bv,properties:Rd,title:Cd,type:Sd},Mv=gt(kv),Fd="https://json-schema.org/draft/2020-12/schema",Id="https://json-schema.org/draft/2020-12/meta/unevaluated",Pd={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},Nd="meta",Td="Unevaluated applicator vocabulary meta-schema",jd=["object","boolean"],Ld={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},qv={$schema:Fd,$id:Id,$vocabulary:Pd,$dynamicAnchor:Nd,title:Td,type:jd,properties:Ld},Uv={__proto__:null,$dynamicAnchor:Nd,$id:Id,$schema:Fd,$vocabulary:Pd,default:qv,properties:Ld,title:Td,type:jd},Hv=gt(Uv),xd="https://json-schema.org/draft/2020-12/schema",Bd="https://json-schema.org/draft/2020-12/meta/content",kd={"https://json-schema.org/draft/2020-12/vocab/content":!0},Md="meta",qd="Content vocabulary meta-schema",Ud=["object","boolean"],Hd={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},Vv={$schema:xd,$id:Bd,$vocabulary:kd,$dynamicAnchor:Md,title:qd,type:Ud,properties:Hd},zv={__proto__:null,$dynamicAnchor:Md,$id:Bd,$schema:xd,$vocabulary:kd,default:Vv,properties:Hd,title:qd,type:Ud},Gv=gt(zv),Vd="https://json-schema.org/draft/2020-12/schema",zd="https://json-schema.org/draft/2020-12/meta/core",Gd={"https://json-schema.org/draft/2020-12/vocab/core":!0},Wd="meta",Kd="Core vocabulary meta-schema",Yd=["object","boolean"],Jd={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},Xd={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},Wv={$schema:Vd,$id:zd,$vocabulary:Gd,$dynamicAnchor:Wd,title:Kd,type:Yd,properties:Jd,$defs:Xd},Kv={__proto__:null,$defs:Xd,$dynamicAnchor:Wd,$id:zd,$schema:Vd,$vocabulary:Gd,default:Wv,properties:Jd,title:Kd,type:Yd},Yv=gt(Kv),Qd="https://json-schema.org/draft/2020-12/schema",Zd="https://json-schema.org/draft/2020-12/meta/format-annotation",eh={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},th="meta",rh="Format vocabulary meta-schema for annotation results",nh=["object","boolean"],ih={format:{type:"string"}},Jv={$schema:Qd,$id:Zd,$vocabulary:eh,$dynamicAnchor:th,title:rh,type:nh,properties:ih},Xv={__proto__:null,$dynamicAnchor:th,$id:Zd,$schema:Qd,$vocabulary:eh,default:Jv,properties:ih,title:rh,type:nh},Qv=gt(Xv),sh="https://json-schema.org/draft/2020-12/schema",oh="https://json-schema.org/draft/2020-12/meta/meta-data",ah={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},uh="meta",ch="Meta-data vocabulary meta-schema",lh=["object","boolean"],fh={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},Zv={$schema:sh,$id:oh,$vocabulary:ah,$dynamicAnchor:uh,title:ch,type:lh,properties:fh},e_={__proto__:null,$dynamicAnchor:uh,$id:oh,$schema:sh,$vocabulary:ah,default:Zv,properties:fh,title:ch,type:lh},t_=gt(e_),dh="https://json-schema.org/draft/2020-12/schema",hh="https://json-schema.org/draft/2020-12/meta/validation",ph={"https://json-schema.org/draft/2020-12/vocab/validation":!0},mh="meta",gh="Validation vocabulary meta-schema",yh=["object","boolean"],Eh={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:{$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"}}},vh={nonNegativeInteger:{type:"integer",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:[]}},r_={$schema:dh,$id:hh,$vocabulary:ph,$dynamicAnchor:mh,title:gh,type:yh,properties:Eh,$defs:vh},n_={__proto__:null,$defs:vh,$dynamicAnchor:mh,$id:hh,$schema:dh,$vocabulary:ph,default:r_,properties:Eh,title:gh,type:yh},i_=gt(n_);var _h;function s_(){if(_h)return Vi;_h=1,Object.defineProperty(Vi,"__esModule",{value:!0});const t=xv,e=Mv,r=Hv,n=Gv,i=Yv,o=Qv,s=t_,a=i_,c=["/properties"];function f(u){return[t,e,r,n,i,h(this,o),s,h(this,a)].forEach(d=>this.addMetaSchema(d,void 0,!1)),this;function h(d,y){return u?d.$dataMetaSchema(y,c):y}}return Vi.default=f,Vi}var wh;function o_(){return wh||(wh=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;const r=nf(),n=Nv(),i=dd(),o=s_(),s="https://json-schema.org/draft/2020-12/schema";class a extends r.default{constructor(y={}){super({...y,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(y=>this.addVocabulary(y)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:y,meta:E}=this.opts;E&&(o.default.call(this,y),this.refs["http://json-schema.org/schema"]=s)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}e.Ajv2020=a,t.exports=e=a,t.exports.Ajv2020=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var c=an();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var f=pe();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var u=Xn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return u.default}});var h=un();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return h.default}})}(Vn,Vn.exports)),Vn.exports}var a_=o_(),zi={exports:{}},Uo={},Dh;function u_(){return Dh||(Dh=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(j,B){return{validate:j,compare:B}}t.fullFormats={date:e(o,s),time:e(c(!0),f),"date-time":e(d(!0),y),"iso-time":e(c(),u),"iso-date-time":e(d(),E),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:m,"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,"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,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,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:g,int32:{type:"number",validate:D},int64:{type:"number",validate:$},float:{type:"number",validate:F},double:{type:"number",validate:F},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,y),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,E),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function r(j){return j%4===0&&(j%100!==0||j%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(j){const B=n.exec(j);if(!B)return!1;const T=+B[1],L=+B[2],q=+B[3];return L>=1&&L<=12&&q>=1&&q<=(L===2&&r(T)?29:i[L])}function s(j,B){if(j&&B)return j>B?1:j<B?-1:0}const a=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(j){return function(T){const L=a.exec(T);if(!L)return!1;const q=+L[1],X=+L[2],G=+L[3],Z=L[4],oe=L[5]==="-"?-1:1,H=+(L[6]||0),S=+(L[7]||0);if(H>23||S>59||j&&!Z)return!1;if(q<=23&&X<=59&&G<60)return!0;const V=X-S*oe,k=q-H*oe-(V<0?1:0);return(k===23||k===-1)&&(V===59||V===-1)&&G<61}}function f(j,B){if(!(j&&B))return;const T=new Date("2020-01-01T"+j).valueOf(),L=new Date("2020-01-01T"+B).valueOf();if(T&&L)return T-L}function u(j,B){if(!(j&&B))return;const T=a.exec(j),L=a.exec(B);if(T&&L)return j=T[1]+T[2]+T[3],B=L[1]+L[2]+L[3],j>B?1:j<B?-1:0}const h=/t|\s/i;function d(j){const B=c(j);return function(L){const q=L.split(h);return q.length===2&&o(q[0])&&B(q[1])}}function y(j,B){if(!(j&&B))return;const T=new Date(j).valueOf(),L=new Date(B).valueOf();if(T&&L)return T-L}function E(j,B){if(!(j&&B))return;const[T,L]=j.split(h),[q,X]=B.split(h),G=s(T,q);if(G!==void 0)return G||f(L,X)}const v=/\/|:/,l=/^(?:[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;function m(j){return v.test(j)&&l.test(j)}const p=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function g(j){return p.lastIndex=0,p.test(j)}const _=-2147483648,w=2**31-1;function D(j){return Number.isInteger(j)&&j<=w&&j>=_}function $(j){return Number.isInteger(j)}function F(){return!0}const M=/[^\\]\\Z/;function U(j){if(M.test(j))return!1;try{return new RegExp(j),!0}catch{return!1}}}(Uo)),Uo}var Ho={},Gi={exports:{}},Wi={},$h;function c_(){if($h)return Wi;$h=1,Object.defineProperty(Wi,"__esModule",{value:!0});const t=uf(),e=Df(),r=Hf(),n=od(),i=ud(),o=[t.default,e.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return Wi.default=o,Wi}const bh="http://json-schema.org/draft-07/schema#",Ah="http://json-schema.org/draft-07/schema#",Ch="Core schema meta-schema",Sh={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Rh=["object","boolean"],Oh={$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},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:"boolean",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:"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:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},l_={$schema:bh,$id:Ah,title:Ch,definitions:Sh,type:Rh,properties:Oh,default:!0},f_={__proto__:null,$id:Ah,$schema:bh,default:l_,definitions:Sh,properties:Oh,title:Ch,type:Rh},d_=gt(f_);var Fh;function h_(){return Fh||(Fh=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=nf(),n=c_(),i=dd(),o=d_,s=["/properties"],a="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(E=>this.addVocabulary(E)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const E=this.opts.$data?this.$dataMetaSchema(o,s):o;this.addMetaSchema(E,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var f=an();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var u=pe();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=Xn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return h.default}});var d=un();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(Gi,Gi.exports)),Gi.exports}var Ih;function p_(){return Ih||(Ih=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=h_(),r=pe(),n=r.operators,i={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},o={message:({keyword:a,schemaCode:c})=>(0,r.str)`should be ${i[a].okStr} ${c}`,params:({keyword:a,schemaCode:c})=>(0,r._)`{comparison: ${i[a].okStr}, limit: ${c}}`};t.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:o,code(a){const{gen:c,data:f,schemaCode:u,keyword:h,it:d}=a,{opts:y,self:E}=d;if(!y.validateFormats)return;const v=new e.KeywordCxt(d,E.RULES.all.format.definition,"format");v.$data?l():m();function l(){const g=c.scopeValue("formats",{ref:E.formats,code:y.code.formats}),_=c.const("fmt",(0,r._)`${g}[${v.schemaCode}]`);a.fail$data((0,r.or)((0,r._)`typeof ${_} != "object"`,(0,r._)`${_} instanceof RegExp`,(0,r._)`typeof ${_}.compare != "function"`,p(_)))}function m(){const g=v.schema,_=E.formats[g];if(!_||_===!0)return;if(typeof _!="object"||_ instanceof RegExp||typeof _.compare!="function")throw new Error(`"${h}": format "${g}" does not define "compare" function`);const w=c.scopeValue("formats",{key:g,ref:_,code:y.code.formats?(0,r._)`${y.code.formats}${(0,r.getProperty)(g)}`:void 0});a.fail$data(p(w))}function p(g){return(0,r._)`${g}.compare(${f}, ${u}) ${i[h].fail} 0`}},dependencies:["format"]};const s=a=>(a.addKeyword(t.formatLimitDefinition),a);t.default=s}(Ho)),Ho}var Ph;function m_(){return Ph||(Ph=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=u_(),n=p_(),i=pe(),o=new i.Name("fullFormats"),s=new i.Name("fastFormats"),a=(f,u={keywords:!0})=>{if(Array.isArray(u))return c(f,u,r.fullFormats,o),f;const[h,d]=u.mode==="fast"?[r.fastFormats,s]:[r.fullFormats,o],y=u.formats||r.formatNames;return c(f,y,h,d),u.keywords&&(0,n.default)(f),f};a.get=(f,u="full")=>{const d=(u==="fast"?r.fastFormats:r.fullFormats)[f];if(!d)throw new Error(`Unknown format "${f}"`);return d};function c(f,u,h,d){var y,E;(y=(E=f.opts.code).formats)!==null&&y!==void 0||(E.formats=(0,i._)`require("ajv-formats/dist/formats").${d}`);for(const v of u)f.addFormat(v,h[v])}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a}(zi,zi.exports)),zi.exports}var g_=m_();const y_=Nr(g_),E_=(t,e,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;const i=Object.getOwnPropertyDescriptor(t,r),o=Object.getOwnPropertyDescriptor(e,r);!v_(i,o)&&n||Object.defineProperty(t,r,o)},v_=function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},__=(t,e)=>{const r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)},w_=(t,e)=>`/* Wrapped ${t}*/
428
- ${e}`,D_=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),$_=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),b_=(t,e,r)=>{const n=r===""?"":`with ${r.trim()}() `,i=w_.bind(null,n,e.toString());Object.defineProperty(i,"name",$_);const{writable:o,enumerable:s,configurable:a}=D_;Object.defineProperty(t,"toString",{value:i,writable:o,enumerable:s,configurable:a})};function A_(t,e,{ignoreNonConfigurable:r=!1}={}){const{name:n}=t;for(const i of Reflect.ownKeys(e))E_(t,e,i,r);return __(t,e),b_(t,e,n),t}const Nh=(t,e={})=>{if(typeof t!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof t}\``);const{wait:r=0,maxWait:n=Number.POSITIVE_INFINITY,before:i=!1,after:o=!0}=e;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 s,a,c;const f=function(...u){const h=this,d=()=>{s=void 0,a&&(clearTimeout(a),a=void 0),o&&(c=t.apply(h,u))},y=()=>{a=void 0,s&&(clearTimeout(s),s=void 0),o&&(c=t.apply(h,u))},E=i&&!s;return clearTimeout(s),s=setTimeout(d,r),n>0&&n!==Number.POSITIVE_INFINITY&&!a&&(a=setTimeout(y,n)),E&&(c=t.apply(h,u)),c};return A_(f,t),f.cancel=()=>{s&&(clearTimeout(s),s=void 0),a&&(clearTimeout(a),a=void 0)},f};var Ki={exports:{}},Vo,Th;function Yi(){if(Th)return Vo;Th=1;const t="2.0.0",e=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,i=e-6;return Vo={MAX_LENGTH:e,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Vo}var zo,jh;function Ji(){return jh||(jh=1,zo=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}),zo}var Lh;function fn(){return Lh||(Lh=1,function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=Yi(),o=Ji();e=t.exports={};const s=e.re=[],a=e.safeRe=[],c=e.src=[],f=e.safeSrc=[],u=e.t={};let h=0;const d="[a-zA-Z0-9-]",y=[["\\s",1],["\\d",i],[d,n]],E=l=>{for(const[m,p]of y)l=l.split(`${m}*`).join(`${m}{0,${p}}`).split(`${m}+`).join(`${m}{1,${p}}`);return l},v=(l,m,p)=>{const g=E(m),_=h++;o(l,_,m),u[l]=_,c[_]=m,f[_]=g,s[_]=new RegExp(m,p?"g":void 0),a[_]=new RegExp(g,p?"g":void 0)};v("NUMERICIDENTIFIER","0|[1-9]\\d*"),v("NUMERICIDENTIFIERLOOSE","\\d+"),v("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),v("MAINVERSION",`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),v("MAINVERSIONLOOSE",`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASEIDENTIFIER",`(?:${c[u.NUMERICIDENTIFIER]}|${c[u.NONNUMERICIDENTIFIER]})`),v("PRERELEASEIDENTIFIERLOOSE",`(?:${c[u.NUMERICIDENTIFIERLOOSE]}|${c[u.NONNUMERICIDENTIFIER]})`),v("PRERELEASE",`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),v("PRERELEASELOOSE",`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),v("BUILDIDENTIFIER",`${d}+`),v("BUILD",`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),v("FULLPLAIN",`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),v("FULL",`^${c[u.FULLPLAIN]}$`),v("LOOSEPLAIN",`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),v("LOOSE",`^${c[u.LOOSEPLAIN]}$`),v("GTLT","((?:<|>)?=?)"),v("XRANGEIDENTIFIERLOOSE",`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),v("XRANGEIDENTIFIER",`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),v("XRANGEPLAIN",`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),v("XRANGEPLAINLOOSE",`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),v("XRANGE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),v("XRANGELOOSE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),v("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),v("COERCE",`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),v("COERCEFULL",c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),v("COERCERTL",c[u.COERCE],!0),v("COERCERTLFULL",c[u.COERCEFULL],!0),v("LONETILDE","(?:~>?)"),v("TILDETRIM",`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",v("TILDE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),v("TILDELOOSE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),v("LONECARET","(?:\\^)"),v("CARETTRIM",`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",v("CARET",`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),v("CARETLOOSE",`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),v("COMPARATORLOOSE",`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),v("COMPARATOR",`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),v("COMPARATORTRIM",`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",v("HYPHENRANGE",`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),v("HYPHENRANGELOOSE",`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),v("STAR","(<|>)?=?\\s*\\*"),v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Ki,Ki.exports)),Ki.exports}var Go,xh;function Wo(){if(xh)return Go;xh=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return Go=n=>n?typeof n!="object"?t:n:e,Go}var Ko,Bh;function kh(){if(Bh)return Ko;Bh=1;const t=/^[0-9]+$/,e=(n,i)=>{const o=t.test(n),s=t.test(i);return o&&s&&(n=+n,i=+i),n===i?0:o&&!s?-1:s&&!o?1:n<i?-1:1};return Ko={compareIdentifiers:e,rcompareIdentifiers:(n,i)=>e(i,n)},Ko}var Yo,Mh;function ze(){if(Mh)return Yo;Mh=1;const t=Ji(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:r}=Yi(),{safeRe:n,safeSrc:i,t:o}=fn(),s=Wo(),{compareIdentifiers:a}=kh();class c{constructor(u,h){if(h=s(h),u instanceof c){if(u.loose===!!h.loose&&u.includePrerelease===!!h.includePrerelease)return u;u=u.version}else if(typeof u!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof u}".`);if(u.length>e)throw new TypeError(`version is longer than ${e} characters`);t("SemVer",u,h),this.options=h,this.loose=!!h.loose,this.includePrerelease=!!h.includePrerelease;const d=u.trim().match(h.loose?n[o.LOOSE]:n[o.FULL]);if(!d)throw new TypeError(`Invalid Version: ${u}`);if(this.raw=u,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>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");d[4]?this.prerelease=d[4].split(".").map(y=>{if(/^[0-9]+$/.test(y)){const E=+y;if(E>=0&&E<r)return E}return y}):this.prerelease=[],this.build=d[5]?d[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(u){if(t("SemVer.compare",this.version,this.options,u),!(u instanceof c)){if(typeof u=="string"&&u===this.version)return 0;u=new c(u,this.options)}return u.version===this.version?0:this.compareMain(u)||this.comparePre(u)}compareMain(u){return u instanceof c||(u=new c(u,this.options)),a(this.major,u.major)||a(this.minor,u.minor)||a(this.patch,u.patch)}comparePre(u){if(u instanceof c||(u=new c(u,this.options)),this.prerelease.length&&!u.prerelease.length)return-1;if(!this.prerelease.length&&u.prerelease.length)return 1;if(!this.prerelease.length&&!u.prerelease.length)return 0;let h=0;do{const d=this.prerelease[h],y=u.prerelease[h];if(t("prerelease compare",h,d,y),d===void 0&&y===void 0)return 0;if(y===void 0)return 1;if(d===void 0)return-1;if(d===y)continue;return a(d,y)}while(++h)}compareBuild(u){u instanceof c||(u=new c(u,this.options));let h=0;do{const d=this.build[h],y=u.build[h];if(t("build compare",h,d,y),d===void 0&&y===void 0)return 0;if(y===void 0)return 1;if(d===void 0)return-1;if(d===y)continue;return a(d,y)}while(++h)}inc(u,h,d){if(u.startsWith("pre")){if(!h&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(h){const y=new RegExp(`^${this.options.loose?i[o.PRERELEASELOOSE]:i[o.PRERELEASE]}$`),E=`-${h}`.match(y);if(!E||E[1]!==h)throw new Error(`invalid identifier: ${h}`)}}switch(u){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",h,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",h,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",h,d),this.inc("pre",h,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",h,d),this.inc("pre",h,d);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.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(d)?1:0;if(this.prerelease.length===0)this.prerelease=[y];else{let E=this.prerelease.length;for(;--E>=0;)typeof this.prerelease[E]=="number"&&(this.prerelease[E]++,E=-2);if(E===-1){if(h===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(y)}}if(h){let E=[h,y];d===!1&&(E=[h]),a(this.prerelease[0],h)===0?isNaN(this.prerelease[1])&&(this.prerelease=E):this.prerelease=E}break}default:throw new Error(`invalid increment argument: ${u}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Yo=c,Yo}var Jo,qh;function Fr(){if(qh)return Jo;qh=1;const t=ze();return Jo=(r,n,i=!1)=>{if(r instanceof t)return r;try{return new t(r,n)}catch(o){if(!i)return null;throw o}},Jo}var Xo,Uh;function C_(){if(Uh)return Xo;Uh=1;const t=Fr();return Xo=(r,n)=>{const i=t(r,n);return i?i.version:null},Xo}var Qo,Hh;function S_(){if(Hh)return Qo;Hh=1;const t=Fr();return Qo=(r,n)=>{const i=t(r.trim().replace(/^[=v]+/,""),n);return i?i.version:null},Qo}var Zo,Vh;function R_(){if(Vh)return Zo;Vh=1;const t=ze();return Zo=(r,n,i,o,s)=>{typeof i=="string"&&(s=o,o=i,i=void 0);try{return new t(r instanceof t?r.version:r,i).inc(n,o,s).version}catch{return null}},Zo}var ea,zh;function O_(){if(zh)return ea;zh=1;const t=Fr();return ea=(r,n)=>{const i=t(r,null,!0),o=t(n,null,!0),s=i.compare(o);if(s===0)return null;const a=s>0,c=a?i:o,f=a?o:i,u=!!c.prerelease.length;if(!!f.prerelease.length&&!u){if(!f.patch&&!f.minor)return"major";if(f.compareMain(c)===0)return f.minor&&!f.patch?"minor":"patch"}const d=u?"pre":"";return i.major!==o.major?d+"major":i.minor!==o.minor?d+"minor":i.patch!==o.patch?d+"patch":"prerelease"},ea}var ta,Gh;function F_(){if(Gh)return ta;Gh=1;const t=ze();return ta=(r,n)=>new t(r,n).major,ta}var ra,Wh;function I_(){if(Wh)return ra;Wh=1;const t=ze();return ra=(r,n)=>new t(r,n).minor,ra}var na,Kh;function P_(){if(Kh)return na;Kh=1;const t=ze();return na=(r,n)=>new t(r,n).patch,na}var ia,Yh;function N_(){if(Yh)return ia;Yh=1;const t=Fr();return ia=(r,n)=>{const i=t(r,n);return i&&i.prerelease.length?i.prerelease:null},ia}var sa,Jh;function ht(){if(Jh)return sa;Jh=1;const t=ze();return sa=(r,n,i)=>new t(r,i).compare(new t(n,i)),sa}var oa,Xh;function T_(){if(Xh)return oa;Xh=1;const t=ht();return oa=(r,n,i)=>t(n,r,i),oa}var aa,Qh;function j_(){if(Qh)return aa;Qh=1;const t=ht();return aa=(r,n)=>t(r,n,!0),aa}var ua,Zh;function ca(){if(Zh)return ua;Zh=1;const t=ze();return ua=(r,n,i)=>{const o=new t(r,i),s=new t(n,i);return o.compare(s)||o.compareBuild(s)},ua}var la,ep;function L_(){if(ep)return la;ep=1;const t=ca();return la=(r,n)=>r.sort((i,o)=>t(i,o,n)),la}var fa,tp;function x_(){if(tp)return fa;tp=1;const t=ca();return fa=(r,n)=>r.sort((i,o)=>t(o,i,n)),fa}var da,rp;function Xi(){if(rp)return da;rp=1;const t=ht();return da=(r,n,i)=>t(r,n,i)>0,da}var ha,np;function pa(){if(np)return ha;np=1;const t=ht();return ha=(r,n,i)=>t(r,n,i)<0,ha}var ma,ip;function sp(){if(ip)return ma;ip=1;const t=ht();return ma=(r,n,i)=>t(r,n,i)===0,ma}var ga,op;function ap(){if(op)return ga;op=1;const t=ht();return ga=(r,n,i)=>t(r,n,i)!==0,ga}var ya,up;function Ea(){if(up)return ya;up=1;const t=ht();return ya=(r,n,i)=>t(r,n,i)>=0,ya}var va,cp;function _a(){if(cp)return va;cp=1;const t=ht();return va=(r,n,i)=>t(r,n,i)<=0,va}var wa,lp;function fp(){if(lp)return wa;lp=1;const t=sp(),e=ap(),r=Xi(),n=Ea(),i=pa(),o=_a();return wa=(a,c,f,u)=>{switch(c){case"===":return typeof a=="object"&&(a=a.version),typeof f=="object"&&(f=f.version),a===f;case"!==":return typeof a=="object"&&(a=a.version),typeof f=="object"&&(f=f.version),a!==f;case"":case"=":case"==":return t(a,f,u);case"!=":return e(a,f,u);case">":return r(a,f,u);case">=":return n(a,f,u);case"<":return i(a,f,u);case"<=":return o(a,f,u);default:throw new TypeError(`Invalid operator: ${c}`)}},wa}var Da,dp;function B_(){if(dp)return Da;dp=1;const t=ze(),e=Fr(),{safeRe:r,t:n}=fn();return Da=(o,s)=>{if(o instanceof t)return o;if(typeof o=="number"&&(o=String(o)),typeof o!="string")return null;s=s||{};let a=null;if(!s.rtl)a=o.match(s.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const y=s.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let E;for(;(E=y.exec(o))&&(!a||a.index+a[0].length!==o.length);)(!a||E.index+E[0].length!==a.index+a[0].length)&&(a=E),y.lastIndex=E.index+E[1].length+E[2].length;y.lastIndex=-1}if(a===null)return null;const c=a[2],f=a[3]||"0",u=a[4]||"0",h=s.includePrerelease&&a[5]?`-${a[5]}`:"",d=s.includePrerelease&&a[6]?`+${a[6]}`:"";return e(`${c}.${f}.${u}${h}${d}`,s)},Da}var $a,hp;function k_(){if(hp)return $a;hp=1;class t{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&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 $a=t,$a}var ba,pp;function pt(){if(pp)return ba;pp=1;const t=/\s+/g;class e{constructor(q,X){if(X=i(X),q instanceof e)return q.loose===!!X.loose&&q.includePrerelease===!!X.includePrerelease?q:new e(q.raw,X);if(q instanceof o)return this.raw=q.value,this.set=[[q]],this.formatted=void 0,this;if(this.options=X,this.loose=!!X.loose,this.includePrerelease=!!X.includePrerelease,this.raw=q.trim().replace(t," "),this.set=this.raw.split("||").map(G=>this.parseRange(G.trim())).filter(G=>G.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const G=this.set[0];if(this.set=this.set.filter(Z=>!v(Z[0])),this.set.length===0)this.set=[G];else if(this.set.length>1){for(const Z of this.set)if(Z.length===1&&l(Z[0])){this.set=[Z];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let q=0;q<this.set.length;q++){q>0&&(this.formatted+="||");const X=this.set[q];for(let G=0;G<X.length;G++)G>0&&(this.formatted+=" "),this.formatted+=X[G].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(q){const G=((this.options.includePrerelease&&y)|(this.options.loose&&E))+":"+q,Z=n.get(G);if(Z)return Z;const oe=this.options.loose,H=oe?c[f.HYPHENRANGELOOSE]:c[f.HYPHENRANGE];q=q.replace(H,B(this.options.includePrerelease)),s("hyphen replace",q),q=q.replace(c[f.COMPARATORTRIM],u),s("comparator trim",q),q=q.replace(c[f.TILDETRIM],h),s("tilde trim",q),q=q.replace(c[f.CARETTRIM],d),s("caret trim",q);let S=q.split(" ").map(b=>p(b,this.options)).join(" ").split(/\s+/).map(b=>j(b,this.options));oe&&(S=S.filter(b=>(s("loose invalid filter",b,this.options),!!b.match(c[f.COMPARATORLOOSE])))),s("range list",S);const V=new Map,k=S.map(b=>new o(b,this.options));for(const b of k){if(v(b))return[b];V.set(b.value,b)}V.size>1&&V.has("")&&V.delete("");const A=[...V.values()];return n.set(G,A),A}intersects(q,X){if(!(q instanceof e))throw new TypeError("a Range is required");return this.set.some(G=>m(G,X)&&q.set.some(Z=>m(Z,X)&&G.every(oe=>Z.every(H=>oe.intersects(H,X)))))}test(q){if(!q)return!1;if(typeof q=="string")try{q=new a(q,this.options)}catch{return!1}for(let X=0;X<this.set.length;X++)if(T(this.set[X],q,this.options))return!0;return!1}}ba=e;const r=k_(),n=new r,i=Wo(),o=Qi(),s=Ji(),a=ze(),{safeRe:c,t:f,comparatorTrimReplace:u,tildeTrimReplace:h,caretTrimReplace:d}=fn(),{FLAG_INCLUDE_PRERELEASE:y,FLAG_LOOSE:E}=Yi(),v=L=>L.value==="<0.0.0-0",l=L=>L.value==="",m=(L,q)=>{let X=!0;const G=L.slice();let Z=G.pop();for(;X&&G.length;)X=G.every(oe=>Z.intersects(oe,q)),Z=G.pop();return X},p=(L,q)=>(s("comp",L,q),L=D(L,q),s("caret",L),L=_(L,q),s("tildes",L),L=F(L,q),s("xrange",L),L=U(L,q),s("stars",L),L),g=L=>!L||L.toLowerCase()==="x"||L==="*",_=(L,q)=>L.trim().split(/\s+/).map(X=>w(X,q)).join(" "),w=(L,q)=>{const X=q.loose?c[f.TILDELOOSE]:c[f.TILDE];return L.replace(X,(G,Z,oe,H,S)=>{s("tilde",L,G,Z,oe,H,S);let V;return g(Z)?V="":g(oe)?V=`>=${Z}.0.0 <${+Z+1}.0.0-0`:g(H)?V=`>=${Z}.${oe}.0 <${Z}.${+oe+1}.0-0`:S?(s("replaceTilde pr",S),V=`>=${Z}.${oe}.${H}-${S} <${Z}.${+oe+1}.0-0`):V=`>=${Z}.${oe}.${H} <${Z}.${+oe+1}.0-0`,s("tilde return",V),V})},D=(L,q)=>L.trim().split(/\s+/).map(X=>$(X,q)).join(" "),$=(L,q)=>{s("caret",L,q);const X=q.loose?c[f.CARETLOOSE]:c[f.CARET],G=q.includePrerelease?"-0":"";return L.replace(X,(Z,oe,H,S,V)=>{s("caret",L,Z,oe,H,S,V);let k;return g(oe)?k="":g(H)?k=`>=${oe}.0.0${G} <${+oe+1}.0.0-0`:g(S)?oe==="0"?k=`>=${oe}.${H}.0${G} <${oe}.${+H+1}.0-0`:k=`>=${oe}.${H}.0${G} <${+oe+1}.0.0-0`:V?(s("replaceCaret pr",V),oe==="0"?H==="0"?k=`>=${oe}.${H}.${S}-${V} <${oe}.${H}.${+S+1}-0`:k=`>=${oe}.${H}.${S}-${V} <${oe}.${+H+1}.0-0`:k=`>=${oe}.${H}.${S}-${V} <${+oe+1}.0.0-0`):(s("no pr"),oe==="0"?H==="0"?k=`>=${oe}.${H}.${S}${G} <${oe}.${H}.${+S+1}-0`:k=`>=${oe}.${H}.${S}${G} <${oe}.${+H+1}.0-0`:k=`>=${oe}.${H}.${S} <${+oe+1}.0.0-0`),s("caret return",k),k})},F=(L,q)=>(s("replaceXRanges",L,q),L.split(/\s+/).map(X=>M(X,q)).join(" ")),M=(L,q)=>{L=L.trim();const X=q.loose?c[f.XRANGELOOSE]:c[f.XRANGE];return L.replace(X,(G,Z,oe,H,S,V)=>{s("xRange",L,G,Z,oe,H,S,V);const k=g(oe),A=k||g(H),b=A||g(S),C=b;return Z==="="&&C&&(Z=""),V=q.includePrerelease?"-0":"",k?Z===">"||Z==="<"?G="<0.0.0-0":G="*":Z&&C?(A&&(H=0),S=0,Z===">"?(Z=">=",A?(oe=+oe+1,H=0,S=0):(H=+H+1,S=0)):Z==="<="&&(Z="<",A?oe=+oe+1:H=+H+1),Z==="<"&&(V="-0"),G=`${Z+oe}.${H}.${S}${V}`):A?G=`>=${oe}.0.0${V} <${+oe+1}.0.0-0`:b&&(G=`>=${oe}.${H}.0${V} <${oe}.${+H+1}.0-0`),s("xRange return",G),G})},U=(L,q)=>(s("replaceStars",L,q),L.trim().replace(c[f.STAR],"")),j=(L,q)=>(s("replaceGTE0",L,q),L.trim().replace(c[q.includePrerelease?f.GTE0PRE:f.GTE0],"")),B=L=>(q,X,G,Z,oe,H,S,V,k,A,b,C)=>(g(G)?X="":g(Z)?X=`>=${G}.0.0${L?"-0":""}`:g(oe)?X=`>=${G}.${Z}.0${L?"-0":""}`:H?X=`>=${X}`:X=`>=${X}${L?"-0":""}`,g(k)?V="":g(A)?V=`<${+k+1}.0.0-0`:g(b)?V=`<${k}.${+A+1}.0-0`:C?V=`<=${k}.${A}.${b}-${C}`:L?V=`<${k}.${A}.${+b+1}-0`:V=`<=${V}`,`${X} ${V}`.trim()),T=(L,q,X)=>{for(let G=0;G<L.length;G++)if(!L[G].test(q))return!1;if(q.prerelease.length&&!X.includePrerelease){for(let G=0;G<L.length;G++)if(s(L[G].semver),L[G].semver!==o.ANY&&L[G].semver.prerelease.length>0){const Z=L[G].semver;if(Z.major===q.major&&Z.minor===q.minor&&Z.patch===q.patch)return!0}return!1}return!0};return ba}var Aa,mp;function Qi(){if(mp)return Aa;mp=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(u,h){if(h=r(h),u instanceof e){if(u.loose===!!h.loose)return u;u=u.value}u=u.trim().split(/\s+/).join(" "),s("comparator",u,h),this.options=h,this.loose=!!h.loose,this.parse(u),this.semver===t?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(u){const h=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],d=u.match(h);if(!d)throw new TypeError(`Invalid comparator: ${u}`);this.operator=d[1]!==void 0?d[1]:"",this.operator==="="&&(this.operator=""),d[2]?this.semver=new a(d[2],this.options.loose):this.semver=t}toString(){return this.value}test(u){if(s("Comparator.test",u,this.options.loose),this.semver===t||u===t)return!0;if(typeof u=="string")try{u=new a(u,this.options)}catch{return!1}return o(u,this.operator,this.semver,this.options)}intersects(u,h){if(!(u instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new c(u.value,h).test(this.value):u.operator===""?u.value===""?!0:new c(this.value,h).test(u.semver):(h=r(h),h.includePrerelease&&(this.value==="<0.0.0-0"||u.value==="<0.0.0-0")||!h.includePrerelease&&(this.value.startsWith("<0.0.0")||u.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&u.operator.startsWith(">")||this.operator.startsWith("<")&&u.operator.startsWith("<")||this.semver.version===u.semver.version&&this.operator.includes("=")&&u.operator.includes("=")||o(this.semver,"<",u.semver,h)&&this.operator.startsWith(">")&&u.operator.startsWith("<")||o(this.semver,">",u.semver,h)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}Aa=e;const r=Wo(),{safeRe:n,t:i}=fn(),o=fp(),s=Ji(),a=ze(),c=pt();return Aa}var Ca,gp;function Zi(){if(gp)return Ca;gp=1;const t=pt();return Ca=(r,n,i)=>{try{n=new t(n,i)}catch{return!1}return n.test(r)},Ca}var Sa,yp;function M_(){if(yp)return Sa;yp=1;const t=pt();return Sa=(r,n)=>new t(r,n).set.map(i=>i.map(o=>o.value).join(" ").trim().split(" ")),Sa}var Ra,Ep;function q_(){if(Ep)return Ra;Ep=1;const t=ze(),e=pt();return Ra=(n,i,o)=>{let s=null,a=null,c=null;try{c=new e(i,o)}catch{return null}return n.forEach(f=>{c.test(f)&&(!s||a.compare(f)===-1)&&(s=f,a=new t(s,o))}),s},Ra}var Oa,vp;function U_(){if(vp)return Oa;vp=1;const t=ze(),e=pt();return Oa=(n,i,o)=>{let s=null,a=null,c=null;try{c=new e(i,o)}catch{return null}return n.forEach(f=>{c.test(f)&&(!s||a.compare(f)===1)&&(s=f,a=new t(s,o))}),s},Oa}var Fa,_p;function H_(){if(_p)return Fa;_p=1;const t=ze(),e=pt(),r=Xi();return Fa=(i,o)=>{i=new e(i,o);let s=new t("0.0.0");if(i.test(s)||(s=new t("0.0.0-0"),i.test(s)))return s;s=null;for(let a=0;a<i.set.length;++a){const c=i.set[a];let f=null;c.forEach(u=>{const h=new t(u.semver.version);switch(u.operator){case">":h.prerelease.length===0?h.patch++:h.prerelease.push(0),h.raw=h.format();case"":case">=":(!f||r(h,f))&&(f=h);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),f&&(!s||r(s,f))&&(s=f)}return s&&i.test(s)?s:null},Fa}var Ia,wp;function V_(){if(wp)return Ia;wp=1;const t=pt();return Ia=(r,n)=>{try{return new t(r,n).range||"*"}catch{return null}},Ia}var Pa,Dp;function Na(){if(Dp)return Pa;Dp=1;const t=ze(),e=Qi(),{ANY:r}=e,n=pt(),i=Zi(),o=Xi(),s=pa(),a=_a(),c=Ea();return Pa=(u,h,d,y)=>{u=new t(u,y),h=new n(h,y);let E,v,l,m,p;switch(d){case">":E=o,v=a,l=s,m=">",p=">=";break;case"<":E=s,v=c,l=o,m="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(u,h,y))return!1;for(let g=0;g<h.set.length;++g){const _=h.set[g];let w=null,D=null;if(_.forEach($=>{$.semver===r&&($=new e(">=0.0.0")),w=w||$,D=D||$,E($.semver,w.semver,y)?w=$:l($.semver,D.semver,y)&&(D=$)}),w.operator===m||w.operator===p||(!D.operator||D.operator===m)&&v(u,D.semver))return!1;if(D.operator===p&&l(u,D.semver))return!1}return!0},Pa}var Ta,$p;function z_(){if($p)return Ta;$p=1;const t=Na();return Ta=(r,n,i)=>t(r,n,">",i),Ta}var ja,bp;function G_(){if(bp)return ja;bp=1;const t=Na();return ja=(r,n,i)=>t(r,n,"<",i),ja}var La,Ap;function W_(){if(Ap)return La;Ap=1;const t=pt();return La=(r,n,i)=>(r=new t(r,i),n=new t(n,i),r.intersects(n,i)),La}var xa,Cp;function K_(){if(Cp)return xa;Cp=1;const t=Zi(),e=ht();return xa=(r,n,i)=>{const o=[];let s=null,a=null;const c=r.sort((d,y)=>e(d,y,i));for(const d of c)t(d,n,i)?(a=d,s||(s=d)):(a&&o.push([s,a]),a=null,s=null);s&&o.push([s,null]);const f=[];for(const[d,y]of o)d===y?f.push(d):!y&&d===c[0]?f.push("*"):y?d===c[0]?f.push(`<=${y}`):f.push(`${d} - ${y}`):f.push(`>=${d}`);const u=f.join(" || "),h=typeof n.raw=="string"?n.raw:String(n);return u.length<h.length?u:n},xa}var Ba,Sp;function Y_(){if(Sp)return Ba;Sp=1;const t=pt(),e=Qi(),{ANY:r}=e,n=Zi(),i=ht(),o=(h,d,y={})=>{if(h===d)return!0;h=new t(h,y),d=new t(d,y);let E=!1;e:for(const v of h.set){for(const l of d.set){const m=c(v,l,y);if(E=E||m!==null,m)continue e}if(E)return!1}return!0},s=[new e(">=0.0.0-0")],a=[new e(">=0.0.0")],c=(h,d,y)=>{if(h===d)return!0;if(h.length===1&&h[0].semver===r){if(d.length===1&&d[0].semver===r)return!0;y.includePrerelease?h=s:h=a}if(d.length===1&&d[0].semver===r){if(y.includePrerelease)return!0;d=a}const E=new Set;let v,l;for(const F of h)F.operator===">"||F.operator===">="?v=f(v,F,y):F.operator==="<"||F.operator==="<="?l=u(l,F,y):E.add(F.semver);if(E.size>1)return null;let m;if(v&&l){if(m=i(v.semver,l.semver,y),m>0)return null;if(m===0&&(v.operator!==">="||l.operator!=="<="))return null}for(const F of E){if(v&&!n(F,String(v),y)||l&&!n(F,String(l),y))return null;for(const M of d)if(!n(F,String(M),y))return!1;return!0}let p,g,_,w,D=l&&!y.includePrerelease&&l.semver.prerelease.length?l.semver:!1,$=v&&!y.includePrerelease&&v.semver.prerelease.length?v.semver:!1;D&&D.prerelease.length===1&&l.operator==="<"&&D.prerelease[0]===0&&(D=!1);for(const F of d){if(w=w||F.operator===">"||F.operator===">=",_=_||F.operator==="<"||F.operator==="<=",v){if($&&F.semver.prerelease&&F.semver.prerelease.length&&F.semver.major===$.major&&F.semver.minor===$.minor&&F.semver.patch===$.patch&&($=!1),F.operator===">"||F.operator===">="){if(p=f(v,F,y),p===F&&p!==v)return!1}else if(v.operator===">="&&!n(v.semver,String(F),y))return!1}if(l){if(D&&F.semver.prerelease&&F.semver.prerelease.length&&F.semver.major===D.major&&F.semver.minor===D.minor&&F.semver.patch===D.patch&&(D=!1),F.operator==="<"||F.operator==="<="){if(g=u(l,F,y),g===F&&g!==l)return!1}else if(l.operator==="<="&&!n(l.semver,String(F),y))return!1}if(!F.operator&&(l||v)&&m!==0)return!1}return!(v&&_&&!l&&m!==0||l&&w&&!v&&m!==0||$||D)},f=(h,d,y)=>{if(!h)return d;const E=i(h.semver,d.semver,y);return E>0?h:E<0||d.operator===">"&&h.operator===">="?d:h},u=(h,d,y)=>{if(!h)return d;const E=i(h.semver,d.semver,y);return E<0?h:E>0||d.operator==="<"&&h.operator==="<="?d:h};return Ba=o,Ba}var ka,Rp;function J_(){if(Rp)return ka;Rp=1;const t=fn(),e=Yi(),r=ze(),n=kh(),i=Fr(),o=C_(),s=S_(),a=R_(),c=O_(),f=F_(),u=I_(),h=P_(),d=N_(),y=ht(),E=T_(),v=j_(),l=ca(),m=L_(),p=x_(),g=Xi(),_=pa(),w=sp(),D=ap(),$=Ea(),F=_a(),M=fp(),U=B_(),j=Qi(),B=pt(),T=Zi(),L=M_(),q=q_(),X=U_(),G=H_(),Z=V_(),oe=Na(),H=z_(),S=G_(),V=W_(),k=K_(),A=Y_();return ka={parse:i,valid:o,clean:s,inc:a,diff:c,major:f,minor:u,patch:h,prerelease:d,compare:y,rcompare:E,compareLoose:v,compareBuild:l,sort:m,rsort:p,gt:g,lt:_,eq:w,neq:D,gte:$,lte:F,cmp:M,coerce:U,Comparator:j,Range:B,satisfies:T,toComparators:L,maxSatisfying:q,minSatisfying:X,minVersion:G,validRange:Z,outside:oe,gtr:H,ltr:S,intersects:V,simplifyRange:k,subset:A,SemVer:r,re:t.re,src:t.src,tokens:t.t,SEMVER_SPEC_VERSION:e.SEMVER_SPEC_VERSION,RELEASE_TYPES:e.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},ka}var Ma=J_();const hr=Nr(Ma),X_=Object.prototype.toString,Q_="[object Uint8Array]",Z_="[object ArrayBuffer]";function Op(t,e,r){return t?t.constructor===e?!0:X_.call(t)===r:!1}function Fp(t){return Op(t,Uint8Array,Q_)}function ew(t){return Op(t,ArrayBuffer,Z_)}function tw(t){return Fp(t)||ew(t)}function rw(t){if(!Fp(t))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof t}\``)}function nw(t){if(!tw(t))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``)}function Ip(t,e){if(t.length===0)return new Uint8Array(0);e??=t.reduce((i,o)=>i+o.length,0);const r=new Uint8Array(e);let n=0;for(const i of t)rw(i),r.set(i,n),n+=i.length;return r}const Pp={utf8:new globalThis.TextDecoder("utf8")};function Np(t,e="utf8"){return nw(t),Pp[e]??=new globalThis.TextDecoder(e),Pp[e].decode(t)}function iw(t){if(typeof t!="string")throw new TypeError(`Expected \`string\`, got \`${typeof t}\``)}const sw=new globalThis.TextEncoder;function qa(t){return iw(t),sw.encode(t)}Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));const ow=y_.default,Tp="aes-256-cbc",Ir=()=>Object.create(null),aw=t=>t!=null,uw=(t,e)=>{const r=new Set(["undefined","symbol","function"]),n=typeof e;if(r.has(n))throw new TypeError(`Setting a value of type \`${n}\` for key \`${t}\` is not allowed as it's not supported by JSON`)},es="__internal__",Ua=`${es}.migrations.version`;class cw{path;events;#n;#t;#e;#r={};constructor(e={}){const r={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...e};if(!r.cwd){if(!r.projectName)throw new Error("Please specify the `projectName` option.");r.cwd=DE(r.projectName,{suffix:r.projectSuffix}).config}if(this.#e=r,r.schema??r.ajvOptions??r.rootSchema){if(r.schema&&typeof r.schema!="object")throw new TypeError("The `schema` option must be an object.");const s=new a_.Ajv2020({allErrors:!0,useDefaults:!0,...r.ajvOptions});ow(s);const a={...r.rootSchema,type:"object",properties:r.schema};this.#n=s.compile(a);for(const[c,f]of Object.entries(r.schema??{}))f?.default&&(this.#r[c]=f.default)}r.defaults&&(this.#r={...this.#r,...r.defaults}),r.serialize&&(this._serialize=r.serialize),r.deserialize&&(this._deserialize=r.deserialize),this.events=new EventTarget,this.#t=r.encryptionKey;const n=r.fileExtension?`.${r.fileExtension}`:"";this.path=be.resolve(r.cwd,`${r.configName??"config"}${n}`);const i=this.store,o=Object.assign(Ir(),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{ng.deepEqual(i,o)}catch{this.store=o}r.watch&&this._watch()}get(e,r){if(this.#e.accessPropertiesByDotNotation)return this._get(e,r);const{store:n}=this;return e in n?n[e]:r}set(e,r){if(typeof e!="string"&&typeof e!="object")throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof e}`);if(typeof e!="object"&&r===void 0)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw new TypeError(`Please don't use the ${es} key, as it's used to manage this module internal operations.`);const{store:n}=this,i=(o,s)=>{uw(o,s),this.#e.accessPropertiesByDotNotation?pl(n,o,s):n[o]=s};if(typeof e=="object"){const o=e;for(const[s,a]of Object.entries(o))i(s,a)}else i(e,r);this.store=n}has(e){return this.#e.accessPropertiesByDotNotation?EE(this.store,e):e in this.store}reset(...e){for(const r of e)aw(this.#r[r])&&this.set(r,this.#r[r])}delete(e){const{store:r}=this;this.#e.accessPropertiesByDotNotation?yE(r,e):delete r[e],this.store=r}clear(){this.store=Ir();for(const e of Object.keys(this.#r))this.reset(e)}onDidChange(e,r){if(typeof e!="string")throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof e}`);if(typeof r!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof r}`);return this._handleChange(()=>this.get(e),r)}onDidAnyChange(e){if(typeof e!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof e}`);return this._handleChange(()=>this.store,e)}get size(){return Object.keys(this.store).length}get store(){try{const e=ge.readFileSync(this.path,this.#t?null:"utf8"),r=this._encryptData(e),n=this._deserialize(r);return this._validate(n),Object.assign(Ir(),n)}catch(e){if(e?.code==="ENOENT")return this._ensureDirectory(),Ir();if(this.#e.clearInvalidConfig&&e.name==="SyntaxError")return Ir();throw e}}set store(e){this._ensureDirectory(),this._validate(e),this._write(e),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(const[e,r]of Object.entries(this.store))yield[e,r]}_encryptData(e){if(!this.#t)return typeof e=="string"?e:Np(e);try{const r=e.slice(0,16),n=Mr.pbkdf2Sync(this.#t,r.toString(),1e4,32,"sha512"),i=Mr.createDecipheriv(Tp,n,r),o=e.slice(17),s=typeof o=="string"?qa(o):o;return Np(Ip([i.update(s),i.final()]))}catch{}return e.toString()}_handleChange(e,r){let n=e();const i=()=>{const o=n,s=e();rg(s,o)||(n=s,r.call(this,s,o))};return this.events.addEventListener("change",i),()=>{this.events.removeEventListener("change",i)}}_deserialize=e=>JSON.parse(e);_serialize=e=>JSON.stringify(e,void 0," ");_validate(e){if(!this.#n||this.#n(e)||!this.#n.errors)return;const n=this.#n.errors.map(({instancePath:i,message:o=""})=>`\`${i.slice(1)}\` ${o}`);throw new Error("Config schema violation: "+n.join("; "))}_ensureDirectory(){ge.mkdirSync(be.dirname(this.path),{recursive:!0})}_write(e){let r=this._serialize(e);if(this.#t){const n=Mr.randomBytes(16),i=Mr.pbkdf2Sync(this.#t,n.toString(),1e4,32,"sha512"),o=Mr.createCipheriv(Tp,i,n);r=Ip([n,qa(":"),o.update(qa(r)),o.final()])}if(Te.env.SNAP)ge.writeFileSync(this.path,r,{mode:this.#e.configFileMode});else try{vl(this.path,r,{mode:this.#e.configFileMode})}catch(n){if(n?.code==="EXDEV"){ge.writeFileSync(this.path,r,{mode:this.#e.configFileMode});return}throw n}}_watch(){this._ensureDirectory(),ge.existsSync(this.path)||this._write(Ir()),Te.platform==="win32"?ge.watch(this.path,{persistent:!1},Nh(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100})):ge.watchFile(this.path,{persistent:!1},Nh(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5e3}))}_migrate(e,r,n){let i=this._get(Ua,"0.0.0");const o=Object.keys(e).filter(a=>this._shouldPerformMigration(a,i,r));let s={...this.store};for(const a of o)try{n&&n(this,{fromVersion:i,toVersion:a,finalVersion:r,versions:o});const c=e[a];c?.(this),this._set(Ua,a),i=a,s={...this.store}}catch(c){throw this.store=s,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${c}`)}(this._isVersionInRangeFormat(i)||!hr.eq(i,r))&&this._set(Ua,r)}_containsReservedKey(e){return typeof e=="object"&&Object.keys(e)[0]===es?!0:typeof e!="string"?!1:this.#e.accessPropertiesByDotNotation?!!e.startsWith(`${es}.`):!1}_isVersionInRangeFormat(e){return hr.clean(e)===null}_shouldPerformMigration(e,r,n){return this._isVersionInRangeFormat(e)?r!=="0.0.0"&&hr.satisfies(r,e)?!1:hr.satisfies(n,e):!(hr.lte(e,r)||hr.gt(e,n))}_get(e,r){return gE(this.store,e,r)}_set(e,r){const{store:n}=this;pl(n,e,r),this.store=n}}class jp extends Error{response;request;options;constructor(e,r,n){const i=e.status||e.status===0?e.status:"",o=e.statusText||"",s=`${i} ${o}`.trim(),a=s?`status code ${s}`:"an unknown error";super(`Request failed with ${a}: ${r.method} ${r.url}`),this.name="HTTPError",this.response=e,this.request=r,this.options=n}}class Lp extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}}const dn=t=>t!==null&&typeof t=="object",ts=(...t)=>{for(const e of t)if((!dn(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return Ha({},...t)},xp=(t={},e={})=>{const r=new globalThis.Headers(t),n=e instanceof globalThis.Headers,i=new globalThis.Headers(e);for(const[o,s]of i.entries())n&&s==="undefined"||s===void 0?r.delete(o):r.set(o,s);return r};function rs(t,e,r){return Object.hasOwn(e,r)&&e[r]===void 0?[]:Ha(t[r]??[],e[r]??[])}const Bp=(t={},e={})=>({beforeRequest:rs(t,e,"beforeRequest"),beforeRetry:rs(t,e,"beforeRetry"),afterResponse:rs(t,e,"afterResponse"),beforeError:rs(t,e,"beforeError")}),Ha=(...t)=>{let e={},r={},n={};for(const i of t)if(Array.isArray(i))Array.isArray(e)||(e=[]),e=[...e,...i];else if(dn(i)){for(let[o,s]of Object.entries(i))dn(s)&&o in e&&(s=Ha(e[o],s)),e={...e,[o]:s};dn(i.hooks)&&(n=Bp(n,i.hooks),e.hooks=n),dn(i.headers)&&(r=xp(r,i.headers),e.headers=r)}return e},lw=(()=>{let t=!1,e=!1;const r=typeof globalThis.ReadableStream=="function",n=typeof globalThis.Request=="function";if(r&&n)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return t&&!e})(),fw=typeof globalThis.AbortController=="function",dw=typeof globalThis.ReadableStream=="function",hw=typeof globalThis.FormData=="function",kp=["get","post","put","patch","head","delete"],pw={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Va=2147483647,Mp=Symbol("stop"),mw={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,fetch:!0},gw={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},yw=t=>kp.includes(t)?t.toUpperCase():t,Ew=["get","put","head","delete","options","trace"],vw=[408,413,429,500,502,503,504],_w=[413,429,503],qp={limit:2,methods:Ew,statusCodes:vw,afterStatusCodes:_w,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},ww=(t={})=>{if(typeof t=="number")return{...qp,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...qp,...t}};async function Dw(t,e,r,n){return new Promise((i,o)=>{const s=setTimeout(()=>{r&&r.abort(),o(new Lp(t))},n.timeout);n.fetch(t,e).then(i).catch(o).then(()=>{clearTimeout(s)})})}async function $w(t,{signal:e}){return new Promise((r,n)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(o),n(e.reason)}const o=setTimeout(()=>{e?.removeEventListener("abort",i),r()},t)})}const bw=(t,e)=>{const r={};for(const n in e)!(n in gw)&&!(n in mw)&&!(n in t)&&(r[n]=e[n]);return r};class ss{static create(e,r){const n=new ss(e,r),i=async()=>{if(typeof n._options.timeout=="number"&&n._options.timeout>Va)throw new RangeError(`The \`timeout\` option cannot be greater than ${Va}`);await Promise.resolve();let a=await n._fetch();for(const c of n._options.hooks.afterResponse){const f=await c(n.request,n._options,n._decorateResponse(a.clone()));f instanceof globalThis.Response&&(a=f)}if(n._decorateResponse(a),!a.ok&&n._options.throwHttpErrors){let c=new jp(a,n.request,n._options);for(const f of n._options.hooks.beforeError)c=await f(c);throw c}if(n._options.onDownloadProgress){if(typeof n._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!dw)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return n._stream(a.clone(),n._options.onDownloadProgress)}return a},s=n._options.retry.methods.includes(n.request.method.toLowerCase())?n._retry(i):i();for(const[a,c]of Object.entries(pw))s[a]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||c);const f=await s;if(a==="json"){if(f.status===204||(await f.clone().arrayBuffer()).byteLength===0)return"";if(r.parseJson)return r.parseJson(await f.text())}return f[a]()};return s}request;abortController;_retryCount=0;_input;_options;constructor(e,r={}){if(this._input=e,this._options={...r,headers:xp(this._input.headers,r.headers),hooks:Bp({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:yw(r.method??this._input.method),prefixUrl:String(r.prefixUrl||""),retry:ww(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.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(fw){this.abortController=new globalThis.AbortController;const n=this._options.signal??this._input.signal;n?.aborted&&this.abortController.abort(n?.reason),n?.addEventListener("abort",()=>{this.abortController.abort(n.reason)}),this._options.signal=this.abortController.signal}if(lw&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=this._options.stringifyJson?.(this._options.json)??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const i="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),o=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,i);(hw&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(o,{...this.request}),this._options)}}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof Lp)throw e;if(e instanceof jp){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;const n=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(n&&this._options.retry.afterStatusCodes.includes(e.response.status)){let 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(e.response.status===413)throw e}const r=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,r)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(r){const n=Math.min(this._calculateRetryDelay(r),Va);if(this._retryCount<1)throw r;await $w(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})===Mp)return;return this._retry(e)}}async _fetch(){for(const n of this._options.hooks.beforeRequest){const i=await n(this.request,this._options);if(i instanceof Request){this.request=i;break}if(i instanceof Response)return i}const e=bw(this.request,this._options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,e):Dw(r,e,this.abortController,this._options)}_stream(e,r){const n=Number(e.headers.get("content-length"))||0;let i=0;return e.status===204?(r&&r({percent:1,totalBytes:n,transferredBytes:i},new Uint8Array),new globalThis.Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(o){const s=e.body.getReader();r&&r({percent:0,transferredBytes:0,totalBytes:n},new Uint8Array);async function a(){const{done:c,value:f}=await s.read();if(c){o.close();return}if(r){i+=f.byteLength;const u=n===0?0:i/n;r({percent:u,transferredBytes:i,totalBytes:n},f)}o.enqueue(f),await a()}await a()}}),{status:e.status,statusText:e.statusText,headers:e.headers})}}const za=t=>{const e=(r,n)=>ss.create(r,ts(t,n));for(const r of kp)e[r]=(n,i)=>ss.create(n,ts(t,i,{method:r}));return e.create=r=>za(ts(r)),e.extend=r=>(typeof r=="function"&&(r=r(t??{})),za(ts(t,r))),e.stop=Mp,e},Aw=za();var pr={},Gt={},Up;function Hp(){if(Up)return Gt;Up=1,Gt.parse=Gt.decode=n,Gt.stringify=Gt.encode=e,Gt.safe=o,Gt.unsafe=s;var t=typeof process<"u"&&process.platform==="win32"?`\r
429
- `:`
430
- `;function e(a,c){var f=[],u="";typeof c=="string"?c={section:c,whitespace:!1}:(c=c||{},c.whitespace=c.whitespace===!0);var h=c.whitespace?" = ":"=";return Object.keys(a).forEach(function(d,y,E){var v=a[d];v&&Array.isArray(v)?v.forEach(function(l){u+=o(d+"[]")+h+o(l)+`
431
- `}):v&&typeof v=="object"?f.push(d):u+=o(d)+h+o(v)+t}),c.section&&u.length&&(u="["+o(c.section)+"]"+t+u),f.forEach(function(d,y,E){var v=r(d).join("\\."),l=(c.section?c.section+".":"")+v,m=e(a[d],{section:l,whitespace:c.whitespace});u.length&&m.length&&(u+=t),u+=m}),u}function r(a){return a.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(c){return c.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function n(a){var c={},f=c,u=null,h=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,d=a.split(/[\r\n]+/g);return d.forEach(function(y,E,v){if(!(!y||y.match(/^\s*[;#]/))){var l=y.match(h);if(l){if(l[1]!==void 0){if(u=s(l[1]),u==="__proto__"){f={};return}f=c[u]=c[u]||{};return}var m=s(l[2]);if(m!=="__proto__"){var p=l[3]?s(l[4]):!0;switch(p){case"true":case"false":case"null":p=JSON.parse(p)}if(m.length>2&&m.slice(-2)==="[]"){if(m=m.substring(0,m.length-2),m==="__proto__")return;f[m]?Array.isArray(f[m])||(f[m]=[f[m]]):f[m]=[]}Array.isArray(f[m])?f[m].push(p):f[m]=p}}}}),Object.keys(c).filter(function(y,E,v){if(!c[y]||typeof c[y]!="object"||Array.isArray(c[y]))return!1;var l=r(y),m=c,p=l.pop(),g=p.replace(/\\\./g,".");return l.forEach(function(_,w,D){_!=="__proto__"&&((!m[_]||typeof m[_]!="object")&&(m[_]={}),m=m[_])}),m===c&&g===p?!1:(m[g]=c[y],!0)}).forEach(function(y,E,v){delete c[y]}),c}function i(a){return a.charAt(0)==='"'&&a.slice(-1)==='"'||a.charAt(0)==="'"&&a.slice(-1)==="'"}function o(a){return typeof a!="string"||a.match(/[=\r\n]/)||a.match(/^\[/)||a.length>1&&i(a)||a!==a.trim()?JSON.stringify(a):a.replace(/;/g,"\\;").replace(/#/g,"\\#")}function s(a,c){if(a=(a||"").trim(),i(a)){a.charAt(0)==="'"&&(a=a.substr(1,a.length-2));try{a=JSON.parse(a)}catch{}}else{for(var f=!1,u="",h=0,d=a.length;h<d;h++){var y=a.charAt(h);if(f)"\\;#".indexOf(y)!==-1?u+=y:u+="\\"+y,f=!1;else{if(";#".indexOf(y)!==-1)break;y==="\\"?f=!0:u+=y}}return f&&(u+="\\"),u.trim()}return a}return Gt}var Ga,Vp;function Cw(){if(Vp)return Ga;Vp=1;var t=1,e=2;function r(){return""}function n(i,o,s){return i.slice(o,s).replace(/\S/g," ")}return Ga=function(i,o){o=o||{};for(var s,a,c=!1,f=!1,u=0,h="",d=o.whitespace===!1?r:n,y=0;y<i.length;y++){if(s=i[y],a=i[y+1],!f&&s==='"'){var E=i[y-1]==="\\"&&i[y-2]!=="\\";E||(c=!c)}if(!c){if(!f&&s+a==="//")h+=i.slice(u,y),u=y,f=t,y++;else if(f===t&&s+a===`\r
432
- `){y++,f=!1,h+=d(i,u,y),u=y;continue}else if(f===t&&s===`
433
- `)f=!1,h+=d(i,u,y),u=y;else if(!f&&s+a==="/*"){h+=i.slice(u,y),u=y,f=e,y++;continue}else if(f===e&&s+a==="*/"){y++,f=!1,h+=d(i,u,y+1),u=y+1;continue}}}return h+(f?d(i.substr(u)):i.substr(u))},Ga}var zp;function Sw(){if(zp)return pr;zp=1;var t=jr,e=Hp(),r=it,n=Cw(),i=pr.parse=function(s){return/^\s*{/.test(s)?JSON.parse(n(s)):e.parse(s)},o=pr.file=function(){var s=[].slice.call(arguments).filter(function(f){return f!=null});for(var a in s)if(typeof s[a]!="string")return;var c=r.join.apply(null,s);try{return t.readFileSync(c,"utf-8")}catch{return}};return pr.json=function(){var s=o.apply(null,arguments);return s?i(s):null},pr.env=function(s,a){a=a||process.env;var c={},f=s.length;for(var u in a)if(u.toLowerCase().indexOf(s.toLowerCase())===0){for(var h=u.substring(f).split("__"),d;(d=h.indexOf(""))>-1;)h.splice(d,1);var y=c;h.forEach(function(v,l){!v||typeof y!="object"||(l===h.length-1&&(y[v]=a[u]),y[v]===void 0&&(y[v]={}),y=y[v])})}return c},pr.find=function(){var s=r.join.apply(null,[].slice.call(arguments));function a(c,f){var u=r.join(c,f);try{return t.statSync(u),u}catch{if(r.dirname(c)!==c)return a(r.dirname(c),f)}}return a(process.cwd(),s)},pr}var Wa={exports:{}};var Gp;function Rw(){if(Gp)return Wa.exports;Gp=1;function t(o){return o instanceof Buffer||o instanceof Date||o instanceof RegExp}function e(o){if(o instanceof Buffer){var s=Buffer.alloc?Buffer.alloc(o.length):new Buffer(o.length);return o.copy(s),s}else{if(o instanceof Date)return new Date(o.getTime());if(o instanceof RegExp)return new RegExp(o);throw new Error("Unexpected situation")}}function r(o){var s=[];return o.forEach(function(a,c){typeof a=="object"&&a!==null?Array.isArray(a)?s[c]=r(a):t(a)?s[c]=e(a):s[c]=i({},a):s[c]=a}),s}function n(o,s){return s==="__proto__"?void 0:o[s]}var i=Wa.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var o=arguments[0],s=Array.prototype.slice.call(arguments,1),a,c;return s.forEach(function(f){typeof f!="object"||f===null||Array.isArray(f)||Object.keys(f).forEach(function(u){if(c=n(o,u),a=n(f,u),a!==o)if(typeof a!="object"||a===null){o[u]=a;return}else if(Array.isArray(a)){o[u]=r(a);return}else if(t(a)){o[u]=e(a);return}else if(typeof c!="object"||c===null||Array.isArray(c)){o[u]=i({},a);return}else{o[u]=i(c,a);return}})}),o};return Wa.exports}var Ka,Wp;function Ow(){if(Wp)return Ka;Wp=1;function t(n,i){var o=n;i.slice(0,-1).forEach(function(a){o=o[a]||{}});var s=i[i.length-1];return s in o}function e(n){return typeof n=="number"||/^0x[0-9a-f]+$/i.test(n)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(n)}function r(n,i){return i==="constructor"&&typeof n[i]=="function"||i==="__proto__"}return Ka=function(n,i){i||(i={});var o={bools:{},strings:{},unknownFn:null};typeof i.unknown=="function"&&(o.unknownFn=i.unknown),typeof i.boolean=="boolean"&&i.boolean?o.allBools=!0:[].concat(i.boolean).filter(Boolean).forEach(function($){o.bools[$]=!0});var s={};function a($){return s[$].some(function(F){return o.bools[F]})}Object.keys(i.alias||{}).forEach(function($){s[$]=[].concat(i.alias[$]),s[$].forEach(function(F){s[F]=[$].concat(s[$].filter(function(M){return F!==M}))})}),[].concat(i.string).filter(Boolean).forEach(function($){o.strings[$]=!0,s[$]&&[].concat(s[$]).forEach(function(F){o.strings[F]=!0})});var c=i.default||{},f={_:[]};function u($,F){return o.allBools&&/^--[^=]+$/.test(F)||o.strings[$]||o.bools[$]||s[$]}function h($,F,M){for(var U=$,j=0;j<F.length-1;j++){var B=F[j];if(r(U,B))return;U[B]===void 0&&(U[B]={}),(U[B]===Object.prototype||U[B]===Number.prototype||U[B]===String.prototype)&&(U[B]={}),U[B]===Array.prototype&&(U[B]=[]),U=U[B]}var T=F[F.length-1];r(U,T)||((U===Object.prototype||U===Number.prototype||U===String.prototype)&&(U={}),U===Array.prototype&&(U=[]),U[T]===void 0||o.bools[T]||typeof U[T]=="boolean"?U[T]=M:Array.isArray(U[T])?U[T].push(M):U[T]=[U[T],M])}function d($,F,M){if(!(M&&o.unknownFn&&!u($,M)&&o.unknownFn(M)===!1)){var U=!o.strings[$]&&e(F)?Number(F):F;h(f,$.split("."),U),(s[$]||[]).forEach(function(j){h(f,j.split("."),U)})}}Object.keys(o.bools).forEach(function($){d($,c[$]===void 0?!1:c[$])});var y=[];n.indexOf("--")!==-1&&(y=n.slice(n.indexOf("--")+1),n=n.slice(0,n.indexOf("--")));for(var E=0;E<n.length;E++){var v=n[E],l,m;if(/^--.+=/.test(v)){var p=v.match(/^--([^=]+)=([\s\S]*)$/);l=p[1];var g=p[2];o.bools[l]&&(g=g!=="false"),d(l,g,v)}else if(/^--no-.+/.test(v))l=v.match(/^--no-(.+)/)[1],d(l,!1,v);else if(/^--.+/.test(v))l=v.match(/^--(.+)/)[1],m=n[E+1],m!==void 0&&!/^(-|--)[^-]/.test(m)&&!o.bools[l]&&!o.allBools&&(!s[l]||!a(l))?(d(l,m,v),E+=1):/^(true|false)$/.test(m)?(d(l,m==="true",v),E+=1):d(l,o.strings[l]?"":!0,v);else if(/^-[^-]+/.test(v)){for(var _=v.slice(1,-1).split(""),w=!1,D=0;D<_.length;D++){if(m=v.slice(D+2),m==="-"){d(_[D],m,v);continue}if(/[A-Za-z]/.test(_[D])&&m[0]==="="){d(_[D],m.slice(1),v),w=!0;break}if(/[A-Za-z]/.test(_[D])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(m)){d(_[D],m,v),w=!0;break}if(_[D+1]&&_[D+1].match(/\W/)){d(_[D],v.slice(D+2),v),w=!0;break}else d(_[D],o.strings[_[D]]?"":!0,v)}l=v.slice(-1)[0],!w&&l!=="-"&&(n[E+1]&&!/^(-|--)[^-]/.test(n[E+1])&&!o.bools[l]&&(!s[l]||!a(l))?(d(l,n[E+1],v),E+=1):n[E+1]&&/^(true|false)$/.test(n[E+1])?(d(l,n[E+1]==="true",v),E+=1):d(l,o.strings[l]?"":!0,v))}else if((!o.unknownFn||o.unknownFn(v)!==!1)&&f._.push(o.strings._||!e(v)?v:Number(v)),i.stopEarly){f._.push.apply(f._,n.slice(E+1));break}}return Object.keys(c).forEach(function($){t(f,$.split("."))||(h(f,$.split("."),c[$]),(s[$]||[]).forEach(function(F){h(f,F.split("."),c[$])}))}),i["--"]?f["--"]=y.slice():y.forEach(function($){f._.push($)}),f},Ka}var Ya,Kp;function Fw(){if(Kp)return Ya;Kp=1;var t=Sw(),e=it.join,r=Rw(),n="/etc",i=process.platform==="win32",o=i?process.env.USERPROFILE:process.env.HOME;return Ya=function(s,a,c,f){if(typeof s!="string")throw new Error("rc(name): name *must* be string");c||(c=Ow()(process.argv.slice(2))),a=(typeof a=="string"?t.json(a):a)||{},f=f||t.parse;var u=t.env(s+"_"),h=[a],d=[];function y(E){if(!(d.indexOf(E)>=0)){var v=t.file(E);v&&(h.push(f(v)),d.push(E))}}return i||[e(n,s,"config"),e(n,s+"rc")].forEach(y),o&&[e(o,".config",s,"config"),e(o,".config",s),e(o,"."+s,"config"),e(o,"."+s+"rc")].forEach(y),y(t.find("."+s+"rc")),u.config&&y(u.config),c.config&&y(c.config),r.apply(null,h.concat([u,c,d.length?{configs:d,config:d[d.length-1]}:void 0]))},Ya}var Iw=Fw();const Pw=Nr(Iw);function Nw(t){const e=Pw("npm",{registry:"https://registry.npmjs.org/"}),r=e[`${t}:registry`]||e.config_registry||e.registry;return r.slice(-1)==="/"?r:`${r}/`}var Ja={exports:{}},mr={},gr={},Xa,Yp;function Tw(){if(Yp)return Xa;Yp=1;var t=ig,e=process.cwd,r=null,n=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return r||(r=e.call(process)),r};try{process.cwd()}catch{}if(typeof process.chdir=="function"){var i=process.chdir;process.chdir=function(s){r=null,i.call(process,s)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,i)}Xa=o;function o(s){t.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&a(s),s.lutimes||c(s),s.chown=h(s.chown),s.fchown=h(s.fchown),s.lchown=h(s.lchown),s.chmod=f(s.chmod),s.fchmod=f(s.fchmod),s.lchmod=f(s.lchmod),s.chownSync=d(s.chownSync),s.fchownSync=d(s.fchownSync),s.lchownSync=d(s.lchownSync),s.chmodSync=u(s.chmodSync),s.fchmodSync=u(s.fchmodSync),s.lchmodSync=u(s.lchmodSync),s.stat=y(s.stat),s.fstat=y(s.fstat),s.lstat=y(s.lstat),s.statSync=E(s.statSync),s.fstatSync=E(s.fstatSync),s.lstatSync=E(s.lstatSync),s.chmod&&!s.lchmod&&(s.lchmod=function(l,m,p){p&&process.nextTick(p)},s.lchmodSync=function(){}),s.chown&&!s.lchown&&(s.lchown=function(l,m,p,g){g&&process.nextTick(g)},s.lchownSync=function(){}),n==="win32"&&(s.rename=typeof s.rename!="function"?s.rename:function(l){function m(p,g,_){var w=Date.now(),D=0;l(p,g,function $(F){if(F&&(F.code==="EACCES"||F.code==="EPERM")&&Date.now()-w<6e4){setTimeout(function(){s.stat(g,function(M,U){M&&M.code==="ENOENT"?l(p,g,$):_(F)})},D),D<100&&(D+=10);return}_&&_(F)})}return Object.setPrototypeOf&&Object.setPrototypeOf(m,l),m}(s.rename)),s.read=typeof s.read!="function"?s.read:function(l){function m(p,g,_,w,D,$){var F;if($&&typeof $=="function"){var M=0;F=function(U,j,B){if(U&&U.code==="EAGAIN"&&M<10)return M++,l.call(s,p,g,_,w,D,F);$.apply(this,arguments)}}return l.call(s,p,g,_,w,D,F)}return Object.setPrototypeOf&&Object.setPrototypeOf(m,l),m}(s.read),s.readSync=typeof s.readSync!="function"?s.readSync:function(l){return function(m,p,g,_,w){for(var D=0;;)try{return l.call(s,m,p,g,_,w)}catch($){if($.code==="EAGAIN"&&D<10){D++;continue}throw $}}}(s.readSync);function a(l){l.lchmod=function(m,p,g){l.open(m,t.O_WRONLY|t.O_SYMLINK,p,function(_,w){if(_){g&&g(_);return}l.fchmod(w,p,function(D){l.close(w,function($){g&&g(D||$)})})})},l.lchmodSync=function(m,p){var g=l.openSync(m,t.O_WRONLY|t.O_SYMLINK,p),_=!0,w;try{w=l.fchmodSync(g,p),_=!1}finally{if(_)try{l.closeSync(g)}catch{}else l.closeSync(g)}return w}}function c(l){t.hasOwnProperty("O_SYMLINK")&&l.futimes?(l.lutimes=function(m,p,g,_){l.open(m,t.O_SYMLINK,function(w,D){if(w){_&&_(w);return}l.futimes(D,p,g,function($){l.close(D,function(F){_&&_($||F)})})})},l.lutimesSync=function(m,p,g){var _=l.openSync(m,t.O_SYMLINK),w,D=!0;try{w=l.futimesSync(_,p,g),D=!1}finally{if(D)try{l.closeSync(_)}catch{}else l.closeSync(_)}return w}):l.futimes&&(l.lutimes=function(m,p,g,_){_&&process.nextTick(_)},l.lutimesSync=function(){})}function f(l){return l&&function(m,p,g){return l.call(s,m,p,function(_){v(_)&&(_=null),g&&g.apply(this,arguments)})}}function u(l){return l&&function(m,p){try{return l.call(s,m,p)}catch(g){if(!v(g))throw g}}}function h(l){return l&&function(m,p,g,_){return l.call(s,m,p,g,function(w){v(w)&&(w=null),_&&_.apply(this,arguments)})}}function d(l){return l&&function(m,p,g){try{return l.call(s,m,p,g)}catch(_){if(!v(_))throw _}}}function y(l){return l&&function(m,p,g){typeof p=="function"&&(g=p,p=null);function _(w,D){D&&(D.uid<0&&(D.uid+=4294967296),D.gid<0&&(D.gid+=4294967296)),g&&g.apply(this,arguments)}return p?l.call(s,m,p,_):l.call(s,m,_)}}function E(l){return l&&function(m,p){var g=p?l.call(s,m,p):l.call(s,m);return g&&(g.uid<0&&(g.uid+=4294967296),g.gid<0&&(g.gid+=4294967296)),g}}function v(l){if(!l||l.code==="ENOSYS")return!0;var m=!process.getuid||process.getuid()!==0;return!!(m&&(l.code==="EINVAL"||l.code==="EPERM"))}}return Xa}var Qa,Jp;function jw(){if(Jp)return Qa;Jp=1;var t=Fu.Stream;Qa=e;function e(r){return{ReadStream:n,WriteStream:i};function n(o,s){if(!(this instanceof n))return new n(o,s);t.call(this);var a=this;this.path=o,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,s=s||{};for(var c=Object.keys(s),f=0,u=c.length;f<u;f++){var h=c[f];this[h]=s[h]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}r.open(this.path,this.flags,this.mode,function(d,y){if(d){a.emit("error",d),a.readable=!1;return}a.fd=y,a.emit("open",y),a._read()})}function i(o,s){if(!(this instanceof i))return new i(o,s);t.call(this),this.path=o,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,s=s||{};for(var a=Object.keys(s),c=0,f=a.length;c<f;c++){var u=a[c];this[u]=s[u]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=r.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}return Qa}var Za,Xp;function Lw(){if(Xp)return Za;Xp=1,Za=e;var t=Object.getPrototypeOf||function(r){return r.__proto__};function e(r){if(r===null||typeof r!="object")return r;if(r instanceof Object)var n={__proto__:t(r)};else var n=Object.create(null);return Object.getOwnPropertyNames(r).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(r,i))}),n}return Za}var ns,Qp;function xw(){if(Qp)return ns;Qp=1;var t=jr,e=Tw(),r=jw(),n=Lw(),i=hs,o,s;typeof Symbol=="function"&&typeof Symbol.for=="function"?(o=Symbol.for("graceful-fs.queue"),s=Symbol.for("graceful-fs.previous")):(o="___graceful-fs.queue",s="___graceful-fs.previous");function a(){}function c(l,m){Object.defineProperty(l,o,{get:function(){return m}})}var f=a;if(i.debuglog?f=i.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(f=function(){var l=i.format.apply(i,arguments);l="GFS4: "+l.split(/\n/).join(`
434
- GFS4: `),console.error(l)}),!t[o]){var u=as[o]||[];c(t,u),t.close=function(l){function m(p,g){return l.call(t,p,function(_){_||E(),typeof g=="function"&&g.apply(this,arguments)})}return Object.defineProperty(m,s,{value:l}),m}(t.close),t.closeSync=function(l){function m(p){l.apply(t,arguments),E()}return Object.defineProperty(m,s,{value:l}),m}(t.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){f(t[o]),Lm.equal(t[o].length,0)})}as[o]||c(as,t[o]),ns=h(n(t)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!t.__patched&&(ns=h(t),t.__patched=!0);function h(l){e(l),l.gracefulify=h,l.createReadStream=S,l.createWriteStream=V;var m=l.readFile;l.readFile=p;function p(b,C,W){return typeof C=="function"&&(W=C,C=null),Y(b,C,W);function Y(se,ae,N,x){return m(se,ae,function(K){K&&(K.code==="EMFILE"||K.code==="ENFILE")?d([Y,[se,ae,N],K,x||Date.now(),Date.now()]):typeof N=="function"&&N.apply(this,arguments)})}}var g=l.writeFile;l.writeFile=_;function _(b,C,W,Y){return typeof W=="function"&&(Y=W,W=null),se(b,C,W,Y);function se(ae,N,x,K,te){return g(ae,N,x,function(O){O&&(O.code==="EMFILE"||O.code==="ENFILE")?d([se,[ae,N,x,K],O,te||Date.now(),Date.now()]):typeof K=="function"&&K.apply(this,arguments)})}}var w=l.appendFile;w&&(l.appendFile=D);function D(b,C,W,Y){return typeof W=="function"&&(Y=W,W=null),se(b,C,W,Y);function se(ae,N,x,K,te){return w(ae,N,x,function(O){O&&(O.code==="EMFILE"||O.code==="ENFILE")?d([se,[ae,N,x,K],O,te||Date.now(),Date.now()]):typeof K=="function"&&K.apply(this,arguments)})}}var $=l.copyFile;$&&(l.copyFile=F);function F(b,C,W,Y){return typeof W=="function"&&(Y=W,W=0),se(b,C,W,Y);function se(ae,N,x,K,te){return $(ae,N,x,function(O){O&&(O.code==="EMFILE"||O.code==="ENFILE")?d([se,[ae,N,x,K],O,te||Date.now(),Date.now()]):typeof K=="function"&&K.apply(this,arguments)})}}var M=l.readdir;l.readdir=j;var U=/^v[0-5]\./;function j(b,C,W){typeof C=="function"&&(W=C,C=null);var Y=U.test(process.version)?function(N,x,K,te){return M(N,se(N,x,K,te))}:function(N,x,K,te){return M(N,x,se(N,x,K,te))};return Y(b,C,W);function se(ae,N,x,K){return function(te,O){te&&(te.code==="EMFILE"||te.code==="ENFILE")?d([Y,[ae,N,x],te,K||Date.now(),Date.now()]):(O&&O.sort&&O.sort(),typeof x=="function"&&x.call(this,te,O))}}}if(process.version.substr(0,4)==="v0.8"){var B=r(l);G=B.ReadStream,oe=B.WriteStream}var T=l.ReadStream;T&&(G.prototype=Object.create(T.prototype),G.prototype.open=Z);var L=l.WriteStream;L&&(oe.prototype=Object.create(L.prototype),oe.prototype.open=H),Object.defineProperty(l,"ReadStream",{get:function(){return G},set:function(b){G=b},enumerable:!0,configurable:!0}),Object.defineProperty(l,"WriteStream",{get:function(){return oe},set:function(b){oe=b},enumerable:!0,configurable:!0});var q=G;Object.defineProperty(l,"FileReadStream",{get:function(){return q},set:function(b){q=b},enumerable:!0,configurable:!0});var X=oe;Object.defineProperty(l,"FileWriteStream",{get:function(){return X},set:function(b){X=b},enumerable:!0,configurable:!0});function G(b,C){return this instanceof G?(T.apply(this,arguments),this):G.apply(Object.create(G.prototype),arguments)}function Z(){var b=this;A(b.path,b.flags,b.mode,function(C,W){C?(b.autoClose&&b.destroy(),b.emit("error",C)):(b.fd=W,b.emit("open",W),b.read())})}function oe(b,C){return this instanceof oe?(L.apply(this,arguments),this):oe.apply(Object.create(oe.prototype),arguments)}function H(){var b=this;A(b.path,b.flags,b.mode,function(C,W){C?(b.destroy(),b.emit("error",C)):(b.fd=W,b.emit("open",W))})}function S(b,C){return new l.ReadStream(b,C)}function V(b,C){return new l.WriteStream(b,C)}var k=l.open;l.open=A;function A(b,C,W,Y){return typeof W=="function"&&(Y=W,W=null),se(b,C,W,Y);function se(ae,N,x,K,te){return k(ae,N,x,function(O,P){O&&(O.code==="EMFILE"||O.code==="ENFILE")?d([se,[ae,N,x,K],O,te||Date.now(),Date.now()]):typeof K=="function"&&K.apply(this,arguments)})}}return l}function d(l){f("ENQUEUE",l[0].name,l[1]),t[o].push(l),v()}var y;function E(){for(var l=Date.now(),m=0;m<t[o].length;++m)t[o][m].length>2&&(t[o][m][3]=l,t[o][m][4]=l);v()}function v(){if(clearTimeout(y),y=void 0,t[o].length!==0){var l=t[o].shift(),m=l[0],p=l[1],g=l[2],_=l[3],w=l[4];if(_===void 0)f("RETRY",m.name,p),m.apply(null,p);else if(Date.now()-_>=6e4){f("TIMEOUT",m.name,p);var D=p.pop();typeof D=="function"&&D.call(null,g)}else{var $=Date.now()-w,F=Math.max(w-_,1),M=Math.min(F*1.2,100);$>=M?(f("RETRY",m.name,p),m.apply(null,p.concat([_]))):t[o].push(l)}y===void 0&&(y=setTimeout(v,0))}}return ns}var Zp;function Bw(){if(Zp)return gr;Zp=1;var t=gr&&gr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(gr,"__esModule",{value:!0}),gr.readCAFileSync=void 0;const e=t(xw());function r(n){try{const i=e.default.readFileSync(n,"utf8"),o="-----END CERTIFICATE-----";return i.split(o).filter(a=>!!a.trim()).map(a=>`${a.trimLeft()}${o}`)}catch(i){if(i.code==="ENOENT")return;throw i}}return gr.readCAFileSync=r,gr}var em;function kw(){return em||(em=1,function(t){var e=mr&&mr.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,a)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=mr&&mr.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Bw(),t)}(mr)),mr}var eu={exports:{}},tu,tm;function Mw(){if(tm)return tu;tm=1,tu=e;function t(r,n){if(typeof Object.setPrototypeOf=="function")return Object.setPrototypeOf(r,n);r.__proto__=n}function e(){this.list=[];var r=null;Object.defineProperty(this,"root",{get:function(){return r},set:function(n){r=n,this.list.length&&t(this.list[this.list.length-1],n)},enumerable:!0,configurable:!0})}return e.prototype={get length(){return this.list.length},get keys(){var r=[];for(var n in this.list[0])r.push(n);return r},get snapshot(){var r={};return this.keys.forEach(function(n){r[n]=this.get(n)},this),r},get store(){return this.list[0]},push:function(r){return typeof r!="object"&&(r={valueOf:r}),this.list.length>=1&&t(this.list[this.list.length-1],r),t(r,this.root),this.list.push(r)},pop:function(){return this.list.length>=2&&t(this.list[this.list.length-2],this.root),this.list.pop()},unshift:function(r){return t(r,this.list[0]||this.root),this.list.unshift(r)},shift:function(){return this.list.length===1&&t(this.list[0],this.root),this.list.shift()},get:function(r){return this.list[0][r]},set:function(r,n,i){return this.length||this.push({}),i&&this.list[0].hasOwnProperty(r)&&this.push({}),this.list[0][r]=n},forEach:function(r,n){for(var i in this.list[0])r.call(n,i,this.list[0][i])},slice:function(){return this.list.slice.apply(this.list,arguments)},splice:function(){for(var r=this.list.splice.apply(this.list,arguments),n=0,i=this.list.length;n<i;n++)t(this.list[n],this.list[n+1]||this.root);return r}},tu}var rm;function qw(){if(rm)return eu.exports;rm=1;var t=Mw(),e=it,r=jr,n=Hp(),i=sg.EventEmitter,o=wu,s=og,a=eu.exports=function(){for(var d=[].slice.call(arguments),y=new u;d.length;){var E=d.shift();E&&y.push(typeof E=="string"?f(E):E)}return y};a.find=function(){var d=e.join.apply(null,[].slice.call(arguments));function y(E,v){var l=e.join(E,v);try{return r.statSync(l),l}catch{if(e.dirname(E)!==E)return y(e.dirname(E),v)}}return y(__dirname,d)};var c=a.parse=function(d,y,E){if(d=""+d,E)if(E==="json")if(this.emit)try{return JSON.parse(d)}catch(v){this.emit("error",v)}else return JSON.parse(d);else return n.parse(d);else try{return JSON.parse(d)}catch{return n.parse(d)}},f=a.json=function(){var d=[].slice.call(arguments).filter(function(v){return v!=null}),y=e.join.apply(null,d),E;try{E=r.readFileSync(y,"utf-8")}catch{return}return c(E,y,"json")};a.env=function(d,y){y=y||process.env;var E={},v=d.length;for(var l in y)l.indexOf(d)===0&&(E[l.substring(v)]=y[l]);return E},a.ConfigChain=u;function u(){i.apply(this),t.apply(this,arguments),this._awaiting=0,this._saving=0,this.sources={}}var h={constructor:{value:u}};return Object.keys(i.prototype).forEach(function(d){h[d]=Object.getOwnPropertyDescriptor(i.prototype,d)}),u.prototype=Object.create(t.prototype,h),u.prototype.del=function(d,y){if(y){var E=this.sources[y];if(E=E&&E.data,!E)return this.emit("error",new Error("not found "+y));delete E[d]}else for(var v=0,l=this.list.length;v<l;v++)delete this.list[v][d];return this},u.prototype.set=function(d,y,E){var v;if(E){if(v=this.sources[E],v=v&&v.data,!v)return this.emit("error",new Error("not found "+E))}else if(v=this.list[0],!v)return this.emit("error",new Error("cannot set, no confs!"));return v[d]=y,this},u.prototype.get=function(d,y){return y?(y=this.sources[y],y&&(y=y.data),y&&Object.hasOwnProperty.call(y,d)?y[d]:void 0):this.list[0][d]},u.prototype.save=function(d,m,E){typeof m=="function"&&(E=m,m=null);var v=this.sources[d];if(!v||!(v.path||v.source)||!v.data)return this.emit("error",new Error("bad save target: "+d));if(v.source){var l=v.prefix||"";return Object.keys(v.data).forEach(function(g){v.source[l+g]=v.data[g]}),this}var m=m||v.type,p=v.data;return v.type==="json"?p=JSON.stringify(p):p=n.stringify(p),this._saving++,r.writeFile(v.path,p,"utf8",function(g){if(this._saving--,g)return E?E(g):this.emit("error",g);this._saving===0&&(E&&E(),this.emit("save"))}.bind(this)),this},u.prototype.addFile=function(d,y,E){E=E||d;var v={__source__:E};return this.sources[E]={path:d,type:y},this.push(v),this._await(),r.readFile(d,"utf8",function(l,m){l&&this.emit("error",l),this.addString(m,d,y,v)}.bind(this)),this},u.prototype.addEnv=function(d,y,E){E=E||"env";var v=a.env(d,y);return this.sources[E]={data:v,source:y,prefix:d},this.add(v,E)},u.prototype.addUrl=function(d,y,E){this._await();var v=o.format(d);E=E||v;var l={__source__:E};return this.sources[E]={href:v,type:y},this.push(l),s.request(d,function(m){var p=[],g=m.headers["content-type"];y||(y=g.indexOf("json")!==-1?"json":g.indexOf("ini")!==-1?"ini":v.match(/\.json$/)?"json":v.match(/\.ini$/)?"ini":null,l.type=y),m.on("data",p.push.bind(p)).on("end",function(){this.addString(Buffer.concat(p),v,y,l)}.bind(this)).on("error",this.emit.bind(this,"error"))}.bind(this)).on("error",this.emit.bind(this,"error")).end(),this},u.prototype.addString=function(d,y,E,v){return d=this.parse(d,y,E),this.add(d,v),this},u.prototype.add=function(d,y){if(y&&typeof y=="object"){var E=this.list.indexOf(y);if(E===-1)return this.emit("error",new Error("bad marker"));this.splice(E,1,d),y=y.__source__,this.sources[y]=this.sources[y]||{},this.sources[y].data=d,this._resolve()}else typeof y=="string"&&(this.sources[y]=this.sources[y]||{},this.sources[y].data=d),this._await(),this.push(d),process.nextTick(this._resolve.bind(this));return this},u.prototype.parse=a.parse,u.prototype._await=function(){this._awaiting++},u.prototype._resolve=function(){this._awaiting--,this._awaiting===0&&this.emit("load",this)},eu.exports}var ru,nm;function Uw(){if(nm)return ru;nm=1,ru=function(e){const r=e.indexOf(":");if(r===-1)return t(e);const n=e.substr(0,r),i=e.substr(r+1);return`${t(n)}:${t(i)}`};function t(e){if(e=e.toLowerCase(),e==="_authtoken")return"_authToken";let r=e[0];for(let n=1;n<e.length;n++)r+=e[n]==="_"?"-":e[n];return r}return ru}var Pr={},nu={},hn={},im;function Hw(){if(im)return hn;im=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.envReplace=void 0;const t=/(?<!\\)(\\*)\$\{([^${}]+)\}/g;function e(o,s){return o.replace(t,r.bind(null,s))}hn.envReplace=e;function r(o,s,a,c){if(a.length%2)return s.slice((a.length+1)/2);const f=i(o,c);if(f===void 0)throw new Error(`Failed to replace env in config: ${s}`);return`${a.slice(a.length/2)}${f}`}const n=/([^:-]+)(:?)-(.+)/;function i(o,s){const a=s.match(n);if(!a)return o[s];const[,c,f,u]=a;return Object.prototype.hasOwnProperty.call(o,c)?!o[c]&&f?u:o[c]:u}return hn}var sm;function Vw(){return sm||(sm=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.envReplace=void 0;var e=Hw();Object.defineProperty(t,"envReplace",{enumerable:!0,get:function(){return e.envReplace}})}(nu)),nu}var om;function zw(){if(om)return Pr;om=1;const t=jr,e=it,{envReplace:r}=Vw(),n=s=>typeof s!="string"?s:r(s,process.env),i=(s,a,c)=>{if(typeof a!="string")return a;const f=[].concat(s[c]),u=f.indexOf(e)!==-1,h=f.indexOf(Boolean)!==-1,d=f.indexOf(String)!==-1,y=f.indexOf(Number)!==-1;if(a=`${a}`.trim(),/^".*"$/.test(a))try{a=JSON.parse(a)}catch{throw new Error(`Failed parsing JSON config key ${c}: ${a}`)}if(h&&!d&&a==="")return!0;switch(a){case"true":return!0;case"false":return!1;case"null":return null;case"undefined":return}return a=r(a,process.env),u&&((process.platform==="win32"?/^~(\/|\\)/:/^~\//).test(a)&&process.env.HOME&&(a=e.resolve(process.env.HOME,a.substr(2))),a=e.resolve(a)),y&&!isNaN(a)&&(a=Number(a)),a},o=s=>{s=e.resolve(s);let a=!1;for(;e.basename(s)==="node_modules";)s=e.dirname(s),a=!0;if(a)return s;const c=(f,u)=>{const h=/^[a-zA-Z]:(\\|\/)?$/;if(f==="/"||process.platform==="win32"&&h.test(f))return u;try{const d=t.readdirSync(f);if(d.includes("node_modules")||d.includes("package.json")||d.includes("package.json5")||d.includes("package.yaml")||d.includes("pnpm-workspace.yaml"))return f;const y=e.dirname(f);return y===f?u:c(y,u)}catch(d){if(f===u){if(d.code==="ENOENT")return u;throw d}return u}};return c(s,s)};return Pr.envReplace=r,Pr.findPrefix=o,Pr.parseField=i,Pr.parseKey=n,Pr}var iu={},am;function Gw(){if(am)return iu;am=1;const t=it,e=Fu.Stream,r=wu,n=()=>{},i=()=>[],o=()=>{};return iu.types={access:[null,"restricted","public"],"allow-same-version":Boolean,"always-auth":Boolean,also:[null,"dev","development"],audit:Boolean,"auth-type":["legacy","sso","saml","oauth"],"bin-links":Boolean,browser:[null,String],ca:[null,String,Array],cafile:t,cache:t,"cache-lock-stale":Number,"cache-lock-retries":Number,"cache-lock-wait":Number,"cache-max":Number,"cache-min":Number,cert:[null,String],cidr:[null,String,Array],color:["always",Boolean],depth:Number,description:Boolean,dev:Boolean,"dry-run":Boolean,editor:String,"engine-strict":Boolean,force:Boolean,"fetch-retries":Number,"fetch-retry-factor":Number,"fetch-retry-mintimeout":Number,"fetch-retry-maxtimeout":Number,git:String,"git-tag-version":Boolean,"commit-hooks":Boolean,global:Boolean,globalconfig:t,"global-style":Boolean,group:[Number,String],"https-proxy":[null,r],"user-agent":String,"ham-it-up":Boolean,heading:String,"if-present":Boolean,"ignore-prepublish":Boolean,"ignore-scripts":Boolean,"init-module":t,"init-author-name":String,"init-author-email":String,"init-author-url":["",r],"init-license":String,"init-version":o,json:Boolean,key:[null,String],"legacy-bundling":Boolean,link:Boolean,"local-address":i(),loglevel:["silent","error","warn","notice","http","timing","info","verbose","silly"],logstream:e,"logs-max":Number,long:Boolean,maxsockets:Number,message:String,"metrics-registry":[null,String],"node-options":[null,String],"node-version":[null,o],"no-proxy":[null,String,Array],offline:Boolean,"onload-script":[null,String],only:[null,"dev","development","prod","production"],optional:Boolean,"package-lock":Boolean,otp:[null,String],"package-lock-only":Boolean,parseable:Boolean,"prefer-offline":Boolean,"prefer-online":Boolean,prefix:t,production:Boolean,progress:Boolean,proxy:[null,!1,r],provenance:Boolean,"read-only":Boolean,"rebuild-bundle":Boolean,registry:[null,r],rollback:Boolean,save:Boolean,"save-bundle":Boolean,"save-dev":Boolean,"save-exact":Boolean,"save-optional":Boolean,"save-prefix":String,"save-prod":Boolean,scope:String,"script-shell":[null,String],"scripts-prepend-node-path":[!1,!0,"auto","warn-only"],searchopts:String,searchexclude:[null,String],searchlimit:Number,searchstaleness:Number,"send-metrics":Boolean,shell:String,shrinkwrap:Boolean,"sign-git-tag":Boolean,"sso-poll-frequency":Number,"sso-type":[null,"oauth","saml"],"strict-ssl":Boolean,tag:String,timing:Boolean,tmp:t,unicode:Boolean,"unsafe-perm":Boolean,usage:Boolean,user:[Number,String],userconfig:t,umask:n,version:Boolean,"tag-version-prefix":String,versions:Boolean,viewer:String,_exit:Boolean},iu}var su,um;function Ww(){if(um)return su;um=1;const{readCAFileSync:t}=kw(),e=jr,r=it,{ConfigChain:n}=qw(),i=Uw(),o=zw();class s extends n{constructor(f,u){super(f),this.root=f,this._parseField=o.parseField.bind(null,u||Gw())}add(f,u){try{for(const[h,d]of Object.entries(f)){const y=o.parseKey(h);y!==h&&delete f[h],f[y]=this._parseField(d,y)}}catch(h){throw h}return super.add(f,u)}addFile(f,u){u=u||f;const h={__source__:u};this.sources[u]={path:f,type:"ini"},this.push(h),this._await();try{const d=e.readFileSync(f,"utf8");this.addString(d,f,"ini",h)}catch(d){if(d.code==="ENOENT")this.add({},h);else if(d.code!=="EISDIR")return`Issue while reading "${f}". ${d.message}`}}addEnv(f){f=f||process.env;const u={};return Object.keys(f).filter(h=>/^npm_config_/i.test(h)).forEach(h=>{if(!f[h])return;const d=i(h.substr(11)),y=f[h];u[d]=a(d,y)}),super.addEnv("",u,"env")}loadPrefix(){const f=this.list[0];Object.defineProperty(this,"prefix",{enumerable:!0,set:h=>{const d=this.get("global");this[d?"globalPrefix":"localPrefix"]=h},get:()=>this.get("global")?this.globalPrefix:this.localPrefix}),Object.defineProperty(this,"globalPrefix",{enumerable:!0,set:h=>{this.set("prefix",h)},get:()=>r.resolve(this.get("prefix"))});let u;if(Object.defineProperty(this,"localPrefix",{enumerable:!0,set:h=>{u=h},get:()=>u}),Object.prototype.hasOwnProperty.call(f,"prefix"))u=r.resolve(f.prefix);else try{u=o.findPrefix(process.cwd())}catch(h){throw h}return u}loadCAFile(f){if(!f)return;const u=t(f);u&&this.set("ca",u)}loadUser(){const f=this.root;if(this.get("global"))return;if(process.env.SUDO_UID){f.user=Number(process.env.SUDO_UID);return}const u=r.resolve(this.get("prefix"));try{const h=e.statSync(u);f.user=h.uid}catch(h){if(h.code==="ENOENT")return;throw h}}}function a(c,f){function u(h){const d=`
435
-
436
- `;return h.indexOf(d)?h.split(d):h.split(",")}switch(c){case"hoist-pattern":case"public-hoist-pattern":return u(f)}return f}return su=s,su}var ou={},cm;function Kw(){return cm||(cm=1,function(t){const e=ag,r=it,n=e.tmpdir(),i=process.getuid?process.getuid():process.pid,o=()=>!0,s=process.platform==="win32",a={editor:()=>process.env.EDITOR||process.env.VISUAL||(s?"notepad.exe":"vi"),shell:()=>s?process.env.COMSPEC||"cmd.exe":process.env.SHELL||"/bin/bash"},c={fromString:()=>process.umask()};let f=e.homedir();f?process.env.HOME=f:f=r.resolve(n,"npm-"+i);const u=process.platform==="win32"?"npm-cache":".npm",h=process.platform==="win32"&&process.env.APPDATA||f,d=r.resolve(h,u);let y,E;Object.defineProperty(t,"defaults",{get:function(){return y||(process.env.PREFIX?E=process.env.PREFIX:process.platform==="win32"?E=r.dirname(process.execPath):(E=r.dirname(r.dirname(process.execPath)),process.env.DESTDIR&&(E=r.join(process.env.DESTDIR,E))),y={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":"legacy","bin-links":!0,browser:null,ca:null,cafile:null,cache:d,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:a.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:"git","git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:r.resolve(E,"etc","npmrc"),"global-style":!1,group:process.platform==="win32"?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:"npm","if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":r.resolve(f,".npm-init.js"),"init-author-name":"","init-author-email":"","init-author-url":"","init-version":"1.0.0","init-license":"ISC",json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:"notice",logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:"%s","metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:E,production:process.env.NODE_ENV==="production",progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":"npm/{npm-version} node/{node-version} {platform} {arch}","read-only":!1,"rebuild-bundle":!0,registry:"https://registry.npmjs.org/",rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":"^","save-prod":!1,scope:"","script-shell":null,"scripts-prepend-node-path":"warn-only",searchopts:"",searchexclude:null,searchlimit:20,searchstaleness:15*60,"send-metrics":!1,shell:a.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":"oauth","strict-ssl":!0,tag:"latest","tag-version-prefix":"v",timing:!1,tmp:n,unicode:o(),"unsafe-perm":process.platform==="win32"||process.platform==="cygwin"||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform==="win32"?0:"nobody",userconfig:r.resolve(f,".npmrc"),umask:process.umask?process.umask():c.fromString("022"),version:!1,versions:!1,viewer:process.platform==="win32"?"browser":"man",_exit:!0},y)}})}(ou)),ou}var lm;function Yw(){return lm||(lm=1,function(t){const e=it,r=Ww(),n=Kw();t.exports=(i,o,s)=>{const a=new r(Object.assign({},n.defaults,s),o);a.add(Object.assign({},i),"cli");const c=[];let f=!1;if(require.resolve.paths){const y=require.resolve.paths("npm");let E;try{E=require.resolve("npm",{paths:y.slice(-1)})}catch{f=!0}E&&c.push(a.addFile(e.resolve(e.dirname(E),"..","npmrc"),"builtin"))}a.addEnv(),a.loadPrefix();const u=e.resolve(a.localPrefix,".npmrc"),h=a.get("userconfig");if(!a.get("global")&&u!==h?c.push(a.addFile(u,"project")):a.add({},"project"),a.get("workspace-prefix")&&a.get("workspace-prefix")!==u){const y=e.resolve(a.get("workspace-prefix"),".npmrc");c.push(a.addFile(y,"workspace"))}if(c.push(a.addFile(a.get("userconfig"),"user")),a.get("prefix")){const y=e.resolve(a.get("prefix"),"etc");a.root.globalconfig=e.resolve(y,"npmrc"),a.root.globalignorefile=e.resolve(y,"npmignore")}c.push(a.addFile(a.get("globalconfig"),"global")),a.loadUser();const d=a.get("cafile");return d&&a.loadCAFile(d),{config:a,warnings:c.filter(Boolean),failedToLoadBuiltInConfig:f}},Object.defineProperty(t.exports,"defaults",{get(){return n.defaults},enumerable:!0})}(Ja)),Ja.exports}var au,fm;function Jw(){if(fm)return au;fm=1;const t=Yw(),e=":_authToken",r=":_auth",n=":username",i=":_password";au=function(){let v,l;arguments.length>=2?(v=arguments[0],l=Object.assign({},arguments[1])):typeof arguments[0]=="string"?v=arguments[0]:l=Object.assign({},arguments[0]),l=l||{};const m=l.npmrc;return l.npmrc=(l.npmrc?{config:{get:p=>m[p]}}:t()).config,v=v||l.npmrc.get("registry")||t.defaults.registry,s(v,l)||a(l.npmrc)};function o(E,v){const l=new URL(v,new URL(E.startsWith("//")?`./${E}`:E,"resolve://"));if(l.protocol==="resolve:"){const{pathname:m,search:p,hash:g}=l;return m+p+g}return l.toString()}function s(E,v){let l=E instanceof URL?E:new URL(E.startsWith("//")?`http:${E}`:E),m;for(;m!=="/"&&l.pathname!==m;){m=l.pathname||"/";const p="//"+l.host+m.replace(/\/$/,""),g=f(p,v.npmrc);if(g)return g;if(!v.recursive)return/\/$/.test(E)?void 0:s(new URL("./",l),v);l.pathname=o(c(m),"..")||"/"}}function a(E){return E.get("_auth")?{token:u(E.get("_auth")),type:"Basic"}:void 0}function c(E){return E[E.length-1]==="/"?E:E+"/"}function f(E,v){const l=h(v.get(E+e)||v.get(E+"/"+e));if(l)return l;const m=v.get(E+n)||v.get(E+"/"+n),p=v.get(E+i)||v.get(E+"/"+i),g=d(m,p);if(g)return g;const _=y(v.get(E+r)||v.get(E+"/"+r));if(_)return _}function u(E){return E.replace(/^\$\{?([^}]*)\}?$/,function(v,l){return process.env[l]})}function h(E){return E?{token:u(E),type:"Bearer"}:void 0}function d(E,v){if(!E||!v)return;const l=Buffer.from(u(v),"base64").toString("utf8");return{token:Buffer.from(E+":"+l,"utf8").toString("base64"),type:"Basic",password:l,username:E}}function y(E){return E?{token:u(E),type:"Basic"}:void 0}return au}var Xw=Jw();const Qw=Nr(Xw);class Zw extends Error{constructor(e){super(`Package \`${e}\` could not be found`),this.name="PackageNotFoundError"}}class eD extends Error{constructor(e,r){super(`Version \`${r}\` for package \`${e}\` could not be found`),this.name="VersionNotFoundError"}}async function tD(t,e={}){let{version:r="latest"}=e;const{omitDeprecated:n=!0}=e,i=t.split("/")[0],o=e.registryUrl??Nw(i),s=new URL(encodeURIComponent(t).replace(/^%40/,"@"),o),a=Qw(o.toString(),{recursive:!0}),c={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};e.fullMetadata&&delete c.accept,a&&(c.authorization=`${a.type} ${a.token}`);let f;try{f=await Aw(s,{headers:c,keepalive:!0}).json()}catch(h){throw h?.response?.status===404?new Zw(t):h}if(e.allVersions)return f;const u=new eD(t,r);if(f["dist-tags"][r]){const{time:h}=f;f=f.versions[f["dist-tags"][r]],f.time=h}else if(r){const h=!!f.versions[r];if(n&&!h)for(const[y,E]of Object.entries(f.versions))E.deprecated&&delete f.versions[y];if(!h){const y=Object.keys(f.versions);if(r=hr.maxSatisfying(y,r),!r)throw u}const{time:d}=f;if(f=f.versions[r],f.time=d,!f)throw u}return f}async function rD(t,e){const{version:r}=await tD(t.toLowerCase(),e);return r}const uu=new cw({projectName:yu,serialize:t=>St.stringify(t,null,2),deserialize:t=>St.parse(t)}),nD=1e3*60*60*24,dm="check-update";function iD(){if(dg||ys===dm)return;const t=uu.get("lastUpdateCheck"),e=uu.get("latestVersion");(Sm(e)||os(t)||t+nD<Date.now())&&Rm("likec4",["check-update"],{stdio:"ignore",preferLocal:!0,detached:!0,env:{NODE_ENV:dm}}).catch(()=>{}),e&&Ma.gt(e,Er)&&yr(["Update available: ",Q.dim(Er),Q.reset(" \u2192 "),Q.green(e)].join(""))}async function sD(){try{const t=await rD(yu);uu.set({lastUpdateCheck:Date.now(),latestVersion:t}),Ma.gt(t,Er)?yr(["Update available: ",Q.dim(Er),Q.reset(" \u2192 "),Q.green(t)].join("")):us.info(Q.dim("Up to date: ")+" "+Q.green(Er))}catch(t){us.error(Om(t))}}async function oD(t,e,r){const n=".ts";e=e??ve(t.workspace,"likec4.generated"+n),xr(e)!==n&&(e=e+n),await Dt(Wt(e),{recursive:!0});const i=await t.diagrams(),o=zy([...i]);await Yt(e,o),r.info(`${Q.dim("generated")} ${Kt(process.cwd(),e)}`)}async function aD(t,e,r){await Dt(e,{recursive:!0}),r.info(`${Q.dim("format")} ${Q.green("dot")}`),r.info(`${Q.dim("outdir")} ${e}`);const n=new Set,i=await t.viewsService.computedViews();let o=0;for(const s of i)try{const a=await t.viewsService.layouter.dot(s),c=s.relativePath??"";c!==""&&!n.has(c)&&(await Dt(ve(e,c),{recursive:!0}),n.add(c));const f=ve(e,c,s.id+".dot");await Yt(f,a),r.info(`${Q.dim("generated")} ${Kt(process.cwd(),f)}`),o++}catch(a){us.error(`error while generating ${s.id}`,{error:a})}o>0&&r.info(`${Q.dim("total")} ${o} files`)}async function uD(t,e,r,n){await Dt(r,{recursive:!0}),n.info(`${Q.dim("format")} ${Q.green(e)}`),n.info(`${Q.dim("outdir")} ${r}`);let i,o;switch(e){case"d2":i=".d2",o=Zc;break;case"mermaid":i=".mmd",o=el;break;default:Cu(e)}const s=new Set,a=await t.diagrams();let c=0;for(const f of a)try{let u=f.relativePath??".";u.includes("/")?u=u.slice(0,u.lastIndexOf("/")):u=".",u!==""&&!s.has(u)&&(await Dt(ve(r,u),{recursive:!0}),s.add(u));const h=ve(r,u,f.id+i),d=o(f);await Yt(h,d),n.info(`${Q.dim("generated")} ${Kt(process.cwd(),h)}`),c++}catch(u){n.error(`error while generating ${f.id}`,{error:u})}c>0&&n.info(`${Q.dim("total")} ${c} files`)}async function is({path:t,useDotBin:e,...r}){const n=_t("c4:codegen"),i=Tr(n),o=await wt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});if((await o.viewsService.computedViews()).length===0)throw n.warn("no views found"),process.exitCode=1,new Error("no views found");switch(r.format){case"views":{await oD(o,r.outfile,n);break}case"dot":{await aD(o,r.outdir??t,n);break}case"d2":case"mermaid":{await uD(o,r.format,r.outdir??t,n);break}default:Cu(r)}i.stopAndLog()}async function cD({path:t,useDotBin:e,outfile:r}){const n=_t("c4:codegen"),i=Tr(n),o=await wt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});n.info(`${Q.dim("format")} ${Q.green("model")}`);const s=await o.layoutedModel();for(const h of s.views())h.$view.hasLayoutDrift&&n.warn(Q.yellow("drift detected, manual layout can not be applied, view:")+" "+Q.red(h.id));let a=ve(o.workspace,"likec4-model.ts");if(r&&(a=ps(r)?r:ve(r),Nt(r)&&(await gs(r)).isDirectory()))throw new Error(`output file is a directory: ${r}`);const c=pn(a);n.info(`${Q.dim("filename")} ${c}`);const f=xr(c).toLocaleLowerCase();if(![".ts",".mts",".cts"].includes(f))throw n.error(`output file ${r} has extension "${f}"`),new Error(`output file ${r} must be a .ts, .mts or .cts file`);const u=Wt(a);n.info(`${Q.dim("outdir")} ${u}`),await Dt(u,{recursive:!0}),await Yt(a,Hy(s),{encoding:"utf-8"}),yr(cs(`
437
- ${Q.dim("Source with LikeC4Model generated:")}
438
- ${Kt(ls(),a)}
439
-
440
- ${Q.dim("How to use:")}
441
- ${Q.underline("https://likec4.dev/tooling/code-generation/model/")}
442
- `).trim(),{padding:2,borderColor:"green",borderStyle:"round"}),i.stopAndLog()}async function lD({languageServices:t,outDir:e,filename:r="likec4-react.mjs"}){const n=xs,i=ks();return n.info(`${Q.cyan("likec4 app root")} ${Q.dim(i)}`),n.info(Q.cyan("outDir")+" "+Q.dim(e)),{customLogger:n,root:i,configFile:!1,clearScreen:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:Us()},esbuild:{banner:`'use client'
443
- `+Bs.banner,footer:Bs.footer,jsx:"transform",jsxDev:!1,jsxSideEffects:!1,minifyIdentifiers:!1,minifySyntax:!1,minifyWhitespace:!1,tsconfigRaw:{compilerOptions:{target:"ES2022",useDefineForClassFields:!0,verbatimModuleSyntax:!0,jsx:"react-jsx"}}},build:{outDir:e,emptyOutDir:!1,sourcemap:!1,minify:!1,target:"es2022",copyPublicDir:!1,chunkSizeWarningLimit:qs,lib:{entry:"react/likec4.tsx",fileName(o,s){return r},formats:["es"]},rollupOptions:{output:{compact:!1,exports:"named"},external:["likec4/react","likec4/model","react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client",/likec4\/icons\/.*/],onwarn(o,s){o.code!=="SOURCEMAP_ERROR"&&s(o)}}},plugins:[bu({}),vo({languageServices:t,useOverviewGraph:!1})]}}async function fD({path:t,useDotBin:e,outfile:r}){const n=_t("c4:codegen"),i=Tr(n),o=await wt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});n.info(`${Q.dim("format")} ${Q.green("react")}`);const s=await o.diagrams();if(s.length===0)throw process.exitCode=1,new Error("no views found");s.forEach(y=>{y.hasLayoutDrift&&n.warn(Q.yellow("drift detected, manual layout can not be applied, view:")+" "+Q.red(y.id))});let a=ve(o.workspace,"likec4-views.js");if(r&&(a=ps(r)?r:ve(r),Nt(r)&&(await gs(r)).isDirectory()))throw new Error(`output file is a directory: ${r}`);const c=Wt(a);n.info(`${Q.dim("outdir")} ${c}`);const f=pn(a);n.info(`${Q.dim("filename")} ${f}`);const u=xr(f).toLocaleLowerCase();if(![".js",".mjs",".jsx"].includes(u))throw n.error(`output file ${r} has extension "${u}"`),new Error(`output file ${r} must be a .js, .jsx or .mjs`);const h=await lD({languageServices:o,outDir:c,filename:f});await kr({...h,logLevel:"warn"});const d=await o.layoutedModel();await Yt(ve(c,pn(a,u)+(u===".mjs"?".d.mts":".d.ts")),Gy(d)),yr(cs(`
444
- ${Q.dim("Source generated:")}
445
- ${Kt(ls(),a)}
446
-
447
- ${Q.dim("How to use:")}
448
- ${Q.underline("https://likec4.dev/tooling/code-generation/react/")}
449
- `),{padding:2,borderColor:"green",borderStyle:"round"}),i.stopAndLog()}async function dD({path:t,useDotBin:e,webcomponentPrefix:r="likec4",outfile:n}){const i=_t("c4:codegen"),o=Tr(i),s=await wt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});i.info(`${Q.dim("format")} ${Q.green("webcomponent")}`);const a=await s.diagrams();if(!Eu(a,1))throw i.warn("no views found"),process.exitCode=1,new Error("no views found");a.forEach(E=>{E.hasLayoutDrift&&i.warn(Q.yellow("drift detected, manual layout can not be applied, view:")+" "+Q.red(E.id))});let c=ve(s.workspace,"likec4-views.js");if(n&&(c=ps(n)?n:ve(n),Nt(n)&&(await gs(n)).isDirectory()))throw new Error(`output file is a directory: ${n}`);mt.debug(`${Q.dim("outfilepath")} ${c}`);const f=pn(c);mt.debug(`${Q.dim("filename")} ${f}`);const u=xr(f).toLocaleLowerCase();if(u!==".js"&&u!==".mjs")throw mt.warn(`output file ${n} has extension "${u}"`),new Error(`output file ${n} must be a .js or .mjs`);const h=await Ms();mt.debug(`${Q.dim("created temp public")} ${h}`);const d=await wo({languageServices:s,outDir:h,filename:f,webcomponentPrefix:r,base:"/"});mt.debug(`${Q.dim("vite build webcomponent")}`),await kr({...d,logLevel:"warn"});const y=ve(h,f);if(!Nt(y))throw new Error(`output file not found: ${y}`);await Dt(Wt(c),{recursive:!0}),await Km(y,c),i.info(`${Q.dim("generated")} ${c}`),mt.debug(`${Q.dim("remove temp public")}`),await Ym(h,{recursive:!0,force:!0}),yr(cs(`
450
- ${Q.dim("Webcomponents generated to:")}
451
- ${Kt(ls(),c)}
452
-
453
- ${Q.dim("Setup and usage instructions:")}
454
- ${Q.blue("https://likec4.dev/tooling/code-generation/webcomponent/")}
455
- `)),o.stopAndLog()}const hD={command:"codegen <command> [path]",aliases:["generate","gen"],describe:"Generate various artifacts from LikeC4 sources",builder:t=>t.positional("path",In).command("react [path]","generate react component to render likec4 view",e=>e.option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.jsx, .mjs or .js)",normalize:!0,coerce:Qe}).option("use-dot",ut),async e=>{await fD({useDotBin:e.useDotBin,path:e.path,outfile:e.outfile})}).command({command:"webcomponent [path]",aliases:["wc","webcomp"],describe:"generate js with webcomponents",builder:e=>e.option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.mjs or .js)",normalize:!0,coerce:Qe}).option("webcomponent-prefix",Ls).option("use-dot",ut),handler:async e=>{await dD({useDotBin:e.useDotBin,path:e.path,outfile:e.outfile,webcomponentPrefix:e.webcomponentPrefix})}}).command({command:"model [path]",aliases:["ts"],describe:"generate LikeC4Model (.ts)",builder:e=>e.option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.ts)",normalize:!0,coerce:Qe}).option("use-dot",ut),handler:async e=>{await cD({path:e.path,useDotBin:e.useDotBin,outfile:e.outfile})}}).command({command:"views-data [path]",aliases:["views"],describe:"generate likec4 views data (.ts)",builder:e=>e.option("outfile",{alias:"o",type:"string",desc:"<file> output .ts file",normalize:!0,coerce:Qe}).option("use-dot",ut),handler:async e=>{await is({format:"views",path:e.path,useDotBin:e.useDotBin,outfile:e.outfile})}}).command({command:"dot [path]",describe:"generate graphviz files (.dot)",builder:e=>e.option("outdir",Pn).option("use-dot",ut),handler:async e=>{await is({format:"dot",path:e.path,useDotBin:e.useDotBin,outdir:e.outdir})}}).command({command:"d2 [path]",describe:"generate D2 files (.d2)",builder:e=>e.option("outdir",Pn).option("use-dot",ut),handler:async e=>{await is({format:"d2",path:e.path,useDotBin:e.useDotBin,outdir:e.outdir})}}).command({command:"mermaid [path]",aliases:["mmd"],describe:"generate Mermaid files (.mmd)",builder:e=>e.option("outdir",Pn).option("use-dot",ut),handler:async e=>{await is({format:"mermaid",useDotBin:e.useDotBin,path:e.path,outdir:e.outdir})}}).epilog(`${Q.bold("Examples:")}
728
+ `))}class Fc extends Error{constructor(e){super(`${e} is locked`)}}const Er={old:new Set,young:new Set},oy=1e3*15,Fn=1024,Pn=65535;let Jr;const ay=()=>{const t=Ir.networkInterfaces(),e=new Set([void 0,"0.0.0.0"]);for(const r of Object.values(t))for(const n of r)e.add(n.address);return e},Pc=t=>new Promise((e,r)=>{const n=rm.createServer();n.unref(),n.on("error",r),n.listen(t,()=>{const{port:i}=n.address();n.close(()=>{e(i)})})}),Nc=async(t,e)=>{if(t.host||t.port===0)return Pc(t);for(const r of e)
729
+ try{await Pc({port:t.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return t.port},uy=function*(t){t&&(yield*t),yield 0};async function fo(t){let e,r=new Set;if(t&&(t.port&&(e=typeof t.port=="number"?[t.port]:t.port),t.exclude)){const i=t.exclude;if(typeof i[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(const s of i){if(typeof s!="number")throw new TypeError("Each item in the `exclude` option must be a number cor\
730
+ responding to the port you want excluded.");if(!Number.isSafeInteger(s))throw new TypeError(`Number ${s} in the exclude option is not a safe integer and can't be used`)}r=new Set(i)}Jr===void 0&&(Jr=setTimeout(()=>{Jr=void 0,Er.old=Er.young,Er.young=new Set},oy),Jr.unref&&Jr.unref());const n=ay();for(const i of uy(e))try{if(r.has(i))continue;let s=await Nc({...t,port:i},n);for(;Er.old.has(s)||Er.young.has(s);){if(i!==0)throw new Fc(i);s=await Nc({...t,port:i},n)}return Er.young.add(s),s}catch(s){
731
+ if(!["EADDRINUSE","EACCES"].includes(s.code)&&!(s instanceof Fc))throw s}throw new Error("No available ports found")}function Nn(t,e){if(!Number.isInteger(t)||!Number.isInteger(e))throw new TypeError("`from` and `to` must be integer numbers");if(t<Fn||t>Pn)throw new RangeError(`'from' must be between ${Fn} and ${Pn}`);if(e<Fn||e>Pn)throw new RangeError(`'to' must be between ${Fn} and ${Pn}`);if(t>e)throw new RangeError("`to` must be greater than or equal to `from`");return function*(n,i){for(let s=n;s<=
732
+ i;s++)yield s}(t,e)}async function Tc({buildWebcomponent:t=!0,hmr:e=!0,webcomponentPrefix:r="likec4",languageServices:n,likec4AssetsDir:i,openBrowser:s,listen:o,...a}){i??=await on(Rr(an(),".likec4-assets-"));const{isDev:c,...l}=await co({...a,languageServices:n,likec4AssetsDir:i,webcomponentPrefix:r}),u=await fo({port:[5173,...Nn(61e3,61010),...Nn(62002,62010)]}),d=await fo({port:Nn(24678,24690)}),h=await Is();let E;if(t){const D=await lo({webcomponentPrefix:r,languageServices:n,outDir:h,base:l.
733
+ base});E=Fr({...D,logLevel:"warn"}).catch(f=>(pt.warn("webcomponent build failed",f),pt.warn("Ignoring error and continuing"),Promise.resolve()))}const y=await em({...l,define:Object.assign({},l.define,e&&{"process.env.NODE_ENV":'"development"'}),mode:e?"development":l.mode,publicDir:h,server:{host:o??"127.0.0.1",port:u,hmr:e&&{overlay:!0,port:d},fs:{strict:!1},open:s??!c}});return await y.listen(),E&&await E,y}async function cy({browserContext:t,views:e,output:r,logger:n,timeout:i,maxAttempts:s,
734
+ outputType:o,theme:a}){let c;const l=e.map(h=>({view:h,attempt:1})),u=[];let d;for(;d=l.shift();){const{view:h,attempt:E}=d,y=`/export/${encodeURIComponent(h.id)}`;try{if(E>1){c&&(c.close({runBeforeUnload:!0}).catch(m=>n.error(`failed to close page: ${m}`)),c=void 0);const p=Va(E*200,{min:200,max:1e3});n.info(K.cyan(y)+K.dim(` attempt ${E} of ${s} after ${p}ms`)),await nm(p)}else h.hasLayoutDrift&&n.warn(K.yellow("Drift detected, manual layout can not be applied, view may be invalid: ")+K.red(h.
735
+ id)),n.info(K.cyan(y));c??=await t.newPage(),await c.setViewportSize({width:h.bounds.width+20*2,height:h.bounds.height+20*2}),await c.goto(y+`?padding=20&theme=${a}`);const D=c.getByRole("presentation");await D.waitFor(),h.nodes.some(p=>Ua(p.icon)&&p.icon.toLowerCase().startsWith("http"))&&await ly(c,i);let f=".";o==="relative"&&(f=h.relativePath??".",f.includes("/")?f=f.slice(0,f.lastIndexOf("/")):f=".");const g=De(r,f,`${h.id}.png`);await D.screenshot({path:g,omitBackground:!0}),u.push({view:h,
736
+ path:g})}catch(D){c?.close({runBeforeUnload:!0}).catch(f=>n.error(`failed to close page: ${f}`)),n.error(K.red("failed "+y+`
737
+ `+D)),E<s&&(l.push({view:h,attempt:E+1}),n.info(K.dim(`retry ${y}`))),c=void 0}}return u}async function ly(t,e){let r=await t.locator("//img").all();if(!r.length)return;const n=r.map(i=>i.evaluate(s=>s.complete||new Promise((o,a)=>{s.onload=o,s.onerror=a}),{timeout:Math.max(3e4,e)}));await Promise.allSettled(n)}async function Lc({logger:t,serverUrl:e,theme:r="light",timeoutMs:n=15e3,views:i,output:s,outputType:o="relative",maxAttempts:a=3}){t.info(`${K.cyan("export output")} ${K.dim(s)}`),t.info(
738
+ `${K.cyan("from server")} ${K.dim(e)}`);const c=ru.executablePath();t.info(K.cyan("Start chromium")),t.info(K.dim(c));const l=await ru.launch();t.info(K.cyan("Color scheme: ")+r);const u=await l.newContext({deviceScaleFactor:2,colorScheme:r,baseURL:e,ignoreHTTPSErrors:!0,reducedMotion:"reduce",isMobile:!1});u.setDefaultNavigationTimeout(n),u.setDefaultTimeout(n);try{return await cy({browserContext:u,views:i,output:s,outputType:o,logger:t,maxAttempts:a,timeout:n,theme:r})}finally{t.info(K.cyan("c\
739
+ lose chromium")),await u.close(),await l.close()}}async function jc({path:t,useDotBin:e,theme:r="light",output:n,outputType:i,serverUrl:s,ignore:o=!1,timeoutMs:a=1e4,maxAttempts:c=3}){const l=Dt("c4:export"),u=Lp(),d=await vt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});n??=d.workspace;const h=await d.diagrams();if(!Zp(h,1))throw l.warn("no views found"),new Error("no views found");let E;if(!s&&(l.info(K.cyan("start preview server")),E=await Tc({languageServices:d,buildWebcomponent:!1,
740
+ openBrowser:!1,useOverviewGraph:!1,hmr:!1}),s=Oc(E),!s))throw l.error("Vite server is not ready, no resolvedUrls"),new Error("Vite server is not ready, no resolvedUrls");try{const y=await Lc({logger:l,serverUrl:s,theme:r,timeoutMs:a,views:h,output:n,outputType:i,maxAttempts:c}),{pretty:D}=Rp(u);if(y.length>0&&l.info(K.green(`exported ${y.length} views in ${D}`)),y.length!==h.length&&(o&&y.length>0?l.info(K.dim("ignore")+" "+K.red(`failed ${h.length-y.length} out of ${h.length} views`)):l.error(K.
741
+ red(`failed ${h.length-y.length} out of ${h.length} views`))),y.length!==h.length&&(y.length===0||!o))throw new Error(`Failed ${h.length-y.length} out of ${h.length} views`)}finally{E&&(l.info(K.cyan("stop server")),await E.close().catch(y=>{l.error(y)}))}}const{cyan:kc,dim:Bc}=K;async function fy({path:t,useDotBin:e,useHashHistory:r,webcomponentPrefix:n,useOverview:i=!1,output:s,outputSingleFile:o,base:a}){const c=Dt("c4:build"),l=await vt.fromWorkspace(t,{graphviz:e?"binary":"wasm",logger:"vit\
742
+ e"}),u=s??De(l.workspace,"dist");let d=De(u,"assets");if(i)try{d=De(u,"assets","previews"),await $t(d,{recursive:!0}),c.info(`${kc("Generate previews")} ${Bc(d)}
743
+ `),await jc({path:t,useDotBin:e,output:d,outputType:"flat",ignore:!0})}catch(h){c.error(K.red("Failed to generate previews")),c.error(h),c.warn(K.yellow("Ignore previews and continue build")),is(d,{recursive:!0,force:!0}),i=!1}await sy({base:a,useHashHistory:o||r,customLogger:c,useOverviewGraph:i,webcomponentPrefix:n,languageServices:l,likec4AssetsDir:d,outputDir:s,outputSingleFile:o}),i&&(c.info(`${kc("clean previews")} ${Bc(d)}`),is(d,{recursive:!0,force:!0}))}const dy={command:"build [path]",
744
+ aliases:["bundle"],describe:"Build a static website",builder:t=>t.positional("path",_n).option("output",{alias:"o",type:"string",desc:"output directory for production build",normalize:!0,coerce:De}).option("base",zu).option("use-hash-history",Vu).option("use-dot",at).option("webcomponent-prefix",Cs).option("use-overview",Gu).option("output-single-file",A0).example(`${K.green("$0 build -o ./build ./src")}`,K.gray("Search for likec4 files in 'src' and output static site to 'build'")),handler:async t=>{
745
+ await fy({path:t.path,output:t.output,base:t.base,useHashHistory:t["use-hash-history"],useDotBin:t["use-dot"],useOverview:t["use-overview"]??!1,webcomponentPrefix:t["webcomponent-prefix"],outputSingleFile:t["output-single-file"]??!1})}},ur=t=>{const e=typeof t;return t!==null&&(e==="object"||e==="function")},ho=new Set(["__proto__","prototype","constructor"]),hy=new Set("0123456789");function Tn(t){const e=[];let r="",n="start",i=!1;for(const s of t)switch(s){case"\\":{if(n==="index")throw new Error(
746
+ "Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");i&&(r+=s),n="property",i=!i;break}case".":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(i){i=!1,r+=s;break}if(ho.has(r))return[];e.push(r),r="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(i){i=!1,r+=s;break}if(n==="property"){if(ho.has(r))return[];e.push(
747
+ r),r=""}n="index";break}case"]":{if(n==="index"){e.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!hy.has(s))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),i&&(i=!1,r+="\\"),r+=s}}switch(i&&(r+="\\"),n){case"property":{if(ho.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not \
748
+ closed");case"start":{e.push("");break}}return e}function po(t,e){if(typeof e!="number"&&Array.isArray(t)){const r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function xc(t,e){if(po(t,e))throw new Error("Cannot use string index")}function py(t,e,r){if(!ur(t)||typeof e!="string")return r===void 0?t:r;const n=Tn(e);if(n.length===0)return r;for(let i=0;i<n.length;i++){const s=n[i];if(po(t,s)?t=i===n.length-1?void 0:null:t=t[s],t==null){if(i!==n.length-1)return r;break}}return t===
749
+ void 0?r:t}function Mc(t,e,r){if(!ur(t)||typeof e!="string")return t;const n=t,i=Tn(e);for(let s=0;s<i.length;s++){const o=i[s];xc(t,o),s===i.length-1?t[o]=r:ur(t[o])||(t[o]=typeof i[s+1]=="number"?[]:{}),t=t[o]}return n}function my(t,e){if(!ur(t)||typeof e!="string")return!1;const r=Tn(e);for(let n=0;n<r.length;n++){const i=r[n];if(xc(t,i),n===r.length-1)return delete t[i],!0;if(t=t[i],!ur(t))return!1}}function gy(t,e){if(!ur(t)||typeof e!="string")return!1;const r=Tn(e);if(r.length===0)return!1;
750
+ for(const n of r){if(!ur(t)||!(n in t)||po(t,n))return!1;t=t[n]}return!0}const Mt=Ir.homedir(),mo=Ir.tmpdir(),{env:Dr}=Te,yy=t=>{const e=be.join(Mt,"Library");return{data:be.join(e,"Application Support",t),config:be.join(e,"Preferences",t),cache:be.join(e,"Caches",t),log:be.join(e,"Logs",t),temp:be.join(mo,t)}},Ey=t=>{const e=Dr.APPDATA||be.join(Mt,"AppData","Roaming"),r=Dr.LOCALAPPDATA||be.join(Mt,"AppData","Local");return{data:be.join(r,t,"Data"),config:be.join(e,t,"Config"),cache:be.join(r,t,
751
+ "Cache"),log:be.join(r,t,"Log"),temp:be.join(mo,t)}},Dy=t=>{const e=be.basename(Mt);return{data:be.join(Dr.XDG_DATA_HOME||be.join(Mt,".local","share"),t),config:be.join(Dr.XDG_CONFIG_HOME||be.join(Mt,".config"),t),cache:be.join(Dr.XDG_CACHE_HOME||be.join(Mt,".cache"),t),log:be.join(Dr.XDG_STATE_HOME||be.join(Mt,".local","state"),t),temp:be.join(mo,e,t)}};function vy(t,{suffix:e="nodejs"}={}){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);return e&&(t+=`-${e}`),Te.
752
+ platform==="darwin"?yy(t):Te.platform==="win32"?Ey(t):Dy(t)}const qt=(t,e)=>function(...n){return t.apply(void 0,n).catch(e)},St=(t,e)=>function(...n){try{return t.apply(void 0,n)}catch(i){return e(i)}},$y=Te.getuid?!Te.getuid():!1,_y=1e4,Je=()=>{},Re={isChangeErrorOk:t=>{if(!Re.isNodeError(t))return!1;const{code:e}=t;return e==="ENOSYS"||!$y&&(e==="EINVAL"||e==="EPERM")},isNodeError:t=>t instanceof Error,isRetriableError:t=>{if(!Re.isNodeError(t))return!1;const{code:e}=t;return e==="EMFILE"||e===
753
+ "ENFILE"||e==="EAGAIN"||e==="EBUSY"||e==="EACCESS"||e==="EACCES"||e==="EACCS"||e==="EPERM"},onChangeError:t=>{if(!Re.isNodeError(t))throw t;if(!Re.isChangeErrorOk(t))throw t}};class wy{constructor(){this.interval=25,this.intervalId=void 0,this.limit=_y,this.queueActive=new Set,this.queueWaiting=new Set,this.init=()=>{this.intervalId||(this.intervalId=setInterval(this.tick,this.interval))},this.reset=()=>{this.intervalId&&(clearInterval(this.intervalId),delete this.intervalId)},this.add=e=>{this.
754
+ queueWaiting.add(e),this.queueActive.size<this.limit/2?this.tick():this.init()},this.remove=e=>{this.queueWaiting.delete(e),this.queueActive.delete(e)},this.schedule=()=>new Promise(e=>{const r=()=>this.remove(n),n=()=>e(r);this.add(n)}),this.tick=()=>{if(!(this.queueActive.size>=this.limit)){if(!this.queueWaiting.size)return this.reset();for(const e of this.queueWaiting){if(this.queueActive.size>=this.limit)break;this.queueWaiting.delete(e),this.queueActive.add(e),e()}}}}}const by=new wy,Ut=(t,e)=>function(n){
755
+ return function i(...s){return by.schedule().then(o=>{const a=l=>(o(),l),c=l=>{if(o(),Date.now()>=n)throw l;if(e(l)){const u=Math.round(100*Math.random());return new Promise(h=>setTimeout(h,u)).then(()=>i.apply(void 0,s))}throw l};return t.apply(void 0,s).then(a,c)})}},Ht=(t,e)=>function(n){return function i(...s){try{return t.apply(void 0,s)}catch(o){if(Date.now()>n)throw o;if(e(o))return i.apply(void 0,s);throw o}}},qe={attempt:{chmod:qt(Me(ge.chmod),Re.onChangeError),chown:qt(Me(ge.chown),Re.
756
+ onChangeError),close:qt(Me(ge.close),Je),fsync:qt(Me(ge.fsync),Je),mkdir:qt(Me(ge.mkdir),Je),realpath:qt(Me(ge.realpath),Je),stat:qt(Me(ge.stat),Je),unlink:qt(Me(ge.unlink),Je),chmodSync:St(ge.chmodSync,Re.onChangeError),chownSync:St(ge.chownSync,Re.onChangeError),closeSync:St(ge.closeSync,Je),existsSync:St(ge.existsSync,Je),fsyncSync:St(ge.fsync,Je),mkdirSync:St(ge.mkdirSync,Je),realpathSync:St(ge.realpathSync,Je),statSync:St(ge.statSync,Je),unlinkSync:St(ge.unlinkSync,Je)},retry:{close:Ut(Me(ge.
757
+ close),Re.isRetriableError),fsync:Ut(Me(ge.fsync),Re.isRetriableError),open:Ut(Me(ge.open),Re.isRetriableError),readFile:Ut(Me(ge.readFile),Re.isRetriableError),rename:Ut(Me(ge.rename),Re.isRetriableError),stat:Ut(Me(ge.stat),Re.isRetriableError),write:Ut(Me(ge.write),Re.isRetriableError),writeFile:Ut(Me(ge.writeFile),Re.isRetriableError),closeSync:Ht(ge.closeSync,Re.isRetriableError),fsyncSync:Ht(ge.fsyncSync,Re.isRetriableError),openSync:Ht(ge.openSync,Re.isRetriableError),readFileSync:Ht(ge.readFileSync,
758
+ Re.isRetriableError),renameSync:Ht(ge.renameSync,Re.isRetriableError),statSync:Ht(ge.statSync,Re.isRetriableError),writeSync:Ht(ge.writeSync,Re.isRetriableError),writeFileSync:Ht(ge.writeFileSync,Re.isRetriableError)}},Ay="utf8",qc=438,Cy=511,Sy={},Ry=Ir.userInfo().uid,Oy=Ir.userInfo().gid,Iy=1e3,Fy=!!Te.getuid;Te.getuid&&Te.getuid();const Uc=128,Py=t=>t instanceof Error&&"code"in t,Hc=t=>typeof t=="string",go=t=>t===void 0,Ny=Te.platform==="linux",Vc=Te.platform==="win32",yo=["SIGABRT","SIGALRM",
759
+ "SIGHUP","SIGINT","SIGTERM"];Vc||yo.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),Ny&&yo.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");class Ty{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=e=>{if(!this.exited){this.exited=!0;for(const r of this.callbacks)r();e&&(Vc&&e!=="SIGINT"&&e!=="SIGTERM"&&e!=="SIGKILL"?Te.kill(Te.pid,"SIGTERM"):Te.kill(Te.pid,e))}},this.hook=()=>{Te.once("exit",()=>this.exit());for(const e of yo)try{Te.once(
760
+ e,()=>this.exit(e))}catch{}},this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}}const Ly=new Ty,jy=Ly.register,Ue={store:{},create:t=>{const e=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),i=`.tmp-${Date.now().toString().slice(-10)}${e}`;return`${t}${i}`},get:(t,e,r=!0)=>{const n=Ue.truncate(e(t));return n in Ue.store?Ue.get(t,e,r):(Ue.store[n]=r,[n,()=>delete Ue.store[n]])},purge:t=>{Ue.store[t]&&(delete Ue.store[t],qe.attempt.unlink(t))},
761
+ purgeSync:t=>{Ue.store[t]&&(delete Ue.store[t],qe.attempt.unlinkSync(t))},purgeSyncAll:()=>{for(const t in Ue.store)Ue.purgeSync(t)},truncate:t=>{const e=be.basename(t);if(e.length<=Uc)return t;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(e);if(!r)return t;const n=e.length-Uc;return`${t.slice(0,-e.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};jy(Ue.purgeSyncAll);function zc(t,e,r=Sy){if(Hc(r))return zc(t,e,{encoding:r});const n=Date.now()+((r.timeout??Iy)||-1);let i=null,
762
+ s=null,o=null;try{const a=qe.attempt.realpathSync(t),c=!!a;t=a||t,[s,i]=Ue.get(t,r.tmpCreate||Ue.create,r.tmpPurge!==!1);const l=Fy&&go(r.chown),u=go(r.mode);if(c&&(l||u)){const d=qe.attempt.statSync(t);d&&(r={...r},l&&(r.chown={uid:d.uid,gid:d.gid}),u&&(r.mode=d.mode))}if(!c){const d=be.dirname(t);qe.attempt.mkdirSync(d,{mode:Cy,recursive:!0})}o=qe.retry.openSync(n)(s,"w",r.mode||qc),r.tmpCreated&&r.tmpCreated(s),Hc(e)?qe.retry.writeSync(n)(o,e,0,r.encoding||Ay):go(e)||qe.retry.writeSync(n)(o,e,
763
+ 0,e.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?qe.retry.fsyncSync(n)(o):qe.attempt.fsync(o)),qe.retry.closeSync(n)(o),o=null,r.chown&&(r.chown.uid!==Ry||r.chown.gid!==Oy)&&qe.attempt.chownSync(s,r.chown.uid,r.chown.gid),r.mode&&r.mode!==qc&&qe.attempt.chmodSync(s,r.mode);try{qe.retry.renameSync(n)(s,t)}catch(d){if(!Py(d)||d.code!=="ENAMETOOLONG")throw d;qe.retry.renameSync(n)(s,Ue.truncate(t))}i(),s=null}finally{o&&qe.attempt.closeSync(o),s&&Ue.purge(s)}}var Ln={exports:{}},Eo={},Rt={},cr={},Do={},
764
+ vo={},$o={},Gc;function jn(){return Gc||(Gc=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(p){if(super(),!t.IDENTIFIER.test(p))throw new Error("CodeGen: name must be a valid identifier");this.str=p}toString(){return this.str}emptyStr(){
765
+ return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(p){super(),this._items=typeof p=="string"?[p]:p}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const p=this._items[0];return p===""||p==='""'}get str(){var p;return(p=this._str)!==null&&p!==void 0?p:this._str=this._items.reduce((m,v)=>`${m}${v}`,"")}get names(){var p;return(p=this._names)!==null&&p!==void 0?p:this._names=this._items.reduce((m,v)=>(v instanceof r&&(m[v.str]=(m[v.str]||0)+1),m),
766
+ {})}}t._Code=n,t.nil=new n("");function i(g,...p){const m=[g[0]];let v=0;for(;v<p.length;)a(m,p[v]),m.push(g[++v]);return new n(m)}t._=i;const s=new n("+");function o(g,...p){const m=[E(g[0])];let v=0;for(;v<p.length;)m.push(s),a(m,p[v]),m.push(s,E(g[++v]));return c(m),new n(m)}t.str=o;function a(g,p){p instanceof n?g.push(...p._items):p instanceof r?g.push(p):g.push(d(p))}t.addCodeArg=a;function c(g){let p=1;for(;p<g.length-1;){if(g[p]===s){const m=l(g[p-1],g[p+1]);if(m!==void 0){g.splice(p-1,3,
767
+ m);continue}g[p++]="+"}p++}}function l(g,p){if(p==='""')return g;if(g==='""')return p;if(typeof g=="string")return p instanceof r||g[g.length-1]!=='"'?void 0:typeof p!="string"?`${g.slice(0,-1)}${p}"`:p[0]==='"'?g.slice(0,-1)+p.slice(1):void 0;if(typeof p=="string"&&p[0]==='"'&&!(g instanceof r))return`"${g}${p.slice(1)}`}function u(g,p){return p.emptyStr()?g:g.emptyStr()?p:o`${g}${p}`}t.strConcat=u;function d(g){return typeof g=="number"||typeof g=="boolean"||g===null?g:E(Array.isArray(g)?g.join(
768
+ ","):g)}function h(g){return new n(E(g))}t.stringify=h;function E(g){return JSON.stringify(g).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=E;function y(g){return typeof g=="string"&&t.IDENTIFIER.test(g)?new n(`.${g}`):i`[${g}]`}t.getProperty=y;function D(g){if(typeof g=="string"&&t.IDENTIFIER.test(g))return new n(`${g}`);throw new Error(`CodeGen: invalid export name: ${g}, use explicit $id name mapping`)}t.getEsmExportName=D;function f(g){return new n(g.toString())}t.
769
+ regexpCode=f}($o)),$o}var _o={},Wc;function Kc(){return Wc||(Wc=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=jn();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};
770
+ class i{constructor({prefixes:l,parent:u}={}){this._names={},this._prefixes=l,this._parent=u}toName(l){return l instanceof e.Name?l:this.name(l)}name(l){return new e.Name(this._newName(l))}_newName(l){const u=this._names[l]||this._nameGroup(l);return`${l}${u.index++}`}_nameGroup(l){var u,d;if(!((d=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||d===void 0)&&d.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this.
771
+ _names[l]={prefix:l,index:0}}}t.Scope=i;class s extends e.Name{constructor(l,u){super(u),this.prefix=l}setValue(l,{property:u,itemIndex:d}){this.value=l,this.scopePath=(0,e._)`.${new e.Name(u)}[${d}]`}}t.ValueScopeName=s;const o=(0,e._)`\n`;class a extends i{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?o:e.nil}}get(){return this._scope}name(l){return new s(l,this._newName(l))}value(l,u){var d;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed\
772
+ in value");const h=this.toName(l),{prefix:E}=h,y=(d=u.key)!==null&&d!==void 0?d:u.ref;let D=this._values[E];if(D){const p=D.get(y);if(p)return p}else D=this._values[E]=new Map;D.set(y,h);const f=this._scope[E]||(this._scope[E]=[]),g=f.length;return f[g]=u.ref,h.setValue(u,{property:E,itemIndex:g}),h}getValue(l,u){const d=this._values[l];if(d)return d.get(u)}scopeRefs(l,u=this._values){return this._reduceValues(u,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e.
773
+ _)`${l}${d.scopePath}`})}scopeCode(l=this._values,u,d){return this._reduceValues(l,h=>{if(h.value===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return h.value.code},u,d)}_reduceValues(l,u,d={},h){let E=e.nil;for(const y in l){const D=l[y];if(!D)continue;const f=d[y]=d[y]||new Map;D.forEach(g=>{if(f.has(g))return;f.set(g,n.Started);let p=u(g);if(p){const m=this.opts.es5?t.varKinds.var:t.varKinds.const;E=(0,e._)`${E}${m} ${g} = ${p};${this.opts._n}`}else if(p=h?.(g))E=(0,e._)`${E}${p}${this.
774
+ opts._n}`;else throw new r(g);f.set(g,n.Completed)})}return E}}t.ValueScope=a}(_o)),_o}var Yc;function pe(){return Yc||(Yc=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=jn(),r=Kc();var n=jn();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,
775
+ get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,
776
+ get:function(){return n.Name}});var i=Kc();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e.
777
+ _Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class s{optimizeNodes(){return this}optimizeNames(w,A){return this}}class o extends s{constructor(w,A,R){super(),this.varKind=w,this.name=A,this.rhs=R}render({es5:w,_n:A}){const R=w?r.varKinds.var:this.varKind,J=this.rhs===void 0?"":` = ${this.rhs}`;return`${R} ${this.name}${J};`+A}optimizeNames(w,A){if(w[this.name.str])return this.rhs&&(this.rhs=j(this.rhs,w,A)),this}get names(){
778
+ return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(w,A,R){super(),this.lhs=w,this.rhs=A,this.sideEffects=R}render({_n:w}){return`${this.lhs} = ${this.rhs};`+w}optimizeNames(w,A){if(!(this.lhs instanceof e.Name&&!w[this.lhs.str]&&!this.sideEffects))return this.rhs=j(this.rhs,w,A),this}get names(){const w=this.lhs instanceof e.Name?{}:{...this.lhs.names};return N(w,this.rhs)}}class c extends a{constructor(w,A,R,J){super(w,R,J),this.op=A}render({_n:w}){return`${this.
779
+ lhs} ${this.op}= ${this.rhs};`+w}}class l extends s{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`${this.label}:`+w}}class u extends s{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`break${this.label?` ${this.label}`:""};`+w}}class d extends s{constructor(w){super(),this.error=w}render({_n:w}){return`throw ${this.error};`+w}get names(){return this.error.names}}class h extends s{constructor(w){super(),this.code=w}render({_n:w}){return`${this.code}\
780
+ ;`+w}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(w,A){return this.code=j(this.code,w,A),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class E extends s{constructor(w=[]){super(),this.nodes=w}render(w){return this.nodes.reduce((A,R)=>A+R.render(w),"")}optimizeNodes(){const{nodes:w}=this;let A=w.length;for(;A--;){const R=w[A].optimizeNodes();Array.isArray(R)?w.splice(A,1,...R):R?w[A]=R:w.splice(A,1)}return w.length>0?this:void 0}optimizeNames(w,A){
781
+ const{nodes:R}=this;let J=R.length;for(;J--;){const Z=R[J];Z.optimizeNames(w,A)||(M(w,Z.names),R.splice(J,1))}return R.length>0?this:void 0}get names(){return this.nodes.reduce((w,A)=>B(w,A.names),{})}}class y extends E{render(w){return"{"+w._n+super.render(w)+"}"+w._n}}class D extends E{}class f extends y{}f.kind="else";class g extends y{constructor(w,A){super(A),this.condition=w}render(w){let A=`if(${this.condition})`+super.render(w);return this.else&&(A+="else "+this.else.render(w)),A}optimizeNodes(){
782
+ super.optimizeNodes();const w=this.condition;if(w===!0)return this.nodes;let A=this.else;if(A){const R=A.optimizeNodes();A=this.else=Array.isArray(R)?new f(R):R}if(A)return w===!1?A instanceof g?A:A.nodes:this.nodes.length?this:new g(Y(w),A instanceof g?[A]:A.nodes);if(!(w===!1||!this.nodes.length))return this}optimizeNames(w,A){var R;if(this.else=(R=this.else)===null||R===void 0?void 0:R.optimizeNames(w,A),!!(super.optimizeNames(w,A)||this.else))return this.condition=j(this.condition,w,A),this}get names(){
783
+ const w=super.names;return N(w,this.condition),this.else&&B(w,this.else.names),w}}g.kind="if";class p extends y{}p.kind="for";class m extends p{constructor(w){super(),this.iteration=w}render(w){return`for(${this.iteration})`+super.render(w)}optimizeNames(w,A){if(super.optimizeNames(w,A))return this.iteration=j(this.iteration,w,A),this}get names(){return B(super.names,this.iteration.names)}}class v extends p{constructor(w,A,R,J){super(),this.varKind=w,this.name=A,this.from=R,this.to=J}render(w){const A=w.
784
+ es5?r.varKinds.var:this.varKind,{name:R,from:J,to:Z}=this;return`for(${A} ${R}=${J}; ${R}<${Z}; ${R}++)`+super.render(w)}get names(){const w=N(super.names,this.from);return N(w,this.to)}}class $ extends p{constructor(w,A,R,J){super(),this.loop=w,this.varKind=A,this.name=R,this.iterable=J}render(w){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(w)}optimizeNames(w,A){if(super.optimizeNames(w,A))return this.iterable=j(this.iterable,w,A),this}get names(){return B(
785
+ super.names,this.iterable.names)}}class _ extends y{constructor(w,A,R){super(),this.name=w,this.args=A,this.async=R}render(w){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(w)}}_.kind="func";class b extends E{render(w){return"return "+super.render(w)}}b.kind="return";class I extends y{render(w){let A="try"+super.render(w);return this.catch&&(A+=this.catch.render(w)),this.finally&&(A+=this.finally.render(w)),A}optimizeNodes(){var w,A;return super.optimizeNodes(),
786
+ (w=this.catch)===null||w===void 0||w.optimizeNodes(),(A=this.finally)===null||A===void 0||A.optimizeNodes(),this}optimizeNames(w,A){var R,J;return super.optimizeNames(w,A),(R=this.catch)===null||R===void 0||R.optimizeNames(w,A),(J=this.finally)===null||J===void 0||J.optimizeNames(w,A),this}get names(){const w=super.names;return this.catch&&B(w,this.catch.names),this.finally&&B(w,this.finally.names),w}}class V extends y{constructor(w){super(),this.error=w}render(w){return`catch(${this.error})`+super.
787
+ render(w)}}V.kind="catch";class G extends y{render(w){return"finally"+super.render(w)}}G.kind="finally";class L{constructor(w,A={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...A,_n:A.lines?`
788
+ `:""},this._extScope=w,this._scope=new r.Scope({parent:w}),this._nodes=[new D]}toString(){return this._root.render(this.opts)}name(w){return this._scope.name(w)}scopeName(w){return this._extScope.name(w)}scopeValue(w,A){const R=this._extScope.value(w,A);return(this._values[R.prefix]||(this._values[R.prefix]=new Set)).add(R),R}getScopeValue(w,A){return this._extScope.getValue(w,A)}scopeRefs(w){return this._extScope.scopeRefs(w,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(w,A,R,J){
789
+ const Z=this._scope.toName(A);return R!==void 0&&J&&(this._constants[Z.str]=R),this._leafNode(new o(w,Z,R)),Z}const(w,A,R){return this._def(r.varKinds.const,w,A,R)}let(w,A,R){return this._def(r.varKinds.let,w,A,R)}var(w,A,R){return this._def(r.varKinds.var,w,A,R)}assign(w,A,R){return this._leafNode(new a(w,A,R))}add(w,A){return this._leafNode(new c(w,t.operators.ADD,A))}code(w){return typeof w=="function"?w():w!==e.nil&&this._leafNode(new h(w)),this}object(...w){const A=["{"];for(const[R,J]of w)
790
+ A.length>1&&A.push(","),A.push(R),(R!==J||this.opts.es5)&&(A.push(":"),(0,e.addCodeArg)(A,J));return A.push("}"),new e._Code(A)}if(w,A,R){if(this._blockNode(new g(w)),A&&R)this.code(A).else().code(R).endIf();else if(A)this.code(A).endIf();else if(R)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(w){return this._elseNode(new g(w))}else(){return this._elseNode(new f)}endIf(){return this._endBlockNode(g,f)}_for(w,A){return this._blockNode(w),A&&this.code(A).endFor(),this}for(w,A){
791
+ return this._for(new m(w),A)}forRange(w,A,R,J,Z=this.opts.es5?r.varKinds.var:r.varKinds.let){const oe=this._scope.toName(w);return this._for(new v(Z,oe,A,R),()=>J(oe))}forOf(w,A,R,J=r.varKinds.const){const Z=this._scope.toName(w);if(this.opts.es5){const oe=A instanceof e.Name?A:this.var("_arr",A);return this.forRange("_i",0,(0,e._)`${oe}.length`,ae=>{this.var(Z,(0,e._)`${oe}[${ae}]`),R(Z)})}return this._for(new $("of",J,Z,A),()=>R(Z))}forIn(w,A,R,J=this.opts.es5?r.varKinds.var:r.varKinds.const){
792
+ if(this.opts.ownProperties)return this.forOf(w,(0,e._)`Object.keys(${A})`,R);const Z=this._scope.toName(w);return this._for(new $("in",J,Z,A),()=>R(Z))}endFor(){return this._endBlockNode(p)}label(w){return this._leafNode(new l(w))}break(w){return this._leafNode(new u(w))}return(w){const A=new b;if(this._blockNode(A),this.code(w),A.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(b)}try(w,A,R){if(!A&&!R)throw new Error('CodeGen: "try" without "c\
793
+ atch" and "finally"');const J=new I;if(this._blockNode(J),this.code(w),A){const Z=this.name("e");this._currNode=J.catch=new V(Z),A(Z)}return R&&(this._currNode=J.finally=new G,this.code(R)),this._endBlockNode(V,G)}throw(w){return this._leafNode(new d(w))}block(w,A){return this._blockStarts.push(this._nodes.length),w&&this.code(w).endBlock(A),this}endBlock(w){const A=this._blockStarts.pop();if(A===void 0)throw new Error("CodeGen: not in self-balancing block");const R=this._nodes.length-A;if(R<0||
794
+ w!==void 0&&R!==w)throw new Error(`CodeGen: wrong number of nodes: ${R} vs ${w} expected`);return this._nodes.length=A,this}func(w,A=e.nil,R,J){return this._blockNode(new _(w,A,R)),J&&this.code(J).endFunc(),this}endFunc(){return this._endBlockNode(_)}optimize(w=1){for(;w-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(w){return this._currNode.nodes.push(w),this}_blockNode(w){this._currNode.nodes.push(w),this._nodes.push(w)}_endBlockNode(w,A){
795
+ const R=this._currNode;if(R instanceof w||A&&R instanceof A)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${A?`${w.kind}/${A.kind}`:w.kind}"`)}_elseNode(w){const A=this._currNode;if(!(A instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=A.else=w,this}get _root(){return this._nodes[0]}get _currNode(){const w=this._nodes;return w[w.length-1]}set _currNode(w){const A=this._nodes;A[A.length-1]=w}}t.CodeGen=L;function B(k,w){for(const A in w)k[A]=
796
+ (k[A]||0)+(w[A]||0);return k}function N(k,w){return w instanceof e._CodeOrName?B(k,w.names):k}function j(k,w,A){if(k instanceof e.Name)return R(k);if(!J(k))return k;return new e._Code(k._items.reduce((Z,oe)=>(oe instanceof e.Name&&(oe=R(oe)),oe instanceof e._Code?Z.push(...oe._items):Z.push(oe),Z),[]));function R(Z){const oe=A[Z.str];return oe===void 0||w[Z.str]!==1?Z:(delete w[Z.str],oe)}function J(Z){return Z instanceof e._Code&&Z._items.some(oe=>oe instanceof e.Name&&w[oe.str]===1&&A[oe.str]!==
797
+ void 0)}}function M(k,w){for(const A in w)k[A]=(k[A]||0)-(w[A]||0)}function Y(k){return typeof k=="boolean"||typeof k=="number"||k===null?!k:(0,e._)`!${U(k)}`}t.not=Y;const z=C(t.operators.AND);function X(...k){return k.reduce(z)}t.and=X;const se=C(t.operators.OR);function q(...k){return k.reduce(se)}t.or=q;function C(k){return(w,A)=>w===e.nil?A:A===e.nil?w:(0,e._)`${U(w)} ${k} ${U(A)}`}function U(k){return k instanceof e.Name?k:(0,e._)`(${k})`}}(vo)),vo}var Ee={},Jc;function _e(){if(Jc)return Ee;
798
+ Jc=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.checkStrictMode=Ee.getErrorPath=Ee.Type=Ee.useFunc=Ee.setEvaluated=Ee.evaluatedPropsToName=Ee.mergeEvaluated=Ee.eachItem=Ee.unescapeJsonPointer=Ee.escapeJsonPointer=Ee.escapeFragment=Ee.unescapeFragment=Ee.schemaRefOrVal=Ee.schemaHasRulesButRef=Ee.schemaHasRules=Ee.checkUnknownRules=Ee.alwaysValidSchema=Ee.toHash=void 0;const t=pe(),e=jn();function r($){const _={};for(const b of $)_[b]=!0;return _}Ee.toHash=r;function n($,_){return typeof _==
799
+ "boolean"?_:Object.keys(_).length===0?!0:(i($,_),!s(_,$.self.RULES.all))}Ee.alwaysValidSchema=n;function i($,_=$.schema){const{opts:b,self:I}=$;if(!b.strictSchema||typeof _=="boolean")return;const V=I.RULES.keywords;for(const G in _)V[G]||v($,`unknown keyword: "${G}"`)}Ee.checkUnknownRules=i;function s($,_){if(typeof $=="boolean")return!$;for(const b in $)if(_[b])return!0;return!1}Ee.schemaHasRules=s;function o($,_){if(typeof $=="boolean")return!$;for(const b in $)if(b!=="$ref"&&_.all[b])return!0;
800
+ return!1}Ee.schemaHasRulesButRef=o;function a({topSchemaRef:$,schemaPath:_},b,I,V){if(!V){if(typeof b=="number"||typeof b=="boolean")return b;if(typeof b=="string")return(0,t._)`${b}`}return(0,t._)`${$}${_}${(0,t.getProperty)(I)}`}Ee.schemaRefOrVal=a;function c($){return d(decodeURIComponent($))}Ee.unescapeFragment=c;function l($){return encodeURIComponent(u($))}Ee.escapeFragment=l;function u($){return typeof $=="number"?`${$}`:$.replace(/~/g,"~0").replace(/\//g,"~1")}Ee.escapeJsonPointer=u;function d($){
801
+ return $.replace(/~1/g,"/").replace(/~0/g,"~")}Ee.unescapeJsonPointer=d;function h($,_){if(Array.isArray($))for(const b of $)_(b);else _($)}Ee.eachItem=h;function E({mergeNames:$,mergeToName:_,mergeValues:b,resultToName:I}){return(V,G,L,B)=>{const N=L===void 0?G:L instanceof t.Name?(G instanceof t.Name?$(V,G,L):_(V,G,L),L):G instanceof t.Name?(_(V,L,G),G):b(G,L);return B===t.Name&&!(N instanceof t.Name)?I(V,N):N}}Ee.mergeEvaluated={props:E({mergeNames:($,_,b)=>$.if((0,t._)`${b} !== true && ${_} !== undefined`,
802
+ ()=>{$.if((0,t._)`${_} === true`,()=>$.assign(b,!0),()=>$.assign(b,(0,t._)`${b} || {}`).code((0,t._)`Object.assign(${b}, ${_})`))}),mergeToName:($,_,b)=>$.if((0,t._)`${b} !== true`,()=>{_===!0?$.assign(b,!0):($.assign(b,(0,t._)`${b} || {}`),D($,b,_))}),mergeValues:($,_)=>$===!0?!0:{...$,..._},resultToName:y}),items:E({mergeNames:($,_,b)=>$.if((0,t._)`${b} !== true && ${_} !== undefined`,()=>$.assign(b,(0,t._)`${_} === true ? true : ${b} > ${_} ? ${b} : ${_}`)),mergeToName:($,_,b)=>$.if((0,t._)`${b} !== true`,
803
+ ()=>$.assign(b,_===!0?!0:(0,t._)`${b} > ${_} ? ${b} : ${_}`)),mergeValues:($,_)=>$===!0?!0:Math.max($,_),resultToName:($,_)=>$.var("items",_)})};function y($,_){if(_===!0)return $.var("props",!0);const b=$.var("props",(0,t._)`{}`);return _!==void 0&&D($,b,_),b}Ee.evaluatedPropsToName=y;function D($,_,b){Object.keys(b).forEach(I=>$.assign((0,t._)`${_}${(0,t.getProperty)(I)}`,!0))}Ee.setEvaluated=D;const f={};function g($,_){return $.scopeValue("func",{ref:_,code:f[_.code]||(f[_.code]=new e._Code(
804
+ _.code))})}Ee.useFunc=g;var p;(function($){$[$.Num=0]="Num",$[$.Str=1]="Str"})(p||(Ee.Type=p={}));function m($,_,b){if($ instanceof t.Name){const I=_===p.Num;return b?I?(0,t._)`"[" + ${$} + "]"`:(0,t._)`"['" + ${$} + "']"`:I?(0,t._)`"/" + ${$}`:(0,t._)`"/" + ${$}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return b?(0,t.getProperty)($).toString():"/"+u($)}Ee.getErrorPath=m;function v($,_,b=$.opts.strictSchema){if(b){if(_=`strict mode: ${_}`,b===!0)throw new Error(_);$.self.logger.warn(_)}}return Ee.
805
+ checkStrictMode=v,Ee}var kn={},Xc;function ct(){if(Xc)return kn;Xc=1,Object.defineProperty(kn,"__esModule",{value:!0});const t=pe(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.
806
+ Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return kn.default=e,kn}var Qc;function Bn(){return Qc||(Qc=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=pe(),r=_e(),n=ct();t.keywordError={message:({keyword:f})=>(0,e.str)`must pass "${f}" keyword validation`},t.keyword$DataError={message:({
807
+ keyword:f,schemaType:g})=>g?(0,e.str)`"${f}" keyword must be ${g} ($data)`:(0,e.str)`"${f}" keyword is invalid ($data)`};function i(f,g=t.keywordError,p,m){const{it:v}=f,{gen:$,compositeRule:_,allErrors:b}=v,I=d(f,g,p);m??(_||b)?c($,I):l(v,(0,e._)`[${I}]`)}t.reportError=i;function s(f,g=t.keywordError,p){const{it:m}=f,{gen:v,compositeRule:$,allErrors:_}=m,b=d(f,g,p);c(v,b),$||_||l(m,n.default.vErrors)}t.reportExtraError=s;function o(f,g){f.assign(n.default.errors,g),f.if((0,e._)`${n.default.vErrors} !== null`,
808
+ ()=>f.if(g,()=>f.assign((0,e._)`${n.default.vErrors}.length`,g),()=>f.assign(n.default.vErrors,null)))}t.resetErrorsCount=o;function a({gen:f,keyword:g,schemaValue:p,data:m,errsCount:v,it:$}){if(v===void 0)throw new Error("ajv implementation error");const _=f.name("err");f.forRange("i",v,n.default.errors,b=>{f.const(_,(0,e._)`${n.default.vErrors}[${b}]`),f.if((0,e._)`${_}.instancePath === undefined`,()=>f.assign((0,e._)`${_}.instancePath`,(0,e.strConcat)(n.default.instancePath,$.errorPath))),f.assign(
809
+ (0,e._)`${_}.schemaPath`,(0,e.str)`${$.errSchemaPath}/${g}`),$.opts.verbose&&(f.assign((0,e._)`${_}.schema`,p),f.assign((0,e._)`${_}.data`,m))})}t.extendErrors=a;function c(f,g){const p=f.const("err",g);f.if((0,e._)`${n.default.vErrors} === null`,()=>f.assign(n.default.vErrors,(0,e._)`[${p}]`),(0,e._)`${n.default.vErrors}.push(${p})`),f.code((0,e._)`${n.default.errors}++`)}function l(f,g){const{gen:p,validateName:m,schemaEnv:v}=f;v.$async?p.throw((0,e._)`new ${f.ValidationError}(${g})`):(p.assign(
810
+ (0,e._)`${m}.errors`,g),p.return(!1))}const u={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function d(f,g,p){const{createErrors:m}=f.it;return m===!1?(0,e._)`{}`:h(f,g,p)}function h(f,g,p={}){const{gen:m,it:v}=f,$=[E(v,p),y(f,p)];return D(f,g,$),m.object(...$)}function E({errorPath:f},{instancePath:g}){const p=g?
811
+ (0,e.str)`${f}${(0,r.getErrorPath)(g,r.Type.Str)}`:f;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,p)]}function y({keyword:f,it:{errSchemaPath:g}},{schemaPath:p,parentSchema:m}){let v=m?g:(0,e.str)`${g}/${f}`;return p&&(v=(0,e.str)`${v}${(0,r.getErrorPath)(p,r.Type.Str)}`),[u.schemaPath,v]}function D(f,{params:g,message:p},m){const{keyword:v,data:$,schemaValue:_,it:b}=f,{opts:I,propertyName:V,topSchemaRef:G,schemaPath:L}=b;m.push([u.keyword,v],[u.params,typeof g=="function"?
812
+ g(f):g||(0,e._)`{}`]),I.messages&&m.push([u.message,typeof p=="function"?p(f):p]),I.verbose&&m.push([u.schema,_],[u.parentSchema,(0,e._)`${G}${L}`],[n.default.data,$]),V&&m.push([u.propertyName,V])}}(Do)),Do}var Zc;function ky(){if(Zc)return cr;Zc=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.boolOrEmptySchema=cr.topBoolOrEmptySchema=void 0;const t=Bn(),e=pe(),r=ct(),n={message:"boolean schema is false"};function i(a){const{gen:c,schema:l,validateName:u}=a;l===!1?o(a,!1):typeof l=="obje\
813
+ ct"&&l.$async===!0?c.return(r.default.data):(c.assign((0,e._)`${u}.errors`,null),c.return(!0))}cr.topBoolOrEmptySchema=i;function s(a,c){const{gen:l,schema:u}=a;u===!1?(l.var(c,!1),o(a)):l.var(c,!0)}cr.boolOrEmptySchema=s;function o(a,c){const{gen:l,data:u}=a,d={gen:l,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,t.reportError)(d,n,void 0,c)}return cr}var xe={},lr={},el;function tl(){if(el)return lr;el=1,Object.defineProperty(lr,"__esModule",{value:!0}),
814
+ lr.getRules=lr.isJSONType=void 0;const t=["string","number","integer","boolean","null","object","array"],e=new Set(t);function r(i){return typeof i=="string"&&e.has(i)}lr.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 lr.getRules=n,lr}var Ot={},
815
+ rl;function nl(){if(rl)return Ot;rl=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.shouldUseRule=Ot.shouldUseGroup=Ot.schemaHasRulesForType=void 0;function t({schema:n,self:i},s){const o=i.RULES.types[s];return o&&o!==!0&&e(n,o)}Ot.schemaHasRulesForType=t;function e(n,i){return i.rules.some(s=>r(n,s))}Ot.shouldUseGroup=e;function r(n,i){var s;return n[i.keyword]!==void 0||((s=i.definition.implements)===null||s===void 0?void 0:s.some(o=>n[o]!==void 0))}return Ot.shouldUseRule=r,Ot}var il;
816
+ function xn(){if(il)return xe;il=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.reportTypeError=xe.checkDataTypes=xe.checkDataType=xe.coerceAndCheckDataType=xe.getJSONTypes=xe.getSchemaTypes=xe.DataType=void 0;const t=tl(),e=nl(),r=Bn(),n=pe(),i=_e();var s;(function(p){p[p.Correct=0]="Correct",p[p.Wrong=1]="Wrong"})(s||(xe.DataType=s={}));function o(p){const m=a(p.type);if(m.includes("null")){if(p.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!m.length&&
817
+ p.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');p.nullable===!0&&m.push("null")}return m}xe.getSchemaTypes=o;function a(p){const m=Array.isArray(p)?p:p?[p]:[];if(m.every(t.isJSONType))return m;throw new Error("type must be JSONType or JSONType[]: "+m.join(","))}xe.getJSONTypes=a;function c(p,m){const{gen:v,data:$,opts:_}=p,b=u(m,_.coerceTypes),I=m.length>0&&!(b.length===0&&m.length===1&&(0,e.schemaHasRulesForType)(p,m[0]));if(I){const V=y(m,$,_.strictNumbers,s.Wrong);
818
+ v.if(V,()=>{b.length?d(p,m,b):f(p)})}return I}xe.coerceAndCheckDataType=c;const l=new Set(["string","number","integer","boolean","null"]);function u(p,m){return m?p.filter(v=>l.has(v)||m==="array"&&v==="array"):[]}function d(p,m,v){const{gen:$,data:_,opts:b}=p,I=$.let("dataType",(0,n._)`typeof ${_}`),V=$.let("coerced",(0,n._)`undefined`);b.coerceTypes==="array"&&$.if((0,n._)`${I} == 'object' && Array.isArray(${_}) && ${_}.length == 1`,()=>$.assign(_,(0,n._)`${_}[0]`).assign(I,(0,n._)`typeof ${_}`).
819
+ if(y(m,_,b.strictNumbers),()=>$.assign(V,_))),$.if((0,n._)`${V} !== undefined`);for(const L of v)(l.has(L)||L==="array"&&b.coerceTypes==="array")&&G(L);$.else(),f(p),$.endIf(),$.if((0,n._)`${V} !== undefined`,()=>{$.assign(_,V),h(p,V)});function G(L){switch(L){case"string":$.elseIf((0,n._)`${I} == "number" || ${I} == "boolean"`).assign(V,(0,n._)`"" + ${_}`).elseIf((0,n._)`${_} === null`).assign(V,(0,n._)`""`);return;case"number":$.elseIf((0,n._)`${I} == "boolean" || ${_} === null
820
+ || (${I} == "string" && ${_} && ${_} == +${_})`).assign(V,(0,n._)`+${_}`);return;case"integer":$.elseIf((0,n._)`${I} === "boolean" || ${_} === null
821
+ || (${I} === "string" && ${_} && ${_} == +${_} && !(${_} % 1))`).assign(V,(0,n._)`+${_}`);return;case"boolean":$.elseIf((0,n._)`${_} === "false" || ${_} === 0 || ${_} === null`).assign(V,!1).elseIf((0,n._)`${_} === "true" || ${_} === 1`).assign(V,!0);return;case"null":$.elseIf((0,n._)`${_} === "" || ${_} === 0 || ${_} === false`),$.assign(V,null);return;case"array":$.elseIf((0,n._)`${I} === "string" || ${I} === "number"
822
+ || ${I} === "boolean" || ${_} === null`).assign(V,(0,n._)`[${_}]`)}}}function h({gen:p,parentData:m,parentDataProperty:v},$){p.if((0,n._)`${m} !== undefined`,()=>p.assign((0,n._)`${m}[${v}]`,$))}function E(p,m,v,$=s.Correct){const _=$===s.Correct?n.operators.EQ:n.operators.NEQ;let b;switch(p){case"null":return(0,n._)`${m} ${_} null`;case"array":b=(0,n._)`Array.isArray(${m})`;break;case"object":b=(0,n._)`${m} && typeof ${m} == "object" && !Array.isArray(${m})`;break;case"integer":b=
823
+ I((0,n._)`!(${m} % 1) && !isNaN(${m})`);break;case"number":b=I();break;default:return(0,n._)`typeof ${m} ${_} ${p}`}return $===s.Correct?b:(0,n.not)(b);function I(V=n.nil){return(0,n.and)((0,n._)`typeof ${m} == "number"`,V,v?(0,n._)`isFinite(${m})`:n.nil)}}xe.checkDataType=E;function y(p,m,v,$){if(p.length===1)return E(p[0],m,v,$);let _;const b=(0,i.toHash)(p);if(b.array&&b.object){const I=(0,n._)`typeof ${m} != "object"`;_=b.null?I:(0,n._)`!${m} || ${I}`,delete b.null,delete b.array,delete b.object}else
824
+ _=n.nil;b.number&&delete b.integer;for(const I in b)_=(0,n.and)(_,E(I,m,v,$));return _}xe.checkDataTypes=y;const D={message:({schema:p})=>`must be ${p}`,params:({schema:p,schemaValue:m})=>typeof p=="string"?(0,n._)`{type: ${p}}`:(0,n._)`{type: ${m}}`};function f(p){const m=g(p);(0,r.reportError)(m,D)}xe.reportTypeError=f;function g(p){const{gen:m,data:v,schema:$}=p,_=(0,i.schemaRefOrVal)(p,$,"type");return{gen:m,keyword:"type",data:v,schema:$.type,schemaCode:_,schemaValue:_,parentSchema:$,params:{},
825
+ it:p}}return xe}var Xr={},sl;function By(){if(sl)return Xr;sl=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.assignDefaults=void 0;const t=pe(),e=_e();function r(i,s){const{properties:o,items:a}=i.schema;if(s==="object"&&o)for(const c in o)n(i,c,o[c].default);else s==="array"&&Array.isArray(a)&&a.forEach((c,l)=>n(i,l,c.default))}Xr.assignDefaults=r;function n(i,s,o){const{gen:a,compositeRule:c,data:l,opts:u}=i;if(o===void 0)return;const d=(0,t._)`${l}${(0,t.getProperty)(s)}`;if(c){(0,e.checkStrictMode)(
826
+ i,`default is ignored for: ${d}`);return}let h=(0,t._)`${d} === undefined`;u.useDefaults==="empty"&&(h=(0,t._)`${h} || ${d} === null || ${d} === ""`),a.if(h,(0,t._)`${d} = ${(0,t.stringify)(o)}`)}return Xr}var lt={},Ae={},ol;function ft(){if(ol)return Ae;ol=1,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.validateUnion=Ae.validateArray=Ae.usePattern=Ae.callValidateCode=Ae.schemaProperties=Ae.allSchemaProperties=Ae.noPropertyInData=Ae.propertyInData=Ae.isOwnProperty=Ae.hasPropFunc=Ae.reportMissingProp=
827
+ Ae.checkMissingProp=Ae.checkReportMissingProp=void 0;const t=pe(),e=_e(),r=ct(),n=_e();function i(p,m){const{gen:v,data:$,it:_}=p;v.if(u(v,$,m,_.opts.ownProperties),()=>{p.setParams({missingProperty:(0,t._)`${m}`},!0),p.error()})}Ae.checkReportMissingProp=i;function s({gen:p,data:m,it:{opts:v}},$,_){return(0,t.or)(...$.map(b=>(0,t.and)(u(p,m,b,v.ownProperties),(0,t._)`${_} = ${b}`)))}Ae.checkMissingProp=s;function o(p,m){p.setParams({missingProperty:m},!0),p.error()}Ae.reportMissingProp=o;function a(p){
828
+ return p.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}Ae.hasPropFunc=a;function c(p,m,v){return(0,t._)`${a(p)}.call(${m}, ${v})`}Ae.isOwnProperty=c;function l(p,m,v,$){const _=(0,t._)`${m}${(0,t.getProperty)(v)} !== undefined`;return $?(0,t._)`${_} && ${c(p,m,v)}`:_}Ae.propertyInData=l;function u(p,m,v,$){const _=(0,t._)`${m}${(0,t.getProperty)(v)} === undefined`;return $?(0,t.or)(_,(0,t.not)(c(p,m,v))):_}Ae.noPropertyInData=u;function d(p){
829
+ return p?Object.keys(p).filter(m=>m!=="__proto__"):[]}Ae.allSchemaProperties=d;function h(p,m){return d(m).filter(v=>!(0,e.alwaysValidSchema)(p,m[v]))}Ae.schemaProperties=h;function E({schemaCode:p,data:m,it:{gen:v,topSchemaRef:$,schemaPath:_,errorPath:b},it:I},V,G,L){const B=L?(0,t._)`${p}, ${m}, ${$}${_}`:m,N=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,b)],[r.default.parentData,I.parentData],[r.default.parentDataProperty,I.parentDataProperty],[r.default.rootData,r.default.rootData]];
830
+ I.opts.dynamicRef&&N.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const j=(0,t._)`${B}, ${v.object(...N)}`;return G!==t.nil?(0,t._)`${V}.call(${G}, ${j})`:(0,t._)`${V}(${j})`}Ae.callValidateCode=E;const y=(0,t._)`new RegExp`;function D({gen:p,it:{opts:m}},v){const $=m.unicodeRegExp?"u":"",{regExp:_}=m.code,b=_(v,$);return p.scopeValue("pattern",{key:b.toString(),ref:b,code:(0,t._)`${_.code==="new RegExp"?y:(0,n.useFunc)(p,_)}(${v}, ${$})`})}Ae.usePattern=D;function f(p){const{gen:m,
831
+ data:v,keyword:$,it:_}=p,b=m.name("valid");if(_.allErrors){const V=m.let("valid",!0);return I(()=>m.assign(V,!1)),V}return m.var(b,!0),I(()=>m.break()),b;function I(V){const G=m.const("len",(0,t._)`${v}.length`);m.forRange("i",0,G,L=>{p.subschema({keyword:$,dataProp:L,dataPropType:e.Type.Num},b),m.if((0,t.not)(b),V)})}}Ae.validateArray=f;function g(p){const{gen:m,schema:v,keyword:$,it:_}=p;if(!Array.isArray(v))throw new Error("ajv implementation error");if(v.some(G=>(0,e.alwaysValidSchema)(_,G))&&
832
+ !_.opts.unevaluated)return;const I=m.let("valid",!1),V=m.name("_valid");m.block(()=>v.forEach((G,L)=>{const B=p.subschema({keyword:$,schemaProp:L,compositeRule:!0},V);m.assign(I,(0,t._)`${I} || ${V}`),p.mergeValidEvaluated(B,V)||m.if((0,t.not)(I))})),p.result(I,()=>p.reset(),()=>p.error(!0))}return Ae.validateUnion=g,Ae}var al;function xy(){if(al)return lt;al=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.validateKeywordUsage=lt.validSchemaType=lt.funcKeywordCode=lt.macroKeywordCode=void 0;
833
+ const t=pe(),e=ct(),r=ft(),n=Bn();function i(h,E){const{gen:y,keyword:D,schema:f,parentSchema:g,it:p}=h,m=E.macro.call(p.self,f,g,p),v=l(y,D,m);p.opts.validateSchema!==!1&&p.self.validateSchema(m,!0);const $=y.name("valid");h.subschema({schema:m,schemaPath:t.nil,errSchemaPath:`${p.errSchemaPath}/${D}`,topSchemaRef:v,compositeRule:!0},$),h.pass($,()=>h.error(!0))}lt.macroKeywordCode=i;function s(h,E){var y;const{gen:D,keyword:f,schema:g,parentSchema:p,$data:m,it:v}=h;c(v,E);const $=!m&&E.compile?
834
+ E.compile.call(v.self,g,p,v):E.validate,_=l(D,f,$),b=D.let("valid");h.block$data(b,I),h.ok((y=E.valid)!==null&&y!==void 0?y:b);function I(){if(E.errors===!1)L(),E.modifying&&o(h),B(()=>h.error());else{const N=E.async?V():G();E.modifying&&o(h),B(()=>a(h,N))}}function V(){const N=D.let("ruleErrs",null);return D.try(()=>L((0,t._)`await `),j=>D.assign(b,!1).if((0,t._)`${j} instanceof ${v.ValidationError}`,()=>D.assign(N,(0,t._)`${j}.errors`),()=>D.throw(j))),N}function G(){const N=(0,t._)`${_}.errors`;
835
+ return D.assign(N,null),L(t.nil),N}function L(N=E.async?(0,t._)`await `:t.nil){const j=v.opts.passContext?e.default.this:e.default.self,M=!("compile"in E&&!m||E.schema===!1);D.assign(b,(0,t._)`${N}${(0,r.callValidateCode)(h,_,j,M)}`,E.modifying)}function B(N){var j;D.if((0,t.not)((j=E.valid)!==null&&j!==void 0?j:b),N)}}lt.funcKeywordCode=s;function o(h){const{gen:E,data:y,it:D}=h;E.if(D.parentData,()=>E.assign(y,(0,t._)`${D.parentData}[${D.parentDataProperty}]`))}function a(h,E){const{gen:y}=h;y.
836
+ if((0,t._)`Array.isArray(${E})`,()=>{y.assign(e.default.vErrors,(0,t._)`${e.default.vErrors} === null ? ${E} : ${e.default.vErrors}.concat(${E})`).assign(e.default.errors,(0,t._)`${e.default.vErrors}.length`),(0,n.extendErrors)(h)},()=>h.error())}function c({schemaEnv:h},E){if(E.async&&!h.$async)throw new Error("async keyword in sync schema")}function l(h,E,y){if(y===void 0)throw new Error(`keyword "${E}" failed to compile`);return h.scopeValue("keyword",typeof y=="function"?{ref:y}:{ref:y,code:(0,t.
837
+ stringify)(y)})}function u(h,E,y=!1){return!E.length||E.some(D=>D==="array"?Array.isArray(h):D==="object"?h&&typeof h=="object"&&!Array.isArray(h):typeof h==D||y&&typeof h>"u")}lt.validSchemaType=u;function d({schema:h,opts:E,self:y,errSchemaPath:D},f,g){if(Array.isArray(f.keyword)?!f.keyword.includes(g):f.keyword!==g)throw new Error("ajv implementation error");const p=f.dependencies;if(p?.some(m=>!Object.prototype.hasOwnProperty.call(h,m)))throw new Error(`parent schema must have dependencies o\
838
+ f ${g}: ${p.join(",")}`);if(f.validateSchema&&!f.validateSchema(h[g])){const v=`keyword "${g}" value is invalid at path "${D}": `+y.errorsText(f.validateSchema.errors);if(E.validateSchema==="log")y.logger.error(v);else throw new Error(v)}}return lt.validateKeywordUsage=d,lt}var It={},ul;function My(){if(ul)return It;ul=1,Object.defineProperty(It,"__esModule",{value:!0}),It.extendSubschemaMode=It.extendSubschemaData=It.getSubschema=void 0;const t=pe(),e=_e();function r(s,{keyword:o,schemaProp:a,schema:c,
839
+ schemaPath:l,errSchemaPath:u,topSchemaRef:d}){if(o!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(o!==void 0){const h=s.schema[o];return a===void 0?{schema:h,schemaPath:(0,t._)`${s.schemaPath}${(0,t.getProperty)(o)}`,errSchemaPath:`${s.errSchemaPath}/${o}`}:{schema:h[a],schemaPath:(0,t._)`${s.schemaPath}${(0,t.getProperty)(o)}${(0,t.getProperty)(a)}`,errSchemaPath:`${s.errSchemaPath}/${o}/${(0,e.escapeFragment)(a)}`}}if(c!==void 0){if(l===void 0||
840
+ u===void 0||d===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:l,topSchemaRef:d,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}It.getSubschema=r;function n(s,o,{dataProp:a,dataPropType:c,data:l,dataTypes:u,propertyName:d}){if(l!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:h}=o;if(a!==void 0){const{errorPath:y,dataPathArr:D,opts:f}=o,
841
+ g=h.let("data",(0,t._)`${o.data}${(0,t.getProperty)(a)}`,!0);E(g),s.errorPath=(0,t.str)`${y}${(0,e.getErrorPath)(a,c,f.jsPropertySyntax)}`,s.parentDataProperty=(0,t._)`${a}`,s.dataPathArr=[...D,s.parentDataProperty]}if(l!==void 0){const y=l instanceof t.Name?l:h.let("data",l,!0);E(y),d!==void 0&&(s.propertyName=d)}u&&(s.dataTypes=u);function E(y){s.data=y,s.dataLevel=o.dataLevel+1,s.dataTypes=[],o.definedProperties=new Set,s.parentData=o.data,s.dataNames=[...o.dataNames,y]}}It.extendSubschemaData=
842
+ n;function i(s,{jtdDiscriminator:o,jtdMetadata:a,compositeRule:c,createErrors:l,allErrors:u}){c!==void 0&&(s.compositeRule=c),l!==void 0&&(s.createErrors=l),u!==void 0&&(s.allErrors=u),s.jtdDiscriminator=o,s.jtdMetadata=a}return It.extendSubschemaMode=i,It}var Ve={},wo,cl;function ll(){return cl||(cl=1,wo=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=
843
+ n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var o=s[i];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r}),wo}var bo={
844
+ exports:{}},fl;function qy(){if(fl)return bo.exports;fl=1;var t=bo.exports=function(n,i,s){typeof i=="function"&&(s=i,i={}),s=i.cb||s;var o=typeof s=="function"?s:s.pre||function(){},a=s.post||function(){};e(i,o,a,n,"",n)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords=
845
+ {default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function e(n,i,s,o,a,c,l,u,d,h){if(o&&typeof o=="object"&&!Array.isArray(o)){i(o,a,c,l,u,d,h);for(var E in o){var y=o[E];if(Array.isArray(y)){if(E in t.arrayKeywords)for(var D=0;D<y.length;D++)e(n,i,s,y[D],a+"/"+E+"/"+D,c,a,E,o,D)}else if(E in t.propsKeywords){if(y&&
846
+ typeof y=="object")for(var f in y)e(n,i,s,y[f],a+"/"+E+"/"+r(f),c,a,E,o,f)}else(E in t.keywords||n.allKeys&&!(E in t.skipKeywords))&&e(n,i,s,y,a+"/"+E,c,a,E,o)}s(o,a,c,l,u,d,h)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return bo.exports}var dl;function Mn(){if(dl)return Ve;dl=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.getSchemaRefs=Ve.resolveUrl=Ve.normalizeId=Ve._getFullPath=Ve.getFullPath=Ve.inlineRef=void 0;const t=_e(),e=ll(),r=qy(),n=new Set(["type","format",
847
+ "pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(D,f=!0){return typeof D=="boolean"?!0:f===!0?!o(D):f?a(D)<=f:!1}Ve.inlineRef=i;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o(D){for(const f in D){if(s.has(f))return!0;const g=D[f];if(Array.isArray(g)&&g.some(o)||typeof g=="object"&&o(g))return!0}return!1}function a(D){
848
+ let f=0;for(const g in D){if(g==="$ref")return 1/0;if(f++,!n.has(g)&&(typeof D[g]=="object"&&(0,t.eachItem)(D[g],p=>f+=a(p)),f===1/0))return 1/0}return f}function c(D,f="",g){g!==!1&&(f=d(f));const p=D.parse(f);return l(D,p)}Ve.getFullPath=c;function l(D,f){return D.serialize(f).split("#")[0]+"#"}Ve._getFullPath=l;const u=/#\/?$/;function d(D){return D?D.replace(u,""):""}Ve.normalizeId=d;function h(D,f,g){return g=d(g),D.resolve(f,g)}Ve.resolveUrl=h;const E=/^[a-z_][-a-z0-9._]*$/i;function y(D,f){
849
+ if(typeof D=="boolean")return{};const{schemaId:g,uriResolver:p}=this.opts,m=d(D[g]||f),v={"":m},$=c(p,m,!1),_={},b=new Set;return r(D,{allKeys:!0},(G,L,B,N)=>{if(N===void 0)return;const j=$+L;let M=v[N];typeof G[g]=="string"&&(M=Y.call(this,G[g])),z.call(this,G.$anchor),z.call(this,G.$dynamicAnchor),v[L]=M;function Y(X){const se=this.opts.uriResolver.resolve;if(X=d(M?se(M,X):X),b.has(X))throw V(X);b.add(X);let q=this.refs[X];return typeof q=="string"&&(q=this.refs[q]),typeof q=="object"?I(G,q.schema,
850
+ X):X!==d(j)&&(X[0]==="#"?(I(G,_[X],X),_[X]=G):this.refs[X]=j),X}function z(X){if(typeof X=="string"){if(!E.test(X))throw new Error(`invalid anchor "${X}"`);Y.call(this,`#${X}`)}}}),_;function I(G,L,B){if(L!==void 0&&!e(G,L))throw V(B)}function V(G){return new Error(`reference "${G}" resolves to more than one schema`)}}return Ve.getSchemaRefs=y,Ve}var hl;function Qr(){if(hl)return Rt;hl=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.getData=Rt.KeywordCxt=Rt.validateFunctionCode=void 0;const t=ky(),
851
+ e=xn(),r=nl(),n=xn(),i=By(),s=xy(),o=My(),a=pe(),c=ct(),l=Mn(),u=_e(),d=Bn();function h(T){if($(T)&&(b(T),v(T))){f(T);return}E(T,()=>(0,t.topBoolOrEmptySchema)(T))}Rt.validateFunctionCode=h;function E({gen:T,validateName:x,schema:Q,schemaEnv:ie,opts:O},P){O.code.es5?T.func(x,(0,a._)`${c.default.data}, ${c.default.valCxt}`,ie.$async,()=>{T.code((0,a._)`"use strict"; ${p(Q,O)}`),D(T,O),T.code(P)}):T.func(x,(0,a._)`${c.default.data}, ${y(O)}`,ie.$async,()=>T.code(p(Q,O)).code(P))}function y(T){return(0,a.
852
+ _)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${T.dynamicRef?(0,a._)`, ${c.default.dynamicAnchors}={}`:a.nil}}={}`}function D(T,x){T.if(c.default.valCxt,()=>{T.var(c.default.instancePath,(0,a._)`${c.default.valCxt}.${c.default.instancePath}`),T.var(c.default.parentData,(0,a._)`${c.default.valCxt}.${c.default.parentData}`),T.var(c.default.parentDataProperty,(0,a._)`${c.default.valCxt}.${c.default.parentDataProperty}`),
853
+ T.var(c.default.rootData,(0,a._)`${c.default.valCxt}.${c.default.rootData}`),x.dynamicRef&&T.var(c.default.dynamicAnchors,(0,a._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{T.var(c.default.instancePath,(0,a._)`""`),T.var(c.default.parentData,(0,a._)`undefined`),T.var(c.default.parentDataProperty,(0,a._)`undefined`),T.var(c.default.rootData,c.default.data),x.dynamicRef&&T.var(c.default.dynamicAnchors,(0,a._)`{}`)})}function f(T){const{schema:x,opts:Q,gen:ie}=T;E(T,()=>{Q.$comment&&x.
854
+ $comment&&N(T),G(T),ie.let(c.default.vErrors,null),ie.let(c.default.errors,0),Q.unevaluated&&g(T),I(T),j(T)})}function g(T){const{gen:x,validateName:Q}=T;T.evaluated=x.const("evaluated",(0,a._)`${Q}.evaluated`),x.if((0,a._)`${T.evaluated}.dynamicProps`,()=>x.assign((0,a._)`${T.evaluated}.props`,(0,a._)`undefined`)),x.if((0,a._)`${T.evaluated}.dynamicItems`,()=>x.assign((0,a._)`${T.evaluated}.items`,(0,a._)`undefined`))}function p(T,x){const Q=typeof T=="object"&&T[x.schemaId];return Q&&(x.code.source||
855
+ x.code.process)?(0,a._)`/*# sourceURL=${Q} */`:a.nil}function m(T,x){if($(T)&&(b(T),v(T))){_(T,x);return}(0,t.boolOrEmptySchema)(T,x)}function v({schema:T,self:x}){if(typeof T=="boolean")return!T;for(const Q in T)if(x.RULES.all[Q])return!0;return!1}function $(T){return typeof T.schema!="boolean"}function _(T,x){const{schema:Q,gen:ie,opts:O}=T;O.$comment&&Q.$comment&&N(T),L(T),B(T);const P=ie.const("_errs",c.default.errors);I(T,P),ie.var(x,(0,a._)`${P} === ${c.default.errors}`)}function b(T){(0,u.
856
+ checkUnknownRules)(T),V(T)}function I(T,x){if(T.opts.jtd)return Y(T,[],!1,x);const Q=(0,e.getSchemaTypes)(T.schema),ie=(0,e.coerceAndCheckDataType)(T,Q);Y(T,Q,!ie,x)}function V(T){const{schema:x,errSchemaPath:Q,opts:ie,self:O}=T;x.$ref&&ie.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(x,O.RULES)&&O.logger.warn(`$ref: keywords ignored in schema at path "${Q}"`)}function G(T){const{schema:x,opts:Q}=T;x.default!==void 0&&Q.useDefaults&&Q.strictSchema&&(0,u.checkStrictMode)(T,"default is ignored\
857
+ in the schema root")}function L(T){const x=T.schema[T.opts.schemaId];x&&(T.baseId=(0,l.resolveUrl)(T.opts.uriResolver,T.baseId,x))}function B(T){if(T.schema.$async&&!T.schemaEnv.$async)throw new Error("async schema in sync schema")}function N({gen:T,schemaEnv:x,schema:Q,errSchemaPath:ie,opts:O}){const P=Q.$comment;if(O.$comment===!0)T.code((0,a._)`${c.default.self}.logger.log(${P})`);else if(typeof O.$comment=="function"){const ee=(0,a.str)`${ie}/$comment`,W=T.scopeValue("root",{ref:x.root});T.
858
+ code((0,a._)`${c.default.self}.opts.$comment(${P}, ${ee}, ${W}.schema)`)}}function j(T){const{gen:x,schemaEnv:Q,validateName:ie,ValidationError:O,opts:P}=T;Q.$async?x.if((0,a._)`${c.default.errors} === 0`,()=>x.return(c.default.data),()=>x.throw((0,a._)`new ${O}(${c.default.vErrors})`)):(x.assign((0,a._)`${ie}.errors`,c.default.vErrors),P.unevaluated&&M(T),x.return((0,a._)`${c.default.errors} === 0`))}function M({gen:T,evaluated:x,props:Q,items:ie}){Q instanceof a.Name&&T.assign((0,a._)`${x}.props`,
859
+ Q),ie instanceof a.Name&&T.assign((0,a._)`${x}.items`,ie)}function Y(T,x,Q,ie){const{gen:O,schema:P,data:ee,allErrors:W,opts:F,self:re}=T,{RULES:H}=re;if(P.$ref&&(F.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(P,H))){O.block(()=>J(T,"$ref",H.all.$ref.definition));return}F.jtd||X(T,x),O.block(()=>{for(const fe of H.rules)ne(fe);ne(H.post)});function ne(fe){(0,r.shouldUseGroup)(P,fe)&&(fe.type?(O.if((0,n.checkDataType)(fe.type,ee,F.strictNumbers)),z(T,fe),x.length===1&&x[0]===fe.type&&Q&&(O.
860
+ else(),(0,n.reportTypeError)(T)),O.endIf()):z(T,fe),W||O.if((0,a._)`${c.default.errors} === ${ie||0}`))}}function z(T,x){const{gen:Q,schema:ie,opts:{useDefaults:O}}=T;O&&(0,i.assignDefaults)(T,x.type),Q.block(()=>{for(const P of x.rules)(0,r.shouldUseRule)(ie,P)&&J(T,P.keyword,P.definition,x.type)})}function X(T,x){T.schemaEnv.meta||!T.opts.strictTypes||(se(T,x),T.opts.allowUnionTypes||q(T,x),C(T,T.dataTypes))}function se(T,x){if(x.length){if(!T.dataTypes.length){T.dataTypes=x;return}x.forEach(Q=>{
861
+ k(T.dataTypes,Q)||A(T,`type "${Q}" not allowed by context "${T.dataTypes.join(",")}"`)}),w(T,x)}}function q(T,x){x.length>1&&!(x.length===2&&x.includes("null"))&&A(T,"use allowUnionTypes to allow union type keyword")}function C(T,x){const Q=T.self.RULES.all;for(const ie in Q){const O=Q[ie];if(typeof O=="object"&&(0,r.shouldUseRule)(T.schema,O)){const{type:P}=O.definition;P.length&&!P.some(ee=>U(x,ee))&&A(T,`missing type "${P.join(",")}" for keyword "${ie}"`)}}}function U(T,x){return T.includes(x)||
862
+ x==="number"&&T.includes("integer")}function k(T,x){return T.includes(x)||x==="integer"&&T.includes("number")}function w(T,x){const Q=[];for(const ie of T.dataTypes)k(x,ie)?Q.push(ie):x.includes("integer")&&ie==="number"&&Q.push("integer");T.dataTypes=Q}function A(T,x){const Q=T.schemaEnv.baseId+T.errSchemaPath;x+=` at "${Q}" (strictTypes)`,(0,u.checkStrictMode)(T,x,T.opts.strictTypes)}class R{constructor(x,Q,ie){if((0,s.validateKeywordUsage)(x,Q,ie),this.gen=x.gen,this.allErrors=x.allErrors,this.
863
+ keyword=ie,this.data=x.data,this.schema=x.schema[ie],this.$data=Q.$data&&x.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(x,this.schema,ie,this.$data),this.schemaType=Q.schemaType,this.parentSchema=x.schema,this.params={},this.it=x,this.def=Q,this.$data)this.schemaCode=x.gen.const("vSchema",ae(this.$data,x));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,Q.schemaType,Q.allowUndefined))throw new Error(`${ie} value must be ${JSON.stringify(
864
+ Q.schemaType)}`);("code"in Q?Q.trackErrors:Q.errors!==!1)&&(this.errsCount=x.gen.const("_errs",c.default.errors))}result(x,Q,ie){this.failResult((0,a.not)(x),Q,ie)}failResult(x,Q,ie){this.gen.if(x),ie?ie():this.error(),Q?(this.gen.else(),Q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(x,Q){this.failResult((0,a.not)(x),void 0,Q)}fail(x){if(x===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(x),this.error(),this.allErrors?this.gen.
865
+ endIf():this.gen.else()}fail$data(x){if(!this.$data)return this.fail(x);const{schemaCode:Q}=this;this.fail((0,a._)`${Q} !== undefined && (${(0,a.or)(this.invalid$data(),x)})`)}error(x,Q,ie){if(Q){this.setParams(Q),this._error(x,ie),this.setParams({});return}this._error(x,ie)}_error(x,Q){(x?d.reportExtraError:d.reportError)(this,this.def.error,Q)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to k\
866
+ eyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(x){this.allErrors||this.gen.if(x)}setParams(x,Q){Q?Object.assign(this.params,x):this.params=x}block$data(x,Q,ie=a.nil){this.gen.block(()=>{this.check$data(x,ie),Q()})}check$data(x=a.nil,Q=a.nil){if(!this.$data)return;const{gen:ie,schemaCode:O,schemaType:P,def:ee}=this;ie.if((0,a.or)((0,a._)`${O} === undefined`,Q)),x!==a.nil&&ie.assign(x,!0),(P.length||ee.validateSchema)&&(ie.elseIf(this.invalid$data()),this.$dataError(),x!==a.
867
+ nil&&ie.assign(x,!1)),ie.else()}invalid$data(){const{gen:x,schemaCode:Q,schemaType:ie,def:O,it:P}=this;return(0,a.or)(ee(),W());function ee(){if(ie.length){if(!(Q instanceof a.Name))throw new Error("ajv implementation error");const F=Array.isArray(ie)?ie:[ie];return(0,a._)`${(0,n.checkDataTypes)(F,Q,P.opts.strictNumbers,n.DataType.Wrong)}`}return a.nil}function W(){if(O.validateSchema){const F=x.scopeValue("validate$data",{ref:O.validateSchema});return(0,a._)`!${F}(${Q})`}return a.nil}}subschema(x,Q){
868
+ const ie=(0,o.getSubschema)(this.it,x);(0,o.extendSubschemaData)(ie,this.it,x),(0,o.extendSubschemaMode)(ie,x);const O={...this.it,...ie,items:void 0,props:void 0};return m(O,Q),O}mergeEvaluated(x,Q){const{it:ie,gen:O}=this;ie.opts.unevaluated&&(ie.props!==!0&&x.props!==void 0&&(ie.props=u.mergeEvaluated.props(O,x.props,ie.props,Q)),ie.items!==!0&&x.items!==void 0&&(ie.items=u.mergeEvaluated.items(O,x.items,ie.items,Q)))}mergeValidEvaluated(x,Q){const{it:ie,gen:O}=this;if(ie.opts.unevaluated&&(ie.
869
+ props!==!0||ie.items!==!0))return O.if(Q,()=>this.mergeEvaluated(x,a.Name)),!0}}Rt.KeywordCxt=R;function J(T,x,Q,ie){const O=new R(T,Q,x);"code"in Q?Q.code(O,ie):O.$data&&Q.validate?(0,s.funcKeywordCode)(O,Q):"macro"in Q?(0,s.macroKeywordCode)(O,Q):(Q.compile||Q.validate)&&(0,s.funcKeywordCode)(O,Q)}const Z=/^\/(?:[^~]|~0|~1)*$/,oe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ae(T,{dataLevel:x,dataNames:Q,dataPathArr:ie}){let O,P;if(T==="")return c.default.rootData;if(T[0]==="/"){if(!Z.test(T))throw new Error(
870
+ `Invalid JSON-pointer: ${T}`);O=T,P=c.default.rootData}else{const re=oe.exec(T);if(!re)throw new Error(`Invalid JSON-pointer: ${T}`);const H=+re[1];if(O=re[2],O==="#"){if(H>=x)throw new Error(F("property/index",H));return ie[x-H]}if(H>x)throw new Error(F("data",H));if(P=Q[x-H],!O)return P}let ee=P;const W=O.split("/");for(const re of W)re&&(P=(0,a._)`${P}${(0,a.getProperty)((0,u.unescapeJsonPointer)(re))}`,ee=(0,a._)`${ee} && ${P}`);return ee;function F(re,H){return`Cannot access ${re} ${H} leve\
871
+ ls up, current level is ${x}`}}return Rt.getData=ae,Rt}var qn={},pl;function Un(){if(pl)return qn;pl=1,Object.defineProperty(qn,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return qn.default=t,qn}var Hn={},ml;function Zr(){if(ml)return Hn;ml=1,Object.defineProperty(Hn,"__esModule",{value:!0});const t=Mn();class e extends Error{constructor(n,i,s,o){super(o||`can't resolve reference ${s} from id ${i}`),this.missingRef=
872
+ (0,t.resolveUrl)(n,i,s),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(n,this.missingRef))}}return Hn.default=e,Hn}var Xe={},gl;function Vn(){if(gl)return Xe;gl=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.resolveSchema=Xe.getCompilingSchema=Xe.resolveRef=Xe.compileSchema=Xe.SchemaEnv=void 0;const t=pe(),e=Un(),r=ct(),n=Mn(),i=_e(),s=Qr();class o{constructor(g){var p;this.refs={},this.dynamicAnchors={};let m;typeof g.schema=="object"&&(m=g.schema),this.schema=g.schema,this.schemaId=
873
+ g.schemaId,this.root=g.root||this,this.baseId=(p=g.baseId)!==null&&p!==void 0?p:(0,n.normalizeId)(m?.[g.schemaId||"$id"]),this.schemaPath=g.schemaPath,this.localRefs=g.localRefs,this.meta=g.meta,this.$async=m?.$async,this.refs={}}}Xe.SchemaEnv=o;function a(f){const g=u.call(this,f);if(g)return g;const p=(0,n.getFullPath)(this.opts.uriResolver,f.root.baseId),{es5:m,lines:v}=this.opts.code,{ownProperties:$}=this.opts,_=new t.CodeGen(this.scope,{es5:m,lines:v,ownProperties:$});let b;f.$async&&(b=_.
874
+ scopeValue("Error",{ref:e.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));const I=_.scopeName("validate");f.validateName=I;const V={gen:_,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:_.scopeValue("schema",this.opts.code.source===!0?{ref:f.schema,code:(0,t.stringify)(f.schema)}:
875
+ {ref:f.schema}),validateName:I,ValidationError:b,schema:f.schema,schemaEnv:f,rootId:p,baseId:f.baseId||p,schemaPath:t.nil,errSchemaPath:f.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};let G;try{this._compilations.add(f),(0,s.validateFunctionCode)(V),_.optimize(this.opts.code.optimize);const L=_.toString();G=`${_.scopeRefs(r.default.scope)}return ${L}`,this.opts.code.process&&(G=this.opts.code.process(G,f));const N=new Function(`${r.default.self}`,`${r.default.
876
+ scope}`,G)(this,this.scope.get());if(this.scope.value(I,{ref:N}),N.errors=null,N.schema=f.schema,N.schemaEnv=f,f.$async&&(N.$async=!0),this.opts.code.source===!0&&(N.source={validateName:I,validateCode:L,scopeValues:_._values}),this.opts.unevaluated){const{props:j,items:M}=V;N.evaluated={props:j instanceof t.Name?void 0:j,items:M instanceof t.Name?void 0:M,dynamicProps:j instanceof t.Name,dynamicItems:M instanceof t.Name},N.source&&(N.source.evaluated=(0,t.stringify)(N.evaluated))}return f.validate=
877
+ N,f}catch(L){throw delete f.validate,delete f.validateName,G&&this.logger.error("Error compiling schema, function code:",G),L}finally{this._compilations.delete(f)}}Xe.compileSchema=a;function c(f,g,p){var m;p=(0,n.resolveUrl)(this.opts.uriResolver,g,p);const v=f.refs[p];if(v)return v;let $=h.call(this,f,p);if($===void 0){const _=(m=f.localRefs)===null||m===void 0?void 0:m[p],{schemaId:b}=this.opts;_&&($=new o({schema:_,schemaId:b,root:f,baseId:g}))}if($!==void 0)return f.refs[p]=l.call(this,$)}Xe.
878
+ resolveRef=c;function l(f){return(0,n.inlineRef)(f.schema,this.opts.inlineRefs)?f.schema:f.validate?f:a.call(this,f)}function u(f){for(const g of this._compilations)if(d(g,f))return g}Xe.getCompilingSchema=u;function d(f,g){return f.schema===g.schema&&f.root===g.root&&f.baseId===g.baseId}function h(f,g){let p;for(;typeof(p=this.refs[g])=="string";)g=p;return p||this.schemas[g]||E.call(this,f,g)}function E(f,g){const p=this.opts.uriResolver.parse(g),m=(0,n._getFullPath)(this.opts.uriResolver,p);let v=(0,n.
879
+ getFullPath)(this.opts.uriResolver,f.baseId,void 0);if(Object.keys(f.schema).length>0&&m===v)return D.call(this,p,f);const $=(0,n.normalizeId)(m),_=this.refs[$]||this.schemas[$];if(typeof _=="string"){const b=E.call(this,f,_);return typeof b?.schema!="object"?void 0:D.call(this,p,b)}if(typeof _?.schema=="object"){if(_.validate||a.call(this,_),$===(0,n.normalizeId)(g)){const{schema:b}=_,{schemaId:I}=this.opts,V=b[I];return V&&(v=(0,n.resolveUrl)(this.opts.uriResolver,v,V)),new o({schema:b,schemaId:I,
880
+ root:f,baseId:v})}return D.call(this,p,_)}}Xe.resolveSchema=E;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function D(f,{baseId:g,schema:p,root:m}){var v;if(((v=f.fragment)===null||v===void 0?void 0:v[0])!=="/")return;for(const b of f.fragment.slice(1).split("/")){if(typeof p=="boolean")return;const I=p[(0,i.unescapeFragment)(b)];if(I===void 0)return;p=I;const V=typeof p=="object"&&p[this.opts.schemaId];!y.has(b)&&V&&(g=(0,n.resolveUrl)(this.opts.uriResolver,
881
+ g,V))}let $;if(typeof p!="boolean"&&p.$ref&&!(0,i.schemaHasRulesButRef)(p,this.RULES)){const b=(0,n.resolveUrl)(this.opts.uriResolver,g,p.$ref);$=E.call(this,m,b)}const{schemaId:_}=this.opts;if($=$||new o({schema:p,schemaId:_,root:m,baseId:g}),$.schema!==$.root.schema)return $}return Xe}const yl="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",El="Meta-schema for $data reference (JSON AnySchema extension proposal)",Dl="object",vl=["$data"],$l={$data:{type:"string",
882
+ anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},_l=!1,Uy={$id:yl,description:El,type:Dl,required:vl,properties:$l,additionalProperties:_l},Hy={__proto__:null,$id:yl,additionalProperties:_l,default:Uy,description:El,properties:$l,required:vl,type:Dl},Vy=mt(Hy);var zn={},en={exports:{}},Ao,wl;function zy(){return wl||(wl=1,Ao={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),Ao}var Co,bl;function Gy(){if(bl)return Co;bl=
883
+ 1;const{HEX:t}=zy();function e(y){if(o(y,".")<3)return{host:y,isIPV4:!1};const D=y.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[f]=D;return f?{host:s(f,"."),isIPV4:!0}:{host:y,isIPV4:!1}}function r(y,D=!1){let f="",g=!0;for(const p of y){if(t[p]===void 0)return;p!=="0"&&g===!0&&(g=!1),g||(f+=p)}return D&&f.length===0&&(f="0"),f}function n(y){let D=0;const f={error:!1,address:"",zone:""},g=[],p=[];let m=!1,v=!1,
884
+ $=!1;function _(){if(p.length){if(m===!1){const b=r(p);if(b!==void 0)g.push(b);else return f.error=!0,!1}p.length=0}return!0}for(let b=0;b<y.length;b++){const I=y[b];if(!(I==="["||I==="]"))if(I===":"){if(v===!0&&($=!0),!_())break;if(D++,g.push(":"),D>7){f.error=!0;break}b-1>=0&&y[b-1]===":"&&(v=!0);continue}else if(I==="%"){if(!_())break;m=!0}else{p.push(I);continue}}return p.length&&(m?f.zone=p.join(""):$?g.push(p.join("")):g.push(r(p))),f.address=g.join(""),f}function i(y,D={}){if(o(y,":")<2)return{
885
+ host:y,isIPV6:!1};const f=n(y);if(f.error)return{host:y,isIPV6:!1};{let g=f.address,p=f.address;return f.zone&&(g+="%"+f.zone,p+="%25"+f.zone),{host:g,escapedHost:p,isIPV6:!0}}}function s(y,D){let f="",g=!0;const p=y.length;for(let m=0;m<p;m++){const v=y[m];v==="0"&&g?(m+1<=p&&y[m+1]===D||m+1===p)&&(f+=v,g=!1):(v===D?g=!0:g=!1,f+=v)}return f}function o(y,D){let f=0;for(let g=0;g<y.length;g++)y[g]===D&&f++;return f}const a=/^\.\.?\//u,c=/^\/\.(?:\/|$)/u,l=/^\/\.\.(?:\/|$)/u,u=/^\/?(?:.|\n)*?(?=\/|$)/u;
886
+ function d(y){const D=[];for(;y.length;)if(y.match(a))y=y.replace(a,"");else if(y.match(c))y=y.replace(c,"/");else if(y.match(l))y=y.replace(l,"/"),D.pop();else if(y==="."||y==="..")y="";else{const f=y.match(u);if(f){const g=f[0];y=y.slice(g.length),D.push(g)}else throw new Error("Unexpected dot segment condition")}return D.join("")}function h(y,D){const f=D!==!0?escape:unescape;return y.scheme!==void 0&&(y.scheme=f(y.scheme)),y.userinfo!==void 0&&(y.userinfo=f(y.userinfo)),y.host!==void 0&&(y.host=
887
+ f(y.host)),y.path!==void 0&&(y.path=f(y.path)),y.query!==void 0&&(y.query=f(y.query)),y.fragment!==void 0&&(y.fragment=f(y.fragment)),y}function E(y,D){const f=[];if(y.userinfo!==void 0&&(f.push(y.userinfo),f.push("@")),y.host!==void 0){let g=unescape(y.host);const p=e(g);if(p.isIPV4)g=p.host;else{const m=i(p.host,{});m.isIPV6===!0?g=`[${m.escapedHost}]`:g=y.host}f.push(g)}return(typeof y.port=="number"||typeof y.port=="string")&&(f.push(":"),f.push(String(y.port))),f.length?f.join(""):void 0}return Co=
888
+ {recomposeAuthority:E,normalizeComponentEncoding:h,removeDotSegments:d,normalizeIPv4:e,normalizeIPv6:i,stringArrayToHexStripped:r},Co}var So,Al;function Wy(){if(Al)return So;Al=1;const t=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(p){return typeof p.secure=="boolean"?p.secure:String(p.scheme).toLowerCase()==="wss"}function n(p){return p.host||(p.error=p.error||"HTTP URIs must have a host."),
889
+ p}function i(p){const m=String(p.scheme).toLowerCase()==="https";return(p.port===(m?443:80)||p.port==="")&&(p.port=void 0),p.path||(p.path="/"),p}function s(p){return p.secure=r(p),p.resourceName=(p.path||"/")+(p.query?"?"+p.query:""),p.path=void 0,p.query=void 0,p}function o(p){if((p.port===(r(p)?443:80)||p.port==="")&&(p.port=void 0),typeof p.secure=="boolean"&&(p.scheme=p.secure?"wss":"ws",p.secure=void 0),p.resourceName){const[m,v]=p.resourceName.split("?");p.path=m&&m!=="/"?m:void 0,p.query=
890
+ v,p.resourceName=void 0}return p.fragment=void 0,p}function a(p,m){if(!p.path)return p.error="URN can not be parsed",p;const v=p.path.match(e);if(v){const $=m.scheme||p.scheme||"urn";p.nid=v[1].toLowerCase(),p.nss=v[2];const _=`${$}:${m.nid||p.nid}`,b=g[_];p.path=void 0,b&&(p=b.parse(p,m))}else p.error=p.error||"URN can not be parsed.";return p}function c(p,m){const v=m.scheme||p.scheme||"urn",$=p.nid.toLowerCase(),_=`${v}:${m.nid||$}`,b=g[_];b&&(p=b.serialize(p,m));const I=p,V=p.nss;return I.path=
891
+ `${$||m.nid}:${V}`,m.skipEscape=!0,I}function l(p,m){const v=p;return v.uuid=v.nss,v.nss=void 0,!m.tolerant&&(!v.uuid||!t.test(v.uuid))&&(v.error=v.error||"UUID is not valid."),v}function u(p){const m=p;return m.nss=(p.uuid||"").toLowerCase(),m}const d={scheme:"http",domainHost:!0,parse:n,serialize:i},h={scheme:"https",domainHost:d.domainHost,parse:n,serialize:i},E={scheme:"ws",domainHost:!0,parse:s,serialize:o},y={scheme:"wss",domainHost:E.domainHost,parse:E.parse,serialize:E.serialize},g={http:d,
892
+ https:h,ws:E,wss:y,urn:{scheme:"urn",parse:a,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:l,serialize:u,skipNormalize:!0}};return So=g,So}var Cl;function Ky(){if(Cl)return en.exports;Cl=1;const{normalizeIPv6:t,normalizeIPv4:e,removeDotSegments:r,recomposeAuthority:n,normalizeComponentEncoding:i}=Gy(),s=Wy();function o(f,g){return typeof f=="string"?f=u(y(f,g),g):typeof f=="object"&&(f=y(u(f,g),g)),f}function a(f,g,p){const m=Object.assign({scheme:"null"},p),v=c(y(f,m),y(g,m),
893
+ m,!0);return u(v,{...m,skipEscape:!0})}function c(f,g,p,m){const v={};return m||(f=y(u(f,p),p),g=y(u(g,p),p)),p=p||{},!p.tolerant&&g.scheme?(v.scheme=g.scheme,v.userinfo=g.userinfo,v.host=g.host,v.port=g.port,v.path=r(g.path||""),v.query=g.query):(g.userinfo!==void 0||g.host!==void 0||g.port!==void 0?(v.userinfo=g.userinfo,v.host=g.host,v.port=g.port,v.path=r(g.path||""),v.query=g.query):(g.path?(g.path.charAt(0)==="/"?v.path=r(g.path):((f.userinfo!==void 0||f.host!==void 0||f.port!==void 0)&&!f.
894
+ path?v.path="/"+g.path:f.path?v.path=f.path.slice(0,f.path.lastIndexOf("/")+1)+g.path:v.path=g.path,v.path=r(v.path)),v.query=g.query):(v.path=f.path,g.query!==void 0?v.query=g.query:v.query=f.query),v.userinfo=f.userinfo,v.host=f.host,v.port=f.port),v.scheme=f.scheme),v.fragment=g.fragment,v}function l(f,g,p){return typeof f=="string"?(f=unescape(f),f=u(i(y(f,p),!0),{...p,skipEscape:!0})):typeof f=="object"&&(f=u(i(f,!0),{...p,skipEscape:!0})),typeof g=="string"?(g=unescape(g),g=u(i(y(g,p),!0),
895
+ {...p,skipEscape:!0})):typeof g=="object"&&(g=u(i(g,!0),{...p,skipEscape:!0})),f.toLowerCase()===g.toLowerCase()}function u(f,g){const p={host:f.host,scheme:f.scheme,userinfo:f.userinfo,port:f.port,path:f.path,query:f.query,nid:f.nid,nss:f.nss,uuid:f.uuid,fragment:f.fragment,reference:f.reference,resourceName:f.resourceName,secure:f.secure,error:""},m=Object.assign({},g),v=[],$=s[(m.scheme||p.scheme||"").toLowerCase()];$&&$.serialize&&$.serialize(p,m),p.path!==void 0&&(m.skipEscape?p.path=unescape(
896
+ p.path):(p.path=escape(p.path),p.scheme!==void 0&&(p.path=p.path.split("%3A").join(":")))),m.reference!=="suffix"&&p.scheme&&(v.push(p.scheme),v.push(":"));const _=n(p,m);if(_!==void 0&&(m.reference!=="suffix"&&v.push("//"),v.push(_),p.path&&p.path.charAt(0)!=="/"&&v.push("/")),p.path!==void 0){let b=p.path;!m.absolutePath&&(!$||!$.absolutePath)&&(b=r(b)),_===void 0&&(b=b.replace(/^\/\//u,"/%2F")),v.push(b)}return p.query!==void 0&&(v.push("?"),v.push(p.query)),p.fragment!==void 0&&(v.push("#"),
897
+ v.push(p.fragment)),v.join("")}const d=Array.from({length:127},(f,g)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(g)));function h(f){let g=0;for(let p=0,m=f.length;p<m;++p)if(g=f.charCodeAt(p),g>126||d[g])return!0;return!1}const E=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(f,g){const p=Object.assign({},g),m={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},
898
+ v=f.indexOf("%")!==-1;let $=!1;p.reference==="suffix"&&(f=(p.scheme?p.scheme+":":"")+"//"+f);const _=f.match(E);if(_){if(m.scheme=_[1],m.userinfo=_[3],m.host=_[4],m.port=parseInt(_[5],10),m.path=_[6]||"",m.query=_[7],m.fragment=_[8],isNaN(m.port)&&(m.port=_[5]),m.host){const I=e(m.host);if(I.isIPV4===!1){const V=t(I.host,{isIPV4:!1});m.host=V.host.toLowerCase(),$=V.isIPV6}else m.host=I.host,$=!0}m.scheme===void 0&&m.userinfo===void 0&&m.host===void 0&&m.port===void 0&&!m.path&&m.query===void 0?m.
899
+ reference="same-document":m.scheme===void 0?m.reference="relative":m.fragment===void 0?m.reference="absolute":m.reference="uri",p.reference&&p.reference!=="suffix"&&p.reference!==m.reference&&(m.error=m.error||"URI is not a "+p.reference+" reference.");const b=s[(p.scheme||m.scheme||"").toLowerCase()];if(!p.unicodeSupport&&(!b||!b.unicodeSupport)&&m.host&&(p.domainHost||b&&b.domainHost)&&$===!1&&h(m.host))try{m.host=URL.domainToASCII(m.host.toLowerCase())}catch(I){m.error=m.error||"Host's domain\
900
+ name can not be converted to ASCII: "+I}(!b||b&&!b.skipNormalize)&&(v&&m.scheme!==void 0&&(m.scheme=unescape(m.scheme)),v&&m.userinfo!==void 0&&(m.userinfo=unescape(m.userinfo)),v&&m.host!==void 0&&(m.host=unescape(m.host)),m.path!==void 0&&m.path.length&&(m.path=escape(unescape(m.path))),m.fragment!==void 0&&m.fragment.length&&(m.fragment=encodeURI(decodeURIComponent(m.fragment)))),b&&b.parse&&b.parse(m,p)}else m.error=m.error||"URI can not be parsed.";return m}const D={SCHEMES:s,normalize:o,resolve:a,
901
+ resolveComponents:c,equal:l,serialize:u,parse:y};return en.exports=D,en.exports.default=D,en.exports.fastUri=D,en.exports}var Sl;function Yy(){if(Sl)return zn;Sl=1,Object.defineProperty(zn,"__esModule",{value:!0});const t=Ky();return t.code='require("ajv/dist/runtime/uri").default',zn.default=t,zn}var Rl;function Ol(){return Rl||(Rl=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Qr();Object.defineProperty(t,"K\
902
+ eywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=pe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{
903
+ enumerable:!0,get:function(){return r.CodeGen}});const n=Un(),i=Zr(),s=tl(),o=Vn(),a=pe(),c=Mn(),l=xn(),u=_e(),d=Vy,h=Yy(),E=(q,C)=>new RegExp(q,C);E.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],D=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),f={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"\
904
+ Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"\
905
+ Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},p=200;function m(q){var C,U,k,w,A,R,J,Z,oe,ae,T,x,Q,ie,O,P,ee,W,F,re,H,ne,fe,we,Oe;const Et=q.strict,Ft=(C=q.code)===null||C===void 0?void 0:C.optimize,ka=Ft===
906
+ !0||Ft===void 0?1:Ft||0,Ba=(k=(U=q.code)===null||U===void 0?void 0:U.regExp)!==null&&k!==void 0?k:E,mp=(w=q.uriResolver)!==null&&w!==void 0?w:h.default;return{strictSchema:(R=(A=q.strictSchema)!==null&&A!==void 0?A:Et)!==null&&R!==void 0?R:!0,strictNumbers:(Z=(J=q.strictNumbers)!==null&&J!==void 0?J:Et)!==null&&Z!==void 0?Z:!0,strictTypes:(ae=(oe=q.strictTypes)!==null&&oe!==void 0?oe:Et)!==null&&ae!==void 0?ae:"log",strictTuples:(x=(T=q.strictTuples)!==null&&T!==void 0?T:Et)!==null&&x!==void 0?x:
907
+ "log",strictRequired:(ie=(Q=q.strictRequired)!==null&&Q!==void 0?Q:Et)!==null&&ie!==void 0?ie:!1,code:q.code?{...q.code,optimize:ka,regExp:Ba}:{optimize:ka,regExp:Ba},loopRequired:(O=q.loopRequired)!==null&&O!==void 0?O:p,loopEnum:(P=q.loopEnum)!==null&&P!==void 0?P:p,meta:(ee=q.meta)!==null&&ee!==void 0?ee:!0,messages:(W=q.messages)!==null&&W!==void 0?W:!0,inlineRefs:(F=q.inlineRefs)!==null&&F!==void 0?F:!0,schemaId:(re=q.schemaId)!==null&&re!==void 0?re:"$id",addUsedSchema:(H=q.addUsedSchema)!==
908
+ null&&H!==void 0?H:!0,validateSchema:(ne=q.validateSchema)!==null&&ne!==void 0?ne:!0,validateFormats:(fe=q.validateFormats)!==null&&fe!==void 0?fe:!0,unicodeRegExp:(we=q.unicodeRegExp)!==null&&we!==void 0?we:!0,int32range:(Oe=q.int32range)!==null&&Oe!==void 0?Oe:!0,uriResolver:mp}}class v{constructor(C={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,C=this.opts={...C,...m(C)};const{es5:U,lines:k}=this.opts.code;this.scope=new a.ValueScope(
909
+ {scope:{},prefixes:D,es5:U,lines:k}),this.logger=B(C.logger);const w=C.validateFormats;C.validateFormats=!1,this.RULES=(0,s.getRules)(),$.call(this,f,C,"NOT SUPPORTED"),$.call(this,g,C,"DEPRECATED","warn"),this._metaOpts=G.call(this),C.formats&&I.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),C.keywords&&V.call(this,C.keywords),typeof C.meta=="object"&&this.addMetaSchema(C.meta),b.call(this),C.validateFormats=w}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){
910
+ const{$data:C,meta:U,schemaId:k}=this.opts;let w=d;k==="id"&&(w={...d},w.id=w.$id,delete w.$id),U&&C&&this.addMetaSchema(w,w[k],!1)}defaultMeta(){const{meta:C,schemaId:U}=this.opts;return this.opts.defaultMeta=typeof C=="object"?C[U]||C:void 0}validate(C,U){let k;if(typeof C=="string"){if(k=this.getSchema(C),!k)throw new Error(`no schema with key or ref "${C}"`)}else k=this.compile(C);const w=k(U);return"$async"in k||(this.errors=k.errors),w}compile(C,U){const k=this._addSchema(C,U);return k.validate||
911
+ this._compileSchemaEnv(k)}compileAsync(C,U){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:k}=this.opts;return w.call(this,C,U);async function w(ae,T){await A.call(this,ae.$schema);const x=this._addSchema(ae,T);return x.validate||R.call(this,x)}async function A(ae){ae&&!this.getSchema(ae)&&await w.call(this,{$ref:ae},!0)}async function R(ae){try{return this._compileSchemaEnv(ae)}catch(T){if(!(T instanceof i.default))throw T;
912
+ return J.call(this,T),await Z.call(this,T.missingSchema),R.call(this,ae)}}function J({missingSchema:ae,missingRef:T}){if(this.refs[ae])throw new Error(`AnySchema ${ae} is loaded but ${T} cannot be resolved`)}async function Z(ae){const T=await oe.call(this,ae);this.refs[ae]||await A.call(this,T.$schema),this.refs[ae]||this.addSchema(T,ae,U)}async function oe(ae){const T=this._loading[ae];if(T)return T;try{return await(this._loading[ae]=k(ae))}finally{delete this._loading[ae]}}}addSchema(C,U,k,w=this.
913
+ opts.validateSchema){if(Array.isArray(C)){for(const R of C)this.addSchema(R,void 0,k,w);return this}let A;if(typeof C=="object"){const{schemaId:R}=this.opts;if(A=C[R],A!==void 0&&typeof A!="string")throw new Error(`schema ${R} must be string`)}return U=(0,c.normalizeId)(U||A),this._checkUnique(U),this.schemas[U]=this._addSchema(C,k,U,w,!0),this}addMetaSchema(C,U,k=this.opts.validateSchema){return this.addSchema(C,U,!0,k),this}validateSchema(C,U){if(typeof C=="boolean")return!0;let k;if(k=C.$schema,
914
+ k!==void 0&&typeof k!="string")throw new Error("$schema must be a string");if(k=k||this.opts.defaultMeta||this.defaultMeta(),!k)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const w=this.validate(k,C);if(!w&&U){const A="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(A);else throw new Error(A)}return w}getSchema(C){let U;for(;typeof(U=_.call(this,C))=="string";)C=U;if(U===void 0){const{schemaId:k}=this.opts,w=new o.SchemaEnv(
915
+ {schema:{},schemaId:k});if(U=o.resolveSchema.call(this,w,C),!U)return;this.refs[C]=U}return U.validate||this._compileSchemaEnv(U)}removeSchema(C){if(C instanceof RegExp)return this._removeAllSchemas(this.schemas,C),this._removeAllSchemas(this.refs,C),this;switch(typeof C){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const U=_.call(this,C);return typeof U=="object"&&this._cache.delete(U.schema),delete this.schemas[C],
916
+ delete this.refs[C],this}case"object":{const U=C;this._cache.delete(U);let k=C[this.opts.schemaId];return k&&(k=(0,c.normalizeId)(k),delete this.schemas[k],delete this.refs[k]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(C){for(const U of C)this.addKeyword(U);return this}addKeyword(C,U){let k;if(typeof C=="string")k=C,typeof U=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),U.keyword=k);else if(typeof C=="object"&&U===
917
+ void 0){if(U=C,k=U.keyword,Array.isArray(k)&&!k.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(j.call(this,k,U),!U)return(0,u.eachItem)(k,A=>M.call(this,A)),this;z.call(this,U);const w={...U,type:(0,l.getJSONTypes)(U.type),schemaType:(0,l.getJSONTypes)(U.schemaType)};return(0,u.eachItem)(k,w.type.length===0?A=>M.call(this,A,w):A=>w.type.forEach(R=>M.call(this,A,w,R))),this}getKeyword(C){const U=this.RULES.
918
+ all[C];return typeof U=="object"?U.definition:!!U}removeKeyword(C){const{RULES:U}=this;delete U.keywords[C],delete U.all[C];for(const k of U.rules){const w=k.rules.findIndex(A=>A.keyword===C);w>=0&&k.rules.splice(w,1)}return this}addFormat(C,U){return typeof U=="string"&&(U=new RegExp(U)),this.formats[C]=U,this}errorsText(C=this.errors,{separator:U=", ",dataVar:k="data"}={}){return!C||C.length===0?"No errors":C.map(w=>`${k}${w.instancePath} ${w.message}`).reduce((w,A)=>w+U+A)}$dataMetaSchema(C,U){
919
+ const k=this.RULES.all;C=JSON.parse(JSON.stringify(C));for(const w of U){const A=w.split("/").slice(1);let R=C;for(const J of A)R=R[J];for(const J in k){const Z=k[J];if(typeof Z!="object")continue;const{$data:oe}=Z.definition,ae=R[J];oe&&ae&&(R[J]=se(ae))}}return C}_removeAllSchemas(C,U){for(const k in C){const w=C[k];(!U||U.test(k))&&(typeof w=="string"?delete C[k]:w&&!w.meta&&(this._cache.delete(w.schema),delete C[k]))}}_addSchema(C,U,k,w=this.opts.validateSchema,A=this.opts.addUsedSchema){let R;
920
+ const{schemaId:J}=this.opts;if(typeof C=="object")R=C[J];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof C!="boolean")throw new Error("schema must be object or boolean")}let Z=this._cache.get(C);if(Z!==void 0)return Z;k=(0,c.normalizeId)(R||k);const oe=c.getSchemaRefs.call(this,C,k);return Z=new o.SchemaEnv({schema:C,schemaId:J,meta:U,baseId:k,localRefs:oe}),this._cache.set(Z.schema,Z),A&&!k.startsWith("#")&&(k&&this._checkUnique(k),this.refs[k]=Z),w&&this.validateSchema(
921
+ C,!0),Z}_checkUnique(C){if(this.schemas[C]||this.refs[C])throw new Error(`schema with key or id "${C}" already exists`)}_compileSchemaEnv(C){if(C.meta?this._compileMetaSchema(C):o.compileSchema.call(this,C),!C.validate)throw new Error("ajv implementation error");return C.validate}_compileMetaSchema(C){const U=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,C)}finally{this.opts=U}}}v.ValidationError=n.default,v.MissingRefError=i.default,t.default=v;function $(q,C,U,k="error"){for(const w in q){
922
+ const A=w;A in C&&this.logger[k](`${U}: option ${w}. ${q[A]}`)}}function _(q){return q=(0,c.normalizeId)(q),this.schemas[q]||this.refs[q]}function b(){const q=this.opts.schemas;if(q)if(Array.isArray(q))this.addSchema(q);else for(const C in q)this.addSchema(q[C],C)}function I(){for(const q in this.opts.formats){const C=this.opts.formats[q];C&&this.addFormat(q,C)}}function V(q){if(Array.isArray(q)){this.addVocabulary(q);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const C in q){
923
+ const U=q[C];U.keyword||(U.keyword=C),this.addKeyword(U)}}function G(){const q={...this.opts};for(const C of y)delete q[C];return q}const L={log(){},warn(){},error(){}};function B(q){if(q===!1)return L;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 N=/^[a-z_$][a-z0-9_$:-]*$/i;function j(q,C){const{RULES:U}=this;if((0,u.eachItem)(q,k=>{if(U.keywords[k])throw new Error(`Keyword ${k} is already defined`);if(!N.
924
+ test(k))throw new Error(`Keyword ${k} has invalid name`)}),!!C&&C.$data&&!("code"in C||"validate"in C))throw new Error('$data keyword must have "code" or "validate" function')}function M(q,C,U){var k;const w=C?.post;if(U&&w)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:A}=this;let R=w?A.post:A.rules.find(({type:Z})=>Z===U);if(R||(R={type:U,rules:[]},A.rules.push(R)),A.keywords[q]=!0,!C)return;const J={keyword:q,definition:{...C,type:(0,l.getJSONTypes)(C.type),schemaType:(0,l.
925
+ getJSONTypes)(C.schemaType)}};C.before?Y.call(this,R,J,C.before):R.rules.push(J),A.all[q]=J,(k=C.implements)===null||k===void 0||k.forEach(Z=>this.addKeyword(Z))}function Y(q,C,U){const k=q.rules.findIndex(w=>w.keyword===U);k>=0?q.rules.splice(k,0,C):(q.rules.push(C),this.logger.warn(`rule ${U} is not defined`))}function z(q){let{metaSchema:C}=q;C!==void 0&&(q.$data&&this.opts.$data&&(C=se(C)),q.validateSchema=this.compile(C,!0))}const X={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv\
926
+ /master/lib/refs/data.json#"};function se(q){return{anyOf:[q,X]}}}(Eo)),Eo}var Gn={},Wn={},Kn={},Il;function Jy(){if(Il)return Kn;Il=1,Object.defineProperty(Kn,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Kn.default=t,Kn}var Vt={},Fl;function Ro(){if(Fl)return Vt;Fl=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.callRef=Vt.getValidate=void 0;const t=Zr(),e=ft(),r=pe(),n=ct(),i=Vn(),s=_e(),o={keyword:"\
927
+ $ref",schemaType:"string",code(l){const{gen:u,schema:d,it:h}=l,{baseId:E,schemaEnv:y,validateName:D,opts:f,self:g}=h,{root:p}=y;if((d==="#"||d==="#/")&&E===p.baseId)return v();const m=i.resolveRef.call(g,p,E,d);if(m===void 0)throw new t.default(h.opts.uriResolver,E,d);if(m instanceof i.SchemaEnv)return $(m);return _(m);function v(){if(y===p)return c(l,D,y,y.$async);const b=u.scopeValue("root",{ref:p});return c(l,(0,r._)`${b}.validate`,p,p.$async)}function $(b){const I=a(l,b);c(l,I,b,b.$async)}function _(b){
928
+ const I=u.scopeValue("schema",f.code.source===!0?{ref:b,code:(0,r.stringify)(b)}:{ref:b}),V=u.name("valid"),G=l.subschema({schema:b,dataTypes:[],schemaPath:r.nil,topSchemaRef:I,errSchemaPath:d},V);l.mergeEvaluated(G),l.ok(V)}}};function a(l,u){const{gen:d}=l;return u.validate?d.scopeValue("validate",{ref:u.validate}):(0,r._)`${d.scopeValue("wrapper",{ref:u})}.validate`}Vt.getValidate=a;function c(l,u,d,h){const{gen:E,it:y}=l,{allErrors:D,schemaEnv:f,opts:g}=y,p=g.passContext?n.default.this:r.nil;
929
+ h?m():v();function m(){if(!f.$async)throw new Error("async schema referenced by sync schema");const b=E.let("valid");E.try(()=>{E.code((0,r._)`await ${(0,e.callValidateCode)(l,u,p)}`),_(u),D||E.assign(b,!0)},I=>{E.if((0,r._)`!(${I} instanceof ${y.ValidationError})`,()=>E.throw(I)),$(I),D||E.assign(b,!1)}),l.ok(b)}function v(){l.result((0,e.callValidateCode)(l,u,p),()=>_(u),()=>$(u))}function $(b){const I=(0,r._)`${b}.errors`;E.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${I} : ${n.
930
+ default.vErrors}.concat(${I})`),E.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function _(b){var I;if(!y.opts.unevaluated)return;const V=(I=d?.validate)===null||I===void 0?void 0:I.evaluated;if(y.props!==!0)if(V&&!V.dynamicProps)V.props!==void 0&&(y.props=s.mergeEvaluated.props(E,V.props,y.props));else{const G=E.var("props",(0,r._)`${b}.evaluated.props`);y.props=s.mergeEvaluated.props(E,G,y.props,r.Name)}if(y.items!==!0)if(V&&!V.dynamicItems)V.items!==void 0&&(y.items=s.mergeEvaluated.
931
+ items(E,V.items,y.items));else{const G=E.var("items",(0,r._)`${b}.evaluated.items`);y.items=s.mergeEvaluated.items(E,G,y.items,r.Name)}}}return Vt.callRef=c,Vt.default=o,Vt}var Pl;function Nl(){if(Pl)return Wn;Pl=1,Object.defineProperty(Wn,"__esModule",{value:!0});const t=Jy(),e=Ro(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return Wn.default=r,Wn}var Yn={},Jn={},Tl;function Xy(){if(Tl)return Jn;Tl=1,Object.defineProperty(Jn,"__esModule",{value:!0});
932
+ const t=pe(),e=t.operators,r={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},n={message:({keyword:s,schemaCode:o})=>(0,t.str)`must be ${r[s].okStr} ${o}`,params:({keyword:s,schemaCode:o})=>(0,t._)`{comparison: ${r[s].okStr}, limit: ${o}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(s){const{keyword:o,data:a,schemaCode:c}=s;s.fail$data(
933
+ (0,t._)`${a} ${r[o].fail} ${c} || isNaN(${a})`)}};return Jn.default=i,Jn}var Xn={},Ll;function Qy(){if(Ll)return Xn;Ll=1,Object.defineProperty(Xn,"__esModule",{value:!0});const t=pe(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,t._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:s,schemaCode:o,it:a}=n,c=a.opts.multipleOfPrecision,l=i.let("res"),u=c?(0,t._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${c}`:
934
+ (0,t._)`${l} !== parseInt(${l})`;n.fail$data((0,t._)`(${o} === 0 || (${l} = ${s}/${o}, ${u}))`)}};return Xn.default=r,Xn}var Qn={},Zn={},jl;function Zy(){if(jl)return Zn;jl=1,Object.defineProperty(Zn,"__esModule",{value:!0});function t(e){const r=e.length;let n=0,i=0,s;for(;i<r;)n++,s=e.charCodeAt(i++),s>=55296&&s<=56319&&i<r&&(s=e.charCodeAt(i),(s&64512)===56320&&i++);return n}return Zn.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',Zn}var kl;function eE(){if(kl)return Qn;kl=
935
+ 1,Object.defineProperty(Qn,"__esModule",{value:!0});const t=pe(),e=_e(),r=Zy(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:o}){const a=s==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${a} than ${o} characters`},params:({schemaCode:s})=>(0,t._)`{limit: ${s}}`},code(s){const{keyword:o,data:a,schemaCode:c,it:l}=s,u=o==="maxLength"?t.operators.GT:t.operators.LT,d=l.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,e.
936
+ useFunc)(s.gen,r.default)}(${a})`;s.fail$data((0,t._)`${d} ${u} ${c}`)}};return Qn.default=i,Qn}var ei={},Bl;function tE(){if(Bl)return ei;Bl=1,Object.defineProperty(ei,"__esModule",{value:!0});const t=ft(),e=pe(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,e._)`{pattern: ${i}}`},code(i){const{data:s,$data:o,schema:a,schemaCode:c,it:l}=i,u=l.opts.unicodeRegExp?"u":"",d=o?(0,e._)`(new RegExp(${c}, ${u}))`:
937
+ (0,t.usePattern)(i,a);i.fail$data((0,e._)`!${d}.test(${s})`)}};return ei.default=n,ei}var ti={},xl;function rE(){if(xl)return ti;xl=1,Object.defineProperty(ti,"__esModule",{value:!0});const t=pe(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const s=n==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${s} than ${i} properties`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:i,
938
+ data:s,schemaCode:o}=n,a=i==="maxProperties"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`Object.keys(${s}).length ${a} ${o}`)}};return ti.default=r,ti}var ri={},Ml;function nE(){if(Ml)return ri;Ml=1,Object.defineProperty(ri,"__esModule",{value:!0});const t=ft(),e=pe(),r=_e(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,e.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,e._)`{missingProperty: ${s}}`},
939
+ code(s){const{gen:o,schema:a,schemaCode:c,data:l,$data:u,it:d}=s,{opts:h}=d;if(!u&&a.length===0)return;const E=a.length>=h.loopRequired;if(d.allErrors?y():D(),h.strictRequired){const p=s.parentSchema.properties,{definedProperties:m}=s.it;for(const v of a)if(p?.[v]===void 0&&!m.has(v)){const $=d.schemaEnv.baseId+d.errSchemaPath,_=`required property "${v}" is not defined at "${$}" (strictRequired)`;(0,r.checkStrictMode)(d,_,d.opts.strictRequired)}}function y(){if(E||u)s.block$data(e.nil,f);else for(const p of a)
940
+ (0,t.checkReportMissingProp)(s,p)}function D(){const p=o.let("missing");if(E||u){const m=o.let("valid",!0);s.block$data(m,()=>g(p,m)),s.ok(m)}else o.if((0,t.checkMissingProp)(s,a,p)),(0,t.reportMissingProp)(s,p),o.else()}function f(){o.forOf("prop",c,p=>{s.setParams({missingProperty:p}),o.if((0,t.noPropertyInData)(o,l,p,h.ownProperties),()=>s.error())})}function g(p,m){s.setParams({missingProperty:p}),o.forOf(p,c,()=>{o.assign(m,(0,t.propertyInData)(o,l,p,h.ownProperties)),o.if((0,e.not)(m),()=>{
941
+ s.error(),o.break()})},e.nil)}}};return ri.default=i,ri}var ni={},ql;function iE(){if(ql)return ni;ql=1,Object.defineProperty(ni,"__esModule",{value:!0});const t=pe(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const s=n==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${s} than ${i} items`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:i,data:s,schemaCode:o}=n,a=i==="maxItems"?t.operators.
942
+ GT:t.operators.LT;n.fail$data((0,t._)`${s}.length ${a} ${o}`)}};return ni.default=r,ni}var ii={},si={},Ul;function Oo(){if(Ul)return si;Ul=1,Object.defineProperty(si,"__esModule",{value:!0});const t=ll();return t.code='require("ajv/dist/runtime/equal").default',si.default=t,si}var Hl;function sE(){if(Hl)return ii;Hl=1,Object.defineProperty(ii,"__esModule",{value:!0});const t=xn(),e=pe(),r=_e(),n=Oo(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:o,
943
+ j:a}})=>(0,e.str)`must NOT have duplicate items (items ## ${a} and ${o} are identical)`,params:({params:{i:o,j:a}})=>(0,e._)`{i: ${o}, j: ${a}}`},code(o){const{gen:a,data:c,$data:l,schema:u,parentSchema:d,schemaCode:h,it:E}=o;if(!l&&!u)return;const y=a.let("valid"),D=d.items?(0,t.getSchemaTypes)(d.items):[];o.block$data(y,f,(0,e._)`${h} === false`),o.ok(y);function f(){const v=a.let("i",(0,e._)`${c}.length`),$=a.let("j");o.setParams({i:v,j:$}),a.assign(y,!0),a.if((0,e._)`${v} > 1`,()=>(g()?p:m)(
944
+ v,$))}function g(){return D.length>0&&!D.some(v=>v==="object"||v==="array")}function p(v,$){const _=a.name("item"),b=(0,t.checkDataTypes)(D,_,E.opts.strictNumbers,t.DataType.Wrong),I=a.const("indices",(0,e._)`{}`);a.for((0,e._)`;${v}--;`,()=>{a.let(_,(0,e._)`${c}[${v}]`),a.if(b,(0,e._)`continue`),D.length>1&&a.if((0,e._)`typeof ${_} == "string"`,(0,e._)`${_} += "_"`),a.if((0,e._)`typeof ${I}[${_}] == "number"`,()=>{a.assign($,(0,e._)`${I}[${_}]`),o.error(),a.assign(y,!1).break()}).code((0,e._)`${I}[${_}] = ${v}`)})}
945
+ function m(v,$){const _=(0,r.useFunc)(a,n.default),b=a.name("outer");a.label(b).for((0,e._)`;${v}--;`,()=>a.for((0,e._)`${$} = ${v}; ${$}--;`,()=>a.if((0,e._)`${_}(${c}[${v}], ${c}[${$}])`,()=>{o.error(),a.assign(y,!1).break(b)})))}}};return ii.default=s,ii}var oi={},Vl;function oE(){if(Vl)return oi;Vl=1,Object.defineProperty(oi,"__esModule",{value:!0});const t=pe(),e=_e(),r=Oo(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,t._)`{allowedValue: ${s}}`},
946
+ code(s){const{gen:o,data:a,$data:c,schemaCode:l,schema:u}=s;c||u&&typeof u=="object"?s.fail$data((0,t._)`!${(0,e.useFunc)(o,r.default)}(${a}, ${l})`):s.fail((0,t._)`${u} !== ${a}`)}};return oi.default=i,oi}var ai={},zl;function aE(){if(zl)return ai;zl=1,Object.defineProperty(ai,"__esModule",{value:!0});const t=pe(),e=_e(),r=Oo(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,t._)`{allowedValues: ${s}}`},code(s){
947
+ const{gen:o,data:a,$data:c,schema:l,schemaCode:u,it:d}=s;if(!c&&l.length===0)throw new Error("enum must have non-empty array");const h=l.length>=d.opts.loopEnum;let E;const y=()=>E??(E=(0,e.useFunc)(o,r.default));let D;if(h||c)D=o.let("valid"),s.block$data(D,f);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const p=o.const("vSchema",u);D=(0,t.or)(...l.map((m,v)=>g(p,v)))}s.pass(D);function f(){o.assign(D,!1),o.forOf("v",u,p=>o.if((0,t._)`${y()}(${a}, ${p})`,()=>o.assign(D,
948
+ !0).break()))}function g(p,m){const v=l[m];return typeof v=="object"&&v!==null?(0,t._)`${y()}(${a}, ${p}[${m}])`:(0,t._)`${a} === ${v}`}}};return ai.default=i,ai}var Gl;function Wl(){if(Gl)return Yn;Gl=1,Object.defineProperty(Yn,"__esModule",{value:!0});const t=Xy(),e=Qy(),r=eE(),n=tE(),i=rE(),s=nE(),o=iE(),a=sE(),c=oE(),l=aE(),u=[t.default,e.default,r.default,n.default,i.default,s.default,o.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},
949
+ c.default,l.default];return Yn.default=u,Yn}var ui={},vr={},Kl;function Yl(){if(Kl)return vr;Kl=1,Object.defineProperty(vr,"__esModule",{value:!0}),vr.validateAdditionalItems=void 0;const t=pe(),e=_e(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,t.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,t._)`{limit: ${s}}`},code(s){const{parentSchema:o,it:a}=s,{items:c}=o;if(!Array.isArray(c)){
950
+ (0,e.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(s,c)}};function i(s,o){const{gen:a,schema:c,data:l,keyword:u,it:d}=s;d.items=!0;const h=a.const("len",(0,t._)`${l}.length`);if(c===!1)s.setParams({len:o.length}),s.pass((0,t._)`${h} <= ${o.length}`);else if(typeof c=="object"&&!(0,e.alwaysValidSchema)(d,c)){const y=a.var("valid",(0,t._)`${h} <= ${o.length}`);a.if((0,t.not)(y),()=>E(y)),s.ok(y)}function E(y){a.forRange("i",o.length,h,D=>{s.subschema(
951
+ {keyword:u,dataProp:D,dataPropType:e.Type.Num},y),d.allErrors||a.if((0,t.not)(y),()=>a.break())})}}return vr.validateAdditionalItems=i,vr.default=n,vr}var ci={},$r={},Jl;function Xl(){if(Jl)return $r;Jl=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.validateTuple=void 0;const t=pe(),e=_e(),r=ft(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:o,it:a}=s;if(Array.isArray(o))return i(s,"additionalItems",o);a.items=!0,!(0,e.alwaysValidSchema)(
952
+ a,o)&&s.ok((0,r.validateArray)(s))}};function i(s,o,a=s.schema){const{gen:c,parentSchema:l,data:u,keyword:d,it:h}=s;D(l),h.opts.unevaluated&&a.length&&h.items!==!0&&(h.items=e.mergeEvaluated.items(c,a.length,h.items));const E=c.name("valid"),y=c.const("len",(0,t._)`${u}.length`);a.forEach((f,g)=>{(0,e.alwaysValidSchema)(h,f)||(c.if((0,t._)`${y} > ${g}`,()=>s.subschema({keyword:d,schemaProp:g,dataProp:g},E)),s.ok(E))});function D(f){const{opts:g,errSchemaPath:p}=h,m=a.length,v=m===f.minItems&&(m===
953
+ f.maxItems||f[o]===!1);if(g.strictTuples&&!v){const $=`"${d}" is ${m}-tuple, but minItems or maxItems/${o} are not specified or different at path "${p}"`;(0,e.checkStrictMode)(h,$,g.strictTuples)}}}return $r.validateTuple=i,$r.default=n,$r}var Ql;function uE(){if(Ql)return ci;Ql=1,Object.defineProperty(ci,"__esModule",{value:!0});const t=Xl(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return ci.default=e,ci}var li={},Zl;
954
+ function cE(){if(Zl)return li;Zl=1,Object.defineProperty(li,"__esModule",{value:!0});const t=pe(),e=_e(),r=ft(),n=Yl(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,t.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,t._)`{limit: ${o}}`},code(o){const{schema:a,parentSchema:c,it:l}=o,{prefixItems:u}=c;l.items=!0,!(0,e.alwaysValidSchema)(l,a)&&(u?(0,n.validateAdditionalItems)(o,u):o.ok((0,r.validateArray)(
955
+ o)))}};return li.default=s,li}var fi={},ef;function lE(){if(ef)return fi;ef=1,Object.defineProperty(fi,"__esModule",{value:!0});const t=pe(),e=_e(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:s}})=>s===void 0?(0,t.str)`must contain at least ${i} valid item(s)`:(0,t.str)`must contain at least ${i} and no more than ${s} valid item(s)`,params:({params:{min:i,max:s}})=>s===void 0?(0,t._)`{minContains: ${i}}`:
956
+ (0,t._)`{minContains: ${i}, maxContains: ${s}}`},code(i){const{gen:s,schema:o,parentSchema:a,data:c,it:l}=i;let u,d;const{minContains:h,maxContains:E}=a;l.opts.next?(u=h===void 0?1:h,d=E):u=1;const y=s.const("len",(0,t._)`${c}.length`);if(i.setParams({min:u,max:d}),d===void 0&&u===0){(0,e.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(d!==void 0&&u>d){(0,e.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,e.
957
+ alwaysValidSchema)(l,o)){let m=(0,t._)`${y} >= ${u}`;d!==void 0&&(m=(0,t._)`${m} && ${y} <= ${d}`),i.pass(m);return}l.items=!0;const D=s.name("valid");d===void 0&&u===1?g(D,()=>s.if(D,()=>s.break())):u===0?(s.let(D,!0),d!==void 0&&s.if((0,t._)`${c}.length > 0`,f)):(s.let(D,!1),f()),i.result(D,()=>i.reset());function f(){const m=s.name("_valid"),v=s.let("count",0);g(m,()=>s.if(m,()=>p(v)))}function g(m,v){s.forRange("i",0,y,$=>{i.subschema({keyword:"contains",dataProp:$,dataPropType:e.Type.Num,compositeRule:!0},
958
+ m),v()})}function p(m){s.code((0,t._)`${m}++`),d===void 0?s.if((0,t._)`${m} >= ${u}`,()=>s.assign(D,!0).break()):(s.if((0,t._)`${m} > ${d}`,()=>s.assign(D,!1).break()),u===1?s.assign(D,!0):s.if((0,t._)`${m} >= ${u}`,()=>s.assign(D,!0)))}}};return fi.default=n,fi}var Io={},tf;function Fo(){return tf||(tf=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=pe(),r=_e(),n=ft();t.error={message:({params:{property:c,depsCount:l,
959
+ deps:u}})=>{const d=l===1?"property":"properties";return(0,e.str)`must have ${d} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:l,deps:u,missingProperty:d}})=>(0,e._)`{property: ${c},
960
+ missingProperty: ${d},
961
+ depsCount: ${l},
962
+ deps: ${u}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(c){const[l,u]=s(c);o(c,l),a(c,u)}};function s({schema:c}){const l={},u={};for(const d in c){if(d==="__proto__")continue;const h=Array.isArray(c[d])?l:u;h[d]=c[d]}return[l,u]}function o(c,l=c.schema){const{gen:u,data:d,it:h}=c;if(Object.keys(l).length===0)return;const E=u.let("missing");for(const y in l){const D=l[y];if(D.length===0)continue;const f=(0,n.propertyInData)(u,d,y,h.opts.ownProperties);
963
+ c.setParams({property:y,depsCount:D.length,deps:D.join(", ")}),h.allErrors?u.if(f,()=>{for(const g of D)(0,n.checkReportMissingProp)(c,g)}):(u.if((0,e._)`${f} && (${(0,n.checkMissingProp)(c,D,E)})`),(0,n.reportMissingProp)(c,E),u.else())}}t.validatePropertyDeps=o;function a(c,l=c.schema){const{gen:u,data:d,keyword:h,it:E}=c,y=u.name("valid");for(const D in l)(0,r.alwaysValidSchema)(E,l[D])||(u.if((0,n.propertyInData)(u,d,D,E.opts.ownProperties),()=>{const f=c.subschema({keyword:h,schemaProp:D},y);
964
+ c.mergeValidEvaluated(f,y)},()=>u.var(y,!0)),c.ok(y))}t.validateSchemaDeps=a,t.default=i}(Io)),Io}var di={},rf;function fE(){if(rf)return di;rf=1,Object.defineProperty(di,"__esModule",{value:!0});const t=pe(),e=_e(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,t._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:s,schema:o,data:a,it:c}=i;if((0,e.alwaysValidSchema)(c,o))return;const l=s.name("va\
965
+ lid");s.forIn("key",a,u=>{i.setParams({propertyName:u}),i.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},l),s.if((0,t.not)(l),()=>{i.error(!0),c.allErrors||s.break()})}),i.ok(l)}};return di.default=n,di}var hi={},nf;function sf(){if(nf)return hi;nf=1,Object.defineProperty(hi,"__esModule",{value:!0});const t=ft(),e=pe(),r=ct(),n=_e(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{
966
+ message:"must NOT have additional properties",params:({params:o})=>(0,e._)`{additionalProperty: ${o.additionalProperty}}`},code(o){const{gen:a,schema:c,parentSchema:l,data:u,errsCount:d,it:h}=o;if(!d)throw new Error("ajv implementation error");const{allErrors:E,opts:y}=h;if(h.props=!0,y.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(h,c))return;const D=(0,t.allSchemaProperties)(l.properties),f=(0,t.allSchemaProperties)(l.patternProperties);g(),o.ok((0,e._)`${d} === ${r.default.errors}`);function g(){
967
+ a.forIn("key",u,_=>{!D.length&&!f.length?v(_):a.if(p(_),()=>v(_))})}function p(_){let b;if(D.length>8){const I=(0,n.schemaRefOrVal)(h,l.properties,"properties");b=(0,t.isOwnProperty)(a,I,_)}else D.length?b=(0,e.or)(...D.map(I=>(0,e._)`${_} === ${I}`)):b=e.nil;return f.length&&(b=(0,e.or)(b,...f.map(I=>(0,e._)`${(0,t.usePattern)(o,I)}.test(${_})`))),(0,e.not)(b)}function m(_){a.code((0,e._)`delete ${u}[${_}]`)}function v(_){if(y.removeAdditional==="all"||y.removeAdditional&&c===!1){m(_);return}if(c===
968
+ !1){o.setParams({additionalProperty:_}),o.error(),E||a.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(h,c)){const b=a.name("valid");y.removeAdditional==="failing"?($(_,b,!1),a.if((0,e.not)(b),()=>{o.reset(),m(_)})):($(_,b),E||a.if((0,e.not)(b),()=>a.break()))}}function $(_,b,I){const V={keyword:"additionalProperties",dataProp:_,dataPropType:n.Type.Str};I===!1&&Object.assign(V,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(V,b)}}};return hi.default=s,hi}var pi={},of;
969
+ function dE(){if(of)return pi;of=1,Object.defineProperty(pi,"__esModule",{value:!0});const t=Qr(),e=ft(),r=_e(),n=sf(),i={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:o,schema:a,parentSchema:c,data:l,it:u}=s;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(u,n.default,"additionalProperties"));const d=(0,e.allSchemaProperties)(a);for(const f of d)u.definedProperties.add(f);u.opts.unevaluated&&d.length&&u.props!==!0&&(u.props=
970
+ r.mergeEvaluated.props(o,(0,r.toHash)(d),u.props));const h=d.filter(f=>!(0,r.alwaysValidSchema)(u,a[f]));if(h.length===0)return;const E=o.name("valid");for(const f of h)y(f)?D(f):(o.if((0,e.propertyInData)(o,l,f,u.opts.ownProperties)),D(f),u.allErrors||o.else().var(E,!0),o.endIf()),s.it.definedProperties.add(f),s.ok(E);function y(f){return u.opts.useDefaults&&!u.compositeRule&&a[f].default!==void 0}function D(f){s.subschema({keyword:"properties",schemaProp:f,dataProp:f},E)}}};return pi.default=i,
971
+ pi}var mi={},af;function hE(){if(af)return mi;af=1,Object.defineProperty(mi,"__esModule",{value:!0});const t=ft(),e=pe(),r=_e(),n=_e(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:o,schema:a,data:c,parentSchema:l,it:u}=s,{opts:d}=u,h=(0,t.allSchemaProperties)(a),E=h.filter(v=>(0,r.alwaysValidSchema)(u,a[v]));if(h.length===0||E.length===h.length&&(!u.opts.unevaluated||u.props===!0))return;const y=d.strictSchema&&!d.allowMatchingProperties&&l.properties,D=o.name(
972
+ "valid");u.props!==!0&&!(u.props instanceof e.Name)&&(u.props=(0,n.evaluatedPropsToName)(o,u.props));const{props:f}=u;g();function g(){for(const v of h)y&&p(v),u.allErrors?m(v):(o.var(D,!0),m(v),o.if(D))}function p(v){for(const $ in y)new RegExp(v).test($)&&(0,r.checkStrictMode)(u,`property ${$} matches pattern ${v} (use allowMatchingProperties)`)}function m(v){o.forIn("key",c,$=>{o.if((0,e._)`${(0,t.usePattern)(s,v)}.test(${$})`,()=>{const _=E.includes(v);_||s.subschema({keyword:"patternPropert\
973
+ ies",schemaProp:v,dataProp:$,dataPropType:n.Type.Str},D),u.opts.unevaluated&&f!==!0?o.assign((0,e._)`${f}[${$}]`,!0):!_&&!u.allErrors&&o.if((0,e.not)(D),()=>o.break())})})}}};return mi.default=i,mi}var gi={},uf;function pE(){if(uf)return gi;uf=1,Object.defineProperty(gi,"__esModule",{value:!0});const t=_e(),e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:s}=r;if((0,t.alwaysValidSchema)(s,i)){r.fail();return}const o=n.name("valid");r.subschema({keyword:"\
974
+ not",compositeRule:!0,createErrors:!1,allErrors:!1},o),r.failResult(o,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return gi.default=e,gi}var yi={},cf;function mE(){if(cf)return yi;cf=1,Object.defineProperty(yi,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ft().validateUnion,error:{message:"must match a schema in anyOf"}};return yi.default=e,yi}var Ei={},lf;function gE(){if(lf)return Ei;lf=1,Object.defineProperty(Ei,"__esModule",{value:!0});
975
+ const t=pe(),e=_e(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,t._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:s,schema:o,parentSchema:a,it:c}=i;if(!Array.isArray(o))throw new Error("ajv implementation error");if(c.opts.discriminator&&a.discriminator)return;const l=o,u=s.let("valid",!1),d=s.let("passing",null),h=s.name("_valid");i.setParams({passing:d}),s.block(E),i.result(u,()=>i.reset(),()=>i.error(
976
+ !0));function E(){l.forEach((y,D)=>{let f;(0,e.alwaysValidSchema)(c,y)?s.var(h,!0):f=i.subschema({keyword:"oneOf",schemaProp:D,compositeRule:!0},h),D>0&&s.if((0,t._)`${h} && ${u}`).assign(u,!1).assign(d,(0,t._)`[${d}, ${D}]`).else(),s.if(h,()=>{s.assign(u,!0),s.assign(d,D),f&&i.mergeEvaluated(f,t.Name)})})}}};return Ei.default=n,Ei}var Di={},ff;function yE(){if(ff)return Di;ff=1,Object.defineProperty(Di,"__esModule",{value:!0});const t=_e(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,
977
+ schema:i,it:s}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const o=n.name("valid");i.forEach((a,c)=>{if((0,t.alwaysValidSchema)(s,a))return;const l=r.subschema({keyword:"allOf",schemaProp:c},o);r.ok(o),r.mergeEvaluated(l)})}};return Di.default=e,Di}var vi={},df;function EE(){if(df)return vi;df=1,Object.defineProperty(vi,"__esModule",{value:!0});const t=pe(),e=_e(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,t.str)`must match "${s.
978
+ ifClause}" schema`,params:({params:s})=>(0,t._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:o,parentSchema:a,it:c}=s;a.then===void 0&&a.else===void 0&&(0,e.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const l=i(c,"then"),u=i(c,"else");if(!l&&!u)return;const d=o.let("valid",!0),h=o.name("_valid");if(E(),s.reset(),l&&u){const D=o.let("ifClause");s.setParams({ifClause:D}),o.if(h,y("then",D),y("else",D))}else l?o.if(h,y("then")):o.if((0,t.not)(h),y("else"));s.pass(d,()=>s.
979
+ error(!0));function E(){const D=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},h);s.mergeEvaluated(D)}function y(D,f){return()=>{const g=s.subschema({keyword:D},h);o.assign(d,h),s.mergeValidEvaluated(g,d),f?o.assign(f,(0,t._)`${D}`):s.setParams({ifClause:D})}}}};function i(s,o){const a=s.schema[o];return a!==void 0&&!(0,e.alwaysValidSchema)(s,a)}return vi.default=n,vi}var $i={},hf;function DE(){if(hf)return $i;hf=1,Object.defineProperty($i,"__esModule",{value:!0});const t=_e(),
980
+ e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,t.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return $i.default=e,$i}var pf;function mf(){if(pf)return ui;pf=1,Object.defineProperty(ui,"__esModule",{value:!0});const t=Yl(),e=uE(),r=Xl(),n=cE(),i=lE(),s=Fo(),o=fE(),a=sf(),c=dE(),l=hE(),u=pE(),d=mE(),h=gE(),E=yE(),y=EE(),D=DE();function f(g=!1){const p=[u.default,d.default,h.default,E.default,y.default,D.default,o.default,
981
+ a.default,s.default,c.default,l.default];return g?p.push(e.default,n.default):p.push(t.default,r.default),p.push(i.default),p}return ui.default=f,ui}var _i={},_r={},gf;function yf(){if(gf)return _r;gf=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.dynamicAnchor=void 0;const t=pe(),e=ct(),r=Vn(),n=Ro(),i={keyword:"$dynamicAnchor",schemaType:"string",code:a=>s(a,a.schema)};function s(a,c){const{gen:l,it:u}=a;u.schemaEnv.root.dynamicAnchors[c]=!0;const d=(0,t._)`${e.default.dynamicAnchors}${(0,t.
982
+ getProperty)(c)}`,h=u.errSchemaPath==="#"?u.validateName:o(a);l.if((0,t._)`!${d}`,()=>l.assign(d,h))}_r.dynamicAnchor=s;function o(a){const{schemaEnv:c,schema:l,self:u}=a.it,{root:d,baseId:h,localRefs:E,meta:y}=c.root,{schemaId:D}=u.opts,f=new r.SchemaEnv({schema:l,schemaId:D,root:d,baseId:h,localRefs:E,meta:y});return r.compileSchema.call(u,f),(0,n.getValidate)(a,f)}return _r.default=i,_r}var wr={},Ef;function Df(){if(Ef)return wr;Ef=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.dynamicRef=
983
+ void 0;const t=pe(),e=ct(),r=Ro(),n={keyword:"$dynamicRef",schemaType:"string",code:s=>i(s,s.schema)};function i(s,o){const{gen:a,keyword:c,it:l}=s;if(o[0]!=="#")throw new Error(`"${c}" only supports hash fragment reference`);const u=o.slice(1);if(l.allErrors)d();else{const E=a.let("valid",!1);d(E),s.ok(E)}function d(E){if(l.schemaEnv.root.dynamicAnchors[u]){const y=a.let("_v",(0,t._)`${e.default.dynamicAnchors}${(0,t.getProperty)(u)}`);a.if(y,h(y,E),h(l.validateName,E))}else h(l.validateName,E)()}
984
+ function h(E,y){return y?()=>a.block(()=>{(0,r.callRef)(s,E),a.let(y,!0)}):()=>(0,r.callRef)(s,E)}}return wr.dynamicRef=i,wr.default=n,wr}var wi={},vf;function vE(){if(vf)return wi;vf=1,Object.defineProperty(wi,"__esModule",{value:!0});const t=yf(),e=_e(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,t.dynamicAnchor)(n,""):(0,e.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return wi.default=r,wi}var bi={},$f;function $E(){if($f)return bi;$f=1,Object.defineProperty(
985
+ bi,"__esModule",{value:!0});const t=Df(),e={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,t.dynamicRef)(r,r.schema)};return bi.default=e,bi}var _f;function _E(){if(_f)return _i;_f=1,Object.defineProperty(_i,"__esModule",{value:!0});const t=yf(),e=Df(),r=vE(),n=$E(),i=[t.default,e.default,r.default,n.default];return _i.default=i,_i}var Ai={},Ci={},wf;function wE(){if(wf)return Ci;wf=1,Object.defineProperty(Ci,"__esModule",{value:!0});const t=Fo(),e={keyword:"dependentRequired",type:"obje\
986
+ ct",schemaType:"object",error:t.error,code:r=>(0,t.validatePropertyDeps)(r)};return Ci.default=e,Ci}var Si={},bf;function bE(){if(bf)return Si;bf=1,Object.defineProperty(Si,"__esModule",{value:!0});const t=Fo(),e={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,t.validateSchemaDeps)(r)};return Si.default=e,Si}var Ri={},Af;function AE(){if(Af)return Ri;Af=1,Object.defineProperty(Ri,"__esModule",{value:!0});const t=_e(),e={keyword:["maxContains","minContains"],type:"array",
987
+ schemaType:"number",code({keyword:r,parentSchema:n,it:i}){n.contains===void 0&&(0,t.checkStrictMode)(i,`"${r}" without "contains" is ignored`)}};return Ri.default=e,Ri}var Cf;function CE(){if(Cf)return Ai;Cf=1,Object.defineProperty(Ai,"__esModule",{value:!0});const t=wE(),e=bE(),r=AE(),n=[t.default,e.default,r.default];return Ai.default=n,Ai}var Oi={},Ii={},Sf;function SE(){if(Sf)return Ii;Sf=1,Object.defineProperty(Ii,"__esModule",{value:!0});const t=pe(),e=_e(),r=ct(),i={keyword:"unevaluatedPr\
988
+ operties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:s})=>(0,t._)`{unevaluatedProperty: ${s.unevaluatedProperty}}`},code(s){const{gen:o,schema:a,data:c,errsCount:l,it:u}=s;if(!l)throw new Error("ajv implementation error");const{allErrors:d,props:h}=u;h instanceof t.Name?o.if((0,t._)`${h} !== true`,()=>o.forIn("key",c,f=>o.if(y(h,f),()=>E(f)))):h!==!0&&o.forIn("key",c,f=>h===void 0?E(f):o.if(D(h,f),()=>E(f))),
989
+ u.props=!0,s.ok((0,t._)`${l} === ${r.default.errors}`);function E(f){if(a===!1){s.setParams({unevaluatedProperty:f}),s.error(),d||o.break();return}if(!(0,e.alwaysValidSchema)(u,a)){const g=o.name("valid");s.subschema({keyword:"unevaluatedProperties",dataProp:f,dataPropType:e.Type.Str},g),d||o.if((0,t.not)(g),()=>o.break())}}function y(f,g){return(0,t._)`!${f} || !${f}[${g}]`}function D(f,g){const p=[];for(const m in f)f[m]===!0&&p.push((0,t._)`${g} !== ${m}`);return(0,t.and)(...p)}}};return Ii.default=
990
+ i,Ii}var Fi={},Rf;function RE(){if(Rf)return Fi;Rf=1,Object.defineProperty(Fi,"__esModule",{value:!0});const t=pe(),e=_e(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:i}})=>(0,t.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,t._)`{limit: ${i}}`},code(i){const{gen:s,schema:o,data:a,it:c}=i,l=c.items||0;if(l===!0)return;const u=s.const("len",(0,t._)`${a}.length`);if(o===!1)i.setParams({len:l}),i.fail((0,t._)`${u} > ${l}`);else if(typeof o==
991
+ "object"&&!(0,e.alwaysValidSchema)(c,o)){const h=s.var("valid",(0,t._)`${u} <= ${l}`);s.if((0,t.not)(h),()=>d(h,l)),i.ok(h)}c.items=!0;function d(h,E){s.forRange("i",E,u,y=>{i.subschema({keyword:"unevaluatedItems",dataProp:y,dataPropType:e.Type.Num},h),c.allErrors||s.if((0,t.not)(h),()=>s.break())})}}};return Fi.default=n,Fi}var Of;function OE(){if(Of)return Oi;Of=1,Object.defineProperty(Oi,"__esModule",{value:!0});const t=SE(),e=RE(),r=[t.default,e.default];return Oi.default=r,Oi}var Pi={},Ni={},
992
+ If;function IE(){if(If)return Ni;If=1,Object.defineProperty(Ni,"__esModule",{value:!0});const t=pe(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,t._)`{format: ${n}}`},code(n,i){const{gen:s,data:o,$data:a,schema:c,schemaCode:l,it:u}=n,{opts:d,errSchemaPath:h,schemaEnv:E,self:y}=u;if(!d.validateFormats)return;a?D():f();function D(){const g=s.scopeValue("formats",{ref:y.formats,
993
+ code:d.code.formats}),p=s.const("fDef",(0,t._)`${g}[${l}]`),m=s.let("fType"),v=s.let("format");s.if((0,t._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>s.assign(m,(0,t._)`${p}.type || "string"`).assign(v,(0,t._)`${p}.validate`),()=>s.assign(m,(0,t._)`"string"`).assign(v,p)),n.fail$data((0,t.or)($(),_()));function $(){return d.strictSchema===!1?t.nil:(0,t._)`${l} && !${v}`}function _(){const b=E.$async?(0,t._)`(${p}.async ? await ${v}(${o}) : ${v}(${o}))`:(0,t._)`${v}(${o})`,I=(0,t.
994
+ _)`(typeof ${v} == "function" ? ${b} : ${v}.test(${o}))`;return(0,t._)`${v} && ${v} !== true && ${m} === ${i} && !${I}`}}function f(){const g=y.formats[c];if(!g){$();return}if(g===!0)return;const[p,m,v]=_(g);p===i&&n.pass(b());function $(){if(d.strictSchema===!1){y.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${c}" ignored in schema at path "${h}"`}}function _(I){const V=I instanceof RegExp?(0,t.regexpCode)(I):d.code.formats?(0,t._)`${d.code.formats}${(0,t.getProperty)(
995
+ c)}`:void 0,G=s.scopeValue("formats",{key:c,ref:I,code:V});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,t._)`${G}.validate`]:["string",I,G]}function b(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!E.$async)throw new Error("async format in sync schema");return(0,t._)`await ${v}(${o})`}return typeof m=="function"?(0,t._)`${v}(${o})`:(0,t._)`${v}.test(${o})`}}}};return Ni.default=r,Ni}var Ff;function Pf(){if(Ff)return Pi;Ff=1,Object.defineProperty(
996
+ Pi,"__esModule",{value:!0});const e=[IE().default];return Pi.default=e,Pi}var fr={},Nf;function Tf(){return Nf||(Nf=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.contentVocabulary=fr.metadataVocabulary=void 0,fr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],fr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),fr}var Lf;function FE(){if(Lf)return Gn;Lf=1,Object.defineProperty(Gn,"__esModule",{value:!0});const t=Nl(),
997
+ e=Wl(),r=mf(),n=_E(),i=CE(),s=OE(),o=Pf(),a=Tf(),c=[n.default,t.default,e.default,(0,r.default)(!0),o.default,a.metadataVocabulary,a.contentVocabulary,i.default,s.default];return Gn.default=c,Gn}var Ti={},tn={},jf;function PE(){if(jf)return tn;jf=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.DiscrError=void 0;var t;return function(e){e.Tag="tag",e.Mapping="mapping"}(t||(tn.DiscrError=t={})),tn}var kf;function Bf(){if(kf)return Ti;kf=1,Object.defineProperty(Ti,"__esModule",{value:!0});const t=pe(),
998
+ e=PE(),r=Vn(),n=Zr(),i=_e(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:c}})=>a===e.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:a,tag:c,tagName:l}})=>(0,t._)`{error: ${a}, tag: ${l}, tagValue: ${c}}`},code(a){const{gen:c,data:l,schema:u,parentSchema:d,it:h}=a,{oneOf:E}=d;if(!h.opts.discriminator)throw new Error("discriminator: requires discriminator option");const y=u.
999
+ propertyName;if(typeof y!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!E)throw new Error("discriminator: requires oneOf keyword");const D=c.let("valid",!1),f=c.const("tag",(0,t._)`${l}${(0,t.getProperty)(y)}`);c.if((0,t._)`typeof ${f} == "string"`,()=>g(),()=>a.error(!1,{discrError:e.DiscrError.Tag,tag:f,tagName:y})),a.ok(D);function g(){const v=m();c.if(!1);for(const $ in v)c.elseIf((0,t._)`${f} === ${$}`),
1000
+ c.assign(D,p(v[$]));c.else(),a.error(!1,{discrError:e.DiscrError.Mapping,tag:f,tagName:y}),c.endIf()}function p(v){const $=c.name("valid"),_=a.subschema({keyword:"oneOf",schemaProp:v},$);return a.mergeEvaluated(_,t.Name),$}function m(){var v;const $={},_=I(d);let b=!0;for(let L=0;L<E.length;L++){let B=E[L];if(B?.$ref&&!(0,i.schemaHasRulesButRef)(B,h.self.RULES)){const j=B.$ref;if(B=r.resolveRef.call(h.self,h.schemaEnv.root,h.baseId,j),B instanceof r.SchemaEnv&&(B=B.schema),B===void 0)throw new n.
1001
+ default(h.opts.uriResolver,h.baseId,j)}const N=(v=B?.properties)===null||v===void 0?void 0:v[y];if(typeof N!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${y}"`);b=b&&(_||I(B)),V(N,L)}if(!b)throw new Error(`discriminator: "${y}" must be required`);return $;function I({required:L}){return Array.isArray(L)&&L.includes(y)}function V(L,B){if(L.const)G(L.const,B);else if(L.enum)for(const N of L.enum)G(N,B);else throw new Error(`discriminator:\
1002
+ "properties/${y}" must have "const" or "enum"`)}function G(L,B){if(typeof L!="string"||L in $)throw new Error(`discriminator: "${y}" values must be unique strings`);$[L]=B}}}};return Ti.default=o,Ti}var Li={};const xf="https://json-schema.org/draft/2020-12/schema",Mf="https://json-schema.org/draft/2020-12/schema",qf={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"http\
1003
+ s://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},Uf="meta",Hf="Core and Validation specifications meta-schema",Vf=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],zf=["object","boolean"],
1004
+ Gf="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",Wf={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{
1005
+ 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}},NE={$schema:xf,$id:Mf,$vocabulary:qf,$dynamicAnchor:Uf,title:Hf,allOf:Vf,type:zf,$comment:Gf,properties:Wf},TE={__proto__:null,
1006
+ $comment:Gf,$dynamicAnchor:Uf,$id:Mf,$schema:xf,$vocabulary:qf,allOf:Vf,default:NE,properties:Wf,title:Hf,type:zf},LE=mt(TE),Kf="https://json-schema.org/draft/2020-12/schema",Yf="https://json-schema.org/draft/2020-12/meta/applicator",Jf={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},Xf="meta",Qf="Applicator vocabulary meta-schema",Zf=["object","boolean"],ed={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"\
1007
+ #meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs\
1008
+ /schemaArray"},not:{$dynamicRef:"#meta"}},td={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},jE={$schema:Kf,$id:Yf,$vocabulary:Jf,$dynamicAnchor:Xf,title:Qf,type:Zf,properties:ed,$defs:td},kE={__proto__:null,$defs:td,$dynamicAnchor:Xf,$id:Yf,$schema:Kf,$vocabulary:Jf,default:jE,properties:ed,title:Qf,type:Zf},BE=mt(kE),rd="https://json-schema.org/draft/2020-12/schema",nd="https://json-schema.org/draft/2020-12/meta/unevaluated",id={"https://json-schema.org/draft/2020-12/vocab/\
1009
+ unevaluated":!0},sd="meta",od="Unevaluated applicator vocabulary meta-schema",ad=["object","boolean"],ud={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},xE={$schema:rd,$id:nd,$vocabulary:id,$dynamicAnchor:sd,title:od,type:ad,properties:ud},ME={__proto__:null,$dynamicAnchor:sd,$id:nd,$schema:rd,$vocabulary:id,default:xE,properties:ud,title:od,type:ad},qE=mt(ME),cd="https://json-schema.org/draft/2020-12/schema",ld="https://json-schema.org/draft/2020-12/meta/con\
1010
+ tent",fd={"https://json-schema.org/draft/2020-12/vocab/content":!0},dd="meta",hd="Content vocabulary meta-schema",pd=["object","boolean"],md={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},UE={$schema:cd,$id:ld,$vocabulary:fd,$dynamicAnchor:dd,title:hd,type:pd,properties:md},HE={__proto__:null,$dynamicAnchor:dd,$id:ld,$schema:cd,$vocabulary:fd,default:UE,properties:md,title:hd,type:pd},VE=mt(HE),gd="https://json-schema.org/draft/2020-12/sche\
1011
+ ma",yd="https://json-schema.org/draft/2020-12/meta/core",Ed={"https://json-schema.org/draft/2020-12/vocab/core":!0},Dd="meta",vd="Core vocabulary meta-schema",$d=["object","boolean"],_d={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{
1012
+ type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},wd={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},zE={$schema:gd,$id:yd,$vocabulary:Ed,$dynamicAnchor:Dd,title:vd,type:$d,properties:_d,$defs:wd},GE={__proto__:null,$defs:wd,$dynamicAnchor:Dd,$id:yd,
1013
+ $schema:gd,$vocabulary:Ed,default:zE,properties:_d,title:vd,type:$d},WE=mt(GE),bd="https://json-schema.org/draft/2020-12/schema",Ad="https://json-schema.org/draft/2020-12/meta/format-annotation",Cd={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},Sd="meta",Rd="Format vocabulary meta-schema for annotation results",Od=["object","boolean"],Id={format:{type:"string"}},KE={$schema:bd,$id:Ad,$vocabulary:Cd,$dynamicAnchor:Sd,title:Rd,type:Od,properties:Id},YE={__proto__:null,$dynamicAnchor:Sd,
1014
+ $id:Ad,$schema:bd,$vocabulary:Cd,default:KE,properties:Id,title:Rd,type:Od},JE=mt(YE),Fd="https://json-schema.org/draft/2020-12/schema",Pd="https://json-schema.org/draft/2020-12/meta/meta-data",Nd={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},Td="meta",Ld="Meta-data vocabulary meta-schema",jd=["object","boolean"],kd={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},
1015
+ examples:{type:"array",items:!0}},XE={$schema:Fd,$id:Pd,$vocabulary:Nd,$dynamicAnchor:Td,title:Ld,type:jd,properties:kd},QE={__proto__:null,$dynamicAnchor:Td,$id:Pd,$schema:Fd,$vocabulary:Nd,default:XE,properties:kd,title:Ld,type:jd},ZE=mt(QE),Bd="https://json-schema.org/draft/2020-12/schema",xd="https://json-schema.org/draft/2020-12/meta/validation",Md={"https://json-schema.org/draft/2020-12/vocab/validation":!0},qd="meta",Ud="Validation vocabulary meta-schema",Hd=["object","boolean"],Vd={type:{
1016
+ anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{
1017
+ $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"}}},zd={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"\
1018
+ #/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},eD={$schema:Bd,$id:xd,$vocabulary:Md,$dynamicAnchor:qd,title:Ud,type:Hd,properties:Vd,$defs:zd},tD={__proto__:null,$defs:zd,$dynamicAnchor:qd,$id:xd,$schema:Bd,$vocabulary:Md,default:eD,properties:Vd,title:Ud,type:Hd},rD=mt(tD);var Gd;function nD(){if(Gd)return Li;Gd=1,Object.defineProperty(Li,"__esMo\
1019
+ dule",{value:!0});const t=LE,e=BE,r=qE,n=VE,i=WE,s=JE,o=ZE,a=rD,c=["/properties"];function l(u){return[t,e,r,n,i,d(this,s),o,d(this,a)].forEach(h=>this.addMetaSchema(h,void 0,!1)),this;function d(h,E){return u?h.$dataMetaSchema(E,c):E}}return Li.default=l,Li}var Wd;function iD(){return Wd||(Wd=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;const r=Ol(),n=FE(),i=Bf(),s=nD(),
1020
+ o="https://json-schema.org/draft/2020-12/schema";class a extends r.default{constructor(E={}){super({...E,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(E=>this.addVocabulary(E)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:E,meta:y}=this.opts;y&&(s.default.call(this,E),this.refs["http://json-schema.org/schema"]=o)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||
1021
+ (this.getSchema(o)?o:void 0)}}e.Ajv2020=a,t.exports=e=a,t.exports.Ajv2020=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var c=Qr();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=pe();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(
1022
+ e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var u=Un();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return u.default}});var d=Zr();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(Ln,Ln.exports)),Ln.exports}var sD=iD(),ji={exports:{}},Po={},Kd;function oD(){
1023
+ return Kd||(Kd=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(L,B){return{validate:L,compare:B}}t.fullFormats={date:e(s,o),time:e(c(!0),l),"date-time":e(h(!0),E),"iso-time":e(c(),u),"iso-date-time":e(h(),y),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:g,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
1024
+ "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,
1025
+ 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,
1026
+ regex:G,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:m,int32:{type:"number",validate:_},int64:{type:"number",validate:b},float:{type:"number",validate:I},double:{type:"number",validate:I},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,
1027
+ o),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,E),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,y),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
1028
+ email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function r(L){return L%4===0&&(L%100!==0||L%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(L){const B=n.exec(L);if(!B)return!1;const N=+B[1],j=+B[2],M=+B[3];return j>=1&&j<=12&&M>=1&&M<=(j===2&&r(N)?29:i[j])}function o(L,B){if(L&&B)return L>B?1:L<B?-1:0}const a=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
1029
+ function c(L){return function(N){const j=a.exec(N);if(!j)return!1;const M=+j[1],Y=+j[2],z=+j[3],X=j[4],se=j[5]==="-"?-1:1,q=+(j[6]||0),C=+(j[7]||0);if(q>23||C>59||L&&!X)return!1;if(M<=23&&Y<=59&&z<60)return!0;const U=Y-C*se,k=M-q*se-(U<0?1:0);return(k===23||k===-1)&&(U===59||U===-1)&&z<61}}function l(L,B){if(!(L&&B))return;const N=new Date("2020-01-01T"+L).valueOf(),j=new Date("2020-01-01T"+B).valueOf();if(N&&j)return N-j}function u(L,B){if(!(L&&B))return;const N=a.exec(L),j=a.exec(B);if(N&&j)return L=
1030
+ N[1]+N[2]+N[3],B=j[1]+j[2]+j[3],L>B?1:L<B?-1:0}const d=/t|\s/i;function h(L){const B=c(L);return function(j){const M=j.split(d);return M.length===2&&s(M[0])&&B(M[1])}}function E(L,B){if(!(L&&B))return;const N=new Date(L).valueOf(),j=new Date(B).valueOf();if(N&&j)return N-j}function y(L,B){if(!(L&&B))return;const[N,j]=L.split(d),[M,Y]=B.split(d),z=o(N,M);if(z!==void 0)return z||l(j,Y)}const D=/\/|:/,f=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
1031
+ function g(L){return D.test(L)&&f.test(L)}const p=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function m(L){return p.lastIndex=0,p.test(L)}const v=-2147483648,$=2**31-1;function _(L){return Number.isInteger(L)&&L<=$&&L>=v}function b(L){return Number.isInteger(L)}function I(){return!0}const V=/[^\\]\\Z/;function G(L){if(V.test(L))return!1;try{return new RegExp(L),!0}catch{return!1}}}(Po)),Po}var No={},ki={exports:{}},Bi={},Yd;function aD(){if(Yd)return Bi;Yd=1,Object.defineProperty(
1032
+ Bi,"__esModule",{value:!0});const t=Nl(),e=Wl(),r=mf(),n=Pf(),i=Tf(),s=[t.default,e.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return Bi.default=s,Bi}const Jd="http://json-schema.org/draft-07/schema#",Xd="http://json-schema.org/draft-07/schema#",Qd="Core schema meta-schema",Zd={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},
1033
+ simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},eh=["object","boolean"],th={$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},
1034
+ 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\
1035
+ 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:"\
1036
+ 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\
1037
+ initions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},uD={$schema:Jd,$id:Xd,title:Qd,definitions:Zd,type:eh,properties:th,default:!0},cD={__proto__:null,$id:Xd,$schema:Jd,default:uD,definitions:Zd,properties:th,title:Qd,type:eh},lD=mt(cD);var rh;function fD(){return rh||(rh=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=Ol(),n=aD(),i=Bf(),
1038
+ s=lD,o=["/properties"],a="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(y=>this.addVocabulary(y)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const y=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema(y,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||
1039
+ (this.getSchema(a)?a:void 0)}}e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var l=Qr();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=pe();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,
1040
+ "nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var d=Un();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var h=Zr();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return h.default}})}(ki,ki.exports)),ki.exports}var nh;function dD(){return nh||(nh=1,function(t){Object.
1041
+ defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=fD(),r=pe(),n=r.operators,i={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:a,schemaCode:c})=>(0,r.str)`should be ${i[a].okStr} ${c}`,params:({keyword:a,schemaCode:c})=>(0,r._)`{comparison: ${i[a].okStr}, limit: ${c}}`};t.formatLimitDefinition=
1042
+ {keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(a){const{gen:c,data:l,schemaCode:u,keyword:d,it:h}=a,{opts:E,self:y}=h;if(!E.validateFormats)return;const D=new e.KeywordCxt(h,y.RULES.all.format.definition,"format");D.$data?f():g();function f(){const m=c.scopeValue("formats",{ref:y.formats,code:E.code.formats}),v=c.const("fmt",(0,r._)`${m}[${D.schemaCode}]`);a.fail$data((0,r.or)((0,r._)`typeof ${v} != "object"`,(0,r._)`${v} instanceof RegExp`,(0,r._)`typeof ${v}.compare != "function"`,
1043
+ p(v)))}function g(){const m=D.schema,v=y.formats[m];if(!v||v===!0)return;if(typeof v!="object"||v instanceof RegExp||typeof v.compare!="function")throw new Error(`"${d}": format "${m}" does not define "compare" function`);const $=c.scopeValue("formats",{key:m,ref:v,code:E.code.formats?(0,r._)`${E.code.formats}${(0,r.getProperty)(m)}`:void 0});a.fail$data(p($))}function p(m){return(0,r._)`${m}.compare(${l}, ${u}) ${i[d].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(t.formatLimitDefinition),
1044
+ a);t.default=o}(No)),No}var ih;function hD(){return ih||(ih=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=oD(),n=dD(),i=pe(),s=new i.Name("fullFormats"),o=new i.Name("fastFormats"),a=(l,u={keywords:!0})=>{if(Array.isArray(u))return c(l,u,r.fullFormats,s),l;const[d,h]=u.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,s],E=u.formats||r.formatNames;return c(l,E,d,h),u.keywords&&(0,n.default)(l),l};a.get=(l,u="full")=>{const h=(u==="fast"?r.fastFormats:r.fullFormats)[l];if(!h)
1045
+ throw new Error(`Unknown format "${l}"`);return h};function c(l,u,d,h){var E,y;(E=(y=l.opts.code).formats)!==null&&E!==void 0||(y.formats=(0,i._)`require("ajv-formats/dist/formats").${h}`);for(const D of u)l.addFormat(D,d[D])}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a}(ji,ji.exports)),ji.exports}var pD=hD();const mD=Ji(pD),gD=(t,e,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;const i=Object.getOwnPropertyDescriptor(t,r),s=Object.getOwnPropertyDescriptor(
1046
+ e,r);!yD(i,s)&&n||Object.defineProperty(t,r,s)},yD=function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},ED=(t,e)=>{const r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)},DD=(t,e)=>`/* Wrapped ${t}*/
1047
+ ${e}`,vD=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),$D=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),_D=(t,e,r)=>{const n=r===""?"":`with ${r.trim()}() `,i=DD.bind(null,n,e.toString());Object.defineProperty(i,"name",$D);const{writable:s,enumerable:o,configurable:a}=vD;Object.defineProperty(t,"toString",{value:i,writable:s,enumerable:o,configurable:a})};function wD(t,e,{ignoreNonConfigurable:r=!1}={}){const{name:n}=t;for(const i of Reflect.ownKeys(e))gD(t,
1048
+ e,i,r);return ED(t,e),_D(t,e,n),t}const sh=(t,e={})=>{if(typeof t!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof t}\``);const{wait:r=0,maxWait:n=Number.POSITIVE_INFINITY,before:i=!1,after:s=!0}=e;if(r<0||n<0)throw new RangeError("`wait` and `maxWait` must not be negative.");if(!i&&!s)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let o,a,c;const l=function(...u){const d=this,h=()=>{o=void 0,a&&(clearTimeout(a),a=
1049
+ void 0),s&&(c=t.apply(d,u))},E=()=>{a=void 0,o&&(clearTimeout(o),o=void 0),s&&(c=t.apply(d,u))},y=i&&!o;return clearTimeout(o),o=setTimeout(h,r),n>0&&n!==Number.POSITIVE_INFINITY&&!a&&(a=setTimeout(E,n)),y&&(c=t.apply(d,u)),c};return wD(l,t),l.cancel=()=>{o&&(clearTimeout(o),o=void 0),a&&(clearTimeout(a),a=void 0)},l};var xi={exports:{}},To,oh;function Mi(){if(oh)return To;oh=1;const t="2.0.0",e=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,i=e-6;return To={MAX_LENGTH:e,MAX_SAFE_COMPONENT_LENGTH:n,
1050
+ MAX_SAFE_BUILD_LENGTH:i,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},To}var Lo,ah;function qi(){return ah||(ah=1,Lo=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}),Lo}var uh;function rn(){return uh||(uh=1,function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,
1051
+ MAX_LENGTH:i}=Mi(),s=qi();e=t.exports={};const o=e.re=[],a=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={};let d=0;const h="[a-zA-Z0-9-]",E=[["\\s",1],["\\d",i],[h,n]],y=f=>{for(const[g,p]of E)f=f.split(`${g}*`).join(`${g}{0,${p}}`).split(`${g}+`).join(`${g}{1,${p}}`);return f},D=(f,g,p)=>{const m=y(g),v=d++;s(f,v,g),u[f]=v,c[v]=g,l[v]=m,o[v]=new RegExp(g,p?"g":void 0),a[v]=new RegExp(m,p?"g":void 0)};D("NUMERICIDENTIFIER","0|[1-9]\\d*"),D("NUMERICIDENTIFIERLOOSE","\\d+"),D("NONNUMERICIDENTIFIER",
1052
+ `\\d*[a-zA-Z-]${h}*`),D("MAINVERSION",`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),D("MAINVERSIONLOOSE",`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),D("PRERELEASEIDENTIFIER",`(?:${c[u.NUMERICIDENTIFIER]}|${c[u.NONNUMERICIDENTIFIER]})`),D("PRERELEASEIDENTIFIERLOOSE",`(?:${c[u.NUMERICIDENTIFIERLOOSE]}|${c[u.NONNUMERICIDENTIFIER]})`),D("PRERELEASE",`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.
1053
+ PRERELEASEIDENTIFIER]})*))`),D("PRERELEASELOOSE",`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),D("BUILDIDENTIFIER",`${h}+`),D("BUILD",`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),D("FULLPLAIN",`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),D("FULL",`^${c[u.FULLPLAIN]}$`),D("LOOSEPLAIN",`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),D("LOOSE",`^${c[u.LOOSEPLAIN]}$`),D("GTLT","((?:<|>)?=?)"),D("XRAN\
1054
+ GEIDENTIFIERLOOSE",`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),D("XRANGEIDENTIFIER",`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),D("XRANGEPLAIN",`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),D("XRANGEPLAINLOOSE",`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),D("XRANGE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}\
1055
+ $`),D("XRANGELOOSE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),D("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),D("COERCE",`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),D("COERCEFULL",c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),D("COERCERTL",c[u.COERCE],!0),D("COERCERTLFULL",c[u.COERCEFULL],!0),D("LONETILDE","(?:~>?)"),D("TILDETRIM",`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",D("TILDE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}\
1056
+ $`),D("TILDELOOSE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),D("LONECARET","(?:\\^)"),D("CARETTRIM",`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",D("CARET",`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),D("CARETLOOSE",`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),D("COMPARATORLOOSE",`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),D("COMPARATOR",`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),D("COMPARATORTRIM",`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=
1057
+ "$1$2$3",D("HYPHENRANGE",`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),D("HYPHENRANGELOOSE",`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),D("STAR","(<|>)?=?\\s*\\*"),D("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),D("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(xi,xi.exports)),xi.exports}var jo,ch;function ko(){if(ch)return jo;ch=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return jo=n=>n?typeof n!="object"?t:n:e,jo}var Bo,lh;function fh(){if(lh)return Bo;
1058
+ lh=1;const t=/^[0-9]+$/,e=(n,i)=>{const s=t.test(n),o=t.test(i);return s&&o&&(n=+n,i=+i),n===i?0:s&&!o?-1:o&&!s?1:n<i?-1:1};return Bo={compareIdentifiers:e,rcompareIdentifiers:(n,i)=>e(i,n)},Bo}var xo,dh;function ze(){if(dh)return xo;dh=1;const t=qi(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:r}=Mi(),{safeRe:n,safeSrc:i,t:s}=rn(),o=ko(),{compareIdentifiers:a}=fh();class c{constructor(u,d){if(d=o(d),u instanceof c){if(u.loose===!!d.loose&&u.includePrerelease===!!d.includePrerelease)return u;u=u.version}else if(typeof u!=
1059
+ "string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof u}".`);if(u.length>e)throw new TypeError(`version is longer than ${e} characters`);t("SemVer",u,d),this.options=d,this.loose=!!d.loose,this.includePrerelease=!!d.includePrerelease;const h=u.trim().match(d.loose?n[s.LOOSE]:n[s.FULL]);if(!h)throw new TypeError(`Invalid Version: ${u}`);if(this.raw=u,this.major=+h[1],this.minor=+h[2],this.patch=+h[3],this.major>r||this.major<0)throw new TypeError("Invalid major versi\
1060
+ on");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");h[4]?this.prerelease=h[4].split(".").map(E=>{if(/^[0-9]+$/.test(E)){const y=+E;if(y>=0&&y<r)return y}return E}):this.prerelease=[],this.build=h[5]?h[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){
1061
+ return this.version}compare(u){if(t("SemVer.compare",this.version,this.options,u),!(u instanceof c)){if(typeof u=="string"&&u===this.version)return 0;u=new c(u,this.options)}return u.version===this.version?0:this.compareMain(u)||this.comparePre(u)}compareMain(u){return u instanceof c||(u=new c(u,this.options)),a(this.major,u.major)||a(this.minor,u.minor)||a(this.patch,u.patch)}comparePre(u){if(u instanceof c||(u=new c(u,this.options)),this.prerelease.length&&!u.prerelease.length)return-1;if(!this.
1062
+ prerelease.length&&u.prerelease.length)return 1;if(!this.prerelease.length&&!u.prerelease.length)return 0;let d=0;do{const h=this.prerelease[d],E=u.prerelease[d];if(t("prerelease compare",d,h,E),h===void 0&&E===void 0)return 0;if(E===void 0)return 1;if(h===void 0)return-1;if(h===E)continue;return a(h,E)}while(++d)}compareBuild(u){u instanceof c||(u=new c(u,this.options));let d=0;do{const h=this.build[d],E=u.build[d];if(t("build compare",d,h,E),h===void 0&&E===void 0)return 0;if(E===void 0)return 1;
1063
+ if(h===void 0)return-1;if(h===E)continue;return a(h,E)}while(++d)}inc(u,d,h){if(u.startsWith("pre")){if(!d&&h===!1)throw new Error("invalid increment argument: identifier is empty");if(d){const E=new RegExp(`^${this.options.loose?i[s.PRERELEASELOOSE]:i[s.PRERELEASE]}$`),y=`-${d}`.match(E);if(!y||y[1]!==d)throw new Error(`invalid identifier: ${d}`)}}switch(u){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",d,h);break;case"preminor":this.prerelease.length=
1064
+ 0,this.patch=0,this.minor++,this.inc("pre",d,h);break;case"prepatch":this.prerelease.length=0,this.inc("patch",d,h),this.inc("pre",d,h);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",d,h),this.inc("pre",d,h);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];
1065
+ break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const E=Number(h)?1:0;if(this.prerelease.length===0)this.prerelease=[E];else{let y=this.prerelease.length;for(;--y>=0;)typeof this.prerelease[y]=="number"&&(this.prerelease[y]++,y=-2);if(y===-1){if(d===this.prerelease.join(".")&&h===!1)throw new Error("invalid increment argument: identifier alre\
1066
+ ady exists");this.prerelease.push(E)}}if(d){let y=[d,E];h===!1&&(y=[d]),a(this.prerelease[0],d)===0?isNaN(this.prerelease[1])&&(this.prerelease=y):this.prerelease=y}break}default:throw new Error(`invalid increment argument: ${u}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return xo=c,xo}var Mo,hh;function br(){if(hh)return Mo;hh=1;const t=ze();return Mo=(r,n,i=!1)=>{if(r instanceof t)return r;try{return new t(r,n)}catch(s){if(!i)return null;throw s}},
1067
+ Mo}var qo,ph;function bD(){if(ph)return qo;ph=1;const t=br();return qo=(r,n)=>{const i=t(r,n);return i?i.version:null},qo}var Uo,mh;function AD(){if(mh)return Uo;mh=1;const t=br();return Uo=(r,n)=>{const i=t(r.trim().replace(/^[=v]+/,""),n);return i?i.version:null},Uo}var Ho,gh;function CD(){if(gh)return Ho;gh=1;const t=ze();return Ho=(r,n,i,s,o)=>{typeof i=="string"&&(o=s,s=i,i=void 0);try{return new t(r instanceof t?r.version:r,i).inc(n,s,o).version}catch{return null}},Ho}var Vo,yh;function SD(){
1068
+ if(yh)return Vo;yh=1;const t=br();return Vo=(r,n)=>{const i=t(r,null,!0),s=t(n,null,!0),o=i.compare(s);if(o===0)return null;const a=o>0,c=a?i:s,l=a?s:i,u=!!c.prerelease.length;if(!!l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(l.compareMain(c)===0)return l.minor&&!l.patch?"minor":"patch"}const h=u?"pre":"";return i.major!==s.major?h+"major":i.minor!==s.minor?h+"minor":i.patch!==s.patch?h+"patch":"prerelease"},Vo}var zo,Eh;function RD(){if(Eh)return zo;Eh=1;const t=ze();return zo=
1069
+ (r,n)=>new t(r,n).major,zo}var Go,Dh;function OD(){if(Dh)return Go;Dh=1;const t=ze();return Go=(r,n)=>new t(r,n).minor,Go}var Wo,vh;function ID(){if(vh)return Wo;vh=1;const t=ze();return Wo=(r,n)=>new t(r,n).patch,Wo}var Ko,$h;function FD(){if($h)return Ko;$h=1;const t=br();return Ko=(r,n)=>{const i=t(r,n);return i&&i.prerelease.length?i.prerelease:null},Ko}var Yo,_h;function dt(){if(_h)return Yo;_h=1;const t=ze();return Yo=(r,n,i)=>new t(r,i).compare(new t(n,i)),Yo}var Jo,wh;function PD(){if(wh)
1070
+ return Jo;wh=1;const t=dt();return Jo=(r,n,i)=>t(n,r,i),Jo}var Xo,bh;function ND(){if(bh)return Xo;bh=1;const t=dt();return Xo=(r,n)=>t(r,n,!0),Xo}var Qo,Ah;function Zo(){if(Ah)return Qo;Ah=1;const t=ze();return Qo=(r,n,i)=>{const s=new t(r,i),o=new t(n,i);return s.compare(o)||s.compareBuild(o)},Qo}var ea,Ch;function TD(){if(Ch)return ea;Ch=1;const t=Zo();return ea=(r,n)=>r.sort((i,s)=>t(i,s,n)),ea}var ta,Sh;function LD(){if(Sh)return ta;Sh=1;const t=Zo();return ta=(r,n)=>r.sort((i,s)=>t(s,i,n)),
1071
+ ta}var ra,Rh;function Ui(){if(Rh)return ra;Rh=1;const t=dt();return ra=(r,n,i)=>t(r,n,i)>0,ra}var na,Oh;function ia(){if(Oh)return na;Oh=1;const t=dt();return na=(r,n,i)=>t(r,n,i)<0,na}var sa,Ih;function Fh(){if(Ih)return sa;Ih=1;const t=dt();return sa=(r,n,i)=>t(r,n,i)===0,sa}var oa,Ph;function Nh(){if(Ph)return oa;Ph=1;const t=dt();return oa=(r,n,i)=>t(r,n,i)!==0,oa}var aa,Th;function ua(){if(Th)return aa;Th=1;const t=dt();return aa=(r,n,i)=>t(r,n,i)>=0,aa}var ca,Lh;function la(){if(Lh)return ca;
1072
+ Lh=1;const t=dt();return ca=(r,n,i)=>t(r,n,i)<=0,ca}var fa,jh;function kh(){if(jh)return fa;jh=1;const t=Fh(),e=Nh(),r=Ui(),n=ua(),i=ia(),s=la();return fa=(a,c,l,u)=>{switch(c){case"===":return typeof a=="object"&&(a=a.version),typeof l=="object"&&(l=l.version),a===l;case"!==":return typeof a=="object"&&(a=a.version),typeof l=="object"&&(l=l.version),a!==l;case"":case"=":case"==":return t(a,l,u);case"!=":return e(a,l,u);case">":return r(a,l,u);case">=":return n(a,l,u);case"<":return i(a,l,u);case"\
1073
+ <=":return s(a,l,u);default:throw new TypeError(`Invalid operator: ${c}`)}},fa}var da,Bh;function jD(){if(Bh)return da;Bh=1;const t=ze(),e=br(),{safeRe:r,t:n}=rn();return da=(s,o)=>{if(s instanceof t)return s;if(typeof s=="number"&&(s=String(s)),typeof s!="string")return null;o=o||{};let a=null;if(!o.rtl)a=s.match(o.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const E=o.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let y;for(;(y=E.exec(s))&&(!a||a.index+a[0].length!==s.length);)(!a||
1074
+ y.index+y[0].length!==a.index+a[0].length)&&(a=y),E.lastIndex=y.index+y[1].length+y[2].length;E.lastIndex=-1}if(a===null)return null;const c=a[2],l=a[3]||"0",u=a[4]||"0",d=o.includePrerelease&&a[5]?`-${a[5]}`:"",h=o.includePrerelease&&a[6]?`+${a[6]}`:"";return e(`${c}.${l}.${u}${d}${h}`,o)},da}var ha,xh;function kD(){if(xh)return ha;xh=1;class t{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.
1075
+ map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(r,n)}return this}}return ha=t,ha}var pa,Mh;function ht(){if(Mh)return pa;Mh=1;const t=/\s+/g;class e{constructor(M,Y){if(Y=i(Y),M instanceof e)return M.loose===!!Y.loose&&M.includePrerelease===!!Y.includePrerelease?M:new e(M.raw,Y);if(M instanceof s)return this.raw=M.value,this.set=[[M]],this.formatted=void 0,this;if(this.options=Y,this.loose=!!Y.loose,
1076
+ this.includePrerelease=!!Y.includePrerelease,this.raw=M.trim().replace(t," "),this.set=this.raw.split("||").map(z=>this.parseRange(z.trim())).filter(z=>z.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const z=this.set[0];if(this.set=this.set.filter(X=>!D(X[0])),this.set.length===0)this.set=[z];else if(this.set.length>1){for(const X of this.set)if(X.length===1&&f(X[0])){this.set=[X];break}}}this.formatted=void 0}get range(){if(this.formatted===
1077
+ void 0){this.formatted="";for(let M=0;M<this.set.length;M++){M>0&&(this.formatted+="||");const Y=this.set[M];for(let z=0;z<Y.length;z++)z>0&&(this.formatted+=" "),this.formatted+=Y[z].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(M){const z=((this.options.includePrerelease&&E)|(this.options.loose&&y))+":"+M,X=n.get(z);if(X)return X;const se=this.options.loose,q=se?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];M=M.replace(q,B(this.options.includePrerelease)),
1078
+ o("hyphen replace",M),M=M.replace(c[l.COMPARATORTRIM],u),o("comparator trim",M),M=M.replace(c[l.TILDETRIM],d),o("tilde trim",M),M=M.replace(c[l.CARETTRIM],h),o("caret trim",M);let C=M.split(" ").map(A=>p(A,this.options)).join(" ").split(/\s+/).map(A=>L(A,this.options));se&&(C=C.filter(A=>(o("loose invalid filter",A,this.options),!!A.match(c[l.COMPARATORLOOSE])))),o("range list",C);const U=new Map,k=C.map(A=>new s(A,this.options));for(const A of k){if(D(A))return[A];U.set(A.value,A)}U.size>1&&U.has(
1079
+ "")&&U.delete("");const w=[...U.values()];return n.set(z,w),w}intersects(M,Y){if(!(M instanceof e))throw new TypeError("a Range is required");return this.set.some(z=>g(z,Y)&&M.set.some(X=>g(X,Y)&&z.every(se=>X.every(q=>se.intersects(q,Y)))))}test(M){if(!M)return!1;if(typeof M=="string")try{M=new a(M,this.options)}catch{return!1}for(let Y=0;Y<this.set.length;Y++)if(N(this.set[Y],M,this.options))return!0;return!1}}pa=e;const r=kD(),n=new r,i=ko(),s=Hi(),o=qi(),a=ze(),{safeRe:c,t:l,comparatorTrimReplace:u,
1080
+ tildeTrimReplace:d,caretTrimReplace:h}=rn(),{FLAG_INCLUDE_PRERELEASE:E,FLAG_LOOSE:y}=Mi(),D=j=>j.value==="<0.0.0-0",f=j=>j.value==="",g=(j,M)=>{let Y=!0;const z=j.slice();let X=z.pop();for(;Y&&z.length;)Y=z.every(se=>X.intersects(se,M)),X=z.pop();return Y},p=(j,M)=>(o("comp",j,M),j=_(j,M),o("caret",j),j=v(j,M),o("tildes",j),j=I(j,M),o("xrange",j),j=G(j,M),o("stars",j),j),m=j=>!j||j.toLowerCase()==="x"||j==="*",v=(j,M)=>j.trim().split(/\s+/).map(Y=>$(Y,M)).join(" "),$=(j,M)=>{const Y=M.loose?c[l.
1081
+ TILDELOOSE]:c[l.TILDE];return j.replace(Y,(z,X,se,q,C)=>{o("tilde",j,z,X,se,q,C);let U;return m(X)?U="":m(se)?U=`>=${X}.0.0 <${+X+1}.0.0-0`:m(q)?U=`>=${X}.${se}.0 <${X}.${+se+1}.0-0`:C?(o("replaceTilde pr",C),U=`>=${X}.${se}.${q}-${C} <${X}.${+se+1}.0-0`):U=`>=${X}.${se}.${q} <${X}.${+se+1}.0-0`,o("tilde return",U),U})},_=(j,M)=>j.trim().split(/\s+/).map(Y=>b(Y,M)).join(" "),b=(j,M)=>{o("caret",j,M);const Y=M.loose?c[l.CARETLOOSE]:c[l.CARET],z=M.includePrerelease?"-0":"";return j.replace(Y,(X,se,q,C,U)=>{
1082
+ o("caret",j,X,se,q,C,U);let k;return m(se)?k="":m(q)?k=`>=${se}.0.0${z} <${+se+1}.0.0-0`:m(C)?se==="0"?k=`>=${se}.${q}.0${z} <${se}.${+q+1}.0-0`:k=`>=${se}.${q}.0${z} <${+se+1}.0.0-0`:U?(o("replaceCaret pr",U),se==="0"?q==="0"?k=`>=${se}.${q}.${C}-${U} <${se}.${q}.${+C+1}-0`:k=`>=${se}.${q}.${C}-${U} <${se}.${+q+1}.0-0`:k=`>=${se}.${q}.${C}-${U} <${+se+1}.0.0-0`):(o("no pr"),se==="0"?q==="0"?k=`>=${se}.${q}.${C}${z} <${se}.${q}.${+C+1}-0`:k=`>=${se}.${q}.${C}${z} <${se}.${+q+1}.0-0`:k=`>=${se}.${q}\
1083
+ .${C} <${+se+1}.0.0-0`),o("caret return",k),k})},I=(j,M)=>(o("replaceXRanges",j,M),j.split(/\s+/).map(Y=>V(Y,M)).join(" ")),V=(j,M)=>{j=j.trim();const Y=M.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return j.replace(Y,(z,X,se,q,C,U)=>{o("xRange",j,z,X,se,q,C,U);const k=m(se),w=k||m(q),A=w||m(C),R=A;return X==="="&&R&&(X=""),U=M.includePrerelease?"-0":"",k?X===">"||X==="<"?z="<0.0.0-0":z="*":X&&R?(w&&(q=0),C=0,X===">"?(X=">=",w?(se=+se+1,q=0,C=0):(q=+q+1,C=0)):X==="<="&&(X="<",w?se=+se+1:q=+q+1),X==="<"&&
1084
+ (U="-0"),z=`${X+se}.${q}.${C}${U}`):w?z=`>=${se}.0.0${U} <${+se+1}.0.0-0`:A&&(z=`>=${se}.${q}.0${U} <${se}.${+q+1}.0-0`),o("xRange return",z),z})},G=(j,M)=>(o("replaceStars",j,M),j.trim().replace(c[l.STAR],"")),L=(j,M)=>(o("replaceGTE0",j,M),j.trim().replace(c[M.includePrerelease?l.GTE0PRE:l.GTE0],"")),B=j=>(M,Y,z,X,se,q,C,U,k,w,A,R)=>(m(z)?Y="":m(X)?Y=`>=${z}.0.0${j?"-0":""}`:m(se)?Y=`>=${z}.${X}.0${j?"-0":""}`:q?Y=`>=${Y}`:Y=`>=${Y}${j?"-0":""}`,m(k)?U="":m(w)?U=`<${+k+1}.0.0-0`:m(A)?U=`<${k}.${+w+
1085
+ 1}.0-0`:R?U=`<=${k}.${w}.${A}-${R}`:j?U=`<${k}.${w}.${+A+1}-0`:U=`<=${U}`,`${Y} ${U}`.trim()),N=(j,M,Y)=>{for(let z=0;z<j.length;z++)if(!j[z].test(M))return!1;if(M.prerelease.length&&!Y.includePrerelease){for(let z=0;z<j.length;z++)if(o(j[z].semver),j[z].semver!==s.ANY&&j[z].semver.prerelease.length>0){const X=j[z].semver;if(X.major===M.major&&X.minor===M.minor&&X.patch===M.patch)return!0}return!1}return!0};return pa}var ma,qh;function Hi(){if(qh)return ma;qh=1;const t=Symbol("SemVer ANY");class e{static get ANY(){
1086
+ return t}constructor(u,d){if(d=r(d),u instanceof e){if(u.loose===!!d.loose)return u;u=u.value}u=u.trim().split(/\s+/).join(" "),o("comparator",u,d),this.options=d,this.loose=!!d.loose,this.parse(u),this.semver===t?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(u){const d=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],h=u.match(d);if(!h)throw new TypeError(`Invalid comparator: ${u}`);this.operator=h[1]!==void 0?h[1]:"",this.operator==="="&&(this.operator=
1087
+ ""),h[2]?this.semver=new a(h[2],this.options.loose):this.semver=t}toString(){return this.value}test(u){if(o("Comparator.test",u,this.options.loose),this.semver===t||u===t)return!0;if(typeof u=="string")try{u=new a(u,this.options)}catch{return!1}return s(u,this.operator,this.semver,this.options)}intersects(u,d){if(!(u instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new c(u.value,d).test(this.value):u.operator===""?u.value===""?!0:new c(this.
1088
+ value,d).test(u.semver):(d=r(d),d.includePrerelease&&(this.value==="<0.0.0-0"||u.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||u.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&u.operator.startsWith(">")||this.operator.startsWith("<")&&u.operator.startsWith("<")||this.semver.version===u.semver.version&&this.operator.includes("=")&&u.operator.includes("=")||s(this.semver,"<",u.semver,d)&&this.operator.startsWith(">")&&u.operator.startsWith("<")||s(this.
1089
+ semver,">",u.semver,d)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}ma=e;const r=ko(),{safeRe:n,t:i}=rn(),s=kh(),o=qi(),a=ze(),c=ht();return ma}var ga,Uh;function Vi(){if(Uh)return ga;Uh=1;const t=ht();return ga=(r,n,i)=>{try{n=new t(n,i)}catch{return!1}return n.test(r)},ga}var ya,Hh;function BD(){if(Hh)return ya;Hh=1;const t=ht();return ya=(r,n)=>new t(r,n).set.map(i=>i.map(s=>s.value).join(" ").trim().split(" ")),ya}var Ea,Vh;function xD(){if(Vh)return Ea;Vh=1;const t=ze(),e=ht();
1090
+ return Ea=(n,i,s)=>{let o=null,a=null,c=null;try{c=new e(i,s)}catch{return null}return n.forEach(l=>{c.test(l)&&(!o||a.compare(l)===-1)&&(o=l,a=new t(o,s))}),o},Ea}var Da,zh;function MD(){if(zh)return Da;zh=1;const t=ze(),e=ht();return Da=(n,i,s)=>{let o=null,a=null,c=null;try{c=new e(i,s)}catch{return null}return n.forEach(l=>{c.test(l)&&(!o||a.compare(l)===1)&&(o=l,a=new t(o,s))}),o},Da}var va,Gh;function qD(){if(Gh)return va;Gh=1;const t=ze(),e=ht(),r=Ui();return va=(i,s)=>{i=new e(i,s);let o=new t(
1091
+ "0.0.0");if(i.test(o)||(o=new t("0.0.0-0"),i.test(o)))return o;o=null;for(let a=0;a<i.set.length;++a){const c=i.set[a];let l=null;c.forEach(u=>{const d=new t(u.semver.version);switch(u.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!l||r(d,l))&&(l=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),l&&(!o||r(o,l))&&(o=l)}return o&&i.test(o)?o:null},va}var $a,Wh;function UD(){if(Wh)return $a;
1092
+ Wh=1;const t=ht();return $a=(r,n)=>{try{return new t(r,n).range||"*"}catch{return null}},$a}var _a,Kh;function wa(){if(Kh)return _a;Kh=1;const t=ze(),e=Hi(),{ANY:r}=e,n=ht(),i=Vi(),s=Ui(),o=ia(),a=la(),c=ua();return _a=(u,d,h,E)=>{u=new t(u,E),d=new n(d,E);let y,D,f,g,p;switch(h){case">":y=s,D=a,f=o,g=">",p=">=";break;case"<":y=o,D=c,f=s,g="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(u,d,E))return!1;for(let m=0;m<d.set.length;++m){const v=d.set[m];let $=null,
1093
+ _=null;if(v.forEach(b=>{b.semver===r&&(b=new e(">=0.0.0")),$=$||b,_=_||b,y(b.semver,$.semver,E)?$=b:f(b.semver,_.semver,E)&&(_=b)}),$.operator===g||$.operator===p||(!_.operator||_.operator===g)&&D(u,_.semver))return!1;if(_.operator===p&&f(u,_.semver))return!1}return!0},_a}var ba,Yh;function HD(){if(Yh)return ba;Yh=1;const t=wa();return ba=(r,n,i)=>t(r,n,">",i),ba}var Aa,Jh;function VD(){if(Jh)return Aa;Jh=1;const t=wa();return Aa=(r,n,i)=>t(r,n,"<",i),Aa}var Ca,Xh;function zD(){if(Xh)return Ca;Xh=
1094
+ 1;const t=ht();return Ca=(r,n,i)=>(r=new t(r,i),n=new t(n,i),r.intersects(n,i)),Ca}var Sa,Qh;function GD(){if(Qh)return Sa;Qh=1;const t=Vi(),e=dt();return Sa=(r,n,i)=>{const s=[];let o=null,a=null;const c=r.sort((h,E)=>e(h,E,i));for(const h of c)t(h,n,i)?(a=h,o||(o=h)):(a&&s.push([o,a]),a=null,o=null);o&&s.push([o,null]);const l=[];for(const[h,E]of s)h===E?l.push(h):!E&&h===c[0]?l.push("*"):E?h===c[0]?l.push(`<=${E}`):l.push(`${h} - ${E}`):l.push(`>=${h}`);const u=l.join(" || "),d=typeof n.raw==
1095
+ "string"?n.raw:String(n);return u.length<d.length?u:n},Sa}var Ra,Zh;function WD(){if(Zh)return Ra;Zh=1;const t=ht(),e=Hi(),{ANY:r}=e,n=Vi(),i=dt(),s=(d,h,E={})=>{if(d===h)return!0;d=new t(d,E),h=new t(h,E);let y=!1;e:for(const D of d.set){for(const f of h.set){const g=c(D,f,E);if(y=y||g!==null,g)continue e}if(y)return!1}return!0},o=[new e(">=0.0.0-0")],a=[new e(">=0.0.0")],c=(d,h,E)=>{if(d===h)return!0;if(d.length===1&&d[0].semver===r){if(h.length===1&&h[0].semver===r)return!0;E.includePrerelease?
1096
+ d=o:d=a}if(h.length===1&&h[0].semver===r){if(E.includePrerelease)return!0;h=a}const y=new Set;let D,f;for(const I of d)I.operator===">"||I.operator===">="?D=l(D,I,E):I.operator==="<"||I.operator==="<="?f=u(f,I,E):y.add(I.semver);if(y.size>1)return null;let g;if(D&&f){if(g=i(D.semver,f.semver,E),g>0)return null;if(g===0&&(D.operator!==">="||f.operator!=="<="))return null}for(const I of y){if(D&&!n(I,String(D),E)||f&&!n(I,String(f),E))return null;for(const V of h)if(!n(I,String(V),E))return!1;return!0}
1097
+ let p,m,v,$,_=f&&!E.includePrerelease&&f.semver.prerelease.length?f.semver:!1,b=D&&!E.includePrerelease&&D.semver.prerelease.length?D.semver:!1;_&&_.prerelease.length===1&&f.operator==="<"&&_.prerelease[0]===0&&(_=!1);for(const I of h){if($=$||I.operator===">"||I.operator===">=",v=v||I.operator==="<"||I.operator==="<=",D){if(b&&I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===b.major&&I.semver.minor===b.minor&&I.semver.patch===b.patch&&(b=!1),I.operator===">"||I.operator===">="){
1098
+ if(p=l(D,I,E),p===I&&p!==D)return!1}else if(D.operator===">="&&!n(D.semver,String(I),E))return!1}if(f){if(_&&I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===_.major&&I.semver.minor===_.minor&&I.semver.patch===_.patch&&(_=!1),I.operator==="<"||I.operator==="<="){if(m=u(f,I,E),m===I&&m!==f)return!1}else if(f.operator==="<="&&!n(f.semver,String(I),E))return!1}if(!I.operator&&(f||D)&&g!==0)return!1}return!(D&&v&&!f&&g!==0||f&&$&&!D&&g!==0||b||_)},l=(d,h,E)=>{if(!d)return h;const y=i(
1099
+ d.semver,h.semver,E);return y>0?d:y<0||h.operator===">"&&d.operator===">="?h:d},u=(d,h,E)=>{if(!d)return h;const y=i(d.semver,h.semver,E);return y<0?d:y>0||h.operator==="<"&&d.operator==="<="?h:d};return Ra=s,Ra}var Oa,ep;function KD(){if(ep)return Oa;ep=1;const t=rn(),e=Mi(),r=ze(),n=fh(),i=br(),s=bD(),o=AD(),a=CD(),c=SD(),l=RD(),u=OD(),d=ID(),h=FD(),E=dt(),y=PD(),D=ND(),f=Zo(),g=TD(),p=LD(),m=Ui(),v=ia(),$=Fh(),_=Nh(),b=ua(),I=la(),V=kh(),G=jD(),L=Hi(),B=ht(),N=Vi(),j=BD(),M=xD(),Y=MD(),z=qD(),
1100
+ X=UD(),se=wa(),q=HD(),C=VD(),U=zD(),k=GD(),w=WD();return Oa={parse:i,valid:s,clean:o,inc:a,diff:c,major:l,minor:u,patch:d,prerelease:h,compare:E,rcompare:y,compareLoose:D,compareBuild:f,sort:g,rsort:p,gt:m,lt:v,eq:$,neq:_,gte:b,lte:I,cmp:V,coerce:G,Comparator:L,Range:B,satisfies:N,toComparators:j,maxSatisfying:M,minSatisfying:Y,minVersion:z,validRange:X,outside:se,gtr:q,ltr:C,intersects:U,simplifyRange:k,subset:w,SemVer:r,re:t.re,src:t.src,tokens:t.t,SEMVER_SPEC_VERSION:e.SEMVER_SPEC_VERSION,RELEASE_TYPES:e.
1101
+ RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},Oa}var Ia=KD();const Ar=Ji(Ia),YD=Object.prototype.toString,JD="[object Uint8Array]",XD="[object ArrayBuffer]";function tp(t,e,r){return t?t.constructor===e?!0:YD.call(t)===r:!1}function rp(t){return tp(t,Uint8Array,JD)}function QD(t){return tp(t,ArrayBuffer,XD)}function ZD(t){return rp(t)||QD(t)}function ev(t){if(!rp(t))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof t}\``)}function tv(t){
1102
+ if(!ZD(t))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``)}function np(t,e){if(t.length===0)return new Uint8Array(0);e??=t.reduce((i,s)=>i+s.length,0);const r=new Uint8Array(e);let n=0;for(const i of t)ev(i),r.set(i,n),n+=i.length;return r}const ip={utf8:new globalThis.TextDecoder("utf8")};function sp(t,e="utf8"){return tv(t),ip[e]??=new globalThis.TextDecoder(e),ip[e].decode(t)}function rv(t){if(typeof t!="string")throw new TypeError(`Expected \`string\`, got\
1103
+ \`${typeof t}\``)}const nv=new globalThis.TextEncoder;function Fa(t){return rv(t),nv.encode(t)}Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));const iv=mD.default,op="aes-256-cbc",Cr=()=>Object.create(null),sv=t=>t!=null,ov=(t,e)=>{const r=new Set(["undefined","symbol","function"]),n=typeof e;if(r.has(n))throw new TypeError(`Setting a value of type \`${n}\` for key \`${t}\` is not allowed as it's not supported by JSON`)},zi="__internal__",Pa=`${zi}.migrations.version`;class av{path;events;#n;#t;#e;#r={};constructor(e={}){
1104
+ const r={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...e};if(!r.cwd){if(!r.projectName)throw new Error("Please specify the `projectName` option.");r.cwd=vy(r.projectName,{suffix:r.projectSuffix}).config}if(this.#e=r,r.schema??r.ajvOptions??r.rootSchema){if(r.schema&&typeof r.schema!="object")throw new TypeError("The `schema` option must be an object.");const o=new sD.Ajv2020({allErrors:!0,useDefaults:!0,
1105
+ ...r.ajvOptions});iv(o);const a={...r.rootSchema,type:"object",properties:r.schema};this.#n=o.compile(a);for(const[c,l]of Object.entries(r.schema??{}))l?.default&&(this.#r[c]=l.default)}r.defaults&&(this.#r={...this.#r,...r.defaults}),r.serialize&&(this._serialize=r.serialize),r.deserialize&&(this._deserialize=r.deserialize),this.events=new EventTarget,this.#t=r.encryptionKey;const n=r.fileExtension?`.${r.fileExtension}`:"";this.path=be.resolve(r.cwd,`${r.configName??"config"}${n}`);const i=this.
1106
+ store,s=Object.assign(Cr(),r.defaults,i);if(r.migrations){if(!r.projectVersion)throw new Error("Please specify the `projectVersion` option.");this._migrate(r.migrations,r.projectVersion,r.beforeEachMigration)}this._validate(s);try{sm.deepEqual(i,s)}catch{this.store=s}r.watch&&this._watch()}get(e,r){if(this.#e.accessPropertiesByDotNotation)return this._get(e,r);const{store:n}=this;return e in n?n[e]:r}set(e,r){if(typeof e!="string"&&typeof e!="object")throw new TypeError(`Expected \`key\` to be of \
1107
+ type \`string\` or \`object\`, got ${typeof e}`);if(typeof e!="object"&&r===void 0)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw new TypeError(`Please don't use the ${zi} key, as it's used to manage this module internal operations.`);const{store:n}=this,i=(s,o)=>{ov(s,o),this.#e.accessPropertiesByDotNotation?Mc(n,s,o):n[s]=o};if(typeof e=="object"){const s=e;for(const[o,a]of Object.entries(s))i(o,a)}else i(e,r);this.store=n}has(e){return this.#e.accessPropertiesByDotNotation?
1108
+ gy(this.store,e):e in this.store}reset(...e){for(const r of e)sv(this.#r[r])&&this.set(r,this.#r[r])}delete(e){const{store:r}=this;this.#e.accessPropertiesByDotNotation?my(r,e):delete r[e],this.store=r}clear(){this.store=Cr();for(const e of Object.keys(this.#r))this.reset(e)}onDidChange(e,r){if(typeof e!="string")throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof e}`);if(typeof r!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof r}`);
1109
+ return this._handleChange(()=>this.get(e),r)}onDidAnyChange(e){if(typeof e!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof e}`);return this._handleChange(()=>this.store,e)}get size(){return Object.keys(this.store).length}get store(){try{const e=ge.readFileSync(this.path,this.#t?null:"utf8"),r=this._encryptData(e),n=this._deserialize(r);return this._validate(n),Object.assign(Cr(),n)}catch(e){if(e?.code==="ENOENT")return this._ensureDirectory(),Cr();
1110
+ if(this.#e.clearInvalidConfig&&e.name==="SyntaxError")return Cr();throw e}}set store(e){this._ensureDirectory(),this._validate(e),this._write(e),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(const[e,r]of Object.entries(this.store))yield[e,r]}_encryptData(e){if(!this.#t)return typeof e=="string"?e:sp(e);try{const r=e.slice(0,16),n=Pr.pbkdf2Sync(this.#t,r.toString(),1e4,32,"sha512"),i=Pr.createDecipheriv(op,n,r),s=e.slice(17),o=typeof s=="string"?Fa(s):s;return sp(np([i.update(
1111
+ o),i.final()]))}catch{}return e.toString()}_handleChange(e,r){let n=e();const i=()=>{const s=n,o=e();im(o,s)||(n=o,r.call(this,o,s))};return this.events.addEventListener("change",i),()=>{this.events.removeEventListener("change",i)}}_deserialize=e=>JSON.parse(e);_serialize=e=>JSON.stringify(e,void 0," ");_validate(e){if(!this.#n||this.#n(e)||!this.#n.errors)return;const n=this.#n.errors.map(({instancePath:i,message:s=""})=>`\`${i.slice(1)}\` ${s}`);throw new Error("Config schema violation: "+n.join(
1112
+ "; "))}_ensureDirectory(){ge.mkdirSync(be.dirname(this.path),{recursive:!0})}_write(e){let r=this._serialize(e);if(this.#t){const n=Pr.randomBytes(16),i=Pr.pbkdf2Sync(this.#t,n.toString(),1e4,32,"sha512"),s=Pr.createCipheriv(op,i,n);r=np([n,Fa(":"),s.update(Fa(r)),s.final()])}if(Te.env.SNAP)ge.writeFileSync(this.path,r,{mode:this.#e.configFileMode});else try{zc(this.path,r,{mode:this.#e.configFileMode})}catch(n){if(n?.code==="EXDEV"){ge.writeFileSync(this.path,r,{mode:this.#e.configFileMode});return}
1113
+ throw n}}_watch(){this._ensureDirectory(),ge.existsSync(this.path)||this._write(Cr()),Te.platform==="win32"?ge.watch(this.path,{persistent:!1},sh(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100})):ge.watchFile(this.path,{persistent:!1},sh(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5e3}))}_migrate(e,r,n){let i=this._get(Pa,"0.0.0");const s=Object.keys(e).filter(a=>this._shouldPerformMigration(a,i,r));let o={...this.store};for(const a of s)try{n&&n(this,{fromVersion:i,
1114
+ toVersion:a,finalVersion:r,versions:s});const c=e[a];c?.(this),this._set(Pa,a),i=a,o={...this.store}}catch(c){throw this.store=o,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${c}`)}(this._isVersionInRangeFormat(i)||!Ar.eq(i,r))&&this._set(Pa,r)}_containsReservedKey(e){return typeof e=="object"&&Object.keys(e)[0]===zi?!0:typeof e!="string"?!1:this.#e.accessPropertiesByDotNotation?!!e.startsWith(`${zi}.`):!1}_isVersionInRangeFormat(e){
1115
+ return Ar.clean(e)===null}_shouldPerformMigration(e,r,n){return this._isVersionInRangeFormat(e)?r!=="0.0.0"&&Ar.satisfies(r,e)?!1:Ar.satisfies(n,e):!(Ar.lte(e,r)||Ar.gt(e,n))}_get(e,r){return py(this.store,e,r)}_set(e,r){const{store:n}=this;Mc(n,e,r),this.store=n}}class ap extends Error{response;request;options;constructor(e,r,n){const i=e.status||e.status===0?e.status:"",s=e.statusText||"",o=`${i} ${s}`.trim(),a=o?`status code ${o}`:"an unknown error";super(`Request failed with ${a}: ${r.method}\
1116
+ ${r.url}`),this.name="HTTPError",this.response=e,this.request=r,this.options=n}}class up extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}}const nn=t=>t!==null&&typeof t=="object",Gi=(...t)=>{for(const e of t)if((!nn(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return Na({},...t)},cp=(t={},e={})=>{const r=new globalThis.Headers(t),n=e instanceof globalThis.Headers,i=new globalThis.
1117
+ Headers(e);for(const[s,o]of i.entries())n&&o==="undefined"||o===void 0?r.delete(s):r.set(s,o);return r};function Wi(t,e,r){return Object.hasOwn(e,r)&&e[r]===void 0?[]:Na(t[r]??[],e[r]??[])}const lp=(t={},e={})=>({beforeRequest:Wi(t,e,"beforeRequest"),beforeRetry:Wi(t,e,"beforeRetry"),afterResponse:Wi(t,e,"afterResponse"),beforeError:Wi(t,e,"beforeError")}),Na=(...t)=>{let e={},r={},n={};for(const i of t)if(Array.isArray(i))Array.isArray(e)||(e=[]),e=[...e,...i];else if(nn(i)){for(let[s,o]of Object.
1118
+ entries(i))nn(o)&&s in e&&(o=Na(e[s],o)),e={...e,[s]:o};nn(i.hooks)&&(n=lp(n,i.hooks),e.hooks=n),nn(i.headers)&&(r=cp(r,i.headers),e.headers=r)}return e},uv=(()=>{let t=!1,e=!1;const r=typeof globalThis.ReadableStream=="function",n=typeof globalThis.Request=="function";if(r&&n)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported\
1119
+ BodyInit type")return!1;throw i}return t&&!e})(),cv=typeof globalThis.AbortController=="function",lv=typeof globalThis.ReadableStream=="function",fv=typeof globalThis.FormData=="function",fp=["get","post","put","patch","head","delete"],dv={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Ta=2147483647,dp=Symbol("stop"),hv={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,
1120
+ fetch:!0},pv={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},mv=t=>fp.includes(t)?t.toUpperCase():t,gv=["get","put","head","delete","options","trace"],yv=[408,413,429,500,502,503,504],Ev=[413,429,503],hp={limit:2,methods:gv,statusCodes:yv,afterStatusCodes:Ev,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},
1121
+ Dv=(t={})=>{if(typeof t=="number")return{...hp,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...hp,...t}};async function vv(t,e,r,n){return new Promise((i,s)=>{const o=setTimeout(()=>{r&&r.abort(),s(new up(t))},n.timeout);n.fetch(t,e).then(i).catch(s).then(()=>{clearTimeout(o)})})}async function $v(t,{signal:e}){return new Promise((r,n)=>{
1122
+ e&&(e.throwIfAborted(),e.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(s),n(e.reason)}const s=setTimeout(()=>{e?.removeEventListener("abort",i),r()},t)})}const _v=(t,e)=>{const r={};for(const n in e)!(n in pv)&&!(n in hv)&&!(n in t)&&(r[n]=e[n]);return r};class Yi{static create(e,r){const n=new Yi(e,r),i=async()=>{if(typeof n._options.timeout=="number"&&n._options.timeout>Ta)throw new RangeError(`The \`timeout\` option cannot be greater than ${Ta}`);await Promise.resolve();let a=await n.
1123
+ _fetch();for(const c of n._options.hooks.afterResponse){const l=await c(n.request,n._options,n._decorateResponse(a.clone()));l instanceof globalThis.Response&&(a=l)}if(n._decorateResponse(a),!a.ok&&n._options.throwHttpErrors){let c=new ap(a,n.request,n._options);for(const l of n._options.hooks.beforeError)c=await l(c);throw c}if(n._options.onDownloadProgress){if(typeof n._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!lv)throw new Error(
1124
+ "Streams are not supported in your environment. `ReadableStream` is missing.");return n._stream(a.clone(),n._options.onDownloadProgress)}return a},o=n._options.retry.methods.includes(n.request.method.toLowerCase())?n._retry(i):i();for(const[a,c]of Object.entries(dv))o[a]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||c);const l=await o;if(a==="json"){if(l.status===204||(await l.clone().arrayBuffer()).byteLength===0)return"";if(r.parseJson)return r.parseJson(await l.text())}
1125
+ return l[a]()};return o}request;abortController;_retryCount=0;_input;_options;constructor(e,r={}){if(this._input=e,this._options={...r,headers:cp(this._input.headers,r.headers),hooks:lp({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:mv(r.method??this._input.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:Dv(r.retry),throwHttpErrors:r.throwHttpErrors!==!1,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&
1126
+ !(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(cv){this.abortController=new globalThis.AbortController;const n=this._options.
1127
+ signal??this._input.signal;n?.aborted&&this.abortController.abort(n?.reason),n?.addEventListener("abort",()=>{this.abortController.abort(n.reason)}),this._options.signal=this.abortController.signal}if(uv&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=this._options.stringifyJson?.(this._options.json)??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.
1128
+ Request(this._input,this._options),this._options.searchParams){const i="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),s=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,i);(fv&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=
1129
+ new globalThis.Request(new globalThis.Request(s,{...this.request}),this._options)}}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof up)throw e;if(e instanceof ap){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;const n=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(n&&this._options.retry.afterStatusCodes.
1130
+ includes(e.response.status)){let i=Number(n)*1e3;Number.isNaN(i)?i=Date.parse(n)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());const s=this._options.retry.maxRetryAfter??i;return i<s?i:s}if(e.response.status===413)throw e}const r=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,r)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(r){const n=Math.
1131
+ min(this._calculateRetryDelay(r),Ta);if(this._retryCount<1)throw r;await $v(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})===dp)return;return this._retry(e)}}async _fetch(){for(const n of this._options.hooks.beforeRequest){const i=await n(this.request,this._options);if(i instanceof Request){this.request=i;break}if(i instanceof Response)return i}const e=_v(this.request,this.
1132
+ _options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,e):vv(r,e,this.abortController,this._options)}_stream(e,r){const n=Number(e.headers.get("content-length"))||0;let i=0;return e.status===204?(r&&r({percent:1,totalBytes:n,transferredBytes:i},new Uint8Array),new globalThis.Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(s){const o=e.body.getReader();r&&
1133
+ r({percent:0,transferredBytes:0,totalBytes:n},new Uint8Array);async function a(){const{done:c,value:l}=await o.read();if(c){s.close();return}if(r){i+=l.byteLength;const u=n===0?0:i/n;r({percent:u,transferredBytes:i,totalBytes:n},l)}s.enqueue(l),await a()}await a()}}),{status:e.status,statusText:e.statusText,headers:e.headers})}}const La=t=>{const e=(r,n)=>Yi.create(r,Gi(t,n));for(const r of fp)e[r]=(n,i)=>Yi.create(n,Gi(t,i,{method:r}));return e.create=r=>La(Gi(r)),e.extend=r=>(typeof r=="functi\
1134
+ on"&&(r=r(t??{})),La(Gi(t,r))),e.stop=dp,e},wv=La(),ja=new av({projectName:Op,serialize:t=>Ct.stringify(t,null,2),deserialize:t=>Ct.parse(t)}),bv=1e3*60*60*24,pp="check-update";function Av(){if(lm||as===pp)return;const t=ja.get("lastUpdateCheck"),e=ja.get("latestVersion");(Ip(e)||Xi(t)||t+bv<Date.now())&&Fp("likec4",["check-update"],{stdio:"ignore",preferLocal:!0,detached:!0,env:{NODE_ENV:pp}}).catch(()=>{}),e&&Ia.gt(e,dr)&&zt(["Update available: ",K.dim(dr),K.reset(" \u2192 "),K.green(e)].join(
1135
+ ""))}async function Cv(){try{const t=await Sv();os(t,"No version found in latest npm"),ja.set({lastUpdateCheck:Date.now(),latestVersion:t}),Ia.gt(t,dr)?zt(["Update available: ",K.dim(dr),K.reset(" \u2192 "),K.green(t)].join("")):zt(K.dim("Up to date: ")+" "+K.green(dr))}catch(t){za.error(Pp(t))}}async function Sv(){return(await wv("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}
1136
+ async function Rv(t,e,r){const n=".ts";e=e??De(t.workspace,"likec4.generated"+n),Or(e)!==n&&(e=e+n),await $t(Gt(e),{recursive:!0});const i=await t.diagrams(),s=Hg([...i]);await Kt(e,s),r.info(`${K.dim("generated")} ${Wt(process.cwd(),e)}`)}async function Ov(t,e,r){await $t(e,{recursive:!0}),r.info(`${K.dim("format")} ${K.green("dot")}`),r.info(`${K.dim("outdir")} ${e}`);const n=new Set,i=await t.viewsService.computedViews();let s=0;for(const o of i)try{const a=await t.viewsService.layouter.dot(o),
1137
+ c=o.relativePath??"";c!==""&&!n.has(c)&&(await $t(De(e,c),{recursive:!0}),n.add(c));const l=De(e,c,o.id+".dot");await Kt(l,a),r.info(`${K.dim("generated")} ${Wt(process.cwd(),l)}`),s++}catch(a){za.error(`error while generating ${o.id}`,{error:a})}s>0&&r.info(`${K.dim("total")} ${s} files`)}async function Iv(t,e,r,n){await $t(r,{recursive:!0}),n.info(`${K.dim("format")} ${K.green(e)}`),n.info(`${K.dim("outdir")} ${r}`);let i,s;switch(e){case"d2":i=".d2",s=Ac;break;case"mermaid":i=".mmd",s=Cc;break;default:
1138
+ eu(e)}const o=new Set,a=await t.diagrams();let c=0;for(const l of a)try{let u=l.relativePath??".";u.includes("/")?u=u.slice(0,u.lastIndexOf("/")):u=".",u!==""&&!o.has(u)&&(await $t(De(r,u),{recursive:!0}),o.add(u));const d=De(r,u,l.id+i),h=s(l);await Kt(d,h),n.info(`${K.dim("generated")} ${Wt(process.cwd(),d)}`),c++}catch(u){n.error(`error while generating ${l.id}`,{error:u})}c>0&&n.info(`${K.dim("total")} ${c} files`)}async function Ki({path:t,useDotBin:e,...r}){const n=Dt("c4:codegen"),i=Sr(n),
1139
+ s=await vt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});if((await s.viewsService.computedViews()).length===0)throw n.warn("no views found"),process.exitCode=1,new Error("no views found");switch(r.format){case"views":{await Rv(s,r.outfile,n);break}case"dot":{await Ov(s,r.outdir??t,n);break}case"d2":case"mermaid":{await Iv(s,r.format,r.outdir??t,n);break}default:eu(r)}i.stopAndLog()}async function Fv({path:t,useDotBin:e,outfile:r}){const n=Dt("c4:codegen"),i=Sr(n),s=await vt.fromWorkspace(
1140
+ t,{logger:"vite",graphviz:e?"binary":"wasm"});n.info(`${K.dim("format")} ${K.green("model")}`);const o=await s.layoutedModel();for(const d of o.views())d.$view.hasLayoutDrift&&n.warn(K.yellow("drift detected, manual layout can not be applied, view:")+" "+K.red(d.id));let a=De(s.workspace,"likec4-model.ts");if(r&&(a=ns(r)?r:De(r),Pt(r)&&(await ss(r)).isDirectory()))throw new Error(`output file is a directory: ${r}`);const c=sn(a);n.info(`${K.dim("filename")} ${c}`);const l=Or(c).toLocaleLowerCase();
1141
+ if(![".ts",".mts",".cts"].includes(l))throw n.error(`output file ${r} has extension "${l}"`),new Error(`output file ${r} must be a .ts, .mts or .cts file`);const u=Gt(a);n.info(`${K.dim("outdir")} ${u}`),await $t(u,{recursive:!0}),await Kt(a,qg(o),{encoding:"utf-8"}),zt(Qi(`
1142
+ ${K.dim("Source with LikeC4Model generated:")}
1143
+ ${Wt(Zi(),a)}
1144
+
1145
+ ${K.dim("How to use:")}
1146
+ ${K.underline("https://likec4.dev/tooling/code-generation/model/")}
1147
+ `).trim(),{padding:2,borderColor:"green",borderStyle:"round"}),i.stopAndLog()}async function Pv({languageServices:t,outDir:e,filename:r="likec4-react.mjs"}){const n=Ss,i=Os();return n.info(`${K.cyan("likec4 app root")} ${K.dim(i)}`),n.info(K.cyan("outDir")+" "+K.dim(e)),{customLogger:n,root:i,configFile:!1,clearScreen:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:Ps()},esbuild:{banner:`'use client'
1148
+ `+Rs.banner,footer:Rs.footer,jsx:"transform",jsxDev:!1,jsxSideEffects:!1,minifyIdentifiers:!1,minifySyntax:!1,minifyWhitespace:!1,tsconfigRaw:{compilerOptions:{target:"ES2022",useDefineForClassFields:!0,verbatimModuleSyntax:!0,jsx:"react-jsx"}}},build:{outDir:e,emptyOutDir:!1,sourcemap:!1,minify:!1,target:"es2022",copyPublicDir:!1,chunkSizeWarningLimit:Fs,lib:{entry:"react/likec4.tsx",fileName(s,o){return r},formats:["es"]},rollupOptions:{output:{compact:!1,exports:"named"},external:["likec4/rea\
1149
+ ct","likec4/model","react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client",/likec4\/icons\/.*/],onwarn(s,o){s.code!=="SOURCEMAP_ERROR"&&o(s)}}},plugins:[Qa({}),uo({languageServices:t,useOverviewGraph:!1})]}}async function Nv({path:t,useDotBin:e,outfile:r}){const n=Dt("c4:codegen"),i=Sr(n),s=await vt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});n.info(`${K.dim("format")} ${K.green("react")}`);const o=await s.diagrams();if(o.length===0)throw process.exitCode=
1150
+ 1,new Error("no views found");o.forEach(E=>{E.hasLayoutDrift&&n.warn(K.yellow("drift detected, manual layout can not be applied, view:")+" "+K.red(E.id))});let a=De(s.workspace,"likec4-views.js");if(r&&(a=ns(r)?r:De(r),Pt(r)&&(await ss(r)).isDirectory()))throw new Error(`output file is a directory: ${r}`);const c=Gt(a);n.info(`${K.dim("outdir")} ${c}`);const l=sn(a);n.info(`${K.dim("filename")} ${l}`);const u=Or(l).toLocaleLowerCase();if(![".js",".mjs",".jsx"].includes(u))throw n.error(`output f\
1151
+ ile ${r} has extension "${u}"`),new Error(`output file ${r} must be a .js, .jsx or .mjs`);const d=await Pv({languageServices:s,outDir:c,filename:l});await Fr({...d,logLevel:"warn"});const h=await s.layoutedModel();await Kt(De(c,sn(a,u)+(u===".mjs"?".d.mts":".d.ts")),Vg(h)),zt(Qi(`
1152
+ ${K.dim("Source generated:")}
1153
+ ${Wt(Zi(),a)}
1154
+
1155
+ ${K.dim("How to use:")}
1156
+ ${K.underline("https://likec4.dev/tooling/code-generation/react/")}
1157
+ `),{padding:2,borderColor:"green",borderStyle:"round"}),i.stopAndLog()}async function Tv({path:t,useDotBin:e,webcomponentPrefix:r="likec4",outfile:n}){const i=Dt("c4:codegen"),s=Sr(i),o=await vt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"});i.info(`${K.dim("format")} ${K.green("webcomponent")}`);const a=await o.diagrams();if(!Ga(a,1))throw i.warn("no views found"),process.exitCode=1,new Error("no views found");a.forEach(y=>{y.hasLayoutDrift&&i.warn(K.yellow("drift detected, manua\
1158
+ l layout can not be applied, view:")+" "+K.red(y.id))});let c=De(o.workspace,"likec4-views.js");if(n&&(c=ns(n)?n:De(n),Pt(n)&&(await ss(n)).isDirectory()))throw new Error(`output file is a directory: ${n}`);pt.debug(`${K.dim("outfilepath")} ${c}`);const l=sn(c);pt.debug(`${K.dim("filename")} ${l}`);const u=Or(l).toLocaleLowerCase();if(u!==".js"&&u!==".mjs")throw pt.warn(`output file ${n} has extension "${u}"`),new Error(`output file ${n} must be a .js or .mjs`);const d=await Is();pt.debug(`${K.dim(
1159
+ "created temp public")} ${d}`);const h=await lo({languageServices:o,outDir:d,filename:l,webcomponentPrefix:r,base:"/"});pt.debug(`${K.dim("vite build webcomponent")}`),await Fr({...h,logLevel:"warn"});const E=De(d,l);if(!Pt(E))throw new Error(`output file not found: ${E}`);await $t(Gt(c),{recursive:!0}),await Jp(E,c),i.info(`${K.dim("generated")} ${c}`),pt.debug(`${K.dim("remove temp public")}`),await Xp(d,{recursive:!0,force:!0}),zt(Qi(`
1160
+ ${K.dim("Webcomponents generated to:")}
1161
+ ${Wt(Zi(),c)}
1162
+
1163
+ ${K.dim("Setup and usage instructions:")}
1164
+ ${K.blue("https://likec4.dev/tooling/code-generation/webcomponent/")}
1165
+ `)),s.stopAndLog()}const Lv={command:"codegen <command> [path]",aliases:["generate","gen"],describe:"Generate various artifacts from LikeC4 sources",builder:t=>t.positional("path",_n).command("react [path]","generate react component to render likec4 view",e=>e.option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.jsx, .mjs or .js)",normalize:!0,coerce:Qe}).option("use-dot",at),async e=>{await Nv({useDotBin:e.useDotBin,path:e.path,outfile:e.outfile})}).command({command:"w\
1166
+ ebcomponent [path]",aliases:["wc","webcomp"],describe:"generate js with webcomponents",builder:e=>e.option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.mjs or .js)",normalize:!0,coerce:Qe}).option("webcomponent-prefix",Cs).option("use-dot",at),handler:async e=>{await Tv({useDotBin:e.useDotBin,path:e.path,outfile:e.outfile,webcomponentPrefix:e.webcomponentPrefix})}}).command({command:"model [path]",aliases:["ts"],describe:"generate LikeC4Model (.ts)",builder:e=>e.option("\
1167
+ outfile",{alias:"o",type:"string",desc:"<file> path to output file (.ts)",normalize:!0,coerce:Qe}).option("use-dot",at),handler:async e=>{await Fv({path:e.path,useDotBin:e.useDotBin,outfile:e.outfile})}}).command({command:"views-data [path]",aliases:["views"],describe:"generate likec4 views data (.ts)",builder:e=>e.option("outfile",{alias:"o",type:"string",desc:"<file> output .ts file",normalize:!0,coerce:Qe}).option("use-dot",at),handler:async e=>{await Ki({format:"views",path:e.path,useDotBin:e.
1168
+ useDotBin,outfile:e.outfile})}}).command({command:"dot [path]",describe:"generate graphviz files (.dot)",builder:e=>e.option("outdir",wn).option("use-dot",at),handler:async e=>{await Ki({format:"dot",path:e.path,useDotBin:e.useDotBin,outdir:e.outdir})}}).command({command:"d2 [path]",describe:"generate D2 files (.d2)",builder:e=>e.option("outdir",wn).option("use-dot",at),handler:async e=>{await Ki({format:"d2",path:e.path,useDotBin:e.useDotBin,outdir:e.outdir})}}).command({command:"mermaid [path]",
1169
+ aliases:["mmd"],describe:"generate Mermaid files (.mmd)",builder:e=>e.option("outdir",wn).option("use-dot",at),handler:async e=>{await Ki({format:"mermaid",useDotBin:e.useDotBin,path:e.path,outdir:e.outdir})}}).epilog(`${K.bold("Examples:")}
456
1170
  likec4 gen react -o dist/likec4-views.mjs ./src/likec4
457
1171
  likec4 gen model -o likec4-model.ts
458
1172
  likec4 gen webcomponent -o likec4.js --webcomponent-prefix c4 --use-dot-bin ./src
@@ -460,17 +1174,26 @@ GFS4: `),console.error(l)}),!t[o]){var u=as[o]||[];c(t,u),t.close=function(l){fu
460
1174
  likec4 gen ts --outfile ../likec4.ts
461
1175
  likec4 gen mmd --outdir assets/
462
1176
  likec4 gen dot -o out .
463
- `),handler:()=>{}};async function pD({path:t,useDotBin:e,outfile:r}){const n=_t("c4:export"),i=Tr(n),o=await(await wt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"})).layoutedModel();xr(r)!==".json"&&(r=r+".json"),await Dt(Wt(r),{recursive:!0});const s=JSON.stringify(o.$model,null,2);await Yt(r,s),n.info(`${Q.dim("generated")} ${Kt(process.cwd(),r)}`),i.stopAndLog("\u2713 export in ")}const mD={command:"export <format> [path]",describe:"Export to images or JSON",builder:t=>t.usage(`${Q.bold("Usage:")} $0 export <format> [path]`).positional("path",In).command({command:"png [path]",describe:"export views to PNG",builder:e=>e.option("output",Pn).option("theme",{choices:["light","dark"],desc:"color-scheme to use, default is light"}).option("flat",{boolean:!0,type:"boolean",desc:"ignore sources structure and export all PNGs in output directory"}).option("use-dot",ut).options({ignore:{boolean:!0,alias:"i",desc:"continue if some views failed to export"},timeout:{type:"number",alias:"t",desc:"(sec) timeout for playwright ",default:10},"max-attempts":{type:"number",describe:"",desc:"(number) max attempts to export failing view",default:3},"server-url":{type:"string",desc:"use this url instead of starting new likec4 server"}}).epilog(`${Q.bold("Examples:")}
464
- ${Q.green("$0 export png")}
465
- ${Q.gray("Search for likec4 files in current directory and output PNG next to sources")}
466
-
467
- ${Q.green("$0 export png --theme dark -o ./png src/likec4 ")}
468
- ${Q.gray("Search for likec4 files in src/likec4 and output PNG with dark theme to png folder")}
469
- `),handler:async e=>{Su(e.timeout>=1,"timeout must be >= 1"),Su(e["max-attempts"]>=1,"max-attempts must be >= 1"),await ll({path:e.path,useDotBin:e.useDotBin,output:e.output,timeoutMs:e.timeout*1e3,maxAttempts:e.maxAttempts,ignore:e.ignore===!0,outputType:e.flat?"flat":"relative",serverUrl:e.serverUrl,theme:e.theme??"light"})}}).command({command:"json [path]",describe:"export model to JSON",builder:e=>e.option("outfile",{alias:"o",type:"string",desc:"<file> output .json file",default:"likec4.json",normalize:!0,coerce:ve}).option("use-dot",ut).epilog(`${Q.bold("Examples:")}
470
- ${Q.green("$0 export json")}
471
- ${Q.gray("Search for likec4 files in current directory and output JSON to likec4.json")}
472
-
473
- ${Q.green("$0 export json -o ./generated/likec4.json src/likec4 ")}
474
- ${Q.gray("Search for likec4 files in src/likec4 and output JSON to generated/likec4.json")}
475
- `),handler:async e=>{await pD({path:e.path,useDotBin:e.useDotBin,outfile:e.outfile})}}).updateStrings({"Commands:":Q.bold("Formats:")}),handler:()=>{}};async function gD(t){const{isDev:e,...r}=await _o({...t,likec4AssetsDir:"",webcomponentPrefix:void 0}),n=await Do({port:Un(62001,62010)}),i=t?.open??!1;return await Zm({...r,mode:"production",preview:{host:t.listen??"127.0.0.1",port:n,open:i}})}async function yD({path:t,output:e,base:r,listen:n}){const i=await wt.fromWorkspace(t,{logger:"vite"}),o=await gD({base:r,languageServices:i,outputDir:e,open:!0,listen:n});il(o)}const ED={command:"preview [path]",describe:"Start local server to preview production build",builder:t=>t.positional("path",{type:"string",desc:`Directory with LikeC4 source files
476
- if not specified search in current directory`,normalize:!0}).options({output:{alias:"o",type:"string",desc:"output directory from production build",normalize:!0},base:{type:"string",desc:"base url the app is being served from"},listen:{alias:"l",type:"string",desc:"ip address of the network interface to listen on"}}).coerce(["path","output"],Qe).default("path",Qe("."),".").default("listen","127.0.0.1","localhost"),async handler(t){await yD(t)}};async function vD({path:t,useDotBin:e,webcomponentPrefix:r,useHashHistory:n,useOverview:i=!1,base:o,listen:s}){const a=await wt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"}),c=await mn(Lr(gn(),".likec4-assets-"));process.env.NODE_ENV="development";const f=await ul({buildWebcomponent:!0,hmr:!0,base:o,webcomponentPrefix:r,languageServices:a,useHashHistory:n,useOverviewGraph:i,likec4AssetsDir:c,listen:s});if(f.config.logger.clearScreen("info"),il(f),!i)return;const u=await a.diagrams();if(Eu(u,1)){const h=_t("c4:export"),d=nl(f);if(!d){h.error("no preview server url");return}h.info(Q.cyan("wait 5sec before generating previews")),await Ru(5e3);try{await cl({serverUrl:d,logger:h,views:u,theme:"light",output:c,outputType:"flat"}),await Ru(1e3),h.info(Q.yellow("Note: changes in sources do not trigger preview updates, restart is required"))}catch(y){h.error(Q.red("Failed to generate previews")),h.error(y)}}else f.config.logger.warn("no views found, no previews generated")}const _D={command:"start [path]",aliases:["serve","dev"],describe:"Start local dev server to preview LikeC4 views",builder:t=>t.positional("path",In).option("base",vc).option("webcomponent-prefix",Ls).option("use-hash-history",Ec).option("use-overview",_c).option("use-dot",ut).option("listen",R0),handler:async t=>{await vD({path:t.path,useDotBin:t["use-dot"],base:t.base,useOverview:t["use-overview"]??!1,webcomponentPrefix:t["webcomponent-prefix"],useHashHistory:t["use-hash-history"],listen:t.listen})}};async function wD(){return await Fm({sinks:{console:Im()},loggers:[{category:"likec4",sinks:["console"],lowestLevel:ys==="development"?"debug":"info"}]}),iD(),await C0(zg(jm)).scriptName("likec4").usage("Usage: $0 <command>").command(_D).command(pE).command(hD).command(mD).command(ED).command({command:"check-update",describe:"Check for updates",handler:async()=>{await sD()}}).help("help").version(Er).alias("v","version").alias("h","help").demandCommand(1,"Please run with valid command").strict().recommendCommands().showHelpOnFail(!0,"Something is wrong, run with --help").updateStrings({"Options:":Q.bold("Options:"),"Positionals:":Q.bold("Arguments:"),"Commands:":Q.bold("Commands:"),"Examples:":Q.bold("Examples:")}).wrap(gu(Tm.columns-20,{min:80,max:120})).parseAsync()}wD().catch(()=>{Nm(1)}),process.on("unhandledRejection",t=>{console.error("Unhandled rejection",t)});
1177
+ `),handler:()=>{}};async function jv({path:t,useDotBin:e,outfile:r}){const n=Dt("c4:export"),i=Sr(n),s=await(await vt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"})).layoutedModel();Or(r)!==".json"&&(r=r+".json"),await $t(Gt(r),{recursive:!0});const o=JSON.stringify(s.$model,null,2);await Kt(r,o),n.info(`${K.dim("generated")} ${Wt(process.cwd(),r)}`),i.stopAndLog("\u2713 export in ")}const kv={command:"export <format> [path]",describe:"Export to images or JSON",builder:t=>t.usage(`${K.
1178
+ bold("Usage:")} $0 export <format> [path]`).positional("path",_n).command({command:"png [path]",describe:"export views to PNG",builder:e=>e.option("output",wn).option("theme",{choices:["light","dark"],desc:"color-scheme to use, default is light"}).option("flat",{boolean:!0,type:"boolean",desc:"ignore sources structure and export all PNGs in output directory"}).option("use-dot",at).options({ignore:{boolean:!0,alias:"i",desc:"continue if some views failed to export"},timeout:{type:"number",alias:"\
1179
+ t",desc:"(sec) timeout for playwright ",default:10},"max-attempts":{type:"number",describe:"",desc:"(number) max attempts to export failing view",default:3},"server-url":{type:"string",desc:"use this url instead of starting new likec4 server"}}).epilog(`${K.bold("Examples:")}
1180
+ ${K.green("$0 export png")}
1181
+ ${K.gray("Search for likec4 files in current directory and output PNG next to sources")}
1182
+
1183
+ ${K.green("$0 export png --theme dark -o ./png src/likec4 ")}
1184
+ ${K.gray("Search for likec4 files in src/likec4 and output PNG with dark theme to png folder")}
1185
+ `),handler:async e=>{os(e.timeout>=1,"timeout must be >= 1"),os(e["max-attempts"]>=1,"max-attempts must be >= 1"),await jc({path:e.path,useDotBin:e.useDotBin,output:e.output,timeoutMs:e.timeout*1e3,maxAttempts:e.maxAttempts,ignore:e.ignore===!0,outputType:e.flat?"flat":"relative",serverUrl:e.serverUrl,theme:e.theme??"light"})}}).command({command:"json [path]",describe:"export model to JSON",builder:e=>e.option("outfile",{alias:"o",type:"string",desc:"<file> output .json file",default:"likec4.jso\
1186
+ n",normalize:!0,coerce:De}).option("use-dot",at).epilog(`${K.bold("Examples:")}
1187
+ ${K.green("$0 export json")}
1188
+ ${K.gray("Search for likec4 files in current directory and output JSON to likec4.json")}
1189
+
1190
+ ${K.green("$0 export json -o ./generated/likec4.json src/likec4 ")}
1191
+ ${K.gray("Search for likec4 files in src/likec4 and output JSON to generated/likec4.json")}
1192
+ `),handler:async e=>{await jv({path:e.path,useDotBin:e.useDotBin,outfile:e.outfile})}}).updateStrings({"Commands:":K.bold("Formats:")}),handler:()=>{}};async function Bv(t){const{isDev:e,...r}=await co({...t,likec4AssetsDir:"",webcomponentPrefix:void 0}),n=await fo({port:Nn(62001,62010)}),i=t?.open??!1;return await tm({...r,mode:"production",preview:{host:t.listen??"127.0.0.1",port:n,open:i}})}async function xv({path:t,output:e,base:r,listen:n}){const i=await vt.fromWorkspace(t,{logger:"vite"}),
1193
+ s=await Bv({base:r,languageServices:i,outputDir:e,open:!0,listen:n});Ic(s)}const Mv={command:"preview [path]",describe:"Start local server to preview production build",builder:t=>t.positional("path",{type:"string",desc:`Directory with LikeC4 source files
1194
+ if not specified search in current directory`,normalize:!0}).options({output:{alias:"o",type:"string",desc:"output directory from production build",normalize:!0},base:{type:"string",desc:"base url the app is being served from"},listen:{alias:"l",type:"string",desc:"ip address of the network interface to listen on"}}).coerce(["path","output"],Qe).default("path",Qe("."),".").default("listen","127.0.0.1","localhost"),async handler(t){await xv(t)}};async function qv({path:t,useDotBin:e,webcomponentPrefix:r,
1195
+ useHashHistory:n,useOverview:i=!1,base:s,listen:o}){const a=await vt.fromWorkspace(t,{logger:"vite",graphviz:e?"binary":"wasm"}),c=await on(Rr(an(),".likec4-assets-"));process.env.NODE_ENV="development";const l=await Tc({buildWebcomponent:!0,hmr:!0,base:s,webcomponentPrefix:r,languageServices:a,useHashHistory:n,useOverviewGraph:i,likec4AssetsDir:c,listen:o});if(l.config.logger.clearScreen("info"),Ic(l),!i)return;const u=await a.diagrams();if(Ga(u,1)){const d=Dt("c4:export"),h=Oc(l);if(!h){d.error(
1196
+ "no preview server url");return}d.info(K.cyan("wait 5sec before generating previews")),await tu(5e3);try{await Lc({serverUrl:h,logger:d,views:u,theme:"light",output:c,outputType:"flat"}),await tu(1e3),d.info(K.yellow("Note: changes in sources do not trigger preview updates, restart is required"))}catch(E){d.error(K.red("Failed to generate previews")),d.error(E)}}else l.config.logger.warn("no views found, no previews generated")}const Uv={command:"start [path]",aliases:["serve","dev"],describe:"S\
1197
+ tart local dev server to preview LikeC4 views",builder:t=>t.positional("path",_n).option("base",zu).option("webcomponent-prefix",Cs).option("use-hash-history",Vu).option("use-overview",Gu).option("use-dot",at).option("listen",C0),handler:async t=>{await qv({path:t.path,useDotBin:t["use-dot"],base:t.base,useOverview:t["use-overview"]??!1,webcomponentPrefix:t["webcomponent-prefix"],useHashHistory:t["use-hash-history"],listen:t.listen})}};async function Hv(){return await Np({sinks:{console:Tp()},loggers:[
1198
+ {category:"likec4",sinks:["console"],lowestLevel:as==="development"?"debug":"info"}]}),Av(),await b0(Hm(Bp)).scriptName("likec4").usage("Usage: $0 <command>").command(Uv).command(dy).command(Lv).command(kv).command(Mv).command({command:"check-update",describe:"Check for updates",handler:async()=>{await Cv()}}).help("help").version(dr).alias("v","version").alias("h","help").demandCommand(1,"Please run with valid command").strict().recommendCommands().showHelpOnFail(!0,"Something is wrong, run wit\
1199
+ h --help").updateStrings({"Options:":K.bold("Options:"),"Positionals:":K.bold("Arguments:"),"Commands:":K.bold("Commands:"),"Examples:":K.bold("Examples:")}).wrap(Va(kp.columns-20,{min:80,max:120})).parseAsync()}Hv().catch(()=>{jp(1)}),process.on("unhandledRejection",t=>{console.error("Unhandled rejection",t)});