@nimtech/nimpress 2.9.2 → 2.9.3

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,9 +1,9 @@
1
- import { readFile as pe, readdir as Vt, writeFile as he, copyFile as _n, cp as yn, mkdir as Ve } from "node:fs/promises";
1
+ import { readFile as pe, readdir as Xt, writeFile as he, copyFile as _n, cp as yn, mkdir as Ve } from "node:fs/promises";
2
2
  import { existsSync as ge, readFileSync as Ae, statSync as wt, readdirSync as ze, createReadStream as Zo } from "node:fs";
3
3
  import { createRequire as zn } from "node:module";
4
4
  import { request as Qo } from "node:http";
5
5
  import { spawn as es, execFileSync as ts } from "node:child_process";
6
- import { resolve as V, dirname as Z, join as J, relative as xe, basename as Pe, extname as Xt, isAbsolute as $e, sep as ke } from "node:path";
6
+ import { resolve as V, dirname as Z, join as J, relative as xe, basename as Pe, extname as Yt, isAbsolute as $e, sep as ke } from "node:path";
7
7
  import { createHash as qn } from "node:crypto";
8
8
  import vt from "gray-matter";
9
9
  import Jn from "markdown-it";
@@ -18,7 +18,7 @@ import { parse as Gn, stringify as as } from "yaml";
18
18
  import { createHighlighter as is } from "shiki";
19
19
  import { fileURLToPath as cs, pathToFileURL as wn } from "node:url";
20
20
  import { exporter as ls } from "@dbml/core";
21
- import { n as ps, r as nt, e as kt, b as zt, p as Vn, c as Yt, d as Kt, g as $t, h as us, k as Zt, o as ms, s as fs, j as be, m as ds, a as Xn, l as hs, q as gs, t as _s } from "./typeMembers-CNvE92EX.js";
21
+ import { n as ps, r as nt, e as kt, b as qt, p as Vn, c as Kt, d as Zt, g as $t, h as us, k as Qt, o as ms, s as fs, j as be, m as ds, a as Xn, l as hs, q as gs, t as _s } from "./typeMembers-CNvE92EX.js";
22
22
  import { loadConfigFromFile as ys } from "vite";
23
23
  const vn = {
24
24
  out: "dist",
@@ -250,13 +250,13 @@ const js = ["nimpress.config.ts", "nimpress.config.js", "nimpress.config.mjs", "
250
250
  function $n(e) {
251
251
  return typeof e == "object" && e !== null && !Array.isArray(e);
252
252
  }
253
- function qt(e, t) {
253
+ function Jt(e, t) {
254
254
  if (!t) return e;
255
255
  const n = { ...e };
256
256
  for (const [o, s] of Object.entries(t)) {
257
257
  if (s === void 0) continue;
258
258
  const r = n[o];
259
- $n(r) && $n(s) ? n[o] = qt(r, s) : n[o] = s;
259
+ $n(r) && $n(s) ? n[o] = Jt(r, s) : n[o] = s;
260
260
  }
261
261
  return n;
262
262
  }
@@ -275,8 +275,8 @@ async function Ps(e) {
275
275
  }
276
276
  async function Cs(e, t) {
277
277
  const n = await Ps(e), o = n?.config ? { ...n.config, modules: void 0 } : void 0, s = t ? { ...t, modules: void 0 } : void 0;
278
- let r = qt(Qe, o);
279
- r = qt(r, s), r.css = typeof r.css == "string" ? [r.css] : r.css ?? [], r.base = ps(r.base);
278
+ let r = Jt(Qe, o);
279
+ r = Jt(r, s), r.css = typeof r.css == "string" ? [r.css] : r.css ?? [], r.base = ps(r.base);
280
280
  const a = t?.modules ?? n?.config?.modules;
281
281
  return r.modules = {
282
282
  dir: Qe.modules.dir,
@@ -439,10 +439,10 @@ function Rs(e, t, n, o, s) {
439
439
  function f(d, h, b) {
440
440
  let T = 0;
441
441
  const O = [];
442
- if (d.replace(s, function(P, g, w) {
442
+ if (d.replace(s, function(P, g, v) {
443
443
  let D;
444
444
  if (Object.prototype.hasOwnProperty.call(n, P)) {
445
- if (D = n[P], g > 0 && !c.test(w[g - 1]) || g + P.length < w.length && !c.test(w[g + P.length]))
445
+ if (D = n[P], g > 0 && !c.test(v[g - 1]) || g + P.length < v.length && !c.test(v[g + P.length]))
446
446
  return;
447
447
  } else
448
448
  D = P.slice(1, -1);
@@ -465,10 +465,10 @@ function Rs(e, t, n, o, s) {
465
465
  for (let P = 0, g = T.length; P < g; P++) {
466
466
  if (T[P].type !== "inline")
467
467
  continue;
468
- let w = T[P].children;
469
- for (let D = w.length - 1; D >= 0; D--)
470
- b = w[D], (b.type === "link_open" || b.type === "link_close") && b.info === "auto" && (O -= b.nesting), b.type === "text" && O === 0 && o.test(b.content) && (T[P].children = w = r(
471
- w,
468
+ let v = T[P].children;
469
+ for (let D = v.length - 1; D >= 0; D--)
470
+ b = v[D], (b.type === "link_open" || b.type === "link_close") && b.info === "auto" && (O -= b.nesting), b.type === "text" && O === 0 && o.test(b.content) && (T[P].children = v = r(
471
+ v,
472
472
  D,
473
473
  f(b.content, b.level, h.Token)
474
474
  ));
@@ -2447,7 +2447,7 @@ function qs(e, t) {
2447
2447
  }, t || {});
2448
2448
  Ls(e, o);
2449
2449
  }
2450
- const ue = "\x1B[0m", jt = "\x1B[1m", _t = "\x1B[2m", Yn = "\x1B[38;2;204;120;92m", Ee = "\x1B[38;2;229;174;156m", Ie = "\x1B[38;2;160;160;170m", pt = [
2450
+ const ue = "\x1B[0m", jt = "\x1B[1m", _t = "\x1B[2m", Yn = "\x1B[38;2;204;120;92m", Ee = "\x1B[38;2;229;174;156m", Ne = "\x1B[38;2;160;160;170m", pt = [
2451
2451
  " ███╗ ██╗ ██╗ ███╗ ███╗ ██████╗ ██████╗ ███████╗ ███████╗ ███████╗",
2452
2452
  " ████╗ ██║ ██║ ████╗ ████║ ██╔══██╗ ██╔══██╗ ██╔════╝ ██╔════╝ ██╔════╝",
2453
2453
  " ██╔██╗ ██║ ██║ ██╔████╔██║ ██████╔╝ ██████╔╝ █████╗ ███████╗ ███████╗",
@@ -2485,16 +2485,16 @@ function Gs() {
2485
2485
  function Vs(e = {}) {
2486
2486
  const t = e.title ?? "Nimpress", n = e.tagline ?? "Docs framework on Svelte", o = e.company ?? `Samna® ${(/* @__PURE__ */ new Date()).getFullYear()}`, s = e.version ?? "dev", r = e.localUrl ?? "http://localhost:5173/", a = e.networkUrl ?? "use --host to expose", c = typeof e.duration == "number" ? `ready in ${e.duration} ms` : "ready", f = e.nimpressVersion ?? Gs(), d = [];
2487
2487
  d.push("");
2488
- for (const w of pt) d.push(Yn + w + ue);
2488
+ for (const v of pt) d.push(Yn + v + ue);
2489
2489
  d.push("");
2490
2490
  const h = [
2491
- `${jt}${t}${ue}${Ie} · ${o}${ue}`,
2492
- `${Ie}${n}${ue}`,
2491
+ `${jt}${t}${ue}${Ne} · ${o}${ue}`,
2492
+ `${Ne}${n}${ue}`,
2493
2493
  `${Ee}Version${ue} ${s} ${Ee}${c}${ue}`
2494
2494
  ];
2495
2495
  f && h.push(`${Ee}Nimpress${ue} ${f}`), h.push(`${Ee}➜${ue} Local ${jt}${r}${ue}`), h.push(`${Ee}➜${ue} Network ${_t}${a}${ue}`);
2496
2496
  const b = Us(h), T = pt[0].length, O = pt[0].length - pt[0].trimStart().length, P = Ke + 4, g = " ".repeat(Math.max(0, Math.floor((T + O - P) / 2)));
2497
- for (const w of b) d.push(g + w);
2497
+ for (const v of b) d.push(g + v);
2498
2498
  return d.push(""), d.join(`
2499
2499
  `);
2500
2500
  }
@@ -2507,7 +2507,7 @@ function Xs() {
2507
2507
  }
2508
2508
  }
2509
2509
  const Ys = 27, Ks = 14, Zs = 16, Qs = 20, er = 17, tr = 14, Kn = 110, nr = 60, or = 120, et = 40, sr = 200, rr = 420, ar = 24, ir = 7.6, cr = 6.6, Zn = 7.4, lr = 5.4, pr = 5.8, ur = 6.2, mr = 34, fr = 48, xn = 8, dr = 260, hr = 18, gr = 6.2, _r = 30, Sn = 24, jn = 24;
2510
- class Qt extends Error {
2510
+ class en extends Error {
2511
2511
  }
2512
2512
  function yr(e) {
2513
2513
  const t = e?.diags;
@@ -2521,7 +2521,7 @@ function br(e) {
2521
2521
  try {
2522
2522
  return JSON.parse(ls.export(e, "json"));
2523
2523
  } catch (t) {
2524
- throw new Qt(yr(t));
2524
+ throw new en(yr(t));
2525
2525
  }
2526
2526
  }
2527
2527
  function wr(e) {
@@ -2546,11 +2546,11 @@ function yt(e, t, n) {
2546
2546
  return e.split(`
2547
2547
  `).reduce((s, r) => s + Math.max(1, Math.ceil(r.trim().length / o)), 0);
2548
2548
  }
2549
- function Tt(e) {
2549
+ function Nt(e) {
2550
2550
  return e.reduce((t, n) => Math.max(t, n.length), 0);
2551
2551
  }
2552
2552
  function xr(e, t) {
2553
- const n = Tt(t.map((f) => f.name)) * ir, o = Tt(t.map((f) => f.type)) * cr, s = Tt(t.map((f) => f.linkLabel)) * ur, r = t.some((f) => f.pk || f.fk) ? mr : 0, a = Math.round(n + o + s + r + fr), c = Math.round(e.length * Zn + 32);
2553
+ const n = Nt(t.map((f) => f.name)) * ir, o = Nt(t.map((f) => f.type)) * cr, s = Nt(t.map((f) => f.linkLabel)) * ur, r = t.some((f) => f.pk || f.fk) ? mr : 0, a = Math.round(n + o + s + r + fr), c = Math.round(e.length * Zn + 32);
2554
2554
  return Math.min(rr, Math.max(sr, a, c));
2555
2555
  }
2556
2556
  function Sr(e) {
@@ -2744,7 +2744,7 @@ function Dr(e) {
2744
2744
  a,
2745
2745
  b.map((k) => [k.parent, k.child])
2746
2746
  ), O = T.length ? T : a, P = [], g = O.reduce((k, x) => Math.max(k, x.x + x.width), et);
2747
- let w = et;
2747
+ let v = et;
2748
2748
  const D = g + et + Kn;
2749
2749
  for (const k of Object.values(t.notes).sort((x, R) => x.id - R.id)) {
2750
2750
  const x = String(k.content ?? "").trim();
@@ -2754,11 +2754,11 @@ function Dr(e) {
2754
2754
  title: k.name ?? "",
2755
2755
  body: x,
2756
2756
  x: D,
2757
- y: w,
2757
+ y: v,
2758
2758
  width: dr,
2759
2759
  height: 0
2760
2760
  };
2761
- R.height = jr(R), P.push(R), w += R.height + jn;
2761
+ R.height = jr(R), P.push(R), v += R.height + jn;
2762
2762
  }
2763
2763
  Cr([...O, ...P], jn);
2764
2764
  const I = [];
@@ -2798,23 +2798,23 @@ ${n}`;
2798
2798
  }
2799
2799
  const f = /* @__PURE__ */ new Map(), d = o.match(/(?:const|let)\s*\{([\s\S]*?)\}\s*=\s*(?:withDefaults\s*\(\s*)?defineProps/);
2800
2800
  if (d)
2801
- for (const g of zt(d[1])) {
2802
- const w = g.match(/^([A-Za-z_$][\w$]*)\s*=\s*([\s\S]+)$/);
2803
- w && f.set(w[1], Vn(w[2]));
2801
+ for (const g of qt(d[1])) {
2802
+ const v = g.match(/^([A-Za-z_$][\w$]*)\s*=\s*([\s\S]+)$/);
2803
+ v && f.set(v[1], Vn(v[2]));
2804
2804
  }
2805
2805
  const h = [];
2806
2806
  if (a)
2807
- for (const g of Yt(a)) {
2808
- const w = Kt(
2807
+ for (const g of Kt(a)) {
2808
+ const v = Zt(
2809
2809
  $t(g.name, g.type, g.optional, r, g.description),
2810
2810
  g
2811
2811
  );
2812
- f.has(g.name) && (w.default = f.get(g.name)), h.push(w);
2812
+ f.has(g.name) && (v.default = f.get(g.name)), h.push(v);
2813
2813
  }
2814
2814
  for (const g of o.matchAll(/\bdefineModel(?:<([^>]*)>)?\(\s*(?:['"]([\w-]+)['"])?/g)) {
2815
- const w = g[2] ?? "modelValue";
2816
- if (h.some((k) => k.name === w)) continue;
2817
- const D = $t(w, g[1]?.trim() || "string", !0, r);
2815
+ const v = g[2] ?? "modelValue";
2816
+ if (h.some((k) => k.name === v)) continue;
2817
+ const D = $t(v, g[1]?.trim() || "string", !0, r);
2818
2818
  D.bindable = !0;
2819
2819
  const I = o.slice(0, g.index).match(/\/\*\*((?:[^*]|\*(?!\/))*)\*\/\s*(?:const|let)\s+[\w$]+\s*=\s*$/);
2820
2820
  if (I) {
@@ -2825,16 +2825,16 @@ ${n}`;
2825
2825
  }
2826
2826
  const b = [], T = /* @__PURE__ */ new Set();
2827
2827
  for (const g of s.matchAll(/<slot\b([^>]*)>/g)) {
2828
- const w = g[1].match(/(?:^|[^:\w-])name=["']([^"']+)["']/)?.[1];
2829
- if (!w && /(?:^|\s)(?::|v-bind:)name=/.test(g[1])) continue;
2830
- const D = w ?? "default";
2828
+ const v = g[1].match(/(?:^|[^:\w-])name=["']([^"']+)["']/)?.[1];
2829
+ if (!v && /(?:^|\s)(?::|v-bind:)name=/.test(g[1])) continue;
2830
+ const D = v ?? "default";
2831
2831
  T.has(D) || (T.add(D), b.push({ name: D, kind: "slot", type: "slot" }));
2832
2832
  }
2833
2833
  const O = [], P = o.indexOf("defineEmits");
2834
2834
  if (P >= 0) {
2835
- const g = o.slice(P), w = g.search(/[<(]/);
2836
- if (w >= 0) {
2837
- const D = g[w], I = D === "<" ? ">" : ")", k = nt(g, w + 1, D, I), x = /* @__PURE__ */ new Set();
2835
+ const g = o.slice(P), v = g.search(/[<(]/);
2836
+ if (v >= 0) {
2837
+ const D = g[v], I = D === "<" ? ">" : ")", k = nt(g, v + 1, D, I), x = /* @__PURE__ */ new Set();
2838
2838
  for (const R of k.matchAll(/['"]([\w:.-]+)['"]\s*:\s*\[/g)) x.add(R[1]);
2839
2839
  for (const R of k.matchAll(/\(\s*\w+\s*:\s*['"]([\w:.-]+)['"]/g)) x.add(R[1]);
2840
2840
  for (const R of k.matchAll(/[,\[]\s*['"]([\w:.-]+)['"]\s*[,\]]/g)) x.add(R[1]);
@@ -2850,7 +2850,7 @@ function Tr(e, t, n = "") {
2850
2850
  const o = e.match(/<script[^>]*>([\s\S]*?)<\/script>/)?.[1] ?? "", s = `${o}
2851
2851
  ${n}`, r = o.match(/(?:let|const)\s*\{([\s\S]*?)\}\s*(?::\s*([\s\S]*?))?=\s*\$props\(\)/), a = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set();
2852
2852
  if (r)
2853
- for (const O of zt(r[1])) {
2853
+ for (const O of qt(r[1])) {
2854
2854
  const P = O.match(/^([A-Za-z_$][\w$]*)\s*=\s*([\s\S]+)$/);
2855
2855
  if (!P) continue;
2856
2856
  const g = P[2].trim().match(/^\$bindable\(([\s\S]*)\)$/);
@@ -2867,7 +2867,7 @@ ${n}`, r = o.match(/(?:let|const)\s*\{([\s\S]*?)\}\s*(?::\s*([\s\S]*?))?=\s*\$pr
2867
2867
  }
2868
2868
  const h = [], b = [], T = [];
2869
2869
  if (f)
2870
- for (const O of Yt(f)) {
2870
+ for (const O of Kt(f)) {
2871
2871
  if (/\bSnippet\b/.test(O.type)) {
2872
2872
  b.push({ name: O.name, kind: "slot", type: O.type, required: !O.optional });
2873
2873
  continue;
@@ -2876,14 +2876,14 @@ ${n}`, r = o.match(/(?:let|const)\s*\{([\s\S]*?)\}\s*(?::\s*([\s\S]*?))?=\s*\$pr
2876
2876
  T.push(O.name);
2877
2877
  continue;
2878
2878
  }
2879
- const P = Kt(
2879
+ const P = Zt(
2880
2880
  $t(O.name, O.type, O.optional, s, O.description),
2881
2881
  O
2882
2882
  );
2883
2883
  a.has(O.name) && (P.default = a.get(O.name)), c.has(O.name) && (P.bindable = !0), h.push(P);
2884
2884
  }
2885
2885
  else if (r) {
2886
- for (const O of zt(r[1])) {
2886
+ for (const O of qt(r[1])) {
2887
2887
  const P = O.match(/^([A-Za-z_$][\w$]*)/)?.[1];
2888
2888
  if (!P || P === "children") continue;
2889
2889
  const g = { name: P, kind: "json", type: "unknown" };
@@ -2928,7 +2928,7 @@ function Ni(e, t) {
2928
2928
  const n = kt(e, `${t}Props`) ?? kt(e, "Props");
2929
2929
  if (!n) return;
2930
2930
  const o = [], s = [], r = [];
2931
- for (const a of Yt(n)) {
2931
+ for (const a of Kt(n)) {
2932
2932
  if (/\bSnippet\b/.test(a.type)) {
2933
2933
  s.push({ name: a.name, kind: "slot", type: a.type, required: !a.optional });
2934
2934
  continue;
@@ -2937,7 +2937,7 @@ function Ni(e, t) {
2937
2937
  r.push(a.name);
2938
2938
  continue;
2939
2939
  }
2940
- o.push(Kt($t(a.name, a.type, a.optional, e, a.description), a));
2940
+ o.push(Zt($t(a.name, a.type, a.optional, e, a.description), a));
2941
2941
  }
2942
2942
  return { component: t, props: o, slots: s, emits: r };
2943
2943
  }
@@ -2995,13 +2995,13 @@ A module shared across chunks statically imports a component that got its own ch
2995
2995
  }
2996
2996
  };
2997
2997
  }
2998
- function en(e, t) {
2998
+ function tn(e, t) {
2999
2999
  if (!t) return e;
3000
3000
  const n = { ...e };
3001
3001
  for (const [o, s] of Object.entries(t)) {
3002
3002
  if (s === void 0) continue;
3003
3003
  const r = n[o], a = (c) => typeof c == "object" && c !== null && !Array.isArray(c);
3004
- a(r) && a(s) ? n[o] = en(r, s) : n[o] = s;
3004
+ a(r) && a(s) ? n[o] = tn(r, s) : n[o] = s;
3005
3005
  }
3006
3006
  return n;
3007
3007
  }
@@ -3026,7 +3026,7 @@ async function Fi(e) {
3026
3026
  ...s ? { rollupOptions: { input: s } } : {}
3027
3027
  }
3028
3028
  };
3029
- return en(c, o.vite);
3029
+ return tn(c, o.vite);
3030
3030
  }
3031
3031
  function Ct(e, t, n, o, s) {
3032
3032
  const r = t.systems[n];
@@ -3047,7 +3047,7 @@ function Ct(e, t, n, o, s) {
3047
3047
  async function so(e, t = []) {
3048
3048
  let n;
3049
3049
  try {
3050
- n = await Vt(e, { withFileTypes: !0 });
3050
+ n = await Xt(e, { withFileTypes: !0 });
3051
3051
  } catch {
3052
3052
  return t;
3053
3053
  }
@@ -3096,7 +3096,7 @@ function ot(e, t) {
3096
3096
  return t === "yml" ? as(e) : JSON.stringify(e, null, 2) + `
3097
3097
  `;
3098
3098
  }
3099
- async function tn(e, t, n) {
3099
+ async function nn(e, t, n) {
3100
3100
  try {
3101
3101
  return await da(Z(e), e, t, n);
3102
3102
  } catch (o) {
@@ -3124,7 +3124,7 @@ function tt(e, t) {
3124
3124
  }
3125
3125
  return t.items && (n.items = e.items ? tt(e.items, t.items) : t.items), t.additionalProperties && (n.additionalProperties = e.additionalProperties ? tt(e.additionalProperties, t.additionalProperties) : t.additionalProperties), n;
3126
3126
  }
3127
- function nn(e, t) {
3127
+ function on(e, t) {
3128
3128
  const n = t, o = { added: [], missing: [] }, s = {};
3129
3129
  for (const [f, d] of Object.entries(n.properties ?? {})) {
3130
3130
  const h = e.properties?.[f];
@@ -3161,7 +3161,7 @@ const Wr = {
3161
3161
  };
3162
3162
  function Lr(e) {
3163
3163
  const t = e.match(/^type (.+) is opaque$/);
3164
- return t ? `${Ie}type${ue} ${t[1]} ${Ie}is opaque${ue}` : `${Ie}${e}${ue}`;
3164
+ return t ? `${Ne}type${ue} ${t[1]} ${Ne}is opaque${ue}` : `${Ne}${e}${ue}`;
3165
3165
  }
3166
3166
  function Xe(e = process.cwd()) {
3167
3167
  if (!Ze.length) return;
@@ -3173,14 +3173,14 @@ function Xe(e = process.cwd()) {
3173
3173
  const n = Ze.length;
3174
3174
  Ze.length = 0;
3175
3175
  const o = n === 1 ? "schema warning" : "schema warnings", s = t.size === 1 ? "component" : "components", r = [""];
3176
- r.push(` ${Ee}${jt}nimpress modules${ue} ${Ie}${n} ${o} in ${t.size} ${s}${ue}`), r.push("");
3176
+ r.push(` ${Ee}${jt}nimpress modules${ue} ${Ne}${n} ${o} in ${t.size} ${s}${ue}`), r.push("");
3177
3177
  for (const [a, c] of t) {
3178
3178
  const f = c.find((b) => b.sourceFile)?.sourceFile;
3179
3179
  r.push(` ${Yn}${jt}${a}${ue}${f ? ` ${_t}${xe(e, f)}${ue}` : ""}`);
3180
3180
  const d = Math.max(...c.map((b) => (b.line ? `L${b.line}` : "·").length)), h = Math.max(...c.map((b) => (b.path || "(component)").length));
3181
3181
  for (const b of c) {
3182
3182
  const T = (b.line ? `L${b.line}` : "·").padStart(d), O = (b.path || "(component)").padEnd(h);
3183
- r.push(` ${Ie}${T}${ue} ${Ee}${O}${ue} ${Lr(b.detail)}`);
3183
+ r.push(` ${Ne}${T}${ue} ${Ee}${O}${ue} ${Lr(b.detail)}`);
3184
3184
  }
3185
3185
  for (const b of new Set(c.map((T) => T.kind)))
3186
3186
  r.push(` ${Ee}→${ue} ${_t}${Wr[b]}${ue}`);
@@ -3202,7 +3202,7 @@ function En(e, t) {
3202
3202
  if (r.test(o[a])) return a + 1;
3203
3203
  }
3204
3204
  function An(e, t, n = {}) {
3205
- const o = [], s = Zt(e, t);
3205
+ const o = [], s = Qt(e, t);
3206
3206
  for (const r of s.props.filter((a) => !a.description))
3207
3207
  o.push({ component: e, sourceFile: n.sourceFile, line: En(n.sourceText, r.name), path: r.name, detail: "has no description", kind: "undocumented" });
3208
3208
  for (const r of ms(s.props))
@@ -3211,7 +3211,7 @@ function An(e, t, n = {}) {
3211
3211
  o.push({ component: e, sourceFile: n.sourceFile, path: r, detail: "has no counterpart in the component source", kind: "orphan" });
3212
3212
  return o;
3213
3213
  }
3214
- async function on(e, t, n, o) {
3214
+ async function sn(e, t, n, o) {
3215
3215
  if (!n) return;
3216
3216
  const s = fs(t, n.props, n.slots, n.emits), r = o ? await pe(o, "utf-8").catch(() => {
3217
3217
  }) : void 0, a = at(e);
@@ -3228,7 +3228,7 @@ async function on(e, t, n, o) {
3228
3228
  console.warn(`nimpress modules: ${t} ${Pe(a.path)} failed to parse, left untouched: ${String(T)}`);
3229
3229
  return;
3230
3230
  }
3231
- const { merged: d, report: h } = nn(f, s), b = ot(d, a.form);
3231
+ const { merged: d, report: h } = on(f, s), b = ot(d, a.form);
3232
3232
  if (b !== c) {
3233
3233
  await he(a.path, b);
3234
3234
  const T = h.added.length ? `, added ${h.added.join(", ")}` : "";
@@ -3247,8 +3247,8 @@ async function Hr(e, t, n, o) {
3247
3247
  const r = qn("sha1").update(s).digest("hex");
3248
3248
  if (On.get(n) === r) return;
3249
3249
  On.set(n, r);
3250
- const a = await tn(n, o, t);
3251
- a && await on(e, t, a, n);
3250
+ const a = await nn(n, o, t);
3251
+ a && await sn(e, t, a, n);
3252
3252
  }
3253
3253
  async function Ri(e, t) {
3254
3254
  const n = at(e);
@@ -3256,11 +3256,11 @@ async function Ri(e, t) {
3256
3256
  await he(J(e, "schema.json"), ot(t, "json"));
3257
3257
  return;
3258
3258
  }
3259
- const o = await pe(n.path, "utf-8"), s = it(o, n.form), { merged: r } = nn(t, s);
3259
+ const o = await pe(n.path, "utf-8"), s = it(o, n.form), { merged: r } = on(t, s);
3260
3260
  await he(n.path, ot(r, n.form));
3261
3261
  }
3262
- function Jt(e) {
3263
- const t = Xt(e);
3262
+ function Ut(e) {
3263
+ const t = Yt(e);
3264
3264
  return t === ".vue" ? "vue" : t === ".svelte" ? "svelte" : null;
3265
3265
  }
3266
3266
  function zr(e, t, n) {
@@ -3277,10 +3277,10 @@ function qr(e, t, n) {
3277
3277
  async function Jr(e, t, n) {
3278
3278
  const o = await rt(e, t.contentDir), s = V(e, n);
3279
3279
  if ((n.includes("/") || n.includes("\\")) && ge(s)) {
3280
- const d = Jt(s);
3280
+ const d = Ut(s);
3281
3281
  if (!d)
3282
3282
  throw new Error(`[nimpress] modules: ${n} is not a .vue or .svelte component file`);
3283
- const h = Pe(s, Xt(s)), b = zr(e, t, s);
3283
+ const h = Pe(s, Yt(s)), b = zr(e, t, s);
3284
3284
  if (!b)
3285
3285
  throw new Error(`[nimpress] modules: ${n} sits under no configured system source`);
3286
3286
  const T = qr(o, b, h);
@@ -3302,7 +3302,7 @@ async function Jr(e, t, n) {
3302
3302
  throw new Error(
3303
3303
  `[nimpress] modules: no source file found for ${a.system}/${a.component}, the schema upsert needs the component source`
3304
3304
  );
3305
- const f = Jt(c.componentFile) ?? c.systemConfig.framework;
3305
+ const f = Ut(c.componentFile) ?? c.systemConfig.framework;
3306
3306
  return {
3307
3307
  system: a.system,
3308
3308
  component: a.component,
@@ -3312,10 +3312,10 @@ async function Jr(e, t, n) {
3312
3312
  };
3313
3313
  }
3314
3314
  async function Ur(e, t, n) {
3315
- const o = await Jr(e, t, n), s = await tn(o.componentFile, o.framework, o.component);
3315
+ const o = await Jr(e, t, n), s = await nn(o.componentFile, o.framework, o.component);
3316
3316
  if (!s)
3317
3317
  throw new Error(`[nimpress] modules: schema parse produced nothing for ${o.component}`);
3318
- await on(o.pageDir, o.component, s);
3318
+ await sn(o.pageDir, o.component, s);
3319
3319
  const r = at(o.pageDir);
3320
3320
  return xe(e, r?.path ?? J(o.pageDir, "schema.json"));
3321
3321
  }
@@ -3331,12 +3331,12 @@ async function Bi(e, t, n = {}) {
3331
3331
  console.warn(`nimpress modules: no source for ${r.system}/${r.component}, skipped`);
3332
3332
  continue;
3333
3333
  }
3334
- const c = Jt(a.componentFile) ?? a.systemConfig.framework, f = await tn(a.componentFile, c, r.component);
3335
- f && (await on(Z(r.pageFile), r.component, f), s++);
3334
+ const c = Ut(a.componentFile) ?? a.systemConfig.framework, f = await nn(a.componentFile, c, r.component);
3335
+ f && (await sn(Z(r.pageFile), r.component, f), s++);
3336
3336
  }
3337
3337
  return s;
3338
3338
  }
3339
- const sn = "/__nimpress/command", ro = "@nimtech/nimpress/commands", qe = "\0virtual:nimpress/commands", ao = "nimpress:unguarded-command", io = `export const commandsEnabled = false
3339
+ const rn = "/__nimpress/command", ro = "@nimtech/nimpress/commands", qe = "\0virtual:nimpress/commands", ao = "nimpress:unguarded-command", io = `export const commandsEnabled = false
3340
3340
  export async function postCommand() {
3341
3341
  throw new Error('${ao} commands run only under nimpress dev, a static build has no command server')
3342
3342
  }
@@ -3433,7 +3433,7 @@ function lo(e, t) {
3433
3433
  return;
3434
3434
  }
3435
3435
  if (n.method !== "POST") {
3436
- o.setHeader("Allow", "POST"), He(o, 405, { error: `${sn} takes POST` });
3436
+ o.setHeader("Allow", "POST"), He(o, 405, { error: `${rn} takes POST` });
3437
3437
  return;
3438
3438
  }
3439
3439
  const s = [];
@@ -3454,15 +3454,15 @@ function lo(e, t) {
3454
3454
  });
3455
3455
  };
3456
3456
  }
3457
- const ta = 6161, Ut = "virtual:nimpress-harness/";
3457
+ const ta = 6161, Gt = "virtual:nimpress-harness/";
3458
3458
  function Pt(e, t) {
3459
3459
  const n = e.systems[t]?.port;
3460
3460
  if (n) return n;
3461
3461
  const o = Object.keys(e.systems).sort();
3462
3462
  return ta + Math.max(0, o.indexOf(t));
3463
3463
  }
3464
- function Gt(e, t) {
3465
- return `${Ut}${e}/${t}/entry`;
3464
+ function Vt(e, t) {
3465
+ return `${Gt}${e}/${t}/entry`;
3466
3466
  }
3467
3467
  function po() {
3468
3468
  return `const params = new URLSearchParams(location.search)
@@ -3827,7 +3827,7 @@ function sa(e) {
3827
3827
  } catch {
3828
3828
  return {};
3829
3829
  }
3830
- const n = Zt(e.component, t), o = {};
3830
+ const n = Qt(e.component, t), o = {};
3831
3831
  for (const s of n.props) {
3832
3832
  if (!s.required) continue;
3833
3833
  const r = s.default !== void 0 ? s.default : ds(s, 0);
@@ -3933,7 +3933,7 @@ function la(e, t, n, o, s) {
3933
3933
  (P) => P.startsWith(".") || $e(P) ? V(e, P) : P
3934
3934
  ), c = ia(e, r), f = ca(e, r);
3935
3935
  let d = new Map(o.map((P) => [P.component, P]));
3936
- const h = "\0" + Ut, b = (P) => {
3936
+ const h = "\0" + Gt, b = (P) => {
3937
3937
  if (!P.startsWith(h)) return null;
3938
3938
  const g = P.slice(h.length).split("/");
3939
3939
  return g[0] === n && g[1] ? g[1] : null;
@@ -3946,28 +3946,28 @@ function la(e, t, n, o, s) {
3946
3946
  T = P.command === "build";
3947
3947
  },
3948
3948
  resolveId(P) {
3949
- return P.startsWith(h) ? P : P.startsWith(Ut) ? "\0" + P : T && P === ro ? qe : null;
3949
+ return P.startsWith(h) ? P : P.startsWith(Gt) ? "\0" + P : T && P === ro ? qe : null;
3950
3950
  },
3951
3951
  load(P) {
3952
3952
  if (P === qe) return io;
3953
3953
  const g = b(P);
3954
3954
  if (!g) return null;
3955
- const w = d.get(g);
3956
- return w ? O(w) : null;
3955
+ const v = d.get(g);
3956
+ return v ? O(v) : null;
3957
3957
  },
3958
3958
  configureServer(P) {
3959
- P.middlewares.use(sn, lo(t.commands, e));
3960
- const g = V(e, t.contentDir), w = async (D) => {
3959
+ P.middlewares.use(rn, lo(t.commands, e));
3960
+ const g = V(e, t.contentDir), v = async (D) => {
3961
3961
  if (xe(g, D).startsWith("..") || !/\.story\.tsx?$/.test(D) && !D.endsWith(".md")) return;
3962
3962
  const I = await rt(e, t.contentDir), k = [...d.keys()];
3963
3963
  d = new Map(ho(e, t.modules, n, I).map((x) => [x.component, x]));
3964
3964
  for (const x of /* @__PURE__ */ new Set([...k, ...d.keys()])) {
3965
- const R = P.moduleGraph.getModuleById("\0" + Gt(n, x));
3965
+ const R = P.moduleGraph.getModuleById("\0" + Vt(n, x));
3966
3966
  R && P.moduleGraph.invalidateModule(R);
3967
3967
  }
3968
3968
  P.ws.send({ type: "full-reload" });
3969
3969
  };
3970
- P.watcher.add(g), P.watcher.on("add", w), P.watcher.on("unlink", w), P.middlewares.use(async (D, I, k) => {
3970
+ P.watcher.add(g), P.watcher.on("add", v), P.watcher.on("unlink", v), P.middlewares.use(async (D, I, k) => {
3971
3971
  const x = D.url;
3972
3972
  if (!x) return k();
3973
3973
  const R = x.split("?")[0];
@@ -3982,7 +3982,7 @@ function la(e, t, n, o, s) {
3982
3982
  return;
3983
3983
  }
3984
3984
  if (Q === "entry.js") {
3985
- const me = await P.transformRequest(Gt(n, X));
3985
+ const me = await P.transformRequest(Vt(n, X));
3986
3986
  if (!me) return k();
3987
3987
  I.statusCode = 200, I.setHeader("Content-Type", "application/javascript"), I.end(me.code);
3988
3988
  return;
@@ -3991,7 +3991,7 @@ function la(e, t, n, o, s) {
3991
3991
  });
3992
3992
  },
3993
3993
  generateBundle(P, g) {
3994
- const w = Object.values(g).flatMap((k) => k.type === "chunk" ? [k.code] : []), D = co(w, this.getModuleInfo(qe)?.importers ?? []);
3994
+ const v = Object.values(g).flatMap((k) => k.type === "chunk" ? [k.code] : []), D = co(v, this.getModuleInfo(qe)?.importers ?? []);
3995
3995
  D && this.error(D);
3996
3996
  const I = (k, x, R) => {
3997
3997
  if (x.has(k)) return;
@@ -4050,19 +4050,19 @@ async function Wi(e, t, n, o) {
4050
4050
  emptyOutDir: !0,
4051
4051
  target: "es2022",
4052
4052
  rollupOptions: {
4053
- input: Object.fromEntries(c.map((I) => [I.component, Gt(n, I.component)]))
4053
+ input: Object.fromEntries(c.map((I) => [I.component, Vt(n, I.component)]))
4054
4054
  }
4055
4055
  },
4056
4056
  base: T
4057
- }, g = en(P, t.vite);
4057
+ }, g = tn(P, t.vite);
4058
4058
  if (r.framework !== "vue") return g;
4059
- const w = g.resolve?.alias ?? [], D = Array.isArray(w) ? w : Object.entries(w).map(([I, k]) => ({ find: I, replacement: k }));
4059
+ const v = g.resolve?.alias ?? [], D = Array.isArray(v) ? v : Object.entries(v).map(([I, k]) => ({ find: I, replacement: k }));
4060
4060
  return {
4061
4061
  ...g,
4062
4062
  resolve: { ...g.resolve, alias: [{ find: /^vue$/, replacement: "vue/dist/vue.esm-bundler.js" }, ...D] }
4063
4063
  };
4064
4064
  }
4065
- function Nt(e, t) {
4065
+ function It(e, t) {
4066
4066
  const n = e.search(new RegExp(`\\b${t}\\s*:`));
4067
4067
  if (n < 0) return;
4068
4068
  const o = e.indexOf("{", n);
@@ -4074,7 +4074,7 @@ function Nt(e, t) {
4074
4074
  return;
4075
4075
  }
4076
4076
  }
4077
- function It(e, t) {
4077
+ function Ft(e, t) {
4078
4078
  const n = e.search(new RegExp(`\\b${t}\\s*:`));
4079
4079
  if (n < 0) return e;
4080
4080
  const o = e.indexOf("{", n);
@@ -4083,7 +4083,7 @@ function It(e, t) {
4083
4083
  return e.slice(0, n) + e.slice(o + 1 + s.length + 1);
4084
4084
  }
4085
4085
  function _o(e, t) {
4086
- const n = e.match(/^\s*\/\/\s*story:\s*(.+)$/m)?.[1]?.trim(), o = It(It(e, "props"), "slots"), s = Nt(o, "sidebar"), r = It(o, "sidebar"), a = r.match(/\bname\s*:\s*['"]([^'"]+)['"]/)?.[1], c = r.match(/\bdescription\s*:\s*['"]([^'"]+)['"]/)?.[1], f = Nt(e, "props"), d = Nt(e, "slots");
4086
+ const n = e.match(/^\s*\/\/\s*story:\s*(.+)$/m)?.[1]?.trim(), o = Ft(Ft(e, "props"), "slots"), s = It(o, "sidebar"), r = Ft(o, "sidebar"), a = r.match(/\bname\s*:\s*['"]([^'"]+)['"]/)?.[1], c = r.match(/\bdescription\s*:\s*['"]([^'"]+)['"]/)?.[1], f = It(e, "props"), d = It(e, "slots");
4087
4087
  return {
4088
4088
  name: n ?? a ?? Pe(t).replace(/\.story\.tsx?$/, "").replace(/_/g, " "),
4089
4089
  file: t,
@@ -4096,7 +4096,7 @@ function _o(e, t) {
4096
4096
  async function pa(e) {
4097
4097
  let t;
4098
4098
  try {
4099
- t = await Vt(e, { withFileTypes: !0 });
4099
+ t = await Xt(e, { withFileTypes: !0 });
4100
4100
  } catch {
4101
4101
  return [];
4102
4102
  }
@@ -4164,7 +4164,7 @@ async function ma(e, t, n) {
4164
4164
  const h = d[1];
4165
4165
  let b = null;
4166
4166
  if (h.startsWith(".") ? b = V(Z(c.file), h) : h.startsWith("@/") && o && (b = V(o, h.slice(2))), !b || !$e(b)) continue;
4167
- const O = [b, `${b}.ts`, `${b}.vue`, J(b, "index.ts")].find((w) => fa(w));
4167
+ const O = [b, `${b}.ts`, `${b}.vue`, J(b, "index.ts")].find((v) => fa(v));
4168
4168
  if (!O) continue;
4169
4169
  const P = V(O);
4170
4170
  if (s.has(P) || s.size > 50) continue;
@@ -4236,9 +4236,9 @@ async function ha(e) {
4236
4236
  }
4237
4237
  }
4238
4238
  }
4239
- const w = s.schema && typeof s.schema == "object" && !Array.isArray(s.schema) ? s.schema : void 0;
4240
- w && (T = T ? nn(w, T).merged : w);
4241
- const D = T ? Zt(c, T) : void 0, I = n.route.replace(/\/$/, "");
4239
+ const v = s.schema && typeof s.schema == "object" && !Array.isArray(s.schema) ? s.schema : void 0;
4240
+ v && (T = T ? on(v, T).merged : v);
4241
+ const D = T ? Qt(c, T) : void 0, I = n.route.replace(/\/$/, "");
4242
4242
  return {
4243
4243
  data: {
4244
4244
  system: a,
@@ -4286,7 +4286,7 @@ function ga(e, t = "virtual:nimpress/main") {
4286
4286
  </html>
4287
4287
  `;
4288
4288
  }
4289
- const ut = "virtual:nimpress/manifest", mt = "virtual:nimpress/search", ft = "virtual:nimpress/pages", dt = "virtual:nimpress/bodies", Ft = "virtual:nimpress/config", Rt = "virtual:nimpress/main", Ye = "virtual:nimpress/page-component/", Le = "virtual:nimpress/page-body/", Bt = 20, _a = "https://github.com/nimling/nimpress";
4289
+ const ut = "virtual:nimpress/manifest", mt = "virtual:nimpress/search", ft = "virtual:nimpress/pages", dt = "virtual:nimpress/bodies", Rt = "virtual:nimpress/config", Bt = "virtual:nimpress/main", Ye = "virtual:nimpress/page-component/", We = "virtual:nimpress/page-body/", Wt = 20, _a = "https://github.com/nimling/nimpress";
4290
4290
  function ye(e) {
4291
4291
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
4292
4292
  }
@@ -4296,7 +4296,7 @@ function ya(e) {
4296
4296
  function Nn(e) {
4297
4297
  return e === 0 ? "rss.xml" : `rss-${e + 1}.xml`;
4298
4298
  }
4299
- const Wt = [
4299
+ const Lt = [
4300
4300
  "Google-Extended",
4301
4301
  "Applebot-Extended",
4302
4302
  "OAI-SearchBot",
@@ -4410,9 +4410,9 @@ const In = (e) => e.visibility === "hidden", ve = (e) => e.visibility === "hidde
4410
4410
  styles: u.array(u.string()).optional(),
4411
4411
  meta: $a.optional(),
4412
4412
  data: u.record(u.unknown()).optional()
4413
- }).passthrough(), bo = /* @__PURE__ */ new Set(["doc", "openapi", "changelog", "hero", "fullpage", "404", "section", "tags", "glossary", "team", "pricing", "roadmap", "dbml", "milestone", "epic", "feature", "bug", "component"]), Fe = /* @__PURE__ */ new Map();
4413
+ }).passthrough(), bo = /* @__PURE__ */ new Set(["doc", "openapi", "changelog", "hero", "fullpage", "404", "section", "tags", "glossary", "team", "pricing", "roadmap", "dbml", "milestone", "epic", "feature", "bug", "component"]), Ie = /* @__PURE__ */ new Map();
4414
4414
  function xa(e, t) {
4415
- Fe.clear();
4415
+ Ie.clear();
4416
4416
  for (const [n, o] of Object.entries(t)) {
4417
4417
  const s = V(e, o), r = s.replace(/\.svelte$/, ".schema.json");
4418
4418
  let a;
@@ -4422,14 +4422,14 @@ function xa(e, t) {
4422
4422
  } catch {
4423
4423
  console.warn(`[nimpress] page type ${n}: ${r} is not valid json`);
4424
4424
  }
4425
- Fe.set(n, { file: o, schema: a });
4425
+ Ie.set(n, { file: o, schema: a });
4426
4426
  }
4427
4427
  }
4428
4428
  function Sa(e) {
4429
4429
  return Array.isArray(e) ? "array" : e === null ? "null" : typeof e;
4430
4430
  }
4431
4431
  function ja(e, t) {
4432
- const n = Fe.get(e)?.schema;
4432
+ const n = Ie.get(e)?.schema;
4433
4433
  if (!n) return [];
4434
4434
  const o = [];
4435
4435
  for (const s of n.required ?? [])
@@ -4448,7 +4448,7 @@ function wo(e, t = "x") {
4448
4448
  return n;
4449
4449
  }
4450
4450
  const a = r.data;
4451
- a.type && !bo.has(a.type) && !Fe.has(a.type) && n.push(`type: ${a.type} is not a page type; add it under pageTypes in the config`);
4451
+ a.type && !bo.has(a.type) && !Ie.has(a.type) && n.push(`type: ${a.type} is not a page type; add it under pageTypes in the config`);
4452
4452
  const c = a.data ?? {};
4453
4453
  if (a.link)
4454
4454
  return !a.title && !a.sidebar?.name && n.push("a link page needs a title or a sidebar.name for its label"), /^[a-z][a-z0-9+.-]*:\/\/|^mailto:|^tel:/i.test(a.link) || n.push("link: must be an absolute url"), t.trim() !== "" && n.push("a link page carries no body, the entry opens link instead of a page"), n;
@@ -4459,7 +4459,7 @@ function wo(e, t = "x") {
4459
4459
  const d = c.title === void 0 ? "" : String(c.title);
4460
4460
  d.trim() || n.push("changelog requires data.title"), d.length > 48 && n.push("changelog data.title exceeds 48 characters"), d.includes(",") && n.push("changelog data.title must not contain a comma"), c.description !== void 0 && String(c.description).length > 160 && n.push("changelog data.description exceeds 160 characters");
4461
4461
  }
4462
- if ((a.type === "milestone" || a.type === "epic" || a.type === "feature" || a.type === "bug") && (a.description || n.push(`type ${a.type} requires a description`), (c.date === void 0 || Number.isNaN(new Date(String(c.date)).getTime())) && n.push(`type ${a.type} requires a valid data.date`)), a.type && Fe.has(a.type) && n.push(...ja(a.type, c)), a.type === "team") {
4462
+ if ((a.type === "milestone" || a.type === "epic" || a.type === "feature" || a.type === "bug") && (a.description || n.push(`type ${a.type} requires a description`), (c.date === void 0 || Number.isNaN(new Date(String(c.date)).getTime())) && n.push(`type ${a.type} requires a valid data.date`)), a.type && Ie.has(a.type) && n.push(...ja(a.type, c)), a.type === "team") {
4463
4463
  const d = Array.isArray(c.members) ? c.members : [];
4464
4464
  d.length === 0 && n.push("type team requires data.members with at least one member"), d.forEach((h, b) => {
4465
4465
  (typeof h?.name != "string" || !h.name.trim()) && n.push(`type team member ${b + 1} needs a name`);
@@ -4542,10 +4542,10 @@ function ko(e) {
4542
4542
  function Oa(e, t, n) {
4543
4543
  return ko(n ?? Aa(vo(e, t)));
4544
4544
  }
4545
- async function rn(e, t = []) {
4545
+ async function an(e, t = []) {
4546
4546
  let n;
4547
4547
  try {
4548
- n = await Vt(e, { withFileTypes: !0 });
4548
+ n = await Xt(e, { withFileTypes: !0 });
4549
4549
  } catch {
4550
4550
  return t;
4551
4551
  }
@@ -4553,15 +4553,15 @@ async function rn(e, t = []) {
4553
4553
  const s = J(e, o.name);
4554
4554
  if (o.isDirectory()) {
4555
4555
  if (o.name.startsWith(".") || o.name === "node_modules") continue;
4556
- await rn(s, t);
4556
+ await an(s, t);
4557
4557
  } else o.isFile() && o.name.endsWith(".md") && t.push(s);
4558
4558
  }
4559
4559
  return t;
4560
4560
  }
4561
- function Re(e) {
4561
+ function Fe(e) {
4562
4562
  return e.toLowerCase().replace(/[^a-z0-9\s-]/g, "").trim().replace(/\s+/g, "-");
4563
4563
  }
4564
- function Lt(e) {
4564
+ function Ht(e) {
4565
4565
  return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
4566
4566
  }
4567
4567
  const Fn = {
@@ -4774,16 +4774,16 @@ function Ua(e) {
4774
4774
  for (; P.length; ) {
4775
4775
  const g = a.exec(P);
4776
4776
  if (!g) break;
4777
- const w = g[2], D = r.get(w.toLowerCase()) ?? w;
4778
- if (D === D.toUpperCase() && D.length > 1 && w !== D) {
4777
+ const v = g[2], D = r.get(v.toLowerCase()) ?? v;
4778
+ if (D === D.toUpperCase() && D.length > 1 && v !== D) {
4779
4779
  const H = new t.Token("text", "", 0);
4780
- H.content = P.slice(0, g.index + g[1].length + w.length), T.push(H), P = P.slice(g.index + g[1].length + w.length);
4780
+ H.content = P.slice(0, g.index + g[1].length + v.length), T.push(H), P = P.slice(g.index + g[1].length + v.length);
4781
4781
  continue;
4782
4782
  }
4783
4783
  const k = g.index + g[1].length;
4784
4784
  if (h.has(D)) {
4785
4785
  const H = new t.Token("text", "", 0);
4786
- H.content = P.slice(0, k + w.length), T.push(H), P = P.slice(k + w.length);
4786
+ H.content = P.slice(0, k + v.length), T.push(H), P = P.slice(k + v.length);
4787
4787
  continue;
4788
4788
  }
4789
4789
  if (h.add(D), k > 0) {
@@ -4793,7 +4793,7 @@ function Ua(e) {
4793
4793
  const x = new t.Token("abbr_open", "abbr", 1);
4794
4794
  x.attrSet("class", "np-abbr np-tip"), x.attrSet("aria-label", o.get(D) ?? ""), T.push(x);
4795
4795
  const R = new t.Token("text", "", 0);
4796
- R.content = w, T.push(R), T.push(new t.Token("abbr_close", "abbr", -1)), P = P.slice(k + w.length);
4796
+ R.content = v, T.push(R), T.push(new t.Token("abbr_close", "abbr", -1)), P = P.slice(k + v.length);
4797
4797
  }
4798
4798
  if (P.length) {
4799
4799
  const g = new t.Token("text", "", 0);
@@ -4808,7 +4808,7 @@ const Ga = (e) => {
4808
4808
  if (!e.env.glossaryPage) return;
4809
4809
  const n = e.tokens;
4810
4810
  for (let o = 0; o + 1 < n.length; o++)
4811
- n[o].type !== "dt_open" || n[o + 1].type !== "inline" || (n[o].attrSet("id", `term-${Re(n[o + 1].content)}`), n[o].attrJoin("class", "np-glossary-term"));
4811
+ n[o].type !== "dt_open" || n[o + 1].type !== "inline" || (n[o].attrSet("id", `term-${Fe(n[o + 1].content)}`), n[o].attrJoin("class", "np-glossary-term"));
4812
4812
  }, Va = (e) => {
4813
4813
  const t = e.tokens, n = /* @__PURE__ */ new Map();
4814
4814
  for (let o = 0; o < t.length; o++) {
@@ -4838,7 +4838,7 @@ function Xa(e, t) {
4838
4838
  let a = r + 1;
4839
4839
  for (; a < n.length && n[a].type !== "inline" && n[a].type !== "dd_close"; ) a += 1;
4840
4840
  const c = n[a]?.type === "inline" ? n[a].content.trim() : "";
4841
- c && o.push({ term: s, slug: `term-${Re(s)}`, description: c }), s = "";
4841
+ c && o.push({ term: s, slug: `term-${Fe(s)}`, description: c }), s = "";
4842
4842
  }
4843
4843
  }
4844
4844
  return o;
@@ -4854,7 +4854,7 @@ function Ya(e, t) {
4854
4854
  return n ? n[1] : null;
4855
4855
  }
4856
4856
  const Ka = new Set("a an the and or but if then else of to in on at by for with from as is are was were be been being it its this that these those there here which who whom what when where why how not no yes you your we our they their he she his her them us me my i so do does did done can could should would will shall may might must into over under again more most some any each every all both few own same than too very just also only such other another one two three first last new use used using page pages file files field fields set sets value values see".split(" "));
4857
- function Ht(e) {
4857
+ function zt(e) {
4858
4858
  return e.toLowerCase().replace(/```[\s\S]*?```/g, " ").replace(/`[^`]*`/g, " ").replace(/[^\p{L}\p{N}\s-]/gu, " ").split(/\s+/).map((t) => t.replace(/^-+|-+$/g, "")).filter((t) => t.length > 2 && !Ka.has(t) && !/^\d+$/.test(t));
4859
4859
  }
4860
4860
  function Za(e) {
@@ -4870,7 +4870,7 @@ function Qa(e) {
4870
4870
  const a = /* @__PURE__ */ new Map(), c = (f, d) => {
4871
4871
  for (const h of f) a.set(h, (a.get(h) ?? 0) + d);
4872
4872
  };
4873
- c(Ht(r.title), 6), c(Ht(r.headings.join(" ")), 3), c(r.tags.map((f) => f.toLowerCase()), 8), c(Ht(r.body), 1);
4873
+ c(zt(r.title), 6), c(zt(r.headings.join(" ")), 3), c(r.tags.map((f) => f.toLowerCase()), 8), c(zt(r.body), 1);
4874
4874
  for (const f of a.keys()) t.set(f, (t.get(f) ?? 0) + 1);
4875
4875
  return { source: r, counts: a };
4876
4876
  }), o = Math.max(e.length, 1), s = /* @__PURE__ */ new Map();
@@ -4893,14 +4893,14 @@ function Ln(e, t = { route: "/_components" }, n = "/", o = { math: !0 }) {
4893
4893
  html: !0,
4894
4894
  linkify: !0,
4895
4895
  typographer: !1,
4896
- highlight(g, w, D) {
4896
+ highlight(g, v, D) {
4897
4897
  const I = {
4898
4898
  curl: "bash",
4899
4899
  sh: "bash",
4900
4900
  zsh: "bash",
4901
4901
  console: "bash",
4902
4902
  hurl: "http"
4903
- }, x = ((D ? D.match(/\[([^\]]+)\]/) : null)?.[1].trim() || w || "text").trim(), R = I[w] ?? w, H = R && e.getLoadedLanguages().includes(R) ? R : "text", X = ni(D ?? ""), Q = oi(x, X), me = xo.test(g) ? { includeExplanation: "scopeName" } : {};
4903
+ }, x = ((D ? D.match(/\[([^\]]+)\]/) : null)?.[1].trim() || v || "text").trim(), R = I[v] ?? v, H = R && e.getLoadedLanguages().includes(R) ? R : "text", X = ni(D ?? ""), Q = oi(x, X), me = xo.test(g) ? { includeExplanation: "scopeName" } : {};
4904
4904
  try {
4905
4905
  return e.codeToHtml(g, {
4906
4906
  ...me,
@@ -4912,37 +4912,37 @@ function Ln(e, t = { route: "/_components" }, n = "/", o = { math: !0 }) {
4912
4912
  return `<pre ${Object.entries(Q).map(([_e, ae]) => `${_e}="${s.utils.escapeHtml(ae)}"`).join(" ")}><code>${s.utils.escapeHtml(g)}</code></pre>`;
4913
4913
  }
4914
4914
  }
4915
- }), r = (g, w, D, I, k) => k.renderToken(g, w, D), a = s.renderer.rules.fence ?? r;
4916
- s.renderer.rules.fence = (g, w, D, I, k) => {
4917
- const x = a(g, w, D, I, k);
4915
+ }), r = (g, v, D, I, k) => k.renderToken(g, v, D), a = s.renderer.rules.fence ?? r;
4916
+ s.renderer.rules.fence = (g, v, D, I, k) => {
4917
+ const x = a(g, v, D, I, k);
4918
4918
  if (!x.includes("np-code-annotation")) return x;
4919
- const R = g[w + 1];
4919
+ const R = g[v + 1];
4920
4920
  if (!R || R.type !== "ordered_list_open") return x;
4921
- let H = w + 2;
4921
+ let H = v + 2;
4922
4922
  for (; H < g.length && !(g[H].type === "ordered_list_close" && g[H].level === R.level); ) H += 1;
4923
4923
  if (H >= g.length) return x;
4924
4924
  const X = {};
4925
4925
  let Q = Number(R.attrGet("start") ?? 1);
4926
- for (let te = w + 2; te < H; te++) {
4926
+ for (let te = v + 2; te < H; te++) {
4927
4927
  if (g[te].type !== "list_item_open" || g[te].level !== R.level + 1) continue;
4928
4928
  let _e = te + 1;
4929
4929
  for (; _e < H && !(g[_e].type === "list_item_close" && g[_e].level === g[te].level); ) _e += 1;
4930
4930
  X[String(Q)] = k.render(g.slice(te + 1, _e), D, I).trim(), Q += 1, te = _e;
4931
4931
  }
4932
- for (let te = w + 1; te <= H; te++) g[te].type = "np_annotation_list";
4932
+ for (let te = v + 1; te <= H; te++) g[te].type = "np_annotation_list";
4933
4933
  const me = Buffer.from(JSON.stringify(X), "utf-8").toString("base64");
4934
4934
  return x.replace("<pre ", `<pre data-annotations="${me}" `);
4935
4935
  }, s.renderer.rules.np_annotation_list = () => "";
4936
4936
  const c = s.renderer.rules.link_open ?? r;
4937
- s.renderer.rules.link_open = (g, w, D, I, k) => {
4938
- const x = g[w].attrGet("href");
4939
- x && g[w].attrSet("href", be(n, x));
4940
- const R = g[w].attrGet("title");
4941
- return R && (g[w].attrs = (g[w].attrs ?? []).filter(([H]) => H !== "title"), g[w].attrJoin("class", "np-tip"), g[w].attrSet("aria-label", R)), c(g, w, D, I, k);
4937
+ s.renderer.rules.link_open = (g, v, D, I, k) => {
4938
+ const x = g[v].attrGet("href");
4939
+ x && g[v].attrSet("href", be(n, x));
4940
+ const R = g[v].attrGet("title");
4941
+ return R && (g[v].attrs = (g[v].attrs ?? []).filter(([H]) => H !== "title"), g[v].attrJoin("class", "np-tip"), g[v].attrSet("aria-label", R)), c(g, v, D, I, k);
4942
4942
  };
4943
4943
  const f = s.renderer.rules.image ?? r;
4944
- s.renderer.rules.image = (g, w, D, I, k) => {
4945
- const x = g[w], R = x.attrGet("src");
4944
+ s.renderer.rules.image = (g, v, D, I, k) => {
4945
+ const x = g[v], R = x.attrGet("src");
4946
4946
  if (R) {
4947
4947
  const te = /#only-(light|dark)$/.exec(R);
4948
4948
  te ? (x.attrSet("src", be(n, R.slice(0, -te[0].length))), x.attrJoin("class", `np-img-${te[1]}`)) : x.attrSet("src", be(n, R));
@@ -4951,20 +4951,20 @@ function Ln(e, t = { route: "/_components" }, n = "/", o = { math: !0 }) {
4951
4951
  (H === "left" || H === "right") && (x.attrs = (x.attrs ?? []).filter(([te]) => te !== "align"), x.attrJoin("class", `np-img-${H}`));
4952
4952
  const X = I;
4953
4953
  X.imageCount = (X.imageCount ?? 0) + 1, X.imageCount > 1 && !x.attrGet("loading") && x.attrSet("loading", "lazy");
4954
- const Q = f(g, w, D, I, k), me = x.meta?.figure ? x.attrGet("title") : null;
4954
+ const Q = f(g, v, D, I, k), me = x.meta?.figure ? x.attrGet("title") : null;
4955
4955
  return me ? `${Q}<figcaption class="np-figcaption">${s.utils.escapeHtml(me)}</figcaption>` : Q;
4956
4956
  }, s.use(bn, {
4957
- slugify: Re,
4957
+ slugify: Fe,
4958
4958
  permalink: bn.permalink.headerLink({ safariReaderFix: !0 })
4959
4959
  }), s.use(ns), s.use(Un), s.use(ss), s.use(rs, { enabled: !0 }), s.use(As), s.inline.ruler.before("emphasis", "np_ins", Ma), s.renderer.rules.s_open = () => "<del>", s.renderer.rules.s_close = () => "</del>", s.use(Ms), s.use(Is), s.inline.ruler.before("emphasis", "np_keys", Ta), s.core.ruler.push("np_figures", Na), s.block.ruler.before("reference", "np_abbr_definition", qa, { alt: ["paragraph", "reference", "blockquote", "list"] }), s.core.ruler.after("inline", "np_abbr", Ua(o.glossary ?? [])), s.core.ruler.push("np_glossary_anchors", Ga), s.core.ruler.after("footnote_tail", "np_footnote_tips", Va);
4960
4960
  const d = s.renderer.rules.footnote_ref ?? r;
4961
- s.renderer.rules.footnote_ref = (g, w, D, I, k) => {
4962
- const x = String(g[w].meta?.tip ?? ""), R = d(g, w, D, I, k);
4961
+ s.renderer.rules.footnote_ref = (g, v, D, I, k) => {
4962
+ const x = String(g[v].meta?.tip ?? ""), R = d(g, v, D, I, k);
4963
4963
  return x ? R.replace('<sup class="footnote-ref">', `<sup class="footnote-ref np-tip" aria-label="${s.utils.escapeHtml(x)}">`) : R;
4964
- }, s.inline.ruler.before("emphasis", "np_icon", Wa(o.icons)), s.use(qs), s.renderer.rules.np_icon = (g, w, D, I, k) => `<span${k.renderAttrs(g[w])}>${g[w].content}</span>`, o.math !== !1 && (s.block.ruler.before("fence", "np_math_block", La, { alt: ["paragraph", "reference", "blockquote", "list"] }), s.inline.ruler.before("emphasis", "np_math_inline", Ha), s.renderer.rules.np_math_block = (g, w) => `<div class="np-math np-math-display" data-math="${Bn(g[w].content)}"></div>
4965
- `, s.renderer.rules.np_math_inline = (g, w) => `<span class="np-math" data-math="${Bn(g[w].content)}"></span>`);
4966
- const h = (g, w) => {
4967
- s.use(os, g, w);
4964
+ }, s.inline.ruler.before("emphasis", "np_icon", Wa(o.icons)), s.use(qs), s.renderer.rules.np_icon = (g, v, D, I, k) => `<span${k.renderAttrs(g[v])}>${g[v].content}</span>`, o.math !== !1 && (s.block.ruler.before("fence", "np_math_block", La, { alt: ["paragraph", "reference", "blockquote", "list"] }), s.inline.ruler.before("emphasis", "np_math_inline", Ha), s.renderer.rules.np_math_block = (g, v) => `<div class="np-math np-math-display" data-math="${Bn(g[v].content)}"></div>
4965
+ `, s.renderer.rules.np_math_inline = (g, v) => `<span class="np-math" data-math="${Bn(g[v].content)}"></span>`);
4966
+ const h = (g, v) => {
4967
+ s.use(os, g, v);
4968
4968
  }, b = [
4969
4969
  "tip",
4970
4970
  "note",
@@ -4979,30 +4979,30 @@ function Ln(e, t = { route: "/_components" }, n = "/", o = { math: !0 }) {
4979
4979
  "bug",
4980
4980
  "example",
4981
4981
  "quote"
4982
- ], T = (g) => g[0].toUpperCase() + g.slice(1), O = (g, w) => {
4983
- const D = g.trim().slice(w.length).trim(), I = D.indexOf("{"), k = I >= 0 ? Oe(D.slice(I), g) : {}, x = (I >= 0 ? D.slice(0, I) : D).trim();
4982
+ ], T = (g) => g[0].toUpperCase() + g.slice(1), O = (g, v) => {
4983
+ const D = g.trim().slice(v.length).trim(), I = D.indexOf("{"), k = I >= 0 ? Oe(D.slice(I), g) : {}, x = (I >= 0 ? D.slice(0, I) : D).trim();
4984
4984
  return {
4985
- title: x === '""' ? "" : x || T(w),
4985
+ title: x === '""' ? "" : x || T(v),
4986
4986
  collapsible: k.collapsible === !0,
4987
4987
  open: k.open === !0,
4988
4988
  inline: k.inline === "start" || k.inline === "end" ? k.inline : ""
4989
4989
  };
4990
- }, P = (g, w, D) => {
4990
+ }, P = (g, v, D) => {
4991
4991
  let I = 0;
4992
- for (let k = w - 1; k >= 0; k--)
4992
+ for (let k = v - 1; k >= 0; k--)
4993
4993
  if (g[k].type === `container_${D}_close`) I++;
4994
4994
  else if (g[k].type === `container_${D}_open`) {
4995
4995
  if (I === 0) return g[k];
4996
4996
  I--;
4997
4997
  }
4998
- return g[w];
4998
+ return g[v];
4999
4999
  };
5000
5000
  for (const g of b)
5001
5001
  h(g, {
5002
- render(w, D) {
5003
- if (w[D].nesting !== 1)
5004
- return O(P(w, D, g).info, g).collapsible ? "</div></details>" : "</div></div>";
5005
- const { title: I, collapsible: k, open: x, inline: R } = O(w[D].info, g), H = `np-callout np-callout-${g}${k ? " np-callout-collapsible" : ""}${R ? ` np-callout-inline np-callout-inline-${R}` : ""}`;
5002
+ render(v, D) {
5003
+ if (v[D].nesting !== 1)
5004
+ return O(P(v, D, g).info, g).collapsible ? "</div></details>" : "</div></div>";
5005
+ const { title: I, collapsible: k, open: x, inline: R } = O(v[D].info, g), H = `np-callout np-callout-${g}${k ? " np-callout-collapsible" : ""}${R ? ` np-callout-inline np-callout-inline-${R}` : ""}`;
5006
5006
  if (k)
5007
5007
  return `<details class="${H}"${x ? " open" : ""}><summary class="np-callout-title">${s.utils.escapeHtml(I || T(g))}</summary><div class="np-callout-body">`;
5008
5008
  const X = I ? `<div class="np-callout-title">${s.utils.escapeHtml(I)}</div>` : "";
@@ -5010,16 +5010,16 @@ function Ln(e, t = { route: "/_components" }, n = "/", o = { math: !0 }) {
5010
5010
  }
5011
5011
  });
5012
5012
  return h("cards", {
5013
- render(g, w) {
5014
- return g[w].nesting === 1 ? '<div class="np-cards-grid">' : "</div>";
5013
+ render(g, v) {
5014
+ return g[v].nesting === 1 ? '<div class="np-cards-grid">' : "</div>";
5015
5015
  }
5016
5016
  }), h("details", {
5017
5017
  validate(g) {
5018
5018
  return /^details\b/.test(g.trim());
5019
5019
  },
5020
- render(g, w) {
5021
- if (g[w].nesting === 1) {
5022
- const D = g[w].info.trim().match(/^details\s*(.*)$/), I = D && D[1] || "Details";
5020
+ render(g, v) {
5021
+ if (g[v].nesting === 1) {
5022
+ const D = g[v].info.trim().match(/^details\s*(.*)$/), I = D && D[1] || "Details";
5023
5023
  return `<details class="np-details"><summary class="np-details-summary">${s.utils.escapeHtml(I)}</summary><div class="np-details-body">
5024
5024
  `;
5025
5025
  }
@@ -5027,68 +5027,68 @@ function Ln(e, t = { route: "/_components" }, n = "/", o = { math: !0 }) {
5027
5027
  `;
5028
5028
  }
5029
5029
  }), h("code-group", {
5030
- render(g, w) {
5031
- return g[w].nesting === 1 ? '<div class="np-code-group">' : "</div>";
5030
+ render(g, v) {
5031
+ return g[v].nesting === 1 ? '<div class="np-code-group">' : "</div>";
5032
5032
  }
5033
5033
  }), h("tabs", {
5034
- render(g, w) {
5035
- if (g[w].nesting === 1) {
5036
- const D = g[w].info.trim().slice(4).trim();
5037
- return `<div class="np-tabs"${(D ? Oe(D, g[w].info) : {}).linked === !0 ? ' data-linked="true"' : ""}>`;
5034
+ render(g, v) {
5035
+ if (g[v].nesting === 1) {
5036
+ const D = g[v].info.trim().slice(4).trim();
5037
+ return `<div class="np-tabs"${(D ? Oe(D, g[v].info) : {}).linked === !0 ? ' data-linked="true"' : ""}>`;
5038
5038
  }
5039
5039
  return "</div>";
5040
5040
  }
5041
5041
  }), s.core.ruler.before("inline", "nimpress_tabs", (g) => {
5042
- const w = g.tokens, D = [], I = (k) => {
5042
+ const v = g.tokens, D = [], I = (k) => {
5043
5043
  const x = new g.Token("html_block", "", 0);
5044
5044
  return x.content = k, x.block = !0, x;
5045
5045
  };
5046
- for (let k = 0; k < w.length; k++) {
5047
- const x = w[k];
5046
+ for (let k = 0; k < v.length; k++) {
5047
+ const x = v[k];
5048
5048
  if (x.type === "container_tabs_open") {
5049
5049
  D.push(!1);
5050
5050
  continue;
5051
5051
  }
5052
5052
  if (x.type === "container_tabs_close") {
5053
- D.pop() && w.splice(k++, 0, I("</div>"));
5053
+ D.pop() && v.splice(k++, 0, I("</div>"));
5054
5054
  continue;
5055
5055
  }
5056
5056
  if (D.length === 0 || x.type !== "paragraph_open") continue;
5057
- const R = w[k + 1], H = R?.type === "inline" ? R.content.match(/^::tab[ \t]+(.+?)[ \t]*(?:\n([\s\S]*))?$/) : null;
5057
+ const R = v[k + 1], H = R?.type === "inline" ? R.content.match(/^::tab[ \t]+(.+?)[ \t]*(?:\n([\s\S]*))?$/) : null;
5058
5058
  if (!H) continue;
5059
5059
  const X = H[1], Q = D[D.length - 1] ? "</div>" : "", me = I(
5060
- `${Q}<div class="np-tabs-panel" data-label="${s.utils.escapeHtml(X)}" data-id="tab-${Re(X)}">`
5060
+ `${Q}<div class="np-tabs-panel" data-label="${s.utils.escapeHtml(X)}" data-id="tab-${Fe(X)}">`
5061
5061
  );
5062
- D[D.length - 1] = !0, H[2] === void 0 ? w.splice(k, 3, me) : (R.content = H[2], w.splice(k, 0, me), k++);
5062
+ D[D.length - 1] = !0, H[2] === void 0 ? v.splice(k, 3, me) : (R.content = H[2], v.splice(k, 0, me), k++);
5063
5063
  }
5064
5064
  }), h("actions", {
5065
- render(g, w) {
5066
- if (g[w].nesting === 1) {
5067
- const D = g[w].info.trim().slice(7).trim(), I = D ? Oe(D, g[w].info) : {}, k = typeof I?.align == "string" ? I.align : "start";
5065
+ render(g, v) {
5066
+ if (g[v].nesting === 1) {
5067
+ const D = g[v].info.trim().slice(7).trim(), I = D ? Oe(D, g[v].info) : {}, k = typeof I?.align == "string" ? I.align : "start";
5068
5068
  return `<div class="np-actions" data-align="${s.utils.escapeHtml(k)}">`;
5069
5069
  }
5070
5070
  return "</div>";
5071
5071
  }
5072
5072
  }), h("features", {
5073
- render(g, w) {
5074
- if (g[w].nesting === 1) {
5075
- const D = g[w].info.trim().slice(8).trim(), I = D ? Oe(D, g[w].info) : {}, k = typeof I?.columns == "number" ? I.columns : 0;
5073
+ render(g, v) {
5074
+ if (g[v].nesting === 1) {
5075
+ const D = g[v].info.trim().slice(8).trim(), I = D ? Oe(D, g[v].info) : {}, k = typeof I?.columns == "number" ? I.columns : 0;
5076
5076
  return `<div class="np-features"${k > 0 ? ` data-columns="${k}"` : ""}>`;
5077
5077
  }
5078
5078
  return "</div>";
5079
5079
  }
5080
5080
  }), h("feature", {
5081
- render(g, w) {
5082
- if (g[w].nesting === 1) {
5083
- const D = g[w].info.trim().slice(7).trim(), I = D ? Oe(D, g[w].info) : {};
5081
+ render(g, v) {
5082
+ if (g[v].nesting === 1) {
5083
+ const D = g[v].info.trim().slice(7).trim(), I = D ? Oe(D, g[v].info) : {};
5084
5084
  return `<div class="np-feature" data-config="${st(JSON.stringify(I))}"><div class="np-feature-body">`;
5085
5085
  }
5086
5086
  return "</div></div>";
5087
5087
  }
5088
5088
  }), h("component", {
5089
- render(g, w) {
5090
- if (g[w].nesting === 1) {
5091
- const D = g[w].info.trim().slice(9).trim(), I = D.startsWith("{") ? Oe(D, g[w].info) : D ? { component: D } : {};
5089
+ render(g, v) {
5090
+ if (g[v].nesting === 1) {
5091
+ const D = g[v].info.trim().slice(9).trim(), I = D.startsWith("{") ? Oe(D, g[v].info) : D ? { component: D } : {};
5092
5092
  return `<div class="np-component-embed" data-embed="${st(JSON.stringify({ ...t, ...I }))}"><div class="np-component-embed-body">`;
5093
5093
  }
5094
5094
  return "</div></div>";
@@ -5194,7 +5194,7 @@ function ci(e, t, n) {
5194
5194
  try {
5195
5195
  s = Qn(e);
5196
5196
  } catch (d) {
5197
- r = d instanceof Qt ? d.message : String(d), console.warn(`[nimpress] invalid dbml in ${n}:
5197
+ r = d instanceof en ? d.message : String(d), console.warn(`[nimpress] invalid dbml in ${n}:
5198
5198
  ${r}`);
5199
5199
  }
5200
5200
  const a = Buffer.from(s, "utf-8").toString("base64"), c = typeof o.height == "string" ? o.height : "";
@@ -5244,7 +5244,7 @@ function ui(e, t) {
5244
5244
  const c = n[a];
5245
5245
  if (c.type === "heading_open") {
5246
5246
  const f = parseInt(c.tag.slice(1)), d = n[a + 1], h = pi(d) || `heading-${s++}`;
5247
- let b = Re(h);
5247
+ let b = Fe(h);
5248
5248
  b || (b = `heading-${s++}`);
5249
5249
  const T = r.get(b);
5250
5250
  if (T !== void 0) {
@@ -5260,7 +5260,7 @@ function ui(e, t) {
5260
5260
  function Hn(e) {
5261
5261
  return e.frontmatter.slug ?? e.frontmatter.title;
5262
5262
  }
5263
- function Ne(e) {
5263
+ function Le(e) {
5264
5264
  return e ? e.replace(/[-_]/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()) : "";
5265
5265
  }
5266
5266
  function bt(e) {
@@ -5275,7 +5275,7 @@ function mi(e) {
5275
5275
  let t = Qe, n = V(process.cwd(), Qe.contentDir), o = V(process.cwd(), Qe.assetsDir), s = /* @__PURE__ */ new Map(), r = null, a = V(process.cwd(), "dist"), c = !1, f = !1, d = null;
5276
5276
  const h = /* @__PURE__ */ new Map();
5277
5277
  let b = [], T = "";
5278
- const O = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Set();
5278
+ const O = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Set();
5279
5279
  function D(i) {
5280
5280
  return qn("sha1").update(i).digest("hex");
5281
5281
  }
@@ -5311,8 +5311,8 @@ function mi(e) {
5311
5311
  }
5312
5312
  async function x(i, l) {
5313
5313
  try {
5314
- const m = $e(l) ? l : V(Z(i), l), y = await pe(m, "utf-8"), v = k(y, m);
5315
- return await R(v, Z(m)), v;
5314
+ const m = $e(l) ? l : V(Z(i), l), y = await pe(m, "utf-8"), w = k(y, m);
5315
+ return await R(w, Z(m)), w;
5316
5316
  } catch (m) {
5317
5317
  return console.warn(`[nimpress] failed to load spec ${l} for ${i}:`, m), null;
5318
5318
  }
@@ -5320,14 +5320,14 @@ function mi(e) {
5320
5320
  async function R(i, l) {
5321
5321
  if (!i || typeof i != "object") return;
5322
5322
  i.components || (i.components = {}), i.components.schemas || (i.components.schemas = {});
5323
- const m = i.components.schemas, y = /* @__PURE__ */ new Map(), v = async (_) => {
5323
+ const m = i.components.schemas, y = /* @__PURE__ */ new Map(), w = async (_) => {
5324
5324
  const S = await pe(_, "utf-8");
5325
5325
  return k(S, _);
5326
5326
  }, $ = async (_) => {
5327
5327
  if (y.has(_)) return y.get(_);
5328
5328
  const E = (_.split("/").pop() ?? "").replace(/\.json$/, "");
5329
5329
  y.set(_, E);
5330
- const C = await v(_);
5330
+ const C = await w(_);
5331
5331
  return await p(C, Z(_)), m[E] = C, E;
5332
5332
  }, p = async (_, S) => {
5333
5333
  if (!_ || typeof _ != "object") return;
@@ -5344,7 +5344,7 @@ function mi(e) {
5344
5344
  return;
5345
5345
  }
5346
5346
  if (N === "operations") {
5347
- const j = await v(C);
5347
+ const j = await w(C);
5348
5348
  await p(j, Z(C)), delete _.$ref;
5349
5349
  for (const A of Object.keys(j)) _[A] = j[A];
5350
5350
  return;
@@ -5359,7 +5359,7 @@ function mi(e) {
5359
5359
  if (S && typeof S == "object" && typeof S.$ref == "string" && !S.$ref.startsWith("#")) {
5360
5360
  const E = $e(S.$ref) ? S.$ref : V(l, S.$ref);
5361
5361
  y.set(E, _);
5362
- const C = await v(E);
5362
+ const C = await w(E);
5363
5363
  await p(C, Z(E)), m[_] = C;
5364
5364
  }
5365
5365
  }
@@ -5368,11 +5368,11 @@ function mi(e) {
5368
5368
  }
5369
5369
  function H(i, l) {
5370
5370
  if (typeof l != "string" || !l.startsWith("#/")) return null;
5371
- const m = l.slice(2).split("/").map((v) => v.replace(/~1/g, "/").replace(/~0/g, "~"));
5371
+ const m = l.slice(2).split("/").map((w) => w.replace(/~1/g, "/").replace(/~0/g, "~"));
5372
5372
  let y = i;
5373
- for (const v of m) {
5373
+ for (const w of m) {
5374
5374
  if (y == null) return null;
5375
- y = y[v];
5375
+ y = y[w];
5376
5376
  }
5377
5377
  return y;
5378
5378
  }
@@ -5391,7 +5391,7 @@ function mi(e) {
5391
5391
  }
5392
5392
  function me(i, l) {
5393
5393
  if (!i) return null;
5394
- const m = i, y = m.info ?? {}, v = m.components?.securitySchemes ?? {}, $ = ["get", "post", "put", "patch", "delete", "head", "options"], p = (j) => X(j, m)?.example, _ = /* @__PURE__ */ new Map(), S = m.paths ?? {};
5394
+ const m = i, y = m.info ?? {}, w = m.components?.securitySchemes ?? {}, $ = ["get", "post", "put", "patch", "delete", "head", "options"], p = (j) => X(j, m)?.example, _ = /* @__PURE__ */ new Map(), S = m.paths ?? {};
5395
5395
  for (const [j, A] of Object.entries(S)) {
5396
5396
  const B = X(A, m);
5397
5397
  if (!B || typeof B != "object") continue;
@@ -5418,7 +5418,7 @@ function mi(e) {
5418
5418
  for (const [fe, ce] of Object.entries(L.responses ?? {})) {
5419
5419
  const Se = X(ce, m);
5420
5420
  oe[fe] = Se;
5421
- const We = Se?.content?.["application/json"], ee = We?.example ?? (We?.examples ? Object.values(We.examples)[0]?.value : void 0) ?? p(We?.schema);
5421
+ const Be = Se?.content?.["application/json"], ee = Be?.example ?? (Be?.examples ? Object.values(Be.examples)[0]?.value : void 0) ?? p(Be?.schema);
5422
5422
  ee !== void 0 && (Y[fe] = ee);
5423
5423
  }
5424
5424
  const re = {
@@ -5453,7 +5453,7 @@ function mi(e) {
5453
5453
  description: y.description,
5454
5454
  description_html: Q(l, y.description),
5455
5455
  servers: m.servers,
5456
- securitySchemes: v,
5456
+ securitySchemes: w,
5457
5457
  tags: E,
5458
5458
  schemas: N
5459
5459
  };
@@ -5461,10 +5461,10 @@ function mi(e) {
5461
5461
  async function te(i) {
5462
5462
  const l = await pe(i, "utf-8"), { data: m, content: y } = vt(l);
5463
5463
  typeof m.type == "number" && (m.type = String(m.type));
5464
- const v = wo(m, y);
5465
- if (v.length) {
5464
+ const w = wo(m, y);
5465
+ if (w.length) {
5466
5466
  const ee = `${i}
5467
- ${v.join(`
5467
+ ${w.join(`
5468
5468
  `)}`;
5469
5469
  if (c) throw new Error(`[nimpress] invalid frontmatter in ${ee}`);
5470
5470
  console.warn(`[nimpress] invalid frontmatter in ${ee}`);
@@ -5501,7 +5501,7 @@ function mi(e) {
5501
5501
  try {
5502
5502
  U = await pe(q, "utf-8"), K = Qn(U);
5503
5503
  } catch (ee) {
5504
- Y = ee instanceof Qt ? ee.message : String(ee);
5504
+ Y = ee instanceof en ? ee.message : String(ee);
5505
5505
  const de = `${i} -> ${p.spec}
5506
5506
  ${Y}`;
5507
5507
  if (c) throw new Error(`[nimpress] invalid dbml in ${de}`);
@@ -5525,9 +5525,9 @@ function mi(e) {
5525
5525
  let ce;
5526
5526
  const Se = [];
5527
5527
  fe !== i && ge(fe) && Se.push(await pe(fe, "utf-8"));
5528
- const We = Pe(i, ".md");
5528
+ const Be = Pe(i, ".md");
5529
5529
  for (const ee of ze(Z(i)).sort()) {
5530
- const de = Ya(ee, We);
5530
+ const de = Ya(ee, Be);
5531
5531
  de && Se.push(Wn(de, await pe(J(Z(i), ee), "utf-8")));
5532
5532
  }
5533
5533
  for (const ee of p.styles ?? []) {
@@ -5566,7 +5566,7 @@ function mi(e) {
5566
5566
  for (const [m, y] of g)
5567
5567
  y === i && g.delete(m);
5568
5568
  for (const m of l)
5569
- g.set(m, i), d && !w.has(m) && (d.watcher.add(m), w.add(m));
5569
+ g.set(m, i), d && !v.has(m) && (d.watcher.add(m), v.add(m));
5570
5570
  }
5571
5571
  async function je(i) {
5572
5572
  let l;
@@ -5577,8 +5577,8 @@ function mi(e) {
5577
5577
  }
5578
5578
  const m = D(l + T), y = h.get(i);
5579
5579
  if (y && y.hash === m) return y.processed;
5580
- const v = await te(i);
5581
- return v ? (h.set(i, { hash: m, processed: v }), v) : (h.delete(i), null);
5580
+ const w = await te(i);
5581
+ return w ? (h.set(i, { hash: m, processed: w }), w) : (h.delete(i), null);
5582
5582
  }
5583
5583
  function le(i) {
5584
5584
  h.delete(i);
@@ -5599,7 +5599,7 @@ function mi(e) {
5599
5599
  return !1;
5600
5600
  }
5601
5601
  async function Je() {
5602
- const i = await rn(n), l = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map();
5602
+ const i = await an(n), l = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map();
5603
5603
  let p, _;
5604
5604
  const S = [], E = [];
5605
5605
  let C = [];
@@ -5635,7 +5635,7 @@ function mi(e) {
5635
5635
  }
5636
5636
  if (A.type === "roadmap") {
5637
5637
  const W = String(A.filePath);
5638
- v.set(W, [A]);
5638
+ w.set(W, [A]);
5639
5639
  }
5640
5640
  if (A.type === "section" && !A.filePath.endsWith(`${ke}index.md`))
5641
5641
  throw new Error(`[nimpress] type section belongs on a folder index.md: ${A.filePath}`);
@@ -5727,12 +5727,12 @@ function mi(e) {
5727
5727
  };
5728
5728
  m.set(W, ne.filePath), l.set(ne.slug, ne);
5729
5729
  }
5730
- if (Ro(v, S), Po(l), jo(l), t.seo?.auto) {
5730
+ if (Ro(w, S), Po(l), jo(l), t.seo?.auto) {
5731
5731
  const j = Qa(S.map((A) => ({
5732
5732
  slug: A.slug,
5733
5733
  title: A.frontmatter.title,
5734
5734
  headings: A.headings.map((B) => B.text),
5735
- tags: Be(A.frontmatter.tags),
5735
+ tags: Re(A.frontmatter.tags),
5736
5736
  body: A.rawText
5737
5737
  })));
5738
5738
  for (const A of S) {
@@ -5782,13 +5782,13 @@ function mi(e) {
5782
5782
  }
5783
5783
  const y = (m.changelogEntries ?? []).filter((z) => !z.hidden);
5784
5784
  if (y.length === 0) continue;
5785
- const v = m.effectivePath === "/" ? "" : m.effectivePath, $ = `${l}${be(t.base, v || "/")}`, p = we(m) ? `/${t.paths.guarded}/${ct(m)}` : "", _ = (z) => `${p}${v}/${Nn(z)}`, S = y.map((z) => z.releaseDate ? new Date(z.releaseDate).getTime() : Number.NaN).filter((z) => !Number.isNaN(z)).sort((z, se) => se - z), E = [];
5785
+ const w = m.effectivePath === "/" ? "" : m.effectivePath, $ = `${l}${be(t.base, w || "/")}`, p = we(m) ? `/${t.paths.guarded}/${ct(m)}` : "", _ = (z) => `${p}${w}/${Nn(z)}`, S = y.map((z) => z.releaseDate ? new Date(z.releaseDate).getTime() : Number.NaN).filter((z) => !Number.isNaN(z)).sort((z, se) => se - z), E = [];
5786
5786
  for (let z = 0; z + 1 < S.length; z++) E.push(S[z] - S[z + 1]);
5787
5787
  const C = E.length ? Math.round(E.reduce((z, se) => z + se, 0) / E.length / 1e3) : void 0, N = C ? Math.min(43200, Math.max(60, Math.round(C / 60))) : 1440, j = C ? C <= 172800 ? "daily" : C <= 1209600 ? "weekly" : C <= 5184e3 ? "monthly" : "yearly" : "weekly", A = S.length ? new Date(S[0]).toUTCString() : void 0, B = ye(m.frontmatter.title), W = ye(
5788
5788
  m.frontmatter.description ?? t.site?.description ?? m.frontmatter.title
5789
- ), M = t.site?.locale?.replace("_", "-").toLowerCase(), L = Math.max(1, Math.ceil(y.length / Bt));
5789
+ ), M = t.site?.locale?.replace("_", "-").toLowerCase(), L = Math.max(1, Math.ceil(y.length / Wt));
5790
5790
  for (let z = 0; z < L; z++) {
5791
- const se = y.slice(z * Bt, (z + 1) * Bt), ie = [
5791
+ const se = y.slice(z * Wt, (z + 1) * Wt), ie = [
5792
5792
  `<atom:link href="${ye(`${l}${be(t.base, _(z))}`)}" rel="self" type="application/rss+xml"/>`
5793
5793
  ];
5794
5794
  z > 0 && ie.push(
@@ -5860,7 +5860,7 @@ function mi(e) {
5860
5860
  if (l)
5861
5861
  return l + be(t.base, i.startsWith("/") ? i : "/" + i);
5862
5862
  }
5863
- function an(i) {
5863
+ function cn(i) {
5864
5864
  if (Ot.has(i)) return Ot.get(i);
5865
5865
  let l;
5866
5866
  try {
@@ -5878,11 +5878,11 @@ function mi(e) {
5878
5878
  return i === "changelog" || i === "roadmap" ? "CollectionPage" : i === "openapi" ? "APIReference" : i === "hero" || i === "fullpage" || i === "404" ? "WebPage" : i === "section" || i === "tags" ? "CollectionPage" : i === "glossary" ? "DefinedTermSet" : i === "team" ? "AboutPage" : "TechArticle";
5879
5879
  }
5880
5880
  function Oo(i) {
5881
- const l = t.meta ?? {}, m = t.site, y = i.frontmatter, v = y.meta ?? {}, $ = v.og ?? {}, p = v.twitter ?? {}, _ = y.title, S = m?.title && m.title !== _ ? `${_} · ${m.title}` : _, E = v.description ?? y.description ?? m?.description, C = v.canonical ?? Ce(i.effectivePath), N = (() => {
5882
- if (v.keywords) return Array.isArray(v.keywords) ? v.keywords : [v.keywords];
5883
- const G = Be(y.tags);
5881
+ const l = t.meta ?? {}, m = t.site, y = i.frontmatter, w = y.meta ?? {}, $ = w.og ?? {}, p = w.twitter ?? {}, _ = y.title, S = m?.title && m.title !== _ ? `${_} · ${m.title}` : _, E = w.description ?? y.description ?? m?.description, C = w.canonical ?? Ce(i.effectivePath), N = (() => {
5882
+ if (w.keywords) return Array.isArray(w.keywords) ? w.keywords : [w.keywords];
5883
+ const G = Re(y.tags);
5884
5884
  return G.length ? G : l.keywords ?? [];
5885
- })(), j = ei(v.robots ?? "index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1", t.seo?.ai?.index, v.ai), A = $.title ?? _, B = $.description ?? E, W = $.image ?? m?.ogImage, M = W ? Ce(W) ?? W : void 0, L = $.type ?? (y.type === "hero" || y.type === "fullpage" || i.effectivePath === "/" ? "website" : "article"), z = l.og?.width ?? 1200, se = l.og?.height ?? 600, ie = p.card ?? (M ? "summary_large_image" : "summary"), ne = p.site ?? m?.twitterSite, F = st, q = [];
5885
+ })(), j = ei(w.robots ?? "index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1", t.seo?.ai?.index, w.ai), A = $.title ?? _, B = $.description ?? E, W = $.image ?? m?.ogImage, M = W ? Ce(W) ?? W : void 0, L = $.type ?? (y.type === "hero" || y.type === "fullpage" || i.effectivePath === "/" ? "website" : "article"), z = l.og?.width ?? 1200, se = l.og?.height ?? 600, ie = p.card ?? (M ? "summary_large_image" : "summary"), ne = p.site ?? m?.twitterSite, F = st, q = [];
5886
5886
  if (q.push(`<title>${F(S)}</title>`), E && q.push(`<meta name="description" content="${F(E)}">`), N.length && q.push(`<meta name="keywords" content="${F(N.join(", "))}">`), q.push(`<meta name="robots" content="${F(j)}">`), q.push(`<meta name="googlebot" content="${F(j)}">`), C) {
5887
5887
  q.push(`<link rel="canonical" href="${F(C)}">`);
5888
5888
  const G = l.localeAlternates ?? [];
@@ -5910,7 +5910,7 @@ function mi(e) {
5910
5910
  for (const re of Y) {
5911
5911
  oe += "/" + re;
5912
5912
  const fe = [...s.values()].find((ce) => ce.effectivePath === oe);
5913
- G.push({ name: fe?.frontmatter.title ?? Ne(re), item: Ce(oe) });
5913
+ G.push({ name: fe?.frontmatter.title ?? Le(re), item: Ce(oe) });
5914
5914
  }
5915
5915
  U.push({
5916
5916
  "@context": "https://schema.org",
@@ -5931,8 +5931,8 @@ function mi(e) {
5931
5931
  description: E,
5932
5932
  url: C,
5933
5933
  isPartOf: K ? `${K}${be(t.base, "/")}#website` : void 0,
5934
- dateModified: an(i.filePath)
5935
- }), v.jsonLd && U.push(v.jsonLd);
5934
+ dateModified: cn(i.filePath)
5935
+ }), w.jsonLd && U.push(w.jsonLd);
5936
5936
  for (const G of U) q.push(ba(G));
5937
5937
  return `
5938
5938
  ${q.join(`
@@ -5942,11 +5942,11 @@ function mi(e) {
5942
5942
  function Do() {
5943
5943
  const i = t.meta ?? {};
5944
5944
  if (i.robots?.custom) return i.robots.custom;
5945
- const l = /* @__PURE__ */ new Set([...i.robots?.block ?? [], ...t.seo?.ai?.index === !1 ? Wt : []]), m = ["User-agent: *", "Allow: /", ""];
5946
- for (const v of Wt)
5947
- m.push(`User-agent: ${v}`), m.push(l.has(v) ? "Disallow: /" : "Allow: /"), m.push("");
5948
- for (const v of l)
5949
- Wt.includes(v) || (m.push(`User-agent: ${v}`), m.push("Disallow: /"), m.push(""));
5945
+ const l = /* @__PURE__ */ new Set([...i.robots?.block ?? [], ...t.seo?.ai?.index === !1 ? Lt : []]), m = ["User-agent: *", "Allow: /", ""];
5946
+ for (const w of Lt)
5947
+ m.push(`User-agent: ${w}`), m.push(l.has(w) ? "Disallow: /" : "Allow: /"), m.push("");
5948
+ for (const w of l)
5949
+ Lt.includes(w) || (m.push(`User-agent: ${w}`), m.push("Disallow: /"), m.push(""));
5950
5950
  i.robots?.append && m.push(i.robots.append, "");
5951
5951
  const y = Ce("/sitemap.xml");
5952
5952
  return y && m.push(`Sitemap: ${y}`), m.join(`
@@ -5962,8 +5962,8 @@ function mi(e) {
5962
5962
  return [
5963
5963
  '<?xml version="1.0" encoding="UTF-8"?>',
5964
5964
  '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">',
5965
- i.map((v) => {
5966
- const $ = `${l}${be(t.base, v.effectivePath === "/" ? "/" : v.effectivePath)}`, p = v.effectivePath.split("/").filter(Boolean).length, _ = p === 0 ? "1.0" : p === 1 ? "0.8" : "0.6", S = p === 0 ? "weekly" : "monthly", E = an(v.filePath), C = [` <loc>${ye($)}</loc>`];
5965
+ i.map((w) => {
5966
+ const $ = `${l}${be(t.base, w.effectivePath === "/" ? "/" : w.effectivePath)}`, p = w.effectivePath.split("/").filter(Boolean).length, _ = p === 0 ? "1.0" : p === 1 ? "0.8" : "0.6", S = p === 0 ? "weekly" : "monthly", E = cn(w.filePath), C = [` <loc>${ye($)}</loc>`];
5967
5967
  E && C.push(` <lastmod>${ye(E)}</lastmod>`), C.push(` <changefreq>${S}</changefreq>`), C.push(` <priority>${_}</priority>`);
5968
5968
  for (const N of m)
5969
5969
  C.push(` <xhtml:link rel="alternate" hreflang="${ye(N)}" href="${ye($)}"/>`);
@@ -5979,8 +5979,8 @@ ${C.join(`
5979
5979
  `);
5980
5980
  }
5981
5981
  function To(i) {
5982
- const l = t.meta ?? {}, m = t.site, y = [`# ${m?.title ?? t.title}`, ""], v = l.llms?.summary ?? m?.description;
5983
- v && y.push(`> ${v}`, "");
5982
+ const l = t.meta ?? {}, m = t.site, y = [`# ${m?.title ?? t.title}`, ""], w = l.llms?.summary ?? m?.description;
5983
+ w && y.push(`> ${w}`, "");
5984
5984
  const $ = /* @__PURE__ */ new Map(), p = [];
5985
5985
  for (const N of i) {
5986
5986
  const j = N.effectivePath.split("/").filter(Boolean);
@@ -5999,12 +5999,12 @@ ${C.join(`
5999
5999
  p.length && y.push("");
6000
6000
  for (const [N, j] of [...$.entries()].sort((A, B) => A[0].localeCompare(B[0]))) {
6001
6001
  const A = j.find((B) => B.effectivePath === `/${N}`);
6002
- y.push(`## ${A?.frontmatter.title ?? Ne(N)}`, ""), j.sort((B, W) => B.effectivePath.localeCompare(W.effectivePath));
6002
+ y.push(`## ${A?.frontmatter.title ?? Le(N)}`, ""), j.sort((B, W) => B.effectivePath.localeCompare(W.effectivePath));
6003
6003
  for (const B of j) y.push(_(B));
6004
6004
  y.push("");
6005
6005
  }
6006
6006
  const S = new Set(t.meta?.keywords ?? []);
6007
- for (const N of i) for (const j of Be(N.frontmatter.tags)) S.add(j);
6007
+ for (const N of i) for (const j of Re(N.frontmatter.tags)) S.add(j);
6008
6008
  S.size && y.push("## Keywords", "", [...S].join(", "), "");
6009
6009
  const E = Ce("/sitemap.xml"), C = Ce("/robots.txt");
6010
6010
  return (E || C) && (y.push("## Optional", ""), E && y.push(`- [Sitemap](${E})`), C && y.push(`- [Robots](${C})`), y.push("")), l.llms?.append && y.push(l.llms.append, ""), y.join(`
@@ -6016,8 +6016,8 @@ ${C.join(`
6016
6016
  const m = [`# ${t.site?.title ?? t.title}`, ""];
6017
6017
  for (const y of i) {
6018
6018
  m.push(`## ${y.frontmatter.title}`, "");
6019
- const v = Ce(y.effectivePath);
6020
- v && m.push(`URL: ${v}`, ""), m.push(y.rawText.trim(), "");
6019
+ const w = Ce(y.effectivePath);
6020
+ w && m.push(`URL: ${w}`, ""), m.push(y.rawText.trim(), "");
6021
6021
  }
6022
6022
  return m.join(`
6023
6023
  `).replace(/\n{3,}/g, `
@@ -6031,8 +6031,8 @@ ${C.join(`
6031
6031
  await Ve(Z(E), { recursive: !0 }), await he(E, S);
6032
6032
  }
6033
6033
  await he(J(a, "robots.txt"), Do());
6034
- const v = l.filter((p) => p.type !== "404"), $ = Mo(v);
6035
- if ($ && await he(J(a, "sitemap.xml"), $), await he(J(a, "llms.txt"), To(v)), i.llms?.full && await he(J(a, "llms-full.txt"), No(v)), i.webmanifest && await he(J(a, "site.webmanifest"), JSON.stringify(i.webmanifest, null, 2) + `
6034
+ const w = l.filter((p) => p.type !== "404"), $ = Mo(w);
6035
+ if ($ && await he(J(a, "sitemap.xml"), $), await he(J(a, "llms.txt"), To(w)), i.llms?.full && await he(J(a, "llms-full.txt"), No(w)), i.webmanifest && await he(J(a, "site.webmanifest"), JSON.stringify(i.webmanifest, null, 2) + `
6036
6036
  `), i.humans && await he(J(a, "humans.txt"), i.humans.trim() + `
6037
6037
  `), i.security) {
6038
6038
  const p = i.security, _ = [];
@@ -6055,9 +6055,9 @@ ${C.join(`
6055
6055
  JSON.stringify({ prefix: y, routes: l }, null, 2) + `
6056
6056
  `
6057
6057
  ), i.length === 0) return;
6058
- const v = J(a, t.paths.guarded), $ = {};
6058
+ const w = J(a, t.paths.guarded), $ = {};
6059
6059
  for (const [p, _] of m) {
6060
- const S = J(v, p);
6060
+ const S = J(w, p);
6061
6061
  await Ve(J(S, "body"), { recursive: !0 });
6062
6062
  const E = {}, C = _.map((j) => ({
6063
6063
  slug: j.slug,
@@ -6087,7 +6087,7 @@ ${C.join(`
6087
6087
  }
6088
6088
  await he(
6089
6089
  J(S, "manifest.json"),
6090
- JSON.stringify({ shells: C, styles: E, sidebar: pn(!0) })
6090
+ JSON.stringify({ shells: C, styles: E, sidebar: un(!0), dropdowns: Dt(!0) })
6091
6091
  ), await he(J(S, "search.json"), JSON.stringify(dn(!0, _))), $[p] = {
6092
6092
  pages: Object.fromEntries(_.map((j) => [j.effectivePath, j.frontmatter.gate ?? ""])),
6093
6093
  files: N
@@ -6101,10 +6101,10 @@ ${C.join(`
6101
6101
  }
6102
6102
  function Ro(i, l) {
6103
6103
  if (i.size === 0) return;
6104
- const m = l.filter((v) => Bo(v.type)), y = /* @__PURE__ */ new Map();
6105
- for (const v of m) y.set(v.filePath, v);
6106
- for (const [, v] of i) {
6107
- const $ = v[0], p = Z($.filePath), _ = $.frontmatter.data, S = _?.issues ?? _?.entries, E = [];
6104
+ const m = l.filter((w) => Bo(w.type)), y = /* @__PURE__ */ new Map();
6105
+ for (const w of m) y.set(w.filePath, w);
6106
+ for (const [, w] of i) {
6107
+ const $ = w[0], p = Z($.filePath), _ = $.frontmatter.data, S = _?.issues ?? _?.entries, E = [];
6108
6108
  if (typeof S == "string") E.push(S);
6109
6109
  else if (Array.isArray(S))
6110
6110
  for (const M of S) typeof M == "string" && E.push(M);
@@ -6128,11 +6128,11 @@ ${C.join(`
6128
6128
  if (!z) continue;
6129
6129
  const se = String(z).trim();
6130
6130
  if (!se) continue;
6131
- const ie = cn(M.filePath, se);
6131
+ const ie = ln(M.filePath, se);
6132
6132
  if (!ie) continue;
6133
6133
  const ne = y.get(ie);
6134
6134
  if (!ne) continue;
6135
- const F = String(L?.version ?? ""), q = ln(L?.release_date), K = L?.status;
6135
+ const F = String(L?.version ?? ""), q = pn(L?.release_date), K = L?.status;
6136
6136
  let U, G = !1;
6137
6137
  if (typeof K == "string") {
6138
6138
  const oe = K.trim().toLowerCase();
@@ -6157,11 +6157,11 @@ ${C.join(`
6157
6157
  }), B.set(ne.filePath, Y);
6158
6158
  }
6159
6159
  const W = N.map((M) => {
6160
- const L = M.frontmatter.data, z = M.type, se = ln(L?.date ?? L?.target_date);
6160
+ const L = M.frontmatter.data, z = M.type, se = pn(L?.date ?? L?.target_date);
6161
6161
  let ie;
6162
6162
  const ne = L?.parent;
6163
6163
  if (typeof ne == "string" && ne.trim()) {
6164
- const Y = cn(M.filePath, ne.trim());
6164
+ const Y = ln(M.filePath, ne.trim());
6165
6165
  Y && y.has(Y) && (ie = y.get(Y).effectivePath);
6166
6166
  }
6167
6167
  const F = (B.get(M.filePath) ?? []).slice().sort(
@@ -6195,11 +6195,11 @@ ${C.join(`
6195
6195
  function Bo(i) {
6196
6196
  return i === "milestone" || i === "epic" || i === "feature" || i === "bug";
6197
6197
  }
6198
- function cn(i, l) {
6199
- const m = Z(i), y = l.replace(/\\/g, "/").trim(), v = y.endsWith(".md") ? y : `${y}.md`;
6200
- return V(m, v);
6198
+ function ln(i, l) {
6199
+ const m = Z(i), y = l.replace(/\\/g, "/").trim(), w = y.endsWith(".md") ? y : `${y}.md`;
6200
+ return V(m, w);
6201
6201
  }
6202
- function ln(i) {
6202
+ function pn(i) {
6203
6203
  if (i == null) return;
6204
6204
  if (i instanceof Date) return i.toISOString();
6205
6205
  const l = String(i).trim();
@@ -6215,16 +6215,16 @@ ${C.join(`
6215
6215
  return $ || console.warn(`[nimpress] icon ${i} referenced from ${l} is not a known shortcode`), $ ?? void 0;
6216
6216
  }
6217
6217
  if (!i || !/\.svg$/i.test(i.trim())) return i;
6218
- const y = i.trim(), v = y.startsWith("/") ? J(n, y) : V(Z(l), y);
6218
+ const y = i.trim(), w = y.startsWith("/") ? J(n, y) : V(Z(l), y);
6219
6219
  try {
6220
- return Ae(v, "utf8").trim();
6220
+ return Ae(w, "utf8").trim();
6221
6221
  } catch {
6222
6222
  console.warn(`[nimpress] sidebar icon ${y} referenced from ${l} is not readable`);
6223
6223
  return;
6224
6224
  }
6225
6225
  }
6226
- function pn(i = !1) {
6227
- const l = { children: /* @__PURE__ */ new Map() }, m = new Map(mn().flatMap((p) => p.values.map((_, S) => [`${p.id}:${_}`, S]))), y = /* @__PURE__ */ new Map();
6226
+ function un(i = !1) {
6227
+ const l = { children: /* @__PURE__ */ new Map() }, m = new Map(Dt(i).flatMap((p) => p.values.map((_, S) => [`${p.id}:${_}`, S]))), y = /* @__PURE__ */ new Map();
6228
6228
  for (const p of s.values()) {
6229
6229
  if (c && (ve(p.frontmatter) || !i && we(p)) || p.type === "404" && !p.frontmatter.sidebar?.name) continue;
6230
6230
  const _ = p.frontmatter.sidebar;
@@ -6256,9 +6256,9 @@ ${C.join(`
6256
6256
  });
6257
6257
  }
6258
6258
  }
6259
- function v(p) {
6259
+ function w(p) {
6260
6260
  const _ = [];
6261
- for (const N of p.children.values()) _.push(v(N));
6261
+ for (const N of p.children.values()) _.push(w(N));
6262
6262
  if (bt(_), p.page) {
6263
6263
  const N = {
6264
6264
  text: Hn(p.page),
@@ -6270,7 +6270,7 @@ ${C.join(`
6270
6270
  collapsed: p.page.frontmatter.collapsed,
6271
6271
  hidden: ht(p.page.frontmatter),
6272
6272
  status: p.page.frontmatter.status,
6273
- dropdown: un(p.page)
6273
+ dropdown: mn(p.page)
6274
6274
  }, j = y.get(p.fullPath);
6275
6275
  j?.label && (N.text = j.label), j?.icon && !N.icon && (N.icon = j.icon), j?.style && (N.style = j.style);
6276
6276
  const A = p.page.openApiSpec;
@@ -6323,7 +6323,7 @@ ${C.join(`
6323
6323
  if (!re) {
6324
6324
  const fe = [...s.values()].find((ce) => ce.filePath === J(oe, "index.md"));
6325
6325
  re = {
6326
- text: fe ? Hn(fe) : Ne(Pe(oe)),
6326
+ text: fe ? Hn(fe) : Le(Pe(oe)),
6327
6327
  link: fe?.effectivePath,
6328
6328
  slug: `${p.page.slug}__${xe(W, oe).split(ke).join("/")}`,
6329
6329
  order: G,
@@ -6347,23 +6347,23 @@ ${C.join(`
6347
6347
  order: -1
6348
6348
  }, W = (p.page.componentData?.stories ?? []).map((M, L) => ({
6349
6349
  text: M.sidebar?.name ?? M.name,
6350
- link: `${p.page.effectivePath}/${Lt(M.name)}`,
6351
- slug: `${p.page.slug}__story__${Lt(M.name)}`,
6350
+ link: `${p.page.effectivePath}/${Ht(M.name)}`,
6351
+ slug: `${p.page.slug}__story__${Ht(M.name)}`,
6352
6352
  icon: Ge(M.sidebar?.icon, p.page.filePath),
6353
6353
  style: M.sidebar?.style,
6354
6354
  order: L
6355
6355
  }));
6356
- N.text = Ne(p.segment), N.items = [B, ...W, ..._], N.collapsed = !0;
6356
+ N.text = Le(p.segment), N.items = [B, ...W, ..._], N.collapsed = !0;
6357
6357
  } else _.length && (N.items = _);
6358
6358
  return N.collapsed !== !1 && N.items?.some((B) => B.collapsed === !1) && (N.collapsed = !1), N;
6359
6359
  }
6360
6360
  const S = y.get(p.fullPath), E = {
6361
- text: S?.label ?? Ne(p.segment),
6361
+ text: S?.label ?? Le(p.segment),
6362
6362
  slug: p.fullPath.replace(/^\//, "")
6363
6363
  };
6364
6364
  S?.icon && (E.icon = S.icon), S?.style && (E.style = S.style);
6365
6365
  const C = [...p.children.values()];
6366
- if (C.length && C.every((N) => N.page && Object.values(un(N.page) ?? {}).some((j) => j.some((A) => A.toLowerCase() === N.segment.toLowerCase())))) {
6366
+ if (C.length && C.every((N) => N.page && Object.values(mn(N.page) ?? {}).some((j) => j.some((A) => A.toLowerCase() === N.segment.toLowerCase())))) {
6367
6367
  E.variants = !0;
6368
6368
  const N = (j) => Math.min(...Object.entries(j.dropdown ?? {}).map(([A, B]) => m.get(`${A}:${B[0]}`) ?? Number.MAX_SAFE_INTEGER));
6369
6369
  for (const j of _) j.order ??= N(j);
@@ -6379,29 +6379,30 @@ ${C.join(`
6379
6379
  return E.items?.some((N) => N.collapsed === !1) && (E.collapsed = !1), E;
6380
6380
  }
6381
6381
  const $ = [];
6382
- for (const p of l.children.values()) $.push(v(p));
6382
+ for (const p of l.children.values()) $.push(w(p));
6383
6383
  return bt($), $;
6384
6384
  }
6385
- function un(i) {
6385
+ function mn(i) {
6386
6386
  const l = Object.entries(i.frontmatter.dropdown ?? {}).filter(([, m]) => m.value?.length);
6387
6387
  return l.length ? Object.fromEntries(l.map(([m, y]) => [m, y.value])) : void 0;
6388
6388
  }
6389
- function mn() {
6390
- const i = /* @__PURE__ */ new Map();
6391
- for (const [l, m] of Object.entries(t.dropdowns))
6392
- i.set(l, { id: l, title: m.title ?? Ne(l), description: m.description, values: [...m.values ?? []] });
6393
- for (const l of s.values())
6394
- if (!(c && (ve(l.frontmatter) || we(l))))
6395
- for (const [m, y] of Object.entries(l.frontmatter.dropdown ?? {})) {
6396
- const v = i.get(m) ?? { id: m, title: Ne(m), values: [] };
6397
- y.title && !t.dropdowns[m]?.title && (v.title = y.title), y.description && !t.dropdowns[m]?.description && (v.description = y.description);
6398
- for (const $ of y.value ?? []) v.values.includes($) || v.values.push($);
6399
- i.set(m, v);
6389
+ function Dt(i = !1) {
6390
+ const l = /* @__PURE__ */ new Map();
6391
+ for (const m of s.values())
6392
+ if (!(c && (ve(m.frontmatter) || !i && we(m))))
6393
+ for (const [y, w] of Object.entries(m.frontmatter.dropdown ?? {})) {
6394
+ const $ = t.dropdowns[y], p = l.get(y) ?? { id: y, title: $?.title ?? Le(y), description: $?.description, values: [] };
6395
+ w.title && !$?.title && (p.title = w.title), w.description && !$?.description && (p.description = w.description);
6396
+ for (const _ of w.value ?? []) p.values.includes(_) || p.values.push(_);
6397
+ l.set(y, p);
6400
6398
  }
6401
- return [...i.values()].filter((l) => l.values.length);
6399
+ return [...l.values()].filter((m) => m.values.length).map((m) => {
6400
+ const y = t.dropdowns[m.id]?.values ?? [], w = ($) => y.includes($) ? y.indexOf($) : y.length + m.values.indexOf($);
6401
+ return { ...m, values: [...m.values].sort(($, p) => w($) - w(p)) };
6402
+ });
6402
6403
  }
6403
6404
  function Wo(i) {
6404
- return `tag-${Re(i)}`;
6405
+ return `tag-${Fe(i)}`;
6405
6406
  }
6406
6407
  function Lo(i) {
6407
6408
  const l = t.tags?.icons;
@@ -6413,7 +6414,7 @@ ${C.join(`
6413
6414
  const i = /* @__PURE__ */ new Map();
6414
6415
  for (const l of s.values())
6415
6416
  if (!(l.sidebarOnly || l.type === "404" || l.type === "tags") && !(c && (ve(l.frontmatter) || we(l))))
6416
- for (const m of Be(l.frontmatter.tags)) {
6417
+ for (const m of Re(l.frontmatter.tags)) {
6417
6418
  const y = i.get(m) ?? { name: m, slug: Wo(m), icon: Lo(m), pages: [] };
6418
6419
  y.pages.push({ slug: l.slug, title: l.frontmatter.title, path: l.effectivePath, description: l.frontmatter.description }), i.set(m, y);
6419
6420
  }
@@ -6426,10 +6427,10 @@ ${C.join(`
6426
6427
  }
6427
6428
  function zo() {
6428
6429
  const i = {}, l = {};
6429
- for (const [v, $] of s) {
6430
+ for (const [w, $] of s) {
6430
6431
  if (c && (ve($.frontmatter) || we($)) || $.sidebarOnly) continue;
6431
6432
  const p = {
6432
- slug: v,
6433
+ slug: w,
6433
6434
  path: $.effectivePath,
6434
6435
  type: $.type,
6435
6436
  title: $.frontmatter.title,
@@ -6440,24 +6441,24 @@ ${C.join(`
6440
6441
  hidden: ht($.frontmatter),
6441
6442
  hide: $.type === "fullpage" ? Array.from(/* @__PURE__ */ new Set(["navigation", "path", "toc", "footer", ...$.frontmatter.hide ?? []])) : $.frontmatter.hide,
6442
6443
  source: xe(n, $.filePath).split(ke).join("/"),
6443
- tags: Be($.frontmatter.tags),
6444
+ tags: Re($.frontmatter.tags),
6444
6445
  redirect: $.frontmatter.redirect,
6445
6446
  meta: $.frontmatter.meta
6446
6447
  };
6447
- if (i[v] = p, l[$.effectivePath] = v, $.type === "component")
6448
+ if (i[w] = p, l[$.effectivePath] = w, $.type === "component")
6448
6449
  for (const _ of $.componentData?.stories ?? [])
6449
- l[`${$.effectivePath}/${Lt(_.name)}`] = v;
6450
+ l[`${$.effectivePath}/${Ht(_.name)}`] = w;
6450
6451
  }
6451
6452
  const m = {}, y = Ho();
6452
6453
  y && (m["/"] = y);
6453
- for (const v of s.values())
6454
- v.sidebarOnly || c && (ve(v.frontmatter) || we(v)) || v.pageCss && (m[v.effectivePath] = [m[v.effectivePath], v.pageCss].filter(Boolean).join(`
6454
+ for (const w of s.values())
6455
+ w.sidebarOnly || c && (ve(w.frontmatter) || we(w)) || w.pageCss && (m[w.effectivePath] = [m[w.effectivePath], w.pageCss].filter(Boolean).join(`
6455
6456
  `));
6456
- return { pages: i, byPath: l, sidebar: pn(), dropdowns: mn(), styles: m, tags: fn(), glossary: b };
6457
+ return { pages: i, byPath: l, sidebar: un(), dropdowns: Dt(), styles: m, tags: fn(), glossary: b };
6457
6458
  }
6458
6459
  function dn(i = !1, l) {
6459
- const m = [], y = l ? l.map((v) => [v.slug, v]) : s;
6460
- for (const [v, $] of y) {
6460
+ const m = [], y = l ? l.map((w) => [w.slug, w]) : s;
6461
+ for (const [w, $] of y) {
6461
6462
  if ($.sidebarOnly || $.type === "404") continue;
6462
6463
  if (i) {
6463
6464
  if (ve($.frontmatter) || !we($)) continue;
@@ -6469,7 +6470,7 @@ ${C.join(`
6469
6470
  ].filter(Boolean).join(" ") : "", C = $.dbmlSource ? $.dbmlSource.replace(/[{}\[\]'"`,]/g, " ") : "", N = [p, _, S, E, C].filter(Boolean).join(`
6470
6471
  `);
6471
6472
  m.push({
6472
- slug: v,
6473
+ slug: w,
6473
6474
  path: $.effectivePath,
6474
6475
  title: $.frontmatter.title,
6475
6476
  description: $.frontmatter.description,
@@ -6477,7 +6478,7 @@ ${C.join(`
6477
6478
  gate: $.frontmatter.gate,
6478
6479
  headings: $.headings.map((j) => j.text),
6479
6480
  tags: [
6480
- ...Be($.frontmatter.tags),
6481
+ ...Re($.frontmatter.tags),
6481
6482
  ...$.componentData ? [$.componentData.component] : []
6482
6483
  ]
6483
6484
  });
@@ -6489,8 +6490,8 @@ ${C.join(`
6489
6490
  }
6490
6491
  function qo(i) {
6491
6492
  if (!i || typeof i != "object") return "";
6492
- const l = i, m = [], y = /* @__PURE__ */ new WeakSet(), v = 12, $ = (p, _) => {
6493
- if (p == null || _ > v) return;
6493
+ const l = i, m = [], y = /* @__PURE__ */ new WeakSet(), w = 12, $ = (p, _) => {
6494
+ if (p == null || _ > w) return;
6494
6495
  const S = typeof p;
6495
6496
  if (S === "string") {
6496
6497
  const E = p.trim();
@@ -6542,12 +6543,12 @@ ${C.join(`
6542
6543
  return l.join(`
6543
6544
  `);
6544
6545
  }
6545
- function Be(i) {
6546
+ function Re(i) {
6546
6547
  if (!i) return [];
6547
6548
  const l = Array.isArray(i) ? i : String(i).split(","), m = [];
6548
6549
  for (const y of l) {
6549
- const v = String(y).trim();
6550
- v && m.push(v);
6550
+ const w = String(y).trim();
6551
+ w && m.push(w);
6551
6552
  }
6552
6553
  return m;
6553
6554
  }
@@ -6563,10 +6564,10 @@ ${C.join(`
6563
6564
  m && i.moduleGraph.invalidateModule(m);
6564
6565
  }
6565
6566
  }
6566
- function Dt(i) {
6567
+ function Mt(i) {
6567
6568
  for (const l of s.keys()) {
6568
- const m = Le + Me(l) + ".js", y = Ye + Me(l) + ".svelte", v = i.moduleGraph.getModuleById(m), $ = i.moduleGraph.getModuleById(y);
6569
- v && i.moduleGraph.invalidateModule(v), $ && i.moduleGraph.invalidateModule($);
6569
+ const m = We + Me(l) + ".js", y = Ye + Me(l) + ".svelte", w = i.moduleGraph.getModuleById(m), $ = i.moduleGraph.getModuleById(y);
6570
+ w && i.moduleGraph.invalidateModule(w), $ && i.moduleGraph.invalidateModule($);
6570
6571
  }
6571
6572
  }
6572
6573
  function Uo() {
@@ -6587,7 +6588,7 @@ export default pages
6587
6588
  const i = [];
6588
6589
  for (const [l, m] of s) {
6589
6590
  if (m.sidebarOnly || c && (ve(m.frontmatter) || we(m))) continue;
6590
- const y = `${Le}${Me(l)}.js`;
6591
+ const y = `${We}${Me(l)}.js`;
6591
6592
  i.push(` ${JSON.stringify(l)}: () => import(${JSON.stringify(y)})`);
6592
6593
  }
6593
6594
  return `export const bodies = {
@@ -6602,7 +6603,7 @@ export default bodies
6602
6603
  if (i.type === "glossary") return [...i.headings, ...b.map((l) => ({ level: 2, text: l.term, slug: l.slug }))];
6603
6604
  if (i.type === "team") {
6604
6605
  const l = i.frontmatter.data?.members ?? [];
6605
- return [...i.headings, ...l.filter((m) => m.name).map((m) => ({ level: 2, text: String(m.name), slug: `member-${Re(String(m.name))}` }))];
6606
+ return [...i.headings, ...l.filter((m) => m.name).map((m) => ({ level: 2, text: String(m.name), slug: `member-${Fe(String(m.name))}` }))];
6606
6607
  }
6607
6608
  return i.headings;
6608
6609
  }
@@ -6626,7 +6627,7 @@ export default bodies
6626
6627
  return `export default ${JSON.stringify(m)}
6627
6628
  `;
6628
6629
  }
6629
- function Mt(i) {
6630
+ function Tt(i) {
6630
6631
  return `Custom_${i.replace(/[^a-zA-Z0-9]/g, "_")}`;
6631
6632
  }
6632
6633
  function Yo(i) {
@@ -6640,8 +6641,8 @@ export default bodies
6640
6641
  path: l.effectivePath,
6641
6642
  type: l.type,
6642
6643
  frontmatter: l.frontmatter
6643
- }, y = `${Le}${Me(i)}.js`, v = JSON.stringify(m).replace(/<\/script>/g, "<\\/script>"), $ = Array.from(Fe.entries()), p = $.map(([E, C]) => ` import ${Mt(E)} from ${JSON.stringify(Yo(C.file))}`).join(`
6644
- `), _ = (E, C) => Fe.has(E) ? Mt(E) : C, S = [
6644
+ }, y = `${We}${Me(i)}.js`, w = JSON.stringify(m).replace(/<\/script>/g, "<\\/script>"), $ = Array.from(Ie.entries()), p = $.map(([E, C]) => ` import ${Tt(E)} from ${JSON.stringify(Yo(C.file))}`).join(`
6645
+ `), _ = (E, C) => Ie.has(E) ? Tt(E) : C, S = [
6645
6646
  ["team", "TeamPage"],
6646
6647
  ["pricing", "PricingPage"],
6647
6648
  ["glossary", "GlossaryPage"],
@@ -6655,14 +6656,14 @@ export default bodies
6655
6656
  ].map(([E, C]) => ` {:else if shell.type === ${JSON.stringify(E)}}
6656
6657
  <${_(E, C)} page={{ ...shell, ...mod.default }} />`).concat(
6657
6658
  $.filter(([E]) => !bo.has(E)).map(([E]) => ` {:else if shell.type === ${JSON.stringify(E)}}
6658
- <${Mt(E)} page={{ ...shell, ...mod.default }} />`)
6659
+ <${Tt(E)} page={{ ...shell, ...mod.default }} />`)
6659
6660
  ).join(`
6660
6661
  `);
6661
6662
  return `<script lang="ts">
6662
6663
  import { Page, OpenApiRoot, ChangelogPage, HeroPage, FullPage, NotFoundPage, RoadmapPage, ComponentPage, DbmlPage, setPageMeta, applyPageStyles, SectionPage, TagsPage, GlossaryPage, TeamPage, PricingPage, configStore, withoutBase, resolvedRoute } from '@nimtech/nimpress'
6663
6664
  import type { PageBody } from '@nimtech/nimpress'
6664
6665
  ${p}
6665
- const shell = ${v}
6666
+ const shell = ${w}
6666
6667
  setPageMeta(shell)
6667
6668
  applyPageStyles(shell.path)
6668
6669
  const bodyPromise: Promise<{ default: PageBody }> = import(${JSON.stringify(y)})
@@ -6722,29 +6723,29 @@ ${S}
6722
6723
  const l = J(a, "index.html"), m = J(a, "404.html");
6723
6724
  if (await _n(l, m), await he(J(a, ".nojekyll"), ""), ge(n) && await yn(n, a, {
6724
6725
  recursive: !0,
6725
- filter: (v) => {
6726
+ filter: (w) => {
6726
6727
  try {
6727
- return wt(v).isDirectory() || !(v.endsWith(".md") || v.endsWith(".css"));
6728
+ return wt(w).isDirectory() || !(w.endsWith(".md") || w.endsWith(".css"));
6728
6729
  } catch {
6729
6730
  return !1;
6730
6731
  }
6731
6732
  }
6732
6733
  }), ge(o)) {
6733
- const v = J(a, t.assetUrlBase.replace(/^\//, ""));
6734
- await yn(o, v, { recursive: !0 });
6734
+ const w = J(a, t.assetUrlBase.replace(/^\//, ""));
6735
+ await yn(o, w, { recursive: !0 });
6735
6736
  }
6736
- for (const [v, $] of Ue) {
6737
- const p = J(a, v.replace(/^\//, ""));
6737
+ for (const [w, $] of Ue) {
6738
+ const p = J(a, w.replace(/^\//, ""));
6738
6739
  await Ve(Z(p), { recursive: !0 }), await he(p, $);
6739
6740
  }
6740
6741
  await he(J(a, "subscribe.map.json"), At), await Io();
6741
- const y = Array.from(s.values()).find((v) => v.type === "404" && !ve(v.frontmatter) && !we(v));
6742
+ const y = Array.from(s.values()).find((w) => w.type === "404" && !ve(w.frontmatter) && !we(w));
6742
6743
  y && await _n(J(a, y.effectivePath.replace(/^\//, ""), "index.html"), J(a, "404.html")), await Fo();
6743
6744
  },
6744
6745
  configureServer(i) {
6745
6746
  d = i, i.watcher.add(n), i.watcher.add(o);
6746
6747
  for (const p of P) i.watcher.add(p);
6747
- for (const p of w) i.watcher.add(p);
6748
+ for (const p of v) i.watcher.add(p);
6748
6749
  const l = async (p) => {
6749
6750
  if (!(!p.startsWith(n) || !(p.endsWith(".md") || p.endsWith(".css") || p.match(/\.story\.tsx?$/)))) {
6750
6751
  p.endsWith(".css") && le(p.replace(/(\.[a-z0-9-]+)?\.css$/, ".md")), p.match(/\.story\.tsx?$/) && le(J(Z(p), "index.md"));
@@ -6754,7 +6755,7 @@ ${S}
6754
6755
  i.config.logger.error(String(S));
6755
6756
  return;
6756
6757
  }
6757
- lt(i), Dt(i), Xe(), i.ws.send({ type: "full-reload" });
6758
+ lt(i), Mt(i), Xe(), i.ws.send({ type: "full-reload" });
6758
6759
  }
6759
6760
  }, m = async (p) => {
6760
6761
  if (p.startsWith(n) && (p.endsWith(".md") || p.endsWith(".css") || p.match(/\.story\.tsx?$/))) {
@@ -6765,7 +6766,7 @@ ${S}
6765
6766
  i.config.logger.error(String(S));
6766
6767
  return;
6767
6768
  }
6768
- lt(i), Dt(i), Xe(), i.ws.send({ type: "full-reload" });
6769
+ lt(i), Mt(i), Xe(), i.ws.send({ type: "full-reload" });
6769
6770
  return;
6770
6771
  }
6771
6772
  if (O.has(p)) {
@@ -6806,12 +6807,12 @@ ${S}
6806
6807
  ".woff": "font/woff",
6807
6808
  ".woff2": "font/woff2",
6808
6809
  ".mp4": "video/mp4"
6809
- }, v = t.assetUrlBase, $ = (p, _, S) => {
6810
+ }, w = t.assetUrlBase, $ = (p, _, S) => {
6810
6811
  if (!_ || _.endsWith(".md")) return !1;
6811
6812
  const E = J(p, decodeURIComponent(_));
6812
- return !E.startsWith(p) || !ge(E) || !wt(E).isFile() ? !1 : (S.setHeader("Content-Type", y[Xt(E).toLowerCase()] ?? "application/octet-stream"), Zo(E).pipe(S), !0);
6813
+ return !E.startsWith(p) || !ge(E) || !wt(E).isFile() ? !1 : (S.setHeader("Content-Type", y[Yt(E).toLowerCase()] ?? "application/octet-stream"), Zo(E).pipe(S), !0);
6813
6814
  };
6814
- return i.middlewares.use(sn, lo(t.commands, process.cwd())), i.middlewares.use((p, _, S) => {
6815
+ return i.middlewares.use(rn, lo(t.commands, process.cwd())), i.middlewares.use((p, _, S) => {
6815
6816
  const E = (p.url ?? "").split("?")[0], C = Xn(t.base, E);
6816
6817
  if (C.startsWith("/@") || C.startsWith("/node_modules/")) return S();
6817
6818
  if (C === "/__nimpress/claude-md" && p.method === "PUT") {
@@ -6886,8 +6887,8 @@ ${S}
6886
6887
  }), p.pipe(L);
6887
6888
  return;
6888
6889
  }
6889
- if (v === "/" || C === v || C.startsWith(v + "/")) {
6890
- const B = v === "/" ? C : C.slice(v.length);
6890
+ if (w === "/" || C === w || C.startsWith(w + "/")) {
6891
+ const B = w === "/" ? C : C.slice(w.length);
6891
6892
  if ($(o, B.replace(/^\/+/, ""), _)) return;
6892
6893
  }
6893
6894
  $(n, C.replace(/^\/+/, ""), _) || S();
@@ -6907,7 +6908,7 @@ ${S}
6907
6908
  };
6908
6909
  },
6909
6910
  async handleHotUpdate(i) {
6910
- const l = i.file, m = l.endsWith(".md") && l.startsWith(n), y = l.endsWith(".css") && l.startsWith(n), v = l.match(/\.story\.tsx?$/) && l.startsWith(n), $ = O.get(l), p = g.get(l);
6911
+ const l = i.file, m = l.endsWith(".md") && l.startsWith(n), y = l.endsWith(".css") && l.startsWith(n), w = l.match(/\.story\.tsx?$/) && l.startsWith(n), $ = O.get(l), p = g.get(l);
6911
6912
  if (y) {
6912
6913
  le(l.replace(/(\.[a-z0-9-]+)?\.css$/, ".md"));
6913
6914
  try {
@@ -6918,8 +6919,8 @@ ${S}
6918
6919
  }
6919
6920
  return lt(i.server), i.server.ws.send({ type: "full-reload" }), [];
6920
6921
  }
6921
- if (!m && !v && !$ && !p) return;
6922
- const _ = m ? l : v ? J(Z(l), "index.md") : $ ?? p;
6922
+ if (!m && !w && !$ && !p) return;
6923
+ const _ = m ? l : w ? J(Z(l), "index.md") : $ ?? p;
6923
6924
  le(_);
6924
6925
  try {
6925
6926
  await Je();
@@ -6927,23 +6928,23 @@ ${S}
6927
6928
  i.server.config.logger.error(String(S));
6928
6929
  return;
6929
6930
  }
6930
- return lt(i.server), Dt(i.server), Xe(), i.server.ws.send({ type: "full-reload" }), [];
6931
+ return lt(i.server), Mt(i.server), Xe(), i.server.ws.send({ type: "full-reload" }), [];
6931
6932
  },
6932
6933
  resolveId: {
6933
6934
  order: "pre",
6934
6935
  handler(i) {
6935
- return i === ut ? "\0" + ut : i === mt ? "\0" + mt : i === ft ? "\0" + ft : i === dt ? "\0" + dt : i === Ft ? "\0" + Ft : i === Rt ? "\0" + Rt : c && i === ro ? qe : i.startsWith(Ye) && i.endsWith(".svelte") || i.startsWith(Le) && i.endsWith(".js") ? i : null;
6936
+ return i === ut ? "\0" + ut : i === mt ? "\0" + mt : i === ft ? "\0" + ft : i === dt ? "\0" + dt : i === Rt ? "\0" + Rt : i === Bt ? "\0" + Bt : c && i === ro ? qe : i.startsWith(Ye) && i.endsWith(".svelte") || i.startsWith(We) && i.endsWith(".js") ? i : null;
6936
6937
  }
6937
6938
  },
6938
6939
  generateBundle(i, l) {
6939
- const m = Object.values(l).flatMap((v) => v.type === "chunk" ? [v.code] : []), y = co(m, this.getModuleInfo(qe)?.importers ?? []);
6940
+ const m = Object.values(l).flatMap((w) => w.type === "chunk" ? [w.code] : []), y = co(m, this.getModuleInfo(qe)?.importers ?? []);
6940
6941
  y && (f = !0, this.error(y));
6941
6942
  },
6942
6943
  async load(i) {
6943
6944
  if (i === qe) return io;
6944
6945
  if (i === "\0" + ut)
6945
6946
  return `export default ${JSON.stringify(zo())}`;
6946
- if (i === "\0" + Ft) {
6947
+ if (i === "\0" + Rt) {
6947
6948
  const l = Es(t), m = l.announce || l.feedback ? Ln(await I(), De(), t.base, { math: t.math, icons: t.icons }) : null;
6948
6949
  if (l.feedback && m && (l.feedback = {
6949
6950
  ...l.feedback,
@@ -6952,15 +6953,15 @@ ${S}
6952
6953
  const y = V(process.cwd(), "nimpress.config.json");
6953
6954
  l.footer = {
6954
6955
  ...l.footer,
6955
- social: l.footer.social.map((v) => ({ ...v, icon: Ge(v.icon, y) ?? v.icon }))
6956
+ social: l.footer.social.map((w) => ({ ...w, icon: Ge(w.icon, y) ?? w.icon }))
6956
6957
  };
6957
6958
  }
6958
6959
  return `export default ${JSON.stringify(l)}`;
6959
6960
  }
6960
- if (i === "\0" + Rt) {
6961
+ if (i === "\0" + Bt) {
6961
6962
  const l = (C) => C.startsWith("/") ? C : "/" + C.replace(/^\.\//, ""), y = [...St(t).filter((C) => C !== "stock").map((C) => gt.includes(C) ? `@nimtech/nimpress/themes/${C}.css` : l(C)), ...t.css.map(l)].map((C) => `import ${JSON.stringify(C)}`).join(`
6962
- `), v = Object.entries(t.components), $ = v.map(([C, N]) => `import Nimpress${C} from ${JSON.stringify(l(N))}`).join(`
6963
- `), p = v.length ? `, components: { ${v.map(([C]) => `${C}: Nimpress${C}`).join(", ")} }` : "", _ = t.client ? l(t.client) : null, S = _ ? `import { authFunctions, subscribeFunctions, feedbackFunctions } from ${JSON.stringify(_)}` : "";
6963
+ `), w = Object.entries(t.components), $ = w.map(([C, N]) => `import Nimpress${C} from ${JSON.stringify(l(N))}`).join(`
6964
+ `), p = w.length ? `, components: { ${w.map(([C]) => `${C}: Nimpress${C}`).join(", ")} }` : "", _ = t.client ? l(t.client) : null, S = _ ? `import { authFunctions, subscribeFunctions, feedbackFunctions } from ${JSON.stringify(_)}` : "";
6964
6965
  return `import '@nimtech/nimpress/app.css'
6965
6966
  ${y}
6966
6967
  import { createNimpressApp } from '@nimtech/nimpress'
@@ -6986,8 +6987,8 @@ app.mount(target)
6986
6987
  const l = i.slice(Ye.length, -7);
6987
6988
  return Ko(gn(l));
6988
6989
  }
6989
- if (i.startsWith(Le) && i.endsWith(".js")) {
6990
- const l = i.slice(Le.length, -3);
6990
+ if (i.startsWith(We) && i.endsWith(".js")) {
6991
+ const l = i.slice(We.length, -3);
6991
6992
  return Xo(gn(l));
6992
6993
  }
6993
6994
  return null;
@@ -6998,7 +6999,7 @@ function Ji(e) {
6998
6999
  return e;
6999
7000
  }
7000
7001
  async function Ui(e, t) {
7001
- const n = V(e, t), o = await rn(n), s = [];
7002
+ const n = V(e, t), o = await an(n), s = [];
7002
7003
  for (const r of o) {
7003
7004
  let a;
7004
7005
  try {
@@ -7027,7 +7028,7 @@ export {
7027
7028
  Wn as K,
7028
7029
  Za as L,
7029
7030
  pa as a,
7030
- tn as b,
7031
+ nn as b,
7031
7032
  rt as c,
7032
7033
  Qe as d,
7033
7034
  Cn as e,
@@ -7048,7 +7049,7 @@ export {
7048
7049
  Ri as t,
7049
7050
  Nr as u,
7050
7051
  Ni as v,
7051
- on as w,
7052
+ sn as w,
7052
7053
  Cs as x,
7053
7054
  Oa as y,
7054
7055
  Hi as z